diff --git a/.gitignore b/.gitignore index 29cefc6..b8bb74c 100755 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,10 @@ node_modules dist .DS_Store cordova/platforms/android/app/release/ +cordova/www +cordova/platforms/www +cordova/platforms/android/app/src/main/assets +cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www +cordova/platforms/ios/FlyingPlane/Plugins +cordova/platforms/ios/www +cordova/plugins diff --git a/cordova/config.xml b/cordova/config.xml index 7a16953..d9fab6a 100644 --- a/cordova/config.xml +++ b/cordova/config.xml @@ -1,5 +1,5 @@ - FlyingPlane diff --git a/cordova/package-lock.json b/cordova/package-lock.json index d74a22d..6239d15 100644 --- a/cordova/package-lock.json +++ b/cordova/package-lock.json @@ -1,12 +1,12 @@ { "name": "com.doyban.flyingplane", - "version": "1.1.2", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "com.doyban.flyingplane", - "version": "1.1.2", + "version": "1.2.2", "dependencies": { "cordova-plugin-browsertab": "0.2.0", "cordova-plugin-buildinfo": "4.0.0", @@ -17,6 +17,7 @@ "cordova-universal-links-plugin-fix": "1.2.1" }, "devDependencies": { + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "^1.0.2", "admob-plus-cordova": "^1.28.0", "cordova-android": "^12.0.0", "cordova-ios": "^6.3.0", @@ -27,6 +28,20 @@ "es6-promise-plugin": "^4.2.2" } }, + "node_modules/@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/-/cordova-plugin-wkwebviewxhrfix-1.0.2.tgz", + "integrity": "sha512-o3GG0nnXXwDilmiLuHk/pYOYvL4v6JcjnGvd+fbZjGhfOAjx6/3Xy+RT/sPYvJUekkk6h6NRkP1USpR62csxRg==", + "dev": true, + "engines": { + "cordovaDependencies": { + "1.0.0": { + "cordova": ">5.0.0", + "cordova-ios": ">4.0.0" + } + } + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -2247,6 +2262,12 @@ } }, "dependencies": { + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/-/cordova-plugin-wkwebviewxhrfix-1.0.2.tgz", + "integrity": "sha512-o3GG0nnXXwDilmiLuHk/pYOYvL4v6JcjnGvd+fbZjGhfOAjx6/3Xy+RT/sPYvJUekkk6h6NRkP1USpR62csxRg==", + "dev": true + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", diff --git a/cordova/package.json b/cordova/package.json index 99c820a..9bcf5f5 100644 --- a/cordova/package.json +++ b/cordova/package.json @@ -1,7 +1,7 @@ { "name": "com.doyban.flyingplane", "displayName": "FlyingPlane", - "version": "1.1.2", + "version": "1.2.2", "description": "Tap Plane Game", "main": "index.js", "scripts": { @@ -12,6 +12,7 @@ ], "author": "Doyban", "devDependencies": { + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "^1.0.2", "admob-plus-cordova": "^1.28.0", "cordova-android": "^12.0.0", "cordova-ios": "^6.3.0", @@ -63,7 +64,8 @@ "PLAY_SERVICES_VERSION": "20.6.0", "USAGE": "This identifier will be used to deliver personalized ads to you.", "DISABLESDKCRASHREPORTING": "false" - } + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": {} } }, "dependencies": { diff --git a/cordova/platforms/android/android.json b/cordova/platforms/android/android.json index 097e868..e564218 100644 --- a/cordova/platforms/android/android.json +++ b/cordova/platforms/android/android.json @@ -223,6 +223,9 @@ "APP_ID_ANDROID": "ca-app-pub-4865595196880143~4169283752", "PLAY_SERVICES_VERSION": "20.6.0", "PACKAGE_NAME": "com.doyban.flyingplane" + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "PACKAGE_NAME": "com.doyban.flyingplane" } }, "dependent_plugins": {}, @@ -317,6 +320,7 @@ "cordova-plugin-customurlscheme": "5.0.2", "cordova-plugin-browsertab": "0.2.0", "cordova-universal-links-plugin": "1.2.1", - "admob-plus-cordova": "1.28.0" + "admob-plus-cordova": "1.28.0", + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "1.0.2" } } diff --git a/cordova/platforms/android/app/build.gradle b/cordova/platforms/android/app/build.gradle index a83945d..a775854 100644 --- a/cordova/platforms/android/app/build.gradle +++ b/cordova/platforms/android/app/build.gradle @@ -109,8 +109,8 @@ ext { } // PLUGIN GRADLE EXTENSIONS START -apply from: "../cordova-plugin-buildinfo/tappyplane-BuildInfo.gradle" -apply from: "../cordova-plugin-browsertab/tappyplane-BrowserTab.gradle" +apply from: "../cordova-plugin-buildinfo/flyingplane-BuildInfo.gradle" +apply from: "../cordova-plugin-browsertab/flyingplane-BrowserTab.gradle" // PLUGIN GRADLE EXTENSIONS END def hasBuildExtras1 = file('build-extras.gradle').exists() diff --git a/cordova/platforms/android/app/src/main/AndroidManifest.xml b/cordova/platforms/android/app/src/main/AndroidManifest.xml index 73918ed..f36dc25 100644 --- a/cordova/platforms/android/app/src/main/AndroidManifest.xml +++ b/cordova/platforms/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,5 @@ - + diff --git a/cordova/platforms/android/app/src/main/assets/www/app.0909a17fa1f4ba2383c9.js b/cordova/platforms/android/app/src/main/assets/www/app.0909a17fa1f4ba2383c9.js deleted file mode 100644 index f1fa517..0000000 --- a/cordova/platforms/android/app/src/main/assets/www/app.0909a17fa1f4ba2383c9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.0909a17fa1f4ba2383c9.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}({"./node_modules/@firebase/analytics/dist/esm/index.esm2017.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnalytics", function() { return getAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGoogleAnalyticsClientId", function() { return getGoogleAnalyticsClientId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeAnalytics", function() { return initializeAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSupported", function() { return isSupported; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logEvent", function() { return logEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAnalyticsCollectionEnabled", function() { return setAnalyticsCollectionEnabled; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConsent", function() { return setConsent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCurrentScreen", function() { return setCurrentScreen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultEventParameters", function() { return setDefaultEventParameters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserId", function() { return setUserId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserProperties", function() { return setUserProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });\n/* harmony import */ var _firebase_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @firebase/app */ "./node_modules/@firebase/app/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @firebase/logger */ "./node_modules/@firebase/logger/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @firebase/util */ "./node_modules/@firebase/util/dist/index.esm2017.js");\n/* harmony import */ var _firebase_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @firebase/component */ "./node_modules/@firebase/component/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_installations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @firebase/installations */ "./node_modules/@firebase/installations/dist/esm/index.esm2017.js");\n\n\n\n\n\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Type constant for Firebase Analytics.\r\n */\r\nconst ANALYTICS_TYPE = \'analytics\';\r\n// Key to attach FID to in gtag params.\r\nconst GA_FID_KEY = \'firebase_id\';\r\nconst ORIGIN_KEY = \'origin\';\r\nconst FETCH_TIMEOUT_MILLIS = 60 * 1000;\r\nconst DYNAMIC_CONFIG_URL = \'https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig\';\r\nconst GTAG_URL = \'https://www.googletagmanager.com/gtag/js\';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new _firebase_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"](\'@firebase/analytics\');\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n ["already-exists" /* AnalyticsError.ALREADY_EXISTS */]: \'A Firebase Analytics instance with the appId {$id} \' +\r\n \' already exists. \' +\r\n \'Only one Firebase Analytics instance can be created for each appId.\',\r\n ["already-initialized" /* AnalyticsError.ALREADY_INITIALIZED */]: \'initializeAnalytics() cannot be called again with different options than those \' +\r\n \'it was initially called with. It can be called again with the same options to \' +\r\n \'return the existing instance, or getAnalytics() can be used \' +\r\n \'to get a reference to the already-intialized instance.\',\r\n ["already-initialized-settings" /* AnalyticsError.ALREADY_INITIALIZED_SETTINGS */]: \'Firebase Analytics has already been initialized.\' +\r\n \'settings() must be called before initializing any Analytics instance\' +\r\n \'or it will have no effect.\',\r\n ["interop-component-reg-failed" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */]: \'Firebase Analytics Interop Component failed to instantiate: {$reason}\',\r\n ["invalid-analytics-context" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */]: \'Firebase Analytics is not supported in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */]: \'IndexedDB unavailable or restricted in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */]: \'The config fetch request timed out while in an exponential backoff state.\' +\r\n \' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.\',\r\n ["config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */]: \'Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}\',\r\n ["no-api-key" /* AnalyticsError.NO_API_KEY */]: \'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid API key.\',\r\n ["no-app-id" /* AnalyticsError.NO_APP_ID */]: \'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid app ID.\',\r\n ["no-client-id" /* AnalyticsError.NO_CLIENT_ID */]: \'The "client_id" field is empty.\',\r\n ["invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */]: \'Trusted Types detected an invalid gtag resource: {$gtagURL}.\'\r\n};\r\nconst ERROR_FACTORY = new _firebase_util__WEBPACK_IMPORTED_MODULE_2__["ErrorFactory"](\'analytics\', \'Analytics\', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Verifies and creates a TrustedScriptURL.\r\n */\r\nfunction createGtagTrustedTypesScriptURL(url) {\r\n if (!url.startsWith(GTAG_URL)) {\r\n const err = ERROR_FACTORY.create("invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */, {\r\n gtagURL: url\r\n });\r\n logger.warn(err.message);\r\n return \'\';\r\n }\r\n return url;\r\n}\r\n/**\r\n * Makeshift polyfill for Promise.allSettled(). Resolves when all promises\r\n * have either resolved or rejected.\r\n *\r\n * @param promises Array of promises to wait for.\r\n */\r\nfunction promiseAllSettled(promises) {\r\n return Promise.all(promises.map(promise => promise.catch(e => e)));\r\n}\r\n/**\r\n * Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.\r\n *\r\n * @param policyName A string containing the name of the policy\r\n * @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods\r\n * | the TrustedTypePolicy reference documentation}.\r\n */\r\nfunction createTrustedTypesPolicy(policyName, policyOptions) {\r\n // Create a TrustedTypes policy that we can use for updating src\r\n // properties\r\n let trustedTypesPolicy;\r\n if (window.trustedTypes) {\r\n trustedTypesPolicy = window.trustedTypes.createPolicy(policyName, policyOptions);\r\n }\r\n return trustedTypesPolicy;\r\n}\r\n/**\r\n * Inserts gtag script tag into the page to asynchronously download gtag.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction insertScriptTag(dataLayerName, measurementId) {\r\n const trustedTypesPolicy = createTrustedTypesPolicy(\'firebase-js-sdk-policy\', {\r\n createScriptURL: createGtagTrustedTypesScriptURL\r\n });\r\n const script = document.createElement(\'script\');\r\n // We are not providing an analyticsId in the URL because it would trigger a `page_view`\r\n // without fid. We will initialize ga-id using gtag (config) command together with fid.\r\n const gtagScriptURL = `${GTAG_URL}?l=${dataLayerName}&id=${measurementId}`;\r\n script.src = trustedTypesPolicy\r\n ? trustedTypesPolicy === null || trustedTypesPolicy === void 0 ? void 0 : trustedTypesPolicy.createScriptURL(gtagScriptURL)\r\n : gtagScriptURL;\r\n script.async = true;\r\n document.head.appendChild(script);\r\n}\r\n/**\r\n * Get reference to, or create, global datalayer.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction getOrCreateDataLayer(dataLayerName) {\r\n // Check for existing dataLayer and create if needed.\r\n let dataLayer = [];\r\n if (Array.isArray(window[dataLayerName])) {\r\n dataLayer = window[dataLayerName];\r\n }\r\n else {\r\n window[dataLayerName] = dataLayer;\r\n }\r\n return dataLayer;\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'config\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param measurementId GA Measurement ID to set config for.\r\n * @param gtagParams Gtag config params to set.\r\n */\r\nasync function gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams) {\r\n // If config is already fetched, we know the appId and can use it to look up what FID promise we\r\n /// are waiting for, and wait only on that one.\r\n const correspondingAppId = measurementIdToAppId[measurementId];\r\n try {\r\n if (correspondingAppId) {\r\n await initializationPromisesMap[correspondingAppId];\r\n }\r\n else {\r\n // If config is not fetched yet, wait for all configs (we don\'t know which one we need) and\r\n // find the appId (if any) corresponding to this measurementId. If there is one, wait on\r\n // that appId\'s initialization promise. If there is none, promise resolves and gtag\r\n // call goes through.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === measurementId);\r\n if (foundConfig) {\r\n await initializationPromisesMap[foundConfig.appId];\r\n }\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n gtagCore("config" /* GtagCommand.CONFIG */, measurementId, gtagParams);\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'event\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementId GA Measurement ID to log event to.\r\n * @param gtagParams Params to log with this event.\r\n */\r\nasync function gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams) {\r\n try {\r\n let initializationPromisesToWaitFor = [];\r\n // If there\'s a \'send_to\' param, check if any ID specified matches\r\n // an initializeIds() promise we are waiting for.\r\n if (gtagParams && gtagParams[\'send_to\']) {\r\n let gaSendToList = gtagParams[\'send_to\'];\r\n // Make it an array if is isn\'t, so it can be dealt with the same way.\r\n if (!Array.isArray(gaSendToList)) {\r\n gaSendToList = [gaSendToList];\r\n }\r\n // Checking \'send_to\' fields requires having all measurement ID results back from\r\n // the dynamic config fetch.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n for (const sendToId of gaSendToList) {\r\n // Any fetched dynamic measurement ID that matches this \'send_to\' ID\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === sendToId);\r\n const initializationPromise = foundConfig && initializationPromisesMap[foundConfig.appId];\r\n if (initializationPromise) {\r\n initializationPromisesToWaitFor.push(initializationPromise);\r\n }\r\n else {\r\n // Found an item in \'send_to\' that is not associated\r\n // directly with an FID, possibly a group. Empty this array,\r\n // exit the loop early, and let it get populated below.\r\n initializationPromisesToWaitFor = [];\r\n break;\r\n }\r\n }\r\n }\r\n // This will be unpopulated if there was no \'send_to\' field , or\r\n // if not all entries in the \'send_to\' field could be mapped to\r\n // a FID. In these cases, wait on all pending initialization promises.\r\n if (initializationPromisesToWaitFor.length === 0) {\r\n initializationPromisesToWaitFor = Object.values(initializationPromisesMap);\r\n }\r\n // Run core gtag function with args after all relevant initialization\r\n // promises have been resolved.\r\n await Promise.all(initializationPromisesToWaitFor);\r\n // Workaround for http://b/141370449 - third argument cannot be undefined.\r\n gtagCore("event" /* GtagCommand.EVENT */, measurementId, gtagParams || {});\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n}\r\n/**\r\n * Wraps a standard gtag function with extra code to wait for completion of\r\n * relevant initialization promises before sending requests.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n */\r\nfunction wrapGtag(gtagCore, \r\n/**\r\n * Allows wrapped gtag calls to wait on whichever intialization promises are required,\r\n * depending on the contents of the gtag params\' `send_to` field, if any.\r\n */\r\ninitializationPromisesMap, \r\n/**\r\n * Wrapped gtag calls sometimes require all dynamic config fetches to have returned\r\n * before determining what initialization promises (which include FIDs) to wait for.\r\n */\r\ndynamicConfigPromisesList, \r\n/**\r\n * Wrapped gtag config calls can narrow down which initialization promise (with FID)\r\n * to wait for if the measurementId is already fetched, by getting the corresponding appId,\r\n * which is the key for the initialization promises map.\r\n */\r\nmeasurementIdToAppId) {\r\n /**\r\n * Wrapper around gtag that ensures FID is sent with gtag calls.\r\n * @param command Gtag command type.\r\n * @param idOrNameOrParams Measurement ID if command is EVENT/CONFIG, params if command is SET.\r\n * @param gtagParams Params if event is EVENT/CONFIG.\r\n */\r\n async function gtagWrapper(command, ...args) {\r\n try {\r\n // If event, check that relevant initialization promises have completed.\r\n if (command === "event" /* GtagCommand.EVENT */) {\r\n const [measurementId, gtagParams] = args;\r\n // If EVENT, second arg must be measurementId.\r\n await gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams);\r\n }\r\n else if (command === "config" /* GtagCommand.CONFIG */) {\r\n const [measurementId, gtagParams] = args;\r\n // If CONFIG, second arg must be measurementId.\r\n await gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams);\r\n }\r\n else if (command === "consent" /* GtagCommand.CONSENT */) {\r\n const [gtagParams] = args;\r\n gtagCore("consent" /* GtagCommand.CONSENT */, \'update\', gtagParams);\r\n }\r\n else if (command === "get" /* GtagCommand.GET */) {\r\n const [measurementId, fieldName, callback] = args;\r\n gtagCore("get" /* GtagCommand.GET */, measurementId, fieldName, callback);\r\n }\r\n else if (command === "set" /* GtagCommand.SET */) {\r\n const [customParams] = args;\r\n // If SET, second arg must be params.\r\n gtagCore("set" /* GtagCommand.SET */, customParams);\r\n }\r\n else {\r\n gtagCore(command, ...args);\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n }\r\n return gtagWrapper;\r\n}\r\n/**\r\n * Creates global gtag function or wraps existing one if found.\r\n * This wrapped function attaches Firebase instance ID (FID) to gtag \'config\' and\r\n * \'event\' calls that belong to the GAID associated with this Firebase instance.\r\n *\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param dataLayerName Name of global GA datalayer array.\r\n * @param gtagFunctionName Name of global gtag function ("gtag" if not user-specified).\r\n */\r\nfunction wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagFunctionName) {\r\n // Create a basic core gtag function\r\n let gtagCore = function (..._args) {\r\n // Must push IArguments object, not an array.\r\n window[dataLayerName].push(arguments);\r\n };\r\n // Replace it with existing one if found\r\n if (window[gtagFunctionName] &&\r\n typeof window[gtagFunctionName] === \'function\') {\r\n // @ts-ignore\r\n gtagCore = window[gtagFunctionName];\r\n }\r\n window[gtagFunctionName] = wrapGtag(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId);\r\n return {\r\n gtagCore,\r\n wrappedGtag: window[gtagFunctionName]\r\n };\r\n}\r\n/**\r\n * Returns the script tag in the DOM matching both the gtag url pattern\r\n * and the provided data layer name.\r\n */\r\nfunction findGtagScriptOnPage(dataLayerName) {\r\n const scriptTags = window.document.getElementsByTagName(\'script\');\r\n for (const tag of Object.values(scriptTags)) {\r\n if (tag.src &&\r\n tag.src.includes(GTAG_URL) &&\r\n tag.src.includes(dataLayerName)) {\r\n return tag;\r\n }\r\n }\r\n return null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Backoff factor for 503 errors, which we want to be conservative about\r\n * to avoid overloading servers. Each retry interval will be\r\n * BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one\r\n * will be ~30 seconds (with fuzzing).\r\n */\r\nconst LONG_RETRY_FACTOR = 30;\r\n/**\r\n * Base wait interval to multiplied by backoffFactor^backoffCount.\r\n */\r\nconst BASE_INTERVAL_MILLIS = 1000;\r\n/**\r\n * Stubbable retry data storage class.\r\n */\r\nclass RetryData {\r\n constructor(throttleMetadata = {}, intervalMillis = BASE_INTERVAL_MILLIS) {\r\n this.throttleMetadata = throttleMetadata;\r\n this.intervalMillis = intervalMillis;\r\n }\r\n getThrottleMetadata(appId) {\r\n return this.throttleMetadata[appId];\r\n }\r\n setThrottleMetadata(appId, metadata) {\r\n this.throttleMetadata[appId] = metadata;\r\n }\r\n deleteThrottleMetadata(appId) {\r\n delete this.throttleMetadata[appId];\r\n }\r\n}\r\nconst defaultRetryData = new RetryData();\r\n/**\r\n * Set GET request headers.\r\n * @param apiKey App API key.\r\n */\r\nfunction getHeaders(apiKey) {\r\n return new Headers({\r\n Accept: \'application/json\',\r\n \'x-goog-api-key\': apiKey\r\n });\r\n}\r\n/**\r\n * Fetches dynamic config from backend.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfig(appFields) {\r\n var _a;\r\n const { appId, apiKey } = appFields;\r\n const request = {\r\n method: \'GET\',\r\n headers: getHeaders(apiKey)\r\n };\r\n const appUrl = DYNAMIC_CONFIG_URL.replace(\'{app-id}\', appId);\r\n const response = await fetch(appUrl, request);\r\n if (response.status !== 200 && response.status !== 304) {\r\n let errorMessage = \'\';\r\n try {\r\n // Try to get any error message text from server response.\r\n const jsonResponse = (await response.json());\r\n if ((_a = jsonResponse.error) === null || _a === void 0 ? void 0 : _a.message) {\r\n errorMessage = jsonResponse.error.message;\r\n }\r\n }\r\n catch (_ignored) { }\r\n throw ERROR_FACTORY.create("config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */, {\r\n httpStatus: response.status,\r\n responseMessage: errorMessage\r\n });\r\n }\r\n return response.json();\r\n}\r\n/**\r\n * Fetches dynamic config from backend, retrying if failed.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfigWithRetry(app, \r\n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\r\nretryData = defaultRetryData, timeoutMillis) {\r\n const { appId, apiKey, measurementId } = app.options;\r\n if (!appId) {\r\n throw ERROR_FACTORY.create("no-app-id" /* AnalyticsError.NO_APP_ID */);\r\n }\r\n if (!apiKey) {\r\n if (measurementId) {\r\n return {\r\n measurementId,\r\n appId\r\n };\r\n }\r\n throw ERROR_FACTORY.create("no-api-key" /* AnalyticsError.NO_API_KEY */);\r\n }\r\n const throttleMetadata = retryData.getThrottleMetadata(appId) || {\r\n backoffCount: 0,\r\n throttleEndTimeMillis: Date.now()\r\n };\r\n const signal = new AnalyticsAbortSignal();\r\n setTimeout(async () => {\r\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\r\n signal.abort();\r\n }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\r\n return attemptFetchDynamicConfigWithRetry({ appId, apiKey, measurementId }, throttleMetadata, signal, retryData);\r\n}\r\n/**\r\n * Runs one retry attempt.\r\n * @param appFields Necessary app config fields.\r\n * @param throttleMetadata Ongoing metadata to determine throttling times.\r\n * @param signal Abort signal.\r\n */\r\nasync function attemptFetchDynamicConfigWithRetry(appFields, { throttleEndTimeMillis, backoffCount }, signal, retryData = defaultRetryData // for testing\r\n) {\r\n var _a;\r\n const { appId, measurementId } = appFields;\r\n // Starts with a (potentially zero) timeout to support resumption from stored state.\r\n // Ensures the throttle end time is honored if the last attempt timed out.\r\n // Note the SDK will never make a request if the fetch timeout expires at this point.\r\n try {\r\n await setAbortableTimeout(signal, throttleEndTimeMillis);\r\n }\r\n catch (e) {\r\n if (measurementId) {\r\n logger.warn(`Timed out fetching this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`);\r\n return { appId, measurementId };\r\n }\r\n throw e;\r\n }\r\n try {\r\n const response = await fetchDynamicConfig(appFields);\r\n // Note the SDK only clears throttle state if response is success or non-retriable.\r\n retryData.deleteThrottleMetadata(appId);\r\n return response;\r\n }\r\n catch (e) {\r\n const error = e;\r\n if (!isRetriableError(error)) {\r\n retryData.deleteThrottleMetadata(appId);\r\n if (measurementId) {\r\n logger.warn(`Failed to fetch this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\r\n return { appId, measurementId };\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n const backoffMillis = Number((_a = error === null || error === void 0 ? void 0 : error.customData) === null || _a === void 0 ? void 0 : _a.httpStatus) === 503\r\n ? Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\r\n : Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis);\r\n // Increments backoff state.\r\n const throttleMetadata = {\r\n throttleEndTimeMillis: Date.now() + backoffMillis,\r\n backoffCount: backoffCount + 1\r\n };\r\n // Persists state.\r\n retryData.setThrottleMetadata(appId, throttleMetadata);\r\n logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\r\n return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\r\n }\r\n}\r\n/**\r\n * Supports waiting on a backoff by:\r\n *\r\n *
    \r\n *
  • Promisifying setTimeout, so we can set a timeout in our Promise chain
  • \r\n *
  • Listening on a signal bus for abort events, just like the Fetch API
  • \r\n *
  • Failing in the same way the Fetch API fails, so timing out a live request and a throttled\r\n * request appear the same.
  • \r\n *
\r\n *\r\n *

Visible for testing.\r\n */\r\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\r\n return new Promise((resolve, reject) => {\r\n // Derives backoff from given end time, normalizing negative numbers to zero.\r\n const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\r\n const timeout = setTimeout(resolve, backoffMillis);\r\n // Adds listener, rather than sets onabort, because signal is a shared object.\r\n signal.addEventListener(() => {\r\n clearTimeout(timeout);\r\n // If the request completes before this timeout, the rejection has no effect.\r\n reject(ERROR_FACTORY.create("fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */, {\r\n throttleEndTimeMillis\r\n }));\r\n });\r\n });\r\n}\r\n/**\r\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\r\n */\r\nfunction isRetriableError(e) {\r\n if (!(e instanceof _firebase_util__WEBPACK_IMPORTED_MODULE_2__["FirebaseError"]) || !e.customData) {\r\n return false;\r\n }\r\n // Uses string index defined by ErrorData, which FirebaseError implements.\r\n const httpStatus = Number(e.customData[\'httpStatus\']);\r\n return (httpStatus === 429 ||\r\n httpStatus === 500 ||\r\n httpStatus === 503 ||\r\n httpStatus === 504);\r\n}\r\n/**\r\n * Shims a minimal AbortSignal (copied from Remote Config).\r\n *\r\n *

AbortController\'s AbortSignal conveniently decouples fetch timeout logic from other aspects\r\n * of networking, such as retries. Firebase doesn\'t use AbortController enough to justify a\r\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\r\n * swapped out if/when we do.\r\n */\r\nclass AnalyticsAbortSignal {\r\n constructor() {\r\n this.listeners = [];\r\n }\r\n addEventListener(listener) {\r\n this.listeners.push(listener);\r\n }\r\n abort() {\r\n this.listeners.forEach(listener => listener());\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Event parameters to set on \'gtag\' during initialization.\r\n */\r\nlet defaultEventParametersForInit;\r\n/**\r\n * Logs an analytics event through the Firebase SDK.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param eventName Google Analytics event name, choose from standard list or use a custom string.\r\n * @param eventParams Analytics event parameters.\r\n */\r\nasync function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\r\n if (options && options.global) {\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, eventParams);\r\n return;\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n const params = Object.assign(Object.assign({}, eventParams), { \'send_to\': measurementId });\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, params);\r\n }\r\n}\r\n/**\r\n * Set screen_name parameter for this Google Analytics ID.\r\n *\r\n * @deprecated Use {@link logEvent} with `eventName` as \'screen_view\' and add relevant `eventParams`.\r\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param screenName Screen name string to set.\r\n */\r\nasync function setCurrentScreen$1(gtagFunction, initializationPromise, screenName, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'screen_name\': screenName });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'screen_name\': screenName\r\n });\r\n }\r\n}\r\n/**\r\n * Set user_id parameter for this Google Analytics ID.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param id User ID string to set\r\n */\r\nasync function setUserId$1(gtagFunction, initializationPromise, id, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'user_id\': id });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_id\': id\r\n });\r\n }\r\n}\r\n/**\r\n * Set all other user properties other than user_id and screen_name.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param properties Map of user properties to set\r\n */\r\nasync function setUserProperties$1(gtagFunction, initializationPromise, properties, options) {\r\n if (options && options.global) {\r\n const flatProperties = {};\r\n for (const key of Object.keys(properties)) {\r\n // use dot notation for merge behavior in gtag.js\r\n flatProperties[`user_properties.${key}`] = properties[key];\r\n }\r\n gtagFunction("set" /* GtagCommand.SET */, flatProperties);\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_properties\': properties\r\n });\r\n }\r\n}\r\n/**\r\n * Retrieves a unique Google Analytics identifier for the web client.\r\n * See {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id | client_id}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n */\r\nasync function internalGetGoogleAnalyticsClientId(gtagFunction, initializationPromise) {\r\n const measurementId = await initializationPromise;\r\n return new Promise((resolve, reject) => {\r\n gtagFunction("get" /* GtagCommand.GET */, measurementId, \'client_id\', (clientId) => {\r\n if (!clientId) {\r\n reject(ERROR_FACTORY.create("no-client-id" /* AnalyticsError.NO_CLIENT_ID */));\r\n }\r\n resolve(clientId);\r\n });\r\n });\r\n}\r\n/**\r\n * Set whether collection is enabled for this ID.\r\n *\r\n * @param enabled If true, collection is enabled for this ID.\r\n */\r\nasync function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {\r\n const measurementId = await initializationPromise;\r\n window[`ga-disable-${measurementId}`] = !enabled;\r\n}\r\n/**\r\n * Consent parameters to default to during \'gtag\' initialization.\r\n */\r\nlet defaultConsentSettingsForInit;\r\n/**\r\n * Sets the variable {@link defaultConsentSettingsForInit} for use in the initialization of\r\n * analytics.\r\n *\r\n * @param consentSettings Maps the applicable end user consent state for gtag.js.\r\n */\r\nfunction _setConsentDefaultForInit(consentSettings) {\r\n defaultConsentSettingsForInit = consentSettings;\r\n}\r\n/**\r\n * Sets the variable `defaultEventParametersForInit` for use in the initialization of\r\n * analytics.\r\n *\r\n * @param customParams Any custom params the user may pass to gtag.js.\r\n */\r\nfunction _setDefaultEventParametersForInit(customParams) {\r\n defaultEventParametersForInit = customParams;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function validateIndexedDB() {\r\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["isIndexedDBAvailable"])()) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: \'IndexedDB is not available in this environment.\'\r\n }).message);\r\n return false;\r\n }\r\n else {\r\n try {\r\n await Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["validateIndexedDBOpenable"])();\r\n }\r\n catch (e) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: e === null || e === void 0 ? void 0 : e.toString()\r\n }).message);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Initialize the analytics instance in gtag.js by calling config command with fid.\r\n *\r\n * NOTE: We combine analytics initialization and setting fid together because we want fid to be\r\n * part of the `page_view` event that\'s sent during the initialization\r\n * @param app Firebase app\r\n * @param gtagCore The gtag function that\'s not wrapped.\r\n * @param dynamicConfigPromisesList Array of all dynamic config promises.\r\n * @param measurementIdToAppId Maps measurementID to appID.\r\n * @param installations _FirebaseInstallationsInternal instance.\r\n *\r\n * @returns Measurement ID.\r\n */\r\nasync function _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\r\n var _a;\r\n const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\r\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\r\n dynamicConfigPromise\r\n .then(config => {\r\n measurementIdToAppId[config.measurementId] = config.appId;\r\n if (app.options.measurementId &&\r\n config.measurementId !== app.options.measurementId) {\r\n logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` +\r\n ` does not match the measurement ID fetched from the server (${config.measurementId}).` +\r\n ` To ensure analytics events are always sent to the correct Analytics property,` +\r\n ` update the` +\r\n ` measurement ID field in the local config or remove it from the local config.`);\r\n }\r\n })\r\n .catch(e => logger.error(e));\r\n // Add to list to track state of all dynamic config promises.\r\n dynamicConfigPromisesList.push(dynamicConfigPromise);\r\n const fidPromise = validateIndexedDB().then(envIsValid => {\r\n if (envIsValid) {\r\n return installations.getId();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n const [dynamicConfig, fid] = await Promise.all([\r\n dynamicConfigPromise,\r\n fidPromise\r\n ]);\r\n // Detect if user has already put the gtag + + + FlyingPlane @@ -38,8 +40,6 @@

- - - + diff --git a/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js b/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js deleted file mode 100644 index 976ddc9..0000000 --- a/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see vendor.0909a17fa1f4ba2383c9.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=1)}({"./node_modules/eventemitter3/index.js":function(module,exports,__webpack_require__){"use strict";eval("\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n//# sourceURL=webpack:///./node_modules/eventemitter3/index.js?")},"./node_modules/phaser/plugins/camera3d/src/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Matrix4 = __webpack_require__(/*! ../../../src/math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar RandomXYZ = __webpack_require__(/*! ../../../src/math/RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js");\r\nvar RandomXYZW = __webpack_require__(/*! ../../../src/math/RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js");\r\nvar RotateVec3 = __webpack_require__(/*! ../../../src/math/RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js");\r\nvar Set = __webpack_require__(/*! ../../../src/structs/Set */ "./node_modules/phaser/src/structs/Set.js");\r\nvar Sprite3D = __webpack_require__(/*! ./sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\nvar tmpVec4 = new Vector4();\r\nvar dirvec = new Vector3();\r\nvar rightvec = new Vector3();\r\nvar billboardMatrix = new Matrix4();\r\n\r\n// @author attribute https://github.com/mattdesl/cam3d/wiki\r\n\r\n/**\r\n * @typedef {object} RayDef\r\n *\r\n * @property {Phaser.Math.Vector3} origin - [description]\r\n * @property {Phaser.Math.Vector3} direction - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar Camera = new Class({\r\n\r\n initialize:\r\n\r\n function Camera (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList = scene.sys.displayList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList = scene.sys.updateList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#direction\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.direction = new Vector3(0, 0, -1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#up\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.up = new Vector3(0, 1, 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#position\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector3();\r\n\r\n\r\n /**\r\n * The mapping from 3D size units to pixels.\r\n * In the default case 1 3D unit = 128 pixels. So a sprite that is\r\n * 256 x 128 px in size will be 2 x 1 units.\r\n * Change to whatever best fits your game assets.\r\n *\r\n * @name Phaser.Cameras.Sprite3D#pixelScale\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelScale = 128;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#projection\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.projection = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#view\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.view = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#combined\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.combined = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#invProjectionView\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.invProjectionView = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#near\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.near = 1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#far\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.far = 100;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#ray\r\n * @type {RayDef}\r\n * @since 3.0.0\r\n */\r\n this.ray = {\r\n origin: new Vector3(),\r\n direction: new Vector3()\r\n };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#billboardMatrixDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.billboardMatrixDirty = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPosition: function (x, y, z)\r\n {\r\n this.position.set(x, y, z);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setScene: function (scene)\r\n {\r\n this.scene = scene;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPixelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPixelScale: function (value)\r\n {\r\n this.pixelScale = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite3D} sprite3D - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n add: function (sprite3D)\r\n {\r\n this.children.set(sprite3D);\r\n\r\n this.displayList.add(sprite3D.gameObject);\r\n this.updateList.add(sprite3D.gameObject);\r\n\r\n this.updateChildren();\r\n\r\n return sprite3D;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n remove: function (child)\r\n {\r\n this.displayList.remove(child.gameObject);\r\n this.updateList.remove(child.gameObject);\r\n\r\n this.children.delete(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n clear: function ()\r\n {\r\n var children = this.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.remove(children[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {array} [description]\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n create: function (x, y, z, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var child = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n this.updateChildren();\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {number} quantity - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createMultiple: function (quantity, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var child = new Sprite3D(this.scene, 0, 0, 0, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n output.push(child);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // Create a bunch of Sprite3D objects in a rectangle\r\n // size and spacing are Vec3s (or if integers are converted to vec3s)\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createRect\r\n * @since 3.0.0\r\n *\r\n * @param {(number|{x:number,y:number})} size - [description]\r\n * @param {(number|{x:number,y:number,z:number})} spacing - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} [frame] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createRect: function (size, spacing, key, frame)\r\n {\r\n if (typeof size === \'number\') { size = { x: size, y: size, z: size }; }\r\n if (typeof spacing === \'number\') { spacing = { x: spacing, y: spacing, z: spacing }; }\r\n\r\n var quantity = size.x * size.y * size.z;\r\n\r\n var sprites = this.createMultiple(quantity, key, frame);\r\n\r\n var i = 0;\r\n\r\n for (var z = 0.5 - (size.z / 2); z < (size.z / 2); z++)\r\n {\r\n for (var y = 0.5 - (size.y / 2); y < (size.y / 2); y++)\r\n {\r\n for (var x = 0.5 - (size.x / 2); x < (size.x / 2); x++)\r\n {\r\n var bx = (x * spacing.x);\r\n var by = (y * spacing.y);\r\n var bz = (z * spacing.z);\r\n\r\n sprites[i].position.set(bx, by, bz);\r\n\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n this.update();\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomSphere\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radius=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomSphere: function (radius, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZ(sprites[i].position, radius);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomCube\r\n * @since 3.0.0\r\n *\r\n * @param {number} [scale=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomCube: function (scale, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZW(sprites[i].position, scale);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translateChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translateChildren: function (vec3, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.add(vec3);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#transformChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n transformChildren: function (mat4, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.transformMat4(mat4);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Sets the width and height of the viewport. Does not update any matrices.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setViewport: function (width, height)\r\n {\r\n this.viewportWidth = width;\r\n this.viewportHeight = height;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Translates this camera by a specified Vector3 object\r\n * or x, y, z parameters. Any undefined x y z values will\r\n * default to zero, leaving that component unaffected.\r\n * If you wish to set the camera position directly call setPosition instead.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translate: function (x, y, z)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.position.x += x.x || 0;\r\n this.position.y += x.y || 0;\r\n this.position.z += x.z || 0;\r\n }\r\n else\r\n {\r\n this.position.x += x || 0;\r\n this.position.y += y || 0;\r\n this.position.z += z || 0;\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n lookAt: function (x, y, z)\r\n {\r\n var dir = this.direction;\r\n var up = this.up;\r\n\r\n if (typeof x === \'object\')\r\n {\r\n dir.copy(x);\r\n }\r\n else\r\n {\r\n dir.set(x, y, z);\r\n }\r\n\r\n dir.subtract(this.position).normalize();\r\n\r\n // Calculate right vector\r\n tmpVec3.copy(dir).cross(up).normalize();\r\n\r\n // Calculate up vector\r\n up.copy(tmpVec3).cross(dir).normalize();\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotate: function (radians, axis)\r\n {\r\n RotateVec3(this.direction, axis, radians);\r\n RotateVec3(this.up, axis, radians);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} point - [description]\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotateAround: function (point, radians, axis)\r\n {\r\n tmpVec3.copy(point).subtract(this.position);\r\n\r\n this.translate(tmpVec3);\r\n this.rotate(radians, axis);\r\n this.translate(tmpVec3.negate());\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - [description]\r\n * @param {Phaser.Math.Vector4} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector4} [description]\r\n */\r\n project: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector4(); }\r\n\r\n // TODO: support viewport XY\r\n var viewportWidth = this.viewportWidth;\r\n var viewportHeight = this.viewportHeight;\r\n var n = Camera.NEAR_RANGE;\r\n var f = Camera.FAR_RANGE;\r\n\r\n // For useful Z and W values we should do the usual steps: clip space -> NDC -> window coords\r\n\r\n // Implicit 1.0 for w component\r\n tmpVec4.set(vec.x, vec.y, vec.z, 1.0);\r\n\r\n // Transform into clip space\r\n tmpVec4.transformMat4(this.combined);\r\n\r\n // Avoid divide by zero when 0x0x0 camera projects to a 0x0x0 vec3\r\n if (tmpVec4.w === 0)\r\n {\r\n tmpVec4.w = 1;\r\n }\r\n\r\n // Now into NDC\r\n tmpVec4.x = tmpVec4.x / tmpVec4.w;\r\n tmpVec4.y = tmpVec4.y / tmpVec4.w;\r\n tmpVec4.z = tmpVec4.z / tmpVec4.w;\r\n\r\n // And finally into window coordinates\r\n out.x = viewportWidth / 2 * tmpVec4.x + (0 + viewportWidth / 2);\r\n out.y = viewportHeight / 2 * tmpVec4.y + (0 + viewportHeight / 2);\r\n out.z = (f - n) / 2 * tmpVec4.z + (f + n) / 2;\r\n\r\n // If the out vector has a fourth component, we also store (1/clip.w), same idea as gl_FragCoord.w\r\n if (out.w === 0 || out.w)\r\n {\r\n out.w = 1 / tmpVec4.w;\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec - [description]\r\n * @param {Phaser.Math.Vector3} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector3} [description]\r\n */\r\n unproject: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector3(); }\r\n\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n\r\n return out.copy(vec).unproject(viewport, this.invProjectionView);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPickRay\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {RayDef} [description]\r\n */\r\n getPickRay: function (x, y)\r\n {\r\n var origin = this.ray.origin.set(x, y, 0);\r\n var direction = this.ray.direction.set(x, y, 1);\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n var mtx = this.invProjectionView;\r\n\r\n origin.unproject(viewport, mtx);\r\n\r\n direction.unproject(viewport, mtx);\r\n\r\n direction.subtract(origin).normalize();\r\n\r\n return this.ray;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n updateChildren: function ()\r\n {\r\n var children = this.children.entries;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].project(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n // Overriden by subclasses\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n update: function ()\r\n {\r\n return this.updateChildren();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateBillboardMatrix\r\n * @since 3.0.0\r\n */\r\n updateBillboardMatrix: function ()\r\n {\r\n var dir = dirvec.set(this.direction).negate();\r\n\r\n // Better view-aligned billboards might use this:\r\n // var dir = tmp.set(camera.position).subtract(p).normalize();\r\n\r\n var right = rightvec.set(this.up).cross(dir).normalize();\r\n var up = tmpVec3.set(dir).cross(right).normalize();\r\n\r\n var out = billboardMatrix.val;\r\n\r\n out[0] = right.x;\r\n out[1] = right.y;\r\n out[2] = right.z;\r\n out[3] = 0;\r\n\r\n out[4] = up.x;\r\n out[5] = up.y;\r\n out[6] = up.z;\r\n out[7] = 0;\r\n\r\n out[8] = dir.x;\r\n out[9] = dir.y;\r\n out[10] = dir.z;\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n this.billboardMatrixDirty = false;\r\n },\r\n\r\n /**\r\n * This is a utility function for canvas 3D rendering,\r\n * which determines the "point size" of a camera-facing\r\n * sprite billboard given its 3D world position\r\n * (origin at center of sprite) and its world width\r\n * and height in x/y.\r\n *\r\n * We place into the output Vector2 the scaled width\r\n * and height. If no `out` is specified, a new Vector2\r\n * will be created for convenience (this should be avoided\r\n * in tight loops).\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPointSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vec - The position of the 3D Sprite.\r\n * @param {Phaser.Math.Vector2} size - The x and y dimensions.\r\n * @param {Phaser.Math.Vector2} out - The result, scaled x and y dimensions.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointSize: function (vec, size, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n // TODO: optimize this with a simple distance calculation:\r\n // https://developer.valvesoftware.com/wiki/Field_of_View\r\n\r\n if (this.billboardMatrixDirty)\r\n {\r\n this.updateBillboardMatrix();\r\n }\r\n\r\n var tmp = tmpVec3;\r\n\r\n var dx = (size.x / this.pixelScale) / 2;\r\n var dy = (size.y / this.pixelScale) / 2;\r\n\r\n tmp.set(-dx, -dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var tlx = tmp.x;\r\n var tly = tmp.y;\r\n\r\n tmp.set(dx, dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var brx = tmp.x;\r\n var bry = tmp.y;\r\n\r\n // var w = Math.abs(brx - tlx);\r\n // var h = Math.abs(bry - tly);\r\n\r\n // Allow the projection to get negative ...\r\n var w = brx - tlx;\r\n var h = bry - tly;\r\n\r\n return out.set(w, h);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.children.clear();\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setX: function (value)\r\n {\r\n this.position.x = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setY: function (value)\r\n {\r\n this.position.y = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setZ: function (value)\r\n {\r\n this.position.z = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nCamera.FAR_RANGE = 1.0;\r\nCamera.NEAR_RANGE = 0.0;\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/Camera.js?')},"./node_modules/phaser/plugins/camera3d/src/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar OrthographicCamera = __webpack_require__(/*! ./OrthographicCamera */ \"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js\");\r\nvar PerspectiveCamera = __webpack_require__(/*! ./PerspectiveCamera */ \"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../../src/plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CameraManager\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Sprite3D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n scene.sys.events.once('boot', this.boot, this);\r\n scene.sys.events.on('start', this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene3D.CameraManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once('destroy', this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on('update', this.update, this);\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n add: function (fieldOfView, width, height)\r\n {\r\n return this.addPerspectiveCamera(fieldOfView, width, height);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n addOrthographicCamera: function (width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new OrthographicCamera(this.scene, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n addPerspectiveCamera: function (fieldOfView, width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new PerspectiveCamera(this.scene, fieldOfView, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - [description]\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n getCamera: function (name)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n if (this.cameras[i].name === name)\r\n {\r\n return this.cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeCamera\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} camera - [description]\r\n */\r\n removeCamera: function (camera)\r\n {\r\n var cameraIndex = this.cameras.indexOf(camera);\r\n\r\n if (cameraIndex !== -1)\r\n {\r\n this.cameras.splice(cameraIndex, 1);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n removeAll: function ()\r\n {\r\n while (this.cameras.length > 0)\r\n {\r\n var camera = this.cameras.pop();\r\n\r\n camera.destroy();\r\n }\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestep - [description]\r\n * @param {number} delta - [description]\r\n */\r\n update: function (timestep, delta)\r\n {\r\n for (var i = 0, l = this.cameras.length; i < l; ++i)\r\n {\r\n this.cameras[i].update(timestep, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('update', this.update, this);\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n this.removeAll();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off('start', this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager3D', CameraManager, 'cameras3d');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/CameraManager.js?")},"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class OrthographicCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar OrthographicCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n initialize:\r\n\r\n function OrthographicCamera (scene, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._zoom = 1.0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#near\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.near = 0;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} yDown - [description]\r\n * @param {number} [viewportWidth] - [description]\r\n * @param {number} [viewportHeight] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n setToOrtho: function (yDown, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = this.viewportWidth; }\r\n if (viewportHeight === undefined) { viewportHeight = this.viewportHeight; }\r\n\r\n var zoom = this.zoom;\r\n\r\n this.up.set(0, (yDown) ? -1 : 1, 0);\r\n this.direction.set(0, 0, (yDown) ? 1 : -1);\r\n this.position.set(zoom * viewportWidth / 2, zoom * viewportHeight / 2, 0);\r\n\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var w = this.viewportWidth;\r\n var h = this.viewportHeight;\r\n var near = Math.abs(this.near);\r\n var far = Math.abs(this.far);\r\n var zoom = this.zoom;\r\n\r\n if (w === 0 || h === 0)\r\n {\r\n // What to do here... hmm?\r\n return this;\r\n }\r\n\r\n this.projection.ortho(\r\n zoom * -w / 2, zoom * w / 2,\r\n zoom * -h / 2, zoom * h / 2,\r\n near,\r\n far\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#zoom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = OrthographicCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class PerspectiveCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [fieldOfView=80] - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar PerspectiveCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n // FOV is converted to radians automatically\r\n initialize:\r\n\r\n function PerspectiveCamera (scene, fieldOfView, viewportWidth, viewportHeight)\r\n {\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportWidth\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportHeight\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#fieldOfView\r\n * @type {integer}\r\n * @default 80\r\n * @since 3.0.0\r\n */\r\n this.fieldOfView = fieldOfView * Math.PI / 180;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n setFOV: function (value)\r\n {\r\n this.fieldOfView = value * Math.PI / 180;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var aspect = this.viewportWidth / this.viewportHeight;\r\n\r\n // Create a perspective matrix for our camera\r\n this.projection.perspective(\r\n this.fieldOfView,\r\n aspect,\r\n Math.abs(this.near),\r\n Math.abs(this.far)\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PerspectiveCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Sprite3D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/plugins/camera3d/src/CameraManager.js"),\r\n OrthographicCamera: __webpack_require__(/*! ./OrthographicCamera */ "./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js"),\r\n PerspectiveCamera: __webpack_require__(/*! ./PerspectiveCamera */ "./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/index.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GameObject = __webpack_require__(/*! ../../../../src/gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Sprite = __webpack_require__(/*! ../../../../src/gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite 3D Game Object.\r\n *\r\n * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow\r\n * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space.\r\n *\r\n * @class Sprite3D\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberOf Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The x position of this Game Object.\r\n * @param {number} y - The y position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite3D = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n initialize:\r\n\r\n function Sprite3D (scene, x, y, z, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite3D\');\r\n\r\n /**\r\n * The encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = new Sprite(scene, 0, 0, texture, frame);\r\n\r\n /**\r\n * The position of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#position\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector4(x, y, z);\r\n\r\n /**\r\n * The 2D size of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#size\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.size = new Vector2(this.gameObject.width, this.gameObject.height);\r\n\r\n /**\r\n * The 2D scale of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#scale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.scale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether to automatically set the horizontal scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleX\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleX = true;\r\n\r\n /**\r\n * Whether to automatically set the vertical scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleY\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleY = true;\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#_visible\r\n * @type {boolean}\r\n * @default true\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = true;\r\n },\r\n\r\n /**\r\n * Project this Sprite onto the given 3D Camera.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Sprite3D.Camera} camera - The 3D Camera onto which to project this Sprite.\r\n */\r\n project: function (camera)\r\n {\r\n var pos = this.position;\r\n\r\n var gameObject = this.gameObject;\r\n\r\n camera.project(pos, gameObject);\r\n\r\n camera.getPointSize(pos, this.size, this.scale);\r\n\r\n if (this.scale.x <= 0 || this.scale.y <= 0)\r\n {\r\n gameObject.setVisible(false);\r\n }\r\n else\r\n {\r\n if (!gameObject.visible)\r\n {\r\n gameObject.setVisible(true);\r\n }\r\n\r\n if (this.adjustScaleX)\r\n {\r\n gameObject.scaleX = this.scale.x;\r\n }\r\n\r\n if (this.adjustScaleY)\r\n {\r\n gameObject.scaleY = this.scale.y;\r\n }\r\n\r\n gameObject.setDepth(gameObject.z * -1);\r\n }\r\n },\r\n\r\n /**\r\n * Set the visible state of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} This Sprite3D Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.gameObject.visible = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite3D;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../../src/utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite3D\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite3D(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function \'this\' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ \"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object.\r\n * @param {number} y - The vertical position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite3D', function (x, y, z, key, frame)\r\n{\r\n var sprite = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(sprite.gameObject);\r\n this.updateList.add(sprite.gameObject);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js?")},"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} AdInstance\r\n *\r\n * @property {any} instance - Represents an instance of an ad.\r\n * @property {string} placementID - The Audience Network placement ID of this ad instance.\r\n * @property {boolean} shown - Has this ad already been shown in-game?\r\n * @property {boolean} video - Is this a video ad?\r\n */\r\n\r\nvar AdInstance = function (placementID, instance, video)\r\n{\r\n return {\r\n instance: instance,\r\n placementID: placementID,\r\n shown: false,\r\n video: video\r\n };\r\n};\r\n\r\nmodule.exports = AdInstance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/AdInstance.js?")},"./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js":function(module,exports,__webpack_require__){eval("/* eslint no-console: 0 */\r\n\r\n/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AdInstance = __webpack_require__(/*! ./AdInstance */ \"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js\");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DataManager = __webpack_require__(/*! ../../../src/data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Leaderboard = __webpack_require__(/*! ./Leaderboard */ \"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js\");\r\nvar Product = __webpack_require__(/*! ./Product */ \"./node_modules/phaser/plugins/fbinstant/src/Product.js\");\r\nvar Purchase = __webpack_require__(/*! ./Purchase */ \"./node_modules/phaser/plugins/fbinstant/src/Purchase.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Facebook Instant Games Plugin for Phaser 3 provides a seamless bridge between Phaser\r\n * and the Facebook Instant Games API version 6.2.\r\n * \r\n * You can access this plugin via the `facebook` property in a Scene, i.e:\r\n * \r\n * ```javascript\r\n * this.facebook.getPlatform();\r\n * ```\r\n * \r\n * If this is unavailable please check to make sure you're using a build of Phaser that has\r\n * this plugin within it. You can quickly check this by looking at the dev tools console\r\n * header - the Phaser version number will have `-FB` after it if this plugin is loaded.\r\n *\r\n * If you are building your own version of Phaser then use this Webpack DefinePlugin flag:\r\n * \r\n * `\"typeof PLUGIN_FBINSTANT\": JSON.stringify(true)`\r\n * \r\n * You will find that every Instant Games API method has a mapping in this plugin.\r\n * For a full list please consult either the plugin documentation, or the 6.2 SDK documentation\r\n * at https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2\r\n * \r\n * Internally this plugin uses its own Data Manager to handle seamless user data updates and provides\r\n * handy functions for advertisement displaying, opening share dialogs, logging, leaderboards, purchase API requests,\r\n * loader integration and more.\r\n * \r\n * To get started with Facebook Instant Games you will need to register on Facebook and create a new Instant\r\n * Game app that has its own unique app ID. Facebook have also provided a dashboard interface for setting up\r\n * various features for your game, including leaderboards, ad requests and the payments API. There are lots\r\n * of guides on the Facebook Developers portal to assist with setting these\r\n * various systems up: https://developers.facebook.com/docs/games/instant-games/guides\r\n * \r\n * For more details follow the Quick Start guide here: https://developers.facebook.com/docs/games/instant-games\r\n *\r\n * @class FacebookInstantGamesPlugin\r\n * @memberOf Phaser\r\n * @constructor\r\n * @extends Phaser.Events.EventEmitter\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar FacebookInstantGamesPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function FacebookInstantGamesPlugin (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#game\r\n * @type {Phaser.Game}\r\n * @readOnly\r\n * @since 3.13.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Data Manager instance.\r\n * It allows you to store, query and retrieve any key/value data you may need to store.\r\n * It's also used internally by the plugin to store FBIG API data.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.13.0\r\n */\r\n this.data = new DataManager(this);\r\n\r\n this.on('setdata', this.setDataHandler, this);\r\n this.on('changedata', this.changeDataHandler, this);\r\n\r\n /**\r\n * Has the Facebook Instant Games API loaded yet?\r\n * This is set automatically during the boot process.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#hasLoaded\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.hasLoaded = false;\r\n\r\n /**\r\n * Is the Data Manager currently locked?\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#dataLocked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.dataLocked = false;\r\n\r\n /**\r\n * A list of the Facebook Instant Games APIs that are available,\r\n * based on the given platform, context and user privacy settings.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#supportedAPIs\r\n * @type {string[]}\r\n * @since 3.13.0\r\n */\r\n this.supportedAPIs = [];\r\n\r\n /**\r\n * Holds the entry point that the game was launched from.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPoint\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.entryPoint = '';\r\n\r\n /**\r\n * An object that contains any data associated with the entry point that the game was launched from.\r\n * The contents of the object are developer-defined, and can occur from entry points on different platforms.\r\n * This will return null for older mobile clients, as well as when there is no data associated with the particular entry point.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPointData\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.entryPointData = null;\r\n\r\n /**\r\n * A unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = null;\r\n\r\n /**\r\n * The current context in which your game is running. This can be either `null` or\r\n * one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextType\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.contextType = null;\r\n\r\n /**\r\n * The current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#locale\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.locale = null;\r\n\r\n /**\r\n * The platform on which the game is currently running, i.e. `IOS`.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#platform\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.platform = null;\r\n\r\n /**\r\n * The string representation of the Facebook Instant Games SDK version being used.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#version\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.version = null;\r\n\r\n /**\r\n * Holds the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerID\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerID = null;\r\n\r\n /**\r\n * The player's localized display name.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerName\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerName = null;\r\n\r\n /**\r\n * A url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerPhotoURL\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerPhotoURL = null;\r\n\r\n /**\r\n * Whether a player can subscribe to the game bot or not.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerCanSubscribeBot\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.playerCanSubscribeBot = false;\r\n\r\n /**\r\n * Does the current platform and context allow for use of the payments API?\r\n * Currently this is only available on Facebook.com and Android 6+.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#paymentsReady\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.paymentsReady = false;\r\n\r\n /**\r\n * The set of products that are registered to the game.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#catalog\r\n * @type {Product[]}\r\n * @since 3.13.0\r\n */\r\n this.catalog = [];\r\n\r\n /**\r\n * Contains all of the player's unconsumed purchases.\r\n * The game must fetch the current player's purchases as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#purchases\r\n * @type {Purchase[]}\r\n * @since 3.13.0\r\n */\r\n this.purchases = [];\r\n\r\n /**\r\n * Contains all of the leaderboard data, as populated by the `getLeaderboard()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#leaderboards\r\n * @type {Phaser.FacebookInstantGamesLeaderboard[]}\r\n * @since 3.13.0\r\n */\r\n this.leaderboards = {};\r\n\r\n /**\r\n * Contains AdInstance objects, as created by the `preloadAds()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#ads\r\n * @type {AdInstance[]}\r\n * @since 3.13.0\r\n */\r\n this.ads = [];\r\n },\r\n\r\n /**\r\n * Internal set data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#setDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n setDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Internal change data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#changeDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n changeDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Call this method from your `Scene.preload` in order to sync the load progress\r\n * of the Phaser Loader with the Facebook Instant Games loader display, i.e.:\r\n * \r\n * ```javascript\r\n * this.facebook.showLoadProgress(this);\r\n * this.facebook.once('startgame', this.startGame, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showLoadProgress\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene for which you want to show loader progress for.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showLoadProgress: function (scene)\r\n {\r\n scene.load.on('progress', function (value)\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n FBInstant.setLoadingProgress(value * 100);\r\n }\r\n\r\n }, this);\r\n\r\n scene.load.on('complete', function ()\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n this.hasLoaded = true;\r\n\r\n FBInstant.startGameAsync().then(this.gameStarted.bind(this));\r\n }\r\n \r\n }, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is called automatically when the game has finished loading,\r\n * if you used the `showLoadProgress` method. If your game doesn't need to\r\n * load any assets, or you're managing the load yourself, then call this\r\n * method directly to start the API running.\r\n * \r\n * When the API has finished starting this plugin will emit a `startgame` event\r\n * which you should listen for.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#gameStarted\r\n * @since 3.13.0\r\n */\r\n gameStarted: function ()\r\n {\r\n var APIs = FBInstant.getSupportedAPIs();\r\n\r\n var supported = {};\r\n\r\n var dotToUpper = function (match)\r\n {\r\n return match[1].toUpperCase();\r\n };\r\n\r\n APIs.forEach(function (api)\r\n {\r\n api = api.replace(/\\../g, dotToUpper);\r\n\r\n supported[api] = true;\r\n });\r\n\r\n this.supportedAPIs = supported;\r\n\r\n this.getID();\r\n this.getType();\r\n this.getLocale();\r\n this.getPlatform();\r\n this.getSDKVersion();\r\n\r\n this.getPlayerID();\r\n this.getPlayerName();\r\n this.getPlayerPhotoURL();\r\n\r\n var _this = this;\r\n\r\n FBInstant.onPause(function ()\r\n {\r\n _this.emit('pause');\r\n });\r\n\r\n FBInstant.getEntryPointAsync().then(function (entrypoint)\r\n {\r\n _this.entryPoint = entrypoint;\r\n _this.entryPointData = FBInstant.getEntryPointData();\r\n\r\n _this.emit('startgame');\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n // Facebook.com and Android 6 only\r\n if (this.supportedAPIs.paymentsPurchaseAsync)\r\n {\r\n FBInstant.payments.onReady(function ()\r\n {\r\n _this.paymentsReady = true;\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Checks to see if a given Facebook Instant Games API is available or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#checkAPI\r\n * @since 3.13.0\r\n * \r\n * @param {string} api - The API to check for, i.e. `player.getID`.\r\n * \r\n * @return {boolean} `true` if the API is supported, otherwise `false`.\r\n */\r\n checkAPI: function (api)\r\n {\r\n if (!this.supportedAPIs[api])\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * \r\n * It is only populated if `contextGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getID\r\n * @since 3.13.0\r\n * \r\n * @return {string} The context ID.\r\n */\r\n getID: function ()\r\n {\r\n if (!this.contextID && this.supportedAPIs.contextGetID)\r\n {\r\n this.contextID = FBInstant.context.getID();\r\n }\r\n\r\n return this.contextID;\r\n },\r\n\r\n /**\r\n * Returns the current context in which your game is running. This can be either `null` or one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * It is only populated if `contextGetType` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getType\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The context type.\r\n */\r\n getType: function ()\r\n {\r\n if (!this.contextType && this.supportedAPIs.contextGetType)\r\n {\r\n this.contextType = FBInstant.context.getType();\r\n }\r\n\r\n return this.contextType;\r\n },\r\n\r\n /**\r\n * Returns the current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * It is only populated if `getLocale` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLocale\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current locale.\r\n */\r\n getLocale: function ()\r\n {\r\n if (!this.locale && this.supportedAPIs.getLocale)\r\n {\r\n this.locale = FBInstant.getLocale();\r\n }\r\n\r\n return this.locale;\r\n },\r\n\r\n /**\r\n * Returns the platform on which the game is currently running, i.e. `IOS`.\r\n * It is only populated if `getPlatform` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlatform\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current platform.\r\n */\r\n getPlatform: function ()\r\n {\r\n if (!this.platform && this.supportedAPIs.getPlatform)\r\n {\r\n this.platform = FBInstant.getPlatform();\r\n }\r\n\r\n return this.platform;\r\n },\r\n\r\n /**\r\n * Returns the string representation of the Facebook Instant Games SDK version being used.\r\n * It is only populated if `getSDKVersion` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getSDKVersion\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The sdk version.\r\n */\r\n getSDKVersion: function ()\r\n {\r\n if (!this.version && this.supportedAPIs.getSDKVersion)\r\n {\r\n this.version = FBInstant.getSDKVersion();\r\n }\r\n\r\n return this.version;\r\n },\r\n\r\n /**\r\n * Returns the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * It is only populated if `playerGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerID\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player ID.\r\n */\r\n getPlayerID: function ()\r\n {\r\n if (!this.playerID && this.supportedAPIs.playerGetID)\r\n {\r\n this.playerID = FBInstant.player.getID();\r\n }\r\n\r\n return this.playerID;\r\n },\r\n\r\n /**\r\n * Returns the player's localized display name.\r\n * It is only populated if `playerGetName` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerName\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's localized display name.\r\n */\r\n getPlayerName: function ()\r\n {\r\n if (!this.playerName && this.supportedAPIs.playerGetName)\r\n {\r\n this.playerName = FBInstant.player.getName();\r\n }\r\n\r\n return this.playerName;\r\n },\r\n\r\n /**\r\n * Returns the url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * It is only populated if `playerGetPhoto` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerPhotoURL\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's photo url.\r\n */\r\n getPlayerPhotoURL: function ()\r\n {\r\n if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto)\r\n {\r\n this.playerPhotoURL = FBInstant.player.getPhoto();\r\n }\r\n\r\n return this.playerPhotoURL;\r\n },\r\n\r\n /**\r\n * Load the player's photo and store it in the Texture Manager, ready for use in-game.\r\n * \r\n * This method works by using a Scene Loader instance and then asking the Loader to\r\n * retrieve the image.\r\n * \r\n * When complete the plugin will emit a `photocomplete` event, along with the key of the photo.\r\n * \r\n * ```javascript\r\n * this.facebook.loadPlayerPhoto(this, 'player').once('photocomplete', function (key) {\r\n * this.add.image(x, y, 'player');\r\n * }, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#loadPlayerPhoto\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene that will be responsible for loading this photo.\r\n * @param {string} key - The key to use when storing the photo in the Texture Manager.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n loadPlayerPhoto: function (scene, key)\r\n {\r\n if (this.playerPhotoURL)\r\n {\r\n scene.load.setCORS('anonymous');\r\n \r\n scene.load.image(key, this.playerPhotoURL);\r\n \r\n scene.load.once('filecomplete-image-' + key, function ()\r\n {\r\n this.emit('photocomplete', key);\r\n\r\n }, this);\r\n \r\n scene.load.start();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current player can subscribe to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they can subscribe, the `playerCanSubscribeBot` property is set to `true`\r\n * and this plugin will emit the `cansubscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `cansubscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#canSubscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n canSubscribeBot: function ()\r\n {\r\n if (this.supportedAPIs.playerCanSubscribeBotAsync)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.canSubscribeBotAsync().then(function ()\r\n {\r\n _this.playerCanSubscribeBot = true;\r\n\r\n _this.emit('cansubscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('cansubscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('cansubscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subscribes the current player to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `subscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `subscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#subscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n subscribeBot: function ()\r\n {\r\n if (this.playerCanSubscribeBot)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.subscribeBotAsync().then(function ()\r\n {\r\n _this.emit('subscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('subscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('subscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the associated data from the player based on the given key, or array of keys.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the data is set into this plugins Data Manager and the\r\n * `getdata` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getData\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} keys - The key/s of the data to retrieve.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getData: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(keys))\r\n {\r\n keys = [ keys ];\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getDataAsync(keys).then(function (data)\r\n {\r\n _this.dataLocked = true;\r\n\r\n for (var key in data)\r\n {\r\n _this.data.set(key, data[key]);\r\n }\r\n\r\n _this.dataLocked = false;\r\n\r\n _this.emit('getdata', data);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set data to be saved to the designated cloud storage of the current player. The game can store up to 1MB of data for each unique player.\r\n * \r\n * The data save is requested in an async call, so the result isn't available immediately.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to replace the data object directly.\r\n * \r\n * When the APIs `setDataAsync` call resolves it will emit the `savedata` event from this plugin. If the call fails for some\r\n * reason it will emit `savedatafail` instead.\r\n * \r\n * The call resolving does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and\r\n * has been scheduled to be saved. It also guarantees that all values that were set are now available in `getData`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveData\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage.\r\n * The object must contain only serializable values - any non-serializable values will cause the entire modification to be rejected.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveData: function (data)\r\n {\r\n if (!this.checkAPI('playerSetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savedatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately flushes any changes to the player data to the designated cloud storage.\r\n * This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate\r\n * and known by the game. Non-critical changes should rely on the platform to persist them in the background.\r\n * NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to flush the data directly.\r\n * \r\n * When the APIs `flushDataAsync` call resolves it will emit the `flushdata` event from this plugin. If the call fails for some\r\n * reason it will emit `flushdatafail` instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#flushData\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n flushData: function ()\r\n {\r\n if (!this.checkAPI('playerFlushDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.flushDataAsync().then(function ()\r\n {\r\n _this.emit('flushdata');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('flushdatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve stats from the designated cloud storage of the current player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `getstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getStats\r\n * @since 3.13.0\r\n * \r\n * @param {string[]} [keys] - An optional array of unique keys to retrieve stats for. If the function is called without it, it will fetch all stats.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getStats: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getStatsAsync(keys).then(function (data)\r\n {\r\n _this.emit('getstats', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Save the stats of the current player to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `savestats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `savestatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage as stats. Note that only numerical values are stored.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveStats: function (data)\r\n {\r\n if (!this.checkAPI('playerSetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setStatsAsync(output).then(function ()\r\n {\r\n _this.emit('savestats', output);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savestatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increment the stats of the current player and save them to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data object provided for this call should contain offsets for how much to modify the stats by:\r\n * \r\n * ```javascript\r\n * this.facebook.incStats({\r\n * level: 1,\r\n * zombiesSlain: 17,\r\n * rank: -1\r\n * });\r\n * ```\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `incstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `incstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#incStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs indicating how much to increment each stat in cloud storage. Note that only numerical values are processed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n incStats: function (data)\r\n {\r\n if (!this.checkAPI('playerIncrementStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.incrementStatsAsync(output).then(function (stats)\r\n {\r\n _this.emit('incstats', stats);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('incstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the data associated with the individual gameplay session for the current context.\r\n * \r\n * This function should be called whenever the game would like to update the current session data.\r\n * \r\n * This session data may be used to populate a variety of payloads, such as game play webhooks.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveSession\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An arbitrary data object, which must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveSession: function (data)\r\n {\r\n if (!this.checkAPI('setSessionData'))\r\n {\r\n return this;\r\n }\r\n\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length <= 1000)\r\n {\r\n FBInstant.setSessionData(data);\r\n }\r\n else\r\n {\r\n console.warn('Session data too long. Max 1000 chars.');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openShare\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openShare: function (text, key, frame, sessionData)\r\n {\r\n return this._share('SHARE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user invite a friend to play this game, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openInvite\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openInvite: function (text, key, frame, sessionData)\r\n {\r\n return this._share('INVITE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openRequest\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openRequest: function (text, key, frame, sessionData)\r\n {\r\n return this._share('REQUEST', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openChallenge\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openChallenge: function (text, key, frame, sessionData)\r\n {\r\n return this._share('CHALLENGE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * Internal share handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_share\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} intent - (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _share: function (intent, text, key, frame, sessionData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (sessionData === undefined) { sessionData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n // intent (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n // image string A base64 encoded image to be shared.\r\n // text string A text message to be shared.\r\n // data Object? A blob of data to attach to the share. All game sessions launched from the share will be able to access this blob through FBInstant.getEntryPointData().\r\n\r\n var payload = {\r\n intent: intent,\r\n image: imageData,\r\n text: text,\r\n data: sessionData\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.shareAsync(payload).then(function ()\r\n {\r\n _this.emit('resume');\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive.\r\n * If one of the bounds is null only the other bound will be checked against.\r\n * It will always return the original result for the first call made in a context in a given game play session.\r\n * Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#isSizeBetween\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min] - The minimum bound of the context size query.\r\n * @param {integer} [max] - The maximum bound of the context size query.\r\n * \r\n * @return {object} The Context Size Response object in the format: `{answer: boolean, minSize: number?, maxSize: number?}`.\r\n */\r\n isSizeBetween: function (min, max)\r\n {\r\n if (!this.checkAPI('contextIsSizeBetween'))\r\n {\r\n return this;\r\n }\r\n\r\n return FBInstant.context.isSizeBetween(min, max);\r\n },\r\n\r\n /**\r\n * Request a switch into a specific context. If the player does not have permission to enter that context,\r\n * or if the player does not provide permission for the game to enter that context, this will emit a `switchfail` event.\r\n * \r\n * Otherwise, the plugin will emit the `switch` event when the game has switched into the specified context.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchContext: function (contextID)\r\n {\r\n if (!this.checkAPI('contextSwitchAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (contextID !== this.contextID)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.context.switchAsync(contextID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n\r\n _this.emit('switch', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchfail', e);\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Opens a context selection dialog for the player. If the player selects an available context,\r\n * the client will attempt to switch into that context, and emit the `choose` event if successful.\r\n * Otherwise, if the player exits the menu or the client fails to switch into the new context, the `choosefail` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#chooseContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n chooseContext: function (options)\r\n {\r\n if (!this.checkAPI('contextChooseAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.chooseAsync(options).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('choose', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('choosefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to create or switch into a context between a specified player and the current player.\r\n * This plugin will emit the `create` event once the context switch is completed.\r\n * If the API call fails, such as if the player listed is not a Connected Player of the current player or if the\r\n * player does not provide permission to enter the new context, then the plugin will emit a 'createfail' event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} playerID - ID of the player.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createContext: function (playerID)\r\n {\r\n if (!this.checkAPI('contextCreateAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.createAsync(playerID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('create', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('createfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches an array of ConnectedPlayer objects containing information about active players\r\n * (people who played the game in the last 90 days) that are connected to the current player.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `players` event along\r\n * with the player data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `playersfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayers\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPlayers: function ()\r\n {\r\n if (!this.checkAPI('playerGetConnectedPlayersAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getConnectedPlayersAsync().then(function (players)\r\n {\r\n _this.emit('players', players);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('playersfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches the game's product catalog.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getcatalog` event along\r\n * with the catalog data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getcatalogfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getCatalog\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getCatalog: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var catalog = this.catalog;\r\n\r\n FBInstant.payments.getCatalogAsync().then(function (data)\r\n {\r\n catalog = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n catalog.push(Product(item));\r\n });\r\n\r\n _this.emit('getcatalog', catalog);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getcatalogfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches a single Product from the game's product catalog.\r\n * \r\n * The product catalog must have been populated using `getCatalog` prior to calling this method.\r\n * \r\n * Use this to look-up product details based on a purchase list.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getProduct\r\n * @since 3.17.0\r\n * \r\n * @param {string} productID - The Product ID of the item to get from the catalog.\r\n * \r\n * @return {?Product} The Product from the catalog, or `null` if it couldn't be found or the catalog isn't populated.\r\n */\r\n getProduct: function (productID)\r\n {\r\n for (var i = 0; i < this.catalog.length; i++)\r\n {\r\n if (this.catalog[i].productID === productID)\r\n {\r\n return this.catalog[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Begins the purchase flow for a specific product.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `purchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `purchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#purchase\r\n * @since 3.13.0\r\n * \r\n * @param {string} productID - The identifier of the product to purchase.\r\n * @param {string} [developerPayload] - An optional developer-specified payload, to be included in the returned purchase's signed request.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n purchase: function (productID, developerPayload)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var config = {productID: productID};\r\n\r\n if (developerPayload)\r\n {\r\n config.developerPayload = developerPayload;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.purchaseAsync(config).then(function (data)\r\n {\r\n var purchase = Purchase(data);\r\n\r\n _this.emit('purchase', purchase);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('purchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches all of the player's unconsumed purchases. The game must fetch the current player's purchases\r\n * as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getpurchases` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getpurchasesfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPurchases\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPurchases: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var purchases = this.purchases;\r\n\r\n FBInstant.payments.getPurchasesAsync().then(function (data)\r\n {\r\n purchases = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n purchases.push(Purchase(item));\r\n });\r\n\r\n _this.emit('getpurchases', purchases);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getpurchasesfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player,\r\n * the game should request the consumption of the purchased product. Once the purchase is successfully consumed,\r\n * the game should immediately provide the player with the effects of their purchase.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `consumepurchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `consumepurchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#consumePurchase\r\n * @since 3.17.0\r\n * \r\n * @param {string} purchaseToken - The purchase token of the purchase that should be consumed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n consumePurchase: function (purchaseToken)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function ()\r\n {\r\n _this.emit('consumepurchase', purchaseToken);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('consumepurchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Informs Facebook of a custom update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#update\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n update: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('CUSTOM', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Informs Facebook of a leaderboard update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#updateLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n updateLeaderboard: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('LEADERBOARD', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_update\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} action - The update action.\r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _update: function (action, cta, text, key, frame, template, updateData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (cta === undefined) { cta = ''; }\r\n\r\n if (typeof text === 'string')\r\n {\r\n text = {default: text};\r\n }\r\n\r\n if (updateData === undefined) { updateData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n var payload = {\r\n action: action,\r\n cta: cta,\r\n image: imageData,\r\n text: text,\r\n template: template,\r\n data: updateData,\r\n strategy: 'IMMEDIATE',\r\n notification: 'NO_PUSH'\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.updateAsync(payload).then(function ()\r\n {\r\n _this.emit('update');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('updatefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Request that the client switch to a different Instant Game.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the game switches successfully this plugin will emit the `switchgame` event and the client will load the new game.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `switchgamefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchGame\r\n * @since 3.13.0\r\n * \r\n * @param {string} appID - The Application ID of the Instant Game to switch to. The application must be an Instant Game, and must belong to the same business as the current game.\r\n * @param {object} [data] - An optional data payload. This will be set as the entrypoint data for the game being switched to. Must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchGame: function (appID, data)\r\n {\r\n if (!this.checkAPI('switchGameAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (data)\r\n {\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length > 1000)\r\n {\r\n console.warn('Switch Game data too long. Max 1000 chars.');\r\n return this;\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.switchGameAsync(appID, data).then(function ()\r\n {\r\n _this.emit('switchgame', appID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchgamefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Prompts the user to create a shortcut to the game if they are eligible to.\r\n * Can only be called once per session.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the user choose to create a shortcut this plugin will emit the `shortcutcreated` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `shortcutcreatedfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createShortcut\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createShortcut: function ()\r\n {\r\n var _this = this;\r\n\r\n FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut)\r\n {\r\n if (canCreateShortcut)\r\n {\r\n FBInstant.createShortcutAsync().then(function ()\r\n {\r\n _this.emit('shortcutcreated');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('shortcutfailed', e);\r\n });\r\n }\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the game.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#quit\r\n * @since 3.13.0\r\n */\r\n quit: function ()\r\n {\r\n FBInstant.quit();\r\n },\r\n\r\n /**\r\n * Log an app event with FB Analytics.\r\n * \r\n * See https://developers.facebook.com/docs/javascript/reference/v2.8#app_events for more details about FB Analytics.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#log\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - Name of the event. Must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters.\r\n * @param {number} [value] - An optional numeric value that FB Analytics can calculate a sum with.\r\n * @param {object} [params] - An optional object that can contain up to 25 key-value pairs to be logged with the event. Keys must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters. Values must be less than 100 characters in length.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n log: function (name, value, params)\r\n {\r\n if (!this.checkAPI('logEvent'))\r\n {\r\n return this;\r\n }\r\n\r\n if (params === undefined) { params = {}; }\r\n\r\n if (name.length >= 2 && name.length <= 40)\r\n {\r\n FBInstant.logEvent(name, parseFloat(value), params);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an interstitial ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showAd()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getInterstitialAdAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getInterstitialAdAsync(id).then(function (interstitial)\r\n {\r\n data = interstitial;\r\n\r\n return interstitial.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, false);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an rewarded video ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showVideo()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadVideoAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadVideoAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getRewardedVideoAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getRewardedVideoAsync(id).then(function (reward)\r\n {\r\n data = reward;\r\n\r\n return reward.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, true);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showAd\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showAd: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial video ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showVideo\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showVideo: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID && ad.video)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to match the current player with other users looking for people to play with.\r\n * If successful, a new Messenger group thread will be created containing the matched players and the player will\r\n * be context switched to that thread. This plugin will also dispatch the `matchplayer` event, containing the new context ID and Type.\r\n * \r\n * The default minimum and maximum number of players in one matched thread are 2 and 20 respectively,\r\n * depending on how many players are trying to get matched around the same time.\r\n * \r\n * The values can be changed in `fbapp-config.json`. See the Bundle Config documentation for documentation about `fbapp-config.json`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#matchPlayer\r\n * @since 3.13.0\r\n * \r\n * @param {string} [matchTag] - Optional extra information about the player used to group them with similar players. Players will only be grouped with other players with exactly the same tag. The tag must only include letters, numbers, and underscores and be 100 characters or less in length.\r\n * @param {boolean} [switchImmediately=false] - Optional extra parameter that specifies whether the player should be immediately switched to the new context when a match is found. By default this will be false which will mean the player needs explicitly press play after being matched to switch to the new context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n matchPlayer: function (matchTag, switchImmediately)\r\n {\r\n if (matchTag === undefined) { matchTag = null; }\r\n if (switchImmediately === undefined) { switchImmediately = false; }\r\n\r\n if (!this.checkAPI('matchPlayerAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function ()\r\n {\r\n _this.getID();\r\n _this.getType();\r\n\r\n _this.emit('matchplayer', _this.contextID, _this.contextType);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetch a specific leaderboard belonging to this Instant Game.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getleaderboard` event will be emitted along with a Leaderboard object instance.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - The name of the leaderboard. Each leaderboard for an Instant Game must have its own distinct name.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getLeaderboard: function (name)\r\n {\r\n if (!this.checkAPI('getLeaderboardAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.getLeaderboardAsync(name).then(function (data)\r\n {\r\n var leaderboard = new Leaderboard(_this, data);\r\n\r\n _this.leaderboards[name] = leaderboard;\r\n\r\n _this.emit('getleaderboard', leaderboard);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the Facebook API and then destroys this plugin.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#destroy\r\n * @since 3.13.0\r\n */\r\n destroy: function ()\r\n {\r\n FBInstant.quit();\r\n\r\n this.data.destroy();\r\n\r\n this.removeAllListeners();\r\n\r\n this.catalog = [];\r\n this.purchases = [];\r\n this.leaderboards = [];\r\n this.ads = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FacebookInstantGamesPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js?")},"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar LeaderboardScore = __webpack_require__(/*! ./LeaderboardScore */ \"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js\");\r\n\r\n/**\r\n * @classdesc\r\n * This class represents one single Leaderboard that belongs to a Facebook Instant Game.\r\n * \r\n * You do not need to instantiate this class directly, it will be created when you use the\r\n * `getLeaderboard()` method of the main plugin.\r\n *\r\n * @class FacebookInstantGamesLeaderboard\r\n * @memberOf Phaser\r\n * @constructor\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.FacebookInstantGamesPlugin} plugin - A reference to the Facebook Instant Games Plugin.\r\n * @param {any} data - An Instant Game leaderboard instance.\r\n */\r\nvar Leaderboard = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Leaderboard (plugin, data)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#plugin\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * An Instant Game leaderboard instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#ref\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.ref = data;\r\n\r\n /**\r\n * The name of the leaderboard.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#name\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.name = data.getName();\r\n\r\n /**\r\n * The ID of the context that the leaderboard is associated with, or null if the leaderboard is not tied to a particular context.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = data.getContextID();\r\n\r\n /**\r\n * The total number of player entries in the leaderboard.\r\n * This value defaults to zero. Populate it via the `getEntryCount()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#entryCount\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n this.entryCount = 0;\r\n\r\n /**\r\n * The players score object.\r\n * This value defaults to `null`. Populate it via the `getPlayerScore()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#playerScore\r\n * @type {LeaderboardScore}\r\n * @since 3.13.0\r\n */\r\n this.playerScore = null;\r\n\r\n /**\r\n * The scores in the Leaderboard from the currently requested range.\r\n * This value defaults to an empty array. Populate it via the `getScores()` method.\r\n * The contents of this array are reset each time `getScores()` is called.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#scores\r\n * @type {LeaderboardScore[]}\r\n * @since 3.13.0\r\n */\r\n this.scores = [];\r\n\r\n this.getEntryCount();\r\n },\r\n\r\n /**\r\n * Fetches the total number of player entries in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getentrycount` event along with the count and name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getEntryCount\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getEntryCount: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getEntryCountAsync().then(function (count)\r\n {\r\n _this.entryCount = count;\r\n\r\n _this.emit('getentrycount', count, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the player's score. If the player has an existing score, the old score will only be replaced if the new score is better than it.\r\n * NOTE: If the leaderboard is associated with a specific context, the game must be in that context to set a score for the player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `setscore` event along with the LeaderboardScore object and the name of the Leaderboard.\r\n * \r\n * If the save fails the event will send `null` as the score value.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#setScore\r\n * @since 3.13.0\r\n * \r\n * @param {integer} score - The new score for the player. Must be a 64-bit integer number.\r\n * @param {(string|any)} [data] - Metadata to associate with the stored score. Must be less than 2KB in size. If an object is given it will be passed to `JSON.stringify`.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n setScore: function (score, data)\r\n {\r\n if (data === undefined) { data = ''; }\r\n\r\n if (typeof data === 'object')\r\n {\r\n data = JSON.stringify(data);\r\n }\r\n\r\n var _this = this;\r\n\r\n this.ref.setScoreAsync(score, data).then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('setscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('setscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the players leaderboard entry and stores it in the `playerScore` property.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getplayerscore` event along with the score and the name of the Leaderboard.\r\n * \r\n * If the player has not yet saved a score, the event will send `null` as the score value, and `playerScore` will be set to `null` as well.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getPlayerScore\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getPlayerScore: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getPlayerEntryAsync().then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('getplayerscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('getplayerscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, ordered by score ranking in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getScores\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getEntriesAsync(count, offset).then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, based on the current player's connected players (including the current player), ordered by local rank within the set of connected players.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getconnectedscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getConnectedScores\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getConnectedScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getConnectedPlayerEntriesAsync().then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getconnectedscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Leaderboard;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js?")},"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} LeaderboardScore\r\n *\r\n * @property {integer} score - An integer score value.\r\n * @property {string} scoreFormatted - The score value, formatted with the score format associated with the leaderboard.\r\n * @property {integer} timestamp - The Unix timestamp of when the leaderboard entry was last updated.\r\n * @property {integer} rank - The entry's leaderboard ranking.\r\n * @property {string} data - The developer-specified payload associated with the score, or null if one was not set.\r\n * @property {string} playerName - The player's localized display name.\r\n * @property {string} playerPhotoURL - A url to the player's public profile photo.\r\n * @property {string} playerID - The game's unique identifier for the player.\r\n */\r\n\r\nvar LeaderboardScore = function (entry)\r\n{\r\n return {\r\n score: entry.getScore(),\r\n scoreFormatted: entry.getFormattedScore(),\r\n timestamp: entry.getTimestamp(),\r\n rank: entry.getRank(),\r\n data: entry.getExtraData(),\r\n playerName: entry.getPlayer().getName(),\r\n playerPhotoURL: entry.getPlayer().getPhoto(),\r\n playerID: entry.getPlayer().getID()\r\n };\r\n};\r\n\r\nmodule.exports = LeaderboardScore;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js?")},"./node_modules/phaser/plugins/fbinstant/src/Product.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Product\r\n *\r\n * @property {string} [title] - The title of the product.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [description] - The product description.\r\n * @property {string} [imageURI] - A link to the product's associated image.\r\n * @property {string} [price] - The price of the product.\r\n * @property {string} [priceCurrencyCode] - The currency code for the product.\r\n */\r\n\r\nvar Product = function (data)\r\n{\r\n return {\r\n title: GetFastValue(data, 'title', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n description: GetFastValue(data, 'description', ''),\r\n imageURI: GetFastValue(data, 'imageURI', ''),\r\n price: GetFastValue(data, 'price', ''),\r\n priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '')\r\n };\r\n};\r\n\r\nmodule.exports = Product;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Product.js?")},"./node_modules/phaser/plugins/fbinstant/src/Purchase.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Purchase\r\n *\r\n * @property {string} [developerPayload] - A developer-specified string, provided during the purchase of the product.\r\n * @property {string} [paymentID] - The identifier for the purchase transaction.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [purchaseTime] - Unix timestamp of when the purchase occurred.\r\n * @property {string} [purchaseToken] - A token representing the purchase that may be used to consume the purchase.\r\n * @property {string} [signedRequest] - Server-signed encoding of the purchase request.\r\n */\r\n\r\nvar Purchase = function (data)\r\n{\r\n return {\r\n developerPayload: GetFastValue(data, 'developerPayload', ''),\r\n paymentID: GetFastValue(data, 'paymentID', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n purchaseTime: GetFastValue(data, 'purchaseTime', ''),\r\n purchaseToken: GetFastValue(data, 'purchaseToken', ''),\r\n signedRequest: GetFastValue(data, 'signedRequest', '')\r\n };\r\n};\r\n\r\nmodule.exports = Purchase;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Purchase.js?")},"./node_modules/phaser/src/actions/Angle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `angle` property,\r\n * and then adds the given value to each of their `angle` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Angle(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Angle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `angle` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Angle = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'angle', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Angle.js?")},"./node_modules/phaser/src/actions/Call.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and passes each of them to the given callback.\r\n *\r\n * @function Phaser.Actions.Call\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.\r\n * @param {*} context - The scope in which the callback will be invoked.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that was passed to this Action.\r\n */\r\nvar Call = function (items, callback, context)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n callback.call(context, item);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Call;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Call.js?")},"./node_modules/phaser/src/actions/GetFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the first element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetFirst(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetFirst\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The first object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetFirst = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetFirst.js?")},"./node_modules/phaser/src/actions/GetLast.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the last element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetLast(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetLast\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The last object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetLast = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetLast;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetLast.js?")},"./node_modules/phaser/src/actions/GridAlign.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AlignIn = __webpack_require__(/*! ../display/align/in/QuickSet */ \"./node_modules/phaser/src/display/align/in/QuickSet.js\");\r\nvar CONST = __webpack_require__(/*! ../display/align/const */ \"./node_modules/phaser/src/display/align/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Zone = __webpack_require__(/*! ../gameobjects/zone/Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\nvar tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1);\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then aligns them based on the grid configuration given to this action.\r\n *\r\n * @function Phaser.Actions.GridAlign\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.GridAlignConfig} options - The GridAlign Configuration object.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar GridAlign = function (items, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var width = GetFastValue(options, 'width', -1);\r\n var height = GetFastValue(options, 'height', -1);\r\n var cellWidth = GetFastValue(options, 'cellWidth', 1);\r\n var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);\r\n var position = GetFastValue(options, 'position', CONST.TOP_LEFT);\r\n var x = GetFastValue(options, 'x', 0);\r\n var y = GetFastValue(options, 'y', 0);\r\n\r\n var cx = 0;\r\n var cy = 0;\r\n var w = (width * cellWidth);\r\n var h = (height * cellHeight);\r\n\r\n tempZone.setPosition(x, y);\r\n tempZone.setSize(cellWidth, cellHeight);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n AlignIn(items[i], tempZone, position);\r\n\r\n if (width === -1)\r\n {\r\n // We keep laying them out horizontally until we've done them all\r\n cy += cellHeight;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n cy = 0;\r\n tempZone.x += cellWidth;\r\n tempZone.y = y;\r\n }\r\n }\r\n else if (height === -1)\r\n {\r\n // We keep laying them out vertically until we've done them all\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n }\r\n }\r\n else\r\n {\r\n // We keep laying them out until we hit the column limit\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n cy += cellHeight;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n // We've hit the column limit, so return, even if there are items left\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = GridAlign;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GridAlign.js?")},"./node_modules/phaser/src/actions/IncAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `alpha` property,\r\n * and then adds the given value to each of their `alpha` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `alpha` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncAlpha.js?")},"./node_modules/phaser/src/actions/IncX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `x` property,\r\n * and then adds the given value to each of their `x` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `x` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncX.js?")},"./node_modules/phaser/src/actions/IncXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.IncXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to be added to the `x` property.\r\n * @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueInc(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = IncXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncXY.js?")},"./node_modules/phaser/src/actions/IncY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `y` property,\r\n * and then adds the given value to each of their `y` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `y` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncY.js?")},"./node_modules/phaser/src/actions/PlaceOnCircle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnCircle = function (items, circle, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = circle.x + (circle.radius * Math.cos(angle));\r\n items[i].y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnCircle.js?")},"./node_modules/phaser/src/actions/PlaceOnEllipse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of an Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnEllipse = function (items, ellipse, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n var a = ellipse.width / 2;\r\n var b = ellipse.height / 2;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = ellipse.x + a * Math.cos(angle);\r\n items[i].y = ellipse.y + b * Math.sin(angle);\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnEllipse.js?")},"./node_modules/phaser/src/actions/PlaceOnLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoints = __webpack_require__(/*! ../geom/line/GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\n\r\n/**\r\n * Positions an array of Game Objects on evenly spaced points of a Line.\r\n *\r\n * @function Phaser.Actions.PlaceOnLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnLine = function (items, line)\r\n{\r\n var points = GetPoints(line, items.length);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = points[i];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnLine.js?')},"./node_modules/phaser/src/actions/PlaceOnRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MarchingAnts = __webpack_require__(/*! ../geom/rectangle/MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nvar RotateLeft = __webpack_require__(/*! ../utils/array/RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js");\r\nvar RotateRight = __webpack_require__(/*! ../utils/array/RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.\r\n * \r\n * Placement starts from the top-left of the rectangle, and proceeds in a clockwise direction.\r\n * If the `shift` parameter is given you can offset where placement begins.\r\n *\r\n * @function Phaser.Actions.PlaceOnRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects on.\r\n * @param {integer} [shift=1] - An optional positional offset.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnRectangle = function (items, rect, shift)\r\n{\r\n if (shift === undefined) { shift = 0; }\r\n\r\n var points = MarchingAnts(rect, false, items.length);\r\n\r\n if (shift > 0)\r\n {\r\n RotateLeft(points, shift);\r\n }\r\n else if (shift < 0)\r\n {\r\n RotateRight(points, Math.abs(shift));\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = points[i].x;\r\n items[i].y = points[i].y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnRectangle.js?')},"./node_modules/phaser/src/actions/PlaceOnTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BresenhamPoints = __webpack_require__(/*! ../geom/line/BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects on.\r\n * @param {number} [stepRate=1] - An optional step rate, to increase or decrease the packing of the Game Objects on the lines.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnTriangle = function (items, triangle, stepRate)\r\n{\r\n var p1 = BresenhamPoints({ x1: triangle.x1, y1: triangle.y1, x2: triangle.x2, y2: triangle.y2 }, stepRate);\r\n var p2 = BresenhamPoints({ x1: triangle.x2, y1: triangle.y2, x2: triangle.x3, y2: triangle.y3 }, stepRate);\r\n var p3 = BresenhamPoints({ x1: triangle.x3, y1: triangle.y3, x2: triangle.x1, y2: triangle.y1 }, stepRate);\r\n\r\n // Remove overlaps\r\n p1.pop();\r\n p2.pop();\r\n p3.pop();\r\n\r\n p1 = p1.concat(p2, p3);\r\n\r\n var step = p1.length / items.length;\r\n var p = 0;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = p1[Math.floor(p)];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n\r\n p += step;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnTriangle.js?')},"./node_modules/phaser/src/actions/PlayAnimation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Play an animation with the given key, starting at the given startFrame on all Game Objects in items.\r\n *\r\n * @function Phaser.Actions.PlayAnimation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} key - The name of the animation to play.\r\n * @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlayAnimation = function (items, key, startFrame)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].anims.play(key, startFrame);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlayAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlayAnimation.js?")},"./node_modules/phaser/src/actions/PropertyValueInc.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then adds the given value to it.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueInc\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to be added to the property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueInc = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueInc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueInc.js?")},"./node_modules/phaser/src/actions/PropertyValueSet.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueSet\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueSet = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueSet.js?")},"./node_modules/phaser/src/actions/RandomCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/circle/Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomCircle = function (items, circle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(circle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomCircle.js?')},"./node_modules/phaser/src/actions/RandomEllipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/ellipse/Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomEllipse = function (items, ellipse)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(ellipse, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomEllipse.js?')},"./node_modules/phaser/src/actions/RandomLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/line/Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations on the Line.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Line` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects randomly on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomLine = function (items, line)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(line, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomLine.js?')},"./node_modules/phaser/src/actions/RandomRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/rectangle/Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Rectangle.\r\n *\r\n * @function Phaser.Actions.RandomRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomRectangle = function (items, rect)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(rect, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomRectangle.js?')},"./node_modules/phaser/src/actions/RandomTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/triangle/Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomTriangle = function (items, triangle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(triangle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomTriangle.js?')},"./node_modules/phaser/src/actions/Rotate.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `rotation` property,\r\n * and then adds the given value to each of their `rotation` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Rotate(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `rotation` property (in radians).\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Rotate = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Rotate.js?")},"./node_modules/phaser/src/actions/RotateAround.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Rotates each item around the given point by the given angle.\r\n *\r\n * @function Phaser.Actions.RotateAround\r\n * @since 3.0.0\r\n * @see Phaser.Math.RotateAroundDistance\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAround = function (items, point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n RotateAroundDistance(item, x, y, angle, Math.max(1, DistanceBetween(item.x, item.y, x, y)));\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAround.js?')},"./node_modules/phaser/src/actions/RotateAroundDistance.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathRotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\n\r\n/**\r\n * Rotates an array of Game Objects around a point by the given angle and distance.\r\n *\r\n * @function Phaser.Actions.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n * @param {number} distance - The distance from the point of rotation in pixels.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAroundDistance = function (items, point, angle, distance)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n // There\'s nothing to do\r\n if (distance === 0)\r\n {\r\n return items;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n MathRotateAroundDistance(items[i], x, y, angle, distance);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAroundDistance.js?')},"./node_modules/phaser/src/actions/ScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleX` property,\r\n * and then adds the given value to each of their `scaleX` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleX` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleX.js?")},"./node_modules/phaser/src/actions/ScaleXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.ScaleXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to be added to the `scaleX` property.\r\n * @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueInc(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleXY.js?")},"./node_modules/phaser/src/actions/ScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleY` property,\r\n * and then adds the given value to each of their `scaleY` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleY` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleY.js?")},"./node_modules/phaser/src/actions/SetAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `alpha`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetAlpha.js?")},"./node_modules/phaser/src/actions/SetBlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `blendMode`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetBlendMode(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetBlendMode\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetBlendMode = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'blendMode', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetBlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetBlendMode.js?")},"./node_modules/phaser/src/actions/SetDepth.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `depth`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetDepth(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetDepth\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetDepth = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'depth', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetDepth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetDepth.js?")},"./node_modules/phaser/src/actions/SetHitArea.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes all provided Game Objects to the Input Manager to enable them for input with identical areas and callbacks.\r\n * \r\n * @see {@link Phaser.GameObjects.GameObject#setInteractive}\r\n *\r\n * @function Phaser.Actions.SetHitArea\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {*} hitArea - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetHitArea = function (items, hitArea, hitAreaCallback)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setInteractive(hitArea, hitAreaCallback);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetHitArea;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetHitArea.js?")},"./node_modules/phaser/src/actions/SetOrigin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetOrigin\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} originX - The amount to set the `originX` property to.\r\n * @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.\r\n * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetOrigin = function (items, originX, originY, stepX, stepY, index, direction)\r\n{\r\n if (originY === undefined || originY === null) { originY = originX; }\r\n\r\n PropertyValueSet(items, 'originX', originX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'originY', originY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetOrigin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetOrigin.js?")},"./node_modules/phaser/src/actions/SetRotation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `rotation`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetRotation(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetRotation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetRotation = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetRotation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetRotation.js?")},"./node_modules/phaser/src/actions/SetScale.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetScale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to set the `scaleX` property to.\r\n * @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueSet(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScale.js?")},"./node_modules/phaser/src/actions/SetScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleX`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleX.js?")},"./node_modules/phaser/src/actions/SetScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleY`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleY.js?")},"./node_modules/phaser/src/actions/SetTint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public method setTint() and then updates it to the given value(s). You can specify tint color per corner or provide only one color value for `topLeft` parameter, in which case whole item will be tinted with that color.\r\n *\r\n * @function Phaser.Actions.SetTint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} topLeft - The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.\r\n * @param {number} [topRight] - The tint to be applied to top-right corner of item.\r\n * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item.\r\n * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetTint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetTint.js?")},"./node_modules/phaser/src/actions/SetVisible.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `visible`\r\n * and then sets it to the given value.\r\n *\r\n * To use this with a Group: `SetVisible(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {boolean} value - The value to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetVisible = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'visible', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetVisible.js?")},"./node_modules/phaser/src/actions/SetX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `x`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetX.js?")},"./node_modules/phaser/src/actions/SetXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `x` and `y`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to set the `x` property to.\r\n * @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueSet(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetXY.js?")},"./node_modules/phaser/src/actions/SetY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `y`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetY.js?")},"./node_modules/phaser/src/actions/ShiftPosition.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Iterate through the items array changing the position of each element to be that of the element that came before\r\n * it in the array (or after it if direction = 1)\r\n * \r\n * The first items position is set to x/y.\r\n * \r\n * The final x/y coords are returned\r\n *\r\n * @function Phaser.Actions.ShiftPosition\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} x - The x coordinate to place the first item in the array at.\r\n * @param {number} y - The y coordinate to place the first item in the array at.\r\n * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An optional objec to store the final objects position in.\r\n *\r\n * @return {Phaser.Math.Vector2} The output vector.\r\n */\r\nvar ShiftPosition = function (items, x, y, direction, output)\r\n{\r\n if (direction === undefined) { direction = 0; }\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var px;\r\n var py;\r\n\r\n if (items.length > 1)\r\n {\r\n var i;\r\n var cx;\r\n var cy;\r\n var cur;\r\n\r\n if (direction === 0)\r\n {\r\n // Bottom to Top\r\n\r\n var len = items.length - 1;\r\n\r\n px = items[len].x;\r\n py = items[len].y;\r\n\r\n for (i = len - 1; i >= 0; i--)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[len].x = x;\r\n items[len].y = y;\r\n }\r\n else\r\n {\r\n // Top to Bottom\r\n\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n for (i = 1; i < items.length; i++)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n }\r\n else\r\n {\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n\r\n // Return the final set of coordinates as they\'re effectively lost from the shift and may be needed\r\n\r\n output.x = px;\r\n output.y = py;\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ShiftPosition;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ShiftPosition.js?')},"./node_modules/phaser/src/actions/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayShuffle = __webpack_require__(/*! ../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the array in place. The shuffled array is both modified and returned.\r\n *\r\n * @function Phaser.Actions.Shuffle\r\n * @since 3.0.0\r\n * @see Phaser.Utils.Array.Shuffle\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar Shuffle = function (items)\r\n{\r\n return ArrayShuffle(items);\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Shuffle.js?')},"./node_modules/phaser/src/actions/SmoothStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmoothStep = __webpack_require__(/*! ../math/SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js");\r\n\r\n/**\r\n * Smoothstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmoothStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmoothStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmoothStep.js?')},"./node_modules/phaser/src/actions/SmootherStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmootherStep = __webpack_require__(/*! ../math/SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js");\r\n\r\n/**\r\n * Smootherstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmootherStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmootherStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmootherStep.js?')},"./node_modules/phaser/src/actions/Spread.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the\r\n * calculated spread value.\r\n * \r\n * The spread value is derived from the given `min` and `max` values and the total number of items in the array.\r\n * \r\n * For example, to cause an array of Sprites to change in alpha from 0 to 1 you could call:\r\n * \r\n * ```javascript\r\n * Phaser.Actions.Spread(itemsArray, 'alpha', 0, 1);\r\n * ```\r\n *\r\n * @function Phaser.Actions.Spread\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to spread.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that were passed to this Action.\r\n */\r\nvar Spread = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += i * step + min;\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = i * step + min;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Spread;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Spread.js?")},"./node_modules/phaser/src/actions/ToggleVisible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and toggles the visibility of each one.\r\n * Those previously `visible = false` will become `visible = true`, and vice versa.\r\n *\r\n * @function Phaser.Actions.ToggleVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar ToggleVisible = function (items)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].visible = !items[i].visible;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = ToggleVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ToggleVisible.js?")},"./node_modules/phaser/src/actions/WrapInRectangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author samme \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * Wrap each item's coordinates within a rectangle's area.\r\n *\r\n * @function Phaser.Actions.WrapInRectangle\r\n * @since 3.0.0\r\n * @see Phaser.Math.Wrap\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n * @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar WrapInRectangle = function (items, rect, padding)\r\n{\r\n if (padding === undefined)\r\n {\r\n padding = 0;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n item.x = Wrap(item.x, rect.left - padding, rect.right + padding);\r\n item.y = Wrap(item.y, rect.top - padding, rect.bottom + padding);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = WrapInRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/WrapInRectangle.js?")},"./node_modules/phaser/src/actions/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Actions\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Angle: __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/actions/Angle.js"),\r\n Call: __webpack_require__(/*! ./Call */ "./node_modules/phaser/src/actions/Call.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/actions/GetFirst.js"),\r\n GetLast: __webpack_require__(/*! ./GetLast */ "./node_modules/phaser/src/actions/GetLast.js"),\r\n GridAlign: __webpack_require__(/*! ./GridAlign */ "./node_modules/phaser/src/actions/GridAlign.js"),\r\n IncAlpha: __webpack_require__(/*! ./IncAlpha */ "./node_modules/phaser/src/actions/IncAlpha.js"),\r\n IncX: __webpack_require__(/*! ./IncX */ "./node_modules/phaser/src/actions/IncX.js"),\r\n IncXY: __webpack_require__(/*! ./IncXY */ "./node_modules/phaser/src/actions/IncXY.js"),\r\n IncY: __webpack_require__(/*! ./IncY */ "./node_modules/phaser/src/actions/IncY.js"),\r\n PlaceOnCircle: __webpack_require__(/*! ./PlaceOnCircle */ "./node_modules/phaser/src/actions/PlaceOnCircle.js"),\r\n PlaceOnEllipse: __webpack_require__(/*! ./PlaceOnEllipse */ "./node_modules/phaser/src/actions/PlaceOnEllipse.js"),\r\n PlaceOnLine: __webpack_require__(/*! ./PlaceOnLine */ "./node_modules/phaser/src/actions/PlaceOnLine.js"),\r\n PlaceOnRectangle: __webpack_require__(/*! ./PlaceOnRectangle */ "./node_modules/phaser/src/actions/PlaceOnRectangle.js"),\r\n PlaceOnTriangle: __webpack_require__(/*! ./PlaceOnTriangle */ "./node_modules/phaser/src/actions/PlaceOnTriangle.js"),\r\n PlayAnimation: __webpack_require__(/*! ./PlayAnimation */ "./node_modules/phaser/src/actions/PlayAnimation.js"),\r\n PropertyValueInc: __webpack_require__(/*! ./PropertyValueInc */ "./node_modules/phaser/src/actions/PropertyValueInc.js"),\r\n PropertyValueSet: __webpack_require__(/*! ./PropertyValueSet */ "./node_modules/phaser/src/actions/PropertyValueSet.js"),\r\n RandomCircle: __webpack_require__(/*! ./RandomCircle */ "./node_modules/phaser/src/actions/RandomCircle.js"),\r\n RandomEllipse: __webpack_require__(/*! ./RandomEllipse */ "./node_modules/phaser/src/actions/RandomEllipse.js"),\r\n RandomLine: __webpack_require__(/*! ./RandomLine */ "./node_modules/phaser/src/actions/RandomLine.js"),\r\n RandomRectangle: __webpack_require__(/*! ./RandomRectangle */ "./node_modules/phaser/src/actions/RandomRectangle.js"),\r\n RandomTriangle: __webpack_require__(/*! ./RandomTriangle */ "./node_modules/phaser/src/actions/RandomTriangle.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/actions/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/actions/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/actions/RotateAroundDistance.js"),\r\n ScaleX: __webpack_require__(/*! ./ScaleX */ "./node_modules/phaser/src/actions/ScaleX.js"),\r\n ScaleXY: __webpack_require__(/*! ./ScaleXY */ "./node_modules/phaser/src/actions/ScaleXY.js"),\r\n ScaleY: __webpack_require__(/*! ./ScaleY */ "./node_modules/phaser/src/actions/ScaleY.js"),\r\n SetAlpha: __webpack_require__(/*! ./SetAlpha */ "./node_modules/phaser/src/actions/SetAlpha.js"),\r\n SetBlendMode: __webpack_require__(/*! ./SetBlendMode */ "./node_modules/phaser/src/actions/SetBlendMode.js"),\r\n SetDepth: __webpack_require__(/*! ./SetDepth */ "./node_modules/phaser/src/actions/SetDepth.js"),\r\n SetHitArea: __webpack_require__(/*! ./SetHitArea */ "./node_modules/phaser/src/actions/SetHitArea.js"),\r\n SetOrigin: __webpack_require__(/*! ./SetOrigin */ "./node_modules/phaser/src/actions/SetOrigin.js"),\r\n SetRotation: __webpack_require__(/*! ./SetRotation */ "./node_modules/phaser/src/actions/SetRotation.js"),\r\n SetScale: __webpack_require__(/*! ./SetScale */ "./node_modules/phaser/src/actions/SetScale.js"),\r\n SetScaleX: __webpack_require__(/*! ./SetScaleX */ "./node_modules/phaser/src/actions/SetScaleX.js"),\r\n SetScaleY: __webpack_require__(/*! ./SetScaleY */ "./node_modules/phaser/src/actions/SetScaleY.js"),\r\n SetTint: __webpack_require__(/*! ./SetTint */ "./node_modules/phaser/src/actions/SetTint.js"),\r\n SetVisible: __webpack_require__(/*! ./SetVisible */ "./node_modules/phaser/src/actions/SetVisible.js"),\r\n SetX: __webpack_require__(/*! ./SetX */ "./node_modules/phaser/src/actions/SetX.js"),\r\n SetXY: __webpack_require__(/*! ./SetXY */ "./node_modules/phaser/src/actions/SetXY.js"),\r\n SetY: __webpack_require__(/*! ./SetY */ "./node_modules/phaser/src/actions/SetY.js"),\r\n ShiftPosition: __webpack_require__(/*! ./ShiftPosition */ "./node_modules/phaser/src/actions/ShiftPosition.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/actions/Shuffle.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/actions/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/actions/SmoothStep.js"),\r\n Spread: __webpack_require__(/*! ./Spread */ "./node_modules/phaser/src/actions/Spread.js"),\r\n ToggleVisible: __webpack_require__(/*! ./ToggleVisible */ "./node_modules/phaser/src/actions/ToggleVisible.js"),\r\n WrapInRectangle: __webpack_require__(/*! ./WrapInRectangle */ "./node_modules/phaser/src/actions/WrapInRectangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/index.js?')},"./node_modules/phaser/src/animations/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar FindClosestInSorted = __webpack_require__(/*! ../utils/array/FindClosestInSorted */ \"./node_modules/phaser/src/utils/array/FindClosestInSorted.js\");\r\nvar Frame = __webpack_require__(/*! ./AnimationFrame */ \"./node_modules/phaser/src/animations/AnimationFrame.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame based Animation.\r\n *\r\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\r\n *\r\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\r\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\r\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.Animations\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\r\n * @param {string} key - The unique identifying string for this animation.\r\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\r\n */\r\nvar Animation = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Animation (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.Animations.Animation#manager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique identifying string for this animation.\r\n *\r\n * @name Phaser.Animations.Animation#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * A frame based animation (as opposed to a bone based animation)\r\n *\r\n * @name Phaser.Animations.Animation#type\r\n * @type {string}\r\n * @default frame\r\n * @since 3.0.0\r\n */\r\n this.type = 'frame';\r\n\r\n /**\r\n * Extract all the frame data into the frames array.\r\n *\r\n * @name Phaser.Animations.Animation#frames\r\n * @type {Phaser.Animations.AnimationFrame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = this.getFrames(\r\n manager.textureManager,\r\n GetValue(config, 'frames', []),\r\n GetValue(config, 'defaultTextureKey', null)\r\n );\r\n\r\n /**\r\n * The frame rate of playback in frames per second (default 24 if duration is null)\r\n *\r\n * @name Phaser.Animations.Animation#frameRate\r\n * @type {integer}\r\n * @default 24\r\n * @since 3.0.0\r\n */\r\n this.frameRate = GetValue(config, 'frameRate', null);\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.Animations.Animation#duration\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.duration = GetValue(config, 'duration', null);\r\n\r\n if (this.duration === null && this.frameRate === null)\r\n {\r\n // No duration or frameRate given, use default frameRate of 24fps\r\n this.frameRate = 24;\r\n this.duration = (this.frameRate / this.frames.length) * 1000;\r\n }\r\n else if (this.duration && this.frameRate === null)\r\n {\r\n // Duration given but no frameRate, so set the frameRate based on duration\r\n // I.e. 12 frames in the animation, duration = 4000 ms\r\n // So frameRate is 12 / (4000 / 1000) = 3 fps\r\n this.frameRate = this.frames.length / (this.duration / 1000);\r\n }\r\n else\r\n {\r\n // frameRate given, derive duration from it (even if duration also specified)\r\n // I.e. 15 frames in the animation, frameRate = 30 fps\r\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\r\n this.duration = (this.frames.length / this.frameRate) * 1000;\r\n }\r\n\r\n /**\r\n * How many ms per frame, not including frame specific modifiers.\r\n *\r\n * @name Phaser.Animations.Animation#msPerFrame\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 1000 / this.frameRate;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.Animations.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\r\n\r\n /**\r\n * The delay in ms before the playback will begin.\r\n *\r\n * @name Phaser.Animations.Animation#delay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = GetValue(config, 'delay', 0);\r\n\r\n /**\r\n * Number of times to repeat the animation. Set to -1 to repeat forever.\r\n *\r\n * @name Phaser.Animations.Animation#repeat\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeat = GetValue(config, 'repeat', 0);\r\n\r\n /**\r\n * The delay in ms before the a repeat play starts.\r\n *\r\n * @name Phaser.Animations.Animation#repeatDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\r\n\r\n /**\r\n * Should the animation yoyo (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.Animations.Animation#yoyo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.yoyo = GetValue(config, 'yoyo', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\r\n *\r\n * @name Phaser.Animations.Animation#showOnStart\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.showOnStart = GetValue(config, 'showOnStart', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\r\n *\r\n * @name Phaser.Animations.Animation#hideOnComplete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\r\n\r\n /**\r\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\r\n *\r\n * @name Phaser.Animations.Animation#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.on(Events.RESUME_ALL, this.resume, this);\r\n },\r\n\r\n /**\r\n * Add frames to the end of the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrame: function (config)\r\n {\r\n return this.addFrameAt(this.frames.length, config);\r\n },\r\n\r\n /**\r\n * Add frame/s into the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to insert the frame at within the animation.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrameAt: function (index, config)\r\n {\r\n var newFrames = this.getFrames(this.manager.textureManager, config);\r\n\r\n if (newFrames.length > 0)\r\n {\r\n if (index === 0)\r\n {\r\n this.frames = newFrames.concat(this.frames);\r\n }\r\n else if (index === this.frames.length)\r\n {\r\n this.frames = this.frames.concat(newFrames);\r\n }\r\n else\r\n {\r\n var pre = this.frames.slice(0, index);\r\n var post = this.frames.slice(index);\r\n\r\n this.frames = pre.concat(newFrames, post);\r\n }\r\n\r\n this.updateFrameSequence();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the given frame index is valid.\r\n *\r\n * @method Phaser.Animations.Animation#checkFrame\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to be checked.\r\n *\r\n * @return {boolean} `true` if the index is valid, otherwise `false`.\r\n */\r\n checkFrame: function (index)\r\n {\r\n return (index >= 0 && index < this.frames.length);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#completeAnimation\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n completeAnimation: function (component)\r\n {\r\n if (this.hideOnComplete)\r\n {\r\n component.parent.visible = false;\r\n }\r\n\r\n component.stop();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFirstTick\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n * @param {boolean} [includeDelay=true] - [description]\r\n */\r\n getFirstTick: function (component, includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = true; }\r\n\r\n // When is the first update due?\r\n component.accumulator = 0;\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n\r\n if (includeDelay)\r\n {\r\n component.nextTick += component._delay;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the AnimationFrame at the provided index\r\n *\r\n * @method Phaser.Animations.Animation#getFrameAt\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\r\n */\r\n getFrameAt: function (index)\r\n {\r\n return this.frames[index];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFrames\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - [description]\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description]\r\n * @param {string} [defaultTextureKey] - [description]\r\n *\r\n * @return {Phaser.Animations.AnimationFrame[]} [description]\r\n */\r\n getFrames: function (textureManager, frames, defaultTextureKey)\r\n {\r\n var out = [];\r\n var prev;\r\n var animationFrame;\r\n var index = 1;\r\n var i;\r\n var textureKey;\r\n\r\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\r\n if (typeof frames === 'string')\r\n {\r\n textureKey = frames;\r\n\r\n var texture = textureManager.get(textureKey);\r\n var frameKeys = texture.getFrameNames();\r\n\r\n frames = [];\r\n\r\n frameKeys.forEach(function (idx, value)\r\n {\r\n frames.push({ key: textureKey, frame: value });\r\n });\r\n }\r\n\r\n if (!Array.isArray(frames) || frames.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n var item = frames[i];\r\n\r\n var key = GetValue(item, 'key', defaultTextureKey);\r\n\r\n if (!key)\r\n {\r\n continue;\r\n }\r\n\r\n // Could be an integer or a string\r\n var frame = GetValue(item, 'frame', 0);\r\n\r\n // The actual texture frame\r\n var textureFrame = textureManager.getFrame(key, frame);\r\n\r\n animationFrame = new Frame(key, frame, index, textureFrame);\r\n\r\n animationFrame.duration = GetValue(item, 'duration', 0);\r\n\r\n animationFrame.isFirst = (!prev);\r\n\r\n // The previously created animationFrame\r\n if (prev)\r\n {\r\n prev.nextFrame = animationFrame;\r\n\r\n animationFrame.prevFrame = prev;\r\n }\r\n\r\n out.push(animationFrame);\r\n\r\n prev = animationFrame;\r\n\r\n index++;\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n animationFrame.isLast = true;\r\n\r\n // Link them end-to-end, so they loop\r\n animationFrame.nextFrame = out[0];\r\n\r\n out[0].prevFrame = animationFrame;\r\n\r\n // Generate the progress data\r\n\r\n var slice = 1 / (out.length - 1);\r\n\r\n for (i = 0; i < out.length; i++)\r\n {\r\n out[i].progress = i * slice;\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getNextTick\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n getNextTick: function (component)\r\n {\r\n // accumulator += delta * _timeScale\r\n // after a large delta surge (perf issue for example) we need to adjust for it here\r\n\r\n // When is the next update due?\r\n component.accumulator -= component.nextTick;\r\n\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n },\r\n\r\n /**\r\n * Loads the Animation values into the Animation Component.\r\n *\r\n * @method Phaser.Animations.Animation#load\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\r\n * @param {integer} startFrame - The start frame of the animation to load.\r\n */\r\n load: function (component, startFrame)\r\n {\r\n if (startFrame >= this.frames.length)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (component.currentAnim !== this)\r\n {\r\n component.currentAnim = this;\r\n\r\n component.frameRate = this.frameRate;\r\n component.duration = this.duration;\r\n component.msPerFrame = this.msPerFrame;\r\n component.skipMissedFrames = this.skipMissedFrames;\r\n\r\n component._delay = this.delay;\r\n component._repeat = this.repeat;\r\n component._repeatDelay = this.repeatDelay;\r\n component._yoyo = this.yoyo;\r\n }\r\n\r\n var frame = this.frames[startFrame];\r\n\r\n if (startFrame === 0 && !component.forward)\r\n {\r\n frame = this.getLastFrame();\r\n }\r\n\r\n component.updateFrame(frame);\r\n },\r\n\r\n /**\r\n * Returns the frame closest to the given progress value between 0 and 1.\r\n *\r\n * @method Phaser.Animations.Animation#getFrameByProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\r\n */\r\n getFrameByProgress: function (value)\r\n {\r\n value = Clamp(value, 0, 1);\r\n\r\n return FindClosestInSorted(value, this.frames, 'progress');\r\n },\r\n\r\n /**\r\n * Advance the animation frame.\r\n *\r\n * @method Phaser.Animations.Animation#nextFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n */\r\n nextFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isLast)\r\n {\r\n // We're at the end of the animation\r\n\r\n // Yoyo? (happens before repeat)\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, false);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n // Repeat (happens before complete)\r\n\r\n if (component._reverse && component.forward)\r\n {\r\n component.forward = false;\r\n }\r\n else\r\n {\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.nextFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\r\n *\r\n * @method Phaser.Animations.Animation#handleYoyoFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\r\n */\r\n handleYoyoFrame: function (component, isReverse)\r\n {\r\n if (!isReverse) { isReverse = false; }\r\n\r\n if (component._reverse === !isReverse && component.repeatCounter > 0)\r\n {\r\n component.forward = isReverse;\r\n\r\n this.repeatAnimation(component);\r\n\r\n return;\r\n }\r\n\r\n if (component._reverse !== isReverse && component.repeatCounter === 0)\r\n {\r\n this.completeAnimation(component);\r\n\r\n return;\r\n }\r\n \r\n component.forward = isReverse;\r\n\r\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\r\n\r\n this.updateAndGetNextTick(component, frame);\r\n },\r\n\r\n /**\r\n * Returns the animation last frame.\r\n *\r\n * @method Phaser.Animations.Animation#getLastFrame\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\r\n */\r\n getLastFrame: function ()\r\n {\r\n return this.frames[this.frames.length - 1];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#previousFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n previousFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isFirst)\r\n {\r\n // We're at the start of the animation\r\n\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, true);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n if (component._reverse && !component.forward)\r\n {\r\n component.currentFrame = this.getLastFrame();\r\n this.repeatAnimation(component);\r\n }\r\n else\r\n {\r\n // Repeat (happens before complete)\r\n component.forward = true;\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.prevFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Update Frame and Wait next tick.\r\n *\r\n * @method Phaser.Animations.Animation#updateAndGetNextTick\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\r\n */\r\n updateAndGetNextTick: function (component, frame)\r\n {\r\n component.updateFrame(frame);\r\n\r\n this.getNextTick(component);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#removeFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrame: function (frame)\r\n {\r\n var index = this.frames.indexOf(frame);\r\n\r\n if (index !== -1)\r\n {\r\n this.removeFrameAt(index);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a frame from the AnimationFrame array at the provided index\r\n * and updates the animation accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrameAt: function (index)\r\n {\r\n this.frames.splice(index, 1);\r\n\r\n this.updateFrameSequence();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#repeatAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n repeatAnimation: function (component)\r\n {\r\n if (component._pendingStop === 2)\r\n {\r\n return this.completeAnimation(component);\r\n }\r\n\r\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\r\n {\r\n component.pendingRepeat = true;\r\n component.accumulator -= component.nextTick;\r\n component.nextTick += component._repeatDelay;\r\n }\r\n else\r\n {\r\n component.repeatCounter--;\r\n\r\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\r\n\r\n if (component.isPlaying)\r\n {\r\n this.getNextTick(component);\r\n\r\n component.pendingRepeat = false;\r\n\r\n var frame = component.currentFrame;\r\n var parent = component.parent;\r\n\r\n this.emit(Events.ANIMATION_REPEAT, this, frame);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture frame the animation uses for rendering.\r\n *\r\n * @method Phaser.Animations.Animation#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n setFrame: function (component)\r\n {\r\n // Work out which frame should be set next on the child, and set it\r\n if (component.forward)\r\n {\r\n this.nextFrame(component);\r\n }\r\n else\r\n {\r\n this.previousFrame(component);\r\n }\r\n },\r\n\r\n /**\r\n * Converts the animation data to JSON.\r\n *\r\n * @method Phaser.Animations.Animation#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimation} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n key: this.key,\r\n type: this.type,\r\n frames: [],\r\n frameRate: this.frameRate,\r\n duration: this.duration,\r\n skipMissedFrames: this.skipMissedFrames,\r\n delay: this.delay,\r\n repeat: this.repeat,\r\n repeatDelay: this.repeatDelay,\r\n yoyo: this.yoyo,\r\n showOnStart: this.showOnStart,\r\n hideOnComplete: this.hideOnComplete\r\n };\r\n\r\n this.frames.forEach(function (frame)\r\n {\r\n output.frames.push(frame.toJSON());\r\n });\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#updateFrameSequence\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n updateFrameSequence: function ()\r\n {\r\n var len = this.frames.length;\r\n var slice = 1 / (len - 1);\r\n\r\n var frame;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n frame = this.frames[i];\r\n\r\n frame.index = i + 1;\r\n frame.isFirst = false;\r\n frame.isLast = false;\r\n frame.progress = i * slice;\r\n\r\n if (i === 0)\r\n {\r\n frame.isFirst = true;\r\n\r\n if (len === 1)\r\n {\r\n frame.isLast = true;\r\n frame.nextFrame = frame;\r\n frame.prevFrame = frame;\r\n }\r\n else\r\n {\r\n frame.isLast = false;\r\n frame.prevFrame = this.frames[len - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n else if (i === len - 1 && len > 1)\r\n {\r\n frame.isLast = true;\r\n frame.prevFrame = this.frames[len - 2];\r\n frame.nextFrame = this.frames[0];\r\n }\r\n else if (len > 1)\r\n {\r\n frame.prevFrame = this.frames[i - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n pause: function ()\r\n {\r\n this.paused = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n resume: function ()\r\n {\r\n this.paused = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.off(Events.RESUME_ALL, this.resume, this);\r\n\r\n this.manager.remove(this.key);\r\n\r\n for (var i = 0; i < this.frames.length; i++)\r\n {\r\n this.frames[i].destroy();\r\n }\r\n\r\n this.frames = [];\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/Animation.js?")},"./node_modules/phaser/src/animations/AnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single frame in an Animation sequence.\r\n *\r\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\r\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\r\n *\r\n * AnimationFrames are generated automatically by the Animation class.\r\n *\r\n * @class AnimationFrame\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\r\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\r\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\r\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n */\r\nvar AnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function AnimationFrame (textureKey, textureFrame, index, frame)\r\n {\r\n /**\r\n * The key of the Texture this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.textureKey = textureKey;\r\n\r\n /**\r\n * The key of the Frame within the Texture that this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.textureFrame = textureFrame;\r\n\r\n /**\r\n * The index of this AnimationFrame within the Animation sequence.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * Is this the first frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isFirst\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isFirst = false;\r\n\r\n /**\r\n * Is this the last frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isLast\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isLast = false;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#prevFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.prevFrame = null;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#nextFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.nextFrame = null;\r\n\r\n /**\r\n * Additional time (in ms) that this frame should appear for during playback.\r\n * The value is added onto the msPerFrame set by the animation.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * What % through the animation does this frame come?\r\n * This value is generated when the animation is created and cached here.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#progress\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n },\r\n\r\n /**\r\n * Generates a JavaScript object suitable for converting to JSON.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n key: this.textureKey,\r\n frame: this.textureFrame,\r\n duration: this.duration\r\n };\r\n },\r\n\r\n /**\r\n * Destroys this object by removing references to external resources and callbacks.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.frame = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationFrame.js?')},"./node_modules/phaser/src/animations/AnimationManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Animation = __webpack_require__(/*! ./Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ \"./node_modules/phaser/src/structs/Map.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Pad = __webpack_require__(/*! ../utils/string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Animation Manager.\r\n *\r\n * Animations are managed by the global Animation Manager. This is a singleton class that is\r\n * responsible for creating and delivering animations and their corresponding data to all Game Objects.\r\n * Unlike plugins it is owned by the Game instance, not the Scene.\r\n *\r\n * Sprites and other Game Objects get the data they need from the AnimationManager.\r\n *\r\n * @class AnimationManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar AnimationManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function AnimationManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Animations.AnimationManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.textureManager = null;\r\n\r\n /**\r\n * The global time scale of the Animation Manager.\r\n *\r\n * This scales the time delta between two frames, thus influencing the speed of time for the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#globalTimeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.globalTimeScale = 1;\r\n\r\n /**\r\n * The Animations registered in the Animation Manager.\r\n *\r\n * This map should be modified with the {@link #add} and {@link #create} methods of the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#anims\r\n * @type {Phaser.Structs.Map.}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.anims = new CustomMap();\r\n\r\n /**\r\n * Whether the Animation Manager is paused along with all of its Animations.\r\n *\r\n * @name Phaser.Animations.AnimationManager#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * The name of this Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'AnimationManager';\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * Registers event listeners after the Game boots.\r\n *\r\n * @method Phaser.Animations.AnimationManager#boot\r\n * @listens Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.textureManager = this.game.textures;\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Animation to the Animation Manager.\r\n *\r\n * @method Phaser.Animations.AnimationManager#add\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique.\r\n * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n add: function (key, animation)\r\n {\r\n if (this.anims.has(key))\r\n {\r\n console.warn('Animation key exists: ' + key);\r\n\r\n return;\r\n }\r\n\r\n animation.key = key;\r\n\r\n this.anims.set(key, animation);\r\n\r\n this.emit(Events.ADD_ANIMATION, key, animation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the given key is already in use within the Animation Manager or not.\r\n * \r\n * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific.\r\n *\r\n * @method Phaser.Animations.AnimationManager#exists\r\n * @since 3.16.0\r\n *\r\n * @param {string} key - The key of the Animation to check.\r\n *\r\n * @return {boolean} `true` if the Animation already exists in the Animation Manager, or `false` if the key is available.\r\n */\r\n exists: function (key)\r\n {\r\n return this.anims.has(key);\r\n },\r\n\r\n /**\r\n * Creates a new Animation and adds it to the Animation Manager.\r\n * \r\n * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific.\r\n * \r\n * If an invalid key is given this method will return `false`.\r\n * \r\n * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned.\r\n * \r\n * A brand new animation is only created if the key is valid and not already in use.\r\n * \r\n * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#create\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation.\r\n *\r\n * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use.\r\n */\r\n create: function (config)\r\n {\r\n var key = config.key;\r\n\r\n var anim = false;\r\n\r\n if (key)\r\n {\r\n anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n anim = new Animation(this, key, config);\r\n\r\n this.anims.set(key, anim);\r\n \r\n this.emit(Events.ADD_ANIMATION, key, anim);\r\n }\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Loads this Animation Manager's Animations and settings from a JSON object.\r\n *\r\n * @method Phaser.Animations.AnimationManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.JSONAnimations|Phaser.Types.Animations.JSONAnimation)} data - The JSON object to parse.\r\n * @param {boolean} [clearCurrentAnimations=false] - If set to `true`, the current animations will be removed (`anims.clear()`). If set to `false` (default), the animations in `data` will be added.\r\n *\r\n * @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.\r\n */\r\n fromJSON: function (data, clearCurrentAnimations)\r\n {\r\n if (clearCurrentAnimations === undefined) { clearCurrentAnimations = false; }\r\n\r\n if (clearCurrentAnimations)\r\n {\r\n this.anims.clear();\r\n }\r\n\r\n // Do we have a String (i.e. from JSON, or an Object?)\r\n if (typeof data === 'string')\r\n {\r\n data = JSON.parse(data);\r\n }\r\n\r\n var output = [];\r\n\r\n // Array of animations, or a single animation?\r\n if (data.hasOwnProperty('anims') && Array.isArray(data.anims))\r\n {\r\n for (var i = 0; i < data.anims.length; i++)\r\n {\r\n output.push(this.create(data.anims[i]));\r\n }\r\n\r\n if (data.hasOwnProperty('globalTimeScale'))\r\n {\r\n this.globalTimeScale = data.globalTimeScale;\r\n }\r\n }\r\n else if (data.hasOwnProperty('key') && data.type === 'frame')\r\n {\r\n output.push(this.create(data));\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNames} [config] - The configuration object for the animation frame names.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNames: function (key, config)\r\n {\r\n var prefix = GetValue(config, 'prefix', '');\r\n var start = GetValue(config, 'start', 0);\r\n var end = GetValue(config, 'end', 0);\r\n var suffix = GetValue(config, 'suffix', '');\r\n var zeroPad = GetValue(config, 'zeroPad', 0);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n var diff = (start < end) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n end += diff;\r\n\r\n var i;\r\n var frame;\r\n\r\n if (!config)\r\n {\r\n // Use every frame in the atlas?\r\n frames = texture.getFrameNames();\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n else if (Array.isArray(frames))\r\n {\r\n // Have they provided their own custom frame sequence array?\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = start; i !== end; i += diff)\r\n {\r\n frame = prefix + Pad(i, zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.\r\n *\r\n * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}.\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNumbers\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNumbers} config - The configuration object for the animation frames.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNumbers: function (key, config)\r\n {\r\n var startFrame = GetValue(config, 'start', 0);\r\n var endFrame = GetValue(config, 'end', -1);\r\n var firstFrame = GetValue(config, 'first', false);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n if (firstFrame && texture.has(firstFrame))\r\n {\r\n out.push({ key: key, frame: firstFrame });\r\n }\r\n\r\n var i;\r\n\r\n // Have they provided their own custom frame sequence array?\r\n if (Array.isArray(frames))\r\n {\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n if (texture.has(frames[i]))\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // No endFrame then see if we can get it\r\n if (endFrame === -1)\r\n {\r\n endFrame = texture.frameTotal;\r\n }\r\n\r\n var diff = (startFrame < endFrame) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n endFrame += diff;\r\n\r\n for (i = startFrame; i !== endFrame; i += diff)\r\n {\r\n if (texture.has(i))\r\n {\r\n out.push({ key: key, frame: i });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Get an Animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Animation to retrieve.\r\n *\r\n * @return {Phaser.Animations.Animation} The Animation.\r\n */\r\n get: function (key)\r\n {\r\n return this.anims.get(key);\r\n },\r\n\r\n /**\r\n * Load an Animation into a Game Object's Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#load\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into.\r\n * @param {string} key - The key of the animation to load.\r\n * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it.\r\n */\r\n load: function (child, key, startFrame)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n anim.load(child, startFrame);\r\n }\r\n else\r\n {\r\n console.warn('Missing animation: ' + key);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Pause all animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#pauseAll\r\n * @fires Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n if (!this.paused)\r\n {\r\n this.paused = true;\r\n\r\n this.emit(Events.PAUSE_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Play an animation on the given Game Objects that have an Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Object.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n play: function (key, child)\r\n {\r\n if (!Array.isArray(child))\r\n {\r\n child = [ child ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < child.length; i++)\r\n {\r\n child[i].anims.play(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove an animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#remove\r\n * @fires Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to remove.\r\n *\r\n * @return {Phaser.Animations.Animation} [description]\r\n */\r\n remove: function (key)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n this.emit(Events.REMOVE_ANIMATION, key, anim);\r\n\r\n this.anims.delete(key);\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Resume all paused animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#resumeAll\r\n * @fires Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.emit(Events.RESUME_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects that have an Animation Component and then\r\n * starts the given animation playing on them, each one offset by the\r\n * `stagger` amount given to this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#staggerPlay\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Objects.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.\r\n * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n staggerPlay: function (key, children, stagger)\r\n {\r\n if (stagger === undefined) { stagger = 0; }\r\n\r\n if (!Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].anims.delayedPlay(stagger * i, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided.\r\n *\r\n * @method Phaser.Animations.AnimationManager#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - [description]\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimations} [description]\r\n */\r\n toJSON: function (key)\r\n {\r\n if (key !== undefined && key !== '')\r\n {\r\n return this.anims.get(key).toJSON();\r\n }\r\n else\r\n {\r\n var output = {\r\n anims: [],\r\n globalTimeScale: this.globalTimeScale\r\n };\r\n\r\n this.anims.each(function (animationKey, animation)\r\n {\r\n output.anims.push(animation.toJSON());\r\n });\r\n\r\n return output;\r\n }\r\n },\r\n\r\n /**\r\n * Destroy this Animation Manager and clean up animation definitions and references to other objects.\r\n * This method should not be called directly. It will be called automatically as a response to a `destroy` event from the Phaser.Game instance.\r\n *\r\n * @method Phaser.Animations.AnimationManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.anims.clear();\r\n\r\n this.textureManager = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationManager.js?")},"./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Add Animation Event.\r\n * \r\n * This event is dispatched when a new animation is added to the global Animation Manager.\r\n * \r\n * This can happen either as a result of an animation instance being added to the Animation Manager,\r\n * or the Animation Manager creating a new animation directly.\r\n *\r\n * @event Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Complete Event.\r\n * \r\n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Repeat Event.\r\n * \r\n * This event is dispatched when a currently playing animation repeats.\r\n * \r\n * The event is dispatched directly from the Animation object itself. Which means that listeners\r\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Restart Event.\r\n * \r\n * This event is dispatched by an Animation instance when it restarts.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'restart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Start Event.\r\n * \r\n * This event is dispatched by an Animation instance when it starts playing.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager is told to pause.\r\n * \r\n * When this happens all current animations will stop updating, although it doesn't necessarily mean\r\n * that the game has paused as well.\r\n *\r\n * @event Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Animation Event.\r\n * \r\n * This event is dispatched when an animation is removed from the global Animation Manager.\r\n *\r\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\r\n * \r\n * When this happens all current animations will continue updating again.\r\n *\r\n * @event Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Start Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Update Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Start Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Update Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD_ANIMATION: __webpack_require__(/*! ./ADD_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js"),\r\n ANIMATION_COMPLETE: __webpack_require__(/*! ./ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js"),\r\n ANIMATION_REPEAT: __webpack_require__(/*! ./ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js"),\r\n ANIMATION_RESTART: __webpack_require__(/*! ./ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js"),\r\n ANIMATION_START: __webpack_require__(/*! ./ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js"),\r\n REMOVE_ANIMATION: __webpack_require__(/*! ./REMOVE_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js"),\r\n SPRITE_ANIMATION_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_START: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js"),\r\n SPRITE_ANIMATION_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_START: __webpack_require__(/*! ./SPRITE_ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js"),\r\n SPRITE_ANIMATION_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/index.js?')},"./node_modules/phaser/src/animations/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/animations/Animation.js"),\r\n AnimationFrame: __webpack_require__(/*! ./AnimationFrame */ "./node_modules/phaser/src/animations/AnimationFrame.js"),\r\n AnimationManager: __webpack_require__(/*! ./AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/animations/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/index.js?')},"./node_modules/phaser/src/cache/BaseCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ "./node_modules/phaser/src/structs/Map.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The BaseCache is a base Cache class that can be used for storing references to any kind of data.\r\n *\r\n * Data can be added, retrieved and removed based on the given keys.\r\n *\r\n * Keys are string-based.\r\n *\r\n * @class BaseCache\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar BaseCache = new Class({\r\n\r\n initialize:\r\n\r\n function BaseCache ()\r\n {\r\n /**\r\n * The Map in which the cache objects are stored.\r\n *\r\n * You can query the Map directly or use the BaseCache methods.\r\n *\r\n * @name Phaser.Cache.BaseCache#entries\r\n * @type {Phaser.Structs.Map.}\r\n * @since 3.0.0\r\n */\r\n this.entries = new CustomMap();\r\n\r\n /**\r\n * An instance of EventEmitter used by the cache to emit related events.\r\n *\r\n * @name Phaser.Cache.BaseCache#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n },\r\n\r\n /**\r\n * Adds an item to this cache. The item is referenced by a unique string, which you are responsible\r\n * for setting and keeping track of. The item can only be retrieved by using this string.\r\n *\r\n * @method Phaser.Cache.BaseCache#add\r\n * @fires Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key by which the data added to the cache will be referenced.\r\n * @param {*} data - The data to be stored in the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n add: function (key, data)\r\n {\r\n this.entries.set(key, data);\r\n\r\n this.events.emit(Events.ADD, this, key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.exists`.\r\n *\r\n * @method Phaser.Cache.BaseCache#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.has` and is called directly by the Loader.\r\n *\r\n * @method Phaser.Cache.BaseCache#exists\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n exists: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Gets an item from this cache based on the given key.\r\n *\r\n * @method Phaser.Cache.BaseCache#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be retrieved from this cache.\r\n *\r\n * @return {*} The item in the cache, or `null` if no item matching the given key was found.\r\n */\r\n get: function (key)\r\n {\r\n return this.entries.get(key);\r\n },\r\n\r\n /**\r\n * Removes and item from this cache based on the given key.\r\n *\r\n * If an entry matching the key is found it is removed from the cache and a `remove` event emitted.\r\n * No additional checks are done on the item removed. If other systems or parts of your game code\r\n * are relying on this item, it is up to you to sever those relationships prior to removing the item.\r\n *\r\n * @method Phaser.Cache.BaseCache#remove\r\n * @fires Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to remove from the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n remove: function (key)\r\n {\r\n var entry = this.get(key);\r\n\r\n if (entry)\r\n {\r\n this.entries.delete(key);\r\n\r\n this.events.emit(Events.REMOVE, this, key, entry.data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all keys in use in this cache.\r\n *\r\n * @method Phaser.Cache.BaseCache#getKeys\r\n * @since 3.17.0\r\n *\r\n * @return {string[]} Array containing all the keys.\r\n */\r\n getKeys: function ()\r\n {\r\n return this.entries.keys();\r\n },\r\n\r\n /**\r\n * Destroys this cache and all items within it.\r\n *\r\n * @method Phaser.Cache.BaseCache#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.entries.clear();\r\n this.events.removeAllListeners();\r\n\r\n this.entries = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/BaseCache.js?')},"./node_modules/phaser/src/cache/CacheManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCache = __webpack_require__(/*! ./BaseCache */ \"./node_modules/phaser/src/cache/BaseCache.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Cache Manager is the global cache owned and maintained by the Game instance.\r\n *\r\n * Various systems, such as the file Loader, rely on this cache in order to store the files\r\n * it has loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache\r\n * instances, one per type of file. You can also add your own custom caches.\r\n *\r\n * @class CacheManager\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this CacheManager.\r\n */\r\nvar CacheManager = new Class({\r\n\r\n initialize:\r\n\r\n function CacheManager (game)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance that owns this CacheManager.\r\n *\r\n * @name Phaser.Cache.CacheManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Cache storing all binary files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#binary\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.binary = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all bitmap font data files, typically added via the Loader.\r\n * Only the font data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#bitmapFont\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.bitmapFont = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all JSON data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.json = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all physics data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#physics\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.physics = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all shader source files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#shader\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.shader = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all non-streaming audio files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#audio\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.audio = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all text files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#text\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.text = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all html files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#html\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.12.0\r\n */\r\n this.html = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all WaveFront OBJ files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#obj\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.obj = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all tilemap data files, typically added via the Loader.\r\n * Only the data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#tilemap\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all xml data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#xml\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.xml = new BaseCache();\r\n\r\n /**\r\n * An object that contains your own custom BaseCache entries.\r\n * Add to this via the `addCustom` method.\r\n *\r\n * @name Phaser.Cache.CacheManager#custom\r\n * @type {Object.}\r\n * @since 3.0.0\r\n */\r\n this.custom = {};\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Add your own custom Cache for storing your own files.\r\n * The cache will be available under `Cache.custom.key`.\r\n * The cache will only be created if the key is not already in use.\r\n *\r\n * @method Phaser.Cache.CacheManager#addCustom\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of your custom cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} A reference to the BaseCache that was created. If the key was already in use, a reference to the existing cache is returned instead.\r\n */\r\n addCustom: function (key)\r\n {\r\n if (!this.custom.hasOwnProperty(key))\r\n {\r\n this.custom[key] = new BaseCache();\r\n }\r\n\r\n return this.custom[key];\r\n },\r\n\r\n /**\r\n * Removes all entries from all BaseCaches and destroys all custom caches.\r\n *\r\n * @method Phaser.Cache.CacheManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var keys = [\r\n 'binary',\r\n 'bitmapFont',\r\n 'json',\r\n 'physics',\r\n 'shader',\r\n 'audio',\r\n 'text',\r\n 'html',\r\n 'obj',\r\n 'tilemap',\r\n 'xml'\r\n ];\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n this[keys[i]].destroy();\r\n this[keys[i]] = null;\r\n }\r\n\r\n for (var key in this.custom)\r\n {\r\n this.custom[key].destroy();\r\n }\r\n\r\n this.custom = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CacheManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/CacheManager.js?")},"./node_modules/phaser/src/cache/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Add Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time a new object is added to it.\r\n *\r\n * @event Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache to which the object was added.\r\n * @param {string} key - The key of the object added to the cache.\r\n * @param {*} object - A reference to the object that was added to the cache.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/ADD_EVENT.js?")},"./node_modules/phaser/src/cache/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Remove Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time an object is removed from it.\r\n *\r\n * @event Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache from which the object was removed.\r\n * @param {string} key - The key of the object removed from the cache.\r\n * @param {*} object - A reference to the object that was removed from the cache.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/cache/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/cache/events/ADD_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/cache/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/index.js?')},"./node_modules/phaser/src/cache/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BaseCache: __webpack_require__(/*! ./BaseCache */ "./node_modules/phaser/src/cache/BaseCache.js"),\r\n CacheManager: __webpack_require__(/*! ./CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/index.js?')},"./node_modules/phaser/src/cameras/2d/BaseCamera.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Camera class.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n * \r\n * The Base Camera is extended by the Camera class, which adds in special effects including Fade,\r\n * Flash and Camera Shake, as well as the ability to follow Game Objects.\r\n * \r\n * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow\r\n * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate\r\n * to when they were added to the Camera class.\r\n *\r\n * @class BaseCamera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.12.0\r\n * \r\n * @extends Phaser.Events.EventEmitter\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar BaseCamera = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function BaseCamera (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene this camera belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Game Scene Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.12.0\r\n */\r\n this.sceneManager;\r\n\r\n /**\r\n * A reference to the Game Scale Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager to which this Camera belongs.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#cameraManager\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.17.0\r\n */\r\n this.cameraManager;\r\n\r\n /**\r\n * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion.\r\n * This value is a bitmask.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.id = 0;\r\n\r\n /**\r\n * The name of the Camera. This is left empty for your own use.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * This property is un-used in v3.16.\r\n * \r\n * The resolution of the Game, used in most Camera calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#resolution\r\n * @type {number}\r\n * @readonly\r\n * @deprecated\r\n * @since 3.12.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Should this camera round its pixel values to integers?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.roundPixels = false;\r\n\r\n /**\r\n * Is this Camera visible or not?\r\n *\r\n * A visible camera will render and perform input tests.\r\n * An invisible camera will not render anything and will skip input tests.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n\r\n /**\r\n * Is this Camera using a bounds to restrict scrolling movement?\r\n *\r\n * Set this property along with the bounds via `Camera.setBounds`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useBounds = false;\r\n\r\n /**\r\n * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at.\r\n * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step.\r\n * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly.\r\n * You can use it for culling or intersection checks.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#worldView\r\n * @type {Phaser.Geom.Rectangle}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.worldView = new Rectangle();\r\n\r\n /**\r\n * Is this Camera dirty?\r\n * \r\n * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame.\r\n * \r\n * This flag is cleared during the `postRenderCamera` method of the renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.11.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._x = x;\r\n\r\n /**\r\n * The y position of the Camera, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._y = y;\r\n\r\n /**\r\n * Internal Camera X value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cx\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cx = 0;\r\n\r\n /**\r\n * Internal Camera Y value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cy\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cy = 0;\r\n\r\n /**\r\n * Internal Camera Width value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cw\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cw = 0;\r\n\r\n /**\r\n * Internal Camera Height value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_ch\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._ch = 0;\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * The bounds the camera is restrained to during scrolling.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollY = 0;\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this._zoom = 1;\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._rotation = 0;\r\n\r\n /**\r\n * A local transform matrix used for internal calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#matrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.matrix = new TransformMatrix();\r\n\r\n /**\r\n * Does this Camera have a transparent background?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#transparent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.transparent = true;\r\n\r\n /**\r\n * The background color of this Camera. Only used if `transparent` is `false`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor\r\n * @type {Phaser.Display.Color}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor = ValueToColor('rgba(0,0,0,0)');\r\n\r\n /**\r\n * The Camera alpha value. Setting this property impacts every single object that this Camera\r\n * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out,\r\n * or via the chainable `setAlpha` method instead.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n\r\n /**\r\n * Should the camera cull Game Objects before checking them for input hit tests?\r\n * In some special cases it may be beneficial to disable this.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.disableCull = false;\r\n\r\n /**\r\n * A temporary array of culled objects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.culledObjects = [];\r\n\r\n /**\r\n * The mid-point of the Camera in 'world' coordinates.\r\n *\r\n * Use it to obtain exactly where in the world the center of the camera is currently looking.\r\n *\r\n * This value is updated in the preRender method, after the scroll values and follower\r\n * have been processed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.midPoint = new Vector2(width / 2, height / 2);\r\n\r\n /**\r\n * The horizontal origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originX = 0.5;\r\n\r\n /**\r\n * The vertical origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originY = 0.5;\r\n\r\n /**\r\n * Does this Camera have a custom viewport?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.12.0\r\n */\r\n this._customViewport = false;\r\n\r\n /**\r\n * The Mask this Camera is using during render.\r\n * Set the mask using the `setMask` method. Remove the mask using the `clearMask` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#mask\r\n * @type {?(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)}\r\n * @since 3.17.0\r\n */\r\n this.mask = null;\r\n\r\n /**\r\n * The Camera that this Camera uses for translation during masking.\r\n * \r\n * If the mask is fixed in position this will be a reference to\r\n * the CameraManager.default instance. Otherwise, it'll be a reference\r\n * to itself.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_maskCamera\r\n * @type {?Phaser.Cameras.Scene2D.BaseCamera}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._maskCamera = null;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha\r\n * @since 3.11.0\r\n *\r\n * @param {number} [value=1] - The Camera alpha value.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Sets the rotation origin of this Camera.\r\n *\r\n * The values are given in the range 0 to 1 and are only used when calculating Camera rotation.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin\r\n * @since 3.11.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates what the Camera.scrollX and scrollY values would need to be in order to move\r\n * the Camera so it is centered on the given x and y coordinates, without actually moving\r\n * the Camera there. The results are clamped based on the Camera bounds, if set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created.\r\n *\r\n * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties.\r\n */\r\n getScroll: function (x, y, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n out.x = x - originX;\r\n out.y = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n out.x = this.clampX(out.x);\r\n out.y = this.clampY(out.y);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Moves the Camera horizontally so that it is centered on the given x coordinate, bounds allowing.\r\n * Calling this does not change the scrollY value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnX\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnX: function (x)\r\n {\r\n var originX = this.width * 0.5;\r\n\r\n this.midPoint.x = x;\r\n\r\n this.scrollX = x - originX;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera vertically so that it is centered on the given y coordinate, bounds allowing.\r\n * Calling this does not change the scrollX value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnY\r\n * @since 3.16.0\r\n *\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnY: function (y)\r\n {\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.y = y;\r\n\r\n this.scrollY = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is centered on the given coordinates, bounds allowing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOn: function (x, y)\r\n {\r\n this.centerOnX(x);\r\n this.centerOnY(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToBounds: function ()\r\n {\r\n if (this.useBounds)\r\n {\r\n var bounds = this._bounds;\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.set(bounds.centerX, bounds.centerY);\r\n\r\n this.scrollX = bounds.centerX - originX;\r\n this.scrollY = bounds.centerY - originY;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is re-centered based on its viewport size.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToSize: function ()\r\n {\r\n this.scrollX = this.width * 0.5;\r\n this.scrollY = this.height * 0.5;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects and returns a new array featuring only those objects\r\n * visible by this camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#cull\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera.\r\n */\r\n cull: function (renderableObjects)\r\n {\r\n if (this.disableCull)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n\r\n /* First Invert Matrix */\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n var cameraW = this.width;\r\n var cameraH = this.height;\r\n var culledObjects = this.culledObjects;\r\n var length = renderableObjects.length;\r\n\r\n determinant = 1 / determinant;\r\n\r\n culledObjects.length = 0;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n var object = renderableObjects[index];\r\n\r\n if (!object.hasOwnProperty('width') || object.parentContainer)\r\n {\r\n culledObjects.push(object);\r\n continue;\r\n }\r\n\r\n var objectW = object.width;\r\n var objectH = object.height;\r\n var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX);\r\n var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY);\r\n var tx = (objectX * mva + objectY * mvc + mve);\r\n var ty = (objectX * mvb + objectY * mvd + mvf);\r\n var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve);\r\n var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf);\r\n var cullTop = this.y;\r\n var cullBottom = cullTop + cameraH;\r\n var cullLeft = this.x;\r\n var cullRight = cullLeft + cameraW;\r\n\r\n if ((tw > cullLeft && tx < cullRight) && (th > cullTop && ty < cullBottom))\r\n {\r\n culledObjects.push(object);\r\n }\r\n }\r\n\r\n return culledObjects;\r\n },\r\n\r\n /**\r\n * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform.\r\n * You can optionally provide a Vector2, or similar object, to store the results in.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {number} x - The x position to convert to world space.\r\n * @param {number} y - The y position to convert to world space.\r\n * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties.\r\n */\r\n getWorldPoint: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n // Invert Matrix\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n output.x = x;\r\n output.y = y;\r\n\r\n return output;\r\n }\r\n\r\n determinant = 1 / determinant;\r\n\r\n var ima = mvd * determinant;\r\n var imb = -mvb * determinant;\r\n var imc = -mvc * determinant;\r\n var imd = mva * determinant;\r\n var ime = (mvc * mvf - mvd * mve) * determinant;\r\n var imf = (mvb * mve - mva * mvf) * determinant;\r\n\r\n var c = Math.cos(this.rotation);\r\n var s = Math.sin(this.rotation);\r\n\r\n var zoom = this.zoom;\r\n var res = this.resolution;\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n\r\n // Works for zoom of 1 with any resolution, but resolution > 1 and zoom !== 1 breaks\r\n var sx = x + ((scrollX * c - scrollY * s) * zoom);\r\n var sy = y + ((scrollX * s + scrollY * c) * zoom);\r\n\r\n // Apply transform to point\r\n output.x = (sx * ima + sy * imc) * res + ime;\r\n output.y = (sx * imb + sy * imd) * res + imf;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings\r\n * so that they are ignored by this Camera. This means they will not be rendered by this Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#ignore\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n ignore: function (entries)\r\n {\r\n var id = this.id;\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n for (var i = 0; i < entries.length; i++)\r\n {\r\n var entry = entries[i];\r\n\r\n if (Array.isArray(entry))\r\n {\r\n this.ignore(entry);\r\n }\r\n else if (entry.isParent)\r\n {\r\n this.ignore(entry.getChildren());\r\n }\r\n else\r\n {\r\n entry.cameraFilter |= id;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it's looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n },\r\n\r\n /**\r\n * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampX\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The value to horizontally scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollX.\r\n */\r\n clampX: function (x)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dw = this.displayWidth;\r\n\r\n var bx = bounds.x + ((dw - this.width) / 2);\r\n var bw = Math.max(bx, bx + bounds.width - dw);\r\n\r\n if (x < bx)\r\n {\r\n x = bx;\r\n }\r\n else if (x > bw)\r\n {\r\n x = bw;\r\n }\r\n\r\n return x;\r\n },\r\n\r\n /**\r\n * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampY\r\n * @since 3.11.0\r\n *\r\n * @param {number} y - The value to vertically scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollY.\r\n */\r\n clampY: function (y)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dh = this.displayHeight;\r\n\r\n var by = bounds.y + ((dh - this.height) / 2);\r\n var bh = Math.max(by, by + bounds.height - dh);\r\n\r\n if (y < by)\r\n {\r\n y = by;\r\n }\r\n else if (y > bh)\r\n {\r\n y = bh;\r\n }\r\n\r\n return y;\r\n },\r\n\r\n /*\r\n var gap = this._zoomInversed;\r\n return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap);\r\n */\r\n\r\n /**\r\n * If this Camera has previously had movement bounds set on it, this will remove them.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n removeBounds: function ()\r\n {\r\n this.useBounds = false;\r\n\r\n this.dirty = true;\r\n\r\n this._bounds.setEmpty();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The cameras angle of rotation, given in degrees.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setAngle: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = DegToRad(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the background color for this Camera.\r\n *\r\n * By default a Camera has a transparent background but it can be given a solid color, with any level\r\n * of transparency, via this method.\r\n *\r\n * The color value can be specified using CSS color notation, hex or numbers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n if (color === undefined) { color = 'rgba(0,0,0,0)'; }\r\n\r\n this.backgroundColor = ValueToColor(color);\r\n\r\n this.transparent = (this.backgroundColor.alpha === 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the bounds of the Camera. The bounds are an axis-aligned rectangle.\r\n * \r\n * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the\r\n * edges and into blank space. It does not limit the placement of Game Objects, or where\r\n * the Camera viewport can be positioned.\r\n * \r\n * Temporarily disable the bounds by changing the boolean `Camera.useBounds`.\r\n * \r\n * Clear the bounds entirely by calling `Camera.removeBounds`.\r\n * \r\n * If you set bounds that are smaller than the viewport it will stop the Camera from being\r\n * able to scroll. The bounds can be positioned where-ever you wish. By default they are from\r\n * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of\r\n * the Camera bounds. However, you can position them anywhere. So if you wanted a game world\r\n * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y\r\n * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find\r\n * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The top-left x coordinate of the bounds.\r\n * @param {integer} y - The top-left y coordinate of the bounds.\r\n * @param {integer} width - The width of the bounds, in pixels.\r\n * @param {integer} height - The height of the bounds, in pixels.\r\n * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBounds: function (x, y, width, height, centerOn)\r\n {\r\n if (centerOn === undefined) { centerOn = false; }\r\n\r\n this._bounds.setTo(x, y, width, height);\r\n\r\n this.dirty = true;\r\n this.useBounds = true;\r\n\r\n if (centerOn)\r\n {\r\n this.centerToBounds();\r\n }\r\n else\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a rectangle containing the bounds of the Camera.\r\n * \r\n * If the Camera does not have any bounds the rectangle will be empty.\r\n * \r\n * The rectangle is a copy of the bounds, so is safe to modify.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getBounds\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - An optional Rectangle to store the bounds in. If not given, a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle containing the bounds of this Camera.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var source = this._bounds;\r\n\r\n out.setTo(source.x, source.y, source.width, source.height);\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Sets the name of this Camera.\r\n * This value is for your own use and isn't used internally.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} [value=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setName: function (value)\r\n {\r\n if (value === undefined) { value = ''; }\r\n\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the Camera viewport within the game.\r\n *\r\n * This does not change where the camera is 'looking'. See `setScroll` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} [y=x] - The top-left y coordinate of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The rotation of the Camera, in radians.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRotation: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Should the Camera round pixel values to whole integers when rendering Game Objects?\r\n * \r\n * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to round Camera pixels, `false` to not.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRoundPixels: function (value)\r\n {\r\n this.roundPixels = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Scene the Camera is bound to.\r\n * \r\n * Also populates the `resolution` property and updates the internal size values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene the camera is bound to.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScene: function (scene)\r\n {\r\n if (this.scene && this._customViewport)\r\n {\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this.scene = scene;\r\n\r\n var sys = scene.sys;\r\n\r\n this.sceneManager = sys.game.scene;\r\n this.scaleManager = sys.scale;\r\n this.cameraManager = sys.cameras;\r\n\r\n var res = this.scaleManager.resolution;\r\n\r\n this.resolution = res;\r\n\r\n this._cx = this._x * res;\r\n this._cy = this._y * res;\r\n this._cw = this._width * res;\r\n this._ch = this._height * res;\r\n\r\n this.updateSystem();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of where the Camera is looking within the game.\r\n * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.\r\n * Use this method, or the scroll properties, to move your camera around the game world.\r\n *\r\n * This does not change where the camera viewport is placed. See `setPosition` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the Camera in the game world.\r\n * @param {number} [y=x] - The y coordinate of the Camera in the game world.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScroll: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollX = x;\r\n this.scrollY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the size of the Camera viewport.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method sets the position and size of the Camera viewport in a single call.\r\n *\r\n * If you're trying to change where the Camera is looking at in your game, then see\r\n * the method `Camera.setScroll` instead. This method is for changing the viewport\r\n * itself, not what the camera can see.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} y - The top-left y coordinate of the Camera viewport.\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setViewport: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the zoom value of the Camera.\r\n *\r\n * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'.\r\n * Changing to a larger value, such as 2, will cause the camera to 'zoom in'.\r\n *\r\n * A value of 1 means 'no zoom' and is the default.\r\n *\r\n * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (value === 0)\r\n {\r\n value = 0.001;\r\n }\r\n\r\n this.zoom = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mask to be applied to this Camera during rendering.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * \r\n * Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Camera it will be immediately replaced.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n * \r\n * Note: You cannot mask a Camera that has `renderToTexture` set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setMask\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)} mask - The mask this Camera will use when rendering.\r\n * @param {boolean} [fixedPosition=true] - Should the mask translate along with the Camera, or be fixed in place and not impacted by the Cameras transform?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setMask: function (mask, fixedPosition)\r\n {\r\n if (fixedPosition === undefined) { fixedPosition = true; }\r\n\r\n this.mask = mask;\r\n\r\n this._maskCamera = (fixedPosition) ? this.cameraManager.default : this;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Camera was using.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clearMask\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Camera.\r\n *\r\n * An invisible Camera will skip rendering and input tests of everything it can see.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible\r\n * @since 3.10.0\r\n *\r\n * @param {boolean} value - The visible state of the Camera.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Cameras.Scene2D.JSONCamera} A well-formed object suitable for conversion to JSON.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n zoom: this.zoom,\r\n rotation: this.rotation,\r\n roundPixels: this.roundPixels,\r\n scrollX: this.scrollX,\r\n scrollY: this.scrollY,\r\n backgroundColor: this.backgroundColor.rgba\r\n };\r\n\r\n if (this.useBounds)\r\n {\r\n output['bounds'] = {\r\n x: this._bounds.x,\r\n y: this._bounds.y,\r\n width: this._bounds.width,\r\n height: this._bounds.height\r\n };\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Internal method called automatically when the viewport changes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateSystem: function ()\r\n {\r\n if (!this.scaleManager)\r\n {\r\n return;\r\n }\r\n\r\n var custom = (this._x !== 0 || this._y !== 0 || this.scaleManager.width !== this._width || this.scaleManager.height !== this._height);\r\n\r\n var sceneManager = this.sceneManager;\r\n\r\n if (custom && !this._customViewport)\r\n {\r\n // We need a custom viewport for this Camera\r\n sceneManager.customViewports++;\r\n }\r\n else if (!custom && this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n sceneManager.customViewports--;\r\n }\r\n\r\n this.dirty = true;\r\n this._customViewport = custom;\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance and its internal properties and references.\r\n * Once destroyed you cannot use this Camera again, even if re-added to a Camera Manager.\r\n * \r\n * This method is called automatically by `CameraManager.remove` if that methods `runDestroy` argument is `true`, which is the default.\r\n * \r\n * Unless you have a specific reason otherwise, always use `CameraManager.remove` and allow it to handle the camera destruction,\r\n * rather than calling this method directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.emit(Events.DESTROY, this);\r\n\r\n this.removeAllListeners();\r\n\r\n this.matrix.destroy();\r\n\r\n this.culledObjects = [];\r\n\r\n if (this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this._bounds = null;\r\n\r\n this.scene = null;\r\n this.scaleManager = null;\r\n this.sceneManager = null;\r\n this.cameraManager = null;\r\n },\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n this._cx = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n this._cy = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._width = value;\r\n this._cw = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._height = value;\r\n this._ch = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollX: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollX = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollY: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollY = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#zoom\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal position of the center of the Camera's viewport, relative to the left of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (0.5 * this.width);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical position of the center of the Camera's viewport, relative to the top of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (0.5 * this.height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed width of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width\r\n * would be 1600, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a width of 800 and zoom of 2 would have a display width\r\n * of 400 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.width / this.zoom;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height\r\n * would be 1200, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a height of 600 and zoom of 2 would have a display height\r\n * of 300 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.height / this.zoom;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/BaseCamera.js?")},"./node_modules/phaser/src/cameras/2d/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ./BaseCamera */ "./node_modules/phaser/src/cameras/2d/BaseCamera.js");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CenterOn = __webpack_require__(/*! ../../geom/rectangle/CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Effects = __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js");\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you\'d adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash and Camera Shake.\r\n *\r\n * @class Camera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Cameras.Scene2D.BaseCamera\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Tint\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar Camera = new Class({\r\n\r\n Extends: BaseCamera,\r\n\r\n Mixins: [\r\n Components.Flip,\r\n Components.Tint\r\n ],\r\n\r\n initialize:\r\n\r\n function Camera (x, y, width, height)\r\n {\r\n BaseCamera.call(this, x, y, width, height);\r\n\r\n /**\r\n * Does this Camera allow the Game Objects it renders to receive input events?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#inputEnabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inputEnabled = true;\r\n\r\n /**\r\n * The Camera Fade effect handler.\r\n * To fade this camera see the `Camera.fade` methods.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#fadeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Fade}\r\n * @since 3.5.0\r\n */\r\n this.fadeEffect = new Effects.Fade(this);\r\n\r\n /**\r\n * The Camera Flash effect handler.\r\n * To flash this camera see the `Camera.flash` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#flashEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Flash}\r\n * @since 3.5.0\r\n */\r\n this.flashEffect = new Effects.Flash(this);\r\n\r\n /**\r\n * The Camera Shake effect handler.\r\n * To shake this camera see the `Camera.shake` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#shakeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Shake}\r\n * @since 3.5.0\r\n */\r\n this.shakeEffect = new Effects.Shake(this);\r\n\r\n /**\r\n * The Camera Pan effect handler.\r\n * To pan this camera see the `Camera.pan` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#panEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Pan}\r\n * @since 3.11.0\r\n */\r\n this.panEffect = new Effects.Pan(this);\r\n\r\n /**\r\n * The Camera Zoom effect handler.\r\n * To zoom this camera see the `Camera.zoom` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#zoomEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Zoom}\r\n * @since 3.11.0\r\n */\r\n this.zoomEffect = new Effects.Zoom(this);\r\n\r\n /**\r\n * The linear interpolation value to use when following a target.\r\n *\r\n * Can also be set via `setLerp` or as part of the `startFollow` call.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#lerp\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.lerp = new Vector2(1, 1);\r\n\r\n /**\r\n * The values stored in this property are subtracted from the Camera targets position, allowing you to\r\n * offset the camera from the actual target x/y coordinates by this amount.\r\n * Can also be set via `setFollowOffset` or as part of the `startFollow` call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * The Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * You can directly set this property to be an instance of a Rectangle. Or, you can use the\r\n * `setDeadzone` method for a chainable approach.\r\n *\r\n * The rectangle you provide can have its dimensions adjusted dynamically, however, please\r\n * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point.\r\n *\r\n * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property\r\n * to `null`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#deadzone\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @since 3.11.0\r\n */\r\n this.deadzone = null;\r\n\r\n /**\r\n * Internal follow target reference.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#_follow\r\n * @type {?any}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this._follow = null;\r\n\r\n /**\r\n * Is this Camera rendering directly to the canvas or to a texture?\r\n *\r\n * Enable rendering to texture with the method `setRenderToTexture` (just enabling this boolean won\'t be enough)\r\n *\r\n * Once enabled you can toggle it by switching this property.\r\n *\r\n * To properly remove a render texture you should call the `clearRenderToTexture()` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#renderToTexture\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the HTML Canvas Element that the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.13.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the Rendering Context belonging to the Canvas element the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.13.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Texture belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.13.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Frame Buffer belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.13.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture and to use a custom pipeline,\r\n * then this holds a reference to the pipeline the Camera is drawing with.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#pipeline\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.pipeline = null;\r\n },\r\n\r\n /**\r\n * Sets the Camera to render to a texture instead of to the main canvas.\r\n *\r\n * The Camera will redirect all Game Objects it\'s asked to render to this texture.\r\n *\r\n * During the render sequence, the texture itself will then be rendered to the main canvas.\r\n *\r\n * Doing this gives you the ability to modify the texture before this happens,\r\n * allowing for special effects such as Camera specific shaders, or post-processing\r\n * on the texture.\r\n *\r\n * If running under Canvas the Camera will render to its `canvas` property.\r\n *\r\n * If running under WebGL the Camera will create a frame buffer, which is stored in its `framebuffer` and `glTexture` properties.\r\n *\r\n * If you set a camera to render to a texture then it will emit 2 events during the render loop:\r\n *\r\n * First, it will emit the event `prerender`. This happens right before any Game Object\'s are drawn to the Camera texture.\r\n *\r\n * Then, it will emit the event `postrender`. This happens after all Game Object\'s have been drawn, but right before the\r\n * Camera texture is rendered to the main game canvas. It\'s the final point at which you can manipulate the texture before\r\n * it appears in-game.\r\n *\r\n * You should not enable this unless you plan on actually using the texture it creates\r\n * somehow, otherwise you\'re just doubling the work required to render your game.\r\n *\r\n * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean.\r\n *\r\n * If you no longer require the Camera to render to a texture, call the `clearRenderToTexture` method,\r\n * which will delete the respective textures and free-up resources.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setRenderToTexture: function (pipeline)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl)\r\n {\r\n this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0);\r\n this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false);\r\n }\r\n else\r\n {\r\n this.canvas = CanvasPool.create2D(this, this.width, this.height);\r\n this.context = this.canvas.getContext(\'2d\');\r\n }\r\n\r\n this.renderToTexture = true;\r\n\r\n if (pipeline)\r\n {\r\n this.setPipeline(pipeline);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the WebGL pipeline this Camera is using when rendering to a texture.\r\n *\r\n * You can pass either the string-based name of the pipeline, or a reference to the pipeline itself.\r\n *\r\n * Call this method with no arguments to clear any previously set pipeline.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setPipeline\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setPipeline: function (pipeline)\r\n {\r\n if (typeof pipeline === \'string\')\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl && renderer.hasPipeline(pipeline))\r\n {\r\n this.pipeline = renderer.getPipeline(pipeline);\r\n }\r\n }\r\n else\r\n {\r\n this.pipeline = pipeline;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Camera was set to render to a texture, this will clear the resources it was using and\r\n * redirect it to render back to the primary Canvas again.\r\n *\r\n * If you only wish to temporarily disable rendering to a texture then you can toggle the\r\n * property `renderToTexture` instead.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n clearRenderToTexture: function ()\r\n {\r\n if (!this.scene)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return;\r\n }\r\n\r\n if (renderer.gl)\r\n {\r\n if (this.framebuffer)\r\n {\r\n renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n if (this.glTexture)\r\n {\r\n renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.pipeline = null;\r\n }\r\n else\r\n {\r\n CanvasPool.remove(this);\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n }\r\n\r\n this.renderToTexture = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point\r\n * of the camera. This allows you to use the object for additional game related checks, such as\r\n * testing if an object is within it or not via a Rectangle.contains call.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * Calling this method with no arguments will reset an active deadzone.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setDeadzone\r\n * @since 3.11.0\r\n *\r\n * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed.\r\n * @param {number} [height] - The height of the deadzone rectangle in pixels.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setDeadzone: function (width, height)\r\n {\r\n if (width === undefined)\r\n {\r\n this.deadzone = null;\r\n }\r\n else\r\n {\r\n if (this.deadzone)\r\n {\r\n this.deadzone.width = width;\r\n this.deadzone.height = height;\r\n }\r\n else\r\n {\r\n this.deadzone = new Rectangle(0, 0, width, height);\r\n }\r\n\r\n if (this._follow)\r\n {\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = this._follow.x - this.followOffset.x;\r\n var fy = this._follow.y - this.followOffset.y;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n }\r\n\r\n CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fades the Camera in from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeIn\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeIn: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera out to the given color over the duration specified.\r\n * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeOut\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeOut: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from the given color to transparent over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeFrom\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeFrom: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from transparent to the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fade\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fade: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#flash\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n flash: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.flashEffect.start(duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#shake\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n shake: function (duration, intensity, force, callback, context)\r\n {\r\n return this.shakeEffect.start(duration, intensity, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#pan\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n pan: function (x, y, duration, ease, force, callback, context)\r\n {\r\n return this.panEffect.start(x, y, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#zoomTo\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n zoomTo: function (zoom, duration, ease, force, callback, context)\r\n {\r\n return this.zoomEffect.start(zoom, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var follow = this._follow;\r\n var deadzone = this.deadzone;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (deadzone)\r\n {\r\n CenterOn(deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n if (follow && !this.panEffect.isRunning)\r\n {\r\n var fx = (follow.x - this.followOffset.x);\r\n var fy = (follow.y - this.followOffset.y);\r\n\r\n if (deadzone)\r\n {\r\n if (fx < deadzone.x)\r\n {\r\n sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x);\r\n }\r\n else if (fx > deadzone.right)\r\n {\r\n sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x);\r\n }\r\n\r\n if (fy < deadzone.y)\r\n {\r\n sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y);\r\n }\r\n else if (fy > deadzone.bottom)\r\n {\r\n sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y);\r\n }\r\n }\r\n else\r\n {\r\n sx = Linear(sx, fx - originX, this.lerp.x);\r\n sy = Linear(sy, fy - originY, this.lerp.y);\r\n }\r\n }\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it\'s looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n\r\n this.shakeEffect.preRender();\r\n },\r\n\r\n /**\r\n * Sets the linear interpolation value to use when following a target.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setLerp\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target.\r\n * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setLerp: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.lerp.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical offset of the camera from its follow target.\r\n * The values are subtracted from the targets position during the Cameras update step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [y=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setFollowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.followOffset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera to follow a Game Object.\r\n *\r\n * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object\r\n * in its center.\r\n *\r\n * You can set the linear interpolation value used in the follow code.\r\n * Use low lerp values (such as 0.1) to automatically smooth the camera motion.\r\n *\r\n * If you find you\'re getting a slight "jitter" effect when following an object it\'s probably to do with sub-pixel\r\n * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to\r\n * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom\r\n * value on the camera. So be sure to keep the camera zoom to integers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow.\r\n * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering?\r\n * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY)\r\n {\r\n if (roundPixels === undefined) { roundPixels = false; }\r\n if (lerpX === undefined) { lerpX = 1; }\r\n if (lerpY === undefined) { lerpY = lerpX; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = offsetX; }\r\n\r\n this._follow = target;\r\n\r\n this.roundPixels = roundPixels;\r\n\r\n lerpX = Clamp(lerpX, 0, 1);\r\n lerpY = Clamp(lerpY, 0, 1);\r\n\r\n this.lerp.set(lerpX, lerpY);\r\n\r\n this.followOffset.set(offsetX, offsetY);\r\n\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = target.x - offsetX;\r\n var fy = target.y - offsetY;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n stopFollow: function ()\r\n {\r\n this._follow = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to\r\n * remove the fade.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#resetFX\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n resetFX: function ()\r\n {\r\n this.panEffect.reset();\r\n this.shakeEffect.reset();\r\n this.flashEffect.reset();\r\n this.fadeEffect.reset();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.visible)\r\n {\r\n this.panEffect.update(time, delta);\r\n this.zoomEffect.update(time, delta);\r\n this.shakeEffect.update(time, delta);\r\n this.flashEffect.update(time, delta);\r\n this.fadeEffect.update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance. You rarely need to call this directly.\r\n *\r\n * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as\r\n * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clearRenderToTexture();\r\n\r\n this.resetFX();\r\n\r\n BaseCamera.prototype.destroy.call(this);\r\n\r\n this._follow = null;\r\n\r\n this.deadzone = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/Camera.js?')},"./node_modules/phaser/src/cameras/2d/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ \"./node_modules/phaser/src/cameras/2d/Camera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras.\r\n * \r\n * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed\r\n * in your game config.\r\n * \r\n * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add\r\n * the new Camera in using the `addExisting` method.\r\n * \r\n * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique \r\n * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of\r\n * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore\r\n * Game Objects, make sure it's one of the first 31 created.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash, Camera Shake, Pan and Zoom.\r\n *\r\n * @class CameraManager\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns the Camera Manager plugin.\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * The Scene that owns the Camera Manager plugin.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems handler for the Scene that owns the Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * All Cameras created by, or added to, this Camera Manager, will have their `roundPixels`\r\n * property set to match this value. By default it is set to match the value set in the\r\n * game configuration, but can be changed at any point. Equally, individual cameras can\r\n * also be changed as needed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#roundPixels\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.roundPixels = scene.sys.game.config.roundPixels;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n * The Cameras are updated and rendered in the same order in which they appear in this array.\r\n * Do not directly add or remove entries to this array. However, you can move the contents\r\n * around the array should you wish to adjust the display order.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Scene2D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n /**\r\n * A handy reference to the 'main' camera. By default this is the first Camera the\r\n * Camera Manager creates. You can also set it directly, or use the `makeMain` argument\r\n * in the `add` and `addExisting` methods. It allows you to access it from your game:\r\n * \r\n * ```javascript\r\n * var cam = this.cameras.main;\r\n * ```\r\n * \r\n * Also see the properties `camera1`, `camera2` and so on.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#main\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.main;\r\n\r\n /**\r\n * A default un-transformed Camera that doesn't exist on the camera list and doesn't\r\n * count towards the total number of cameras being managed. It exists for other\r\n * systems, as well as your own code, should they require a basic un-transformed\r\n * camera instance from which to calculate a view matrix.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#default\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.17.0\r\n */\r\n this.default;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#boot\r\n * @private\r\n * @listens Phaser.Scenes.Events#DESTROY\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n\r\n this.main = this.cameras[0];\r\n\r\n // Create a default camera\r\n this.default = new Camera(0, 0, sys.scale.width, sys.scale.height).setScene(this.scene);\r\n\r\n sys.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#start\r\n * @private\r\n * @listens Phaser.Scenes.Events#UPDATE\r\n * @listens Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.main)\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n \r\n this.main = this.cameras[0];\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras.\r\n * \r\n * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas.\r\n * \r\n * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the\r\n * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake,\r\n * pan and zoom.\r\n * \r\n * By default Cameras are transparent and will render anything that they can see based on their `scrollX`\r\n * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after creation if required.\r\n * \r\n * See the Camera class documentation for more details.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [x=0] - The horizontal position of the Camera viewport.\r\n * @param {integer} [y=0] - The vertical position of the Camera viewport.\r\n * @param {integer} [width] - The width of the Camera viewport. If not given it'll be the game config size.\r\n * @param {integer} [height] - The height of the Camera viewport. If not given it'll be the game config size.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n * @param {string} [name=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The newly created Camera.\r\n */\r\n add: function (x, y, width, height, makeMain, name)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (makeMain === undefined) { makeMain = false; }\r\n if (name === undefined) { name = ''; }\r\n\r\n var camera = new Camera(x, y, width, height);\r\n\r\n camera.setName(name);\r\n camera.setScene(this.scene);\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n camera.id = this.getNextID();\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * Adds an existing Camera into the Camera Manager.\r\n * \r\n * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after addition if required.\r\n * \r\n * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the\r\n * manager. As long as it doesn't already exist in the manager it will be added then returned.\r\n * \r\n * If this method returns `null` then the Camera already exists in this Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#addExisting\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to be added to the Camera Manager.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The Camera that was added to the Camera Manager, or `null` if it couldn't be added.\r\n */\r\n addExisting: function (camera, makeMain)\r\n {\r\n if (makeMain === undefined) { makeMain = false; }\r\n\r\n var index = this.cameras.indexOf(camera);\r\n\r\n if (index === -1)\r\n {\r\n camera.id = this.getNextID();\r\n\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n \r\n return camera;\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the next available Camera ID number.\r\n * \r\n * The Camera Manager supports up to 31 unique cameras, after which the ID returned will always be zero.\r\n * You can create additional cameras beyond 31, but they cannot be used for Game Object exclusion.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getNextID\r\n * @private\r\n * @since 3.11.0\r\n *\r\n * @return {number} The next available Camera ID, or 0 if they're all already in use.\r\n */\r\n getNextID: function ()\r\n {\r\n var cameras = this.cameras;\r\n\r\n var testID = 1;\r\n\r\n // Find the first free camera ID we can use\r\n\r\n for (var t = 0; t < 32; t++)\r\n {\r\n var found = false;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera && camera.id === testID)\r\n {\r\n found = true;\r\n continue;\r\n }\r\n }\r\n\r\n if (found)\r\n {\r\n testID = testID << 1;\r\n }\r\n else\r\n {\r\n return testID;\r\n }\r\n }\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * Gets the total number of Cameras in this Camera Manager.\r\n * \r\n * If the optional `isVisible` argument is set it will only count Cameras that are currently visible.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getTotal\r\n * @since 3.11.0\r\n * \r\n * @param {boolean} [isVisible=false] - Set the `true` to only include visible Cameras in the total.\r\n *\r\n * @return {integer} The total number of Cameras in this Camera Manager.\r\n */\r\n getTotal: function (isVisible)\r\n {\r\n if (isVisible === undefined) { isVisible = false; }\r\n\r\n var total = 0;\r\n\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (!isVisible || (isVisible && camera.visible))\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Populates this Camera Manager based on the given configuration object, or an array of config objects.\r\n * \r\n * See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var gameWidth = this.scene.sys.scale.width;\r\n var gameHeight = this.scene.sys.scale.height;\r\n\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var cameraConfig = config[i];\r\n\r\n var x = GetFastValue(cameraConfig, 'x', 0);\r\n var y = GetFastValue(cameraConfig, 'y', 0);\r\n var width = GetFastValue(cameraConfig, 'width', gameWidth);\r\n var height = GetFastValue(cameraConfig, 'height', gameHeight);\r\n\r\n var camera = this.add(x, y, width, height);\r\n\r\n // Direct properties\r\n camera.name = GetFastValue(cameraConfig, 'name', '');\r\n camera.zoom = GetFastValue(cameraConfig, 'zoom', 1);\r\n camera.rotation = GetFastValue(cameraConfig, 'rotation', 0);\r\n camera.scrollX = GetFastValue(cameraConfig, 'scrollX', 0);\r\n camera.scrollY = GetFastValue(cameraConfig, 'scrollY', 0);\r\n camera.roundPixels = GetFastValue(cameraConfig, 'roundPixels', false);\r\n camera.visible = GetFastValue(cameraConfig, 'visible', true);\r\n\r\n // Background Color\r\n\r\n var backgroundColor = GetFastValue(cameraConfig, 'backgroundColor', false);\r\n\r\n if (backgroundColor)\r\n {\r\n camera.setBackgroundColor(backgroundColor);\r\n }\r\n\r\n // Bounds\r\n\r\n var boundsConfig = GetFastValue(cameraConfig, 'bounds', null);\r\n\r\n if (boundsConfig)\r\n {\r\n var bx = GetFastValue(boundsConfig, 'x', 0);\r\n var by = GetFastValue(boundsConfig, 'y', 0);\r\n var bwidth = GetFastValue(boundsConfig, 'width', gameWidth);\r\n var bheight = GetFastValue(boundsConfig, 'height', gameHeight);\r\n\r\n camera.setBounds(bx, by, bwidth, bheight);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Camera based on its name.\r\n * \r\n * Camera names are optional and don't have to be set, so this method is only of any use if you\r\n * have given your Cameras unique names.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Camera.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The first Camera with a name matching the given string, otherwise `null`.\r\n */\r\n getCamera: function (name)\r\n {\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n if (cameras[i].name === name)\r\n {\r\n return cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns an array of all cameras below the given Pointer.\r\n * \r\n * The first camera in the array is the top-most camera in the camera list.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamerasBelowPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera[]} An array of cameras below the Pointer.\r\n */\r\n getCamerasBelowPointer: function (pointer)\r\n {\r\n var cameras = this.cameras;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.inputEnabled && RectangleContains(camera, x, y))\r\n {\r\n // So the top-most camera is at the top of the search array\r\n output.unshift(camera);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Removes the given Camera, or an array of Cameras, from this Camera Manager.\r\n * \r\n * If found in the Camera Manager it will be immediately removed from the local cameras array.\r\n * If also currently the 'main' camera, 'main' will be reset to be camera 0.\r\n * \r\n * The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default.\r\n * If you wish to re-use the cameras then set this to `false`, but know that they will retain their references\r\n * and internal data until destroyed or re-added to a Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Scene2D.Camera|Phaser.Cameras.Scene2D.Camera[])} camera - The Camera, or an array of Cameras, to be removed from this Camera Manager.\r\n * @param {boolean} [runDestroy=true] - Automatically call `Camera.destroy` on each Camera removed from this Camera Manager.\r\n * \r\n * @return {integer} The total number of Cameras removed.\r\n */\r\n remove: function (camera, runDestroy)\r\n {\r\n if (runDestroy === undefined) { runDestroy = true; }\r\n\r\n if (!Array.isArray(camera))\r\n {\r\n camera = [ camera ];\r\n }\r\n\r\n var total = 0;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < camera.length; i++)\r\n {\r\n var index = cameras.indexOf(camera[i]);\r\n\r\n if (index !== -1)\r\n {\r\n if (runDestroy)\r\n {\r\n cameras[index].destroy();\r\n }\r\n\r\n cameras.splice(index, 1);\r\n\r\n total++;\r\n }\r\n }\r\n\r\n if (!this.main && cameras[0])\r\n {\r\n this.main = cameras[0];\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * The internal render method. This is called automatically by the Scene and should not be invoked directly.\r\n * \r\n * It will iterate through all local cameras and render them in turn, as long as they're visible and have\r\n * an alpha level > 0.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#render\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera.\r\n * @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.\r\n * @param {number} interpolation - Interpolation value. Reserved for future use.\r\n */\r\n render: function (renderer, children, interpolation)\r\n {\r\n var scene = this.scene;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.alpha > 0)\r\n {\r\n // Hard-coded to 1 for now\r\n camera.preRender(1);\r\n\r\n renderer.render(scene, children, interpolation, camera);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets this Camera Manager.\r\n * \r\n * This will iterate through all current Cameras, destroying them all, then it will reset the\r\n * cameras array, reset the ID counter and create 1 new single camera using the default values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resetAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The freshly created main Camera.\r\n */\r\n resetAll: function ()\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n this.main = this.add();\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * The main update loop. Called automatically when the Scene steps.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#onResize\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution, previousWidth, previousHeight)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var cam = this.cameras[i];\r\n\r\n // if camera is at 0x0 and was the size of the previous game size, then we can safely assume it\r\n // should be updated to match the new game size too\r\n\r\n if (cam._x === 0 && cam._y === 0 && cam._width === previousWidth && cam._height === previousHeight)\r\n {\r\n cam.setSize(baseSize.width, baseSize.height);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resizes all cameras to the given dimensions.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resize\r\n * @since 3.2.0\r\n *\r\n * @param {number} width - The new width of the camera.\r\n * @param {number} height - The new height of the camera.\r\n */\r\n resize: function (width, height)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].setSize(width, height);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.main = undefined;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.default.destroy();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager', CameraManager, 'cameras');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/CameraManager.js?")},"./node_modules/phaser/src/cameras/2d/effects/Fade.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Fade effect.\r\n *\r\n * This effect will fade the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is faded. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Fade\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Fade = new Class({\r\n\r\n initialize:\r\n\r\n function Fade (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * Has this effect finished running?\r\n *\r\n * This is different from `isRunning` because it remains set to `true` when the effect is over,\r\n * until the effect is either reset or started again.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isComplete\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isComplete = false;\r\n\r\n /**\r\n * The direction of the fade.\r\n * `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#direction\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.direction = true;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFadeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Fades the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.5.0\r\n *\r\n * @param {boolean} [direction=true] - The direction of the fade. `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFadeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (direction, duration, red, green, blue, force, callback, context)\r\n {\r\n if (direction === undefined) { direction = true; }\r\n if (duration === undefined) { duration = 1000; }\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.isComplete = false;\r\n this.duration = duration;\r\n this.direction = direction;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = (direction) ? Number.MIN_VALUE : 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n var eventName = (direction) ? Events.FADE_OUT_START : Events.FADE_IN_START;\r\n\r\n this.camera.emit(eventName, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = (this.direction) ? this.progress : 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.alpha = (this.direction) ? 1 : 0;\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n this.isComplete = true;\r\n\r\n var eventName = (this.direction) ? Events.FADE_OUT_COMPLETE : Events.FADE_IN_COMPLETE;\r\n\r\n this.camera.emit(eventName, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n this.isComplete = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Fade;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Fade.js?")},"./node_modules/phaser/src/cameras/2d/effects/Flash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Flash effect.\r\n *\r\n * This effect will flash the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is flashed. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Flash\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Flash = new Class({\r\n\r\n initialize:\r\n\r\n function Flash (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFlashCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Flashes the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFlashCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, red, green, blue, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 250; }\r\n if (red === undefined) { red = 255; }\r\n if (green === undefined) { green = 255; }\r\n if (blue === undefined) { blue = 255; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.FLASH_START, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.FLASH_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Flash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Flash.js?")},"./node_modules/phaser/src/cameras/2d/effects/Pan.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Pan effect.\r\n *\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * Only the camera scroll is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Pan\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Pan = new Class({\r\n\r\n initialize:\r\n\r\n function Pan (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting scroll coordinates to pan the camera from.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#source\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.source = new Vector2();\r\n\r\n /**\r\n * The constantly updated value based on zoom.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#current\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.current = new Vector2();\r\n\r\n /**\r\n * The destination scroll coordinates to pan the camera to.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#destination\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.destination = new Vector2();\r\n\r\n /**\r\n * The ease function to use during the pan.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraPanCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#start\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (x, y, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source.set(cam.scrollX, cam.scrollY);\r\n\r\n // Destination\r\n this.destination.set(x, y);\r\n\r\n // Zoom factored version\r\n cam.getScroll(x, y, this.current);\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.PAN_START, this.camera, this, duration, x, y);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n var progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n this.progress = progress;\r\n\r\n var cam = this.camera;\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var v = this.ease(progress);\r\n\r\n cam.getScroll(this.destination.x, this.destination.y, this.current);\r\n\r\n var x = this.source.x + ((this.current.x - this.source.x) * v);\r\n var y = this.source.y + ((this.current.y - this.source.y) * v);\r\n\r\n cam.setScroll(x, y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, x, y);\r\n }\r\n }\r\n else\r\n {\r\n cam.centerOn(this.destination.x, this.destination.y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, cam.scrollX, cam.scrollY);\r\n }\r\n \r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.PAN_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.source = null;\r\n this.destination = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Pan.js?')},"./node_modules/phaser/src/cameras/2d/effects/Shake.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Shake effect.\r\n *\r\n * This effect will shake the camera viewport by a random amount, bounded by the specified intensity, each frame.\r\n *\r\n * Only the camera viewport is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Shake\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Shake = new Class({\r\n\r\n initialize:\r\n\r\n function Shake (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The intensity of the effect. Use small float values. The default when the effect starts is 0.05.\r\n * This is a Vector2 object, allowing you to control the shake intensity independently across x and y.\r\n * You can modify this value while the effect is active to create more varied shake effects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#intensity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.5.0\r\n */\r\n this.intensity = new Vector2();\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * How much to offset the camera by horizontally.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetX = 0;\r\n\r\n /**\r\n * How much to offset the camera by vertically.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetY = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraShakeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#start\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraShakeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, intensity, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 100; }\r\n if (intensity === undefined) { intensity = 0.05; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n if (typeof intensity === \'number\')\r\n {\r\n this.intensity.set(intensity);\r\n }\r\n else\r\n {\r\n this.intensity.set(intensity.x, intensity.y);\r\n }\r\n\r\n this._elapsed = 0;\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.SHAKE_START, this.camera, this, duration, intensity);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The pre-render step for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#preRender\r\n * @since 3.5.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.isRunning)\r\n {\r\n this.camera.matrix.translate(this._offsetX, this._offsetY);\r\n }\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var intensity = this.intensity;\r\n var width = this.camera._cw;\r\n var height = this.camera._ch;\r\n var zoom = this.camera.zoom;\r\n\r\n this._offsetX = (Math.random() * intensity.x * width * 2 - intensity.x * width) * zoom;\r\n this._offsetY = (Math.random() * intensity.y * height * 2 - intensity.y * height) * zoom;\r\n\r\n if (this.camera.roundPixels)\r\n {\r\n this._offsetX = Math.round(this._offsetX);\r\n this._offsetY = Math.round(this._offsetY);\r\n }\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.SHAKE_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.intensity = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shake;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Shake.js?')},"./node_modules/phaser/src/cameras/2d/effects/Zoom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Zoom effect.\r\n *\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Zoom\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Zoom = new Class({\r\n\r\n initialize:\r\n\r\n function Zoom (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting zoom value;\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#source\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.source = 1;\r\n\r\n /**\r\n * The destination zoom value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#destination\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.destination = 1;\r\n\r\n /**\r\n * The ease function to use during the zoom.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraZoomCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#start\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the zoom effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraZoomCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * and the current camera zoom value.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (zoom, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source = cam.zoom;\r\n\r\n // Zooming to\r\n this.destination = zoom;\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.ZOOM_START, this.camera, this, duration, zoom);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.camera.zoom = this.source + ((this.destination - this.source) * this.ease(this.progress));\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.camera.zoom);\r\n }\r\n }\r\n else\r\n {\r\n this.camera.zoom = this.destination;\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.destination);\r\n }\r\n\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.ZOOM_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zoom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Zoom.js?')},"./node_modules/phaser/src/cameras/2d/effects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Effects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Fade: __webpack_require__(/*! ./Fade */ "./node_modules/phaser/src/cameras/2d/effects/Fade.js"),\r\n Flash: __webpack_require__(/*! ./Flash */ "./node_modules/phaser/src/cameras/2d/effects/Flash.js"),\r\n Pan: __webpack_require__(/*! ./Pan */ "./node_modules/phaser/src/cameras/2d/effects/Pan.js"),\r\n Shake: __webpack_require__(/*! ./Shake */ "./node_modules/phaser/src/cameras/2d/effects/Shake.js"),\r\n Zoom: __webpack_require__(/*! ./Zoom */ "./node_modules/phaser/src/cameras/2d/effects/Zoom.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/index.js?')},"./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Destroy Camera Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is destroyed by the Camera Manager.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed.\r\n */\r\nmodule.exports = 'cameradestroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeincomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeincomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeinstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeinstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutcomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeoutcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeoutstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'cameraflashcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'cameraflashstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerapancomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} x - The destination scroll x coordinate.\r\n * @param {number} y - The destination scroll y coordinate.\r\n */\r\nmodule.exports = 'camerapanstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Post-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance after is has finished rendering.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('postrender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that has finished rendering to a texture.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pre-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is about to render.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('prerender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that is about to render to a texture.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerashakecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} intensity - The intensity of the effect.\r\n */\r\nmodule.exports = 'camerashakestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerazoomcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} zoom - The destination zoom value.\r\n */\r\nmodule.exports = 'camerazoomstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js"),\r\n FADE_IN_COMPLETE: __webpack_require__(/*! ./FADE_IN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js"),\r\n FADE_IN_START: __webpack_require__(/*! ./FADE_IN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js"),\r\n FADE_OUT_COMPLETE: __webpack_require__(/*! ./FADE_OUT_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js"),\r\n FADE_OUT_START: __webpack_require__(/*! ./FADE_OUT_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js"),\r\n FLASH_COMPLETE: __webpack_require__(/*! ./FLASH_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js"),\r\n FLASH_START: __webpack_require__(/*! ./FLASH_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js"),\r\n PAN_COMPLETE: __webpack_require__(/*! ./PAN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js"),\r\n PAN_START: __webpack_require__(/*! ./PAN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js"),\r\n SHAKE_COMPLETE: __webpack_require__(/*! ./SHAKE_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js"),\r\n SHAKE_START: __webpack_require__(/*! ./SHAKE_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js"),\r\n ZOOM_COMPLETE: __webpack_require__(/*! ./ZOOM_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js"),\r\n ZOOM_START: __webpack_require__(/*! ./ZOOM_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/index.js?')},"./node_modules/phaser/src/cameras/2d/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/src/cameras/2d/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/src/cameras/2d/CameraManager.js"),\r\n Effects: __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cameras/2d/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/index.js?')},"./node_modules/phaser/src/cameras/controls/FixedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Fixed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n *\r\n * ```javascript\r\n * var camControl = new FixedKeyControl({\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * speed: float OR { x: 0, y: 0 }\r\n * });\r\n * ```\r\n *\r\n * Movement is precise and has no 'smoothing' applied to it.\r\n *\r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class FixedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.FixedKeyControlConfig} config - The Fixed Key Control configuration object.\r\n */\r\nvar FixedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function FixedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedX = 0;\r\n\r\n /**\r\n * The vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedY = 0;\r\n\r\n var speed = GetValue(config, 'speed', null);\r\n\r\n if (typeof speed === 'number')\r\n {\r\n this.speedX = speed;\r\n this.speedY = speed;\r\n }\r\n else\r\n {\r\n this.speedX = GetValue(config, 'speed.x', 0);\r\n this.speedY = GetValue(config, 'speed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the current zoom level.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n cam.scrollY -= ((this.speedY * delta) | 0);\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n cam.scrollY += ((this.speedY * delta) | 0);\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n cam.scrollX -= ((this.speedX * delta) | 0);\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n cam.scrollX += ((this.speedX * delta) | 0);\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n cam.zoom -= this.zoomSpeed;\r\n\r\n if (cam.zoom < 0.1)\r\n {\r\n cam.zoom = 0.1;\r\n }\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n cam.zoom += this.zoomSpeed;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FixedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/FixedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Smoothed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n * Unlike the Fixed Camera Control you can also provide physics values for acceleration, drag and maxSpeed for smoothing effects.\r\n *\r\n * ```javascript\r\n * var controlConfig = {\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * up: cursors.up,\r\n * down: cursors.down,\r\n * zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q),\r\n * zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E),\r\n * zoomSpeed: 0.02,\r\n * acceleration: 0.06,\r\n * drag: 0.0005,\r\n * maxSpeed: 1.0\r\n * };\r\n * ```\r\n * \r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class SmoothedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.SmoothedKeyControlConfig} config - The Smoothed Key Control configuration object.\r\n */\r\nvar SmoothedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function SmoothedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelX = 0;\r\n\r\n /**\r\n * The vertical acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelY = 0;\r\n\r\n var accel = GetValue(config, 'acceleration', null);\r\n\r\n if (typeof accel === 'number')\r\n {\r\n this.accelX = accel;\r\n this.accelY = accel;\r\n }\r\n else\r\n {\r\n this.accelX = GetValue(config, 'acceleration.x', 0);\r\n this.accelY = GetValue(config, 'acceleration.y', 0);\r\n }\r\n\r\n /**\r\n * The horizontal drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragX = 0;\r\n\r\n /**\r\n * The vertical drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragY = 0;\r\n\r\n var drag = GetValue(config, 'drag', null);\r\n\r\n if (typeof drag === 'number')\r\n {\r\n this.dragX = drag;\r\n this.dragY = drag;\r\n }\r\n else\r\n {\r\n this.dragX = GetValue(config, 'drag.x', 0);\r\n this.dragY = GetValue(config, 'drag.y', 0);\r\n }\r\n\r\n /**\r\n * The maximum horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedX = 0;\r\n\r\n /**\r\n * The maximum vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedY = 0;\r\n\r\n var maxSpeed = GetValue(config, 'maxSpeed', null);\r\n\r\n if (typeof maxSpeed === 'number')\r\n {\r\n this.maxSpeedX = maxSpeed;\r\n this.maxSpeedY = maxSpeed;\r\n }\r\n else\r\n {\r\n this.maxSpeedX = GetValue(config, 'maxSpeed.x', 0);\r\n this.maxSpeedY = GetValue(config, 'maxSpeed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedX = 0;\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedY = 0;\r\n\r\n /**\r\n * Internal property to track the zoom of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n // Apply Deceleration\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX -= this.dragX * delta;\r\n\r\n if (this._speedX < 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n else if (this._speedX < 0)\r\n {\r\n this._speedX += this.dragX * delta;\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY -= this.dragY * delta;\r\n\r\n if (this._speedY < 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n else if (this._speedY < 0)\r\n {\r\n this._speedY += this.dragY * delta;\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n\r\n // Check for keys\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n this._speedY += this.accelY;\r\n\r\n if (this._speedY > this.maxSpeedY)\r\n {\r\n this._speedY = this.maxSpeedY;\r\n }\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n this._speedY -= this.accelY;\r\n\r\n if (this._speedY < -this.maxSpeedY)\r\n {\r\n this._speedY = -this.maxSpeedY;\r\n }\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n this._speedX += this.accelX;\r\n\r\n if (this._speedX > this.maxSpeedX)\r\n {\r\n this._speedX = this.maxSpeedX;\r\n }\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n this._speedX -= this.accelX;\r\n\r\n if (this._speedX < -this.maxSpeedX)\r\n {\r\n this._speedX = -this.maxSpeedX;\r\n }\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n this._zoom = -this.zoomSpeed;\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n this._zoom = this.zoomSpeed;\r\n }\r\n else\r\n {\r\n this._zoom = 0;\r\n }\r\n\r\n // Apply to Camera\r\n\r\n if (this._speedX !== 0)\r\n {\r\n cam.scrollX -= ((this._speedX * delta) | 0);\r\n }\r\n\r\n if (this._speedY !== 0)\r\n {\r\n cam.scrollY -= ((this._speedY * delta) | 0);\r\n }\r\n\r\n if (this._zoom !== 0)\r\n {\r\n cam.zoom += this._zoom;\r\n\r\n if (cam.zoom < 0.001)\r\n {\r\n cam.zoom = 0.001;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SmoothedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Controls\r\n */\r\n\r\nmodule.exports = {\r\n\r\n FixedKeyControl: __webpack_require__(/*! ./FixedKeyControl */ "./node_modules/phaser/src/cameras/controls/FixedKeyControl.js"),\r\n SmoothedKeyControl: __webpack_require__(/*! ./SmoothedKeyControl */ "./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/index.js?')},"./node_modules/phaser/src/cameras/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Cameras\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Controls: __webpack_require__(/*! ./controls */ "./node_modules/phaser/src/cameras/controls/index.js"),\r\n Scene2D: __webpack_require__(/*! ./2d */ "./node_modules/phaser/src/cameras/2d/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/index.js?')},"./node_modules/phaser/src/const.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n * \r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.19.0',\r\n\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\"),\r\n\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\"),\r\n\r\n /**\r\n * AUTO Detect Renderer.\r\n * \r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Canvas Renderer.\r\n * \r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * WebGL Renderer.\r\n * \r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * Headless Renderer.\r\n * \r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n * \r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.NONE\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.UP\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/const.js?")},"./node_modules/phaser/src/core/Config.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Device = __webpack_require__(/*! ../device */ \"./node_modules/phaser/src/device/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PhaserMath = __webpack_require__(/*! ../math/ */ \"./node_modules/phaser/src/math/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The active game configuration settings, parsed from a {@link Phaser.Types.Core.GameConfig} object.\r\n *\r\n * @class Config\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n *\r\n * @see Phaser.Game#config\r\n */\r\nvar Config = new Class({\r\n\r\n initialize:\r\n\r\n function Config (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var defaultBannerColor = [\r\n '#ff0000',\r\n '#ffff00',\r\n '#00ff00',\r\n '#00ffff',\r\n '#000000'\r\n ];\r\n\r\n var defaultBannerTextColor = '#ffffff';\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#width - The width of the underlying canvas, in pixels.\r\n */\r\n this.width = GetValue(config, 'width', 1024);\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#height - The height of the underlying canvas, in pixels.\r\n */\r\n this.height = GetValue(config, 'height', 768);\r\n\r\n /**\r\n * @const {(Phaser.Scale.ZoomType|integer)} Phaser.Core.Config#zoom - The zoom factor, as used by the Scale Manager.\r\n */\r\n this.zoom = GetValue(config, 'zoom', 1);\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#resolution - The canvas device pixel resolution. Currently un-used.\r\n */\r\n this.resolution = GetValue(config, 'resolution', 1);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected.\r\n */\r\n this.parent = GetValue(config, 'parent', undefined);\r\n\r\n /**\r\n * @const {Phaser.Scale.ScaleModeType} Phaser.Core.Config#scaleMode - The scale mode as used by the Scale Manager. The default is zero, which is no scaling.\r\n */\r\n this.scaleMode = GetValue(config, 'scaleMode', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#expandParent - Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?\r\n */\r\n this.expandParent = GetValue(config, 'expandParent', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#autoRound - Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.\r\n */\r\n this.autoRound = GetValue(config, 'autoRound', false);\r\n\r\n /**\r\n * @const {Phaser.Scale.CenterType} Phaser.Core.Config#autoCenter - Automatically center the canvas within the parent?\r\n */\r\n this.autoCenter = GetValue(config, 'autoCenter', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#resizeInterval - How many ms should elapse before checking if the browser size has changed?\r\n */\r\n this.resizeInterval = GetValue(config, 'resizeInterval', 500);\r\n\r\n /**\r\n * @const {?(HTMLElement|string)} Phaser.Core.Config#fullscreenTarget - The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.\r\n */\r\n this.fullscreenTarget = GetValue(config, 'fullscreenTarget', null);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minWidth - The minimum width, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minWidth = GetValue(config, 'minWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxWidth - The maximum width, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxWidth = GetValue(config, 'maxWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minHeight - The minimum height, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minHeight = GetValue(config, 'minHeight', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxHeight - The maximum height, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxHeight = GetValue(config, 'maxHeight', 0);\r\n\r\n // Scale Manager - Anything set in here over-rides anything set above\r\n\r\n var scaleConfig = GetValue(config, 'scale', null);\r\n\r\n if (scaleConfig)\r\n {\r\n this.width = GetValue(scaleConfig, 'width', this.width);\r\n this.height = GetValue(scaleConfig, 'height', this.height);\r\n this.zoom = GetValue(scaleConfig, 'zoom', this.zoom);\r\n this.resolution = GetValue(scaleConfig, 'resolution', this.resolution);\r\n this.parent = GetValue(scaleConfig, 'parent', this.parent);\r\n this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode);\r\n this.expandParent = GetValue(scaleConfig, 'expandParent', this.expandParent);\r\n this.autoRound = GetValue(scaleConfig, 'autoRound', this.autoRound);\r\n this.autoCenter = GetValue(scaleConfig, 'autoCenter', this.autoCenter);\r\n this.resizeInterval = GetValue(scaleConfig, 'resizeInterval', this.resizeInterval);\r\n this.fullscreenTarget = GetValue(scaleConfig, 'fullscreenTarget', this.fullscreenTarget);\r\n this.minWidth = GetValue(scaleConfig, 'min.width', this.minWidth);\r\n this.maxWidth = GetValue(scaleConfig, 'max.width', this.maxWidth);\r\n this.minHeight = GetValue(scaleConfig, 'min.height', this.minHeight);\r\n this.maxHeight = GetValue(scaleConfig, 'max.height', this.maxHeight);\r\n }\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#renderType - Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)\r\n */\r\n this.renderType = GetValue(config, 'type', CONST.AUTO);\r\n\r\n /**\r\n * @const {?HTMLCanvasElement} Phaser.Core.Config#canvas - Force Phaser to use your own Canvas element instead of creating one.\r\n */\r\n this.canvas = GetValue(config, 'canvas', null);\r\n\r\n /**\r\n * @const {?(CanvasRenderingContext2D|WebGLRenderingContext)} Phaser.Core.Config#context - Force Phaser to use your own Canvas context instead of creating one.\r\n */\r\n this.context = GetValue(config, 'context', null);\r\n\r\n /**\r\n * @const {?string} Phaser.Core.Config#canvasStyle - Optional CSS attributes to be set on the canvas object created by the renderer.\r\n */\r\n this.canvasStyle = GetValue(config, 'canvasStyle', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#customEnvironment - Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.\r\n */\r\n this.customEnvironment = GetValue(config, 'customEnvironment', false);\r\n\r\n /**\r\n * @const {?object} Phaser.Core.Config#sceneConfig - The default Scene configuration object.\r\n */\r\n this.sceneConfig = GetValue(config, 'scene', null);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#seed - A seed which the Random Data Generator will use. If not given, a dynamic seed based on the time is used.\r\n */\r\n this.seed = GetValue(config, 'seed', [ (Date.now() * Math.random()).toString() ]);\r\n\r\n PhaserMath.RND = new PhaserMath.RandomDataGenerator(this.seed);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameTitle - The title of the game.\r\n */\r\n this.gameTitle = GetValue(config, 'title', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameURL - The URL of the game.\r\n */\r\n this.gameURL = GetValue(config, 'url', 'https://phaser.io');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameVersion - The version of the game.\r\n */\r\n this.gameVersion = GetValue(config, 'version', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#autoFocus - If `true` the window will automatically be given focus immediately and on any future mousedown event.\r\n */\r\n this.autoFocus = GetValue(config, 'autoFocus', true);\r\n\r\n // DOM Element Container\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domCreateContainer - Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.\r\n */\r\n this.domCreateContainer = GetValue(config, 'dom.createContainer', false);\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domBehindCanvas - Should the DOM Container that is created (if `dom.createContainer` is true) be positioned behind (true) or over the top (false, the default) of the game canvas?\r\n */\r\n this.domBehindCanvas = GetValue(config, 'dom.behindCanvas', false);\r\n\r\n // Input\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputKeyboard - Enable the Keyboard Plugin. This can be disabled in games that don't need keyboard input.\r\n */\r\n this.inputKeyboard = GetValue(config, 'input.keyboard', true);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputKeyboardEventTarget - The DOM Target to listen for keyboard events on. Defaults to `window` if not specified.\r\n */\r\n this.inputKeyboardEventTarget = GetValue(config, 'input.keyboard.target', window);\r\n\r\n /**\r\n * @const {?integer[]} Phaser.Core.Config#inputKeyboardCapture - `preventDefault` will be called on every non-modified key which has a key code in this array. By default, it is empty.\r\n */\r\n this.inputKeyboardCapture = GetValue(config, 'input.keyboard.capture', []);\r\n\r\n /**\r\n * @const {(boolean|object)} Phaser.Core.Config#inputMouse - Enable the Mouse Plugin. This can be disabled in games that don't need mouse input.\r\n */\r\n this.inputMouse = GetValue(config, 'input.mouse', true);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputMouseEventTarget - The DOM Target to listen for mouse events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputMouseEventTarget = GetValue(config, 'input.mouse.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputMouseCapture - Should mouse events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputMouseCapture = GetValue(config, 'input.mouse.capture', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouch - Enable the Touch Plugin. This can be disabled in games that don't need touch input.\r\n */\r\n this.inputTouch = GetValue(config, 'input.touch', Device.input.touch);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputTouchEventTarget - The DOM Target to listen for touch events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputTouchEventTarget = GetValue(config, 'input.touch.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouchCapture - Should touch events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputTouchCapture = GetValue(config, 'input.touch.capture', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputActivePointers - The number of Pointer objects created by default. In a mouse-only, or non-multi touch game, you can leave this as 1.\r\n */\r\n this.inputActivePointers = GetValue(config, 'input.activePointers', 1);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputSmoothFactor - The smoothing factor to apply during Pointer movement. See {@link Phaser.Input.Pointer#smoothFactor}.\r\n */\r\n this.inputSmoothFactor = GetValue(config, 'input.smoothFactor', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputWindowEvents - Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.\r\n */\r\n this.inputWindowEvents = GetValue(config, 'input.windowEvents', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputGamepad - Enable the Gamepad Plugin. This can be disabled in games that don't need gamepad input.\r\n */\r\n this.inputGamepad = GetValue(config, 'input.gamepad', false);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputGamepadEventTarget - The DOM Target to listen for gamepad events on. Defaults to `window` if not specified.\r\n */\r\n this.inputGamepadEventTarget = GetValue(config, 'input.gamepad.target', window);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#disableContextMenu - Set to `true` to disable the right-click context menu.\r\n */\r\n this.disableContextMenu = GetValue(config, 'disableContextMenu', false);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.AudioConfig} Phaser.Core.Config#audio - The Audio Configuration object.\r\n */\r\n this.audio = GetValue(config, 'audio');\r\n\r\n // If you do: { banner: false } it won't display any banner at all\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hideBanner - Don't write the banner line to the console.log.\r\n */\r\n this.hideBanner = (GetValue(config, 'banner', null) === false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hidePhaser - Omit Phaser's name and version from the banner.\r\n */\r\n this.hidePhaser = GetValue(config, 'banner.hidePhaser', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#bannerTextColor - The color of the banner text.\r\n */\r\n this.bannerTextColor = GetValue(config, 'banner.text', defaultBannerTextColor);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#bannerBackgroundColor - The background colors of the banner.\r\n */\r\n this.bannerBackgroundColor = GetValue(config, 'banner.background', defaultBannerColor);\r\n\r\n if (this.gameTitle === '' && this.hidePhaser)\r\n {\r\n this.hideBanner = true;\r\n }\r\n\r\n /**\r\n * @const {?Phaser.Types.Core.FPSConfig} Phaser.Core.Config#fps - The Frame Rate Configuration object, as parsed by the Timestep class.\r\n */\r\n this.fps = GetValue(config, 'fps', null);\r\n\r\n // Renderer Settings\r\n // These can either be in a `render` object within the Config, or specified on their own\r\n\r\n var renderConfig = GetValue(config, 'render', config);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#antialias - When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.\r\n */\r\n this.antialias = GetValue(renderConfig, 'antialias', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#desynchronized - When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.\r\n */\r\n this.desynchronized = GetValue(renderConfig, 'desynchronized', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#roundPixels - Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.\r\n */\r\n this.roundPixels = GetValue(renderConfig, 'roundPixels', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#pixelArt - Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a linear filter mode).\r\n */\r\n this.pixelArt = GetValue(renderConfig, 'pixelArt', this.zoom !== 1);\r\n\r\n if (this.pixelArt)\r\n {\r\n this.antialias = false;\r\n this.roundPixels = true;\r\n }\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#transparent - Whether the game canvas will have a transparent background.\r\n */\r\n this.transparent = GetValue(renderConfig, 'transparent', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#clearBeforeRender - Whether the game canvas will be cleared between each rendering frame. You can disable this if you have a full-screen background image or game object.\r\n */\r\n this.clearBeforeRender = GetValue(renderConfig, 'clearBeforeRender', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#premultipliedAlpha - In WebGL mode, sets the drawing buffer to contain colors with pre-multiplied alpha.\r\n */\r\n this.premultipliedAlpha = GetValue(renderConfig, 'premultipliedAlpha', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#failIfMajorPerformanceCaveat - Let the browser abort creating a WebGL context if it judges performance would be unacceptable.\r\n */\r\n this.failIfMajorPerformanceCaveat = GetValue(renderConfig, 'failIfMajorPerformanceCaveat', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#powerPreference - \"high-performance\", \"low-power\" or \"default\". A hint to the browser on how much device power the game might use.\r\n */\r\n this.powerPreference = GetValue(renderConfig, 'powerPreference', 'default');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#batchSize - The default WebGL Batch size.\r\n */\r\n this.batchSize = GetValue(renderConfig, 'batchSize', 2000);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxLights - The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.\r\n */\r\n this.maxLights = GetValue(renderConfig, 'maxLights', 10);\r\n\r\n var bgc = GetValue(config, 'backgroundColor', 0);\r\n\r\n /**\r\n * @const {Phaser.Display.Color} Phaser.Core.Config#backgroundColor - The background color of the game canvas. The default is black. This value is ignored if `transparent` is set to `true`.\r\n */\r\n this.backgroundColor = ValueToColor(bgc);\r\n\r\n if (bgc === 0 && this.transparent)\r\n {\r\n this.backgroundColor.alpha = 0;\r\n }\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#preBoot - Called before Phaser boots. Useful for initializing anything not related to Phaser that Phaser may require while booting.\r\n */\r\n this.preBoot = GetValue(config, 'callbacks.preBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#postBoot - A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.\r\n */\r\n this.postBoot = GetValue(config, 'callbacks.postBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.PhysicsConfig} Phaser.Core.Config#physics - The Physics Configuration object.\r\n */\r\n this.physics = GetValue(config, 'physics', {});\r\n\r\n /**\r\n * @const {(boolean|string)} Phaser.Core.Config#defaultPhysicsSystem - The default physics system. It will be started for each scene. Either 'arcade', 'impact' or 'matter'.\r\n */\r\n this.defaultPhysicsSystem = GetValue(this.physics, 'default', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderBaseURL - A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.\r\n */\r\n this.loaderBaseURL = GetValue(config, 'loader.baseURL', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPath - A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.\r\n */\r\n this.loaderPath = GetValue(config, 'loader.path', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderMaxParallelDownloads - Maximum parallel downloads allowed for resources (Default to 32).\r\n */\r\n this.loaderMaxParallelDownloads = GetValue(config, 'loader.maxParallelDownloads', 32);\r\n\r\n /**\r\n * @const {(string|undefined)} Phaser.Core.Config#loaderCrossOrigin - 'anonymous', 'use-credentials', or `undefined`. If you're not making cross-origin requests, leave this as `undefined`. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes}.\r\n */\r\n this.loaderCrossOrigin = GetValue(config, 'loader.crossOrigin', undefined);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderResponseType - The response type of the XHR request, e.g. `blob`, `text`, etc.\r\n */\r\n this.loaderResponseType = GetValue(config, 'loader.responseType', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#loaderAsync - Should the XHR request use async or not?\r\n */\r\n this.loaderAsync = GetValue(config, 'loader.async', true);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderUser - Optional username for all XHR requests.\r\n */\r\n this.loaderUser = GetValue(config, 'loader.user', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPassword - Optional password for all XHR requests.\r\n */\r\n this.loaderPassword = GetValue(config, 'loader.password', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderTimeout - Optional XHR timeout value, in ms.\r\n */\r\n this.loaderTimeout = GetValue(config, 'loader.timeout', 0);\r\n\r\n /*\r\n * Allows `plugins` property to either be an array, in which case it just replaces\r\n * the default plugins like previously, or a config object.\r\n *\r\n * plugins: {\r\n * global: [\r\n * { key: 'TestPlugin', plugin: TestPlugin, start: true, data: { msg: 'The plugin is alive' } },\r\n * ],\r\n * scene: [\r\n * { key: 'WireFramePlugin', plugin: WireFramePlugin, systemKey: 'wireFramePlugin', sceneKey: 'wireframe' }\r\n * ],\r\n * default: [], OR\r\n * defaultMerge: [\r\n * 'ModPlayer'\r\n * ]\r\n * }\r\n */\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installGlobalPlugins - An array of global plugins to be installed.\r\n */\r\n this.installGlobalPlugins = [];\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installScenePlugins - An array of Scene level plugins to be installed.\r\n */\r\n this.installScenePlugins = [];\r\n\r\n var plugins = GetValue(config, 'plugins', null);\r\n var defaultPlugins = DefaultPlugins.DefaultScene;\r\n\r\n if (plugins)\r\n {\r\n // Old 3.7 array format?\r\n if (Array.isArray(plugins))\r\n {\r\n this.defaultPlugins = plugins;\r\n }\r\n else if (IsPlainObject(plugins))\r\n {\r\n this.installGlobalPlugins = GetFastValue(plugins, 'global', []);\r\n this.installScenePlugins = GetFastValue(plugins, 'scene', []);\r\n\r\n if (Array.isArray(plugins.default))\r\n {\r\n defaultPlugins = plugins.default;\r\n }\r\n else if (Array.isArray(plugins.defaultMerge))\r\n {\r\n defaultPlugins = defaultPlugins.concat(plugins.defaultMerge);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#defaultPlugins - The plugins installed into every Scene (in addition to CoreScene and Global).\r\n */\r\n this.defaultPlugins = defaultPlugins;\r\n\r\n // Default / Missing Images\r\n var pngPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg';\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#defaultImage - A base64 encoded PNG that will be used as the default blank texture.\r\n */\r\n this.defaultImage = GetValue(config, 'images.default', pngPrefix + 'AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg==');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#missingImage - A base64 encoded PNG that will be used as the default texture when a texture is assigned that is missing or not loaded.\r\n */\r\n this.missingImage = GetValue(config, 'images.missing', pngPrefix + 'CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==');\r\n\r\n if (window)\r\n {\r\n if (window.FORCE_WEBGL)\r\n {\r\n this.renderType = CONST.WEBGL;\r\n }\r\n else if (window.FORCE_CANVAS)\r\n {\r\n this.renderType = CONST.CANVAS;\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Config;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Config.js?")},"./node_modules/phaser/src/core/CreateRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasInterpolation = __webpack_require__(/*! ../display/canvas/CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar Features = __webpack_require__(/*! ../device/Features */ "./node_modules/phaser/src/device/Features.js");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the renderer it will use.\r\n *\r\n * Relies upon two webpack global flags to be defined: `WEBGL_RENDERER` and `CANVAS_RENDERER` during build time, but not at run-time.\r\n *\r\n * @function Phaser.Core.CreateRenderer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance on which the renderer will be set.\r\n */\r\nvar CreateRenderer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if ((config.customEnvironment || config.canvas) && config.renderType === CONST.AUTO)\r\n {\r\n throw new Error(\'Must set explicit renderType in custom environment\');\r\n }\r\n\r\n // Not a custom environment, didn\'t provide their own canvas and not headless, so determine the renderer:\r\n if (!config.customEnvironment && !config.canvas && config.renderType !== CONST.HEADLESS)\r\n {\r\n if (config.renderType === CONST.CANVAS || (config.renderType !== CONST.CANVAS && !Features.webGL))\r\n {\r\n if (Features.canvas)\r\n {\r\n // They requested Canvas and their browser supports it\r\n config.renderType = CONST.CANVAS;\r\n }\r\n else\r\n {\r\n throw new Error(\'Cannot create Canvas or WebGL context, aborting.\');\r\n }\r\n }\r\n else\r\n {\r\n // Game requested WebGL and browser says it supports it\r\n config.renderType = CONST.WEBGL;\r\n }\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasPool.disableSmoothing();\r\n }\r\n\r\n var baseSize = game.scale.baseSize;\r\n\r\n var width = baseSize.width;\r\n var height = baseSize.height;\r\n\r\n // Does the game config provide its own canvas element to use?\r\n if (config.canvas)\r\n {\r\n game.canvas = config.canvas;\r\n\r\n game.canvas.width = width;\r\n game.canvas.height = height;\r\n }\r\n else\r\n {\r\n game.canvas = CanvasPool.create(game, width, height, config.renderType);\r\n }\r\n\r\n // Does the game config provide some canvas css styles to use?\r\n if (config.canvasStyle)\r\n {\r\n game.canvas.style = config.canvasStyle;\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasInterpolation.setCrisp(game.canvas);\r\n }\r\n\r\n if (config.renderType === CONST.HEADLESS)\r\n {\r\n // Nothing more to do here\r\n return;\r\n }\r\n\r\n var CanvasRenderer;\r\n var WebGLRenderer;\r\n\r\n if (typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Let the config pick the renderer type, as both are included\r\n if (config.renderType === CONST.WEBGL)\r\n {\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n else\r\n {\r\n game.renderer = new CanvasRenderer(game);\r\n game.context = game.renderer.gameContext;\r\n }\r\n }\r\n\r\n if (typeof WEBGL_RENDERER && !typeof CANVAS_RENDERER)\r\n {\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Force the type to WebGL, regardless what was requested\r\n config.renderType = CONST.WEBGL;\r\n\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n\r\n if (!typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n\r\n // Force the type to Canvas, regardless what was requested\r\n config.renderType = CONST.CANVAS;\r\n\r\n game.renderer = new CanvasRenderer(game);\r\n\r\n game.context = game.renderer.gameContext;\r\n }\r\n};\r\n\r\nmodule.exports = CreateRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/CreateRenderer.js?')},"./node_modules/phaser/src/core/DebugHeader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the console.log debug header.\r\n *\r\n * You can customize or disable the header via the Game Config object.\r\n *\r\n * @function Phaser.Core.DebugHeader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance which will output this debug header.\r\n */\r\nvar DebugHeader = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (config.hideBanner)\r\n {\r\n return;\r\n }\r\n\r\n var renderType = 'WebGL';\r\n\r\n if (config.renderType === CONST.CANVAS)\r\n {\r\n renderType = 'Canvas';\r\n }\r\n else if (config.renderType === CONST.HEADLESS)\r\n {\r\n renderType = 'Headless';\r\n }\r\n\r\n var audioConfig = config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n var audioType;\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n audioType = 'Web Audio';\r\n }\r\n else if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n audioType = 'No Audio';\r\n }\r\n else\r\n {\r\n audioType = 'HTML5 Audio';\r\n }\r\n\r\n if (!game.device.browser.ie)\r\n {\r\n var c = '';\r\n var args = [ c ];\r\n\r\n if (Array.isArray(config.bannerBackgroundColor))\r\n {\r\n var lastColor;\r\n\r\n config.bannerBackgroundColor.forEach(function (color)\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('background: ' + color);\r\n\r\n lastColor = color;\r\n\r\n });\r\n\r\n // inject the text color\r\n args[args.length - 1] = 'color: ' + config.bannerTextColor + '; background: ' + lastColor;\r\n }\r\n else\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('color: ' + config.bannerTextColor + '; background: ' + config.bannerBackgroundColor);\r\n }\r\n\r\n // URL link background color (always white)\r\n args.push('background: #fff');\r\n\r\n if (config.gameTitle)\r\n {\r\n c = c.concat(config.gameTitle);\r\n\r\n if (config.gameVersion)\r\n {\r\n c = c.concat(' v' + config.gameVersion);\r\n }\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat(' / ');\r\n }\r\n }\r\n\r\n var fb = (typeof PLUGIN_FBINSTANT) ? '-FB' : '';\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat('Phaser v' + CONST.VERSION + fb + ' (' + renderType + ' | ' + audioType + ')');\r\n }\r\n\r\n c = c.concat(' %c ' + config.gameURL);\r\n\r\n // Inject the new string back into the args array\r\n args[0] = c;\r\n\r\n console.log.apply(console, args);\r\n }\r\n else if (window['console'])\r\n {\r\n console.log('Phaser v' + CONST.VERSION + ' / https://phaser.io');\r\n }\r\n};\r\n\r\nmodule.exports = DebugHeader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/DebugHeader.js?")},"./node_modules/phaser/src/core/Game.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js");\r\nvar AnimationManager = __webpack_require__(/*! ../animations/AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js");\r\nvar CacheManager = __webpack_require__(/*! ../cache/CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Config = __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js");\r\nvar CreateDOMContainer = __webpack_require__(/*! ../dom/CreateDOMContainer */ "./node_modules/phaser/src/dom/CreateDOMContainer.js");\r\nvar CreateRenderer = __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar DebugHeader = __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js");\r\nvar Device = __webpack_require__(/*! ../device */ "./node_modules/phaser/src/device/index.js");\r\nvar DOMContentLoaded = __webpack_require__(/*! ../dom/DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar InputManager = __webpack_require__(/*! ../input/InputManager */ "./node_modules/phaser/src/input/InputManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar PluginManager = __webpack_require__(/*! ../plugins/PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js");\r\nvar ScaleManager = __webpack_require__(/*! ../scale/ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js");\r\nvar SceneManager = __webpack_require__(/*! ../scene/SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js");\r\nvar TextureEvents = __webpack_require__(/*! ../textures/events */ "./node_modules/phaser/src/textures/events/index.js");\r\nvar TextureManager = __webpack_require__(/*! ../textures/TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js");\r\nvar TimeStep = __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js");\r\nvar VisibilityHandler = __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js");\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n var SoundManagerCreator = __webpack_require__(/*! ../sound/SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n var FacebookInstantGamesPlugin = __webpack_require__(/*! ../../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n/**\r\n * @classdesc\r\n * The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible\r\n * for handling the boot process, parsing the configuration values, creating the renderer,\r\n * and setting-up all of the global Phaser systems, such as sound and input.\r\n * Once that is complete it will start the Scene Manager and then begin the main game loop.\r\n *\r\n * You should generally avoid accessing any of the systems created by Game, and instead use those\r\n * made available to you via the Phaser.Scene Systems class instead.\r\n *\r\n * @class Game\r\n * @memberof Phaser\r\n * @constructor\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n */\r\nvar Game = new Class({\r\n\r\n initialize:\r\n\r\n function Game (config)\r\n {\r\n /**\r\n * The parsed Game Configuration object.\r\n *\r\n * The values stored within this object are read-only and should not be changed at run-time.\r\n *\r\n * @name Phaser.Game#config\r\n * @type {Phaser.Core.Config}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.config = new Config(config);\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Game#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = null;\r\n\r\n /**\r\n * A reference to an HTML Div Element used as the DOM Element Container.\r\n * \r\n * Only set if `createDOMContainer` is `true` in the game config (by default it is `false`) and\r\n * if you provide a parent element to insert the Phaser Game inside.\r\n *\r\n * See the DOM Element Game Object for more details.\r\n *\r\n * @name Phaser.Game#domContainer\r\n * @type {HTMLDivElement}\r\n * @since 3.17.0\r\n */\r\n this.domContainer = null;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n * This is created automatically by Phaser unless you provide a `canvas` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this game is rendering to.\r\n * If the game is running under Canvas it will be a 2d Canvas Rendering Context.\r\n * If the game is running under WebGL it will be a WebGL Rendering Context.\r\n * This context is created automatically by Phaser unless you provide a `context` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#context\r\n * @type {(CanvasRenderingContext2D|WebGLRenderingContext)}\r\n * @since 3.0.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * A flag indicating when this Game instance has finished its boot process.\r\n *\r\n * @name Phaser.Game#isBooted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * A flag indicating if this Game is currently running its game step or not.\r\n *\r\n * @name Phaser.Game#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * An Event Emitter which is used to broadcast game-level events from the global systems.\r\n *\r\n * @name Phaser.Game#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * An instance of the Animation Manager.\r\n *\r\n * The Animation Manager is a global system responsible for managing all animations used within your game.\r\n *\r\n * @name Phaser.Game#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims = new AnimationManager(this);\r\n\r\n /**\r\n * An instance of the Texture Manager.\r\n *\r\n * The Texture Manager is a global system responsible for managing all textures being used by your game.\r\n *\r\n * @name Phaser.Game#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures = new TextureManager(this);\r\n\r\n /**\r\n * An instance of the Cache Manager.\r\n *\r\n * The Cache Manager is a global system responsible for caching, accessing and releasing external game assets.\r\n *\r\n * @name Phaser.Game#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache = new CacheManager(this);\r\n\r\n /**\r\n * An instance of the Data Manager\r\n *\r\n * @name Phaser.Game#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry = new DataManager(this);\r\n\r\n /**\r\n * An instance of the Input Manager.\r\n *\r\n * The Input Manager is a global system responsible for the capture of browser-level input events.\r\n *\r\n * @name Phaser.Game#input\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.input = new InputManager(this, this.config);\r\n\r\n /**\r\n * An instance of the Scene Manager.\r\n *\r\n * The Scene Manager is a global system responsible for creating, modifying and updating the Scenes in your game.\r\n *\r\n * @name Phaser.Game#scene\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.scene = new SceneManager(this, this.config.sceneConfig);\r\n\r\n /**\r\n * A reference to the Device inspector.\r\n *\r\n * Contains information about the device running this game, such as OS, browser vendor and feature support.\r\n * Used by various systems to determine capabilities and code paths.\r\n *\r\n * @name Phaser.Game#device\r\n * @type {Phaser.DeviceConf}\r\n * @since 3.0.0\r\n */\r\n this.device = Device;\r\n\r\n /**\r\n * An instance of the Scale Manager.\r\n *\r\n * The Scale Manager is a global system responsible for handling scaling of the game canvas.\r\n *\r\n * @name Phaser.Game#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scale = new ScaleManager(this, this.config);\r\n\r\n /**\r\n * An instance of the base Sound Manager.\r\n *\r\n * The Sound Manager is a global system responsible for the playback and updating of all audio in your game.\r\n * \r\n * You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag.\r\n *\r\n * @name Phaser.Game#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound = null;\r\n\r\n if (typeof FEATURE_SOUND)\r\n {\r\n this.sound = SoundManagerCreator.create(this);\r\n }\r\n\r\n /**\r\n * An instance of the Time Step.\r\n *\r\n * The Time Step is a global system responsible for setting-up and responding to the browser frame events, processing\r\n * them and calculating delta values. It then automatically calls the game step.\r\n *\r\n * @name Phaser.Game#loop\r\n * @type {Phaser.Core.TimeStep}\r\n * @since 3.0.0\r\n */\r\n this.loop = new TimeStep(this, this.config.fps);\r\n\r\n /**\r\n * An instance of the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Game#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins = new PluginManager(this, this.config);\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * An instance of the Facebook Instant Games Plugin.\r\n * \r\n * This will only be available if the plugin has been built into Phaser,\r\n * or you\'re using the special Facebook Instant Games custom build.\r\n *\r\n * @name Phaser.Game#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.facebook = new FacebookInstantGamesPlugin(this);\r\n }\r\n\r\n /**\r\n * Is this Game pending destruction at the start of the next frame?\r\n *\r\n * @name Phaser.Game#pendingDestroy\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.pendingDestroy = false;\r\n\r\n /**\r\n * Remove the Canvas once the destroy is over?\r\n *\r\n * @name Phaser.Game#removeCanvas\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.removeCanvas = false;\r\n\r\n /**\r\n * Remove everything when the game is destroyed.\r\n * You cannot create a new Phaser instance on the same web page after doing this.\r\n *\r\n * @name Phaser.Game#noReturn\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.noReturn = false;\r\n\r\n /**\r\n * Does the window the game is running in currently have focus or not?\r\n * This is modified by the VisibilityHandler.\r\n *\r\n * @name Phaser.Game#hasFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.9.0\r\n */\r\n this.hasFocus = false;\r\n\r\n // Wait for the DOM Ready event, then call boot.\r\n DOMContentLoaded(this.boot.bind(this));\r\n },\r\n\r\n /**\r\n * This method is called automatically when the DOM is ready. It is responsible for creating the renderer,\r\n * displaying the Debug Header, adding the game canvas to the DOM and emitting the \'boot\' event.\r\n * It listens for a \'ready\' event from the base systems and once received it will call `Game.start`.\r\n *\r\n * @method Phaser.Game#boot\r\n * @protected\r\n * @fires Phaser.Core.Events#BOOT\r\n * @listens Phaser.Textures.Events#READY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n if (!PluginCache.hasCore(\'EventEmitter\'))\r\n {\r\n console.warn(\'Aborting. Core Plugins missing.\');\r\n return;\r\n }\r\n\r\n this.isBooted = true;\r\n\r\n this.config.preBoot(this);\r\n\r\n this.scale.preBoot();\r\n\r\n CreateRenderer(this);\r\n\r\n CreateDOMContainer(this);\r\n\r\n DebugHeader(this);\r\n\r\n AddToDOM(this.canvas, this.config.parent);\r\n\r\n // The Texture Manager has to wait on a couple of non-blocking events before it\'s fully ready.\r\n // So it will emit this internal event when done:\r\n this.textures.once(TextureEvents.READY, this.texturesReady, this);\r\n\r\n this.events.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * Called automatically when the Texture Manager has finished setting up and preparing the\r\n * default textures.\r\n *\r\n * @method Phaser.Game#texturesReady\r\n * @private\r\n * @fires Phaser.Game#ready\r\n * @since 3.12.0\r\n */\r\n texturesReady: function ()\r\n {\r\n // Start all the other systems\r\n this.events.emit(Events.READY);\r\n\r\n this.start();\r\n },\r\n\r\n /**\r\n * Called automatically by Game.boot once all of the global systems have finished setting themselves up.\r\n * By this point the Game is now ready to start the main loop running.\r\n * It will also enable the Visibility Handler.\r\n *\r\n * @method Phaser.Game#start\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n this.isRunning = true;\r\n\r\n this.config.postBoot(this);\r\n\r\n if (this.renderer)\r\n {\r\n this.loop.start(this.step.bind(this));\r\n }\r\n else\r\n {\r\n this.loop.start(this.headlessStep.bind(this));\r\n }\r\n\r\n VisibilityHandler(this);\r\n\r\n var eventEmitter = this.events;\r\n\r\n eventEmitter.on(Events.HIDDEN, this.onHidden, this);\r\n eventEmitter.on(Events.VISIBLE, this.onVisible, this);\r\n eventEmitter.on(Events.BLUR, this.onBlur, this);\r\n eventEmitter.on(Events.FOCUS, this.onFocus, this);\r\n },\r\n\r\n /**\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events.\r\n *\r\n * @method Phaser.Game#step\r\n * @fires Phaser.Core.Events#PRE_STEP_EVENT\r\n * @fires Phaser.Core.Events#STEP_EVENT\r\n * @fires Phaser.Core.Events#POST_STEP_EVENT\r\n * @fires Phaser.Core.Events#PRE_RENDER_EVENT\r\n * @fires Phaser.Core.Events#POST_RENDER_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (this.pendingDestroy)\r\n {\r\n return this.runDestroy();\r\n }\r\n\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers like Input and Sound update in the prestep\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n // This is mostly meant for user-land code and plugins\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Update the Scene Manager and all active Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n // Our final event before rendering starts\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n var renderer = this.renderer;\r\n\r\n // Run the Pre-render (clearing the canvas, setting background colors, etc)\r\n\r\n renderer.preRender();\r\n\r\n eventEmitter.emit(Events.PRE_RENDER, renderer, time, delta);\r\n\r\n // The main render loop. Iterates all Scenes and all Cameras in those scenes, rendering to the renderer instance.\r\n\r\n this.scene.render(renderer);\r\n\r\n // The Post-Render call. Tidies up loose end, takes snapshots, etc.\r\n\r\n renderer.postRender();\r\n\r\n // The final event before the step repeats. Your last chance to do anything to the canvas before it all starts again.\r\n\r\n eventEmitter.emit(Events.POST_RENDER, renderer, time, delta);\r\n },\r\n\r\n /**\r\n * A special version of the Game Step for the HEADLESS renderer only.\r\n *\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * This process emits `prerender` and `postrender` events, even though nothing actually displays.\r\n *\r\n * @method Phaser.Game#headlessStep\r\n * @fires Phaser.Game#prerenderEvent\r\n * @fires Phaser.Game#postrenderEvent\r\n * @since 3.2.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n headlessStep: function (time, delta)\r\n {\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n // Render\r\n\r\n eventEmitter.emit(Events.PRE_RENDER);\r\n\r\n eventEmitter.emit(Events.POST_RENDER);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will pause the main loop and then emit a pause event.\r\n *\r\n * @method Phaser.Game#onHidden\r\n * @protected\r\n * @fires Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\n onHidden: function ()\r\n {\r\n this.loop.pause();\r\n\r\n this.events.emit(Events.PAUSE);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will resume the main loop and then emit a resume event.\r\n *\r\n * @method Phaser.Game#onVisible\r\n * @protected\r\n * @fires Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\n onVisible: function ()\r\n {\r\n this.loop.resume();\r\n\r\n this.events.emit(Events.RESUME);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'blurred\' state, which pauses it.\r\n *\r\n * @method Phaser.Game#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.hasFocus = false;\r\n\r\n this.loop.blur();\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'focused\' state, which resumes it.\r\n *\r\n * @method Phaser.Game#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.hasFocus = true;\r\n\r\n this.loop.focus();\r\n },\r\n\r\n /**\r\n * Returns the current game frame.\r\n * \r\n * When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.\r\n *\r\n * @method Phaser.Game#getFrame\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game frame.\r\n */\r\n getFrame: function ()\r\n {\r\n return this.loop.frame;\r\n },\r\n\r\n /**\r\n * Returns the time that the current game step started at, as based on `performance.now`.\r\n *\r\n * @method Phaser.Game#getTime\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game timestamp.\r\n */\r\n getTime: function ()\r\n {\r\n return this.loop.now;\r\n },\r\n\r\n /**\r\n * Flags this Game instance as needing to be destroyed on the _next frame_, making this an asynchronous operation.\r\n * \r\n * It will wait until the current frame has completed and then call `runDestroy` internally.\r\n * \r\n * If you need to react to the games eventual destruction, listen for the `DESTROY` event.\r\n * \r\n * If you **do not** need to run Phaser again on the same web page you can set the `noReturn` argument to `true` and it will free-up\r\n * memory being held by the core Phaser plugins. If you do need to create another game instance on the same page, leave this as `false`.\r\n *\r\n * @method Phaser.Game#destroy\r\n * @fires Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} removeCanvas - Set to `true` if you would like the parent canvas element removed from the DOM, or `false` to leave it in place.\r\n * @param {boolean} [noReturn=false] - If `true` all the core Phaser plugins are destroyed. You cannot create another instance of Phaser on the same web page if you do this.\r\n */\r\n destroy: function (removeCanvas, noReturn)\r\n {\r\n if (noReturn === undefined) { noReturn = false; }\r\n \r\n this.pendingDestroy = true;\r\n\r\n this.removeCanvas = removeCanvas;\r\n this.noReturn = noReturn;\r\n },\r\n\r\n /**\r\n * Destroys this Phaser.Game instance, all global systems, all sub-systems and all Scenes.\r\n *\r\n * @method Phaser.Game#runDestroy\r\n * @private\r\n * @since 3.5.0\r\n */\r\n runDestroy: function ()\r\n {\r\n this.events.emit(Events.DESTROY);\r\n\r\n this.events.removeAllListeners();\r\n\r\n this.scene.destroy();\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.destroy();\r\n }\r\n\r\n if (this.removeCanvas && this.canvas)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.canvas.parentNode)\r\n {\r\n this.canvas.parentNode.removeChild(this.canvas);\r\n }\r\n }\r\n\r\n if (this.domContainer)\r\n {\r\n this.domContainer.parentNode.removeChild(this.domContainer);\r\n }\r\n\r\n this.loop.destroy();\r\n \r\n this.pendingDestroy = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Game;\r\n\r\n/**\r\n * "Computers are good at following instructions, but not at reading your mind." - Donald Knuth\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Game.js?')},"./node_modules/phaser/src/core/TimeStep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar RequestAnimationFrame = __webpack_require__(/*! ../dom/RequestAnimationFrame */ \"./node_modules/phaser/src/dom/RequestAnimationFrame.js\");\r\n\r\n// Frame Rate config\r\n// fps: {\r\n// min: 10,\r\n// target: 60,\r\n// forceSetTimeOut: false,\r\n// deltaHistory: 10,\r\n// panicMax: 120\r\n// }\r\n\r\n// http://www.testufo.com/#test=animation-time-graph\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class TimeStep\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this Time Step.\r\n * @param {Phaser.Types.Core.FPSConfig} config\r\n */\r\nvar TimeStep = new Class({\r\n\r\n initialize:\r\n\r\n function TimeStep (game, config)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#raf\r\n * @type {Phaser.DOM.RequestAnimationFrame}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.raf = new RequestAnimationFrame();\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n *\r\n * @name Phaser.Core.TimeStep#started\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.started = false;\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n * The difference between this value and `started` is that `running` is toggled when\r\n * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if\r\n * the TimeStep is actually stopped, not just paused.\r\n *\r\n * @name Phaser.Core.TimeStep#running\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.running = false;\r\n\r\n /**\r\n * The minimum fps rate you want the Time Step to run at.\r\n *\r\n * @name Phaser.Core.TimeStep#minFps\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.minFps = GetValue(config, 'min', 5);\r\n\r\n /**\r\n * The target fps rate for the Time Step to run at.\r\n *\r\n * Setting this value will not actually change the speed at which the browser runs, that is beyond\r\n * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step\r\n * is spiraling out of control.\r\n *\r\n * @name Phaser.Core.TimeStep#targetFps\r\n * @type {integer}\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.targetFps = GetValue(config, 'target', 60);\r\n\r\n /**\r\n * The minFps value in ms.\r\n * Defaults to 200ms between frames (i.e. super slow!)\r\n *\r\n * @name Phaser.Core.TimeStep#_min\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._min = 1000 / this.minFps;\r\n\r\n /**\r\n * The targetFps value in ms.\r\n * Defaults to 16.66ms between frames (i.e. normal)\r\n *\r\n * @name Phaser.Core.TimeStep#_target\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._target = 1000 / this.targetFps;\r\n\r\n /**\r\n * An exponential moving average of the frames per second.\r\n *\r\n * @name Phaser.Core.TimeStep#actualFps\r\n * @type {integer}\r\n * @readonly\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.actualFps = this.targetFps;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#nextFpsUpdate\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextFpsUpdate = 0;\r\n\r\n /**\r\n * The number of frames processed this second.\r\n *\r\n * @name Phaser.Core.TimeStep#framesThisSecond\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.framesThisSecond = 0;\r\n\r\n /**\r\n * A callback to be invoked each time the Time Step steps.\r\n *\r\n * @name Phaser.Core.TimeStep#callback\r\n * @type {Phaser.Types.Core.TimeStepCallback}\r\n * @default NOOP\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting\r\n * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time.\r\n *\r\n * @name Phaser.Core.TimeStep#forceSetTimeOut\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceSetTimeOut = GetValue(config, 'forceSetTimeOut', false);\r\n\r\n /**\r\n * The time, calculated at the start of the current step, as smoothed by the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#time\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * The time at which the game started running. This value is adjusted if the game is then\r\n * paused and resumes.\r\n *\r\n * @name Phaser.Core.TimeStep#startTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` of the previous step.\r\n *\r\n * @name Phaser.Core.TimeStep#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n /**\r\n * The current frame the game is on. This counter is incremented once every game step, regardless of how much\r\n * time has passed and is unaffected by delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#frame\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frame = 0;\r\n\r\n /**\r\n * Is the browser currently considered in focus by the Page Visibility API?\r\n * This value is set in the `blur` method, which is called automatically by the Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#inFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inFocus = true;\r\n\r\n /**\r\n * The timestamp at which the game became paused, as determined by the Page Visibility API.\r\n *\r\n * @name Phaser.Core.TimeStep#_pauseTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pauseTime = 0;\r\n\r\n /**\r\n * An internal counter to allow for the browser 'cooling down' after coming back into focus.\r\n *\r\n * @name Phaser.Core.TimeStep#_coolDown\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._coolDown = 0;\r\n\r\n /**\r\n * The delta time, in ms, since the last game step. This is a clamped and smoothed average value.\r\n *\r\n * @name Phaser.Core.TimeStep#delta\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * Internal index of the delta history position.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaIndex\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.deltaIndex = 0;\r\n\r\n /**\r\n * Internal array holding the previous delta values, used for delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaHistory\r\n * @type {integer[]}\r\n * @since 3.0.0\r\n */\r\n this.deltaHistory = [];\r\n\r\n /**\r\n * The maximum number of delta values that are retained in order to calculate a smoothed moving average.\r\n * \r\n * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaSmoothingMax\r\n * @type {integer}\r\n * @default 10\r\n * @since 3.0.0\r\n */\r\n this.deltaSmoothingMax = GetValue(config, 'deltaHistory', 10);\r\n\r\n /**\r\n * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually\r\n * as a result of switching tabs and regaining focus.\r\n * \r\n * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120.\r\n *\r\n * @name Phaser.Core.TimeStep#panicMax\r\n * @type {integer}\r\n * @default 120\r\n * @since 3.0.0\r\n */\r\n this.panicMax = GetValue(config, 'panicMax', 120);\r\n\r\n /**\r\n * The actual elapsed time in ms between one update and the next.\r\n * \r\n * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value.\r\n * So please be careful when using this value in math calculations.\r\n *\r\n * @name Phaser.Core.TimeStep#rawDelta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rawDelta = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` at the very start of the current step.\r\n * This can differ from the `time` value in that it isn't calculated based on the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#now\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.now = 0;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onBlur event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#blur\r\n * @since 3.0.0\r\n */\r\n blur: function ()\r\n {\r\n this.inFocus = false;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onFocus event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#focus\r\n * @since 3.0.0\r\n */\r\n focus: function ()\r\n {\r\n this.inFocus = true;\r\n\r\n this.resetDelta();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#pause\r\n * @since 3.0.0\r\n */\r\n pause: function ()\r\n {\r\n this._pauseTime = window.performance.now();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#resume\r\n * @since 3.0.0\r\n */\r\n resume: function ()\r\n {\r\n this.resetDelta();\r\n\r\n this.startTime += this.time - this._pauseTime;\r\n },\r\n\r\n /**\r\n * Resets the time, lastTime, fps averages and delta history.\r\n * Called automatically when a browser sleeps them resumes.\r\n *\r\n * @method Phaser.Core.TimeStep#resetDelta\r\n * @since 3.0.0\r\n */\r\n resetDelta: function ()\r\n {\r\n var now = window.performance.now();\r\n\r\n this.time = now;\r\n this.lastTime = now;\r\n this.nextFpsUpdate = now + 1000;\r\n this.framesThisSecond = 0;\r\n\r\n // Pre-populate smoothing array\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = Math.min(this._target, this.deltaHistory[i]);\r\n }\r\n\r\n this.delta = 0;\r\n this.deltaIndex = 0;\r\n\r\n this._coolDown = this.panicMax;\r\n },\r\n\r\n /**\r\n * Starts the Time Step running, if it is not already doing so.\r\n * Called automatically by the Game Boot process.\r\n *\r\n * @method Phaser.Core.TimeStep#start\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.TimeStepCallback} callback - The callback to be invoked each time the Time Step steps.\r\n */\r\n start: function (callback)\r\n {\r\n if (this.started)\r\n {\r\n return this;\r\n }\r\n\r\n this.started = true;\r\n this.running = true;\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = this._target;\r\n }\r\n\r\n this.resetDelta();\r\n\r\n this.startTime = window.performance.now();\r\n\r\n this.callback = callback;\r\n\r\n this.raf.start(this.step.bind(this), this.forceSetTimeOut);\r\n },\r\n\r\n /**\r\n * The main step method. This is called each time the browser updates, either by Request Animation Frame,\r\n * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more.\r\n * You generally should never call this method directly.\r\n *\r\n * @method Phaser.Core.TimeStep#step\r\n * @since 3.0.0\r\n */\r\n step: function ()\r\n {\r\n // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in,\r\n // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a\r\n // more accurate one:\r\n\r\n var time = window.performance.now();\r\n\r\n this.now = time;\r\n\r\n var before = time - this.lastTime;\r\n\r\n if (before < 0)\r\n {\r\n // Because, Chrome.\r\n before = 0;\r\n }\r\n\r\n this.rawDelta = before;\r\n\r\n var idx = this.deltaIndex;\r\n var history = this.deltaHistory;\r\n var max = this.deltaSmoothingMax;\r\n\r\n // delta time (time is in ms)\r\n var dt = before;\r\n\r\n // When a browser switches tab, then comes back again, it takes around 10 frames before\r\n // the delta time settles down so we employ a 'cooling down' period before we start\r\n // trusting the delta values again, to avoid spikes flooding through our delta average\r\n\r\n if (this._coolDown > 0 || !this.inFocus)\r\n {\r\n this._coolDown--;\r\n\r\n dt = Math.min(dt, this._target);\r\n }\r\n\r\n if (dt > this._min)\r\n {\r\n // Probably super bad start time or browser tab context loss,\r\n // so use the last 'sane' dt value\r\n\r\n dt = history[idx];\r\n\r\n // Clamp delta to min (in case history has become corrupted somehow)\r\n dt = Math.min(dt, this._min);\r\n }\r\n\r\n // Smooth out the delta over the previous X frames\r\n\r\n // add the delta to the smoothing array\r\n history[idx] = dt;\r\n\r\n // adjusts the delta history array index based on the smoothing count\r\n // this stops the array growing beyond the size of deltaSmoothingMax\r\n this.deltaIndex++;\r\n\r\n if (this.deltaIndex > max)\r\n {\r\n this.deltaIndex = 0;\r\n }\r\n\r\n // Delta Average\r\n var avg = 0;\r\n\r\n // Loop the history array, adding the delta values together\r\n\r\n for (var i = 0; i < max; i++)\r\n {\r\n avg += history[i];\r\n }\r\n\r\n // Then divide by the array length to get the average delta\r\n avg /= max;\r\n\r\n // Set as the world delta value\r\n this.delta = avg;\r\n\r\n // Real-world timer advance\r\n this.time += this.rawDelta;\r\n\r\n // Update the estimate of the frame rate, `fps`. Every second, the number\r\n // of frames that occurred in that second are included in an exponential\r\n // moving average of all frames per second, with an alpha of 0.25. This\r\n // means that more recent seconds affect the estimated frame rate more than\r\n // older seconds.\r\n //\r\n // When a browser window is NOT minimized, but is covered up (i.e. you're using\r\n // another app which has spawned a window over the top of the browser), then it\r\n // will start to throttle the raf callback time. It waits for a while, and then\r\n // starts to drop the frame rate at 1 frame per second until it's down to just over 1fps.\r\n // So if the game was running at 60fps, and the player opens a new window, then\r\n // after 60 seconds (+ the 'buffer time') it'll be down to 1fps, so rafin'g at 1Hz.\r\n //\r\n // When they make the game visible again, the frame rate is increased at a rate of\r\n // approx. 8fps, back up to 60fps (or the max it can obtain)\r\n //\r\n // There is no easy way to determine if this drop in frame rate is because the\r\n // browser is throttling raf, or because the game is struggling with performance\r\n // because you're asking it to do too much on the device.\r\n\r\n if (time > this.nextFpsUpdate)\r\n {\r\n // Compute the new exponential moving average with an alpha of 0.25.\r\n this.actualFps = 0.25 * this.framesThisSecond + 0.75 * this.actualFps;\r\n this.nextFpsUpdate = time + 1000;\r\n this.framesThisSecond = 0;\r\n }\r\n\r\n this.framesThisSecond++;\r\n\r\n // Interpolation - how far between what is expected and where we are?\r\n var interpolation = avg / this._target;\r\n\r\n this.callback(time, avg, interpolation);\r\n\r\n // Shift time value over\r\n this.lastTime = time;\r\n\r\n this.frame++;\r\n },\r\n\r\n /**\r\n * Manually calls `TimeStep.step`.\r\n *\r\n * @method Phaser.Core.TimeStep#tick\r\n * @since 3.0.0\r\n */\r\n tick: function ()\r\n {\r\n this.step();\r\n },\r\n\r\n /**\r\n * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false.\r\n *\r\n * @method Phaser.Core.TimeStep#sleep\r\n * @since 3.0.0\r\n */\r\n sleep: function ()\r\n {\r\n if (this.running)\r\n {\r\n this.raf.stop();\r\n\r\n this.running = false;\r\n }\r\n },\r\n\r\n /**\r\n * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true.\r\n * The `seamless` argument controls if the wake-up should adjust the start time or not.\r\n *\r\n * @method Phaser.Core.TimeStep#wake\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [seamless=false] - Adjust the startTime based on the lastTime values.\r\n */\r\n wake: function (seamless)\r\n {\r\n if (this.running)\r\n {\r\n this.sleep();\r\n }\r\n else if (seamless)\r\n {\r\n this.startTime += -this.lastTime + (this.lastTime + window.performance.now());\r\n }\r\n\r\n this.raf.start(this.step.bind(this), this.useRAF);\r\n\r\n this.running = true;\r\n\r\n this.step();\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in seconds.\r\n *\r\n * @method Phaser.Core.TimeStep#getDuration\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in seconds.\r\n */\r\n getDuration: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime) / 1000;\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in ms.\r\n *\r\n * @method Phaser.Core.TimeStep#getDurationMS\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in ms.\r\n */\r\n getDurationMS: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime);\r\n },\r\n\r\n /**\r\n * Stops the TimeStep running.\r\n *\r\n * @method Phaser.Core.TimeStep#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Core.TimeStep} The TimeStep object.\r\n */\r\n stop: function ()\r\n {\r\n this.running = false;\r\n this.started = false;\r\n\r\n this.raf.stop();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null\r\n * any objects.\r\n *\r\n * @method Phaser.Core.TimeStep#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n\r\n this.raf = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimeStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/TimeStep.js?")},"./node_modules/phaser/src/core/VisibilityHandler.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * The Visibility Handler is responsible for listening out for document level visibility change events.\r\n * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses\r\n * the provided Event Emitter and fires the related events.\r\n *\r\n * @function Phaser.Core.VisibilityHandler\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance this Visibility Handler is working on.\r\n */\r\nvar VisibilityHandler = function (game)\r\n{\r\n var hiddenVar;\r\n var eventEmitter = game.events;\r\n\r\n if (document.hidden !== undefined)\r\n {\r\n hiddenVar = 'visibilitychange';\r\n }\r\n else\r\n {\r\n var vendors = [ 'webkit', 'moz', 'ms' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n if (document[prefix + 'Hidden'] !== undefined)\r\n {\r\n document.hidden = function ()\r\n {\r\n return document[prefix + 'Hidden'];\r\n };\r\n\r\n hiddenVar = prefix + 'visibilitychange';\r\n }\r\n\r\n });\r\n }\r\n\r\n var onChange = function (event)\r\n {\r\n if (document.hidden || event.type === 'pause')\r\n {\r\n eventEmitter.emit(Events.HIDDEN);\r\n }\r\n else\r\n {\r\n eventEmitter.emit(Events.VISIBLE);\r\n }\r\n };\r\n\r\n if (hiddenVar)\r\n {\r\n document.addEventListener(hiddenVar, onChange, false);\r\n }\r\n\r\n window.onblur = function ()\r\n {\r\n eventEmitter.emit(Events.BLUR);\r\n };\r\n\r\n window.onfocus = function ()\r\n {\r\n eventEmitter.emit(Events.FOCUS);\r\n };\r\n\r\n // Automatically give the window focus unless config says otherwise\r\n if (window.focus && game.config.autoFocus)\r\n {\r\n window.focus();\r\n }\r\n};\r\n\r\nmodule.exports = VisibilityHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/VisibilityHandler.js?")},"./node_modules/phaser/src/core/events/BLUR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BLUR_EVENT.js?")},"./node_modules/phaser/src/core/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js?")},"./node_modules/phaser/src/core/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/core/events/FOCUS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/FOCUS_EVENT.js?")},"./node_modules/phaser/src/core/events/HIDDEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/HIDDEN_EVENT.js?")},"./node_modules/phaser/src/core/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/READY_EVENT.js?")},"./node_modules/phaser/src/core/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/core/events/STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/VISIBLE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/VISIBLE_EVENT.js?")},"./node_modules/phaser/src/core/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: __webpack_require__(/*! ./BLUR_EVENT */ "./node_modules/phaser/src/core/events/BLUR_EVENT.js"),\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/core/events/BOOT_EVENT.js"),\r\n CONTEXT_LOST: __webpack_require__(/*! ./CONTEXT_LOST_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js"),\r\n CONTEXT_RESTORED: __webpack_require__(/*! ./CONTEXT_RESTORED_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/core/events/DESTROY_EVENT.js"),\r\n FOCUS: __webpack_require__(/*! ./FOCUS_EVENT */ "./node_modules/phaser/src/core/events/FOCUS_EVENT.js"),\r\n HIDDEN: __webpack_require__(/*! ./HIDDEN_EVENT */ "./node_modules/phaser/src/core/events/HIDDEN_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/core/events/PAUSE_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js"),\r\n POST_STEP: __webpack_require__(/*! ./POST_STEP_EVENT */ "./node_modules/phaser/src/core/events/POST_STEP_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js"),\r\n PRE_STEP: __webpack_require__(/*! ./PRE_STEP_EVENT */ "./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/core/events/READY_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/core/events/RESUME_EVENT.js"),\r\n STEP: __webpack_require__(/*! ./STEP_EVENT */ "./node_modules/phaser/src/core/events/STEP_EVENT.js"),\r\n VISIBLE: __webpack_require__(/*! ./VISIBLE_EVENT */ "./node_modules/phaser/src/core/events/VISIBLE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/index.js?')},"./node_modules/phaser/src/core/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Config: __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js"),\r\n CreateRenderer: __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js"),\r\n DebugHeader: __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js"),\r\n TimeStep: __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js"),\r\n VisibilityHandler: __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/index.js?')},"./node_modules/phaser/src/create/GenerateTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arne16 = __webpack_require__(/*! ./palettes/Arne16 */ \"./node_modules/phaser/src/create/palettes/Arne16.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Create.GenerateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description]\r\n *\r\n * @return {HTMLCanvasElement} [description]\r\n */\r\nvar GenerateTexture = function (config)\r\n{\r\n var data = GetValue(config, 'data', []);\r\n var canvas = GetValue(config, 'canvas', null);\r\n var palette = GetValue(config, 'palette', Arne16);\r\n var pixelWidth = GetValue(config, 'pixelWidth', 1);\r\n var pixelHeight = GetValue(config, 'pixelHeight', pixelWidth);\r\n var resizeCanvas = GetValue(config, 'resizeCanvas', true);\r\n var clearCanvas = GetValue(config, 'clearCanvas', true);\r\n var preRender = GetValue(config, 'preRender', null);\r\n var postRender = GetValue(config, 'postRender', null);\r\n\r\n var width = Math.floor(Math.abs(data[0].length * pixelWidth));\r\n var height = Math.floor(Math.abs(data.length * pixelHeight));\r\n\r\n if (!canvas)\r\n {\r\n canvas = CanvasPool.create2D(this, width, height);\r\n resizeCanvas = false;\r\n clearCanvas = false;\r\n }\r\n\r\n if (resizeCanvas)\r\n {\r\n canvas.width = width;\r\n canvas.height = height;\r\n }\r\n\r\n var ctx = canvas.getContext('2d');\r\n\r\n if (clearCanvas)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n // preRender Callback?\r\n if (preRender)\r\n {\r\n preRender(canvas, ctx);\r\n }\r\n\r\n // Draw it\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var d = row[x];\r\n\r\n if (d !== '.' && d !== ' ')\r\n {\r\n ctx.fillStyle = palette[d];\r\n ctx.fillRect(x * pixelWidth, y * pixelHeight, pixelWidth, pixelHeight);\r\n }\r\n }\r\n }\r\n\r\n // postRender Callback?\r\n if (postRender)\r\n {\r\n postRender(canvas, ctx);\r\n }\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = GenerateTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/GenerateTexture.js?")},"./node_modules/phaser/src/create/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create\r\n */\r\n\r\nmodule.exports = {\r\n \r\n GenerateTexture: __webpack_require__(/*! ./GenerateTexture */ "./node_modules/phaser/src/create/GenerateTexture.js"),\r\n Palettes: __webpack_require__(/*! ./palettes */ "./node_modules/phaser/src/create/palettes/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/index.js?')},"./node_modules/phaser/src/create/palettes/Arne16.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.ARNE16\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#9D9D9D',\r\n 2: '#FFF',\r\n 3: '#BE2633',\r\n 4: '#E06F8B',\r\n 5: '#493C2B',\r\n 6: '#A46422',\r\n 7: '#EB8931',\r\n 8: '#F7E26B',\r\n 9: '#2F484E',\r\n A: '#44891A',\r\n B: '#A3CE27',\r\n C: '#1B2632',\r\n D: '#005784',\r\n E: '#31A2F2',\r\n F: '#B2DCEF'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/Arne16.js?")},"./node_modules/phaser/src/create/palettes/C64.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by the Commodore 64.\r\n *\r\n * @name Phaser.Create.Palettes.C64\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#fff',\r\n 2: '#8b4131',\r\n 3: '#7bbdc5',\r\n 4: '#8b41ac',\r\n 5: '#6aac41',\r\n 6: '#3931a4',\r\n 7: '#d5de73',\r\n 8: '#945a20',\r\n 9: '#5a4100',\r\n A: '#bd736a',\r\n B: '#525252',\r\n C: '#838383',\r\n D: '#acee8b',\r\n E: '#7b73de',\r\n F: '#acacac'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/C64.js?")},"./node_modules/phaser/src/create/palettes/CGA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color CGA inspired palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.CGA\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#2234d1',\r\n 2: '#0c7e45',\r\n 3: '#44aacc',\r\n 4: '#8a3622',\r\n 5: '#5c2e78',\r\n 6: '#aa5c3d',\r\n 7: '#b5b5b5',\r\n 8: '#5e606e',\r\n 9: '#4c81fb',\r\n A: '#6cd947',\r\n B: '#7be2f9',\r\n C: '#eb8a60',\r\n D: '#e23d69',\r\n E: '#ffd93f',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/CGA.js?")},"./node_modules/phaser/src/create/palettes/JMP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color JMP palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.JMP\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#f5f4eb'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/JMP.js?")},"./node_modules/phaser/src/create/palettes/MSX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by Japanese computers like the MSX.\r\n *\r\n * @name Phaser.Create.Palettes.MSX\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/MSX.js?")},"./node_modules/phaser/src/create/palettes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create.Palettes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARNE16: __webpack_require__(/*! ./Arne16 */ "./node_modules/phaser/src/create/palettes/Arne16.js"),\r\n C64: __webpack_require__(/*! ./C64 */ "./node_modules/phaser/src/create/palettes/C64.js"),\r\n CGA: __webpack_require__(/*! ./CGA */ "./node_modules/phaser/src/create/palettes/CGA.js"),\r\n JMP: __webpack_require__(/*! ./JMP */ "./node_modules/phaser/src/create/palettes/JMP.js"),\r\n MSX: __webpack_require__(/*! ./MSX */ "./node_modules/phaser/src/create/palettes/MSX.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/index.js?')},"./node_modules/phaser/src/curves/CubicBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CubicBezier = __webpack_require__(/*! ../math/interpolation/CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A higher-order Bézier curve constructed of four points.\r\n *\r\n * @class CubicBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector2[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n * @param {Phaser.Math.Vector2} p3 - End Point.\r\n */\r\nvar CubicBezierCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function CubicBezierCurve (p0, p1, p2, p3)\r\n {\r\n Curve.call(this, \'CubicBezierCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p3 = new Vector2(p0[6], p0[7]);\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The start point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The first control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * The second control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p2 = p2;\r\n\r\n /**\r\n * The end point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p3\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p3 = p3;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Returns the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - The amount of divisions used by this curve.\r\n *\r\n * @return {number} The resolution of the curve.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n var p3 = this.p3;\r\n\r\n return out.set(CubicBezier(t, p0.x, p1.x, p2.x, p3.x), CubicBezier(t, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * Draws this curve to the specified graphics object.\r\n *\r\n * @method Phaser.Curves.CubicBezier#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The graphics object this curve should be drawn to.\r\n * @param {integer} [pointsTotal=32] - The number of intermediary points that make up this curve. A higher number of points will result in a smoother curve.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The graphics object this curve was drawn to. Useful for method chaining.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Returns a JSON object that describes this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y,\r\n this.p3.x, this.p3.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Generates a curve from a JSON object.\r\n *\r\n * @function Phaser.Curves.CubicBezier.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.CubicBezier} The curve generated from the JSON object.\r\n */\r\nCubicBezierCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n var p3 = new Vector2(points[6], points[7]);\r\n\r\n return new CubicBezierCurve(p0, p1, p2, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/CubicBezierCurve.js?')},"./node_modules/phaser/src/curves/Curve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ \"./node_modules/phaser/src/geom/rectangle/FromPoints.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Curve class, which all other curve types extend.\r\n *\r\n * Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n *\r\n * @class Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - [description]\r\n */\r\nvar Curve = new Class({\r\n\r\n initialize:\r\n\r\n function Curve (type)\r\n {\r\n /**\r\n * String based identifier for the type of curve.\r\n *\r\n * @name Phaser.Curves.Curve#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The default number of divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#defaultDivisions\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.defaultDivisions = 5;\r\n\r\n /**\r\n * The quantity of arc length divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#arcLengthDivisions\r\n * @type {integer}\r\n * @default 100\r\n * @since 3.0.0\r\n */\r\n this.arcLengthDivisions = 100;\r\n\r\n /**\r\n * An array of cached arc length values.\r\n *\r\n * @name Phaser.Curves.Curve#cacheArcLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheArcLengths = [];\r\n\r\n /**\r\n * Does the data of this curve need updating?\r\n *\r\n * @name Phaser.Curves.Curve#needsUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.needsUpdate = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Curve#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n },\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Curve#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n * @param {integer} [pointsTotal=32] - The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n // So you can chain graphics calls\r\n return graphics.strokePoints(this.getPoints(pointsTotal));\r\n },\r\n \r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * You can control the accuracy of the bounds. The value given is used to work out how many points\r\n * to plot across the curve. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @method Phaser.Curves.Curve#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in. If falsey a new object will be created.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (!out) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n var len = this.getLength();\r\n\r\n if (accuracy > len)\r\n {\r\n accuracy = len / 2;\r\n }\r\n\r\n // The length of the curve in pixels\r\n // So we'll have 1 spaced point per 'accuracy' pixels\r\n\r\n var spaced = Math.max(1, Math.round(len / accuracy));\r\n\r\n return FromPoints(this.getSpacedPoints(spaced), out);\r\n },\r\n\r\n /**\r\n * Returns an array of points, spaced out X distance pixels apart.\r\n * The smaller the distance, the larger the array will be.\r\n *\r\n * @method Phaser.Curves.Curve#getDistancePoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - The distance, in pixels, between each point along the curve.\r\n *\r\n * @return {Phaser.Geom.Point[]} An Array of Point objects.\r\n */\r\n getDistancePoints: function (distance)\r\n {\r\n var len = this.getLength();\r\n\r\n var spaced = Math.max(1, len / distance);\r\n\r\n return this.getSpacedPoints(spaced);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - Optional Vector object to store the result in.\r\n *\r\n * @return {Phaser.Math.Vector2} Vector2 containing the coordinates of the curves end point.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(1, out);\r\n },\r\n\r\n /**\r\n * Get total curve arc length\r\n *\r\n * @method Phaser.Curves.Curve#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getLength: function ()\r\n {\r\n var lengths = this.getLengths();\r\n\r\n return lengths[lengths.length - 1];\r\n },\r\n\r\n\r\n /**\r\n * Get list of cumulative segment lengths\r\n *\r\n * @method Phaser.Curves.Curve#getLengths\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number[]} [description]\r\n */\r\n getLengths: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.arcLengthDivisions; }\r\n\r\n if ((this.cacheArcLengths.length === divisions + 1) && !this.needsUpdate)\r\n {\r\n return this.cacheArcLengths;\r\n }\r\n\r\n this.needsUpdate = false;\r\n\r\n var cache = [];\r\n var current;\r\n var last = this.getPoint(0, this._tmpVec2A);\r\n var sum = 0;\r\n\r\n cache.push(0);\r\n\r\n for (var p = 1; p <= divisions; p++)\r\n {\r\n current = this.getPoint(p / divisions, this._tmpVec2B);\r\n\r\n sum += current.distance(last);\r\n\r\n cache.push(sum);\r\n\r\n last.copy(current);\r\n }\r\n\r\n this.cacheArcLengths = cache;\r\n\r\n return cache; // { sums: cache, sum:sum }; Sum is in the last element.\r\n },\r\n\r\n // Get point at relative position in curve according to arc length\r\n\r\n // - u [0 .. 1]\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getPoint(t, out);\r\n },\r\n\r\n // Get sequence of points using getPoint( t )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n points.push(this.getPoint(d / divisions));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n // Get sequence of points using getPointAt( u )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n var t = this.getUtoTmapping(d / divisions, null, divisions);\r\n\r\n points.push(this.getPoint(t));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(0, out);\r\n },\r\n\r\n /**\r\n * Returns a unit vector tangent at t\r\n * In case any sub curve does not implement its tangent derivation,\r\n * 2 points a small delta apart will be used to find its gradient\r\n * which seems to give a reasonable approximation\r\n *\r\n * @method Phaser.Curves.Curve#getTangent\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001)\r\n */\r\n getTangent: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var delta = 0.0001;\r\n var t1 = t - delta;\r\n var t2 = t + delta;\r\n\r\n // Capping in case of danger\r\n\r\n if (t1 < 0)\r\n {\r\n t1 = 0;\r\n }\r\n\r\n if (t2 > 1)\r\n {\r\n t2 = 1;\r\n }\r\n\r\n this.getPoint(t1, this._tmpVec2A);\r\n this.getPoint(t2, out);\r\n\r\n return out.subtract(this._tmpVec2A).normalize();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTangentAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getTangentAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getTangent(t, out);\r\n },\r\n\r\n // Given a distance in pixels, get a t to find p.\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTFromDistance\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getTFromDistance: function (distance, divisions)\r\n {\r\n if (distance <= 0)\r\n {\r\n return 0;\r\n }\r\n\r\n return this.getUtoTmapping(0, distance, divisions);\r\n },\r\n\r\n // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getUtoTmapping\r\n * @since 3.0.0\r\n *\r\n * @param {number} u - [description]\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getUtoTmapping: function (u, distance, divisions)\r\n {\r\n var arcLengths = this.getLengths(divisions);\r\n\r\n var i = 0;\r\n var il = arcLengths.length;\r\n\r\n var targetArcLength; // The targeted u distance value to get\r\n\r\n if (distance)\r\n {\r\n // Cannot overshoot the curve\r\n targetArcLength = Math.min(distance, arcLengths[il - 1]);\r\n }\r\n else\r\n {\r\n targetArcLength = u * arcLengths[il - 1];\r\n }\r\n\r\n // binary search for the index with largest value smaller than target u distance\r\n\r\n var low = 0;\r\n var high = il - 1;\r\n var comparison;\r\n\r\n while (low <= high)\r\n {\r\n i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\r\n\r\n comparison = arcLengths[i] - targetArcLength;\r\n\r\n if (comparison < 0)\r\n {\r\n low = i + 1;\r\n }\r\n else if (comparison > 0)\r\n {\r\n high = i - 1;\r\n }\r\n else\r\n {\r\n high = i;\r\n break;\r\n }\r\n }\r\n\r\n i = high;\r\n\r\n if (arcLengths[i] === targetArcLength)\r\n {\r\n return i / (il - 1);\r\n }\r\n\r\n // we could get finer grain at lengths, or use simple interpolation between two points\r\n\r\n var lengthBefore = arcLengths[i];\r\n var lengthAfter = arcLengths[i + 1];\r\n\r\n var segmentLength = lengthAfter - lengthBefore;\r\n\r\n // determine where we are between the 'before' and 'after' points\r\n\r\n var segmentFraction = (targetArcLength - lengthBefore) / segmentLength;\r\n\r\n // add that fractional amount to t\r\n\r\n return (i + segmentFraction) / (il - 1);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.needsUpdate = true;\r\n\r\n this.getLengths();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/Curve.js?")},"./node_modules/phaser/src/curves/EllipseCurve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Curve = __webpack_require__(/*! ./Curve */ \"./node_modules/phaser/src/curves/Curve.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Elliptical Curve derived from the Base Curve class.\r\n * \r\n * See https://en.wikipedia.org/wiki/Elliptic_curve for more details.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.Curves.EllipseCurveConfig)} [x=0] - The x coordinate of the ellipse, or an Ellipse Curve configuration object.\r\n * @param {number} [y=0] - The y coordinate of the ellipse.\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {integer} [rotation=0] - The rotation of the ellipse, in degrees.\r\n */\r\nvar EllipseCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function EllipseCurve (x, y, xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetValue(config, 'x', 0);\r\n y = GetValue(config, 'y', 0);\r\n xRadius = GetValue(config, 'xRadius', 0);\r\n yRadius = GetValue(config, 'yRadius', xRadius);\r\n startAngle = GetValue(config, 'startAngle', 0);\r\n endAngle = GetValue(config, 'endAngle', 360);\r\n clockwise = GetValue(config, 'clockwise', false);\r\n rotation = GetValue(config, 'rotation', 0);\r\n }\r\n else\r\n {\r\n if (yRadius === undefined) { yRadius = xRadius; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (clockwise === undefined) { clockwise = false; }\r\n if (rotation === undefined) { rotation = 0; }\r\n }\r\n\r\n Curve.call(this, 'EllipseCurve');\r\n\r\n // Center point\r\n\r\n /**\r\n * The center point of the ellipse. Used for calculating rotation.\r\n *\r\n * @name Phaser.Curves.Ellipse#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_xRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._xRadius = xRadius;\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_yRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._yRadius = yRadius;\r\n\r\n // Radians\r\n\r\n /**\r\n * The starting angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_startAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._startAngle = DegToRad(startAngle);\r\n\r\n /**\r\n * The end angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_endAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._endAngle = DegToRad(endAngle);\r\n\r\n /**\r\n * Anti-clockwise direction.\r\n *\r\n * @name Phaser.Curves.Ellipse#_clockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._clockwise = clockwise;\r\n\r\n /**\r\n * The rotation of the arc.\r\n *\r\n * @name Phaser.Curves.Ellipse#_rotation\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._rotation = DegToRad(rotation);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(0, out);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Ellipse#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * 2;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var twoPi = Math.PI * 2;\r\n var deltaAngle = this._endAngle - this._startAngle;\r\n var samePoints = Math.abs(deltaAngle) < Number.EPSILON;\r\n\r\n // ensures that deltaAngle is 0 .. 2 PI\r\n while (deltaAngle < 0)\r\n {\r\n deltaAngle += twoPi;\r\n }\r\n\r\n while (deltaAngle > twoPi)\r\n {\r\n deltaAngle -= twoPi;\r\n }\r\n\r\n if (deltaAngle < Number.EPSILON)\r\n {\r\n if (samePoints)\r\n {\r\n deltaAngle = 0;\r\n }\r\n else\r\n {\r\n deltaAngle = twoPi;\r\n }\r\n }\r\n\r\n if (this._clockwise && !samePoints)\r\n {\r\n if (deltaAngle === twoPi)\r\n {\r\n deltaAngle = - twoPi;\r\n }\r\n else\r\n {\r\n deltaAngle = deltaAngle - twoPi;\r\n }\r\n }\r\n\r\n var angle = this._startAngle + t * deltaAngle;\r\n var x = this.p0.x + this._xRadius * Math.cos(angle);\r\n var y = this.p0.y + this._yRadius * Math.sin(angle);\r\n\r\n if (this._rotation !== 0)\r\n {\r\n var cos = Math.cos(this._rotation);\r\n var sin = Math.sin(this._rotation);\r\n\r\n var tx = x - this.p0.x;\r\n var ty = y - this.p0.y;\r\n\r\n // Rotate the point about the center of the ellipse.\r\n x = tx * cos - ty * sin + this.p0.x;\r\n y = tx * sin + ty * cos + this.p0.y;\r\n }\r\n\r\n return out.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the horizontal radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setXRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setXRadius: function (value)\r\n {\r\n this.xRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setYRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setYRadius: function (value)\r\n {\r\n this.yRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The width of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setWidth: function (value)\r\n {\r\n this.xRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the height of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setHeight\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The height of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setHeight: function (value)\r\n {\r\n this.yRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setStartAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The start angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setStartAngle: function (value)\r\n {\r\n this.startAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the end angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setEndAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The end angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setEndAngle: function (value)\r\n {\r\n this.endAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this curve extends clockwise or anti-clockwise.\r\n *\r\n * @method Phaser.Curves.Ellipse#setClockwise\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The clockwise state of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setClockwise: function (value)\r\n {\r\n this.clockwise = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The rotation of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setRotation: function (value)\r\n {\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#xRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n xRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._xRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._xRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#yRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n yRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._yRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._yRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#startAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._startAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#endAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._endAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * `true` if the ellipse rotation is clockwise or `false` if anti-clockwise.\r\n *\r\n * @name Phaser.Curves.Ellipse#clockwise\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n clockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._clockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._clockwise = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#angle\r\n * @type {number}\r\n * @since 3.14.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._rotation);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * JSON serialization of the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONEllipseCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n x: this.p0.x,\r\n y: this.p0.y,\r\n xRadius: this._xRadius,\r\n yRadius: this._yRadius,\r\n startAngle: RadToDeg(this._startAngle),\r\n endAngle: RadToDeg(this._endAngle),\r\n clockwise: this._clockwise,\r\n rotation: RadToDeg(this._rotation)\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from the provided Ellipse Curve Configuration object.\r\n *\r\n * @function Phaser.Curves.Ellipse.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONEllipseCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Ellipse} The ellipse curve constructed from the configuration object.\r\n */\r\nEllipseCurve.fromJSON = function (data)\r\n{\r\n return new EllipseCurve(data);\r\n};\r\n\r\nmodule.exports = EllipseCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/EllipseCurve.js?")},"./node_modules/phaser/src/curves/LineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\nvar tmpVec2 = new Vector2();\r\n\r\n/**\r\n * @classdesc\r\n * A LineCurve is a "curve" comprising exactly two points (a line segment).\r\n *\r\n * @class Line\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - The first endpoint.\r\n * @param {Phaser.Math.Vector2} [p1] - The second endpoint.\r\n */\r\nvar LineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n // vec2s or array\r\n function LineCurve (p0, p1)\r\n {\r\n Curve.call(this, \'LineCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The first endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The second endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * @method Phaser.Curves.Line#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n return FromPoints([ this.p0, this.p1 ], out);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Line#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Gets the resolution of the line.\r\n *\r\n * @method Phaser.Curves.Line#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} [divisions=1] - The number of divisions to consider.\r\n *\r\n * @return {number} The resolution. Equal to the number of divisions.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 1; }\r\n\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (t === 1)\r\n {\r\n return out.copy(this.p1);\r\n }\r\n\r\n out.copy(this.p1).subtract(this.p0).scale(t).add(this.p0);\r\n\r\n return out;\r\n },\r\n\r\n // Line curve is linear, so we can overwrite default getPointAt\r\n\r\n /**\r\n * Gets a point at a given position on the line.\r\n *\r\n * @method Phaser.Curves.Line#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the slope of the line as a unit vector.\r\n *\r\n * @method Phaser.Curves.Line#getTangent\r\n * @since 3.0.0\r\n * \r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @return {Phaser.Math.Vector2} The tangent vector.\r\n */\r\n getTangent: function ()\r\n {\r\n var tangent = tmpVec2.copy(this.p1).subtract(this.p0);\r\n\r\n return tangent.normalize();\r\n },\r\n\r\n // Override default Curve.draw because this is better than calling getPoints on a line!\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.lineBetween` so will be drawn at whatever the present Graphics line color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Line#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics)\r\n {\r\n graphics.lineBetween(this.p0.x, this.p0.y, this.p1.x, this.p1.y);\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Gets a JSON representation of the line.\r\n *\r\n * @method Phaser.Curves.Line#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Configures this line from a JSON representation.\r\n *\r\n * @function Phaser.Curves.Line.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Line} A new LineCurve object.\r\n */\r\nLineCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n\r\n return new LineCurve(p0, p1);\r\n};\r\n\r\nmodule.exports = LineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/LineCurve.js?')},"./node_modules/phaser/src/curves/QuadraticBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar QuadraticBezierInterpolation = __webpack_require__(/*! ../math/interpolation/QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class QuadraticBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n */\r\nvar QuadraticBezier = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function QuadraticBezier (p0, p1, p2)\r\n {\r\n Curve.call(this, \'QuadraticBezier\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p2 = p2;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getStartPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getResolution\r\n * @since 3.2.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n\r\n return out.set(\r\n QuadraticBezierInterpolation(t, p0.x, p1.x, p2.x),\r\n QuadraticBezierInterpolation(t, p0.y, p1.y, p2.y)\r\n );\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#draw\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - `Graphics` object to draw onto.\r\n * @param {integer} [pointsTotal=32] - Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} `Graphics` object that was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Converts the curve into a JSON compatible object.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#toJSON\r\n * @since 3.2.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from a JSON object, e. g. created by `toJSON`.\r\n *\r\n * @function Phaser.Curves.QuadraticBezier.fromJSON\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.QuadraticBezier} The created curve instance.\r\n */\r\nQuadraticBezier.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n\r\n return new QuadraticBezier(p0, p1, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezier;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/QuadraticBezierCurve.js?')},"./node_modules/phaser/src/curves/SplineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../math/CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Spline\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} [points] - [description]\r\n */\r\nvar SplineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function SplineCurve (points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n Curve.call(this, \'SplineCurve\');\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Spline#points\r\n * @type {Phaser.Math.Vector2[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n this.addPoints(points);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description]\r\n *\r\n * @return {Phaser.Curves.Spline} This curve object.\r\n */\r\n addPoints: function (points)\r\n {\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var p = new Vector2();\r\n\r\n if (typeof points[i] === \'number\')\r\n {\r\n p.x = points[i];\r\n p.y = points[i + 1];\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n addPoint: function (x, y)\r\n {\r\n var vec = new Vector2(x, y);\r\n\r\n this.points.push(vec);\r\n\r\n return vec;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Spline#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.points[0]);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * this.points.length;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Spline#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var points = this.points;\r\n\r\n var point = (points.length - 1) * t;\r\n\r\n var intPoint = Math.floor(point);\r\n\r\n var weight = point - intPoint;\r\n\r\n var p0 = points[(intPoint === 0) ? intPoint : intPoint - 1];\r\n var p1 = points[intPoint];\r\n var p2 = points[(intPoint > points.length - 2) ? points.length - 1 : intPoint + 1];\r\n var p3 = points[(intPoint > points.length - 3) ? points.length - 1 : intPoint + 2];\r\n\r\n return out.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n var points = [];\r\n\r\n for (var i = 0; i < this.points.length; i++)\r\n {\r\n points.push(this.points[i].x);\r\n points.push(this.points[i].y);\r\n }\r\n\r\n return {\r\n type: this.type,\r\n points: points\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Curves.Spline.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Spline} [description]\r\n */\r\nSplineCurve.fromJSON = function (data)\r\n{\r\n return new SplineCurve(data.points);\r\n};\r\n\r\nmodule.exports = SplineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/SplineCurve.js?')},"./node_modules/phaser/src/curves/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Curves\r\n */\r\n\r\nmodule.exports = {\r\n Path: __webpack_require__(/*! ./path/Path */ "./node_modules/phaser/src/curves/path/Path.js"),\r\n\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierCurve */ "./node_modules/phaser/src/curves/CubicBezierCurve.js"),\r\n Curve: __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./EllipseCurve */ "./node_modules/phaser/src/curves/EllipseCurve.js"),\r\n Line: __webpack_require__(/*! ./LineCurve */ "./node_modules/phaser/src/curves/LineCurve.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierCurve */ "./node_modules/phaser/src/curves/QuadraticBezierCurve.js"),\r\n Spline: __webpack_require__(/*! ./SplineCurve */ "./node_modules/phaser/src/curves/SplineCurve.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/index.js?')},"./node_modules/phaser/src/curves/path/MoveTo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path.\r\n *\r\n * @class MoveTo\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - `x` pixel coordinate.\r\n * @param {number} [y] - `y` pixel coordinate.\r\n */\r\nvar MoveTo = new Class({\r\n\r\n initialize:\r\n\r\n function MoveTo (x, y)\r\n {\r\n // Skip length calcs in paths\r\n\r\n /**\r\n * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors.\r\n *\r\n * @name Phaser.Curves.MoveTo#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The lone point which this curve consists of.\r\n *\r\n * @name Phaser.Curves.MoveTo#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Retrieves the point at given position in the curve. This will always return this curve's only point.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used.\r\n * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getResolution\r\n * @since 3.0.0\r\n *\r\n * @return {number} The resolution of this curve. For a MoveTo the value is always 1.\r\n */\r\n getResolution: function ()\r\n {\r\n return 1;\r\n },\r\n\r\n /**\r\n * Gets the length of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this curve. For a MoveTo the value is always 0.\r\n */\r\n getLength: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Converts this curve into a JSON-serializable object.\r\n *\r\n * @method Phaser.Curves.MoveTo#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: 'MoveTo',\r\n points: [\r\n this.p0.x, this.p0.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/MoveTo.js?")},"./node_modules/phaser/src/curves/path/Path.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CubicBezierCurve = __webpack_require__(/*! ../CubicBezierCurve */ \"./node_modules/phaser/src/curves/CubicBezierCurve.js\");\r\nvar EllipseCurve = __webpack_require__(/*! ../EllipseCurve */ \"./node_modules/phaser/src/curves/EllipseCurve.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar LineCurve = __webpack_require__(/*! ../LineCurve */ \"./node_modules/phaser/src/curves/LineCurve.js\");\r\nvar MovePathTo = __webpack_require__(/*! ./MoveTo */ \"./node_modules/phaser/src/curves/path/MoveTo.js\");\r\nvar QuadraticBezierCurve = __webpack_require__(/*! ../QuadraticBezierCurve */ \"./node_modules/phaser/src/curves/QuadraticBezierCurve.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar SplineCurve = __webpack_require__(/*! ../SplineCurve */ \"./node_modules/phaser/src/curves/SplineCurve.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Path combines multiple Curves into one continuous compound curve.\r\n * It does not matter how many Curves are in the Path or what type they are.\r\n *\r\n * A Curve in a Path does not have to start where the previous Curve ends - that is to say, a Path does not\r\n * have to be an uninterrupted curve. Only the order of the Curves influences the actual points on the Path.\r\n *\r\n * @class Path\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the Path's starting point or a {@link Phaser.Types.Curves.JSONPath}.\r\n * @param {number} [y=0] - The Y coordinate of the Path's starting point.\r\n */\r\nvar Path = new Class({\r\n\r\n initialize:\r\n\r\n function Path (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n /**\r\n * The name of this Path.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.Curves.Path#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The list of Curves which make up this Path.\r\n *\r\n * @name Phaser.Curves.Path#curves\r\n * @type {Phaser.Curves.Curve[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.curves = [];\r\n\r\n /**\r\n * The cached length of each Curve in the Path.\r\n *\r\n * Used internally by {@link #getCurveLengths}.\r\n *\r\n * @name Phaser.Curves.Path#cacheLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheLengths = [];\r\n\r\n /**\r\n * Automatically closes the path.\r\n *\r\n * @name Phaser.Curves.Path#autoClose\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.autoClose = false;\r\n\r\n /**\r\n * The starting point of the Path.\r\n *\r\n * This is not necessarily equivalent to the starting point of the first Curve in the Path. In an empty Path, it's also treated as the ending point.\r\n *\r\n * @name Phaser.Curves.Path#startPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.startPoint = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.fromJSON(x);\r\n }\r\n else\r\n {\r\n this.startPoint.set(x, y);\r\n }\r\n },\r\n\r\n /**\r\n * Appends a Curve to the end of the Path.\r\n *\r\n * The Curve does not have to start where the Path ends or, for an empty Path, at its defined starting point.\r\n *\r\n * @method Phaser.Curves.Path#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Curve} curve - The Curve to append.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n add: function (curve)\r\n {\r\n this.curves.push(curve);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a circular Ellipse Curve positioned at the end of the Path.\r\n *\r\n * @method Phaser.Curves.Path#circleTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the circle.\r\n * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle.\r\n * @param {number} [rotation=0] - The rotation of the circle in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n circleTo: function (radius, clockwise, rotation)\r\n {\r\n if (clockwise === undefined) { clockwise = false; }\r\n\r\n return this.ellipseTo(radius, radius, 0, 360, clockwise, rotation);\r\n },\r\n\r\n /**\r\n * Ensures that the Path is closed.\r\n *\r\n * A closed Path starts and ends at the same point. If the Path is not closed, a straight Line Curve will be created from the ending point directly to the starting point. During the check, the actual starting point of the Path, i.e. the starting point of the first Curve, will be used as opposed to the Path's defined {@link startPoint}, which could differ.\r\n *\r\n * Calling this method on an empty Path will result in an error.\r\n *\r\n * @method Phaser.Curves.Path#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n closePath: function ()\r\n {\r\n // Add a line curve if start and end of lines are not connected\r\n var startPoint = this.curves[0].getPoint(0);\r\n var endPoint = this.curves[this.curves.length - 1].getPoint(1);\r\n\r\n if (!startPoint.equals(endPoint))\r\n {\r\n // This will copy a reference to the vectors, which probably isn't sensible\r\n this.curves.push(new LineCurve(endPoint, startPoint));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points.\r\n *\r\n * @method Phaser.Curves.Path#cubicBezierTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value.\r\n * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value.\r\n * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value.\r\n * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n var p3;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n p3 = control1X;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(control1X, control1Y);\r\n p2 = new Vector2(control2X, control2Y);\r\n p3 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new CubicBezierCurve(p0, p1, p2, p3));\r\n },\r\n\r\n // Creates a quadratic bezier curve starting at the previous end point and ending at p2, using p1 as a control point\r\n\r\n /**\r\n * Creates a Quadratic Bezier Curve starting at the ending point of the Path.\r\n *\r\n * @method Phaser.Curves.Path#quadraticBezierTo\r\n * @since 3.2.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2[])} x - The X coordinate of the second control point or, if it's a `Vector2`, the first control point.\r\n * @param {number} [y] - The Y coordinate of the second control point or, if `x` is a `Vector2`, the second control point.\r\n * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point.\r\n * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n quadraticBezierTo: function (x, y, controlX, controlY)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(controlX, controlY);\r\n p2 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new QuadraticBezierCurve(p0, p1, p2));\r\n },\r\n\r\n /**\r\n * Draws all Curves in the Path to a Graphics Game Object.\r\n *\r\n * @method Phaser.Curves.Path#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [out,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics Game Object to draw to.\r\n * @param {integer} [pointsTotal=32] - The number of points to draw for each Curve. Higher numbers result in a smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object which was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.draw(graphics, pointsTotal);\r\n }\r\n\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Creates an ellipse curve positioned at the previous end point, using the given parameters.\r\n *\r\n * @method Phaser.Curves.Path#ellipseTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {number} [rotation=0] - The rotation of the ellipse, in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n var ellipse = new EllipseCurve(0, 0, xRadius, yRadius, startAngle, endAngle, clockwise, rotation);\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n // Calculate where to center the ellipse\r\n var start = ellipse.getStartPoint(this._tmpVec2B);\r\n\r\n end.subtract(start);\r\n\r\n ellipse.x = end.x;\r\n ellipse.y = end.y;\r\n\r\n return this.add(ellipse);\r\n },\r\n\r\n /**\r\n * Creates a Path from a Path Configuration object.\r\n *\r\n * The provided object should be a {@link Phaser.Types.Curves.JSONPath}, as returned by {@link #toJSON}. Providing a malformed object may cause errors.\r\n *\r\n * @method Phaser.Curves.Path#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n fromJSON: function (data)\r\n {\r\n // data should be an object matching the Path.toJSON object structure.\r\n\r\n this.curves = [];\r\n this.cacheLengths = [];\r\n\r\n this.startPoint.set(data.x, data.y);\r\n\r\n this.autoClose = data.autoClose;\r\n\r\n for (var i = 0; i < data.curves.length; i++)\r\n {\r\n var curve = data.curves[i];\r\n\r\n switch (curve.type)\r\n {\r\n case 'LineCurve':\r\n this.add(LineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'EllipseCurve':\r\n this.add(EllipseCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'SplineCurve':\r\n this.add(SplineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'CubicBezierCurve':\r\n this.add(CubicBezierCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'QuadraticBezierCurve':\r\n this.add(QuadraticBezierCurve.fromJSON(curve));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle with a position and size matching the bounds of this Path.\r\n *\r\n * @method Phaser.Curves.Path#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n out.x = Number.MAX_VALUE;\r\n out.y = Number.MAX_VALUE;\r\n\r\n var bounds = new Rectangle();\r\n var maxRight = Number.MIN_SAFE_INTEGER;\r\n var maxBottom = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.getBounds(bounds, accuracy);\r\n\r\n out.x = Math.min(out.x, bounds.x);\r\n out.y = Math.min(out.y, bounds.y);\r\n\r\n maxRight = Math.max(maxRight, bounds.right);\r\n maxBottom = Math.max(maxBottom, bounds.bottom);\r\n }\r\n\r\n out.right = maxRight;\r\n out.bottom = maxBottom;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing the length of the Path at the end of each Curve.\r\n *\r\n * The result of this method will be cached to avoid recalculating it in subsequent calls. The cache is only invalidated when the {@link #curves} array changes in length, leading to potential inaccuracies if a Curve in the Path is changed, or if a Curve is removed and another is added in its place.\r\n *\r\n * @method Phaser.Curves.Path#getCurveLengths\r\n * @since 3.0.0\r\n *\r\n * @return {number[]} An array containing the length of the Path at the end of each one of its Curves.\r\n */\r\n getCurveLengths: function ()\r\n {\r\n // We use cache values if curves and cache array are same length\r\n\r\n if (this.cacheLengths.length === this.curves.length)\r\n {\r\n return this.cacheLengths;\r\n }\r\n\r\n // Get length of sub-curve\r\n // Push sums into cached array\r\n\r\n var lengths = [];\r\n var sums = 0;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n sums += this.curves[i].getLength();\r\n\r\n lengths.push(sums);\r\n }\r\n\r\n this.cacheLengths = lengths;\r\n\r\n return lengths;\r\n },\r\n\r\n /**\r\n * Returns the ending point of the Path.\r\n *\r\n * A Path's ending point is equivalent to the ending point of the last Curve in the Path. For an empty Path, the ending point is at the Path's defined {@link #startPoint}.\r\n *\r\n * @method Phaser.Curves.Path#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - The object to store the point in.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` object, or a new Vector2 if none was provided.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (this.curves.length > 0)\r\n {\r\n this.curves[this.curves.length - 1].getPoint(1, out);\r\n }\r\n else\r\n {\r\n out.copy(this.startPoint);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the total length of the Path.\r\n *\r\n * @see {@link #getCurveLengths}\r\n *\r\n * @method Phaser.Curves.Path#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The total length of the Path.\r\n */\r\n getLength: function ()\r\n {\r\n var lens = this.getCurveLengths();\r\n\r\n return lens[lens.length - 1];\r\n },\r\n\r\n // To get accurate point with reference to\r\n // entire path distance at time t,\r\n // following has to be done:\r\n\r\n // 1. Length of each sub path have to be known\r\n // 2. Locate and identify type of curve\r\n // 3. Get t for the curve\r\n // 4. Return curve.getPointAt(t')\r\n\r\n /**\r\n * Calculates the coordinates of the point at the given normalized location (between 0 and 1) on the Path.\r\n *\r\n * The location is relative to the entire Path, not to an individual Curve. A location of 0.5 is always in the middle of the Path and is thus an equal distance away from both its starting and ending points. In a Path with one Curve, it would be in the middle of the Curve; in a Path with two Curves, it could be anywhere on either one of them depending on their lengths.\r\n *\r\n * @method Phaser.Curves.Path#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The location of the point to return, between 0 and 1.\r\n * @param {Phaser.Math.Vector2} [out] - The object in which to store the calculated point.\r\n *\r\n * @return {?Phaser.Math.Vector2} The modified `out` object, or a new `Vector2` if none was provided.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var d = t * this.getLength();\r\n var curveLengths = this.getCurveLengths();\r\n var i = 0;\r\n\r\n while (i < curveLengths.length)\r\n {\r\n if (curveLengths[i] >= d)\r\n {\r\n var diff = curveLengths[i] - d;\r\n var curve = this.curves[i];\r\n\r\n var segmentLength = curve.getLength();\r\n var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength;\r\n\r\n return curve.getPointAt(u, out);\r\n }\r\n\r\n i++;\r\n }\r\n\r\n // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0]))\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n /**\r\n * Creates a straight Line Curve from the ending point of the Path to the given coordinates.\r\n *\r\n * @method Phaser.Curves.Path#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions=40] - The X coordinate of the line's ending point, or the line's ending point as a `Vector2`.\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 40; }\r\n\r\n var points = [];\r\n\r\n for (var i = 0; i <= divisions; i++)\r\n {\r\n points.push(this.getPoint(i / divisions));\r\n }\r\n\r\n if (this.autoClose)\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.startPoint);\r\n },\r\n\r\n /**\r\n * Creates a line curve from the previous end point to x/y\r\n *\r\n * @method Phaser.Curves.Path#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n lineTo: function (x, y)\r\n {\r\n if (x instanceof Vector2)\r\n {\r\n this._tmpVec2B.copy(x);\r\n }\r\n else\r\n {\r\n this._tmpVec2B.set(x, y);\r\n }\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n return this.add(new LineCurve([ end.x, end.y, this._tmpVec2B.x, this._tmpVec2B.y ]));\r\n },\r\n\r\n // Creates a spline curve starting at the previous end point, using the given parameters\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#splineTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} points - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n splineTo: function (points)\r\n {\r\n points.unshift(this.getEndPoint());\r\n\r\n return this.add(new SplineCurve(points));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n moveTo: function (x, y)\r\n {\r\n return this.add(new MovePathTo(x, y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONPath} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var out = [];\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n out.push(this.curves[i].toJSON());\r\n }\r\n\r\n return {\r\n type: 'Path',\r\n x: this.startPoint.x,\r\n y: this.startPoint.y,\r\n autoClose: this.autoClose,\r\n curves: out\r\n };\r\n },\r\n\r\n /**\r\n * cacheLengths must be recalculated.\r\n *\r\n * @method Phaser.Curves.Path#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.cacheLengths = [];\r\n\r\n this.getCurveLengths();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.curves.length = 0;\r\n this.cacheLengths.length = 0;\r\n this.startPoint = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a new Path Object.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#path\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Path.\r\n * @param {number} y - The vertical position of this Path.\r\n *\r\n * @return {Phaser.Curves.Path} The Path Object that was created.\r\n */\r\nGameObjectFactory.register('path', function (x, y)\r\n{\r\n return new Path(x, y);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\nmodule.exports = Path;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/Path.js?")},"./node_modules/phaser/src/data/DataManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/data/events/index.js\");\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManager.js?")},"./node_modules/phaser/src/data/DataManagerPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DataManager = __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManagerPlugin\r\n * @extends Phaser.Data.DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this DataManager belongs to.\r\n */\r\nvar DataManagerPlugin = new Class({\r\n\r\n Extends: DataManager,\r\n\r\n initialize:\r\n\r\n function DataManagerPlugin (scene)\r\n {\r\n DataManager.call(this, scene, scene.sys.events);\r\n\r\n /**\r\n * A reference to the Scene that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s Systems.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.events = this.systems.events;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#shutdown\r\n * @private\r\n * @since 3.5.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n DataManager.prototype.destroy.call(this);\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DataManagerPlugin\', DataManagerPlugin, \'data\');\r\n\r\nmodule.exports = DataManagerPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManagerPlugin.js?')},"./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js?")},"./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/SET_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/SET_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: __webpack_require__(/*! ./CHANGE_DATA_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js"),\r\n CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js"),\r\n REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js"),\r\n SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "./node_modules/phaser/src/data/events/SET_DATA_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/index.js?')},"./node_modules/phaser/src/data/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DataManager: __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js"),\r\n DataManagerPlugin: __webpack_require__(/*! ./DataManagerPlugin */ "./node_modules/phaser/src/data/DataManagerPlugin.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/data/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/index.js?')},"./node_modules/phaser/src/device/Audio.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.ogg = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"opus\"').replace(/^no$/, '') || audioElement.canPlayType('audio/opus;').replace(/^no$/, ''))\r\n {\r\n Audio.opus = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mpeg;').replace(/^no$/, ''))\r\n {\r\n Audio.mp3 = true;\r\n }\r\n\r\n // Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n // bit.ly/iphoneoscodecs\r\n if (audioElement.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, ''))\r\n {\r\n Audio.wav = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/x-m4a;') || audioElement.canPlayType('audio/aac;').replace(/^no$/, ''))\r\n {\r\n Audio.m4a = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/webm; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.webm = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mp4;codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Audio.js?")},"./node_modules/phaser/src/device/Browser.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Edge\\/\\d+/.test(ua))\r\n {\r\n Browser.edge = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Opera/).test(ua))\r\n {\r\n Browser.opera = true;\r\n }\r\n else if ((/Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Browser.js?")},"./node_modules/phaser/src/device/CanvasFeatures.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create(yellow, 6, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create(this, 2, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n // Compare and return\r\n return (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/CanvasFeatures.js?")},"./node_modules/phaser/src/device/Features.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n * \r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d');\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Features.js?")},"./node_modules/phaser/src/device/Fullscreen.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n* \r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Fullscreen.js?")},"./node_modules/phaser/src/device/Input.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n * \r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n \r\n};\r\n\r\nfunction init ()\r\n{\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Input.js?")},"./node_modules/phaser/src/device/OS.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Windows/.test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if (/Mac OS/.test(ua) && !(/like Mac OS/.test(ua)))\r\n {\r\n OS.macOS = true;\r\n }\r\n else if (/Android/.test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if (/Linux/.test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if (/iP[ao]d|iPhone/i.test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if (/Kindle/.test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if (/CrOS/.test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if (/Windows Phone/i.test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/OS.js?")},"./node_modules/phaser/src/device/Video.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} h264Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} hlsVideo - Can this device play hls video files?\r\n * @property {boolean} mp4Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} oggVideo - Can this device play ogg video files?\r\n * @property {boolean} vp9Video - Can this device play vp9 video files?\r\n * @property {boolean} webmVideo - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264Video: false,\r\n hlsVideo: false,\r\n mp4Video: false,\r\n oggVideo: false,\r\n vp9Video: false,\r\n webmVideo: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(/^no$/, ''))\r\n {\r\n Video.oggVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264Video = true;\r\n Video.mp4Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/, ''))\r\n {\r\n Video.webmVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(/^no$/, ''))\r\n {\r\n Video.vp9Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n Video.hlsVideo = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Video.js?")},"./node_modules/phaser/src/device/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: __webpack_require__(/*! ./OS */ "./node_modules/phaser/src/device/OS.js"),\r\n browser: __webpack_require__(/*! ./Browser */ "./node_modules/phaser/src/device/Browser.js"),\r\n features: __webpack_require__(/*! ./Features */ "./node_modules/phaser/src/device/Features.js"),\r\n input: __webpack_require__(/*! ./Input */ "./node_modules/phaser/src/device/Input.js"),\r\n audio: __webpack_require__(/*! ./Audio */ "./node_modules/phaser/src/device/Audio.js"),\r\n video: __webpack_require__(/*! ./Video */ "./node_modules/phaser/src/device/Video.js"),\r\n fullscreen: __webpack_require__(/*! ./Fullscreen */ "./node_modules/phaser/src/device/Fullscreen.js"),\r\n canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "./node_modules/phaser/src/device/CanvasFeatures.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/index.js?')},"./node_modules/phaser/src/display/align/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = {\r\n\r\n /**\r\n * A constant representing a top-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_LEFT: 0,\r\n\r\n /**\r\n * A constant representing a top-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_CENTER: 1,\r\n\r\n /**\r\n * A constant representing a top-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_RIGHT: 2,\r\n\r\n /**\r\n * A constant representing a left-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_TOP: 3,\r\n\r\n /**\r\n * A constant representing a left-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_CENTER: 4,\r\n\r\n /**\r\n * A constant representing a left-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_BOTTOM: 5,\r\n\r\n /**\r\n * A constant representing a center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n CENTER: 6,\r\n\r\n /**\r\n * A constant representing a right-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_TOP: 7,\r\n\r\n /**\r\n * A constant representing a right-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_CENTER: 8,\r\n\r\n /**\r\n * A constant representing a right-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_BOTTOM: 9,\r\n\r\n /**\r\n * A constant representing a bottom-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_LEFT: 10,\r\n\r\n /**\r\n * A constant representing a bottom-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_CENTER: 11,\r\n\r\n /**\r\n * A constant representing a bottom-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_RIGHT: 12\r\n\r\n};\r\n\r\nmodule.exports = ALIGN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/const.js?")},"./node_modules/phaser/src/display/align/in/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomCenter.js?')},"./node_modules/phaser/src/display/align/in/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomLeft.js?')},"./node_modules/phaser/src/display/align/in/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomRight.js?')},"./node_modules/phaser/src/display/align/in/Center.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ../../bounds/CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.Center\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar Center = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n CenterOn(gameObject, GetCenterX(alignIn) + offsetX, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = Center;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/Center.js?')},"./node_modules/phaser/src/display/align/in/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the left center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/LeftCenter.js?')},"./node_modules/phaser/src/display/align/in/QuickSet.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/display/align/const.js");\r\n\r\nvar AlignInMap = [];\r\n\r\nAlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js");\r\nAlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js");\r\nAlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js");\r\nAlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js");\r\nAlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned relative to the other.\r\n * The alignment used is based on the `position` argument, which is an `ALIGN_CONST` value, such as `LEFT_CENTER` or `TOP_RIGHT`.\r\n *\r\n * @function Phaser.Display.Align.In.QuickSet\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [child,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `ALIGN_CONST.LEFT_CENTER`.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar QuickSet = function (child, alignIn, position, offsetX, offsetY)\r\n{\r\n return AlignInMap[position](child, alignIn, offsetX, offsetY);\r\n};\r\n\r\nmodule.exports = QuickSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/QuickSet.js?')},"./node_modules/phaser/src/display/align/in/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the right center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/RightCenter.js?')},"./node_modules/phaser/src/display/align/in/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopCenter.js?')},"./node_modules/phaser/src/display/align/in/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopLeft.js?')},"./node_modules/phaser/src/display/align/in/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopRight.js?')},"./node_modules/phaser/src/display/align/in/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.In\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js"),\r\n Center: __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js"),\r\n QuickSet: __webpack_require__(/*! ./QuickSet */ "./node_modules/phaser/src/display/align/in/QuickSet.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/index.js?')},"./node_modules/phaser/src/display/align/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/display/align/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Align\r\n */\r\n\r\nvar Align = {\r\n\r\n In: __webpack_require__(/*! ./in */ "./node_modules/phaser/src/display/align/in/index.js"),\r\n To: __webpack_require__(/*! ./to */ "./node_modules/phaser/src/display/align/to/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nAlign = Extend(false, Align, CONST);\r\n\r\nmodule.exports = Align;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/index.js?')},"./node_modules/phaser/src/display/align/to/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomCenter.js?')},"./node_modules/phaser/src/display/align/to/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomLeft.js?')},"./node_modules/phaser/src/display/align/to/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomRight.js?')},"./node_modules/phaser/src/display/align/to/LeftBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftBottom.js?')},"./node_modules/phaser/src/display/align/to/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftCenter.js?')},"./node_modules/phaser/src/display/align/to/LeftTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftTop.js?')},"./node_modules/phaser/src/display/align/to/RightBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightBottom.js?')},"./node_modules/phaser/src/display/align/to/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightCenter.js?')},"./node_modules/phaser/src/display/align/to/RightTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightTop.js?')},"./node_modules/phaser/src/display/align/to/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopCenter.js?')},"./node_modules/phaser/src/display/align/to/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopLeft.js?')},"./node_modules/phaser/src/display/align/to/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopRight.js?')},"./node_modules/phaser/src/display/align/to/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.To\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/to/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/to/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/to/BottomRight.js"),\r\n LeftBottom: __webpack_require__(/*! ./LeftBottom */ "./node_modules/phaser/src/display/align/to/LeftBottom.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/to/LeftCenter.js"),\r\n LeftTop: __webpack_require__(/*! ./LeftTop */ "./node_modules/phaser/src/display/align/to/LeftTop.js"),\r\n RightBottom: __webpack_require__(/*! ./RightBottom */ "./node_modules/phaser/src/display/align/to/RightBottom.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/to/RightCenter.js"),\r\n RightTop: __webpack_require__(/*! ./RightTop */ "./node_modules/phaser/src/display/align/to/RightTop.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/to/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/to/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/to/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/index.js?')},"./node_modules/phaser/src/display/bounds/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetCenterX = __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetCenterY = __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\n\r\n/**\r\n * Positions the Game Object so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Display.Bounds.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The horizontal coordinate to position the Game Object on.\r\n * @param {number} y - The vertical coordinate to position the Game Object on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar CenterOn = function (gameObject, x, y)\r\n{\r\n SetCenterX(gameObject, x);\r\n\r\n return SetCenterY(gameObject, y);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/CenterOn.js?')},"./node_modules/phaser/src/display/bounds/GetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the bottom coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The bottom coordinate of the bounds of the Game Object.\r\n */\r\nvar GetBottom = function (gameObject)\r\n{\r\n return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetBottom.js?")},"./node_modules/phaser/src/display/bounds/GetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center x coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center x coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterX = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterX.js?")},"./node_modules/phaser/src/display/bounds/GetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center y coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center y coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterY = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterY.js?")},"./node_modules/phaser/src/display/bounds/GetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the left coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The left coordinate of the bounds of the Game Object.\r\n */\r\nvar GetLeft = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetLeft.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its x coordinate.\r\n * This is the same as `width * origin.x`.\r\n * This value will only be > 0 if `origin.x` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The horizontal offset of the Game Object.\r\n */\r\nvar GetOffsetX = function (gameObject)\r\n{\r\n return gameObject.width * gameObject.originX;\r\n};\r\n\r\nmodule.exports = GetOffsetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetX.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its y coordinate.\r\n * This is the same as `width * origin.y`.\r\n * This value will only be > 0 if `origin.y` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The vertical offset of the Game Object.\r\n */\r\nvar GetOffsetY = function (gameObject)\r\n{\r\n return gameObject.height * gameObject.originY;\r\n};\r\n\r\nmodule.exports = GetOffsetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetY.js?")},"./node_modules/phaser/src/display/bounds/GetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the right coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The right coordinate of the bounds of the Game Object.\r\n */\r\nvar GetRight = function (gameObject)\r\n{\r\n return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetRight.js?")},"./node_modules/phaser/src/display/bounds/GetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the top coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The top coordinate of the bounds of the Game Object.\r\n */\r\nvar GetTop = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetTop.js?")},"./node_modules/phaser/src/display/bounds/SetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetBottom = function (gameObject, value)\r\n{\r\n gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetBottom.js?")},"./node_modules/phaser/src/display/bounds/SetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterX = function (gameObject, x)\r\n{\r\n var offsetX = gameObject.width * gameObject.originX;\r\n\r\n gameObject.x = (x + offsetX) - (gameObject.width * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterX.js?")},"./node_modules/phaser/src/display/bounds/SetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} y - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterY = function (gameObject, y)\r\n{\r\n var offsetY = gameObject.height * gameObject.originY;\r\n\r\n gameObject.y = (y + offsetY) - (gameObject.height * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterY.js?")},"./node_modules/phaser/src/display/bounds/SetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetLeft = function (gameObject, value)\r\n{\r\n gameObject.x = value + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetLeft.js?")},"./node_modules/phaser/src/display/bounds/SetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetRight = function (gameObject, value)\r\n{\r\n gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetRight.js?")},"./node_modules/phaser/src/display/bounds/SetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetTop = function (gameObject, value)\r\n{\r\n gameObject.y = value + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetTop.js?")},"./node_modules/phaser/src/display/bounds/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Bounds\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CenterOn: __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js"),\r\n GetBottom: __webpack_require__(/*! ./GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js"),\r\n GetCenterX: __webpack_require__(/*! ./GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js"),\r\n GetCenterY: __webpack_require__(/*! ./GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js"),\r\n GetLeft: __webpack_require__(/*! ./GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js"),\r\n GetOffsetX: __webpack_require__(/*! ./GetOffsetX */ "./node_modules/phaser/src/display/bounds/GetOffsetX.js"),\r\n GetOffsetY: __webpack_require__(/*! ./GetOffsetY */ "./node_modules/phaser/src/display/bounds/GetOffsetY.js"),\r\n GetRight: __webpack_require__(/*! ./GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js"),\r\n GetTop: __webpack_require__(/*! ./GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js"),\r\n SetBottom: __webpack_require__(/*! ./SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js"),\r\n SetCenterX: __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js"),\r\n SetCenterY: __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js"),\r\n SetLeft: __webpack_require__(/*! ./SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js"),\r\n SetRight: __webpack_require__(/*! ./SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js"),\r\n SetTop: __webpack_require__(/*! ./SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/index.js?')},"./node_modules/phaser/src/display/canvas/CanvasInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.CanvasInterpolation\r\n * @since 3.0.0\r\n */\r\nvar CanvasInterpolation = {\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit).\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setCrisp\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setCrisp: function (canvas)\r\n {\r\n var types = [ 'optimizeSpeed', 'crisp-edges', '-moz-crisp-edges', '-webkit-optimize-contrast', 'optimize-contrast', 'pixelated' ];\r\n\r\n types.forEach(function (type)\r\n {\r\n canvas.style['image-rendering'] = type;\r\n });\r\n\r\n canvas.style.msInterpolationMode = 'nearest-neighbor';\r\n\r\n return canvas;\r\n },\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setBicubic\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setBicubic: function (canvas)\r\n {\r\n canvas.style['image-rendering'] = 'auto';\r\n canvas.style.msInterpolationMode = 'bicubic';\r\n\r\n return canvas;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CanvasInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasInterpolation.js?")},"./node_modules/phaser/src/display/canvas/CanvasPool.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Smoothing = __webpack_require__(/*! ./Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, \r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d'));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasPool.js?")},"./node_modules/phaser/src/display/canvas/Smoothing.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/Smoothing.js?")},"./node_modules/phaser/src/display/canvas/TouchAction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.\r\n *\r\n * @function Phaser.Display.Canvas.TouchAction\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch action value to set on the canvas. Set to `none` to disable touch actions.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar TouchAction = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n canvas.style['msTouchAction'] = value;\r\n canvas.style['ms-touch-action'] = value;\r\n canvas.style['touch-action'] = value;\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = TouchAction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/TouchAction.js?")},"./node_modules/phaser/src/display/canvas/UserSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.\r\n *\r\n * @function Phaser.Display.Canvas.UserSelect\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch callout value to set on the canvas. Set to `none` to disable touch callouts.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar UserSelect = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n var vendors = [\r\n '-webkit-',\r\n '-khtml-',\r\n '-moz-',\r\n '-ms-',\r\n ''\r\n ];\r\n\r\n vendors.forEach(function (vendor)\r\n {\r\n canvas.style[vendor + 'user-select'] = value;\r\n });\r\n\r\n canvas.style['-webkit-touch-callout'] = value;\r\n canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)';\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = UserSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/UserSelect.js?")},"./node_modules/phaser/src/display/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasInterpolation: __webpack_require__(/*! ./CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js"),\r\n CanvasPool: __webpack_require__(/*! ./CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js"),\r\n Smoothing: __webpack_require__(/*! ./Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js"),\r\n TouchAction: __webpack_require__(/*! ./TouchAction */ "./node_modules/phaser/src/display/canvas/TouchAction.js"),\r\n UserSelect: __webpack_require__(/*! ./UserSelect */ "./node_modules/phaser/src/display/canvas/UserSelect.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/index.js?')},"./node_modules/phaser/src/display/color/Color.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ \"./node_modules/phaser/src/display/color/GetColor.js\");\r\nvar GetColor32 = __webpack_require__(/*! ./GetColor32 */ \"./node_modules/phaser/src/display/color/GetColor32.js\");\r\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ \"./node_modules/phaser/src/display/color/HSVToRGB.js\");\r\nvar RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ \"./node_modules/phaser/src/display/color/RGBToHSV.js\");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Color class holds a single color value and allows for easy modification and reading of it.\r\n *\r\n * @class Color\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [red=0] - The red color value. A number between 0 and 255.\r\n * @param {integer} [green=0] - The green color value. A number between 0 and 255.\r\n * @param {integer} [blue=0] - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n */\r\nvar Color = new Class({\r\n\r\n initialize:\r\n\r\n function Color (red, green, blue, alpha)\r\n {\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n /**\r\n * The internal red color value.\r\n *\r\n * @name Phaser.Display.Color#r\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.r = 0;\r\n\r\n /**\r\n * The internal green color value.\r\n *\r\n * @name Phaser.Display.Color#g\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.g = 0;\r\n\r\n /**\r\n * The internal blue color value.\r\n *\r\n * @name Phaser.Display.Color#b\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.b = 0;\r\n\r\n /**\r\n * The internal alpha color value.\r\n *\r\n * @name Phaser.Display.Color#a\r\n * @type {number}\r\n * @private\r\n * @default 255\r\n * @since 3.0.0\r\n */\r\n this.a = 255;\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#_h\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._h = 0;\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#_s\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._s = 0;\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#_v\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._v = 0;\r\n\r\n /**\r\n * Is this color update locked?\r\n *\r\n * @name Phaser.Display.Color#_locked\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._locked = false;\r\n\r\n /**\r\n * An array containing the calculated color values for WebGL use.\r\n *\r\n * @name Phaser.Display.Color#gl\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.gl = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * Pre-calculated internal color value.\r\n *\r\n * @name Phaser.Display.Color#_color\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color = 0;\r\n\r\n /**\r\n * Pre-calculated internal color32 value.\r\n *\r\n * @name Phaser.Display.Color#_color32\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color32 = 0;\r\n\r\n /**\r\n * Pre-calculated internal color rgb string value.\r\n *\r\n * @name Phaser.Display.Color#_rgba\r\n * @type {string}\r\n * @private\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this._rgba = '';\r\n\r\n this.setTo(red, green, blue, alpha);\r\n },\r\n\r\n /**\r\n * Sets this color to be transparent. Sets all values to zero.\r\n *\r\n * @method Phaser.Display.Color#transparent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n transparent: function ()\r\n {\r\n this._locked = true;\r\n\r\n this.red = 0;\r\n this.green = 0;\r\n this.blue = 0;\r\n this.alpha = 0;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * @param {boolean} [updateHSV=true] - Update the HSV values after setting the RGB values?\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setTo: function (red, green, blue, alpha, updateHSV)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n if (updateHSV === undefined) { updateHSV = true; }\r\n\r\n this._locked = true;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(updateHSV);\r\n },\r\n\r\n /**\r\n * Sets the red, green, blue and alpha GL values of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setGLTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} red - The red color value. A number between 0 and 1.\r\n * @param {number} green - The green color value. A number between 0 and 1.\r\n * @param {number} blue - The blue color value. A number between 0 and 1.\r\n * @param {number} [alpha=1] - The alpha value. A number between 0 and 1.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setGLTo: function (red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this._locked = true;\r\n\r\n this.redGL = red;\r\n this.greenGL = green;\r\n this.blueGL = blue;\r\n this.alphaGL = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the color object given.\r\n *\r\n * @method Phaser.Display.Color#setFromRGB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromRGB: function (color)\r\n {\r\n this._locked = true;\r\n\r\n this.red = color.r;\r\n this.green = color.g;\r\n this.blue = color.b;\r\n\r\n if (color.hasOwnProperty('a'))\r\n {\r\n this.alpha = color.a;\r\n }\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the hue, saturation and lightness values given.\r\n *\r\n * @method Phaser.Display.Color#setFromHSV\r\n * @since 3.13.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromHSV: function (h, s, v)\r\n {\r\n return HSVToRGB(h, s, v, this);\r\n },\r\n\r\n /**\r\n * Updates the internal cache values.\r\n *\r\n * @method Phaser.Display.Color#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n update: function (updateHSV)\r\n {\r\n if (updateHSV === undefined) { updateHSV = false; }\r\n\r\n if (this._locked)\r\n {\r\n return this;\r\n }\r\n\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n var a = this.a;\r\n\r\n this._color = GetColor(r, g, b);\r\n this._color32 = GetColor32(r, g, b, a);\r\n this._rgba = 'rgba(' + r + ',' + g + ',' + b + ',' + (a / 255) + ')';\r\n\r\n if (updateHSV)\r\n {\r\n RGBToHSV(r, g, b, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal hsv cache values.\r\n *\r\n * @method Phaser.Display.Color#updateHSV\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n updateHSV: function ()\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n RGBToHSV(r, g, b, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a new Color component using the values from this one.\r\n *\r\n * @method Phaser.Display.Color#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} A new Color object.\r\n */\r\n clone: function ()\r\n {\r\n return new Color(this.r, this.g, this.b, this.a);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be grayscaled based on the shade value given.\r\n *\r\n * @method Phaser.Display.Color#gray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} shade - A value between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n gray: function (shade)\r\n {\r\n return this.setTo(shade, shade, shade);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#random\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n random: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var r = Math.floor(min + Math.random() * (max - min));\r\n var g = Math.floor(min + Math.random() * (max - min));\r\n var b = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random grayscale color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#randomGray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n randomGray: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var s = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(s, s, s);\r\n },\r\n\r\n /**\r\n * Increase the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#saturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n saturate: function (amount)\r\n {\r\n this.s += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#desaturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n desaturate: function (amount)\r\n {\r\n this.s -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#lighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n lighten: function (amount)\r\n {\r\n this.v += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#darken\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n darken: function (amount)\r\n {\r\n this.v -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brighten this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#brighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n brighten: function (amount)\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n r = Math.max(0, Math.min(255, r - Math.round(255 * - (amount / 100))));\r\n g = Math.max(0, Math.min(255, g - Math.round(255 * - (amount / 100))));\r\n b = Math.max(0, Math.min(255, b - Math.round(255 * - (amount / 100))));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * The color of this Color component, not including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n return this._color;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component, including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color32\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color32: {\r\n\r\n get: function ()\r\n {\r\n return this._color32;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component as a string which can be used in CSS color values.\r\n *\r\n * @name Phaser.Display.Color#rgba\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n rgba: {\r\n\r\n get: function ()\r\n {\r\n return this._rgba;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#redGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n redGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[0] = Math.min(Math.abs(value), 1);\r\n\r\n this.r = Math.floor(this.gl[0] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#greenGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n greenGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[1] = Math.min(Math.abs(value), 1);\r\n\r\n this.g = Math.floor(this.gl[1] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#blueGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blueGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[2] = Math.min(Math.abs(value), 1);\r\n\r\n this.b = Math.floor(this.gl[2] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#alphaGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alphaGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[3] = Math.min(Math.abs(value), 1);\r\n\r\n this.a = Math.floor(this.gl[3] * 255);\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#red\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.r = Math.min(value, 255);\r\n\r\n this.gl[0] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#green\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.g = Math.min(value, 255);\r\n\r\n this.gl[1] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#blue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.b = Math.min(value, 255);\r\n\r\n this.gl[2] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.a = Math.min(value, 255);\r\n\r\n this.gl[3] = value / 255;\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#h\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n h: {\r\n\r\n get: function ()\r\n {\r\n return this._h;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._h = value;\r\n\r\n HSVToRGB(value, this._s, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#s\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n s: {\r\n\r\n get: function ()\r\n {\r\n return this._s;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._s = value;\r\n\r\n HSVToRGB(this._h, value, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#v\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n v: {\r\n\r\n get: function ()\r\n {\r\n return this._v;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._v = value;\r\n\r\n HSVToRGB(this._h, this._s, value, this);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Color.js?")},"./node_modules/phaser/src/display/color/ColorToRGBA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts the given color value into an Object containing r,g,b and a properties.\r\n *\r\n * @function Phaser.Display.Color.ColorToRGBA\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - A color value, optionally including the alpha value.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the parsed color values.\r\n */\r\nvar ColorToRGBA = function (color)\r\n{\r\n var output = {\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF,\r\n a: 255\r\n };\r\n\r\n if (color > 16777215)\r\n {\r\n output.a = color >>> 24;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ColorToRGBA;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ColorToRGBA.js?")},"./node_modules/phaser/src/display/color/ComponentToHex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a string containing a hex representation of the given color component.\r\n *\r\n * @function Phaser.Display.Color.ComponentToHex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} color - The color channel to get the hex value for, must be a value between 0 and 255.\r\n *\r\n * @return {string} A string of length 2 characters, i.e. 255 = ff, 100 = 64.\r\n */\r\nvar ComponentToHex = function (color)\r\n{\r\n var hex = color.toString(16);\r\n\r\n return (hex.length === 1) ? '0' + hex : hex;\r\n};\r\n\r\nmodule.exports = ComponentToHex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ComponentToHex.js?")},"./node_modules/phaser/src/display/color/GetColor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given 3 separate color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor = function (red, green, blue)\r\n{\r\n return red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor.js?")},"./node_modules/phaser/src/display/color/GetColor32.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given an alpha and 3 color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor32\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} alpha - The alpha color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor32 = function (red, green, blue, alpha)\r\n{\r\n return alpha << 24 | red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor32;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor32.js?")},"./node_modules/phaser/src/display/color/HSLToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\n\n/**\n * Converts HSL (hue, saturation and lightness) values to a Phaser Color object.\n *\n * @function Phaser.Display.Color.HSLToColor\n * @since 3.0.0\n *\n * @param {number} h - The hue value in the range 0 to 1.\n * @param {number} s - The saturation value in the range 0 to 1.\n * @param {number} l - The lightness value in the range 0 to 1.\n *\n * @return {Phaser.Display.Color} A Color object created from the results of the h, s and l values.\n */\nvar HSLToColor = function (h, s, l)\n{\n // achromatic by default\n var r = l;\n var g = l;\n var b = l;\n\n if (s !== 0)\n {\n var q = (l < 0.5) ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n\n r = HueToComponent(p, q, h + 1 / 3);\n g = HueToComponent(p, q, h);\n b = HueToComponent(p, q, h - 1 / 3);\n }\n\n var color = new Color();\n\n return color.setGLTo(r, g, b, 1);\n};\n\nmodule.exports = HSLToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSLToColor.js?')},"./node_modules/phaser/src/display/color/HSVColorWheel.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\n\n/**\n * Get HSV color wheel values in an array which will be 360 elements in size.\n *\n * @function Phaser.Display.Color.HSVColorWheel\n * @since 3.0.0\n *\n * @param {number} [s=1] - The saturation, in the range 0 - 1.\n * @param {number} [v=1] - The value, in the range 0 - 1.\n *\n * @return {Phaser.Types.Display.ColorObject[]} An array containing 360 elements, where each contains a single numeric value corresponding to the color at that point in the HSV color wheel.\n */\nvar HSVColorWheel = function (s, v)\n{\n if (s === undefined) { s = 1; }\n if (v === undefined) { v = 1; }\n\n var colors = [];\n\n for (var c = 0; c <= 359; c++)\n {\n colors.push(HSVToRGB(c / 359, s, v));\n }\n\n return colors;\n};\n\nmodule.exports = HSVColorWheel;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVColorWheel.js?')},"./node_modules/phaser/src/display/color/HSVToRGB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\n\r\n/**\r\n * Converts an HSV (hue, saturation and value) color value to RGB.\r\n * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes HSV values are contained in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HSVToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n * @param {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} [out] - A Color object to store the results in. If not given a new ColorObject will be created.\r\n *\r\n * @return {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar HSVToRGB = function (h, s, v, out)\r\n{\r\n if (s === undefined) { s = 1; }\r\n if (v === undefined) { v = 1; }\r\n\r\n var i = Math.floor(h * 6);\r\n var f = h * 6 - i;\r\n\r\n var p = Math.floor((v * (1 - s)) * 255);\r\n var q = Math.floor((v * (1 - f * s)) * 255);\r\n var t = Math.floor((v * (1 - (1 - f) * s)) * 255);\r\n\r\n v = Math.floor(v *= 255);\r\n\r\n var r = v;\r\n var g = v;\r\n var b = v;\r\n\r\n var c = i % 6;\r\n\r\n if (c === 0)\r\n {\r\n g = t;\r\n b = p;\r\n }\r\n else if (c === 1)\r\n {\r\n r = q;\r\n b = p;\r\n }\r\n else if (c === 2)\r\n {\r\n r = p;\r\n b = t;\r\n }\r\n else if (c === 3)\r\n {\r\n r = p;\r\n g = q;\r\n }\r\n else if (c === 4)\r\n {\r\n r = t;\r\n g = p;\r\n }\r\n else if (c === 5)\r\n {\r\n g = p;\r\n b = q;\r\n }\r\n\r\n if (!out)\r\n {\r\n return { r: r, g: g, b: b, color: GetColor(r, g, b) };\r\n }\r\n else if (out.setTo)\r\n {\r\n return out.setTo(r, g, b, out.alpha, false);\r\n }\r\n else\r\n {\r\n out.r = r;\r\n out.g = g;\r\n out.b = b;\r\n out.color = GetColor(r, g, b);\r\n\r\n return out;\r\n }\r\n};\r\n\r\nmodule.exports = HSVToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVToRGB.js?')},"./node_modules/phaser/src/display/color/HexStringToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts a hex string into a Phaser Color object.\r\n * \r\n * The hex string can supplied as `\'#0033ff\'` or the short-hand format of `\'#03f\'`; it can begin with an optional "#" or "0x", or be unprefixed.\r\n *\r\n * An alpha channel is _not_ supported.\r\n *\r\n * @function Phaser.Display.Color.HexStringToColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} hex - The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`.\r\n *\r\n * @return {Phaser.Display.Color} A Color object populated by the values of the given string.\r\n */\r\nvar HexStringToColor = function (hex)\r\n{\r\n var color = new Color();\r\n\r\n // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")\r\n hex = hex.replace(/^(?:#|0x)?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b)\r\n {\r\n return r + r + g + g + b + b;\r\n });\r\n\r\n var result = (/^(?:#|0x)?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i).exec(hex);\r\n\r\n if (result)\r\n {\r\n var r = parseInt(result[1], 16);\r\n var g = parseInt(result[2], 16);\r\n var b = parseInt(result[3], 16);\r\n\r\n color.setTo(r, g, b);\r\n }\r\n\r\n return color;\r\n};\r\n\r\nmodule.exports = HexStringToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HexStringToColor.js?')},"./node_modules/phaser/src/display/color/HueToComponent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts a hue to an RGB color.\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HueToComponent\r\n * @since 3.0.0\r\n *\r\n * @param {number} p\r\n * @param {number} q\r\n * @param {number} t\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar HueToComponent = function (p, q, t)\r\n{\r\n if (t < 0)\r\n {\r\n t += 1;\r\n }\r\n\r\n if (t > 1)\r\n {\r\n t -= 1;\r\n }\r\n\r\n if (t < 1 / 6)\r\n {\r\n return p + (q - p) * 6 * t;\r\n }\r\n\r\n if (t < 1 / 2)\r\n {\r\n return q;\r\n }\r\n\r\n if (t < 2 / 3)\r\n {\r\n return p + (q - p) * (2 / 3 - t) * 6;\r\n }\r\n\r\n return p;\r\n};\r\n\r\nmodule.exports = HueToComponent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HueToComponent.js?")},"./node_modules/phaser/src/display/color/IntegerToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\n\n/**\n * Converts the given color value into an instance of a Color object.\n *\n * @function Phaser.Display.Color.IntegerToColor\n * @since 3.0.0\n *\n * @param {integer} input - The color value to convert into a Color object.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar IntegerToColor = function (input)\n{\n var rgb = IntegerToRGB(input);\n\n return new Color(rgb.r, rgb.g, rgb.b, rgb.a);\n};\n\nmodule.exports = IntegerToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToColor.js?')},"./node_modules/phaser/src/display/color/IntegerToRGB.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Return the component parts of a color as an Object with the properties alpha, red, green, blue.\r\n *\r\n * Alpha will only be set if it exists in the given color (0xAARRGGBB)\r\n *\r\n * @function Phaser.Display.Color.IntegerToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {integer} input - The color value to convert into a Color object.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar IntegerToRGB = function (color)\r\n{\r\n if (color > 16777215)\r\n {\r\n // The color value has an alpha component\r\n return {\r\n a: color >>> 24,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n else\r\n {\r\n return {\r\n a: 255,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n};\r\n\r\nmodule.exports = IntegerToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToRGB.js?")},"./node_modules/phaser/src/display/color/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color.Interpolate\r\n * @memberof Phaser.Display.Color\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Interpolates between the two given color ranges over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.RGBWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {number} r1 - Red value.\r\n * @param {number} g1 - Blue value.\r\n * @param {number} b1 - Green value.\r\n * @param {number} r2 - Red value.\r\n * @param {number} g2 - Blue value.\r\n * @param {number} b2 - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar RGBWithRGB = function (r1, g1, b1, r2, g2, b2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n var t = index / length;\r\n\r\n return {\r\n r: Linear(r1, r2, t),\r\n g: Linear(g1, g2, t),\r\n b: Linear(b1, b2, t)\r\n };\r\n};\r\n\r\n/**\r\n * Interpolates between the two given color objects over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithColor\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {Phaser.Display.Color} color2 - The second Color object.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithColor = function (color1, color2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color1.r, color1.g, color1.b, color2.r, color2.g, color2.b, length, index);\r\n};\r\n\r\n/**\r\n * Interpolates between the Color object and color values over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {number} r - Red value.\r\n * @param {number} g - Blue value.\r\n * @param {number} b - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithRGB = function (color, r, g, b, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color.r, color.g, color.b, r, g, b, length, index);\r\n};\r\n\r\nmodule.exports = {\r\n\r\n RGBWithRGB: RGBWithRGB,\r\n ColorWithRGB: ColorWithRGB,\r\n ColorWithColor: ColorWithColor\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Interpolate.js?')},"./node_modules/phaser/src/display/color/ObjectToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance.\r\n *\r\n * @function Phaser.Display.Color.ObjectToColor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} input - An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ObjectToColor = function (input)\r\n{\r\n return new Color(input.r, input.g, input.b, input.a);\r\n};\r\n\r\nmodule.exports = ObjectToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ObjectToColor.js?')},"./node_modules/phaser/src/display/color/RGBStringToColor.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ \"./node_modules/phaser/src/display/color/Color.js\");\n\n/**\n * Converts a CSS 'web' string into a Phaser Color object.\n * \n * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].\n *\n * @function Phaser.Display.Color.RGBStringToColor\n * @since 3.0.0\n *\n * @param {string} rgb - The CSS format color string, using the `rgb` or `rgba` format.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RGBStringToColor = function (rgb)\n{\n var color = new Color();\n\n var result = (/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d+(?:\\.\\d+)?))?\\s*\\)$/).exec(rgb.toLowerCase());\n\n if (result)\n {\n var r = parseInt(result[1], 10);\n var g = parseInt(result[2], 10);\n var b = parseInt(result[3], 10);\n var a = (result[4] !== undefined) ? parseFloat(result[4]) : 1;\n\n color.setTo(r, g, b, a * 255);\n }\n\n return color;\n};\n\nmodule.exports = RGBStringToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBStringToColor.js?")},"./node_modules/phaser/src/display/color/RGBToHSV.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts an RGB color value to HSV (hue, saturation and value).\r\n * Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.RGBToHSV\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} [out] - An object to store the color values in. If not given an HSV Color Object will be created.\r\n *\r\n * @return {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} An object with the properties `h`, `s` and `v` set.\r\n */\r\nvar RGBToHSV = function (r, g, b, out)\r\n{\r\n if (out === undefined) { out = { h: 0, s: 0, v: 0 }; }\r\n\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n var min = Math.min(r, g, b);\r\n var max = Math.max(r, g, b);\r\n var d = max - min;\r\n\r\n // achromatic by default\r\n var h = 0;\r\n var s = (max === 0) ? 0 : d / max;\r\n var v = max;\r\n\r\n if (max !== min)\r\n {\r\n if (max === r)\r\n {\r\n h = (g - b) / d + ((g < b) ? 6 : 0);\r\n }\r\n else if (max === g)\r\n {\r\n h = (b - r) / d + 2;\r\n }\r\n else if (max === b)\r\n {\r\n h = (r - g) / d + 4;\r\n }\r\n\r\n h /= 6;\r\n }\r\n\r\n if (out.hasOwnProperty('_h'))\r\n {\r\n out._h = h;\r\n out._s = s;\r\n out._v = v;\r\n }\r\n else\r\n {\r\n out.h = h;\r\n out.s = s;\r\n out.v = v;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RGBToHSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToHSV.js?")},"./node_modules/phaser/src/display/color/RGBToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ \"./node_modules/phaser/src/display/color/ComponentToHex.js\");\r\n\r\n/**\r\n * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`.\r\n *\r\n * @function Phaser.Display.Color.RGBToString\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {integer} [a=255] - The alpha value. A number between 0 and 255.\r\n * @param {string} [prefix=#] - The prefix of the string. Either `#` or `0x`.\r\n *\r\n * @return {string} A string-based representation of the color values.\r\n */\r\nvar RGBToString = function (r, g, b, a, prefix)\r\n{\r\n if (a === undefined) { a = 255; }\r\n if (prefix === undefined) { prefix = '#'; }\r\n\r\n if (prefix === '#')\r\n {\r\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\r\n }\r\n else\r\n {\r\n return '0x' + ComponentToHex(a) + ComponentToHex(r) + ComponentToHex(g) + ComponentToHex(b);\r\n }\r\n};\r\n\r\nmodule.exports = RGBToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToString.js?")},"./node_modules/phaser/src/display/color/RandomRGB.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\n\n/**\n * Creates a new Color object where the r, g, and b values have been set to random values\n * based on the given min max values.\n *\n * @function Phaser.Display.Color.RandomRGB\n * @since 3.0.0\n *\n * @param {integer} [min=0] - The minimum value to set the random range from (between 0 and 255)\n * @param {integer} [max=255] - The maximum value to set the random range from (between 0 and 255)\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RandomRGB = function (min, max)\n{\n if (min === undefined) { min = 0; }\n if (max === undefined) { max = 255; }\n\n return new Color(Between(min, max), Between(min, max), Between(min, max));\n};\n\nmodule.exports = RandomRGB;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RandomRGB.js?')},"./node_modules/phaser/src/display/color/ValueToColor.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ \"./node_modules/phaser/src/display/color/HexStringToColor.js\");\r\nvar IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ \"./node_modules/phaser/src/display/color/IntegerToColor.js\");\r\nvar ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ \"./node_modules/phaser/src/display/color/ObjectToColor.js\");\r\nvar RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ \"./node_modules/phaser/src/display/color/RGBStringToColor.js\");\r\n\r\n/**\r\n * Converts the given source color value into an instance of a Color class.\r\n * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object.\r\n *\r\n * @function Phaser.Display.Color.ValueToColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} input - The source color value to convert.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ValueToColor = function (input)\r\n{\r\n var t = typeof input;\r\n\r\n switch (t)\r\n {\r\n case 'string':\r\n\r\n if (input.substr(0, 3).toLowerCase() === 'rgb')\r\n {\r\n return RGBStringToColor(input);\r\n }\r\n else\r\n {\r\n return HexStringToColor(input);\r\n }\r\n\r\n case 'number':\r\n\r\n return IntegerToColor(input);\r\n\r\n case 'object':\r\n\r\n return ObjectToColor(input);\r\n }\r\n};\r\n\r\nmodule.exports = ValueToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ValueToColor.js?")},"./node_modules/phaser/src/display/color/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\nColor.ColorToRGBA = __webpack_require__(/*! ./ColorToRGBA */ "./node_modules/phaser/src/display/color/ColorToRGBA.js");\r\nColor.ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ "./node_modules/phaser/src/display/color/ComponentToHex.js");\r\nColor.GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\nColor.GetColor32 = __webpack_require__(/*! ./GetColor32 */ "./node_modules/phaser/src/display/color/GetColor32.js");\r\nColor.HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ "./node_modules/phaser/src/display/color/HexStringToColor.js");\r\nColor.HSLToColor = __webpack_require__(/*! ./HSLToColor */ "./node_modules/phaser/src/display/color/HSLToColor.js");\r\nColor.HSVColorWheel = __webpack_require__(/*! ./HSVColorWheel */ "./node_modules/phaser/src/display/color/HSVColorWheel.js");\r\nColor.HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\r\nColor.HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\r\nColor.IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ "./node_modules/phaser/src/display/color/IntegerToColor.js");\r\nColor.IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\r\nColor.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/display/color/Interpolate.js");\r\nColor.ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ "./node_modules/phaser/src/display/color/ObjectToColor.js");\r\nColor.RandomRGB = __webpack_require__(/*! ./RandomRGB */ "./node_modules/phaser/src/display/color/RandomRGB.js");\r\nColor.RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ "./node_modules/phaser/src/display/color/RGBStringToColor.js");\r\nColor.RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ "./node_modules/phaser/src/display/color/RGBToHSV.js");\r\nColor.RGBToString = __webpack_require__(/*! ./RGBToString */ "./node_modules/phaser/src/display/color/RGBToString.js");\r\nColor.ValueToColor = __webpack_require__(/*! ./ValueToColor */ "./node_modules/phaser/src/display/color/ValueToColor.js");\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/index.js?')},"./node_modules/phaser/src/display/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Align: __webpack_require__(/*! ./align */ "./node_modules/phaser/src/display/align/index.js"),\r\n BaseShader: __webpack_require__(/*! ./shader/BaseShader */ "./node_modules/phaser/src/display/shader/BaseShader.js"),\r\n Bounds: __webpack_require__(/*! ./bounds */ "./node_modules/phaser/src/display/bounds/index.js"),\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/display/canvas/index.js"),\r\n Color: __webpack_require__(/*! ./color */ "./node_modules/phaser/src/display/color/index.js"),\r\n Masks: __webpack_require__(/*! ./mask */ "./node_modules/phaser/src/display/mask/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/index.js?')},"./node_modules/phaser/src/display/mask/BitmapMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n * \r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/BitmapMask.js?")},"./node_modules/phaser/src/display/mask/GeometryMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/GeometryMask.js?")},"./node_modules/phaser/src/display/mask/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Masks\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMask: __webpack_require__(/*! ./BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js"),\r\n GeometryMask: __webpack_require__(/*! ./GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/index.js?')},"./node_modules/phaser/src/display/shader/BaseShader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created.\r\n * \r\n * It contains the raw source code to the fragment and vertex shader, as well as an object that defines\r\n * the uniforms the shader requires, if any.\r\n * \r\n * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced\r\n * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`.\r\n * \r\n * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource.\r\n * They can also be created at runtime, allowing you to use dynamically generated shader source code.\r\n * \r\n * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader,\r\n * suitable for debug rendering.\r\n *\r\n * @class BaseShader\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key of this shader. Must be unique within the shader cache.\r\n * @param {string} [fragmentSrc] - The fragment source for the shader.\r\n * @param {string} [vertexSrc] - The vertex source for the shader.\r\n * @param {any} [uniforms] - Optional object defining the uniforms the shader uses.\r\n */\r\nvar BaseShader = new Class({\r\n\r\n initialize:\r\n\r\n function BaseShader (key, fragmentSrc, vertexSrc, uniforms)\r\n {\r\n if (!fragmentSrc || fragmentSrc === '')\r\n {\r\n fragmentSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform vec2 resolution;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n ' vec2 uv = fragCoord / resolution.xy;',\r\n ' gl_FragColor = vec4(uv.xyx, 1.0);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (!vertexSrc || vertexSrc === '')\r\n {\r\n vertexSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform mat4 uProjectionMatrix;',\r\n 'uniform mat4 uViewMatrix;',\r\n 'uniform vec2 uResolution;',\r\n\r\n 'attribute vec2 inPosition;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n 'gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);',\r\n 'fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (uniforms === undefined) { uniforms = null; }\r\n\r\n /**\r\n * The key of this shader, unique within the shader cache of this Phaser game instance.\r\n *\r\n * @name Phaser.Display.BaseShader#key\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The source code, as a string, of the fragment shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#fragmentSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.fragmentSrc = fragmentSrc;\r\n\r\n /**\r\n * The source code, as a string, of the vertex shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#vertexSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.vertexSrc = vertexSrc;\r\n\r\n /**\r\n * The default uniforms for this shader.\r\n *\r\n * @name Phaser.Display.BaseShader#uniforms\r\n * @type {?any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = uniforms;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseShader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/shader/BaseShader.js?")},"./node_modules/phaser/src/dom/AddToDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it.\r\n * If no parent was given it falls back to using `document.body`.\r\n *\r\n * @function Phaser.DOM.AddToDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The element to be added to the DOM. Usually a Canvas object.\r\n * @param {(string|HTMLElement)} [parent] - The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.\r\n *\r\n * @return {HTMLElement} The element that was added to the DOM.\r\n */\r\nvar AddToDOM = function (element, parent)\r\n{\r\n var target;\r\n\r\n if (parent)\r\n {\r\n if (typeof parent === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(parent);\r\n }\r\n else if (typeof parent === 'object' && parent.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = parent;\r\n }\r\n }\r\n else if (element.parentElement)\r\n {\r\n return element;\r\n }\r\n\r\n // Fallback, covers an invalid ID and a non HTMLElement object\r\n if (!target)\r\n {\r\n target = document.body;\r\n }\r\n\r\n target.appendChild(element);\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = AddToDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/AddToDOM.js?")},"./node_modules/phaser/src/dom/CreateDOMContainer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\n\r\nvar CreateDOMContainer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (!config.parent || !config.domCreateContainer)\r\n {\r\n return;\r\n }\r\n\r\n // DOM Element Container\r\n var div = document.createElement('div');\r\n\r\n div.style.cssText = [\r\n 'display: block;',\r\n 'width: ' + game.scale.width + 'px;',\r\n 'height: ' + game.scale.height + 'px;',\r\n 'padding: 0; margin: 0;',\r\n 'position: absolute;',\r\n 'overflow: hidden;',\r\n 'pointer-events: none;',\r\n 'transform: scale(1);',\r\n 'transform-origin: left top;'\r\n ].join(' ');\r\n\r\n game.domContainer = div;\r\n\r\n AddToDOM(div, config.parent);\r\n};\r\n\r\nmodule.exports = CreateDOMContainer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/CreateDOMContainer.js?")},"./node_modules/phaser/src/dom/DOMContentLoaded.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ../device/OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * @callback ContentLoadedCallback\r\n */\r\n\r\n/**\r\n * Inspects the readyState of the document. If the document is already complete then it invokes the given callback.\r\n * If not complete it sets up several event listeners such as `deviceready`, and once those fire, it invokes the callback.\r\n * Called automatically by the Phaser.Game instance. Should not usually be accessed directly.\r\n *\r\n * @function Phaser.DOM.DOMContentLoaded\r\n * @since 3.0.0\r\n *\r\n * @param {ContentLoadedCallback} callback - The callback to be invoked when the device is ready and the DOM content is loaded.\r\n */\r\nvar DOMContentLoaded = function (callback)\r\n{\r\n if (document.readyState === 'complete' || document.readyState === 'interactive')\r\n {\r\n callback();\r\n\r\n return;\r\n }\r\n\r\n var check = function ()\r\n {\r\n document.removeEventListener('deviceready', check, true);\r\n document.removeEventListener('DOMContentLoaded', check, true);\r\n window.removeEventListener('load', check, true);\r\n\r\n callback();\r\n };\r\n\r\n if (!document.body)\r\n {\r\n window.setTimeout(check, 20);\r\n }\r\n else if (OS.cordova)\r\n {\r\n // Ref. http://docs.phonegap.com/en/3.5.0/cordova_events_events.md.html#deviceready\r\n document.addEventListener('deviceready', check, false);\r\n }\r\n else\r\n {\r\n document.addEventListener('DOMContentLoaded', check, true);\r\n window.addEventListener('load', check, true);\r\n }\r\n};\r\n\r\nmodule.exports = DOMContentLoaded;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/DOMContentLoaded.js?")},"./node_modules/phaser/src/dom/GetInnerHeight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to determine the document inner height across iOS and standard devices.\r\n * Based on code by @tylerjpeterson\r\n *\r\n * @function Phaser.DOM.GetInnerHeight\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} iOS - Is this running on iOS?\r\n *\r\n * @return {number} The inner height value.\r\n */\r\nvar GetInnerHeight = function (iOS)\r\n{\r\n\r\n if (!iOS)\r\n {\r\n return window.innerHeight;\r\n }\r\n\r\n var axis = Math.abs(window.orientation);\r\n\r\n var size = { w: 0, h: 0 };\r\n \r\n var ruler = document.createElement('div');\r\n\r\n ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0');\r\n\r\n document.documentElement.appendChild(ruler);\r\n\r\n size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth;\r\n size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight;\r\n\r\n document.documentElement.removeChild(ruler);\r\n\r\n ruler = null;\r\n\r\n if (Math.abs(window.orientation) !== 90)\r\n {\r\n return size.h;\r\n }\r\n else\r\n {\r\n return size.w;\r\n }\r\n};\r\n\r\nmodule.exports = GetInnerHeight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetInnerHeight.js?")},"./node_modules/phaser/src/dom/GetScreenOrientation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../scale/const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\n\r\n/**\r\n * Attempts to determine the screen orientation using the Orientation API.\r\n *\r\n * @function Phaser.DOM.GetScreenOrientation\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The width of the viewport.\r\n * @param {number} height - The height of the viewport.\r\n *\r\n * @return {string} The orientation.\r\n */\r\nvar GetScreenOrientation = function (width, height)\r\n{\r\n var screen = window.screen;\r\n var orientation = (screen) ? screen.orientation || screen.mozOrientation || screen.msOrientation : false;\r\n\r\n if (orientation && typeof orientation.type === 'string')\r\n {\r\n // Screen Orientation API specification\r\n return orientation.type;\r\n }\r\n else if (typeof orientation === 'string')\r\n {\r\n // moz / ms-orientation are strings\r\n return orientation;\r\n }\r\n\r\n if (screen)\r\n {\r\n return (screen.height > screen.width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (typeof window.orientation === 'number')\r\n {\r\n // This may change by device based on \"natural\" orientation.\r\n return (window.orientation === 0 || window.orientation === 180) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (window.matchMedia)\r\n {\r\n if (window.matchMedia('(orientation: portrait)').matches)\r\n {\r\n return CONST.PORTRAIT;\r\n }\r\n else if (window.matchMedia('(orientation: landscape)').matches)\r\n {\r\n return CONST.LANDSCAPE;\r\n }\r\n }\r\n \r\n return (height > width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n};\r\n\r\nmodule.exports = GetScreenOrientation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetScreenOrientation.js?")},"./node_modules/phaser/src/dom/GetTarget.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to get the target DOM element based on the given value, which can be either\r\n * a string, in which case it will be looked-up by ID, or an element node. If nothing\r\n * can be found it will return a reference to the document.body.\r\n *\r\n * @function Phaser.DOM.GetTarget\r\n * @since 3.16.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to look-up.\r\n */\r\nvar GetTarget = function (element)\r\n{\r\n var target;\r\n\r\n if (element !== '')\r\n {\r\n if (typeof element === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(element);\r\n }\r\n else if (element && element.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = element;\r\n }\r\n }\r\n\r\n // Fallback to the document body. Covers an invalid ID and a non HTMLElement object.\r\n if (!target)\r\n {\r\n // Use the full window\r\n target = document.body;\r\n }\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = GetTarget;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetTarget.js?")},"./node_modules/phaser/src/dom/ParseXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given data string and parses it as XML.\r\n * First tries to use the window.DOMParser and reverts to the Microsoft.XMLDOM if that fails.\r\n * The parsed XML object is returned, or `null` if there was an error while parsing the data.\r\n *\r\n * @function Phaser.DOM.ParseXML\r\n * @since 3.0.0\r\n *\r\n * @param {string} data - The XML source stored in a string.\r\n *\r\n * @return {?(DOMParser|ActiveXObject)} The parsed XML data, or `null` if the data could not be parsed.\r\n */\r\nvar ParseXML = function (data)\r\n{\r\n var xml = '';\r\n\r\n try\r\n {\r\n if (window['DOMParser'])\r\n {\r\n var domparser = new DOMParser();\r\n xml = domparser.parseFromString(data, 'text/xml');\r\n }\r\n else\r\n {\r\n xml = new ActiveXObject('Microsoft.XMLDOM');\r\n xml.loadXML(data);\r\n }\r\n }\r\n catch (e)\r\n {\r\n xml = null;\r\n }\r\n\r\n if (!xml || !xml.documentElement || xml.getElementsByTagName('parsererror').length)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n return xml;\r\n }\r\n};\r\n\r\nmodule.exports = ParseXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/ParseXML.js?")},"./node_modules/phaser/src/dom/RemoveFromDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to remove the element from its parentNode in the DOM.\r\n *\r\n * @function Phaser.DOM.RemoveFromDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to remove from its parent node.\r\n */\r\nvar RemoveFromDOM = function (element)\r\n{\r\n if (element.parentNode)\r\n {\r\n element.parentNode.removeChild(element);\r\n }\r\n};\r\n\r\nmodule.exports = RemoveFromDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RemoveFromDOM.js?")},"./node_modules/phaser/src/dom/RequestAnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * Abstracts away the use of RAF or setTimeOut for the core game update loop.\r\n * This is invoked automatically by the Phaser.Game instance.\r\n *\r\n * @class RequestAnimationFrame\r\n * @memberof Phaser.DOM\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar RequestAnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function RequestAnimationFrame ()\r\n {\r\n /**\r\n * True if RequestAnimationFrame is running, otherwise false.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isRunning\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The callback to be invoked each step.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#callback\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * The most recent timestamp. Either a DOMHighResTimeStamp under RAF or `Date.now` under SetTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#tick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.tick = 0;\r\n\r\n /**\r\n * True if the step is using setTimeout instead of RAF.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isSetTimeOut\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isSetTimeOut = false;\r\n\r\n /**\r\n * The setTimeout or RAF callback ID used when canceling them.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#timeOutID\r\n * @type {?number}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.timeOutID = null;\r\n\r\n /**\r\n * The previous time the step was called.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n var _this = this;\r\n\r\n /**\r\n * The RAF step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to requestAnimationFrame.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#step\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.step = function step ()\r\n {\r\n // Because we cannot trust the time passed to this callback from the browser and need it kept in sync with event times\r\n var timestamp = window.performance.now();\r\n\r\n // DOMHighResTimeStamp\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = timestamp;\r\n\r\n _this.callback(timestamp);\r\n\r\n _this.timeOutID = window.requestAnimationFrame(step);\r\n };\r\n\r\n /**\r\n * The SetTimeout step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to setTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#stepTimeout\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.stepTimeout = function stepTimeout ()\r\n {\r\n var d = Date.now();\r\n\r\n var delay = Math.max(16 + _this.lastTime - d, 0);\r\n\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = d;\r\n\r\n _this.callback(d);\r\n\r\n _this.timeOutID = window.setTimeout(stepTimeout, delay);\r\n };\r\n },\r\n\r\n /**\r\n * Starts the requestAnimationFrame or setTimeout process running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#start\r\n * @since 3.0.0\r\n *\r\n * @param {FrameRequestCallback} callback - The callback to invoke each step.\r\n * @param {boolean} forceSetTimeOut - Should it use SetTimeout, even if RAF is available?\r\n */\r\n start: function (callback, forceSetTimeOut)\r\n {\r\n if (this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this.callback = callback;\r\n\r\n this.isSetTimeOut = forceSetTimeOut;\r\n\r\n this.isRunning = true;\r\n\r\n this.timeOutID = (forceSetTimeOut) ? window.setTimeout(this.stepTimeout, 0) : window.requestAnimationFrame(this.step);\r\n },\r\n\r\n /**\r\n * Stops the requestAnimationFrame or setTimeout from running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n if (this.isSetTimeOut)\r\n {\r\n clearTimeout(this.timeOutID);\r\n }\r\n else\r\n {\r\n window.cancelAnimationFrame(this.timeOutID);\r\n }\r\n },\r\n\r\n /**\r\n * Stops the step from running and clears the callback reference.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RequestAnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RequestAnimationFrame.js?')},"./node_modules/phaser/src/dom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.DOM\r\n */\r\n\r\nvar Dom = {\r\n\r\n AddToDOM: __webpack_require__(/*! ./AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js"),\r\n DOMContentLoaded: __webpack_require__(/*! ./DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js"),\r\n GetScreenOrientation: __webpack_require__(/*! ./GetScreenOrientation */ "./node_modules/phaser/src/dom/GetScreenOrientation.js"),\r\n GetTarget: __webpack_require__(/*! ./GetTarget */ "./node_modules/phaser/src/dom/GetTarget.js"),\r\n ParseXML: __webpack_require__(/*! ./ParseXML */ "./node_modules/phaser/src/dom/ParseXML.js"),\r\n RemoveFromDOM: __webpack_require__(/*! ./RemoveFromDOM */ "./node_modules/phaser/src/dom/RemoveFromDOM.js"),\r\n RequestAnimationFrame: __webpack_require__(/*! ./RequestAnimationFrame */ "./node_modules/phaser/src/dom/RequestAnimationFrame.js")\r\n\r\n};\r\n\r\nmodule.exports = Dom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/index.js?')},"./node_modules/phaser/src/events/EventEmitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EE = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\n\r\n/**\r\n * @classdesc\r\n * EventEmitter is a Scene Systems plugin compatible version of eventemitter3.\r\n *\r\n * @class EventEmitter\r\n * @memberof Phaser.Events\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar EventEmitter = new Class({\r\n\r\n Extends: EE,\r\n\r\n initialize:\r\n\r\n function EventEmitter ()\r\n {\r\n EE.call(this);\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Return an array listing the events for which the emitter has registered listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#eventNames\r\n * @since 3.0.0\r\n *\r\n * @return {array}\r\n */\r\n\r\n/**\r\n * Return the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {array} The registered listeners.\r\n */\r\n\r\n/**\r\n * Return the number of listeners listening to a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listenerCount\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {number} The number of listeners.\r\n */\r\n\r\n/**\r\n * Calls each of the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#emit\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {...*} [args] - Additional arguments that will be passed to the event handler.\r\n *\r\n * @return {boolean} `true` if the event had listeners, else `false`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#on\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#addListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a one-time listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#once\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#off\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove all listeners, or those of the specified event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeAllListeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} [event] - The event name.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\nPluginCache.register(\'EventEmitter\', EventEmitter, \'events\');\r\n\r\nmodule.exports = EventEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/EventEmitter.js?')},"./node_modules/phaser/src/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Events\r\n */\r\n\r\nmodule.exports = { EventEmitter: __webpack_require__(/*! ./EventEmitter */ "./node_modules/phaser/src/events/EventEmitter.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/index.js?')},"./node_modules/phaser/src/gameobjects/BuildGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // ScaleMode\r\n\r\n gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT);\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObject.js?")},"./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Adds an Animation component to a Sprite and populates it based on the given config.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObjectAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The sprite to add an Animation component to.\r\n * @param {object} config - The animation config.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The updated Sprite.\r\n */\r\nvar BuildGameObjectAnimation = function (sprite, config)\r\n{\r\n var animConfig = GetAdvancedValue(config, 'anims', null);\r\n\r\n if (animConfig === null)\r\n {\r\n return sprite;\r\n }\r\n\r\n if (typeof animConfig === 'string')\r\n {\r\n // { anims: 'key' }\r\n sprite.anims.play(animConfig);\r\n }\r\n else if (typeof animConfig === 'object')\r\n {\r\n // { anims: {\r\n // key: string\r\n // startFrame: [string|integer]\r\n // delay: [float]\r\n // repeat: [integer]\r\n // repeatDelay: [float]\r\n // yoyo: [boolean]\r\n // play: [boolean]\r\n // delayedPlay: [boolean]\r\n // }\r\n // }\r\n\r\n var anims = sprite.anims;\r\n\r\n var key = GetAdvancedValue(animConfig, 'key', undefined);\r\n var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined);\r\n\r\n var delay = GetAdvancedValue(animConfig, 'delay', 0);\r\n var repeat = GetAdvancedValue(animConfig, 'repeat', 0);\r\n var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0);\r\n var yoyo = GetAdvancedValue(animConfig, 'yoyo', false);\r\n\r\n var play = GetAdvancedValue(animConfig, 'play', false);\r\n var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0);\r\n\r\n anims.setDelay(delay);\r\n anims.setRepeat(repeat);\r\n anims.setRepeatDelay(repeatDelay);\r\n anims.setYoyo(yoyo);\r\n\r\n if (play)\r\n {\r\n anims.play(key, startFrame);\r\n }\r\n else if (delayedPlay > 0)\r\n {\r\n anims.delayedPlay(delayedPlay, key, startFrame);\r\n }\r\n else\r\n {\r\n anims.load(key);\r\n }\r\n }\r\n\r\n return sprite;\r\n};\r\n\r\nmodule.exports = BuildGameObjectAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js?")},"./node_modules/phaser/src/gameobjects/DisplayList.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar List = __webpack_require__(/*! ../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Display List plugin.\r\n *\r\n * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame.\r\n *\r\n * Some of these Game Objects may also be part of the Scene\'s [Update List]{@link Phaser.GameObjects.UpdateList}, for updating.\r\n *\r\n * @class DisplayList\r\n * @extends Phaser.Structs.List.\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Display List belongs to.\r\n */\r\nvar DisplayList = new Class({\r\n\r\n Extends: List,\r\n\r\n initialize:\r\n\r\n function DisplayList (scene)\r\n {\r\n List.call(this, scene);\r\n\r\n /**\r\n * The flag the determines whether Game Objects should be sorted when `depthSort()` is called.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#sortChildrenFlag\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.sortChildrenFlag = false;\r\n\r\n /**\r\n * The Scene that this Display List belongs to.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene\'s Systems.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next call to depthSort.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.sortChildrenFlag = true;\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n if (this.sortChildrenFlag)\r\n {\r\n StableSort.inplace(this.list, this.sortByDepth);\r\n\r\n this.sortChildrenFlag = false;\r\n }\r\n },\r\n\r\n /**\r\n * Compare the depth of two Game Objects.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#sortByDepth\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object.\r\n *\r\n * @return {integer} The difference between the depths of each Game Object.\r\n */\r\n sortByDepth: function (childA, childB)\r\n {\r\n return childA._depth - childB._depth;\r\n },\r\n\r\n /**\r\n * Returns an array which contains all objects currently on the Display List.\r\n * This is a reference to the main list array, not a copy of it, so be careful not to modify it.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#getChildren\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.list;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.list[i].destroy(true);\r\n }\r\n\r\n this.list.length = 0;\r\n\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DisplayList\', DisplayList, \'displayList\');\r\n\r\nmodule.exports = DisplayList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/DisplayList.js?')},"./node_modules/phaser/src/gameobjects/GameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ComponentsToJSON = __webpack_require__(/*! ./components/ToJSON */ \"./node_modules/phaser/src/gameobjects/components/ToJSON.js\");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Game Object belongs.\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n * \r\n * Phaser itself will never modify this value, although plugins may do so.\r\n * \r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could move from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(integer|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {integer}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n * \r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n * \r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(integer|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (shape, callback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, shape, callback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n if (this.input)\r\n {\r\n this.input.enabled = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n * \r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {integer[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n // indexes.unshift([parent.getIndex(child), parent.name]);\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\r\n */\r\n destroy: function (fromScene)\r\n {\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n\r\n var sys = this.scene.sys;\r\n\r\n if (!fromScene)\r\n {\r\n sys.displayList.remove(this);\r\n sys.updateList.remove(this);\r\n }\r\n\r\n if (this.input)\r\n {\r\n sys.input.clear(this);\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n this.body = undefined;\r\n }\r\n\r\n // Tell the Scene to re-sort the children\r\n if (!fromScene)\r\n {\r\n sys.queueDepthSort();\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n\r\n this.parentContainer = undefined;\r\n\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {integer} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObject.js?")},"./node_modules/phaser/src/gameobjects/GameObjectCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Creator is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically\r\n * added to the Scene.\r\n *\r\n * Game Objects directly register themselves with the Creator and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectCreator\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectCreator = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectCreator (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Creator belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object creator functions\r\n\r\nGameObjectCreator.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectCreator.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectCreator.remove = function (factoryType)\r\n{\r\n if (GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectCreator.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectCreator\', GameObjectCreator, \'make\');\r\n\r\nmodule.exports = GameObjectCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectCreator.js?')},"./node_modules/phaser/src/gameobjects/GameObjectFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n * \r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object factory functions\r\n\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectFactory\', GameObjectFactory, \'add\');\r\n\r\nmodule.exports = GameObjectFactory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectFactory.js?')},"./node_modules/phaser/src/gameobjects/UpdateList.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Update List plugin.\r\n *\r\n * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame.\r\n *\r\n * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering.\r\n *\r\n * @class UpdateList\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that the Update List belongs to.\r\n */\r\nvar UpdateList = new Class({\r\n\r\n initialize:\r\n\r\n function UpdateList (scene)\r\n {\r\n /**\r\n * The Scene that the Update List belongs to.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene's Systems.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The list of Game Objects.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_list\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Game Objects that are pending insertion into the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingInsertion\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Game Objects that are pending removal from the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingRemoval\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Add a Game Object to the Update List.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The added Game Object.\r\n */\r\n add: function (child)\r\n {\r\n // Is child already in this list?\r\n\r\n if (this._list.indexOf(child) === -1 && this._pendingInsertion.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The pre-update step.\r\n *\r\n * Handles Game Objects that are pending insertion to and removal from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var gameObject;\r\n\r\n // Delete old gameObjects\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n gameObject = this._pendingRemoval[i];\r\n\r\n var index = this._list.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._list.splice(index, 1);\r\n }\r\n }\r\n\r\n // Move pending to active\r\n this._list = this._list.concat(this._pendingInsertion.splice(0));\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * The update step.\r\n *\r\n * Pre-updates every active Game Object in the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n var list = this._list;\r\n var length = list.length;\r\n\r\n for (var i = 0; i < length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n if (gameObject.active)\r\n {\r\n gameObject.preUpdate.call(gameObject, time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Remove a Game Object from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove from the list.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The removed Game Object.\r\n */\r\n remove: function (child)\r\n {\r\n if (this._list.indexOf(child) !== -1 && this._pendingRemoval.indexOf(child) === -1)\r\n {\r\n this._pendingRemoval.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Remove all Game Objects from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.UpdateList} This UpdateList.\r\n */\r\n removeAll: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this._list[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this._list[i].destroy(true);\r\n }\r\n\r\n i = this._pendingRemoval.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingRemoval[i].destroy(true);\r\n }\r\n\r\n i = this._pendingInsertion.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingInsertion[i].destroy(true);\r\n }\r\n\r\n this._list.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n },\r\n\r\n /**\r\n * The length of the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this._list.length;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('UpdateList', UpdateList, 'updateList');\r\n\r\nmodule.exports = UpdateList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/UpdateList.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the position, width and height of a BitmapText Game Object.\r\n *\r\n * Returns a BitmapTextSize object that contains global and local variants of the Game Objects x and y coordinates and\r\n * its width and height.\r\n *\r\n * The global position and size take into account the Game Object's position and scale.\r\n *\r\n * The local position and size just takes into account the font data.\r\n *\r\n * @function GetBitmapTextSize\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - The BitmapText to calculate the position, width and height of.\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n * @param {object} [out] - Optional object to store the results in, to save constant object creation.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} The calculated position, width and height of the BitmapText.\r\n */\r\nvar GetBitmapTextSize = function (src, round, out)\r\n{\r\n if (out === undefined)\r\n {\r\n out = {\r\n local: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n global: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n lines: {\r\n shortest: 0,\r\n longest: 0,\r\n lengths: null\r\n }\r\n };\r\n }\r\n\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var bx = Number.MAX_VALUE;\r\n var by = Number.MAX_VALUE;\r\n var bw = 0;\r\n var bh = 0;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src.letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var scale = (src.fontSize / src.fontData.size);\r\n var sx = scale * src.scaleX;\r\n var sy = scale * src.scaleY;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n var lineWidths = [];\r\n var shortestLine = Number.MAX_VALUE;\r\n var longestLine = 0;\r\n var currentLine = 0;\r\n var currentLineWidth = 0;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n currentLine++;\r\n currentLineWidth = 0;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n x = xAdvance;\r\n y = yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (bx > x)\r\n {\r\n bx = x;\r\n }\r\n\r\n if (by > y)\r\n {\r\n by = y;\r\n }\r\n\r\n var gw = x + glyph.xAdvance;\r\n var gh = y + lineHeight;\r\n\r\n if (bw < gw)\r\n {\r\n bw = gw;\r\n }\r\n\r\n if (bh < gh)\r\n {\r\n bh = gh;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n currentLineWidth = gw * scale;\r\n }\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n var local = out.local;\r\n var global = out.global;\r\n var lines = out.lines;\r\n\r\n local.x = bx * scale;\r\n local.y = by * scale;\r\n local.width = bw * scale;\r\n local.height = bh * scale;\r\n\r\n global.x = (src.x - src.displayOriginX) + (bx * sx);\r\n global.y = (src.y - src.displayOriginY) + (by * sy);\r\n global.width = bw * sx;\r\n global.height = bh * sy;\r\n\r\n lines.shortest = shortestLine;\r\n lines.longest = longestLine;\r\n lines.lengths = lineWidths;\r\n\r\n if (round)\r\n {\r\n local.x = Math.round(local.x);\r\n local.y = Math.round(local.y);\r\n local.width = Math.round(local.width);\r\n local.height = Math.round(local.height);\r\n\r\n global.x = Math.round(global.x);\r\n global.y = Math.round(global.y);\r\n global.width = Math.round(global.width);\r\n global.height = Math.round(global.height);\r\n\r\n lines.shortest = Math.round(shortestLine);\r\n lines.longest = Math.round(longestLine);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBitmapTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ./ParseXMLBitmapFont */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @function ParseFromAtlas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont's texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture's frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} xSpacing - The x-axis spacing to add between each letter.\r\n * @param {integer} ySpacing - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nvar ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing)\r\n{\r\n var frame = scene.sys.textures.getFrame(textureKey, frameKey);\r\n var xml = scene.sys.cache.xml.get(xmlKey);\r\n\r\n if (frame && xml)\r\n {\r\n var data = ParseXMLBitmapFont(xml, xSpacing, ySpacing, frame);\r\n\r\n scene.sys.cache.bitmapFont.add(fontName, { data: data, texture: textureKey, frame: frameKey });\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = ParseFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor\r\n * and create a BitmapText object using a fixed-width retro font.\r\n *\r\n * @function Phaser.GameObjects.RetroFont.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Phaser Scene.\r\n * @param {Phaser.Types.GameObjects.BitmapText.RetroFontConfig} config - The font configuration object.\r\n *\r\n * @return {object} A parsed Bitmap Font data entry for the Bitmap Font cache.\r\n */\r\nvar ParseRetroFont = function (scene, config)\r\n{\r\n var w = config.width;\r\n var h = config.height;\r\n var cx = Math.floor(w / 2);\r\n var cy = Math.floor(h / 2);\r\n var letters = GetValue(config, 'chars', '');\r\n\r\n if (letters === '')\r\n {\r\n return;\r\n }\r\n\r\n var key = GetValue(config, 'image', '');\r\n var offsetX = GetValue(config, 'offset.x', 0);\r\n var offsetY = GetValue(config, 'offset.y', 0);\r\n var spacingX = GetValue(config, 'spacing.x', 0);\r\n var spacingY = GetValue(config, 'spacing.y', 0);\r\n var lineSpacing = GetValue(config, 'lineSpacing', 0);\r\n\r\n var charsPerRow = GetValue(config, 'charsPerRow', null);\r\n\r\n if (charsPerRow === null)\r\n {\r\n charsPerRow = scene.sys.textures.getFrame(key).width / w;\r\n\r\n if (charsPerRow > letters.length)\r\n {\r\n charsPerRow = letters.length;\r\n }\r\n }\r\n\r\n var x = offsetX;\r\n var y = offsetY;\r\n\r\n var data = {\r\n retroFont: true,\r\n font: key,\r\n size: w,\r\n lineHeight: h + lineSpacing,\r\n chars: {}\r\n };\r\n\r\n var r = 0;\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n // var node = letters[i];\r\n\r\n var charCode = letters.charCodeAt(i);\r\n\r\n data.chars[charCode] =\r\n {\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h,\r\n centerX: cx,\r\n centerY: cy,\r\n xOffset: 0,\r\n yOffset: 0,\r\n xAdvance: w,\r\n data: {},\r\n kerning: {}\r\n };\r\n\r\n r++;\r\n\r\n if (r === charsPerRow)\r\n {\r\n r = 0;\r\n x = offsetX;\r\n y += h + spacingY;\r\n }\r\n else\r\n {\r\n x += w + spacingX;\r\n }\r\n }\r\n\r\n var entry = {\r\n data: data,\r\n frame: null,\r\n texture: key\r\n };\r\n\r\n return entry;\r\n};\r\n\r\nmodule.exports = ParseRetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Read an integer value from an XML Node.\r\n *\r\n * @function getValue\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Node} node - The XML Node.\r\n * @param {string} attribute - The attribute to read.\r\n *\r\n * @return {integer} The parsed value.\r\n */\r\nfunction getValue (node, attribute)\r\n{\r\n return parseInt(node.getAttribute(attribute), 10);\r\n}\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @function ParseXMLBitmapFont\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nvar ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)\r\n{\r\n if (xSpacing === undefined) { xSpacing = 0; }\r\n if (ySpacing === undefined) { ySpacing = 0; }\r\n\r\n var data = {};\r\n var info = xml.getElementsByTagName('info')[0];\r\n var common = xml.getElementsByTagName('common')[0];\r\n\r\n data.font = info.getAttribute('face');\r\n data.size = getValue(info, 'size');\r\n data.lineHeight = getValue(common, 'lineHeight') + ySpacing;\r\n data.chars = {};\r\n\r\n var letters = xml.getElementsByTagName('char');\r\n\r\n var adjustForTrim = (frame !== undefined && frame.trimmed);\r\n\r\n if (adjustForTrim)\r\n {\r\n var top = frame.height;\r\n var left = frame.width;\r\n }\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n var node = letters[i];\r\n\r\n var charCode = getValue(node, 'id');\r\n var gx = getValue(node, 'x');\r\n var gy = getValue(node, 'y');\r\n var gw = getValue(node, 'width');\r\n var gh = getValue(node, 'height');\r\n\r\n // Handle frame trim issues\r\n\r\n if (adjustForTrim)\r\n {\r\n if (gx < left)\r\n {\r\n left = gx;\r\n }\r\n\r\n if (gy < top)\r\n {\r\n top = gy;\r\n }\r\n }\r\n\r\n data.chars[charCode] =\r\n {\r\n x: gx,\r\n y: gy,\r\n width: gw,\r\n height: gh,\r\n centerX: Math.floor(gw / 2),\r\n centerY: Math.floor(gh / 2),\r\n xOffset: getValue(node, 'xoffset'),\r\n yOffset: getValue(node, 'yoffset'),\r\n xAdvance: getValue(node, 'xadvance') + xSpacing,\r\n data: {},\r\n kerning: {}\r\n };\r\n }\r\n\r\n if (adjustForTrim && top !== 0 && left !== 0)\r\n {\r\n // console.log('top and left', top, left, frame.x, frame.y);\r\n\r\n // Now we know the top and left coordinates of the glyphs in the original data\r\n // so we can work out how much to adjust the glyphs by\r\n\r\n for (var code in data.chars)\r\n {\r\n var glyph = data.chars[code];\r\n\r\n glyph.x -= frame.x;\r\n glyph.y -= frame.y;\r\n }\r\n }\r\n\r\n var kernings = xml.getElementsByTagName('kerning');\r\n\r\n for (i = 0; i < kernings.length; i++)\r\n {\r\n var kern = kernings[i];\r\n\r\n var first = getValue(kern, 'first');\r\n var second = getValue(kern, 'second');\r\n var amount = getValue(kern, 'amount');\r\n\r\n data.chars[second].kerning[first] = amount;\r\n }\r\n\r\n return data;\r\n};\r\n\r\nmodule.exports = ParseXMLBitmapFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/gameobjects/bitmaptext/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.RetroFont\r\n * @since 3.6.0\r\n */\r\n\r\nvar RetroFont = { Parse: __webpack_require__(/*! ./ParseRetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js") };\r\n\r\n// Merge in the consts\r\nRetroFont = Extend(false, RetroFont, RETRO_FONT_CONST);\r\n\r\nmodule.exports = RetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = {\r\n\r\n /**\r\n * Text Set 1 = !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET1\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET1: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',\r\n\r\n /**\r\n * Text Set 2 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET2\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET2: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET3\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET3: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ',\r\n\r\n /**\r\n * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET4\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET4: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789',\r\n\r\n /**\r\n * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET5\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET5: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \\'!?-*:0123456789',\r\n\r\n /**\r\n * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET6\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET6: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.\\' ',\r\n\r\n /**\r\n * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET7\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET7: 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-\\'39',\r\n\r\n /**\r\n * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET8\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET8: '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET9\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET9: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\\'\"?!',\r\n\r\n /**\r\n * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET10\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET10: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET11\r\n * @since 3.6.0\r\n * @type {string}\r\n */\r\n TEXT_SET11: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()\\':;0123456789'\r\n\r\n};\r\n\r\nmodule.exports = RETRO_FONT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/const.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ../static/BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Render = __webpack_require__(/*! ./DynamicBitmapTextRender */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * @class DynamicBitmapText\r\n * @extends Phaser.GameObjects.BitmapText\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar DynamicBitmapText = new Class({\r\n\r\n Extends: BitmapText,\r\n\r\n Mixins: [\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicBitmapText (scene, x, y, font, text, size, align)\r\n {\r\n BitmapText.call(this, scene, x, y, font, text, size, align);\r\n\r\n this.type = 'DynamicBitmapText';\r\n\r\n /**\r\n * The horizontal scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollY = 0;\r\n\r\n /**\r\n * The crop width of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropWidth = 0;\r\n\r\n /**\r\n * The crop height of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropHeight = 0;\r\n\r\n /**\r\n * A callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#displayCallback\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallback}\r\n * @since 3.0.0\r\n */\r\n this.displayCallback;\r\n\r\n /**\r\n * The data object that is populated during rendering, then passed to the displayCallback.\r\n * You should modify this object then return it back from the callback. It's updated values\r\n * will be used to render the specific glyph.\r\n * \r\n * Please note that if you need a reference to this object locally in your game code then you\r\n * should shallow copy it, as it's updated and re-used for every glyph in the text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#callbackData\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig}\r\n * @since 3.11.0\r\n */\r\n this.callbackData = {\r\n parent: this,\r\n color: 0,\r\n tint: {\r\n topLeft: 0,\r\n topRight: 0,\r\n bottomLeft: 0,\r\n bottomRight: 0\r\n },\r\n index: 0,\r\n charCode: 0,\r\n x: 0,\r\n y: 0,\r\n scale: 0,\r\n rotation: 0,\r\n data: 0\r\n };\r\n },\r\n\r\n /**\r\n * Set the crop size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the crop.\r\n * @param {number} height - The height of the crop.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.cropWidth = width;\r\n this.cropHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * The callback receives a {@link Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig} object that contains information about the character that's\r\n * about to be rendered.\r\n *\r\n * It should return an object with `x`, `y`, `scale` and `rotation` properties that will be used instead of the\r\n * usual values when rendering.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setDisplayCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setDisplayCallback: function (callback)\r\n {\r\n this.displayCallback = callback;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the horizontal scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollX: function (value)\r\n {\r\n this.scrollX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the vertical scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollY: function (value)\r\n {\r\n this.scrollY = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicBitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var indexCount = 0;\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var rotation = 0;\r\n var scale = (src.fontSize / src.fontData.size);\r\n\r\n if (src.cropWidth > 0 && src.cropHeight > 0)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(0, 0, src.cropWidth, src.cropHeight);\r\n ctx.clip();\r\n }\r\n\r\n for (var index = 0; index < textLength; ++index)\r\n {\r\n // Reset the scale (in case the callback changed it)\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n charCode = text.charCodeAt(index);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n indexCount = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = (indexCount + glyph.xOffset + xAdvance) - src.scrollX;\r\n y = (glyph.yOffset + yAdvance) - src.scrollY;\r\n\r\n // This could be optimized so that it doesn\'t even bother drawing it if the x/y is out of range\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.index = index;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= cameraScrollX;\r\n y -= cameraScrollY;\r\n\r\n if (camera.roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.rotate(rotation);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n \r\n xAdvance += glyph.xAdvance;\r\n indexCount += 1;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#dynamicBitmapText\r\n * @since 3.0.0\r\n *²\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('dynamicBitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetAdvancedValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DynamicBitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dynamicBitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size)\r\n{\r\n return this.displayList.add(new DynamicBitmapText(this.scene, x, y, font, text, size));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicBitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicBitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var crop = (src.cropWidth > 0 || src.cropHeight > 0);\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.pushScissor(\r\n src.x,\r\n src.y,\r\n src.cropWidth * src.scaleX,\r\n src.cropHeight * src.scaleY\r\n );\r\n }\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n var fontMatrix = pipeline._tempMatrix4;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src.letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n var scrollX = src.scrollX;\r\n var scrollY = src.scrollY;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src.fontSize / fontData.size);\r\n var rotation = 0;\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = (glyph.xOffset + xAdvance) - scrollX;\r\n var y = (glyph.yOffset + yAdvance) - scrollY;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.color = 0;\r\n callbackData.tint.topLeft = tintTL;\r\n callbackData.tint.topRight = tintTR;\r\n callbackData.tint.bottomLeft = tintBL;\r\n callbackData.tint.bottomRight = tintBR;\r\n callbackData.index = i;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n\r\n if (output.color)\r\n {\r\n tintTL = output.color;\r\n tintTR = output.color;\r\n tintBL = output.color;\r\n tintBR = output.color;\r\n }\r\n else\r\n {\r\n tintTL = output.tint.topLeft;\r\n tintTR = output.tint.topRight;\r\n tintBL = output.tint.bottomLeft;\r\n tintBR = output.tint.bottomRight;\r\n }\r\n\r\n tintTL = Utils.getTintAppendFloatAlpha(tintTL, camera.alpha * src._alphaTL);\r\n tintTR = Utils.getTintAppendFloatAlpha(tintTR, camera.alpha * src._alphaTR);\r\n tintBL = Utils.getTintAppendFloatAlpha(tintBL, camera.alpha * src._alphaBL);\r\n tintBR = Utils.getTintAppendFloatAlpha(tintBR, camera.alpha * src._alphaBR);\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n fontMatrix.applyITRS(x, y, rotation, scale, scale);\r\n\r\n calcMatrix.multiply(fontMatrix, spriteMatrix);\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = glyphW;\r\n var yh = glyphH;\r\n\r\n var tx0 = spriteMatrix.e;\r\n var ty0 = spriteMatrix.f;\r\n\r\n var tx1 = yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty1 = yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx2 = xw * spriteMatrix.a + yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty2 = xw * spriteMatrix.b + yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx3 = xw * spriteMatrix.a + spriteMatrix.e;\r\n var ty3 = xw * spriteMatrix.b + spriteMatrix.f;\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.popScissor();\r\n }\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetBitmapTextSize = __webpack_require__(/*! ../GetBitmapTextSize */ "./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js");\r\nvar ParseFromAtlas = __webpack_require__(/*! ../ParseFromAtlas */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../ParseXMLBitmapFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js");\r\nvar Render = __webpack_require__(/*! ./BitmapTextRender */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}\r\n * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}\r\n * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}\r\n *\r\n * @class BitmapText\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar BitmapText = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function BitmapText (scene, x, y, font, text, size, align)\r\n {\r\n if (text === undefined) { text = \'\'; }\r\n if (align === undefined) { align = 0; }\r\n\r\n GameObject.call(this, scene, \'BitmapText\');\r\n\r\n /**\r\n * The key of the Bitmap Font used by this Bitmap Text.\r\n * To change the font after creation please use `setFont`.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#font\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.font = font;\r\n\r\n var entry = this.scene.sys.cache.bitmapFont.get(font);\r\n\r\n /**\r\n * The data of the Bitmap Font used by this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontData\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapFontData}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.fontData = entry.data;\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._text = \'\';\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_fontSize\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._fontSize = size || this.fontData.size;\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_letterSpacing\r\n * @type {number}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._letterSpacing = 0;\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_align\r\n * @type {integer}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._align = align;\r\n\r\n /**\r\n * An object that describes the size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_bounds\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapTextSize}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = GetBitmapTextSize(this, false, this._bounds);\r\n\r\n /**\r\n * An internal dirty flag for bounds calculation.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._dirty = false;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n this.setText(text);\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be left-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLeftAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLeftAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_LEFT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be center-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setCenterAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setCenterAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_CENTER;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be right-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setRightAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setRightAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_RIGHT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the font size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size to set.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n this._fontSize = size;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the letter spacing between each character of this Bitmap Text.\r\n * Can be a positive value to increase the space, or negative to reduce it.\r\n * Spacing is applied after the kerning values have been set.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLetterSpacing\r\n * @since 3.4.0\r\n *\r\n * @param {number} [spacing=0] - The amount of horizontal space to add between each character.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLetterSpacing: function (spacing)\r\n {\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n this._letterSpacing = spacing;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the textual content of this BitmapText.\r\n *\r\n * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = \'\';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join(\'\\n\');\r\n }\r\n\r\n if (value !== this.text)\r\n {\r\n this._text = value.toString();\r\n\r\n this._dirty = true;\r\n\r\n this.updateDisplayOrigin();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the bounds of this Bitmap Text.\r\n *\r\n * An object is returned that contains the position, width and height of the Bitmap Text in local and global\r\n * contexts.\r\n *\r\n * Local size is based on just the font size and a [0, 0] position.\r\n *\r\n * Global size takes into account the Game Object\'s scale, world position and display origin.\r\n *\r\n * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#getTextBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} An object that describes the size of this Bitmap Text.\r\n */\r\n getTextBounds: function (round)\r\n {\r\n // local = The BitmapText based on fontSize and 0x0 coords\r\n // global = The BitmapText, taking into account scale and world position\r\n // lines = The BitmapText line data\r\n\r\n if (this._dirty)\r\n {\r\n GetBitmapTextSize(this, round, this._bounds);\r\n }\r\n\r\n return this._bounds;\r\n },\r\n\r\n /**\r\n * Changes the font this BitmapText is using to render.\r\n *\r\n * The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved,\r\n * unless overridden via the arguments.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFont\r\n * @since 3.11.0\r\n *\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {number} [size] - The font size of this Bitmap Text. If not specified the current size will be used.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFont: function (key, size, align)\r\n {\r\n if (size === undefined) { size = this._fontSize; }\r\n if (align === undefined) { align = this._align; }\r\n\r\n if (key !== this.font)\r\n {\r\n var entry = this.scene.sys.cache.bitmapFont.get(key);\r\n\r\n if (entry)\r\n {\r\n this.font = key;\r\n this.fontData = entry.data;\r\n this._fontSize = size;\r\n this._align = align;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n\r\n GetBitmapTextSize(this, false, this._bounds);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n *\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#align\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\n align: {\r\n\r\n set: function (value)\r\n {\r\n this._align = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._align;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * You can also use the method `setText` if you want a chainable way to change the text content.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * You can also use the method `setFontSize` if you want a chainable way to change the font size.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontSize\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n fontSize: {\r\n\r\n set: function (value)\r\n {\r\n this._fontSize = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._fontSize;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#letterSpacing\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n letterSpacing: {\r\n\r\n set: function (value)\r\n {\r\n this._letterSpacing = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._letterSpacing;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this bitmap text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.JSONBitmapText} A JSON representation of this Bitmap Text.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra data is added here\r\n\r\n var data = {\r\n font: this.font,\r\n text: this.text,\r\n fontSize: this.fontSize,\r\n letterSpacing: this.letterSpacing,\r\n align: this.align\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Left align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_LEFT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_LEFT = 0;\r\n\r\n/**\r\n * Center align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_CENTER\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_CENTER = 1;\r\n\r\n/**\r\n * Right align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_RIGHT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_RIGHT = 2;\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseFromAtlas\r\n * @type {function}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont\'s texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture\'s frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} [xSpacing] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing] - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nBitmapText.ParseFromAtlas = ParseFromAtlas;\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont\r\n * @type {function}\r\n * @since 3.17.0\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nBitmapText.ParseXMLBitmapFont = ParseXMLBitmapFont;\r\n\r\nmodule.exports = BitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src._letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var scale = (src._fontSize / src.fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n ctx.translate(-src.displayOriginX, -src.displayOriginY);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = glyph.xOffset + xAdvance;\r\n y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x += lineOffsetX;\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n * \r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('bitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n var align = GetValue(config, 'align', 0);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size, align);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n *\r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('bitmapText', function (x, y, font, text, size, align)\r\n{\r\n return this.displayList.add(new BitmapText(this.scene, x, y, font, text, size, align));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n \r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src._letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src._fontSize / fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n \r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n \r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = glyph.xOffset + xAdvance;\r\n var y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = x + (glyphW * scale);\r\n var yh = y + (glyphH * scale);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n};\r\n\r\nmodule.exports = BitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Blitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlitterRender = __webpack_require__(/*! ./BlitterRender */ "./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js");\r\nvar Bob = __webpack_require__(/*! ./Bob */ "./node_modules/phaser/src/gameobjects/blitter/Bob.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar List = __webpack_require__(/*! ../../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\n\r\n/**\r\n * @callback CreateCallback\r\n *\r\n * @param {Phaser.GameObjects.Bob} bob - The Bob that was created by the Blitter.\r\n * @param {integer} index - The position of the Bob within the Blitter display list.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Blitter Game Object.\r\n *\r\n * The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects.\r\n * Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture,\r\n * a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed\r\n * during rendering.\r\n *\r\n * A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this\r\n * Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows\r\n * them their speed.\r\n *\r\n * If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth\r\n * investigating. They are especially useful for using as a base for your own special effects systems.\r\n *\r\n * @class Blitter\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} [x=0] - The x coordinate of this Game Object in world space.\r\n * @param {number} [y=0] - The y coordinate of this Game Object in world space.\r\n * @param {string} [texture=\'__DEFAULT\'] - The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager.\r\n * @param {(string|integer)} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.\r\n */\r\nvar Blitter = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n BlitterRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Blitter (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Blitter\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The children of this Blitter.\r\n * This List contains all of the Bob objects created by the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Blitter#children\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.children = new List();\r\n\r\n /**\r\n * A transient array that holds all of the Bobs that will be rendered this frame.\r\n * The array is re-populated whenever the dirty flag is set.\r\n *\r\n * @name Phaser.GameObjects.Blitter#renderList\r\n * @type {Phaser.GameObjects.Bob[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderList = [];\r\n\r\n /**\r\n * Is the Blitter considered dirty?\r\n * A \'dirty\' Blitter has had its child count changed since the last frame.\r\n *\r\n * @name Phaser.GameObjects.Blitter#dirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Creates a new Bob in this Blitter.\r\n *\r\n * The Bob is created at the given coordinates, relative to the Blitter and uses the given frame.\r\n * A Bob can use any frame belonging to the texture bound to the Blitter.\r\n *\r\n * @method Phaser.GameObjects.Blitter#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n * @param {integer} [index] - The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list.\r\n *\r\n * @return {Phaser.GameObjects.Bob} The newly created Bob object.\r\n */\r\n create: function (x, y, frame, visible, index)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n if (index === undefined) { index = this.children.length; }\r\n\r\n if (frame === undefined)\r\n {\r\n frame = this.frame;\r\n }\r\n else if (!(frame instanceof Frame))\r\n {\r\n frame = this.texture.get(frame);\r\n }\r\n\r\n var bob = new Bob(this, x, y, frame, visible);\r\n\r\n this.children.addAt(bob, index, false);\r\n\r\n this.dirty = true;\r\n\r\n return bob;\r\n },\r\n\r\n /**\r\n * Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createFromCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CreateCallback} callback - The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob.\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createFromCallback: function (callback, quantity, frame, visible)\r\n {\r\n var bobs = this.createMultiple(quantity, frame, visible);\r\n\r\n for (var i = 0; i < bobs.length; i++)\r\n {\r\n var bob = bobs[i];\r\n\r\n callback.call(this, bob, i);\r\n }\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Creates multiple Bobs in one call.\r\n *\r\n * The amount created is controlled by a combination of the `quantity` argument and the number of frames provided.\r\n *\r\n * If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first\r\n * frame and 10 with the second.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createMultiple: function (quantity, frame, visible)\r\n {\r\n if (frame === undefined) { frame = this.frame.name; }\r\n if (visible === undefined) { visible = true; }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n\r\n var bobs = [];\r\n var _this = this;\r\n\r\n frame.forEach(function (singleFrame)\r\n {\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n bobs.push(_this.create(0, 0, singleFrame, visible));\r\n }\r\n });\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Checks if the given child can render or not, by checking its `visible` and `alpha` values.\r\n *\r\n * @method Phaser.GameObjects.Blitter#childCanRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Bob} child - The Bob to check for rendering.\r\n *\r\n * @return {boolean} Returns `true` if the given child can render, otherwise `false`.\r\n */\r\n childCanRender: function (child)\r\n {\r\n return (child.visible && child.alpha > 0);\r\n },\r\n\r\n /**\r\n * Returns an array of Bobs to be rendered.\r\n * If the Blitter is dirty then a new list is generated and stored in `renderList`.\r\n *\r\n * @method Phaser.GameObjects.Blitter#getRenderList\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that will be rendered this frame.\r\n */\r\n getRenderList: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n this.renderList = this.children.list.filter(this.childCanRender, this);\r\n this.dirty = false;\r\n }\r\n\r\n return this.renderList;\r\n },\r\n\r\n /**\r\n * Removes all Bobs from the children List and clears the dirty flag.\r\n *\r\n * @method Phaser.GameObjects.Blitter#clear\r\n * @since 3.0.0\r\n */\r\n clear: function ()\r\n {\r\n this.children.removeAll();\r\n this.dirty = true;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Blitter#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.children.destroy();\r\n\r\n this.renderList = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Blitter.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n parentMatrix.copyToContext(ctx);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n // Render bobs\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var bob = list[i];\r\n var flip = (bob.flipX || bob.flipY);\r\n var frame = bob.frame;\r\n var cd = frame.canvasData;\r\n var dx = frame.x;\r\n var dy = frame.y;\r\n var fx = 1;\r\n var fy = 1;\r\n\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n ctx.globalAlpha = bobAlpha;\r\n \r\n if (!flip)\r\n {\r\n if (roundPixels)\r\n {\r\n dx = Math.round(dx);\r\n dy = Math.round(dy);\r\n }\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n dx + bob.x + cameraScrollX,\r\n dy + bob.y + cameraScrollY,\r\n cd.width,\r\n cd.height\r\n );\r\n }\r\n else\r\n {\r\n if (bob.flipX)\r\n {\r\n fx = -1;\r\n dx -= cd.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n fy = -1;\r\n dy -= cd.height;\r\n }\r\n\r\n ctx.save();\r\n ctx.translate(bob.x + cameraScrollX, bob.y + cameraScrollY);\r\n ctx.scale(fx, fy);\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, dx, dy, cd.width, cd.height);\r\n ctx.restore();\r\n }\r\n }\r\n \r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BlitterCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('blitter', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var blitter = new Blitter(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, blitter, config);\r\n\r\n return blitter;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} key - The key of the Texture the Blitter object will use.\r\n * @param {(string|integer)} [frame] - The default Frame children of the Blitter will use.\r\n * \r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('blitter', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Blitter(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BlitterWebGLRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BlitterCanvasRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var calcMatrix = pipeline._tempMatrix1;\r\n\r\n calcMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n calcMatrix.multiplyWithOffset(parentMatrix, -cameraScrollX, -cameraScrollY);\r\n\r\n cameraScrollX = 0;\r\n cameraScrollY = 0;\r\n }\r\n\r\n var blitterX = src.x - cameraScrollX;\r\n var blitterY = src.y - cameraScrollY;\r\n var prevTextureSourceIndex = -1;\r\n var tintEffect = false;\r\n var alpha = camera.alpha * src.alpha;\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var index = 0; index < list.length; index++)\r\n {\r\n var bob = list[index];\r\n var frame = bob.frame;\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var width = frame.width;\r\n var height = frame.height;\r\n\r\n var x = blitterX + bob.x + frame.x;\r\n var y = blitterY + bob.y + frame.y;\r\n\r\n if (bob.flipX)\r\n {\r\n width *= -1;\r\n x += frame.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n height *= -1;\r\n y += frame.height;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(xw, yh);\r\n var ty1 = calcMatrix.getY(xw, yh);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, bobAlpha);\r\n\r\n // Bind texture only if the Texture Source is different from before\r\n if (frame.sourceIndex !== prevTextureSourceIndex)\r\n {\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n\r\n prevTextureSourceIndex = frame.sourceIndex;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n }\r\n\r\n // TL x/y, BL x/y, BR x/y, TR x/y\r\n if (pipeline.batchQuad(tx0, ty0, tx0, ty1, tx1, ty1, tx1, ty0, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, frame.glTexture, 0))\r\n {\r\n prevTextureSourceIndex = -1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = BlitterWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Bob.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Bob Game Object.\r\n *\r\n * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object.\r\n *\r\n * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle\r\n * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it\r\n * must be a Frame within the Texture used by the parent Blitter.\r\n *\r\n * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will\r\n * have their positions impacted by this change as well.\r\n *\r\n * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be\r\n * handled via the Blitter parent.\r\n *\r\n * @class Bob\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob.\r\n * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.\r\n * @param {boolean} visible - Should the Bob render visible or not to start with?\r\n */\r\nvar Bob = new Class({\r\n\r\n initialize:\r\n\r\n function Bob (blitter, x, y, frame, visible)\r\n {\r\n /**\r\n * The Blitter object that this Bob belongs to.\r\n *\r\n * @name Phaser.GameObjects.Bob#parent\r\n * @type {Phaser.GameObjects.Blitter}\r\n * @since 3.0.0\r\n */\r\n this.parent = blitter;\r\n\r\n /**\r\n * The x position of this Bob, relative to the x position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of this Bob, relative to the y position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The frame that the Bob uses to render with.\r\n * To change the frame use the `Bob.setFrame` method.\r\n *\r\n * @name Phaser.GameObjects.Bob#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * A blank object which can be used to store data related to this Bob in.\r\n *\r\n * @name Phaser.GameObjects.Bob#data\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.data = {};\r\n\r\n /**\r\n * The visible state of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_visible\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = visible;\r\n\r\n /**\r\n * The alpha value of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._alpha = 1;\r\n\r\n /**\r\n * The horizontally flipped state of the Bob.\r\n * A Bob that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipX\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipX = false;\r\n\r\n /**\r\n * The vertically flipped state of the Bob.\r\n * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipY\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipY = false;\r\n },\r\n\r\n /**\r\n * Changes the Texture Frame being used by this Bob.\r\n * The frame must be part of the Texture the parent Blitter is using.\r\n * If no value is given it will use the default frame of the Blitter parent.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFrame: function (frame)\r\n {\r\n if (frame === undefined)\r\n {\r\n this.frame = this.parent.frame;\r\n }\r\n else if (frame instanceof Frame && frame.texture === this.parent.texture)\r\n {\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.parent.texture.get(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Bob#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Bob.\r\n *\r\n * Changes the position to the values given, and optionally changes the frame.\r\n *\r\n * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true.\r\n *\r\n * @method Phaser.GameObjects.Bob#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n reset: function (x, y, frame)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n this._alpha = 1;\r\n this._visible = true;\r\n\r\n this.parent.dirty = true;\r\n\r\n if (frame)\r\n {\r\n this.setFrame(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Bob. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The alpha value used for this Bob. Between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Bob instance.\r\n * Removes itself from the Blitter and clears the parent, frame and data properties.\r\n *\r\n * @method Phaser.GameObjects.Bob#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent.dirty = true;\r\n\r\n this.parent.children.remove(this);\r\n\r\n this.parent = undefined;\r\n this.frame = undefined;\r\n this.data = undefined;\r\n },\r\n\r\n /**\r\n * The visible state of the Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value of the Bob, between 0 and 1.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._alpha = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bob;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Bob.js?')},"./node_modules/phaser/src/gameobjects/components/Alpha.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it\'s applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Alpha.js?')},"./node_modules/phaser/src/gameobjects/components/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseAnimation = __webpack_require__(/*! ../../animations/Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../../animations/events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Game Object Animation Controller.\r\n *\r\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\r\n */\r\nvar Animation = new Class({\r\n\r\n initialize:\r\n\r\n function Animation (parent)\r\n {\r\n /**\r\n * The Game Object to which this animation controller belongs.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#parent\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#animationManager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.animationManager = parent.scene.sys.anims;\r\n\r\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n /**\r\n * Is an animation currently playing or not?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * The current Animation loaded into this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentAnim\r\n * @type {?Phaser.Animations.Animation}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentAnim = null;\r\n\r\n /**\r\n * The current AnimationFrame being displayed by this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFrame = null;\r\n\r\n /**\r\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnim\r\n * @type {?string}\r\n * @default null\r\n * @since 3.16.0\r\n */\r\n this.nextAnim = null;\r\n\r\n /**\r\n * Time scale factor.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_timeScale\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._timeScale = 1;\r\n\r\n /**\r\n * The frame rate of playback in frames per second.\r\n * The default is 24 if the `duration` property is `null`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#frameRate\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameRate = 0;\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 0;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = true;\r\n\r\n /**\r\n * A delay before starting playback, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_delay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._delay = 0;\r\n\r\n /**\r\n * Number of times to repeat the animation (-1 for infinity)\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeat\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeat = 0;\r\n\r\n /**\r\n * Delay before the repeat starts, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeatDelay = 0;\r\n\r\n /**\r\n * Should the animation yoyo? (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_yoyo\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._yoyo = false;\r\n\r\n /**\r\n * Will the playhead move forwards (`true`) or in reverse (`false`).\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#forward\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.forward = true;\r\n\r\n /**\r\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\r\n * needed because forward can be changed by yoyo feature.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_reverse\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._reverse = false;\r\n\r\n /**\r\n * Internal time overflow accumulator.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#accumulator\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accumulator = 0;\r\n\r\n /**\r\n * The time point at which the next animation frame will change.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextTick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextTick = 0;\r\n\r\n /**\r\n * An internal counter keeping track of how many repeats are left to play.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCounter = 0;\r\n\r\n /**\r\n * An internal flag keeping track of pending repeats.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRepeat = false;\r\n\r\n /**\r\n * Is the Animation paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_paused\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._paused = false;\r\n\r\n /**\r\n * Was the animation previously playing before being paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._wasPlaying = false;\r\n\r\n /**\r\n * Internal property tracking if this Animation is waiting to stop.\r\n *\r\n * 0 = No\r\n * 1 = Waiting for ms to pass\r\n * 2 = Waiting for repeat\r\n * 3 = Waiting for specific frame\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\r\n * @type {integer}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStop = 0;\r\n\r\n /**\r\n * Internal property used by _pendingStop.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\r\n * @type {any}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStopValue;\r\n },\r\n\r\n /**\r\n * Sets an animation to be played immediately after the current one completes.\r\n * \r\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\r\n * \r\n * An animation set to repeat forever will never enter a completed state.\r\n * \r\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\r\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\r\n * \r\n * Call this method with no arguments to reset the chained animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#chain\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n chain: function (key)\r\n {\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n this.nextAnim = key;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setDelay\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setDelay: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this._delay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getDelay\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\r\n */\r\n getDelay: function ()\r\n {\r\n return this._delay;\r\n },\r\n\r\n /**\r\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\r\n * @since 3.0.0\r\n *\r\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\r\n * @param {string} key - The key of the animation to play.\r\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n delayedPlay: function (delay, key, startFrame)\r\n {\r\n this.play(key, true, startFrame);\r\n\r\n this.nextTick += delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns the key of the animation currently loaded into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\r\n * @since 3.0.0\r\n *\r\n * @return {string} The key of the Animation loaded into this component.\r\n */\r\n getCurrentKey: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n return this.currentAnim.key;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used to load an animation into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#load\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to load.\r\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n load: function (key, startFrame)\r\n {\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stop();\r\n }\r\n\r\n // Load the new animation in\r\n this.animationManager.load(this, key, startFrame);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Pause the current animation and set the `isPlaying` property to `false`.\r\n * You can optionally pause it at a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n pause: function (atFrame)\r\n {\r\n if (!this._paused)\r\n {\r\n this._paused = true;\r\n this._wasPlaying = this.isPlaying;\r\n this.isPlaying = false;\r\n }\r\n\r\n if (atFrame !== undefined)\r\n {\r\n this.updateFrame(atFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\r\n * You can optionally tell it to start playback from a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n resume: function (fromFrame)\r\n {\r\n if (this._paused)\r\n {\r\n this._paused = false;\r\n this.isPlaying = this._wasPlaying;\r\n }\r\n\r\n if (fromFrame !== undefined)\r\n {\r\n this.updateFrame(fromFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * `true` if the current animation is paused, otherwise `false`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPaused\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.4.0\r\n */\r\n isPaused: {\r\n\r\n get: function ()\r\n {\r\n return this._paused;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\r\n * \r\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#play\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = true;\r\n this._reverse = false;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#playReverse\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n playReverse: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = false;\r\n this._reverse = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\r\n * @fires Phaser.Animations.Events#START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n _startAnimation: function (key, startFrame)\r\n {\r\n this.load(key, startFrame);\r\n\r\n var anim = this.currentAnim;\r\n var gameObject = this.parent;\r\n\r\n if (!anim)\r\n {\r\n return gameObject;\r\n }\r\n\r\n // Should give us 9,007,199,254,740,991 safe repeats\r\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\r\n\r\n anim.getFirstTick(this);\r\n\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n\r\n if (anim.showOnStart)\r\n {\r\n gameObject.visible = true;\r\n }\r\n\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Reverse the Animation that is already playing on the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#reverse\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n reverse: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n this._reverse = !this._reverse;\r\n\r\n this.forward = !this.forward;\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\r\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\r\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getProgress\r\n * @since 3.4.0\r\n *\r\n * @return {number} The progress of the current animation, between 0 and 1.\r\n */\r\n getProgress: function ()\r\n {\r\n var p = this.currentFrame.progress;\r\n\r\n if (!this.forward)\r\n {\r\n p = 1 - p;\r\n }\r\n\r\n return p;\r\n },\r\n\r\n /**\r\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\r\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=0] - The progress value, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setProgress: function (value)\r\n {\r\n if (!this.forward)\r\n {\r\n value = 1 - value;\r\n }\r\n\r\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Handle the removal of an animation from the Animation Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#remove\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key of the removed Animation.\r\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\r\n */\r\n remove: function (key, animation)\r\n {\r\n if (animation === undefined) { animation = this.currentAnim; }\r\n\r\n if (this.isPlaying && animation.key === this.currentAnim.key)\r\n {\r\n this.stop();\r\n\r\n this.setCurrentFrame(this.currentAnim.frames[0]);\r\n }\r\n },\r\n\r\n /**\r\n * Gets the number of times that the animation will repeat\r\n * after its first iteration. For example, if returns 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * A value of -1 means the animation will repeat indefinitely.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeat\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The number of times that the animation will repeat.\r\n */\r\n getRepeat: function ()\r\n {\r\n return this._repeat;\r\n },\r\n\r\n /**\r\n * Sets the number of times that the animation should repeat\r\n * after its first iteration. For example, if repeat is 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * To repeat indefinitely, use -1. repeat should always be an integer.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeat\r\n * @since 3.4.0\r\n *\r\n * @param {integer} value - The number of times that the animation should repeat.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeat: function (value)\r\n {\r\n this._repeat = value;\r\n\r\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of delay between repeats, if any.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delay between repeats.\r\n */\r\n getRepeatDelay: function ()\r\n {\r\n return this._repeatDelay;\r\n },\r\n\r\n /**\r\n * Sets the amount of time in seconds between repeats.\r\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\r\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\r\n * before doing its final repeat.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The delay to wait between repeats, in seconds.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeatDelay: function (value)\r\n {\r\n this._repeatDelay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Restarts the current animation from its beginning, optionally including its delay value.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#restart\r\n * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n restart: function (includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = false; }\r\n\r\n var anim = this.currentAnim;\r\n\r\n anim.getFirstTick(this, includeDelay);\r\n\r\n this.forward = true;\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n this._paused = false;\r\n\r\n // Set frame\r\n this.updateFrame(anim.frames[0]);\r\n\r\n var gameObject = this.parent;\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\r\n * \r\n * If no animation is set, no event will be dispatched.\r\n * \r\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stop\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stop: function ()\r\n {\r\n this._pendingStop = 0;\r\n\r\n this.isPlaying = false;\r\n\r\n var gameObject = this.parent;\r\n var anim = this.currentAnim;\r\n var frame = this.currentFrame;\r\n\r\n if (anim)\r\n {\r\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\r\n \r\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\r\n }\r\n\r\n if (this.nextAnim)\r\n {\r\n var key = this.nextAnim;\r\n\r\n this.nextAnim = null;\r\n\r\n this.play(key);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopAfterDelay: function (delay)\r\n {\r\n this._pendingStop = 1;\r\n this._pendingStopValue = delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next repeats.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnRepeat: function ()\r\n {\r\n this._pendingStop = 2;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next sets the given frame.\r\n * If this frame doesn't exist within the animation it will not stop it from playing.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnFrame: function (frame)\r\n {\r\n this._pendingStop = 3;\r\n this._pendingStopValue = frame;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\r\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this._timeScale = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the Time Scale factor.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\r\n * @since 3.4.0\r\n *\r\n * @return {number} The Time Scale value.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this._timeScale;\r\n },\r\n\r\n /**\r\n * Returns the total number of frames in this animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The total number of frames in this animation.\r\n */\r\n getTotalFrames: function ()\r\n {\r\n return this.currentAnim.frames.length;\r\n },\r\n\r\n /**\r\n * The internal update loop for the Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\r\n {\r\n return;\r\n }\r\n\r\n this.accumulator += delta * this._timeScale;\r\n\r\n if (this._pendingStop === 1)\r\n {\r\n this._pendingStopValue -= delta;\r\n\r\n if (this._pendingStopValue <= 0)\r\n {\r\n return this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n\r\n if (this.accumulator >= this.nextTick)\r\n {\r\n this.currentAnim.setFrame(this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the given Animation Frame as being the current frame\r\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setCurrentFrame: function (animationFrame)\r\n {\r\n var gameObject = this.parent;\r\n\r\n this.currentFrame = animationFrame;\r\n\r\n gameObject.texture = animationFrame.frame.texture;\r\n gameObject.frame = animationFrame.frame;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\r\n }\r\n\r\n gameObject.setSizeToFrame();\r\n\r\n if (animationFrame.frame.customPivot)\r\n {\r\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\r\n }\r\n else\r\n {\r\n gameObject.updateDisplayOrigin();\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Internal frame change handler.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#updateFrame\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\r\n */\r\n updateFrame: function (animationFrame)\r\n {\r\n var gameObject = this.setCurrentFrame(animationFrame);\r\n\r\n if (this.isPlaying)\r\n {\r\n if (animationFrame.setAlpha)\r\n {\r\n gameObject.alpha = animationFrame.alpha;\r\n }\r\n\r\n var anim = this.currentAnim;\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\r\n\r\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\r\n {\r\n this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Advances the animation to the next frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in reverse, calling this method doesn't then change the direction to forwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#nextFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n nextFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.nextFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Advances the animation to the previous frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in forwards, calling this method doesn't then change the direction to backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#previousFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n previousFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.previousFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setYoyo\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setYoyo: function (value)\r\n {\r\n if (value === undefined) { value = false; }\r\n\r\n this._yoyo = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getYoyo\r\n * @since 3.4.0\r\n *\r\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\r\n */\r\n getYoyo: function ()\r\n {\r\n return this._yoyo;\r\n },\r\n\r\n /**\r\n * Destroy this Animation component.\r\n *\r\n * Unregisters event listeners and cleans up its references.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n this.animationManager = null;\r\n this.parent = null;\r\n\r\n this.currentAnim = null;\r\n this.currentFrame = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Animation.js?")},"./node_modules/phaser/src/gameobjects/components/BlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/BlendMode.js?")},"./node_modules/phaser/src/gameobjects/components/ComputedSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ComputedSize.js?")},"./node_modules/phaser/src/gameobjects/components/Crop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Crop.js?")},"./node_modules/phaser/src/gameobjects/components/Depth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Depth.js?")},"./node_modules/phaser/src/gameobjects/components/Flip.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Flip.js?")},"./node_modules/phaser/src/gameobjects/components/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RotateAround = __webpack_require__(/*! ../../math/RotateAround */ "./node_modules/phaser/src/math/RotateAround.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/GetBounds.js?')},"./node_modules/phaser/src/gameobjects/components/Mask.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = __webpack_require__(/*! ../../display/mask/BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js");\r\nvar GeometryMask = __webpack_require__(/*! ../../display/mask/GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js");\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === \'Graphics\')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Mask.js?')},"./node_modules/phaser/src/gameobjects/components/Origin.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Origin.js?")},"./node_modules/phaser/src/gameobjects/components/PathFollower.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetBoolean = __webpack_require__(/*! ../../tweens/builders/GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ../../tweens/tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n\r\n if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n var pathVector = this.pathVector;\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/PathFollower.js?")},"./node_modules/phaser/src/gameobjects/components/Pipeline.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipelineName)\r\n {\r\n if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.defaultPipeline = renderer.getPipeline(pipelineName);\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the active WebGL Pipeline of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipelineName)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.pipeline = renderer.getPipeline(pipelineName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n resetPipeline: function ()\r\n {\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Pipeline.js?")},"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ScrollFactor.js?")},"./node_modules/phaser/src/gameobjects/components/Size.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.frame.realWidth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.frame.realHeight;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Size.js?")},"./node_modules/phaser/src/gameobjects/components/Texture.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Texture.js?")},"./node_modules/phaser/src/gameobjects/components/TextureCrop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TextureCrop.js?")},"./node_modules/phaser/src/gameobjects/components/Tint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @function GetColor\r\n * @since 3.0.0\r\n * @private\r\n */\r\nvar GetColor = function (value)\r\n{\r\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\r\n};\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * Private internal value. Holds the top-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the top-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds if the Game Object is tinted or not.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_isTinted\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n _isTinted: false,\r\n\r\n /**\r\n * Fill or additive?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n * \r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n this._isTinted = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n * \r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this._tintTL = GetColor(topLeft);\r\n this._tintTR = GetColor(topRight);\r\n this._tintBL = GetColor(bottomLeft);\r\n this._tintBR = GetColor(bottomRight);\r\n\r\n this._isTinted = true;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n * \r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied to it or not?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n return this._isTinted;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Tint.js?")},"./node_modules/phaser/src/gameobjects/components/ToJSON.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n scaleMode: gameObject.scaleMode,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ToJSON.js?")},"./node_modules/phaser/src/gameobjects/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar TransformMatrix = __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n * Note: Do not use this value to set the z-index, instead see the `depth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n * \r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn\'t the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n * \r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n * \r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Transform.js?')},"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TransformMatrix.js?")},"./node_modules/phaser/src/gameobjects/components/Visible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Visible.js?")},"./node_modules/phaser/src/gameobjects/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: __webpack_require__(/*! ./Alpha */ "./node_modules/phaser/src/gameobjects/components/Alpha.js"),\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js"),\r\n BlendMode: __webpack_require__(/*! ./BlendMode */ "./node_modules/phaser/src/gameobjects/components/BlendMode.js"),\r\n ComputedSize: __webpack_require__(/*! ./ComputedSize */ "./node_modules/phaser/src/gameobjects/components/ComputedSize.js"),\r\n Crop: __webpack_require__(/*! ./Crop */ "./node_modules/phaser/src/gameobjects/components/Crop.js"),\r\n Depth: __webpack_require__(/*! ./Depth */ "./node_modules/phaser/src/gameobjects/components/Depth.js"),\r\n Flip: __webpack_require__(/*! ./Flip */ "./node_modules/phaser/src/gameobjects/components/Flip.js"),\r\n GetBounds: __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/gameobjects/components/GetBounds.js"),\r\n Mask: __webpack_require__(/*! ./Mask */ "./node_modules/phaser/src/gameobjects/components/Mask.js"),\r\n Origin: __webpack_require__(/*! ./Origin */ "./node_modules/phaser/src/gameobjects/components/Origin.js"),\r\n PathFollower: __webpack_require__(/*! ./PathFollower */ "./node_modules/phaser/src/gameobjects/components/PathFollower.js"),\r\n Pipeline: __webpack_require__(/*! ./Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js"),\r\n ScrollFactor: __webpack_require__(/*! ./ScrollFactor */ "./node_modules/phaser/src/gameobjects/components/ScrollFactor.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/gameobjects/components/Size.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/gameobjects/components/Texture.js"),\r\n TextureCrop: __webpack_require__(/*! ./TextureCrop */ "./node_modules/phaser/src/gameobjects/components/TextureCrop.js"),\r\n Tint: __webpack_require__(/*! ./Tint */ "./node_modules/phaser/src/gameobjects/components/Tint.js"),\r\n ToJSON: __webpack_require__(/*! ./ToJSON */ "./node_modules/phaser/src/gameobjects/components/ToJSON.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/gameobjects/components/Transform.js"),\r\n TransformMatrix: __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js"),\r\n Visible: __webpack_require__(/*! ./Visible */ "./node_modules/phaser/src/gameobjects/components/Visible.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/index.js?')},"./node_modules/phaser/src/gameobjects/container/Container.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Render = __webpack_require__(/*! ./ContainerRender */ \"./node_modules/phaser/src/gameobjects/container/ContainerRender.js\");\r\nvar Union = __webpack_require__(/*! ../../geom/rectangle/Union */ \"./node_modules/phaser/src/geom/rectangle/Union.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {integer}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.Container#_displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._displayList = scene.sys.displayList;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n this._displayList.remove(gameObject);\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n return this.parentContainer.pointToContainer(source, output);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n * \r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {integer} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/Container.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childBlendMode = child._blendMode;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n if (containerHasBlendMode)\r\n {\r\n child.setBlendMode(container._blendMode);\r\n }\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n child.setBlendMode(childBlendMode);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#container\r\n * @since 3.4.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'container\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, \'x\', 0);\r\n var y = GetAdvancedValue(config, \'y\', 0);\r\n\r\n var container = new Container(this.scene, x, y);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n \r\n return container;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCreator.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#container\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'container\', function (x, y, children)\r\n{\r\n return this.displayList.add(new Container(this.scene, x, y, children));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerFactory.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ContainerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ContainerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerRender.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderWebGL(renderer, camera);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes to CSS Blend Modes Map.\r\n * \r\n * @name Phaser.CSSBlendModes\r\n * @enum {string}\r\n * @memberof Phaser\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n\r\nmodule.exports = [\r\n 'normal',\r\n 'multiply',\r\n 'multiply',\r\n 'screen',\r\n 'overlay',\r\n 'darken',\r\n 'lighten',\r\n 'color-dodge',\r\n 'color-burn',\r\n 'hard-light',\r\n 'soft-light',\r\n 'difference',\r\n 'exclusion',\r\n 'hue',\r\n 'saturation',\r\n 'color',\r\n 'luminosity'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DOMElementRender = __webpack_require__(/*! ./DOMElementRender */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar Vector4 = __webpack_require__(/*! ../../math/Vector4 */ \"./node_modules/phaser/src/math/Vector4.js\");\r\n\r\n/**\r\n * @classdesc\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * @class DOMElement\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this DOM Element in the world.\r\n * @param {number} [y=0] - The vertical position of this DOM Element in the world.\r\n * @param {(Element|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n */\r\nvar DOMElement = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n DOMElementRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DOMElement (scene, x, y, element, style, innerText)\r\n {\r\n GameObject.call(this, scene, 'DOMElement');\r\n\r\n /**\r\n * A reference to the parent DOM Container that the Game instance created when it started.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#parent\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.parent = scene.sys.game.domContainer;\r\n\r\n /**\r\n * A reference to the HTML Cache.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.17.0\r\n */\r\n this.cache = scene.sys.cache.html;\r\n\r\n /**\r\n * The actual DOM Element that this Game Object is bound to. For example, if you've created a `
`\r\n * then this property is a direct reference to that element within the dom.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#node\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.node;\r\n\r\n /**\r\n * By default a DOM Element will have its transform, display, opacity, zIndex and blend mode properties\r\n * updated when its rendered. If, for some reason, you don't want any of these changed other than the\r\n * CSS transform, then set this flag to `true`. When `true` only the CSS Transform is applied and it's\r\n * up to you to keep track of and set the other properties as required.\r\n * \r\n * This can be handy if, for example, you've a nested DOM Element and you don't want the opacity to be\r\n * picked-up by any of its children.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#transformOnly\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.transformOnly = false;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewX\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewX = 0;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewY\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewY = 0;\r\n\r\n /**\r\n * A Vector4 that contains the 3D rotation of this DOM Element around a fixed axis in 3D space.\r\n * \r\n * All values in the Vector4 are treated as degrees, unless the `rotate3dAngle` property is changed.\r\n * \r\n * For more details see the following MDN page:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3d\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.17.0\r\n */\r\n this.rotate3d = new Vector4();\r\n\r\n /**\r\n * The unit that represents the 3D rotation values. By default this is `deg` for degrees, but can\r\n * be changed to any supported unit. See this page for further details:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3dAngle\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.rotate3dAngle = 'deg';\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayWidth` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayHeight` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The computed display width of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `width` holds the un-scaled width of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayWidth = 0;\r\n\r\n /**\r\n * The computed display height of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `height` holds the un-scaled height of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayHeight = 0;\r\n\r\n /**\r\n * Internal native event handler.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#handler\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.handler = this.dispatchNativeEvent.bind(this);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n this.setElement(element.substr(1), style, innerText);\r\n }\r\n else\r\n {\r\n this.createElement(element, style, innerText);\r\n }\r\n }\r\n else if (element)\r\n {\r\n this.setElement(element, style, innerText);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical skew values of this DOM Element.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setSkew\r\n * @since 3.17.0\r\n *\r\n * @param {number} [x=0] - The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * @param {number} [y=x] - The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setSkew: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.skewX = x;\r\n this.skewY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the perspective CSS property of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setPerspective\r\n * @since 3.17.0\r\n *\r\n * @param {number} value - The perspective value, in pixels, that determines the distance between the z plane and the user.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setPerspective: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The perspective CSS property value of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n * \r\n * @name Phaser.GameObjects.DOMElement#perspective\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n perspective: {\r\n\r\n get: function ()\r\n {\r\n return parseFloat(this.parent.style.perspective);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds one or more native DOM event listeners onto the underlying Element of this Game Object.\r\n * The event is then dispatched via this Game Objects standard event emitter.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var div = this.add.dom(x, y, element);\r\n * \r\n * div.addListener('click');\r\n * \r\n * div.on('click', handler);\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#addListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to listen for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n addListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.addEventListener(events[i], this.handler, false);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes one or more native DOM event listeners from the underlying Element of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to stop listening for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.removeEventListener(events[i], this.handler);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal event proxy to dispatch native DOM Events via this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#dispatchNativeEvent\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {any} event - The native DOM event.\r\n */\r\n dispatchNativeEvent: function (event)\r\n {\r\n this.emit(event.type, event);\r\n },\r\n\r\n /**\r\n * Creates a native DOM Element, adds it to the parent DOM Container and then binds it to this Game Object,\r\n * so you can control it. The `tagName` should be a string and is passed to `document.createElement`:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div');\r\n * ```\r\n * \r\n * For more details on acceptable tag names see: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().createElement('div', style, 'Phaser');\r\n * ```\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createElement\r\n * @since 3.17.0\r\n *\r\n * @param {string} tagName - A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like \"html:a\") with this method.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createElement: function (tagName, style, innerText)\r\n {\r\n return this.setElement(document.createElement(tagName), style, innerText);\r\n },\r\n\r\n /**\r\n * Binds a new DOM Element to this Game Object. If this Game Object already has an Element it is removed from the DOM\r\n * entirely first. Any event listeners you may have previously created will need to be re-created on the new element.\r\n * \r\n * The `element` argument you pass to this method can be either a string tagName:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * this.add.dom().setElement('heading');\r\n * ```\r\n * \r\n * Or a reference to an Element instance:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * var h1 = document.getElementById('heading');\r\n * \r\n * this.add.dom().setElement(h1);\r\n * ```\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().setElement(h1, 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().setElement(h1, style, 'Phaser');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setElement\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Element)} element - If a string it is passed to `getElementById()`, or it should be a reference to an existing Element.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setElement: function (element, style, innerText)\r\n {\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var target;\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n element = element.substr(1);\r\n }\r\n\r\n target = document.getElementById(element);\r\n }\r\n else if (typeof element === 'object' && element.nodeType === 1)\r\n {\r\n target = element;\r\n }\r\n\r\n if (!target)\r\n {\r\n return this;\r\n }\r\n\r\n this.node = target;\r\n\r\n // style can be empty, a string or a plain object\r\n if (style && IsPlainObject(style))\r\n {\r\n for (var key in style)\r\n {\r\n target.style[key] = style[key];\r\n }\r\n }\r\n else if (typeof style === 'string')\r\n {\r\n target.style = style;\r\n }\r\n\r\n // Add / Override the values we need\r\n\r\n target.style.zIndex = '0';\r\n target.style.display = 'inline';\r\n target.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n target.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(target);\r\n }\r\n\r\n // InnerText\r\n\r\n if (innerText)\r\n {\r\n target.innerText = innerText;\r\n }\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Takes a block of html from the HTML Cache, that has previously been preloaded into the game, and then\r\n * creates a DOM Element from it. The loaded HTML is set as the `innerHTML` property of the created\r\n * element.\r\n * \r\n * Assume the following html is stored in a file called `loginform.html`:\r\n * \r\n * ```html\r\n * \r\n * \r\n * ```\r\n * \r\n * Which is loaded into your game using the cache key 'login':\r\n * \r\n * ```javascript\r\n * this.load.html('login', 'assets/loginform.html');\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the cache key:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromCache('login');\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the container that is created, into which the loaded html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromCache\r\n * @since 3.17.0\r\n * \r\n * @param {string} The key of the html cache entry to use for this DOM Element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the loaded html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromCache: function (key, tagName)\r\n {\r\n var html = this.cache.get(key);\r\n\r\n if (html)\r\n {\r\n this.createFromHTML(html, tagName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a string of html and then creates a DOM Element from it. The HTML is set as the `innerHTML`\r\n * property of the created element.\r\n * \r\n * ```javascript\r\n * let form = `\r\n * \r\n * \r\n * `;\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the string:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromHTML(form);\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the type of container that is created, into which the html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} A string of html to be set as the `innerHTML` property of the created element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromHTML: function (html, tagName)\r\n {\r\n if (tagName === undefined) { tagName = 'div'; }\r\n\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var element = document.createElement(tagName);\r\n\r\n this.node = element;\r\n\r\n element.style.zIndex = '0';\r\n element.style.display = 'inline';\r\n element.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n element.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(element);\r\n }\r\n\r\n element.innerHTML = html;\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Removes the current DOM Element bound to this Game Object from the DOM entirely and resets the\r\n * `node` property of this Game Object to be `null`.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeElement\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeElement: function ()\r\n {\r\n if (this.node)\r\n {\r\n RemoveFromDOM(this.node);\r\n\r\n this.node = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that calls `getBoundingClientRect` on the `node` and then sets the bounds width\r\n * and height into the `displayWidth` and `displayHeight` properties, and the `clientWidth` and `clientHeight`\r\n * values into the `width` and `height` properties respectively.\r\n * \r\n * This is called automatically whenever a new element is created or set.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#updateSize\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n updateSize: function ()\r\n {\r\n var node = this.node;\r\n\r\n var nodeBounds = node.getBoundingClientRect();\r\n\r\n this.width = node.clientWidth;\r\n this.height = node.clientHeight;\r\n\r\n this.displayWidth = nodeBounds.width || 0;\r\n this.displayHeight = nodeBounds.height || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a property matching the given key and value. It then returns this child\r\n * if found, or `null` if not.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByProperty\r\n * @since 3.17.0\r\n * \r\n * @param {string} property - The property to search the children for.\r\n * @param {string} value - The value the property must strictly equal.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByProperty: function (property, value)\r\n {\r\n if (this.node)\r\n {\r\n var children = this.node.querySelectorAll('*');\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i][property] === value)\r\n {\r\n return children[i];\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching id. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByID\r\n * @since 3.17.0\r\n * \r\n * @param {string} id - The id to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByID: function (id)\r\n {\r\n return this.getChildByProperty('id', id);\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching name. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByName\r\n * @since 3.17.0\r\n * \r\n * @param {string} name - The name to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByName: function (name)\r\n {\r\n return this.getChildByProperty('name', name);\r\n },\r\n\r\n /**\r\n * Sets the `className` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setClassName\r\n * @since 3.17.0\r\n * \r\n * @param {string} className - A string representing the class or space-separated classes of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setClassName: function (className)\r\n {\r\n if (this.node)\r\n {\r\n this.node.className = className;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerText` property of the DOM Element node and updates the internal sizes.\r\n * \r\n * Note that only certain types of Elements can have `innerText` set on them.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setText\r\n * @since 3.17.0\r\n * \r\n * @param {string} text - A DOMString representing the rendered text content of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setText: function (text)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerText = text;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerHTML` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} html - A DOMString of html to be set as the `innerHTML` property of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setHTML: function (html)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerHTML = html;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs internal update tasks.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preUpdate\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var parent = this.parentContainer;\r\n var node = this.node;\r\n\r\n if (node && parent && !parent.willRender())\r\n {\r\n node.style.display = 'none';\r\n }\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * \r\n * DOMElements always return `true` as they need to still set values during the render pass, even if not visible.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#willRender\r\n * @since 3.17.0\r\n *\r\n * @return {boolean} `true` if the Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the DOM Element, which removes the underlying node from the DOM.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preDestroy\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeElement();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DOMElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElement.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CSSBlendModes = __webpack_require__(/*! ./CSSBlendModes */ \"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active renderer.\r\n * @param {Phaser.GameObjects.DOMElement} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var node = src.node;\r\n var style = node.style;\r\n\r\n if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender()))\r\n {\r\n if (node)\r\n {\r\n style.display = 'none';\r\n }\r\n \r\n return;\r\n }\r\n\r\n var parent = src.parentContainer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (parent)\r\n {\r\n alpha *= parent.alpha;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var srcMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n var dx = 0;\r\n var dy = 0;\r\n\r\n var tx = '0%';\r\n var ty = '0%';\r\n\r\n if (parentMatrix)\r\n {\r\n dx = (src.width * src.scaleX) * src.originX;\r\n dy = (src.height * src.scaleY) * src.originY;\r\n\r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n srcMatrix.e = src.x - dx;\r\n srcMatrix.f = src.y - dy;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n dx = (src.width) * src.originX;\r\n dy = (src.height) * src.originY;\r\n \r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n tx = (100 * src.originX) + '%';\r\n ty = (100 * src.originY) + '%';\r\n\r\n srcMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n srcMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n\r\n if (!src.transformOnly)\r\n {\r\n style.display = 'block';\r\n style.opacity = alpha;\r\n style.zIndex = src._depth;\r\n style.pointerEvents = 'auto';\r\n style.mixBlendMode = CSSBlendModes[src._blendMode];\r\n }\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n\r\n style.transform =\r\n calcMatrix.getCSSMatrix() +\r\n ' skew(' + src.skewX + 'rad, ' + src.skewY + 'rad)' +\r\n ' rotate3d(' + src.rotate3d.x + ',' + src.rotate3d.y + ',' + src.rotate3d.z + ',' + src.rotate3d.w + src.rotate3dAngle + ')';\r\n\r\n style.transformOrigin = tx + ' ' + ty;\r\n};\r\n\r\nmodule.exports = DOMElementCSSRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DOMElement = __webpack_require__(/*! ./DOMElement */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * Note: This method will only be available if the DOM Element Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dom\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The horizontal position of this DOM Element in the world.\r\n * @param {number} y - The vertical position of this DOM Element in the world.\r\n * @param {(HTMLElement|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n *\r\n * @return {Phaser.GameObjects.DOMElement} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dom', function (x, y, element, style, innerText)\r\n{\r\n var gameObject = new DOMElement(this.scene, x, y, element, style, innerText);\r\n\r\n this.displayList.add(gameObject);\r\n this.updateList.add(gameObject);\r\n\r\n return gameObject;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js?')},"./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/gameobjects/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = { DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/index.js?')},"./node_modules/phaser/src/gameobjects/extern/Extern.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ExternRender = __webpack_require__(/*! ./ExternRender */ "./node_modules/phaser/src/gameobjects/extern/ExternRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Extern Game Object is a special type of Game Object that allows you to pass\r\n * rendering off to a 3rd party.\r\n * \r\n * When you create an Extern and place it in the display list of a Scene, the renderer will\r\n * process the list as usual. When it finds an Extern it will flush the current batch,\r\n * clear down the pipeline and prepare a transform matrix which your render function can\r\n * take advantage of, if required.\r\n * \r\n * The WebGL context is then left is a \'clean\' state, ready for you to bind your own shaders,\r\n * or draw to it, whatever you wish to do. Once you\'ve finished, you should free-up any\r\n * of your resources. The Extern will then rebind the Phaser pipeline and carry on \r\n * rendering the display list.\r\n * \r\n * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of\r\n * them are used during rendering unless you take advantage of them in your own render code.\r\n *\r\n * @class Extern\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n */\r\nvar Extern = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ExternRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Extern (scene)\r\n {\r\n GameObject.call(this, scene, \'Extern\');\r\n },\r\n\r\n preUpdate: function ()\r\n {\r\n // override this!\r\n // Arguments: time, delta\r\n },\r\n\r\n render: function ()\r\n {\r\n // override this!\r\n // Arguments: renderer, camera, calcMatrix\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Extern;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/Extern.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js":function(module,exports){eval("\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extern = __webpack_require__(/*! ./Extern */ \"./node_modules/phaser/src/gameobjects/extern/Extern.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Extern Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Extern Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#extern\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Extern} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('extern', function ()\r\n{\r\n var extern = new Extern(this.scene);\r\n\r\n this.displayList.add(extern);\r\n this.updateList.add(extern);\r\n\r\n return extern;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternFactory.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ExternWebGLRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ExternCanvasRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternRender.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Extern#renderWebGL\r\n * @since 3.16.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Extern} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n // Callback\r\n src.render.call(src, renderer, camera, calcMatrix);\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ExternWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/Commands.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARC: 0,\r\n BEGIN_PATH: 1,\r\n CLOSE_PATH: 2,\r\n FILL_RECT: 3,\r\n LINE_TO: 4,\r\n MOVE_TO: 5,\r\n LINE_STYLE: 6,\r\n FILL_STYLE: 7,\r\n FILL_PATH: 8,\r\n STROKE_PATH: 9,\r\n FILL_TRIANGLE: 10,\r\n STROKE_TRIANGLE: 11,\r\n SAVE: 14,\r\n RESTORE: 15,\r\n TRANSLATE: 16,\r\n SCALE: 17,\r\n ROTATE: 18,\r\n SET_TEXTURE: 19,\r\n CLEAR_TEXTURE: 20,\r\n GRADIENT_FILL_STYLE: 21,\r\n GRADIENT_LINE_STYLE: 22\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Commands.js?")},"./node_modules/phaser/src/gameobjects/graphics/Graphics.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera.js */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar ComponentsAlpha = __webpack_require__(/*! ../components/Alpha */ \"./node_modules/phaser/src/gameobjects/components/Alpha.js\");\r\nvar ComponentsBlendMode = __webpack_require__(/*! ../components/BlendMode */ \"./node_modules/phaser/src/gameobjects/components/BlendMode.js\");\r\nvar ComponentsDepth = __webpack_require__(/*! ../components/Depth */ \"./node_modules/phaser/src/gameobjects/components/Depth.js\");\r\nvar ComponentsMask = __webpack_require__(/*! ../components/Mask */ \"./node_modules/phaser/src/gameobjects/components/Mask.js\");\r\nvar ComponentsPipeline = __webpack_require__(/*! ../components/Pipeline */ \"./node_modules/phaser/src/gameobjects/components/Pipeline.js\");\r\nvar ComponentsTransform = __webpack_require__(/*! ../components/Transform */ \"./node_modules/phaser/src/gameobjects/components/Transform.js\");\r\nvar ComponentsVisible = __webpack_require__(/*! ../components/Visible */ \"./node_modules/phaser/src/gameobjects/components/Visible.js\");\r\nvar ComponentsScrollFactor = __webpack_require__(/*! ../components/ScrollFactor */ \"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js\");\r\n\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\nvar Ellipse = __webpack_require__(/*! ../../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Render = __webpack_require__(/*! ./GraphicsRender */ \"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as\r\n * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics\r\n * object it will be empty.\r\n *\r\n * To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally\r\n * fill or stroke them. For example:\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.beginPath();\r\n * graphics.moveTo(100, 100);\r\n * graphics.lineTo(200, 200);\r\n * graphics.closePath();\r\n * graphics.strokePath();\r\n * ```\r\n *\r\n * There are also many helpful methods that draw and fill/stroke common shapes for you.\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.fillStyle(0xFFFFFF, 1.0);\r\n * graphics.fillRect(50, 50, 400, 200);\r\n * graphics.strokeRect(50, 50, 400, 200);\r\n * ```\r\n *\r\n * When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL.\r\n * Under Canvas it will use the HTML Canvas context drawing operations to draw the path.\r\n * Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with\r\n * complex shapes.\r\n *\r\n * If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help\r\n * performance by calling {@link Phaser.GameObjects.Graphics#generateTexture}. This will 'bake' the Graphics object into\r\n * a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object\r\n * updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume\r\n * memory.\r\n *\r\n * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful\r\n * in their complexity and quantity of them in your game.\r\n *\r\n * @class Graphics\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Graphics object belongs.\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [options] - Options that set the position and default style of this Graphics object.\r\n */\r\nvar Graphics = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsAlpha,\r\n ComponentsBlendMode,\r\n ComponentsDepth,\r\n ComponentsMask,\r\n ComponentsPipeline,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n ComponentsScrollFactor,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Graphics (scene, options)\r\n {\r\n var x = GetValue(options, 'x', 0);\r\n var y = GetValue(options, 'y', 0);\r\n\r\n GameObject.call(this, scene, 'Graphics');\r\n\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The horizontal display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The vertical display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * The array of commands used to render the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#commandBuffer\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.commandBuffer = [];\r\n\r\n /**\r\n * The default fill color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillColor = -1;\r\n\r\n /**\r\n * The default fill alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillAlpha = 1;\r\n\r\n /**\r\n * The default stroke width for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeWidth\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeWidth = 1;\r\n\r\n /**\r\n * The default stroke color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeColor = -1;\r\n\r\n /**\r\n * The default stroke alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeAlpha = 1;\r\n\r\n /**\r\n * Internal property that keeps track of the line width style setting.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_lineWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._lineWidth = 1.0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n this.setDefaultStyles(options);\r\n },\r\n\r\n /**\r\n * Set the default style settings for this Graphics object.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setDefaultStyles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n setDefaultStyles: function (options)\r\n {\r\n if (GetValue(options, 'lineStyle', null))\r\n {\r\n this.defaultStrokeWidth = GetValue(options, 'lineStyle.width', 1);\r\n this.defaultStrokeColor = GetValue(options, 'lineStyle.color', 0xffffff);\r\n this.defaultStrokeAlpha = GetValue(options, 'lineStyle.alpha', 1);\r\n\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n if (GetValue(options, 'fillStyle', null))\r\n {\r\n this.defaultFillColor = GetValue(options, 'fillStyle.color', 0xffffff);\r\n this.defaultFillAlpha = GetValue(options, 'fillStyle.alpha', 1);\r\n\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current line style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {number} color - The stroke color.\r\n * @param {number} [alpha=1] - The stroke alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.LINE_STYLE,\r\n lineWidth, color, alpha\r\n );\r\n\r\n this._lineWidth = lineWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current fill style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - The fill color.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_STYLE,\r\n color, alpha\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient fill style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all filled shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `fillStyle` and provide a new single fill color.\r\n *\r\n * When filling a triangle only the first 3 color values provided are used for the 3 points of a triangle.\r\n *\r\n * This feature is best used only on rectangles and triangles. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient fill a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_FILL_STYLE,\r\n alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient line style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all stroked shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `lineStyle` and provide a new single line color.\r\n *\r\n * This feature is best used only on single lines. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient stroke a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_LINE_STYLE,\r\n lineWidth, alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture frame this Graphics Object will use when drawing all shapes defined after calling this.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * Once set, all shapes will use this texture. Call this method with no arguments to clear it.\r\n *\r\n * The textures are not tiled. They are stretched to the dimensions of the shapes being rendered. For this reason,\r\n * it works best with seamless / tileable textures.\r\n *\r\n * The mode argument controls how the textures are combined with the fill colors. The default value (0) will\r\n * multiply the texture by the fill color. A value of 1 will use just the fill color, but the alpha data from the texture,\r\n * and a value of 2 will use just the texture and no fill color at all.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setTexture\r\n * @since 3.12.0\r\n * @webglOnly\r\n *\r\n * @param {string} [key] - The key of the texture to be used, as stored in the Texture Manager. Leave blank to clear a previously set texture.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [mode=0] - The texture tint mode. 0 is multiply, 1 is alpha only and 2 is texture only.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setTexture: function (key, frame, mode)\r\n {\r\n if (mode === undefined) { mode = 0; }\r\n\r\n if (key === undefined)\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLEAR_TEXTURE\r\n );\r\n }\r\n else\r\n {\r\n var textureFrame = this.scene.sys.textures.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n if (mode === 2)\r\n {\r\n mode = 3;\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.SET_TEXTURE,\r\n textureFrame,\r\n mode\r\n );\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Start a new shape path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#beginPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n beginPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.BEGIN_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Close the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n closePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLOSE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n * \r\n * This is an alias for `Graphics.fillPath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fill\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fill: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n * \r\n * This is an alias for `Graphics.strokePath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#stroke\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n stroke: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircleShape: function (circle)\r\n {\r\n return this.fillCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Stroke the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircleShape: function (circle)\r\n {\r\n return this.strokeCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Fill a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRectShape: function (rect)\r\n {\r\n return this.fillRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Stroke the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRectShape: function (rect)\r\n {\r\n return this.strokeRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Fill a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRect: function (x, y, width, height)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, width, height\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRect: function (x, y, width, height)\r\n {\r\n var lineWidthHalf = this._lineWidth / 2;\r\n var minx = x - lineWidthHalf;\r\n var maxx = x + lineWidthHalf;\r\n\r\n this.beginPath();\r\n this.moveTo(x, y);\r\n this.lineTo(x, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(x + width, y);\r\n this.lineTo(x + width, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y);\r\n this.lineTo(maxx + width, y);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y + height);\r\n this.lineTo(maxx + width, y + height);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given point.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPointShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPointShape: function (point, size)\r\n {\r\n return this.fillPoint(point.x, point.y, size);\r\n },\r\n\r\n /**\r\n * Fill a point at the given position.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point.\r\n * @param {number} y - The y coordinate of the point.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoint: function (x, y, size)\r\n {\r\n if (!size || size < 1)\r\n {\r\n size = 1;\r\n }\r\n else\r\n {\r\n x -= (size / 2);\r\n y -= (size / 2);\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, size, size\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangleShape: function (triangle)\r\n {\r\n return this.fillTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Stroke the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangleShape: function (triangle)\r\n {\r\n return this.strokeTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Fill a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw the given line.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeLineShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeLineShape: function (line)\r\n {\r\n return this.lineBetween(line.x1, line.y1, line.x2, line.y2);\r\n },\r\n\r\n /**\r\n * Draw a line between the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the start point of the line.\r\n * @param {number} y1 - The y coordinate of the start point of the line.\r\n * @param {number} x2 - The x coordinate of the end point of the line.\r\n * @param {number} y2 - The y coordinate of the end point of the line.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineBetween: function (x1, y1, x2, y2)\r\n {\r\n this.beginPath();\r\n this.moveTo(x1, y1);\r\n this.lineTo(x2, y2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw a line from the current drawing position to the given position.\r\n *\r\n * Moves the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to draw the line to.\r\n * @param {number} y - The y coordinate to draw the line to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.LINE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Move the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to move to.\r\n * @param {number} y - The y coordinate to move to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n moveTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.MOVE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is stroked.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to stroke.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is filled.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to fill.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Stroke an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Draw an arc.\r\n *\r\n * This method can be used to create circles, or parts of circles.\r\n * \r\n * Make sure you call `beginPath` before starting the arc unless you wish for the arc to automatically\r\n * close when filled or stroked.\r\n *\r\n * Use the optional `overshoot` argument increase the number of iterations that take place when\r\n * the arc is rendered in WebGL. This is useful if you're drawing an arc with an especially thick line,\r\n * as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01.\r\n *\r\n * Call {@link Phaser.GameObjects.Graphics#fillPath} or {@link Phaser.GameObjects.Graphics#strokePath} after calling\r\n * this method to draw the arc.\r\n *\r\n * @method Phaser.GameObjects.Graphics#arc\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {number} startAngle - The starting angle, in radians.\r\n * @param {number} endAngle - The ending angle, in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(\r\n Commands.ARC,\r\n x, y, radius, startAngle, endAngle, anticlockwise, overshoot\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a pie-chart slice shape centered at `x`, `y` with the given radius.\r\n * You must define the start and end angle of the slice.\r\n *\r\n * Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.\r\n * Setting it to `false` creates a shape like a slice of pie.\r\n *\r\n * This method will begin a new path and close the path at the end of it.\r\n * To display the actual slice you need to call either `strokePath` or `fillPath` after it.\r\n *\r\n * @method Phaser.GameObjects.Graphics#slice\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal center of the slice.\r\n * @param {number} y - The vertical center of the slice.\r\n * @param {number} radius - The radius of the slice.\r\n * @param {number} startAngle - The start angle of the slice, given in radians.\r\n * @param {number} endAngle - The end angle of the slice, given in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(Commands.BEGIN_PATH);\r\n\r\n this.commandBuffer.push(Commands.MOVE_TO, x, y);\r\n\r\n this.commandBuffer.push(Commands.ARC, x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\r\n\r\n this.commandBuffer.push(Commands.CLOSE_PATH);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Saves the state of the Graphics by pushing the current state onto a stack.\r\n *\r\n * The most recently saved state can then be restored with {@link Phaser.GameObjects.Graphics#restore}.\r\n *\r\n * @method Phaser.GameObjects.Graphics#save\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n save: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.SAVE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restores the most recently saved state of the Graphics by popping from the state stack.\r\n *\r\n * Use {@link Phaser.GameObjects.Graphics#save} to save the current state, and call this afterwards to restore that state.\r\n *\r\n * If there is no saved state, this command does nothing.\r\n *\r\n * @method Phaser.GameObjects.Graphics#restore\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n restore: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.RESTORE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a translation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be translated\r\n * by the given amount.\r\n * \r\n * This does not change the position of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#translateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation to apply.\r\n * @param {number} y - The vertical translation to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n translateCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.TRANSLATE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a scale command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be scaled\r\n * by the given amount.\r\n * \r\n * This does not change the scale of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#scaleCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale to apply.\r\n * @param {number} y - The vertical scale to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n scaleCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.SCALE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a rotation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be rotated\r\n * by the given amount.\r\n * \r\n * This does not change the rotation of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#rotateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The rotation angle, in radians.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n rotateCanvas: function (radians)\r\n {\r\n this.commandBuffer.push(\r\n Commands.ROTATE,\r\n radians\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clear the command buffer and reset the fill style and line style to their defaults.\r\n *\r\n * @method Phaser.GameObjects.Graphics#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n clear: function ()\r\n {\r\n this.commandBuffer.length = 0;\r\n\r\n if (this.defaultFillColor > -1)\r\n {\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n if (this.defaultStrokeColor > -1)\r\n {\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a texture from this Graphics object.\r\n *\r\n * If `key` is a string it'll generate a new texture using it and add it into the\r\n * Texture Manager (assuming no key conflict happens).\r\n *\r\n * If `key` is a Canvas it will draw the texture to that canvas context. Note that it will NOT\r\n * automatically upload it to the GPU in WebGL mode.\r\n *\r\n * @method Phaser.GameObjects.Graphics#generateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|HTMLCanvasElement)} key - The key to store the texture with in the Texture Manager, or a Canvas to draw to.\r\n * @param {integer} [width] - The width of the graphics to generate.\r\n * @param {integer} [height] - The height of the graphics to generate.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n generateTexture: function (key, width, height)\r\n {\r\n var sys = this.scene.sys;\r\n var renderer = sys.game.renderer;\r\n\r\n if (width === undefined) { width = sys.scale.width; }\r\n if (height === undefined) { height = sys.scale.height; }\r\n\r\n Graphics.TargetCamera.setScene(this.scene);\r\n Graphics.TargetCamera.setViewport(0, 0, width, height);\r\n Graphics.TargetCamera.scrollX = this.x;\r\n Graphics.TargetCamera.scrollY = this.y;\r\n\r\n var texture;\r\n var ctx;\r\n\r\n if (typeof key === 'string')\r\n {\r\n if (sys.textures.exists(key))\r\n {\r\n // Key is a string, it DOES exist in the Texture Manager AND is a canvas, so draw to it\r\n\r\n texture = sys.textures.get(key);\r\n\r\n var src = texture.getSourceImage();\r\n\r\n if (src instanceof HTMLCanvasElement)\r\n {\r\n ctx = src.getContext('2d');\r\n }\r\n }\r\n else\r\n {\r\n // Key is a string and doesn't exist in the Texture Manager, so generate and save it\r\n\r\n texture = sys.textures.createCanvas(key, width, height);\r\n\r\n ctx = texture.getSourceImage().getContext('2d');\r\n }\r\n }\r\n else if (key instanceof HTMLCanvasElement)\r\n {\r\n // Key is a Canvas, so draw to it\r\n\r\n ctx = key.getContext('2d');\r\n }\r\n\r\n if (ctx)\r\n {\r\n // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false);\r\n\r\n if (texture)\r\n {\r\n texture.refresh();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Graphics#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.commandBuffer = [];\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Camera used specifically by the Graphics system for rendering to textures.\r\n *\r\n * @name Phaser.GameObjects.Graphics.TargetCamera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.1.0\r\n */\r\nGraphics.TargetCamera = new BaseCamera();\r\n\r\nmodule.exports = Graphics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Graphics.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar SetTransform = __webpack_require__(/*! ../../renderer/canvas/utils/SetTransform */ \"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js\");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {CanvasRenderingContext2D} [renderTargetCtx] - The target rendering context.\r\n * @param {boolean} allowClip - If `true` then path operations will be used instead of fill operations.\r\n */\r\nvar GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n{\r\n var commandBuffer = src.commandBuffer;\r\n var commandBufferLength = commandBuffer.length;\r\n\r\n var ctx = renderTargetCtx || renderer.currentContext;\r\n\r\n if (commandBufferLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n\r\n var lineAlpha = 1;\r\n var fillAlpha = 1;\r\n var lineColor = 0;\r\n var fillColor = 0;\r\n var lineWidth = 1;\r\n var red = 0;\r\n var green = 0;\r\n var blue = 0;\r\n\r\n // Reset any currently active paths\r\n ctx.beginPath();\r\n\r\n for (var index = 0; index < commandBufferLength; ++index)\r\n {\r\n var commandID = commandBuffer[index];\r\n\r\n switch (commandID)\r\n {\r\n case Commands.ARC:\r\n ctx.arc(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4],\r\n commandBuffer[index + 5],\r\n commandBuffer[index + 6]\r\n );\r\n\r\n // +7 because overshoot is the 7th value, not used in Canvas\r\n index += 7;\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commandBuffer[index + 1];\r\n lineColor = commandBuffer[index + 2];\r\n lineAlpha = commandBuffer[index + 3];\r\n red = ((lineColor & 0xFF0000) >>> 16);\r\n green = ((lineColor & 0xFF00) >>> 8);\r\n blue = (lineColor & 0xFF);\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + lineAlpha + ')';\r\n ctx.lineWidth = lineWidth;\r\n index += 3;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n fillColor = commandBuffer[index + 1];\r\n fillAlpha = commandBuffer[index + 2];\r\n red = ((fillColor & 0xFF0000) >>> 16);\r\n green = ((fillColor & 0xFF00) >>> 8);\r\n blue = (fillColor & 0xFF);\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n index += 2;\r\n break;\r\n\r\n case Commands.BEGIN_PATH:\r\n ctx.beginPath();\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n ctx.closePath();\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n if (!allowClip)\r\n {\r\n ctx.fillRect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n else\r\n {\r\n ctx.rect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n index += 4;\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.LINE_FX_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.MOVE_FX_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.SAVE:\r\n ctx.save();\r\n break;\r\n\r\n case Commands.RESTORE:\r\n ctx.restore();\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n ctx.translate(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.SCALE:\r\n ctx.scale(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.ROTATE:\r\n ctx.rotate(\r\n commandBuffer[index + 1]\r\n );\r\n index += 1;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n index += 5;\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n index += 6;\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n index += 2;\r\n break;\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = GraphicsCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('graphics', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var graphics = new Graphics(this.scene, config);\r\n\r\n if (config.add)\r\n {\r\n this.scene.sys.displayList.add(graphics);\r\n }\r\n \r\n return graphics;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [config] - The Graphics configuration.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('graphics', function (config)\r\n{\r\n return this.displayList.add(new Graphics(this.scene, config));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GraphicsWebGLRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js");\r\n\r\n // Needed for Graphics.generateTexture\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js?')},"./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ "./node_modules/phaser/src/gameobjects/graphics/Commands.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n// TODO: Remove the use of this\r\nvar Point = function (x, y, width)\r\n{\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n};\r\n\r\n// TODO: Remove the use of this\r\nvar Path = function (x, y, width)\r\n{\r\n this.points = [];\r\n this.pointsLength = 1;\r\n this.points[0] = new Point(x, y, width);\r\n};\r\n\r\nvar matrixStack = [];\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (src.commandBuffer.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = src._tempMatrix1;\r\n var graphicsMatrix = src._tempMatrix2;\r\n var currentMatrix = src._tempMatrix3;\r\n\r\n currentMatrix.loadIdentity();\r\n\r\n graphicsMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n graphicsMatrix.e = src.x;\r\n graphicsMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n else\r\n {\r\n graphicsMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n graphicsMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n\r\n var commands = src.commandBuffer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n var lineWidth = 1;\r\n var fillTint = pipeline.fillTint;\r\n var strokeTint = pipeline.strokeTint;\r\n\r\n var tx = 0;\r\n var ty = 0;\r\n var ta = 0;\r\n var iterStep = 0.01;\r\n var PI2 = Math.PI * 2;\r\n\r\n var cmd;\r\n\r\n var path = [];\r\n var pathIndex = 0;\r\n var pathOpen = false;\r\n var lastPath = null;\r\n\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n var currentTexture = renderer.blankTexture.glTexture;\r\n\r\n for (var cmdIndex = 0; cmdIndex < commands.length; cmdIndex++)\r\n {\r\n cmd = commands[cmdIndex];\r\n\r\n switch (cmd)\r\n {\r\n case Commands.BEGIN_PATH:\r\n\r\n path.length = 0;\r\n lastPath = null;\r\n pathOpen = true;\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n\r\n pathOpen = false;\r\n\r\n if (lastPath && lastPath.points.length)\r\n {\r\n lastPath.points.push(lastPath.points[0]);\r\n }\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchFillPath(\r\n path[pathIndex].points,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchStrokePath(\r\n path[pathIndex].points,\r\n lineWidth,\r\n pathOpen,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var strokeColor = commands[++cmdIndex];\r\n var strokeAlpha = commands[++cmdIndex] * alpha;\r\n var strokeTintColor = getTint(strokeColor, strokeAlpha);\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n var fillColor = commands[++cmdIndex];\r\n var fillAlpha = commands[++cmdIndex] * alpha;\r\n var fillTintColor = getTint(fillColor, fillAlpha);\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n var gradientFillAlpha = commands[++cmdIndex] * alpha;\r\n fillTint.TL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.TR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var gradientLineAlpha = commands[++cmdIndex] * alpha;\r\n strokeTint.TL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.TR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n break;\r\n\r\n case Commands.ARC:\r\n var iteration = 0;\r\n var x = commands[++cmdIndex];\r\n var y = commands[++cmdIndex];\r\n var radius = commands[++cmdIndex];\r\n var startAngle = commands[++cmdIndex];\r\n var endAngle = commands[++cmdIndex];\r\n var anticlockwise = commands[++cmdIndex];\r\n var overshoot = commands[++cmdIndex];\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -PI2)\r\n {\r\n endAngle = -PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -PI2 + endAngle % PI2;\r\n }\r\n }\r\n else if (endAngle > PI2)\r\n {\r\n endAngle = PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = PI2 + endAngle % PI2;\r\n }\r\n\r\n if (lastPath === null)\r\n {\r\n lastPath = new Path(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius, lineWidth);\r\n path.push(lastPath);\r\n iteration += iterStep;\r\n }\r\n\r\n while (iteration < 1 + overshoot)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n iteration += iterStep;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillRect(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchStrokeTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n lineWidth,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n if (lastPath !== null)\r\n {\r\n lastPath.points.push(new Point(commands[++cmdIndex], commands[++cmdIndex], lineWidth));\r\n }\r\n else\r\n {\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n }\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n break;\r\n\r\n case Commands.SAVE:\r\n matrixStack.push(currentMatrix.copyToArray());\r\n break;\r\n\r\n case Commands.RESTORE:\r\n currentMatrix.copyFromArray(matrixStack.pop());\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.translate(x, y);\r\n break;\r\n\r\n case Commands.SCALE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.scale(x, y);\r\n break;\r\n\r\n case Commands.ROTATE:\r\n currentMatrix.rotate(commands[++cmdIndex]);\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n var frame = commands[++cmdIndex];\r\n var mode = commands[++cmdIndex];\r\n\r\n pipeline.currentFrame = frame;\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n pipeline.tintEffect = mode;\r\n\r\n currentTexture = frame.glTexture;\r\n\r\n break;\r\n\r\n case Commands.CLEAR_TEXTURE:\r\n pipeline.currentFrame = renderer.blankTexture;\r\n pipeline.tintEffect = 2;\r\n currentTexture = renderer.blankTexture.glTexture;\r\n break;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GraphicsWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/group/Group.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Actions = __webpack_require__(/*! ../../actions/ */ \"./node_modules/phaser/src/actions/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Range = __webpack_require__(/*! ../../utils/array/Range */ \"./node_modules/phaser/src/utils/array/Range.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Group is a way for you to create, manipulate, or recycle similar Game Objects.\r\n *\r\n * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none.\r\n *\r\n * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden.\r\n *\r\n * @class Group\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings.\r\n *\r\n * @see Phaser.Physics.Arcade.Group\r\n * @see Phaser.Physics.Arcade.StaticGroup\r\n */\r\nvar Group = new Class({\r\n\r\n initialize:\r\n\r\n function Group (scene, children, config)\r\n {\r\n // They can pass in any of the following as the first argument:\r\n\r\n // 1) A single child\r\n // 2) An array of children\r\n // 3) A config object\r\n // 4) An array of config objects\r\n\r\n // Or they can pass in a child, or array of children AND a config object\r\n\r\n if (config)\r\n {\r\n // config has been set, are the children an array?\r\n\r\n if (children && !Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n }\r\n else if (Array.isArray(children))\r\n {\r\n // No config, so let's check the children argument\r\n\r\n if (IsPlainObject(children[0]))\r\n {\r\n // It's an array of plain config objects\r\n config = children;\r\n children = null;\r\n }\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // Children isn't an array. Is it a config object though?\r\n config = children;\r\n children = null;\r\n }\r\n\r\n /**\r\n * This scene this group belongs to.\r\n *\r\n * @name Phaser.GameObjects.Group#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Members of this group.\r\n *\r\n * @name Phaser.GameObjects.Group#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set(children);\r\n\r\n /**\r\n * A flag identifying this object as a group.\r\n *\r\n * @name Phaser.GameObjects.Group#isParent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isParent = true;\r\n\r\n /**\r\n * The class to create new group members from.\r\n *\r\n * @name Phaser.GameObjects.Group#classType\r\n * @type {Function}\r\n * @since 3.0.0\r\n * @default Phaser.GameObjects.Sprite\r\n */\r\n this.classType = GetFastValue(config, 'classType', Sprite);\r\n\r\n /**\r\n * The name of this group.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Group#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.18.0\r\n */\r\n this.name = GetFastValue(config, 'name', '');\r\n\r\n /**\r\n * Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method\r\n * (which may update any members).\r\n *\r\n * @name Phaser.GameObjects.Group#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = GetFastValue(config, 'active', true);\r\n\r\n /**\r\n * The maximum size of this group, if used as a pool. -1 is no limit.\r\n *\r\n * @name Phaser.GameObjects.Group#maxSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @default -1\r\n */\r\n this.maxSize = GetFastValue(config, 'maxSize', -1);\r\n\r\n /**\r\n * A default texture key to use when creating new group members.\r\n *\r\n * This is used in {@link Phaser.GameObjects.Group#create}\r\n * but not in {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.defaultKey = GetFastValue(config, 'defaultKey', null);\r\n\r\n /**\r\n * A default texture frame to use when creating new group members.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = GetFastValue(config, 'defaultFrame', null);\r\n\r\n /**\r\n * Whether to call the update method of any members.\r\n *\r\n * @name Phaser.GameObjects.Group#runChildUpdate\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Group#preUpdate\r\n */\r\n this.runChildUpdate = GetFastValue(config, 'runChildUpdate', false);\r\n\r\n /**\r\n * A function to be called when adding or creating group members.\r\n *\r\n * @name Phaser.GameObjects.Group#createCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.createCallback = GetFastValue(config, 'createCallback', null);\r\n\r\n /**\r\n * A function to be called when removing group members.\r\n *\r\n * @name Phaser.GameObjects.Group#removeCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.removeCallback = GetFastValue(config, 'removeCallback', null);\r\n\r\n /**\r\n * A function to be called when creating several group members at once.\r\n *\r\n * @name Phaser.GameObjects.Group#createMultipleCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupMultipleCreateCallback}\r\n * @since 3.0.0\r\n */\r\n this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null);\r\n\r\n if (config)\r\n {\r\n this.createMultiple(config);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Game Object and adds it to this group, unless the group {@link Phaser.GameObjects.Group#isFull is full}.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the new Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of the new Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key of the new Game Object.\r\n * @param {(string|integer)} [frame=defaultFrame] - The texture frame of the new Game Object.\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object.\r\n * @param {boolean} [active=true] - The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object.\r\n *\r\n * @return {any} The new Game Object (usually a Sprite, etc.).\r\n */\r\n create: function (x, y, key, frame, visible, active)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (key === undefined) { key = this.defaultKey; }\r\n if (frame === undefined) { frame = this.defaultFrame; }\r\n if (visible === undefined) { visible = true; }\r\n if (active === undefined) { active = true; }\r\n\r\n // Pool?\r\n if (this.isFull())\r\n {\r\n return null;\r\n }\r\n\r\n var child = new this.classType(this.scene, x, y, key, frame);\r\n\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n\r\n child.visible = visible;\r\n child.setActive(active);\r\n\r\n this.add(child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Creates several Game Objects and adds them to this group.\r\n *\r\n * If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig[]} config - Creation settings. This can be a single configuration object or an array of such objects, which will be applied in turn.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createMultiple: function (config)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var output = [];\r\n\r\n if (config[0].key)\r\n {\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var entries = this.createFromConfig(config[i]);\r\n \r\n output = output.concat(entries);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * A helper for {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @method Phaser.GameObjects.Group#createFromConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig} options - Creation settings.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createFromConfig: function (options)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n this.classType = GetFastValue(options, 'classType', this.classType);\r\n\r\n var key = GetFastValue(options, 'key', undefined);\r\n var frame = GetFastValue(options, 'frame', null);\r\n var visible = GetFastValue(options, 'visible', true);\r\n var active = GetFastValue(options, 'active', true);\r\n\r\n var entries = [];\r\n\r\n // Can't do anything without at least a key\r\n if (key === undefined)\r\n {\r\n return entries;\r\n }\r\n else\r\n {\r\n if (!Array.isArray(key))\r\n {\r\n key = [ key ];\r\n }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n }\r\n\r\n // Build an array of key frame pairs to loop through\r\n\r\n var repeat = GetFastValue(options, 'repeat', 0);\r\n var randomKey = GetFastValue(options, 'randomKey', false);\r\n var randomFrame = GetFastValue(options, 'randomFrame', false);\r\n var yoyo = GetFastValue(options, 'yoyo', false);\r\n var quantity = GetFastValue(options, 'quantity', false);\r\n var frameQuantity = GetFastValue(options, 'frameQuantity', 1);\r\n var max = GetFastValue(options, 'max', 0);\r\n\r\n // If a quantity value is set we use that to override the frameQuantity\r\n\r\n var range = Range(key, frame, {\r\n max: max,\r\n qty: (quantity) ? quantity : frameQuantity,\r\n random: randomKey,\r\n randomB: randomFrame,\r\n repeat: repeat,\r\n yoyo: yoyo\r\n });\r\n\r\n if (options.createCallback)\r\n {\r\n this.createCallback = options.createCallback;\r\n }\r\n\r\n if (options.removeCallback)\r\n {\r\n this.removeCallback = options.removeCallback;\r\n }\r\n\r\n for (var c = 0; c < range.length; c++)\r\n {\r\n var created = this.create(0, 0, range[c].a, range[c].b, visible, active);\r\n\r\n if (!created)\r\n {\r\n break;\r\n }\r\n\r\n entries.push(created);\r\n }\r\n\r\n // Post-creation options (applied only to those items created in this call):\r\n\r\n var x = GetValue(options, 'setXY.x', 0);\r\n var y = GetValue(options, 'setXY.y', 0);\r\n var stepX = GetValue(options, 'setXY.stepX', 0);\r\n var stepY = GetValue(options, 'setXY.stepY', 0);\r\n\r\n Actions.SetXY(entries, x, y, stepX, stepY);\r\n\r\n var rotation = GetValue(options, 'setRotation.value', 0);\r\n var stepRotation = GetValue(options, 'setRotation.step', 0);\r\n\r\n Actions.SetRotation(entries, rotation, stepRotation);\r\n\r\n var scaleX = GetValue(options, 'setScale.x', 1);\r\n var scaleY = GetValue(options, 'setScale.y', scaleX);\r\n var stepScaleX = GetValue(options, 'setScale.stepX', 0);\r\n var stepScaleY = GetValue(options, 'setScale.stepY', 0);\r\n\r\n Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY);\r\n\r\n var alpha = GetValue(options, 'setAlpha.value', 1);\r\n var stepAlpha = GetValue(options, 'setAlpha.step', 0);\r\n\r\n Actions.SetAlpha(entries, alpha, stepAlpha);\r\n\r\n var hitArea = GetFastValue(options, 'hitArea', null);\r\n var hitAreaCallback = GetFastValue(options, 'hitAreaCallback', null);\r\n\r\n if (hitArea)\r\n {\r\n Actions.SetHitArea(entries, hitArea, hitAreaCallback);\r\n }\r\n\r\n var grid = GetFastValue(options, 'gridAlign', false);\r\n\r\n if (grid)\r\n {\r\n Actions.GridAlign(entries, grid);\r\n }\r\n\r\n if (this.createMultipleCallback)\r\n {\r\n this.createMultipleCallback.call(this, entries);\r\n }\r\n\r\n return entries;\r\n },\r\n\r\n /**\r\n * Updates any group members, if {@link Phaser.GameObjects.Group#runChildUpdate} is enabled.\r\n *\r\n * @method Phaser.GameObjects.Group#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n if (!this.runChildUpdate || this.children.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Because a Group child may mess with the length of the Group during its update\r\n var temp = this.children.entries.slice();\r\n\r\n for (var i = 0; i < temp.length; i++)\r\n {\r\n var item = temp[i];\r\n\r\n if (item.active)\r\n {\r\n item.update(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Game Object to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Object to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n add: function (child, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (this.isFull())\r\n {\r\n return this;\r\n }\r\n\r\n this.children.set(child);\r\n\r\n if (this.createCallback)\r\n {\r\n this.createCallback.call(this, child);\r\n }\r\n\r\n if (addToScene)\r\n {\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n }\r\n\r\n child.on(Events.DESTROY, this.remove, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds several Game Objects to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#addMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n addMultiple: function (children, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (Array.isArray(children))\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.add(children[i], addToScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a member of this Group and optionally removes it from the Scene and / or destroys it.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n remove: function (child, removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n if (!this.children.contains(child))\r\n {\r\n return this;\r\n }\r\n\r\n this.children.delete(child);\r\n\r\n if (this.removeCallback)\r\n {\r\n this.removeCallback.call(this, child);\r\n }\r\n\r\n child.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n child.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n child.scene.sys.displayList.remove(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n child.scene.sys.updateList.remove(child);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all members of this Group and optionally removes them from the Scene and / or destroys them.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#clear\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n clear: function (removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n var children = this.children;\r\n\r\n for (var i = 0; i < children.size; i++)\r\n {\r\n var gameObject = children.entries[i];\r\n\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n gameObject.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n gameObject.scene.sys.displayList.remove(gameObject);\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n gameObject.scene.sys.updateList.remove(gameObject);\r\n }\r\n }\r\n }\r\n\r\n this.children.clear();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Tests if a Game Object is a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - A Game Object.\r\n *\r\n * @return {boolean} True if the Game Object is a member of this group.\r\n */\r\n contains: function (child)\r\n {\r\n return this.children.contains(child);\r\n },\r\n\r\n /**\r\n * All members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * The number of members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {integer}\r\n */\r\n getLength: function ()\r\n {\r\n return this.children.size;\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirst\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirst: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirstNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLast\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLast: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLastNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLastNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getHandler\r\n * @private\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} forwards - Search front to back or back to front?\r\n * @param {integer} nth - Stop matching after nth successful matches.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getHandler: function (forwards, nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n if (state === undefined) { state = false; }\r\n if (createIfNull === undefined) { createIfNull = false; }\r\n\r\n var gameObject;\r\n\r\n var i;\r\n var total = 0;\r\n var children = this.children.entries;\r\n\r\n if (forwards)\r\n {\r\n for (i = 0; i < children.length; i++)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = children.length - 1; i >= 0; i--)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n\r\n if (gameObject)\r\n {\r\n if (typeof(x) === 'number')\r\n {\r\n gameObject.x = x;\r\n }\r\n\r\n if (typeof(y) === 'number')\r\n {\r\n gameObject.y = y;\r\n }\r\n\r\n return gameObject;\r\n }\r\n\r\n // Got this far? We need to create or bail\r\n if (createIfNull)\r\n {\r\n return this.create(x, y, key, frame, visible);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have its active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#get\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first inactive group member, or a newly created member, or null.\r\n */\r\n get: function (x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, true, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `true`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstAlive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first active group member, or a newly created member, or null.\r\n */\r\n getFirstAlive: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(true, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have an active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstDead\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first inactive group member, or a newly created member, or null.\r\n */\r\n getFirstDead: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Components.Animation#play Plays} an animation for all members of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#playAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n playAnimation: function (key, startFrame)\r\n {\r\n Actions.PlayAnimation(this.children.entries, key, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Whether this group's size at its {@link Phaser.GameObjects.Group#maxSize maximum}.\r\n *\r\n * @method Phaser.GameObjects.Group#isFull\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the number of members equals {@link Phaser.GameObjects.Group#maxSize}.\r\n */\r\n isFull: function ()\r\n {\r\n if (this.maxSize === -1)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return (this.children.size >= this.maxSize);\r\n }\r\n },\r\n\r\n /**\r\n * Counts the number of active (or inactive) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#countActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Count active (true) or inactive (false) group members.\r\n *\r\n * @return {integer} The number of group members with an active state matching the `active` argument.\r\n */\r\n countActive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n var total = 0;\r\n\r\n for (var i = 0; i < this.children.size; i++)\r\n {\r\n if (this.children.entries[i].active === value)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Counts the number of in-use (active) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalUsed\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of group members with an active state of true.\r\n */\r\n getTotalUsed: function ()\r\n {\r\n return this.countActive();\r\n },\r\n\r\n /**\r\n * The difference of {@link Phaser.GameObjects.Group#maxSize} and the number of active group members.\r\n *\r\n * This represents the number of group members that could be created or reactivated before reaching the size limit.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalFree\r\n * @since 3.0.0\r\n *\r\n * @return {integer} maxSize minus the number of active group numbers; or a large number (if maxSize is -1).\r\n */\r\n getTotalFree: function ()\r\n {\r\n var used = this.getTotalUsed();\r\n var capacity = (this.maxSize === -1) ? 999999999999 : this.maxSize;\r\n\r\n return (capacity - used);\r\n },\r\n\r\n /**\r\n * Sets the depth of each group member.\r\n *\r\n * @method Phaser.GameObjects.Group#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} step - This is added to the `value` amount, multiplied by the iteration counter.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n setDepth: function (value, step)\r\n {\r\n Actions.SetDepth(this.children.entries, value, step);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#kill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n kill: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n }\r\n },\r\n\r\n /**\r\n * Deactivates and hides a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#killAndHide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n killAndHide: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n gameObject.setVisible(false);\r\n }\r\n },\r\n\r\n /**\r\n * Toggles (flips) the visible state of each member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#toggleVisible\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n toggleVisible: function ()\r\n {\r\n Actions.ToggleVisible(this.children.entries);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Empties this group and removes it from the Scene.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#destroy\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [destroyChildren=false] - Also {@link Phaser.GameObjects.GameObject#destroy} each group member.\r\n */\r\n destroy: function (destroyChildren)\r\n {\r\n if (destroyChildren === undefined) { destroyChildren = false; }\r\n\r\n // This Game Object had already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n this.clear(false, destroyChildren);\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Group;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/Group.js?")},"./node_modules/phaser/src/gameobjects/group/GroupCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Group = __webpack_require__(/*! ./Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\n\r\n/**\r\n * Creates a new Group Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#group\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('group', function (config)\r\n{\r\n return new Group(this.scene, null, config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupCreator.js?")},"./node_modules/phaser/src/gameobjects/group/GroupFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Group = __webpack_require__(/*! ./Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Group Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#group\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupConfig[])} [children] - Game Objects to add to this Group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - A Group Configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'group\', function (children, config)\r\n{\r\n return this.updateList.add(new Group(this.scene, children, config));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupFactory.js?')},"./node_modules/phaser/src/gameobjects/image/Image.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ImageRender = __webpack_require__(/*! ./ImageRender */ "./node_modules/phaser/src/gameobjects/image/ImageRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Game Object.\r\n *\r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Image = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ImageRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Image (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Image\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Image#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/Image.js?')},"./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/image/ImageCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#image\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('image', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var image = new Image(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, image, config);\r\n\r\n return image;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCreator.js?")},"./node_modules/phaser/src/gameobjects/image/ImageFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('image', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Image(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageFactory.js?")},"./node_modules/phaser/src/gameobjects/image/ImageRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ImageWebGLRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ImageCanvasRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageRender.js?')},"./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects\r\n */\r\n\r\nvar GameObjects = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/gameobjects/events/index.js"),\r\n\r\n DisplayList: __webpack_require__(/*! ./DisplayList */ "./node_modules/phaser/src/gameobjects/DisplayList.js"),\r\n GameObjectCreator: __webpack_require__(/*! ./GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js"),\r\n GameObjectFactory: __webpack_require__(/*! ./GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js"),\r\n UpdateList: __webpack_require__(/*! ./UpdateList */ "./node_modules/phaser/src/gameobjects/UpdateList.js"),\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/gameobjects/components/index.js"),\r\n\r\n BuildGameObject: __webpack_require__(/*! ./BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js"),\r\n BuildGameObjectAnimation: __webpack_require__(/*! ./BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js"),\r\n GameObject: __webpack_require__(/*! ./GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js"),\r\n BitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js"),\r\n Blitter: __webpack_require__(/*! ./blitter/Blitter */ "./node_modules/phaser/src/gameobjects/blitter/Blitter.js"),\r\n Container: __webpack_require__(/*! ./container/Container */ "./node_modules/phaser/src/gameobjects/container/Container.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElement */ "./node_modules/phaser/src/gameobjects/domelement/DOMElement.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js"),\r\n Extern: __webpack_require__(/*! ./extern/Extern.js */ "./node_modules/phaser/src/gameobjects/extern/Extern.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/Graphics.js */ "./node_modules/phaser/src/gameobjects/graphics/Graphics.js"),\r\n Group: __webpack_require__(/*! ./group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js"),\r\n Image: __webpack_require__(/*! ./image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js"),\r\n Particles: __webpack_require__(/*! ./particles */ "./node_modules/phaser/src/gameobjects/particles/index.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollower */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTexture */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js"),\r\n RetroFont: __webpack_require__(/*! ./bitmaptext/RetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js"),\r\n Text: __webpack_require__(/*! ./text/static/Text */ "./node_modules/phaser/src/gameobjects/text/static/Text.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSprite */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js"),\r\n Zone: __webpack_require__(/*! ./zone/Zone */ "./node_modules/phaser/src/gameobjects/zone/Zone.js"),\r\n\r\n // Shapes\r\n\r\n Shape: __webpack_require__(/*! ./shape/Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js"),\r\n Arc: __webpack_require__(/*! ./shape/arc/Arc */ "./node_modules/phaser/src/gameobjects/shape/arc/Arc.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBox */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangle */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js"),\r\n Line: __webpack_require__(/*! ./shape/line/Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js"),\r\n Star: __webpack_require__(/*! ./shape/star/Star */ "./node_modules/phaser/src/gameobjects/shape/star/Star.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js"),\r\n\r\n // Game Object Factories\r\n\r\n Factories: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterFactory */ "./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerFactory */ "./node_modules/phaser/src/gameobjects/container/ContainerFactory.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElementFactory */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js"),\r\n Extern: __webpack_require__(/*! ./extern/ExternFactory */ "./node_modules/phaser/src/gameobjects/extern/ExternFactory.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsFactory */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js"),\r\n Group: __webpack_require__(/*! ./group/GroupFactory */ "./node_modules/phaser/src/gameobjects/group/GroupFactory.js"),\r\n Image: __webpack_require__(/*! ./image/ImageFactory */ "./node_modules/phaser/src/gameobjects/image/ImageFactory.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerFactory */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollowerFactory */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureFactory */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteFactory */ "./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextFactory */ "./node_modules/phaser/src/gameobjects/text/static/TextFactory.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteFactory */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneFactory */ "./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js"),\r\n\r\n // Shapes\r\n Arc: __webpack_require__(/*! ./shape/arc/ArcFactory */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/CurveFactory */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/EllipseFactory */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/GridFactory */ "./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBoxFactory */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js"),\r\n Line: __webpack_require__(/*! ./shape/line/LineFactory */ "./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/PolygonFactory */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/RectangleFactory */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js"),\r\n Star: __webpack_require__(/*! ./shape/star/StarFactory */ "./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/TriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js")\r\n },\r\n\r\n Creators: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterCreator */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerCreator */ "./node_modules/phaser/src/gameobjects/container/ContainerCreator.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsCreator */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js"),\r\n Group: __webpack_require__(/*! ./group/GroupCreator */ "./node_modules/phaser/src/gameobjects/group/GroupCreator.js"),\r\n Image: __webpack_require__(/*! ./image/ImageCreator */ "./node_modules/phaser/src/gameobjects/image/ImageCreator.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerCreator */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureCreator */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteCreator */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextCreator */ "./node_modules/phaser/src/gameobjects/text/static/TextCreator.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteCreator */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneCreator */ "./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js")\r\n }\r\n\r\n};\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n // WebGL only Game Objects\r\n GameObjects.Mesh = __webpack_require__(/*! ./mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n GameObjects.Quad = __webpack_require__(/*! ./quad/Quad */ "./node_modules/phaser/src/gameobjects/quad/Quad.js");\r\n GameObjects.Shader = __webpack_require__(/*! ./shader/Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\n\r\n GameObjects.Factories.Mesh = __webpack_require__(/*! ./mesh/MeshFactory */ "./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js");\r\n GameObjects.Factories.Quad = __webpack_require__(/*! ./quad/QuadFactory */ "./node_modules/phaser/src/gameobjects/quad/QuadFactory.js");\r\n GameObjects.Factories.Shader = __webpack_require__(/*! ./shader/ShaderFactory */ "./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js");\r\n\r\n GameObjects.Creators.Mesh = __webpack_require__(/*! ./mesh/MeshCreator */ "./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js");\r\n GameObjects.Creators.Quad = __webpack_require__(/*! ./quad/QuadCreator */ "./node_modules/phaser/src/gameobjects/quad/QuadCreator.js");\r\n GameObjects.Creators.Shader = __webpack_require__(/*! ./shader/ShaderCreator */ "./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js");\r\n\r\n GameObjects.Light = __webpack_require__(/*! ./lights/Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\n\r\n __webpack_require__(/*! ./lights/LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\n __webpack_require__(/*! ./lights/LightsPlugin */ "./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js");\r\n}\r\n\r\nmodule.exports = GameObjects;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/index.js?')},"./node_modules/phaser/src/gameobjects/lights/Light.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @classdesc\r\n * A 2D point light.\r\n *\r\n * These are typically created by a {@link Phaser.GameObjects.LightsManager}, available from within a scene via `this.lights`.\r\n *\r\n * Any Game Objects using the Light2D pipeline will then be affected by these Lights.\r\n *\r\n * They can also simply be used to represent a point light for your own purposes.\r\n *\r\n * @class Light\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color of the light. A value between 0 and 1.\r\n * @param {number} g - The green color of the light. A value between 0 and 1.\r\n * @param {number} b - The blue color of the light. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n */\r\nvar Light = new Class({\r\n\r\n initialize:\r\n\r\n function Light (x, y, radius, r, g, b, intensity)\r\n {\r\n /**\r\n * The horizontal position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The red color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#r\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.r = r;\r\n\r\n /**\r\n * The green color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#g\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.g = g;\r\n\r\n /**\r\n * The blue color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#b\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.b = b;\r\n\r\n /**\r\n * The intensity of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#intensity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.intensity = intensity;\r\n\r\n /**\r\n * The horizontal scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1.0;\r\n\r\n /**\r\n * The vertical scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1.0;\r\n },\r\n\r\n /**\r\n * Set the properties of the light.\r\n *\r\n * Sets both horizontal and vertical scroll factor to 1. Use {@link Phaser.GameObjects.Light#setScrollFactor} to set\r\n * the scroll factor.\r\n *\r\n * @method Phaser.GameObjects.Light#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color. A value between 0 and 1.\r\n * @param {number} g - The green color. A value between 0 and 1.\r\n * @param {number} b - The blue color. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n set: function (x, y, radius, r, g, b, intensity)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.radius = radius;\r\n\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n\r\n this.intensity = intensity;\r\n\r\n this.scrollFactorX = 1;\r\n this.scrollFactorY = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scroll factor of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of the light.\r\n * @param {number} y - The vertical scroll factor of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the color of the light from a single integer RGB value.\r\n *\r\n * @method Phaser.GameObjects.Light#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.r = color[0];\r\n this.g = color[1];\r\n this.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the intensity of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setIntensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setIntensity: function (intensity)\r\n {\r\n this.intensity = intensity;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the radius of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setRadius: function (radius)\r\n {\r\n this.radius = radius;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Light;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/Light.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Light = __webpack_require__(/*! ./Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @callback LightForEach\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Manages Lights for a Scene.\r\n *\r\n * Affects the rendering of Game Objects using the `Light2D` pipeline.\r\n *\r\n * @class LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar LightsManager = new Class({\r\n\r\n initialize:\r\n\r\n function LightsManager ()\r\n {\r\n /**\r\n * The pool of Lights.\r\n *\r\n * Used to recycle removed Lights for a more efficient use of memory.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lightPool\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lightPool = [];\r\n\r\n /**\r\n * The Lights in the Scene.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lights = [];\r\n\r\n /**\r\n * Lights that have been culled from a Camera\'s viewport.\r\n *\r\n * Lights in this list will not be rendered.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#culledLights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.culledLights = [];\r\n\r\n /**\r\n * The ambient color.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#ambientColor\r\n * @type {{ r: number, g: number, b: number }}\r\n * @since 3.0.0\r\n */\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n\r\n /**\r\n * Whether the Lights Manager is enabled.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The maximum number of lights that a single Camera and the lights shader can process.\r\n * Change this via the `maxLights` property in your game config, as it cannot be changed at runtime.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#maxLights\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.maxLights = -1;\r\n },\r\n\r\n /**\r\n * Enable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#enable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n enable: function ()\r\n {\r\n if (this.maxLights === -1)\r\n {\r\n this.maxLights = this.scene.sys.game.renderer.config.maxLights;\r\n }\r\n\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#disable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n disable: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Cull any Lights that aren\'t visible to the given Camera.\r\n *\r\n * Culling Lights improves performance by ensuring that only Lights within a Camera\'s viewport are rendered.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to cull Lights for.\r\n *\r\n * @return {Phaser.GameObjects.Light[]} The culled Lights.\r\n */\r\n cull: function (camera)\r\n {\r\n var lights = this.lights;\r\n var culledLights = this.culledLights;\r\n var length = lights.length;\r\n var cameraCenterX = camera.x + camera.width / 2.0;\r\n var cameraCenterY = camera.y + camera.height / 2.0;\r\n var cameraRadius = (camera.width + camera.height) / 2.0;\r\n var point = { x: 0, y: 0 };\r\n var cameraMatrix = camera.matrix;\r\n var viewportHeight = this.systems.game.config.height;\r\n\r\n culledLights.length = 0;\r\n\r\n for (var index = 0; index < length && culledLights.length < this.maxLights; index++)\r\n {\r\n var light = lights[index];\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n // We\'ll just use bounding spheres to test if lights should be rendered\r\n var dx = cameraCenterX - (point.x - (camera.scrollX * light.scrollFactorX * camera.zoom));\r\n var dy = cameraCenterY - (viewportHeight - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n var distance = Math.sqrt(dx * dx + dy * dy);\r\n\r\n if (distance < light.radius + cameraRadius)\r\n {\r\n culledLights.push(lights[index]);\r\n }\r\n }\r\n\r\n return culledLights;\r\n },\r\n\r\n /**\r\n * Iterate over each Light with a callback.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#forEachLight\r\n * @since 3.0.0\r\n *\r\n * @param {LightForEach} callback - The callback that is called with each Light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n forEachLight: function (callback)\r\n {\r\n if (!callback)\r\n {\r\n return;\r\n }\r\n\r\n var lights = this.lights;\r\n var length = lights.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n callback(lights[index]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the ambient light color.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#setAmbientColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the ambient light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n setAmbientColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.ambientColor.r = color[0];\r\n this.ambientColor.g = color[1];\r\n this.ambientColor.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of Lights allowed to appear at once.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getMaxVisibleLights\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The maximum number of Lights allowed to appear at once.\r\n */\r\n getMaxVisibleLights: function ()\r\n {\r\n return 10;\r\n },\r\n\r\n /**\r\n * Get the number of Lights managed by this Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getLightCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of Lights managed by this Lights Manager.\r\n */\r\n getLightCount: function ()\r\n {\r\n return this.lights.length;\r\n },\r\n\r\n /**\r\n * Add a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#addLight\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the Light.\r\n * @param {number} [y=0] - The vertical position of the Light.\r\n * @param {number} [radius=100] - The radius of the Light.\r\n * @param {number} [rgb=0xffffff] - The integer RGB color of the light.\r\n * @param {number} [intensity=1] - The intensity of the Light.\r\n *\r\n * @return {Phaser.GameObjects.Light} The Light that was added.\r\n */\r\n addLight: function (x, y, radius, rgb, intensity)\r\n {\r\n var color = null;\r\n var light = null;\r\n\r\n x = (x === undefined) ? 0.0 : x;\r\n y = (y === undefined) ? 0.0 : y;\r\n rgb = (rgb === undefined) ? 0xffffff : rgb;\r\n radius = (radius === undefined) ? 100.0 : radius;\r\n intensity = (intensity === undefined) ? 1.0 : intensity;\r\n\r\n color = Utils.getFloatsFromUintRGB(rgb);\r\n light = null;\r\n\r\n if (this.lightPool.length > 0)\r\n {\r\n light = this.lightPool.pop();\r\n light.set(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n else\r\n {\r\n light = new Light(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n\r\n this.lights.push(light);\r\n\r\n return light;\r\n },\r\n\r\n /**\r\n * Remove a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#removeLight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light to remove.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n removeLight: function (light)\r\n {\r\n var index = this.lights.indexOf(light);\r\n\r\n if (index >= 0)\r\n {\r\n this.lightPool.push(light);\r\n this.lights.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shut down the Lights Manager.\r\n *\r\n * Recycles all active Lights into the Light pool, resets ambient light color and clears the lists of Lights and\r\n * culled Lights.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n while (this.lights.length > 0)\r\n {\r\n this.lightPool.push(this.lights.pop());\r\n }\r\n\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n this.culledLights.length = 0;\r\n this.lights.length = 0;\r\n },\r\n\r\n /**\r\n * Destroy the Lights Manager.\r\n *\r\n * Cleans up all references by calling {@link Phaser.GameObjects.LightsManager#shutdown}.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LightsManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsManager.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar LightsManager = __webpack_require__(/*! ./LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene plugin that provides a {@link Phaser.GameObjects.LightsManager} for the Light2D pipeline.\r\n *\r\n * Available from within a Scene via `this.lights`.\r\n *\r\n * Add Lights using the {@link Phaser.GameObjects.LightsManager#addLight} method:\r\n *\r\n * ```javascript\r\n * // Enable the Lights Manager because it is disabled by default\r\n * this.lights.enable();\r\n *\r\n * // Create a Light at [400, 300] with a radius of 200\r\n * this.lights.addLight(400, 300, 200);\r\n * ```\r\n *\r\n * For Game Objects to be affected by the Lights when rendered, you will need to set them to use the `Light2D` pipeline like so:\r\n *\r\n * ```javascript\r\n * sprite.setPipeline(\'Light2D\');\r\n * ```\r\n *\r\n * @class LightsPlugin\r\n * @extends Phaser.GameObjects.LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Lights Plugin belongs to.\r\n */\r\nvar LightsPlugin = new Class({\r\n\r\n Extends: LightsManager,\r\n\r\n initialize:\r\n\r\n function LightsPlugin (scene)\r\n {\r\n /**\r\n * A reference to the Scene that this Lights Plugin belongs to.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s systems.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n if (!scene.sys.settings.isBooted)\r\n {\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n }\r\n\r\n LightsManager.call(this);\r\n },\r\n\r\n /**\r\n * Boot the Lights Plugin.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#boot\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.on(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Destroy the Lights Plugin.\r\n *\r\n * Cleans up all references.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = undefined;\r\n this.systems = undefined;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'LightsPlugin\', LightsPlugin, \'lights\');\r\n\r\nmodule.exports = LightsPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js?')},"./node_modules/phaser/src/gameobjects/mesh/Mesh.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar MeshRender = __webpack_require__(/*! ./MeshRender */ "./node_modules/phaser/src/gameobjects/mesh/MeshRender.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Mesh Game Object.\r\n *\r\n * @class Mesh\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Mesh = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n MeshRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Mesh (scene, x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Mesh\');\r\n\r\n if (vertices.length !== uv.length)\r\n {\r\n throw new Error(\'Mesh Vertex count must match UV count\');\r\n }\r\n\r\n var verticesUB = (vertices.length / 2) | 0;\r\n\r\n if (colors.length > 0 && colors.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Color count must match Vertex count\');\r\n }\r\n\r\n if (alphas.length > 0 && alphas.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Alpha count must match Vertex count\');\r\n }\r\n\r\n var i;\r\n\r\n if (colors.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n colors[i] = 0xFFFFFF;\r\n }\r\n }\r\n\r\n if (alphas.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n alphas[i] = 1.0;\r\n }\r\n }\r\n\r\n /**\r\n * An array containing the vertices data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#vertices\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertices = new Float32Array(vertices);\r\n\r\n /**\r\n * An array containing the uv data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#uv\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.uv = new Float32Array(uv);\r\n\r\n /**\r\n * An array containing the color data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#colors\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.colors = new Uint32Array(colors);\r\n\r\n /**\r\n * An array containing the alpha data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#alphas\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.alphas = new Float32Array(alphas);\r\n\r\n /**\r\n * Fill or additive mode used when blending the color values?\r\n * \r\n * @name Phaser.GameObjects.Mesh#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.tintFill = false;\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * This method is left intentionally empty and does not do anything.\r\n * It is retained to allow a Mesh or Quad to be added to a Container.\r\n * \r\n * @method Phaser.GameObjects.Mesh#setAlpha\r\n * @since 3.17.0\r\n */\r\n setAlpha: NOOP\r\n\r\n});\r\n\r\nmodule.exports = Mesh;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/Mesh.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Mesh.Render. There is no Canvas renderer for Mesh objects.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar MeshCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = MeshCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('mesh', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var vertices = GetValue(config, 'vertices', []);\r\n var colors = GetValue(config, 'colors', []);\r\n var alphas = GetValue(config, 'alphas', []);\r\n var uv = GetValue(config, 'uv', []);\r\n\r\n var mesh = new Mesh(this.scene, 0, 0, vertices, uv, colors, alphas, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, mesh, config);\r\n\r\n return mesh;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#mesh\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./MeshWebGLRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./MeshCanvasRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshRender.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n\r\n var vertices = src.vertices;\r\n var uvs = src.uv;\r\n var colors = src.colors;\r\n var alphas = src.alphas;\r\n\r\n var meshVerticesLength = vertices.length;\r\n var vertexCount = Math.floor(meshVerticesLength * 0.5);\r\n\r\n if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)\r\n {\r\n pipeline.flush();\r\n }\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var vertexViewF32 = pipeline.vertexViewF32;\r\n var vertexViewU32 = pipeline.vertexViewU32;\r\n\r\n var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1;\r\n\r\n var colorIndex = 0;\r\n var tintEffect = src.tintFill;\r\n\r\n for (var i = 0; i < meshVerticesLength; i += 2)\r\n {\r\n var x = vertices[i + 0];\r\n var y = vertices[i + 1];\r\n\r\n var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e;\r\n var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f;\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx = Math.round(tx);\r\n ty = Math.round(ty);\r\n }\r\n\r\n vertexViewF32[++vertexOffset] = tx;\r\n vertexViewF32[++vertexOffset] = ty;\r\n vertexViewF32[++vertexOffset] = uvs[i + 0];\r\n vertexViewF32[++vertexOffset] = uvs[i + 1];\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * alphas[colorIndex]);\r\n\r\n colorIndex++;\r\n }\r\n\r\n pipeline.vertexCount += vertexCount;\r\n};\r\n\r\nmodule.exports = MeshWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FloatBetween = __webpack_require__(/*! ../../math/FloatBetween */ \"./node_modules/phaser/src/math/FloatBetween.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ../../tweens/builders/GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter property.\r\n *\r\n * Facilitates changing Particle properties as they are emitted and throughout their lifetime.\r\n *\r\n * @class EmitterOp\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property.\r\n * @param {string} key - The name of the property.\r\n * @param {number} defaultValue - The default value of the property.\r\n * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted.\r\n */\r\nvar EmitterOp = new Class({\r\n\r\n initialize:\r\n\r\n function EmitterOp (config, key, defaultValue, emitOnly)\r\n {\r\n if (emitOnly === undefined)\r\n {\r\n emitOnly = false;\r\n }\r\n\r\n /**\r\n * The name of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.propertyKey = key;\r\n\r\n /**\r\n * The value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.propertyValue = defaultValue;\r\n\r\n /**\r\n * The default value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.defaultValue = defaultValue;\r\n\r\n /**\r\n * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#steps\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.steps = 0;\r\n\r\n /**\r\n * The step counter for stepped easing, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#counter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.counter = 0;\r\n\r\n /**\r\n * The start value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#start\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.start = 0;\r\n\r\n /**\r\n * The end value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#end\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.end = 0;\r\n\r\n /**\r\n * The easing function to use for updating this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#ease\r\n * @type {?function}\r\n * @since 3.0.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * Whether this property can only be modified when a Particle is emitted.\r\n *\r\n * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and\r\n * affect this property.\r\n *\r\n * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.emitOnly = emitOnly;\r\n\r\n /**\r\n * The callback to run for Particles when they are emitted from the Particle Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onEmit\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback}\r\n * @since 3.0.0\r\n */\r\n this.onEmit = this.defaultEmit;\r\n\r\n /**\r\n * The callback to run for Particles when they are updated.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.onUpdate = this.defaultUpdate;\r\n\r\n this.loadConfig(config);\r\n },\r\n\r\n /**\r\n * Load the property from a Particle Emitter configuration object.\r\n *\r\n * Optionally accepts a new property key to use, replacing the current one.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property.\r\n * @param {string} [newKey] - The new key to use for this property, if any.\r\n */\r\n loadConfig: function (config, newKey)\r\n {\r\n if (config === undefined)\r\n {\r\n config = {};\r\n }\r\n\r\n if (newKey)\r\n {\r\n this.propertyKey = newKey;\r\n }\r\n\r\n this.propertyValue = GetFastValue(\r\n config,\r\n this.propertyKey,\r\n this.defaultValue\r\n );\r\n\r\n this.setMethods();\r\n\r\n if (this.emitOnly)\r\n {\r\n // Reset it back again\r\n this.onUpdate = this.defaultUpdate;\r\n }\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Particle Emitter property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Particle Emitter property.\r\n */\r\n toJSON: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * Change the current value of the property and update its callback methods.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#onChange\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the property.\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n onChange: function (value)\r\n {\r\n this.propertyValue = value;\r\n\r\n return this.setMethods();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#setMethods\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n setMethods: function ()\r\n {\r\n var value = this.propertyValue;\r\n\r\n var t = typeof value;\r\n\r\n if (t === 'number')\r\n {\r\n // Explicit static value:\r\n // x: 400\r\n\r\n this.onEmit = this.staticValueEmit;\r\n this.onUpdate = this.staticValueUpdate; // How?\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n // Picks a random element from the array:\r\n // x: [ 100, 200, 300, 400 ]\r\n\r\n this.onEmit = this.randomStaticValueEmit;\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one)\r\n // Custom callback, must return a value:\r\n\r\n /*\r\n x: function (particle, key, t, value)\r\n {\r\n return value + 50;\r\n }\r\n */\r\n\r\n if (this.emitOnly)\r\n {\r\n this.onEmit = value;\r\n }\r\n else\r\n {\r\n this.onUpdate = value;\r\n }\r\n }\r\n else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max')))\r\n {\r\n this.start = this.has(value, 'start') ? value.start : value.min;\r\n this.end = this.has(value, 'end') ? value.end : value.max;\r\n\r\n var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random);\r\n\r\n // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value)\r\n\r\n // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] }\r\n\r\n if (isRandom)\r\n {\r\n var rnd = value.random;\r\n\r\n // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true }\r\n if (Array.isArray(rnd))\r\n {\r\n this.start = rnd[0];\r\n this.end = rnd[1];\r\n }\r\n\r\n this.onEmit = this.randomRangedValueEmit;\r\n }\r\n\r\n if (this.has(value, 'steps'))\r\n {\r\n // A stepped (per emit) range\r\n\r\n // x: { start: 100, end: 400, steps: 64 }\r\n\r\n // Increments a value stored in the emitter\r\n\r\n this.steps = value.steps;\r\n this.counter = this.start;\r\n\r\n this.onEmit = this.steppedEmit;\r\n }\r\n else\r\n {\r\n // An eased range (defaults to Linear if not specified)\r\n\r\n // x: { start: 100, end: 400, [ ease: 'Linear' ] }\r\n\r\n var easeType = this.has(value, 'ease') ? value.ease : 'Linear';\r\n\r\n this.ease = GetEaseFunction(easeType);\r\n\r\n if (!isRandom)\r\n {\r\n this.onEmit = this.easedValueEmit;\r\n }\r\n\r\n // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given.\r\n // Probably this branch should exclude isRandom entirely.\r\n\r\n this.onUpdate = this.easeValueUpdate;\r\n }\r\n }\r\n else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate'))\r\n {\r\n // Custom onEmit and onUpdate callbacks\r\n\r\n /*\r\n x: {\r\n // Called at the start of the particles life, when it is being created\r\n onEmit: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n // Called during the particles life on each update\r\n onUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (this.has(value, 'onEmit'))\r\n {\r\n this.onEmit = value.onEmit;\r\n }\r\n\r\n if (this.has(value, 'onUpdate'))\r\n {\r\n this.onUpdate = value.onUpdate;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether an object has the given property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#has\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key - The key of the property to look for in the object.\r\n *\r\n * @return {boolean} `true` if the property exists in the object, `false` otherwise.\r\n */\r\n has: function (object, key)\r\n {\r\n return object.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Check whether an object has both of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if both properties exist in the object, `false` otherwise.\r\n */\r\n hasBoth: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) && object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * Check whether an object has at least one of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasEither\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist.\r\n */\r\n hasEither: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) || object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * The returned value sets what the property will be at the START of the particles life, on emit.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} [value] - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultEmit: function (particle, key, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * The returned value updates the property for the duration of the particles life.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n * @param {number} value - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueEmit: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueUpdate: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a random value from the current value array.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomStaticValueEmit: function ()\r\n {\r\n var randomIndex = Math.floor(Math.random() * this.propertyValue.length);\r\n\r\n return this.propertyValue[randomIndex];\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The key of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomRangedValueEmit: function (particle, key)\r\n {\r\n var value = FloatBetween(this.start, this.end);\r\n\r\n if (particle && particle.data[key])\r\n {\r\n particle.data[key].min = value;\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a stepped value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n steppedEmit: function ()\r\n {\r\n var current = this.counter;\r\n\r\n var next = this.counter + (this.end - this.start) / this.steps;\r\n\r\n this.counter = Wrap(next, this.start, this.end);\r\n\r\n return current;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback for an eased property.\r\n *\r\n * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n *\r\n * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property.\r\n */\r\n easedValueEmit: function (particle, key)\r\n {\r\n if (particle && particle.data[key])\r\n {\r\n var data = particle.data[key];\r\n\r\n data.min = this.start;\r\n data.max = this.end;\r\n }\r\n\r\n return this.start;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns an eased value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n easeValueUpdate: function (particle, key, t)\r\n {\r\n var data = particle.data[key];\r\n\r\n return (data.max - data.min) * this.ease(t) + data.min;\r\n }\r\n});\r\n\r\nmodule.exports = EmitterOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/EmitterOp.js?")},"./node_modules/phaser/src/gameobjects/particles/GravityWell.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point.\r\n * \r\n * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity.\r\n * \r\n * This simulates the effect of gravity over large distances (as between planets, for example).\r\n *\r\n * @class GravityWell\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.GravityWellConfig)} [x=0] - The x coordinate of the Gravity Well, in world space.\r\n * @param {number} [y=0] - The y coordinate of the Gravity Well, in world space.\r\n * @param {number} [power=0] - The strength of the gravity force - larger numbers produce a stronger force.\r\n * @param {number} [epsilon=100] - The minimum distance for which the gravity force is calculated.\r\n * @param {number} [gravity=50] - The gravitational force of this Gravity Well.\r\n */\r\nvar GravityWell = new Class({\r\n\r\n initialize:\r\n\r\n function GravityWell (x, y, power, epsilon, gravity)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetFastValue(config, 'x', 0);\r\n y = GetFastValue(config, 'y', 0);\r\n power = GetFastValue(config, 'power', 0);\r\n epsilon = GetFastValue(config, 'epsilon', 100);\r\n gravity = GetFastValue(config, 'gravity', 50);\r\n }\r\n else\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (power === undefined) { power = 0; }\r\n if (epsilon === undefined) { epsilon = 100; }\r\n if (gravity === undefined) { gravity = 50; }\r\n }\r\n\r\n /**\r\n * The x coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Internal gravity value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_gravity\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._gravity = gravity;\r\n\r\n /**\r\n * Internal power value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_power\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._power = 0;\r\n\r\n /**\r\n * Internal epsilon value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_epsilon\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._epsilon = 0;\r\n\r\n /**\r\n * The strength of the gravity force - larger numbers produce a stronger force.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#power\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The minimum distance for which the gravity force is calculated.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#epsilon\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.epsilon = epsilon;\r\n },\r\n\r\n /**\r\n * Takes a Particle and updates it based on the properties of this Gravity Well.\r\n *\r\n * @method Phaser.GameObjects.Particles.GravityWell#update\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n */\r\n update: function (particle, delta)\r\n {\r\n var x = this.x - particle.x;\r\n var y = this.y - particle.y;\r\n var dSq = x * x + y * y;\r\n\r\n if (dSq === 0)\r\n {\r\n return;\r\n }\r\n\r\n var d = Math.sqrt(dSq);\r\n\r\n if (dSq < this._epsilon)\r\n {\r\n dSq = this._epsilon;\r\n }\r\n\r\n var factor = ((this._power * delta) / (dSq * d)) * 100;\r\n\r\n particle.velocityX += x * factor;\r\n particle.velocityY += y * factor;\r\n },\r\n\r\n epsilon: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt(this._epsilon);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._epsilon = value * value;\r\n }\r\n\r\n },\r\n\r\n power: {\r\n\r\n get: function ()\r\n {\r\n return this._power / this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._power = value * this._gravity;\r\n }\r\n\r\n },\r\n\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var pwr = this.power;\r\n this._gravity = value;\r\n this.power = pwr;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GravityWell;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/GravityWell.js?")},"./node_modules/phaser/src/gameobjects/particles/Particle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager.\r\n * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones.\r\n *\r\n * @class Particle\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to which this Particle belongs.\r\n */\r\nvar Particle = new Class({\r\n\r\n initialize:\r\n\r\n function Particle (emitter)\r\n {\r\n /**\r\n * The Emitter to which this Particle belongs.\r\n *\r\n * A Particle can only belong to a single Emitter and is created, updated and destroyed via it.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#emitter\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitter}\r\n * @since 3.0.0\r\n */\r\n this.emitter = emitter;\r\n\r\n /**\r\n * The texture frame used to render this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * The x coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The x velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityX = 0;\r\n\r\n /**\r\n * The y velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityY = 0;\r\n\r\n /**\r\n * The x acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = 0;\r\n\r\n /**\r\n * The y acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = 0;\r\n\r\n /**\r\n * The maximum horizontal velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityX\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = 10000;\r\n\r\n /**\r\n * The maximum vertical velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityY\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = 10000;\r\n\r\n /**\r\n * The bounciness, or restitution, of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#bounce\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = 0;\r\n\r\n /**\r\n * The horizontal scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleX = 1;\r\n\r\n /**\r\n * The vertical scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleY = 1;\r\n\r\n /**\r\n * The alpha value of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * The angle of this Particle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The angle of this Particle in radians.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#rotation\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * The tint applied to this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * The lifespan of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#life\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.life = 1000;\r\n\r\n /**\r\n * The current life of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeCurrent\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.lifeCurrent = 1000;\r\n\r\n /**\r\n * The delay applied to this Particle upon emission, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#delayCurrent\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delayCurrent = 0;\r\n\r\n /**\r\n * The normalized lifespan T value, where 0 is the start and 1 is the end.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeT\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lifeT = 0;\r\n\r\n /**\r\n * The data used by the ease equation.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#data\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff },\r\n alpha: { min: 1, max: 1 },\r\n rotate: { min: 0, max: 0 },\r\n scaleX: { min: 1, max: 1 },\r\n scaleY: { min: 1, max: 1 }\r\n };\r\n },\r\n\r\n /**\r\n * Checks to see if this Particle is alive and updating.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#isAlive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Particle is alive and updating, otherwise `false`.\r\n */\r\n isAlive: function ()\r\n {\r\n return (this.lifeCurrent > 0);\r\n },\r\n\r\n /**\r\n * Resets the position of this particle back to zero.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#resetPosition\r\n * @since 3.16.0\r\n */\r\n resetPosition: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n },\r\n\r\n /**\r\n * Starts this Particle from the given coordinates.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#fire\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to launch this Particle from.\r\n * @param {number} y - The y coordinate to launch this Particle from.\r\n */\r\n fire: function (x, y)\r\n {\r\n var emitter = this.emitter;\r\n\r\n this.frame = emitter.getFrame();\r\n\r\n if (emitter.emitZone)\r\n {\r\n // Updates particle.x and particle.y during this call\r\n emitter.emitZone.getPoint(this);\r\n }\r\n\r\n if (x === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.x += emitter.follow.x + emitter.followOffset.x;\r\n }\r\n\r\n this.x += emitter.x.onEmit(this, 'x');\r\n }\r\n else\r\n {\r\n this.x += x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.y += emitter.follow.y + emitter.followOffset.y;\r\n }\r\n\r\n this.y += emitter.y.onEmit(this, 'y');\r\n }\r\n else\r\n {\r\n this.y += y;\r\n }\r\n\r\n this.life = emitter.lifespan.onEmit(this, 'lifespan');\r\n this.lifeCurrent = this.life;\r\n this.lifeT = 0;\r\n\r\n var sx = emitter.speedX.onEmit(this, 'speedX');\r\n var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx;\r\n\r\n if (emitter.radial)\r\n {\r\n var rad = DegToRad(emitter.angle.onEmit(this, 'angle'));\r\n\r\n this.velocityX = Math.cos(rad) * Math.abs(sx);\r\n this.velocityY = Math.sin(rad) * Math.abs(sy);\r\n }\r\n else if (emitter.moveTo)\r\n {\r\n var mx = emitter.moveToX.onEmit(this, 'moveToX');\r\n var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx;\r\n\r\n var angle = Math.atan2(my - this.y, mx - this.x);\r\n\r\n var speed = DistanceBetween(this.x, this.y, mx, my) / (this.life / 1000);\r\n\r\n // We know how many pixels we need to move, but how fast?\r\n // var speed = this.distanceToXY(displayObject, x, y) / (maxTime / 1000);\r\n\r\n this.velocityX = Math.cos(angle) * speed;\r\n this.velocityY = Math.sin(angle) * speed;\r\n }\r\n else\r\n {\r\n this.velocityX = sx;\r\n this.velocityY = sy;\r\n }\r\n\r\n if (emitter.acceleration)\r\n {\r\n this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX');\r\n this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY');\r\n }\r\n\r\n this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX');\r\n this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY');\r\n\r\n this.delayCurrent = emitter.delay.onEmit(this, 'delay');\r\n\r\n this.scaleX = emitter.scaleX.onEmit(this, 'scaleX');\r\n this.scaleY = (emitter.scaleY) ? emitter.scaleY.onEmit(this, 'scaleY') : this.scaleX;\r\n\r\n this.angle = emitter.rotate.onEmit(this, 'rotate');\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.bounce = emitter.bounce.onEmit(this, 'bounce');\r\n\r\n this.alpha = emitter.alpha.onEmit(this, 'alpha');\r\n\r\n this.tint = emitter.tint.onEmit(this, 'tint');\r\n },\r\n\r\n /**\r\n * An internal method that calculates the velocity of the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - Particle processors (gravity wells).\r\n */\r\n computeVelocity: function (emitter, delta, step, processors)\r\n {\r\n var vx = this.velocityX;\r\n var vy = this.velocityY;\r\n\r\n var ax = this.accelerationX;\r\n var ay = this.accelerationY;\r\n\r\n var mx = this.maxVelocityX;\r\n var my = this.maxVelocityY;\r\n\r\n vx += (emitter.gravityX * step);\r\n vy += (emitter.gravityY * step);\r\n\r\n if (ax)\r\n {\r\n vx += (ax * step);\r\n }\r\n\r\n if (ay)\r\n {\r\n vy += (ay * step);\r\n }\r\n\r\n if (vx > mx)\r\n {\r\n vx = mx;\r\n }\r\n else if (vx < -mx)\r\n {\r\n vx = -mx;\r\n }\r\n\r\n if (vy > my)\r\n {\r\n vy = my;\r\n }\r\n else if (vy < -my)\r\n {\r\n vy = -my;\r\n }\r\n\r\n this.velocityX = vx;\r\n this.velocityY = vy;\r\n\r\n // Apply any additional processors\r\n for (var i = 0; i < processors.length; i++)\r\n {\r\n processors[i].update(this, delta, step);\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this Particle is still within the bounds defined by the given Emitter.\r\n *\r\n * If not, and depending on the Emitter collision flags, the Particle may either stop or rebound.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#checkBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to check the bounds against.\r\n */\r\n checkBounds: function (emitter)\r\n {\r\n var bounds = emitter.bounds;\r\n var bounce = -this.bounce;\r\n\r\n if (this.x < bounds.x && emitter.collideLeft)\r\n {\r\n this.x = bounds.x;\r\n this.velocityX *= bounce;\r\n }\r\n else if (this.x > bounds.right && emitter.collideRight)\r\n {\r\n this.x = bounds.right;\r\n this.velocityX *= bounce;\r\n }\r\n\r\n if (this.y < bounds.y && emitter.collideTop)\r\n {\r\n this.y = bounds.y;\r\n this.velocityY *= bounce;\r\n }\r\n else if (this.y > bounds.bottom && emitter.collideBottom)\r\n {\r\n this.y = bounds.bottom;\r\n this.velocityY *= bounce;\r\n }\r\n },\r\n\r\n /**\r\n * The main update method for this Particle.\r\n *\r\n * Updates its life values, computes the velocity and repositions the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - An optional array of update processors.\r\n *\r\n * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active.\r\n */\r\n update: function (delta, step, processors)\r\n {\r\n if (this.delayCurrent > 0)\r\n {\r\n this.delayCurrent -= delta;\r\n\r\n return false;\r\n }\r\n\r\n var emitter = this.emitter;\r\n\r\n // How far along in life is this particle? (t = 0 to 1)\r\n var t = 1 - (this.lifeCurrent / this.life);\r\n\r\n this.lifeT = t;\r\n\r\n this.computeVelocity(emitter, delta, step, processors);\r\n\r\n this.x += this.velocityX * step;\r\n this.y += this.velocityY * step;\r\n\r\n if (emitter.bounds)\r\n {\r\n this.checkBounds(emitter);\r\n }\r\n\r\n if (emitter.deathZone && emitter.deathZone.willKill(this))\r\n {\r\n this.lifeCurrent = 0;\r\n\r\n // No need to go any further, particle has been killed\r\n return true;\r\n }\r\n\r\n this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX);\r\n\r\n if (emitter.scaleY)\r\n {\r\n this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY);\r\n }\r\n else\r\n {\r\n this.scaleY = this.scaleX;\r\n }\r\n\r\n this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle);\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha);\r\n\r\n this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint);\r\n\r\n this.lifeCurrent -= delta;\r\n\r\n return (this.lifeCurrent <= 0);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Particle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/Particle.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DeathZone = __webpack_require__(/*! ./zones/DeathZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js\");\r\nvar EdgeZone = __webpack_require__(/*! ./zones/EdgeZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js\");\r\nvar EmitterOp = __webpack_require__(/*! ./EmitterOp */ \"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ \"./node_modules/phaser/src/utils/array/GetRandom.js\");\r\nvar HasAny = __webpack_require__(/*! ../../utils/object/HasAny */ \"./node_modules/phaser/src/utils/object/HasAny.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Particle = __webpack_require__(/*! ./Particle */ \"./node_modules/phaser/src/gameobjects/particles/Particle.js\");\r\nvar RandomZone = __webpack_require__(/*! ./zones/RandomZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar StableSort = __webpack_require__(/*! ../../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A particle emitter represents a single particle stream.\r\n * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}.\r\n *\r\n * @class ParticleEmitter\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n */\r\nvar ParticleEmitter = new Class({\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Mask,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function ParticleEmitter (manager, config)\r\n {\r\n /**\r\n * The Emitter Manager this Emitter belongs to.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#manager\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitterManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The texture assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = manager.texture;\r\n\r\n /**\r\n * The texture frames assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frames\r\n * @type {Phaser.Textures.Frame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = [ manager.defaultFrame ];\r\n\r\n /**\r\n * The default texture frame assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = manager.defaultFrame;\r\n\r\n /**\r\n * Names of simple configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configFastMap = [\r\n 'active',\r\n 'blendMode',\r\n 'collideBottom',\r\n 'collideLeft',\r\n 'collideRight',\r\n 'collideTop',\r\n 'deathCallback',\r\n 'deathCallbackScope',\r\n 'emitCallback',\r\n 'emitCallbackScope',\r\n 'follow',\r\n 'frequency',\r\n 'gravityX',\r\n 'gravityY',\r\n 'maxParticles',\r\n 'name',\r\n 'on',\r\n 'particleBringToTop',\r\n 'particleClass',\r\n 'radial',\r\n 'timeScale',\r\n 'trackVisible',\r\n 'visible'\r\n ];\r\n\r\n /**\r\n * Names of complex configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configOpMap = [\r\n 'accelerationX',\r\n 'accelerationY',\r\n 'angle',\r\n 'alpha',\r\n 'bounce',\r\n 'delay',\r\n 'lifespan',\r\n 'maxVelocityX',\r\n 'maxVelocityY',\r\n 'moveToX',\r\n 'moveToY',\r\n 'quantity',\r\n 'rotate',\r\n 'scaleX',\r\n 'scaleY',\r\n 'speedX',\r\n 'speedY',\r\n 'tint',\r\n 'x',\r\n 'y'\r\n ];\r\n\r\n /**\r\n * The name of this Particle Emitter.\r\n *\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The Particle Class which will be emitted by this Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass\r\n * @type {Phaser.GameObjects.Particles.Particle}\r\n * @default Phaser.GameObjects.Particles.Particle\r\n * @since 3.0.0\r\n */\r\n this.particleClass = Particle;\r\n\r\n /**\r\n * The x-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#x\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.x = new EmitterOp(config, 'x', 0, true);\r\n\r\n /**\r\n * The y-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#y\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.y = new EmitterOp(config, 'y', 0, true);\r\n\r\n /**\r\n * A radial emitter will emit particles in all directions between angle min and max,\r\n * using {@link Phaser.GameObjects.Particles.ParticleEmitter#speed} as the value. If set to false then this acts as a point Emitter.\r\n * A point emitter will emit particles only in the direction derived from the speedX and speedY values.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#radial\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n */\r\n this.radial = true;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityX = 0;\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityY = 0;\r\n\r\n /**\r\n * Whether accelerationX and accelerationY are non-zero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#acceleration\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.acceleration = false;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true);\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true);\r\n\r\n /**\r\n * The maximum horizontal velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true);\r\n\r\n /**\r\n * The maximum vertical velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true);\r\n\r\n /**\r\n * The initial horizontal speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n */\r\n this.speedX = new EmitterOp(config, 'speedX', 0, true);\r\n\r\n /**\r\n * The initial vertical speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n */\r\n this.speedY = new EmitterOp(config, 'speedY', 0, true);\r\n\r\n /**\r\n * Whether moveToX and moveToY are nonzero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveTo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.moveTo = false;\r\n\r\n /**\r\n * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToX = new EmitterOp(config, 'moveToX', 0, true);\r\n\r\n /**\r\n * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToY = new EmitterOp(config, 'moveToY', 0, true);\r\n\r\n /**\r\n * Whether particles will rebound when they meet the emitter bounds.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = new EmitterOp(config, 'bounce', 0, true);\r\n\r\n /**\r\n * The horizontal scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n */\r\n this.scaleX = new EmitterOp(config, 'scaleX', 1);\r\n\r\n /**\r\n * The vertical scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n */\r\n this.scaleY = new EmitterOp(config, 'scaleY', 1);\r\n\r\n /**\r\n * Color tint applied to emitted particles. Any alpha component (0xAA000000) is ignored.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#tint\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0xffffffff\r\n * @since 3.0.0\r\n */\r\n this.tint = new EmitterOp(config, 'tint', 0xffffffff);\r\n\r\n /**\r\n * The alpha (transparency) of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n */\r\n this.alpha = new EmitterOp(config, 'alpha', 1);\r\n\r\n /**\r\n * The lifespan of emitted particles, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1000\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n */\r\n this.lifespan = new EmitterOp(config, 'lifespan', 1000, true);\r\n\r\n /**\r\n * The angle of the initial velocity of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#angle\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default { min: 0, max: 360 }\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n */\r\n this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true);\r\n\r\n /**\r\n * The rotation of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotate = new EmitterOp(config, 'rotate', 0);\r\n\r\n /**\r\n * A function to call when a particle is emitted.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleEmitterCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallbackScope = null;\r\n\r\n /**\r\n * A function to call when a particle dies.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleDeathCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallbackScope = null;\r\n\r\n /**\r\n * Set to hard limit the amount of particle objects this emitter is allowed to create.\r\n * 0 means unlimited.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxParticles = 0;\r\n\r\n /**\r\n * How many particles are emitted each time particles are emitted (one explosion or one flow cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n */\r\n this.quantity = new EmitterOp(config, 'quantity', 1, true);\r\n\r\n /**\r\n * How many ms to wait after emission before the particles start updating.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#delay\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = new EmitterOp(config, 'delay', 0, true);\r\n\r\n /**\r\n * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms.\r\n * A value of 0 means there is one particle flow cycle for each logic update (the maximum flow frequency). This is the default setting.\r\n * For an exploding emitter, this value will be -1.\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} also puts the emitter in flow mode (frequency >= 0).\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} also puts the emitter in explode mode (frequency = -1).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frequency\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n */\r\n this.frequency = 0;\r\n\r\n /**\r\n * Controls if the emitter is currently emitting a particle flow (when frequency >= 0).\r\n * Already alive particles will continue to update until they expire.\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#on\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.on = true;\r\n\r\n /**\r\n * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive.\r\n * Set to false to send them to the back.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.particleBringToTop = true;\r\n\r\n /**\r\n * The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An object describing a shape to emit particles from.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n */\r\n this.emitZone = null;\r\n\r\n /**\r\n * An object describing a shape that deactivates particles when they interact with it.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.DeathZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n */\r\n this.deathZone = null;\r\n\r\n /**\r\n * A rectangular boundary constraining particle movement.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * Whether particles interact with the left edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = true;\r\n\r\n /**\r\n * Whether particles interact with the right edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideRight = true;\r\n\r\n /**\r\n * Whether particles interact with the top edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideTop = true;\r\n\r\n /**\r\n * Whether particles interact with the bottom edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideBottom\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideBottom = true;\r\n\r\n /**\r\n * Whether this emitter updates itself and its particles.\r\n *\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Set this to false to hide any active particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible\r\n */\r\n this.visible = true;\r\n\r\n /**\r\n * The blend mode of this emitter's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n /**\r\n * A Game Object whose position is used as the particle origin.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#follow\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n */\r\n this.follow = null;\r\n\r\n /**\r\n * The offset of the particle origin from the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * Whether the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#visible} state will track\r\n * the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target's visibility state.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#trackVisible\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.trackVisible = false;\r\n\r\n /**\r\n * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.currentFrame = 0;\r\n\r\n /**\r\n * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#randomFrame\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.randomFrame = true;\r\n\r\n /**\r\n * The number of consecutive particles that receive a single texture frame (per frame cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.frameQuantity = 1;\r\n\r\n /**\r\n * Inactive particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#dead\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dead = [];\r\n\r\n /**\r\n * Active particles\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alive\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.alive = [];\r\n\r\n /**\r\n * The time until the next flow cycle.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._counter = 0;\r\n\r\n /**\r\n * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._frameCounter = 0;\r\n\r\n if (config)\r\n {\r\n this.fromJSON(config);\r\n }\r\n },\r\n\r\n /**\r\n * Merges configuration settings into the emitter's current settings.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n // Only update properties from their current state if they exist in the given config\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key] = GetFastValue(config, key);\r\n }\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key].loadConfig(config);\r\n }\r\n }\r\n\r\n this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0);\r\n\r\n this.moveTo = (this.moveToX.propertyValue !== 0 || this.moveToY.propertyValue !== 0);\r\n\r\n // Special 'speed' override\r\n\r\n if (HasValue(config, 'speed'))\r\n {\r\n this.speedX.loadConfig(config, 'speed');\r\n this.speedY = null;\r\n }\r\n\r\n // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter\r\n if (HasAny(config, [ 'speedX', 'speedY' ]) || this.moveTo)\r\n {\r\n this.radial = false;\r\n }\r\n\r\n // Special 'scale' override\r\n\r\n if (HasValue(config, 'scale'))\r\n {\r\n this.scaleX.loadConfig(config, 'scale');\r\n this.scaleY = null;\r\n }\r\n\r\n if (HasValue(config, 'callbackScope'))\r\n {\r\n var callbackScope = GetFastValue(config, 'callbackScope', null);\r\n\r\n this.emitCallbackScope = callbackScope;\r\n this.deathCallbackScope = callbackScope;\r\n }\r\n\r\n if (HasValue(config, 'emitZone'))\r\n {\r\n this.setEmitZone(config.emitZone);\r\n }\r\n\r\n if (HasValue(config, 'deathZone'))\r\n {\r\n this.setDeathZone(config.deathZone);\r\n }\r\n\r\n if (HasValue(config, 'bounds'))\r\n {\r\n this.setBounds(config.bounds);\r\n }\r\n\r\n if (HasValue(config, 'followOffset'))\r\n {\r\n this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0));\r\n }\r\n\r\n if (HasValue(config, 'frame'))\r\n {\r\n this.setFrame(config.frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a description of this emitter suitable for JSON serialization.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {object} [output] - An object to copy output into.\r\n *\r\n * @return {object} - The output object.\r\n */\r\n toJSON: function (output)\r\n {\r\n if (output === undefined) { output = {}; }\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n output[key] = this[key];\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (this[key])\r\n {\r\n output[key] = this[key].toJSON();\r\n }\r\n }\r\n\r\n // special handlers\r\n if (!this.speedY)\r\n {\r\n delete output.speedX;\r\n output.speed = this.speedX.toJSON();\r\n }\r\n\r\n if (!this.scaleY)\r\n {\r\n delete output.scaleX;\r\n output.scale = this.scaleX.toJSON();\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Continuously moves the particle origin to follow a Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} target - The Game Object to follow.\r\n * @param {number} [offsetX=0] - Horizontal offset of the particle origin from the Game Object.\r\n * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object.\r\n * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n startFollow: function (target, offsetX, offsetY, trackVisible)\r\n {\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n if (trackVisible === undefined) { trackVisible = false; }\r\n\r\n this.follow = target;\r\n this.followOffset.set(offsetX, offsetY);\r\n this.trackVisible = trackVisible;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops following a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stopFollow: function ()\r\n {\r\n this.follow = null;\r\n this.followOffset.set(0, 0);\r\n this.trackVisible = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Chooses a texture frame from {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getFrame\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} The texture frame.\r\n */\r\n getFrame: function ()\r\n {\r\n if (this.frames.length === 1)\r\n {\r\n return this.defaultFrame;\r\n }\r\n else if (this.randomFrame)\r\n {\r\n return GetRandom(this.frames);\r\n }\r\n else\r\n {\r\n var frame = this.frames[this.currentFrame];\r\n\r\n this._frameCounter++;\r\n\r\n if (this._frameCounter === this.frameQuantity)\r\n {\r\n this._frameCounter = 0;\r\n this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength);\r\n }\r\n\r\n return frame;\r\n }\r\n },\r\n\r\n // frame: 0\r\n // frame: 'red'\r\n // frame: [ 0, 1, 2, 3 ]\r\n // frame: [ 'red', 'green', 'blue', 'pink', 'white' ]\r\n // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] }\r\n\r\n /**\r\n * Sets a pattern for assigning texture frames to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(array|string|integer|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object.\r\n * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`.\r\n * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrame: function (frames, pickRandom, quantity)\r\n {\r\n if (pickRandom === undefined) { pickRandom = true; }\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n this.randomFrame = pickRandom;\r\n this.frameQuantity = quantity;\r\n this.currentFrame = 0;\r\n this._frameCounter = 0;\r\n\r\n var t = typeof (frames);\r\n\r\n if (Array.isArray(frames) || t === 'string' || t === 'number')\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n else if (t === 'object')\r\n {\r\n var frameConfig = frames;\r\n\r\n frames = GetFastValue(frameConfig, 'frames', null);\r\n\r\n if (frames)\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n\r\n var isCycle = GetFastValue(frameConfig, 'cycle', false);\r\n\r\n this.randomFrame = (isCycle) ? false : true;\r\n\r\n this.frameQuantity = GetFastValue(frameConfig, 'quantity', quantity);\r\n }\r\n\r\n this._frameLength = this.frames.length;\r\n\r\n if (this._frameLength === 1)\r\n {\r\n this.frameQuantity = 1;\r\n this.randomFrame = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Radial mode (true) or point mode (true).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setRadial: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.radial = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of the emitter's particle origin.\r\n * New particles will be emitted here.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x.onChange(x);\r\n this.y.onChange(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or modifies a rectangular boundary constraining the particles.\r\n *\r\n * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle.\r\n * @param {number} y - The y-coordinate of the top edge of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setBounds: function (x, y, width, height)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var obj = x;\r\n\r\n x = obj.x;\r\n y = obj.y;\r\n width = (HasValue(obj, 'w')) ? obj.w : obj.width;\r\n height = (HasValue(obj, 'h')) ? obj.h : obj.height;\r\n }\r\n\r\n if (this.bounds)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.bounds = new Rectangle(x, y, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial horizontal speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedX: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial vertical speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedY: function (value)\r\n {\r\n if (this.speedY)\r\n {\r\n this.speedY.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial radial speed of emitted particles.\r\n * Changes the emitter to radial mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeed: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n this.speedY = null;\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleX: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleY: function (value)\r\n {\r\n this.scaleY.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScale: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n this.scaleY = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravityX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravityY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared.\r\n * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravityX = x;\r\n this.gravityY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the opacity of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitterAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the lifespan of newly emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setLifespan: function (value)\r\n {\r\n this.lifespan.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of particles released at each flow cycle or explosion.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setQuantity: function (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrequency: function (frequency, quantity)\r\n {\r\n this.frequency = frequency;\r\n\r\n this._counter = 0;\r\n\r\n if (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}.\r\n *\r\n * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method.\r\n *\r\n * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.emitZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle, or a Path or Curve\r\n // emitZone: { type: 'random', source: X }\r\n // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'random');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n switch (type)\r\n {\r\n case 'random':\r\n\r\n this.emitZone = new RandomZone(source);\r\n\r\n break;\r\n\r\n case 'edge':\r\n\r\n var quantity = GetFastValue(zoneConfig, 'quantity', 1);\r\n var stepRate = GetFastValue(zoneConfig, 'stepRate', 0);\r\n var yoyo = GetFastValue(zoneConfig, 'yoyo', false);\r\n var seamless = GetFastValue(zoneConfig, 'seamless', true);\r\n\r\n this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setDeathZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.deathZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle or Rect that supports a 'contains' function\r\n // deathZone: { type: 'onEnter', source: X }\r\n // deathZone: { type: 'onLeave', source: X }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'onEnter');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n if (source && typeof source.contains === 'function')\r\n {\r\n var killOnEnter = (type === 'onEnter') ? true : false;\r\n\r\n this.deathZone = new DeathZone(source, killOnEnter);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates inactive particles and adds them to this emitter's pool.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve\r\n * @since 3.0.0\r\n *\r\n * @param {integer} particleCount - The number of particles to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n reserve: function (particleCount)\r\n {\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n dead.push(new this.particleClass(this));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the number of active (in-use) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getAliveParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=true`.\r\n */\r\n getAliveParticleCount: function ()\r\n {\r\n return this.alive.length;\r\n },\r\n\r\n /**\r\n * Gets the number of inactive (available) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeadParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=false`.\r\n */\r\n getDeadParticleCount: function ()\r\n {\r\n return this.dead.length;\r\n },\r\n\r\n /**\r\n * Gets the total number of particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles, including both alive and dead.\r\n */\r\n getParticleCount: function ()\r\n {\r\n return this.getAliveParticleCount() + this.getDeadParticleCount();\r\n },\r\n\r\n /**\r\n * Whether this emitter is at its limit (if set).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#atLimit\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Emitter is at its limit, or `false` if no limit, or below the `maxParticles` level.\r\n */\r\n atLimit: function ()\r\n {\r\n return (this.maxParticles > 0 && this.getParticleCount() === this.maxParticles);\r\n },\r\n\r\n /**\r\n * Sets a function to call for each newly emitted particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} [context] - The calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleEmit: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.emitCallback = null;\r\n this.emitCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.emitCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.emitCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a function to call for each particle death.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleDeath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function.\r\n * @param {*} [context] - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleDeath: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.deathCallback = null;\r\n this.deathCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.deathCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.deathCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates every particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n killAll: function ()\r\n {\r\n var dead = this.dead;\r\n var alive = this.alive;\r\n\r\n while (alive.length > 0)\r\n {\r\n dead.push(alive.pop());\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each active particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachAlive: function (callback, context)\r\n {\r\n var alive = this.alive;\r\n var length = alive.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, alive[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each inactive particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachDead\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachDead: function (callback, context)\r\n {\r\n var dead = this.dead;\r\n var length = dead.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, dead[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on} the emitter and resets the flow counter.\r\n *\r\n * If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart).\r\n *\r\n * If this emitter is in explode mode (frequency = -1), nothing will happen.\r\n * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n start: function ()\r\n {\r\n this.on = true;\r\n\r\n this._counter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stop\r\n * @since 3.11.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stop: function ()\r\n {\r\n this.on = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Activates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n depthSort: function ()\r\n {\r\n StableSort.inplace(this.alive, this.depthSortCallback);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow.\r\n *\r\n * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#flow\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n flow: function (frequency, count)\r\n {\r\n if (count === undefined) { count = 1; }\r\n\r\n this.frequency = frequency;\r\n\r\n this.quantity.onChange(count);\r\n\r\n return this.start();\r\n },\r\n\r\n /**\r\n * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#explode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} count - The amount of Particles to emit.\r\n * @param {number} x - The x coordinate to emit the Particles from.\r\n * @param {number} y - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n explode: function (count, x, y)\r\n {\r\n this.frequency = -1;\r\n\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n *\r\n * @see Phaser.GameObjects.Particles.Particle#fire\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n if (this.atLimit())\r\n {\r\n return;\r\n }\r\n\r\n if (count === undefined)\r\n {\r\n count = this.quantity.onEmit();\r\n }\r\n\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < count; i++)\r\n {\r\n var particle = dead.pop();\r\n\r\n if (!particle)\r\n {\r\n particle = new this.particleClass(this);\r\n }\r\n\r\n particle.fire(x, y);\r\n\r\n if (this.particleBringToTop)\r\n {\r\n this.alive.push(particle);\r\n }\r\n else\r\n {\r\n this.alive.unshift(particle);\r\n }\r\n\r\n if (this.emitCallback)\r\n {\r\n this.emitCallback.call(this.emitCallbackScope, particle, this);\r\n }\r\n\r\n if (this.atLimit())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return particle;\r\n },\r\n\r\n /**\r\n * Updates this emitter and its particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var step = (delta / 1000);\r\n\r\n if (this.trackVisible)\r\n {\r\n this.visible = this.follow.visible;\r\n }\r\n\r\n // Any particle processors?\r\n var processors = this.manager.getProcessors();\r\n\r\n var particles = this.alive;\r\n var dead = this.dead;\r\n\r\n var i = 0;\r\n var rip = [];\r\n var length = particles.length;\r\n\r\n for (i = 0; i < length; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n // update returns `true` if the particle is now dead (lifeCurrent <= 0)\r\n if (particle.update(delta, step, processors))\r\n {\r\n rip.push({ index: i, particle: particle });\r\n }\r\n }\r\n\r\n // Move dead particles to the dead array\r\n length = rip.length;\r\n\r\n if (length > 0)\r\n {\r\n var deathCallback = this.deathCallback;\r\n var deathCallbackScope = this.deathCallbackScope;\r\n\r\n for (i = length - 1; i >= 0; i--)\r\n {\r\n var entry = rip[i];\r\n\r\n // Remove from particles array\r\n particles.splice(entry.index, 1);\r\n\r\n // Add to dead array\r\n dead.push(entry.particle);\r\n\r\n // Callback\r\n if (deathCallback)\r\n {\r\n deathCallback.call(deathCallbackScope, entry.particle);\r\n }\r\n\r\n entry.particle.resetPosition();\r\n }\r\n }\r\n\r\n if (!this.on)\r\n {\r\n return;\r\n }\r\n\r\n if (this.frequency === 0)\r\n {\r\n this.emitParticle();\r\n }\r\n else if (this.frequency > 0)\r\n {\r\n this._counter -= delta;\r\n\r\n if (this._counter <= 0)\r\n {\r\n this.emitParticle();\r\n\r\n // counter = frequency - remained from previous delta\r\n this._counter = (this.frequency - Math.abs(this._counter));\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the difference of two particles, for sorting them by depth.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback\r\n * @since 3.0.0\r\n *\r\n * @param {object} a - The first particle.\r\n * @param {object} b - The second particle.\r\n *\r\n * @return {integer} The difference of a and b's y coordinates.\r\n */\r\n depthSortCallback: function (a, b)\r\n {\r\n return a.y - b.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GravityWell = __webpack_require__(/*! ./GravityWell */ \"./node_modules/phaser/src/gameobjects/particles/GravityWell.js\");\r\nvar List = __webpack_require__(/*! ../../structs/List */ \"./node_modules/phaser/src/structs/List.js\");\r\nvar ParticleEmitter = __webpack_require__(/*! ./ParticleEmitter */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js\");\r\nvar Render = __webpack_require__(/*! ./ParticleManagerRender */ \"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}.\r\n *\r\n * @class ParticleEmitterManager\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs.\r\n * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n */\r\nvar ParticleEmitterManager = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n function ParticleEmitterManager (scene, texture, frame, emitters)\r\n {\r\n GameObject.call(this, scene, 'ParticleEmitterManager');\r\n\r\n /**\r\n * The blend mode applied to all emitters and particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode\r\n * @type {integer}\r\n * @default -1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement.\r\n * Values larger than 1 are faster than normal.\r\n * This is multiplied with any timeScale set on each individual emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The texture used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The texture frame used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Names of this Emitter Manager's texture frames.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames\r\n * @type {string[]}\r\n * @since 3.0.0\r\n */\r\n this.frameNames = [];\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n if (frame !== null && (typeof frame === 'object' || Array.isArray(frame)))\r\n {\r\n emitters = frame;\r\n frame = null;\r\n }\r\n\r\n this.setTexture(texture, frame);\r\n\r\n this.initPipeline();\r\n\r\n /**\r\n * A list of Emitters being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.emitters = new List(this);\r\n\r\n /**\r\n * A list of Gravity Wells being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.wells = new List(this);\r\n\r\n if (emitters)\r\n {\r\n // An array of emitter configs?\r\n if (!Array.isArray(emitters))\r\n {\r\n emitters = [ emitters ];\r\n }\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n this.createEmitter(emitters[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Emitter Manager will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Emitter Manager will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex);\r\n\r\n var names = [];\r\n\r\n frames.forEach(function (sourceFrame)\r\n {\r\n names.push(sourceFrame.name);\r\n });\r\n\r\n this.frameNames = names;\r\n\r\n this.defaultFrame = this.frame;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns texture frames to an emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setEmitterFrames: function (frames, emitter)\r\n {\r\n if (!Array.isArray(frames))\r\n {\r\n frames = [ frames ];\r\n }\r\n\r\n var out = emitter.frames;\r\n\r\n out.length = 0;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i];\r\n\r\n if (this.frameNames.indexOf(frame) !== -1)\r\n {\r\n out.push(this.texture.get(frame));\r\n }\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n emitter.defaultFrame = out[0];\r\n }\r\n else\r\n {\r\n emitter.defaultFrame = this.defaultFrame;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an existing Particle Emitter to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager.\r\n */\r\n addEmitter: function (emitter)\r\n {\r\n return this.emitters.add(emitter);\r\n },\r\n\r\n /**\r\n * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created.\r\n */\r\n createEmitter: function (config)\r\n {\r\n return this.addEmitter(new ParticleEmitter(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Gravity Well object to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager.\r\n */\r\n addGravityWell: function (well)\r\n {\r\n return this.wells.add(well);\r\n },\r\n\r\n /**\r\n * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created.\r\n */\r\n createGravityWell: function (config)\r\n {\r\n return this.addGravityWell(new GravityWell(config));\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.emitParticle(count, x, y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Pauses this Emitter Manager.\r\n *\r\n * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control.\r\n *\r\n * The particles will still render, but they will not have any of their logic updated.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes this Emitter Manager, should it have been previously paused.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all active particle processors (gravity wells).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells.\r\n */\r\n getProcessors: function ()\r\n {\r\n return this.wells.getAll('active', true);\r\n },\r\n\r\n /**\r\n * Updates all active emitters.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.preUpdate(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setScrollFactor: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode\r\n * @private\r\n * @since 3.15.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitterManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = renderer._tempMatrix2;\r\n var particleMatrix = renderer._tempMatrix3;\r\n var managerMatrix = renderer._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n ctx.save();\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode];\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n var cd = frame.canvasData;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n ctx.globalAlpha = alpha;\r\n \r\n ctx.save();\r\n\r\n calcMatrix.copyToContext(ctx);\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n\r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = ParticleManagerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#particles\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('particles', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var emitters = GetFastValue(config, 'emitters', null);\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var add = GetFastValue(config, 'add', false);\r\n\r\n if (add)\r\n {\r\n this.displayList.add(manager);\r\n }\r\n\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#particles\r\n * @since 3.0.0\r\n *\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer|object)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('particles', function (key, frame, emitters)\r\n{\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n this.displayList.add(manager);\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ParticleManagerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ParticleManagerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js?')},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = pipeline._tempMatrix2;\r\n var particleMatrix = pipeline._tempMatrix3;\r\n var managerMatrix = pipeline._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n var roundPixels = camera.roundPixels;\r\n var texture = emitterManager.defaultFrame.glTexture;\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n if (renderer.setBlendMode(emitter.blendMode))\r\n {\r\n // Rebind the texture if we\'ve flushed\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.preRenderWebGL(renderer, emitter, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n \r\n var tintEffect = 0;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n \r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n \r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n \r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n \r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n \r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n \r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var tint = getTint(particle.tint, alpha);\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.postRenderWebGL(renderer, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ParticleManagerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GravityWell: __webpack_require__(/*! ./GravityWell */ "./node_modules/phaser/src/gameobjects/particles/GravityWell.js"),\r\n Particle: __webpack_require__(/*! ./Particle */ "./node_modules/phaser/src/gameobjects/particles/Particle.js"),\r\n ParticleEmitter: __webpack_require__(/*! ./ParticleEmitter */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js"),\r\n ParticleEmitterManager: __webpack_require__(/*! ./ParticleEmitterManager */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js"),\r\n Zones: __webpack_require__(/*! ./zones */ "./node_modules/phaser/src/gameobjects/particles/zones/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/index.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Death Zone.\r\n *\r\n * A Death Zone is a special type of zone that will kill a Particle as soon as it either enters, or leaves, the zone.\r\n *\r\n * The zone consists of a `source` which could be a Geometric shape, such as a Rectangle or Ellipse, or your own\r\n * object as long as it includes a `contains` method for which the Particles can be tested against.\r\n *\r\n * @class DeathZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.DeathZoneSource} source - An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * @param {boolean} killOnEnter - Should the Particle be killed when it enters the zone? `true` or leaves it? `false`\r\n */\r\nvar DeathZone = new Class({\r\n\r\n initialize:\r\n\r\n function DeathZone (source, killOnEnter)\r\n {\r\n /**\r\n * An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * This could be a Geometry shape, such as `Phaser.Geom.Circle`, or your own custom object.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.DeathZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Set to `true` if the Particle should be killed if it enters this zone.\r\n * Set to `false` to kill the Particle if it leaves this zone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#killOnEnter\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.killOnEnter = killOnEnter;\r\n },\r\n\r\n /**\r\n * Checks if the given Particle will be killed or not by this zone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone.\r\n *\r\n * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`.\r\n */\r\n willKill: function (particle)\r\n {\r\n var withinZone = this.source.contains(particle.x, particle.y);\r\n\r\n return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DeathZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles on a shape's edges.\r\n *\r\n * @class EdgeZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n * @param {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start.\r\n * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other.\r\n */\r\nvar EdgeZone = new Class({\r\n\r\n initialize:\r\n\r\n function EdgeZone (source, quantity, stepRate, yoyo, seamless)\r\n {\r\n if (yoyo === undefined) { yoyo = false; }\r\n if (seamless === undefined) { seamless = true; }\r\n\r\n /**\r\n * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.EdgeZoneSource|Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The points placed on the source edge.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n /**\r\n * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#quantity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.quantity = quantity;\r\n\r\n /**\r\n * The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#stepRate\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.stepRate = stepRate;\r\n\r\n /**\r\n * Whether particles are placed from start to end and then end to start.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#yoyo\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.yoyo = yoyo;\r\n\r\n /**\r\n * The counter used for iterating the EdgeZone's points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#counter\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.counter = -1;\r\n\r\n /**\r\n * Whether one endpoint will be removed if it's identical to the other.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#seamless\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.seamless = seamless;\r\n\r\n /**\r\n * An internal count of the points belonging to this EdgeZone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_length\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._length = 0;\r\n\r\n /**\r\n * An internal value used to keep track of the current iteration direction for the EdgeZone's points.\r\n *\r\n * 0 = forwards, 1 = backwards\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_direction\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._direction = 0;\r\n\r\n this.updateSource();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's\r\n * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.\r\n *\r\n * Also updates internal properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n updateSource: function ()\r\n {\r\n this.points = this.source.getPoints(this.quantity, this.stepRate);\r\n\r\n // Remove ends?\r\n if (this.seamless)\r\n {\r\n var a = this.points[0];\r\n var b = this.points[this.points.length - 1];\r\n\r\n if (a.x === b.x && a.y === b.y)\r\n {\r\n this.points.pop();\r\n }\r\n }\r\n\r\n var oldLength = this._length;\r\n\r\n this._length = this.points.length;\r\n\r\n // Adjust counter if we now have less points than before\r\n if (this._length < oldLength && this.counter > this._length)\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Change the source of the EdgeZone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#changeSource\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n changeSource: function (source)\r\n {\r\n this.source = source;\r\n\r\n return this.updateSource();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n if (this._direction === 0)\r\n {\r\n this.counter++;\r\n\r\n if (this.counter >= this._length)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 1;\r\n this.counter = this._length - 1;\r\n }\r\n else\r\n {\r\n this.counter = 0;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.counter--;\r\n\r\n if (this.counter === -1)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 0;\r\n this.counter = 0;\r\n }\r\n else\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n }\r\n }\r\n\r\n var point = this.points[this.counter];\r\n\r\n if (point)\r\n {\r\n particle.x = point.x;\r\n particle.y = point.y;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = EdgeZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js?")},"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles randomly within a shape\'s area.\r\n *\r\n * @class RandomZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.RandomZoneSource} source - An object instance with a `getRandomPoint(point)` method.\r\n */\r\nvar RandomZone = new Class({\r\n\r\n initialize:\r\n\r\n function RandomZone (source)\r\n {\r\n /**\r\n * An object instance with a `getRandomPoint(point)` method.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Internal calculation vector.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#_tempVec\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec = new Vector2();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.RandomZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n var vec = this._tempVec;\r\n\r\n this.source.getRandomPoint(vec);\r\n\r\n particle.x = vec.x;\r\n particle.y = vec.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles.Zones\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DeathZone: __webpack_require__(/*! ./DeathZone */ "./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js"),\r\n EdgeZone: __webpack_require__(/*! ./EdgeZone */ "./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js"),\r\n RandomZone: __webpack_require__(/*! ./RandomZone */ "./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/index.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * A PathFollower Game Object.\r\n *\r\n * A PathFollower is a Sprite Game Object with some extra helpers to allow it to follow a Path automatically.\r\n *\r\n * Anything you can do with a standard Sprite can be done with this PathFollower, such as animate it, tint it,\r\n * scale it and so on.\r\n *\r\n * PathFollowers are bound to a single Path at any one time and can traverse the length of the Path, from start\r\n * to finish, forwards or backwards, or from any given point on the Path to its end. They can optionally rotate\r\n * to face the direction of the path, be offset from the path coordinates or rotate independently of the Path.\r\n *\r\n * @class PathFollower\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @extends Phaser.GameObjects.Components.PathFollower\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this PathFollower belongs.\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar PathFollower = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.PathFollower\r\n ],\r\n\r\n initialize:\r\n\r\n function PathFollower (scene, path, x, y, texture, frame)\r\n {\r\n Sprite.call(this, scene, x, y, texture, frame);\r\n\r\n this.path = path;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.PathFollower#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n this.pathUpdate(time);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar PathFollower = __webpack_require__(/*! ./PathFollower */ \"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js\");\r\n\r\n/**\r\n * Creates a new PathFollower Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the PathFollower Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#follower\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is connected to.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('follower', function (path, x, y, key, frame)\r\n{\r\n var sprite = new PathFollower(this.scene, path, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js?")},"./node_modules/phaser/src/gameobjects/quad/Quad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Mesh = __webpack_require__(/*! ../mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Quad Game Object.\r\n *\r\n * A Quad is a Mesh Game Object pre-configured with two triangles arranged into a rectangle, with a single\r\n * texture spread across them.\r\n *\r\n * You can manipulate the corner points of the quad via the getters and setters such as `topLeftX`, and also\r\n * change their alpha and color values. The quad itself can be moved by adjusting the `x` and `y` properties.\r\n *\r\n * @class Quad\r\n * @extends Phaser.GameObjects.Mesh\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Quad belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Quad = new Class({\r\n\r\n Extends: Mesh,\r\n\r\n initialize:\r\n\r\n function Quad (scene, x, y, texture, frame)\r\n {\r\n // 0----3\r\n // |\\ B|\r\n // | \\ |\r\n // | \\ |\r\n // | A \\|\r\n // | \\\r\n // 1----2\r\n\r\n var vertices = [\r\n 0, 0, // tl\r\n 0, 0, // bl\r\n 0, 0, // br\r\n 0, 0, // tl\r\n 0, 0, // br\r\n 0, 0 // tr\r\n ];\r\n\r\n var uv = [\r\n 0, 0, // tl\r\n 0, 1, // bl\r\n 1, 1, // br\r\n 0, 0, // tl\r\n 1, 1, // br\r\n 1, 0 // tr\r\n ];\r\n\r\n var colors = [\r\n 0xffffff, // tl\r\n 0xffffff, // bl\r\n 0xffffff, // br\r\n 0xffffff, // tl\r\n 0xffffff, // br\r\n 0xffffff // tr\r\n ];\r\n\r\n var alphas = [\r\n 1, // tl\r\n 1, // bl\r\n 1, // br\r\n 1, // tl\r\n 1, // br\r\n 1 // tr\r\n ];\r\n\r\n Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame);\r\n\r\n this.resetPosition();\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Quad#setFrame\r\n * @since 3.11.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~8;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 8;\r\n }\r\n\r\n frame = this.frame;\r\n\r\n // TL\r\n this.uv[0] = frame.u0;\r\n this.uv[1] = frame.v0;\r\n\r\n // BL\r\n this.uv[2] = frame.u0;\r\n this.uv[3] = frame.v1;\r\n\r\n // BR\r\n this.uv[4] = frame.u1;\r\n this.uv[5] = frame.v1;\r\n\r\n // TL\r\n this.uv[6] = frame.u0;\r\n this.uv[7] = frame.v0;\r\n\r\n // BR\r\n this.uv[8] = frame.u1;\r\n this.uv[9] = frame.v1;\r\n\r\n // TR\r\n this.uv[10] = frame.u1;\r\n this.uv[11] = frame.v0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The top-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[0] = value - this.x;\r\n this.vertices[6] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[1] = value - this.y;\r\n this.vertices[7] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[10];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[10] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[11];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[11] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[2] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[3] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[4] = value - this.x;\r\n this.vertices[8] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[5] = value - this.y;\r\n this.vertices[9] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[0] = value;\r\n this.alphas[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[2] = value;\r\n this.alphas[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[0] = value;\r\n this.colors[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[2] = value;\r\n this.colors[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the top-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopLeft: function (x, y)\r\n {\r\n this.topLeftX = x;\r\n this.topLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the top-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopRight: function (x, y)\r\n {\r\n this.topRightX = x;\r\n this.topRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomLeft: function (x, y)\r\n {\r\n this.bottomLeftX = x;\r\n this.bottomLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomRight: function (x, y)\r\n {\r\n this.bottomRightX = x;\r\n this.bottomRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the positions of the four corner vertices of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetPosition\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetPosition: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var halfWidth = Math.floor(this.width / 2);\r\n var halfHeight = Math.floor(this.height / 2);\r\n\r\n this.setTopLeft(x - halfWidth, y - halfHeight);\r\n this.setTopRight(x + halfWidth, y - halfHeight);\r\n this.setBottomLeft(x - halfWidth, y + halfHeight);\r\n this.setBottomRight(x + halfWidth, y + halfHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the alpha values used by this Quad back to 1.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetAlpha: function ()\r\n {\r\n var alphas = this.alphas;\r\n\r\n alphas[0] = 1;\r\n alphas[1] = 1;\r\n alphas[2] = 1;\r\n alphas[3] = 1;\r\n alphas[4] = 1;\r\n alphas[5] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the color values used by this Quad back to 0xffffff.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetColors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetColors: function ()\r\n {\r\n var colors = this.colors;\r\n\r\n colors[0] = 0xffffff;\r\n colors[1] = 0xffffff;\r\n colors[2] = 0xffffff;\r\n colors[3] = 0xffffff;\r\n colors[4] = 0xffffff;\r\n colors[5] = 0xffffff;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, alpha and color values used by this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n reset: function ()\r\n {\r\n this.resetPosition();\r\n\r\n this.resetAlpha();\r\n\r\n return this.resetColors();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/Quad.js?')},"./node_modules/phaser/src/gameobjects/quad/QuadCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#quad\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('quad', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var quad = new Quad(this.scene, x, y, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, quad, config);\r\n\r\n return quad;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadCreator.js?")},"./node_modules/phaser/src/gameobjects/quad/QuadFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#quad\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * \r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('quad', function (x, y, key, frame)\r\n {\r\n return this.displayList.add(new Quad(this.scene, x, y, key, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Camera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Render = __webpack_require__(/*! ./RenderTextureRender */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar UUID = __webpack_require__(/*! ../../utils/string/UUID */ \"./node_modules/phaser/src/utils/string/UUID.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Render Texture.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n * \r\n * Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means\r\n * that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this\r\n * is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that\r\n * to the Render Texture.\r\n *\r\n * @class RenderTexture\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n */\r\nvar RenderTexture = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function RenderTexture (scene, x, y, width, height, key, frame)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 32; }\r\n if (height === undefined) { height = 32; }\r\n\r\n GameObject.call(this, scene, 'RenderTexture');\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that the Game instance is using.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.2.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.12.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * The tint of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalTint\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.2.0\r\n */\r\n this.globalTint = 0xffffff;\r\n\r\n /**\r\n * The alpha of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.2.0\r\n */\r\n this.globalAlpha = 1;\r\n\r\n /**\r\n * The HTML Canvas Element that the Render Texture is drawing to when using the Canvas Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.2.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Render Texture is drawing to.\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.2.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#dirty\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.12.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The Frame corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.12.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Internal saved texture flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_saved\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._saved = false;\r\n\r\n if (key === undefined)\r\n {\r\n this.canvas = CanvasPool.create2D(this, width, height);\r\n\r\n // Create a new Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(UUID(), this.canvas);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get();\r\n }\r\n else\r\n {\r\n this.texture = scene.sys.textures.get(key);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get(frame);\r\n\r\n this.canvas = this.frame.source.image;\r\n this._saved = true;\r\n\r\n this.dirty = true;\r\n\r\n this.width = this.frame.cutWidth;\r\n this.height = this.frame.cutHeight;\r\n }\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.2.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * Internal erase mode flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_eraseMode\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._eraseMode = false;\r\n\r\n /**\r\n * An internal Camera that can be used to move around the Render Texture.\r\n * Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what\r\n * is drawn to the Render Texture. You can scroll, zoom and rotate this Camera.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#camera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.camera = new Camera(0, 0, width, height);\r\n\r\n /**\r\n * A reference to the WebGL Rendering Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture that is being rendered to in a WebGL Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#glTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer.type === CONST.WEBGL)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.gl = gl;\r\n this.glTexture = this.frame.source.glTexture;\r\n this.drawGameObject = this.batchGameObjectWebGL;\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n }\r\n else if (renderer.type === CONST.CANVAS)\r\n {\r\n this.drawGameObject = this.batchGameObjectCanvas;\r\n }\r\n\r\n this.camera.setScene(scene);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key === undefined)\r\n {\r\n this.setSize(width, height);\r\n }\r\n\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.RenderTexture#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n return this.resize(width, height);\r\n },\r\n\r\n /**\r\n * Resizes the Render Texture to the new dimensions given.\r\n * \r\n * If Render Texture was created from specific frame, only the size of the frame will be changed. The size of the source\r\n * texture will not change.\r\n *\r\n * If Render Texture was not created from specific frame, the following will happen:\r\n * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.\r\n * In Canvas it will resize the underlying canvas element.\r\n * Both approaches will erase everything currently drawn to the Render Texture.\r\n *\r\n * If the dimensions given are the same as those already being used, calling this method will do nothing.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#resize\r\n * @since 3.10.0\r\n *\r\n * @param {number} width - The new width of the Render Texture.\r\n * @param {number} [height=width] - The new height of the Render Texture. If not specified, will be set the same as the `width`.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n resize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n if (this.frame.name === '__BASE')\r\n {\r\n // Resize the texture\r\n\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n if (this.gl)\r\n {\r\n var gl = this.gl;\r\n\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n var glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);\r\n\r\n this.framebuffer = this.renderer.createFramebuffer(width, height, glTexture, false);\r\n\r\n this.frame.source.isRenderTexture = true;\r\n\r\n this.frame.glTexture = glTexture;\r\n this.glTexture = glTexture;\r\n }\r\n\r\n this.frame.source.width = width;\r\n this.frame.source.height = height;\r\n\r\n this.camera.setSize(width, height);\r\n\r\n this.frame.setSize(width, height);\r\n\r\n this.width = width;\r\n this.height = height;\r\n }\r\n }\r\n else\r\n {\r\n // Resize the frame\r\n\r\n var baseFrame = this.texture.getSourceImage();\r\n\r\n if (this.frame.cutX + width > baseFrame.width)\r\n {\r\n width = baseFrame.width - this.frame.cutX;\r\n }\r\n\r\n if (this.frame.cutY + height > baseFrame.height)\r\n {\r\n height = baseFrame.height - this.frame.cutY;\r\n }\r\n\r\n this.frame.setSize(width, height, this.frame.cutX, this.frame.cutY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the tint to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalTint\r\n * @since 3.2.0\r\n *\r\n * @param {integer} tint - The tint value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalTint: function (tint)\r\n {\r\n this.globalTint = tint;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the alpha to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalAlpha\r\n * @since 3.2.0\r\n *\r\n * @param {number} alpha - The alpha value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalAlpha: function (alpha)\r\n {\r\n this.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stores a copy of this Render Texture in the Texture Manager using the given key.\r\n * \r\n * After doing this, any texture based Game Object, such as a Sprite, can use the contents of this\r\n * Render Texture by using the texture key:\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 128, 128);\r\n * \r\n * // Draw something to the Render Texture\r\n * \r\n * rt.saveTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Updating the contents of this Render Texture will automatically update _any_ Game Object\r\n * that is using it as a texture. Calling `saveTexture` again will not save another copy\r\n * of the same texture, it will just rename the key of the existing copy.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#saveTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique key to store the texture as within the global Texture Manager.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was saved.\r\n */\r\n saveTexture: function (key)\r\n {\r\n this.textureManager.renameTexture(this.texture.key, key);\r\n \r\n this._saved = true;\r\n\r\n return this.texture;\r\n },\r\n\r\n /**\r\n * Fills the Render Texture with the given color.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#fill\r\n * @since 3.2.0\r\n *\r\n * @param {number} rgb - The color to fill the Render Texture with.\r\n * @param {number} [alpha=1] - The alpha value used by the fill.\r\n * @param {number} [x=0] - The left coordinate of the fill rectangle.\r\n * @param {number} [y=0] - The top coordinate of the fill rectangle.\r\n * @param {number} [width=this.frame.cutWidth] - The width of the fill rectangle.\r\n * @param {number} [height=this.frame.cutHeight] - The height of the fill rectangle.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n fill: function (rgb, alpha, x, y, width, height)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.frame.cutWidth; }\r\n if (height === undefined) { height = this.frame.cutHeight; }\r\n\r\n var r = ((rgb >> 16) | 0) & 0xff;\r\n var g = ((rgb >> 8) | 0) & 0xff;\r\n var b = (rgb | 0) & 0xff;\r\n\r\n var gl = this.gl;\r\n var frame = this.frame;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n \r\n var bounds = this.getBounds();\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n this.pipeline.drawFillRect(\r\n bounds.x, bounds.y, bounds.right, bounds.bottom,\r\n Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1),\r\n alpha\r\n );\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(0, 0, frame.source.width, frame.source.height);\r\n }\r\n \r\n this.renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')';\r\n this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#clear\r\n * @since 3.2.0\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n var gl = this.gl;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n \r\n if (this.frame.cutWidth !== this.canvas.width || this.frame.cutHeight !== this.canvas.height)\r\n {\r\n gl.scissor(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n }\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n\r\n ctx.save();\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.clearRect(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n ctx.restore();\r\n }\r\n\r\n this.dirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE.\r\n * This has the effect of erasing any filled pixels in the objects from this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot erase a Render Texture from itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#erase\r\n * @since 3.16.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n erase: function (entries, x, y)\r\n {\r\n this._eraseMode = true;\r\n\r\n var blendMode = this.renderer.currentBlendMode;\r\n\r\n this.renderer.setBlendMode(BlendModes.ERASE);\r\n\r\n this.draw(entries, x, y, 1, 16777215);\r\n\r\n this.renderer.setBlendMode(blendMode);\r\n\r\n this._eraseMode = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot draw a Render Texture to itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame. If you need to specify\r\n * exactly which frame to draw then use the method `drawFrame` instead.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * The `alpha` and `tint` values are only used by Texture Frames.\r\n * Game Objects use their own alpha and tint values when being drawn.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#draw\r\n * @since 3.2.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value.\r\n * @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n draw: function (entries, x, y, alpha, tint)\r\n {\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n\r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n\r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n\r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n pipeline.flush();\r\n\r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n\r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.renderer.setContext(this.context);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n this.renderer.setContext();\r\n }\r\n\r\n this.dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the Texture Frame to the Render Texture at the given position.\r\n * \r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 800, 600);\r\n * rt.drawFrame(key, frame);\r\n * ```\r\n * \r\n * You can optionally provide a position, alpha and tint value to apply to the frame\r\n * before it is drawn.\r\n * \r\n * Calling this method will cause a batch flush, so if you've got a stack of things to draw\r\n * in a tight loop, try using the `draw` method instead.\r\n * \r\n * If you need to draw a Sprite to this Render Texture, use the `draw` method instead.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#drawFrame\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to draw the frame at.\r\n * @param {number} [y=0] - The y position to draw the frame at.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n drawFrame: function (key, frame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n var gl = this.gl;\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n \r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n \r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n \r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n \r\n pipeline.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, tint, alpha, this.camera.matrix, null);\r\n \r\n pipeline.flush();\r\n \r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n \r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, alpha, tint);\r\n }\r\n\r\n this.dirty = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchList\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x] - The x position to offset the Game Object by.\r\n * @param {number} [y] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchList: function (children, x, y, alpha, tint)\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (!entry || entry === this)\r\n {\r\n continue;\r\n }\r\n\r\n if (entry.renderWebGL || entry.renderCanvas)\r\n {\r\n // Game Objects\r\n this.drawGameObject(entry, x, y);\r\n }\r\n else if (entry.isParent || entry.list)\r\n {\r\n // Groups / Display Lists\r\n this.batchGroup(entry.getChildren(), x, y);\r\n }\r\n else if (typeof entry === 'string')\r\n {\r\n // Texture key\r\n this.batchTextureFrameKey(entry, null, x, y, alpha, tint);\r\n }\r\n else if (entry instanceof Frame)\r\n {\r\n // Texture Frame instance\r\n this.batchTextureFrame(entry, x, y, alpha, tint);\r\n }\r\n else if (Array.isArray(entry))\r\n {\r\n // Another Array\r\n this.batchList(entry, x, y, alpha, tint);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing a Phaser Group contents.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGroup\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n */\r\n batchGroup: function (children, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.willRender())\r\n {\r\n var tx = entry.x + x;\r\n var ty = entry.y + y;\r\n\r\n this.drawGameObject(entry, tx, ty);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectWebGL\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectWebGL: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (!this._eraseMode)\r\n {\r\n this.renderer.setBlendMode(gameObject.blendMode);\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n \r\n gameObject.renderWebGL(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectCanvas\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectCanvas: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (this._eraseMode)\r\n {\r\n var blendMode = gameObject.blendMode;\r\n\r\n gameObject.blendMode = BlendModes.ERASE;\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n\r\n gameObject.renderCanvas(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n\r\n if (this._eraseMode)\r\n {\r\n gameObject.blendMode = blendMode;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrameKey\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchTextureFrameKey: function (key, frame, x, y, alpha, tint)\r\n {\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.batchTextureFrame(textureFrame, x, y, alpha, tint);\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of a Texture Frame to this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} textureFrame - The Texture Frame to draw.\r\n * @param {number} [x=0] - The x position to draw the Frame at.\r\n * @param {number} [y=0] - The y position to draw the Frame at.\r\n * @param {number} [tint] - A tint color to be applied to the frame drawn to the Render Texture.\r\n */\r\n batchTextureFrame: function (textureFrame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n if (this.gl)\r\n {\r\n this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n var cd = textureFrame.canvasData;\r\n var source = textureFrame.source.image;\r\n \r\n var matrix = this.camera.matrix;\r\n \r\n ctx.globalAlpha = this.globalAlpha;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n ctx.drawImage(source, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotArea\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the whole of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshot\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given pixel from this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`.\r\n * \r\n * Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory, than the other snapshot methods.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotPixel\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, true, x, y);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, true, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (!this._saved)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.gl)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n this.texture.destroy();\r\n this.camera.destroy();\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n this.framebuffer = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RenderTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderCanvas\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = RenderTextureCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('renderTexture', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 32);\r\n var height = GetAdvancedValue(config, 'height', 32);\r\n var key = GetAdvancedValue(config, 'key', undefined);\r\n var frame = GetAdvancedValue(config, 'frame', undefined);\r\n\r\n var renderTexture = new RenderTexture(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, renderTexture, config);\r\n\r\n return renderTexture;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n * \r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('renderTexture', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new RenderTexture(this.scene, x, y, width, height, key, frame));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RenderTextureWebGLRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RenderTextureCanvasRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js?')},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderWebGL\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width, height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, !src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don\'t try and use it\r\n renderer.setBlankTexture(true);\r\n};\r\n\r\nmodule.exports = RenderTextureWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shader/Shader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar SetValue = __webpack_require__(/*! ../../utils/object/SetValue */ \"./node_modules/phaser/src/utils/object/SetValue.js\");\r\nvar ShaderRender = __webpack_require__(/*! ./ShaderRender */ \"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Shader Game Object.\r\n * \r\n * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it\r\n * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders\r\n * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other\r\n * Game Object. They can also be made interactive and used for input events.\r\n * \r\n * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can\r\n * be created dynamically at runtime, or loaded in via the GLSL File Loader:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('fire', 'shaders/fire.glsl.js');\r\n * }\r\n * \r\n * function create ()\r\n * {\r\n * this.add.shader('fire', 400, 300, 512, 512);\r\n * }\r\n * ```\r\n * \r\n * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically.\r\n * \r\n * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should\r\n * be handled via exposed uniforms in the shader code itself.\r\n * \r\n * By default a Shader will be created with a standard set of uniforms. These were added to match those\r\n * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need,\r\n * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms\r\n * in the Base Shader.\r\n * \r\n * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the\r\n * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored.\r\n * \r\n * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should\r\n * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using\r\n * a custom pipeline instead. However, for background or special masking effects, they are extremely effective.\r\n * \r\n * @class Shader\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n */\r\nvar Shader = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n ShaderRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Shader (scene, key, x, y, width, height, textures)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n GameObject.call(this, scene, 'Shader');\r\n\r\n /**\r\n * This Game Object cannot have a blend mode, so skip all checks.\r\n * \r\n * @name Phaser.GameObjects.Shader#blendMode\r\n * @type {integer}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The underlying shader object being used.\r\n * Empty by default and set during a call to the `setShader` method.\r\n * \r\n * @name Phaser.GameObjects.Shader#shader\r\n * @type {Phaser.Display.BaseShader}\r\n * @since 3.17.0\r\n */\r\n this.shader;\r\n\r\n var renderer = scene.sys.renderer;\r\n\r\n /**\r\n * A reference to the current renderer.\r\n * Shaders only work with the WebGL Renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The WebGL context belonging to the renderer.\r\n *\r\n * @name Phaser.GameObjects.Shader#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.17.0\r\n */\r\n this.gl = renderer.gl;\r\n\r\n /**\r\n * Raw byte buffer of vertices this Shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexData = new ArrayBuffer(6 * (Float32Array.BYTES_PER_ELEMENT * 2));\r\n\r\n /**\r\n * The WebGL vertex buffer object this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexBuffer = renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The WebGL shader program this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#program\r\n * @type {WebGLProgram}\r\n * @since 3.17.0\r\n */\r\n this.program = null;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU.\r\n *\r\n * @name Phaser.GameObjects.Shader#bytes\r\n * @type {Uint8Array}\r\n * @since 3.17.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * Float32 view of the array buffer containing the shaders vertices.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.17.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * The view matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#viewMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.viewMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The projection matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#projectionMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.projectionMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when\r\n * creating this shader game object. The uniforms are updated automatically during the render step.\r\n * \r\n * The defaults are:\r\n * \r\n * `resolution` (2f) - Set to the size of this shader.\r\n * `time` (1f) - The elapsed game time, in seconds.\r\n * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame.\r\n * `date` (4fv) - A vec4 containing the year, month, day and time in seconds.\r\n * `sampleRate` (1f) - Sound sample rate. 44100 by default.\r\n * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default.\r\n * \r\n * @name Phaser.GameObjects.Shader#uniforms\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = {};\r\n\r\n /**\r\n * The pointer bound to this shader, if any.\r\n * Set via the chainable `setPointer` method, or by modifying this property directly.\r\n * \r\n * @name Phaser.GameObjects.Shader#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.17.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * The cached width of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererWidth = renderer.width;\r\n\r\n /**\r\n * The cached height of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererHeight\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererHeight = renderer.height;\r\n\r\n /**\r\n * Internal texture count tracker.\r\n * \r\n * @name Phaser.GameObjects.Shader#_textureCount\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._textureCount = 0;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Shader is drawing to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.19.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture this Shader is rendering to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * A flag that indicates if this Shader has been set to render to a texture instead of the display list.\r\n * \r\n * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`.\r\n * \r\n * A Shader that is rendering to a texture _does not_ appear on the display list.\r\n *\r\n * @name Phaser.GameObjects.Shader#renderToTexture\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader.\r\n * \r\n * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`.\r\n *\r\n * @name Phaser.GameObjects.Shader#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.19.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * Internal saved texture key.\r\n *\r\n * @name Phaser.GameObjects.Shader#_savedKey\r\n * @type {boolean}\r\n * @private\r\n * @since 3.19.0\r\n */\r\n this._savedKey = '';\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setOrigin(0.5, 0.5);\r\n this.setShader(key, textures);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.Shader#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n if (this.renderToTexture)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n }\r\n },\r\n\r\n /**\r\n * Changes this Shader so instead of rendering to the display list it renders to a\r\n * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output\r\n * of this shader as an input for another shader, by mapping a sampler2D uniform\r\n * to it.\r\n * \r\n * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties\r\n * are populated.\r\n * \r\n * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture\r\n * from this Shader and save it into the Texture Manager, allowing you to then use it for\r\n * any texture-based Game Object, such as a Sprite or Image:\r\n * \r\n * ```javascript\r\n * var shader = this.add.shader('myShader', x, y, width, height);\r\n * \r\n * shader.setRenderToTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Note that it stores an active reference to this Shader. That means as this shader updates,\r\n * so does the texture and any object using it to render with. Also, if you destroy this\r\n * shader, be sure to clear any objects that may have been using it as a texture too.\r\n * \r\n * You can access the Phaser Texture that is created via the `Shader.texture` property.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.Shader#setRenderToTexture\r\n * @since 3.19.0\r\n *\r\n * @param {string} [key] - The unique key to store the texture as within the global Texture Manager.\r\n * @param {boolean} [flipY=false] - Does this texture need vertically flipping before rendering? This should usually be set to `true` if being fed from a buffer.\r\n *\r\n * @return {this} This Shader instance.\r\n */\r\n setRenderToTexture: function (key, flipY)\r\n {\r\n if (flipY === undefined) { flipY = false; }\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n\r\n this.glTexture = renderer.createTextureFromSource(null, width, height, 0);\r\n\r\n this.glTexture.flipY = flipY;\r\n\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n\r\n this._rendererWidth = width;\r\n this._rendererHeight = height;\r\n\r\n this.renderToTexture = true;\r\n\r\n this.projOrtho(0, this.width, this.height, 0);\r\n\r\n if (key)\r\n {\r\n this._savedKey = key;\r\n\r\n this.texture = this.scene.sys.textures.addGLTexture(key, this.glTexture, width, height);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fragment and, optionally, the vertex shader source code that this Shader will use.\r\n * This will immediately delete the active shader program, if set, and then create a new one\r\n * with the given source. Finally, the shader uniforms are initialized.\r\n *\r\n * @method Phaser.GameObjects.Shader#setShader\r\n * @since 3.17.0\r\n * \r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setShader: function (key, textures)\r\n {\r\n if (textures === undefined) { textures = []; }\r\n\r\n if (typeof key === 'string')\r\n {\r\n var cache = this.scene.sys.cache.shader;\r\n\r\n if (!cache.has(key))\r\n {\r\n console.warn('Shader missing: ' + key);\r\n return this;\r\n }\r\n \r\n this.shader = cache.get(key);\r\n }\r\n else\r\n {\r\n this.shader = key;\r\n }\r\n\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n if (this.program)\r\n {\r\n gl.deleteProgram(this.program);\r\n }\r\n\r\n var program = renderer.createProgram(this.shader.vertexSrc, this.shader.fragmentSrc);\r\n\r\n // The default uniforms available within the vertex shader\r\n renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n this.program = program;\r\n\r\n var d = new Date();\r\n\r\n // The default uniforms available within the fragment shader\r\n var defaultUniforms = {\r\n resolution: { type: '2f', value: { x: this.width, y: this.height } },\r\n time: { type: '1f', value: 0 },\r\n mouse: { type: '2f', value: { x: this.width / 2, y: this.height / 2 } },\r\n date: { type: '4fv', value: [ d.getFullYear(), d.getMonth(), d.getDate(), d.getHours() * 60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] },\r\n sampleRate: { type: '1f', value: 44100.0 },\r\n iChannel0: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel1: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }\r\n };\r\n \r\n if (this.shader.uniforms)\r\n {\r\n this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms);\r\n }\r\n else\r\n {\r\n this.uniforms = defaultUniforms;\r\n }\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (textures[i])\r\n {\r\n this.setSampler2D('iChannel' + i, textures[i], i);\r\n }\r\n }\r\n\r\n this.initUniforms();\r\n\r\n this.projOrtho(0, this._rendererWidth, this._rendererHeight, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a Phaser Pointer object to this Shader.\r\n * \r\n * The screen position of the pointer will be set in to the shaders `mouse` uniform\r\n * automatically every frame. Call this method with no arguments to unbind the pointer.\r\n *\r\n * @method Phaser.GameObjects.Shader#setPointer\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setPointer: function (pointer)\r\n {\r\n this.pointer = pointer;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this shader to use an orthographic projection matrix.\r\n * This matrix is stored locally in the `projectionMatrix` property,\r\n * as well as being bound to the `uProjectionMatrix` uniform.\r\n * \r\n * @method Phaser.GameObjects.Shader#projOrtho\r\n * @since 3.17.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n */\r\n projOrtho: function (left, right, bottom, top)\r\n {\r\n var near = -1000;\r\n var far = 1000;\r\n\r\n var leftRight = 1 / (left - right);\r\n var bottomTop = 1 / (bottom - top);\r\n var nearFar = 1 / (near - far);\r\n\r\n var pm = this.projectionMatrix;\r\n\r\n pm[0] = -2 * leftRight;\r\n pm[5] = -2 * bottomTop;\r\n pm[10] = 2 * nearFar;\r\n pm[12] = (left + right) * leftRight;\r\n pm[13] = (top + bottom) * bottomTop;\r\n pm[14] = (far + near) * nearFar;\r\n\r\n var program = this.program;\r\n\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n\r\n this._rendererWidth = right;\r\n this._rendererHeight = bottom;\r\n },\r\n\r\n // Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/\r\n // http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf\r\n\r\n /**\r\n * Initializes all of the uniforms this shader uses.\r\n * \r\n * @method Phaser.GameObjects.Shader#initUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n initUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n var map = this.renderer.glFuncMap;\r\n var program = this.program;\r\n\r\n this._textureCount = 0;\r\n\r\n for (var key in this.uniforms)\r\n {\r\n var uniform = this.uniforms[key];\r\n\r\n var type = uniform.type;\r\n var data = map[type];\r\n\r\n uniform.uniformLocation = gl.getUniformLocation(program, key);\r\n\r\n if (type !== 'sampler2D')\r\n {\r\n uniform.glMatrix = data.matrix;\r\n uniform.glValueLength = data.length;\r\n uniform.glFunc = data.func;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture.\r\n * \r\n * This allows you to feed the output from one Shader into another:\r\n * \r\n * ```javascript\r\n * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture();\r\n * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output');\r\n * \r\n * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512);\r\n * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512);\r\n * ```\r\n * \r\n * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform.\r\n * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop.\r\n * \r\n * If you wish to use an image from the Texture Manager as a sampler2D input for this shader,\r\n * see the `Shader.setSampler2D` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2DBuffer\r\n * @since 3.19.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {WebGLTexture} texture - A WebGLTexture reference.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n if (textureData === undefined) { textureData = {}; }\r\n\r\n var uniform = this.uniforms[uniformKey];\r\n\r\n uniform.value = texture;\r\n\r\n textureData.width = width;\r\n textureData.height = height;\r\n\r\n uniform.textureData = textureData;\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2D\r\n * @since 3.17.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2D: function (uniformKey, textureKey, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n\r\n var textureManager = this.scene.sys.textures;\r\n\r\n if (textureManager.exists(textureKey))\r\n {\r\n var frame = textureManager.getFrame(textureKey);\r\n var uniform = this.uniforms[uniformKey];\r\n var source = frame.source;\r\n\r\n uniform.textureKey = textureKey;\r\n uniform.source = source.image;\r\n uniform.value = frame.glTexture;\r\n\r\n if (source.isGLTexture)\r\n {\r\n if (!textureData)\r\n {\r\n textureData = {};\r\n }\r\n\r\n textureData.width = source.width;\r\n textureData.height = source.height;\r\n }\r\n\r\n if (textureData)\r\n {\r\n uniform.textureData = textureData;\r\n }\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a property of a uniform already present on this shader.\r\n * \r\n * To modify the value of a uniform such as a 1f or 1i use the `value` property directly:\r\n * \r\n * ```javascript\r\n * shader.setUniform('size.value', 16);\r\n * ```\r\n * \r\n * You can use dot notation to access deeper values, for example:\r\n * \r\n * ```javascript\r\n * shader.setUniform('resolution.value.x', 512);\r\n * ```\r\n * \r\n * The change to the uniform will take effect the next time the shader is rendered.\r\n * \r\n * @method Phaser.GameObjects.Shader#setUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`.\r\n * @param {any} value - The value to set into the uniform.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setUniform: function (key, value)\r\n {\r\n SetValue(this.uniforms, key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the uniform object for the given key, or `null` if the uniform couldn't be found.\r\n * \r\n * @method Phaser.GameObjects.Shader#getUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to return the value for.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n getUniform: function (key)\r\n {\r\n return GetFastValue(this.uniforms, key, null);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel0\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel0: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel0', textureKey, 0, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel1\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel1: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel1', textureKey, 1, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel2\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel2: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel2', textureKey, 2, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel3\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel3: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel3', textureKey, 3, textureData);\r\n },\r\n\r\n /**\r\n * Internal method that takes a sampler2D uniform and prepares it for use by setting the\r\n * gl texture parameters.\r\n * \r\n * @method Phaser.GameObjects.Shader#initSampler2D\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {any} uniform - The sampler2D uniform to process.\r\n */\r\n initSampler2D: function (uniform)\r\n {\r\n if (!uniform.value)\r\n {\r\n return;\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n gl.activeTexture(gl.TEXTURE0 + this._textureCount);\r\n gl.bindTexture(gl.TEXTURE_2D, uniform.value);\r\n \r\n // Extended texture data\r\n\r\n var data = uniform.textureData;\r\n\r\n if (data)\r\n {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D\r\n \r\n // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST\r\n // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT\r\n // format can be: gl.LUMINANCE or gl.RGBA\r\n \r\n var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()];\r\n var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()];\r\n var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()];\r\n var wrapT = gl[GetFastValue(data, 'wrapT', 'repeat').toUpperCase()];\r\n var format = gl[GetFastValue(data, 'format', 'rgba').toUpperCase()];\r\n\r\n if (data.repeat)\r\n {\r\n wrapS = gl.REPEAT;\r\n wrapT = gl.REPEAT;\r\n }\r\n\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, !!data.flipY);\r\n\r\n if (data.width)\r\n {\r\n var width = GetFastValue(data, 'width', 512);\r\n var height = GetFastValue(data, 'height', 2);\r\n var border = GetFastValue(data, 'border', 0);\r\n \r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source);\r\n }\r\n \r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n }\r\n\r\n this.renderer.setProgram(this.program);\r\n \r\n gl.uniform1i(uniform.uniformLocation, this._textureCount);\r\n \r\n this._textureCount++;\r\n },\r\n\r\n /**\r\n * Synchronizes all of the uniforms this shader uses.\r\n * Each uniforms gl function is called in turn.\r\n * \r\n * @method Phaser.GameObjects.Shader#syncUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n syncUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n var uniforms = this.uniforms;\r\n var uniform;\r\n var length;\r\n var glFunc;\r\n var location;\r\n var value;\r\n var textureCount = 0;\r\n \r\n for (var key in uniforms)\r\n {\r\n uniform = uniforms[key];\r\n\r\n glFunc = uniform.glFunc;\r\n length = uniform.glValueLength;\r\n location = uniform.uniformLocation;\r\n value = uniform.value;\r\n\r\n if (value === null)\r\n {\r\n continue;\r\n }\r\n\r\n if (length === 1)\r\n {\r\n if (uniform.glMatrix)\r\n {\r\n glFunc.call(gl, location, uniform.transpose, value);\r\n }\r\n else\r\n {\r\n glFunc.call(gl, location, value);\r\n }\r\n }\r\n else if (length === 2)\r\n {\r\n glFunc.call(gl, location, value.x, value.y);\r\n }\r\n else if (length === 3)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z);\r\n }\r\n else if (length === 4)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z, value.w);\r\n }\r\n else if (uniform.type === 'sampler2D')\r\n {\r\n gl.activeTexture(gl['TEXTURE' + textureCount]);\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, value);\r\n\r\n gl.uniform1i(location, textureCount);\r\n\r\n textureCount++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform.\r\n * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready\r\n * for flush to be called.\r\n * \r\n * @method Phaser.GameObjects.Shader#load\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering.\r\n */\r\n load: function (matrix2D)\r\n {\r\n // ITRS\r\n\r\n var gl = this.gl;\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var vm = this.viewMatrix;\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var x = -this._displayOriginX;\r\n var y = -this._displayOriginY;\r\n \r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[12] = vm[0] * x + vm[4] * y;\r\n vm[13] = vm[1] * x + vm[5] * y;\r\n }\r\n\r\n // Update vertex shader uniforms\r\n\r\n gl.useProgram(program);\r\n\r\n gl.uniformMatrix4fv(gl.getUniformLocation(program, 'uViewMatrix'), false, vm);\r\n gl.uniform2f(gl.getUniformLocation(program, 'uResolution'), this.width, this.height);\r\n\r\n // Update fragment shader uniforms\r\n\r\n var uniforms = this.uniforms;\r\n var res = uniforms.resolution;\r\n\r\n res.value.x = width;\r\n res.value.y = height;\r\n\r\n uniforms.time.value = renderer.game.loop.getDuration();\r\n\r\n var pointer = this.pointer;\r\n\r\n if (pointer)\r\n {\r\n var mouse = uniforms.mouse;\r\n\r\n var px = pointer.x / width;\r\n var py = 1 - pointer.y / height;\r\n \r\n mouse.value.x = px.toFixed(2);\r\n mouse.value.y = py.toFixed(2);\r\n }\r\n\r\n this.syncUniforms();\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * Sets the active shader, loads the vertex buffer and then draws.\r\n * \r\n * @method Phaser.GameObjects.Shader#flush\r\n * @since 3.17.0\r\n */\r\n flush: function ()\r\n {\r\n // Bind\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n var program = this.program;\r\n\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var renderer = this.renderer;\r\n var vertexSize = Float32Array.BYTES_PER_ELEMENT * 2;\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(this.framebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n }\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n var location = gl.getAttribLocation(program, 'inPosition');\r\n\r\n if (location !== -1)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n\r\n gl.vertexAttribPointer(location, 2, gl.FLOAT, false, vertexSize, 0);\r\n }\r\n\r\n // Draw\r\n\r\n var vf = this.vertexViewF32;\r\n\r\n vf[3] = height;\r\n vf[4] = width;\r\n vf[5] = height;\r\n vf[8] = width;\r\n vf[9] = height;\r\n vf[10] = width;\r\n\r\n // Flush\r\n\r\n var vertexCount = 6;\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n gl.drawArrays(gl.TRIANGLES, 0, vertexCount);\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(null, false);\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setAlpha\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setBlendMode\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shader#preDestroy\r\n * @protected\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n if (this.renderToTexture)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n this.texture.destroy();\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.texture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/Shader.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Shader.Render. There is no Canvas renderer for Shader objects.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderCanvas\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar ShaderCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = ShaderCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Shader = __webpack_require__(/*! ./Shader */ \"./node_modules/phaser/src/gameobjects/shader/Shader.js\");\r\n\r\n/**\r\n * Creates a new Shader Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shader\r\n * @since 3.17.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('shader', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 128);\r\n var height = GetAdvancedValue(config, 'height', 128);\r\n\r\n var shader = new Shader(this.scene, key, x, y, width, height);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, shader, config);\r\n\r\n return shader;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Shader = __webpack_require__(/*! ./Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Shader Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shader\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register(\'shader\', function (key, x, y, width, height, textures)\r\n {\r\n return this.displayList.add(new Shader(this.scene, key, x, y, width, height, textures));\r\n });\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ShaderWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ShaderCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderRender.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (!src.shader)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n if (src.renderToTexture)\r\n {\r\n src.load();\r\n src.flush();\r\n }\r\n else\r\n {\r\n var camMatrix = src._tempMatrix1;\r\n var shapeMatrix = src._tempMatrix2;\r\n var calcMatrix = src._tempMatrix3;\r\n \r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n \r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n \r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n \r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n \r\n // Renderer size changed?\r\n if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight)\r\n {\r\n src.projOrtho(0, renderer.width, renderer.height, 0);\r\n }\r\n \r\n src.load(calcMatrix.matrix);\r\n src.flush();\r\n }\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ShaderWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a filled path for the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillPathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} calcMatrix - The transform matrix used to get the position values.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar FillPathWebGL = function (pipeline, calcMatrix, src, alpha, dx, dy)\r\n{\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n var path = src.pathData;\r\n var pathIndexes = src.pathIndexes;\r\n\r\n for (var i = 0; i < pathIndexes.length; i += 3)\r\n {\r\n var p0 = pathIndexes[i] * 2;\r\n var p1 = pathIndexes[i + 1] * 2;\r\n var p2 = pathIndexes[i + 2] * 2;\r\n\r\n var x0 = path[p0 + 0] - dx;\r\n var y0 = path[p0 + 1] - dy;\r\n var x1 = path[p1 + 0] - dx;\r\n var y1 = path[p1 + 1] - dy;\r\n var x2 = path[p2 + 0] - dx;\r\n var y2 = path[p2 + 1] - dy;\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n \r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, 0, 0, 1, 1, fillTintColor, fillTintColor, fillTintColor, pipeline.tintEffect);\r\n }\r\n};\r\n\r\nmodule.exports = FillPathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the fillStyle on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the fill style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the fill style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar FillStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var fillColor = (altColor) ? altColor : src.fillColor;\r\n var fillAlpha = (altAlpha) ? altAlpha : src.fillAlpha;\r\n\r\n var red = ((fillColor & 0xFF0000) >>> 16);\r\n var green = ((fillColor & 0xFF00) >>> 8);\r\n var blue = (fillColor & 0xFF);\r\n\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n};\r\n\r\nmodule.exports = FillStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the strokeStyle and lineWidth on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#LineStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the stroke style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the stroke style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar LineStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var strokeColor = (altColor) ? altColor : src.strokeColor;\r\n var strokeAlpha = (altAlpha) ? altAlpha : src.strokeAlpha;\r\n\r\n var red = ((strokeColor & 0xFF0000) >>> 16);\r\n var green = ((strokeColor & 0xFF00) >>> 8);\r\n var blue = (strokeColor & 0xFF);\r\n\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + strokeAlpha + ')';\r\n ctx.lineWidth = src.lineWidth;\r\n};\r\n\r\nmodule.exports = LineStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/Shape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Line = __webpack_require__(/*! ../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon.\r\n * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes.\r\n *\r\n * @class Shape\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {string} [type] - The internal type of the Shape.\r\n * @param {any} [data] - The data of the source shape geometry, if any.\r\n */\r\nvar Shape = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Shape (scene, type, data)\r\n {\r\n if (type === undefined) { type = \'Shape\'; }\r\n\r\n GameObject.call(this, scene, type);\r\n\r\n /**\r\n * The source Shape data. Typically a geometry object.\r\n * You should not manipulate this directly.\r\n *\r\n * @name Phaser.GameObjects.Shape#data\r\n * @type {any}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.geom = data;\r\n\r\n /**\r\n * Holds the polygon path data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathData\r\n * @type {number[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathData = [];\r\n\r\n /**\r\n * Holds the earcut polygon path index data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathIndexes\r\n * @type {integer[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathIndexes = [];\r\n\r\n /**\r\n * The fill color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillColor = 0xffffff;\r\n\r\n /**\r\n * The fill alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillAlpha = 1;\r\n\r\n /**\r\n * The stroke color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeColor = 0xffffff;\r\n\r\n /**\r\n * The stroke alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeAlpha = 1;\r\n\r\n /**\r\n * The stroke line width used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Controls if this Shape is filled or not.\r\n * Note that some Shapes do not support being filled (such as Line shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isFilled\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isFilled = false;\r\n\r\n /**\r\n * Controls if this Shape is stroked or not.\r\n * Note that some Shapes do not support being stroked (such as Iso Box shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isStroked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isStroked = false;\r\n\r\n /**\r\n * Controls if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#closePath\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.closePath = true;\r\n\r\n /**\r\n * Private internal value.\r\n * A Line used when parsing internal path data to avoid constant object re-creation.\r\n *\r\n * @name Phaser.GameObjects.Curve#_tempLine\r\n * @type {Phaser.Geom.Line}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._tempLine = new Line();\r\n\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`.\r\n * \r\n * Note that some Shapes do not support fill colors, such as the Line shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled.\r\n * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (color === undefined)\r\n {\r\n this.isFilled = false;\r\n }\r\n else\r\n {\r\n this.fillColor = color;\r\n this.fillAlpha = alpha;\r\n this.isFilled = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the stroke color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`.\r\n * \r\n * Note that some Shapes do not support being stroked, such as the Iso Box shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setStrokeStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked.\r\n * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked.\r\n * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStrokeStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (lineWidth === undefined)\r\n {\r\n this.isStroked = false;\r\n }\r\n else\r\n {\r\n this.lineWidth = lineWidth;\r\n this.strokeColor = color;\r\n this.strokeAlpha = alpha;\r\n this.isStroked = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setClosePath\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setClosePath: function (value)\r\n {\r\n this.closePath = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shape#preDestroy\r\n * @protected\r\n * @since 3.13.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.geom = null;\r\n this._tempLine = null;\r\n this.pathData = [];\r\n this.pathIndexes = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/Shape.js?')},"./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a stroke outline around the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#StrokePathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar StrokePathWebGL = function (pipeline, src, alpha, dx, dy)\r\n{\r\n var strokeTint = pipeline.strokeTint;\r\n var strokeTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n var lineWidth = src.lineWidth;\r\n var halfLineWidth = lineWidth / 2;\r\n\r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n\r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n px1,\r\n py1,\r\n px2,\r\n py2,\r\n halfLineWidth,\r\n halfLineWidth,\r\n lineWidth,\r\n i - 2,\r\n (src.closePath) ? (i === pathLength - 1) : false\r\n );\r\n\r\n px1 = px2;\r\n py1 = py2;\r\n }\r\n};\r\n\r\nmodule.exports = StrokePathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcRender = __webpack_require__(/*! ./ArcRender */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GeomCircle = __webpack_require__(/*! ../../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n * \r\n * Arcs also have an `iterations` property and corresponding `setIterations` method. This allows\r\n * you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction.\r\n *\r\n * @class Arc\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Arc = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n ArcRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Arc (scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 128; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n\r\n Shape.call(this, scene, \'Arc\', new GeomCircle(0, 0, radius));\r\n\r\n /**\r\n * Private internal value. Holds the start angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_startAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startAngle = startAngle;\r\n\r\n /**\r\n * Private internal value. Holds the end angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_endAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endAngle = endAngle;\r\n\r\n /**\r\n * Private internal value. Holds the winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#_anticlockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._anticlockwise = anticlockwise;\r\n\r\n /**\r\n * Private internal value. Holds the number of iterations used when drawing the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#_iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._iterations = 0.01;\r\n\r\n this.setPosition(x, y);\r\n\r\n var diameter = this.geom.radius * 2;\r\n this.setSize(diameter, diameter);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n *\r\n * @name Phaser.GameObjects.Arc#iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.13.0\r\n */\r\n iterations: {\r\n\r\n get: function ()\r\n {\r\n return this._iterations;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._iterations = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#radius\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.geom.radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.geom.radius = value;\r\n\r\n var diameter = value * 2;\r\n this.setSize(diameter, diameter);\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#startAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._startAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#endAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._endAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#anticlockwise\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n anticlockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._anticlockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._anticlockwise = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the radius of the arc.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRadius: function (value)\r\n {\r\n this.radius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setIterations\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the iterations to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setIterations: function (value)\r\n {\r\n if (value === undefined) { value = 0.01; }\r\n\r\n this.iterations = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the starting angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setStartAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the starting angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStartAngle: function (angle, anticlockwise)\r\n {\r\n this._startAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the ending angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setEndAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the ending angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setEndAngle: function (angle, anticlockwise)\r\n {\r\n this._endAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Arc#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var step = this._iterations;\r\n var iteration = step;\r\n\r\n var radius = this.geom.radius;\r\n var startAngle = DegToRad(this._startAngle);\r\n var endAngle = DegToRad(this._endAngle);\r\n var anticlockwise = this._anticlockwise;\r\n\r\n var x = radius;\r\n var y = radius;\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -MATH_CONST.PI2)\r\n {\r\n endAngle = -MATH_CONST.PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n }\r\n else if (endAngle > MATH_CONST.PI2)\r\n {\r\n endAngle = MATH_CONST.PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n\r\n var path = [ x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius ];\r\n\r\n var ta;\r\n\r\n while (iteration < 1)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n iteration += step;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n path.push(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Arc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/Arc.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var radius = src.radius;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.arc(\r\n (radius) - src.originX * (radius * 2),\r\n (radius) - src.originY * (radius * 2),\r\n radius,\r\n DegToRad(src._startAngle),\r\n DegToRad(src._endAngle),\r\n src.anticlockwise\r\n );\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = ArcCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arc = __webpack_require__(/*! ./Arc */ \"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Arc Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n * \r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#arc\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('arc', function (x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha));\r\n});\r\n\r\n/**\r\n * Creates a new Circle Shape Game Object and adds it to the Scene.\r\n * \r\n * A Circle is an Arc with no defined start and end angle, making it render as a complete circle.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#circle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the circle.\r\n * @param {number} [fillColor] - The color the circle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, 0, 360, false, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ArcWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ArcCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = ArcWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/Curve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CurveRender = __webpack_require__(/*! ./CurveRender */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Rectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Curve\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Curve = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n CurveRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Curve (scene, x, y, curve, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Curve\', curve);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Curve#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 32;\r\n\r\n /**\r\n * Private internal value.\r\n * The Curve bounds rectangle.\r\n *\r\n * @name Phaser.GameObjects.Curve#_curveBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._curveBounds = new Rectangle();\r\n\r\n this.closePath = false;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Curve#smoothness\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Curve#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Curve#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var bounds = this._curveBounds;\r\n var smoothness = this._smoothness;\r\n\r\n // Update the bounds in case the underlying data has changed\r\n this.geom.getBounds(bounds, smoothness);\r\n\r\n this.setSize(bounds.width, bounds.height);\r\n this.updateDisplayOrigin();\r\n\r\n var path = [];\r\n var points = this.geom.getPoints(smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/Curve.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n \r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = CurveCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js");\r\n\r\n/**\r\n * Creates a new Curve Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Curve Game Object has been built into Phaser.\r\n * \r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#curve\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Curve} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'curve\', function (x, y, curve, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Curve(this.scene, x, y, curve, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./CurveWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./CurveCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = CurveWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar EllipseRender = __webpack_require__(/*! ./EllipseRender */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js");\r\nvar GeomEllipse = __webpack_require__(/*! ../../../geom/ellipse/Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n EllipseRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Ellipse (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Ellipse\', new GeomEllipse(width / 2, height / 2, width, height));\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 64;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#smoothness\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSize\r\n * @since 3.13.0\r\n * \r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.geom.setSize(width, height);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.getPoints(this._smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = EllipseCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Ellipse Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Ellipse Game Object has been built into Phaser.\r\n * \r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#ellipse\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Ellipse} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'ellipse\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Ellipse(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./EllipseWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./EllipseCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = EllipseWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/Grid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GridRender = __webpack_require__(/*! ./GridRender */ "./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @class Grid\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells. See the `setOutline` method.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n */\r\nvar Grid = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n GridRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Grid (scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n if (cellWidth === undefined) { cellWidth = 32; }\r\n if (cellHeight === undefined) { cellHeight = 32; }\r\n\r\n Shape.call(this, scene, \'Grid\', null);\r\n\r\n /**\r\n * The width of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellWidth = cellWidth;\r\n\r\n /**\r\n * The height of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellHeight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellHeight = cellHeight;\r\n\r\n /**\r\n * Will the grid render its cells in the `fillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showCells = true;\r\n\r\n /**\r\n * The color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillColor = 0;\r\n\r\n /**\r\n * The alpha value for the color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillAlpha = 0;\r\n\r\n /**\r\n * Will the grid display the lines between each cell when it renders?\r\n *\r\n * @name Phaser.GameObjects.Grid#showOutline\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showOutline = true;\r\n\r\n /**\r\n * Will the grid render the alternating cells in the `altFillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showAltCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showAltCells = false;\r\n\r\n /**\r\n * The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillColor;\r\n\r\n /**\r\n * The alpha the alternating grid cells will be filled with.\r\n * You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillAlpha;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n if (outlineFillColor !== undefined)\r\n {\r\n this.setOutlineStyle(outlineFillColor, outlineFillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level the grid cells will use when rendering.\r\n * \r\n * If this method is called with no values then the grid cells will not be rendered, \r\n * however the grid lines and alternating cells may still be.\r\n * \r\n * Also see the `setOutlineStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showCells = false;\r\n }\r\n else\r\n {\r\n this.fillColor = fillColor;\r\n this.fillAlpha = fillAlpha;\r\n this.showCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the alternating grid cells will use.\r\n * \r\n * If this method is called with no values then alternating grid cells will not be rendered in a different color.\r\n * \r\n * Also see the `setOutlineStyle` and `setFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setAltFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAltFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showAltCells = false;\r\n }\r\n else\r\n {\r\n this.altFillColor = fillColor;\r\n this.altFillAlpha = fillAlpha;\r\n this.showAltCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the lines between each grid cell will use.\r\n * \r\n * If this method is called with no values then the grid lines will not be rendered at all, however\r\n * the cells themselves may still be if they have colors set.\r\n * \r\n * Also see the `setFillStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setOutlineStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOutlineStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showOutline = false;\r\n }\r\n else\r\n {\r\n this.outlineFillColor = fillColor;\r\n this.outlineFillAlpha = fillAlpha;\r\n this.showOutline = true;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Grid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/Grid.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = -src._displayOriginX;\r\n var dy = -src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src, src.altFillColor, src.altFillAlpha * alpha);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n LineStyleCanvas(ctx, src, src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1 + dx, dy);\r\n ctx.lineTo(x1 + dx, height + dy);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(dx, y1 + dy);\r\n ctx.lineTo(dx + width, y1 + dy);\r\n\r\n ctx.stroke();\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = GridCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Grid = __webpack_require__(/*! ./Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js");\r\n\r\n/**\r\n * Creates a new Grid Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Grid Game Object has been built into Phaser.\r\n * \r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#grid\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n *\r\n * @return {Phaser.GameObjects.Grid} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'grid\', function (x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n{\r\n return this.displayList.add(new Grid(this.scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GridWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GridCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n calcMatrix.translate(-src._displayOriginX, -src._displayOriginY);\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var fillTint;\r\n var fillTintColor;\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.altFillColor, src.altFillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(x1, 0, x1, height, 1, 1, 1, 0, false);\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(0, y1, width, y1, 1, 1, 1, 0, false);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GridWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsoBoxRender = __webpack_require__(/*! ./IsoBoxRender */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @class IsoBox\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n */\r\nvar IsoBox = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoBoxRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoBox (scene, x, y, size, height, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoBox', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso box will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso box.\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso box.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso box.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso box.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoBox;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, -1);\r\n ctx.lineTo(0, sizeB - 1);\r\n ctx.lineTo(-sizeA, -1);\r\n ctx.lineTo(-sizeA, -height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n \r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(-sizeA, -height);\r\n ctx.lineTo(-sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoBox = __webpack_require__(/*! ./IsoBox */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js\");\r\n\r\n/**\r\n * Creates a new IsoBox Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoBox Game Object has been built into Phaser.\r\n * \r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isobox\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n *\r\n * @return {Phaser.GameObjects.IsoBox} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoBox(this.scene, x, y, size, height, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoBoxWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoBoxCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n x3 = calcMatrix.getX(0, sizeB - height);\r\n y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(-sizeA, -height);\r\n y3 = calcMatrix.getY(-sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(sizeA, -height);\r\n y3 = calcMatrix.getY(sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar IsoTriangleRender = __webpack_require__(/*! ./IsoTriangleRender */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @class IsoTriangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n */\r\nvar IsoTriangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoTriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoTriangle (scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (reversed === undefined) { reversed = false; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoTriangle', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso triangle. This is only used if the triangle is reversed.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#isReversed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.isReversed = reversed;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setReversed\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} reversed - Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setReversed: function (reversed)\r\n {\r\n this.isReversed = reversed;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso triangle will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso triangle (only if `reversed` is true)\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso triangle.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso triangle.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso triangle.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso triangle.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB - height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoTriangle = __webpack_require__(/*! ./IsoTriangle */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js\");\r\n\r\n/**\r\n * Creates a new IsoTriangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser.\r\n * \r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isotriangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n *\r\n * @return {Phaser.GameObjects.IsoTriangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isotriangle', function (x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoTriangle(this.scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoTriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoTriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n var x3 = calcMatrix.getX(0, sizeB - height);\r\n var y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(sizeA, -height);\r\n y0 = calcMatrix.getY(sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomLine = __webpack_require__(/*! ../../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar LineRender = __webpack_require__(/*! ./LineRender */ "./node_modules/phaser/src/gameobjects/shape/line/LineRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * Be aware that as with all Game Objects the default origin is 0.5. If you need to draw a Line\r\n * between two points and want the x1/y1 values to match the x/y values, then set the origin to 0.\r\n *\r\n * @class Line\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Line = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n LineRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Line (scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 128; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n Shape.call(this, scene, \'Line\', new GeomLine(x1, y1, x2, y2));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n /**\r\n * The width (or thickness) of the line.\r\n * See the setLineWidth method for extra details on changing this on WebGL.\r\n *\r\n * @name Phaser.GameObjects.Line#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the start width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_startWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the end width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_endWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endWidth = 1;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (strokeColor !== undefined)\r\n {\r\n this.setStrokeStyle(1, strokeColor, strokeAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the width of the line.\r\n * \r\n * When using the WebGL renderer you can have different start and end widths.\r\n * When using the Canvas renderer only the `startWidth` value is used. The `endWidth` is ignored.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Line#setLineWidth\r\n * @since 3.13.0\r\n * \r\n * @param {number} startWidth - The start width of the line.\r\n * @param {number} [endWidth] - The end width of the line. Only used in WebGL.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setLineWidth: function (startWidth, endWidth)\r\n {\r\n if (endWidth === undefined) { endWidth = startWidth; }\r\n\r\n this._startWidth = startWidth;\r\n this._endWidth = endWidth;\r\n\r\n this.lineWidth = startWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start and end coordinates of this Line.\r\n *\r\n * @method Phaser.GameObjects.Line#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=0] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/Line.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(src.geom.x1 - dx, src.geom.y1 - dy);\r\n ctx.lineTo(src.geom.x2 - dx, src.geom.y2 - dy);\r\n \r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = LineCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js");\r\n\r\n/**\r\n * Creates a new Line Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Line Game Object has been built into Phaser.\r\n * \r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#line\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Line} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'line\', function (x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n{\r\n return this.displayList.add(new Line(this.scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./LineWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./LineCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineRender.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isStroked)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n var startWidth = src._startWidth;\r\n var endWidth = src._endWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n src.geom.x1 - dx,\r\n src.geom.y1 - dy,\r\n src.geom.x2 - dx,\r\n src.geom.y2 - dy,\r\n startWidth,\r\n endWidth,\r\n 1,\r\n 0,\r\n false,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n};\r\n\r\nmodule.exports = LineWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PolygonRender = __webpack_require__(/*! ./PolygonRender */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GetAABB = __webpack_require__(/*! ../../../geom/polygon/GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nvar GeomPolygon = __webpack_require__(/*! ../../../geom/polygon/Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar Smooth = __webpack_require__(/*! ../../../geom/polygon/Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `\'40 0 40 20 100 20 100 80 40 80 40 100 0 50\'`\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @class Polygon\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Polygon = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n PolygonRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Polygon (scene, x, y, points, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Polygon\', new GeomPolygon(points));\r\n\r\n var bounds = GetAABB(this.geom);\r\n\r\n this.setPosition(x, y);\r\n this.setSize(bounds.width, bounds.height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Smooths the polygon over the number of iterations specified.\r\n * The base polygon data will be updated and replaced with the smoothed values.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Polygon#smooth\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [iterations=1] - The number of times to apply the polygon smoothing.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n smooth: function (iterations)\r\n {\r\n if (iterations === undefined) { iterations = 1; }\r\n\r\n for (var i = 0; i < iterations; i++)\r\n {\r\n Smooth(this.geom);\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Polygon#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.points;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = PolygonCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js");\r\n\r\n/**\r\n * Creates a new Polygon Shape Game Object and adds it to the Scene.\r\n * \r\n * Note: This method will only be available if the Polygon Game Object has been built into Phaser.\r\n * \r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#polygon\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Polygon} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'polygon\', function (x, y, points, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Polygon(this.scene, x, y, points, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./PolygonWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./PolygonCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = PolygonWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GeomRectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar RectangleRender = __webpack_require__(/*! ./RectangleRender */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @class Rectangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n RectangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Rectangle (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Rectangle\', new GeomRectangle(0, 0, width, height));\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var rect = this.geom;\r\n var line = this._tempLine;\r\n\r\n rect.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n rect.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineD(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n \r\n ctx.fillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.rect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = RectangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Rectangle Game Object has been built into Phaser.\r\n * \r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#rectangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Rectangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'rectangle\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Rectangle(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RectangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RectangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = RectangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/Star.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StarRender = __webpack_require__(/*! ./StarRender */ "./node_modules/phaser/src/gameobjects/shape/star/StarRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you\'ll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how \'long\' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @class Star\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Star = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n StarRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Star (scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (points === undefined) { points = 5; }\r\n if (innerRadius === undefined) { innerRadius = 32; }\r\n if (outerRadius === undefined) { outerRadius = 64; }\r\n\r\n Shape.call(this, scene, \'Star\', null);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points in the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_points\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._points = points;\r\n\r\n /**\r\n * Private internal value.\r\n * The inner radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_innerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._innerRadius = innerRadius;\r\n\r\n /**\r\n * Private internal value.\r\n * The outer radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_outerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._outerRadius = outerRadius;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(outerRadius * 2, outerRadius * 2);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the number of points that make up the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setPoints\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The amount of points the Star will have.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPoints: function (value)\r\n {\r\n this._points = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the inner radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setInnerRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the inner radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setInnerRadius: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the outer radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setOuterRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the outer radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOuterRadius: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * The number of points that make up the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#points\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.13.0\r\n */\r\n points: {\r\n\r\n get: function ()\r\n {\r\n return this._points;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._points = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The inner radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#innerRadius\r\n * @type {number}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n innerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._innerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The outer radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#outerRadius\r\n * @type {number}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n outerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._outerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Star#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n\r\n var points = this._points;\r\n var innerRadius = this._innerRadius;\r\n var outerRadius = this._outerRadius;\r\n\r\n var rot = Math.PI / 2 * 3;\r\n var step = Math.PI / points;\r\n\r\n // So origin 0.5 = the center of the star\r\n var x = outerRadius;\r\n var y = outerRadius;\r\n \r\n path.push(x, y + -outerRadius);\r\n\r\n for (var i = 0; i < points; i++)\r\n {\r\n path.push(x + Math.cos(rot) * outerRadius, y + Math.sin(rot) * outerRadius);\r\n\r\n rot += step;\r\n\r\n path.push(x + Math.cos(rot) * innerRadius, y + Math.sin(rot) * innerRadius);\r\n \r\n rot += step;\r\n }\r\n\r\n path.push(x, y + -outerRadius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Star;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/Star.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = StarCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Star = __webpack_require__(/*! ./Star */ \"./node_modules/phaser/src/gameobjects/shape/star/Star.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Star Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Star Game Object has been built into Phaser.\r\n * \r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how 'long' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#star\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Star} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('star', function (x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Star(this.scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/star/StarRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StarWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StarCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarRender.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = StarWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomTriangle = __webpack_require__(/*! ../../../geom/triangle/Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\nvar TriangleRender = __webpack_require__(/*! ./TriangleRender */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @class Triangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Triangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n TriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Triangle (scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 128; }\r\n if (x2 === undefined) { x2 = 64; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 128; }\r\n if (y3 === undefined) { y3 = 128; }\r\n\r\n Shape.call(this, scene, \'Triangle\', new GeomTriangle(x1, y1, x2, y2, x3, y3));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the data for the lines that make up this Triangle shape.\r\n *\r\n * @method Phaser.GameObjects.Triangle#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=0] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=0] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=0] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=0] - The vertical position of the third point in the triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Triangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var tri = this.geom;\r\n var line = this._tempLine;\r\n\r\n tri.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n tri.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n tri.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x3, y3);\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = TriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js");\r\n\r\n/**\r\n * Creates a new Triangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Triangle Game Object has been built into Phaser.\r\n * \r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#triangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Triangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'triangle\', function (x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Triangle(this.scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillTriangle(\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n x3,\r\n y3,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = TriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/sprite/Sprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar SpriteRender = __webpack_require__(/*! ./SpriteRender */ "./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n SpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Sprite (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Sprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Animation Controller of this Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite#anims\r\n * @type {Phaser.GameObjects.Components.Animation}\r\n * @since 3.0.0\r\n */\r\n this.anims = new Components.Animation(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Update this Sprite\'s animations.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n },\r\n\r\n /**\r\n * Start playing the given animation.\r\n *\r\n * @method Phaser.GameObjects.Sprite#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} This Game Object.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n this.anims.play(key, ignoreIfPlaying, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Sprite.\r\n *\r\n * @method Phaser.GameObjects.Sprite#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n var data = Components.ToJSON(this);\r\n\r\n // Extra Sprite data is added here\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the Sprite, which removes the Animation component.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preDestroy\r\n * @private\r\n * @since 3.14.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.anims.destroy();\r\n\r\n this.anims = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/Sprite.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite', function (x, y, key, frame)\r\n{\r\n var sprite = new Sprite(this.scene, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./SpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./SpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/GetTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns an object containing dimensions of the Text object.\r\n *\r\n * @function Phaser.GameObjects.Text.GetTextSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from.\r\n * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size.\r\n * @param {array} lines - The lines of text to calculate the size from.\r\n *\r\n * @return {object} An object containing dimensions of the Text object.\r\n */\r\nvar GetTextSize = function (text, size, lines)\r\n{\r\n var canvas = text.canvas;\r\n var context = text.context;\r\n var style = text.style;\r\n\r\n var lineWidths = [];\r\n var maxLineWidth = 0;\r\n var drawnLines = lines.length;\r\n\r\n if (style.maxLines > 0 && style.maxLines < lines.length)\r\n {\r\n drawnLines = style.maxLines;\r\n }\r\n\r\n style.syncFont(canvas, context);\r\n\r\n // Text Width\r\n\r\n for (var i = 0; i < drawnLines; i++)\r\n {\r\n var lineWidth = style.strokeThickness;\r\n\r\n lineWidth += context.measureText(lines[i]).width;\r\n\r\n // Adjust for wrapped text\r\n if (style.wordWrap)\r\n {\r\n lineWidth -= context.measureText(' ').width;\r\n }\r\n\r\n lineWidths[i] = Math.ceil(lineWidth);\r\n maxLineWidth = Math.max(maxLineWidth, lineWidths[i]);\r\n }\r\n\r\n // Text Height\r\n\r\n var lineHeight = size.fontSize + style.strokeThickness;\r\n var height = lineHeight * drawnLines;\r\n var lineSpacing = text.lineSpacing;\r\n\r\n // Adjust for line spacing\r\n if (drawnLines > 1)\r\n {\r\n height += lineSpacing * (drawnLines - 1);\r\n }\r\n\r\n return {\r\n width: maxLineWidth,\r\n height: height,\r\n lines: drawnLines,\r\n lineWidths: lineWidths,\r\n lineSpacing: lineSpacing,\r\n lineHeight: lineHeight\r\n };\r\n};\r\n\r\nmodule.exports = GetTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/GetTextSize.js?")},"./node_modules/phaser/src/gameobjects/text/MeasureText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Calculates the ascent, descent and fontSize of a given font style.\r\n *\r\n * @function Phaser.GameObjects.Text.MeasureText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure.\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle.\r\n */\r\nvar MeasureText = function (textStyle)\r\n{\r\n // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered.\r\n var canvas = CanvasPool.create(this);\r\n\r\n // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to.\r\n var context = canvas.getContext('2d');\r\n\r\n textStyle.syncFont(canvas, context);\r\n\r\n var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX);\r\n var baseline = width;\r\n var height = 2 * baseline;\r\n\r\n baseline = baseline * textStyle.baselineY | 0;\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n context.fillStyle = '#f00';\r\n context.fillRect(0, 0, width, height);\r\n\r\n context.font = textStyle._font;\r\n\r\n context.textBaseline = 'alphabetic';\r\n context.fillStyle = '#000';\r\n context.fillText(textStyle.testString, 0, baseline);\r\n\r\n var output = {\r\n ascent: 0,\r\n descent: 0,\r\n fontSize: 0\r\n };\r\n\r\n if (!context.getImageData(0, 0, width, height))\r\n {\r\n output.ascent = baseline;\r\n output.descent = baseline + 6;\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n }\r\n\r\n var imagedata = context.getImageData(0, 0, width, height).data;\r\n var pixels = imagedata.length;\r\n var line = width * 4;\r\n var i;\r\n var j;\r\n var idx = 0;\r\n var stop = false;\r\n\r\n // ascent. scan from top to bottom until we find a non red pixel\r\n for (i = 0; i < baseline; i++)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx += line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.ascent = baseline - i;\r\n\r\n idx = pixels - line;\r\n stop = false;\r\n\r\n // descent. scan from bottom to top until we find a non red pixel\r\n for (i = height; i > baseline; i--)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx -= line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.descent = (i - baseline);\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MeasureText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/MeasureText.js?")},"./node_modules/phaser/src/gameobjects/text/TextStyle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MeasureText = __webpack_require__(/*! ./MeasureText */ \"./node_modules/phaser/src/gameobjects/text/MeasureText.js\");\r\n\r\n// Key: [ Object Key, Default Value ]\r\n\r\nvar propertyMap = {\r\n fontFamily: [ 'fontFamily', 'Courier' ],\r\n fontSize: [ 'fontSize', '16px' ],\r\n fontStyle: [ 'fontStyle', '' ],\r\n backgroundColor: [ 'backgroundColor', null ],\r\n color: [ 'color', '#fff' ],\r\n stroke: [ 'stroke', '#fff' ],\r\n strokeThickness: [ 'strokeThickness', 0 ],\r\n shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n shadowColor: [ 'shadow.color', '#000' ],\r\n shadowBlur: [ 'shadow.blur', 0 ],\r\n shadowStroke: [ 'shadow.stroke', false ],\r\n shadowFill: [ 'shadow.fill', false ],\r\n align: [ 'align', 'left' ],\r\n maxLines: [ 'maxLines', 0 ],\r\n fixedWidth: [ 'fixedWidth', 0 ],\r\n fixedHeight: [ 'fixedHeight', 0 ],\r\n resolution: [ 'resolution', 0 ],\r\n rtl: [ 'rtl', false ],\r\n testString: [ 'testString', '|MÉqgy' ],\r\n baselineX: [ 'baselineX', 1.2 ],\r\n baselineY: [ 'baselineY', 1.4 ],\r\n wordWrapWidth: [ 'wordWrap.width', null ],\r\n wordWrapCallback: [ 'wordWrap.callback', null ],\r\n wordWrapCallbackScope: [ 'wordWrap.callbackScope', null ],\r\n wordWrapUseAdvanced: [ 'wordWrap.useAdvancedWrap', false ]\r\n};\r\n\r\n/**\r\n * @classdesc\r\n * A TextStyle class manages all of the style settings for a Text object.\r\n * \r\n * Text Game Objects create a TextStyle instance automatically, which is\r\n * accessed via the `Text.style` property. You do not normally need to\r\n * instantiate one yourself.\r\n *\r\n * @class TextStyle\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n */\r\nvar TextStyle = new Class({\r\n\r\n initialize:\r\n\r\n function TextStyle (text, style)\r\n {\r\n /**\r\n * The Text object that this TextStyle is styling.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#parent\r\n * @type {Phaser.GameObjects.Text}\r\n * @since 3.0.0\r\n */\r\n this.parent = text;\r\n\r\n /**\r\n * The font family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontFamily\r\n * @type {string}\r\n * @default 'Courier'\r\n * @since 3.0.0\r\n */\r\n this.fontFamily;\r\n\r\n /**\r\n * The font size.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontSize\r\n * @type {string}\r\n * @default '16px'\r\n * @since 3.0.0\r\n */\r\n this.fontSize;\r\n\r\n /**\r\n * The font style.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontStyle\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.fontStyle;\r\n\r\n /**\r\n * The background color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#backgroundColor\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor;\r\n\r\n /**\r\n * The text fill color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#color\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.color;\r\n\r\n /**\r\n * The text stroke color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#stroke\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.stroke;\r\n\r\n /**\r\n * The text stroke thickness.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#strokeThickness\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.strokeThickness;\r\n\r\n /**\r\n * The horizontal shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetX;\r\n\r\n /**\r\n * The vertical shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetY;\r\n\r\n /**\r\n * The shadow color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowColor\r\n * @type {string}\r\n * @default '#000'\r\n * @since 3.0.0\r\n */\r\n this.shadowColor;\r\n\r\n /**\r\n * The shadow blur radius.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowBlur\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowBlur;\r\n\r\n /**\r\n * Whether shadow stroke is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowStroke\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowStroke;\r\n\r\n /**\r\n * Whether shadow fill is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowFill;\r\n\r\n /**\r\n * The text alignment.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#align\r\n * @type {string}\r\n * @default 'left'\r\n * @since 3.0.0\r\n */\r\n this.align;\r\n\r\n /**\r\n * The maximum number of lines to draw.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#maxLines\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxLines;\r\n\r\n /**\r\n * The fixed width of the text.\r\n *\r\n * `0` means no fixed with.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedWidth;\r\n\r\n /**\r\n * The fixed height of the text.\r\n *\r\n * `0` means no fixed height.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedHeight;\r\n\r\n /**\r\n * The resolution the text is rendered to its internal canvas at.\r\n * The default is 0, which means it will use the resolution set in the Game Config.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#resolution\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.resolution;\r\n\r\n /**\r\n * Whether the text should render right to left.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#rtl\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rtl;\r\n\r\n /**\r\n * The test string to use when measuring the font.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#testString\r\n * @type {string}\r\n * @default '|MÉqgy'\r\n * @since 3.0.0\r\n */\r\n this.testString;\r\n\r\n /**\r\n * The amount of horizontal padding added to the width of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineX\r\n * @type {number}\r\n * @default 1.2\r\n * @since 3.3.0\r\n */\r\n this.baselineX;\r\n\r\n /**\r\n * The amount of vertical padding added to the height of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineY\r\n * @type {number}\r\n * @default 1.4\r\n * @since 3.3.0\r\n */\r\n this.baselineY;\r\n\r\n /**\r\n * The font style, size and family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#_font\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._font;\r\n\r\n // Set to defaults + user style\r\n this.setStyle(style, false, true);\r\n\r\n var metrics = GetValue(style, 'metrics', false);\r\n\r\n // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning\r\n // Doing this is reset if you then change the font of this TextStyle after creation\r\n if (metrics)\r\n {\r\n this.metrics = {\r\n ascent: GetValue(metrics, 'ascent', 0),\r\n descent: GetValue(metrics, 'descent', 0),\r\n fontSize: GetValue(metrics, 'fontSize', 0)\r\n };\r\n }\r\n else\r\n {\r\n this.metrics = MeasureText(this);\r\n }\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStyle: function (style, updateText, setDefaults)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n if (setDefaults === undefined) { setDefaults = false; }\r\n\r\n // Avoid type mutation\r\n if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number')\r\n {\r\n style.fontSize = style.fontSize.toString() + 'px';\r\n }\r\n\r\n for (var key in propertyMap)\r\n {\r\n var value = (setDefaults) ? propertyMap[key][1] : this[key];\r\n\r\n if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope')\r\n {\r\n // Callback & scope should be set without processing the values\r\n this[key] = GetValue(style, propertyMap[key][0], value);\r\n }\r\n else\r\n {\r\n this[key] = GetAdvancedValue(style, propertyMap[key][0], value);\r\n }\r\n }\r\n\r\n // Allow for 'font' override\r\n var font = GetValue(style, 'font', null);\r\n\r\n if (font !== null)\r\n {\r\n this.setFont(font, false);\r\n }\r\n\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n // Allow for 'fill' to be used in place of 'color'\r\n var fill = GetValue(style, 'fill', null);\r\n\r\n if (fill !== null)\r\n {\r\n this.color = fill;\r\n }\r\n\r\n if (updateText)\r\n {\r\n return this.update(true);\r\n }\r\n else\r\n {\r\n return this.parent;\r\n }\r\n },\r\n\r\n /**\r\n * Synchronize the font settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncFont\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncFont: function (canvas, context)\r\n {\r\n context.font = this._font;\r\n },\r\n\r\n /**\r\n * Synchronize the text style settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncStyle\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncStyle: function (canvas, context)\r\n {\r\n context.textBaseline = 'alphabetic';\r\n\r\n context.fillStyle = this.color;\r\n context.strokeStyle = this.stroke;\r\n\r\n context.lineWidth = this.strokeThickness;\r\n context.lineCap = 'round';\r\n context.lineJoin = 'round';\r\n },\r\n\r\n /**\r\n * Synchronize the shadow settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncShadow\r\n * @since 3.0.0\r\n *\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {boolean} enabled - Whether shadows are enabled or not.\r\n */\r\n syncShadow: function (context, enabled)\r\n {\r\n if (enabled)\r\n {\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n }\r\n else\r\n {\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n context.shadowColor = 0;\r\n context.shadowBlur = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Update the style settings for the parent Text object.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#update\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n update: function (recalculateMetrics)\r\n {\r\n if (recalculateMetrics)\r\n {\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n this.metrics = MeasureText(this);\r\n }\r\n\r\n return this.parent.updateText();\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} font - The font family or font settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFont: function (font, updateText)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n\r\n var fontFamily = font;\r\n var fontSize = '';\r\n var fontStyle = '';\r\n\r\n if (typeof font !== 'string')\r\n {\r\n fontFamily = GetValue(font, 'fontFamily', 'Courier');\r\n fontSize = GetValue(font, 'fontSize', '16px');\r\n fontStyle = GetValue(font, 'fontStyle', '');\r\n }\r\n else\r\n {\r\n var fontSplit = font.split(' ');\r\n\r\n var i = 0;\r\n\r\n fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : '';\r\n fontSize = fontSplit[i++] || '16px';\r\n fontFamily = fontSplit[i++] || 'Courier';\r\n }\r\n\r\n if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle)\r\n {\r\n this.fontFamily = fontFamily;\r\n this.fontSize = fontSize;\r\n this.fontStyle = fontStyle;\r\n\r\n if (updateText)\r\n {\r\n this.update(true);\r\n }\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n if (this.fontFamily !== family)\r\n {\r\n this.fontFamily = family;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n if (this.fontStyle !== style)\r\n {\r\n this.fontStyle = style;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {(number|string)} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n if (typeof size === 'number')\r\n {\r\n size = size.toString() + 'px';\r\n }\r\n\r\n if (this.fontSize !== size)\r\n {\r\n this.fontSize = size;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the test string to use when measuring the font.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setTestString\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The test string to use when measuring the font.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setTestString: function (string)\r\n {\r\n this.testString = string;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set.\r\n * @param {number} height - The fixed height to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n this.fixedWidth = width;\r\n this.fixedHeight = height;\r\n\r\n if (width)\r\n {\r\n this.parent.width = width;\r\n }\r\n\r\n if (height)\r\n {\r\n this.parent.height = height;\r\n }\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n this.backgroundColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFill: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the resolution used by the Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method. It allows for much clearer text on High DPI devices,\r\n * at the cost of memory because it uses larger internal Canvas textures for the Text.\r\n * \r\n * Please use with caution, as the more high res Text you have, the more memory it uses up.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n this.resolution = value;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n if (thickness === undefined) { thickness = this.strokeThickness; }\r\n\r\n if (color === undefined && this.strokeThickness !== 0)\r\n {\r\n // Reset the stroke to zero (disabling it)\r\n this.strokeThickness = 0;\r\n\r\n this.update(true);\r\n }\r\n else if (this.stroke !== color || this.strokeThickness !== thickness)\r\n {\r\n this.stroke = color;\r\n this.strokeThickness = thickness;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n * \r\n * Calling this method always re-measures the parent Text object,\r\n * so only call it when you actually change the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (color === undefined) { color = '#000'; }\r\n if (blur === undefined) { blur = 0; }\r\n if (shadowStroke === undefined) { shadowStroke = false; }\r\n if (shadowFill === undefined) { shadowFill = true; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n this.shadowColor = color;\r\n this.shadowBlur = blur;\r\n this.shadowStroke = shadowStroke;\r\n this.shadowFill = shadowFill;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} [color='#000'] - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n if (color === undefined) { color = '#000'; }\r\n\r\n this.shadowColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n if (blur === undefined) { blur = 0; }\r\n\r\n this.shadowBlur = blur;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n this.shadowStroke = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n this.shadowFill = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n if (useAdvancedWrap === undefined) { useAdvancedWrap = false; }\r\n\r\n this.wordWrapWidth = width;\r\n this.wordWrapUseAdvanced = useAdvancedWrap;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n if (scope === undefined) { scope = null; }\r\n\r\n this.wordWrapCallback = callback;\r\n this.wordWrapCallbackScope = scope;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n if (align === undefined) { align = 'left'; }\r\n\r\n this.align = align;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n if (max === undefined) { max = 0; }\r\n\r\n this.maxLines = max;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n var metrics = this.metrics;\r\n\r\n return {\r\n ascent: metrics.ascent,\r\n descent: metrics.descent,\r\n fontSize: metrics.fontSize\r\n };\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Text Style.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {};\r\n\r\n for (var key in propertyMap)\r\n {\r\n output[key] = this[key];\r\n }\r\n\r\n output.metrics = this.getTextMetrics();\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Destroy this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextStyle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/TextStyle.js?")},"./node_modules/phaser/src/gameobjects/text/static/Text.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../../../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetTextSize = __webpack_require__(/*! ../GetTextSize */ \"./node_modules/phaser/src/gameobjects/text/GetTextSize.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar TextRender = __webpack_require__(/*! ./TextRender */ \"./node_modules/phaser/src/gameobjects/text/static/TextRender.js\");\r\nvar TextStyle = __webpack_require__(/*! ../TextStyle */ \"./node_modules/phaser/src/gameobjects/text/TextStyle.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either\r\n * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: '\"Roboto Condensed\"' });\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, \"Times New Roman\", Tahoma, serif' });\r\n * ```\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * @class Text\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object.\r\n */\r\nvar Text = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TextRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Text (scene, x, y, text, style)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n GameObject.call(this, scene, 'Text');\r\n\r\n /**\r\n * The renderer in use by this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.12.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n /**\r\n * The canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = CanvasPool.create(this);\r\n\r\n /**\r\n * The context of the canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * The Text Style object.\r\n *\r\n * Manages the style of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#style\r\n * @type {Phaser.GameObjects.TextStyle}\r\n * @since 3.0.0\r\n */\r\n this.style = new TextStyle(this, style);\r\n\r\n /**\r\n * Whether to automatically round line positions.\r\n *\r\n * @name Phaser.GameObjects.Text#autoRound\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.autoRound = true;\r\n\r\n /**\r\n * The Regular Expression that is used to split the text up into lines, in\r\n * multi-line text. By default this is `/(?:\\r\\n|\\r|\\n)/`.\r\n * You can change this RegExp to be anything else that you may need.\r\n *\r\n * @name Phaser.GameObjects.Text#splitRegExp\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.splitRegExp = /(?:\\r\\n|\\r|\\n)/;\r\n\r\n /**\r\n * The text to display.\r\n *\r\n * @name Phaser.GameObjects.Text#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._text = undefined;\r\n\r\n /**\r\n * Specify a padding value which is added to the line width and height when calculating the Text size.\r\n * Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions.\r\n *\r\n * @name Phaser.GameObjects.Text#padding\r\n * @type {{left:number,right:number,top:number,bottom:number}}\r\n * @since 3.0.0\r\n */\r\n this.padding = { left: 0, right: 0, top: 0, bottom: 0 };\r\n\r\n /**\r\n * The width of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#width\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.width = 1;\r\n\r\n /**\r\n * The height of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#height\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.height = 1;\r\n\r\n /**\r\n * The line spacing value.\r\n * This value is added to the font height to calculate the overall line height.\r\n * Only has an effect if this Text object contains multiple lines of text.\r\n * \r\n * If you update this property directly, instead of using the `setLineSpacing` method, then\r\n * be sure to call `updateText` after, or you won't see the change reflected in the Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#lineSpacing\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineSpacing = 0;\r\n\r\n /**\r\n * Whether the text or its settings have changed and need updating.\r\n *\r\n * @name Phaser.GameObjects.Text#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n // If resolution wasn't set, then we get it from the game config\r\n if (this.style.resolution === 0)\r\n {\r\n this.style.resolution = scene.sys.game.config.resolution;\r\n }\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Text#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n // Create a Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n // Get the frame\r\n this.frame = this.texture.get();\r\n\r\n // Set the resolution\r\n this.frame.source.resolution = this.style.resolution;\r\n\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n // Clear the default 1x1 glTexture, as we override it later\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n\r\n this.frame.source.glTexture = null;\r\n }\r\n\r\n this.initRTL();\r\n\r\n this.setText(text);\r\n\r\n if (style && style.padding)\r\n {\r\n this.setPadding(style.padding);\r\n }\r\n\r\n if (style && style.lineSpacing)\r\n {\r\n this.lineSpacing = style.lineSpacing;\r\n }\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.dirty = true;\r\n }, this);\r\n },\r\n\r\n /**\r\n * Initialize right to left text.\r\n *\r\n * @method Phaser.GameObjects.Text#initRTL\r\n * @since 3.0.0\r\n */\r\n initRTL: function ()\r\n {\r\n if (!this.style.rtl)\r\n {\r\n return;\r\n }\r\n\r\n // Here is where the crazy starts.\r\n //\r\n // Due to browser implementation issues, you cannot fillText BiDi text to a canvas\r\n // that is not part of the DOM. It just completely ignores the direction property.\r\n\r\n this.canvas.dir = 'rtl';\r\n\r\n // Experimental atm, but one day ...\r\n this.context.direction = 'rtl';\r\n\r\n // Add it to the DOM, but hidden within the parent canvas.\r\n this.canvas.style.display = 'none';\r\n\r\n AddToDOM(this.canvas, this.scene.sys.canvas);\r\n\r\n // And finally we set the x origin\r\n this.originX = 1;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds.\r\n *\r\n * @method Phaser.GameObjects.Text#runWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n *\r\n * @return {string} The text after wrapping has been applied.\r\n */\r\n runWordWrap: function (text)\r\n {\r\n var style = this.style;\r\n\r\n if (style.wordWrapCallback)\r\n {\r\n var wrappedLines = style.wordWrapCallback.call(style.wordWrapCallbackScope, text, this);\r\n\r\n if (Array.isArray(wrappedLines))\r\n {\r\n wrappedLines = wrappedLines.join('\\n');\r\n }\r\n\r\n return wrappedLines;\r\n }\r\n else if (style.wordWrapWidth)\r\n {\r\n if (style.wordWrapUseAdvanced)\r\n {\r\n return this.advancedWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n else\r\n {\r\n return this.basicWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n }\r\n else\r\n {\r\n return text;\r\n }\r\n },\r\n\r\n /**\r\n * Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be\r\n * trimmed of white space before processing. Throws an error if wordWrapWidth is less than a\r\n * single character.\r\n *\r\n * @method Phaser.GameObjects.Text#advancedWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n advancedWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var output = '';\r\n\r\n // Condense consecutive spaces and split into lines\r\n var lines = text\r\n .replace(/ +/gi, ' ')\r\n .split(this.splitRegExp);\r\n\r\n var linesCount = lines.length;\r\n\r\n for (var i = 0; i < linesCount; i++)\r\n {\r\n var line = lines[i];\r\n var out = '';\r\n\r\n // Trim whitespace\r\n line = line.replace(/^ *|\\s*$/gi, '');\r\n\r\n // If entire line is less than wordWrapWidth append the entire line and exit early\r\n var lineWidth = context.measureText(line).width;\r\n\r\n if (lineWidth < wordWrapWidth)\r\n {\r\n output += line + '\\n';\r\n continue;\r\n }\r\n\r\n // Otherwise, calculate new lines\r\n var currentLineWidth = wordWrapWidth;\r\n\r\n // Split into words\r\n var words = line.split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var word = words[j];\r\n var wordWithSpace = word + ' ';\r\n var wordWidth = context.measureText(wordWithSpace).width;\r\n\r\n if (wordWidth > currentLineWidth)\r\n {\r\n // Break word\r\n if (j === 0)\r\n {\r\n // Shave off letters from word until it's small enough\r\n var newWord = wordWithSpace;\r\n\r\n while (newWord.length)\r\n {\r\n newWord = newWord.slice(0, -1);\r\n wordWidth = context.measureText(newWord).width;\r\n\r\n if (wordWidth <= currentLineWidth)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n // If wordWrapWidth is too small for even a single letter, shame user\r\n // failure with a fatal error\r\n if (!newWord.length)\r\n {\r\n throw new Error('This text\\'s wordWrapWidth setting is less than a single character!');\r\n }\r\n\r\n // Replace current word in array with remainder\r\n var secondPart = word.substr(newWord.length);\r\n\r\n words[j] = secondPart;\r\n\r\n // Append first piece to output\r\n out += newWord;\r\n }\r\n\r\n // If existing word length is 0, don't include it\r\n var offset = (words[j].length) ? j : j + 1;\r\n\r\n // Collapse rest of sentence and remove any trailing white space\r\n var remainder = words.slice(offset).join(' ')\r\n .replace(/[ \\n]*$/gi, '');\r\n\r\n // Prepend remainder to next line\r\n lines[i + 1] = remainder + ' ' + (lines[i + 1] || '');\r\n linesCount = lines.length;\r\n\r\n break; // Processing on this line\r\n\r\n // Append word with space to output\r\n }\r\n else\r\n {\r\n out += wordWithSpace;\r\n currentLineWidth -= wordWidth;\r\n }\r\n }\r\n\r\n // Append processed line to output\r\n output += out.replace(/[ \\n]*$/gi, '') + '\\n';\r\n }\r\n\r\n // Trim the end of the string\r\n output = output.replace(/[\\s|\\n]*$/gi, '');\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Spaces are not collapsed and whitespace is not trimmed.\r\n *\r\n * @method Phaser.GameObjects.Text#basicWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n basicWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var result = '';\r\n var lines = text.split(this.splitRegExp);\r\n\r\n for (var i = 0; i < lines.length; i++)\r\n {\r\n var spaceLeft = wordWrapWidth;\r\n var words = lines[i].split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var wordWidth = context.measureText(words[j]).width;\r\n var wordWidthWithSpace = wordWidth + context.measureText(' ').width;\r\n\r\n if (wordWidthWithSpace > spaceLeft)\r\n {\r\n // Skip printing the newline if it's the first word of the line that is greater\r\n // than the word wrap width.\r\n if (j > 0)\r\n {\r\n result += '\\n';\r\n }\r\n\r\n result += words[j] + ' ';\r\n spaceLeft = wordWrapWidth - wordWidthWithSpace;\r\n }\r\n else\r\n {\r\n spaceLeft -= wordWidthWithSpace;\r\n result += words[j];\r\n\r\n if (j < (words.length - 1))\r\n {\r\n result += ' ';\r\n }\r\n }\r\n }\r\n\r\n if (i < lines.length - 1)\r\n {\r\n result += '\\n';\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Runs the given text through this Text objects word wrapping and returns the results as an\r\n * array, where each element of the array corresponds to a wrapped line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#getWrappedText\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used.\r\n *\r\n * @return {string[]} An array of strings with the pieces of wrapped text.\r\n */\r\n getWrappedText: function (text)\r\n {\r\n if (text === undefined) { text = this._text; }\r\n\r\n this.style.syncFont(this.canvas, this.context);\r\n\r\n var wrappedLines = this.runWordWrap(text);\r\n\r\n return wrappedLines.split(this.splitRegExp);\r\n },\r\n\r\n /**\r\n * Set the text to display.\r\n *\r\n * An array of strings will be joined with `\\n` line breaks.\r\n *\r\n * @method Phaser.GameObjects.Text#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = '';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join('\\n');\r\n }\r\n\r\n if (value !== this._text)\r\n {\r\n this._text = value.toString();\r\n\r\n this.updateText();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.Text#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {object} style - The style settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStyle: function (style)\r\n {\r\n return this.style.setStyle(style);\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {string} font - The font family or font settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFont: function (font)\r\n {\r\n return this.style.setFont(font);\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n return this.style.setFontFamily(family);\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n return this.style.setFontSize(size);\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n return this.style.setFontStyle(style);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.Text#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set. `0` disables fixed width.\r\n * @param {number} height - The fixed height to set. `0` disables fixed height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n return this.style.setFixedSize(width, height);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.Text#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n return this.style.setBackgroundColor(color);\r\n },\r\n\r\n /**\r\n * Set the fill style to be used by the Text object.\r\n *\r\n * This can be any valid CanvasRenderingContext2D fillStyle value, such as\r\n * a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.\r\n *\r\n * See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.\r\n *\r\n * @method Phaser.GameObjects.Text#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFill: function (fillStyle)\r\n {\r\n return this.style.setFill(fillStyle);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.Text#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n return this.style.setColor(color);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n return this.style.setStroke(color, thickness);\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n return this.style.setShadow(x, y, color, blur, shadowStroke, shadowFill);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal shadow offset.\r\n * @param {number} y - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n return this.style.setShadowOffset(x, y);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n return this.style.setShadowColor(color);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} blur - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n return this.style.setShadowBlur(blur);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n return this.style.setShadowStroke(enabled);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n return this.style.setShadowFill(enabled);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines. Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {?number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n return this.style.setWordWrapWidth(width, useAdvancedWrap);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines. Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n return this.style.setWordWrapCallback(callback, scope);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n return this.style.setAlign(align);\r\n },\r\n\r\n /**\r\n * Set the resolution used by this Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method, or by specifying it in the Text style configuration object.\r\n * \r\n * It allows for much clearer text on High DPI devices, at the cost of memory because it uses larger\r\n * internal Canvas textures for the Text.\r\n * \r\n * Therefore, please use with caution, as the more high res Text you have, the more memory it uses.\r\n *\r\n * @method Phaser.GameObjects.Text#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n return this.style.setResolution(value);\r\n },\r\n\r\n /**\r\n * Sets the line spacing value.\r\n *\r\n * This value is _added_ to the height of the font when calculating the overall line height.\r\n * This only has an effect if this Text object consists of multiple lines of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setLineSpacing\r\n * @since 3.13.0\r\n *\r\n * @param {number} value - The amount to add to the font height to achieve the overall line height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setLineSpacing: function (value)\r\n {\r\n this.lineSpacing = value;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the text padding.\r\n *\r\n * 'left' can be an object.\r\n *\r\n * If only 'left' and 'top' are given they are treated as 'x' and 'y'.\r\n *\r\n * @method Phaser.GameObjects.Text#setPadding\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object.\r\n * @param {number} top - The top padding value.\r\n * @param {number} right - The right padding value.\r\n * @param {number} bottom - The bottom padding value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setPadding: function (left, top, right, bottom)\r\n {\r\n if (typeof left === 'object')\r\n {\r\n var config = left;\r\n\r\n // If they specify x and/or y this applies to all\r\n var x = GetValue(config, 'x', null);\r\n\r\n if (x !== null)\r\n {\r\n left = x;\r\n right = x;\r\n }\r\n else\r\n {\r\n left = GetValue(config, 'left', 0);\r\n right = GetValue(config, 'right', left);\r\n }\r\n\r\n var y = GetValue(config, 'y', null);\r\n\r\n if (y !== null)\r\n {\r\n top = y;\r\n bottom = y;\r\n }\r\n else\r\n {\r\n top = GetValue(config, 'top', 0);\r\n bottom = GetValue(config, 'bottom', top);\r\n }\r\n }\r\n else\r\n {\r\n if (left === undefined) { left = 0; }\r\n if (top === undefined) { top = left; }\r\n if (right === undefined) { right = left; }\r\n if (bottom === undefined) { bottom = top; }\r\n }\r\n\r\n this.padding.left = left;\r\n this.padding.top = top;\r\n this.padding.right = right;\r\n this.padding.bottom = bottom;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.Text#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n return this.style.setMaxLines(max);\r\n },\r\n\r\n /**\r\n * Update the displayed text.\r\n *\r\n * @method Phaser.GameObjects.Text#updateText\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n updateText: function ()\r\n {\r\n var canvas = this.canvas;\r\n var context = this.context;\r\n var style = this.style;\r\n var resolution = style.resolution;\r\n var size = style.metrics;\r\n\r\n style.syncFont(canvas, context);\r\n\r\n var outputText = this._text;\r\n\r\n if (style.wordWrapWidth || style.wordWrapCallback)\r\n {\r\n outputText = this.runWordWrap(this._text);\r\n }\r\n\r\n // Split text into lines\r\n var lines = outputText.split(this.splitRegExp);\r\n\r\n var textSize = GetTextSize(this, size, lines);\r\n\r\n var padding = this.padding;\r\n\r\n var textWidth;\r\n\r\n if (style.fixedWidth === 0)\r\n {\r\n this.width = textSize.width + padding.left + padding.right;\r\n\r\n textWidth = textSize.width;\r\n }\r\n else\r\n {\r\n this.width = style.fixedWidth;\r\n\r\n textWidth = this.width - padding.left - padding.right;\r\n\r\n if (textWidth < textSize.width)\r\n {\r\n textWidth = textSize.width;\r\n }\r\n }\r\n\r\n if (style.fixedHeight === 0)\r\n {\r\n this.height = textSize.height + padding.top + padding.bottom;\r\n }\r\n else\r\n {\r\n this.height = style.fixedHeight;\r\n }\r\n\r\n var w = this.width;\r\n var h = this.height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n w *= resolution;\r\n h *= resolution;\r\n\r\n w = Math.max(w, 1);\r\n h = Math.max(h, 1);\r\n\r\n if (canvas.width !== w || canvas.height !== h)\r\n {\r\n canvas.width = w;\r\n canvas.height = h;\r\n\r\n this.frame.setSize(w, h);\r\n\r\n // Because resizing the canvas resets the context\r\n style.syncFont(canvas, context);\r\n }\r\n else\r\n {\r\n context.clearRect(0, 0, w, h);\r\n }\r\n\r\n context.save();\r\n\r\n context.scale(resolution, resolution);\r\n\r\n if (style.backgroundColor)\r\n {\r\n context.fillStyle = style.backgroundColor;\r\n context.fillRect(0, 0, w, h);\r\n }\r\n\r\n style.syncStyle(canvas, context);\r\n\r\n context.textBaseline = 'alphabetic';\r\n\r\n // Apply padding\r\n context.translate(padding.left, padding.top);\r\n\r\n var linePositionX;\r\n var linePositionY;\r\n\r\n // Draw text line by line\r\n for (var i = 0; i < textSize.lines; i++)\r\n {\r\n linePositionX = style.strokeThickness / 2;\r\n linePositionY = (style.strokeThickness / 2 + i * textSize.lineHeight) + size.ascent;\r\n\r\n if (i > 0)\r\n {\r\n linePositionY += (textSize.lineSpacing * i);\r\n }\r\n\r\n if (style.rtl)\r\n {\r\n linePositionX = w - linePositionX;\r\n }\r\n else if (style.align === 'right')\r\n {\r\n linePositionX += textWidth - textSize.lineWidths[i];\r\n }\r\n else if (style.align === 'center')\r\n {\r\n linePositionX += (textWidth - textSize.lineWidths[i]) / 2;\r\n }\r\n else if (style.align === 'justify')\r\n {\r\n // To justify text line its width must be no less than 85% of defined width\r\n var minimumLengthToApplyJustification = 0.85;\r\n\r\n if (textSize.lineWidths[i] / textSize.width >= minimumLengthToApplyJustification)\r\n {\r\n var extraSpace = textSize.width - textSize.lineWidths[i];\r\n var spaceSize = context.measureText(' ').width;\r\n var trimmedLine = lines[i].trim();\r\n var array = trimmedLine.split(' ');\r\n \r\n extraSpace += (lines[i].length - trimmedLine.length) * spaceSize;\r\n \r\n var extraSpaceCharacters = Math.floor(extraSpace / spaceSize);\r\n var idx = 0;\r\n\r\n while (extraSpaceCharacters > 0)\r\n {\r\n array[idx] += ' ';\r\n idx = (idx + 1) % (array.length - 1 || 1);\r\n --extraSpaceCharacters;\r\n }\r\n \r\n lines[i] = array.join(' ');\r\n }\r\n }\r\n\r\n if (this.autoRound)\r\n {\r\n linePositionX = Math.round(linePositionX);\r\n linePositionY = Math.round(linePositionY);\r\n }\r\n\r\n if (style.strokeThickness)\r\n {\r\n this.style.syncShadow(context, style.shadowStroke);\r\n\r\n context.strokeText(lines[i], linePositionX, linePositionY);\r\n }\r\n\r\n if (style.color)\r\n {\r\n this.style.syncShadow(context, style.shadowFill);\r\n\r\n context.fillText(lines[i], linePositionX, linePositionY);\r\n }\r\n }\r\n\r\n context.restore();\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true);\r\n\r\n this.frame.glTexture = this.frame.source.glTexture;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.Text#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {object} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n return this.style.getTextMetrics();\r\n },\r\n\r\n /**\r\n * The text string being rendered by this Text Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of the Text object.\r\n *\r\n * @method Phaser.GameObjects.Text#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Text object.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra Text data is added here\r\n\r\n var data = {\r\n autoRound: this.autoRound,\r\n text: this._text,\r\n style: this.style.toJSON(),\r\n padding: {\r\n left: this.padding.left,\r\n right: this.padding.right,\r\n top: this.padding.top,\r\n bottom: this.padding.bottom\r\n }\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Text#preDestroy\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.style.rtl)\r\n {\r\n RemoveFromDOM(this.canvas);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n\r\n this.texture.destroy();\r\n }\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n});\r\n\r\nmodule.exports = Text;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/Text.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#text\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('text', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n // style Object = {\r\n // font: [ 'font', '16px Courier' ],\r\n // backgroundColor: [ 'backgroundColor', null ],\r\n // fill: [ 'fill', '#fff' ],\r\n // stroke: [ 'stroke', '#fff' ],\r\n // strokeThickness: [ 'strokeThickness', 0 ],\r\n // shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n // shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n // shadowColor: [ 'shadow.color', '#000' ],\r\n // shadowBlur: [ 'shadow.blur', 0 ],\r\n // shadowStroke: [ 'shadow.stroke', false ],\r\n // shadowFill: [ 'shadow.fill', false ],\r\n // align: [ 'align', 'left' ],\r\n // maxLines: [ 'maxLines', 0 ],\r\n // fixedWidth: [ 'fixedWidth', false ],\r\n // fixedHeight: [ 'fixedHeight', false ],\r\n // rtl: [ 'rtl', false ]\r\n // }\r\n\r\n var content = GetAdvancedValue(config, 'text', '');\r\n var style = GetAdvancedValue(config, 'style', null);\r\n\r\n // Padding\r\n // { padding: 2 }\r\n // { padding: { x: , y: }}\r\n // { padding: { left: , top: }}\r\n // { padding: { left: , right: , top: , bottom: }}\r\n\r\n var padding = GetAdvancedValue(config, 'padding', null);\r\n\r\n if (padding !== null)\r\n {\r\n style.padding = padding;\r\n }\r\n\r\n var text = new Text(this.scene, 0, 0, content, style);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, text, config);\r\n\r\n // Text specific config options:\r\n\r\n text.autoRound = GetAdvancedValue(config, 'autoRound', true);\r\n text.resolution = GetAdvancedValue(config, 'resolution', 1);\r\n\r\n return text;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCreator.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and adds it to the Scene.\r\n * \r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#text\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {object} [style] - The Text style configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('text', function (x, y, text, style)\r\n{\r\n return this.displayList.add(new Text(this.scene, x, y, text, style));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextFactory.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextRender.js?')},"./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width / src.style.resolution, height / src.style.resolution,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetPowerOfTwo = __webpack_require__(/*! ../../math/pow2/GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js");\r\nvar TileSpriteRender = __webpack_require__(/*! ./TileSpriteRender */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * @classdesc\r\n * A TileSprite is a Sprite that has a repeating texture.\r\n *\r\n * The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and\r\n * are designed so that you can create game backdrops using seamless textures as a source.\r\n *\r\n * You shouldn\'t ever create a TileSprite any larger than your actual canvas size. If you want to create a large repeating background\r\n * that scrolls across the whole map of your game, then you create a TileSprite that fits the canvas size and then use the `tilePosition`\r\n * property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will \r\n * consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to\r\n * adjust the scale of the texture - don\'t resize the sprite itself or make it larger than it needs.\r\n * \r\n * An important note about Tile Sprites and NPOT textures: Internally, TileSprite textures use GL_REPEAT to provide\r\n * seamless repeating of the textures. This, combined with the way in which the textures are handled in WebGL, means\r\n * they need to be POT (power-of-two) sizes in order to wrap. If you provide a NPOT (non power-of-two) texture to a\r\n * TileSprite it will generate a POT sized canvas and draw your texture to it, scaled up to the POT size. It\'s then\r\n * scaled back down again during rendering to the original dimensions. While this works, in that it allows you to use\r\n * any size texture for a Tile Sprite, it does mean that NPOT textures are going to appear anti-aliased when rendered,\r\n * due to the interpolation that took place when it was resized into a POT texture. This is especially visible in\r\n * pixel art graphics. If you notice it and it becomes an issue, the only way to avoid it is to ensure that you\r\n * provide POT textures for Tile Sprites.\r\n *\r\n * @class TileSprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} textureKey - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frameKey] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar TileSprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TileSpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function TileSprite (scene, x, y, width, height, textureKey, frameKey)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n GameObject.call(this, scene, \'TileSprite\');\r\n\r\n var displayTexture = scene.sys.textures.get(textureKey);\r\n var displayFrame = displayTexture.get(frameKey);\r\n\r\n if (!width || !height)\r\n {\r\n width = displayFrame.width;\r\n height = displayFrame.height;\r\n }\r\n else\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n /**\r\n * Internal tile position vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tilePosition\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tilePosition = new Vector2();\r\n\r\n /**\r\n * Internal tile scale vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tileScale\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tileScale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether the Tile Sprite has changed in some way, requiring an re-render of its tile texture.\r\n *\r\n * Such changes include the texture frame and scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The renderer in use by this Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#canvas\r\n * @type {?HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.canvas = CanvasPool.create(this, width, height);\r\n\r\n /**\r\n * The Context of the Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The Texture the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayTexture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayTexture = displayTexture;\r\n\r\n /**\r\n * The Frame the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayFrame = displayFrame;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = this.texture.get();\r\n\r\n /**\r\n * The next power of two value from the width of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potWidth = GetPowerOfTwo(displayFrame.width);\r\n\r\n /**\r\n * The next power of two value from the height of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potHeight = GetPowerOfTwo(displayFrame.height);\r\n\r\n /**\r\n * The Canvas that the TileSprites texture is rendered to.\r\n * This is used to create a WebGL texture from.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.fillCanvas = CanvasPool.create2D(this, this.potWidth, this.potHeight);\r\n\r\n /**\r\n * The Canvas Context used to render the TileSprites texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.fillContext = this.fillCanvas.getContext(\'2d\');\r\n\r\n /**\r\n * The texture that the Tile Sprite is rendered to, which is then rendered to a Scene.\r\n * In WebGL this is a WebGLTexture. In Canvas it\'s a Canvas Fill Pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillPattern\r\n * @type {?(WebGLTexture|CanvasPattern)}\r\n * @since 3.12.0\r\n */\r\n this.fillPattern = null;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setFrame(frameKey);\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.dirty = true;\r\n this.fillPattern = null;\r\n this.fillPattern = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.fillCanvas, this.potWidth, this.potHeight);\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.displayTexture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.displayFrame = this.displayTexture.get(frame);\r\n\r\n if (!this.displayFrame.cutWidth || !this.displayFrame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n this.updateTileTexture();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTilePosition\r\n * @since 3.3.0\r\n *\r\n * @param {number} [x] - The x position of this sprite\'s tiling texture.\r\n * @param {number} [y] - The y position of this sprite\'s tiling texture.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTilePosition: function (x, y)\r\n {\r\n if (x !== undefined)\r\n {\r\n this.tilePositionX = x;\r\n }\r\n\r\n if (y !== undefined)\r\n {\r\n this.tilePositionY = y;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tileScaleX} and {@link Phaser.GameObjects.TileSprite#tileScaleY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTileScale\r\n * @since 3.12.0\r\n *\r\n * @param {number} [x] - The horizontal scale of the tiling texture. If not given it will use the current `tileScaleX` value.\r\n * @param {number} [y=x] - The vertical scale of the tiling texture. If not given it will use the `x` value.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTileScale: function (x, y)\r\n {\r\n if (x === undefined) { x = this.tileScaleX; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.tileScaleX = x;\r\n this.tileScaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Render the tile texture if it is dirty, or if the frame has changed.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateTileTexture\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateTileTexture: function ()\r\n {\r\n if (!this.dirty || !this.renderer)\r\n {\r\n return;\r\n }\r\n\r\n // Draw the displayTexture to our fillCanvas\r\n\r\n var frame = this.displayFrame;\r\n\r\n var ctx = this.fillContext;\r\n var canvas = this.fillCanvas;\r\n\r\n var fw = this.potWidth;\r\n var fh = this.potHeight;\r\n\r\n if (!this.renderer.gl)\r\n {\r\n fw = frame.cutWidth;\r\n fh = frame.cutHeight;\r\n }\r\n\r\n ctx.clearRect(0, 0, fw, fh);\r\n\r\n canvas.width = fw;\r\n canvas.height = fh;\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n frame.cutX, frame.cutY,\r\n frame.cutWidth, frame.cutHeight,\r\n 0, 0,\r\n fw, fh\r\n );\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);\r\n }\r\n else\r\n {\r\n this.fillPattern = ctx.createPattern(canvas, \'repeat\');\r\n }\r\n\r\n this.updateCanvas();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Draw the fill pattern to the internal canvas.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateCanvas\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateCanvas: function ()\r\n {\r\n var canvas = this.canvas;\r\n\r\n if (canvas.width !== this.width || canvas.height !== this.height)\r\n {\r\n canvas.width = this.width;\r\n canvas.height = this.height;\r\n\r\n this.frame.setSize(this.width, this.height);\r\n this.updateDisplayOrigin();\r\n\r\n this.dirty = true;\r\n }\r\n\r\n if (!this.dirty || this.renderer && this.renderer.gl)\r\n {\r\n this.dirty = false;\r\n return;\r\n }\r\n\r\n var ctx = this.context;\r\n\r\n if (!this.scene.sys.game.config.antialias)\r\n {\r\n Smoothing.disable(ctx);\r\n }\r\n\r\n var scaleX = this._tileScale.x;\r\n var scaleY = this._tileScale.y;\r\n\r\n var positionX = this._tilePosition.x;\r\n var positionY = this._tilePosition.y;\r\n\r\n ctx.clearRect(0, 0, this.width, this.height);\r\n\r\n ctx.save();\r\n\r\n ctx.scale(scaleX, scaleY);\r\n\r\n ctx.translate(-positionX, -positionY);\r\n\r\n ctx.fillStyle = this.fillPattern;\r\n\r\n ctx.fillRect(positionX, positionY, this.width / scaleX, this.height / scaleY);\r\n\r\n ctx.restore();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n this.renderer.deleteTexture(this.fillPattern);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n CanvasPool.remove(this.fillCanvas);\r\n\r\n this.fillPattern = null;\r\n this.fillContext = null;\r\n this.fillCanvas = null;\r\n\r\n this.displayTexture = null;\r\n this.displayFrame = null;\r\n\r\n this.texture.destroy();\r\n\r\n this.renderer = null;\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionX: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionY: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TileSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TileSpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.TileSprite.TileSpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('tileSprite', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 512);\r\n var height = GetAdvancedValue(config, 'height', 512);\r\n var key = GetAdvancedValue(config, 'key', '');\r\n var frame = GetAdvancedValue(config, 'frame', '');\r\n\r\n var tile = new TileSprite(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, tile, config);\r\n\r\n return tile;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TileSpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TileSpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n src.fillPattern,\r\n src.displayFrame.width * src.tileScaleX, src.displayFrame.height * src.tileScaleY,\r\n src.x, src.y,\r\n src.width, src.height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.originX * src.width, src.originY * src.height,\r\n 0, 0, src.width, src.height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n (src.tilePositionX % src.displayFrame.width) / src.displayFrame.width,\r\n (src.tilePositionY % src.displayFrame.height) / src.displayFrame.height,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TileSpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/zone/Zone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js");\r\nvar Circle = __webpack_require__(/*! ../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Zone Game Object.\r\n *\r\n * A Zone is a non-rendering rectangular Game Object that has a position and size.\r\n * It has no texture and never displays, but does live on the display list and\r\n * can be moved, scaled and rotated like any other Game Object.\r\n *\r\n * Its primary use is for creating Drop Zones and Input Hit Areas and it has a couple of helper methods\r\n * specifically for this. It is also useful for object overlap checks, or as a base for your own\r\n * non-displaying Game Objects.\r\n\r\n * The default origin is 0.5, the center of the Zone, the same as with Game Objects.\r\n *\r\n * @class Zone\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=1] - The width of the Game Object.\r\n * @param {number} [height=1] - The height of the Game Object.\r\n */\r\nvar Zone = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Transform,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Zone (scene, x, y, width, height)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = width; }\r\n\r\n GameObject.call(this, scene, \'Zone\');\r\n\r\n this.setPosition(x, y);\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The Blend Mode of the Game Object.\r\n * Although a Zone never renders, it still has a blend mode to allow it to fit seamlessly into\r\n * display lists without causing a batch flush.\r\n *\r\n * @name Phaser.GameObjects.Zone#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Zone#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setSize: function (width, height, resizeInput)\r\n {\r\n if (resizeInput === undefined) { resizeInput = true; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n var input = this.input;\r\n\r\n if (resizeInput && input && !input.customHitArea)\r\n {\r\n input.hitArea.width = width;\r\n input.hitArea.height = height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Circular Drop Zone.\r\n * The circle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setCircleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Circle that will form the Drop Zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setCircleDropZone: function (radius)\r\n {\r\n return this.setDropZone(new Circle(0, 0, radius), CircleContains);\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Rectangle Drop Zone.\r\n * The rectangle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setRectangleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the rectangle drop zone.\r\n * @param {number} height - The height of the rectangle drop zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setRectangleDropZone: function (width, height)\r\n {\r\n return this.setDropZone(new Rectangle(0, 0, width, height), RectangleContains);\r\n },\r\n\r\n /**\r\n * Allows you to define your own Geometry shape to be used as a Drop Zone.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape.\r\n * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDropZone: function (shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n this.setRectangleDropZone(this.width, this.height);\r\n }\r\n else if (!this.input)\r\n {\r\n this.setInteractive(shape, callback, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Zone to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setAlpha\r\n * @private\r\n * @since 3.11.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Zone to a Container in Canvas.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setBlendMode\r\n * @private\r\n * @since 3.16.2\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderCanvas\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderCanvas: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderWebGL\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderWebGL: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/Zone.js?')},"./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#zone\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('zone', function (config)\r\n{\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 1);\r\n var height = GetAdvancedValue(config, 'height', width);\r\n\r\n return new Zone(this.scene, x, y, width, height);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js?")},"./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#zone\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} width - The width of the Game Object.\r\n * @param {number} height - The height of the Game Object.\r\n * \r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('zone', function (x, y, width, height)\r\n{\r\n return this.displayList.add(new Zone(this.scene, x, y, width, height));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js?")},"./node_modules/phaser/src/geom/circle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the circle.\r\n *\r\n * @function Phaser.Geom.Circle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the area of.\r\n *\r\n * @return {number} The area of the Circle.\r\n */\r\nvar Area = function (circle)\r\n{\r\n return (circle.radius > 0) ? Math.PI * circle.radius * circle.radius : 0;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Area.js?")},"./node_modules/phaser/src/geom/circle/Circle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Circle object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Circle you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Circle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n */\r\nvar Circle = new Class({\r\n\r\n initialize:\r\n\r\n function Circle (x, y, radius)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.CIRCLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Circle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.CIRCLE;\r\n\r\n /**\r\n * The x position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The internal radius of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_radius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._radius = radius;\r\n\r\n /**\r\n * The internal diameter of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_diameter\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._diameter = radius * 2;\r\n },\r\n\r\n /**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Circle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Circle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Circle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the Circle.\r\n *\r\n * @method Phaser.Geom.Circle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y and radius of this circle.\r\n *\r\n * @method Phaser.Geom.Circle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setTo: function (x, y, radius)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this._radius = radius;\r\n this._diameter = radius * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Circle to be empty with a radius of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Circle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this._radius = 0;\r\n this._diameter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Circle.\r\n *\r\n * @method Phaser.Geom.Circle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Circle is empty: has a radius of zero.\r\n *\r\n * @method Phaser.Geom.Circle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Circle is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this._radius <= 0);\r\n },\r\n\r\n /**\r\n * The radius of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._radius = value;\r\n this._diameter = value * 2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The diameter of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#diameter\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n diameter: {\r\n\r\n get: function ()\r\n {\r\n return this._diameter;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._diameter = value;\r\n this._radius = value * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - this._radius;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circle.js?')},"./node_modules/phaser/src/geom/circle/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference of.\r\n *\r\n * @return {number} The circumference of the Circle.\r\n */\r\nvar Circumference = function (circle)\r\n{\r\n return 2 * (Math.PI * circle.radius);\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circumference.js?")},"./node_modules/phaser/src/geom/circle/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.\r\n *\r\n * @function Phaser.Geom.Circle.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Circle to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (circle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = circle.x + (circle.radius * Math.cos(angle));\r\n out.y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/circle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n/**\r\n * Creates a new Circle instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Circle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|object)} source - The Circle to be cloned. Can be an instance of a Circle or a circle-like object, with x, y and radius properties.\r\n *\r\n * @return {Phaser.Geom.Circle} A clone of the source Circle.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Circle(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Clone.js?')},"./node_modules/phaser/src/geom/circle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Circle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\nvar Contains = function (circle, x, y)\r\n{\r\n // Check if x/y are within the bounds first\r\n if (circle.radius > 0 && x >= circle.left && x <= circle.right && y >= circle.top && y <= circle.bottom)\r\n {\r\n var dx = (circle.x - x) * (circle.x - x);\r\n var dy = (circle.y - y) * (circle.y - y);\r\n\r\n return (dx + dy) <= (circle.radius * circle.radius);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Contains.js?")},"./node_modules/phaser/src/geom/circle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (circle, point)\r\n{\r\n return Contains(circle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/circle/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsRect = function (circle, rect)\r\n{\r\n return (\r\n Contains(circle, rect.x, rect.y) &&\r\n Contains(circle, rect.right, rect.y) &&\r\n Contains(circle, rect.x, rect.bottom) &&\r\n Contains(circle, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsRect.js?')},"./node_modules/phaser/src/geom/circle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y` and `radius` properties from the `source` Circle\r\n * into the given `dest` Circle, then returns the `dest` Circle.\r\n *\r\n * @function Phaser.Geom.Circle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} source - The source Circle to copy the values from.\r\n * @param {Phaser.Geom.Circle} dest - The destination Circle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Circle} The destination Circle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CopyFrom.js?")},"./node_modules/phaser/src/geom/circle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y` and `radius` properties of the two given Circles.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Circle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The first Circle to compare.\r\n * @param {Phaser.Geom.Circle} toCompare - The second Circle to compare.\r\n *\r\n * @return {boolean} `true` if the two Circles equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (circle, toCompare)\r\n{\r\n return (\r\n circle.x === toCompare.x &&\r\n circle.y === toCompare.y &&\r\n circle.radius === toCompare.radius\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Equals.js?")},"./node_modules/phaser/src/geom/circle/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Circle object.\r\n *\r\n * @function Phaser.Geom.Circle.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the circle bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Circles bounds.\r\n */\r\nvar GetBounds = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = circle.left;\r\n out.y = circle.top;\r\n out.width = circle.diameter;\r\n out.height = circle.diameter;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetBounds.js?')},"./node_modules/phaser/src/geom/circle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\nvar GetPoint = function (circle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(circle, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoint.js?')},"./node_modules/phaser/src/geom/circle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\nvar GetPoints = function (circle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(circle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(circle, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoints.js?')},"./node_modules/phaser/src/geom/circle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given.\r\n *\r\n * @function Phaser.Geom.Circle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Circle by.\r\n * @param {number} y - The amount to vertically offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar Offset = function (circle, x, y)\r\n{\r\n circle.x += x;\r\n circle.y += y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Offset.js?")},"./node_modules/phaser/src/geom/circle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Circle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar OffsetPoint = function (circle, point)\r\n{\r\n circle.x += point.x;\r\n circle.y += point.y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/circle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = 2 * Math.PI * Math.random();\r\n var u = Math.random() + Math.random();\r\n var r = (u > 1) ? 2 - u : u;\r\n var x = r * Math.cos(t);\r\n var y = r * Math.sin(t);\r\n\r\n out.x = circle.x + (x * circle.radius);\r\n out.y = circle.y + (y * circle.radius);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Random.js?')},"./node_modules/phaser/src/geom/circle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\nCircle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/circle/Area.js");\r\nCircle.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nCircle.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nCircle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/circle/Clone.js");\r\nCircle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nCircle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/circle/ContainsPoint.js");\r\nCircle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/circle/ContainsRect.js");\r\nCircle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/circle/CopyFrom.js");\r\nCircle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/circle/Equals.js");\r\nCircle.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/circle/GetBounds.js");\r\nCircle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nCircle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nCircle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/circle/Offset.js");\r\nCircle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/circle/OffsetPoint.js");\r\nCircle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/index.js?')},"./node_modules/phaser/src/geom/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/const.js?")},"./node_modules/phaser/src/geom/ellipse/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the area of.\r\n *\r\n * @return {number} The area of the Ellipse.\r\n */\r\nvar Area = function (ellipse)\r\n{\r\n if (ellipse.isEmpty())\r\n {\r\n return 0;\r\n }\r\n\r\n // units squared\r\n return (ellipse.getMajorRadius() * ellipse.getMinorRadius() * Math.PI);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Area.js?")},"./node_modules/phaser/src/geom/ellipse/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference of.\r\n *\r\n * @return {number} The circumference of th Ellipse.\r\n */\r\nvar Circumference = function (ellipse)\r\n{\r\n var rx = ellipse.width / 2;\r\n var ry = ellipse.height / 2;\r\n var h = Math.pow((rx - ry), 2) / Math.pow((rx + ry), 2);\r\n\r\n return (Math.PI * (rx + ry)) * (1 + ((3 * h) / (10 + Math.sqrt(4 - (3 * h)))));\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Circumference.js?")},"./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.\r\n *\r\n * @function Phaser.Geom.Ellipse.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Ellipse to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (ellipse, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var halfWidth = ellipse.width / 2;\r\n var halfHeight = ellipse.height / 2;\r\n\r\n out.x = ellipse.x + halfWidth * Math.cos(angle);\r\n out.y = ellipse.y + halfHeight * Math.sin(angle);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/ellipse/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\n/**\r\n * Creates a new Ellipse instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Ellipse.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The Ellipse to be cloned. Can be an instance of an Ellipse or a ellipse-like object, with x, y, width and height properties.\r\n *\r\n * @return {Phaser.Geom.Ellipse} A clone of the source Ellipse.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Ellipse(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Clone.js?')},"./node_modules/phaser/src/geom/ellipse/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Ellipse.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\nvar Contains = function (ellipse, x, y)\r\n{\r\n if (ellipse.width <= 0 || ellipse.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the coords to an ellipse with center 0,0 and a radius of 0.5\r\n var normx = ((x - ellipse.x) / ellipse.width);\r\n var normy = ((y - ellipse.y) / ellipse.height);\r\n\r\n normx *= normx;\r\n normy *= normy;\r\n\r\n return (normx + normy < 0.25);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Contains.js?")},"./node_modules/phaser/src/geom/ellipse/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (ellipse, point)\r\n{\r\n return Contains(ellipse, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsPoint.js?')},"./node_modules/phaser/src/geom/ellipse/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Ellipse or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the ellipse, otherwise false.\r\n */\r\nvar ContainsRect = function (ellipse, rect)\r\n{\r\n return (\r\n Contains(ellipse, rect.x, rect.y) &&\r\n Contains(ellipse, rect.right, rect.y) &&\r\n Contains(ellipse, rect.x, rect.bottom) &&\r\n Contains(ellipse, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsRect.js?')},"./node_modules/phaser/src/geom/ellipse/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse\r\n * into the given `dest` Ellipse, then returns the `dest` Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The source Ellipse to copy the values from.\r\n * @param {Phaser.Geom.Ellipse} dest - The destination Ellipse to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The destination Ellipse.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CopyFrom.js?")},"./node_modules/phaser/src/geom/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Ellipse object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render an Ellipse you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Ellipse\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the ellipse.\r\n * @param {number} [y=0] - The y position of the center of the ellipse.\r\n * @param {number} [width=0] - The width of the ellipse.\r\n * @param {number} [height=0] - The height of the ellipse.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n initialize:\r\n\r\n function Ellipse (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.ELLIPSE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Ellipse#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.ELLIPSE;\r\n\r\n /**\r\n * The x position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Ellipse#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y, width and height of this ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Ellipse to be empty with a width and height of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this.width = 0;\r\n this.height = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Ellipse.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} [height=width] - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Ellipse is empty: has a width or height equal to zero.\r\n *\r\n * @method Phaser.Geom.Ellipse#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Ellipse is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns the minor radius of the ellipse. Also known as the Semi Minor Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMinorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The minor radius.\r\n */\r\n getMinorRadius: function ()\r\n {\r\n return Math.min(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * Returns the major radius of the ellipse. Also known as the Semi Major Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMajorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The major radius.\r\n */\r\n getMajorRadius: function ()\r\n {\r\n return Math.max(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * The left position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + (this.height / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Ellipse.js?')},"./node_modules/phaser/src/geom/ellipse/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Ellipse.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The first Ellipse to compare.\r\n * @param {Phaser.Geom.Ellipse} toCompare - The second Ellipse to compare.\r\n *\r\n * @return {boolean} `true` if the two Ellipse equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (ellipse, toCompare)\r\n{\r\n return (\r\n ellipse.x === toCompare.x &&\r\n ellipse.y === toCompare.y &&\r\n ellipse.width === toCompare.width &&\r\n ellipse.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Equals.js?")},"./node_modules/phaser/src/geom/ellipse/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Ellipse object.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the ellipse bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Ellipse bounds.\r\n */\r\nvar GetBounds = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = ellipse.left;\r\n out.y = ellipse.top;\r\n out.width = ellipse.width;\r\n out.height = ellipse.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetBounds.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\nvar GetPoint = function (ellipse, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(ellipse, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoint.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\nvar GetPoints = function (ellipse, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(ellipse) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(ellipse, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoints.js?')},"./node_modules/phaser/src/geom/ellipse/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given.\r\n *\r\n * @function Phaser.Geom.Ellipse.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Ellipse by.\r\n * @param {number} y - The amount to vertically offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar Offset = function (ellipse, x, y)\r\n{\r\n ellipse.x += x;\r\n ellipse.y += y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Offset.js?")},"./node_modules/phaser/src/geom/ellipse/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar OffsetPoint = function (ellipse, point)\r\n{\r\n ellipse.x += point.x;\r\n ellipse.y += point.y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/OffsetPoint.js?")},"./node_modules/phaser/src/geom/ellipse/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var p = Math.random() * Math.PI * 2;\r\n var s = Math.sqrt(Math.random());\r\n\r\n out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2);\r\n out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Random.js?')},"./node_modules/phaser/src/geom/ellipse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\nEllipse.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/ellipse/Area.js");\r\nEllipse.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nEllipse.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nEllipse.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/ellipse/Clone.js");\r\nEllipse.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nEllipse.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/ellipse/ContainsPoint.js");\r\nEllipse.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/ellipse/ContainsRect.js");\r\nEllipse.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/ellipse/CopyFrom.js");\r\nEllipse.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/ellipse/Equals.js");\r\nEllipse.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/ellipse/GetBounds.js");\r\nEllipse.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nEllipse.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nEllipse.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/ellipse/Offset.js");\r\nEllipse.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/ellipse/OffsetPoint.js");\r\nEllipse.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/index.js?')},"./node_modules/phaser/src/geom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Geom\r\n */\r\n\r\nvar Geom = {\r\n \r\n Circle: __webpack_require__(/*! ./circle */ "./node_modules/phaser/src/geom/circle/index.js"),\r\n Ellipse: __webpack_require__(/*! ./ellipse */ "./node_modules/phaser/src/geom/ellipse/index.js"),\r\n Intersects: __webpack_require__(/*! ./intersects */ "./node_modules/phaser/src/geom/intersects/index.js"),\r\n Line: __webpack_require__(/*! ./line */ "./node_modules/phaser/src/geom/line/index.js"),\r\n Point: __webpack_require__(/*! ./point */ "./node_modules/phaser/src/geom/point/index.js"),\r\n Polygon: __webpack_require__(/*! ./polygon */ "./node_modules/phaser/src/geom/polygon/index.js"),\r\n Rectangle: __webpack_require__(/*! ./rectangle */ "./node_modules/phaser/src/geom/rectangle/index.js"),\r\n Triangle: __webpack_require__(/*! ./triangle */ "./node_modules/phaser/src/geom/triangle/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nGeom = Extend(false, Geom, CONST);\r\n\r\nmodule.exports = Geom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/index.js?')},"./node_modules/phaser/src/geom/intersects/CircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Checks if two Circles intersect.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Circles intersect, otherwise `false`.\r\n */\r\nvar CircleToCircle = function (circleA, circleB)\r\n{\r\n return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));\r\n};\r\n\r\nmodule.exports = CircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/CircleToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar CircleToRectangle = function (circle, rect)\r\n{\r\n var halfWidth = rect.width / 2;\r\n var halfHeight = rect.height / 2;\r\n\r\n var cx = Math.abs(circle.x - rect.x - halfWidth);\r\n var cy = Math.abs(circle.y - rect.y - halfHeight);\r\n var xDist = halfWidth + circle.radius;\r\n var yDist = halfHeight + circle.radius;\r\n\r\n if (cx > xDist || cy > yDist)\r\n {\r\n return false;\r\n }\r\n else if (cx <= halfWidth || cy <= halfHeight)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n var xCornerDist = cx - halfWidth;\r\n var yCornerDist = cy - halfHeight;\r\n var xCornerDistSq = xCornerDist * xCornerDist;\r\n var yCornerDistSq = yCornerDist * yCornerDist;\r\n var maxCornerDistSq = circle.radius * circle.radius;\r\n\r\n return (xCornerDistSq + yCornerDistSq <= maxCornerDistSq);\r\n }\r\n};\r\n\r\nmodule.exports = CircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar CircleToCircle = __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js");\r\n\r\n/**\r\n * Checks if two Circles intersect and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToCircle = function (circleA, circleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToCircle(circleA, circleB))\r\n {\r\n var x0 = circleA.x;\r\n var y0 = circleA.y;\r\n var r0 = circleA.radius;\r\n\r\n var x1 = circleB.x;\r\n var y1 = circleB.y;\r\n var r1 = circleB.radius;\r\n\r\n var coefficientA, coefficientB, coefficientC, lambda, x;\r\n\r\n if (y0 === y1)\r\n {\r\n x = ((r1 * r1) - (r0 * r0) - (x1 * x1) + (x0 * x0)) / (2 * (x0 - x1));\r\n\r\n coefficientA = 1;\r\n coefficientB = -2 * y1;\r\n coefficientC = (x1 * x1) + (x * x) - (2 * x1 * x) + (y1 * y1) - (r1 * r1);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n out.push(new Point(x, (-coefficientB / (2 * coefficientA))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n out.push(new Point(x, (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA)));\r\n out.push(new Point(x, (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA)));\r\n }\r\n }\r\n else\r\n {\r\n var v1 = (x0 - x1) / (y0 - y1);\r\n var n = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\r\n\r\n coefficientA = (v1 * v1) + 1;\r\n coefficientB = (2 * y0 * v1) - (2 * n * v1) - (2 * x0);\r\n coefficientC = (x0 * x0) + (y0 * y0) + (n * n) - (r0 * r0) - (2 * y0 * n);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n x = (-coefficientB / (2 * coefficientA));\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n x = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n x = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar CircleToRectangle = __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToRectangle = function (circle, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToRectangle(circle, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n GetLineToCircle(lineD, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToCircle = function (line, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToCircle(line, circle))\r\n {\r\n var lx1 = line.x1;\r\n var ly1 = line.y1;\r\n\r\n var lx2 = line.x2;\r\n var ly2 = line.y2;\r\n\r\n var cx = circle.x;\r\n var cy = circle.y;\r\n var cr = circle.radius;\r\n\r\n var lDirX = lx2 - lx1;\r\n var lDirY = ly2 - ly1;\r\n var oDirX = lx1 - cx;\r\n var oDirY = ly1 - cy;\r\n\r\n var coefficientA = lDirX * lDirX + lDirY * lDirY;\r\n var coefficientB = 2 * (lDirX * oDirX + lDirY * oDirY);\r\n var coefficientC = oDirX * oDirX + oDirY * oDirY - cr * cr;\r\n\r\n var lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n var x, y;\r\n\r\n if (lambda === 0)\r\n {\r\n var root = -coefficientB / (2 * coefficientA);\r\n x = lx1 + root * lDirX;\r\n y = ly1 + root * lDirY;\r\n if (root >= 0 && root <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n else if (lambda > 0)\r\n {\r\n var root1 = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root1 * lDirX;\r\n y = ly1 + root1 * lDirY;\r\n if (root1 >= 0 && root1 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n\r\n var root2 = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root2 * lDirX;\r\n y = ly1 + root2 * lDirY;\r\n if (root2 >= 0 && root2 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar LineToRectangle = __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToRectangle = function (line, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToRectangle(line, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n var output = [ new Point(), new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2]),\r\n LineToLine(lineD, line, output[3])\r\n ];\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.\r\n * \r\n * If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).\r\n * \r\n * If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersetion, it will be returned without any change.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleIntersection\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle object with intersection data.\r\n */\r\nvar GetRectangleIntersection = function (rectA, rectB, output)\r\n{\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n output.x = Math.max(rectA.x, rectB.x);\r\n output.y = Math.max(rectA.y, rectB.y);\r\n output.width = Math.min(rectA.right, rectB.right) - output.x;\r\n output.height = Math.min(rectA.bottom, rectB.bottom) - output.y;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetRectangleIntersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangles intersect and returns the intersection points as a Point object array.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToRectangle = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n var lineA = rectA.getLineA();\r\n var lineB = rectA.getLineB();\r\n var lineC = rectA.getLineC();\r\n var lineD = rectA.getLineD();\r\n\r\n GetLineToRectangle(lineA, rectB, out);\r\n GetLineToRectangle(lineB, rectB, out);\r\n GetLineToRectangle(lineC, rectB, out);\r\n GetLineToRectangle(lineD, rectB, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RectangleToTriangle = __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js");\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToTriangle = function (rect, triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToTriangle(rect, triangle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToRectangle(lineA, rect, out);\r\n GetLineToRectangle(lineB, rect, out);\r\n GetLineToRectangle(lineC, rect, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar TriangleToCircle = __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToCircle = function (triangle, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToCircle(triangle, circle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar TriangleToLine = __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.\r\n *\r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToLine = function (triangle, line, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToLine(triangle, line))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n var output = [ new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2])\r\n ];\r\n\r\n for (var i = 0; i < 3; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TriangleToTriangle = __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js");\r\nvar GetTriangleToLine = __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToTriangle = function (triangleA, triangleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToTriangle(triangleA, triangleB))\r\n {\r\n var lineA = triangleB.getLineA();\r\n var lineB = triangleB.getLineB();\r\n var lineC = triangleB.getLineC();\r\n\r\n GetTriangleToLine(triangleA, lineA, out);\r\n GetTriangleToLine(triangleA, lineB, out);\r\n GetTriangleToLine(triangleA, lineC, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/LineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nvar tmp = new Point();\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle.\r\n *\r\n * Based on code by [Matt DesLauriers](https://github.com/mattdesl/line-circle-collision/blob/master/LICENSE.md).\r\n *\r\n * @function Phaser.Geom.Intersects.LineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {(Phaser.Geom.Point|any)} [nearest] - An optional Point-like object. If given the closest point on the Line where the circle intersects will be stored in this object.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar LineToCircle = function (line, circle, nearest)\r\n{\r\n if (nearest === undefined) { nearest = tmp; }\r\n\r\n if (Contains(circle, line.x1, line.y1))\r\n {\r\n nearest.x = line.x1;\r\n nearest.y = line.y1;\r\n\r\n return true;\r\n }\r\n\r\n if (Contains(circle, line.x2, line.y2))\r\n {\r\n nearest.x = line.x2;\r\n nearest.y = line.y2;\r\n\r\n return true;\r\n }\r\n\r\n var dx = line.x2 - line.x1;\r\n var dy = line.y2 - line.y1;\r\n\r\n var lcx = circle.x - line.x1;\r\n var lcy = circle.y - line.y1;\r\n\r\n // project lc onto d, resulting in vector p\r\n var dLen2 = (dx * dx) + (dy * dy);\r\n var px = dx;\r\n var py = dy;\r\n\r\n if (dLen2 > 0)\r\n {\r\n var dp = ((lcx * dx) + (lcy * dy)) / dLen2;\r\n\r\n px *= dp;\r\n py *= dp;\r\n }\r\n\r\n nearest.x = line.x1 + px;\r\n nearest.y = line.y1 + py;\r\n \r\n // len2 of p\r\n var pLen2 = (px * px) + (py * py);\r\n \r\n return (\r\n pLen2 <= dLen2 &&\r\n ((px * dx) + (py * dy)) >= 0 &&\r\n Contains(circle, nearest.x, nearest.y)\r\n );\r\n};\r\n\r\nmodule.exports = LineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/LineToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// This is based off an explanation and expanded math presented by Paul Bourke:\r\n// See http:\'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/\r\n\r\n/**\r\n * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line1 - The first Line to check.\r\n * @param {Phaser.Geom.Line} line2 - The second Line to check.\r\n * @param {Phaser.Geom.Point} [out] - A Point in which to optionally store the point of intersection.\r\n *\r\n * @return {boolean} `true` if the two Lines intersect, and the `out` object will be populated, if given. Otherwise, `false`.\r\n */\r\nvar LineToLine = function (line1, line2, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line1.x1;\r\n var y1 = line1.y1;\r\n var x2 = line1.x2;\r\n var y2 = line1.y2;\r\n\r\n var x3 = line2.x1;\r\n var y3 = line2.y1;\r\n var x4 = line2.x2;\r\n var y4 = line2.y2;\r\n\r\n var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);\r\n var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);\r\n var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\r\n\r\n // Make sure there is not a division by zero - this also indicates that the lines are parallel.\r\n // If numA and numB were both equal to zero the lines would be on top of each other (coincidental).\r\n // This check is not done because it is not necessary for this implementation (the parallel check accounts for this).\r\n\r\n if (deNom === 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Calculate the intermediate fractional point that the lines potentially intersect.\r\n\r\n var uA = numA / deNom;\r\n var uB = numB / deNom;\r\n\r\n // The fractional point will be between 0 and 1 inclusive if the lines intersect.\r\n // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect.\r\n\r\n if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)\r\n {\r\n out.x = x1 + (uA * (x2 - x1));\r\n out.y = y1 + (uA * (y2 - y1));\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToLine.js?')},"./node_modules/phaser/src/geom/intersects/LineToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape, or a rectangle-like\r\n * object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.\r\n *\r\n * An intersection is considered valid if:\r\n *\r\n * The line starts within, or ends within, the Rectangle.\r\n * The line segment intersects one of the 4 rectangle edges.\r\n *\r\n * The for the purposes of this function rectangles are considered 'solid'.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Line and the Rectangle intersect, `false` otherwise.\r\n */\r\nvar LineToRectangle = function (line, rect)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var bx1 = rect.x;\r\n var by1 = rect.y;\r\n var bx2 = rect.right;\r\n var by2 = rect.bottom;\r\n\r\n var t = 0;\r\n\r\n // If the start or end of the line is inside the rect then we assume\r\n // collision, as rects are solid for our use-case.\r\n\r\n if ((x1 >= bx1 && x1 <= bx2 && y1 >= by1 && y1 <= by2) ||\r\n (x2 >= bx1 && x2 <= bx2 && y2 >= by1 && y2 <= by2))\r\n {\r\n return true;\r\n }\r\n\r\n if (x1 < bx1 && x2 >= bx1)\r\n {\r\n // Left edge\r\n t = y1 + (y2 - y1) * (bx1 - x1) / (x2 - x1);\r\n\r\n if (t > by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (x1 > bx2 && x2 <= bx2)\r\n {\r\n // Right edge\r\n t = y1 + (y2 - y1) * (bx2 - x1) / (x2 - x1);\r\n\r\n if (t >= by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n if (y1 < by1 && y2 >= by1)\r\n {\r\n // Top edge\r\n t = x1 + (x2 - x1) * (by1 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (y1 > by2 && y2 <= by2)\r\n {\r\n // Bottom edge\r\n t = x1 + (x2 - x1) * (by2 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/PointToLine.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the a Point falls between the two end-points of a Line, based on the given line thickness.\r\n * \r\n * Assumes that the line end points are circular, not square.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLine\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|any)} point - The point, or point-like object to check.\r\n * @param {Phaser.Geom.Line} line - The line segment to test for intersection on.\r\n * @param {number} [lineThickness=1] - The line thickness. Assumes that the line end points are circular.\r\n *\r\n * @return {boolean} `true` if the Point falls on the Line, otherwise `false`.\r\n */\r\nvar PointToLine = function (point, line, lineThickness)\r\n{\r\n if (lineThickness === undefined) { lineThickness = 1; }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var px = point.x;\r\n var py = point.y;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var r = (((px - x1) * (x2 - x1)) + ((py - y1) * (y2 - y1))) / L2;\r\n\r\n // Assume line thickness is circular\r\n if (r < 0)\r\n {\r\n // Outside line1\r\n return (Math.sqrt(((x1 - px) * (x1 - px)) + ((y1 - py) * (y1 - py))) <= lineThickness);\r\n }\r\n else if ((r >= 0) && (r <= 1))\r\n {\r\n // On the line segment\r\n var s = (((y1 - py) * (x2 - x1)) - ((x1 - px) * (y2 - y1))) / L2;\r\n\r\n return (Math.abs(s) * Math.sqrt(L2) <= lineThickness);\r\n }\r\n else\r\n {\r\n // Outside line2\r\n return (Math.sqrt(((x2 - px) * (x2 - px)) + ((y2 - py) * (y2 - py))) <= lineThickness);\r\n }\r\n};\r\n\r\nmodule.exports = PointToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLine.js?")},"./node_modules/phaser/src/geom/intersects/PointToLineSegment.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PointToLine = __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js");\r\n\r\n/**\r\n * Checks if a Point is located on the given line segment.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLineSegment\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to check for intersection.\r\n * @param {Phaser.Geom.Line} line - The line segment to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Point is on the given line segment, otherwise `false`.\r\n */\r\nvar PointToLineSegment = function (point, line)\r\n{\r\n if (!PointToLine(point, line))\r\n {\r\n return false;\r\n }\r\n\r\n var xMin = Math.min(line.x1, line.x2);\r\n var xMax = Math.max(line.x1, line.x2);\r\n var yMin = Math.min(line.y1, line.y2);\r\n var yMax = Math.max(line.y1, line.y2);\r\n\r\n return ((point.x >= xMin && point.x <= xMax) && (point.y >= yMin && point.y <= yMax));\r\n};\r\n\r\nmodule.exports = PointToLineSegment;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLineSegment.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles intersect.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Rectangles intersect, otherwise `false`.\r\n */\r\nvar RectangleToRectangle = function (rectA, rectB)\r\n{\r\n if (rectA.width <= 0 || rectA.height <= 0 || rectB.width <= 0 || rectB.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return !(rectA.right < rectB.x || rectA.bottom < rectB.y || rectA.x > rectB.right || rectA.y > rectB.bottom);\r\n};\r\n\r\nmodule.exports = RectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar Contains = __webpack_require__(/*! ../rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../rectangle/Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n *\r\n * @return {boolean} A value of `true` if objects intersect; otherwise `false`.\r\n */\r\nvar RectangleToTriangle = function (rect, triangle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > rect.right ||\r\n triangle.right < rect.left ||\r\n triangle.top > rect.bottom ||\r\n triangle.bottom < rect.top)\r\n {\r\n return false;\r\n }\r\n\r\n var triA = triangle.getLineA();\r\n var triB = triangle.getLineB();\r\n var triC = triangle.getLineC();\r\n\r\n // Are any of the triangle points within the rectangle?\r\n\r\n if (Contains(rect, triA.x1, triA.y1) || Contains(rect, triA.x2, triA.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triB.x1, triB.y1) || Contains(rect, triB.x2, triB.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triC.x1, triC.y1) || Contains(rect, triC.x2, triC.y2))\r\n {\r\n return true;\r\n }\r\n\r\n // Cheap tests over, now to see if any of the lines intersect ...\r\n\r\n var rectA = rect.getLineA();\r\n var rectB = rect.getLineB();\r\n var rectC = rect.getLineC();\r\n var rectD = rect.getLineD();\r\n\r\n if (LineToLine(triA, rectA) || LineToLine(triA, rectB) || LineToLine(triA, rectC) || LineToLine(triA, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triB, rectA) || LineToLine(triB, rectB) || LineToLine(triB, rectC) || LineToLine(triB, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triC, rectA) || LineToLine(triC, rectB) || LineToLine(triC, rectC) || LineToLine(triC, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n // None of the lines intersect, so are any rectangle points within the triangle?\r\n\r\n var points = Decompose(rect);\r\n var within = ContainsArray(triangle, points, true);\r\n\r\n return (within.length > 0);\r\n};\r\n\r\nmodule.exports = RectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToValues.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if rectangle intersects with values.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToValues\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle object\r\n * @param {number} left - The x coordinate of the left of the Rectangle.\r\n * @param {number} right - The x coordinate of the right of the Rectangle.\r\n * @param {number} top - The y coordinate of the top of the Rectangle.\r\n * @param {number} bottom - The y coordinate of the bottom of the Rectangle.\r\n * @param {number} [tolerance=0] - Tolerance allowed in the calculation, expressed in pixels.\r\n *\r\n * @return {boolean} Returns true if there is an intersection.\r\n */\r\nvar RectangleToValues = function (rect, left, right, top, bottom, tolerance)\r\n{\r\n if (tolerance === undefined) { tolerance = 0; }\r\n\r\n return !(\r\n left > rect.right + tolerance ||\r\n right < rect.left - tolerance ||\r\n top > rect.bottom + tolerance ||\r\n bottom < rect.top - tolerance\r\n );\r\n};\r\n\r\nmodule.exports = RectangleToValues;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToValues.js?")},"./node_modules/phaser/src/geom/intersects/TriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangle and the `Circle` intersect, otherwise `false`.\r\n */\r\nvar TriangleToCircle = function (triangle, circle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > circle.right ||\r\n triangle.right < circle.left ||\r\n triangle.top > circle.bottom ||\r\n triangle.bottom < circle.top)\r\n {\r\n return false;\r\n }\r\n\r\n if (Contains(triangle, circle.x, circle.y))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineA(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineB(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineC(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect.\r\n * \r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n *\r\n * @return {boolean} `true` if the Triangle and the Line intersect, otherwise `false`.\r\n */\r\nvar TriangleToLine = function (triangle, line)\r\n{\r\n // If the Triangle contains either the start or end point of the line, it intersects\r\n if (Contains(triangle, line.getPointA()) || Contains(triangle, line.getPointB()))\r\n {\r\n return true;\r\n }\r\n\r\n // Now check the line against each line of the Triangle\r\n if (LineToLine(triangle.getLineA(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineB(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineC(), line))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../triangle/Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangles intersect, otherwise `false`.\r\n */\r\nvar TriangleToTriangle = function (triangleA, triangleB)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangleA.left > triangleB.right ||\r\n triangleA.right < triangleB.left ||\r\n triangleA.top > triangleB.bottom ||\r\n triangleA.bottom < triangleB.top)\r\n {\r\n return false;\r\n }\r\n\r\n var lineAA = triangleA.getLineA();\r\n var lineAB = triangleA.getLineB();\r\n var lineAC = triangleA.getLineC();\r\n\r\n var lineBA = triangleB.getLineA();\r\n var lineBB = triangleB.getLineB();\r\n var lineBC = triangleB.getLineC();\r\n\r\n // Now check the lines against each line of TriangleB\r\n if (LineToLine(lineAA, lineBA) || LineToLine(lineAA, lineBB) || LineToLine(lineAA, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAB, lineBA) || LineToLine(lineAB, lineBB) || LineToLine(lineAB, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAC, lineBA) || LineToLine(lineAC, lineBB) || LineToLine(lineAC, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n // Nope, so check to see if any of the points of triangleA are within triangleB\r\n\r\n var points = Decompose(triangleA);\r\n var within = ContainsArray(triangleB, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n // Finally check to see if any of the points of triangleB are within triangleA\r\n\r\n points = Decompose(triangleB);\r\n within = ContainsArray(triangleA, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Geom.Intersects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CircleToCircle: __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js"),\r\n CircleToRectangle: __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js"),\r\n GetCircleToCircle: __webpack_require__(/*! ./GetCircleToCircle */ "./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js"),\r\n GetCircleToRectangle: __webpack_require__(/*! ./GetCircleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js"),\r\n GetLineToCircle: __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js"),\r\n GetLineToRectangle: __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js"),\r\n GetRectangleIntersection: __webpack_require__(/*! ./GetRectangleIntersection */ "./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js"),\r\n GetRectangleToRectangle: __webpack_require__(/*! ./GetRectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js"),\r\n GetRectangleToTriangle: __webpack_require__(/*! ./GetRectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js"),\r\n GetTriangleToCircle: __webpack_require__(/*! ./GetTriangleToCircle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js"),\r\n GetTriangleToLine: __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js"),\r\n GetTriangleToTriangle: __webpack_require__(/*! ./GetTriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js"),\r\n LineToCircle: __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js"),\r\n LineToLine: __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js"),\r\n LineToRectangle: __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js"),\r\n PointToLine: __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js"),\r\n PointToLineSegment: __webpack_require__(/*! ./PointToLineSegment */ "./node_modules/phaser/src/geom/intersects/PointToLineSegment.js"),\r\n RectangleToRectangle: __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js"),\r\n RectangleToTriangle: __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js"),\r\n RectangleToValues: __webpack_require__(/*! ./RectangleToValues */ "./node_modules/phaser/src/geom/intersects/RectangleToValues.js"),\r\n TriangleToCircle: __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js"),\r\n TriangleToLine: __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js"),\r\n TriangleToTriangle: __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/index.js?')},"./node_modules/phaser/src/geom/line/Angle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the angle of the line in radians.\r\n *\r\n * @function Phaser.Geom.Line.Angle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of.\r\n *\r\n * @return {number} The angle of the line, in radians.\r\n */\r\nvar Angle = function (line)\r\n{\r\n return Math.atan2(line.y2 - line.y1, line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Angle.js?")},"./node_modules/phaser/src/geom/line/BresenhamPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Using Bresenham's line algorithm this will return an array of all coordinates on this line.\r\n *\r\n * The `start` and `end` points are rounded before this runs as the algorithm works on integers.\r\n *\r\n * @function Phaser.Geom.Line.BresenhamPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} [stepRate=1] - The optional step rate for the points on the line.\r\n * @param {array} [results] - An optional array to push the resulting coordinates into.\r\n *\r\n * @return {object[]} The array of coordinates on the line.\r\n */\r\nvar BresenhamPoints = function (line, stepRate, results)\r\n{\r\n if (stepRate === undefined) { stepRate = 1; }\r\n if (results === undefined) { results = []; }\r\n\r\n var x1 = Math.round(line.x1);\r\n var y1 = Math.round(line.y1);\r\n var x2 = Math.round(line.x2);\r\n var y2 = Math.round(line.y2);\r\n\r\n var dx = Math.abs(x2 - x1);\r\n var dy = Math.abs(y2 - y1);\r\n var sx = (x1 < x2) ? 1 : -1;\r\n var sy = (y1 < y2) ? 1 : -1;\r\n var err = dx - dy;\r\n\r\n results.push({ x: x1, y: y1 });\r\n\r\n var i = 1;\r\n\r\n while (!((x1 === x2) && (y1 === y2)))\r\n {\r\n var e2 = err << 1;\r\n\r\n if (e2 > -dy)\r\n {\r\n err -= dy;\r\n x1 += sx;\r\n }\r\n\r\n if (e2 < dx)\r\n {\r\n err += dx;\r\n y1 += sy;\r\n }\r\n\r\n if (i % stepRate === 0)\r\n {\r\n results.push({ x: x1, y: y1 });\r\n }\r\n\r\n i++;\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = BresenhamPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/BresenhamPoints.js?")},"./node_modules/phaser/src/geom/line/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n\r\n/**\r\n * Center a line on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Line.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to center.\r\n * @param {number} x - The horizontal coordinate to center the line on.\r\n * @param {number} y - The vertical coordinate to center the line on.\r\n *\r\n * @return {Phaser.Geom.Line} The centered line.\r\n */\r\nvar CenterOn = function (line, x, y)\r\n{\r\n var tx = x - ((line.x1 + line.x2) / 2);\r\n var ty = y - ((line.y1 + line.y2) / 2);\r\n\r\n line.x1 += tx;\r\n line.y1 += ty;\r\n\r\n line.x2 += tx;\r\n line.y2 += ty;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CenterOn.js?")},"./node_modules/phaser/src/geom/line/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Clone the given line.\r\n *\r\n * @function Phaser.Geom.Line.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to clone.\r\n *\r\n * @return {Phaser.Geom.Line} The cloned line.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Line(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Clone.js?')},"./node_modules/phaser/src/geom/line/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one line to a destination line.\r\n *\r\n * @function Phaser.Geom.Line.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to copy the values from.\r\n * @param {Phaser.Geom.Line} dest - The destination line to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Line} The destination line.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CopyFrom.js?")},"./node_modules/phaser/src/geom/line/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compare two lines for strict equality.\r\n *\r\n * @function Phaser.Geom.Line.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The first line to compare.\r\n * @param {Phaser.Geom.Line} toCompare - The second line to compare.\r\n *\r\n * @return {boolean} Whether the two lines are equal.\r\n */\r\nvar Equals = function (line, toCompare)\r\n{\r\n return (\r\n line.x1 === toCompare.x1 &&\r\n line.y1 === toCompare.y1 &&\r\n line.x2 === toCompare.x2 &&\r\n line.y2 === toCompare.y2\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Equals.js?")},"./node_modules/phaser/src/geom/line/Extend.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Extends the start and end points of a Line by the given amounts.\r\n *\r\n * The amounts can be positive or negative. Positive points will increase the length of the line,\r\n * while negative ones will decrease it.\r\n *\r\n * If no `right` value is provided it will extend the length of the line equally in both directions.\r\n *\r\n * Pass a value of zero to leave the start or end point unchanged.\r\n *\r\n * @function Phaser.Geom.Line.Extend\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line instance to extend.\r\n * @param {number} left - The amount to extend the start of the line by.\r\n * @param {number} [right] - The amount to extend the end of the line by. If not given it will be set to the `left` value.\r\n *\r\n * @return {Phaser.Geom.Line} The modified Line instance.\r\n */\r\nvar Extend = function (line, left, right)\r\n{\r\n if (right === undefined) { right = left; }\r\n\r\n var length = Length(line);\r\n\r\n var slopX = line.x2 - line.x1;\r\n var slopY = line.y2 - line.y1;\r\n\r\n if (left)\r\n {\r\n line.x1 = line.x1 - slopX / length * left;\r\n line.y1 = line.y1 - slopY / length * left;\r\n }\r\n\r\n if (right)\r\n {\r\n line.x2 = line.x2 + slopX / length * right;\r\n line.y2 = line.y2 + slopY / length * right;\r\n }\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Extend.js?')},"./node_modules/phaser/src/geom/line/GetMidPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the midpoint of the given line.\r\n *\r\n * @function Phaser.Geom.Line.GetMidPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the midpoint of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the midpoint in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The midpoint of the Line.\r\n */\r\nvar GetMidPoint = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (line.x1 + line.x2) / 2;\r\n out.y = (line.y1 + line.y2) / 2;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetMidPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetMidPoint.js?')},"./node_modules/phaser/src/geom/line/GetNearestPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the nearest point on a line perpendicular to the given point.\r\n *\r\n * @function Phaser.Geom.Line.GetNearestPoint\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the nearest point on.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the nearest point to.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the nearest point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The nearest point on the line.\r\n */\r\nvar GetNearestPoint = function (line, point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var r = (((point.x - x1) * (x2 - x1)) + ((point.y - y1) * (y2 - y1))) / L2;\r\n\r\n out.x = x1 + (r * (x2 - x1));\r\n out.y = y1 + (r * (y2 - y1));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNearestPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNearestPoint.js?')},"./node_modules/phaser/src/geom/line/GetNormal.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculate the normal of the given line.\r\n *\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.GetNormal\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the normal in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The normal of the Line.\r\n */\r\nvar GetNormal = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var a = Angle(line) - MATH_CONST.TAU;\r\n\r\n out.x = Math.cos(a);\r\n out.y = Math.sin(a);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNormal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNormal.js?')},"./node_modules/phaser/src/geom/line/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoint.js?')},"./node_modules/phaser/src/geom/line/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoints.js?')},"./node_modules/phaser/src/geom/line/GetShortestDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Get the shortest distance from a Line to the given Point.\r\n *\r\n * @function Phaser.Geom.Line.GetShortestDistance\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the distance from.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to.\r\n *\r\n * @return {number} The shortest distance from the line to the point.\r\n */\r\nvar GetShortestDistance = function (line, point)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var s = (((y1 - point.y) * (x2 - x1)) - ((x1 - point.x) * (y2 - y1))) / L2;\r\n\r\n return Math.abs(s) * Math.sqrt(L2);\r\n};\r\n\r\nmodule.exports = GetShortestDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetShortestDistance.js?")},"./node_modules/phaser/src/geom/line/Height.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the height of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Height\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the height of.\r\n *\r\n * @return {number} The height of the line.\r\n */\r\nvar Height = function (line)\r\n{\r\n return Math.abs(line.y1 - line.y2);\r\n};\r\n\r\nmodule.exports = Height;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Height.js?")},"./node_modules/phaser/src/geom/line/Length.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Length.js?")},"./node_modules/phaser/src/geom/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {Phaser.Geom.Line} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Line.js?')},"./node_modules/phaser/src/geom/line/NormalAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * Get the angle of the normal of the given line in radians.\r\n *\r\n * @function Phaser.Geom.Line.NormalAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of the normal of.\r\n *\r\n * @return {number} The angle of the normal of the line in radians.\r\n */\r\nvar NormalAngle = function (line)\r\n{\r\n var angle = Angle(line) - MATH_CONST.TAU;\r\n\r\n return Wrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = NormalAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalAngle.js?')},"./node_modules/phaser/src/geom/line/NormalX.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Line.NormalX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line object to get the normal value from.\r\n *\r\n * @return {number} [description]\r\n */\r\nvar NormalX = function (line)\r\n{\r\n return Math.cos(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalX.js?')},"./node_modules/phaser/src/geom/line/NormalY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * The Y value of the normal of the given line.\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.NormalY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n *\r\n * @return {number} The Y value of the normal of the Line.\r\n */\r\nvar NormalY = function (line)\r\n{\r\n return Math.sin(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalY.js?')},"./node_modules/phaser/src/geom/line/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offset a line by the given amount.\r\n *\r\n * @function Phaser.Geom.Line.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to offset.\r\n * @param {number} x - The horizontal offset to add to the line.\r\n * @param {number} y - The vertical offset to add to the line.\r\n *\r\n * @return {Phaser.Geom.Line} The offset line.\r\n */\r\nvar Offset = function (line, x, y)\r\n{\r\n line.x1 += x;\r\n line.y1 += y;\r\n\r\n line.x2 += x;\r\n line.y2 += y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Offset.js?")},"./node_modules/phaser/src/geom/line/PerpSlope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the perpendicular slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.PerpSlope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the perpendicular slope of.\r\n *\r\n * @return {number} The perpendicular slope of the line.\r\n */\r\nvar PerpSlope = function (line)\r\n{\r\n return -((line.x2 - line.x1) / (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = PerpSlope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/PerpSlope.js?")},"./node_modules/phaser/src/geom/line/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Random.js?')},"./node_modules/phaser/src/geom/line/ReflectAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\n\r\n/**\r\n * Calculate the reflected angle between two lines.\r\n *\r\n * This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.\r\n *\r\n * @function Phaser.Geom.Line.ReflectAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} lineA - The first line.\r\n * @param {Phaser.Geom.Line} lineB - The second line.\r\n *\r\n * @return {number} The reflected angle between each line.\r\n */\r\nvar ReflectAngle = function (lineA, lineB)\r\n{\r\n return (2 * NormalAngle(lineB) - Math.PI - Angle(lineA));\r\n};\r\n\r\nmodule.exports = ReflectAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/ReflectAngle.js?')},"./node_modules/phaser/src/geom/line/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around its midpoint by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar Rotate = function (line, angle)\r\n{\r\n var x = (line.x1 + line.x2) / 2;\r\n var y = (line.y1 + line.y2) / 2;\r\n\r\n return RotateAroundXY(line, x, y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Rotate.js?')},"./node_modules/phaser/src/geom/line/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around a point by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundPoint = function (line, point, angle)\r\n{\r\n return RotateAroundXY(line, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/line/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a line around the given coordinates by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} x - The horizontal coordinate to rotate the line around.\r\n * @param {number} y - The vertical coordinate to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundXY = function (line, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = line.x1 - x;\r\n var ty = line.y1 - y;\r\n\r\n line.x1 = tx * c - ty * s + x;\r\n line.y1 = tx * s + ty * c + y;\r\n\r\n tx = line.x2 - x;\r\n ty = line.y2 - y;\r\n\r\n line.x2 = tx * c - ty * s + x;\r\n line.y2 = tx * s + ty * c + y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/line/SetToAngle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set a line to a given position, angle and length.\r\n *\r\n * @function Phaser.Geom.Line.SetToAngle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to set.\r\n * @param {number} x - The horizontal start position of the line.\r\n * @param {number} y - The vertical start position of the line.\r\n * @param {number} angle - The angle of the line in radians.\r\n * @param {number} length - The length of the line.\r\n *\r\n * @return {Phaser.Geom.Line} The updated line.\r\n */\r\nvar SetToAngle = function (line, x, y, angle, length)\r\n{\r\n line.x1 = x;\r\n line.y1 = y;\r\n\r\n line.x2 = x + (Math.cos(angle) * length);\r\n line.y2 = y + (Math.sin(angle) * length);\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = SetToAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/SetToAngle.js?")},"./node_modules/phaser/src/geom/line/Slope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Slope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the slope of.\r\n *\r\n * @return {number} The slope of the line.\r\n */\r\nvar Slope = function (line)\r\n{\r\n return (line.y2 - line.y1) / (line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Slope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Slope.js?")},"./node_modules/phaser/src/geom/line/Width.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the width of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Width\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the width of.\r\n *\r\n * @return {number} The width of the line.\r\n */\r\nvar Width = function (line)\r\n{\r\n return Math.abs(line.x1 - line.x2);\r\n};\r\n\r\nmodule.exports = Width;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Width.js?")},"./node_modules/phaser/src/geom/line/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\nLine.Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nLine.BresenhamPoints = __webpack_require__(/*! ./BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\nLine.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/line/CenterOn.js");\r\nLine.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/line/Clone.js");\r\nLine.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/line/CopyFrom.js");\r\nLine.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/line/Equals.js");\r\nLine.Extend = __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/geom/line/Extend.js");\r\nLine.GetMidPoint = __webpack_require__(/*! ./GetMidPoint */ "./node_modules/phaser/src/geom/line/GetMidPoint.js");\r\nLine.GetNearestPoint = __webpack_require__(/*! ./GetNearestPoint */ "./node_modules/phaser/src/geom/line/GetNearestPoint.js");\r\nLine.GetNormal = __webpack_require__(/*! ./GetNormal */ "./node_modules/phaser/src/geom/line/GetNormal.js");\r\nLine.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nLine.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nLine.GetShortestDistance = __webpack_require__(/*! ./GetShortestDistance */ "./node_modules/phaser/src/geom/line/GetShortestDistance.js");\r\nLine.Height = __webpack_require__(/*! ./Height */ "./node_modules/phaser/src/geom/line/Height.js");\r\nLine.Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nLine.NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\nLine.NormalX = __webpack_require__(/*! ./NormalX */ "./node_modules/phaser/src/geom/line/NormalX.js");\r\nLine.NormalY = __webpack_require__(/*! ./NormalY */ "./node_modules/phaser/src/geom/line/NormalY.js");\r\nLine.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/line/Offset.js");\r\nLine.PerpSlope = __webpack_require__(/*! ./PerpSlope */ "./node_modules/phaser/src/geom/line/PerpSlope.js");\r\nLine.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nLine.ReflectAngle = __webpack_require__(/*! ./ReflectAngle */ "./node_modules/phaser/src/geom/line/ReflectAngle.js");\r\nLine.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/line/Rotate.js");\r\nLine.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/line/RotateAroundPoint.js");\r\nLine.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\nLine.SetToAngle = __webpack_require__(/*! ./SetToAngle */ "./node_modules/phaser/src/geom/line/SetToAngle.js");\r\nLine.Slope = __webpack_require__(/*! ./Slope */ "./node_modules/phaser/src/geom/line/Slope.js");\r\nLine.Width = __webpack_require__(/*! ./Width */ "./node_modules/phaser/src/geom/line/Width.js");\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/index.js?')},"./node_modules/phaser/src/geom/point/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to ceil.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.ceil()` applied to its coordinates.\r\n */\r\nvar Ceil = function (point)\r\n{\r\n return point.setTo(Math.ceil(point.x), Math.ceil(point.y));\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Ceil.js?")},"./node_modules/phaser/src/geom/point/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Clone the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to clone.\r\n *\r\n * @return {Phaser.Geom.Point} The cloned Point.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Point(source.x, source.y);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Clone.js?')},"./node_modules/phaser/src/geom/point/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Point to a destination Point.\r\n *\r\n * @function Phaser.Geom.Point.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to copy the values from.\r\n * @param {Phaser.Geom.Point} dest - The destination Point to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Point} The destination Point.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/CopyFrom.js?")},"./node_modules/phaser/src/geom/point/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A comparison of two `Point` objects to see if they are equal.\r\n *\r\n * @function Phaser.Geom.Point.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The original `Point` to compare against.\r\n * @param {Phaser.Geom.Point} toCompare - The second `Point` to compare.\r\n *\r\n * @return {boolean} Returns true if the both `Point` objects are equal.\r\n */\r\nvar Equals = function (point, toCompare)\r\n{\r\n return (point.x === toCompare.x && point.y === toCompare.y);\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Equals.js?")},"./node_modules/phaser/src/geom/point/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to floor.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.floor()` applied to its coordinates.\r\n */\r\nvar Floor = function (point)\r\n{\r\n return point.setTo(Math.floor(point.x), Math.floor(point.y));\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Floor.js?")},"./node_modules/phaser/src/geom/point/GetCentroid.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ \"./node_modules/phaser/src/geom/point/Point.js\");\r\n\r\n/**\r\n * Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).\r\n * Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.\r\n *\r\n * @function Phaser.Geom.Point.GetCentroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetCentroid = function (points, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n throw new Error('GetCentroid points argument must be an array');\r\n }\r\n\r\n var len = points.length;\r\n\r\n if (len < 1)\r\n {\r\n throw new Error('GetCentroid points array must not be empty');\r\n }\r\n else if (len === 1)\r\n {\r\n out.x = points[0].x;\r\n out.y = points[0].y;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < len; i++)\r\n {\r\n out.x += points[i].x;\r\n out.y += points[i].y;\r\n }\r\n\r\n out.x /= len;\r\n out.y /= len;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCentroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetCentroid.js?")},"./node_modules/phaser/src/geom/point/GetMagnitude.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the magnitude of the point, which equivalent to the length of the line from the origin to this point.\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The point to calculate the magnitude for\r\n *\r\n * @return {number} The resulting magnitude\r\n */\r\nvar GetMagnitude = function (point)\r\n{\r\n return Math.sqrt((point.x * point.x) + (point.y * point.y));\r\n};\r\n\r\nmodule.exports = GetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitude.js?")},"./node_modules/phaser/src/geom/point/GetMagnitudeSq.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the square of magnitude of given point.(Can be used for fast magnitude calculation of point)\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitudeSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - Returns square of the magnitude/length of given point.\r\n *\r\n * @return {number} Returns square of the magnitude of given point.\r\n */\r\nvar GetMagnitudeSq = function (point)\r\n{\r\n return (point.x * point.x) + (point.y * point.y);\r\n};\r\n\r\nmodule.exports = GetMagnitudeSq;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitudeSq.js?")},"./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.\r\n *\r\n * @function Phaser.Geom.Point.GetRectangleFromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Rectangle} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Rectangle} [description]\r\n */\r\nvar GetRectangleFromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var xMax = Number.NEGATIVE_INFINITY;\r\n var xMin = Number.POSITIVE_INFINITY;\r\n var yMax = Number.NEGATIVE_INFINITY;\r\n var yMin = Number.POSITIVE_INFINITY;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var point = points[i];\r\n\r\n if (point.x > xMax)\r\n {\r\n xMax = point.x;\r\n }\r\n\r\n if (point.x < xMin)\r\n {\r\n xMin = point.x;\r\n }\r\n\r\n if (point.y > yMax)\r\n {\r\n yMax = point.y;\r\n }\r\n\r\n if (point.y < yMin)\r\n {\r\n yMin = point.y;\r\n }\r\n }\r\n\r\n out.x = xMin;\r\n out.y = yMin;\r\n out.width = xMax - xMin;\r\n out.height = yMax - yMin;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleFromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js?')},"./node_modules/phaser/src/geom/point/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Interpolate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - The starting `Point` for the interpolation.\r\n * @param {Phaser.Geom.Point} pointB - The target `Point` for the interpolation.\r\n * @param {number} [t=0] - The amount to interpolate between the two points. Generally, a value between 0 (returns the starting `Point`) and 1 (returns the target `Point`). If omitted, 0 is used.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional `Point` object whose `x` and `y` values will be set to the result of the interpolation (can also be any object with `x` and `y` properties). If omitted, a new `Point` created and returned.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Either the object from the `out` argument with the properties `x` and `y` set to the result of the interpolation or a newly created `Point` object.\r\n */\r\nvar Interpolate = function (pointA, pointB, t, out)\r\n{\r\n if (t === undefined) { t = 0; }\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = pointA.x + ((pointB.x - pointA.x) * t);\r\n out.y = pointA.y + ((pointB.y - pointA.y) * t);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Interpolate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Interpolate.js?')},"./node_modules/phaser/src/geom/point/Invert.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the X and the Y coordinate of a point.\r\n *\r\n * @function Phaser.Geom.Point.Invert\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to modify.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `point`.\r\n */\r\nvar Invert = function (point)\r\n{\r\n return point.setTo(point.y, point.x);\r\n};\r\n\r\nmodule.exports = Invert;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Invert.js?")},"./node_modules/phaser/src/geom/point/Negative.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Inverts a Point\'s coordinates.\r\n *\r\n * @function Phaser.Geom.Point.Negative\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to invert.\r\n * @param {Phaser.Geom.Point} [out] - The Point to return the inverted coordinates in.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` Point, or a new Point if none was provided.\r\n */\r\nvar Negative = function (point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n return out.setTo(-point.x, -point.y);\r\n};\r\n\r\nmodule.exports = Negative;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Negative.js?')},"./node_modules/phaser/src/geom/point/Point.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {Phaser.Geom.Point} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Point.js?')},"./node_modules/phaser/src/geom/point/Project.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Project\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Project = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var dot = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n var amt = dot / GetMagnitudeSq(pointB);\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Project;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Project.js?')},"./node_modules/phaser/src/geom/point/ProjectUnit.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.ProjectUnit\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar ProjectUnit = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var amt = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ProjectUnit;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/ProjectUnit.js?')},"./node_modules/phaser/src/geom/point/SetMagnitude.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\n\r\n/**\r\n * Changes the magnitude (length) of a two-dimensional vector without changing its direction.\r\n *\r\n * @function Phaser.Geom.Point.SetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to treat as the end point of the vector.\r\n * @param {number} magnitude - The new magnitude of the vector.\r\n *\r\n * @return {Phaser.Geom.Point} The modified Point.\r\n */\r\nvar SetMagnitude = function (point, magnitude)\r\n{\r\n if (point.x !== 0 || point.y !== 0)\r\n {\r\n var m = GetMagnitude(point);\r\n\r\n point.x /= m;\r\n point.y /= m;\r\n }\r\n\r\n point.x *= magnitude;\r\n point.y *= magnitude;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = SetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/SetMagnitude.js?')},"./node_modules/phaser/src/geom/point/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nPoint.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/point/Ceil.js");\r\nPoint.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/point/Clone.js");\r\nPoint.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/point/CopyFrom.js");\r\nPoint.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/point/Equals.js");\r\nPoint.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/point/Floor.js");\r\nPoint.GetCentroid = __webpack_require__(/*! ./GetCentroid */ "./node_modules/phaser/src/geom/point/GetCentroid.js");\r\nPoint.GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\nPoint.GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\nPoint.GetRectangleFromPoints = __webpack_require__(/*! ./GetRectangleFromPoints */ "./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js");\r\nPoint.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/geom/point/Interpolate.js");\r\nPoint.Invert = __webpack_require__(/*! ./Invert */ "./node_modules/phaser/src/geom/point/Invert.js");\r\nPoint.Negative = __webpack_require__(/*! ./Negative */ "./node_modules/phaser/src/geom/point/Negative.js");\r\nPoint.Project = __webpack_require__(/*! ./Project */ "./node_modules/phaser/src/geom/point/Project.js");\r\nPoint.ProjectUnit = __webpack_require__(/*! ./ProjectUnit */ "./node_modules/phaser/src/geom/point/ProjectUnit.js");\r\nPoint.SetMagnitude = __webpack_require__(/*! ./SetMagnitude */ "./node_modules/phaser/src/geom/point/SetMagnitude.js");\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/index.js?')},"./node_modules/phaser/src/geom/polygon/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\n/**\r\n * Create a new polygon which is a copy of the specified polygon\r\n *\r\n * @function Phaser.Geom.Polygon.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to create a clone of\r\n *\r\n * @return {Phaser.Geom.Polygon} A new separate Polygon cloned from the specified polygon, based on the same points.\r\n */\r\nvar Clone = function (polygon)\r\n{\r\n return new Polygon(polygon.points);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Clone.js?')},"./node_modules/phaser/src/geom/polygon/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Checks whether the x and y coordinates are contained within this polygon.\r\n// Adapted from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html by Jonas Raoni Soares Silva\r\n\r\n/**\r\n * Checks if a point is within the bounds of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to check against.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the bounds of the Polygon, otherwise `false`.\r\n */\r\nvar Contains = function (polygon, x, y)\r\n{\r\n var inside = false;\r\n\r\n for (var i = -1, j = polygon.points.length - 1; ++i < polygon.points.length; j = i)\r\n {\r\n var ix = polygon.points[i].x;\r\n var iy = polygon.points[i].y;\r\n\r\n var jx = polygon.points[j].x;\r\n var jy = polygon.points[j].y;\r\n\r\n if (((iy <= y && y < jy) || (jy <= y && y < iy)) && (x < (jx - ix) * (y - iy) / (jy - iy) + ix))\r\n {\r\n inside = !inside;\r\n }\r\n }\r\n\r\n return inside;\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Contains.js?")},"./node_modules/phaser/src/geom/polygon/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Polygon.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - [description]\r\n * @param {Phaser.Geom.Point} point - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\nvar ContainsPoint = function (polygon, point)\r\n{\r\n return Contains(polygon, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/ContainsPoint.js?')},"./node_modules/phaser/src/geom/polygon/Earcut.js":function(module,exports,__webpack_require__){"use strict";eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Earcut 2.1.4 (December 4th 2018)\r\n\r\n/*\r\n * ISC License\r\n * \r\n * Copyright (c) 2016, Mapbox\r\n * \r\n * Permission to use, copy, modify, and/or distribute this software for any purpose\r\n * with or without fee is hereby granted, provided that the above copyright notice\r\n * and this permission notice appear in all copies.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r\n * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\r\n * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\r\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r\n * THIS SOFTWARE.\r\n */\r\n\r\n\r\n\r\nmodule.exports = earcut;\r\n\r\nfunction earcut(data, holeIndices, dim) {\r\n\r\n dim = dim || 2;\r\n\r\n var hasHoles = holeIndices && holeIndices.length,\r\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\r\n outerNode = linkedList(data, 0, outerLen, dim, true),\r\n triangles = [];\r\n\r\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\r\n\r\n var minX, minY, maxX, maxY, x, y, invSize;\r\n\r\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\r\n\r\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\r\n if (data.length > 80 * dim) {\r\n minX = maxX = data[0];\r\n minY = maxY = data[1];\r\n\r\n for (var i = dim; i < outerLen; i += dim) {\r\n x = data[i];\r\n y = data[i + 1];\r\n if (x < minX) minX = x;\r\n if (y < minY) minY = y;\r\n if (x > maxX) maxX = x;\r\n if (y > maxY) maxY = y;\r\n }\r\n\r\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\r\n invSize = Math.max(maxX - minX, maxY - minY);\r\n invSize = invSize !== 0 ? 1 / invSize : 0;\r\n }\r\n\r\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\r\n\r\n return triangles;\r\n}\r\n\r\n// create a circular doubly linked list from polygon points in the specified winding order\r\nfunction linkedList(data, start, end, dim, clockwise) {\r\n var i, last;\r\n\r\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\r\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\r\n } else {\r\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\r\n }\r\n\r\n if (last && equals(last, last.next)) {\r\n removeNode(last);\r\n last = last.next;\r\n }\r\n\r\n return last;\r\n}\r\n\r\n// eliminate colinear or duplicate points\r\nfunction filterPoints(start, end) {\r\n if (!start) return start;\r\n if (!end) end = start;\r\n\r\n var p = start,\r\n again;\r\n do {\r\n again = false;\r\n\r\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\r\n removeNode(p);\r\n p = end = p.prev;\r\n if (p === p.next) break;\r\n again = true;\r\n\r\n } else {\r\n p = p.next;\r\n }\r\n } while (again || p !== end);\r\n\r\n return end;\r\n}\r\n\r\n// main ear slicing loop which triangulates a polygon (given as a linked list)\r\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\r\n if (!ear) return;\r\n\r\n // interlink polygon nodes in z-order\r\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\r\n\r\n var stop = ear,\r\n prev, next;\r\n\r\n // iterate through ears, slicing them one by one\r\n while (ear.prev !== ear.next) {\r\n prev = ear.prev;\r\n next = ear.next;\r\n\r\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\r\n // cut off the triangle\r\n triangles.push(prev.i / dim);\r\n triangles.push(ear.i / dim);\r\n triangles.push(next.i / dim);\r\n\r\n removeNode(ear);\r\n\r\n // skipping the next vertex leads to less sliver triangles\r\n ear = next.next;\r\n stop = next.next;\r\n\r\n continue;\r\n }\r\n\r\n ear = next;\r\n\r\n // if we looped through the whole remaining polygon and can't find any more ears\r\n if (ear === stop) {\r\n // try filtering points and slicing again\r\n if (!pass) {\r\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\r\n\r\n // if this didn't work, try curing all small self-intersections locally\r\n } else if (pass === 1) {\r\n ear = cureLocalIntersections(ear, triangles, dim);\r\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\r\n\r\n // as a last resort, try splitting the remaining polygon into two\r\n } else if (pass === 2) {\r\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n}\r\n\r\n// check whether a polygon node forms a valid ear with adjacent nodes\r\nfunction isEar(ear) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // now make sure we don't have other points inside the potential ear\r\n var p = ear.next.next;\r\n\r\n while (p !== ear.prev) {\r\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.next;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nfunction isEarHashed(ear, minX, minY, invSize) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // triangle bbox; min & max are calculated like this for speed\r\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\r\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\r\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\r\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\r\n\r\n // z-order range for the current triangle bbox;\r\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\r\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\r\n\r\n var p = ear.prevZ,\r\n n = ear.nextZ;\r\n\r\n // look for points inside the triangle in both directions\r\n while (p && p.z >= minZ && n && n.z <= maxZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n // look for remaining points in decreasing z-order\r\n while (p && p.z >= minZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n }\r\n\r\n // look for remaining points in increasing z-order\r\n while (n && n.z <= maxZ) {\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n return true;\r\n}\r\n\r\n// go through all polygon nodes and cure small local self-intersections\r\nfunction cureLocalIntersections(start, triangles, dim) {\r\n var p = start;\r\n do {\r\n var a = p.prev,\r\n b = p.next.next;\r\n\r\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\r\n\r\n triangles.push(a.i / dim);\r\n triangles.push(p.i / dim);\r\n triangles.push(b.i / dim);\r\n\r\n // remove two nodes involved\r\n removeNode(p);\r\n removeNode(p.next);\r\n\r\n p = start = b;\r\n }\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return p;\r\n}\r\n\r\n// try splitting polygon into two and triangulate them independently\r\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\r\n // look for a valid diagonal that divides the polygon into two\r\n var a = start;\r\n do {\r\n var b = a.next.next;\r\n while (b !== a.prev) {\r\n if (a.i !== b.i && isValidDiagonal(a, b)) {\r\n // split the polygon in two by the diagonal\r\n var c = splitPolygon(a, b);\r\n\r\n // filter colinear points around the cuts\r\n a = filterPoints(a, a.next);\r\n c = filterPoints(c, c.next);\r\n\r\n // run earcut on each half\r\n earcutLinked(a, triangles, dim, minX, minY, invSize);\r\n earcutLinked(c, triangles, dim, minX, minY, invSize);\r\n return;\r\n }\r\n b = b.next;\r\n }\r\n a = a.next;\r\n } while (a !== start);\r\n}\r\n\r\n// link every hole into the outer loop, producing a single-ring polygon without holes\r\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\r\n var queue = [],\r\n i, len, start, end, list;\r\n\r\n for (i = 0, len = holeIndices.length; i < len; i++) {\r\n start = holeIndices[i] * dim;\r\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n list = linkedList(data, start, end, dim, false);\r\n if (list === list.next) list.steiner = true;\r\n queue.push(getLeftmost(list));\r\n }\r\n\r\n queue.sort(compareX);\r\n\r\n // process holes from left to right\r\n for (i = 0; i < queue.length; i++) {\r\n eliminateHole(queue[i], outerNode);\r\n outerNode = filterPoints(outerNode, outerNode.next);\r\n }\r\n\r\n return outerNode;\r\n}\r\n\r\nfunction compareX(a, b) {\r\n return a.x - b.x;\r\n}\r\n\r\n// find a bridge between vertices that connects hole with an outer ring and and link it\r\nfunction eliminateHole(hole, outerNode) {\r\n outerNode = findHoleBridge(hole, outerNode);\r\n if (outerNode) {\r\n var b = splitPolygon(outerNode, hole);\r\n filterPoints(b, b.next);\r\n }\r\n}\r\n\r\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\r\nfunction findHoleBridge(hole, outerNode) {\r\n var p = outerNode,\r\n hx = hole.x,\r\n hy = hole.y,\r\n qx = -Infinity,\r\n m;\r\n\r\n // find a segment intersected by a ray from the hole's leftmost point to the left;\r\n // segment's endpoint with lesser x will be potential connection point\r\n do {\r\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\r\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\r\n if (x <= hx && x > qx) {\r\n qx = x;\r\n if (x === hx) {\r\n if (hy === p.y) return p;\r\n if (hy === p.next.y) return p.next;\r\n }\r\n m = p.x < p.next.x ? p : p.next;\r\n }\r\n }\r\n p = p.next;\r\n } while (p !== outerNode);\r\n\r\n if (!m) return null;\r\n\r\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\r\n\r\n // look for points inside the triangle of hole point, segment intersection and endpoint;\r\n // if there are no points found, we have a valid connection;\r\n // otherwise choose the point of the minimum angle with the ray as connection point\r\n\r\n var stop = m,\r\n mx = m.x,\r\n my = m.y,\r\n tanMin = Infinity,\r\n tan;\r\n\r\n p = m.next;\r\n\r\n while (p !== stop) {\r\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\r\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\r\n\r\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\r\n\r\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\r\n m = p;\r\n tanMin = tan;\r\n }\r\n }\r\n\r\n p = p.next;\r\n }\r\n\r\n return m;\r\n}\r\n\r\n// interlink polygon nodes in z-order\r\nfunction indexCurve(start, minX, minY, invSize) {\r\n var p = start;\r\n do {\r\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\r\n p.prevZ = p.prev;\r\n p.nextZ = p.next;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n p.prevZ.nextZ = null;\r\n p.prevZ = null;\r\n\r\n sortLinked(p);\r\n}\r\n\r\n// Simon Tatham's linked list merge sort algorithm\r\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\r\nfunction sortLinked(list) {\r\n var i, p, q, e, tail, numMerges, pSize, qSize,\r\n inSize = 1;\r\n\r\n do {\r\n p = list;\r\n list = null;\r\n tail = null;\r\n numMerges = 0;\r\n\r\n while (p) {\r\n numMerges++;\r\n q = p;\r\n pSize = 0;\r\n for (i = 0; i < inSize; i++) {\r\n pSize++;\r\n q = q.nextZ;\r\n if (!q) break;\r\n }\r\n qSize = inSize;\r\n\r\n while (pSize > 0 || (qSize > 0 && q)) {\r\n\r\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\r\n e = p;\r\n p = p.nextZ;\r\n pSize--;\r\n } else {\r\n e = q;\r\n q = q.nextZ;\r\n qSize--;\r\n }\r\n\r\n if (tail) tail.nextZ = e;\r\n else list = e;\r\n\r\n e.prevZ = tail;\r\n tail = e;\r\n }\r\n\r\n p = q;\r\n }\r\n\r\n tail.nextZ = null;\r\n inSize *= 2;\r\n\r\n } while (numMerges > 1);\r\n\r\n return list;\r\n}\r\n\r\n// z-order of a point given coords and inverse of the longer side of data bbox\r\nfunction zOrder(x, y, minX, minY, invSize) {\r\n // coords are transformed into non-negative 15-bit integer range\r\n x = 32767 * (x - minX) * invSize;\r\n y = 32767 * (y - minY) * invSize;\r\n\r\n x = (x | (x << 8)) & 0x00FF00FF;\r\n x = (x | (x << 4)) & 0x0F0F0F0F;\r\n x = (x | (x << 2)) & 0x33333333;\r\n x = (x | (x << 1)) & 0x55555555;\r\n\r\n y = (y | (y << 8)) & 0x00FF00FF;\r\n y = (y | (y << 4)) & 0x0F0F0F0F;\r\n y = (y | (y << 2)) & 0x33333333;\r\n y = (y | (y << 1)) & 0x55555555;\r\n\r\n return x | (y << 1);\r\n}\r\n\r\n// find the leftmost node of a polygon ring\r\nfunction getLeftmost(start) {\r\n var p = start,\r\n leftmost = start;\r\n do {\r\n if (p.x < leftmost.x) leftmost = p;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return leftmost;\r\n}\r\n\r\n// check if a point lies within a convex triangle\r\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\r\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\r\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\r\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\r\n}\r\n\r\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\r\nfunction isValidDiagonal(a, b) {\r\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\r\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\r\n}\r\n\r\n// signed area of a triangle\r\nfunction area(p, q, r) {\r\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\r\n}\r\n\r\n// check if two points are equal\r\nfunction equals(p1, p2) {\r\n return p1.x === p2.x && p1.y === p2.y;\r\n}\r\n\r\n// check if two segments intersect\r\nfunction intersects(p1, q1, p2, q2) {\r\n if ((equals(p1, q1) && equals(p2, q2)) ||\r\n (equals(p1, q2) && equals(p2, q1))) return true;\r\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\r\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\r\n}\r\n\r\n// check if a polygon diagonal intersects any polygon segments\r\nfunction intersectsPolygon(a, b) {\r\n var p = a;\r\n do {\r\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\r\n intersects(p, p.next, a, b)) return true;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return false;\r\n}\r\n\r\n// check if a polygon diagonal is locally inside the polygon\r\nfunction locallyInside(a, b) {\r\n return area(a.prev, a, a.next) < 0 ?\r\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\r\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\r\n}\r\n\r\n// check if the middle point of a polygon diagonal is inside the polygon\r\nfunction middleInside(a, b) {\r\n var p = a,\r\n inside = false,\r\n px = (a.x + b.x) / 2,\r\n py = (a.y + b.y) / 2;\r\n do {\r\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\r\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\r\n inside = !inside;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return inside;\r\n}\r\n\r\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\r\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\r\nfunction splitPolygon(a, b) {\r\n var a2 = new Node(a.i, a.x, a.y),\r\n b2 = new Node(b.i, b.x, b.y),\r\n an = a.next,\r\n bp = b.prev;\r\n\r\n a.next = b;\r\n b.prev = a;\r\n\r\n a2.next = an;\r\n an.prev = a2;\r\n\r\n b2.next = a2;\r\n a2.prev = b2;\r\n\r\n bp.next = b2;\r\n b2.prev = bp;\r\n\r\n return b2;\r\n}\r\n\r\n// create a node and optionally link it with previous one (in a circular doubly linked list)\r\nfunction insertNode(i, x, y, last) {\r\n var p = new Node(i, x, y);\r\n\r\n if (!last) {\r\n p.prev = p;\r\n p.next = p;\r\n\r\n } else {\r\n p.next = last.next;\r\n p.prev = last;\r\n last.next.prev = p;\r\n last.next = p;\r\n }\r\n return p;\r\n}\r\n\r\nfunction removeNode(p) {\r\n p.next.prev = p.prev;\r\n p.prev.next = p.next;\r\n\r\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\r\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\r\n}\r\n\r\nfunction Node(i, x, y) {\r\n // vertex index in coordinates array\r\n this.i = i;\r\n\r\n // vertex coordinates\r\n this.x = x;\r\n this.y = y;\r\n\r\n // previous and next vertex nodes in a polygon ring\r\n this.prev = null;\r\n this.next = null;\r\n\r\n // z-order curve value\r\n this.z = null;\r\n\r\n // previous and next nodes in z-order\r\n this.prevZ = null;\r\n this.nextZ = null;\r\n\r\n // indicates whether this is a steiner point\r\n this.steiner = false;\r\n}\r\n\r\n// return a percentage difference between the polygon area and its triangulation area;\r\n// used to verify correctness of triangulation\r\nearcut.deviation = function (data, holeIndices, dim, triangles) {\r\n var hasHoles = holeIndices && holeIndices.length;\r\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\r\n\r\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\r\n if (hasHoles) {\r\n for (var i = 0, len = holeIndices.length; i < len; i++) {\r\n var start = holeIndices[i] * dim;\r\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\r\n }\r\n }\r\n\r\n var trianglesArea = 0;\r\n for (i = 0; i < triangles.length; i += 3) {\r\n var a = triangles[i] * dim;\r\n var b = triangles[i + 1] * dim;\r\n var c = triangles[i + 2] * dim;\r\n trianglesArea += Math.abs(\r\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\r\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\r\n }\r\n\r\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\r\n Math.abs((trianglesArea - polygonArea) / polygonArea);\r\n};\r\n\r\nfunction signedArea(data, start, end, dim) {\r\n var sum = 0;\r\n for (var i = start, j = end - dim; i < end; i += dim) {\r\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\r\n j = i;\r\n }\r\n return sum;\r\n}\r\n\r\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\r\nearcut.flatten = function (data) {\r\n var dim = data[0][0].length,\r\n result = {vertices: [], holes: [], dimensions: dim},\r\n holeIndex = 0;\r\n\r\n for (var i = 0; i < data.length; i++) {\r\n for (var j = 0; j < data[i].length; j++) {\r\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\r\n }\r\n if (i > 0) {\r\n holeIndex += data[i - 1].length;\r\n result.holes.push(holeIndex);\r\n }\r\n }\r\n return result;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Earcut.js?")},"./node_modules/phaser/src/geom/polygon/GetAABB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the bounding AABB rectangle of a polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.GetAABB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon that should be calculated.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - The rectangle or object that has x, y, width, and height properties to store the result. Optional.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The resulting rectangle or object that is passed in with position and dimensions of the polygon\'s AABB.\r\n */\r\nvar GetAABB = function (polygon, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var minX = Infinity;\r\n var minY = Infinity;\r\n var maxX = -minX;\r\n var maxY = -minY;\r\n var p;\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n p = polygon.points[i];\r\n\r\n minX = Math.min(minX, p.x);\r\n minY = Math.min(minY, p.y);\r\n maxX = Math.max(maxX, p.x);\r\n maxY = Math.max(maxY, p.y);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetAABB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetAABB.js?')},"./node_modules/phaser/src/geom/polygon/GetNumberArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]\r\n\r\n/**\r\n * Stores all of the points of a Polygon into a flat array of numbers following the sequence [ x,y, x,y, x,y ],\r\n * i.e. each point of the Polygon, in the order it's defined, corresponds to two elements of the resultant\r\n * array for the point's X and Y coordinate.\r\n *\r\n * @function Phaser.Geom.Polygon.GetNumberArray\r\n * @since 3.0.0\r\n *\r\n * @generic {number[]} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon whose points to export.\r\n * @param {(array|number[])} [output] - An array to which the points' coordinates should be appended.\r\n *\r\n * @return {(array|number[])} The modified `output` array, or a new array if none was given.\r\n */\r\nvar GetNumberArray = function (polygon, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n output.push(polygon.points[i].x);\r\n output.push(polygon.points[i].y);\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetNumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetNumberArray.js?")},"./node_modules/phaser/src/geom/polygon/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Polygon.GetPoints\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\nvar GetPoints = function (polygon, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var points = polygon.points;\r\n var perimeter = Perimeter(polygon);\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = perimeter * (i / quantity);\r\n var accumulatedPerimeter = 0;\r\n\r\n for (var j = 0; j < points.length; j++)\r\n {\r\n var pointA = points[j];\r\n var pointB = points[(j + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n var length = Length(line);\r\n\r\n if (position < accumulatedPerimeter || position > accumulatedPerimeter + length)\r\n {\r\n accumulatedPerimeter += length;\r\n continue;\r\n }\r\n\r\n var point = line.getPoint((position - accumulatedPerimeter) / length);\r\n out.push(point);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetPoints.js?')},"./node_modules/phaser/src/geom/polygon/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Returns the perimeter of the given Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Perimeter\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the perimeter of.\r\n *\r\n * @return {number} The perimeter of the Polygon.\r\n */\r\nvar Perimeter = function (polygon)\r\n{\r\n var points = polygon.points;\r\n var perimeter = 0;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var pointA = points[i];\r\n var pointB = points[(i + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n\r\n perimeter += Length(line);\r\n }\r\n\r\n return perimeter;\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Perimeter.js?')},"./node_modules/phaser/src/geom/polygon/Polygon.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Contains = __webpack_require__(/*! ./Contains */ \"./node_modules/phaser/src/geom/polygon/Contains.js\");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ \"./node_modules/phaser/src/geom/polygon/GetPoints.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/geom/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Polygon object\r\n *\r\n\r\n * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.\r\n * Several formats are supported to define the list of points, check the setTo method for details. \r\n * This is a geometry object allowing you to define and inspect the shape.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Polygon you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Polygon\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported: \r\n * - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n */\r\nvar Polygon = new Class({\r\n\r\n initialize:\r\n\r\n function Polygon (points)\r\n {\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POLYGON`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Polygon#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POLYGON;\r\n\r\n /**\r\n * The area of this Polygon.\r\n *\r\n * @name Phaser.Geom.Polygon#area\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.area = 0;\r\n\r\n /**\r\n * An array of number pair objects that make up this polygon. I.e. [ {x,y}, {x,y}, {x,y} ]\r\n *\r\n * @name Phaser.Geom.Polygon#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n if (points)\r\n {\r\n this.setTo(points);\r\n }\r\n },\r\n\r\n /**\r\n * Check to see if the Polygon contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Polygon#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the polygon.\r\n * @param {number} y - The y coordinate to check within the polygon.\r\n *\r\n * @return {boolean} `true` if the coordinates are within the polygon, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Sets this Polygon to the given points.\r\n *\r\n * The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n *\r\n * `setTo` may also be called without any arguments to remove all points.\r\n *\r\n * @method Phaser.Geom.Polygon#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.\r\n *\r\n * @return {Phaser.Geom.Polygon} This Polygon object.\r\n */\r\n setTo: function (points)\r\n {\r\n this.area = 0;\r\n this.points = [];\r\n\r\n if (typeof points === 'string')\r\n {\r\n points = points.split(' ');\r\n }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n return this;\r\n }\r\n\r\n var p;\r\n var y0 = Number.MAX_VALUE;\r\n\r\n // The points argument is an array, so iterate through it\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = { x: 0, y: 0 };\r\n\r\n if (typeof points[i] === 'number' || typeof points[i] === 'string')\r\n {\r\n p.x = parseFloat(points[i]);\r\n p.y = parseFloat(points[i + 1]);\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n\r\n // Lowest boundary\r\n if (p.y < y0)\r\n {\r\n y0 = p.y;\r\n }\r\n }\r\n\r\n this.calculateArea(y0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates the area of the Polygon. This is available in the property Polygon.area\r\n *\r\n * @method Phaser.Geom.Polygon#calculateArea\r\n * @since 3.0.0\r\n *\r\n * @return {number} The area of the polygon.\r\n */\r\n calculateArea: function ()\r\n {\r\n if (this.points.length < 3)\r\n {\r\n this.area = 0;\r\n\r\n return this.area;\r\n }\r\n\r\n var sum = 0;\r\n var p1;\r\n var p2;\r\n\r\n for (var i = 0; i < this.points.length - 1; i++)\r\n {\r\n p1 = this.points[i];\r\n p2 = this.points[i + 1];\r\n\r\n sum += (p2.x - p1.x) * (p1.y + p2.y);\r\n }\r\n\r\n p1 = this.points[0];\r\n p2 = this.points[this.points.length - 1];\r\n\r\n sum += (p1.x - p2.x) * (p2.y + p1.y);\r\n\r\n this.area = -sum * 0.5;\r\n\r\n return this.area;\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Polygon#getPoints\r\n * @since 3.12.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\n getPoints: function (quantity, step, output)\r\n {\r\n return GetPoints(this, quantity, step, output);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Polygon.js?")},"./node_modules/phaser/src/geom/polygon/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the order of the points of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Reverse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to modify.\r\n *\r\n * @return {Phaser.Geom.Polygon} The modified Polygon.\r\n */\r\nvar Reverse = function (polygon)\r\n{\r\n polygon.points.reverse();\r\n\r\n return polygon;\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Reverse.js?")},"./node_modules/phaser/src/geom/polygon/Smooth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Igor Ognichenko \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar copy = function (out, a)\r\n{\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n \r\n return out;\r\n};\r\n\r\n/**\r\n * Takes a Polygon object and applies Chaikin's smoothing algorithm on its points.\r\n *\r\n * @function Phaser.Geom.Polygon.Smooth\r\n * @since 3.13.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to be smoothed. The polygon will be modified in-place and returned.\r\n *\r\n * @return {Phaser.Geom.Polygon} The input polygon.\r\n */\r\nvar Smooth = function (polygon)\r\n{\r\n var i;\r\n var points = [];\r\n var data = polygon.points;\r\n\r\n for (i = 0; i < data.length; i++)\r\n {\r\n points.push([ data[i].x, data[i].y ]);\r\n }\r\n\r\n var output = [];\r\n \r\n if (points.length > 0)\r\n {\r\n output.push(copy([ 0, 0 ], points[0]));\r\n }\r\n \r\n for (i = 0; i < points.length - 1; i++)\r\n {\r\n var p0 = points[i];\r\n var p1 = points[i + 1];\r\n var p0x = p0[0];\r\n var p0y = p0[1];\r\n var p1x = p1[0];\r\n var p1y = p1[1];\r\n\r\n output.push([ 0.85 * p0x + 0.15 * p1x, 0.85 * p0y + 0.15 * p1y ]);\r\n output.push([ 0.15 * p0x + 0.85 * p1x, 0.15 * p0y + 0.85 * p1y ]);\r\n }\r\n \r\n if (points.length > 1)\r\n {\r\n output.push(copy([ 0, 0 ], points[points.length - 1]));\r\n }\r\n \r\n return polygon.setTo(output);\r\n};\r\n\r\nmodule.exports = Smooth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Smooth.js?")},"./node_modules/phaser/src/geom/polygon/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\nPolygon.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/polygon/Clone.js");\r\nPolygon.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\nPolygon.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/polygon/ContainsPoint.js");\r\nPolygon.GetAABB = __webpack_require__(/*! ./GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nPolygon.GetNumberArray = __webpack_require__(/*! ./GetNumberArray */ "./node_modules/phaser/src/geom/polygon/GetNumberArray.js");\r\nPolygon.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/polygon/GetPoints.js");\r\nPolygon.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\nPolygon.Reverse = __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/geom/polygon/Reverse.js");\r\nPolygon.Smooth = __webpack_require__(/*! ./Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/index.js?')},"./node_modules/phaser/src/geom/rectangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to calculate the area of.\r\n *\r\n * @return {number} The area of the Rectangle object.\r\n */\r\nvar Area = function (rect)\r\n{\r\n return rect.width * rect.height;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Area.js?")},"./node_modules/phaser/src/geom/rectangle/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position up to the smallest integer greater than or equal to each current coordinate.\r\n *\r\n * @function Phaser.Geom.Rectangle.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Ceil = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Ceil.js?")},"./node_modules/phaser/src/geom/rectangle/CeilAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size up to the smallest integer greater than or equal to each respective value.\r\n *\r\n * @function Phaser.Geom.Rectangle.CeilAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to modify.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar CeilAll = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n rect.width = Math.ceil(rect.width);\r\n rect.height = Math.ceil(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CeilAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CeilAll.js?")},"./node_modules/phaser/src/geom/rectangle/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Centers this Rectangle so that the center coordinates match the given x and y values.\r\n\r\n/**\r\n * Moves the top-left corner of a Rectangle so that its center is at the given coordinates.\r\n *\r\n * @function Phaser.Geom.Rectangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to be centered.\r\n * @param {number} x - The X coordinate of the Rectangle's center.\r\n * @param {number} y - The Y coordinate of the Rectangle's center.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The centered rectangle.\r\n */\r\nvar CenterOn = function (rect, x, y)\r\n{\r\n rect.x = x - (rect.width / 2);\r\n rect.y = y - (rect.height / 2);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CenterOn.js?")},"./node_modules/phaser/src/geom/rectangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle which is identical to the given one.\r\n *\r\n * @function Phaser.Geom.Rectangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The Rectangle to clone.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The newly created Rectangle, which is separate from the given one.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Rectangle(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Clone.js?')},"./node_modules/phaser/src/geom/rectangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Contains.js?")},"./node_modules/phaser/src/geom/rectangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object.\r\n * @param {Phaser.Geom.Point} point - The point object to be checked. Can be a Phaser Point object or any object with x and y values.\r\n *\r\n * @return {boolean} A value of true if the Rectangle object contains the specified point, otherwise false.\r\n */\r\nvar ContainsPoint = function (rect, point)\r\n{\r\n return Contains(rect, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/rectangle/ContainsRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if one rectangle fully contains another.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first rectangle.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second rectangle.\r\n *\r\n * @return {boolean} True only if rectA fully contains rectB.\r\n */\r\nvar ContainsRect = function (rectA, rectB)\r\n{\r\n // Volume check (if rectB volume > rectA then rectA cannot contain it)\r\n if ((rectB.width * rectB.height) > (rectA.width * rectA.height))\r\n {\r\n return false;\r\n }\r\n\r\n return (\r\n (rectB.x > rectA.x && rectB.x < rectA.right) &&\r\n (rectB.right > rectA.x && rectB.right < rectA.right) &&\r\n (rectB.y > rectA.y && rectB.y < rectA.bottom) &&\r\n (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsRect.js?")},"./node_modules/phaser/src/geom/rectangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Rectangle to a destination Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The source Rectangle to copy the values from.\r\n * @param {Phaser.Geom.Rectangle} dest - The destination Rectangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The destination Rectangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/rectangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array of points for each corner of a Rectangle\r\n * If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.\r\n *\r\n * @function Phaser.Geom.Rectangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object to be decomposed.\r\n * @param {array} [out] - If provided, each point will be added to this array.\r\n *\r\n * @return {array} Will return the array you specified or a new array containing the points of the Rectangle.\r\n */\r\nvar Decompose = function (rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: rect.x, y: rect.y });\r\n out.push({ x: rect.right, y: rect.y });\r\n out.push({ x: rect.right, y: rect.bottom });\r\n out.push({ x: rect.x, y: rect.bottom });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Decompose.js?")},"./node_modules/phaser/src/geom/rectangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of two rectangles.\r\n *\r\n * @function Phaser.Geom.Rectangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle A\r\n * @param {Phaser.Geom.Rectangle} toCompare - Rectangle B\r\n *\r\n * @return {boolean} `true` if the rectangles' properties are an exact match, otherwise `false`.\r\n */\r\nvar Equals = function (rect, toCompare)\r\n{\r\n return (\r\n rect.x === toCompare.x &&\r\n rect.y === toCompare.y &&\r\n rect.width === toCompare.width &&\r\n rect.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Equals.js?")},"./node_modules/phaser/src/geom/rectangle/FitInside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fits inside the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitOutside` function, there may be some space inside the source area not covered.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitInside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envelop the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitInside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio < GetAspectRatio(source))\r\n {\r\n // Taller than Wide\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Wider than Tall\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - (target.width / 2),\r\n source.centerY - (target.height / 2)\r\n );\r\n};\r\n\r\nmodule.exports = FitInside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitInside.js?')},"./node_modules/phaser/src/geom/rectangle/FitOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fully covers the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitInside` function, the target rectangle may extend further out than the source.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitOutside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitOutside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio > GetAspectRatio(source))\r\n {\r\n // Wider than Tall\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Taller than Wide\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - target.width / 2,\r\n source.centerY - target.height / 2\r\n );\r\n};\r\n\r\nmodule.exports = FitOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds down (floors) the top left X and Y co-ordinates of the given Rectangle to the largest integer less than or equal to them\r\n *\r\n * @function Phaser.Geom.Rectangle.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to floor the top left X and Y co-ordinates of\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle that was passed to this function with its co-ordinates floored.\r\n */\r\nvar Floor = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Floor.js?")},"./node_modules/phaser/src/geom/rectangle/FloorAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size down to the largest integer less than or equal to each current coordinate or dimension.\r\n *\r\n * @function Phaser.Geom.Rectangle.FloorAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar FloorAll = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n rect.width = Math.floor(rect.width);\r\n rect.height = Math.floor(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = FloorAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FloorAll.js?")},"./node_modules/phaser/src/geom/rectangle/FromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n// points is an array of Point-like objects,\r\n// either 2 dimensional arrays, or objects with public x/y properties:\r\n// var points = [\r\n// [100, 200],\r\n// [200, 400],\r\n// { x: 30, y: 60 }\r\n// ]\r\n\r\n/**\r\n * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.FromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {array} points - An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public `x` and `y` properties) which should be surrounded by the Rectangle.\r\n * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar FromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (points.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var minX = Number.MAX_VALUE;\r\n var minY = Number.MAX_VALUE;\r\n\r\n var maxX = Number.MIN_SAFE_INTEGER;\r\n var maxY = Number.MIN_SAFE_INTEGER;\r\n\r\n var p;\r\n var px;\r\n var py;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = points[i];\r\n\r\n if (Array.isArray(p))\r\n {\r\n px = p[0];\r\n py = p[1];\r\n }\r\n else\r\n {\r\n px = p.x;\r\n py = p.y;\r\n }\r\n\r\n minX = Math.min(minX, px);\r\n minY = Math.min(minY, py);\r\n\r\n maxX = Math.max(maxX, px);\r\n maxY = Math.max(maxY, py);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = FromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FromPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the width/height ratio of a rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetAspectRatio\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n *\r\n * @return {number} The width/height ratio of the rectangle.\r\n */\r\nvar GetAspectRatio = function (rect)\r\n{\r\n return (rect.height === 0) ? NaN : rect.width / rect.height;\r\n};\r\n\r\nmodule.exports = GetAspectRatio;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js?")},"./node_modules/phaser/src/geom/rectangle/GetCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns the center of a Rectangle as a Point.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the center of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - Optional point-like object to update with the center coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar GetCenter = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.centerX;\r\n out.y = rect.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetCenter.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {number} position - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoint.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsy. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsy, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetSize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * The size of the Rectangle object, expressed as a Point object\r\n * with the values of the width and height properties.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetSize\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {(Phaser.Geom.Point|object)} [description]\r\n */\r\nvar GetSize = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.width;\r\n out.y = rect.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetSize.js?')},"./node_modules/phaser/src/geom/rectangle/Inflate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\n\r\n\r\n/**\r\n * Increases the size of a Rectangle by a specified amount.\r\n *\r\n * The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.\r\n *\r\n * @function Phaser.Geom.Rectangle.Inflate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to inflate.\r\n * @param {number} x - How many pixels the left and the right side should be moved by horizontally.\r\n * @param {number} y - How many pixels the top and the bottom side should be moved by vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The inflated Rectangle.\r\n */\r\nvar Inflate = function (rect, x, y)\r\n{\r\n var cx = rect.centerX;\r\n var cy = rect.centerY;\r\n\r\n rect.setSize(rect.width + (x * 2), rect.height + (y * 2));\r\n\r\n return CenterOn(rect, cx, cy);\r\n};\r\n\r\nmodule.exports = Inflate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Inflate.js?')},"./node_modules/phaser/src/geom/rectangle/Intersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Intersects = __webpack_require__(/*! ../intersects/RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Takes two Rectangles and first checks to see if they intersect.\r\n * If they intersect it will return the area of intersection in the `out` Rectangle.\r\n * If they do not intersect, the `out` Rectangle will have a width and height of zero.\r\n *\r\n * @function Phaser.Geom.Rectangle.Intersection\r\n * @since 3.11.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle to store the intersection results in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The intersection result. If the width and height are zero, no intersection occurred.\r\n */\r\nvar Intersection = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (Intersects(rectA, rectB))\r\n {\r\n out.x = Math.max(rectA.x, rectB.x);\r\n out.y = Math.max(rectA.y, rectB.y);\r\n out.width = Math.min(rectA.right, rectB.right) - out.x;\r\n out.height = Math.min(rectA.bottom, rectB.bottom) - out.y;\r\n }\r\n else\r\n {\r\n out.setEmpty();\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Intersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Intersection.js?')},"./node_modules/phaser/src/geom/rectangle/MarchingAnts.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle\r\n * each spaced out based on the quantity or step required\r\n *\r\n * @function Phaser.Geom.Rectangle.MarchingAnts\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {number} step - [description]\r\n * @param {integer} quantity - [description]\r\n * @param {(array|Phaser.Geom.Point[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} [description]\r\n */\r\nvar MarchingAnts = function (rect, step, quantity, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (!step && !quantity)\r\n {\r\n // Bail out\r\n return out;\r\n }\r\n\r\n // If step is a falsey value (false, null, 0, undefined, etc) then we calculate\r\n // it based on the quantity instead, otherwise we always use the step value\r\n if (!step)\r\n {\r\n step = Perimeter(rect) / quantity;\r\n }\r\n else\r\n {\r\n quantity = Math.round(Perimeter(rect) / step);\r\n }\r\n\r\n var x = rect.x;\r\n var y = rect.y;\r\n var face = 0;\r\n\r\n // Loop across each face of the rectangle\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n out.push(new Point(x, y));\r\n\r\n switch (face)\r\n {\r\n\r\n // Top face\r\n case 0:\r\n x += step;\r\n\r\n if (x >= rect.right)\r\n {\r\n face = 1;\r\n y += (x - rect.right);\r\n x = rect.right;\r\n }\r\n break;\r\n\r\n // Right face\r\n case 1:\r\n y += step;\r\n\r\n if (y >= rect.bottom)\r\n {\r\n face = 2;\r\n x -= (y - rect.bottom);\r\n y = rect.bottom;\r\n }\r\n break;\r\n\r\n // Bottom face\r\n case 2:\r\n x -= step;\r\n\r\n if (x <= rect.left)\r\n {\r\n face = 3;\r\n y -= (rect.left - x);\r\n x = rect.left;\r\n }\r\n break;\r\n\r\n // Left face\r\n case 3:\r\n y -= step;\r\n\r\n if (y <= rect.top)\r\n {\r\n face = 0;\r\n y = rect.top;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = MarchingAnts;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MarchingAnts.js?')},"./node_modules/phaser/src/geom/rectangle/MergePoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergePoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged.\r\n * @param {Phaser.Geom.Point[]} points - An array of Points (or any object with public `x` and `y` properties) which should be merged with the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar MergePoints = function (target, points)\r\n{\r\n var minX = target.x;\r\n var maxX = target.right;\r\n var minY = target.y;\r\n var maxY = target.bottom;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n minX = Math.min(minX, points[i].x);\r\n maxX = Math.max(maxX, points[i].x);\r\n minY = Math.min(minY, points[i].y);\r\n maxY = Math.max(maxY, points[i].y);\r\n }\r\n\r\n target.x = minX;\r\n target.y = minY;\r\n target.width = maxX - minX;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergePoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergePoints.js?")},"./node_modules/phaser/src/geom/rectangle/MergeRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Merges source rectangle into target rectangle and returns target\r\n// Neither rect should have negative widths or heights\r\n\r\n/**\r\n * Merges the source rectangle into the target rectangle and returns the target.\r\n * Neither rectangle should have a negative width or height.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeRect\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - Target rectangle. Will be modified to include source rectangle.\r\n * @param {Phaser.Geom.Rectangle} source - Rectangle that will be merged into target rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} Modified target rectangle that contains source rectangle.\r\n */\r\nvar MergeRect = function (target, source)\r\n{\r\n var minX = Math.min(target.x, source.x);\r\n var maxX = Math.max(target.right, source.right);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, source.y);\r\n var maxY = Math.max(target.bottom, source.bottom);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeRect.js?")},"./node_modules/phaser/src/geom/rectangle/MergeXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged and modified.\r\n * @param {number} x - The X coordinate of the point which should be merged.\r\n * @param {number} y - The Y coordinate of the point which should be merged.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `target` Rectangle.\r\n */\r\nvar MergeXY = function (target, x, y)\r\n{\r\n var minX = Math.min(target.x, x);\r\n var maxX = Math.max(target.right, x);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, y);\r\n var maxY = Math.max(target.bottom, y);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeXY.js?")},"./node_modules/phaser/src/geom/rectangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top left corner of a Rectangle by a given offset.\r\n *\r\n * @function Phaser.Geom.Rectangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {number} x - The distance to move the Rectangle horizontally.\r\n * @param {number} y - The distance to move the Rectangle vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Offset = function (rect, x, y)\r\n{\r\n rect.x += x;\r\n rect.y += y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Offset.js?")},"./node_modules/phaser/src/geom/rectangle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top-left corner of a Rectangle by the coordinates of a point (translation vector).\r\n *\r\n * @function Phaser.Geom.Rectangle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2)} point - The point whose coordinates should be used as an offset.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar OffsetPoint = function (rect, point)\r\n{\r\n rect.x += point.x;\r\n rect.y += point.y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/rectangle/Overlaps.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".\r\n *\r\n * @function Phaser.Geom.Rectangle.Overlaps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check.\r\n *\r\n * @return {boolean} `true` if the two Rectangles overlap, `false` otherwise.\r\n */\r\nvar Overlaps = function (rectA, rectB)\r\n{\r\n return (\r\n rectA.x < rectB.right &&\r\n rectA.right > rectB.x &&\r\n rectA.y < rectB.bottom &&\r\n rectA.bottom > rectB.y\r\n );\r\n};\r\n\r\nmodule.exports = Overlaps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Overlaps.js?')},"./node_modules/phaser/src/geom/rectangle/Perimeter.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Perimeter.js?")},"./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Rectangle.PerimeterPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {integer} angle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar PerimeterPoint = function (rectangle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n angle = DegToRad(angle);\r\n\r\n var s = Math.sin(angle);\r\n var c = Math.cos(angle);\r\n\r\n var dx = (c > 0) ? rectangle.width / 2 : rectangle.width / -2;\r\n var dy = (s > 0) ? rectangle.height / 2 : rectangle.height / -2;\r\n\r\n if (Math.abs(dx * s) < Math.abs(dy * c))\r\n {\r\n dy = (dx * s) / c;\r\n }\r\n else\r\n {\r\n dx = (dy * c) / s;\r\n }\r\n\r\n out.x = dx + rectangle.centerX;\r\n out.y = dy + rectangle.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = PerimeterPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js?')},"./node_modules/phaser/src/geom/rectangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point\'s coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Random.js?')},"./node_modules/phaser/src/geom/rectangle/RandomOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\r\nvar ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.\r\n * The inner Rectangle must be fully contained within the outer rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.RandomOutside\r\n * @since 3.10.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} outer - The outer Rectangle to get the random point within.\r\n * @param {Phaser.Geom.Rectangle} inner - The inner Rectangle to exclude from the returned point.\r\n * @param {Phaser.Geom.Point} [out] - A Point, or Point-like object to store the result in. If not specified, a new Point will be created.\r\n *\r\n * @return {Phaser.Geom.Point} A Point object containing the random values in its `x` and `y` properties.\r\n */\r\nvar RandomOutside = function (outer, inner, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (ContainsRect(outer, inner))\r\n {\r\n // Pick a random quadrant\r\n //\r\n // The quadrants don\'t extend the full widths / heights of the outer rect to give\r\n // us a better uniformed distribution, otherwise you get clumping in the corners where\r\n // the 4 quads would overlap\r\n\r\n switch (Between(0, 3))\r\n {\r\n case 0: // Top\r\n out.x = outer.x + (Math.random() * (inner.right - outer.x));\r\n out.y = outer.y + (Math.random() * (inner.top - outer.y));\r\n break;\r\n\r\n case 1: // Bottom\r\n out.x = inner.x + (Math.random() * (outer.right - inner.x));\r\n out.y = inner.bottom + (Math.random() * (outer.bottom - inner.bottom));\r\n break;\r\n\r\n case 2: // Left\r\n out.x = outer.x + (Math.random() * (inner.x - outer.x));\r\n out.y = inner.y + (Math.random() * (outer.bottom - inner.y));\r\n break;\r\n\r\n case 3: // Right\r\n out.x = inner.right + (Math.random() * (outer.right - inner.right));\r\n out.y = outer.y + (Math.random() * (inner.bottom - outer.y));\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RandomOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/RandomOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle\'s bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle\'s perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle\'s perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Rectangle.js?')},"./node_modules/phaser/src/geom/rectangle/SameDimensions.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.\r\n *\r\n * @function Phaser.Geom.Rectangle.SameDimensions\r\n * @since 3.15.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} toCompare - The second Rectangle object.\r\n *\r\n * @return {boolean} `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.\r\n */\r\nvar SameDimensions = function (rect, toCompare)\r\n{\r\n return (rect.width === toCompare.width && rect.height === toCompare.height);\r\n};\r\n\r\nmodule.exports = SameDimensions;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/SameDimensions.js?")},"./node_modules/phaser/src/geom/rectangle/Scale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Scales the width and height of this Rectangle by the given amounts.\r\n\r\n/**\r\n * Scales the width and height of this Rectangle by the given amounts.\r\n *\r\n * @function Phaser.Geom.Rectangle.Scale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The `Rectangle` object that will be scaled by the specified amount(s).\r\n * @param {number} x - The factor by which to scale the rectangle horizontally.\r\n * @param {number} y - The amount by which to scale the rectangle vertically. If this is not specified, the rectangle will be scaled by the factor `x` in both directions.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle object with updated `width` and `height` properties as calculated from the scaling factor(s).\r\n */\r\nvar Scale = function (rect, x, y)\r\n{\r\n if (y === undefined) { y = x; }\r\n\r\n rect.width *= x;\r\n rect.height *= y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Scale.js?")},"./node_modules/phaser/src/geom/rectangle/Union.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Union.js?')},"./node_modules/phaser/src/geom/rectangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\nRectangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/rectangle/Area.js");\r\nRectangle.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/rectangle/Ceil.js");\r\nRectangle.CeilAll = __webpack_require__(/*! ./CeilAll */ "./node_modules/phaser/src/geom/rectangle/CeilAll.js");\r\nRectangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nRectangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/rectangle/Clone.js");\r\nRectangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nRectangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/rectangle/ContainsPoint.js");\r\nRectangle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nRectangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/rectangle/CopyFrom.js");\r\nRectangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\nRectangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/rectangle/Equals.js");\r\nRectangle.FitInside = __webpack_require__(/*! ./FitInside */ "./node_modules/phaser/src/geom/rectangle/FitInside.js");\r\nRectangle.FitOutside = __webpack_require__(/*! ./FitOutside */ "./node_modules/phaser/src/geom/rectangle/FitOutside.js");\r\nRectangle.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/rectangle/Floor.js");\r\nRectangle.FloorAll = __webpack_require__(/*! ./FloorAll */ "./node_modules/phaser/src/geom/rectangle/FloorAll.js");\r\nRectangle.FromPoints = __webpack_require__(/*! ./FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nRectangle.GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\nRectangle.GetCenter = __webpack_require__(/*! ./GetCenter */ "./node_modules/phaser/src/geom/rectangle/GetCenter.js");\r\nRectangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nRectangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nRectangle.GetSize = __webpack_require__(/*! ./GetSize */ "./node_modules/phaser/src/geom/rectangle/GetSize.js");\r\nRectangle.Inflate = __webpack_require__(/*! ./Inflate */ "./node_modules/phaser/src/geom/rectangle/Inflate.js");\r\nRectangle.Intersection = __webpack_require__(/*! ./Intersection */ "./node_modules/phaser/src/geom/rectangle/Intersection.js");\r\nRectangle.MarchingAnts = __webpack_require__(/*! ./MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nRectangle.MergePoints = __webpack_require__(/*! ./MergePoints */ "./node_modules/phaser/src/geom/rectangle/MergePoints.js");\r\nRectangle.MergeRect = __webpack_require__(/*! ./MergeRect */ "./node_modules/phaser/src/geom/rectangle/MergeRect.js");\r\nRectangle.MergeXY = __webpack_require__(/*! ./MergeXY */ "./node_modules/phaser/src/geom/rectangle/MergeXY.js");\r\nRectangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/rectangle/Offset.js");\r\nRectangle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/rectangle/OffsetPoint.js");\r\nRectangle.Overlaps = __webpack_require__(/*! ./Overlaps */ "./node_modules/phaser/src/geom/rectangle/Overlaps.js");\r\nRectangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nRectangle.PerimeterPoint = __webpack_require__(/*! ./PerimeterPoint */ "./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js");\r\nRectangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\nRectangle.RandomOutside = __webpack_require__(/*! ./RandomOutside */ "./node_modules/phaser/src/geom/rectangle/RandomOutside.js");\r\nRectangle.SameDimensions = __webpack_require__(/*! ./SameDimensions */ "./node_modules/phaser/src/geom/rectangle/SameDimensions.js");\r\nRectangle.Scale = __webpack_require__(/*! ./Scale */ "./node_modules/phaser/src/geom/rectangle/Scale.js");\r\nRectangle.Union = __webpack_require__(/*! ./Union */ "./node_modules/phaser/src/geom/rectangle/Union.js");\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/index.js?')},"./node_modules/phaser/src/geom/triangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Returns the area of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n *\r\n * @return {number} The area of the Triangle, always non-negative.\r\n */\r\nvar Area = function (triangle)\r\n{\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n return Math.abs(((x3 - x1) * (y2 - y1) - (x2 - x1) * (y3 - y1)) / 2);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Area.js?")},"./node_modules/phaser/src/geom/triangle/BuildEquilateral.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).\r\n * The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildEquilateral\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - x coordinate of the top point of the triangle.\r\n * @param {number} y - y coordinate of the top point of the triangle.\r\n * @param {number} length - Length of each side of the triangle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle object of the given size.\r\n */\r\nvar BuildEquilateral = function (x, y, length)\r\n{\r\n var height = length * (Math.sqrt(3) / 2);\r\n\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x + (length / 2);\r\n var y2 = y + height;\r\n\r\n var x3 = x - (length / 2);\r\n var y3 = y + height;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildEquilateral;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildEquilateral.js?')},"./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EarCut = __webpack_require__(/*! ../polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.BuildFromPolygon\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle[]} O - [out,$return]\r\n *\r\n * @param {array} data - A flat array of vertice coordinates like [x0,y0, x1,y1, x2,y2, ...]\r\n * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 5–7 and another with 8–11).\r\n * @param {number} [scaleX=1] - [description]\r\n * @param {number} [scaleY=1] - [description]\r\n * @param {(array|Phaser.Geom.Triangle[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Triangle[])} [description]\r\n */\r\nvar BuildFromPolygon = function (data, holes, scaleX, scaleY, out)\r\n{\r\n if (holes === undefined) { holes = null; }\r\n if (scaleX === undefined) { scaleX = 1; }\r\n if (scaleY === undefined) { scaleY = 1; }\r\n if (out === undefined) { out = []; }\r\n\r\n var tris = EarCut(data, holes);\r\n\r\n var a;\r\n var b;\r\n var c;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n for (var i = 0; i < tris.length; i += 3)\r\n {\r\n a = tris[i];\r\n b = tris[i + 1];\r\n c = tris[i + 2];\r\n\r\n x1 = data[a * 2] * scaleX;\r\n y1 = data[(a * 2) + 1] * scaleY;\r\n\r\n x2 = data[b * 2] * scaleX;\r\n y2 = data[(b * 2) + 1] * scaleY;\r\n\r\n x3 = data[c * 2] * scaleX;\r\n y3 = data[(c * 2) + 1] * scaleY;\r\n\r\n out.push(new Triangle(x1, y1, x2, y2, x3, y3));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = BuildFromPolygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js?')},"./node_modules/phaser/src/geom/triangle/BuildRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n// Builds a right triangle, with one 90 degree angle and two acute angles\r\n// The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle)\r\n// w/h can be positive or negative and represent the length of each side\r\n\r\n/**\r\n * Builds a right triangle, i.e. one which has a 90-degree angle and two acute angles.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the right angle, which will also be the first X coordinate of the constructed Triangle.\r\n * @param {number} y - The Y coordinate of the right angle, which will also be the first Y coordinate of the constructed Triangle.\r\n * @param {number} width - The length of the side which is to the left or to the right of the right angle.\r\n * @param {number} height - The length of the side which is above or below the right angle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The constructed right Triangle.\r\n */\r\nvar BuildRight = function (x, y, width, height)\r\n{\r\n if (height === undefined) { height = width; }\r\n\r\n // 90 degree angle\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x;\r\n var y2 = y - height;\r\n\r\n var x3 = x + width;\r\n var y3 = y;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildRight.js?')},"./node_modules/phaser/src/geom/triangle/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nvar Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\n\r\n/**\r\n * @callback CenterFunction\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to return the center coordinates of.\r\n *\r\n * @return {Phaser.Math.Vector2} The center point of the Triangle according to the function.\r\n */\r\n\r\n/**\r\n * Positions the Triangle so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to be positioned.\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {CenterFunction} [centerFunc] - The function used to center the triangle. Defaults to Centroid centering.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle that was centered.\r\n */\r\nvar CenterOn = function (triangle, x, y, centerFunc)\r\n{\r\n if (centerFunc === undefined) { centerFunc = Centroid; }\r\n\r\n // Get the center of the triangle\r\n var center = centerFunc(triangle);\r\n\r\n // Difference\r\n var diffX = x - center.x;\r\n var diffY = y - center.y;\r\n\r\n return Offset(triangle, diffX, diffY);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CenterOn.js?')},"./node_modules/phaser/src/geom/triangle/Centroid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three medians (the lines drawn from the vertices to the bisectors of the opposite sides)\r\n// meet in the centroid or center of mass (center of gravity).\r\n// The centroid divides each median in a ratio of 2:1\r\n\r\n/**\r\n * Calculates the position of a Triangle\'s centroid, which is also its center of mass (center of gravity).\r\n *\r\n * The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.\r\n *\r\n * @function Phaser.Geom.Triangle.Centroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the coordinates in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The `out` object with modified `x` and `y` properties, or a new Point if none was provided.\r\n */\r\nvar Centroid = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (triangle.x1 + triangle.x2 + triangle.x3) / 3;\r\n out.y = (triangle.y1 + triangle.y2 + triangle.y3) / 3;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Centroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Centroid.js?')},"./node_modules/phaser/src/geom/triangle/CircumCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html\r\n\r\n/**\r\n * Computes the determinant of a 2x2 matrix. Uses standard double-precision arithmetic, so is susceptible to round-off error.\r\n *\r\n * @function det\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} m00 - The [0,0] entry of the matrix.\r\n * @param {number} m01 - The [0,1] entry of the matrix.\r\n * @param {number} m10 - The [1,0] entry of the matrix.\r\n * @param {number} m11 - The [1,1] entry of the matrix.\r\n *\r\n * @return {number} the determinant.\r\n */\r\nfunction det (m00, m01, m10, m11)\r\n{\r\n return (m00 * m11) - (m01 * m10);\r\n}\r\n\r\n/**\r\n * Computes the circumcentre of a triangle. The circumcentre is the centre of\r\n * the circumcircle, the smallest circle which encloses the triangle. It is also\r\n * the common intersection point of the perpendicular bisectors of the sides of\r\n * the triangle, and is the only point which has equal distance to all three\r\n * vertices of the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\nvar CircumCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var cx = triangle.x3;\r\n var cy = triangle.y3;\r\n\r\n var ax = triangle.x1 - cx;\r\n var ay = triangle.y1 - cy;\r\n\r\n var bx = triangle.x2 - cx;\r\n var by = triangle.y2 - cy;\r\n\r\n var denom = 2 * det(ax, ay, bx, by);\r\n var numx = det(ay, ax * ax + ay * ay, by, bx * bx + by * by);\r\n var numy = det(ax, ax * ax + ay * ay, bx, bx * bx + by * by);\r\n\r\n out.x = cx - numx / denom;\r\n out.y = cy + numy / denom;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCenter.js?')},"./node_modules/phaser/src/geom/triangle/CircumCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n// Adapted from https://gist.github.com/mutoo/5617691\r\n\r\n/**\r\n * Finds the circumscribed circle (circumcircle) of a Triangle object. The circumcircle is the circle which touches all of the triangle\'s vertices.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use as input.\r\n * @param {Phaser.Geom.Circle} [out] - An optional Circle to store the result in.\r\n *\r\n * @return {Phaser.Geom.Circle} The updated `out` Circle, or a new Circle if none was provided.\r\n */\r\nvar CircumCircle = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Circle(); }\r\n\r\n // A\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n // B\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n // C\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var A = x2 - x1;\r\n var B = y2 - y1;\r\n var C = x3 - x1;\r\n var D = y3 - y1;\r\n var E = A * (x1 + x2) + B * (y1 + y2);\r\n var F = C * (x1 + x3) + D * (y1 + y3);\r\n var G = 2 * (A * (y3 - y2) - B * (x3 - x2));\r\n\r\n var dx;\r\n var dy;\r\n\r\n // If the points of the triangle are collinear, then just find the\r\n // extremes and use the midpoint as the center of the circumcircle.\r\n\r\n if (Math.abs(G) < 0.000001)\r\n {\r\n var minX = Math.min(x1, x2, x3);\r\n var minY = Math.min(y1, y2, y3);\r\n dx = (Math.max(x1, x2, x3) - minX) * 0.5;\r\n dy = (Math.max(y1, y2, y3) - minY) * 0.5;\r\n\r\n out.x = minX + dx;\r\n out.y = minY + dy;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n else\r\n {\r\n out.x = (D * E - B * F) / G;\r\n out.y = (A * F - C * E) / G;\r\n dx = out.x - x1;\r\n dy = out.y - y1;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCircle.js?')},"./node_modules/phaser/src/geom/triangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Clones a Triangle object.\r\n *\r\n * @function Phaser.Geom.Triangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The Triangle to clone.\r\n *\r\n * @return {Phaser.Geom.Triangle} A new Triangle identical to the given one but separate from it.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Triangle(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Clone.js?')},"./node_modules/phaser/src/geom/triangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n/**\r\n * Checks if a point (as a pair of coordinates) is inside a Triangle's bounds.\r\n *\r\n * @function Phaser.Geom.Triangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is inside the Triangle, otherwise `false`.\r\n */\r\nvar Contains = function (triangle, x, y)\r\n{\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var v2x = x - triangle.x1;\r\n var v2y = y - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot02 = (v0x * v2x) + (v0y * v2y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n var dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n var u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n var v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n\r\n return (u >= 0 && v >= 0 && (u + v < 1));\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Contains.js?")},"./node_modules/phaser/src/geom/triangle/ContainsArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n// points is an array of Point-like objects with public x/y properties\r\n// returns an array containing all points that are within the triangle, or an empty array if none\r\n// if 'returnFirst' is true it will return after the first point within the triangle is found\r\n\r\n/**\r\n * Filters an array of point-like objects to only those contained within a triangle.\r\n * If `returnFirst` is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsArray\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle that the points are being checked in.\r\n * @param {Phaser.Geom.Point[]} points - An array of point-like objects (objects that have an `x` and `y` property)\r\n * @param {boolean} [returnFirst=false] - If `true`, return an array containing only the first point found that is within the triangle.\r\n * @param {array} [out] - If provided, the points that are within the triangle will be appended to this array instead of being added to a new array. If `returnFirst` is true, only the first point found within the triangle will be appended. This array will also be returned by this function.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array containing all the points from `points` that are within the triangle, if an array was provided as `out`, points will be appended to that array and it will also be returned here.\r\n */\r\nvar ContainsArray = function (triangle, points, returnFirst, out)\r\n{\r\n if (returnFirst === undefined) { returnFirst = false; }\r\n if (out === undefined) { out = []; }\r\n\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n\r\n var u;\r\n var v;\r\n var v2x;\r\n var v2y;\r\n var dot02;\r\n var dot12;\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n v2x = points[i].x - x1;\r\n v2y = points[i].y - y1;\r\n\r\n dot02 = (v0x * v2x) + (v0y * v2y);\r\n dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n \r\n if (u >= 0 && v >= 0 && (u + v < 1))\r\n {\r\n out.push({ x: points[i].x, y: points[i].y });\r\n\r\n if (returnFirst)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ContainsArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsArray.js?")},"./node_modules/phaser/src/geom/triangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Tests if a triangle contains a point.\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|any)} point - The point to test, or any point-like object with public `x` and `y` properties.\r\n *\r\n * @return {boolean} `true` if the point is within the triangle, otherwise `false`.\r\n */\r\nvar ContainsPoint = function (triangle, point)\r\n{\r\n return Contains(triangle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/triangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Triangle to a destination Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The source Triangle to copy the values from.\r\n * @param {Phaser.Geom.Triangle} dest - The destination Triangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Triangle} The destination Triangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/triangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decomposes a Triangle into an array of its points.\r\n *\r\n * @function Phaser.Geom.Triangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to decompose.\r\n * @param {array} [out] - An array to store the points into.\r\n *\r\n * @return {array} The provided `out` array, or a new array if none was provided, with three objects with `x` and `y` properties representing each point of the Triangle appended to it.\r\n */\r\nvar Decompose = function (triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: triangle.x1, y: triangle.y1 });\r\n out.push({ x: triangle.x2, y: triangle.y2 });\r\n out.push({ x: triangle.x3, y: triangle.y3 });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Decompose.js?")},"./node_modules/phaser/src/geom/triangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns true if two triangles have the same coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The first triangle to check.\r\n * @param {Phaser.Geom.Triangle} toCompare - The second triangle to check.\r\n *\r\n * @return {boolean} `true` if the two given triangles have the exact same coordinates, otherwise `false`.\r\n */\r\nvar Equals = function (triangle, toCompare)\r\n{\r\n return (\r\n triangle.x1 === toCompare.x1 &&\r\n triangle.y1 === toCompare.y1 &&\r\n triangle.x2 === toCompare.x2 &&\r\n triangle.y2 === toCompare.y2 &&\r\n triangle.x3 === toCompare.x3 &&\r\n triangle.y3 === toCompare.y3\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Equals.js?")},"./node_modules/phaser/src/geom/triangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Returns a Point from around the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the point on its perimeter from.\r\n * @param {number} position - The position along the perimeter of the triangle. A value between 0 and 1.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An option Point, or Point-like object to store the value in. If not given a new Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object containing the given position from the perimeter of the triangle.\r\n */\r\nvar GetPoint = function (triangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = line1.x1;\r\n out.y = line1.y1;\r\n\r\n return out;\r\n }\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n var p = perimeter * position;\r\n var localPosition = 0;\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n out.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n out.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n out.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n out.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n out.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n out.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoint.js?')},"./node_modules/phaser/src/geom/triangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns an array of evenly spaced points on the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the points from.\r\n * @param {integer} quantity - The number of evenly spaced points to return. Set to 0 to return an arbitrary number of points based on the `stepRate`.\r\n * @param {number} stepRate - If `quantity` is 0, the distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to which the points should be appended.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `out` array, or a new array if none was provided.\r\n */\r\nvar GetPoints = function (triangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var p = perimeter * (i / quantity);\r\n var localPosition = 0;\r\n\r\n var point = new Point();\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n point.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n point.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n point.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n point.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n point.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n point.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n out.push(point);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoints.js?')},"./node_modules/phaser/src/geom/triangle/InCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three angle bisectors of a triangle meet in one point called the incenter.\r\n// It is the center of the incircle, the circle inscribed in the triangle.\r\n\r\nfunction getLength (x1, y1, x2, y2)\r\n{\r\n var x = x1 - x2;\r\n var y = y1 - y2;\r\n var magnitude = (x * x) + (y * y);\r\n\r\n return Math.sqrt(magnitude);\r\n}\r\n\r\n/**\r\n * Calculates the position of the incenter of a Triangle object. This is the point where its three angle bisectors meet and it\'s also the center of the incircle, which is the circle inscribed in the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.InCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to find the incenter of.\r\n * @param {Phaser.Geom.Point} [out] - An optional Point in which to store the coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} Point (x, y) of the center pixel of the triangle.\r\n */\r\nvar InCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var d1 = getLength(x3, y3, x2, y2);\r\n var d2 = getLength(x1, y1, x3, y3);\r\n var d3 = getLength(x2, y2, x1, y1);\r\n\r\n var p = d1 + d2 + d3;\r\n\r\n out.x = (x1 * d1 + x2 * d2 + x3 * d3) / p;\r\n out.y = (y1 * d1 + y2 * d2 + y3 * d3) / p;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = InCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/InCenter.js?')},"./node_modules/phaser/src/geom/triangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.\r\n *\r\n * @function Phaser.Geom.Triangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to move.\r\n * @param {number} x - The horizontal offset (distance) by which to move each point. Can be positive or negative.\r\n * @param {number} y - The vertical offset (distance) by which to move each point. Can be positive or negative.\r\n *\r\n * @return {Phaser.Geom.Triangle} The modified Triangle.\r\n */\r\nvar Offset = function (triangle, x, y)\r\n{\r\n triangle.x1 += x;\r\n triangle.y1 += y;\r\n\r\n triangle.x2 += x;\r\n triangle.y2 += y;\r\n\r\n triangle.x3 += x;\r\n triangle.y3 += y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Offset.js?")},"./node_modules/phaser/src/geom/triangle/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Gets the length of the perimeter of the given triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Perimeter = function (triangle)\r\n{\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n return (Length(line1) + Length(line2) + Length(line3));\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Perimeter.js?')},"./node_modules/phaser/src/geom/triangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Random = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n // Basis vectors\r\n var ux = triangle.x2 - triangle.x1;\r\n var uy = triangle.y2 - triangle.y1;\r\n\r\n var vx = triangle.x3 - triangle.x1;\r\n var vy = triangle.y3 - triangle.y1;\r\n\r\n // Random point within the unit square\r\n var r = Math.random();\r\n var s = Math.random();\r\n\r\n // Point outside the triangle? Remap it.\r\n if (r + s >= 1)\r\n {\r\n r = 1 - r;\r\n s = 1 - s;\r\n }\r\n\r\n out.x = triangle.x1 + ((ux * r) + (vx * s));\r\n out.y = triangle.y1 + ((uy * r) + (vy * s));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Random.js?')},"./node_modules/phaser/src/geom/triangle/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\nvar InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\n\r\n/**\r\n * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet.\r\n *\r\n * @function Phaser.Geom.Triangle.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar Rotate = function (triangle, angle)\r\n{\r\n var point = InCenter(triangle);\r\n\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Rotate.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {Phaser.Geom.Point} point - The Point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundPoint = function (triangle, point, angle)\r\n{\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotates an entire Triangle at a given angle about a specific point.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} x - The X coordinate of the point to rotate the Triangle about.\r\n * @param {number} y - The Y coordinate of the point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundXY = function (triangle, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = triangle.x1 - x;\r\n var ty = triangle.y1 - y;\r\n\r\n triangle.x1 = tx * c - ty * s + x;\r\n triangle.y1 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x2 - x;\r\n ty = triangle.y2 - y;\r\n\r\n triangle.x2 = tx * c - ty * s + x;\r\n triangle.y2 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x3 - x;\r\n ty = triangle.y3 - y;\r\n\r\n triangle.x3 = tx * c - ty * s + x;\r\n triangle.y3 = tx * s + ty * c + y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A triangle is a plane created by connecting three points.\r\n * The first two arguments specify the first point, the middle two arguments\r\n * specify the second point, and the last two arguments specify the third point.\r\n *\r\n * @class Triangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n */\r\nvar Triangle = new Class({\r\n\r\n initialize:\r\n\r\n function Triangle (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.TRIANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Triangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.TRIANGLE;\r\n\r\n /**\r\n * `x` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#x1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * `y` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#y1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * `x` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#x2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * `y` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#y2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n\r\n /**\r\n * `x` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#x3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x3 = x3;\r\n\r\n /**\r\n * `y` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#y3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y3 = y3;\r\n },\r\n\r\n /**\r\n * Checks whether a given points lies within the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to check.\r\n * @param {number} y - The y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the coordinate pair is within the triangle, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a specific point on the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - Position as float within `0` and `1`. `0` equals the first point.\r\n * @param {(Phaser.Geom.Point|object)} [output] - Optional Point, or point-like object, that the calculated point will be written to.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Calculated `Point` that represents the requested position. It is the same as `output` when this parameter has been given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Calculates a list of evenly distributed points on the triangle. It is either possible to pass an amount of points to be generated (`quantity`) or the distance between two points (`stepRate`).\r\n *\r\n * @method Phaser.Geom.Triangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - Number of points to be generated. Can be falsey when `stepRate` should be used. All points have the same distance along the triangle.\r\n * @param {number} [stepRate] - Distance between two points. Will only be used when `quantity` is falsey.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - Optional Array for writing the calculated points into. Otherwise a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} Returns a list of calculated `Point` instances or the filled array passed as parameter `output`.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point along the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - Optional `Point` that should be modified. Otherwise a new one will be created.\r\n *\r\n * @return {Phaser.Geom.Point} Random `Point`. When parameter `point` has been provided it will be returned.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets all three points of the triangle. Leaving out any coordinate sets it to be `0`.\r\n *\r\n * @method Phaser.Geom.Triangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n *\r\n * @return {Phaser.Geom.Triangle} This Triangle object.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n this.x3 = x3;\r\n this.y3 = y3;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line A of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line A of this Triangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x1, this.y1, this.x2, this.y2);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line B of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line B of this Triangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x2, this.y2, this.x3, this.y3);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line C of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line C of this Triangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x3, this.y3, this.x1, this.y1);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Left most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 <= this.x2 && this.x1 <= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 <= this.x1 && this.x2 <= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Right most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 >= this.x2 && this.x1 >= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 >= this.x1 && this.x2 >= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Top most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 <= this.y2 && this.y1 <= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 <= this.y1 && this.y2 <= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Bottom most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 >= this.y2 && this.y1 >= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 >= this.y1 && this.y2 >= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Triangle.js?')},"./node_modules/phaser/src/geom/triangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\nTriangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/triangle/Area.js");\r\nTriangle.BuildEquilateral = __webpack_require__(/*! ./BuildEquilateral */ "./node_modules/phaser/src/geom/triangle/BuildEquilateral.js");\r\nTriangle.BuildFromPolygon = __webpack_require__(/*! ./BuildFromPolygon */ "./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js");\r\nTriangle.BuildRight = __webpack_require__(/*! ./BuildRight */ "./node_modules/phaser/src/geom/triangle/BuildRight.js");\r\nTriangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/triangle/CenterOn.js");\r\nTriangle.Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nTriangle.CircumCenter = __webpack_require__(/*! ./CircumCenter */ "./node_modules/phaser/src/geom/triangle/CircumCenter.js");\r\nTriangle.CircumCircle = __webpack_require__(/*! ./CircumCircle */ "./node_modules/phaser/src/geom/triangle/CircumCircle.js");\r\nTriangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/triangle/Clone.js");\r\nTriangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nTriangle.ContainsArray = __webpack_require__(/*! ./ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nTriangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/triangle/ContainsPoint.js");\r\nTriangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/triangle/CopyFrom.js");\r\nTriangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nTriangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/triangle/Equals.js");\r\nTriangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nTriangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nTriangle.InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\nTriangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/triangle/Perimeter.js");\r\nTriangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\nTriangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\nTriangle.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/triangle/Rotate.js");\r\nTriangle.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js");\r\nTriangle.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/index.js?')},"./node_modules/phaser/src/input/CreateInteractiveObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Interactive Object.\r\n * \r\n * This is called automatically by the Input Manager when you enable a Game Object for input.\r\n *\r\n * The resulting Interactive Object is mapped to the Game Object's `input` property.\r\n *\r\n * @function Phaser.Input.CreateInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to which this Interactive Object is bound.\r\n * @param {any} hitArea - The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.\r\n *\r\n * @return {Phaser.Types.Input.InteractiveObject} The new Interactive Object.\r\n */\r\nvar CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)\r\n{\r\n return {\r\n\r\n gameObject: gameObject,\r\n\r\n enabled: true,\r\n draggable: false,\r\n dropZone: false,\r\n cursor: false,\r\n\r\n target: null,\r\n\r\n camera: null,\r\n\r\n hitArea: hitArea,\r\n hitAreaCallback: hitAreaCallback,\r\n hitAreaDebug: null,\r\n\r\n // Has the dev specified their own shape, or is this bound to the texture size?\r\n customHitArea: false,\r\n\r\n localX: 0,\r\n localY: 0,\r\n\r\n // 0 = Not being dragged\r\n // 1 = Being checked for dragging\r\n // 2 = Being dragged\r\n dragState: 0,\r\n\r\n dragStartX: 0,\r\n dragStartY: 0,\r\n dragStartXGlobal: 0,\r\n dragStartYGlobal: 0,\r\n\r\n dragX: 0,\r\n dragY: 0\r\n\r\n };\r\n};\r\n\r\nmodule.exports = CreateInteractiveObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreateInteractiveObject.js?")},"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Pixel Perfect Handler function.\r\n *\r\n * Access via `InputPlugin.makePixelPerfect` rather than calling it directly.\r\n *\r\n * @function Phaser.Input.CreatePixelPerfectHandler\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager.\r\n * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} The new Pixel Perfect Handler function.\r\n */\r\nvar CreatePixelPerfectHandler = function (textureManager, alphaTolerance)\r\n{\r\n return function (hitArea, x, y, gameObject)\r\n {\r\n var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name);\r\n\r\n return (alpha && alpha >= alphaTolerance);\r\n };\r\n};\r\n\r\nmodule.exports = CreatePixelPerfectHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreatePixelPerfectHandler.js?")},"./node_modules/phaser/src/input/InputManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar Keyboard = __webpack_require__(/*! ./keyboard/KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js");\r\nvar Mouse = __webpack_require__(/*! ./mouse/MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js");\r\nvar Pointer = __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js");\r\nvar Touch = __webpack_require__(/*! ./touch/TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js");\r\nvar TransformMatrix = __webpack_require__(/*! ../gameobjects/components/TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar TransformXY = __webpack_require__(/*! ../math/TransformXY */ "./node_modules/phaser/src/math/TransformXY.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance.\r\n *\r\n * Based on the Game Config it will create handlers for mouse and touch support.\r\n *\r\n * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class.\r\n *\r\n * It then manages the events, pointer creation and general hit test related operations.\r\n *\r\n * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods\r\n * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible\r\n * for dealing with all input events for a Scene.\r\n *\r\n * @class InputManager\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance that owns the Input Manager.\r\n * @param {object} config - The Input Configuration object, as set in the Game Config.\r\n */\r\nvar InputManager = new Class({\r\n\r\n initialize:\r\n\r\n function InputManager (game, config)\r\n {\r\n /**\r\n * The Game instance that owns the Input Manager.\r\n * A Game only maintains on instance of the Input Manager at any time.\r\n *\r\n * @name Phaser.Input.InputManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the global Game Scale Manager.\r\n * Used for all bounds checks and pointer scaling.\r\n *\r\n * @name Phaser.Input.InputManager#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * The Canvas that is used for all DOM event input listeners.\r\n *\r\n * @name Phaser.Input.InputManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The Game Configuration object, as set during the game boot.\r\n *\r\n * @name Phaser.Input.InputManager#config\r\n * @type {Phaser.Core.Config}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * If set, the Input Manager will run its update loop every frame.\r\n *\r\n * @name Phaser.Input.InputManager#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Event Emitter instance that the Input Manager uses to emit events from.\r\n *\r\n * @name Phaser.Input.InputManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n * This is updated automatically by the canvas over and out handlers.\r\n *\r\n * @name Phaser.Input.InputManager#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.isOver = true;\r\n\r\n /**\r\n * The default CSS cursor to be used when interacting with your game.\r\n *\r\n * See the `setDefaultCursor` method for more details.\r\n *\r\n * @name Phaser.Input.InputManager#defaultCursor\r\n * @type {string}\r\n * @since 3.10.0\r\n */\r\n this.defaultCursor = \'\';\r\n\r\n /**\r\n * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardManager}\r\n * @since 3.16.0\r\n */\r\n this.keyboard = (config.inputKeyboard) ? new Keyboard(this) : null;\r\n\r\n /**\r\n * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = (config.inputMouse) ? new Mouse(this) : null;\r\n\r\n /**\r\n * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#touch\r\n * @type {Phaser.Input.Touch.TouchManager}\r\n * @since 3.0.0\r\n */\r\n this.touch = (config.inputTouch) ? new Touch(this) : null;\r\n\r\n /**\r\n * An array of Pointers that have been added to the game.\r\n * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers.\r\n *\r\n * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them,\r\n * or set the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointers\r\n * @type {Phaser.Input.Pointer[]}\r\n * @since 3.10.0\r\n */\r\n this.pointers = [];\r\n\r\n /**\r\n * The number of touch objects activated and being processed each update.\r\n *\r\n * You can change this by either calling `addPointer` at run-time, or by\r\n * setting the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointersTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n this.pointersTotal = config.inputActivePointers;\r\n\r\n if (config.inputTouch && this.pointersTotal === 1)\r\n {\r\n this.pointersTotal = 2;\r\n }\r\n\r\n for (var i = 0; i <= this.pointersTotal; i++)\r\n {\r\n var pointer = new Pointer(this, i);\r\n\r\n pointer.smoothFactor = config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n }\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointer\r\n * @type {?Phaser.Input.Pointer}\r\n * @since 3.10.0\r\n */\r\n this.mousePointer = (config.inputMouse) ? this.pointers[0] : null;\r\n\r\n /**\r\n * The most recently active Pointer object.\r\n *\r\n * If you\'ve only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse.\r\n *\r\n * If your game doesn\'t need to support multi-touch then you can safely use this property in all of your game\r\n * code and it will adapt to be either the mouse or the touch, based on device.\r\n *\r\n * @name Phaser.Input.InputManager#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.0.0\r\n */\r\n this.activePointer = this.pointers[0];\r\n\r\n /**\r\n * If the top-most Scene in the Scene List receives an input it will stop input from\r\n * propagating any lower down the scene list, i.e. if you have a UI Scene at the top\r\n * and click something on it, that click will not then be passed down to any other\r\n * Scene below. Disable this to have input events passed through all Scenes, all the time.\r\n *\r\n * @name Phaser.Input.InputManager#globalTopOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.globalTopOnly = true;\r\n\r\n /**\r\n * The time this Input Manager was last updated.\r\n * This value is populated by the Game Step each frame.\r\n *\r\n * @name Phaser.Input.InputManager#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.2\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * A re-cycled point-like object to store hit test values in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempPoint\r\n * @type {{x:number, y:number}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempPoint = { x: 0, y: 0 };\r\n\r\n /**\r\n * A re-cycled array to store hit results in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempHitTest\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempHitTest = [];\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * An internal private var that records Scenes aborting event processing.\r\n *\r\n * @name Phaser.Input.InputManager#_tempSkip\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._tempSkip = false;\r\n\r\n /**\r\n * An internal private array that avoids needing to create a new array on every DOM mouse event.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointerContainer\r\n * @type {Phaser.Input.Pointer[]}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this.mousePointerContainer = [ this.mousePointer ];\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now.\r\n *\r\n * @method Phaser.Input.InputManager#boot\r\n * @protected\r\n * @fires Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.canvas = this.game.canvas;\r\n\r\n this.scaleManager = this.game.scale;\r\n\r\n this.events.emit(Events.MANAGER_BOOT);\r\n\r\n this.game.events.on(GameEvents.PRE_RENDER, this.preRender, this);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOver: function (event)\r\n {\r\n this.isOver = true;\r\n\r\n this.events.emit(Events.GAME_OVER, event);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOut: function (event)\r\n {\r\n this.isOver = false;\r\n\r\n this.events.emit(Events.GAME_OUT, event);\r\n },\r\n\r\n /**\r\n * Internal update, called automatically by the Game Step right at the start.\r\n *\r\n * @method Phaser.Input.InputManager#preRender\r\n * @private\r\n * @since 3.18.0\r\n */\r\n preRender: function ()\r\n {\r\n var time = this.game.loop.now;\r\n var delta = this.game.loop.delta;\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this.time = time;\r\n\r\n this.events.emit(Events.MANAGER_UPDATE);\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input && scene.sys.input.updatePoll(time, delta) && this.globalTopOnly)\r\n {\r\n // If the Scene returns true, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor(\'url(assets/cursors/sword.cur), pointer\');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It\'s up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputManager#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.defaultCursor = cursor;\r\n\r\n if (this.canvas.style.cursor !== cursor)\r\n {\r\n this.canvas.style.cursor = cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to set a custom cursor during its postUpdate step.\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n *\r\n * @method Phaser.Input.InputManager#setCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n setCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor)\r\n {\r\n this.canvas.style.cursor = interactiveObject.cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to clear the hand cursor, if set, during its postUpdate step.\r\n *\r\n * @method Phaser.Input.InputManager#resetCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n resetCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor && this.canvas)\r\n {\r\n this.canvas.style.cursor = this.defaultCursor;\r\n }\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputManager#addPointer\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n var output = [];\r\n\r\n if (this.pointersTotal + quantity > 10)\r\n {\r\n quantity = 10 - this.pointersTotal;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var id = this.pointers.length;\r\n\r\n var pointer = new Pointer(this, id);\r\n\r\n pointer.smoothFactor = this.config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n\r\n this.pointersTotal++;\r\n\r\n output.push(pointer);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method that gets a list of all the active Input Plugins in the game\r\n * and updates each of them in turn, in reverse order (top to bottom), to allow\r\n * for DOM top-level event handling simulation.\r\n *\r\n * @method Phaser.Input.InputManager#updateInputPlugins\r\n * @since 3.16.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n */\r\n updateInputPlugins: function (type, pointers)\r\n {\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this._tempSkip = false;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input)\r\n {\r\n var capture = scene.sys.input.update(type, pointers);\r\n\r\n if ((capture && this.globalTopOnly) || this._tempSkip)\r\n {\r\n // If the Scene returns true, or called stopPropagation, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n }\r\n },\r\n\r\n // event.targetTouches = list of all touches on the TARGET ELEMENT (i.e. game dom element)\r\n // event.touches = list of all touches on the ENTIRE DOCUMENT, not just the target element\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch start event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchStart\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchStart: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (!pointer.active)\r\n {\r\n pointer.touchstart(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_START, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch move event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchMove: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchmove(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_MOVE, changed);\r\n },\r\n\r\n // For touch end its a list of the touch points that have been removed from the surface\r\n // https://developer.mozilla.org/en-US/docs/DOM/TouchList\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch end event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchEnd\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchEnd: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchend(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_END, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch cancel event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchCancel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchCancel: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchcancel(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_CANCEL, changed);\r\n },\r\n\r\n /**\r\n * Processes a mouse down event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseDown\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseDown: function (event)\r\n {\r\n this.mousePointer.down(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_DOWN, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse move event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseMove: function (event)\r\n {\r\n this.mousePointer.move(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_MOVE, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse up event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseUp\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseUp: function (event)\r\n {\r\n this.mousePointer.up(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_UP, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse wheel event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseWheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The native DOM Wheel event.\r\n */\r\n onMouseWheel: function (event)\r\n {\r\n this.mousePointer.wheel(event);\r\n\r\n this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a pointer lock change event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onPointerLockChange\r\n * @fires Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onPointerLockChange: function (event)\r\n {\r\n var isLocked = this.mouse.locked;\r\n\r\n this.mousePointer.locked = isLocked;\r\n\r\n this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked);\r\n },\r\n\r\n /**\r\n * Checks if the given Game Object should be considered as a candidate for input or not.\r\n *\r\n * Checks if the Game Object has an input component that is enabled, that it will render,\r\n * and finally, if it has a parent, that the parent parent, or any ancestor, is visible or not.\r\n *\r\n * @method Phaser.Input.InputManager#inputCandidate\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to test.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {boolean} `true` if the Game Object should be considered for input, otherwise `false`.\r\n */\r\n inputCandidate: function (gameObject, camera)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.enabled || !gameObject.willRender(camera))\r\n {\r\n return false;\r\n }\r\n\r\n var visible = true;\r\n var parent = gameObject.parentContainer;\r\n\r\n if (parent)\r\n {\r\n do\r\n {\r\n if (!parent.willRender(camera))\r\n {\r\n visible = false;\r\n break;\r\n }\r\n\r\n parent = parent.parentContainer;\r\n\r\n } while (parent);\r\n }\r\n\r\n return visible;\r\n },\r\n\r\n /**\r\n * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects.\r\n *\r\n * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space\r\n * and used to determine if they fall within the remaining Game Objects hit areas or not.\r\n *\r\n * If nothing is matched an empty array is returned.\r\n *\r\n * This method is called automatically by InputPlugin.hitTestPointer and doesn\'t usually need to be invoked directly.\r\n *\r\n * @method Phaser.Input.InputManager#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to test against.\r\n * @param {array} gameObjects - An array of interactive Game Objects to check.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n * @param {array} [output] - An array to store the results in. If not given, a new empty array is created.\r\n *\r\n * @return {array} An array of the Game Objects that were hit during this hit test.\r\n */\r\n hitTest: function (pointer, gameObjects, camera, output)\r\n {\r\n if (output === undefined) { output = this._tempHitTest; }\r\n\r\n var tempPoint = this._tempPoint;\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n output.length = 0;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n camera.getWorldPoint(x, y, tempPoint);\r\n\r\n pointer.worldX = tempPoint.x;\r\n pointer.worldY = tempPoint.y;\r\n\r\n var point = { x: 0, y: 0 };\r\n\r\n var matrix = this._tempMatrix;\r\n var parentMatrix = this._tempMatrix2;\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n // Checks if the Game Object can receive input (isn\'t being ignored by the camera, invisible, etc)\r\n // and also checks all of its parents, if any\r\n if (!this.inputCandidate(gameObject, camera))\r\n {\r\n continue;\r\n }\r\n\r\n var px = tempPoint.x + (csx * gameObject.scrollFactorX) - csx;\r\n var py = tempPoint.y + (csy * gameObject.scrollFactorY) - csy;\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.getWorldTransformMatrix(matrix, parentMatrix);\r\n\r\n matrix.applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, gameObject.x, gameObject.y, gameObject.rotation, gameObject.scaleX, gameObject.scaleY, point);\r\n }\r\n \r\n if (this.pointWithinHitArea(gameObject, point.x, point.y))\r\n {\r\n output.push(gameObject);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Game Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Game Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinHitArea: function (gameObject, x, y)\r\n {\r\n // Normalize the origin\r\n x += gameObject.displayOriginX;\r\n y += gameObject.displayOriginY;\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaCallback(input.hitArea, x, y, gameObject))\r\n {\r\n input.localX = x;\r\n input.localY = y;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Interactive Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Interactive Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Input.InteractiveObject} object - The Interactive Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinInteractiveObject: function (object, x, y)\r\n {\r\n if (!object.hitArea)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the origin\r\n x += object.gameObject.displayOriginX;\r\n y += object.gameObject.displayOriginY;\r\n\r\n object.localX = x;\r\n object.localY = y;\r\n\r\n return object.hitAreaCallback(object.hitArea, x, y, object);\r\n },\r\n\r\n /**\r\n * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager.\r\n *\r\n * @method Phaser.Input.InputManager#transformPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to transform the values for.\r\n * @param {number} pageX - The Page X value.\r\n * @param {number} pageY - The Page Y value.\r\n * @param {boolean} wasMove - Are we transforming the Pointer from a move event, or an up / down event?\r\n */\r\n transformPointer: function (pointer, pageX, pageY, wasMove)\r\n {\r\n var p0 = pointer.position;\r\n var p1 = pointer.prevPosition;\r\n\r\n // Store previous position\r\n p1.x = p0.x;\r\n p1.y = p0.y;\r\n\r\n // Translate coordinates\r\n var x = this.scaleManager.transformX(pageX);\r\n var y = this.scaleManager.transformY(pageY);\r\n\r\n var a = pointer.smoothFactor;\r\n\r\n if (!wasMove || a === 0)\r\n {\r\n // Set immediately\r\n p0.x = x;\r\n p0.y = y;\r\n }\r\n else\r\n {\r\n // Apply smoothing\r\n p0.x = x * a + p1.x * (1 - a);\r\n p0.y = y * a + p1.y * (1 - a);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Input Manager and all of its systems.\r\n *\r\n * There is no way to recover from doing this.\r\n *\r\n * @method Phaser.Input.InputManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.events.removeAllListeners();\r\n\r\n this.game.events.off(GameEvents.PRE_RENDER);\r\n\r\n if (this.keyboard)\r\n {\r\n this.keyboard.destroy();\r\n }\r\n\r\n if (this.mouse)\r\n {\r\n this.mouse.destroy();\r\n }\r\n\r\n if (this.touch)\r\n {\r\n this.touch.destroy();\r\n }\r\n\r\n for (var i = 0; i < this.pointers.length; i++)\r\n {\r\n this.pointers[i].destroy();\r\n }\r\n\r\n this.pointers = [];\r\n this._tempHitTest = [];\r\n this._tempMatrix.destroy();\r\n this.canvas = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = InputManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputManager.js?')},"./node_modules/phaser/src/input/InputPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../geom/circle/Circle */ \"./node_modules/phaser/src/geom/circle/Circle.js\");\r\nvar CircleContains = __webpack_require__(/*! ../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/input/const.js\");\r\nvar CreateInteractiveObject = __webpack_require__(/*! ./CreateInteractiveObject */ \"./node_modules/phaser/src/input/CreateInteractiveObject.js\");\r\nvar CreatePixelPerfectHandler = __webpack_require__(/*! ./CreatePixelPerfectHandler */ \"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar Ellipse = __webpack_require__(/*! ../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar EllipseContains = __webpack_require__(/*! ../geom/ellipse/Contains */ \"./node_modules/phaser/src/geom/ellipse/Contains.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../geom/const */ \"./node_modules/phaser/src/geom/const.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ./InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar Triangle = __webpack_require__(/*! ../geom/triangle/Triangle */ \"./node_modules/phaser/src/geom/triangle/Triangle.js\");\r\nvar TriangleContains = __webpack_require__(/*! ../geom/triangle/Contains */ \"./node_modules/phaser/src/geom/triangle/Contains.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Plugin belongs to a Scene and handles all input related events and operations for it.\r\n *\r\n * You can access it from within a Scene using `this.input`.\r\n *\r\n * It emits events directly. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.on('pointerdown', callback, context);\r\n * ```\r\n *\r\n * To listen for a pointer down event anywhere on the game canvas.\r\n *\r\n * Game Objects can be enabled for input by calling their `setInteractive` method. After which they\r\n * will directly emit input events:\r\n *\r\n * ```javascript\r\n * var sprite = this.add.sprite(x, y, texture);\r\n * sprite.setInteractive();\r\n * sprite.on('pointerdown', callback, context);\r\n * ```\r\n * \r\n * There are lots of game configuration options available relating to input.\r\n * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser\r\n * listening for input events outside of the canvas, how to set a default number of pointers, input\r\n * capture settings and more.\r\n *\r\n * Please also see the Input examples and tutorials for further information.\r\n *\r\n * @class InputPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Input Plugin is responsible for.\r\n */\r\nvar InputPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function InputPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.InputPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems class.\r\n *\r\n * @name Phaser.Input.InputPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.InputPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.5.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Game Input Manager.\r\n *\r\n * @name Phaser.Input.InputPlugin#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.input;\r\n\r\n /**\r\n * Internal event queue used for plugins only.\r\n *\r\n * @name Phaser.Input.InputPlugin#pluginEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.pluginEvents = new EventEmitter();\r\n\r\n /**\r\n * If `true` this Input Plugin will process DOM input events.\r\n *\r\n * @name Phaser.Input.InputPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.5.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * A reference to the Scene Display List. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Cameras Manager. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n // Inject the available input plugins into this class\r\n InputPluginCache.install(this);\r\n\r\n /**\r\n * A reference to the Mouse Manager.\r\n * \r\n * This property is only set if Mouse support has been enabled in your Game Configuration file.\r\n * \r\n * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead.\r\n *\r\n * @name Phaser.Input.InputPlugin#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = this.manager.mouse;\r\n\r\n /**\r\n * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @name Phaser.Input.InputPlugin#topOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.topOnly = true;\r\n\r\n /**\r\n * How often should the Pointers be checked?\r\n * \r\n * The value is a time, given in ms, and is the time that must have elapsed between game steps before\r\n * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game\r\n * Objects are currently below it, or being interacted with it.\r\n * \r\n * Pointers will *always* be checked if they have been moved by the user, or press or released.\r\n * \r\n * This property only controls how often they will be polled if they have not been updated.\r\n * You should set this if you want to have Game Objects constantly check against the pointers, even\r\n * if the pointer didn't itself move.\r\n * \r\n * Set to 0 to poll constantly. Set to -1 to only poll on user movement.\r\n *\r\n * @name Phaser.Input.InputPlugin#pollRate\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.pollRate = -1;\r\n\r\n /**\r\n * Internal poll timer value.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pollTimer\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pollTimer = 0;\r\n\r\n var _eventData = { cancelled: false };\r\n\r\n /**\r\n * Internal event propagation callback container.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventContainer\r\n * @type {Phaser.Types.Input.EventData}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventContainer = {\r\n stopPropagation: function ()\r\n {\r\n _eventData.cancelled = true;\r\n }\r\n };\r\n\r\n /**\r\n * Internal event propagation data object.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventData\r\n * @type {object}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventData = _eventData;\r\n\r\n /**\r\n * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragDistanceThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragDistanceThreshold = 0;\r\n\r\n /**\r\n * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragTimeThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragTimeThreshold = 0;\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test\r\n *\r\n * @name Phaser.Input.InputPlugin#_temp\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._temp = [];\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test dropZones\r\n *\r\n * @name Phaser.Input.InputPlugin#_tempZones\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempZones = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been set to be interactive in the Scene this Input Plugin is managing.\r\n *\r\n * @name Phaser.Input.InputPlugin#_list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Objects waiting to be inserted to the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingInsertion\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Objects waiting to be removed from the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingRemoval\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been enabled for dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#_draggable\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._draggable = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'draggable' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_drag\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._drag = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A array containing the dragStates, for this Scene, index by the Pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_dragState\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._dragState = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'over' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_over\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._over = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A list of valid DOM event types.\r\n *\r\n * @name Phaser.Input.InputPlugin#_validTypes\r\n * @type {string[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._validTypes = [ 'onDown', 'onUp', 'onOver', 'onOut', 'onMove', 'onDragStart', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragLeave', 'onDragOver', 'onDrop' ];\r\n\r\n /**\r\n * Internal property that tracks frame event state.\r\n *\r\n * @name Phaser.Input.InputPlugin#_updatedThisFrame\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._updatedThisFrame = false;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#boot\r\n * @fires Phaser.Input.Events#BOOT\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.cameras = this.systems.cameras;\r\n\r\n this.displayList = this.systems.displayList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#start\r\n * @fires Phaser.Input.Events#START\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.manager.events.on(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.on(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n this.enabled = true;\r\n\r\n // Populate the pointer drag states\r\n this._dragState = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.START);\r\n },\r\n\r\n /**\r\n * Game Over handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOver: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OVER, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * Game Out handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOut: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OUT, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * The pre-update handler is responsible for checking the pending removal and insertion lists and\r\n * deleting old Game Objects.\r\n *\r\n * @method Phaser.Input.InputPlugin#preUpdate\r\n * @private\r\n * @fires Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.PRE_UPDATE);\r\n\r\n var removeList = this._pendingRemoval;\r\n var insertList = this._pendingInsertion;\r\n\r\n var toRemove = removeList.length;\r\n var toInsert = insertList.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var current = this._list;\r\n\r\n // Delete old gameObjects\r\n for (var i = 0; i < toRemove; i++)\r\n {\r\n var gameObject = removeList[i];\r\n\r\n var index = current.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n current.splice(index, 1);\r\n\r\n this.clear(gameObject, true);\r\n }\r\n }\r\n\r\n // Clear the removal list\r\n removeList.length = 0;\r\n this._pendingRemoval.length = 0;\r\n\r\n // Move pendingInsertion to list (also clears pendingInsertion at the same time)\r\n this._list = current.concat(insertList.splice(0));\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.InputPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * This is called automatically by the Input Manager.\r\n * It emits events for plugins to listen to and also handles polling updates, if enabled.\r\n *\r\n * @method Phaser.Input.InputPlugin#updatePoll\r\n * @since 3.18.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n updatePoll: function (time, delta)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n // The plugins should update every frame, regardless if there has been\r\n // any DOM input events or not (such as the Gamepad and Keyboard)\r\n this.pluginEvents.emit(Events.UPDATE, time, delta);\r\n\r\n // We can leave now if we've already updated once this frame via the immediate DOM event handlers\r\n if (this._updatedThisFrame)\r\n {\r\n this._updatedThisFrame = false;\r\n\r\n return false;\r\n }\r\n\r\n var i;\r\n var manager = this.manager;\r\n\r\n var pointers = manager.pointers;\r\n var pointersTotal = manager.pointersTotal;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n pointers[i].updateMotion();\r\n }\r\n\r\n // No point going any further if there aren't any interactive objects\r\n if (this._list.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var rate = this.pollRate;\r\n\r\n if (rate === -1)\r\n {\r\n return false;\r\n }\r\n else if (rate > 0)\r\n {\r\n this._pollTimer -= delta;\r\n\r\n if (this._pollTimer < 0)\r\n {\r\n // Discard timer diff, we're ready to poll again\r\n this._pollTimer = this.pollRate;\r\n }\r\n else\r\n {\r\n // Not enough time has elapsed since the last poll, so abort now\r\n return false;\r\n }\r\n }\r\n\r\n // We got this far? Then we should poll for movement\r\n var captured = false;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n total += this.processOverOutEvents(pointer);\r\n\r\n this.processDragThresholdEvent(pointer);\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * This method is called when a DOM Event is received by the Input Manager. It handles dispatching the events\r\n * to relevant input enabled Game Objects in this scene.\r\n *\r\n * @method Phaser.Input.InputPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n * \r\n * @return {boolean} `true` if this Scene has captured the input events from all other Scenes, otherwise `false`.\r\n */\r\n update: function (type, pointers)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n var pointersTotal = pointers.length;\r\n var captured = false;\r\n\r\n for (var i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n switch (type)\r\n {\r\n case CONST.MOUSE_DOWN:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_UP:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_START:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_END:\r\n case CONST.TOUCH_CANCEL:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_MOVE:\r\n case CONST.TOUCH_MOVE:\r\n total += this.processDragMoveEvent(pointer);\r\n total += this.processMoveEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_WHEEL:\r\n total += this.processWheelEvent(pointer);\r\n break;\r\n }\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n this._updatedThisFrame = true;\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * Clears a Game Object so it no longer has an Interactive Object associated with it.\r\n * The Game Object is then queued for removal from the Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#clear\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have its Interactive Object removed.\r\n * @param {boolean} [skipQueue=false] - Skip adding this Game Object into the removal queue?\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had its Interactive Object removed.\r\n */\r\n clear: function (gameObject, skipQueue)\r\n {\r\n if (skipQueue === undefined) { skipQueue = false; }\r\n\r\n var input = gameObject.input;\r\n\r\n // If GameObject.input already cleared from higher class\r\n if (!input)\r\n {\r\n return;\r\n }\r\n\r\n if (!skipQueue)\r\n {\r\n this.queueForRemoval(gameObject);\r\n }\r\n\r\n input.gameObject = undefined;\r\n input.target = undefined;\r\n input.hitArea = undefined;\r\n input.hitAreaCallback = undefined;\r\n input.callbackContext = undefined;\r\n\r\n this.manager.resetCursor(input);\r\n\r\n gameObject.input = null;\r\n\r\n // Clear from _draggable, _drag and _over\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n\r\n index = this._drag[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._drag[0].splice(index, 1);\r\n }\r\n\r\n index = this._over[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._over[0].splice(index, 1);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Disables Input on a single Game Object.\r\n *\r\n * An input disabled Game Object still retains its Interactive Object component and can be re-enabled\r\n * at any time, by passing it to `InputPlugin.enable`.\r\n *\r\n * @method Phaser.Input.InputPlugin#disable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to have its input system disabled.\r\n */\r\n disable: function (gameObject)\r\n {\r\n gameObject.input.enabled = false;\r\n },\r\n\r\n /**\r\n * Enable a Game Object for interaction.\r\n *\r\n * If the Game Object already has an Interactive Object component, it is enabled and returned.\r\n *\r\n * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#enable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to be enabled for input.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not?\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enable: function (gameObject, shape, callback, dropZone)\r\n {\r\n if (dropZone === undefined) { dropZone = false; }\r\n\r\n if (gameObject.input)\r\n {\r\n // If it is already has an InteractiveObject then just enable it and return\r\n gameObject.input.enabled = true;\r\n }\r\n else\r\n {\r\n // Create an InteractiveObject and enable it\r\n this.setHitArea(gameObject, shape, callback);\r\n }\r\n\r\n if (gameObject.input && dropZone && !gameObject.input.dropZone)\r\n {\r\n gameObject.input.dropZone = dropZone;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects\r\n * it is currently above.\r\n *\r\n * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple\r\n * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.\r\n *\r\n * @method Phaser.Input.InputPlugin#hitTestPointer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against the Game Objects.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of all the interactive Game Objects the Pointer was above.\r\n */\r\n hitTestPointer: function (pointer)\r\n {\r\n var cameras = this.cameras.getCamerasBelowPointer(pointer);\r\n\r\n for (var c = 0; c < cameras.length; c++)\r\n {\r\n var camera = cameras[c];\r\n\r\n // Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'over' array.\r\n // All objects in this array are input enabled, as checked by the hitTest method, so we don't need to check later on as well.\r\n var over = this.manager.hitTest(pointer, this._list, camera);\r\n\r\n // Filter out the drop zones\r\n for (var i = 0; i < over.length; i++)\r\n {\r\n var obj = over[i];\r\n\r\n if (obj.input.dropZone)\r\n {\r\n this._tempZones.push(obj);\r\n }\r\n }\r\n\r\n if (over.length > 0)\r\n {\r\n pointer.camera = camera;\r\n\r\n return over;\r\n }\r\n }\r\n\r\n // If we got this far then there were no Game Objects below the pointer, but it was still over\r\n // a camera, so set that the top-most one into the pointer\r\n\r\n pointer.camera = cameras[0];\r\n\r\n return [];\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer down event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDownEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer being tested.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processDownEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_DOWN, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_DOWN, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.downElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_DOWN, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_DOWN_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Returns the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state will be one of the following:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#getDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to get the drag state for.\r\n *\r\n * @return {integer} The drag state of the given Pointer.\r\n */\r\n getDragState: function (pointer)\r\n {\r\n return this._dragState[pointer.id];\r\n },\r\n\r\n /**\r\n * Sets the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state must be one of the following values:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#setDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to set the drag state for.\r\n * @param {integer} state - The drag state value. An integer between 0 and 5.\r\n */\r\n setDragState: function (pointer, state)\r\n {\r\n this._dragState[pointer.id] = state;\r\n },\r\n\r\n /**\r\n * Checks to see if a Pointer is ready to drag the objects below it, based on either a distance\r\n * or time threshold.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragThresholdEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check the drag thresholds on.\r\n * @param {number} time - The current time.\r\n */\r\n processDragThresholdEvent: function (pointer, time)\r\n {\r\n var passed = false;\r\n var timeThreshold = this.dragTimeThreshold;\r\n var distanceThreshold = this.dragDistanceThreshold;\r\n\r\n if (distanceThreshold > 0 && DistanceBetween(pointer.x, pointer.y, pointer.downX, pointer.downY) >= distanceThreshold)\r\n {\r\n // It has moved far enough to be considered a drag\r\n passed = true;\r\n }\r\n else if (timeThreshold > 0 && (time >= pointer.downTime + timeThreshold))\r\n {\r\n // It has been held down long enough to be considered a drag\r\n passed = true;\r\n }\r\n\r\n if (passed)\r\n {\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the drag list for the given pointer and dispatches the start events for each object on it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragStartList\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_START\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that DRAG_START was called on.\r\n */\r\n processDragStartList: function (pointer)\r\n {\r\n // 3 = Pointer meets criteria and is freshly down, notify the draglist\r\n if (this.getDragState(pointer) !== 3)\r\n {\r\n return 0;\r\n }\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n input.dragState = 2;\r\n\r\n input.dragStartX = gameObject.x;\r\n input.dragStartY = gameObject.y;\r\n\r\n input.dragStartXGlobal = pointer.x;\r\n input.dragStartYGlobal = pointer.y;\r\n\r\n input.dragX = input.dragStartXGlobal - input.dragStartX;\r\n input.dragY = input.dragStartYGlobal - input.dragStartY;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_START, pointer, input.dragX, input.dragY);\r\n\r\n this.emit(Events.DRAG_START, pointer, gameObject);\r\n }\r\n\r\n this.setDragState(pointer, 4);\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragDownEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were collected on the drag list.\r\n */\r\n processDragDownEvent: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n if (this._draggable.length === 0 || currentlyOver.length === 0 || !pointer.primaryDown || this.getDragState(pointer) !== 0)\r\n {\r\n // There are no draggable items, no over items or the pointer isn't down, so let's not even bother going further\r\n return 0;\r\n }\r\n\r\n // 1 = Primary button down and objects below, so collect a draglist\r\n this.setDragState(pointer, 1);\r\n\r\n // Get draggable objects, sort them, pick the top (or all) and store them somewhere\r\n var draglist = [];\r\n\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (gameObject.input.draggable && (gameObject.input.dragState === 0))\r\n {\r\n draglist.push(gameObject);\r\n }\r\n }\r\n\r\n if (draglist.length === 0)\r\n {\r\n this.setDragState(pointer, 0);\r\n\r\n return 0;\r\n }\r\n else if (draglist.length > 1)\r\n {\r\n this.sortGameObjects(draglist);\r\n\r\n if (this.topOnly)\r\n {\r\n draglist.splice(1);\r\n }\r\n }\r\n\r\n // draglist now contains all potential candidates for dragging\r\n this._drag[pointer.id] = draglist;\r\n\r\n if (this.dragDistanceThreshold === 0 || this.dragTimeThreshold === 0)\r\n {\r\n // No drag criteria, so snap immediately to mode 3\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n else\r\n {\r\n // Check the distance / time on the next event\r\n this.setDragState(pointer, 2);\r\n\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Processes a 'drag move' event for the given pointer. \r\n *\r\n * @method Phaser.Input.InputPlugin#processDragMoveEvent\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_ENTER\r\n * @fires Phaser.Input.Events#DRAG\r\n * @fires Phaser.Input.Events#DRAG_LEAVE\r\n * @fires Phaser.Input.Events#DRAG_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragMoveEvent: function (pointer)\r\n {\r\n if (this.getDragState(pointer) !== 4)\r\n {\r\n return 0;\r\n }\r\n\r\n // 4 = Pointer actively dragging the draglist and has moved\r\n var dropZones = this._tempZones;\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n var target = input.target;\r\n\r\n // If this GO has a target then let's check it\r\n if (target)\r\n {\r\n var index = dropZones.indexOf(target);\r\n\r\n // Got a target, are we still over it?\r\n if (index === 0)\r\n {\r\n // We're still over it, and it's still the top of the display list, phew ...\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_OVER, pointer, target);\r\n\r\n this.emit(Events.DRAG_OVER, pointer, gameObject, target);\r\n }\r\n else if (index > 0)\r\n {\r\n // Still over it but it's no longer top of the display list (targets must always be at the top)\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope, we've moved on (or the target has!), leave the old target\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n // Anything new to replace it?\r\n // Yup!\r\n if (dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope\r\n input.target = null;\r\n }\r\n }\r\n }\r\n else if (!target && dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n\r\n var dragX;\r\n var dragY;\r\n\r\n if (!gameObject.parentContainer)\r\n {\r\n dragX = pointer.x - input.dragX;\r\n dragY = pointer.y - input.dragY;\r\n }\r\n else\r\n {\r\n var dx = pointer.x - input.dragStartXGlobal;\r\n var dy = pointer.y - input.dragStartYGlobal;\r\n\r\n var rotation = gameObject.getParentRotation();\r\n \r\n var dxRotated = dx * Math.cos(rotation) + dy * Math.sin(rotation);\r\n var dyRotated = dy * Math.cos(rotation) - dx * Math.sin(rotation);\r\n\r\n dragX = dxRotated + input.dragStartX;\r\n dragY = dyRotated + input.dragStartY;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG, pointer, dragX, dragY);\r\n\r\n this.emit(Events.DRAG, pointer, gameObject, dragX, dragY);\r\n }\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragUpEvent\r\n * @fires Phaser.Input.Events#DRAG_END\r\n * @fires Phaser.Input.Events#DROP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragUpEvent: function (pointer)\r\n {\r\n // 5 = Pointer was actively dragging but has been released, notify draglist\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.dragState === 2)\r\n {\r\n input.dragState = 0;\r\n\r\n input.dragX = input.localX - gameObject.displayOriginX;\r\n input.dragY = input.localY - gameObject.displayOriginY;\r\n\r\n var dropped = false;\r\n\r\n var target = input.target;\r\n\r\n if (target)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DROP, pointer, target);\r\n\r\n this.emit(Events.DROP, pointer, gameObject, target);\r\n\r\n input.target = null;\r\n\r\n dropped = true;\r\n }\r\n\r\n // And finally the dragend event\r\n\r\n if (gameObject.input)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_END, pointer, input.dragX, input.dragY, dropped);\r\n\r\n this.emit(Events.DRAG_END, pointer, gameObject, dropped);\r\n }\r\n }\r\n }\r\n\r\n this.setDragState(pointer, 0);\r\n\r\n list.splice(0);\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer movement event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processMoveEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @fires Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processMoveEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_MOVE, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_MOVE, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n if (this.topOnly)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_MOVE, pointer, currentlyOver);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles a mouse wheel event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processWheelEvent\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @fires Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @fires Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processWheelEvent: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n var dx = pointer.deltaX;\r\n var dy = pointer.deltaY;\r\n var dz = pointer.deltaZ;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_WHEEL, pointer, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_WHEEL, pointer, gameObject, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_WHEEL, pointer, currentlyOver, dx, dy, dz);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over events.\r\n * This is called when a touch input hits the canvas, having previously been off of it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = currentlyOver.length;\r\n\r\n var justOver = [];\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n \r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n justOver.push(gameObject);\r\n\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = justOver;\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer out events.\r\n * This is called when a touch input leaves the canvas, as it can never be 'over' in this case.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOutEvents: function (pointer)\r\n {\r\n var previouslyOver = this._over[pointer.id];\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = previouslyOver.length;\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n this.sortGameObjects(previouslyOver);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = previouslyOver[i];\r\n \r\n // Call onOut for everything in the previouslyOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n \r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n \r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n \r\n totalInteracted++;\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n \r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n \r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, previouslyOver);\r\n }\r\n }\r\n\r\n this._over[pointer.id] = [];\r\n }\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over and out events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverOutEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var i;\r\n var gameObject;\r\n var justOut = [];\r\n var justOver = [];\r\n var stillOver = [];\r\n var previouslyOver = this._over[pointer.id];\r\n var currentlyDragging = this._drag[pointer.id];\r\n\r\n var manager = this.manager;\r\n\r\n // Go through all objects the pointer was previously over, and see if it still is.\r\n // Splits the previouslyOver array into two parts: justOut and stillOver\r\n\r\n for (i = 0; i < previouslyOver.length; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n\r\n if (currentlyOver.indexOf(gameObject) === -1 && currentlyDragging.indexOf(gameObject) === -1)\r\n {\r\n // Not in the currentlyOver array, so must be outside of this object now\r\n justOut.push(gameObject);\r\n }\r\n else\r\n {\r\n // In the currentlyOver array\r\n stillOver.push(gameObject);\r\n }\r\n }\r\n\r\n // Go through all objects the pointer is currently over (the hit test results)\r\n // and if not in the previouslyOver array we know it's a new entry, so add to justOver\r\n for (i = 0; i < currentlyOver.length; i++)\r\n {\r\n gameObject = currentlyOver[i];\r\n\r\n // Is this newly over?\r\n\r\n if (previouslyOver.indexOf(gameObject) === -1)\r\n {\r\n justOver.push(gameObject);\r\n }\r\n }\r\n\r\n // By this point the arrays are filled, so now we can process what happened...\r\n\r\n // Process the Just Out objects\r\n var total = justOut.length;\r\n\r\n var totalInteracted = 0;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOut);\r\n\r\n // Call onOut for everything in the justOut array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOut[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Reset cursor before we emit the event, in case they want to change it during the event\r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, justOut);\r\n }\r\n }\r\n\r\n // Process the Just Over objects\r\n total = justOver.length;\r\n\r\n _eventData.cancelled = false;\r\n\r\n aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOver);\r\n\r\n // Call onOver for everything in the justOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Set cursor before we emit the event, in case they want to change it during the event\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Add the contents of justOver to the previously over array\r\n previouslyOver = stillOver.concat(justOver);\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = this.sortGameObjects(previouslyOver);\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer up events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processUpEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_UP\r\n * @fires Phaser.Input.Events#POINTER_UP\r\n * @fires Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processUpEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_UP, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.upElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_UP, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_UP_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return currentlyOver.length;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for insertion into this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForInsertion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForInsertion: function (child)\r\n {\r\n if (this._pendingInsertion.indexOf(child) === -1 && this._list.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for removal from this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForRemoval\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForRemoval: function (child)\r\n {\r\n this._pendingRemoval.push(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the draggable state of the given array of Game Objects.\r\n *\r\n * They can either be set to be draggable, or can have their draggable state removed by passing `false`.\r\n *\r\n * A Game Object will not fire drag events unless it has been specifically enabled for drag.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDraggable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on.\r\n * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setDraggable: function (gameObjects, value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n gameObject.input.draggable = value;\r\n\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (value && index === -1)\r\n {\r\n this._draggable.push(gameObject);\r\n }\r\n else if (!value && index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle\r\n * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them.\r\n *\r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect());\r\n * ```\r\n * \r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150));\r\n * ```\r\n *\r\n * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up,\r\n * dragstart, drag, etc.\r\n *\r\n * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from\r\n * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on\r\n * Game Objects that really need it.\r\n * \r\n * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText,\r\n * Render Textures, Text, Tilemaps, Containers or Particles.\r\n *\r\n * @method Phaser.Input.InputPlugin#makePixelPerfect\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [alphaTolerance=1] - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} A Pixel Perfect Handler for use as a hitArea shape callback.\r\n */\r\n makePixelPerfect: function (alphaTolerance)\r\n {\r\n if (alphaTolerance === undefined) { alphaTolerance = 1; }\r\n\r\n var textureManager = this.systems.textures;\r\n\r\n return CreatePixelPerfectHandler(textureManager, alphaTolerance);\r\n },\r\n\r\n /**\r\n * Sets the hit area for the given array of Game Objects.\r\n *\r\n * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle`\r\n * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback.\r\n *\r\n * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible\r\n * to calculate.\r\n *\r\n * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if\r\n * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this,\r\n * such as `Phaser.Geom.Rectangle.Contains`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set the hit area on.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitArea: function (gameObjects, shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n return this.setHitAreaFromTexture(gameObjects);\r\n }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n var draggable = false;\r\n var dropZone = false;\r\n var cursor = false;\r\n var useHandCursor = false;\r\n var pixelPerfect = false;\r\n var customHitArea = true;\r\n\r\n // Config object?\r\n if (IsPlainObject(shape))\r\n {\r\n var config = shape;\r\n\r\n shape = GetFastValue(config, 'hitArea', null);\r\n callback = GetFastValue(config, 'hitAreaCallback', null);\r\n draggable = GetFastValue(config, 'draggable', false);\r\n dropZone = GetFastValue(config, 'dropZone', false);\r\n cursor = GetFastValue(config, 'cursor', false);\r\n useHandCursor = GetFastValue(config, 'useHandCursor', false);\r\n\r\n pixelPerfect = GetFastValue(config, 'pixelPerfect', false);\r\n var alphaTolerance = GetFastValue(config, 'alphaTolerance', 1);\r\n\r\n if (pixelPerfect)\r\n {\r\n shape = {};\r\n callback = this.makePixelPerfect(alphaTolerance);\r\n }\r\n\r\n // Still no hitArea or callback?\r\n if (!shape || !callback)\r\n {\r\n this.setHitAreaFromTexture(gameObjects);\r\n customHitArea = false;\r\n }\r\n }\r\n else if (typeof shape === 'function' && !callback)\r\n {\r\n callback = shape;\r\n shape = {};\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n if (pixelPerfect && gameObject.type === 'Container')\r\n {\r\n console.warn('Cannot pixelPerfect test a Container. Use a custom callback.');\r\n continue;\r\n }\r\n\r\n var io = (!gameObject.input) ? CreateInteractiveObject(gameObject, shape, callback) : gameObject.input;\r\n\r\n io.customHitArea = customHitArea;\r\n io.dropZone = dropZone;\r\n io.cursor = (useHandCursor) ? 'pointer' : cursor;\r\n\r\n gameObject.input = io;\r\n\r\n if (draggable)\r\n {\r\n this.setDraggable(gameObject);\r\n }\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using\r\n * the given coordinates and radius to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaCircle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a circle hit area.\r\n * @param {number} x - The center of the circle.\r\n * @param {number} y - The center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaCircle: function (gameObjects, x, y, radius, callback)\r\n {\r\n if (callback === undefined) { callback = CircleContains; }\r\n\r\n var shape = new Circle(x, y, radius);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {number} x - The center of the ellipse.\r\n * @param {number} y - The center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaEllipse: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = EllipseContains; }\r\n\r\n var shape = new Ellipse(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the Game Objects texture frame to define the position and size of the hit area.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaFromTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaFromTexture: function (gameObjects, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n var frame = gameObject.frame;\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n if (gameObject.width)\r\n {\r\n width = gameObject.width;\r\n height = gameObject.height;\r\n }\r\n else if (frame)\r\n {\r\n width = frame.realWidth;\r\n height = frame.realHeight;\r\n }\r\n\r\n if (gameObject.type === 'Container' && (width === 0 || height === 0))\r\n {\r\n console.warn('Container.setInteractive must specify a Shape or call setSize() first');\r\n continue;\r\n }\r\n\r\n if (width !== 0 && height !== 0)\r\n {\r\n gameObject.input = CreateInteractiveObject(gameObject, new Rectangle(0, 0, width, height), callback);\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a rectangular hit area.\r\n * @param {number} x - The top-left of the rectangle.\r\n * @param {number} y - The top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaRectangle: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n var shape = new Rectangle(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using\r\n * the given coordinates to control the position of its points.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a triangular hit area.\r\n * @param {number} x1 - The x coordinate of the first point of the triangle.\r\n * @param {number} y1 - The y coordinate of the first point of the triangle.\r\n * @param {number} x2 - The x coordinate of the second point of the triangle.\r\n * @param {number} y2 - The y coordinate of the second point of the triangle.\r\n * @param {number} x3 - The x coordinate of the third point of the triangle.\r\n * @param {number} y3 - The y coordinate of the third point of the triangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback)\r\n {\r\n if (callback === undefined) { callback = TriangleContains; }\r\n\r\n var shape = new Triangle(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Creates an Input Debug Shape for the given Game Object.\r\n * \r\n * The Game Object must have _already_ been enabled for input prior to calling this method.\r\n * \r\n * This is intended to assist you during development and debugging.\r\n * \r\n * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,\r\n * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.\r\n * \r\n * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.\r\n * \r\n * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object\r\n * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via\r\n * the Game Object property: `GameObject.input.hitAreaDebug`.\r\n * \r\n * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,\r\n * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the\r\n * method `InputPlugin.removeDebug`.\r\n * \r\n * Note that the debug shape will only show the outline of the input area. If the input test is using a\r\n * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that\r\n * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not\r\n * work.\r\n *\r\n * @method Phaser.Input.InputPlugin#enableDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for.\r\n * @param {number} [color=0x00ff00] - The outline color of the debug shape.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enableDebug: function (gameObject, color)\r\n {\r\n if (color === undefined) { color = 0x00ff00; }\r\n\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.hitArea)\r\n {\r\n return this;\r\n }\r\n\r\n var shape = input.hitArea;\r\n var shapeType = shape.type;\r\n var debug = input.hitAreaDebug;\r\n var factory = this.systems.add;\r\n var updateList = this.systems.updateList;\r\n\r\n if (debug)\r\n {\r\n updateList.remove(debug);\r\n\r\n debug.destroy();\r\n\r\n debug = null;\r\n }\r\n\r\n switch (shapeType)\r\n {\r\n case GEOM_CONST.CIRCLE:\r\n debug = factory.arc(0, 0, shape.radius);\r\n break;\r\n\r\n case GEOM_CONST.ELLIPSE:\r\n debug = factory.ellipse(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.LINE:\r\n debug = factory.line(0, 0, shape.x1, shape.y1, shape.x2, shape.y2);\r\n break;\r\n\r\n case GEOM_CONST.POLYGON:\r\n debug = factory.polygon(0, 0, shape.points);\r\n break;\r\n\r\n case GEOM_CONST.RECTANGLE:\r\n debug = factory.rectangle(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.TRIANGLE:\r\n debug = factory.triangle(0, 0, shape.x1, shape.y1, shape.x2, shape.y2, shape.x3, shape.y3);\r\n break;\r\n }\r\n\r\n if (debug)\r\n {\r\n debug.isFilled = false;\r\n\r\n debug.preUpdate = function ()\r\n {\r\n debug.setStrokeStyle(1 / gameObject.scale, color);\r\n \r\n debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY);\r\n debug.setRotation(gameObject.rotation);\r\n debug.setScale(gameObject.scaleX, gameObject.scaleY);\r\n debug.setPosition(gameObject.x, gameObject.y);\r\n debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY);\r\n };\r\n \r\n updateList.add(debug);\r\n \r\n input.hitAreaDebug = debug;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an Input Debug Shape from the given Game Object.\r\n * \r\n * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.\r\n *\r\n * @method Phaser.Input.InputPlugin#removeDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n removeDebug: function (gameObject)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaDebug)\r\n {\r\n var debug = input.hitAreaDebug;\r\n\r\n this.systems.updateList.remove(debug);\r\n \r\n debug.destroy();\r\n\r\n input.hitAreaDebug = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Pointers to always poll.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it, regardless if the Pointer has actually moved or not.\r\n *\r\n * You should enable this if you want objects in your game to fire over / out events, and the objects\r\n * are constantly moving, but the pointer may not have. Polling every frame has additional computation\r\n * costs, especially if there are a large number of interactive objects in your game.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollAlways\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollAlways: function ()\r\n {\r\n return this.setPollRate(0);\r\n },\r\n\r\n /**\r\n * Sets the Pointers to only poll when they are moved or updated.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollOnMove\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollOnMove: function ()\r\n {\r\n return this.setPollRate(-1);\r\n },\r\n\r\n /**\r\n * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer\r\n * will be polled again. See the `setPollAlways` and `setPollOnMove` methods.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollRate\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollRate: function (value)\r\n {\r\n this.pollRate = value;\r\n this._pollTimer = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from\r\n * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event\r\n * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setGlobalTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setGlobalTopOnly: function (value)\r\n {\r\n this.manager.globalTopOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @method Phaser.Input.InputPlugin#setTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setTopOnly: function (value)\r\n {\r\n this.topOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order\r\n * with the lowest at the bottom.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortGameObjects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} gameObjects - An array of Game Objects to be sorted.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The sorted array of Game Objects.\r\n */\r\n sortGameObjects: function (gameObjects)\r\n {\r\n if (gameObjects.length < 2)\r\n {\r\n return gameObjects;\r\n }\r\n\r\n this.scene.sys.depthSort();\r\n\r\n return gameObjects.sort(this.sortHandlerGO.bind(this));\r\n },\r\n\r\n /**\r\n * Return the child lowest down the display list (with the smallest index)\r\n * Will iterate through all parent containers, if present.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortHandlerGO\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object to compare.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object to compare.\r\n *\r\n * @return {integer} Returns either a negative or positive integer, or zero if they match.\r\n */\r\n sortHandlerGO: function (childA, childB)\r\n {\r\n if (!childA.parentContainer && !childB.parentContainer)\r\n {\r\n // Quick bail out when neither child has a container\r\n return this.displayList.getIndex(childB) - this.displayList.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB.parentContainer)\r\n {\r\n // Quick bail out when both children have the same container\r\n return childB.parentContainer.getIndex(childB) - childA.parentContainer.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return -1;\r\n }\r\n else if (childB.parentContainer === childA)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return 1;\r\n }\r\n else\r\n {\r\n // Container index check\r\n var listA = childA.getIndexList();\r\n var listB = childB.getIndexList();\r\n var len = Math.min(listA.length, listB.length);\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n var indexA = listA[i];\r\n var indexB = listB[i];\r\n\r\n if (indexA === indexB)\r\n {\r\n // Go to the next level down\r\n continue;\r\n }\r\n else\r\n {\r\n // Non-matching parents, so return\r\n return indexB - indexA;\r\n }\r\n }\r\n }\r\n\r\n // Technically this shouldn't happen, but ...\r\n return 0;\r\n },\r\n\r\n /**\r\n * This method should be called from within an input event handler, such as `pointerdown`.\r\n * \r\n * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene\r\n * not yet handled in the scene list.\r\n *\r\n * @method Phaser.Input.InputPlugin#stopPropagation\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n stopPropagation: function ()\r\n {\r\n this.manager._tempSkip = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#addPointer\r\n * @since 3.10.0\r\n * \r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n return this.manager.addPointer(quantity);\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input instance.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.manager.setDefaultCursor(cursor);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionIn\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionIn: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin has finished transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionComplete\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n if (!this.settings.transitionAllowInput)\r\n {\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning out.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionOut\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionOut: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Input.InputPlugin#shutdown\r\n * @fires Phaser.Input.Events#SHUTDOWN\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.SHUTDOWN);\r\n\r\n this._temp.length = 0;\r\n this._list.length = 0;\r\n this._draggable.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n this._dragState.length = 0;\r\n\r\n for (var i = 0; i < 10; i++)\r\n {\r\n this._drag[i] = [];\r\n this._over[i] = [];\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n\r\n this.manager.events.off(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.off(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed. \r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Input.InputPlugin#destroy\r\n * @fires Phaser.Input.Events#DESTROY\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.DESTROY);\r\n\r\n this.pluginEvents.removeAllListeners();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.cameras = null;\r\n this.manager = null;\r\n this.events = null;\r\n this.mouse = null;\r\n },\r\n\r\n /**\r\n * The x coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#x\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#y\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n *\r\n * @name Phaser.Input.InputPlugin#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isOver: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.isOver;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#mousePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n mousePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.mousePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The current active input Pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n activePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer1\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer1: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[1];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer2\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer2: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[2];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer3\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer3: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[3];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer4\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer4: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[4];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer5\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer5: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[5];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer6\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer6: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[6];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer7\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer7: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[7];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer8\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer8: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[8];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer9\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer9: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[9];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer10\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer10: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[10];\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('InputPlugin', InputPlugin, 'input');\r\n\r\nmodule.exports = InputPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPlugin.js?")},"./node_modules/phaser/src/input/InputPluginCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar inputPlugins = {};\r\n\r\n/**\r\n * @namespace Phaser.Input.InputPluginCache\r\n */\r\n\r\nvar InputPluginCache = {};\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @name Phaser.Input.InputPluginCache.register\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used.\r\n * @param {string} settingsKey - The key in the Scene Settings to check to see if this plugin should install or not.\r\n * @param {string} configKey - The key in the Game Config to check to see if this plugin should install or not.\r\n */\r\nInputPluginCache.register = function (key, plugin, mapping, settingsKey, configKey)\r\n{\r\n inputPlugins[key] = { plugin: plugin, mapping: mapping, settingsKey: settingsKey, configKey: configKey };\r\n};\r\n\r\n/**\r\n * Returns the input plugin object from the cache based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.getCore\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to get.\r\n *\r\n * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object.\r\n */\r\nInputPluginCache.getPlugin = function (key)\r\n{\r\n return inputPlugins[key];\r\n};\r\n\r\n/**\r\n * Installs all of the registered Input Plugins into the given target.\r\n *\r\n * @name Phaser.Input.InputPluginCache.install\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into.\r\n */\r\nInputPluginCache.install = function (target)\r\n{\r\n var sys = target.scene.sys;\r\n var settings = sys.settings.input;\r\n var config = sys.game.config;\r\n\r\n for (var key in inputPlugins)\r\n {\r\n var source = inputPlugins[key].plugin;\r\n var mapping = inputPlugins[key].mapping;\r\n var settingsKey = inputPlugins[key].settingsKey;\r\n var configKey = inputPlugins[key].configKey;\r\n\r\n if (GetValue(settings, settingsKey, config[configKey]))\r\n {\r\n target[mapping] = new source(target);\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes an input plugin based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.remove\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to remove.\r\n */\r\nInputPluginCache.remove = function (key)\r\n{\r\n if (inputPlugins.hasOwnProperty(key))\r\n {\r\n delete inputPlugins[key];\r\n }\r\n};\r\n\r\nmodule.exports = InputPluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPluginCache.js?')},"./node_modules/phaser/src/input/Pointer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ../math/angle/Between */ \"./node_modules/phaser/src/math/angle/Between.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Distance = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar SmoothStepInterpolation = __webpack_require__(/*! ../math/interpolation/SmoothStepInterpolation */ \"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer object encapsulates both mouse and touch input within Phaser.\r\n *\r\n * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch\r\n * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly,\r\n * otherwise it won't be managed by the input system.\r\n *\r\n * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties\r\n * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game.\r\n *\r\n * The properties of this object are set by the Input Plugin during processing. This object is then sent in all\r\n * input related events that the Input Plugin emits, so you can reference properties from it directly in your\r\n * callbacks.\r\n *\r\n * @class Pointer\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} manager - A reference to the Input Manager.\r\n * @param {integer} id - The internal ID of this Pointer.\r\n */\r\nvar Pointer = new Class({\r\n\r\n initialize:\r\n\r\n function Pointer (manager, id)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Pointer#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The internal ID of this Pointer.\r\n *\r\n * @name Phaser.Input.Pointer#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.id = id;\r\n\r\n /**\r\n * The most recent native DOM Event this Pointer has processed.\r\n *\r\n * @name Phaser.Input.Pointer#event\r\n * @type {(TouchEvent|MouseEvent)}\r\n * @since 3.0.0\r\n */\r\n this.event;\r\n\r\n /**\r\n * The DOM element the Pointer was pressed down on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#downElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.downElement;\r\n\r\n /**\r\n * The DOM element the Pointer was released on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#upElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.upElement;\r\n\r\n /**\r\n * The camera the Pointer interacted with during its last update.\r\n * \r\n * A Pointer can only ever interact with one camera at once, which will be the top-most camera\r\n * in the list should multiple cameras be positioned on-top of each other.\r\n *\r\n * @name Phaser.Input.Pointer#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A read-only property that indicates which button was pressed, or released, on the pointer\r\n * during the most recent event. It is only set during `up` and `down` events.\r\n * \r\n * On Touch devices the value is always 0.\r\n * \r\n * Users may change the configuration of buttons on their pointing device so that if an event's button property\r\n * is zero, it may not have been caused by the button that is physically left–most on the pointing device;\r\n * however, it should behave as if the left button was clicked in the standard button layout.\r\n *\r\n * @name Phaser.Input.Pointer#button\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.button = 0;\r\n\r\n /**\r\n * 0: No button or un-initialized\r\n * 1: Left button\r\n * 2: Right button\r\n * 4: Wheel button or middle button\r\n * 8: 4th button (typically the \"Browser Back\" button)\r\n * 16: 5th button (typically the \"Browser Forward\" button)\r\n * \r\n * For a mouse configured for left-handed use, the button actions are reversed.\r\n * In this case, the values are read from right to left.\r\n *\r\n * @name Phaser.Input.Pointer#buttons\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.buttons = 0;\r\n\r\n /**\r\n * The position of the Pointer in screen space.\r\n *\r\n * @name Phaser.Input.Pointer#position\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The previous position of the Pointer in screen space.\r\n * \r\n * The old x and y values are stored in here during the InputManager.transformPointer call.\r\n * \r\n * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition.\r\n *\r\n * @name Phaser.Input.Pointer#prevPosition\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.prevPosition = new Vector2();\r\n\r\n /**\r\n * An internal vector used for calculations of the pointer speed and angle.\r\n *\r\n * @name Phaser.Input.Pointer#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.midPoint = new Vector2(-1, -1);\r\n\r\n /**\r\n * The current velocity of the Pointer, based on its current and previous positions.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The current angle the Pointer is moving, in radians, based on its previous and current position.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#angle\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The distance the Pointer has moved, based on its previous and current position.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n * \r\n * If you need the total distance travelled since the primary buttons was pressed down,\r\n * then use the `Pointer.getDistance` method.\r\n *\r\n * @name Phaser.Input.Pointer#distance\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.distance = 0;\r\n\r\n /**\r\n * The smoothing factor to apply to the Pointer position.\r\n * \r\n * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions\r\n * then you can set this value to apply an automatic smoothing to the positions as they are recorded.\r\n * \r\n * The default value of zero means 'no smoothing'.\r\n * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this\r\n * value directly, or by setting the `input.smoothFactor` property in the Game Config.\r\n * \r\n * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position\r\n * is always precise, and not smoothed.\r\n *\r\n * @name Phaser.Input.Pointer#smoothFactor\r\n * @type {number}\r\n * @default 0\r\n * @since 3.16.0\r\n */\r\n this.smoothFactor = 0;\r\n\r\n /**\r\n * The factor applied to the motion smoothing each frame.\r\n * \r\n * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity,\r\n * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current\r\n * position of the Pointer. 0.2 provides a good average but can be increased if you need a\r\n * quicker update and are working in a high performance environment. Never set this value to\r\n * zero.\r\n *\r\n * @name Phaser.Input.Pointer#motionFactor\r\n * @type {number}\r\n * @default 0.2\r\n * @since 3.16.0\r\n */\r\n this.motionFactor = 0.2;\r\n\r\n /**\r\n * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldX = 0;\r\n\r\n /**\r\n * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldY = 0;\r\n\r\n /**\r\n * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any)\r\n *\r\n * @name Phaser.Input.Pointer#moveTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upTime = 0;\r\n\r\n /**\r\n * Is the primary button down? (usually button 0, the left mouse button)\r\n *\r\n * @name Phaser.Input.Pointer#primaryDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.primaryDown = false;\r\n\r\n /**\r\n * Is _any_ button on this pointer considered as being down?\r\n *\r\n * @name Phaser.Input.Pointer#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * Did the previous input event come from a Touch input (true) or Mouse? (false)\r\n *\r\n * @name Phaser.Input.Pointer#wasTouch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.wasTouch = false;\r\n\r\n /**\r\n * Did this Pointer get canceled by a touchcancel event?\r\n * \r\n * Note: \"canceled\" is the American-English spelling of \"cancelled\". Please don't submit PRs correcting it!\r\n *\r\n * @name Phaser.Input.Pointer#wasCanceled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.15.0\r\n */\r\n this.wasCanceled = false;\r\n\r\n /**\r\n * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementX = 0;\r\n\r\n /**\r\n * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementY = 0;\r\n\r\n /**\r\n * The identifier property of the Pointer as set by the DOM event when this Pointer is started.\r\n *\r\n * @name Phaser.Input.Pointer#identifier\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.identifier = 0;\r\n\r\n /**\r\n * The pointerId property of the Pointer as set by the DOM event when this Pointer is started.\r\n * The browser can and will recycle this value.\r\n *\r\n * @name Phaser.Input.Pointer#pointerId\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.pointerId = null;\r\n\r\n /**\r\n * An active Pointer is one that is currently pressed down on the display.\r\n * A Mouse is always considered as active.\r\n *\r\n * @name Phaser.Input.Pointer#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = (id === 0) ? true : false;\r\n\r\n /**\r\n * Is this pointer Pointer Locked?\r\n * \r\n * Only a mouse pointer can be locked and it only becomes locked when requested via\r\n * the browsers Pointer Lock API.\r\n * \r\n * You can request this by calling the `this.input.mouse.requestPointerLock()` method from\r\n * a `pointerdown` or `pointerup` event handler.\r\n *\r\n * @name Phaser.Input.Pointer#locked\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaX = 0;\r\n\r\n /**\r\n * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n *\r\n * @name Phaser.Input.Pointer#deltaY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaY = 0;\r\n\r\n /**\r\n * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaZ\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaZ = 0;\r\n },\r\n\r\n /**\r\n * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are\r\n * the result of a translation through the given Camera.\r\n * \r\n * Note that the values will be automatically replaced the moment the Pointer is\r\n * updated by an input event, such as a mouse move, so should be used immediately.\r\n *\r\n * @method Phaser.Input.Pointer#updateWorldPoint\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {this} This Pointer object.\r\n */\r\n updateWorldPoint: function (camera)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n var temp = camera.getWorldPoint(x, y);\r\n\r\n this.worldX = temp.x;\r\n this.worldY = temp.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Camera and returns a Vector2 containing the translated position of this Pointer\r\n * within that Camera. This can be used to convert this Pointers position into camera space.\r\n *\r\n * @method Phaser.Input.Pointer#positionToCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the translation.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - A Vector2-like object in which to store the translated position.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} A Vector2 containing the translated coordinates of this Pointer, based on the given camera.\r\n */\r\n positionToCamera: function (camera, output)\r\n {\r\n return camera.getWorldPoint(this.x, this.y, output);\r\n },\r\n\r\n /**\r\n * Calculates the motion of this Pointer, including its velocity and angle of movement.\r\n * This method is called automatically each frame by the Input Manager.\r\n *\r\n * @method Phaser.Input.Pointer#updateMotion\r\n * @private\r\n * @since 3.16.0\r\n */\r\n updateMotion: function ()\r\n {\r\n var cx = this.position.x;\r\n var cy = this.position.y;\r\n\r\n var mx = this.midPoint.x;\r\n var my = this.midPoint.y;\r\n\r\n if (cx === mx && cy === my)\r\n {\r\n // Nothing to do here\r\n return;\r\n }\r\n\r\n // Moving towards our goal ...\r\n var vx = SmoothStepInterpolation(this.motionFactor, mx, cx);\r\n var vy = SmoothStepInterpolation(this.motionFactor, my, cy);\r\n\r\n if (FuzzyEqual(vx, cx, 0.1))\r\n {\r\n vx = cx;\r\n }\r\n\r\n if (FuzzyEqual(vy, cy, 0.1))\r\n {\r\n vy = cy;\r\n }\r\n\r\n this.midPoint.set(vx, vy);\r\n\r\n var dx = cx - vx;\r\n var dy = cy - vy;\r\n\r\n this.velocity.set(dx, dy);\r\n\r\n this.angle = Angle(vx, vy, cx, cy);\r\n\r\n this.distance = Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Up Event.\r\n *\r\n * @method Phaser.Input.Pointer#up\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n up: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.upElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Down Event.\r\n *\r\n * @method Phaser.Input.Pointer#down\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n down: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.downElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#move\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n move: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, true);\r\n\r\n if (this.locked)\r\n {\r\n // Multiple DOM events may occur within one frame, but only one Phaser event will fire\r\n this.movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;\r\n this.movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;\r\n }\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Wheel Event.\r\n *\r\n * @method Phaser.Input.Pointer#wheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The Wheel Event to process.\r\n */\r\n wheel: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n this.deltaX = event.deltaX;\r\n this.deltaY = event.deltaY;\r\n this.deltaZ = event.deltaZ;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Start Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchstart\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchstart: function (touch, event)\r\n {\r\n if (touch['pointerId'])\r\n {\r\n this.pointerId = touch.pointerId;\r\n }\r\n\r\n this.identifier = touch.identifier;\r\n this.target = touch.target;\r\n this.active = true;\r\n\r\n this.buttons = 1;\r\n\r\n this.event = event;\r\n\r\n this.downElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchmove\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchmove: function (touch, event)\r\n {\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, true);\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = true;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch End Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchend\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchend: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n \r\n this.active = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Cancel Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchcancel\r\n * @private\r\n * @since 3.15.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchcancel: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = true;\r\n \r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Checks to see if any buttons are being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#noButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if no buttons are being held down.\r\n */\r\n noButtonDown: function ()\r\n {\r\n return (this.buttons === 0);\r\n },\r\n\r\n /**\r\n * Checks to see if the left button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the left button is being held down.\r\n */\r\n leftButtonDown: function ()\r\n {\r\n return (this.buttons & 1) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the right button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the right button is being held down.\r\n */\r\n rightButtonDown: function ()\r\n {\r\n return (this.buttons & 2) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the middle button is being held down.\r\n */\r\n middleButtonDown: function ()\r\n {\r\n return (this.buttons & 4) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the back button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the back button is being held down.\r\n */\r\n backButtonDown: function ()\r\n {\r\n return (this.buttons & 8) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the forward button is being held down.\r\n */\r\n forwardButtonDown: function ()\r\n {\r\n return (this.buttons & 16) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the left button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the left button was just released.\r\n */\r\n leftButtonReleased: function ()\r\n {\r\n return (this.button === 0 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the right button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the right button was just released.\r\n */\r\n rightButtonReleased: function ()\r\n {\r\n return (this.button === 2 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the middle button was just released.\r\n */\r\n middleButtonReleased: function ()\r\n {\r\n return (this.button === 1 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the back button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the back button was just released.\r\n */\r\n backButtonReleased: function ()\r\n {\r\n return (this.button === 3 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the forward button was just released.\r\n */\r\n forwardButtonReleased: function ()\r\n {\r\n return (this.button === 4 && !this.isDown);\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded distance, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * If you wish to get the distance being travelled currently, based on the velocity of the Pointer,\r\n * then see the `Pointer.distance` property.\r\n *\r\n * @method Phaser.Input.Pointer#getDistance\r\n * @since 3.13.0\r\n *\r\n * @return {number} The distance the Pointer moved.\r\n */\r\n getDistance: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Distance(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Distance(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * horizontal distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded horizontal distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceX\r\n * @since 3.16.0\r\n *\r\n * @return {number} The horizontal distance the Pointer moved.\r\n */\r\n getDistanceX: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downX - this.x);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downX - this.upX);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * vertical distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded vertical distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceY\r\n * @since 3.16.0\r\n *\r\n * @return {number} The vertical distance the Pointer moved.\r\n */\r\n getDistanceY: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downY - this.y);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downY - this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * duration since the button was pressed down.\r\n * \r\n * If no button is held down, it will return the last recorded duration, based on the time\r\n * the Pointer button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDuration\r\n * @since 3.16.0\r\n *\r\n * @return {number} The duration the Pointer was held down for in milliseconds.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.manager.time - this.downTime);\r\n }\r\n else\r\n {\r\n return (this.upTime - this.downTime);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * angle between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded angle, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * If you wish to get the current angle, based on the velocity of the Pointer, then\r\n * see the `Pointer.angle` property.\r\n *\r\n * @method Phaser.Input.Pointer#getAngle\r\n * @since 3.16.0\r\n *\r\n * @return {number} The angle between the Pointer's coordinates in radians.\r\n */\r\n getAngle: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Angle(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Angle(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * Takes the previous and current Pointer positions and then generates an array of interpolated values between\r\n * the two. The array will be populated up to the size of the `steps` argument.\r\n * \r\n * ```javaScript\r\n * var points = pointer.getInterpolatedPosition(4);\r\n * \r\n * // points[0] = { x: 0, y: 0 }\r\n * // points[1] = { x: 2, y: 1 }\r\n * // points[2] = { x: 3, y: 2 }\r\n * // points[3] = { x: 6, y: 3 }\r\n * ```\r\n * \r\n * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer\r\n * events can often fire faster than the main browser loop, and this will help you avoid janky movement\r\n * especially if you have an object following a Pointer.\r\n * \r\n * Note that if you provide an output array it will only be populated up to the number of steps provided.\r\n * It will not clear any previous data that may have existed beyond the range of the steps count.\r\n * \r\n * Internally it uses the Smooth Step interpolation calculation.\r\n *\r\n * @method Phaser.Input.Pointer#getInterpolatedPosition\r\n * @since 3.11.0\r\n * \r\n * @param {integer} [steps=10] - The number of interpolation steps to use.\r\n * @param {array} [out] - An array to store the results in. If not provided a new one will be created.\r\n * \r\n * @return {array} An array of interpolated values.\r\n */\r\n getInterpolatedPosition: function (steps, out)\r\n {\r\n if (steps === undefined) { steps = 10; }\r\n if (out === undefined) { out = []; }\r\n\r\n var prevX = this.prevPosition.x;\r\n var prevY = this.prevPosition.y;\r\n\r\n var curX = this.position.x;\r\n var curY = this.position.y;\r\n\r\n for (var i = 0; i < steps; i++)\r\n {\r\n var t = (1 / steps) * i;\r\n\r\n out[i] = { x: SmoothStepInterpolation(t, prevX, curX), y: SmoothStepInterpolation(t, prevY, curY) };\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Destroys this Pointer instance and resets its external references.\r\n *\r\n * @method Phaser.Input.Pointer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n this.manager = null;\r\n this.position = null;\r\n },\r\n\r\n /**\r\n * The x position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldX` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldY` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Time when this Pointer was most recently updated by a DOM Event.\r\n * This comes directly from the `event.timeStamp` property.\r\n * If no event has yet taken place, it will return zero.\r\n *\r\n * @name Phaser.Input.Pointer#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return (this.event) ? this.event.timeStamp : 0;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pointer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/Pointer.js?")},"./node_modules/phaser/src/input/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar INPUT_CONST = {\r\n\r\n /**\r\n * The mouse pointer is being held down.\r\n * \r\n * @name Phaser.Input.MOUSE_DOWN\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_DOWN: 0,\r\n\r\n /**\r\n * The mouse pointer is being moved.\r\n * \r\n * @name Phaser.Input.MOUSE_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_MOVE: 1,\r\n\r\n /**\r\n * The mouse pointer is released.\r\n * \r\n * @name Phaser.Input.MOUSE_UP\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_UP: 2,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_START\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_START: 3,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_MOVE: 4,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_END\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_END: 5,\r\n\r\n /**\r\n * The pointer lock has changed.\r\n * \r\n * @name Phaser.Input.POINTER_LOCK_CHANGE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n POINTER_LOCK_CHANGE: 6,\r\n\r\n /**\r\n * A touch pointer has been been cancelled by the browser.\r\n * \r\n * @name Phaser.Input.TOUCH_CANCEL\r\n * @type {integer}\r\n * @since 3.15.0\r\n */\r\n TOUCH_CANCEL: 7,\r\n\r\n /**\r\n * The mouse wheel changes.\r\n * \r\n * @name Phaser.Input.MOUSE_WHEEL\r\n * @type {integer}\r\n * @since 3.18.0\r\n */\r\n MOUSE_WHEEL: 8\r\n\r\n};\r\n\r\nmodule.exports = INPUT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/const.js?")},"./node_modules/phaser/src/input/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves.\r\n *\r\n * @event Phaser.Input.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Destroy Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it is destroyed, signalling to all of its systems to destroy themselves.\r\n *\r\n * @event Phaser.Input.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag End Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer stops dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragend', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_END]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_END} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer stopped dragging.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Enter Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object into a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragenter', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_ENTER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_ENTER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves while dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drag', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Leave Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object out of a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragleave', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_LEAVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_LEAVE} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object over a Drag Target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragover', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_OVER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Start Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer starts to drag any Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragstart', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_START]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_START} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drop Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drops a Game Object on a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drop', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DROP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DROP} event instead.\r\n *\r\n * @event Phaser.Input.Events#DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer was dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down on _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectdown', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was pressed down on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag End Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer stops dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragend', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive](Phaser.GameObjects.GameObject#setInteractive) for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Enter Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it into a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragenter', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves while dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drag', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Leave Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it out of a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragleave', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it over a drag target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Start Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer starts to drag it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragstart', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * There are lots of useful drag related properties that are set within the Game Object when dragging occurs.\r\n * For example, `gameObject.input.dragStartX`, `dragStartY` and so on.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drop Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drops it on a Drag Target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drop', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved across _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectmove', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was moved on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectmove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectout', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved out of.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectover', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved over.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Down Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is pressed down on it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerdown', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Move Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointermove', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Out Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves out of it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerout', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Up Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is released while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerup', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Wheel Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer has its wheel moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('wheel', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectup', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when released.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel moved while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectwheel', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when the wheel changed.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectwheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Out Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer leaves the game canvas and is now\r\n * outside of it, elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameout', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OUT\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas out.\r\n */\r\nmodule.exports = 'gameout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Over Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer enters the game canvas and is now\r\n * over of it, having previously been elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameover', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OVER\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas over.\r\n */\r\nmodule.exports = 'gameover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when it boots.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Process Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when not using the legacy queue system,\r\n * and it wants the Input Plugins to update themselves.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'process';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Update Event.\r\n * \r\n * This internal event is dispatched by the Input Manager as part of its update step.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Pointer Lock Change Event.\r\n * \r\n * This event is dispatched by the Input Manager when it is processing a native Pointer Lock Change DOM Event.\r\n *\r\n * @event Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @since 3.0.0\r\n * \r\n * @param {Event} event - The native DOM Event.\r\n * @param {boolean} locked - The locked state of the Mouse Pointer.\r\n */\r\nmodule.exports = 'pointerlockchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdown', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdownoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerdownoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointermove', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOut - An array containing all interactive Game Objects that the pointer moved out of when the event was created.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerover', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOver - An array containing all interactive Game Objects that the pointer moved over when the event was created.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerupoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerupoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel updated.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('wheel', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Pre-Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `preUpdate` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Shutdown Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it shuts down, signalling to all of its systems to shut themselves down.\r\n *\r\n * @event Phaser.Input.Events#SHUTDOWN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Start Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it has finished setting-up,\r\n * signalling to all of its internal systems to start.\r\n *\r\n * @event Phaser.Input.Events#START\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/START_EVENT.js?")},"./node_modules/phaser/src/input/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `update` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/input/events/BOOT_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/input/events/DESTROY_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/DRAG_END_EVENT.js"),\r\n DRAG_ENTER: __webpack_require__(/*! ./DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/input/events/DRAG_EVENT.js"),\r\n DRAG_LEAVE: __webpack_require__(/*! ./DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js"),\r\n DRAG_OVER: __webpack_require__(/*! ./DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/DRAG_START_EVENT.js"),\r\n DROP: __webpack_require__(/*! ./DROP_EVENT */ "./node_modules/phaser/src/input/events/DROP_EVENT.js"),\r\n GAME_OUT: __webpack_require__(/*! ./GAME_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js"),\r\n GAME_OVER: __webpack_require__(/*! ./GAME_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js"),\r\n GAMEOBJECT_DOWN: __webpack_require__(/*! ./GAMEOBJECT_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js"),\r\n GAMEOBJECT_DRAG_END: __webpack_require__(/*! ./GAMEOBJECT_DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js"),\r\n GAMEOBJECT_DRAG_ENTER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js"),\r\n GAMEOBJECT_DRAG: __webpack_require__(/*! ./GAMEOBJECT_DRAG_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js"),\r\n GAMEOBJECT_DRAG_LEAVE: __webpack_require__(/*! ./GAMEOBJECT_DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js"),\r\n GAMEOBJECT_DRAG_OVER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js"),\r\n GAMEOBJECT_DRAG_START: __webpack_require__(/*! ./GAMEOBJECT_DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js"),\r\n GAMEOBJECT_DROP: __webpack_require__(/*! ./GAMEOBJECT_DROP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js"),\r\n GAMEOBJECT_MOVE: __webpack_require__(/*! ./GAMEOBJECT_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js"),\r\n GAMEOBJECT_OUT: __webpack_require__(/*! ./GAMEOBJECT_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js"),\r\n GAMEOBJECT_OVER: __webpack_require__(/*! ./GAMEOBJECT_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_DOWN: __webpack_require__(/*! ./GAMEOBJECT_POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js"),\r\n GAMEOBJECT_POINTER_MOVE: __webpack_require__(/*! ./GAMEOBJECT_POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js"),\r\n GAMEOBJECT_POINTER_OUT: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js"),\r\n GAMEOBJECT_POINTER_OVER: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_UP: __webpack_require__(/*! ./GAMEOBJECT_POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js"),\r\n GAMEOBJECT_POINTER_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js"),\r\n GAMEOBJECT_UP: __webpack_require__(/*! ./GAMEOBJECT_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js"),\r\n GAMEOBJECT_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js"),\r\n MANAGER_BOOT: __webpack_require__(/*! ./MANAGER_BOOT_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js"),\r\n MANAGER_PROCESS: __webpack_require__(/*! ./MANAGER_PROCESS_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js"),\r\n MANAGER_UPDATE: __webpack_require__(/*! ./MANAGER_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js"),\r\n POINTER_DOWN: __webpack_require__(/*! ./POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js"),\r\n POINTER_DOWN_OUTSIDE: __webpack_require__(/*! ./POINTER_DOWN_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js"),\r\n POINTER_MOVE: __webpack_require__(/*! ./POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js"),\r\n POINTER_OUT: __webpack_require__(/*! ./POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js"),\r\n POINTER_OVER: __webpack_require__(/*! ./POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js"),\r\n POINTER_UP: __webpack_require__(/*! ./POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js"),\r\n POINTER_UP_OUTSIDE: __webpack_require__(/*! ./POINTER_UP_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js"),\r\n POINTER_WHEEL: __webpack_require__(/*! ./POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js"),\r\n POINTERLOCK_CHANGE: __webpack_require__(/*! ./POINTERLOCK_CHANGE_EVENT */ "./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/input/events/START_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/input/events/UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/index.js?')},"./node_modules/phaser/src/input/gamepad/Axis.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific Gamepad Axis.\r\n * Axis objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Axis\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Axis belongs to.\r\n * @param {integer} index - The index of this Axis.\r\n */\r\nvar Axis = new Class({\r\n\r\n initialize:\r\n\r\n function Axis (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Axis belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the axis events.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.events;\r\n\r\n /**\r\n * The index of this Axis.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The raw axis value, between -1 and 1 with 0 being dead center.\r\n * Use the method `getValue` to get a normalized value with the threshold applied.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Movement tolerance threshold below which axis values are ignored in `getValue`.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#threshold\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 0.1;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Axis.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the axis movement.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n },\r\n\r\n /**\r\n * Applies the `threshold` value to the axis and returns it.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The axis value, adjusted for the movement threshold.\r\n */\r\n getValue: function ()\r\n {\r\n return (Math.abs(this.value) < this.threshold) ? 0 : this.value;\r\n },\r\n\r\n /**\r\n * Destroys this Axis instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Axis;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Axis.js?')},"./node_modules/phaser/src/input/gamepad/Button.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific button on a Gamepad.\r\n * Button objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Button\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Button belongs to.\r\n * @param {integer} index - The index of this Button.\r\n */\r\nvar Button = new Class({\r\n\r\n initialize:\r\n\r\n function Button (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Button belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the button events.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.manager;\r\n\r\n /**\r\n * The index of this Button.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * Between 0 and 1.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Can be set for analogue buttons to enable a 'pressure' threshold,\r\n * before a button is considered as being 'pressed'.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#threshold\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 1;\r\n\r\n /**\r\n * Is the Button being pressed down or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pressed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pressed = false;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Button.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#update\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the button. Between 0 and 1.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n\r\n var pad = this.pad;\r\n var index = this.index;\r\n\r\n if (value >= this.threshold)\r\n {\r\n if (!this.pressed)\r\n {\r\n this.pressed = true;\r\n this.events.emit(Events.BUTTON_DOWN, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_DOWN, index, value, this);\r\n }\r\n }\r\n else if (this.pressed)\r\n {\r\n this.pressed = false;\r\n this.events.emit(Events.BUTTON_UP, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_UP, index, value, this);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Button instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Button;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Button.js?")},"./node_modules/phaser/src/input/gamepad/Gamepad.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Axis = __webpack_require__(/*! ./Axis */ \"./node_modules/phaser/src/input/gamepad/Axis.js\");\r\nvar Button = __webpack_require__(/*! ./Button */ \"./node_modules/phaser/src/input/gamepad/Button.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Gamepad.\r\n *\r\n * These are created, updated and managed by the Gamepad Plugin.\r\n *\r\n * @class Gamepad\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.GamepadPlugin} manager - A reference to the Gamepad Plugin.\r\n * @param {Phaser.Types.Input.Gamepad.Pad} pad - The Gamepad object, as extracted from GamepadEvent.\r\n */\r\nvar Gamepad = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Gamepad (manager, pad)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Gamepad Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#manager\r\n * @type {Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A reference to the native Gamepad object that is connected to the browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#pad\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * A string containing some information about the controller.\r\n *\r\n * This is not strictly specified, but in Firefox it will contain three pieces of information\r\n * separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and\r\n * product id of the controller, and the name of the controller as provided by the driver.\r\n * In Chrome it will contain the name of the controller as provided by the driver,\r\n * followed by vendor and product 4-digit hexadecimal strings.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#id\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.id = pad.id;\r\n\r\n /**\r\n * An integer that is unique for each Gamepad currently connected to the system.\r\n * This can be used to distinguish multiple controllers.\r\n * Note that disconnecting a device and then connecting a new device may reuse the previous index.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#index\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.index = pad.index;\r\n\r\n var buttons = [];\r\n\r\n for (var i = 0; i < pad.buttons.length; i++)\r\n {\r\n buttons.push(new Button(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Button objects, corresponding to the different buttons available on the Gamepad.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#buttons\r\n * @type {Phaser.Input.Gamepad.Button[]}\r\n * @since 3.0.0\r\n */\r\n this.buttons = buttons;\r\n\r\n var axes = [];\r\n\r\n for (i = 0; i < pad.axes.length; i++)\r\n {\r\n axes.push(new Axis(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Axis objects, corresponding to the different axes available on the Gamepad, if any.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#axes\r\n * @type {Phaser.Input.Gamepad.Axis[]}\r\n * @since 3.0.0\r\n */\r\n this.axes = axes;\r\n\r\n /**\r\n * The Gamepad's Haptic Actuator (Vibration / Rumble support).\r\n * This is highly experimental and only set if both present on the device,\r\n * and exposed by both the hardware and browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#vibration\r\n * @type {GamepadHapticActuator}\r\n * @since 3.10.0\r\n */\r\n this.vibration = pad.vibrationActuator;\r\n\r\n // https://w3c.github.io/gamepad/#remapping\r\n\r\n var _noButton = { value: 0, pressed: false };\r\n\r\n /**\r\n * A reference to the Left Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCLeft = (buttons[14]) ? buttons[14] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCRight = (buttons[15]) ? buttons[15] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCTop = (buttons[12]) ? buttons[12] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;\r\n\r\n /**\r\n * A reference to the Left Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCRight = (buttons[1]) ? buttons[1] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCTop = (buttons[3]) ? buttons[3] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Left Front Button (L1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Left Front Button (L2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Right Front Button (R1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Right Front Button (R2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;\r\n\r\n var _noAxis = { value: 0 };\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisLeft = (axes[0]) ? axes[0] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisLeft = (axes[1]) ? axes[1] : _noAxis;\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisRight = (axes[2]) ? axes[2] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisRight = (axes[3]) ? axes[3] : _noAxis;\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's left axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a left axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#leftStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.leftStick = new Vector2();\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's right axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a right axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#rightStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.rightStick = new Vector2();\r\n },\r\n\r\n /**\r\n * Gets the total number of axis this Gamepad claims to support.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of axes this Gamepad claims to support.\r\n */\r\n getAxisTotal: function ()\r\n {\r\n return this.axes.length;\r\n },\r\n\r\n /**\r\n * Gets the value of an axis based on the given index.\r\n * The index must be valid within the range of axes supported by this Gamepad.\r\n * The return value will be a float between 0 and 1.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the axes to get the value for.\r\n *\r\n * @return {number} The value of the axis, between 0 and 1.\r\n */\r\n getAxisValue: function (index)\r\n {\r\n return this.axes[index].getValue();\r\n },\r\n\r\n /**\r\n * Sets the threshold value of all axis on this Gamepad.\r\n * The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#setAxisThreshold\r\n * @since 3.10.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n */\r\n setAxisThreshold: function (value)\r\n {\r\n for (var i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].threshold = value;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the total number of buttons this Gamepad claims to have.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of buttons this Gamepad claims to have.\r\n */\r\n getButtonTotal: function ()\r\n {\r\n return this.buttons.length;\r\n },\r\n\r\n /**\r\n * Gets the value of a button based on the given index.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1\r\n * for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {number} The value of the button, between 0 and 1.\r\n */\r\n getButtonValue: function (index)\r\n {\r\n return this.buttons[index].value;\r\n },\r\n\r\n /**\r\n * Returns if the button is pressed down or not.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#isButtonDown\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {boolean} `true` if the button is considered as being pressed down, otherwise `false`.\r\n */\r\n isButtonDown: function (index)\r\n {\r\n return this.buttons[index].pressed;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Gamepad.\r\n * Called automatically by the Gamepad Manager as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#update\r\n * @private\r\n * @since 3.0.0\r\n */\r\n update: function (pad)\r\n {\r\n var i;\r\n\r\n // Sync the button values\r\n\r\n var localButtons = this.buttons;\r\n var gamepadButtons = pad.buttons;\r\n\r\n var len = localButtons.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localButtons[i].update(gamepadButtons[i].value);\r\n }\r\n\r\n // Sync the axis values\r\n\r\n var localAxes = this.axes;\r\n var gamepadAxes = pad.axes;\r\n\r\n len = localAxes.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localAxes[i].update(gamepadAxes[i]);\r\n }\r\n\r\n if (len >= 2)\r\n {\r\n this.leftStick.set(localAxes[0].getValue(), localAxes[1].getValue());\r\n\r\n if (len >= 4)\r\n {\r\n this.rightStick.set(localAxes[2].getValue(), localAxes[3].getValue());\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad instance, its buttons and axes, and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager = null;\r\n this.pad = null;\r\n\r\n var i;\r\n\r\n for (i = 0; i < this.buttons.length; i++)\r\n {\r\n this.buttons[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].destroy();\r\n }\r\n\r\n this.buttons = [];\r\n this.axes = [];\r\n },\r\n\r\n /**\r\n * Is this Gamepad currently connected or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#connected\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n connected: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.connected;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A timestamp containing the most recent time this Gamepad was updated.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#timestamp\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n timestamp: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.timestamp;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Left button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad left button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#left\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this._LCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Right button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad right button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#right\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this._LCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Up button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad up button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#up\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n up: {\r\n\r\n get: function ()\r\n {\r\n return this._LCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Down button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad down button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#down\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n down: {\r\n\r\n get: function ()\r\n {\r\n return this._LCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's bottom button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the X button.\r\n * On an XBox controller it's the A button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#A\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n A: {\r\n\r\n get: function ()\r\n {\r\n return this._RCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's top button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Triangle button.\r\n * On an XBox controller it's the Y button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#Y\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n Y: {\r\n\r\n get: function ()\r\n {\r\n return this._RCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's left button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Square button.\r\n * On an XBox controller it's the X button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#X\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n X: {\r\n\r\n get: function ()\r\n {\r\n return this._RCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's right button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Circle button.\r\n * On an XBox controller it's the B button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#B\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n B: {\r\n\r\n get: function ()\r\n {\r\n return this._RCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L1 button.\r\n * On an XBox controller it's the LB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L2 button.\r\n * On an XBox controller it's the LT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftBottom.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R1 button.\r\n * On an XBox controller it's the RB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R2 button.\r\n * On an XBox controller it's the RT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightBottom.value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gamepad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Gamepad.js?")},"./node_modules/phaser/src/input/gamepad/GamepadPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\nvar Gamepad = __webpack_require__(/*! ./Gamepad */ \"./node_modules/phaser/src/input/gamepad/Gamepad.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Gamepad Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n *\r\n * Its role is to listen for native DOM Gamepad Events and then process them.\r\n *\r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n *\r\n * You can access it from within a Scene using `this.input.gamepad`.\r\n *\r\n * To listen for a gamepad being connected:\r\n *\r\n * ```javascript\r\n * this.input.gamepad.once('connected', function (pad) {\r\n * // 'pad' is a reference to the gamepad that was just connected\r\n * });\r\n * ```\r\n *\r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * Once you have received the connected event, or polled the gamepads and found them enabled, you can access\r\n * them via the built-in properties `GamepadPlugin.pad1` to `pad4`, for up to 4 game pads. With a reference\r\n * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on\r\n * the `Gamepad` class for more details.\r\n *\r\n * For more information about Gamepad support in browsers see the following resources:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API\r\n * https://www.smashingmagazine.com/2015/11/gamepad-api-in-web-games/\r\n * http://html5gamepad.com/\r\n *\r\n * @class GamepadPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar GamepadPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GamepadPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A boolean that controls if the Gamepad Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Gamepad Event target, as defined in the Game Config.\r\n * Typically the browser window, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#target\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * An array of the connected Gamepads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#gamepads\r\n * @type {Phaser.Input.Gamepad.Gamepad[]}\r\n * @default []\r\n * @since 3.10.0\r\n */\r\n this.gamepads = [];\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#queue\r\n * @type {GamepadEvent[]}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * Internal event handler.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#onGamepadHandler\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.onGamepadHandler;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad1;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad2;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad3;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad4;\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.scene.sys.game;\r\n var settings = this.settings.input;\r\n var config = game.config;\r\n\r\n this.enabled = GetValue(settings, 'gamepad', config.inputGamepad) && game.device.input.gamepads;\r\n this.target = GetValue(settings, 'gamepad.target', config.inputGamepadEventTarget);\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.enabled)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * Starts the Gamepad Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#startListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var target = this.target;\r\n\r\n var handler = function (event)\r\n {\r\n // console.log(event);\r\n\r\n if (event.defaultPrevented || !_this.isActive())\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.refreshPads();\r\n\r\n _this.queue.push(event);\r\n };\r\n\r\n this.onGamepadHandler = handler;\r\n\r\n target.addEventListener('gamepadconnected', handler, false);\r\n target.addEventListener('gamepaddisconnected', handler, false);\r\n\r\n // FF also supports gamepadbuttondown, gamepadbuttonup and gamepadaxismove but\r\n // nothing else does, and we can get those values via the gamepads anyway, so we will\r\n // until more browsers support this\r\n\r\n // Finally, listen for an update event from the Input Plugin\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n },\r\n\r\n /**\r\n * Stops the Gamepad Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#stopListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n stopListeners: function ()\r\n {\r\n this.target.removeEventListener('gamepadconnected', this.onGamepadHandler);\r\n this.target.removeEventListener('gamepaddisconnected', this.onGamepadHandler);\r\n\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update);\r\n },\r\n\r\n /**\r\n * Disconnects all current Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#disconnectAll\r\n * @since 3.10.0\r\n */\r\n disconnectAll: function ()\r\n {\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n this.gamepads.connected = false;\r\n }\r\n },\r\n\r\n /**\r\n * Refreshes the list of connected Gamepads.\r\n *\r\n * This is called automatically when a gamepad is connected or disconnected,\r\n * and during the update loop.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#refreshPads\r\n * @private\r\n * @since 3.10.0\r\n */\r\n refreshPads: function ()\r\n {\r\n var connectedPads = navigator.getGamepads();\r\n\r\n if (!connectedPads)\r\n {\r\n this.disconnectAll();\r\n }\r\n else\r\n {\r\n var currentPads = this.gamepads;\r\n\r\n for (var i = 0; i < connectedPads.length; i++)\r\n {\r\n var livePad = connectedPads[i];\r\n\r\n // Because sometimes they're null (yes, really)\r\n if (!livePad)\r\n {\r\n continue;\r\n }\r\n\r\n var id = livePad.id;\r\n var index = livePad.index;\r\n var currentPad = currentPads[index];\r\n\r\n if (!currentPad)\r\n {\r\n // A new Gamepad, not currently stored locally\r\n var newPad = new Gamepad(this, livePad);\r\n\r\n currentPads[index] = newPad;\r\n\r\n if (!this._pad1)\r\n {\r\n this._pad1 = newPad;\r\n }\r\n else if (!this._pad2)\r\n {\r\n this._pad2 = newPad;\r\n }\r\n else if (!this._pad3)\r\n {\r\n this._pad3 = newPad;\r\n }\r\n else if (!this._pad4)\r\n {\r\n this._pad4 = newPad;\r\n }\r\n }\r\n else if (currentPad.id !== id)\r\n {\r\n // A new Gamepad with a different vendor string, but it has got the same index as an old one\r\n currentPad.destroy();\r\n\r\n currentPads[index] = new Gamepad(this, livePad);\r\n }\r\n else\r\n {\r\n // If neither of these, it's a pad we've already got, so update it\r\n currentPad.update(livePad);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all currently connected Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getAll\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad[]} An array of all currently connected Gamepads.\r\n */\r\n getAll: function ()\r\n {\r\n var out = [];\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i])\r\n {\r\n out.push(pads[i]);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Looks-up a single Gamepad based on the given index value.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getPad\r\n * @since 3.10.0\r\n *\r\n * @param {number} index - The index of the Gamepad to get.\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad} The Gamepad matching the given index, or undefined if none were found.\r\n */\r\n getPad: function (index)\r\n {\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i] && pads[i].index === index)\r\n {\r\n return pads[i];\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The internal update loop. Refreshes all connected gamepads and processes their events.\r\n *\r\n * Called automatically by the Input Manager, invoked from the Game step.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Gamepad.Events#CONNECTED\r\n * @fires Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.refreshPads();\r\n\r\n var len = this.queue.length;\r\n\r\n if (len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var queue = this.queue.splice(0, len);\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var pad = this.getPad(event.gamepad.index);\r\n\r\n if (event.type === 'gamepadconnected')\r\n {\r\n this.emit(Events.CONNECTED, pad, event);\r\n }\r\n else if (event.type === 'gamepaddisconnected')\r\n {\r\n this.emit(Events.DISCONNECTED, pad, event);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Shuts the Gamepad Plugin down.\r\n * All this does is remove any listeners bound to it.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.disconnectAll();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad Plugin, disconnecting all Gamepads and releasing internal references.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n if (this.gamepads[i])\r\n {\r\n this.gamepads[i].destroy();\r\n }\r\n }\r\n\r\n this.gamepads = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.target = null;\r\n },\r\n\r\n /**\r\n * The total number of connected game pads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#total\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n total: {\r\n\r\n get: function ()\r\n {\r\n return this.gamepads.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the first connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad1: {\r\n\r\n get: function ()\r\n {\r\n return this._pad1;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the second connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad2: {\r\n\r\n get: function ()\r\n {\r\n return this._pad2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the third connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad3: {\r\n\r\n get: function ()\r\n {\r\n return this._pad3;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the fourth connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad4: {\r\n\r\n get: function ()\r\n {\r\n return this._pad4;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property.\r\n * Use this to create access Gamepads connected to the browser and respond to gamepad buttons.\r\n *\r\n * @name Phaser.Input.InputPlugin#gamepad\r\n * @type {?Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('GamepadPlugin', GamepadPlugin, 'gamepad', 'gamepad', 'inputGamepad');\r\n\r\nmodule.exports = GamepadPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/GamepadPlugin.js?")},"./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tatar SNES USB Controller Gamepad Configuration.\r\n * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011)\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.SNES_USB\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SELECT: 8,\r\n START: 9,\r\n\r\n B: 0,\r\n A: 1,\r\n Y: 2,\r\n X: 3,\r\n\r\n LEFT_SHOULDER: 4,\r\n RIGHT_SHOULDER: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * PlayStation DualShock 4 Gamepad Configuration.\r\n * Sony PlayStation DualShock 4 (v2) wireless controller\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.DUALSHOCK_4\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SHARE: 8,\r\n OPTIONS: 9,\r\n PS: 16,\r\n TOUCHBAR: 17,\r\n\r\n X: 0,\r\n CIRCLE: 1,\r\n SQUARE: 2,\r\n TRIANGLE: 3,\r\n\r\n L1: 4,\r\n R1: 5,\r\n L2: 6,\r\n R2: 7,\r\n L3: 10,\r\n R3: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js?")},"./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * XBox 360 Gamepad Configuration.\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.XBOX_360\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n MENU: 16,\r\n\r\n A: 0,\r\n B: 1,\r\n X: 2,\r\n Y: 3,\r\n\r\n LB: 4,\r\n RB: 5,\r\n\r\n LT: 6,\r\n RT: 7,\r\n\r\n BACK: 8,\r\n START: 9,\r\n\r\n LS: 10,\r\n RS: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Configs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DUALSHOCK_4: __webpack_require__(/*! ./Sony_PlayStation_DualShock_4 */ "./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js"),\r\n SNES_USB: __webpack_require__(/*! ./SNES_USB_Controller */ "./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js"),\r\n XBOX_360: __webpack_require__(/*! ./XBox360_Controller */ "./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/index.js?')},"./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`.\r\n * \r\n * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was pressed.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`.\r\n * \r\n * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was released.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Connected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`.\r\n * \r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#CONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was connected.\r\n * @param {Event} event - The native DOM Event that triggered the connection.\r\n */\r\nmodule.exports = 'connected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Disconnected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was disconnected.\r\n * @param {Event} event - The native DOM Event that triggered the disconnection.\r\n */\r\nmodule.exports = 'disconnected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been pressed on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('down', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been released on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('up', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BUTTON_DOWN: __webpack_require__(/*! ./BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js"),\r\n BUTTON_UP: __webpack_require__(/*! ./BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js"),\r\n CONNECTED: __webpack_require__(/*! ./CONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js"),\r\n DISCONNECTED: __webpack_require__(/*! ./DISCONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js"),\r\n GAMEPAD_BUTTON_DOWN: __webpack_require__(/*! ./GAMEPAD_BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js"),\r\n GAMEPAD_BUTTON_UP: __webpack_require__(/*! ./GAMEPAD_BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/index.js?')},"./node_modules/phaser/src/input/gamepad/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Axis: __webpack_require__(/*! ./Axis */ "./node_modules/phaser/src/input/gamepad/Axis.js"),\r\n Button: __webpack_require__(/*! ./Button */ "./node_modules/phaser/src/input/gamepad/Button.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/gamepad/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./Gamepad */ "./node_modules/phaser/src/input/gamepad/Gamepad.js"),\r\n GamepadPlugin: __webpack_require__(/*! ./GamepadPlugin */ "./node_modules/phaser/src/input/gamepad/GamepadPlugin.js"),\r\n \r\n Configs: __webpack_require__(/*! ./configs/ */ "./node_modules/phaser/src/input/gamepad/configs/index.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/index.js?')},"./node_modules/phaser/src/input/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Input\r\n */\r\n\r\nvar Input = {\r\n\r\n CreateInteractiveObject: __webpack_require__(/*! ./CreateInteractiveObject */ "./node_modules/phaser/src/input/CreateInteractiveObject.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./gamepad */ "./node_modules/phaser/src/input/gamepad/index.js"),\r\n InputManager: __webpack_require__(/*! ./InputManager */ "./node_modules/phaser/src/input/InputManager.js"),\r\n InputPlugin: __webpack_require__(/*! ./InputPlugin */ "./node_modules/phaser/src/input/InputPlugin.js"),\r\n InputPluginCache: __webpack_require__(/*! ./InputPluginCache */ "./node_modules/phaser/src/input/InputPluginCache.js"),\r\n Keyboard: __webpack_require__(/*! ./keyboard */ "./node_modules/phaser/src/input/keyboard/index.js"),\r\n Mouse: __webpack_require__(/*! ./mouse */ "./node_modules/phaser/src/input/mouse/index.js"),\r\n Pointer: __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js"),\r\n Touch: __webpack_require__(/*! ./touch */ "./node_modules/phaser/src/input/touch/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nInput = Extend(false, Input, CONST);\r\n\r\nmodule.exports = Input;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/index.js?')},"./node_modules/phaser/src/input/keyboard/KeyboardManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar KeyCodes = __webpack_require__(/*! ../../input/keyboard/keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Manager is a helper class that belongs to the global Input Manager.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then store them for further processing by the Keyboard Plugin.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically if keyboard\r\n * input has been enabled in the Game Config.\r\n *\r\n * @class KeyboardManager\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar KeyboardManager = new Class({\r\n\r\n initialize:\r\n\r\n function KeyboardManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.16.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#queue\r\n * @type {KeyboardEvent[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * A flag that controls if the non-modified keys, matching those stored in the `captures` array,\r\n * have `preventDefault` called on them or not.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle this property at run-time.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#preventDefault\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.preventDefault = true;\r\n\r\n /**\r\n * An array of Key Code values that will automatically have `preventDefault` called on them,\r\n * as long as the `KeyboardManager.preventDefault` boolean is set to `true`.\r\n * \r\n * By default the array is empty.\r\n * \r\n * The key must be non-modified when pressed in order to be captured.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle the `KeyboardManager.preventDefault` boolean at run-time.\r\n * \r\n * If you need more specific control, you can create Key objects and set the flag on each of those instead.\r\n * \r\n * This array can be populated via the Game Config by setting the `input.keyboard.capture` array, or you\r\n * can call the `addCapture` method. See also `removeCapture` and `clearCaptures`.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#captures\r\n * @type {integer[]}\r\n * @since 3.16.0\r\n */\r\n this.captures = [];\r\n\r\n /**\r\n * A boolean that controls if the Keyboard Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Keyboard Event target, as defined in the Game Config.\r\n * Typically the window in which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#target\r\n * @type {any}\r\n * @since 3.16.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Key Down Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyDown\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyDown = NOOP;\r\n\r\n /**\r\n * The Key Up Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyUp\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyUp = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Keyboard Manager boot process.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#boot\r\n * @private\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputKeyboard;\r\n this.target = config.inputKeyboardEventTarget;\r\n\r\n this.addCapture(config.inputKeyboardCapture);\r\n\r\n if (!this.target && window)\r\n {\r\n this.target = window;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.manager.game.events.on(GameEvents.POST_STEP, this.postUpdate, this);\r\n },\r\n\r\n /**\r\n * Starts the Keyboard Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n\r\n this.onKeyDown = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n this.onKeyUp = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (target)\r\n {\r\n target.addEventListener('keydown', this.onKeyDown, false);\r\n target.addEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Key Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('keydown', this.onKeyDown, false);\r\n target.removeEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Clears the event queue.\r\n * Called automatically by the Input Manager.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#postUpdate\r\n * @private\r\n * @since 3.16.0\r\n */\r\n postUpdate: function ()\r\n {\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser\r\n * and cause the default browser behavior.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are active captures after calling this method, the `preventDefault` property is set to `true`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable capture for, preventing them reaching the browser.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.trim().toUpperCase()];\r\n }\r\n\r\n if (captures.indexOf(code) === -1)\r\n {\r\n captures.push(code);\r\n }\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are no captures left after calling this method, the `preventDefault` property is set to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable capture for, allowing them reaching the browser again.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.toUpperCase()];\r\n }\r\n\r\n ArrayRemove(captures, code);\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures and sets the `preventDefault` property to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#clearCaptures\r\n * @since 3.16.0\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.captures = [];\r\n\r\n this.preventDefault = false;\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Manager instance.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.clearCaptures();\r\n\r\n this.queue = [];\r\n\r\n this.manager.game.events.off(GameEvents.POST_RENDER, this.postUpdate, this);\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyboardManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardManager.js?")},"./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar Key = __webpack_require__(/*! ./keys/Key */ \"./node_modules/phaser/src/input/keyboard/keys/Key.js\");\r\nvar KeyCodes = __webpack_require__(/*! ./keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar KeyCombo = __webpack_require__(/*! ./combo/KeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js\");\r\nvar KeyMap = __webpack_require__(/*! ./keys/KeyMap */ \"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then process them.\r\n * \r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n * \r\n * You can access it from within a Scene using `this.input.keyboard`. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.on('keydown', callback, context);\r\n * ```\r\n *\r\n * Or, to listen for a specific key:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.on('keydown-A', callback, context);\r\n * ```\r\n *\r\n * You can also create Key objects, which you can then poll in your game loop:\r\n *\r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * ```\r\n * \r\n * If you have multiple parallel Scenes, each trying to get keyboard input, be sure to disable capture on them to stop them from\r\n * stealing input from another Scene in the list. You can do this with `this.input.keyboard.enabled = false` within the\r\n * Scene to stop all input, or `this.input.keyboard.preventDefault = false` to stop a Scene halting input on another Scene.\r\n *\r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.\r\n *\r\n * Also please be aware that certain browser extensions can disable or override Phaser keyboard handling.\r\n * For example the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * And there are others. So, please check your extensions before opening Phaser issues about keys that don't work.\r\n *\r\n * @class KeyboardPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar KeyboardPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function KeyboardPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the core game, so we can listen for visibility events.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#game\r\n * @type {Phaser.Game}\r\n * @since 3.16.0\r\n */\r\n this.game = sceneInputPlugin.systems.game;\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A reference to the global Keyboard Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#manager\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.16.0\r\n */\r\n this.manager = sceneInputPlugin.manager.keyboard;\r\n\r\n /**\r\n * A boolean that controls if this Keyboard Plugin is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of Key objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#keys\r\n * @type {Phaser.Input.Keyboard.Key[]}\r\n * @since 3.10.0\r\n */\r\n this.keys = [];\r\n\r\n /**\r\n * An array of KeyCombo objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#combos\r\n * @type {Phaser.Input.Keyboard.KeyCombo[]}\r\n * @since 3.10.0\r\n */\r\n this.combos = [];\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var settings = this.settings.input;\r\n\r\n this.enabled = GetValue(settings, 'keyboard', true);\r\n\r\n var captures = GetValue(settings, 'keyboard.capture', null);\r\n\r\n if (captures)\r\n {\r\n this.addCaptures(captures);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.on(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.game.events.on(GameEvents.BLUR, this.resetKeys, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard events for specific keys, so they don't bubble up the browser\r\n * and cause the default behaviors.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n this.manager.addCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n this.manager.removeCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns an array that contains all of the keyboard captures currently enabled.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#getCaptures\r\n * @since 3.16.0\r\n * \r\n * @return {integer[]} An array of all the currently capturing key codes.\r\n */\r\n getCaptures: function ()\r\n {\r\n return this.manager.captures;\r\n },\r\n\r\n /**\r\n * Allows Phaser to prevent any key captures you may have defined from bubbling up the browser.\r\n * You can use this to re-enable event capturing if you had paused it via `disableGlobalCapture`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n enableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disables Phaser from preventing any key captures you may have defined, without actually removing them.\r\n * You can use this to temporarily disable event capturing if, for example, you swap to a DOM element.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n disableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures.\r\n * \r\n * Note that this is a global change. It will clear all event captures across your game, not just for this specific Scene.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.manager.clearCaptures();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also Space Bar and shift.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCursorKeys\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Types.Input.Keyboard.CursorKeys} An object containing the properties: `up`, `down`, `left`, `right`, `space` and `shift`.\r\n */\r\n createCursorKeys: function ()\r\n {\r\n return this.addKeys({\r\n up: KeyCodes.UP,\r\n down: KeyCodes.DOWN,\r\n left: KeyCodes.LEFT,\r\n right: KeyCodes.RIGHT,\r\n space: KeyCodes.SPACE,\r\n shift: KeyCodes.SHIFT\r\n });\r\n },\r\n\r\n /**\r\n * A practical way to create an object containing user selected hotkeys.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S });\r\n * ```\r\n * \r\n * would return an object containing the properties (`up` and `down`) mapped to W and S {@link Phaser.Input.Keyboard.Key} objects.\r\n *\r\n * You can also pass in a comma-separated string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addKeys('W,S,A,D');\r\n * ```\r\n *\r\n * Which will return an object with the properties W, S, A and D mapped to the relevant Key objects.\r\n *\r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKeys\r\n * @since 3.10.0\r\n *\r\n * @param {(object|string)} keys - An object containing Key Codes, or a comma-separated string.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {object} An object containing Key objects mapped to the input properties.\r\n */\r\n addKeys: function (keys, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var output = {};\r\n\r\n if (typeof keys === 'string')\r\n {\r\n keys = keys.split(',');\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var currentKey = keys[i].trim();\r\n\r\n if (currentKey)\r\n {\r\n output[currentKey] = this.addKey(currentKey, enableCapture, emitOnRepeat);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (var key in keys)\r\n {\r\n output[key] = this.addKey(keys[key], enableCapture, emitOnRepeat);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Adds a Key object to this Keyboard Plugin.\r\n *\r\n * The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {Phaser.Input.Keyboard.Key} The newly created Key object, or a reference to it if it already existed in the keys array.\r\n */\r\n addKey: function (key, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var keys = this.keys;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n keys[idx] = key;\r\n }\r\n else\r\n {\r\n keys[key.keyCode] = key;\r\n }\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key.keyCode);\r\n }\r\n\r\n key.setEmitOnRepeat(emitOnRepeat);\r\n\r\n return key;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (!keys[key])\r\n {\r\n keys[key] = new Key(this, key);\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key);\r\n }\r\n\r\n keys[key].setEmitOnRepeat(emitOnRepeat);\r\n }\r\n\r\n return keys[key];\r\n },\r\n\r\n /**\r\n * Removes a Key object from this Keyboard Plugin.\r\n *\r\n * The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object?\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeKey: function (key, destroy)\r\n {\r\n if (destroy === undefined) { destroy = false; }\r\n\r\n var keys = this.keys;\r\n var ref;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n ref = this.keys[idx];\r\n\r\n this.keys[idx] = undefined;\r\n }\r\n }\r\n else if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (keys[key])\r\n {\r\n ref = keys[key];\r\n\r\n keys[key] = undefined;\r\n }\r\n\r\n if (ref)\r\n {\r\n ref.plugin = null;\r\n\r\n if (destroy)\r\n {\r\n ref.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new KeyCombo.\r\n * \r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from this Keyboard Plugin.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCombo\r\n * @since 3.10.0\r\n *\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The new KeyCombo object.\r\n */\r\n createCombo: function (keys, config)\r\n {\r\n return new KeyCombo(this, keys, config);\r\n },\r\n\r\n /**\r\n * Checks if the given Key object is currently being held down.\r\n * \r\n * The difference between this method and checking the `Key.isDown` property directly is that you can provide\r\n * a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted\r\n * it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it\r\n * will only return `true` every 100ms.\r\n * \r\n * If the Keyboard Plugin has been disabled, this method will always return `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#checkDown\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - A Key object.\r\n * @param {number} [duration=0] - The duration which must have elapsed before this Key is considered as being down.\r\n * \r\n * @return {boolean} `true` if the Key is down within the duration specified, otherwise `false`.\r\n */\r\n checkDown: function (key, duration)\r\n {\r\n if (this.enabled && key.isDown)\r\n {\r\n var t = SnapFloor(this.time - key.timeDown, duration);\r\n\r\n if (t > key._tick)\r\n {\r\n key._tick = t;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler called by the Input Plugin, which is in turn invoked by the Game step.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#update\r\n * @private\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n var queue = this.manager.queue;\r\n var len = queue.length;\r\n\r\n if (!this.isActive() || len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var keys = this.keys;\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var code = event.keyCode;\r\n var key = keys[code];\r\n var repeat = false;\r\n\r\n // Override the default functions (it's too late for the browser to use them anyway, so we may as well)\r\n if (event.cancelled === undefined)\r\n {\r\n // Event allowed to flow across all handlers in this Scene, and any other Scene in the Scene list\r\n event.cancelled = 0;\r\n\r\n // Won't reach any more local (Scene level) handlers\r\n event.stopImmediatePropagation = function ()\r\n {\r\n event.cancelled = 1;\r\n };\r\n \r\n // Won't reach any more handlers in any Scene further down the Scene list\r\n event.stopPropagation = function ()\r\n {\r\n event.cancelled = -1;\r\n };\r\n }\r\n\r\n if (event.cancelled === -1)\r\n {\r\n // This event has been stopped from broadcasting to any other Scene, so abort.\r\n continue;\r\n }\r\n\r\n if (event.type === 'keydown')\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n repeat = key.isDown;\r\n\r\n key.onDown(event);\r\n }\r\n\r\n if (!event.cancelled && (!key || !repeat))\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_DOWN + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keydown_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_DOWN, event);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n key.onUp(event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_UP + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keyup_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_UP, event);\r\n }\r\n }\r\n }\r\n\r\n // Reset the cancel state for other Scenes to use\r\n if (event.cancelled === 1)\r\n {\r\n event.cancelled = 0;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets all Key objects created by _this_ Keyboard Plugin back to their default un-pressed states.\r\n * This can only reset keys created via the `addKey`, `addKeys` or `createCursorKeys` methods.\r\n * If you have created a Key object directly you'll need to reset it yourself.\r\n * \r\n * This method is called automatically when the Keyboard Plugin shuts down, but can be\r\n * invoked directly at any time you require.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys\r\n * @since 3.15.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n resetKeys: function ()\r\n {\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].reset();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuts this Keyboard Plugin down. This performs the following tasks:\r\n * \r\n * 1 - Resets all keys created by this Keyboard plugin.\r\n * 2 - Stops and removes the keyboard event listeners.\r\n * 3 - Clears out any pending requests in the queue, without processing them.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.resetKeys();\r\n\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.off(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.game.events.off(GameEvents.BLUR, this.resetKeys);\r\n\r\n this.removeAllListeners();\r\n\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Plugin instance and all references it holds, plus clears out local arrays.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].destroy();\r\n }\r\n }\r\n\r\n this.keys = [];\r\n this.combos = [];\r\n this.queue = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.manager = null;\r\n },\r\n\r\n /**\r\n * Internal time value.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#time\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return this.sceneInputPlugin.manager.time;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property.\r\n * Use this to create Key objects and listen for keyboard specific events.\r\n *\r\n * @name Phaser.Input.InputPlugin#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('KeyboardPlugin', KeyboardPlugin, 'keyboard', 'keyboard', 'inputKeyboard');\r\n\r\nmodule.exports = KeyboardPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js?")},"./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n * Return `true` if it reached the end of the combo, `false` if not.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.AdvanceKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to advance.\r\n *\r\n * @return {boolean} `true` if it reached the end of the combo, `false` if not.\r\n */\r\nvar AdvanceKeyCombo = function (event, combo)\r\n{\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.index++;\r\n\r\n if (combo.index === combo.size)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n combo.current = combo.keyCodes[combo.index];\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = AdvanceKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ProcessKeyCombo = __webpack_require__(/*! ./ProcessKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js\");\r\nvar ResetKeyCombo = __webpack_require__(/*! ./ResetKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from the Keyboard Manager.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @class KeyCombo\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @listens Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} keyboardPlugin - A reference to the Keyboard Plugin.\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n */\r\nvar KeyCombo = new Class({\r\n\r\n initialize:\r\n\r\n function KeyCombo (keyboardPlugin, keys, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n // Can't have a zero or single length combo (string or array based)\r\n if (keys.length < 2)\r\n {\r\n return false;\r\n }\r\n\r\n /**\r\n * A reference to the Keyboard Manager\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#manager\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = keyboardPlugin;\r\n\r\n /**\r\n * A flag that controls if this Key Combo is actively processing keys or not.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of the keycodes that comprise this combo.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#keyCodes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.keyCodes = [];\r\n\r\n // if 'keys' is a string we need to get the keycode of each character in it\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var char = keys[i];\r\n\r\n if (typeof char === 'string')\r\n {\r\n this.keyCodes.push(char.toUpperCase().charCodeAt(0));\r\n }\r\n else if (typeof char === 'number')\r\n {\r\n this.keyCodes.push(char);\r\n }\r\n else if (char.hasOwnProperty('keyCode'))\r\n {\r\n this.keyCodes.push(char.keyCode);\r\n }\r\n }\r\n\r\n /**\r\n * The current keyCode the combo is waiting for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#current\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.current = this.keyCodes[0];\r\n\r\n /**\r\n * The current index of the key being waited for in the 'keys' string.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#index\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.index = 0;\r\n\r\n /**\r\n * The length of this combo (in keycodes)\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#size\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.size = this.keyCodes.length;\r\n\r\n /**\r\n * The time the previous key in the combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeLastMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeLastMatched = 0;\r\n\r\n /**\r\n * Has this Key Combo been matched yet?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#matched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.matched = false;\r\n\r\n /**\r\n * The time the entire combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeMatched = 0;\r\n\r\n /**\r\n * If they press the wrong key do we reset the combo?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnWrongKey\r\n * @type {boolean}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.resetOnWrongKey = GetFastValue(config, 'resetOnWrongKey', true);\r\n\r\n /**\r\n * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#maxKeyDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxKeyDelay = GetFastValue(config, 'maxKeyDelay', 0);\r\n\r\n /**\r\n * If previously matched and they press the first key of the combo again, will it reset?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.resetOnMatch = GetFastValue(config, 'resetOnMatch', false);\r\n\r\n /**\r\n * If the combo matches, will it delete itself?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#deleteOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.deleteOnMatch = GetFastValue(config, 'deleteOnMatch', false);\r\n\r\n var _this = this;\r\n\r\n var onKeyDownHandler = function (event)\r\n {\r\n if (_this.matched || !_this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n var matched = ProcessKeyCombo(event, _this);\r\n\r\n if (matched)\r\n {\r\n _this.manager.emit(Events.COMBO_MATCH, _this, event);\r\n\r\n if (_this.resetOnMatch)\r\n {\r\n ResetKeyCombo(_this);\r\n }\r\n else if (_this.deleteOnMatch)\r\n {\r\n _this.destroy();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * The internal Key Down handler.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#onKeyDown\r\n * @private\r\n * @type {KeyboardKeydownCallback}\r\n * @fires Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n */\r\n this.onKeyDown = onKeyDownHandler;\r\n\r\n this.manager.on(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n },\r\n\r\n /**\r\n * How far complete is this combo? A value between 0 and 1.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#progress\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n progress: {\r\n\r\n get: function ()\r\n {\r\n return this.index / this.size;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Destroys this Key Combo and all of its references.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyCombo#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enabled = false;\r\n this.keyCodes = [];\r\n\r\n this.manager.off(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AdvanceKeyCombo = __webpack_require__(/*! ./AdvanceKeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js");\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ProcessKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to be processed.\r\n *\r\n * @return {boolean} `true` if the combo was matched, otherwise `false`.\r\n */\r\nvar ProcessKeyCombo = function (event, combo)\r\n{\r\n if (combo.matched)\r\n {\r\n return true;\r\n }\r\n\r\n var comboMatched = false;\r\n var keyMatched = false;\r\n\r\n if (event.keyCode === combo.current)\r\n {\r\n // Key was correct\r\n\r\n if (combo.index > 0 && combo.maxKeyDelay > 0)\r\n {\r\n // We have to check to see if the delay between\r\n // the new key and the old one was too long (if enabled)\r\n\r\n var timeLimit = combo.timeLastMatched + combo.maxKeyDelay;\r\n\r\n // Check if they pressed it in time or not\r\n if (event.timeStamp <= timeLimit)\r\n {\r\n keyMatched = true;\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n else\r\n {\r\n keyMatched = true;\r\n\r\n // We don\'t check the time for the first key pressed, so just advance it\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n\r\n if (!keyMatched && combo.resetOnWrongKey)\r\n {\r\n // Wrong key was pressed\r\n combo.index = 0;\r\n combo.current = combo.keyCodes[0];\r\n }\r\n\r\n if (comboMatched)\r\n {\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.matched = true;\r\n combo.timeMatched = event.timeStamp;\r\n }\r\n\r\n return comboMatched;\r\n};\r\n\r\nmodule.exports = ProcessKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js?')},"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ResetKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo to reset.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The KeyCombo.\r\n */\r\nvar ResetKeyCombo = function (combo)\r\n{\r\n combo.current = combo.keyCodes[0];\r\n combo.index = 0;\r\n combo.timeLastMatched = 0;\r\n combo.matched = false;\r\n combo.timeMatched = 0;\r\n\r\n return combo;\r\n};\r\n\r\nmodule.exports = ResetKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`.\r\n * \r\n * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`.\r\n * \r\n * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Combo Match Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched.\r\n * \r\n * Listen for this event from the Key Plugin after a combo has been created:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * @event Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.KeyCombo} keycombo - The Key Combo object that was matched.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event of the final key in the combo. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'keycombomatch';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('down', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was pressed.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed\r\n * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keydown-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released\r\n * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keyup-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('up', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was released.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ANY_KEY_DOWN: __webpack_require__(/*! ./ANY_KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js"),\r\n ANY_KEY_UP: __webpack_require__(/*! ./ANY_KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js"),\r\n COMBO_MATCH: __webpack_require__(/*! ./COMBO_MATCH_EVENT */ "./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js"),\r\n DOWN: __webpack_require__(/*! ./DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js"),\r\n KEY_DOWN: __webpack_require__(/*! ./KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js"),\r\n KEY_UP: __webpack_require__(/*! ./KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js"),\r\n UP: __webpack_require__(/*! ./UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/index.js?')},"./node_modules/phaser/src/input/keyboard/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/keyboard/events/index.js"),\r\n\r\n KeyboardManager: __webpack_require__(/*! ./KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js"),\r\n KeyboardPlugin: __webpack_require__(/*! ./KeyboardPlugin */ "./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js"),\r\n\r\n Key: __webpack_require__(/*! ./keys/Key */ "./node_modules/phaser/src/input/keyboard/keys/Key.js"),\r\n KeyCodes: __webpack_require__(/*! ./keys/KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js"),\r\n\r\n KeyCombo: __webpack_require__(/*! ./combo/KeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js"),\r\n\r\n JustDown: __webpack_require__(/*! ./keys/JustDown */ "./node_modules/phaser/src/input/keyboard/keys/JustDown.js"),\r\n JustUp: __webpack_require__(/*! ./keys/JustUp */ "./node_modules/phaser/src/input/keyboard/keys/JustUp.js"),\r\n DownDuration: __webpack_require__(/*! ./keys/DownDuration */ "./node_modules/phaser/src/input/keyboard/keys/DownDuration.js"),\r\n UpDuration: __webpack_require__(/*! ./keys/UpDuration */ "./node_modules/phaser/src/input/keyboard/keys/UpDuration.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/index.js?')},"./node_modules/phaser/src/input/keyboard/keys/DownDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was pressed down within the `duration` value given, based on the current\r\n * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.DownDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been pressed down.\r\n *\r\n * @return {boolean} `true` if the Key was pressed down within `duration` ms ago, otherwise `false`.\r\n */\r\nvar DownDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeDown;\r\n\r\n return (key.isDown && current < duration);\r\n};\r\n\r\nmodule.exports = DownDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/DownDuration.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justDown value allows you to test if this Key has just been pressed down or not.\r\n * \r\n * When you check this value it will return `true` if the Key is down, otherwise `false`.\r\n * \r\n * You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.\r\n * This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustDown\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just down or not.\r\n *\r\n * @return {boolean} `true` if the Key was just pressed, otherwise `false`.\r\n */\r\nvar JustDown = function (key)\r\n{\r\n if (key._justDown)\r\n {\r\n key._justDown = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustDown.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justUp value allows you to test if this Key has just been released or not.\r\n * \r\n * When you check this value it will return `true` if the Key is up, otherwise `false`.\r\n * \r\n * You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again.\r\n * This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustUp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just up or not.\r\n *\r\n * @return {boolean} `true` if the Key was just released, otherwise `false`.\r\n */\r\nvar JustUp = function (key)\r\n{\r\n if (key._justUp)\r\n {\r\n key._justUp = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustUp.js?")},"./node_modules/phaser/src/input/keyboard/keys/Key.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/input/keyboard/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A generic Key object which can be passed to the Process functions (and so on)\r\n * keycode must be an integer\r\n *\r\n * @class Key\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} plugin - The Keyboard Plugin instance that owns this Key object.\r\n * @param {integer} keyCode - The keycode of this key.\r\n */\r\nvar Key = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Key (plugin, keyCode)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Keyboard Plugin instance that owns this Key object.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#plugin\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.17.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The keycode of this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#keyCode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.keyCode = keyCode;\r\n\r\n /**\r\n * The original DOM event.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#originalEvent\r\n * @type {KeyboardEvent}\r\n * @since 3.0.0\r\n */\r\n this.originalEvent = undefined;\r\n\r\n /**\r\n * Can this Key be processed?\r\n *\r\n * @name Phaser.Input.Keyboard.Key#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isUp\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isUp = true;\r\n\r\n /**\r\n * The down state of the ALT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#altKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.altKey = false;\r\n\r\n /**\r\n * The down state of the CTRL key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#ctrlKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.ctrlKey = false;\r\n\r\n /**\r\n * The down state of the SHIFT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#shiftKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shiftKey = false;\r\n\r\n /**\r\n * The down state of the Meta key, if pressed at the same time as this key.\r\n * On a Mac the Meta Key is the Command key. On Windows keyboards, it\'s the Windows key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#metaKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.metaKey = false;\r\n\r\n /**\r\n * The location of the modifier key. 0 for standard (or unknown), 1 for left, 2 for right, 3 for numpad.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#location\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.location = 0;\r\n\r\n /**\r\n * The timestamp when the key was last pressed down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeDown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeDown = 0;\r\n\r\n /**\r\n * The number of milliseconds this key was held down for in the previous down - up sequence.\r\n * This value isn\'t updated every game step, only when the Key changes state.\r\n * To get the current duration use the `getDuration` method.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The timestamp when the key was last released.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeUp\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeUp = 0;\r\n\r\n /**\r\n * When a key is held down should it continuously fire the `down` event each time it repeats?\r\n * \r\n * By default it will emit the `down` event just once, but if you wish to receive the event\r\n * for each repeat as well, enable this property.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#emitOnRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.emitOnRepeat = false;\r\n\r\n /**\r\n * If a key is held down this holds down the number of times the key has \'repeated\'.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#repeats\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeats = 0;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justDown\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justDown = false;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justUp\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justUp = false;\r\n\r\n /**\r\n * Internal tick counter.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_tick\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._tick = -1;\r\n },\r\n\r\n /**\r\n * Controls if this Key will continuously emit a `down` event while being held down (true),\r\n * or emit the event just once, on first press, and then skip future events (false).\r\n *\r\n * @method Phaser.Input.Keyboard.Key#setEmitOnRepeat\r\n * @since 3.16.0\r\n * \r\n * @param {boolean} value - Emit `down` events on repeated key down actions, or just once?\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n setEmitOnRepeat: function (value)\r\n {\r\n this.emitOnRepeat = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Processes the Key Down action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onDown\r\n * @fires Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onDown: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.altKey = event.altKey;\r\n this.ctrlKey = event.ctrlKey;\r\n this.shiftKey = event.shiftKey;\r\n this.metaKey = event.metaKey;\r\n this.location = event.location;\r\n \r\n this.repeats++;\r\n\r\n if (!this.isDown)\r\n {\r\n this.isDown = true;\r\n this.isUp = false;\r\n this.timeDown = event.timeStamp;\r\n this.duration = 0;\r\n this._justDown = true;\r\n this._justUp = false;\r\n\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n else if (this.emitOnRepeat)\r\n {\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the Key Up action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onUp\r\n * @fires Phaser.Input.Keyboard.Events#UP\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onUp: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n \r\n this.isDown = false;\r\n this.isUp = true;\r\n this.timeUp = event.timeStamp;\r\n this.duration = this.timeUp - this.timeDown;\r\n this.repeats = 0;\r\n \r\n this._justDown = false;\r\n this._justUp = true;\r\n this._tick = -1;\r\n \r\n this.emit(Events.UP, this, event);\r\n },\r\n\r\n /**\r\n * Resets this Key object back to its default un-pressed state.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#reset\r\n * @since 3.6.0\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n reset: function ()\r\n {\r\n this.preventDefault = true;\r\n this.enabled = true;\r\n this.isDown = false;\r\n this.isUp = true;\r\n this.altKey = false;\r\n this.ctrlKey = false;\r\n this.shiftKey = false;\r\n this.metaKey = false;\r\n this.timeDown = 0;\r\n this.duration = 0;\r\n this.timeUp = 0;\r\n this.repeats = 0;\r\n this._justDown = false;\r\n this._justUp = false;\r\n this._tick = -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the duration, in ms, that the Key has been held down for.\r\n * \r\n * If the key is not currently down it will return zero.\r\n * \r\n * The get the duration the Key was held down for in the previous up-down cycle,\r\n * use the `Key.duration` property value instead.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#getDuration\r\n * @since 3.17.0\r\n * \r\n * @return {number} The duration, in ms, that the Key has been held down for if currently down.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.plugin.game.loop.time - this.timeDown);\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Removes any bound event handlers and removes local references.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.originalEvent = null;\r\n\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Key;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/Key.js?')},"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Keyboard Codes.\r\n *\r\n * @namespace Phaser.Input.Keyboard.KeyCodes\r\n * @memberof Phaser.Input.Keyboard\r\n * @since 3.0.0\r\n */\r\n\r\nvar KeyCodes = {\r\n\r\n /**\r\n * The BACKSPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKSPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKSPACE: 8,\r\n\r\n /**\r\n * The TAB key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TAB\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TAB: 9,\r\n\r\n /**\r\n * The ENTER key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ENTER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ENTER: 13,\r\n\r\n /**\r\n * The SHIFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SHIFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHIFT: 16,\r\n\r\n /**\r\n * The CTRL key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CTRL\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CTRL: 17,\r\n\r\n /**\r\n * The ALT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ALT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ALT: 18,\r\n\r\n /**\r\n * The PAUSE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAUSE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSE: 19,\r\n\r\n /**\r\n * The CAPS_LOCK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CAPS_LOCK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CAPS_LOCK: 20,\r\n\r\n /**\r\n * The ESC key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ESC\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ESC: 27,\r\n\r\n /**\r\n * The SPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SPACE: 32,\r\n\r\n /**\r\n * The PAGE_UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_UP: 33,\r\n\r\n /**\r\n * The PAGE_DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_DOWN: 34,\r\n\r\n /**\r\n * The END key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.END\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n END: 35,\r\n\r\n /**\r\n * The HOME key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.HOME\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOME: 36,\r\n\r\n /**\r\n * The LEFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.LEFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 37,\r\n\r\n /**\r\n * The UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 38,\r\n\r\n /**\r\n * The RIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.RIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 39,\r\n\r\n /**\r\n * The DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 40,\r\n\r\n /**\r\n * The PRINT_SCREEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PRINT_SCREEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PRINT_SCREEN: 42,\r\n\r\n /**\r\n * The INSERT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.INSERT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INSERT: 45,\r\n\r\n /**\r\n * The DELETE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DELETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELETE: 46,\r\n\r\n /**\r\n * The ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ZERO: 48,\r\n\r\n /**\r\n * The ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ONE: 49,\r\n\r\n /**\r\n * The TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TWO: 50,\r\n\r\n /**\r\n * The THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n THREE: 51,\r\n\r\n /**\r\n * The FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOUR: 52,\r\n\r\n /**\r\n * The FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FIVE: 53,\r\n\r\n /**\r\n * The SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SIX: 54,\r\n\r\n /**\r\n * The SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEVEN: 55,\r\n\r\n /**\r\n * The EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n EIGHT: 56,\r\n\r\n /**\r\n * The NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NINE: 57,\r\n\r\n /**\r\n * The NUMPAD_ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ZERO: 96,\r\n\r\n /**\r\n * The NUMPAD_ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ONE: 97,\r\n\r\n /**\r\n * The NUMPAD_TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_TWO: 98,\r\n\r\n /**\r\n * The NUMPAD_THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_THREE: 99,\r\n\r\n /**\r\n * The NUMPAD_FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FOUR: 100,\r\n\r\n /**\r\n * The NUMPAD_FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FIVE: 101,\r\n\r\n /**\r\n * The NUMPAD_SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SIX: 102,\r\n\r\n /**\r\n * The NUMPAD_SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SEVEN: 103,\r\n\r\n /**\r\n * The NUMPAD_EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_EIGHT: 104,\r\n\r\n /**\r\n * The NUMPAD_NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_NINE: 105,\r\n\r\n /**\r\n * The A key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.A\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n A: 65,\r\n\r\n /**\r\n * The B key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.B\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n B: 66,\r\n\r\n /**\r\n * The C key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.C\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n C: 67,\r\n\r\n /**\r\n * The D key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.D\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n D: 68,\r\n\r\n /**\r\n * The E key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.E\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n E: 69,\r\n\r\n /**\r\n * The F key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F: 70,\r\n\r\n /**\r\n * The G key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.G\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n G: 71,\r\n\r\n /**\r\n * The H key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.H\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n H: 72,\r\n\r\n /**\r\n * The I key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.I\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n I: 73,\r\n\r\n /**\r\n * The J key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.J\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n J: 74,\r\n\r\n /**\r\n * The K key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.K\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n K: 75,\r\n\r\n /**\r\n * The L key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.L\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n L: 76,\r\n\r\n /**\r\n * The M key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.M\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n M: 77,\r\n\r\n /**\r\n * The N key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.N\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n N: 78,\r\n\r\n /**\r\n * The O key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.O\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n O: 79,\r\n\r\n /**\r\n * The P key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.P\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n P: 80,\r\n\r\n /**\r\n * The Q key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Q\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Q: 81,\r\n\r\n /**\r\n * The R key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.R\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n R: 82,\r\n\r\n /**\r\n * The S key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.S\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n S: 83,\r\n\r\n /**\r\n * The T key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.T\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n T: 84,\r\n\r\n /**\r\n * The U key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.U\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n U: 85,\r\n\r\n /**\r\n * The V key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.V\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n V: 86,\r\n\r\n /**\r\n * The W key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.W\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n W: 87,\r\n\r\n /**\r\n * The X key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.X\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n X: 88,\r\n\r\n /**\r\n * The Y key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Y: 89,\r\n\r\n /**\r\n * The Z key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Z\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Z: 90,\r\n\r\n /**\r\n * The F1 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F1\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F1: 112,\r\n\r\n /**\r\n * The F2 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F2\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F2: 113,\r\n\r\n /**\r\n * The F3 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F3\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F3: 114,\r\n\r\n /**\r\n * The F4 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F4\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F4: 115,\r\n\r\n /**\r\n * The F5 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F5\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F5: 116,\r\n\r\n /**\r\n * The F6 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F6\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F6: 117,\r\n\r\n /**\r\n * The F7 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F7\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F7: 118,\r\n\r\n /**\r\n * The F8 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F8\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F8: 119,\r\n\r\n /**\r\n * The F9 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F9\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F9: 120,\r\n\r\n /**\r\n * The F10 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F10\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F10: 121,\r\n\r\n /**\r\n * The F11 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F11\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F11: 122,\r\n\r\n /**\r\n * The F12 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F12\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F12: 123,\r\n\r\n /**\r\n * The SEMICOLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON: 186,\r\n\r\n /**\r\n * The PLUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PLUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLUS: 187,\r\n\r\n /**\r\n * The COMMA key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA: 188,\r\n\r\n /**\r\n * The MINUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.MINUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n MINUS: 189,\r\n\r\n /**\r\n * The PERIOD key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PERIOD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PERIOD: 190,\r\n\r\n /**\r\n * The FORWARD_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FORWARD_SLASH: 191,\r\n\r\n /**\r\n * The BACK_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACK_SLASH: 220,\r\n\r\n /**\r\n * The QUOTES key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.QUOTES\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n QUOTES: 222,\r\n\r\n /**\r\n * The BACKTICK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKTICK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKTICK: 192,\r\n\r\n /**\r\n * The OPEN_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.OPEN_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OPEN_BRACKET: 219,\r\n\r\n /**\r\n * The CLOSED_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CLOSED_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CLOSED_BRACKET: 221,\r\n\r\n /**\r\n * The SEMICOLON_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON_FIREFOX: 59,\r\n\r\n /**\r\n * The COLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COLON: 58,\r\n\r\n /**\r\n * The COMMA_FIREFOX_WINDOWS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX_WINDOWS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX_WINDOWS: 60,\r\n\r\n /**\r\n * The COMMA_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX: 62,\r\n\r\n /**\r\n * The BRACKET_RIGHT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_RIGHT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_RIGHT_FIREFOX: 174,\r\n\r\n /**\r\n * The BRACKET_LEFT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_LEFT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_LEFT_FIREFOX: 175\r\n};\r\n\r\nmodule.exports = KeyCodes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js?")},"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar KeyCodes = __webpack_require__(/*! ./KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js");\r\n\r\nvar KeyMap = {};\r\n\r\nfor (var key in KeyCodes)\r\n{\r\n KeyMap[KeyCodes[key]] = key;\r\n}\r\n\r\nmodule.exports = KeyMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyMap.js?')},"./node_modules/phaser/src/input/keyboard/keys/UpDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was released within the `duration` value given, based on the current\r\n * game clock time. Or returns `false` if it either isn't up, or was released longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.UpDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been released.\r\n *\r\n * @return {boolean} `true` if the Key was released within `duration` ms ago, otherwise `false`.\r\n */\r\nvar UpDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeUp;\r\n\r\n return (key.isUp && current < duration);\r\n};\r\n\r\nmodule.exports = UpDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/UpDuration.js?")},"./node_modules/phaser/src/input/mouse/MouseManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Features = __webpack_require__(/*! ../../device/Features */ \"./node_modules/phaser/src/device/Features.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\r\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n\r\n/**\r\n * @classdesc\r\n * The Mouse Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class MouseManager\r\n * @memberof Phaser.Input.Mouse\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar MouseManager = new Class({\r\n\r\n initialize:\r\n\r\n function MouseManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Mouse Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * If the mouse has been pointer locked successfully this will be set to true.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#locked\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The Mouse Move Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseMove\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseMove = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDown\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseDown = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUp\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseUp = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDownWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseDownWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUpWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseUpWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Over Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOver = NOOP;\r\n\r\n /**\r\n * The Mouse Out Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOut = NOOP;\r\n\r\n /**\r\n * The Mouse Wheel Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseWheel\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onMouseWheel = NOOP;\r\n\r\n /**\r\n * Internal pointerLockChange handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#pointerLockChange\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.pointerLockChange = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputMouse;\r\n this.target = config.inputMouseEventTarget;\r\n this.capture = config.inputMouseCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (config.disableContextMenu)\r\n {\r\n this.disableContextMenu();\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to disable the context menu from appearing if you right-click on the browser.\r\n * \r\n * Works by listening for the `contextmenu` event and prevent defaulting it.\r\n * \r\n * Use this if you need to enable right-button mouse support in your game, and the browser\r\n * menu keeps getting in the way.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#disableContextMenu\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance.\r\n */\r\n disableContextMenu: function ()\r\n {\r\n document.body.addEventListener('contextmenu', function (event)\r\n {\r\n event.preventDefault();\r\n return false;\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If the browser supports it, you can request that the pointer be locked to the browser window.\r\n *\r\n * This is classically known as 'FPS controls', where the pointer can't leave the browser until\r\n * the user presses an exit key.\r\n *\r\n * If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched,\r\n * from the games Input Manager, with an `isPointerLocked` property.\r\n *\r\n * It is important to note that pointer lock can only be enabled after an 'engagement gesture',\r\n * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#requestPointerLock\r\n * @since 3.0.0\r\n */\r\n requestPointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n var element = this.target;\r\n\r\n element.requestPointerLock = element.requestPointerLock || element.mozRequestPointerLock || element.webkitRequestPointerLock;\r\n\r\n element.requestPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * If the browser supports pointer lock, this will request that the pointer lock is released. If\r\n * the browser successfully enters a locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be\r\n * dispatched - from the game's input manager - with an `isPointerLocked` property.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#releasePointerLock\r\n * @since 3.0.0\r\n */\r\n releasePointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\r\n document.exitPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Mouse Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onMouseMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDown = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseDown(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDownWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseDown(event);\r\n }\r\n };\r\n\r\n this.onMouseUp = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseUp(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseUpWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseUp(event);\r\n }\r\n };\r\n\r\n this.onMouseOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onMouseOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n this.onMouseWheel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseWheel(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('mousemove', this.onMouseMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mousedown', this.onMouseDown, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseup', this.onMouseUp, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseover', this.onMouseOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseout', this.onMouseOut, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('wheel', this.onMouseWheel, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive);\r\n window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n this.pointerLockChange = function (event)\r\n {\r\n var element = _this.target;\r\n\r\n _this.locked = (document.pointerLockElement === element || document.mozPointerLockElement === element || document.webkitPointerLockElement === element) ? true : false;\r\n\r\n _this.manager.onPointerLockChange(event);\r\n };\r\n\r\n document.addEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Mouse Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('mousemove', this.onMouseMove);\r\n target.removeEventListener('mousedown', this.onMouseDown);\r\n target.removeEventListener('mouseup', this.onMouseUp);\r\n target.removeEventListener('mouseover', this.onMouseOver);\r\n target.removeEventListener('mouseout', this.onMouseOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('mousedown', this.onMouseDownWindow);\r\n window.removeEventListener('mouseup', this.onMouseUpWindow);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n document.removeEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Mouse Manager instance.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MouseManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/MouseManager.js?")},"./node_modules/phaser/src/input/mouse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Mouse\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n MouseManager: __webpack_require__(/*! ./MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/index.js?')},"./node_modules/phaser/src/input/touch/TouchManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Touch_events\r\n// https://patrickhlauke.github.io/touch/tests/results/\r\n// https://www.html5rocks.com/en/mobile/touch/\r\n\r\n/**\r\n * @classdesc\r\n * The Touch Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Touch Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class TouchManager\r\n * @memberof Phaser.Input.Touch\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar TouchManager = new Class({\r\n\r\n initialize:\r\n\r\n function TouchManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Touch Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Touch Start event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStart\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchStart = NOOP;\r\n\r\n /**\r\n * The Touch Start event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStartWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchStartWindow = NOOP;\r\n\r\n /**\r\n * The Touch Move event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchMove\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchMove = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEnd\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchEnd = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEndWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchEndWindow = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancel\r\n * @type {function}\r\n * @since 3.15.0\r\n */\r\n this.onTouchCancel = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancelWindow\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onTouchCancelWindow = NOOP;\r\n\r\n /**\r\n * The Touch Over event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOver = NOOP;\r\n\r\n /**\r\n * The Touch Out event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOut = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputTouch;\r\n this.target = config.inputTouchEventTarget;\r\n this.capture = config.inputTouchCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Touch Event listeners running as long as an input target is set.\r\n * \r\n * This method is called automatically if Touch Input is enabled in the game config,\r\n * which it is by default. However, you can call it manually should you need to\r\n * delay input capturing until later in the game.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onTouchStart = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchStart(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchStartWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchStart(event);\r\n }\r\n };\r\n\r\n this.onTouchMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEnd = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchEnd(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEndWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchEnd(event);\r\n }\r\n };\r\n\r\n this.onTouchCancel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchCancelWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n }\r\n };\r\n\r\n this.onTouchOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onTouchOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('touchstart', this.onTouchStart, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchmove', this.onTouchMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchend', this.onTouchEnd, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchcancel', this.onTouchCancel, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchover', this.onTouchOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchout', this.onTouchOut, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('touchstart', this.onTouchStartWindow, nonPassive);\r\n window.addEventListener('touchend', this.onTouchEndWindow, nonPassive);\r\n window.addEventListener('touchcancel', this.onTouchCancelWindow, nonPassive);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Touch Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('touchstart', this.onTouchStart);\r\n target.removeEventListener('touchmove', this.onTouchMove);\r\n target.removeEventListener('touchend', this.onTouchEnd);\r\n target.removeEventListener('touchcancel', this.onTouchCancel);\r\n target.removeEventListener('touchover', this.onTouchOver);\r\n target.removeEventListener('touchout', this.onTouchOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('touchstart', this.onTouchStartWindow);\r\n window.removeEventListener('touchend', this.onTouchEndWindow);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Touch Manager instance.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TouchManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/TouchManager.js?")},"./node_modules/phaser/src/input/touch/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Touch\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n TouchManager: __webpack_require__(/*! ./TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/index.js?')},"./node_modules/phaser/src/loader/File.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ./GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\nvar XHRLoader = __webpack_require__(/*! ./XHRLoader */ \"./node_modules/phaser/src/loader/XHRLoader.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.type || !this.key)\r\n {\r\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n * Automatically has Loader.path prepended to it.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.url = GetFastValue(fileConfig, 'url');\r\n\r\n if (this.url === undefined)\r\n {\r\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof(this.url) !== 'function')\r\n {\r\n this.url = loader.path + this.url;\r\n }\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n // \r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/File.js?")},"./node_modules/phaser/src/loader/FileTypesManager.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/FileTypesManager.js?")},"./node_modules/phaser/src/loader/GetURL.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/GetURL.js?")},"./node_modules/phaser/src/loader/LoaderPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar CustomSet = __webpack_require__(/*! ../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ./FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\r\n * You typically interact with it via `this.load` in your Scene. Scenes can have a `preload` method, which is always\r\n * called before the Scenes `create` method, allowing you to preload assets that the Scene may need.\r\n *\r\n * If you call any `this.load` methods from outside of `Scene.preload` then you need to start the Loader going\r\n * yourself by calling `Loader.start()`. It's only automatically started during the Scene preload.\r\n *\r\n * The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events.\r\n * Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration.\r\n *\r\n * Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader\r\n * event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished\r\n * simply adding a new file to it, while running, will ensure it's added into the current queue.\r\n *\r\n * Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However,\r\n * assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that\r\n * file inside `Game.cache.xml`, which is accessible from every Scene in your game, no matter who was responsible\r\n * for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes\r\n * in your game.\r\n *\r\n * The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader\r\n * when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes.\r\n * See those files for more details.\r\n *\r\n * @class LoaderPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Loader instance.\r\n */\r\nvar LoaderPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function LoaderPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n var gameConfig = scene.sys.game.config;\r\n var sceneConfig = scene.sys.settings.loader;\r\n\r\n /**\r\n * The Scene which owns this Loader instance.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the global Cache Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#cacheManager\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.7.0\r\n */\r\n this.cacheManager = scene.sys.cache;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.7.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * A reference to the global Scene Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @protected\r\n * @since 3.16.0\r\n */\r\n this.sceneManager = scene.sys.game.scene;\r\n\r\n // Inject the available filetypes into the Loader\r\n FileTypesManager.install(this);\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader\r\n * from that point on. It does _not_ change any file already in the load queue.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#prefix\r\n * @type {string}\r\n * @default ''\r\n * @since 3.7.0\r\n */\r\n this.prefix = '';\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.path = \"images/sprites/\";\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n *\r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setPath()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#path\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.path = '';\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setBaseURL()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#baseURL\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.baseURL = '';\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n /**\r\n * The number of concurrent / parallel resources to try and fetch at once.\r\n *\r\n * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all.\r\n *\r\n * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#maxParallelDownloads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxParallelDownloads = GetFastValue(sceneConfig, 'maxParallelDownloads', gameConfig.loaderMaxParallelDownloads);\r\n\r\n /**\r\n * xhr specific global settings (can be overridden on a per-file basis)\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#xhr\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhr = XHRSettings(\r\n GetFastValue(sceneConfig, 'responseType', gameConfig.loaderResponseType),\r\n GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync),\r\n GetFastValue(sceneConfig, 'user', gameConfig.loaderUser),\r\n GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword),\r\n GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout)\r\n );\r\n\r\n /**\r\n * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#crossOrigin\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = GetFastValue(sceneConfig, 'crossOrigin', gameConfig.loaderCrossOrigin);\r\n\r\n /**\r\n * The total number of files to load. It may not always be accurate because you may add to the Loader during the process\r\n * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalToLoad\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalToLoad = 0;\r\n\r\n /**\r\n * The progress of the current load queue, as a float value between 0 and 1.\r\n * This is updated automatically as files complete loading.\r\n * Note that it is possible for this value to go down again if you add content to the current load queue during a load.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Files are placed in this Set when they're added to the Loader via `addFile`.\r\n * \r\n * They are moved to the `inflight` Set when they start loading, and assuming a successful\r\n * load, to the `queue` Set for further processing.\r\n *\r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#list\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.list = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're in the process of being loaded.\r\n * \r\n * Upon a successful load they are moved to the `queue` Set.\r\n * \r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#inflight\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.inflight = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're being processed.\r\n * \r\n * If the process is successful they are moved to their final destination, which could be\r\n * a Cache or the Texture Manager.\r\n * \r\n * At the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#queue\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.queue = new CustomSet();\r\n\r\n /**\r\n * A temporary Set in which files are stored after processing,\r\n * awaiting destruction at the end of the load process.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#_deleteQueue\r\n * @type {Phaser.Structs.Set.}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._deleteQueue = new CustomSet();\r\n\r\n /**\r\n * The total number of files that failed to load during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalFailed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalFailed = 0;\r\n\r\n /**\r\n * The total number of files that successfully loaded during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalComplete\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalComplete = 0;\r\n\r\n /**\r\n * The current state of the Loader.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#state\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.state = CONST.LOADER_IDLE;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pluginStart\r\n * @private\r\n * @since 3.5.1\r\n */\r\n pluginStart: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any\r\n * file _already_ being loaded. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setBaseURL\r\n * @since 3.0.0\r\n *\r\n * @param {string} [url] - The URL to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setBaseURL: function (url)\r\n {\r\n if (url === undefined) { url = ''; }\r\n\r\n if (url !== '' && url.substr(-1) !== '/')\r\n {\r\n url = url.concat('/');\r\n }\r\n\r\n this.baseURL = url;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.setPath(\"images/sprites/\");\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n * \r\n * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} [path] - The path to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPath: function (path)\r\n {\r\n if (path === undefined) { path = ''; }\r\n\r\n if (path !== '' && path.substr(-1) !== '/')\r\n {\r\n path = path.concat('/');\r\n }\r\n\r\n this.path = path;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * \r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * \r\n * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPrefix\r\n * @since 3.7.0\r\n *\r\n * @param {string} [prefix] - The prefix to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPrefix: function (prefix)\r\n {\r\n if (prefix === undefined) { prefix = ''; }\r\n\r\n this.prefix = prefix;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Cross Origin Resource Sharing value used when loading files.\r\n * \r\n * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config.\r\n * \r\n * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have\r\n * their own CORs setting. To reset it, call this method with no arguments.\r\n *\r\n * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setCORS\r\n * @since 3.0.0\r\n *\r\n * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setCORS: function (crossOrigin)\r\n {\r\n this.crossOrigin = crossOrigin;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a file, or array of files, into the load queue.\r\n *\r\n * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key\r\n * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.\r\n * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already\r\n * started, ready for the next batch of files to be pulled from the list to the inflight queue.\r\n *\r\n * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`,\r\n * however you can call this as long as the file given to it is well formed.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addFile\r\n * @fires Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Loader.File|Phaser.Loader.File[])} file - The file, or array of files, to be added to the load queue.\r\n */\r\n addFile: function (file)\r\n {\r\n if (!Array.isArray(file))\r\n {\r\n file = [ file ];\r\n }\r\n\r\n for (var i = 0; i < file.length; i++)\r\n {\r\n var item = file[i];\r\n\r\n // Does the file already exist in the cache or texture manager?\r\n // Or will it conflict with a file already in the queue or inflight?\r\n if (!this.keyExists(item))\r\n {\r\n this.list.set(item);\r\n\r\n this.emit(Events.ADD, item.key, item.type, this, item);\r\n\r\n if (this.isLoading())\r\n {\r\n this.totalToLoad++;\r\n this.updateProgress();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Checks the key and type of the given file to see if it will conflict with anything already\r\n * in a Cache, the Texture Manager, or the list or inflight queues.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#keyExists\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file to check the key of.\r\n *\r\n * @return {boolean} `true` if adding this file will cause a cache or queue conflict, otherwise `false`.\r\n */\r\n keyExists: function (file)\r\n {\r\n var keyConflict = file.hasCacheConflict();\r\n\r\n if (!keyConflict)\r\n {\r\n this.list.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n if (!keyConflict && this.isLoading())\r\n {\r\n this.inflight.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n\r\n this.queue.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n return keyConflict;\r\n },\r\n\r\n /**\r\n * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call\r\n * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the\r\n * pack data. However, if you've got the data prepared you can pass it to this method.\r\n *\r\n * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into\r\n * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format\r\n * see the `LoaderPlugin.pack` method.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addPack\r\n * @since 3.7.0\r\n *\r\n * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue.\r\n * @param {string} [packKey] - An optional key to use from the pack file data.\r\n *\r\n * @return {boolean} `true` if any files were added to the queue, otherwise `false`.\r\n */\r\n addPack: function (pack, packKey)\r\n {\r\n // if no packKey provided we'll add everything to the queue\r\n if (packKey && pack.hasOwnProperty(packKey))\r\n {\r\n pack = { packKey: pack[packKey] };\r\n }\r\n\r\n var total = 0;\r\n\r\n // Store the loader settings in case this pack replaces them\r\n var currentBaseURL = this.baseURL;\r\n var currentPath = this.path;\r\n var currentPrefix = this.prefix;\r\n\r\n // Here we go ...\r\n for (var key in pack)\r\n {\r\n var config = pack[key];\r\n\r\n // Any meta data to process?\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var files = GetFastValue(config, 'files', null);\r\n var defaultType = GetFastValue(config, 'defaultType', 'void');\r\n\r\n if (Array.isArray(files))\r\n {\r\n this.setBaseURL(baseURL);\r\n this.setPath(path);\r\n this.setPrefix(prefix);\r\n\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n var file = files[i];\r\n var type = (file.hasOwnProperty('type')) ? file.type : defaultType;\r\n\r\n if (this[type])\r\n {\r\n this[type](file);\r\n total++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n this.setBaseURL(currentBaseURL);\r\n this.setPath(currentPath);\r\n this.setPrefix(currentPrefix);\r\n\r\n return (total > 0);\r\n },\r\n\r\n /**\r\n * Is the Loader actively loading, or processing loaded files?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isLoading\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is busy loading or processing, otherwise `false`.\r\n */\r\n isLoading: function ()\r\n {\r\n return (this.state === CONST.LOADER_LOADING || this.state === CONST.LOADER_PROCESSING);\r\n },\r\n\r\n /**\r\n * Is the Loader ready to start a new load?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isReady\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is ready to start a new load, otherwise `false`.\r\n */\r\n isReady: function ()\r\n {\r\n return (this.state === CONST.LOADER_IDLE || this.state === CONST.LOADER_COMPLETE);\r\n },\r\n\r\n /**\r\n * Starts the Loader running. This will reset the progress and totals and then emit a `start` event.\r\n * If there is nothing in the queue the Loader will immediately complete, otherwise it will start\r\n * loading the first batch of files.\r\n *\r\n * The Loader is started automatically if the queue is populated within your Scenes `preload` method.\r\n *\r\n * However, outside of this, you need to call this method to start it.\r\n *\r\n * If the Loader is already running this method will simply return.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#start\r\n * @fires Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.isReady())\r\n {\r\n return;\r\n }\r\n\r\n this.progress = 0;\r\n\r\n this.totalFailed = 0;\r\n this.totalComplete = 0;\r\n this.totalToLoad = this.list.size;\r\n\r\n this.emit(Events.START, this);\r\n\r\n if (this.list.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n else\r\n {\r\n this.state = CONST.LOADER_LOADING;\r\n\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.updateProgress();\r\n\r\n this.checkLoadQueue();\r\n\r\n this.systems.events.on(SceneEvents.UPDATE, this.update, this);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n * It updates the `progress` value and then emits a progress event, which you can use to\r\n * display a loading bar in your game.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#updateProgress\r\n * @fires Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n */\r\n updateProgress: function ()\r\n {\r\n this.progress = 1 - ((this.list.size + this.inflight.size) / this.totalToLoad);\r\n\r\n this.emit(Events.PROGRESS, this.progress);\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#update\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (this.state === CONST.LOADER_LOADING && this.list.size > 0 && this.inflight.size < this.maxParallelDownloads)\r\n {\r\n this.checkLoadQueue();\r\n }\r\n },\r\n\r\n /**\r\n * An internal method called by the Loader.\r\n * \r\n * It will check to see if there are any more files in the pending list that need loading, and if so it will move\r\n * them from the list Set into the inflight Set, set their CORs flag and start them loading.\r\n * \r\n * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#checkLoadQueue\r\n * @private\r\n * @since 3.7.0\r\n */\r\n checkLoadQueue: function ()\r\n {\r\n this.list.each(function (file)\r\n {\r\n if (file.state === CONST.FILE_POPULATED || (file.state === CONST.FILE_PENDING && this.inflight.size < this.maxParallelDownloads))\r\n {\r\n this.inflight.set(file);\r\n\r\n this.list.delete(file);\r\n\r\n // If the file doesn't have its own crossOrigin set, we'll use the Loaders (which is undefined by default)\r\n if (!file.crossOrigin)\r\n {\r\n file.crossOrigin = this.crossOrigin;\r\n }\r\n\r\n file.load();\r\n }\r\n\r\n if (this.inflight.size === this.maxParallelDownloads)\r\n {\r\n // Tells the Set iterator to abort\r\n return false;\r\n }\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * An internal method called automatically by the XHRLoader belong to a File.\r\n * \r\n * This method will remove the given file from the inflight Set and update the load progress.\r\n * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#nextFile\r\n * @fires Phaser.Loader.Events#FILE_LOAD\r\n * @fires Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that just finished loading, or errored during load.\r\n * @param {boolean} success - `true` if the file loaded successfully, otherwise `false`.\r\n */\r\n nextFile: function (file, success)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.inflight)\r\n {\r\n return;\r\n }\r\n\r\n this.inflight.delete(file);\r\n\r\n this.updateProgress();\r\n\r\n if (success)\r\n {\r\n this.totalComplete++;\r\n\r\n this.queue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD, file);\r\n\r\n file.onProcess();\r\n }\r\n else\r\n {\r\n this.totalFailed++;\r\n\r\n this._deleteQueue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD_ERROR, file);\r\n\r\n this.fileProcessComplete(file);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that is called automatically by the File when it has finished processing.\r\n *\r\n * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called.\r\n *\r\n * It this then removed from the queue. If there are no more files to load `loadComplete` is called.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#fileProcessComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file that has finished processing.\r\n */\r\n fileProcessComplete: function (file)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.scene || !this.systems || !this.systems.game || this.systems.game.pendingDestroy)\r\n {\r\n return;\r\n }\r\n\r\n // This file has failed, so move it to the failed Set\r\n if (file.state === CONST.FILE_ERRORED)\r\n {\r\n if (file.multiFile)\r\n {\r\n file.multiFile.onFileFailed(file);\r\n }\r\n }\r\n else if (file.state === CONST.FILE_COMPLETE)\r\n {\r\n if (file.multiFile)\r\n {\r\n if (file.multiFile.isReadyToProcess())\r\n {\r\n // If we got here then all files the link file needs are ready to add to the cache\r\n file.multiFile.addToCache();\r\n }\r\n }\r\n else\r\n {\r\n // If we got here, then the file processed, so let it add itself to its cache\r\n file.addToCache();\r\n }\r\n }\r\n\r\n // Remove it from the queue\r\n this.queue.delete(file);\r\n\r\n // Nothing left to do?\r\n\r\n if (this.list.size === 0 && this.inflight.size === 0 && this.queue.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called at the end when the load queue is exhausted and all files have either loaded or errored.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Also clears down the Sets, puts progress to 1 and clears the deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#loadComplete\r\n * @fires Phaser.Loader.Events#COMPLETE\r\n * @fires Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.7.0\r\n */\r\n loadComplete: function ()\r\n {\r\n this.emit(Events.POST_PROCESS, this);\r\n\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.progress = 1;\r\n\r\n this.state = CONST.LOADER_COMPLETE;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n\r\n // Call 'destroy' on each file ready for deletion\r\n this._deleteQueue.iterateLocal('destroy');\r\n\r\n this._deleteQueue.clear();\r\n\r\n this.emit(Events.COMPLETE, this, this.totalComplete, this.totalFailed);\r\n },\r\n\r\n /**\r\n * Adds a File into the pending-deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#flagForRemoval\r\n * @since 3.7.0\r\n * \r\n * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes.\r\n */\r\n flagForRemoval: function (file)\r\n {\r\n this._deleteQueue.set(file);\r\n },\r\n\r\n /**\r\n * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally.\r\n *\r\n * The data must be well formed JSON and ready-parsed, not a JavaScript object.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#saveJSON\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The JSON data, ready parsed.\r\n * @param {string} [filename=file.json] - The name to save the JSON file as.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n saveJSON: function (data, filename)\r\n {\r\n return this.save(JSON.stringify(data), filename);\r\n },\r\n\r\n /**\r\n * Causes the browser to save the given data as a file to its default Downloads folder.\r\n * \r\n * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href\r\n * to be an ObjectURL based on the given data, and then invokes a click event.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#save\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The data to be saved. Will be passed through URL.createObjectURL.\r\n * @param {string} [filename=file.json] - The filename to save the file as.\r\n * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n save: function (data, filename, filetype)\r\n {\r\n if (filename === undefined) { filename = 'file.json'; }\r\n if (filetype === undefined) { filetype = 'application/json'; }\r\n\r\n var blob = new Blob([ data ], { type: filetype });\r\n\r\n var url = URL.createObjectURL(blob);\r\n\r\n var a = document.createElement('a');\r\n\r\n a.download = filename;\r\n a.textContent = 'Download ' + filename;\r\n a.href = url;\r\n a.click();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the Loader.\r\n *\r\n * This will clear all lists and reset the base URL, path and prefix.\r\n *\r\n * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#reset\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n var gameConfig = this.systems.game.config;\r\n var sceneConfig = this.systems.settings.loader;\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n this.state = CONST.LOADER_IDLE;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.reset();\r\n\r\n this.state = CONST.LOADER_SHUTDOWN;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.state = CONST.LOADER_DESTROYED;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.START, this.pluginStart, this);\r\n\r\n this.list = null;\r\n this.inflight = null;\r\n this.queue = null;\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.textureManager = null;\r\n this.cacheManager = null;\r\n this.sceneManager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Loader', LoaderPlugin, 'load');\r\n\r\nmodule.exports = LoaderPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/LoaderPlugin.js?")},"./node_modules/phaser/src/loader/MergeXHRSettings.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js");\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MergeXHRSettings.js?')},"./node_modules/phaser/src/loader/MultiFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn\'t create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MultiFile.js?')},"./node_modules/phaser/src/loader/XHRLoader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRLoader.js?")},"./node_modules/phaser/src/loader/XHRSettings.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRSettings.js?")},"./node_modules/phaser/src/loader/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/const.js?")},"./node_modules/phaser/src/loader/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/ADD_EVENT.js?")},"./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/START_EVENT.js?")},"./node_modules/phaser/src/loader/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/loader/events/ADD_EVENT.js"),\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js"),\r\n FILE_COMPLETE: __webpack_require__(/*! ./FILE_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js"),\r\n FILE_KEY_COMPLETE: __webpack_require__(/*! ./FILE_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js"),\r\n FILE_LOAD_ERROR: __webpack_require__(/*! ./FILE_LOAD_ERROR_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js"),\r\n FILE_LOAD: __webpack_require__(/*! ./FILE_LOAD_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js"),\r\n FILE_PROGRESS: __webpack_require__(/*! ./FILE_PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js"),\r\n POST_PROCESS: __webpack_require__(/*! ./POST_PROCESS_EVENT */ "./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js"),\r\n PROGRESS: __webpack_require__(/*! ./PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/loader/events/START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/index.js?')},"./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\nvar LoaderEvents = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/loader/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single Animation JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation.\r\n *\r\n * @class AnimationJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar AnimationJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function AnimationJSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'animationJSON\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n // We need to hook into this event:\r\n this.loader.once(LoaderEvents.POST_PROCESS, this.onLoadComplete, this);\r\n\r\n // But the rest is the same as a normal JSON file\r\n JSONFile.prototype.onProcess.call(this);\r\n },\r\n\r\n /**\r\n * Called at the end of the load process, after the Loader has finished all files in its queue.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onLoadComplete\r\n * @since 3.7.0\r\n */\r\n onLoadComplete: function ()\r\n {\r\n this.loader.systems.anims.fromJSON(this.data);\r\n\r\n this.pendingDestroy();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.animation({\r\n * key: \'baddieAnims\',\r\n * url: \'files/BaddieAnims.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be passed to the global Animation Managers `fromJSON` method.\r\n * This will parse all of the JSON data and create animation data from it. This process happens at the very end\r\n * of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load\r\n * both animation data and the images it relies upon in the same load call.\r\n *\r\n * Once the animation data has been parsed you will be able to play animations using that data.\r\n * Please see the Animation Manager `fromJSON` method for more details about the format and playback.\r\n * \r\n * You can also access the raw animation data from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get(\'baddieAnims\');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#animation\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'animation\', function (key, url, dataKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new AnimationJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new AnimationJSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AnimationJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js?')},"./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas.\r\n * \r\n * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm\r\n *\r\n * @class AtlasJSONFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasJSONFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasJSONFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var json = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlas(image.key, image.data, json.data, normalMap);\r\n\r\n json.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.\r\n * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate.\r\n * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader\r\n * instead of this one.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasJSONFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasJSONFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML.\r\n *\r\n * @class AtlasXMLFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasXMLFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasXMLFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasXMLFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlasXML(image.key, image.data, xml.data, normalMap);\r\n\r\n xml.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in an XML file format.\r\n * These files are created by software such as Shoebox and Adobe Flash / Animate.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlasXML\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasXMLFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasXMLFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasXMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HTML5AudioFile = __webpack_require__(/*! ./HTML5AudioFile */ \"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {any} [urlConfig] - The absolute or relative URL to load this file from in a config object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {AudioContext} [audioContext] - The AudioContext this file will use to process itself.\r\n */\r\nvar AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // URL is an object created by AudioFile.findAudioURL\r\n function AudioFile (loader, key, urlConfig, xhrSettings, audioContext)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n audioContext = GetFastValue(config, 'context', audioContext);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: urlConfig.url,\r\n xhrSettings: xhrSettings,\r\n config: { context: audioContext }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioFile#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var _this = this;\r\n\r\n // interesting read https://github.com/WebAudio/web-audio-api/issues/1305\r\n this.config.context.decodeAudioData(this.xhrLoader.response,\r\n function (audioBuffer)\r\n {\r\n _this.data = audioBuffer;\r\n\r\n _this.onProcessComplete();\r\n },\r\n function (e)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + this.key + ' - ', e ? e.message : null);\r\n\r\n _this.onProcessError();\r\n }\r\n );\r\n\r\n this.config.context = null;\r\n }\r\n\r\n});\r\n\r\nAudioFile.create = function (loader, key, urls, config, xhrSettings)\r\n{\r\n var game = loader.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n // url may be inside key, which may be an object\r\n if (IsPlainObject(key))\r\n {\r\n urls = GetFastValue(key, 'url', []);\r\n config = GetFastValue(key, 'config', {});\r\n }\r\n\r\n var urlConfig = AudioFile.getAudioURL(game, urls);\r\n\r\n if (!urlConfig)\r\n {\r\n return null;\r\n }\r\n\r\n // https://developers.google.com/web/updates/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs\r\n // var stream = GetFastValue(config, 'stream', false);\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new AudioFile(loader, key, urlConfig, xhrSettings, game.sound.context);\r\n }\r\n else\r\n {\r\n return new HTML5AudioFile(loader, key, urlConfig, config);\r\n }\r\n};\r\n\r\nAudioFile.getAudioURL = function (game, urls)\r\n{\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0)\r\n {\r\n return url;\r\n }\r\n\r\n var audioType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n\r\n audioType = GetFastValue(urls[i], 'type', (audioType) ? audioType[1] : '').toLowerCase();\r\n\r\n if (game.device.audio[audioType])\r\n {\r\n return {\r\n url: url,\r\n type: audioType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/**\r\n * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audio({\r\n * key: 'title',\r\n * url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioFileConfig` for more details.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audio\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|string[])} [urls] - The absolute or relative URL to load the audio files from.\r\n * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('audio', function (key, urls, config, xhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var audioFile;\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n audioFile = AudioFile.create(this, key[i]);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n audioFile = AudioFile.create(this, key, urls, config, xhrSettings);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AudioFile = __webpack_require__(/*! ./AudioFile.js */ \"./node_modules/phaser/src/loader/filetypes/AudioFile.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Audio Sprite File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite.\r\n *\r\n * @class AudioSpriteFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {{(string|string[])}} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AudioSpriteFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AudioSpriteFile (loader, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n jsonURL = GetFastValue(config, 'jsonURL');\r\n audioURL = GetFastValue(config, 'audioURL');\r\n audioConfig = GetFastValue(config, 'audioConfig');\r\n audioXhrSettings = GetFastValue(config, 'audioXhrSettings');\r\n jsonXhrSettings = GetFastValue(config, 'jsonXhrSettings');\r\n }\r\n\r\n var data;\r\n\r\n // No url? then we're going to do a json load and parse it from that\r\n if (!audioURL)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n \r\n MultiFile.call(this, loader, 'audiosprite', key, [ data ]);\r\n\r\n this.config.resourceLoad = true;\r\n this.config.audioConfig = audioConfig;\r\n this.config.audioXhrSettings = audioXhrSettings;\r\n }\r\n else\r\n {\r\n var audio = AudioFile.create(loader, key, audioURL, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'audiosprite', key, [ audio, data ]);\r\n\r\n this.config.resourceLoad = false;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (this.config.resourceLoad && file.type === 'json' && file.data.hasOwnProperty('resources'))\r\n {\r\n // Inspect the data for the files to now load\r\n var urls = file.data.resources;\r\n\r\n var audioConfig = GetFastValue(this.config, 'audioConfig');\r\n var audioXhrSettings = GetFastValue(this.config, 'audioXhrSettings');\r\n\r\n var audio = AudioFile.create(this.loader, file.key, urls, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n this.addToMultiFile(audio);\r\n\r\n this.loader.addFile(audio);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileA = this.files[0];\r\n var fileB = this.files[1];\r\n\r\n fileA.addToCache();\r\n fileB.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json', [\r\n * 'kyobi.ogg',\r\n * 'kyobi.mp3',\r\n * 'kyobi.m4a'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio\r\n * files automatically based on its content. To do this exclude the audio URLs from the load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite({\r\n * key: 'kyobi',\r\n * jsonURL: 'audio/Kyobi.json',\r\n * audioURL: [\r\n * 'audio/Kyobi.ogg',\r\n * 'audio/Kyobi.mp3',\r\n * 'audio/Kyobi.m4a'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * // and later in your game ...\r\n * var music = this.sound.addAudioSprite('kyobi');\r\n * music.play('title');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audioSprite\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {(string|string[])} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader.\r\n */\r\nFileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var gameAudioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((gameAudioConfig && gameAudioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AudioSpriteFile(this, key[i]);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AudioSpriteFile(this, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js?")},"./node_modules/phaser/src/loader/filetypes/BinaryFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Binary File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary.\r\n *\r\n * @class BinaryFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n */\r\nvar BinaryFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function BinaryFile (loader, key, url, xhrSettings, dataType)\r\n {\r\n var extension = 'bin';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataType = GetFastValue(config, 'dataType', dataType);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'binary',\r\n cache: loader.cacheManager.binary,\r\n extension: extension,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: { dataType: dataType }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.BinaryFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var ctor = this.config.dataType;\r\n\r\n this.data = (ctor) ? new ctor(this.xhrLoader.response) : this.xhrLoader.response;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Binary file, or array of Binary files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Binary Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Binary Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.binary({\r\n * key: 'doom',\r\n * url: 'files/Doom.wad',\r\n * dataType: Uint8Array\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * // and later in your game ...\r\n * var data = this.cache.binary.get('doom');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and\r\n * this is what you would use to retrieve the text from the Binary Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"doom\"\r\n * and no URL is given then the Loader will set the URL to be \"doom.bin\". It will always add `.bin` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#binary\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('binary', function (key, url, dataType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new BinaryFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new BinaryFile(this, key, url, xhrSettings, dataType));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BinaryFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BinaryFile.js?")},"./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../../gameobjects/bitmaptext/ParseXMLBitmapFont.js */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Bitmap Font based File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont.\r\n *\r\n * @class BitmapFontFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar BitmapFontFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function BitmapFontFile (loader, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'fontDataURL'),\r\n extension: GetFastValue(config, 'fontDataExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'fontDataXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, fontDataURL, fontDataXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.BitmapFontFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n\r\n image.addToCache();\r\n xml.addToCache();\r\n\r\n this.loader.cacheManager.bitmapFont.add(image.key, { data: ParseXMLBitmapFont(xml.data), texture: image.key, frame: null });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Bitmap Font, or array of fonts, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the font data to be provided in an XML file format.\r\n * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/),\r\n * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner)\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * // and later in your game ...\r\n * this.add.bitmapText(x, y, 'goldenFont', 'Hello World');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use when creating a Bitmap Text object.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * normalMap: 'images/GoldFont-n.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#bitmapFont\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new BitmapFontFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new BitmapFontFile(this, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BitmapFontFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js?")},"./node_modules/phaser/src/loader/filetypes/CSSFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single CSS File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css.\r\n *\r\n * @class CSSFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar CSSFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function CSSFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'css';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.CSSFile#onProcess\r\n * @since 3.17.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('style');\r\n this.data.defer = false;\r\n this.data.innerHTML = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSS file, or array of CSS files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.css('headers', 'styles/headers.css');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.css({\r\n * key: 'headers',\r\n * url: 'styles/headers.css'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.CSSFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a style DOM element\r\n * via `document.createElement('style')`. It will have its `defer` property set to false and then the\r\n * resulting element will be appended to `document.head`. The CSS styles are then applied to the current document.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.css\". It will always add `.css` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#css\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was \"alien\" then the URL will be \"alien.css\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('css', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new CSSFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new CSSFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = CSSFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/CSSFile.js?")},"./node_modules/phaser/src/loader/filetypes/GLSLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Shader = __webpack_require__(/*! ../../display/shader/BaseShader */ \"./node_modules/phaser/src/display/shader/BaseShader.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single GLSL File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl.\r\n *\r\n * @class GLSLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar GLSLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function GLSLFile (loader, key, url, shaderType, xhrSettings)\r\n {\r\n var extension = 'glsl';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n shaderType = GetFastValue(config, 'shaderType', 'fragment');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n else if (shaderType === undefined)\r\n {\r\n shaderType = 'fragment';\r\n }\r\n\r\n var fileConfig = {\r\n type: 'glsl',\r\n cache: loader.cacheManager.shader,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n config: {\r\n shaderType: shaderType\r\n },\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n var data = this.data.split('\\n');\r\n\r\n // Check to see if this is a shader bundle, or raw glsl file.\r\n var block = this.extractBlock(data, 0);\r\n\r\n if (block)\r\n {\r\n while (block)\r\n {\r\n var key = this.getShaderName(block.header);\r\n var shaderType = this.getShaderType(block.header);\r\n var uniforms = this.getShaderUniforms(block.header);\r\n var shaderSrc = block.shader;\r\n\r\n if (this.cache.has(key))\r\n {\r\n var shader = this.cache.get(key);\r\n\r\n if (shaderType === 'fragment')\r\n {\r\n shader.fragmentSrc = shaderSrc;\r\n }\r\n else\r\n {\r\n shader.vertexSrc = shaderSrc;\r\n }\r\n\r\n if (!shader.uniforms)\r\n {\r\n shader.uniforms = uniforms;\r\n }\r\n }\r\n else if (shaderType === 'fragment')\r\n {\r\n this.cache.add(key, new Shader(key, shaderSrc, '', uniforms));\r\n }\r\n else\r\n {\r\n this.cache.add(key, new Shader(key, '', shaderSrc, uniforms));\r\n }\r\n\r\n block = this.extractBlock(data, block.offset);\r\n }\r\n }\r\n else if (this.config.shaderType === 'fragment')\r\n {\r\n // Single shader\r\n this.cache.add(this.key, new Shader(this.key, this.data));\r\n }\r\n else\r\n {\r\n this.cache.add(this.key, new Shader(this.key, '', this.data));\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Returns the name of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader name.\r\n */\r\n getShaderName: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'name:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.key;\r\n },\r\n\r\n /**\r\n * Returns the type of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader type. Either 'fragment' or 'vertex'.\r\n */\r\n getShaderType: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'type:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.config.shaderType;\r\n },\r\n\r\n /**\r\n * Returns the shader uniforms from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {any} The shader uniforms object.\r\n */\r\n getShaderUniforms: function (headerSource)\r\n {\r\n var uniforms = {};\r\n\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 8) === 'uniform.')\r\n {\r\n var pos = line.indexOf(':');\r\n\r\n if (pos)\r\n {\r\n var key = line.substring(8, pos);\r\n\r\n try\r\n {\r\n uniforms[key] = JSON.parse(line.substring(pos + 1));\r\n }\r\n catch (e)\r\n {\r\n console.warn('Invalid uniform JSON: ' + key);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return uniforms;\r\n },\r\n\r\n /**\r\n * Processes the shader file and extracts the relevant data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} data - The array of shader data to process.\r\n * @param {integer} offset - The offset to start processing from.\r\n * \r\n * @return {any} The processed shader block, or null.\r\n */\r\n extractBlock: function (data, offset)\r\n {\r\n var headerStart = -1;\r\n var headerEnd = -1;\r\n var blockEnd = -1;\r\n var headerOpen = false;\r\n var captureSource = false;\r\n var headerSource = [];\r\n var shaderSource = [];\r\n\r\n for (var i = offset; i < data.length; i++)\r\n {\r\n var line = data[i].trim();\r\n\r\n if (line === '---')\r\n {\r\n if (headerStart === -1)\r\n {\r\n headerStart = i;\r\n headerOpen = true;\r\n }\r\n else if (headerOpen)\r\n {\r\n headerEnd = i;\r\n headerOpen = false;\r\n captureSource = true;\r\n }\r\n else\r\n {\r\n // We've hit another --- delimeter, break out\r\n captureSource = false;\r\n break;\r\n }\r\n }\r\n else if (headerOpen)\r\n {\r\n headerSource.push(line);\r\n }\r\n else if (captureSource)\r\n {\r\n shaderSource.push(line);\r\n blockEnd = i;\r\n }\r\n }\r\n\r\n if (!headerOpen && headerEnd !== -1)\r\n {\r\n return { header: headerSource, shader: shaderSource.join('\\n'), offset: blockEnd };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a GLSL file, or array of GLSL files, to the current load queue.\r\n * In Phaser 3 GLSL files are just plain Text files at the current moment in time.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Shader Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Shader Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.glsl({\r\n * key: 'plasma',\r\n * shaderType: 'fragment',\r\n * url: 'shaders/Plasma.glsl'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * // and later in your game ...\r\n * var data = this.cache.shader.get('plasma');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and\r\n * this is what you would use to retrieve the text from the Shader Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"plasma\"\r\n * and no URL is given then the Loader will set the URL to be \"plasma.glsl\". It will always add `.glsl` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#glsl\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.glsl`, i.e. if `key` was \"alien\" then the URL will be \"alien.glsl\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new GLSLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new GLSLFile(this, key, url, shaderType, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = GLSLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/GLSLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ../GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class HTML5AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [urlConfig] - The absolute or relative URL to load this file from.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTML5AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTML5AudioFile (loader, key, urlConfig, audioConfig)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n audioConfig = GetFastValue(config, 'config', audioConfig);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n key: key,\r\n url: urlConfig.url,\r\n config: audioConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // New properties specific to this class\r\n this.locked = 'ontouchstart' in window;\r\n this.loaded = false;\r\n this.filesLoaded = 0;\r\n this.filesTotal = 0;\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onLoad\r\n * @since 3.0.0\r\n */\r\n onLoad: function ()\r\n {\r\n if (this.loaded)\r\n {\r\n return;\r\n }\r\n\r\n this.loaded = true;\r\n\r\n this.loader.nextFile(this, true);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onError\r\n * @since 3.0.0\r\n */\r\n onError: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n var audio = this.data[i];\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n }\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n */\r\n onProgress: function (event)\r\n {\r\n var audio = event.target;\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n\r\n this.filesLoaded++;\r\n\r\n this.percentComplete = Math.min((this.filesLoaded / this.filesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n\r\n if (this.filesLoaded === this.filesTotal)\r\n {\r\n this.onLoad();\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n this.data = [];\r\n\r\n var instances = (this.config && this.config.instances) || 1;\r\n\r\n this.filesTotal = instances;\r\n this.filesLoaded = 0;\r\n this.percentComplete = 0;\r\n\r\n for (var i = 0; i < instances; i++)\r\n {\r\n var audio = new Audio();\r\n audio.dataset = {};\r\n audio.dataset.name = this.key + ('0' + i).slice(-2);\r\n audio.dataset.used = 'false';\r\n\r\n if (this.locked)\r\n {\r\n audio.dataset.locked = 'true';\r\n }\r\n else\r\n {\r\n audio.dataset.locked = 'false';\r\n\r\n audio.preload = 'auto';\r\n audio.oncanplaythrough = this.onProgress.bind(this);\r\n audio.onerror = this.onError.bind(this);\r\n }\r\n\r\n this.data.push(audio);\r\n }\r\n\r\n for (i = 0; i < this.data.length; i++)\r\n {\r\n audio = this.data[i];\r\n audio.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (!this.locked)\r\n {\r\n audio.load();\r\n }\r\n }\r\n\r\n if (this.locked)\r\n {\r\n // This is super-dangerous but works. Race condition potential high.\r\n // Is there another way?\r\n setTimeout(this.onLoad.bind(this));\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html.\r\n *\r\n * @class HTMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.html,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML file, or array of HTML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.html('story', 'files/LoginForm.html');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the HTML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the HTML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.html({\r\n * key: 'login',\r\n * url: 'files/LoginForm.html'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.html('login', 'files/LoginForm.html');\r\n * // and later in your game ...\r\n * var data = this.cache.html.get('login');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the html from the HTML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#html\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('html', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture.\r\n *\r\n * @class HTMLTextureFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {integer} [width] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLTextureFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLTextureFile (loader, key, url, width, height, xhrSettings)\r\n {\r\n if (width === undefined) { width = 512; }\r\n if (height === undefined) { height = 512; }\r\n\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n width = GetFastValue(config, 'width', width);\r\n height = GetFastValue(config, 'height', height);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'html',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: width,\r\n height: height\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var w = this.config.width;\r\n var h = this.config.height;\r\n\r\n var data = [];\r\n\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n data.push(this.xhrLoader.responseText);\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n\r\n var svg = [ data.join('\\n') ];\r\n var _this = this;\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n _this.state = CONST.FILE_ERRORED;\r\n\r\n _this.onProcessComplete();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they\r\n * will be rendered to textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture({\r\n * key: 'instructions',\r\n * url: 'content/intro.html',\r\n * width: 256,\r\n * height: 512\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'instructions');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these\r\n * automatically, so you will need to provide them, either as arguments or in the file config object.\r\n * When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.\r\n * The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG,\r\n * and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered\r\n * HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are\r\n * limitations on what HTML can be inside an SVG. You can find out more details in this\r\n * [Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas).\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#htmlTexture\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {integer} [width=512] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height=512] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLTextureFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLTextureFile(this, key, url, width, height, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLTextureFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js?")},"./node_modules/phaser/src/loader/filetypes/ImageFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ImageFile.js?")},"./node_modules/phaser/src/loader/filetypes/JSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n if (IsPlainObject(url))\r\n {\r\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/JSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Multi Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas.\r\n *\r\n * @class MultiAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from.\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas json file.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture files.\r\n */\r\nvar MultiAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiAtlasFile (loader, key, atlasURL, path, baseURL, atlasXhrSettings, textureXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n atlasURL = GetFastValue(config, 'url');\r\n atlasXhrSettings = GetFastValue(config, 'xhrSettings');\r\n path = GetFastValue(config, 'path');\r\n baseURL = GetFastValue(config, 'baseURL');\r\n textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n }\r\n\r\n var data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'multiatlas', key, [ data ]);\r\n\r\n this.config.path = path;\r\n this.config.baseURL = baseURL;\r\n this.config.textureXhrSettings = textureXhrSettings;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'json' && file.data.hasOwnProperty('textures'))\r\n {\r\n // Inspect the data for the files to now load\r\n var textures = file.data.textures;\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n // \"image\": \"texture-packer-multi-atlas-0.png\",\r\n var textureURL = textures[i].image;\r\n\r\n var key = '_MA_' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n\r\n // \"normalMap\": \"texture-packer-multi-atlas-0_n.png\",\r\n if (textures[i].normalMap)\r\n {\r\n var normalMap = new ImageFile(loader, key, textures[i].normalMap, textureXhrSettings);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n image.setLink(normalMap);\r\n\r\n this.addToMultiFile(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var data = [];\r\n var images = [];\r\n var normalMaps = [];\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'normalMap')\r\n {\r\n continue;\r\n }\r\n\r\n var key = file.key.substr(4);\r\n var image = file.data;\r\n\r\n // Now we need to find out which json entry this mapped to\r\n for (var t = 0; t < fileJSON.data.textures.length; t++)\r\n {\r\n var item = fileJSON.data.textures[t];\r\n\r\n if (item.image === key)\r\n {\r\n images.push(image);\r\n \r\n data.push(item);\r\n\r\n if (file.linkFile)\r\n {\r\n normalMaps.push(file.linkFile.data);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (normalMaps.length === 0)\r\n {\r\n normalMaps = undefined;\r\n }\r\n\r\n this.loader.textureManager.addAtlasJSONArray(this.key, images, data, normalMaps);\r\n\r\n this.complete = true;\r\n\r\n for (i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,\r\n * version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.\r\n *\r\n * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and\r\n * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,\r\n * Phaser will load those as well.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas({\r\n * key: 'level1',\r\n * atlasURL: 'images/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'level1', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#multiatlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiAtlasFile(this, key, atlasURL, path, baseURL, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ScriptFile = __webpack_require__(/*! ./ScriptFile.js */ \"./node_modules/phaser/src/loader/filetypes/ScriptFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Multi Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts.\r\n *\r\n * @class MultiScriptFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar MultiScriptFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n var files = [];\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n if (!Array.isArray(url))\r\n {\r\n url = [ url ];\r\n }\r\n\r\n for (var i = 0; i < url.length; i++)\r\n {\r\n var scriptFile = new ScriptFile(loader, {\r\n key: key + '_' + i.toString(),\r\n url: url[i],\r\n extension: extension,\r\n xhrSettings: xhrSettings\r\n });\r\n\r\n // Override the default onProcess function\r\n scriptFile.onProcess = function ()\r\n {\r\n this.onProcessComplete();\r\n };\r\n\r\n files.push(scriptFile);\r\n }\r\n\r\n MultiFile.call(this, loader, 'scripts', key, files);\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiScriptFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n file.data = document.createElement('script');\r\n file.data.language = 'javascript';\r\n file.data.type = 'text/javascript';\r\n file.data.defer = false;\r\n file.data.text = file.xhrLoader.responseText;\r\n \r\n document.head.appendChild(file.data);\r\n }\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an array of Script files to the current load queue.\r\n * \r\n * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method,\r\n * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that\r\n * may have dependancies on each other without worrying about the async nature of traditional script loading.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scripts('PostProcess', [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact\r\n * order given in the array.\r\n *\r\n * The files are **not** loaded right away. They are added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the files are queued\r\n * it means you cannot use the files immediately after calling this method, but must wait for the files to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scripts({\r\n * key: 'PostProcess',\r\n * url: [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiScriptFileConfig` for more details.\r\n *\r\n * Once all the files have finished loading they will automatically be converted into a script element\r\n * via `document.createElement('script')`. They will have their language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. This is done in the exact order the files are specified in the url array.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scripts\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {string} [extension='js'] - The default file extension to use if no url is provided.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scripts', function (key, url, xhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiScriptFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiScriptFile(this, key, url, xhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/PackFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/loader/const.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON Pack File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack.\r\n *\r\n * @class PackFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar PackFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function PackFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'packfile\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PackFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n\r\n // Let\'s pass the pack file data over to the Loader ...\r\n this.loader.addPack(this.data, this.config);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON File Pack, or array of packs, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.pack(\'level1\', \'data/Level1Files.json\');\r\n * }\r\n * ```\r\n *\r\n * A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.\r\n * Here is a small example:\r\n *\r\n * ```json\r\n * { \r\n * "test1": {\r\n * "files": [\r\n * {\r\n * "type": "image",\r\n * "key": "taikodrummaster",\r\n * "url": "assets/pics/taikodrummaster.jpg"\r\n * },\r\n * {\r\n * "type": "image",\r\n * "key": "sukasuka-chtholly",\r\n * "url": "assets/pics/sukasuka-chtholly.png"\r\n * }\r\n * ]\r\n * },\r\n * "meta": {\r\n * "generated": "1401380327373",\r\n * "app": "Phaser 3 Asset Packer",\r\n * "url": "https://phaser.io",\r\n * "version": "1.0",\r\n * "copyright": "Photon Storm Ltd. 2018"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The pack can be split into sections. In the example above you\'ll see a section called `test1. You can tell\r\n * the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,\r\n * so you can pass it to the Loader to process additional sections as needed in your game, or you can just load\r\n * them all at once without specifying anything.\r\n *\r\n * The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly\r\n * match that of the file type configs, and all properties available within the file type configs can be used\r\n * in the pack file too.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.pack({\r\n * key: \'level1\',\r\n * url: \'data/Level1Files.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PackFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pack\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'pack\', function (key, url, packKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new PackFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PackFile(this, key, url, xhrSettings, packKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PackFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PackFile.js?')},"./node_modules/phaser/src/loader/filetypes/PluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin.\r\n *\r\n * @class PluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {boolean} [start=false] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar PluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function PluginFile (loader, key, url, start, mapping, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n start = GetFastValue(config, 'start');\r\n mapping = GetFastValue(config, 'mapping');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'plugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n start: start,\r\n mapping: mapping\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PluginFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var start = GetFastValue(config, 'start', false);\r\n var mapping = GetFastValue(config, 'mapping', null);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.install(this.key, this.data, start, mapping);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n var plugin = pluginManager.install(this.key, window[this.key], start, mapping);\r\n\r\n if (start || mapping)\r\n {\r\n // Install into the current Scene Systems and Scene\r\n this.loader.systems[mapping] = plugin;\r\n this.loader.scene[mapping] = plugin;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.plugin('modplayer', 'plugins/ModPlayer.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.plugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#plugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, a plugin function.\r\n * @param {boolean} [start] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new PluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PluginFile(this, key, url, start, mapping, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/SVGFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single SVG File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg.\r\n *\r\n * @class SVGFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SVGFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SVGFile (loader, key, url, svgConfig, xhrSettings)\r\n {\r\n var extension = 'svg';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n svgConfig = GetFastValue(config, 'svgConfig', {});\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'svg',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: GetFastValue(svgConfig, 'width'),\r\n height: GetFastValue(svgConfig, 'height'),\r\n scale: GetFastValue(svgConfig, 'scale')\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var text = this.xhrLoader.responseText;\r\n var svg = [ text ];\r\n var width = this.config.width;\r\n var height = this.config.height;\r\n var scale = this.config.scale;\r\n\r\n resize: if (width && height || scale)\r\n {\r\n var xml = null;\r\n var parser = new DOMParser();\r\n xml = parser.parseFromString(text, 'text/xml');\r\n var svgXML = xml.getElementsByTagName('svg')[0];\r\n\r\n var hasViewBox = svgXML.hasAttribute('viewBox');\r\n var svgWidth = parseFloat(svgXML.getAttribute('width'));\r\n var svgHeight = parseFloat(svgXML.getAttribute('height'));\r\n\r\n if (!hasViewBox && svgWidth && svgHeight)\r\n {\r\n // If there's no viewBox attribute, set one\r\n svgXML.setAttribute('viewBox', '0 0 ' + svgWidth + ' ' + svgHeight);\r\n }\r\n else if (hasViewBox && !svgWidth && !svgHeight)\r\n {\r\n // Get the w/h from the viewbox\r\n var viewBox = svgXML.getAttribute('viewBox').split(/\\s+|,/);\r\n\r\n svgWidth = viewBox[2];\r\n svgHeight = viewBox[3];\r\n }\r\n\r\n if (scale)\r\n {\r\n if (svgWidth && svgHeight)\r\n {\r\n width = svgWidth * scale;\r\n height = svgHeight * scale;\r\n }\r\n else\r\n {\r\n break resize;\r\n }\r\n }\r\n\r\n svgXML.setAttribute('width', width.toString() + 'px');\r\n svgXML.setAttribute('height', height.toString() + 'px');\r\n\r\n svg = [ (new XMLSerializer()).serializeToString(svgXML) ];\r\n }\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n var retry = false;\r\n\r\n this.data.onload = function ()\r\n {\r\n if (!retry)\r\n {\r\n File.revokeObjectURL(_this.data);\r\n }\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n // Safari 8 re-try\r\n if (!retry)\r\n {\r\n retry = true;\r\n\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.data.src = 'data:image/svg+xml,' + encodeURIComponent(svg.join(''));\r\n }\r\n else\r\n {\r\n _this.onProcessError();\r\n }\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they\r\n * will be rendered to bitmap textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'morty');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n * \r\n * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture\r\n * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down\r\n * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize\r\n * the SVG to:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * width: 300,\r\n * height: 600\r\n * }\r\n * });\r\n * ```\r\n * \r\n * Alternatively, you can just provide a scale factor instead:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * scale: 2.5\r\n * }\r\n * });\r\n * ```\r\n * \r\n * If scale, width and height values are all given, the scale has priority and the width and height values are ignored.\r\n *\r\n * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#svg\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SVGFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SVGFile(this, key, url, svgConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SVGFile;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SVGFile.js?")},"./node_modules/phaser/src/loader/filetypes/SceneFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An external Scene JavaScript File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile.\r\n *\r\n * @class SceneFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SceneFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SceneFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#onProcess\r\n * @since 3.16.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#addToCache\r\n * @since 3.16.0\r\n */\r\n addToCache: function ()\r\n {\r\n var code = this.data.concat('(function(){\\n' + 'return new ' + this.key + '();\\n' + '}).call(this);');\r\n\r\n this.loader.sceneManager.add(this.key, eval(code));\r\n\r\n this.complete = true;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an external Scene file, or array of Scene files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.\r\n * \r\n * For a Scene File it's vitally important that the key matches the class name in the JavaScript file.\r\n * \r\n * For example here is the source file:\r\n * \r\n * ```javascript\r\n * class ExternalScene extends Phaser.Scene {\r\n * \r\n * constructor ()\r\n * {\r\n * super('myScene');\r\n * }\r\n * \r\n * }\r\n * ```\r\n * \r\n * Because the class is called `ExternalScene` that is the exact same key you must use when loading it:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('ExternalScene', 'src/yourScene.js');\r\n * }\r\n * ```\r\n * \r\n * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene\r\n * constructor, as we've done in the example above, where the Scene key was changed to `myScene`.\r\n * \r\n * The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Scene Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.sceneFile({\r\n * key: 'Level1',\r\n * url: 'src/Level1.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SceneFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will be added to the Scene Manager.\r\n *\r\n * ```javascript\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * // and later in your game ...\r\n * this.scene.start('Level1');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `WORLD1.` and the key was `Story` the final key will be `WORLD1.Story` and\r\n * this is what you would use to retrieve the text from the Scene Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#sceneFile\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('sceneFile', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SceneFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SceneFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SceneFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SceneFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Scene Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin.\r\n *\r\n * @class ScenePluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScenePluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScenePluginFile (loader, key, url, systemKey, sceneKey, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n systemKey = GetFastValue(config, 'systemKey');\r\n sceneKey = GetFastValue(config, 'sceneKey');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'scenePlugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n systemKey: systemKey,\r\n sceneKey: sceneKey\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScenePluginFile#onProcess\r\n * @since 3.8.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var key = this.key;\r\n var systemKey = GetFastValue(config, 'systemKey', key);\r\n var sceneKey = GetFastValue(config, 'sceneKey', key);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.installScenePlugin(systemKey, this.data, sceneKey, this.loader.scene, true);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n pluginManager.installScenePlugin(systemKey, window[this.key], sceneKey, this.loader.scene, true);\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scenePlugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScenePluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scenePlugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.8.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, set to a plugin function.\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScenePluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScenePluginFile(this, key, url, systemKey, sceneKey, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScenePluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script.\r\n *\r\n * @class ScriptFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScriptFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScriptFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Script file, or array of Script files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.script('aliens', 'lib/aliens.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.script({\r\n * key: 'aliens',\r\n * url: 'lib/aliens.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScriptFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#script\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('script', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScriptFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScriptFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Sprite Sheet Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet.\r\n *\r\n * @class SpriteSheetFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SpriteSheetFile = new Class({\r\n\r\n Extends: ImageFile,\r\n\r\n initialize:\r\n\r\n function SpriteSheetFile (loader, key, url, frameConfig, xhrSettings)\r\n {\r\n ImageFile.call(this, loader, key, url, xhrSettings, frameConfig);\r\n\r\n this.type = 'spritesheet';\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpriteSheetFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addSpriteSheet(this.key, this.data, this.config);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.\r\n *\r\n * The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,\r\n * and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where\r\n * the frames are packed in a way where they take up the least amount of space, and are referenced by their names,\r\n * not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of\r\n * what sort of file you're actually trying to load.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'bot',\r\n * url: 'images/robot.png',\r\n * frameConfig: {\r\n * frameWidth: 32,\r\n * frameHeight: 38,\r\n * startFrame: 0,\r\n * endFrame: 8\r\n * }\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'bot', 0);\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png',\r\n * frameConfig: {\r\n * frameWidth: 256,\r\n * frameHeight: 80\r\n * }\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spritesheet\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SpriteSheetFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SpriteSheetFile(this, key, url, frameConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SpriteSheetFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js?")},"./node_modules/phaser/src/loader/filetypes/TextFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TextFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tilemap CSV File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV.\r\n *\r\n * @class TilemapCSVFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapCSVFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TilemapCSVFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'csv';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'tilemapCSV',\r\n cache: loader.cacheManager.tilemap,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n this.tilemapFormat = TILEMAP_FORMATS.CSV;\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: this.tilemapFormat, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSV Tilemap file, or array of CSV files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * }\r\n * ```\r\n *\r\n * Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV({\r\n * key: 'level1',\r\n * url: 'maps/Level1.csv'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.csv\". It will always add `.csv` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapCSV\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapCSV', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapCSVFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapCSVFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapCSVFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Impact.js Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact.\r\n *\r\n * @class TilemapImpactFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapImpactFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapImpactFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapImpactFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.WELTMEISTER, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Impact.js Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * Impact Tilemap data is created the Impact.js Map Editor called Weltmeister.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapImpact\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapImpact', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapImpactFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapImpactFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapImpactFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tiled Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON.\r\n *\r\n * @class TilemapJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapJSONFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.TILED_JSON, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapJSONFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar TextFile = __webpack_require__(/*! ./TextFile.js */ \"./node_modules/phaser/src/loader/filetypes/TextFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single text file based Unity Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas.\r\n *\r\n * @class UnityAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar UnityAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function UnityAtlasFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new TextFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'txt'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new TextFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.UnityAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var text = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addUnityAtlas(image.key, image.data, text.data, normalMap);\r\n\r\n text.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#unityAtlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new UnityAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new UnityAtlasFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = UnityAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/XMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar ParseXML = __webpack_require__(/*! ../../dom/ParseXML */ \"./node_modules/phaser/src/dom/ParseXML.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml.\r\n *\r\n * @class XMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar XMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function XMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'xml';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'xml',\r\n cache: loader.cacheManager.xml,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.XMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = ParseXML(this.xhrLoader.responseText);\r\n\r\n if (this.data)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n console.warn('Invalid XMLFile: ' + this.key);\r\n \r\n this.onProcessError();\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML file, or array of XML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the XML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the XML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.xml({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * // and later in your game ...\r\n * var data = this.cache.xml.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the XML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.xml\". It will always add `.xml` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#xml\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('xml', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new XMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new XMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = XMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/XMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AnimationJSONFile: __webpack_require__(/*! ./AnimationJSONFile */ "./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js"),\r\n AtlasJSONFile: __webpack_require__(/*! ./AtlasJSONFile */ "./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js"),\r\n AtlasXMLFile: __webpack_require__(/*! ./AtlasXMLFile */ "./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js"),\r\n AudioFile: __webpack_require__(/*! ./AudioFile */ "./node_modules/phaser/src/loader/filetypes/AudioFile.js"),\r\n AudioSpriteFile: __webpack_require__(/*! ./AudioSpriteFile */ "./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js"),\r\n BinaryFile: __webpack_require__(/*! ./BinaryFile */ "./node_modules/phaser/src/loader/filetypes/BinaryFile.js"),\r\n BitmapFontFile: __webpack_require__(/*! ./BitmapFontFile */ "./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js"),\r\n CSSFile: __webpack_require__(/*! ./CSSFile */ "./node_modules/phaser/src/loader/filetypes/CSSFile.js"),\r\n GLSLFile: __webpack_require__(/*! ./GLSLFile */ "./node_modules/phaser/src/loader/filetypes/GLSLFile.js"),\r\n HTML5AudioFile: __webpack_require__(/*! ./HTML5AudioFile */ "./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js"),\r\n HTMLFile: __webpack_require__(/*! ./HTMLFile */ "./node_modules/phaser/src/loader/filetypes/HTMLFile.js"),\r\n HTMLTextureFile: __webpack_require__(/*! ./HTMLTextureFile */ "./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js"),\r\n ImageFile: __webpack_require__(/*! ./ImageFile */ "./node_modules/phaser/src/loader/filetypes/ImageFile.js"),\r\n JSONFile: __webpack_require__(/*! ./JSONFile */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js"),\r\n MultiAtlasFile: __webpack_require__(/*! ./MultiAtlasFile */ "./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js"),\r\n MultiScriptFile: __webpack_require__(/*! ./MultiScriptFile */ "./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js"),\r\n PackFile: __webpack_require__(/*! ./PackFile */ "./node_modules/phaser/src/loader/filetypes/PackFile.js"),\r\n PluginFile: __webpack_require__(/*! ./PluginFile */ "./node_modules/phaser/src/loader/filetypes/PluginFile.js"),\r\n SceneFile: __webpack_require__(/*! ./SceneFile */ "./node_modules/phaser/src/loader/filetypes/SceneFile.js"),\r\n ScenePluginFile: __webpack_require__(/*! ./ScenePluginFile */ "./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js"),\r\n ScriptFile: __webpack_require__(/*! ./ScriptFile */ "./node_modules/phaser/src/loader/filetypes/ScriptFile.js"),\r\n SpriteSheetFile: __webpack_require__(/*! ./SpriteSheetFile */ "./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js"),\r\n SVGFile: __webpack_require__(/*! ./SVGFile */ "./node_modules/phaser/src/loader/filetypes/SVGFile.js"),\r\n TextFile: __webpack_require__(/*! ./TextFile */ "./node_modules/phaser/src/loader/filetypes/TextFile.js"),\r\n TilemapCSVFile: __webpack_require__(/*! ./TilemapCSVFile */ "./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js"),\r\n TilemapImpactFile: __webpack_require__(/*! ./TilemapImpactFile */ "./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js"),\r\n TilemapJSONFile: __webpack_require__(/*! ./TilemapJSONFile */ "./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js"),\r\n UnityAtlasFile: __webpack_require__(/*! ./UnityAtlasFile */ "./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js"),\r\n XMLFile: __webpack_require__(/*! ./XMLFile */ "./node_modules/phaser/src/loader/filetypes/XMLFile.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/index.js?')},"./node_modules/phaser/src/loader/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/loader/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Loader\r\n */\r\n\r\nvar Loader = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/loader/events/index.js"),\r\n\r\n FileTypes: __webpack_require__(/*! ./filetypes */ "./node_modules/phaser/src/loader/filetypes/index.js"),\r\n\r\n File: __webpack_require__(/*! ./File */ "./node_modules/phaser/src/loader/File.js"),\r\n FileTypesManager: __webpack_require__(/*! ./FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js"),\r\n GetURL: __webpack_require__(/*! ./GetURL */ "./node_modules/phaser/src/loader/GetURL.js"),\r\n LoaderPlugin: __webpack_require__(/*! ./LoaderPlugin */ "./node_modules/phaser/src/loader/LoaderPlugin.js"),\r\n MergeXHRSettings: __webpack_require__(/*! ./MergeXHRSettings */ "./node_modules/phaser/src/loader/MergeXHRSettings.js"),\r\n MultiFile: __webpack_require__(/*! ./MultiFile */ "./node_modules/phaser/src/loader/MultiFile.js"),\r\n XHRLoader: __webpack_require__(/*! ./XHRLoader */ "./node_modules/phaser/src/loader/XHRLoader.js"),\r\n XHRSettings: __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nLoader = Extend(false, Loader, CONST);\r\n\r\nmodule.exports = Loader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/index.js?')},"./node_modules/phaser/src/math/Average.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Average.js?")},"./node_modules/phaser/src/math/Bernstein.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - [description]\r\n * @param {number} i - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Bernstein.js?')},"./node_modules/phaser/src/math/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Between.js?")},"./node_modules/phaser/src/math/CatmullRom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - [description]\r\n * @param {number} p0 - [description]\r\n * @param {number} p1 - [description]\r\n * @param {number} p2 - [description]\r\n * @param {number} p3 - [description]\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CatmullRom.js?")},"./node_modules/phaser/src/math/CeilTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CeilTo.js?")},"./node_modules/phaser/src/math/Clamp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Clamp.js?")},"./node_modules/phaser/src/math/DegToRad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/DegToRad.js?')},"./node_modules/phaser/src/math/Difference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Difference.js?")},"./node_modules/phaser/src/math/Factorial.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Factorial.js?")},"./node_modules/phaser/src/math/FloatBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloatBetween.js?")},"./node_modules/phaser/src/math/FloorTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloorTo.js?")},"./node_modules/phaser/src/math/FromPercent.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FromPercent.js?')},"./node_modules/phaser/src/math/GetSpeed.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the speed required to cover a distance in the time given.\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance to travel in pixels.\r\n * @param {integer} time - The time, in ms, to cover the distance in.\r\n *\r\n * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given.\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/GetSpeed.js?")},"./node_modules/phaser/src/math/IsEven.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for "is number" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEven.js?')},"./node_modules/phaser/src/math/IsEvenStrict.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for "is number" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEvenStrict.js?')},"./node_modules/phaser/src/math/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Linear.js?")},"./node_modules/phaser/src/math/Matrix3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - [description]\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix3.js?')},"./node_modules/phaser/src/math/Matrix4.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - [description]\r\n * @param {number} pitch - [description]\r\n * @param {number} roll - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix4.js?')},"./node_modules/phaser/src/math/MaxAdd.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MaxAdd.js?")},"./node_modules/phaser/src/math/MinSub.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MinSub.js?")},"./node_modules/phaser/src/math/Percent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Percent.js?")},"./node_modules/phaser/src/math/Quaternion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix3 = __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared \'private\' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - [description]\r\n * @param {Phaser.Math.Vector3} b - [description]\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // "from" and "to" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake\'s article in 1987 SIGGRAPH course notes\r\n // article "Quaternion Calculus and Fast Animation".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn\'t quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Quaternion.js?')},"./node_modules/phaser/src/math/RadToDeg.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RadToDeg.js?')},"./node_modules/phaser/src/math/RandomXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXY.js?")},"./node_modules/phaser/src/math/RandomXYZ.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZ.js?")},"./node_modules/phaser/src/math/RandomXYZW.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZW.js?")},"./node_modules/phaser/src/math/Rotate.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Rotate.js?")},"./node_modules/phaser/src/math/RotateAround.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle`.\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAround.js?")},"./node_modules/phaser/src/math/RotateAroundDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Geom.Point} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAroundDistance.js?")},"./node_modules/phaser/src/math/RotateVec3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = __webpack_require__(/*! ../math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix4 = __webpack_require__(/*! ../math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar Quaternion = __webpack_require__(/*! ../math/Quaternion */ "./node_modules/phaser/src/math/Quaternion.js");\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateVec3.js?')},"./node_modules/phaser/src/math/RoundAwayFromZero.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // "Opposite" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundAwayFromZero.js?')},"./node_modules/phaser/src/math/RoundTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundTo.js?")},"./node_modules/phaser/src/math/SinCosTableGenerator.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SinCosTableGenerator.js?")},"./node_modules/phaser/src/math/SmoothStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmoothStep.js?")},"./node_modules/phaser/src/math/SmootherStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmootherStep.js?")},"./node_modules/phaser/src/math/ToXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vec2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/ToXY.js?')},"./node_modules/phaser/src/math/TransformXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/TransformXY.js?')},"./node_modules/phaser/src/math/Vector2.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Right-hand normalize (make unit length) this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector2.js?")},"./node_modules/phaser/src/math/Vector3.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector3.js?")},"./node_modules/phaser/src/math/Vector4.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector4.js?")},"./node_modules/phaser/src/math/Within.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Within.js?")},"./node_modules/phaser/src/math/Wrap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Wrap.js?")},"./node_modules/phaser/src/math/angle/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Between.js?")},"./node_modules/phaser/src/math/angle/BetweenPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPoints.js?")},"./node_modules/phaser/src/math/angle/BetweenPointsY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPointsY.js?")},"./node_modules/phaser/src/math/angle/BetweenY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenY.js?")},"./node_modules/phaser/src/math/angle/CounterClockwise.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/CounterClockwise.js?')},"./node_modules/phaser/src/math/angle/Normalize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Normalize.js?")},"./node_modules/phaser/src/math/angle/Reverse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js");\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Reverse.js?')},"./node_modules/phaser/src/math/angle/RotateTo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/RotateTo.js?')},"./node_modules/phaser/src/math/angle/ShortestBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/ShortestBetween.js?")},"./node_modules/phaser/src/math/angle/Wrap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Wrap.js?')},"./node_modules/phaser/src/math/angle/WrapDegrees.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/WrapDegrees.js?')},"./node_modules/phaser/src/math/angle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/angle/Between.js"),\r\n BetweenPoints: __webpack_require__(/*! ./BetweenPoints */ "./node_modules/phaser/src/math/angle/BetweenPoints.js"),\r\n BetweenPointsY: __webpack_require__(/*! ./BetweenPointsY */ "./node_modules/phaser/src/math/angle/BetweenPointsY.js"),\r\n BetweenY: __webpack_require__(/*! ./BetweenY */ "./node_modules/phaser/src/math/angle/BetweenY.js"),\r\n CounterClockwise: __webpack_require__(/*! ./CounterClockwise */ "./node_modules/phaser/src/math/angle/CounterClockwise.js"),\r\n Normalize: __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/math/angle/Reverse.js"),\r\n RotateTo: __webpack_require__(/*! ./RotateTo */ "./node_modules/phaser/src/math/angle/RotateTo.js"),\r\n ShortestBetween: __webpack_require__(/*! ./ShortestBetween */ "./node_modules/phaser/src/math/angle/ShortestBetween.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js"),\r\n WrapDegrees: __webpack_require__(/*! ./WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/index.js?')},"./node_modules/phaser/src/math/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/const.js?")},"./node_modules/phaser/src/math/distance/DistanceBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceBetween.js?")},"./node_modules/phaser/src/math/distance/DistancePower.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistancePower.js?")},"./node_modules/phaser/src/math/distance/DistanceSquared.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceSquared.js?")},"./node_modules/phaser/src/math/distance/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js"),\r\n Power: __webpack_require__(/*! ./DistancePower */ "./node_modules/phaser/src/math/distance/DistancePower.js"),\r\n Squared: __webpack_require__(/*! ./DistanceSquared */ "./node_modules/phaser/src/math/distance/DistanceSquared.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/index.js?')},"./node_modules/phaser/src/math/easing/EaseMap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Back = __webpack_require__(/*! ./back */ \"./node_modules/phaser/src/math/easing/back/index.js\");\r\nvar Bounce = __webpack_require__(/*! ./bounce */ \"./node_modules/phaser/src/math/easing/bounce/index.js\");\r\nvar Circular = __webpack_require__(/*! ./circular */ \"./node_modules/phaser/src/math/easing/circular/index.js\");\r\nvar Cubic = __webpack_require__(/*! ./cubic */ \"./node_modules/phaser/src/math/easing/cubic/index.js\");\r\nvar Elastic = __webpack_require__(/*! ./elastic */ \"./node_modules/phaser/src/math/easing/elastic/index.js\");\r\nvar Expo = __webpack_require__(/*! ./expo */ \"./node_modules/phaser/src/math/easing/expo/index.js\");\r\nvar Linear = __webpack_require__(/*! ./linear */ \"./node_modules/phaser/src/math/easing/linear/index.js\");\r\nvar Quadratic = __webpack_require__(/*! ./quadratic */ \"./node_modules/phaser/src/math/easing/quadratic/index.js\");\r\nvar Quartic = __webpack_require__(/*! ./quartic */ \"./node_modules/phaser/src/math/easing/quartic/index.js\");\r\nvar Quintic = __webpack_require__(/*! ./quintic */ \"./node_modules/phaser/src/math/easing/quintic/index.js\");\r\nvar Sine = __webpack_require__(/*! ./sine */ \"./node_modules/phaser/src/math/easing/sine/index.js\");\r\nvar Stepped = __webpack_require__(/*! ./stepped */ \"./node_modules/phaser/src/math/easing/stepped/index.js\");\r\n\r\n// EaseMap\r\nmodule.exports = {\r\n\r\n Power0: Linear,\r\n Power1: Quadratic.Out,\r\n Power2: Cubic.Out,\r\n Power3: Quartic.Out,\r\n Power4: Quintic.Out,\r\n\r\n Linear: Linear,\r\n Quad: Quadratic.Out,\r\n Cubic: Cubic.Out,\r\n Quart: Quartic.Out,\r\n Quint: Quintic.Out,\r\n Sine: Sine.Out,\r\n Expo: Expo.Out,\r\n Circ: Circular.Out,\r\n Elastic: Elastic.Out,\r\n Back: Back.Out,\r\n Bounce: Bounce.Out,\r\n Stepped: Stepped,\r\n\r\n 'Quad.easeIn': Quadratic.In,\r\n 'Cubic.easeIn': Cubic.In,\r\n 'Quart.easeIn': Quartic.In,\r\n 'Quint.easeIn': Quintic.In,\r\n 'Sine.easeIn': Sine.In,\r\n 'Expo.easeIn': Expo.In,\r\n 'Circ.easeIn': Circular.In,\r\n 'Elastic.easeIn': Elastic.In,\r\n 'Back.easeIn': Back.In,\r\n 'Bounce.easeIn': Bounce.In,\r\n\r\n 'Quad.easeOut': Quadratic.Out,\r\n 'Cubic.easeOut': Cubic.Out,\r\n 'Quart.easeOut': Quartic.Out,\r\n 'Quint.easeOut': Quintic.Out,\r\n 'Sine.easeOut': Sine.Out,\r\n 'Expo.easeOut': Expo.Out,\r\n 'Circ.easeOut': Circular.Out,\r\n 'Elastic.easeOut': Elastic.Out,\r\n 'Back.easeOut': Back.Out,\r\n 'Bounce.easeOut': Bounce.Out,\r\n\r\n 'Quad.easeInOut': Quadratic.InOut,\r\n 'Cubic.easeInOut': Cubic.InOut,\r\n 'Quart.easeInOut': Quartic.InOut,\r\n 'Quint.easeInOut': Quintic.InOut,\r\n 'Sine.easeInOut': Sine.InOut,\r\n 'Expo.easeInOut': Expo.InOut,\r\n 'Circ.easeInOut': Circular.InOut,\r\n 'Elastic.easeInOut': Elastic.InOut,\r\n 'Back.easeInOut': Back.InOut,\r\n 'Bounce.easeInOut': Bounce.InOut\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/EaseMap.js?")},"./node_modules/phaser/src/math/easing/back/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/In.js?")},"./node_modules/phaser/src/math/easing/back/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/InOut.js?")},"./node_modules/phaser/src/math/easing/back/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/Out.js?")},"./node_modules/phaser/src/math/easing/back/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/back/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/back/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/back/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/index.js?')},"./node_modules/phaser/src/math/easing/bounce/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/In.js?")},"./node_modules/phaser/src/math/easing/bounce/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/InOut.js?")},"./node_modules/phaser/src/math/easing/bounce/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/Out.js?")},"./node_modules/phaser/src/math/easing/bounce/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/bounce/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/bounce/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/bounce/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/index.js?')},"./node_modules/phaser/src/math/easing/circular/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/In.js?")},"./node_modules/phaser/src/math/easing/circular/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/InOut.js?")},"./node_modules/phaser/src/math/easing/circular/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/Out.js?")},"./node_modules/phaser/src/math/easing/circular/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/circular/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/circular/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/circular/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/index.js?')},"./node_modules/phaser/src/math/easing/cubic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/In.js?")},"./node_modules/phaser/src/math/easing/cubic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/InOut.js?")},"./node_modules/phaser/src/math/easing/cubic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/Out.js?")},"./node_modules/phaser/src/math/easing/cubic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/cubic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/cubic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/cubic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/index.js?')},"./node_modules/phaser/src/math/easing/elastic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/In.js?")},"./node_modules/phaser/src/math/easing/elastic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/InOut.js?")},"./node_modules/phaser/src/math/easing/elastic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/Out.js?")},"./node_modules/phaser/src/math/easing/elastic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/elastic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/elastic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/elastic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/index.js?')},"./node_modules/phaser/src/math/easing/expo/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/In.js?")},"./node_modules/phaser/src/math/easing/expo/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/InOut.js?")},"./node_modules/phaser/src/math/easing/expo/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/Out.js?")},"./node_modules/phaser/src/math/easing/expo/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/expo/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/expo/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/expo/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/index.js?')},"./node_modules/phaser/src/math/easing/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: __webpack_require__(/*! ./back */ "./node_modules/phaser/src/math/easing/back/index.js"),\r\n Bounce: __webpack_require__(/*! ./bounce */ "./node_modules/phaser/src/math/easing/bounce/index.js"),\r\n Circular: __webpack_require__(/*! ./circular */ "./node_modules/phaser/src/math/easing/circular/index.js"),\r\n Cubic: __webpack_require__(/*! ./cubic */ "./node_modules/phaser/src/math/easing/cubic/index.js"),\r\n Elastic: __webpack_require__(/*! ./elastic */ "./node_modules/phaser/src/math/easing/elastic/index.js"),\r\n Expo: __webpack_require__(/*! ./expo */ "./node_modules/phaser/src/math/easing/expo/index.js"),\r\n Linear: __webpack_require__(/*! ./linear */ "./node_modules/phaser/src/math/easing/linear/index.js"),\r\n Quadratic: __webpack_require__(/*! ./quadratic */ "./node_modules/phaser/src/math/easing/quadratic/index.js"),\r\n Quartic: __webpack_require__(/*! ./quartic */ "./node_modules/phaser/src/math/easing/quartic/index.js"),\r\n Quintic: __webpack_require__(/*! ./quintic */ "./node_modules/phaser/src/math/easing/quintic/index.js"),\r\n Sine: __webpack_require__(/*! ./sine */ "./node_modules/phaser/src/math/easing/sine/index.js"),\r\n Stepped: __webpack_require__(/*! ./stepped */ "./node_modules/phaser/src/math/easing/stepped/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/index.js?')},"./node_modules/phaser/src/math/easing/linear/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/Linear.js?")},"./node_modules/phaser/src/math/easing/linear/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Linear\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/easing/linear/Linear.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/index.js?')},"./node_modules/phaser/src/math/easing/quadratic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/In.js?")},"./node_modules/phaser/src/math/easing/quadratic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/InOut.js?")},"./node_modules/phaser/src/math/easing/quadratic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/Out.js?")},"./node_modules/phaser/src/math/easing/quadratic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quadratic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quadratic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quadratic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/index.js?')},"./node_modules/phaser/src/math/easing/quartic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/In.js?")},"./node_modules/phaser/src/math/easing/quartic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/InOut.js?")},"./node_modules/phaser/src/math/easing/quartic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/Out.js?")},"./node_modules/phaser/src/math/easing/quartic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quartic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quartic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quartic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/index.js?')},"./node_modules/phaser/src/math/easing/quintic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/In.js?")},"./node_modules/phaser/src/math/easing/quintic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/InOut.js?")},"./node_modules/phaser/src/math/easing/quintic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/Out.js?")},"./node_modules/phaser/src/math/easing/quintic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quintic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quintic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quintic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/index.js?')},"./node_modules/phaser/src/math/easing/sine/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/In.js?")},"./node_modules/phaser/src/math/easing/sine/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/InOut.js?")},"./node_modules/phaser/src/math/easing/sine/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/Out.js?")},"./node_modules/phaser/src/math/easing/sine/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/sine/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/sine/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/sine/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/index.js?')},"./node_modules/phaser/src/math/easing/stepped/Stepped.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/Stepped.js?")},"./node_modules/phaser/src/math/easing/stepped/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Stepped */ "./node_modules/phaser/src/math/easing/stepped/Stepped.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/index.js?')},"./node_modules/phaser/src/math/fuzzy/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Ceil.js?")},"./node_modules/phaser/src/math/fuzzy/Equal.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Equal.js?")},"./node_modules/phaser/src/math/fuzzy/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Floor.js?")},"./node_modules/phaser/src/math/fuzzy/GreaterThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/GreaterThan.js?")},"./node_modules/phaser/src/math/fuzzy/LessThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/LessThan.js?")},"./node_modules/phaser/src/math/fuzzy/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/math/fuzzy/Ceil.js"),\r\n Equal: __webpack_require__(/*! ./Equal */ "./node_modules/phaser/src/math/fuzzy/Equal.js"),\r\n Floor: __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/math/fuzzy/Floor.js"),\r\n GreaterThan: __webpack_require__(/*! ./GreaterThan */ "./node_modules/phaser/src/math/fuzzy/GreaterThan.js"),\r\n LessThan: __webpack_require__(/*! ./LessThan */ "./node_modules/phaser/src/math/fuzzy/LessThan.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/index.js?')},"./node_modules/phaser/src/math/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: __webpack_require__(/*! ./angle/ */ "./node_modules/phaser/src/math/angle/index.js"),\r\n Distance: __webpack_require__(/*! ./distance/ */ "./node_modules/phaser/src/math/distance/index.js"),\r\n Easing: __webpack_require__(/*! ./easing/ */ "./node_modules/phaser/src/math/easing/index.js"),\r\n Fuzzy: __webpack_require__(/*! ./fuzzy/ */ "./node_modules/phaser/src/math/fuzzy/index.js"),\r\n Interpolation: __webpack_require__(/*! ./interpolation/ */ "./node_modules/phaser/src/math/interpolation/index.js"),\r\n Pow2: __webpack_require__(/*! ./pow2/ */ "./node_modules/phaser/src/math/pow2/index.js"),\r\n Snap: __webpack_require__(/*! ./snap/ */ "./node_modules/phaser/src/math/snap/index.js"),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: __webpack_require__(/*! ./random-data-generator/RandomDataGenerator */ "./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js"),\r\n\r\n // Single functions\r\n Average: __webpack_require__(/*! ./Average */ "./node_modules/phaser/src/math/Average.js"),\r\n Bernstein: __webpack_require__(/*! ./Bernstein */ "./node_modules/phaser/src/math/Bernstein.js"),\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/Between.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js"),\r\n CeilTo: __webpack_require__(/*! ./CeilTo */ "./node_modules/phaser/src/math/CeilTo.js"),\r\n Clamp: __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js"),\r\n DegToRad: __webpack_require__(/*! ./DegToRad */ "./node_modules/phaser/src/math/DegToRad.js"),\r\n Difference: __webpack_require__(/*! ./Difference */ "./node_modules/phaser/src/math/Difference.js"),\r\n Factorial: __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js"),\r\n FloatBetween: __webpack_require__(/*! ./FloatBetween */ "./node_modules/phaser/src/math/FloatBetween.js"),\r\n FloorTo: __webpack_require__(/*! ./FloorTo */ "./node_modules/phaser/src/math/FloorTo.js"),\r\n FromPercent: __webpack_require__(/*! ./FromPercent */ "./node_modules/phaser/src/math/FromPercent.js"),\r\n GetSpeed: __webpack_require__(/*! ./GetSpeed */ "./node_modules/phaser/src/math/GetSpeed.js"),\r\n IsEven: __webpack_require__(/*! ./IsEven */ "./node_modules/phaser/src/math/IsEven.js"),\r\n IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "./node_modules/phaser/src/math/IsEvenStrict.js"),\r\n Linear: __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/Linear.js"),\r\n MaxAdd: __webpack_require__(/*! ./MaxAdd */ "./node_modules/phaser/src/math/MaxAdd.js"),\r\n MinSub: __webpack_require__(/*! ./MinSub */ "./node_modules/phaser/src/math/MinSub.js"),\r\n Percent: __webpack_require__(/*! ./Percent */ "./node_modules/phaser/src/math/Percent.js"),\r\n RadToDeg: __webpack_require__(/*! ./RadToDeg */ "./node_modules/phaser/src/math/RadToDeg.js"),\r\n RandomXY: __webpack_require__(/*! ./RandomXY */ "./node_modules/phaser/src/math/RandomXY.js"),\r\n RandomXYZ: __webpack_require__(/*! ./RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js"),\r\n RandomXYZW: __webpack_require__(/*! ./RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/math/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/math/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js"),\r\n RoundAwayFromZero: __webpack_require__(/*! ./RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js"),\r\n RoundTo: __webpack_require__(/*! ./RoundTo */ "./node_modules/phaser/src/math/RoundTo.js"),\r\n SinCosTableGenerator: __webpack_require__(/*! ./SinCosTableGenerator */ "./node_modules/phaser/src/math/SinCosTableGenerator.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js"),\r\n ToXY: __webpack_require__(/*! ./ToXY */ "./node_modules/phaser/src/math/ToXY.js"),\r\n TransformXY: __webpack_require__(/*! ./TransformXY */ "./node_modules/phaser/src/math/TransformXY.js"),\r\n Within: __webpack_require__(/*! ./Within */ "./node_modules/phaser/src/math/Within.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/Wrap.js"),\r\n\r\n // Vector classes\r\n Vector2: __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js"),\r\n Vector3: __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js"),\r\n Vector4: __webpack_require__(/*! ./Vector4 */ "./node_modules/phaser/src/math/Vector4.js"),\r\n Matrix3: __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js"),\r\n Matrix4: __webpack_require__(/*! ./Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js"),\r\n Quaternion: __webpack_require__(/*! ./Quaternion */ "./node_modules/phaser/src/math/Quaternion.js"),\r\n RotateVec3: __webpack_require__(/*! ./RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/index.js?')},"./node_modules/phaser/src/math/interpolation/BezierInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = __webpack_require__(/*! ../Bernstein */ "./node_modules/phaser/src/math/Bernstein.js");\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/BezierInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/LinearInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/LinearInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = __webpack_require__(/*! ../SmoothStep */ \"./node_modules/phaser/src/math/SmoothStep.js\");\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = __webpack_require__(/*! ../SmootherStep */ \"./node_modules/phaser/src/math/SmootherStep.js\");\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: __webpack_require__(/*! ./BezierInterpolation */ "./node_modules/phaser/src/math/interpolation/BezierInterpolation.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRomInterpolation */ "./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js"),\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js"),\r\n Linear: __webpack_require__(/*! ./LinearInterpolation */ "./node_modules/phaser/src/math/interpolation/LinearInterpolation.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/index.js?')},"./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetPowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSizePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValuePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: __webpack_require__(/*! ./GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js"),\r\n IsSize: __webpack_require__(/*! ./IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js"),\r\n IsValue: __webpack_require__(/*! ./IsValuePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/index.js?')},"./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @param {array} [array] - The array to be shuffled.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js?")},"./node_modules/phaser/src/math/snap/SnapCeil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapCeil.js?")},"./node_modules/phaser/src/math/snap/SnapFloor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapFloor.js?")},"./node_modules/phaser/src/math/snap/SnapTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapTo.js?")},"./node_modules/phaser/src/math/snap/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js"),\r\n Floor: __webpack_require__(/*! ./SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js"),\r\n To: __webpack_require__(/*! ./SnapTo */ "./node_modules/phaser/src/math/snap/SnapTo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/index.js?')},"./node_modules/phaser/src/phaser.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n__webpack_require__(/*! ./polyfills */ "./node_modules/phaser/src/polyfills/index.js");\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/const.js");\r\nvar Extend = __webpack_require__(/*! ./utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser\r\n */\r\n\r\nvar Phaser = {\r\n\r\n Actions: __webpack_require__(/*! ./actions */ "./node_modules/phaser/src/actions/index.js"),\r\n Animations: __webpack_require__(/*! ./animations */ "./node_modules/phaser/src/animations/index.js"),\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js"),\r\n Cache: __webpack_require__(/*! ./cache */ "./node_modules/phaser/src/cache/index.js"),\r\n Cameras: __webpack_require__(/*! ./cameras */ "./node_modules/phaser/src/cameras/index.js"),\r\n Core: __webpack_require__(/*! ./core */ "./node_modules/phaser/src/core/index.js"),\r\n Class: __webpack_require__(/*! ./utils/Class */ "./node_modules/phaser/src/utils/Class.js"),\r\n Create: __webpack_require__(/*! ./create */ "./node_modules/phaser/src/create/index.js"),\r\n Curves: __webpack_require__(/*! ./curves */ "./node_modules/phaser/src/curves/index.js"),\r\n Data: __webpack_require__(/*! ./data */ "./node_modules/phaser/src/data/index.js"),\r\n Display: __webpack_require__(/*! ./display */ "./node_modules/phaser/src/display/index.js"),\r\n DOM: __webpack_require__(/*! ./dom */ "./node_modules/phaser/src/dom/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/events/index.js"),\r\n Game: __webpack_require__(/*! ./core/Game */ "./node_modules/phaser/src/core/Game.js"),\r\n GameObjects: __webpack_require__(/*! ./gameobjects */ "./node_modules/phaser/src/gameobjects/index.js"),\r\n Geom: __webpack_require__(/*! ./geom */ "./node_modules/phaser/src/geom/index.js"),\r\n Input: __webpack_require__(/*! ./input */ "./node_modules/phaser/src/input/index.js"),\r\n Loader: __webpack_require__(/*! ./loader */ "./node_modules/phaser/src/loader/index.js"),\r\n Math: __webpack_require__(/*! ./math */ "./node_modules/phaser/src/math/index.js"),\r\n Physics: __webpack_require__(/*! ./physics */ "./node_modules/phaser/src/physics/index.js"),\r\n Plugins: __webpack_require__(/*! ./plugins */ "./node_modules/phaser/src/plugins/index.js"),\r\n Renderer: __webpack_require__(/*! ./renderer */ "./node_modules/phaser/src/renderer/index.js"),\r\n Scale: __webpack_require__(/*! ./scale */ "./node_modules/phaser/src/scale/index.js"),\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js"),\r\n Scene: __webpack_require__(/*! ./scene/Scene */ "./node_modules/phaser/src/scene/Scene.js"),\r\n Scenes: __webpack_require__(/*! ./scene */ "./node_modules/phaser/src/scene/index.js"),\r\n Structs: __webpack_require__(/*! ./structs */ "./node_modules/phaser/src/structs/index.js"),\r\n Textures: __webpack_require__(/*! ./textures */ "./node_modules/phaser/src/textures/index.js"),\r\n Tilemaps: __webpack_require__(/*! ./tilemaps */ "./node_modules/phaser/src/tilemaps/index.js"),\r\n Time: __webpack_require__(/*! ./time */ "./node_modules/phaser/src/time/index.js"),\r\n Tweens: __webpack_require__(/*! ./tweens */ "./node_modules/phaser/src/tweens/index.js"),\r\n Utils: __webpack_require__(/*! ./utils */ "./node_modules/phaser/src/utils/index.js")\r\n\r\n};\r\n\r\n// Merge in the optional plugins\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n Phaser.Sound = __webpack_require__(/*! ./sound */ "./node_modules/phaser/src/sound/index.js");\r\n}\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n Phaser.Cameras.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src */ "./node_modules/phaser/plugins/camera3d/src/index.js");\r\n Phaser.GameObjects.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n Phaser.GameObjects.Factories.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DFactory */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js");\r\n Phaser.GameObjects.Creators.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DCreator */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n Phaser.FacebookInstantGamesPlugin = __webpack_require__(/*! ../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n// Merge in the consts\r\n\r\nPhaser = Extend(false, Phaser, CONST);\r\n\r\n/**\r\n * The root types namespace.\r\n * \r\n * @namespace Phaser.Types\r\n * @since 3.17.0\r\n */\r\n\r\n// Export it\r\n\r\nmodule.exports = Phaser;\r\n\r\nglobal.Phaser = Phaser;\r\n\r\n/*\r\n * "Documentation is like pizza: when it is good, it is very, very good;\r\n * and when it is bad, it is better than nothing."\r\n * -- Dick Brandon\r\n */\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/phaser.js?')},"./node_modules/phaser/src/physics/arcade/ArcadeImage.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\n\n/**\n * @classdesc\n * An Arcade Physics Image is an Image with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Image and an Arcade Sprite is that you cannot animate an Arcade Image.\n *\n * @class Image\n * @extends Phaser.GameObjects.Image\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeImage = new Class({\n\n Extends: Image,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeImage (scene, x, y, texture, frame)\n {\n Image.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Image#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeImage;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeImage.js?')},"./node_modules/phaser/src/physics/arcade/ArcadePhysics.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\nvar DistanceSquared = __webpack_require__(/*! ../../math/distance/DistanceSquared */ \"./node_modules/phaser/src/math/distance/DistanceSquared.js\");\nvar Factory = __webpack_require__(/*! ./Factory */ \"./node_modules/phaser/src/physics/arcade/Factory.js\");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\nvar OverlapRect = __webpack_require__(/*! ./components/OverlapRect */ \"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js\");\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\nvar World = __webpack_require__(/*! ./World */ \"./node_modules/phaser/src/physics/arcade/World.js\");\n\n/**\n * @classdesc\n * The Arcade Physics Plugin belongs to a Scene and sets up and manages the Scene's physics simulation.\n * It also holds some useful methods for moving and rotating Arcade Physics Bodies.\n *\n * You can access it from within a Scene using `this.physics`.\n * \n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @class ArcadePhysics\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene that this Plugin belongs to.\n */\nvar ArcadePhysics = new Class({\n\n initialize:\n\n function ArcadePhysics (scene)\n {\n /**\n * The Scene that this Plugin belongs to.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * The Scene's Systems.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#systems\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#config\n * @type {object}\n * @since 3.0.0\n */\n this.config = this.getConfig();\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world;\n\n /**\n * An object holding the Arcade Physics factory methods.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#add\n * @type {Phaser.Physics.Arcade.Factory}\n * @since 3.0.0\n */\n this.add;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n scene.sys.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n if (!this.world)\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Creates the physics configuration for the current Scene.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig\n * @since 3.0.0\n *\n * @return {object} The physics configuration.\n */\n getConfig: function ()\n {\n var gameConfig = this.systems.game.config.physics;\n var sceneConfig = this.systems.settings.physics;\n\n var config = Merge(\n GetFastValue(sceneConfig, 'arcade', {}),\n GetFastValue(gameConfig, 'arcade', {})\n );\n\n return config;\n },\n\n /**\n * Tests if Game Objects overlap. See {@link Phaser.Physics.Arcade.World#overlap}\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlap\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if at least one Game Object overlaps another.\n *\n * @see Phaser.Physics.Arcade.World#overlap\n */\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\n {\n if (overlapCallback === undefined) { overlapCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\n\n return this.world.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\n },\n\n /**\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\n *\n * If you don't require separation then use {@link #overlap} instead.\n *\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\n *\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\n * \n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\n *\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\n * objects are passed to it.\n *\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collide\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any overlapping Game Objects were separated, otherwise false.\n *\n * @see Phaser.Physics.Arcade.World#collide\n */\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n if (collideCallback === undefined) { collideCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = collideCallback; }\n\n return this.world.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\n },\n\n /**\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n * \n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\n * dynamic maps, this method can prove very useful.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collideTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.collideTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.overlapTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Pauses the simulation.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#pause\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n pause: function ()\n {\n return this.world.pause();\n },\n\n /**\n * Resumes the simulation (if paused).\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#resume\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n resume: function ()\n {\n return this.world.resume();\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to accelerate towards.\n * @param {number} y - The y coordinate to accelerate towards.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateTo: function (gameObject, x, y, speed, xSpeedMax, ySpeedMax)\n {\n if (speed === undefined) { speed = 60; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n gameObject.body.acceleration.setToPolar(angle, speed);\n\n if (xSpeedMax !== undefined && ySpeedMax !== undefined)\n {\n gameObject.body.maxVelocity.set(xSpeedMax, ySpeedMax);\n }\n\n return angle;\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {Phaser.GameObjects.GameObject} destination - The Game Object to move towards. Can be any object but must have visible x/y properties.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateToObject: function (gameObject, destination, speed, xSpeedMax, ySpeedMax)\n {\n return this.accelerateTo(gameObject, destination.x, destination.y, speed, xSpeedMax, ySpeedMax);\n },\n\n /**\n * Finds the Dynamic Body closest to a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#closest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The closest Dynamic Body to the given source point.\n */\n closest: function (source)\n {\n var bodies = this.world.bodies;\n\n var min = Number.MAX_VALUE;\n var closest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance < min)\n {\n closest = target;\n min = distance;\n }\n\n });\n\n return closest;\n },\n\n /**\n * Finds the Dynamic Body farthest from a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#furthest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The Dynamic Body furthest away from the given source point.\n */\n furthest: function (source)\n {\n var bodies = this.world.bodies;\n\n var max = -1;\n var farthest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance > max)\n {\n farthest = target;\n max = distance;\n }\n\n });\n\n return farthest;\n },\n\n /**\n * Move the given display object towards the x/y coordinates at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to move towards.\n * @param {number} y - The y coordinate to move towards.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveTo: function (gameObject, x, y, speed, maxTime)\n {\n if (speed === undefined) { speed = 60; }\n if (maxTime === undefined) { maxTime = 0; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n if (maxTime > 0)\n {\n // We know how many pixels we need to move, but how fast?\n speed = DistanceBetween(gameObject.x, gameObject.y, x, y) / (maxTime / 1000);\n }\n\n gameObject.body.velocity.setToPolar(angle, speed);\n\n return angle;\n },\n\n /**\n * Move the given display object towards the destination object at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {object} destination - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveToObject: function (gameObject, destination, speed, maxTime)\n {\n return this.moveTo(gameObject, destination.x, destination.y, speed, maxTime);\n },\n\n /**\n * Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromAngle\n * @since 3.0.0\n *\n * @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared.\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromAngle: function (angle, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(DegToRad(angle), speed);\n },\n\n /**\n * Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromRotation\n * @since 3.0.0\n *\n * @param {number} rotation - The angle in radians.\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromRotation: function (rotation, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(rotation, speed);\n },\n\n /**\n * This method will search the given rectangular area and return an array of all physics bodies that\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\n * \n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\n * contained within it.\n * \n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\n * otherwise the search is O(N) for Dynamic Bodies.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapRect\n * @since 3.17.0\n *\n * @param {number} x - The top-left x coordinate of the area to search within.\n * @param {number} y - The top-left y coordinate of the area to search within.\n * @param {number} width - The width of the area to search within.\n * @param {number} height - The height of the area to search within.\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\n *\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\n */\n overlapRect: function (x, y, width, height, includeDynamic, includeStatic)\n {\n return OverlapRect(this.world, x, y, width, height, includeDynamic, includeStatic);\n },\n \n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#shutdown\n * @since 3.0.0\n */\n shutdown: function ()\n {\n if (!this.world)\n {\n // Already destroyed\n return;\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n\n this.add.destroy();\n this.world.destroy();\n\n this.add = null;\n this.world = null;\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nPluginCache.register('ArcadePhysics', ArcadePhysics, 'arcadePhysics');\n\nmodule.exports = ArcadePhysics;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadePhysics.js?")},"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\n\n/**\n * @classdesc\n * An Arcade Physics Sprite is a Sprite with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Sprite and an Arcade Image is that you cannot animate an Arcade Image.\n * If you do not require animation then you can safely use Arcade Images instead of Arcade Sprites.\n *\n * @class Sprite\n * @extends Phaser.GameObjects.Sprite\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeSprite = new Class({\n\n Extends: Sprite,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeSprite (scene, x, y, texture, frame)\n {\n Sprite.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Sprite#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeSprite;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeSprite.js?')},"./node_modules/phaser/src/physics/arcade/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Arcade Body.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticBody}.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Body belongs to.\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Transformations applied to this Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#transform\r\n * @type {object}\r\n * @since 3.4.0\r\n */\r\n this.transform = {\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n rotation: gameObject.angle,\r\n scaleX: gameObject.scaleX,\r\n scaleY: gameObject.scaleY,\r\n displayOriginX: gameObject.displayOriginX,\r\n displayOriginY: gameObject.displayOriginY\r\n };\r\n\r\n /**\r\n * Whether the Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * Whether the Body's velocity is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * The color of this Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * Whether this Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Body's boundary is circular (true) or rectangular (false).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Body is circular, this is the unscaled radius of the Body's boundary, as set by setCircle(), in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Body's position from its Game Object's position, in source pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setOffset\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * The position of this Body during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#prev\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.prev = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * Whether this Body's `rotation` is affected by its angular acceleration and angular velocity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowRotation\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowRotation = true;\r\n\r\n /**\r\n * This body's rotation, in degrees, based on its angular acceleration and angular velocity.\r\n * The Body's rotation controls the `angle` of its Game Object.\r\n * It doesn't rotate the Body's boundary, which is always an axis-aligned rectangle or a circle.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = gameObject.angle;\r\n\r\n /**\r\n * The Body's rotation, in degrees, during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#preRotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.preRotation = gameObject.angle;\r\n\r\n /**\r\n * The width of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#width\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#height\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The unscaled width of the Body, in source pixels, as set by setSize().\r\n * The default is the width of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceWidth = width;\r\n\r\n /**\r\n * The unscaled height of the Body, in source pixels, as set by setSize().\r\n * The default is the height of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceHeight = height;\r\n\r\n if (gameObject.frame)\r\n {\r\n this.sourceWidth = gameObject.frame.realWidth;\r\n this.sourceHeight = gameObject.frame.realHeight;\r\n }\r\n\r\n /**\r\n * Half the Body's width, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(width / 2);\r\n\r\n /**\r\n * Half the Body's height, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(height / 2);\r\n\r\n /**\r\n * The center of the Body's boundary.\r\n * The midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * The Body's velocity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The Body's calculated velocity, in pixels per second, at the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#newVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.newVelocity = new Vector2();\r\n\r\n /**\r\n * The Body's absolute maximum change in position, in pixels per step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#deltaMax\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.deltaMax = new Vector2();\r\n\r\n /**\r\n * The Body's change in velocity, in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#acceleration\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.acceleration = new Vector2();\r\n\r\n /**\r\n * Whether this Body's velocity is affected by its `drag`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowDrag\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowDrag = true;\r\n\r\n /**\r\n * Absolute loss of velocity due to movement, in pixels per second squared.\r\n * The x and y components are applied separately.\r\n *\r\n * When `useDamping` is true, this is 1 minus the damping factor.\r\n * A value of 1 means the Body loses no velocity.\r\n * A value of 0.95 means the Body loses 5% of its velocity per step.\r\n * A value of 0.5 means the Body loses 50% of its velocity per step.\r\n *\r\n * Drag is applied only when `acceleration` is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#drag\r\n * @type {(Phaser.Math.Vector2|number)}\r\n * @since 3.0.0\r\n */\r\n this.drag = new Vector2();\r\n\r\n /**\r\n * Whether this Body's position is affected by gravity (local or world).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowGravity\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#gravity\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.allowGravity = true;\r\n\r\n /**\r\n * Acceleration due to gravity (specific to this Body), in pixels per second squared.\r\n * Total gravity is the sum of this vector and the simulation's `gravity`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.gravity = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision, relative to 1.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.bounce = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision with the world boundary, relative to 1.\r\n * If null, `bounce` is used instead.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#worldBounce\r\n * @type {?Phaser.Math.Vector2}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.worldBounce = null;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary (and `collideWorldBounds` is also true).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#worldboundsEvent\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this Body collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collideEvent\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this Body overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#overlapEvent\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The Body's absolute maximum velocity, in pixels per second.\r\n * The horizontal and vertical components are applied separately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.maxVelocity = new Vector2(10000, 10000);\r\n\r\n /**\r\n * The maximum speed this Body is allowed to reach.\r\n * \r\n * If not negative it limits the scalar value of speed.\r\n * \r\n * Any negative value means no maximum is being applied.\r\n * \r\n * @name Phaser.Physics.Arcade.Body#maxSpeed\r\n * @type {number}\r\n * @since 3.16.0 \r\n */\r\n this.maxSpeed = -1;\r\n\r\n /**\r\n * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1.\r\n * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all.\r\n * The horizontal component (x) is applied only when two colliding Bodies are separated vertically.\r\n * The vertical component (y) is applied only when two colliding Bodies are separated horizontally.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#friction\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.friction = new Vector2(1, 0);\r\n\r\n /**\r\n * If this Body is using `drag` for deceleration this property controls how the drag is applied.\r\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\r\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\r\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\r\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\r\n *\r\n * If you enable this property then you should use far smaller `drag` values than with linear, as\r\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\r\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#useDamping\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.10.0\r\n */\r\n this.useDamping = false;\r\n\r\n /**\r\n * The rate of change of this Body's `rotation`, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularVelocity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularVelocity = 0;\r\n\r\n /**\r\n * The Body's angular acceleration (change in angular velocity), in degrees per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularAcceleration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularAcceleration = 0;\r\n\r\n /**\r\n * Loss of angular velocity due to angular movement, in degrees per second.\r\n *\r\n * Angular drag is applied only when angular acceleration is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularDrag\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularDrag = 0;\r\n\r\n /**\r\n * The Body's maximum angular velocity, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxAngular\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.maxAngular = 1000;\r\n\r\n /**\r\n * The Body's inertia, relative to a default unit (1).\r\n * With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * The calculated angle of this Body's velocity vector, in radians, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The calculated magnitude of the Body's velocity, in pixels per second, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#speed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speed = 0;\r\n\r\n /**\r\n * The direction of the Body's velocity, as calculated during the last step.\r\n * If the Body is moving on both axes (diagonally), this describes motion on the vertical axis only.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#facing\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.facing = CONST.FACING_NONE;\r\n\r\n /**\r\n * Whether this Body can be moved by collisions with another Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#immovable\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.immovable = false;\r\n\r\n /**\r\n * Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#moves\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.moves = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this Body is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this Body is overlapped with another and both are not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this Body interacts with the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#collideWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this Body is checked for collisions and for which directions.\r\n * You can set `checkCollision.none = true` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this Body is colliding with another and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body was colliding with another during the last step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body is colliding with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#syncBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Components.GetBounds#getBounds\r\n */\r\n this.syncBounds = false;\r\n\r\n /**\r\n * The Body's physics type (dynamic or static).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#physicsType\r\n * @type {integer}\r\n * @readonly\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Whether the Body's position needs updating from its Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_reset\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this._reset = true;\r\n\r\n /**\r\n * Cached horizontal scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sx\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sx = gameObject.scaleX;\r\n\r\n /**\r\n * Cached vertical scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sy\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sy = gameObject.scaleY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dy = 0;\r\n\r\n /**\r\n * Stores the Game Object's bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n },\r\n\r\n /**\r\n * Updates the Body's `transform`, `width`, `height`, and `center` from its Game Object.\r\n * The Body's `position` isn't changed.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateBounds\r\n * @since 3.0.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var sprite = this.gameObject;\r\n\r\n // Container?\r\n\r\n var transform = this.transform;\r\n\r\n if (sprite.parentContainer)\r\n {\r\n var matrix = sprite.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2);\r\n\r\n transform.x = matrix.tx;\r\n transform.y = matrix.ty;\r\n transform.rotation = RadToDeg(matrix.rotation);\r\n transform.scaleX = matrix.scaleX;\r\n transform.scaleY = matrix.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n else\r\n {\r\n transform.x = sprite.x;\r\n transform.y = sprite.y;\r\n transform.rotation = sprite.angle;\r\n transform.scaleX = sprite.scaleX;\r\n transform.scaleY = sprite.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n\r\n var recalc = false;\r\n\r\n if (this.syncBounds)\r\n {\r\n var b = sprite.getBounds(this._bounds);\r\n\r\n this.width = b.width;\r\n this.height = b.height;\r\n recalc = true;\r\n }\r\n else\r\n {\r\n var asx = Math.abs(transform.scaleX);\r\n var asy = Math.abs(transform.scaleY);\r\n\r\n if (this._sx !== asx || this._sy !== asy)\r\n {\r\n this.width = this.sourceWidth * asx;\r\n this.height = this.sourceHeight * asy;\r\n this._sx = asx;\r\n this._sy = asy;\r\n recalc = true;\r\n }\r\n }\r\n\r\n if (recalc)\r\n {\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n this.updateCenter();\r\n }\r\n },\r\n\r\n /**\r\n * Updates the Body's `center` from its `position`, `width`, and `height`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.\r\n * \r\n * This method is only called if the physics world is going to run a step this frame.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#resetFlags\r\n * @since 3.18.0\r\n */\r\n resetFlags: function ()\r\n {\r\n // Store and reset collision flags\r\n this.wasTouching.none = this.touching.none;\r\n this.wasTouching.up = this.touching.up;\r\n this.wasTouching.down = this.touching.down;\r\n this.wasTouching.left = this.touching.left;\r\n this.wasTouching.right = this.touching.right;\r\n\r\n this.touching.none = true;\r\n this.touching.up = false;\r\n this.touching.down = false;\r\n this.touching.left = false;\r\n this.touching.right = false;\r\n\r\n this.blocked.none = true;\r\n this.blocked.up = false;\r\n this.blocked.down = false;\r\n this.blocked.left = false;\r\n this.blocked.right = false;\r\n\r\n this.overlapR = 0;\r\n this.overlapX = 0;\r\n this.overlapY = 0;\r\n\r\n this.embedded = false;\r\n },\r\n\r\n /**\r\n * Syncs the position body position with the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#preUpdate\r\n * @since 3.17.0\r\n * \r\n * @param {boolean} willStep - Will this Body run an update as well?\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n preUpdate: function (willStep, delta)\r\n {\r\n if (willStep)\r\n {\r\n this.resetFlags();\r\n }\r\n\r\n this.updateBounds();\r\n\r\n var sprite = this.transform;\r\n\r\n this.position.x = sprite.x + sprite.scaleX * (this.offset.x - sprite.displayOriginX);\r\n this.position.y = sprite.y + sprite.scaleY * (this.offset.y - sprite.displayOriginY);\r\n\r\n this.updateCenter();\r\n\r\n this.rotation = sprite.rotation;\r\n\r\n this.preRotation = this.rotation;\r\n\r\n if (this._reset)\r\n {\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n }\r\n\r\n if (willStep)\r\n {\r\n this.update(delta);\r\n }\r\n },\r\n\r\n /**\r\n * Performs a single physics step and updates the body velocity, angle, speed and other properties.\r\n * \r\n * This method can be called multiple times per game frame, depending on the physics step rate.\r\n * \r\n * The results are synced back to the Game Object in `postUpdate`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#update\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_BOUNDS\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n update: function (delta)\r\n {\r\n if (this.moves)\r\n {\r\n this.world.updateMotion(this, delta);\r\n\r\n var vx = this.velocity.x;\r\n var vy = this.velocity.y;\r\n\r\n this.newVelocity.set(vx * delta, vy * delta);\r\n\r\n this.position.add(this.newVelocity);\r\n\r\n this.updateCenter();\r\n\r\n this.angle = Math.atan2(vy, vx);\r\n this.speed = Math.sqrt(vx * vx + vy * vy);\r\n\r\n // Now the update will throw collision checks at the Body\r\n // And finally we'll integrate the new position back to the Sprite in postUpdate\r\n\r\n if (this.collideWorldBounds && this.checkWorldBounds() && this.onWorldBounds)\r\n {\r\n this.world.emit(Events.WORLD_BOUNDS, this, this.blocked.up, this.blocked.down, this.blocked.left, this.blocked.right);\r\n }\r\n }\r\n\r\n this._dx = this.position.x - this.prev.x;\r\n this._dy = this.position.y - this.prev.y;\r\n },\r\n\r\n /**\r\n * Feeds the Body results back into the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var dx = this.position.x - this.prev.x;\r\n var dy = this.position.y - this.prev.y;\r\n\r\n if (this.moves)\r\n {\r\n var mx = this.deltaMax.x;\r\n var my = this.deltaMax.y;\r\n\r\n if (mx !== 0 && dx !== 0)\r\n {\r\n if (dx < 0 && dx < -mx)\r\n {\r\n dx = -mx;\r\n }\r\n else if (dx > 0 && dx > mx)\r\n {\r\n dx = mx;\r\n }\r\n }\r\n\r\n if (my !== 0 && dy !== 0)\r\n {\r\n if (dy < 0 && dy < -my)\r\n {\r\n dy = -my;\r\n }\r\n else if (dy > 0 && dy > my)\r\n {\r\n dy = my;\r\n }\r\n }\r\n\r\n this.gameObject.x += dx;\r\n this.gameObject.y += dy;\r\n\r\n this._reset = true;\r\n }\r\n\r\n if (dx < 0)\r\n {\r\n this.facing = CONST.FACING_LEFT;\r\n }\r\n else if (dx > 0)\r\n {\r\n this.facing = CONST.FACING_RIGHT;\r\n }\r\n\r\n if (dy < 0)\r\n {\r\n this.facing = CONST.FACING_UP;\r\n }\r\n else if (dy > 0)\r\n {\r\n this.facing = CONST.FACING_DOWN;\r\n }\r\n\r\n this._dx = dx;\r\n this._dy = dy;\r\n\r\n if (this.allowRotation)\r\n {\r\n this.gameObject.angle += this.deltaZ();\r\n }\r\n\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n },\r\n\r\n /**\r\n * Checks for collisions between this Body and the world boundary and separates them.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#checkWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if this Body is colliding with the world boundary.\r\n */\r\n checkWorldBounds: function ()\r\n {\r\n var pos = this.position;\r\n var bounds = this.world.bounds;\r\n var check = this.world.checkCollision;\r\n\r\n var bx = (this.worldBounce) ? -this.worldBounce.x : -this.bounce.x;\r\n var by = (this.worldBounce) ? -this.worldBounce.y : -this.bounce.y;\r\n\r\n if (pos.x < bounds.x && check.left)\r\n {\r\n pos.x = bounds.x;\r\n this.velocity.x *= bx;\r\n this.blocked.left = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.right > bounds.right && check.right)\r\n {\r\n pos.x = bounds.right - this.width;\r\n this.velocity.x *= bx;\r\n this.blocked.right = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n if (pos.y < bounds.y && check.up)\r\n {\r\n pos.y = bounds.y;\r\n this.velocity.y *= by;\r\n this.blocked.up = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.bottom > bounds.bottom && check.down)\r\n {\r\n pos.y = bounds.bottom - this.height;\r\n this.velocity.y *= by;\r\n this.blocked.down = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n return !this.blocked.none;\r\n },\r\n\r\n /**\r\n * Sets the offset of the Body's position from its Game Object's position.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal offset, in source pixels.\r\n * @param {number} [y=x] - The vertical offset, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.offset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a rectangle.\r\n * Modifies the Body `offset` if `center` is true (the default).\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.sourceWidth = width;\r\n this.sourceHeight = height;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.updateCenter();\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n }\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a circle.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Body, in source pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the Body from its Game Object, in source pixels.\r\n * @param {number} [offsetY] - The vertical offset of the Body from its Game Object, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.isCircle = true;\r\n this.radius = radius;\r\n\r\n this.sourceWidth = radius * 2;\r\n this.sourceHeight = radius * 2;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * If the Body had any velocity or acceleration it is lost as a result of calling this.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position to place the Game Object and Body.\r\n * @param {number} y - The vertical position to place the Game Object and Body.\r\n */\r\n reset: function (x, y)\r\n {\r\n this.stop();\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n if (gameObject.getTopLeft)\r\n {\r\n gameObject.getTopLeft(this.position);\r\n }\r\n else\r\n {\r\n this.position.set(x, y);\r\n }\r\n\r\n this.prev.copy(this.position);\r\n\r\n this.rotation = gameObject.angle;\r\n this.preRotation = gameObject.angle;\r\n\r\n this.updateBounds();\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Sets acceleration, velocity, and speed to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n stop: function ()\r\n {\r\n this.velocity.set(0);\r\n this.acceleration.set(0);\r\n this.speed = 0;\r\n this.angularVelocity = 0;\r\n this.angularAcceleration = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the coordinates of this Body's edges into an object.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - An object to copy the values into.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} - An object with {x, y, right, bottom}.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Tests if the coordinates are within this Body's boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate.\r\n * @param {number} y - The vertical coordinate.\r\n *\r\n * @return {boolean} True if (x, y) is within this Body.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving down.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onFloor\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onFloor: function ()\r\n {\r\n return this.blocked.down;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving up.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onCeiling\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onCeiling: function ()\r\n {\r\n return this.blocked.up;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving left or right.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onWall\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onWall: function ()\r\n {\r\n return (this.blocked.left || this.blocked.right);\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's horizontal position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return (this._dx > 0) ? this._dx : -this._dx;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's vertical position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return (this._dy > 0) ? this._dy : -this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's horizontal position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaX: function ()\r\n {\r\n return this._dx;\r\n },\r\n\r\n /**\r\n * The change in this Body's vertical position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaY: function ()\r\n {\r\n return this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's rotation from the previous step, in degrees.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaZ: function ()\r\n {\r\n return this.rotation - this.preRotation;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for deletion by the simulation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n if (this.world)\r\n {\r\n this.world.pendingDestroy.set(this);\r\n }\r\n },\r\n\r\n /**\r\n * Draws this Body's boundary and velocity, if enabled.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to draw on.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n // Only draw the sides where checkCollision is true, similar to debugger in layer\r\n if (this.checkCollision.up)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x + this.width, pos.y);\r\n }\r\n\r\n if (this.checkCollision.right)\r\n {\r\n graphic.lineBetween(pos.x + this.width, pos.y, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.down)\r\n {\r\n graphic.lineBetween(pos.x, pos.y + this.height, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.left)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x, pos.y + this.height);\r\n }\r\n }\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.velocity.x / 2, y + this.velocity.y / 2);\r\n }\r\n },\r\n\r\n /**\r\n * Whether this Body will be drawn to the debug display.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if either `debugShowBody` or `debugShowVelocity` are enabled.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * Sets whether this Body collides with the world boundary.\r\n * \r\n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\r\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\r\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCollideWorldBounds: function (value, bounceX, bounceY)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.collideWorldBounds = value;\r\n\r\n var setBounceX = (bounceX !== undefined);\r\n var setBounceY = (bounceY !== undefined);\r\n\r\n if (setBounceX || setBounceY)\r\n {\r\n if (!this.worldBounce)\r\n {\r\n this.worldBounce = new Vector2();\r\n }\r\n\r\n if (setBounceX)\r\n {\r\n this.worldBounce.x = bounceX;\r\n }\r\n\r\n if (setBounceY)\r\n {\r\n this.worldBounce.y = bounceY;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this.velocity.set(x, y);\r\n\r\n x = this.velocity.x;\r\n y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityX: function (value)\r\n {\r\n this.velocity.x = value;\r\n\r\n var x = value;\r\n var y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityY: function (value)\r\n {\r\n this.velocity.y = value;\r\n\r\n var x = this.velocity.x;\r\n var y = value;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's maximum velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n this.maxVelocity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum speed the Body can move.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxSpeed\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The maximum speed value, in pixels per second. Set to a negative value to disable.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxSpeed: function (value)\r\n {\r\n this.maxSpeed = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal bounce, relative to 1.\r\n * @param {number} y - The vertical bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounce: function (x, y)\r\n {\r\n this.bounce.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceX: function (value)\r\n {\r\n this.bounce.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceY: function (value)\r\n {\r\n this.bounce.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.acceleration.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationX: function (value)\r\n {\r\n this.acceleration.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationY: function (value)\r\n {\r\n this.acceleration.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowDrag\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowDrag\r\n *\r\n * @param {boolean} [value=true] - `true` to allow drag on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowDrag: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables gravity's effect on this Body.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowGravity\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowGravity\r\n *\r\n * @param {boolean} [value=true] - `true` to allow gravity on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowGravity: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowGravity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables rotation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowRotation\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowRotation\r\n *\r\n * @param {boolean} [value=true] - `true` to allow rotation on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowRotation: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowRotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDrag: function (x, y)\r\n {\r\n this.drag.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragX: function (value)\r\n {\r\n this.drag.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragY: function (value)\r\n {\r\n this.drag.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravity.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravity.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, relative to 1.\r\n * @param {number} y - The vertical component, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionX: function (value)\r\n {\r\n this.friction.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionY: function (value)\r\n {\r\n this.friction.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in degrees per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n this.angularVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularAcceleration: function (value)\r\n {\r\n this.angularAcceleration = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularDrag: function (value)\r\n {\r\n this.angularDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's mass.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The mass value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `immovable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setImmovable\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `immovable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setImmovable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.immovable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `enable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setEnable\r\n * @since 3.15.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `enable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setEnable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.enable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Body's horizontal position (left edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Body's vertical position (top edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left edge of the Body's boundary. Identical to x.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right edge of the Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top edge of the Body's boundary. Identical to y.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom edge of this Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Body.js?")},"./node_modules/phaser/src/physics/arcade/Collider.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\n\n/**\n * @classdesc\n * An Arcade Physics Collider will automatically check for collision, or overlaps, between two objects\n * every step. If a collision, or overlap, occurs it will invoke the given callbacks.\n *\n * @class Collider\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade physics World that will manage the collisions.\n * @param {boolean} overlapOnly - Whether to check for collisions or overlap.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {any} callbackContext - The scope in which to call the callbacks.\n */\nvar Collider = new Class({\n\n initialize:\n\n function Collider (world, overlapOnly, object1, object2, collideCallback, processCallback, callbackContext)\n {\n /**\n * The world in which the bodies will collide.\n *\n * @name Phaser.Physics.Arcade.Collider#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The name of the collider (unused by Phaser).\n *\n * @name Phaser.Physics.Arcade.Collider#name\n * @type {string}\n * @since 3.1.0\n */\n this.name = '';\n\n /**\n * Whether the collider is active.\n *\n * @name Phaser.Physics.Arcade.Collider#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * Whether to check for collisions or overlaps.\n *\n * @name Phaser.Physics.Arcade.Collider#overlapOnly\n * @type {boolean}\n * @since 3.0.0\n */\n this.overlapOnly = overlapOnly;\n\n /**\n * The first object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object1\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object1 = object1;\n\n /**\n * The second object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object2\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object2 = object2;\n\n /**\n * The callback to invoke when the two objects collide.\n *\n * @name Phaser.Physics.Arcade.Collider#collideCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.collideCallback = collideCallback;\n\n /**\n * If a processCallback exists it must return true or collision checking will be skipped.\n *\n * @name Phaser.Physics.Arcade.Collider#processCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.processCallback = processCallback;\n\n /**\n * The context the collideCallback and processCallback will run in.\n *\n * @name Phaser.Physics.Arcade.Collider#callbackContext\n * @type {object}\n * @since 3.0.0\n */\n this.callbackContext = callbackContext;\n },\n\n /**\n * A name for the Collider.\n * \n * Phaser does not use this value, it's for your own reference.\n *\n * @method Phaser.Physics.Arcade.Collider#setName\n * @since 3.1.0\n *\n * @param {string} name - The name to assign to the Collider.\n *\n * @return {Phaser.Physics.Arcade.Collider} This Collider instance.\n */\n setName: function (name)\n {\n this.name = name;\n\n return this;\n },\n\n /**\n * Called by World as part of its step processing, initial operation of collision checking.\n *\n * @method Phaser.Physics.Arcade.Collider#update\n * @since 3.0.0\n */\n update: function ()\n {\n this.world.collideObjects(\n this.object1,\n this.object2,\n this.collideCallback,\n this.processCallback,\n this.callbackContext,\n this.overlapOnly\n );\n },\n\n /**\n * Removes Collider from World and disposes of its resources.\n *\n * @method Phaser.Physics.Arcade.Collider#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.world.removeCollider(this);\n\n this.active = false;\n\n this.world = null;\n\n this.object1 = null;\n this.object2 = null;\n\n this.collideCallback = null;\n this.processCallback = null;\n this.callbackContext = null;\n }\n\n});\n\nmodule.exports = Collider;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Collider.js?")},"./node_modules/phaser/src/physics/arcade/Factory.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeImage = __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js");\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar PhysicsGroup = __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js");\nvar StaticPhysicsGroup = __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js");\n\n/**\n * @classdesc\n * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects.\n * Objects that are created by this Factory are automatically added to the physics world.\n *\n * @class Factory\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics World instance.\n */\nvar Factory = new Class({\n\n initialize:\n\n function Factory (world)\n {\n /**\n * A reference to the Arcade Physics World.\n *\n * @name Phaser.Physics.Arcade.Factory#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * A reference to the Scene this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = world.scene;\n\n /**\n * A reference to the Scene.Systems this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#sys\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.sys = world.scene.sys;\n },\n\n /**\n * Creates a new Arcade Physics Collider object.\n *\n * @method Phaser.Physics.Arcade.Factory#collider\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n collider: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addCollider(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Creates a new Arcade Physics Collider Overlap object.\n *\n * @method Phaser.Physics.Arcade.Factory#overlap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for overlap.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for overlap.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n overlap: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addOverlap(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Adds an Arcade Physics Body to the given Game Object.\n *\n * @method Phaser.Physics.Arcade.Factory#existing\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - A Game Object.\n * @param {boolean} [isStatic=false] - Create a Static body (true) or Dynamic body (false).\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object.\n */\n existing: function (gameObject, isStatic)\n {\n var type = (isStatic) ? CONST.STATIC_BODY : CONST.DYNAMIC_BODY;\n\n this.world.enableBody(gameObject, type);\n\n return gameObject;\n },\n\n /**\n * Creates a new Arcade Image object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticImage\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n staticImage: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.STATIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Image object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#image\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n image: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.DYNAMIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticSprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n staticSprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.STATIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#sprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n sprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.DYNAMIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a Static Physics Group object.\n * All Game Objects created by this Group will automatically be static Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#staticGroup\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} The Static Group object that was created.\n */\n staticGroup: function (children, config)\n {\n return this.sys.updateList.add(new StaticPhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Creates a Physics Group object.\n * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#group\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.Group} The Group object that was created.\n */\n group: function (children, config)\n {\n return this.sys.updateList.add(new PhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Destroys this Factory.\n *\n * @method Phaser.Physics.Arcade.Factory#destroy\n * @since 3.5.0\n */\n destroy: function ()\n {\n this.world = null;\n this.scene = null;\n this.sys = null;\n }\n\n});\n\nmodule.exports = Factory;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Factory.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias;\n\n if (body1._dx === 0 && body2._dx === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dx > body2._dx)\n {\n // Body1 is moving right and / or Body2 is moving left\n overlap = body1.right - body2.x;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.right = true;\n\n body2.touching.none = false;\n body2.touching.left = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.right = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.left = true;\n }\n }\n }\n else if (body1._dx < body2._dx)\n {\n // Body1 is moving left and/or Body2 is moving right\n overlap = body1.x - body2.width - body2.x;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.left = true;\n\n body2.touching.none = false;\n body2.touching.right = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.left = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.right = true;\n }\n }\n }\n\n // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapX = overlap;\n body2.overlapX = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapX.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias;\n\n if (body1._dy === 0 && body2._dy === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dy > body2._dy)\n {\n // Body1 is moving down and/or Body2 is moving up\n overlap = body1.bottom - body2.y;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.down = true;\n\n body2.touching.none = false;\n body2.touching.up = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.down = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.up = true;\n }\n }\n }\n else if (body1._dy < body2._dy)\n {\n // Body1 is moving up and/or Body2 is moving down\n overlap = body1.y - body2.bottom;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.up = true;\n\n body2.touching.none = false;\n body2.touching.down = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.up = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.down = true;\n }\n }\n }\n\n // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapY = overlap;\n body2.overlapY = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapY.js?')},"./node_modules/phaser/src/physics/arcade/PhysicsGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ \"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Arcade Physics Group object.\r\n *\r\n * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}.\r\n *\r\n * @class Group\r\n * @extends Phaser.GameObjects.Group\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\r\n */\r\nvar PhysicsGroup = new Class({\r\n\r\n Extends: Group,\r\n\r\n initialize:\r\n\r\n function PhysicsGroup (world, scene, children, config)\r\n {\r\n if (!children && !config)\r\n {\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // children is a plain object, so swizzle them:\r\n config = children;\r\n children = null;\r\n\r\n config.createCallback = this.createCallbackHandler;\r\n config.removeCallback = this.removeCallbackHandler;\r\n }\r\n else if (Array.isArray(children) && IsPlainObject(children[0]))\r\n {\r\n // children is an array of plain objects\r\n config = children[0];\r\n\r\n var _this = this;\r\n\r\n children.forEach(function (singleConfig)\r\n {\r\n singleConfig.createCallback = _this.createCallbackHandler;\r\n singleConfig.removeCallback = _this.removeCallbackHandler;\r\n });\r\n }\r\n else\r\n {\r\n // config is not defined and children is not a plain object nor an array of plain objects\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n\r\n /**\r\n * The physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The class to create new Group members from.\r\n * \r\n * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#classType\r\n * @type {Function}\r\n * @default ArcadeSprite\r\n * @since 3.0.0\r\n */\r\n config.classType = GetFastValue(config, 'classType', ArcadeSprite);\r\n\r\n /**\r\n * The physics type of the Group's members.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Default physics properties applied to Game Objects added to the Group or created by the Group. Derived from the `config` argument.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#defaults\r\n * @type {Phaser.Types.Physics.Arcade.PhysicsGroupDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n setCollideWorldBounds: GetFastValue(config, 'collideWorldBounds', false),\r\n setAccelerationX: GetFastValue(config, 'accelerationX', 0),\r\n setAccelerationY: GetFastValue(config, 'accelerationY', 0),\r\n setAllowDrag: GetFastValue(config, 'allowDrag', true),\r\n setAllowGravity: GetFastValue(config, 'allowGravity', true),\r\n setAllowRotation: GetFastValue(config, 'allowRotation', true),\r\n setBounceX: GetFastValue(config, 'bounceX', 0),\r\n setBounceY: GetFastValue(config, 'bounceY', 0),\r\n setDragX: GetFastValue(config, 'dragX', 0),\r\n setDragY: GetFastValue(config, 'dragY', 0),\r\n setEnable: GetFastValue(config, 'enable', true),\r\n setGravityX: GetFastValue(config, 'gravityX', 0),\r\n setGravityY: GetFastValue(config, 'gravityY', 0),\r\n setFrictionX: GetFastValue(config, 'frictionX', 0),\r\n setFrictionY: GetFastValue(config, 'frictionY', 0),\r\n setVelocityX: GetFastValue(config, 'velocityX', 0),\r\n setVelocityY: GetFastValue(config, 'velocityY', 0),\r\n setAngularVelocity: GetFastValue(config, 'angularVelocity', 0),\r\n setAngularAcceleration: GetFastValue(config, 'angularAcceleration', 0),\r\n setAngularDrag: GetFastValue(config, 'angularDrag', 0),\r\n setMass: GetFastValue(config, 'mass', 1),\r\n setImmovable: GetFastValue(config, 'immovable', false)\r\n };\r\n\r\n if (Array.isArray(children))\r\n {\r\n config = null;\r\n }\r\n\r\n Group.call(this, scene, children, config);\r\n },\r\n\r\n /**\r\n * Enables a Game Object's Body and assigns `defaults`. Called when a Group member is added or created.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#createCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being added.\r\n */\r\n createCallbackHandler: function (child)\r\n {\r\n if (!child.body)\r\n {\r\n this.world.enableBody(child, CONST.DYNAMIC_BODY);\r\n }\r\n\r\n var body = child.body;\r\n\r\n for (var key in this.defaults)\r\n {\r\n body[key](this.defaults[key]);\r\n }\r\n },\r\n\r\n /**\r\n * Disables a Game Object's Body. Called when a Group member is removed.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#removeCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being removed.\r\n */\r\n removeCallbackHandler: function (child)\r\n {\r\n if (child.body)\r\n {\r\n this.world.disableBody(child);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity.\r\n * @param {number} y - The vertical velocity.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x, y), the second (x + step, y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocity: function (x, y, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.set(x + (i * step), y + (i * step));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x), the second (x + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityX: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.x = value + (i * step);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (y), the second (y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityY: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.y = value + (i * step);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PhysicsGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/PhysicsGroup.js?")},"./node_modules/phaser/src/physics/arcade/SeparateX.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\n\n/**\n * Separates two overlapping bodies on the X-axis (horizontally).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`.\n */\nvar SeparateX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapX(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.x;\n var v2 = body2.velocity.x;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.x -= overlap;\n body2.x += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.x = avg + nv1 * body1.bounce.x;\n body2.velocity.x = avg + nv2 * body2.bounce.x;\n }\n else if (!body1.immovable)\n {\n body1.x -= overlap;\n body1.velocity.x = v2 - v1 * body1.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body2.moves)\n {\n body1.y += (body2.y - body2.prev.y) * body2.friction.y;\n }\n }\n else\n {\n body2.x += overlap;\n body2.velocity.x = v1 - v2 * body2.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body1.moves)\n {\n body2.y += (body1.y - body1.prev.y) * body1.friction.y;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateX.js?")},"./node_modules/phaser/src/physics/arcade/SeparateY.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\n\n/**\n * Separates two overlapping bodies on the Y-axis (vertically).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`.\n */\nvar SeparateY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapY(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.y;\n var v2 = body2.velocity.y;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.y -= overlap;\n body2.y += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.y = avg + nv1 * body1.bounce.y;\n body2.velocity.y = avg + nv2 * body2.bounce.y;\n }\n else if (!body1.immovable)\n {\n body1.y -= overlap;\n body1.velocity.y = v2 - v1 * body1.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body2.moves)\n {\n body1.x += (body2.x - body2.prev.x) * body2.friction.x;\n }\n }\n else\n {\n body2.y += overlap;\n body2.velocity.y = v1 - v2 * body2.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body1.moves)\n {\n body2.x += (body1.x - body1.prev.x) * body1.friction.x;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateY.js?")},"./node_modules/phaser/src/physics/arcade/StaticBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Arcade Physics Body.\r\n *\r\n * A Static Body never moves, and isn't automatically synchronized with its parent Game Object.\r\n * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually.\r\n *\r\n * A Static Body can collide with other Bodies, but is never moved by collisions.\r\n *\r\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Body}.\r\n *\r\n * @class StaticBody\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Static Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Static Body belongs to.\r\n */\r\nvar StaticBody = new Class({\r\n\r\n initialize:\r\n\r\n function StaticBody (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Whether the Static Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowStaticBody;\r\n\r\n /**\r\n * The color of this Static Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.staticBodyDebugColor;\r\n\r\n /**\r\n * Whether this Static Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Static Body's boundary is circular (`true`) or rectangular (`false`).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Static Body's actual position from any updated position.\r\n *\r\n * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Static Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x - gameObject.displayOriginX, gameObject.y - gameObject.displayOriginY);\r\n\r\n /**\r\n * The width of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * Half the Static Body's width, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(this.width / 2);\r\n\r\n /**\r\n * Half the Static Body's height, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n /**\r\n * The center of the Static Body's boundary.\r\n * This is the midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * A constant zero velocity used by the Arcade Physics simulation for calculations.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.velocity = Vector2.ZERO;\r\n\r\n /**\r\n * A constant `false` value expected by the Arcade Physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#allowGravity\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.allowGravity = false;\r\n\r\n /**\r\n * Gravitational force applied specifically to this Body. Values are in pixels per second squared. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.gravity = Vector2.ZERO;\r\n\r\n /**\r\n * Rebound, or restitution, following a collision, relative to 1. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.bounce = Vector2.ZERO;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this StaticBody collides with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary and never trigger a `worldbounds` event.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this StaticBody collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this StaticBody overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The StaticBody's inertia, relative to a default unit (1). With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * Whether this object can be moved by collisions with another body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#immovable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.immovable = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this StaticBody is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this StaticBody has ever overlapped with another while both were not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this StaticBody interacts with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#collideWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this StaticBody is checked for collisions and for which directions. You can set `checkCollision.none = false` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with another body and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody was colliding with another body during the last step or any previous step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * The StaticBody's physics type (static by default).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.STATIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.STATIC_BODY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dy = 0;\r\n },\r\n\r\n /**\r\n * Changes the Game Object this Body is bound to.\r\n * First it removes its reference from the old Game Object, then sets the new one.\r\n * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setGameObject\r\n * @since 3.1.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body.\r\n * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object?\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n *\r\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n */\r\n setGameObject: function (gameObject, update)\r\n {\r\n if (gameObject && gameObject !== this.gameObject)\r\n {\r\n // Remove this body from the old game object\r\n this.gameObject.body = null;\r\n\r\n gameObject.body = this;\r\n\r\n // Update our reference\r\n this.gameObject = gameObject;\r\n }\r\n\r\n if (update)\r\n {\r\n this.updateFromGameObject();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates this Static Body so that its position and dimensions are updated\r\n * based on the current Game Object it is bound to.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n * @since 3.1.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n updateFromGameObject: function ()\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.width = gameObject.displayWidth;\r\n this.height = gameObject.displayHeight;\r\n\r\n this.halfWidth = Math.abs(this.width / 2);\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of the body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setOffset\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal offset of the Body from the Game Object's center.\r\n * @param {number} y - The vertical offset of the Body from the Game Object's center.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(x, y);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the body.\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width / 2);\r\n this.halfHeight = Math.floor(height / 2);\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n }\r\n\r\n this.updateCenter();\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Static Body to have a circular body and sets its sizes and position.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the StaticBody, in pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the StaticBody from its Game Object, in pixels.\r\n * @param {number} [offsetY] - The vertical offset of the StaticBody from its Game Object, in pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.isCircle = true;\r\n\r\n this.radius = radius;\r\n\r\n this.width = radius * 2;\r\n this.height = radius * 2;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the StaticBody's `center` from its `position` and dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n * @param {number} [y] - The y coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n */\r\n reset: function (x, y)\r\n {\r\n var gameObject = this.gameObject;\r\n\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n },\r\n\r\n /**\r\n * NOOP function. A Static Body cannot be stopped.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n stop: function ()\r\n {\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the x and y coordinates of the top left and bottom right points of the StaticBody.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - The object which will hold the coordinates of the bounds.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} The same object that was passed with `x`, `y`, `right` and `bottom` values matching the respective values of the StaticBody.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Checks to see if a given x,y coordinate is colliding with this Static Body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check against this body.\r\n * @param {number} y - The y coordinate to check against this body.\r\n *\r\n * @return {boolean} `true` if the given coordinate lies within this body, otherwise `false`.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * NOOP\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#postUpdate\r\n * @since 3.12.0\r\n */\r\n postUpdate: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's rotation from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's rotation from the previous step. Always zero.\r\n */\r\n deltaZ: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for destruction during the next step.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n this.world.pendingDestroy.set(this);\r\n },\r\n\r\n /**\r\n * Draws a graphical representation of the StaticBody for visual debugging purposes.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to use for the debug drawing of the StaticBody.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor, 1);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n graphic.strokeRect(pos.x, pos.y, this.width, this.height);\r\n }\r\n\r\n }\r\n },\r\n\r\n /**\r\n * Indicates whether the StaticBody is going to be showing a debug visualization during postUpdate.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether or not the StaticBody is going to show the debug visualization during postUpdate.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return this.debugShowBody;\r\n },\r\n\r\n /**\r\n * Sets the Mass of the StaticBody. Will set the Mass to 0.1 if the value passed is less than or equal to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to set the Mass to. Values of zero or less are changed to 0.1.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n if (value <= 0)\r\n {\r\n // Causes havoc otherwise\r\n value = 0.1;\r\n }\r\n\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.y = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the left-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The highest y coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lowest y coordinate of the area of the StaticBody. (y + height)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticBody.js?")},"./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js");\n\n/**\n * @classdesc\n * An Arcade Physics Static Group object.\n *\n * All Game Objects created by this Group will automatically be given static Arcade Physics bodies.\n *\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}.\n *\n * @class StaticGroup\n * @extends Phaser.GameObjects.Group\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\n * @param {Phaser.Scene} scene - The scene this group belongs to.\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n */\nvar StaticPhysicsGroup = new Class({\n\n Extends: Group,\n\n initialize:\n\n function StaticPhysicsGroup (world, scene, children, config)\n {\n if (!children && !config)\n {\n config = {\n createCallback: this.createCallbackHandler,\n removeCallback: this.removeCallbackHandler,\n createMultipleCallback: this.createMultipleCallbackHandler,\n classType: ArcadeSprite\n };\n }\n else if (IsPlainObject(children))\n {\n // children is a plain object, so swizzle them:\n config = children;\n children = null;\n\n config.createCallback = this.createCallbackHandler;\n config.removeCallback = this.removeCallbackHandler;\n config.createMultipleCallback = this.createMultipleCallbackHandler;\n config.classType = GetFastValue(config, \'classType\', ArcadeSprite);\n }\n else if (Array.isArray(children) && IsPlainObject(children[0]))\n {\n // children is an array of plain objects\n config = children;\n children = null;\n\n config.forEach(function (singleConfig)\n {\n singleConfig.createCallback = this.createCallbackHandler;\n singleConfig.removeCallback = this.removeCallbackHandler;\n singleConfig.createMultipleCallback = this.createMultipleCallbackHandler;\n singleConfig.classType = GetFastValue(singleConfig, \'classType\', ArcadeSprite);\n });\n }\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The scene this group belongs to.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#physicsType\n * @type {integer}\n * @default Phaser.Physics.Arcade.STATIC_BODY\n * @since 3.0.0\n */\n this.physicsType = CONST.STATIC_BODY;\n\n Group.call(this, scene, children, config);\n },\n\n /**\n * Adds a static physics body to the new group member (if it lacks one) and adds it to the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The new group member.\n *\n * @see Phaser.Physics.Arcade.World#enableBody\n */\n createCallbackHandler: function (child)\n {\n if (!child.body)\n {\n this.world.enableBody(child, CONST.STATIC_BODY);\n }\n },\n\n /**\n * Disables the group member\'s physics body, removing it from the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#removeCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The group member being removed.\n *\n * @see Phaser.Physics.Arcade.World#disableBody\n */\n removeCallbackHandler: function (child)\n {\n if (child.body)\n {\n this.world.disableBody(child);\n }\n },\n\n /**\n * Refreshes the group.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject[]} entries - The newly created group members.\n *\n * @see Phaser.Physics.Arcade.StaticGroup#refresh\n */\n createMultipleCallbackHandler: function ()\n {\n this.refresh();\n },\n\n /**\n * Resets each Body to the position of its parent Game Object.\n * Body sizes aren\'t changed (use {@link Phaser.Physics.Arcade.Components.Enable#refreshBody} for that).\n *\n * @method Phaser.Physics.Arcade.StaticGroup#refresh\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} This group.\n *\n * @see Phaser.Physics.Arcade.StaticBody#reset\n */\n refresh: function ()\n {\n var children = this.children.entries;\n\n for (var i = 0; i < children.length; i++)\n {\n children[i].body.reset();\n }\n\n return this;\n }\n\n});\n\nmodule.exports = StaticPhysicsGroup;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js?')},"./node_modules/phaser/src/physics/arcade/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/arcade/Body.js\");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Collider = __webpack_require__(/*! ./Collider */ \"./node_modules/phaser/src/physics/arcade/Collider.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar FuzzyGreaterThan = __webpack_require__(/*! ../../math/fuzzy/GreaterThan */ \"./node_modules/phaser/src/math/fuzzy/GreaterThan.js\");\r\nvar FuzzyLessThan = __webpack_require__(/*! ../../math/fuzzy/LessThan */ \"./node_modules/phaser/src/math/fuzzy/LessThan.js\");\r\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\r\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar ProcessQueue = __webpack_require__(/*! ../../structs/ProcessQueue */ \"./node_modules/phaser/src/structs/ProcessQueue.js\");\r\nvar ProcessTileCallbacks = __webpack_require__(/*! ./tilemap/ProcessTileCallbacks */ \"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RTree = __webpack_require__(/*! ../../structs/RTree */ \"./node_modules/phaser/src/structs/RTree.js\");\r\nvar SeparateTile = __webpack_require__(/*! ./tilemap/SeparateTile */ \"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/arcade/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/arcade/SeparateY.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar StaticBody = __webpack_require__(/*! ./StaticBody */ \"./node_modules/phaser/src/physics/arcade/StaticBody.js\");\r\nvar TileIntersectsBody = __webpack_require__(/*! ./tilemap/TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Arcade Physics World.\r\n *\r\n * The World is responsible for creating, managing, colliding and updating all of the bodies within it.\r\n *\r\n * An instance of the World belongs to a Phaser.Scene and is accessed via the property `physics.world`.\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this World instance belongs.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} config - An Arcade Physics Configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene this simulation belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Dynamic Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * Static Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticBodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.staticBodies = new Set();\r\n\r\n /**\r\n * Static Bodies marked for deletion.\r\n *\r\n * @name Phaser.Physics.Arcade.World#pendingDestroy\r\n * @type {Phaser.Structs.Set.<(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)>}\r\n * @since 3.1.0\r\n */\r\n this.pendingDestroy = new Set();\r\n\r\n /**\r\n * This simulation's collision processors.\r\n *\r\n * @name Phaser.Physics.Arcade.World#colliders\r\n * @type {Phaser.Structs.ProcessQueue.}\r\n * @since 3.0.0\r\n */\r\n this.colliders = new ProcessQueue();\r\n\r\n /**\r\n * Acceleration of Bodies due to gravity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.World#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.gravity = new Vector2(GetValue(config, 'gravity.x', 0), GetValue(config, 'gravity.y', 0));\r\n\r\n /**\r\n * A boundary constraining Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.0.0\r\n */\r\n this.bounds = new Rectangle(\r\n GetValue(config, 'x', 0),\r\n GetValue(config, 'y', 0),\r\n GetValue(config, 'width', scene.sys.scale.width),\r\n GetValue(config, 'height', scene.sys.scale.height)\r\n );\r\n\r\n /**\r\n * The boundary edges that Bodies can collide with.\r\n *\r\n * @name Phaser.Physics.Arcade.World#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.CheckCollisionObject}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = {\r\n up: GetValue(config, 'checkCollision.up', true),\r\n down: GetValue(config, 'checkCollision.down', true),\r\n left: GetValue(config, 'checkCollision.left', true),\r\n right: GetValue(config, 'checkCollision.right', true)\r\n };\r\n\r\n /**\r\n * The number of physics steps to be taken per second.\r\n *\r\n * This property is read-only. Use the `setFPS` method to modify it at run-time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#fps\r\n * @readonly\r\n * @type {number}\r\n * @default 60\r\n * @since 3.10.0\r\n */\r\n this.fps = GetValue(config, 'fps', 60);\r\n\r\n /**\r\n * The amount of elapsed ms since the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_elapsed\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Internal frame time value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTime\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTime = 1 / this.fps;\r\n\r\n /**\r\n * Internal frame time ms value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTimeMS\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n /**\r\n * The number of steps that took place in the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#stepsLastFrame\r\n * @readonly\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.stepsLastFrame = 0;\r\n\r\n /**\r\n * Scaling factor applied to the frame rate.\r\n *\r\n * - 1.0 = normal speed\r\n * - 2.0 = half speed\r\n * - 0.5 = double speed\r\n *\r\n * @name Phaser.Physics.Arcade.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.10.0\r\n */\r\n this.timeScale = GetValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * The maximum absolute difference of a Body's per-step velocity and its overlap with another Body that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#OVERLAP_BIAS\r\n * @type {number}\r\n * @default 4\r\n * @since 3.0.0\r\n */\r\n this.OVERLAP_BIAS = GetValue(config, 'overlapBias', 4);\r\n\r\n /**\r\n * The maximum absolute value of a Body's overlap with a tile that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n * The optimum value may be similar to the tile size.\r\n *\r\n * @name Phaser.Physics.Arcade.World#TILE_BIAS\r\n * @type {number}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.TILE_BIAS = GetValue(config, 'tileBias', 16);\r\n\r\n /**\r\n * Always separate overlapping Bodies horizontally before vertically.\r\n * False (the default) means Bodies are first separated on the axis of greater gravity, or the vertical axis if neither is greater.\r\n *\r\n * @name Phaser.Physics.Arcade.World#forceX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceX = GetValue(config, 'forceX', false);\r\n\r\n /**\r\n * Whether the simulation advances with the game loop.\r\n *\r\n * @name Phaser.Physics.Arcade.World#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPaused = GetValue(config, 'isPaused', false);\r\n\r\n /**\r\n * Temporary total of colliding Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_total\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._total = 0;\r\n\r\n /**\r\n * Enables the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * The graphics object drawing the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * Default debug display settings for new Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#defaults\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetValue(config, 'debugBodyColor', 0xff00ff),\r\n staticBodyDebugColor: GetValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetValue(config, 'debugVelocityColor', 0x00ff00)\r\n };\r\n\r\n /**\r\n * The maximum number of items per node on the RTree.\r\n *\r\n * This is ignored if `useTree` is `false`. If you have a large number of bodies in\r\n * your world then you may find search performance improves by increasing this value,\r\n * to allow more items per node and less node division.\r\n *\r\n * @name Phaser.Physics.Arcade.World#maxEntries\r\n * @type {integer}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.maxEntries = GetValue(config, 'maxEntries', 16);\r\n\r\n /**\r\n * Should this Arcade Physics World use an RTree for Dynamic and Static Physics bodies?\r\n *\r\n * An RTree is a fast way of spatially sorting of all the bodies in the world.\r\n * However, at certain limits, the cost of clearing and inserting the bodies into the\r\n * tree every frame becomes more expensive than the search speed gains it provides.\r\n *\r\n * If you have a large number of dynamic bodies in your world then it may be best to\r\n * disable the use of the RTree by setting this property to `false` in the physics config.\r\n * \r\n * The number it can cope with depends on browser and device, but a conservative estimate\r\n * of around 5,000 bodies should be considered the max before disabling it.\r\n *\r\n * This only applies to dynamic bodies. Static bodies are always kept in an RTree,\r\n * because they don't have to be cleared every frame, so you benefit from the\r\n * massive search speeds all the time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#useTree\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.useTree = GetValue(config, 'useTree', true);\r\n\r\n /**\r\n * The spatial index of Dynamic Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#tree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.tree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * The spatial index of Static Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticTree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.staticTree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * Recycled input for tree searches.\r\n *\r\n * @name Phaser.Physics.Arcade.World#treeMinMax\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldTreeMinMax}\r\n * @since 3.0.0\r\n */\r\n this.treeMinMax = { minX: 0, minY: 0, maxX: 0, maxY: 0 };\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `enableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to create the bodies.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n */\r\n enable: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.enable(child, bodyType);\r\n }\r\n else\r\n {\r\n this.enableBody(child, bodyType);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.enableBody(entry, bodyType);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Creates an Arcade Physics Body on a single Game Object.\r\n *\r\n * If the Game Object already has a body, this method will simply add it back into the simulation.\r\n *\r\n * You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enableBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} object - The Game Object on which to create the body.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object on which the body was created.\r\n */\r\n enableBody: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!object.body)\r\n {\r\n if (bodyType === CONST.DYNAMIC_BODY)\r\n {\r\n object.body = new Body(this, object);\r\n }\r\n else if (bodyType === CONST.STATIC_BODY)\r\n {\r\n object.body = new StaticBody(this, object);\r\n }\r\n }\r\n\r\n this.add(object.body);\r\n\r\n return object;\r\n },\r\n\r\n /**\r\n * Adds an existing Arcade Physics Body or StaticBody to the simulation.\r\n *\r\n * The body is enabled and added to the local search trees.\r\n *\r\n * @method Phaser.Physics.Arcade.World#add\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be added to the simulation.\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} The Body that was added to the simulation.\r\n */\r\n add: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.bodies.set(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.set(body);\r\n\r\n this.staticTree.insert(body);\r\n }\r\n\r\n body.enable = true;\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `disableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to disable the bodies.\r\n */\r\n disable: function (object)\r\n {\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.disable(child);\r\n }\r\n else\r\n {\r\n this.disableBody(child.body);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.disableBody(entry.body);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disableBody\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be disabled.\r\n */\r\n disableBody: function (body)\r\n {\r\n this.remove(body);\r\n\r\n body.enable = false;\r\n },\r\n\r\n /**\r\n * Removes an existing Arcade Physics Body or StaticBody from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enabled` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `enable` or `add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The body to be removed from the simulation.\r\n */\r\n remove: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.tree.remove(body);\r\n this.bodies.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.delete(body);\r\n this.staticTree.remove(body);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object that the world will use to render the debug display to.\r\n *\r\n * This is called automatically when the World is instantiated if the `debug` config property\r\n * was set to `true`. However, you can call it at any point should you need to display the\r\n * debug Graphic from a fixed point.\r\n *\r\n * You can control which objects are drawn to the Graphics object, and the colors they use,\r\n * by setting the debug properties in the physics config.\r\n *\r\n * You should not typically use this in a production game. Use it to aid during debugging.\r\n *\r\n * @method Phaser.Physics.Arcade.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object that was created for use by the World.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the position, size and properties of the World boundary.\r\n *\r\n * The World boundary is an invisible rectangle that defines the edges of the World.\r\n * If a Body is set to collide with the world bounds then it will automatically stop\r\n * when it reaches any of the edges. You can optionally set which edges of the boundary\r\n * should be checked against.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the boundary.\r\n * @param {number} y - The top-left y coordinate of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n * @param {boolean} [checkLeft] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [checkRight] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [checkUp] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [checkDown] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, checkLeft, checkRight, checkUp, checkDown)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n\r\n if (checkLeft !== undefined)\r\n {\r\n this.setBoundsCollision(checkLeft, checkRight, checkUp, checkDown);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables collisions on each edge of the World boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBoundsCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [left=true] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [right=true] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [up=true] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [down=true] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBoundsCollision: function (left, right, up, down)\r\n {\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (up === undefined) { up = true; }\r\n if (down === undefined) { down = true; }\r\n\r\n this.checkCollision.left = left;\r\n this.checkCollision.right = right;\r\n this.checkCollision.up = up;\r\n this.checkCollision.down = down;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses the simulation.\r\n *\r\n * A paused simulation does not update any existing bodies, or run any Colliders.\r\n *\r\n * However, you can still enable and disable bodies within it, or manually run collide or overlap\r\n * checks.\r\n *\r\n * @method Phaser.Physics.Arcade.World#pause\r\n * @fires Phaser.Physics.Arcade.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.isPaused = true;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the simulation, if paused.\r\n *\r\n * @method Phaser.Physics.Arcade.World#resume\r\n * @fires Phaser.Physics.Arcade.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.isPaused = false;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform collision checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.collide` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addCollider\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collide\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addCollider: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, false, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Creates a new Overlap Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform overlap checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.overlap` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addOverlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for overlap.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for overlap.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects overlap. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addOverlap: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, true, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Removes a Collider from the simulation so it is no longer processed.\r\n *\r\n * This method does not destroy the Collider. If you wish to add it back at a later stage you can call\r\n * `World.colliders.add(Collider)`.\r\n *\r\n * If you no longer need the Collider you can call the `Collider.destroy` method instead, which will\r\n * automatically clear all of its references and then remove it from the World. If you call destroy on\r\n * a Collider you _don't_ need to pass it to this method too.\r\n *\r\n * @method Phaser.Physics.Arcade.World#removeCollider\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Collider} collider - The Collider to remove from the simulation.\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n removeCollider: function (collider)\r\n {\r\n this.colliders.remove(collider);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the frame rate to run the simulation at.\r\n *\r\n * The frame rate value is used to simulate a fixed update time step. This fixed\r\n * time step allows for a straightforward implementation of a deterministic game state.\r\n *\r\n * This frame rate is independent of the frequency at which the game is rendering. The\r\n * higher you set the fps, the more physics simulation steps will occur per game step.\r\n * Conversely, the lower you set it, the less will take place.\r\n *\r\n * You can optionally advance the simulation directly yourself by calling the `step` method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setFPS\r\n * @since 3.10.0\r\n *\r\n * @param {integer} framerate - The frame rate to advance the simulation at.\r\n *\r\n * @return {this} This World object.\r\n */\r\n setFPS: function (framerate)\r\n {\r\n this.fps = framerate;\r\n this._frameTime = 1 / this.fps;\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Advances the simulation based on the elapsed time and fps rate.\r\n *\r\n * This is called automatically by your Scene and does not need to be invoked directly.\r\n *\r\n * @method Phaser.Physics.Arcade.World#update\r\n * @protected\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.isPaused || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var fixedDelta = this._frameTime;\r\n var msPerFrame = this._frameTimeMS * this.timeScale;\r\n\r\n this._elapsed += delta;\r\n\r\n // Update all active bodies\r\n var body;\r\n var bodies = this.bodies.entries;\r\n\r\n // Will a step happen this frame?\r\n var willStep = (this._elapsed >= msPerFrame);\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.preUpdate(willStep, fixedDelta);\r\n }\r\n }\r\n\r\n // We know that a step will happen this frame, so let's bundle it all together to save branching and iteration costs\r\n if (willStep)\r\n {\r\n this._elapsed -= msPerFrame;\r\n this.stepsLastFrame = 1;\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n }\r\n\r\n // Process any additional steps this frame\r\n while (this._elapsed >= msPerFrame)\r\n {\r\n this._elapsed -= msPerFrame;\r\n\r\n this.step(fixedDelta);\r\n }\r\n },\r\n\r\n /**\r\n * Advances the simulation by a time increment.\r\n *\r\n * @method Phaser.Physics.Arcade.World#step\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.10.0\r\n *\r\n * @param {number} delta - The delta time amount, in seconds, by which to advance the simulation.\r\n */\r\n step: function (delta)\r\n {\r\n // Update all active bodies\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.update(delta);\r\n }\r\n }\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n\r\n this.stepsLastFrame++;\r\n },\r\n\r\n /**\r\n * Updates bodies, draws the debug display, and handles pending queue operations.\r\n *\r\n * @method Phaser.Physics.Arcade.World#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n var dynamic = this.bodies;\r\n var staticBodies = this.staticBodies;\r\n\r\n // We don't need to postUpdate if there wasn't a step this frame\r\n if (this.stepsLastFrame)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n \r\n if (body.enable)\r\n {\r\n body.postUpdate();\r\n }\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n\r\n bodies = staticBodies.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n\r\n var pending = this.pendingDestroy;\r\n\r\n if (pending.size > 0)\r\n {\r\n var dynamicTree = this.tree;\r\n var staticTree = this.staticTree;\r\n\r\n bodies = pending.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n dynamicTree.remove(body);\r\n dynamic.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n staticTree.remove(body);\r\n staticBodies.delete(body);\r\n }\r\n\r\n body.world = undefined;\r\n body.gameObject = undefined;\r\n }\r\n\r\n pending.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Calculates a Body's velocity and updates its position.\r\n *\r\n * @method Phaser.Physics.Arcade.World#updateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to be updated.\r\n * @param {number} delta - The delta value to be used in the motion calculations, in seconds.\r\n */\r\n updateMotion: function (body, delta)\r\n {\r\n if (body.allowRotation)\r\n {\r\n this.computeAngularVelocity(body, delta);\r\n }\r\n\r\n this.computeVelocity(body, delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeAngularVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeAngularVelocity: function (body, delta)\r\n {\r\n var velocity = body.angularVelocity;\r\n var acceleration = body.angularAcceleration;\r\n var drag = body.angularDrag;\r\n var max = body.maxAngular;\r\n\r\n if (acceleration)\r\n {\r\n velocity += acceleration * delta;\r\n }\r\n else if (body.allowDrag && drag)\r\n {\r\n drag *= delta;\r\n\r\n if (FuzzyGreaterThan(velocity - drag, 0, 0.1))\r\n {\r\n velocity -= drag;\r\n }\r\n else if (FuzzyLessThan(velocity + drag, 0, 0.1))\r\n {\r\n velocity += drag;\r\n }\r\n else\r\n {\r\n velocity = 0;\r\n }\r\n }\r\n\r\n velocity = Clamp(velocity, -max, max);\r\n\r\n var velocityDelta = velocity - body.angularVelocity;\r\n\r\n body.angularVelocity += velocityDelta;\r\n body.rotation += (body.angularVelocity * delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's per-axis velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeVelocity: function (body, delta)\r\n {\r\n var velocityX = body.velocity.x;\r\n var accelerationX = body.acceleration.x;\r\n var dragX = body.drag.x;\r\n var maxX = body.maxVelocity.x;\r\n\r\n var velocityY = body.velocity.y;\r\n var accelerationY = body.acceleration.y;\r\n var dragY = body.drag.y;\r\n var maxY = body.maxVelocity.y;\r\n\r\n var speed = body.speed;\r\n var maxSpeed = body.maxSpeed;\r\n var allowDrag = body.allowDrag;\r\n var useDamping = body.useDamping;\r\n\r\n if (body.allowGravity)\r\n {\r\n velocityX += (this.gravity.x + body.gravity.x) * delta;\r\n velocityY += (this.gravity.y + body.gravity.y) * delta;\r\n }\r\n\r\n if (accelerationX)\r\n {\r\n velocityX += accelerationX * delta;\r\n }\r\n else if (allowDrag && dragX)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n\r\n velocityX *= dragX;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragX *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityX - dragX, 0, 0.01))\r\n {\r\n velocityX -= dragX;\r\n }\r\n else if (FuzzyLessThan(velocityX + dragX, 0, 0.01))\r\n {\r\n velocityX += dragX;\r\n }\r\n else\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n }\r\n\r\n if (accelerationY)\r\n {\r\n velocityY += accelerationY * delta;\r\n }\r\n else if (allowDrag && dragY)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n velocityY *= dragY;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragY *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityY - dragY, 0, 0.01))\r\n {\r\n velocityY -= dragY;\r\n }\r\n else if (FuzzyLessThan(velocityY + dragY, 0, 0.01))\r\n {\r\n velocityY += dragY;\r\n }\r\n else\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n }\r\n\r\n velocityX = Clamp(velocityX, -maxX, maxX);\r\n velocityY = Clamp(velocityY, -maxY, maxY);\r\n\r\n body.velocity.set(velocityX, velocityY);\r\n\r\n if (maxSpeed > -1 && speed > maxSpeed)\r\n {\r\n body.velocity.normalize().scale(maxSpeed);\r\n speed = maxSpeed;\r\n }\r\n\r\n body.speed = speed;\r\n },\r\n\r\n /**\r\n * Separates two Bodies.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separate\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The process callback.\r\n * @param {*} [callbackContext] - The context in which to invoke the callback.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separate: function (body1, body2, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (\r\n !body1.enable ||\r\n !body2.enable ||\r\n body1.checkCollision.none ||\r\n body2.checkCollision.none ||\r\n !this.intersects(body1, body2))\r\n {\r\n return false;\r\n }\r\n\r\n // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort.\r\n if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false)\r\n {\r\n return false;\r\n }\r\n\r\n // Circle vs. Circle quick bail out\r\n if (body1.isCircle && body2.isCircle)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n\r\n // We define the behavior of bodies in a collision circle and rectangle\r\n // If a collision occurs in the corner points of the rectangle, the body behave like circles\r\n\r\n // Either body1 or body2 is a circle\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var bodyRect = (body1.isCircle) ? body2 : body1;\r\n var bodyCircle = (body1.isCircle) ? body1 : body2;\r\n\r\n var rect = {\r\n x: bodyRect.x,\r\n y: bodyRect.y,\r\n right: bodyRect.right,\r\n bottom: bodyRect.bottom\r\n };\r\n\r\n var circle = bodyCircle.center;\r\n\r\n if (circle.y < rect.y || circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x || circle.x > rect.right)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n var resultX = false;\r\n var resultY = false;\r\n\r\n // Do we separate on x or y first?\r\n if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n else\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n\r\n var result = (resultX || resultY);\r\n\r\n if (result)\r\n {\r\n if (overlapOnly)\r\n {\r\n if (body1.onOverlap || body2.onOverlap)\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n else if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Separates two Bodies, when both are circular.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separateCircle\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n * @param {number} [bias] - A small value added to the calculations.\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separateCircle: function (body1, body2, overlapOnly, bias)\r\n {\r\n // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here)\r\n GetOverlapX(body1, body2, false, bias);\r\n GetOverlapY(body1, body2, false, bias);\r\n\r\n var overlap = 0;\r\n\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var rect = {\r\n x: (body2.isCircle) ? body1.position.x : body2.position.x,\r\n y: (body2.isCircle) ? body1.position.y : body2.position.y,\r\n right: (body2.isCircle) ? body1.right : body2.right,\r\n bottom: (body2.isCircle) ? body1.bottom : body2.bottom\r\n };\r\n\r\n var circle = {\r\n x: (body1.isCircle) ? body1.center.x : body2.center.x,\r\n y: (body1.isCircle) ? body1.center.y : body2.center.y,\r\n radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth\r\n };\r\n\r\n if (circle.y < rect.y)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius;\r\n }\r\n }\r\n else if (circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius;\r\n }\r\n }\r\n\r\n overlap *= -1;\r\n }\r\n else\r\n {\r\n overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y);\r\n }\r\n\r\n // Can't separate two immovable bodies, or a body with its own custom separation logic\r\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\r\n {\r\n if (overlap !== 0 && (body1.onOverlap || body2.onOverlap))\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n // return true if there was some overlap, otherwise false\r\n return (overlap !== 0);\r\n }\r\n\r\n var dx = body1.position.x - body2.position.x;\r\n var dy = body1.position.y - body2.position.y;\r\n var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\r\n var nx = ((body2.position.x - body1.position.x) / d) || 0;\r\n var ny = ((body2.position.y - body1.position.y) / d) || 0;\r\n var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass);\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.velocity.x = (body1.velocity.x - p * body1.mass * nx) * body1.bounce.x;\r\n body1.velocity.y = (body1.velocity.y - p * body1.mass * ny) * body1.bounce.y;\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.velocity.x = (body2.velocity.x + p * body2.mass * nx) * body2.bounce.x;\r\n body2.velocity.y = (body2.velocity.y + p * body2.mass * ny) * body2.bounce.y;\r\n }\r\n\r\n var dvx = body2.velocity.x - body1.velocity.x;\r\n var dvy = body2.velocity.y - body1.velocity.y;\r\n var angleCollision = Math.atan2(dvy, dvx);\r\n\r\n var delta = this._frameTime;\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.x += (body1.velocity.x * delta) - overlap * Math.cos(angleCollision);\r\n body1.y += (body1.velocity.y * delta) - overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.x += (body2.velocity.x * delta) + overlap * Math.cos(angleCollision);\r\n body2.y += (body2.velocity.y * delta) + overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if two Bodies intersect at all.\r\n *\r\n * @method Phaser.Physics.Arcade.World#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first body to check.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second body to check.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n intersects: function (body1, body2)\r\n {\r\n if (body1 === body2)\r\n {\r\n return false;\r\n }\r\n\r\n if (!body1.isCircle && !body2.isCircle)\r\n {\r\n // Rect vs. Rect\r\n return !(\r\n body1.right <= body2.position.x ||\r\n body1.bottom <= body2.position.y ||\r\n body1.position.x >= body2.right ||\r\n body1.position.y >= body2.bottom\r\n );\r\n }\r\n else if (body1.isCircle)\r\n {\r\n if (body2.isCircle)\r\n {\r\n // Circle vs. Circle\r\n return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth);\r\n }\r\n else\r\n {\r\n // Circle vs. Rect\r\n return this.circleBodyIntersects(body1, body2);\r\n }\r\n }\r\n else\r\n {\r\n // Rect vs. Circle\r\n return this.circleBodyIntersects(body2, body1);\r\n }\r\n },\r\n\r\n /**\r\n * Tests if a circular Body intersects with another Body.\r\n *\r\n * @method Phaser.Physics.Arcade.World#circleBodyIntersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} circle - The circular body to test.\r\n * @param {Phaser.Physics.Arcade.Body} body - The rectangular body to test.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n circleBodyIntersects: function (circle, body)\r\n {\r\n var x = Clamp(circle.center.x, body.left, body.right);\r\n var y = Clamp(circle.center.y, body.top, body.bottom);\r\n\r\n var dx = (circle.center.x - x) * (circle.center.x - x);\r\n var dy = (circle.center.y - y) * (circle.center.y - y);\r\n\r\n return (dx + dy) <= (circle.halfWidth * circle.halfWidth);\r\n },\r\n\r\n /**\r\n * Tests if Game Objects overlap.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.\r\n * @param {*} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if at least one Game Object overlaps another.\r\n */\r\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\r\n {\r\n if (overlapCallback === undefined) { overlapCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\r\n\r\n return this.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\r\n },\r\n\r\n /**\r\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\r\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\r\n *\r\n * If you don't require separation then use {@link #overlap} instead.\r\n *\r\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\r\n *\r\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\r\n * \r\n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\r\n *\r\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\r\n * objects are passed to it.\r\n *\r\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\r\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\r\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\r\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} `true` if any overlapping Game Objects were separated, otherwise `false`.\r\n */\r\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n return this.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideObjects\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideObjects: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var i;\r\n var j;\r\n\r\n if (object1.isParent && object1.physicsType === undefined)\r\n {\r\n object1 = object1.children.entries;\r\n }\r\n\r\n if (object2 && object2.isParent && object2.physicsType === undefined)\r\n {\r\n object2 = object2.children.entries;\r\n }\r\n\r\n var object1isArray = Array.isArray(object1);\r\n var object2isArray = Array.isArray(object2);\r\n\r\n this._total = 0;\r\n\r\n if (!object1isArray && !object2isArray)\r\n {\r\n // Neither of them are arrays - do this first as it's the most common use-case\r\n this.collideHandler(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (!object1isArray && object2isArray)\r\n {\r\n // Object 2 is an Array\r\n for (i = 0; i < object2.length; i++)\r\n {\r\n this.collideHandler(object1, object2[i], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n else if (object1isArray && !object2isArray)\r\n {\r\n // Object 1 is an Array\r\n if (!object2)\r\n {\r\n // Special case for array vs. self\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n var child = object1[i];\r\n\r\n for (j = i + 1; j < object1.length; j++)\r\n {\r\n if (i === j)\r\n {\r\n continue;\r\n }\r\n\r\n this.collideHandler(child, object1[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n this.collideHandler(object1[i], object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // They're both arrays\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n for (j = 0; j < object2.length; j++)\r\n {\r\n this.collideHandler(object1[i], object2[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n return (this._total > 0);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideHandler\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} collideCallback - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} callbackContext - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideHandler: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n // Collide Group with Self\r\n // Only collide valid objects\r\n if (object2 === undefined && object1.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n\r\n // If neither of the objects are set then bail out\r\n if (!object1 || !object2)\r\n {\r\n return false;\r\n }\r\n\r\n // A Body\r\n if (object1.body)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // GROUPS\r\n else if (object1.isParent)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // TILEMAP LAYERS\r\n else if (object1.isTilemap)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Sprite collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsSprite\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.GameObject} sprite2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (!sprite1.body || !sprite2.body)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.separate(sprite1.body, sprite2.body, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite1, sprite2);\r\n }\r\n\r\n this._total++;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} `true` if the Sprite collided with the given Group, otherwise `false`.\r\n */\r\n collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var bodyA = sprite.body;\r\n\r\n if (group.length === 0 || !bodyA || !bodyA.enable)\r\n {\r\n return;\r\n }\r\n\r\n // Does sprite collide with anything?\r\n\r\n var i;\r\n var len;\r\n var bodyB;\r\n\r\n if (this.useTree)\r\n {\r\n var minMax = this.treeMinMax;\r\n\r\n minMax.minX = bodyA.left;\r\n minMax.minY = bodyA.top;\r\n minMax.maxX = bodyA.right;\r\n minMax.maxY = bodyA.bottom;\r\n\r\n var results = (group.physicsType === CONST.DYNAMIC_BODY) ? this.tree.search(minMax) : this.staticTree.search(minMax);\r\n\r\n len = results.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = results[i];\r\n\r\n if (bodyA === bodyB || !group.contains(bodyB.gameObject))\r\n {\r\n // Skip if comparing against itself, or if bodyB isn't actually part of the Group\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var children = group.getChildren();\r\n var skipIndex = group.children.entries.indexOf(sprite);\r\n\r\n len = children.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = children[i].body;\r\n\r\n if (!bodyB || i === skipIndex || !bodyB.enable)\r\n {\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Group vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsTilemapLayer\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var children = group.getChildren();\r\n\r\n if (children.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var didCollide = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i].body)\r\n {\r\n if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly))\r\n {\r\n didCollide = true;\r\n }\r\n }\r\n }\r\n\r\n return didCollide;\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\r\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n * \r\n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\r\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\r\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\r\n * dynamic maps, this method can prove very useful.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, false, false);\r\n }\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\r\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlapTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, true, false);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilemapLayer\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var body = sprite.body;\r\n\r\n if (!body.enable)\r\n {\r\n return false;\r\n }\r\n\r\n var x = body.position.x;\r\n var y = body.position.y;\r\n var w = body.width;\r\n var h = body.height;\r\n\r\n // TODO: this logic should be encapsulated within the Tilemap API at some point.\r\n // If the maps base tile size differs from the layer's tile size, we need to adjust the\r\n // selection area by the difference between the two.\r\n var layerData = tilemapLayer.layer;\r\n\r\n if (layerData.tileWidth > layerData.baseTileWidth)\r\n {\r\n // The x origin of a tile is the left side, so x and width need to be adjusted.\r\n var xDiff = (layerData.tileWidth - layerData.baseTileWidth) * tilemapLayer.scaleX;\r\n x -= xDiff;\r\n w += xDiff;\r\n }\r\n\r\n if (layerData.tileHeight > layerData.baseTileHeight)\r\n {\r\n // The y origin of a tile is the bottom side, so just the height needs to be adjusted.\r\n var yDiff = (layerData.tileHeight - layerData.baseTileHeight) * tilemapLayer.scaleY;\r\n h += yDiff;\r\n }\r\n\r\n var mapData = tilemapLayer.getTilesWithinWorldXY(x, y, w, h);\r\n\r\n if (mapData.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, mapData, collideCallback, processCallback, callbackContext, overlapOnly, true);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilesHandler\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n * @param {boolean} [isLayer] - Is this check coming from a TilemapLayer or an array of tiles?\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilesHandler: function (sprite, tiles, collideCallback, processCallback, callbackContext, overlapOnly, isLayer)\r\n {\r\n var body = sprite.body;\r\n\r\n var tile;\r\n var tileWorldRect = { left: 0, right: 0, top: 0, bottom: 0 };\r\n var tilemapLayer;\r\n var collision = false;\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tile = tiles[i];\r\n\r\n tilemapLayer = tile.tilemapLayer;\r\n\r\n tileWorldRect.left = tilemapLayer.tileToWorldX(tile.x);\r\n tileWorldRect.top = tilemapLayer.tileToWorldY(tile.y);\r\n\r\n // If the map's base tile size differs from the layer's tile size, only the top of the rect\r\n // needs to be adjusted since its origin is (0, 1).\r\n if (tile.baseHeight !== tile.height)\r\n {\r\n tileWorldRect.top -= (tile.height - tile.baseHeight) * tilemapLayer.scaleY;\r\n }\r\n\r\n tileWorldRect.right = tileWorldRect.left + tile.width * tilemapLayer.scaleX;\r\n tileWorldRect.bottom = tileWorldRect.top + tile.height * tilemapLayer.scaleY;\r\n\r\n if (TileIntersectsBody(tileWorldRect, body)\r\n && (!processCallback || processCallback.call(callbackContext, sprite, tile))\r\n && ProcessTileCallbacks(tile, sprite)\r\n && (overlapOnly || SeparateTile(i, body, tile, tileWorldRect, tilemapLayer, this.TILE_BIAS, isLayer)))\r\n {\r\n this._total++;\r\n\r\n collision = true;\r\n\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite, tile);\r\n }\r\n\r\n if (overlapOnly && body.onOverlap)\r\n {\r\n this.emit(Events.TILE_OVERLAP, sprite, tile, body);\r\n }\r\n else if (body.onCollide)\r\n {\r\n this.emit(Events.TILE_COLLIDE, sprite, tile, body);\r\n }\r\n }\r\n }\r\n\r\n return collision;\r\n },\r\n\r\n /**\r\n * Internal helper for Group vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (group1.length === 0 || group2.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var children = group1.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.collideSpriteVsGroup(children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates (or several objects' coordinates) within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrap\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.\r\n * @param {number} [padding=0] - An amount added to each boundary edge during the operation.\r\n */\r\n wrap: function (object, padding)\r\n {\r\n if (object.body)\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n else if (object.getChildren)\r\n {\r\n this.wrapArray(object.getChildren(), padding);\r\n }\r\n else if (Array.isArray(object))\r\n {\r\n this.wrapArray(object, padding);\r\n }\r\n else\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap each object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapArray\r\n * @since 3.3.0\r\n *\r\n * @param {Array.<*>} objects - An array of objects to be wrapped.\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapArray: function (objects, padding)\r\n {\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n this.wrapObject(objects[i], padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapObject\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Physics Body, or any object with `x` and `y` coordinates\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapObject: function (object, padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n object.x = Wrap(object.x, this.bounds.left - padding, this.bounds.right + padding);\r\n object.y = Wrap(object.y, this.bounds.top - padding, this.bounds.bottom + padding);\r\n },\r\n\r\n /**\r\n * Shuts down the simulation, clearing physics data and removing listeners.\r\n *\r\n * @method Phaser.Physics.Arcade.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.tree.clear();\r\n this.staticTree.clear();\r\n this.bodies.clear();\r\n this.staticBodies.clear();\r\n this.colliders.destroy();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Shuts down the simulation and disconnects it from the current scene.\r\n *\r\n * @method Phaser.Physics.Arcade.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/World.js?")},"./node_modules/phaser/src/physics/arcade/components/Acceleration.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Acceleration\n * @since 3.0.0\n */\nvar Acceleration = {\n\n /**\n * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAcceleration\n * @since 3.0.0\n *\n * @param {number} x - The horizontal acceleration\n * @param {number} [y=x] - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAcceleration: function (x, y)\n {\n this.body.acceleration.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationX\n * @since 3.0.0\n *\n * @param {number} value - The horizontal acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationX: function (value)\n {\n this.body.acceleration.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationY\n * @since 3.0.0\n *\n * @param {number} value - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationY: function (value)\n {\n this.body.acceleration.y = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Acceleration;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Acceleration.js?")},"./node_modules/phaser/src/physics/arcade/components/Angular.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Angular\n * @since 3.0.0\n */\nvar Angular = {\n\n /**\n * Sets the angular velocity of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularVelocity\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular velocity.\n *\n * @return {this} This Game Object.\n */\n setAngularVelocity: function (value)\n {\n this.body.angularVelocity = value;\n\n return this;\n },\n\n /**\n * Sets the angular acceleration of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularAcceleration\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular acceleration.\n *\n * @return {this} This Game Object.\n */\n setAngularAcceleration: function (value)\n {\n this.body.angularAcceleration = value;\n\n return this;\n },\n\n /**\n * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularDrag\n * @since 3.0.0\n *\n * @param {number} value - The amount of drag.\n *\n * @return {this} This Game Object.\n */\n setAngularDrag: function (value)\n {\n this.body.angularDrag = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Angular;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Angular.js?")},"./node_modules/phaser/src/physics/arcade/components/Bounce.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the bounce properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Bounce\n * @since 3.0.0\n */\nvar Bounce = {\n\n /**\n * Sets the bounce values of this body.\n * \n * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.\n * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounce\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n * @param {number} [y=x] - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounce: function (x, y)\n {\n this.body.bounce.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceX: function (value)\n {\n this.body.bounce.x = value;\n\n return this;\n },\n\n /**\n * Sets the vertical bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceY: function (value)\n {\n this.body.bounce.y = value;\n\n return this;\n },\n\n /**\n * Sets whether this Body collides with the world boundary.\n * \n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\n *\n * @return {this} This Game Object.\n */\n setCollideWorldBounds: function (value, bounceX, bounceY)\n {\n this.body.setCollideWorldBounds(value, bounceX, bounceY);\n\n return this;\n }\n\n};\n\nmodule.exports = Bounce;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Bounce.js?")},"./node_modules/phaser/src/physics/arcade/components/Debug.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the debug properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Debug\n * @since 3.0.0\n */\nvar Debug = {\n\n /**\n * Sets the debug values of this body.\n * \n * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.\n * Note that there is a performance cost in drawing debug displays. It should never be used in production.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebug\n * @since 3.0.0\n *\n * @param {boolean} showBody - Set to `true` to have this body render its outline to the debug display.\n * @param {boolean} showVelocity - Set to `true` to have this body render a velocity marker to the debug display.\n * @param {number} bodyColor - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebug: function (showBody, showVelocity, bodyColor)\n {\n this.debugShowBody = showBody;\n this.debugShowVelocity = showVelocity;\n this.debugBodyColor = bodyColor;\n\n return this;\n },\n\n /**\n * Sets the color of the body outline when it renders to the debug display.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebugBodyColor\n * @since 3.0.0\n *\n * @param {number} value - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebugBodyColor: function (value)\n {\n this.body.debugBodyColor = value;\n\n return this;\n },\n\n /**\n * Set to `true` to have this body render its outline to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowBody\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowBody: {\n\n get: function ()\n {\n return this.body.debugShowBody;\n },\n\n set: function (value)\n {\n this.body.debugShowBody = value;\n }\n\n },\n\n /**\n * Set to `true` to have this body render a velocity marker to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowVelocity\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowVelocity: {\n\n get: function ()\n {\n return this.body.debugShowVelocity;\n },\n\n set: function (value)\n {\n this.body.debugShowVelocity = value;\n }\n\n },\n\n /**\n * The color of the body outline when it renders to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugBodyColor\n * @type {number}\n * @since 3.0.0\n */\n debugBodyColor: {\n\n get: function ()\n {\n return this.body.debugBodyColor;\n },\n\n set: function (value)\n {\n this.body.debugBodyColor = value;\n }\n\n }\n\n};\n\nmodule.exports = Debug;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Debug.js?")},"./node_modules/phaser/src/physics/arcade/components/Drag.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the drag properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Drag\n * @since 3.0.0\n */\nvar Drag = {\n\n /**\n * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDrag\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal drag to apply.\n * @param {number} [y=x] - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDrag: function (x, y)\n {\n this.body.drag.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragX: function (value)\n {\n this.body.drag.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragY: function (value)\n {\n this.body.drag.y = value;\n\n return this;\n },\n\n /**\n * If this Body is using `drag` for deceleration this function controls how the drag is applied.\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\n *\n * If you enable this property then you should use far smaller `drag` values than with linear, as\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDamping\n * @since 3.10.0\n *\n * @param {boolean} value - `true` to use damping for deceleration, or `false` to use linear deceleration.\n *\n * @return {this} This Game Object.\n */\n setDamping: function (value)\n {\n this.body.useDamping = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Drag;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Drag.js?")},"./node_modules/phaser/src/physics/arcade/components/Enable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the enable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Enable\n * @since 3.0.0\n */\nvar Enable = {\n\n /**\n * Enables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#enableBody\n * @since 3.0.0\n *\n * @param {boolean} reset - Also reset the Body and place it at (x, y).\n * @param {number} x - The horizontal position to place the Game Object and Body.\n * @param {number} y - The horizontal position to place the Game Object and Body.\n * @param {boolean} enableGameObject - Also activate this Game Object.\n * @param {boolean} showGameObject - Also show this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.Physics.Arcade.Body#reset\n * @see Phaser.Physics.Arcade.StaticBody#reset\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n enableBody: function (reset, x, y, enableGameObject, showGameObject)\n {\n if (reset)\n {\n this.body.reset(x, y);\n }\n\n if (enableGameObject)\n {\n this.body.gameObject.active = true;\n }\n\n if (showGameObject)\n {\n this.body.gameObject.visible = true;\n }\n\n this.body.enable = true;\n\n return this;\n },\n\n /**\n * Stops and disables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#disableBody\n * @since 3.0.0\n *\n * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object.\n * @param {boolean} [hideGameObject=false] - Also hide this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n disableBody: function (disableGameObject, hideGameObject)\n {\n if (disableGameObject === undefined) { disableGameObject = false; }\n if (hideGameObject === undefined) { hideGameObject = false; }\n\n this.body.stop();\n\n this.body.enable = false;\n\n if (disableGameObject)\n {\n this.body.gameObject.active = false;\n }\n\n if (hideGameObject)\n {\n this.body.gameObject.visible = false;\n }\n\n return this;\n },\n\n /**\n * Syncs the Body's position and size with its parent Game Object.\n * You don't need to call this for Dynamic Bodies, as it happens automatically.\n * But for Static bodies it's a useful way of modifying the position of a Static Body\n * in the Physics World, based on its Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#refreshBody\n * @since 3.1.0\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\n */\n refreshBody: function ()\n {\n this.body.updateFromGameObject();\n\n return this;\n }\n\n};\n\nmodule.exports = Enable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Enable.js?")},"./node_modules/phaser/src/physics/arcade/components/Friction.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @namespace Phaser.Physics.Arcade.Components.Friction\n * @since 3.0.0\n */\nvar Friction = {\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFriction\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal friction to apply.\n * @param {number} [y=x] - The amount of vertical friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFriction: function (x, y)\n {\n this.body.friction.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionX: function (x)\n {\n this.body.friction.x = x;\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionY: function (y)\n {\n this.body.friction.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Friction;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Friction.js?")},"./node_modules/phaser/src/physics/arcade/components/Gravity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the gravity properties of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Gravity\n * @since 3.0.0\n */\nvar Gravity = {\n\n /**\n * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect.\n * \n * If only one value is provided, this value will be used for both the X and Y axis.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravity\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n * @param {number} [y=x] - The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used.\n *\n * @return {this} This Game Object.\n */\n setGravity: function (x, y)\n {\n this.body.gravity.set(x, y);\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityX\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityX: function (x)\n {\n this.body.gravity.x = x;\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityY\n * @since 3.0.0\n *\n * @param {number} y - The gravitational force to be applied to the Y-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityY: function (y)\n {\n this.body.gravity.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Gravity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Gravity.js?")},"./node_modules/phaser/src/physics/arcade/components/Immovable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the immovable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Immovable\n * @since 3.0.0\n */\nvar Immovable = {\n\n /**\n * Sets Whether this Body can be moved by collisions with another Body.\n *\n * @method Phaser.Physics.Arcade.Components.Immovable#setImmovable\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - Sets if this body can be moved by collisions with another Body.\n *\n * @return {this} This Game Object.\n */\n setImmovable: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.body.immovable = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Immovable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Immovable.js?")},"./node_modules/phaser/src/physics/arcade/components/Mass.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the mass properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Mass\n * @since 3.0.0\n */\nvar Mass = {\n\n /**\n * Sets the mass of the physics body\n *\n * @method Phaser.Physics.Arcade.Components.Mass#setMass\n * @since 3.0.0\n *\n * @param {number} value - New value for the mass of the body.\n *\n * @return {this} This Game Object.\n */\n setMass: function (value)\n {\n this.body.mass = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Mass;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Mass.js?")},"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js":function(module,exports){eval("/**\r\n * This method will search the given rectangular area and return an array of all physics bodies that\r\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\r\n * \r\n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\r\n * contained within it.\r\n * \r\n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\r\n * otherwise the search is O(N) for Dynamic Bodies.\r\n *\r\n * @function Phaser.Physics.Arcade.Components.OverlapRect\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the area to search within.\r\n * @param {number} y - The top-left y coordinate of the area to search within.\r\n * @param {number} width - The width of the area to search within.\r\n * @param {number} height - The height of the area to search within.\r\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\r\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\r\n */\r\nvar OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic)\r\n{\r\n if (includeDynamic === undefined) { includeDynamic = true; }\r\n if (includeStatic === undefined) { includeStatic = false; }\r\n\r\n var dynamicBodies = [];\r\n var staticBodies = [];\r\n\r\n var minMax = world.treeMinMax;\r\n\r\n minMax.minX = x;\r\n minMax.minY = y;\r\n minMax.maxX = x + width;\r\n minMax.maxY = y + height;\r\n\r\n if (includeStatic)\r\n {\r\n staticBodies = world.staticTree.search(minMax);\r\n }\r\n\r\n if (includeDynamic && world.useTree)\r\n {\r\n dynamicBodies = world.tree.search(minMax);\r\n }\r\n else if (includeDynamic)\r\n {\r\n var bodies = world.bodies;\r\n\r\n var fakeBody =\r\n {\r\n position: {\r\n x: x,\r\n y: y\r\n },\r\n left: x,\r\n top: y,\r\n right: x + width,\r\n bottom: y + height,\r\n isCircle: false\r\n };\r\n\r\n var intersects = world.intersects;\r\n\r\n bodies.iterate(function (target)\r\n {\r\n if (intersects(target, fakeBody))\r\n {\r\n dynamicBodies.push(target);\r\n }\r\n\r\n });\r\n }\r\n\r\n return staticBodies.concat(dynamicBodies);\r\n};\r\n\r\nmodule.exports = OverlapRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/OverlapRect.js?")},"./node_modules/phaser/src/physics/arcade/components/Size.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the size of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Size\n * @since 3.0.0\n */\nvar Size = {\n\n /**\n * Sets the body offset. This allows you to adjust the difference between the center of the body\n * and the x and y coordinates of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setOffset\n * @since 3.0.0\n *\n * @param {number} x - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [y=x] - The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (x, y)\n {\n this.body.setOffset(x, y);\n\n return this;\n },\n\n /**\n * Sets the size of this physics body. Setting the size does not adjust the dimensions\n * of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The new width of the physics body, in pixels.\n * @param {number} height - The new height of the physics body, in pixels.\n * @param {boolean} [center=true] - Should the body be re-positioned so its center aligns with the parent Game Object?\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, center)\n {\n this.body.setSize(width, height, center);\n\n return this;\n },\n\n /**\n * Sets this physics body to use a circle for collision instead of a rectangle.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setCircle\n * @since 3.0.0\n *\n * @param {number} radius - The radius of the physics body, in pixels.\n * @param {number} [offsetX] - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [offsetY] - The amount to offset the body from the parent Game Object along the y-axis.\n *\n * @return {this} This Game Object.\n */\n setCircle: function (radius, offsetX, offsetY)\n {\n this.body.setCircle(radius, offsetX, offsetY);\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Size.js?")},"./node_modules/phaser/src/physics/arcade/components/Velocity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for modifying the velocity of an Arcade Physics body.\n *\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Velocity\n * @since 3.0.0\n */\nvar Velocity = {\n\n /**\n * Sets the velocity of the Body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocity\n * @since 3.0.0\n *\n * @param {number} x - The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left.\n * @param {number} [y=x] - The vertical velocity of the body. Positive values move the body down, while negative values move it up.\n *\n * @return {this} This Game Object.\n */\n setVelocity: function (x, y)\n {\n this.body.setVelocity(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal component of the body's velocity.\n *\n * Positive values move the body to the right, while negative values move it to the left.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityX\n * @since 3.0.0\n *\n * @param {number} x - The new horizontal velocity.\n *\n * @return {this} This Game Object.\n */\n setVelocityX: function (x)\n {\n this.body.setVelocityX(x);\n\n return this;\n },\n\n /**\n * Sets the vertical component of the body's velocity.\n *\n * Positive values move the body down, while negative values move it up.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityY\n * @since 3.0.0\n *\n * @param {number} y - The new vertical velocity of the body.\n *\n * @return {this} This Game Object.\n */\n setVelocityY: function (y)\n {\n this.body.setVelocityY(y);\n\n return this;\n },\n\n /**\n * Sets the maximum velocity of the body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setMaxVelocity\n * @since 3.0.0\n *\n * @param {number} x - The new maximum horizontal velocity.\n * @param {number} [y=x] - The new maximum vertical velocity.\n *\n * @return {this} This Game Object.\n */\n setMaxVelocity: function (x, y)\n {\n this.body.maxVelocity.set(x, y);\n\n return this;\n }\n\n};\n\nmodule.exports = Velocity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Velocity.js?")},"./node_modules/phaser/src/physics/arcade/components/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Components\n */\n\nmodule.exports = {\n\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/arcade/components/Acceleration.js"),\n Angular: __webpack_require__(/*! ./Angular */ "./node_modules/phaser/src/physics/arcade/components/Angular.js"),\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/arcade/components/Bounce.js"),\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/arcade/components/Debug.js"),\n Drag: __webpack_require__(/*! ./Drag */ "./node_modules/phaser/src/physics/arcade/components/Drag.js"),\n Enable: __webpack_require__(/*! ./Enable */ "./node_modules/phaser/src/physics/arcade/components/Enable.js"),\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/arcade/components/Friction.js"),\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/arcade/components/Gravity.js"),\n Immovable: __webpack_require__(/*! ./Immovable */ "./node_modules/phaser/src/physics/arcade/components/Immovable.js"),\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/arcade/components/Mass.js"),\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/physics/arcade/components/Size.js"),\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/arcade/components/Velocity.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/index.js?')},"./node_modules/phaser/src/physics/arcade/const.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Arcade Physics consts.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Dynamic Body.\n *\n * @name Phaser.Physics.Arcade.DYNAMIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.Group#physicsType\n */\n DYNAMIC_BODY: 0,\n\n /**\n * Static Body.\n *\n * @name Phaser.Physics.Arcade.STATIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.StaticBody#physicsType\n */\n STATIC_BODY: 1,\n\n /**\n * Arcade Physics Group containing Dynamic Bodies.\n *\n * @name Phaser.Physics.Arcade.GROUP\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n GROUP: 2,\n\n /**\n * A Tilemap Layer.\n *\n * @name Phaser.Physics.Arcade.TILEMAPLAYER\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n TILEMAPLAYER: 3,\n\n /**\n * Facing no direction (initial value).\n *\n * @name Phaser.Physics.Arcade.FACING_NONE\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_NONE: 10,\n\n /**\n * Facing up.\n *\n * @name Phaser.Physics.Arcade.FACING_UP\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_UP: 11,\n\n /**\n * Facing down.\n *\n * @name Phaser.Physics.Arcade.FACING_DOWN\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_DOWN: 12,\n\n /**\n * Facing left.\n *\n * @name Phaser.Physics.Arcade.FACING_LEFT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_LEFT: 13,\n\n /**\n * Facing right.\n *\n * @name Phaser.Physics.Arcade.FACING_RIGHT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_RIGHT: 14\n\n};\n\nmodule.exports = CONST;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/const.js?")},"./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least\n * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#COLLIDE\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the collision. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the collision. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the collision.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the collision.\n */\nmodule.exports = 'collide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least\n * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#OVERLAP\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the overlap. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the overlap. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the overlap.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the overlap.\n */\nmodule.exports = 'overlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Pause Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it is paused.\n * \n * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Resume Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state.\n * \n * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_\n * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the collision. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body collided with.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the collision.\n */\nmodule.exports = 'tilecollide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_\n * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the overlap. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body overlapped.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the overlap.\n */\nmodule.exports = 'tileoverlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Bounds Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_\n * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_BOUNDS\n * @since 3.0.0\n * \n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body that hit the world bounds.\n * @param {boolean} up - Is the Body blocked up? I.e. collided with the top of the world bounds.\n * @param {boolean} down - Is the Body blocked down? I.e. collided with the bottom of the world bounds.\n * @param {boolean} left - Is the Body blocked left? I.e. collided with the left of the world bounds.\n * @param {boolean} right - Is the Body blocked right? I.e. collided with the right of the world bounds.\n */\nmodule.exports = 'worldbounds';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Step Event.\n * \n * This event is dispatched by an Arcade Physics World instance whenever a physics step is run.\n * It is emitted _after_ the bodies and colliders have been updated.\n * \n * In high framerate settings this can be multiple times per game frame.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_STEP\n * @since 3.18.0\n */\nmodule.exports = 'worldstep';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Events\n */\n\nmodule.exports = {\n\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js"),\n OVERLAP: __webpack_require__(/*! ./OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js"),\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js"),\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js"),\n TILE_COLLIDE: __webpack_require__(/*! ./TILE_COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js"),\n TILE_OVERLAP: __webpack_require__(/*! ./TILE_OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js"),\n WORLD_BOUNDS: __webpack_require__(/*! ./WORLD_BOUNDS_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js"),\n WORLD_STEP: __webpack_require__(/*! ./WORLD_STEP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/index.js?')},"./node_modules/phaser/src/physics/arcade/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\n\n/**\n * @callback ArcadePhysicsCallback\n *\n * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate.\n * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate.\n */\n\n/**\n * @namespace Phaser.Physics.Arcade\n */\n\nvar Arcade = {\n\n ArcadePhysics: __webpack_require__(/*! ./ArcadePhysics */ "./node_modules/phaser/src/physics/arcade/ArcadePhysics.js"),\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/arcade/Body.js"),\n Collider: __webpack_require__(/*! ./Collider */ "./node_modules/phaser/src/physics/arcade/Collider.js"),\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js"),\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/arcade/events/index.js"),\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/arcade/Factory.js"),\n Group: __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js"),\n Image: __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js"),\n Sprite: __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js"),\n StaticBody: __webpack_require__(/*! ./StaticBody */ "./node_modules/phaser/src/physics/arcade/StaticBody.js"),\n StaticGroup: __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js"),\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/arcade/World.js")\n\n};\n\n// Merge in the consts\nArcade = Extend(false, Arcade, CONST);\n\nmodule.exports = Arcade;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/index.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks\n * @since 3.0.0\n *\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to process.\n * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile.\n *\n * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair.\n */\nvar ProcessTileCallbacks = function (tile, sprite)\n{\n // Tile callbacks take priority over layer level callbacks\n if (tile.collisionCallback)\n {\n return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile);\n }\n else if (tile.layer.callbacks[tile.index])\n {\n return !tile.layer.callbacks[tile.index].callback.call(\n tile.layer.callbacks[tile.index].callbackContext, sprite, tile\n );\n }\n\n return true;\n};\n\nmodule.exports = ProcessTileCallbacks;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} x - The x separation amount.\n */\nvar ProcessTileSeparationX = function (body, x)\n{\n if (x < 0)\n {\n body.blocked.none = false;\n body.blocked.left = true;\n }\n else if (x > 0)\n {\n body.blocked.none = false;\n body.blocked.right = true;\n }\n\n body.position.x -= x;\n\n if (body.bounce.x === 0)\n {\n body.velocity.x = 0;\n }\n else\n {\n body.velocity.x = -body.velocity.x * body.bounce.x;\n }\n};\n\nmodule.exports = ProcessTileSeparationX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} y - The y separation amount.\n */\nvar ProcessTileSeparationY = function (body, y)\n{\n if (y < 0)\n {\n body.blocked.none = false;\n body.blocked.up = true;\n }\n else if (y > 0)\n {\n body.blocked.none = false;\n body.blocked.down = true;\n }\n\n body.position.y -= y;\n\n if (body.bounce.y === 0)\n {\n body.velocity.y = 0;\n }\n else\n {\n body.velocity.y = -body.velocity.y * body.bounce.y;\n }\n};\n\nmodule.exports = ProcessTileSeparationY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TileCheckX = __webpack_require__(/*! ./TileCheckX */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js\");\nvar TileCheckY = __webpack_require__(/*! ./TileCheckY */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js\");\nvar TileIntersectsBody = __webpack_require__(/*! ./TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\n\n/**\n * The core separation function to separate a physics body and a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.SeparateTile\n * @since 3.0.0\n *\n * @param {number} i - The index of the tile within the map data.\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against.\n * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile.\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {boolean} `true` if the body was separated, otherwise `false`.\n */\nvar SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer)\n{\n var tileLeft = tileWorldRect.left;\n var tileTop = tileWorldRect.top;\n var tileRight = tileWorldRect.right;\n var tileBottom = tileWorldRect.bottom;\n var faceHorizontal = tile.faceLeft || tile.faceRight;\n var faceVertical = tile.faceTop || tile.faceBottom;\n\n if (!isLayer)\n {\n faceHorizontal = true;\n faceVertical = true;\n }\n\n // We don't need to go any further if this tile doesn't actually have any colliding faces. This\n // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't\n // needed for separation.\n if (!faceHorizontal && !faceVertical)\n {\n return false;\n }\n\n var ox = 0;\n var oy = 0;\n var minX = 0;\n var minY = 1;\n\n if (body.deltaAbsX() > body.deltaAbsY())\n {\n // Moving faster horizontally, check X axis first\n minX = -1;\n }\n else if (body.deltaAbsX() < body.deltaAbsY())\n {\n // Moving faster vertically, check Y axis first\n minY = -1;\n }\n\n if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical)\n {\n // We only need do this if both axes have colliding faces AND we're moving in both\n // directions\n minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft));\n minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop));\n }\n\n if (minX < minY)\n {\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n\n // That's horizontal done, check if we still intersects? If not then we can return now\n if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n }\n }\n else\n {\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n\n // That's vertical done, check if we still intersects? If not then we can return now\n if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n }\n }\n\n return (ox !== 0 || oy !== 0);\n};\n\nmodule.exports = SeparateTile;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationX = __webpack_require__(/*! ./ProcessTileSeparationX */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js");\n\n/**\n * Check the body against the given tile on the X axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileLeft - The left position of the tile within the tile world.\n * @param {number} tileRight - The right position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer)\n{\n var ox = 0;\n\n var faceLeft = tile.faceLeft;\n var faceRight = tile.faceRight;\n var collideLeft = tile.collideLeft;\n var collideRight = tile.collideRight;\n\n if (!isLayer)\n {\n faceLeft = true;\n faceRight = true;\n collideLeft = true;\n collideRight = true;\n }\n\n if (body.deltaX() < 0 && !body.blocked.left && collideRight && body.checkCollision.left)\n {\n // Body is moving LEFT\n if (faceRight && body.x < tileRight)\n {\n ox = body.x - tileRight;\n\n if (ox < -tileBias)\n {\n ox = 0;\n }\n }\n }\n else if (body.deltaX() > 0 && !body.blocked.right && collideLeft && body.checkCollision.right)\n {\n // Body is moving RIGHT\n if (faceLeft && body.right > tileLeft)\n {\n ox = body.right - tileLeft;\n\n if (ox > tileBias)\n {\n ox = 0;\n }\n }\n }\n\n if (ox !== 0)\n {\n if (body.customSeparateX)\n {\n body.overlapX = ox;\n }\n else\n {\n ProcessTileSeparationX(body, ox);\n }\n }\n\n return ox;\n};\n\nmodule.exports = TileCheckX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationY = __webpack_require__(/*! ./ProcessTileSeparationY */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js");\n\n/**\n * Check the body against the given tile on the Y axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileTop - The top position of the tile within the tile world.\n * @param {number} tileBottom - The bottom position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer)\n{\n var oy = 0;\n\n var faceTop = tile.faceTop;\n var faceBottom = tile.faceBottom;\n var collideUp = tile.collideUp;\n var collideDown = tile.collideDown;\n\n if (!isLayer)\n {\n faceTop = true;\n faceBottom = true;\n collideUp = true;\n collideDown = true;\n }\n\n if (body.deltaY() < 0 && !body.blocked.up && collideDown && body.checkCollision.up)\n {\n // Body is moving UP\n if (faceBottom && body.y < tileBottom)\n {\n oy = body.y - tileBottom;\n\n if (oy < -tileBias)\n {\n oy = 0;\n }\n }\n }\n else if (body.deltaY() > 0 && !body.blocked.down && collideUp && body.checkCollision.down)\n {\n // Body is moving DOWN\n if (faceTop && body.bottom > tileTop)\n {\n oy = body.bottom - tileTop;\n\n if (oy > tileBias)\n {\n oy = 0;\n }\n }\n }\n\n if (oy !== 0)\n {\n if (body.customSeparateY)\n {\n body.overlapY = oy;\n }\n else\n {\n ProcessTileSeparationY(body, oy);\n }\n }\n\n return oy;\n};\n\nmodule.exports = TileCheckY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody\n * @since 3.0.0\n *\n * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world.\n * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against.\n *\n * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`.\n */\nvar TileIntersectsBody = function (tileWorldRect, body)\n{\n // Currently, all bodies are treated as rectangles when colliding with a Tile.\n\n return !(\n body.right <= tileWorldRect.left ||\n body.bottom <= tileWorldRect.top ||\n body.position.x >= tileWorldRect.right ||\n body.position.y >= tileWorldRect.bottom\n );\n};\n\nmodule.exports = TileIntersectsBody;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js?")},"./node_modules/phaser/src/physics/impact/Body.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\nvar GetVelocity = __webpack_require__(/*! ./GetVelocity */ "./node_modules/phaser/src/physics/impact/GetVelocity.js");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\nvar UpdateMotion = __webpack_require__(/*! ./UpdateMotion */ "./node_modules/phaser/src/physics/impact/UpdateMotion.js");\r\n\r\n/**\r\n * @callback Phaser.Types.Physics.Impact.BodyUpdateCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * An Impact.js compatible physics body.\r\n * This re-creates the properties you\'d get on an Entity and the math needed to update them.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [sx=16] - [description]\r\n * @param {number} [sy=16] - [description]\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, x, y, sx, sy)\r\n {\r\n if (sx === undefined) { sx = 16; }\r\n if (sy === undefined) { sy = sx; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gameObject = null;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any.\r\n *\r\n * @name Phaser.Physics.Impact.Body#parent\r\n * @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)}\r\n * @since 3.0.0\r\n */\r\n this.parent;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#id\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.id = world.getNextID();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#size\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.size = { x: sx, y: sy };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#offset\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.offset = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#pos\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.pos = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#last\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.last = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#vel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.vel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.accel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#friction\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.friction = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#maxVel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = { x: world.defaults.maxVelocityX, y: world.defaults.maxVelocityY };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#standing\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.standing = false;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gravityFactor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.gravityFactor = world.defaults.gravityFactor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#bounciness\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.bounciness = world.defaults.bounciness;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#minBounceVelocity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.minBounceVelocity = world.defaults.minBounceVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelGround\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelGround = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelAir\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelAir = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#jumpSpeed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.jumpSpeed = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#type\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.type = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#checkAgainst\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.checkAgainst = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#collides\r\n * @type {Phaser.Physics.Impact.COLLIDES}\r\n * @since 3.0.0\r\n */\r\n this.collides = COLLIDES.NEVER;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#updateCallback\r\n * @type {?Phaser.Types.Physics.Impact.BodyUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.updateCallback;\r\n\r\n /**\r\n * min 44 deg, max 136 deg\r\n *\r\n * @name Phaser.Physics.Impact.Body#slopeStanding\r\n * @type {{ min: number, max: number }}\r\n * @since 3.0.0\r\n */\r\n this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 };\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n */\r\n reset: function (x, y)\r\n {\r\n this.pos = { x: x, y: y };\r\n this.last = { x: x, y: y };\r\n this.vel = { x: 0, y: 0 };\r\n this.accel = { x: 0, y: 0 };\r\n this.friction = { x: 0, y: 0 };\r\n this.maxVel = { x: 100, y: 100 };\r\n\r\n this.standing = false;\r\n\r\n this.gravityFactor = 1;\r\n this.bounciness = 0;\r\n this.minBounceVelocity = 40;\r\n\r\n this.accelGround = 0;\r\n this.accelAir = 0;\r\n this.jumpSpeed = 0;\r\n\r\n this.type = TYPE.NONE;\r\n this.checkAgainst = TYPE.NONE;\r\n this.collides = COLLIDES.NEVER;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n var pos = this.pos;\r\n\r\n this.last.x = pos.x;\r\n this.last.y = pos.y;\r\n\r\n this.vel.y += this.world.gravity * delta * this.gravityFactor;\r\n\r\n this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x);\r\n this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y);\r\n\r\n var mx = this.vel.x * delta;\r\n var my = this.vel.y * delta;\r\n\r\n var res = this.world.collisionMap.trace(pos.x, pos.y, mx, my, this.size.x, this.size.y);\r\n\r\n if (this.handleMovementTrace(res))\r\n {\r\n UpdateMotion(this, res);\r\n }\r\n\r\n var go = this.gameObject;\r\n\r\n if (go)\r\n {\r\n go.x = (pos.x - this.offset.x) + go.displayOriginX * go.scaleX;\r\n go.y = (pos.y - this.offset.y) + go.displayOriginY * go.scaleY;\r\n }\r\n\r\n if (this.updateCallback)\r\n {\r\n this.updateCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - [description]\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.pos;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(1, this.debugBodyColor, 1);\r\n graphic.strokeRect(pos.x, pos.y, this.size.x, this.size.y);\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n var x = pos.x + this.size.x / 2;\r\n var y = pos.y + this.size.y / 2;\r\n\r\n graphic.lineStyle(1, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#skipHash\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n skipHash: function ()\r\n {\r\n return (!this.enabled || (this.type === 0 && this.checkAgainst === 0 && this.collides === 0));\r\n },\r\n\r\n /**\r\n * Determines whether the body collides with the `other` one or not.\r\n *\r\n * @method Phaser.Physics.Impact.Body#touches\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n touches: function (other)\r\n {\r\n return !(\r\n this.pos.x >= other.pos.x + other.size.x ||\r\n this.pos.x + this.size.x <= other.pos.x ||\r\n this.pos.y >= other.pos.y + other.size.y ||\r\n this.pos.y + this.size.y <= other.pos.y\r\n );\r\n },\r\n\r\n /**\r\n * Reset the size and position of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Body#resetSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to position the body.\r\n * @param {number} y - The y coordinate to position the body.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.Body} This Body object.\r\n */\r\n resetSize: function (x, y, width, height)\r\n {\r\n this.pos.x = x;\r\n this.pos.y = y;\r\n this.size.x = width;\r\n this.size.y = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Export this body object to JSON.\r\n *\r\n * @method Phaser.Physics.Impact.Body#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Physics.Impact.JSONImpactBody} JSON representation of this body object.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n size: { x: this.size.x, y: this.size.y },\r\n pos: { x: this.pos.x, y: this.pos.y },\r\n vel: { x: this.vel.x, y: this.vel.y },\r\n accel: { x: this.accel.x, y: this.accel.y },\r\n friction: { x: this.friction.x, y: this.friction.y },\r\n maxVel: { x: this.maxVel.x, y: this.maxVel.y },\r\n gravityFactor: this.gravityFactor,\r\n bounciness: this.bounciness,\r\n minBounceVelocity: this.minBounceVelocity,\r\n type: this.type,\r\n checkAgainst: this.checkAgainst,\r\n collides: this.collides\r\n };\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#fromJSON\r\n * @todo Code it!\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n */\r\n fromJSON: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#check\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n */\r\n check: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#collideWith\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n collideWith: function (other, axis)\r\n {\r\n if (this.parent && this.parent._collideCallback)\r\n {\r\n this.parent._collideCallback.call(this.parent._callbackScope, this, other, axis);\r\n }\r\n },\r\n\r\n /**\r\n * Can be overridden by user code but must return a boolean.\r\n *\r\n * @method Phaser.Physics.Impact.Body#handleMovementTrace\r\n * @since 3.0.0\r\n *\r\n * @param {number} res - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n handleMovementTrace: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.remove(this);\r\n\r\n this.enabled = false;\r\n\r\n this.world = null;\r\n\r\n this.gameObject = null;\r\n\r\n this.parent = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Body.js?')},"./node_modules/phaser/src/physics/impact/COLLIDES.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.COLLIDES\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Never collides.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.NEVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEVER: 0,\r\n\r\n /**\r\n * Lite collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.LITE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LITE: 1,\r\n\r\n /**\r\n * Passive collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.PASSIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PASSIVE: 2,\r\n\r\n /**\r\n * Active collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.ACTIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 4,\r\n\r\n /**\r\n * Fixed collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.FIXED\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n FIXED: 8\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/COLLIDES.js?')},"./node_modules/phaser/src/physics/impact/CollisionMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DefaultDefs = __webpack_require__(/*! ./DefaultDefs */ "./node_modules/phaser/src/physics/impact/DefaultDefs.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CollisionMap\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tilesize=32] - [description]\r\n * @param {array} [data] - [description]\r\n */\r\nvar CollisionMap = new Class({\r\n\r\n initialize:\r\n\r\n function CollisionMap (tilesize, data)\r\n {\r\n if (tilesize === undefined) { tilesize = 32; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tilesize\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.0.0\r\n */\r\n this.tilesize = tilesize;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#data\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.data = (Array.isArray(data)) ? data : [];\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = (Array.isArray(data)) ? data[0].length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = (Array.isArray(data)) ? data.length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#lastSlope\r\n * @type {integer}\r\n * @default 55\r\n * @since 3.0.0\r\n */\r\n this.lastSlope = 55;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tiledef\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tiledef = DefaultDefs;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#trace\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} objectWidth - [description]\r\n * @param {number} objectHeight - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n trace: function (x, y, vx, vy, objectWidth, objectHeight)\r\n {\r\n // Set up the trace-result\r\n var res = {\r\n collision: { x: false, y: false, slope: false },\r\n pos: { x: x + vx, y: y + vy },\r\n tile: { x: 0, y: 0 }\r\n };\r\n\r\n if (!this.data)\r\n {\r\n return res;\r\n }\r\n \r\n var steps = Math.ceil(Math.max(Math.abs(vx), Math.abs(vy)) / this.tilesize);\r\n\r\n if (steps > 1)\r\n {\r\n var sx = vx / steps;\r\n var sy = vy / steps;\r\n \r\n for (var i = 0; i < steps && (sx || sy); i++)\r\n {\r\n this.step(res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i);\r\n \r\n x = res.pos.x;\r\n y = res.pos.y;\r\n\r\n if (res.collision.x)\r\n {\r\n sx = 0;\r\n vx = 0;\r\n }\r\n\r\n if (res.collision.y)\r\n {\r\n sy = 0;\r\n vy = 0;\r\n }\r\n\r\n if (res.collision.slope)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.step(res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0);\r\n }\r\n \r\n return res;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#step\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} rvx - [description]\r\n * @param {number} rvy - [description]\r\n * @param {number} step - [description]\r\n */\r\n step: function (res, x, y, vx, vy, width, height, rvx, rvy, step)\r\n {\r\n var t = 0;\r\n var tileX;\r\n var tileY;\r\n var tilesize = this.tilesize;\r\n var mapWidth = this.width;\r\n var mapHeight = this.height;\r\n \r\n // Horizontal\r\n if (vx)\r\n {\r\n var pxOffsetX = (vx > 0 ? width : 0);\r\n var tileOffsetX = (vx < 0 ? tilesize : 0);\r\n \r\n var firstTileY = Math.max(Math.floor(y / tilesize), 0);\r\n var lastTileY = Math.min(Math.ceil((y + height) / tilesize), mapHeight);\r\n \r\n tileX = Math.floor((res.pos.x + pxOffsetX) / tilesize);\r\n\r\n var prevTileX = Math.floor((x + pxOffsetX) / tilesize);\r\n\r\n if (step > 0 || tileX === prevTileX || prevTileX < 0 || prevTileX >= mapWidth)\r\n {\r\n prevTileX = -1;\r\n }\r\n \r\n if (tileX >= 0 && tileX < mapWidth)\r\n {\r\n for (tileY = firstTileY; tileY < lastTileY; tileY++)\r\n {\r\n if (prevTileX !== -1)\r\n {\r\n t = this.data[tileY][prevTileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.x = true;\r\n res.tile.x = t;\r\n res.pos.x = (tileX * tilesize) - pxOffsetX + tileOffsetX;\r\n x = res.pos.x;\r\n rvx = 0;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Vertical\r\n if (vy)\r\n {\r\n var pxOffsetY = (vy > 0 ? height : 0);\r\n var tileOffsetY = (vy < 0 ? tilesize : 0);\r\n \r\n var firstTileX = Math.max(Math.floor(res.pos.x / tilesize), 0);\r\n var lastTileX = Math.min(Math.ceil((res.pos.x + width) / tilesize), mapWidth);\r\n \r\n tileY = Math.floor((res.pos.y + pxOffsetY) / tilesize);\r\n \r\n var prevTileY = Math.floor((y + pxOffsetY) / tilesize);\r\n\r\n if (step > 0 || tileY === prevTileY || prevTileY < 0 || prevTileY >= mapHeight)\r\n {\r\n prevTileY = -1;\r\n }\r\n \r\n if (tileY >= 0 && tileY < mapHeight)\r\n {\r\n for (tileX = firstTileX; tileX < lastTileX; tileX++)\r\n {\r\n if (prevTileY !== -1)\r\n {\r\n t = this.data[prevTileY][tileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.y = true;\r\n res.tile.y = t;\r\n res.pos.y = tileY * tilesize - pxOffsetY + tileOffsetY;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#checkDef\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} t - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} tileX - [description]\r\n * @param {number} tileY - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n checkDef: function (res, t, x, y, vx, vy, width, height, tileX, tileY)\r\n {\r\n var def = this.tiledef[t];\r\n\r\n if (!def)\r\n {\r\n return false;\r\n }\r\n\r\n var tilesize = this.tilesize;\r\n \r\n var lx = (tileX + def[0]) * tilesize;\r\n var ly = (tileY + def[1]) * tilesize;\r\n var lvx = (def[2] - def[0]) * tilesize;\r\n var lvy = (def[3] - def[1]) * tilesize;\r\n var solid = def[4];\r\n \r\n var tx = x + vx + (lvy < 0 ? width : 0) - lx;\r\n var ty = y + vy + (lvx > 0 ? height : 0) - ly;\r\n \r\n if (lvx * ty - lvy * tx > 0)\r\n {\r\n if (vx * -lvy + vy * lvx < 0)\r\n {\r\n return solid;\r\n }\r\n \r\n var length = Math.sqrt(lvx * lvx + lvy * lvy);\r\n var nx = lvy / length;\r\n var ny = -lvx / length;\r\n \r\n var proj = tx * nx + ty * ny;\r\n var px = nx * proj;\r\n var py = ny * proj;\r\n \r\n if (px * px + py * py >= vx * vx + vy * vy)\r\n {\r\n return solid || (lvx * (ty - vy) - lvy * (tx - vx) < 0.5);\r\n }\r\n \r\n res.pos.x = x + vx - px;\r\n res.pos.y = y + vy - py;\r\n res.collision.slope = { x: lvx, y: lvy, nx: nx, ny: ny };\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CollisionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/CollisionMap.js?')},"./node_modules/phaser/src/physics/impact/DefaultDefs.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar H = 0.5;\r\nvar N = 1 / 3;\r\nvar M = 2 / 3;\r\n\r\n// Tile ID to Slope defs.\r\n// First 4 elements = line data, final = solid or non-solid behind the line\r\n \r\nmodule.exports = {\r\n\r\n 2: [ 0, 1, 1, 0, true ],\r\n 3: [ 0, 1, 1, H, true ],\r\n 4: [ 0, H, 1, 0, true ],\r\n 5: [ 0, 1, 1, M, true ],\r\n 6: [ 0, M, 1, N, true ],\r\n 7: [ 0, N, 1, 0, true ],\r\n 8: [ H, 1, 0, 0, true ],\r\n 9: [ 1, 0, H, 1, true ],\r\n 10: [ H, 1, 1, 0, true ],\r\n 11: [ 0, 0, H, 1, true ],\r\n 12: [ 0, 0, 1, 0, false ],\r\n 13: [ 1, 1, 0, 0, true ],\r\n 14: [ 1, H, 0, 0, true ],\r\n 15: [ 1, 1, 0, H, true ],\r\n 16: [ 1, N, 0, 0, true ],\r\n 17: [ 1, M, 0, N, true ],\r\n 18: [ 1, 1, 0, M, true ],\r\n 19: [ 1, 1, H, 0, true ],\r\n 20: [ H, 0, 0, 1, true ],\r\n 21: [ 0, 1, H, 0, true ],\r\n 22: [ H, 0, 1, 1, true ],\r\n 23: [ 1, 1, 0, 1, false ],\r\n 24: [ 0, 0, 1, 1, true ],\r\n 25: [ 0, 0, 1, H, true ],\r\n 26: [ 0, H, 1, 1, true ],\r\n 27: [ 0, 0, 1, N, true ],\r\n 28: [ 0, N, 1, M, true ],\r\n 29: [ 0, M, 1, 1, true ],\r\n 30: [ N, 1, 0, 0, true ],\r\n 31: [ 1, 0, M, 1, true ],\r\n 32: [ M, 1, 1, 0, true ],\r\n 33: [ 0, 0, N, 1, true ],\r\n 34: [ 1, 0, 1, 1, false ],\r\n 35: [ 1, 0, 0, 1, true ],\r\n 36: [ 1, H, 0, 1, true ],\r\n 37: [ 1, 0, 0, H, true ],\r\n 38: [ 1, M, 0, 1, true ],\r\n 39: [ 1, N, 0, M, true ],\r\n 40: [ 1, 0, 0, N, true ],\r\n 41: [ M, 1, N, 0, true ],\r\n 42: [ M, 0, N, 1, true ],\r\n 43: [ N, 1, M, 0, true ],\r\n 44: [ N, 0, M, 1, true ],\r\n 45: [ 0, 1, 0, 0, false ],\r\n 52: [ 1, 1, M, 0, true ],\r\n 53: [ N, 0, 0, 1, true ],\r\n 54: [ 0, 1, N, 0, true ],\r\n 55: [ M, 0, 1, 1, true ]\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/DefaultDefs.js?")},"./node_modules/phaser/src/physics/impact/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar ImpactBody = __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js");\r\nvar ImpactImage = __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js");\r\nvar ImpactSprite = __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects.\r\n * Objects that are created by this Factory are automatically added to the physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - A reference to the Impact Physics world.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * A reference to the Impact Physics world.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Impact Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactBody object and adds it to the physics simulation.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#body\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the physics world.\r\n * @param {number} y - The vertical position of the body in the physics world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactBody} The ImpactBody object that was created.\r\n */\r\n body: function (x, y, width, height)\r\n {\r\n return new ImpactBody(this.world, x, y, width, height);\r\n },\r\n\r\n /**\r\n * Adds an Impact Physics Body to the given Game Object.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to receive the physics body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object.\r\n */\r\n existing: function (gameObject)\r\n {\r\n var x = gameObject.x - gameObject.frame.centerX;\r\n var y = gameObject.y - gameObject.frame.centerY;\r\n var w = gameObject.width;\r\n var h = gameObject.height;\r\n\r\n gameObject.body = this.world.create(x, y, w, h);\r\n\r\n gameObject.body.parent = gameObject;\r\n gameObject.body.gameObject = gameObject;\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactImage object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created.\r\n */\r\n image: function (x, y, key, frame)\r\n {\r\n var image = new ImpactImage(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactSprite object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created.\r\n */\r\n sprite: function (x, y, key, frame)\r\n {\r\n var sprite = new ImpactSprite(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Factory.js?')},"./node_modules/phaser/src/physics/impact/GetVelocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Impact.GetVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n * @param {number} vel - [description]\r\n * @param {number} accel - [description]\r\n * @param {number} friction - [description]\r\n * @param {number} max - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar GetVelocity = function (delta, vel, accel, friction, max)\r\n{\r\n if (accel)\r\n {\r\n return Clamp(vel + accel * delta, -max, max);\r\n }\r\n else if (friction)\r\n {\r\n var frictionDelta = friction * delta;\r\n \r\n if (vel - frictionDelta > 0)\r\n {\r\n return vel - frictionDelta;\r\n }\r\n else if (vel + frictionDelta < 0)\r\n {\r\n return vel + frictionDelta;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n return Clamp(vel, -max, max);\r\n};\r\n\r\nmodule.exports = GetVelocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/GetVelocity.js?')},"./node_modules/phaser/src/physics/impact/ImpactBody.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactBody\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - x - The horizontal position of this physics body in the world.\r\n * @param {number} y - y - The vertical position of this physics body in the world.\r\n * @param {number} width - The width of the physics body in the world.\r\n * @param {number} height - [description]\r\n */\r\nvar ImpactBody = new Class({\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactBody (world, x, y, width, height)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x, y, width, height);\r\n\r\n this.body.parent = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactBody.js?')},"./node_modules/phaser/src/physics/impact/ImpactImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class ImpactImage\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The physics world of the Impact physics system.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactImage (world, x, y, texture, frame)\r\n {\r\n Image.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * The Physics Body linked to an ImpactImage.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * The size of the physics Body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * The X and Y offset of the Body from the left and top of the Image.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * The velocity, or rate of change the Body\'s position. Measured in pixels per second.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * The acceleration is the rate of change of the velocity. Measured in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * Friction between colliding bodies.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * The maximum velocity of the body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactImage.js?')},"./node_modules/phaser/src/physics/impact/ImpactPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactPhysics\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar ImpactPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function ImpactPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#add\r\n * @type {Phaser.Physics.Impact.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'impact\', {}),\r\n GetFastValue(gameConfig, \'impact\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'ImpactPhysics\', ImpactPhysics, \'impactPhysics\');\r\n\r\nmodule.exports = ImpactPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactPhysics.js?')},"./node_modules/phaser/src/physics/impact/ImpactSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class ImpactSprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactSprite (world, x, y, texture, frame)\r\n {\r\n Sprite.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactSprite.js?')},"./node_modules/phaser/src/physics/impact/SeparateX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} left - [description]\n * @param {Phaser.Physics.Impact.Body} right - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateX = function (world, left, right, weak)\n{\n var nudge = left.pos.x + left.size.x - right.pos.x;\n \n // We have a weak entity, so just move this one\n if (weak)\n {\n var strong = (left === weak) ? right : left;\n\n weak.vel.x = -weak.vel.x * weak.bounciness + strong.vel.x;\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, weak === left ? -nudge : nudge, 0, weak.size.x, weak.size.y);\n\n weak.pos.x = resWeak.pos.x;\n }\n else\n {\n var v2 = (left.vel.x - right.vel.x) / 2;\n\n left.vel.x = -v2;\n right.vel.x = v2;\n \n var resLeft = world.collisionMap.trace(left.pos.x, left.pos.y, -nudge / 2, 0, left.size.x, left.size.y);\n\n left.pos.x = Math.floor(resLeft.pos.x);\n \n var resRight = world.collisionMap.trace(right.pos.x, right.pos.y, nudge / 2, 0, right.size.x, right.size.y);\n\n right.pos.x = Math.ceil(resRight.pos.x);\n }\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateX.js?")},"./node_modules/phaser/src/physics/impact/SeparateY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} top - [description]\n * @param {Phaser.Physics.Impact.Body} bottom - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateY = function (world, top, bottom, weak)\n{\n var nudge = (top.pos.y + top.size.y - bottom.pos.y);\n var nudgeX;\n var resTop;\n \n if (weak)\n {\n var strong = (top === weak) ? bottom : top;\n\n weak.vel.y = -weak.vel.y * weak.bounciness + strong.vel.y;\n \n // Riding on a platform?\n nudgeX = 0;\n\n if (weak === top && Math.abs(weak.vel.y - strong.vel.y) < weak.minBounceVelocity)\n {\n weak.standing = true;\n nudgeX = strong.vel.x * world.delta;\n }\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, nudgeX, weak === top ? -nudge : nudge, weak.size.x, weak.size.y);\n\n weak.pos.y = resWeak.pos.y;\n weak.pos.x = resWeak.pos.x;\n }\n else if (world.gravity && (bottom.standing || top.vel.y > 0))\n {\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, 0, -(top.pos.y + top.size.y - bottom.pos.y), top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n if (top.bounciness > 0 && top.vel.y > top.minBounceVelocity)\n {\n top.vel.y *= -top.bounciness;\n }\n else\n {\n top.standing = true;\n top.vel.y = 0;\n }\n }\n else\n {\n var v2 = (top.vel.y - bottom.vel.y) / 2;\n\n top.vel.y = -v2;\n bottom.vel.y = v2;\n \n nudgeX = bottom.vel.x * world.delta;\n\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, nudgeX, -nudge / 2, top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n var resBottom = world.collisionMap.trace(bottom.pos.x, bottom.pos.y, 0, nudge / 2, bottom.size.x, bottom.size.y);\n\n bottom.pos.y = resBottom.pos.y;\n }\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateY.js?")},"./node_modules/phaser/src/physics/impact/Solver.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/impact/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/impact/SeparateY.js\");\r\n\r\n/**\r\n * Impact Physics Solver\r\n *\r\n * @function Phaser.Physics.Impact.Solver\r\n * @fires Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The Impact simulation to run the solver in.\r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body in the collision.\r\n */\r\nvar Solver = function (world, bodyA, bodyB)\r\n{\r\n var weak = null;\r\n\r\n if (bodyA.collides === COLLIDES.LITE || bodyB.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyA;\r\n }\r\n else if (bodyB.collides === COLLIDES.LITE || bodyA.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyB;\r\n }\r\n\r\n if (bodyA.last.x + bodyA.size.x > bodyB.last.x && bodyA.last.x < bodyB.last.x + bodyB.size.x)\r\n {\r\n if (bodyA.last.y < bodyB.last.y)\r\n {\r\n SeparateY(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateY(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'y');\r\n bodyB.collideWith(bodyA, 'y');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'y');\r\n }\r\n else if (bodyA.last.y + bodyA.size.y > bodyB.last.y && bodyA.last.y < bodyB.last.y + bodyB.size.y)\r\n {\r\n if (bodyA.last.x < bodyB.last.x)\r\n {\r\n SeparateX(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateX(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'x');\r\n bodyB.collideWith(bodyA, 'x');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'x');\r\n }\r\n};\r\n\r\nmodule.exports = Solver;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Solver.js?")},"./node_modules/phaser/src/physics/impact/TYPE.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.TYPE\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Collides with nothing.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * Type A. Collides with Type B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.A\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n A: 1,\r\n\r\n /**\r\n * Type B. Collides with Type A.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.B\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n B: 2,\r\n\r\n /**\r\n * Collides with both types A and B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n BOTH: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/TYPE.js?')},"./node_modules/phaser/src/physics/impact/UpdateMotion.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set up the trace-result\r\n * var res = {\r\n * collision: {x: false, y: false, slope: false},\r\n * pos: {x: x, y: y},\r\n * tile: {x: 0, y: 0}\r\n * };\r\n *\r\n * @function Phaser.Physics.Impact.UpdateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} res - [description]\r\n */\r\nvar UpdateMotion = function (body, res)\r\n{\r\n body.standing = false;\r\n\r\n // Y\r\n if (res.collision.y)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.y) > body.minBounceVelocity)\r\n {\r\n body.vel.y *= -body.bounciness;\r\n }\r\n else\r\n {\r\n if (body.vel.y > 0)\r\n {\r\n body.standing = true;\r\n }\r\n\r\n body.vel.y = 0;\r\n }\r\n }\r\n\r\n // X\r\n if (res.collision.x)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.x) > body.minBounceVelocity)\r\n {\r\n body.vel.x *= -body.bounciness;\r\n }\r\n else\r\n {\r\n body.vel.x = 0;\r\n }\r\n }\r\n\r\n // SLOPE\r\n if (res.collision.slope)\r\n {\r\n var s = res.collision.slope;\r\n \r\n if (body.bounciness > 0)\r\n {\r\n var proj = body.vel.x * s.nx + body.vel.y * s.ny;\r\n\r\n body.vel.x = (body.vel.x - s.nx * proj * 2) * body.bounciness;\r\n body.vel.y = (body.vel.y - s.ny * proj * 2) * body.bounciness;\r\n }\r\n else\r\n {\r\n var lengthSquared = s.x * s.x + s.y * s.y;\r\n var dot = (body.vel.x * s.x + body.vel.y * s.y) / lengthSquared;\r\n \r\n body.vel.x = s.x * dot;\r\n body.vel.y = s.y * dot;\r\n \r\n var angle = Math.atan2(s.x, s.y);\r\n\r\n if (angle > body.slopeStanding.min && angle < body.slopeStanding.max)\r\n {\r\n body.standing = true;\r\n }\r\n }\r\n }\r\n\r\n body.pos.x = res.pos.x;\r\n body.pos.y = res.pos.y;\r\n};\r\n\r\nmodule.exports = UpdateMotion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/UpdateMotion.js?")},"./node_modules/phaser/src/physics/impact/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/impact/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar CollisionMap = __webpack_require__(/*! ./CollisionMap */ \"./node_modules/phaser/src/physics/impact/CollisionMap.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Solver = __webpack_require__(/*! ./Solver */ \"./node_modules/phaser/src/physics/impact/Solver.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ \"./node_modules/phaser/src/physics/impact/TYPE.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Impact World instance belongs.\r\n * @param {Phaser.Types.Physics.Impact.WorldConfig} config - [description]\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#gravity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.gravity = GetFastValue(config, 'gravity', 0);\r\n\r\n /**\r\n * Spatial hash cell dimensions\r\n *\r\n * @name Phaser.Physics.Impact.World#cellSize\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.cellSize = GetFastValue(config, 'cellSize', 64);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#collisionMap\r\n * @type {Phaser.Physics.Impact.CollisionMap}\r\n * @since 3.0.0\r\n */\r\n this.collisionMap = new CollisionMap();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * Impacts maximum time step is 20 fps.\r\n *\r\n * @name Phaser.Physics.Impact.World#maxStep\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.maxStep = GetFastValue(config, 'maxStep', 0.05);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#drawDebug\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetFastValue(config, 'debug', false);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n var _maxVelocity = GetFastValue(config, 'maxVelocity', 100);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#defaults\r\n * @type {Phaser.Types.Physics.Impact.WorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n maxVelocityX: GetFastValue(config, 'maxVelocityX', _maxVelocity),\r\n maxVelocityY: GetFastValue(config, 'maxVelocityY', _maxVelocity),\r\n minBounceVelocity: GetFastValue(config, 'minBounceVelocity', 40),\r\n gravityFactor: GetFastValue(config, 'gravityFactor', 1),\r\n bounciness: GetFastValue(config, 'bounciness', 0)\r\n };\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Impact.World#walls\r\n * @type {Phaser.Types.Physics.Impact.WorldWalls}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#delta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#_lastId\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._lastId = 0;\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from\r\n * a 2D array. If loading from a Weltmeister level, the map must have a layer called \"collision\".\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMap\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer[][])} key - Either a string key that corresponds to a Weltmeister level\r\n * in the cache, or a 2D array of collision IDs.\r\n * @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister\r\n * level in the cache.\r\n *\r\n * @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to\r\n * create the CollisionMap.\r\n */\r\n setCollisionMap: function (key, tileSize)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n var tilemapData = this.scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData || tilemapData.format !== TILEMAP_FORMATS.WELTMEISTER)\r\n {\r\n console.warn('The specified key does not correspond to a Weltmeister tilemap: ' + key);\r\n return null;\r\n }\r\n\r\n var layers = tilemapData.data.layer;\r\n var collisionLayer;\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].name === 'collision')\r\n {\r\n collisionLayer = layers[i];\r\n break;\r\n }\r\n }\r\n\r\n if (tileSize === undefined) { tileSize = collisionLayer.tilesize; }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionLayer.data);\r\n }\r\n else if (Array.isArray(key))\r\n {\r\n this.collisionMap = new CollisionMap(tileSize, key);\r\n }\r\n else\r\n {\r\n console.warn('Invalid Weltmeister collision map data: ' + key);\r\n }\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as\r\n * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of\r\n * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can\r\n * manually create a slopeMap that stores the mapping between tile indices and slope IDs.\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use.\r\n * @param {Phaser.Types.Physics.Impact.CollisionOptions} [options] - Options for controlling the mapping from tiles to slope IDs.\r\n *\r\n * @return {Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap.\r\n */\r\n setCollisionMapFromTilemapLayer: function (tilemapLayer, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n var slopeProperty = GetFastValue(options, 'slopeProperty', null);\r\n var slopeMap = GetFastValue(options, 'slopeMap', null);\r\n var collidingSlope = GetFastValue(options, 'defaultCollidingSlope', null);\r\n var nonCollidingSlope = GetFastValue(options, 'defaultNonCollidingSlope', 0);\r\n\r\n var layerData = tilemapLayer.layer;\r\n var tileSize = layerData.baseTileWidth;\r\n var collisionData = [];\r\n\r\n for (var ty = 0; ty < layerData.height; ty++)\r\n {\r\n collisionData[ty] = [];\r\n\r\n for (var tx = 0; tx < layerData.width; tx++)\r\n {\r\n var tile = layerData.data[ty][tx];\r\n\r\n if (tile && tile.collides)\r\n {\r\n if (slopeProperty !== null && HasValue(tile.properties, slopeProperty))\r\n {\r\n collisionData[ty][tx] = parseInt(tile.properties[slopeProperty], 10);\r\n }\r\n else if (slopeMap !== null && HasValue(slopeMap, tile.index))\r\n {\r\n collisionData[ty][tx] = slopeMap[tile.index];\r\n }\r\n else if (collidingSlope !== null)\r\n {\r\n collisionData[ty][tx] = collidingSlope;\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = tile.index;\r\n }\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = nonCollidingSlope;\r\n }\r\n }\r\n }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionData);\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Impact.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=64] - [description]\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 64; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y, thickness, height);\r\n this.updateWall(right, 'right', x + width, y, thickness, height);\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * position = 'left', 'right', 'top' or 'bottom'\r\n *\r\n * @method Phaser.Physics.Impact.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n wall.resetSize(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.walls[position] = this.create(x, y, width, height);\r\n this.walls[position].name = position;\r\n this.walls[position].gravityFactor = 0;\r\n this.walls[position].collides = COLLIDES.FIXED;\r\n }\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n this.bodies.remove(wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object used for debug display and enables the world for debug drawing.\r\n *\r\n * @method Phaser.Physics.Impact.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object created that will have the debug visuals drawn to it.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#getNextID\r\n * @since 3.0.0\r\n *\r\n * @return {integer} [description]\r\n */\r\n getNextID: function ()\r\n {\r\n return this._lastId++;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} sizeX - [description]\r\n * @param {number} sizeY - [description]\r\n *\r\n * @return {Phaser.Physics.Impact.Body} The Body that was added to this World.\r\n */\r\n create: function (x, y, sizeX, sizeY)\r\n {\r\n var body = new Body(this, x, y, sizeX, sizeY);\r\n\r\n this.bodies.set(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} object - The Body to remove from this World.\r\n */\r\n remove: function (object)\r\n {\r\n this.bodies.delete(object);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#pause\r\n * @fires Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#resume\r\n * @fires Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.enabled || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum\r\n\r\n var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale;\r\n\r\n this.delta = clampedDelta;\r\n\r\n // Update all active bodies\r\n\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n var hash = {};\r\n var size = this.cellSize;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enabled)\r\n {\r\n body.update(clampedDelta);\r\n }\r\n }\r\n\r\n // Run collision against them all now they're in the new positions from the update\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && !body.skipHash())\r\n {\r\n this.checkHash(body, hash, size);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Check the body against the spatial hash.\r\n *\r\n * @method Phaser.Physics.Impact.World#checkHash\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} hash - [description]\r\n * @param {number} size - [description]\r\n */\r\n checkHash: function (body, hash, size)\r\n {\r\n var checked = {};\r\n\r\n var xmin = Math.floor(body.pos.x / size);\r\n var ymin = Math.floor(body.pos.y / size);\r\n var xmax = Math.floor((body.pos.x + body.size.x) / size) + 1;\r\n var ymax = Math.floor((body.pos.y + body.size.y) / size) + 1;\r\n\r\n for (var x = xmin; x < xmax; x++)\r\n {\r\n for (var y = ymin; y < ymax; y++)\r\n {\r\n if (!hash[x])\r\n {\r\n hash[x] = {};\r\n hash[x][y] = [ body ];\r\n }\r\n else if (!hash[x][y])\r\n {\r\n hash[x][y] = [ body ];\r\n }\r\n else\r\n {\r\n var cell = hash[x][y];\r\n\r\n for (var c = 0; c < cell.length; c++)\r\n {\r\n if (body.touches(cell[c]) && !checked[cell[c].id])\r\n {\r\n checked[cell[c].id] = true;\r\n\r\n this.checkBodies(body, cell[c]);\r\n }\r\n }\r\n\r\n cell.push(body);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#checkBodies\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} bodyA - [description]\r\n * @param {Phaser.Physics.Impact.Body} bodyB - [description]\r\n */\r\n checkBodies: function (bodyA, bodyB)\r\n {\r\n // 2 fixed bodies won't do anything\r\n if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED)\r\n {\r\n return;\r\n }\r\n\r\n // bitwise checks\r\n if (bodyA.checkAgainst & bodyB.type)\r\n {\r\n bodyA.check(bodyB);\r\n }\r\n\r\n if (bodyB.checkAgainst & bodyA.type)\r\n {\r\n bodyB.check(bodyA);\r\n }\r\n\r\n if (bodyA.collides && bodyB.collides && bodyA.collides + bodyB.collides > COLLIDES.ACTIVE)\r\n {\r\n Solver(this, bodyA, bodyB);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCollidesNever: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.NEVER;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setLite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setLite: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.LITE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setPassive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setPassive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.PASSIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setActive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.ACTIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setFixed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setFixed: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.FIXED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setAvsB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBvsA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.scene = null;\r\n\r\n this.bodies.clear();\r\n\r\n this.bodies = null;\r\n\r\n this.collisionMap = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/World.js?")},"./node_modules/phaser/src/physics/impact/components/Acceleration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Acceleration component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Acceleration\r\n * @since 3.0.0\r\n */\r\nvar Acceleration = {\r\n\r\n /**\r\n * Sets the horizontal acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationX: function (x)\r\n {\r\n this.accel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationY: function (y)\r\n {\r\n this.accel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of horizontal acceleration to apply.\r\n * @param {number} y - The amount of vertical acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.accel.x = x;\r\n this.accel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Acceleration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Acceleration.js?")},"./node_modules/phaser/src/physics/impact/components/BodyScale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Body Scale component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyScale\r\n * @since 3.0.0\r\n */\r\nvar BodyScale = {\r\n\r\n /**\r\n * Sets the size of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the body in pixels.\r\n * @param {number} [height=width] - The height of the body in pixels.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodySize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.body.size.x = Math.round(width);\r\n this.body.size.y = Math.round(height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scaleX - The horizontal scale of the body.\r\n * @param {number} [scaleY] - The vertical scale of the body. If not given, will use the horizontal scale value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodyScale: function (scaleX, scaleY)\r\n {\r\n if (scaleY === undefined) { scaleY = scaleX; }\r\n\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n gameObject.setScale(scaleX, scaleY);\r\n\r\n return this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n else\r\n {\r\n return this.setBodySize(this.body.size.x * scaleX, this.body.size.y * scaleY);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyScale.js?")},"./node_modules/phaser/src/physics/impact/components/BodyType.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Body Type component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyType\r\n * @since 3.0.0\r\n */\r\nvar BodyType = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#getBodyType\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getBodyType: function ()\r\n {\r\n return this.body.type;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeNone: function ()\r\n {\r\n this.body.type = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeA: function ()\r\n {\r\n this.body.type = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeB: function ()\r\n {\r\n this.body.type = TYPE.B;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyType;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyType.js?')},"./node_modules/phaser/src/physics/impact/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Bounce component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the impact physics bounce, or restitution, value.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.bounciness = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the minimum velocity the body is allowed to be moving to be considered for rebound.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The minimum allowed velocity.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMinBounceVelocity: function (value)\r\n {\r\n this.body.minBounceVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The bounce, or restitution, value of this body.\r\n * A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @name Phaser.Physics.Impact.Components.Bounce#bounce\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bounce: {\r\n\r\n get: function ()\r\n {\r\n return this.body.bounciness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.bounciness = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Bounce.js?")},"./node_modules/phaser/src/physics/impact/components/CheckAgainst.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Check Against component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.CheckAgainst\r\n * @since 3.0.0\r\n */\r\nvar CheckAgainst = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAvsB: function ()\r\n {\r\n this.setTypeA();\r\n\r\n return this.setCheckAgainstB();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBvsA: function ()\r\n {\r\n this.setTypeB();\r\n\r\n return this.setCheckAgainstA();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstNone: function ()\r\n {\r\n this.body.checkAgainst = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstA: function ()\r\n {\r\n this.body.checkAgainst = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstB: function ()\r\n {\r\n this.body.checkAgainst = TYPE.B;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n checkAgainst: {\r\n\r\n get: function ()\r\n {\r\n return this.body.checkAgainst;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.checkAgainst = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CheckAgainst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/CheckAgainst.js?')},"./node_modules/phaser/src/physics/impact/components/Collides.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ../COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\n\r\n/**\r\n * @callback CollideCallback\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n\r\n/**\r\n * The Impact Collides component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Collides\r\n * @since 3.0.0\r\n */\r\nvar Collides = {\r\n\r\n _collideCallback: null,\r\n _callbackScope: null,\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CollideCallback} callback - [description]\r\n * @param {*} scope - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollideCallback: function (callback, scope)\r\n {\r\n this._collideCallback = callback;\r\n\r\n if (scope)\r\n {\r\n this._callbackScope = scope;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesNever: function ()\r\n {\r\n this.body.collides = COLLIDES.NEVER;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setLiteCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.LITE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPassiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.PASSIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setActiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.ACTIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFixedCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.FIXED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Collides#collides\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n\r\n get: function ()\r\n {\r\n return this.body.collides;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.collides = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collides;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Collides.js?')},"./node_modules/phaser/src/physics/impact/components/Debug.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Debug component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Debug\r\n * @since 3.0.0\r\n */\r\nvar Debug = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebug\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} showBody - [description]\r\n * @param {boolean} showVelocity - [description]\r\n * @param {number} bodyColor - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebug: function (showBody, showVelocity, bodyColor)\r\n {\r\n this.debugShowBody = showBody;\r\n this.debugShowVelocity = showVelocity;\r\n this.debugBodyColor = bodyColor;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebugBodyColor: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowBody: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowBody;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowBody = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowVelocity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowVelocity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowVelocity = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n debugBodyColor: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugBodyColor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Debug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Debug.js?")},"./node_modules/phaser/src/physics/impact/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Friction component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionX: function (x)\r\n {\r\n this.friction.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionY: function (y)\r\n {\r\n this.friction.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.x = x;\r\n this.friction.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Friction.js?")},"./node_modules/phaser/src/physics/impact/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Gravity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Gravity#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGravity: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Gravity#gravity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.gravityFactor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Gravity.js?")},"./node_modules/phaser/src/physics/impact/components/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Offset component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Offset\r\n * @since 3.0.0\r\n */\r\nvar Offset = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Offset#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setOffset: function (x, y, width, height)\r\n {\r\n this.body.offset.x = x;\r\n this.body.offset.y = y;\r\n\r\n if (width)\r\n {\r\n this.setBodySize(width, height);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Offset.js?")},"./node_modules/phaser/src/physics/impact/components/SetGameObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Set Game Object component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.SetGameObject\r\n * @since 3.0.0\r\n */\r\nvar SetGameObject = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - [description]\r\n * @param {boolean} [sync=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGameObject: function (gameObject, sync)\r\n {\r\n if (sync === undefined) { sync = true; }\r\n\r\n if (gameObject)\r\n {\r\n this.body.gameObject = gameObject;\r\n\r\n if (sync)\r\n {\r\n this.syncGameObject();\r\n }\r\n }\r\n else\r\n {\r\n this.body.gameObject = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n syncGameObject: function ()\r\n {\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/SetGameObject.js?")},"./node_modules/phaser/src/physics/impact/components/Velocity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Velocity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this.vel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical velocities of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.vel.x = x;\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum velocity this body can travel at.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The maximum allowed horizontal velocity.\r\n * @param {number} [y=x] - The maximum allowed vertical velocity. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.maxVel.x = x;\r\n this.maxVel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Velocity.js?")},"./node_modules/phaser/src/physics/impact/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/impact/components/Acceleration.js"),\r\n BodyScale: __webpack_require__(/*! ./BodyScale */ "./node_modules/phaser/src/physics/impact/components/BodyScale.js"),\r\n BodyType: __webpack_require__(/*! ./BodyType */ "./node_modules/phaser/src/physics/impact/components/BodyType.js"),\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/impact/components/Bounce.js"),\r\n CheckAgainst: __webpack_require__(/*! ./CheckAgainst */ "./node_modules/phaser/src/physics/impact/components/CheckAgainst.js"),\r\n Collides: __webpack_require__(/*! ./Collides */ "./node_modules/phaser/src/physics/impact/components/Collides.js"),\r\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/impact/components/Debug.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/impact/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/impact/components/Gravity.js"),\r\n Offset: __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/physics/impact/components/Offset.js"),\r\n SetGameObject: __webpack_require__(/*! ./SetGameObject */ "./node_modules/phaser/src/physics/impact/components/SetGameObject.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/impact/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/index.js?')},"./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Collide Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance if two bodies collide.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body involved in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body involved in the collision.\r\n * @param {string} axis - The collision axis. Either `x` or `y`.\r\n */\r\nmodule.exports = 'collide';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/index.js?')},"./node_modules/phaser/src/physics/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * An Impact.js compatible physics world, body and solver, for those who are used\r\n * to the Impact way of defining and controlling physics bodies. Also works with\r\n * the new Loader support for Weltmeister map data.\r\n *\r\n * World updated to run off the Phaser main loop.\r\n * Body extended to support additional setter functions.\r\n *\r\n * To create the map data you\'ll need Weltmeister, which comes with Impact\r\n * and can be purchased from http://impactjs.com\r\n *\r\n * My thanks to Dominic Szablewski for his permission to support Impact in Phaser.\r\n *\r\n * @namespace Phaser.Physics.Impact\r\n */\r\nmodule.exports = {\r\n\r\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/impact/Body.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/impact/events/index.js"),\r\n COLLIDES: __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js"),\r\n CollisionMap: __webpack_require__(/*! ./CollisionMap */ "./node_modules/phaser/src/physics/impact/CollisionMap.js"),\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js"),\r\n Image: __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js"),\r\n ImpactBody: __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js"),\r\n ImpactPhysics: __webpack_require__(/*! ./ImpactPhysics */ "./node_modules/phaser/src/physics/impact/ImpactPhysics.js"),\r\n Sprite: __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js"),\r\n TYPE: __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/index.js?')},"./node_modules/phaser/src/physics/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Physics\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Arcade: __webpack_require__(/*! ./arcade */ "./node_modules/phaser/src/physics/arcade/index.js"),\r\n Impact: __webpack_require__(/*! ./impact */ "./node_modules/phaser/src/physics/impact/index.js"),\r\n Matter: __webpack_require__(/*! ./matter-js */ "./node_modules/phaser/src/physics/matter-js/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/index.js?')},"./node_modules/phaser/src/physics/matter-js/CustomMain.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Matter\r\n */\r\n\r\nvar Matter = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\n\r\nMatter.Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nMatter.Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nMatter.World = __webpack_require__(/*! ./lib/body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\n\r\nMatter.Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nMatter.Grid = __webpack_require__(/*! ./lib/collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nMatter.Pairs = __webpack_require__(/*! ./lib/collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nMatter.Pair = __webpack_require__(/*! ./lib/collision/Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nMatter.Query = __webpack_require__(/*! ./lib/collision/Query */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js");\r\nMatter.Resolver = __webpack_require__(/*! ./lib/collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nMatter.SAT = __webpack_require__(/*! ./lib/collision/SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\n\r\nMatter.Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\n\r\nMatter.Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nMatter.Engine = __webpack_require__(/*! ./lib/core/Engine */ "./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js");\r\nMatter.Events = __webpack_require__(/*! ./lib/core/Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nMatter.Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nMatter.Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\n\r\nMatter.Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nMatter.Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\n\r\nMatter.Axes = __webpack_require__(/*! ./lib/geometry/Axes */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js");\r\nMatter.Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nMatter.Svg = __webpack_require__(/*! ./lib/geometry/Svg */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js");\r\nMatter.Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nMatter.Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n// aliases\r\n\r\nMatter.World.add = Matter.Composite.add;\r\nMatter.World.remove = Matter.Composite.remove;\r\nMatter.World.addComposite = Matter.Composite.addComposite;\r\nMatter.World.addBody = Matter.Composite.addBody;\r\nMatter.World.addConstraint = Matter.Composite.addConstraint;\r\nMatter.World.clear = Matter.Composite.clear;\r\n\r\nmodule.exports = Matter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/CustomMain.js?')},"./node_modules/phaser/src/physics/matter-js/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar MatterGameObject = __webpack_require__(/*! ./MatterGameObject */ "./node_modules/phaser/src/physics/matter-js/MatterGameObject.js");\r\nvar MatterImage = __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js");\r\nvar MatterSprite = __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js");\r\nvar PointerConstraint = __webpack_require__(/*! ./PointerConstraint */ "./node_modules/phaser/src/physics/matter-js/PointerConstraint.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Matter Factory can create different types of bodies and them to a physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * The Matter World which this Factory adds to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Scene which this Factory\'s Matter World belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = world.scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Matter Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new rigid rectangular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#rectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the Body.\r\n * @param {number} height - The height of the Body.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n rectangle: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid trapezoidal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#trapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the trapezoid of the Body.\r\n * @param {number} height - The height of the trapezoid of the Body.\r\n * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n trapezoid: function (x, y, width, height, slope, options)\r\n {\r\n var body = Bodies.trapezoid(x, y, width, height, slope, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid circular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#circle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n circle: function (x, y, radius, options, maxSides)\r\n {\r\n var body = Bodies.circle(x, y, radius, options, maxSides);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid polygonal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#polygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} sides - The number of sides the polygon will have.\r\n * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n polygon: function (x, y, sides, radius, options)\r\n {\r\n var body = Bodies.polygon(x, y, sides, radius, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.\r\n * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#fromVertices\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {(string|array)} vertexSets - [description]\r\n * @param {object} [options] - [description]\r\n * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges)\r\n * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance).\r\n * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea)\r\n {\r\n if (typeof vertexSets === \'string\')\r\n {\r\n vertexSets = Vertices.fromPath(vertexSets);\r\n }\r\n\r\n var body = Bodies.fromVertices(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Create a new composite containing Matter Image objects created in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#imageStack\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} [columnGap=0] - The distance between each column.\r\n * @param {number} [rowGap=0] - The distance between each row.\r\n * @param {object} [options] - [description]\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite Stack.\r\n */\r\n imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options)\r\n {\r\n if (columnGap === undefined) { columnGap = 0; }\r\n if (rowGap === undefined) { rowGap = 0; }\r\n if (options === undefined) { options = {}; }\r\n\r\n var world = this.world;\r\n var displayList = this.sys.displayList;\r\n\r\n options.addToWorld = false;\r\n\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, function (x, y)\r\n {\r\n var image = new MatterImage(world, x, y, key, frame, options);\r\n\r\n displayList.add(image);\r\n\r\n return image.body;\r\n });\r\n\r\n world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#stack\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback that creates the stack.\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects created in the callback.\r\n */\r\n stack: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pyramid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the pyramid.\r\n * @param {number} rows - The number of rows in the pyramid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback function to be invoked.\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite pyramid.\r\n */\r\n pyramid: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.pyramid(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#chain\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} xOffsetA - [description]\r\n * @param {number} yOffsetA - [description]\r\n * @param {number} xOffsetB - [description]\r\n * @param {number} yOffsetB - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects chained together with constraints.\r\n */\r\n chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options)\r\n {\r\n return Composites.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options);\r\n },\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} columns - [description]\r\n * @param {number} rows - [description]\r\n * @param {boolean} crossBrace - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} The composite containing objects meshed together with constraints.\r\n */\r\n mesh: function (composite, columns, rows, crossBrace, options)\r\n {\r\n return Composites.mesh(composite, columns, rows, crossBrace, options);\r\n },\r\n\r\n /**\r\n * Creates a composite with a Newton\'s Cradle setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#newtonsCradle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} number - [description]\r\n * @param {number} size - [description]\r\n * @param {number} length - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite newtonsCradle body.\r\n */\r\n newtonsCradle: function (x, y, number, size, length)\r\n {\r\n var composite = Composites.newtonsCradle(x, y, number, size, length);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#car\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} wheelSize - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite car body.\r\n */\r\n car: function (x, y, width, height, wheelSize)\r\n {\r\n var composite = Composites.car(x, y, width, height, wheelSize);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#softBody\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the Composite.\r\n * @param {number} rows - The number of rows in the Composite.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {boolean} crossBrace - [description]\r\n * @param {number} particleRadius - The radius of this circlular composite.\r\n * @param {object} particleOptions - [description]\r\n * @param {object} constraintOptions - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite simple soft body.\r\n */\r\n softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions)\r\n {\r\n var composite = Composites.softBody(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#joint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n joint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#spring\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n spring: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#constraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n constraint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyA = (bodyA.type === \'body\') ? bodyA : bodyA.body;\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#worldConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n worldConstraint: function (bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mouseSpring\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n mouseSpring: function (options)\r\n {\r\n return this.pointerConstraint(options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pointerConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n pointerConstraint: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n if (!options.hasOwnProperty(\'render\'))\r\n {\r\n options.render = { visible: false };\r\n }\r\n\r\n var pointerConstraint = new PointerConstraint(this.scene, this.world, options);\r\n\r\n this.world.add(pointerConstraint.constraint);\r\n\r\n return pointerConstraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Image} [description]\r\n */\r\n image: function (x, y, key, frame, options)\r\n {\r\n var image = new MatterImage(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#tileBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} [description]\r\n */\r\n tileBody: function (tile, options)\r\n {\r\n var tileBody = new MatterTileBody(this.world, tile, options);\r\n\r\n return tileBody;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Sprite} [description]\r\n */\r\n sprite: function (x, y, key, frame, options)\r\n {\r\n var sprite = new MatterSprite(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#gameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it.\r\n */\r\n gameObject: function (gameObject, options)\r\n {\r\n return MatterGameObject(this.world, gameObject, options);\r\n },\r\n\r\n /**\r\n * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#velocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n velocity: function (body, velocity)\r\n {\r\n Body.setVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#angularVelocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {number} velocity - The angular velocity to set.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n angularVelocity: function (body, velocity)\r\n {\r\n Body.setAngularVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#force\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the force on.\r\n * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components.\r\n * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n force: function (body, position, force)\r\n {\r\n Body.applyForce(body, position, force);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.scene = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/Factory.js?')},"./node_modules/phaser/src/physics/matter-js/MatterGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Internal function to check if the object has a getter or setter.\r\n *\r\n * @function hasGetterOrSetter\r\n * @private\r\n *\r\n * @param {object} def - The object to check.\r\n *\r\n * @return {boolean} True if it has a getter or setter, otherwise false.\r\n */\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Matter.MatterGameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body.\r\n */\r\nvar MatterGameObject = function (world, gameObject, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var x = gameObject.x;\r\n var y = gameObject.y;\r\n\r\n // Temp body pos to avoid body null checks\r\n gameObject.body = {\r\n temp: true,\r\n position: {\r\n x: x,\r\n y: y\r\n }\r\n };\r\n\r\n var mixins = [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity\r\n ];\r\n\r\n // First let's inject all of the components into the Game Object\r\n mixins.forEach(function (mixin)\r\n {\r\n for (var key in mixin)\r\n {\r\n if (hasGetterOrSetter(mixin[key]))\r\n {\r\n Object.defineProperty(gameObject, key, {\r\n get: mixin[key].get,\r\n set: mixin[key].set\r\n });\r\n }\r\n else\r\n {\r\n Object.defineProperty(gameObject, key, {value: mixin[key]});\r\n }\r\n }\r\n\r\n });\r\n\r\n gameObject.world = world;\r\n\r\n gameObject._tempVec2 = new Vector2(x, y);\r\n\r\n if (options.hasOwnProperty('type') && options.type === 'body')\r\n {\r\n gameObject.setExistingBody(options, true);\r\n }\r\n else\r\n {\r\n var shape = GetFastValue(options, 'shape', null);\r\n\r\n if (!shape)\r\n {\r\n shape = 'rectangle';\r\n }\r\n \r\n gameObject.setBody(shape, options);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = MatterGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterGameObject.js?")},"./node_modules/phaser/src/physics/matter-js/MatterImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterImage (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Image\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterImage.js?')},"./node_modules/phaser/src/physics/matter-js/MatterPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar MatterAttractors = __webpack_require__(/*! ./lib/plugins/MatterAttractors */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js");\r\nvar MatterLib = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\nvar MatterWrap = __webpack_require__(/*! ./lib/plugins/MatterWrap */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class MatterPhysics\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar MatterPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function MatterPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#add\r\n * @type {Phaser.Physics.Matter.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#verts\r\n * @type {MatterJS.Vertices}\r\n * @since 3.14.0\r\n */\r\n this.verts = Vertices;\r\n\r\n /**\r\n * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#body\r\n * @type {MatterJS.Body}\r\n * @since 3.18.0\r\n */\r\n this.body = Body;\r\n\r\n /**\r\n * A reference to the `Matter.Bodies` module which contains methods for creating bodies.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#bodies\r\n * @type {MatterJS.Bodies}\r\n * @since 3.18.0\r\n */\r\n this.bodies = Bodies;\r\n\r\n // Matter plugins\r\n\r\n if (GetValue(this.config, \'plugins.attractors\', false))\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n }\r\n\r\n if (GetValue(this.config, \'plugins.wrap\', false))\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n }\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'matter\', {}),\r\n GetFastValue(gameConfig, \'matter\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableAttractorPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableAttractorPlugin: function ()\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableWrapPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableWrapPlugin: function ()\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set60Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update60Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set30Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update30Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n this.world.step(delta, correction);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'MatterPhysics\', MatterPhysics, \'matterPhysics\');\r\n\r\nmodule.exports = MatterPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterPhysics.js?')},"./node_modules/phaser/src/physics/matter-js/MatterSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AnimationComponent = __webpack_require__(/*! ../../gameobjects/components/Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterSprite (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Sprite\');\r\n\r\n this.anims = new AnimationComponent(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterSprite.js?')},"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A wrapper around a Tile that provides access to a corresponding Matter body. A tile can only\r\n * have one Matter body associated with it. You can either pass in an existing Matter body for\r\n * the tile or allow the constructor to create the corresponding body for you. If the Tile has a\r\n * collision group (defined in Tiled), those shapes will be used to create the body. If not, the\r\n * tile's rectangle bounding box will be used.\r\n *\r\n * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.\r\n *\r\n * Note: not all Tiled collision shapes are supported. See\r\n * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.\r\n *\r\n * @class TileBody\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body.\r\n * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body.\r\n */\r\nvar MatterTileBody = new Class({\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.Sleep,\r\n Components.Static\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterTileBody (world, tile, options)\r\n {\r\n /**\r\n * The tile object the body is associated with.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#tile\r\n * @type {Phaser.Tilemaps.Tile}\r\n * @since 3.0.0\r\n */\r\n this.tile = tile;\r\n\r\n /**\r\n * The Matter world the body exists within.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n // Install a reference to 'this' on the tile and ensure there can only be one matter body\r\n // associated with the tile\r\n if (tile.physics.matterBody)\r\n {\r\n tile.physics.matterBody.destroy();\r\n }\r\n\r\n tile.physics.matterBody = this;\r\n\r\n // Set the body either from an existing body (if provided), the shapes in the tileset\r\n // collision layer (if it exists) or a rectangle matching the tile.\r\n var body = GetFastValue(options, 'body', null);\r\n\r\n var addToWorld = GetFastValue(options, 'addToWorld', true);\r\n\r\n if (!body)\r\n {\r\n var collisionGroup = tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n if (collisionObjects.length > 0)\r\n {\r\n this.setFromTileCollision(options);\r\n }\r\n else\r\n {\r\n this.setFromTileRectangle(options);\r\n }\r\n }\r\n else\r\n {\r\n this.setBody(body, addToWorld);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current body to a rectangle that matches the bounds of the tile.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileRectangle: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var bounds = this.tile.getBounds();\r\n var cx = bounds.x + (bounds.width / 2);\r\n var cy = bounds.y + (bounds.height / 2);\r\n var body = Bodies.rectangle(cx, cy, bounds.width, bounds.height, options);\r\n\r\n this.setBody(body, options.addToWorld);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body from the collision group associated with the Tile. This is typically\r\n * set up in Tiled's collision editor.\r\n *\r\n * Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly\r\n * supported. Ellipses are converted into circle bodies. Polylines are treated as if they are\r\n * closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave\r\n * shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to\r\n * work for complex shapes (e.g. holes), so it's often best to manually decompose a concave\r\n * polygon into multiple convex polygons yourself.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileCollision\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileCollision: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var sx = this.tile.tilemapLayer.scaleX;\r\n var sy = this.tile.tilemapLayer.scaleY;\r\n var tileX = this.tile.getLeft();\r\n var tileY = this.tile.getTop();\r\n var collisionGroup = this.tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n var parts = [];\r\n\r\n for (var i = 0; i < collisionObjects.length; i++)\r\n {\r\n var object = collisionObjects[i];\r\n var ox = tileX + (object.x * sx);\r\n var oy = tileY + (object.y * sy);\r\n var ow = object.width * sx;\r\n var oh = object.height * sy;\r\n var body = null;\r\n\r\n if (object.rectangle)\r\n {\r\n body = Bodies.rectangle(ox + ow / 2, oy + oh / 2, ow, oh, options);\r\n }\r\n else if (object.ellipse)\r\n {\r\n body = Bodies.circle(ox + ow / 2, oy + oh / 2, ow / 2, options);\r\n }\r\n else if (object.polygon || object.polyline)\r\n {\r\n // Polygons and polylines are both treated as closed polygons\r\n var originalPoints = object.polygon ? object.polygon : object.polyline;\r\n\r\n var points = originalPoints.map(function (p)\r\n {\r\n return { x: p.x * sx, y: p.y * sy };\r\n });\r\n\r\n var vertices = Vertices.create(points);\r\n\r\n // Points are relative to the object's origin (first point placed in Tiled), but\r\n // matter expects points to be relative to the center of mass. This only applies to\r\n // convex shapes. When a concave shape is decomposed, multiple parts are created and\r\n // the individual parts are positioned relative to (ox, oy).\r\n //\r\n // Update: 8th January 2019 - the latest version of Matter needs the Vertices adjusted,\r\n // regardless if convex or concave.\r\n\r\n var center = Vertices.centre(vertices);\r\n\r\n ox += center.x;\r\n oy += center.y;\r\n\r\n body = Bodies.fromVertices(ox, oy, vertices, options);\r\n }\r\n\r\n if (body)\r\n {\r\n parts.push(body);\r\n }\r\n }\r\n\r\n if (parts.length === 1)\r\n {\r\n this.setBody(parts[0], options.addToWorld);\r\n }\r\n else if (parts.length > 1)\r\n {\r\n options.parts = parts;\r\n this.setBody(Body.create(options), options.addToWorld);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body to the given body. This will remove the previous body, if one already\r\n * exists.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - The new Matter body to use.\r\n * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined) { addToWorld = true; }\r\n\r\n if (this.body)\r\n {\r\n this.removeBody();\r\n }\r\n\r\n this.body = body;\r\n this.body.gameObject = this;\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(this.body);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the TileBody and from the Matter world\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#removeBody\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n removeBody: function ()\r\n {\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n this.body.gameObject = undefined;\r\n this.body = undefined;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the tile and the world.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n destroy: function ()\r\n {\r\n this.removeBody();\r\n this.tile.physics.matterBody = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterTileBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterTileBody.js?")},"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Joachim Grill \r\n * @copyright 2018 CodeAndWeb GmbH\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file\r\n * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor).\r\n *\r\n * @namespace Phaser.Physics.Matter.PhysicsEditorParser\r\n * @since 3.10.0\r\n */\r\nvar PhysicsEditorParser = {\r\n\r\n /**\r\n * Parses a body element exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - x position.\r\n * @param {number} y - y position.\r\n * @param {number} w - width.\r\n * @param {number} h - height.\r\n * @param {object} config - body configuration and fixture (child body) definitions.\r\n * \r\n * @return {object} A matter body, consisting of several parts (child bodies)\r\n */\r\n parseBody: function (x, y, w, h, config)\r\n {\r\n var fixtureConfigs = GetFastValue(config, \'fixtures\', []);\r\n var fixtures = [];\r\n\r\n for (var fc = 0; fc < fixtureConfigs.length; fc++)\r\n {\r\n var fixtureParts = this.parseFixture(fixtureConfigs[fc]);\r\n\r\n for (var i = 0; i < fixtureParts.length; i++)\r\n {\r\n fixtures.push(fixtureParts[i]);\r\n }\r\n }\r\n\r\n var matterConfig = Common.extend({}, false, config);\r\n\r\n delete matterConfig.fixtures;\r\n delete matterConfig.type;\r\n\r\n var body = Body.create(matterConfig);\r\n\r\n Body.setParts(body, fixtures);\r\n body.render.sprite.xOffset = body.position.x / w;\r\n body.render.sprite.yOffset = body.position.y / h;\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n },\r\n\r\n\r\n /**\r\n * Parses an element of the "fixtures" list exported by PhysicsEditor\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture\r\n * @since 3.10.0\r\n *\r\n * @param {object} fixtureConfig - the fixture object to parse\r\n * \r\n * @return {object[]} - A list of matter bodies\r\n */\r\n parseFixture: function (fixtureConfig)\r\n {\r\n var matterConfig = Common.extend({}, false, fixtureConfig);\r\n\r\n delete matterConfig.circle;\r\n delete matterConfig.vertices;\r\n\r\n var fixtures;\r\n\r\n if (fixtureConfig.circle)\r\n {\r\n var x = GetFastValue(fixtureConfig.circle, \'x\');\r\n var y = GetFastValue(fixtureConfig.circle, \'y\');\r\n var r = GetFastValue(fixtureConfig.circle, \'radius\');\r\n fixtures = [ Bodies.circle(x, y, r, matterConfig) ];\r\n }\r\n else if (fixtureConfig.vertices)\r\n {\r\n fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig);\r\n }\r\n\r\n return fixtures;\r\n },\r\n\r\n /**\r\n * Parses the "vertices" lists exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices\r\n * @since 3.10.0\r\n *\r\n * @param {object} vertexSets - The vertex lists to parse.\r\n * @param {object} options - Matter body options.\r\n * \r\n * @return {object[]} - A list of matter bodies.\r\n */\r\n parseVertices: function (vertexSets, options)\r\n {\r\n var i, j, k, v, z;\r\n var parts = [];\r\n\r\n options = options || {};\r\n\r\n for (v = 0; v < vertexSets.length; v += 1)\r\n {\r\n parts.push(Body.create(Common.extend({\r\n position: Vertices.centre(vertexSets[v]),\r\n vertices: vertexSets[v]\r\n }, options)));\r\n }\r\n\r\n // flag coincident part edges\r\n var coincidentMaxDist = 5;\r\n\r\n for (i = 0; i < parts.length; i++)\r\n {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++)\r\n {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds))\r\n {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++)\r\n {\r\n for (z = 0; z < partB.vertices.length; z++)\r\n {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincidentMaxDist && db < coincidentMaxDist)\r\n {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n return parts;\r\n }\r\n};\r\n\r\nmodule.exports = PhysicsEditorParser;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js?')},"./node_modules/phaser/src/physics/matter-js/PointerConstraint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/matter-js/events/index.js");\r\nvar InputEvents = __webpack_require__(/*! ../../input/events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer Constraint is a special type of constraint that allows you to click\r\n * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,\r\n * and when one is pressed down it checks to see if that hit any part of any active\r\n * body in the world. If it did, and the body has input enabled, it will begin to\r\n * drag it until either released, or you stop it via the `stopDrag` method.\r\n * \r\n * You can adjust the stiffness, length and other properties of the constraint via\r\n * the `options` object on creation.\r\n *\r\n * @class PointerConstraint\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene to which this Pointer Constraint belongs.\r\n * @param {Phaser.Physics.Matter.World} world - A reference to the Matter World instance to which this Constraint belongs.\r\n * @param {object} [options] - A Constraint configuration object.\r\n */\r\nvar PointerConstraint = new Class({\r\n\r\n initialize:\r\n\r\n function PointerConstraint (scene, world, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n // Defaults\r\n var defaults = {\r\n label: \'Pointer Constraint\',\r\n pointA: { x: 0, y: 0 },\r\n pointB: { x: 0, y: 0 },\r\n damping: 0,\r\n length: 0.01,\r\n stiffness: 0.1,\r\n angularStiffness: 1,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n }\r\n };\r\n\r\n /**\r\n * A reference to the Scene to which this Pointer Constraint belongs.\r\n * This is the same Scene as the Matter World instance.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Matter World instance to which this Constraint belongs.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Camera the Pointer was interacting with when the input\r\n * down event was processed.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A reference to the Input Pointer that activated this Constraint.\r\n * This is set in the `onDown` handler.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * Is this Constraint active or not?\r\n * \r\n * An active constraint will be processed each update. An inactive one will be skipped.\r\n * Use this to toggle a Pointer Constraint on and off.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The internal transformed position.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The body that is currently being dragged, if any.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#body\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * The part of the body that was clicked on to start the drag.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#part\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.part = null;\r\n\r\n /**\r\n * The native Matter Constraint that is used to attach to bodies.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#constraint\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.constraint = Constraint.create(Merge(options, defaults));\r\n\r\n this.world.on(Events.BEFORE_UPDATE, this.update, this);\r\n\r\n scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this);\r\n },\r\n\r\n /**\r\n * A Pointer has been pressed down onto the Scene.\r\n * \r\n * If this Constraint doesn\'t have an active Pointer then a hit test is\r\n * run against all active bodies in the world. If one is found it is bound\r\n * to this constraint and the drag begins.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#onDown\r\n * @fires Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed.\r\n */\r\n onDown: function (pointer)\r\n {\r\n if (!this.pointer)\r\n {\r\n if (this.getBody(pointer))\r\n {\r\n this.pointer = pointer;\r\n\r\n this.camera = pointer.camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Scans all active bodies in the current Matter World to see if any of them\r\n * are hit by the Pointer. The _first one_ found to hit is set as the active contraint\r\n * body.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#getBody\r\n * @since 3.16.2\r\n * \r\n * @return {boolean} `true` if a body was found and set, otherwise `false`.\r\n */\r\n getBody: function (pointer)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n\r\n pointer.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n\r\n var bodies = Composite.allBodies(this.world.localWorld);\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.ignorePointer &&\r\n Bounds.contains(body.bounds, pos) &&\r\n Detector.canCollide(body.collisionFilter, constraint.collisionFilter))\r\n {\r\n if (this.hitTestBody(body, pos))\r\n {\r\n this.world.emit(Events.DRAG_START, this.body, this.part, this);\r\n\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Scans the current body to determine if a part of it was clicked on.\r\n * If a part is found the body is set as the `constraint.bodyB` property,\r\n * as well as the `body` property of this class. The part is also set.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody\r\n * @since 3.16.2\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to check.\r\n * @param {Phaser.Math.Vector2} position - A translated hit test position.\r\n *\r\n * @return {boolean} `true` if a part of the body was hit, otherwise `false`.\r\n */\r\n hitTestBody: function (body, position)\r\n {\r\n var constraint = this.constraint;\r\n\r\n var start = (body.parts.length > 1) ? 1 : 0;\r\n\r\n for (var i = start; i < body.parts.length; i++)\r\n {\r\n var part = body.parts[i];\r\n\r\n if (Vertices.contains(part.vertices, position))\r\n {\r\n constraint.bodyB = body;\r\n\r\n constraint.pointA.x = position.x;\r\n constraint.pointA.y = position.y;\r\n\r\n constraint.pointB.x = position.x - body.position.x;\r\n constraint.pointB.y = position.y - body.position.y;\r\n\r\n constraint.angleB = body.angle;\r\n\r\n Sleeping.set(body, false);\r\n\r\n this.part = part;\r\n this.body = body;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler. Called in the Matter BEFORE_UPDATE step.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#update\r\n * @fires Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.0.0\r\n */\r\n update: function ()\r\n {\r\n var body = this.body;\r\n var pointer = this.pointer;\r\n\r\n if (!this.active || !pointer || !body)\r\n {\r\n return;\r\n }\r\n\r\n if (pointer.isDown)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n \r\n this.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n \r\n Sleeping.set(body, false);\r\n \r\n constraint.pointA.x = pos.x;\r\n constraint.pointA.y = pos.y;\r\n \r\n this.world.emit(Events.DRAG, body, this);\r\n }\r\n else\r\n {\r\n // Pointer has been released since the last world step\r\n this.stopDrag();\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Pointer Constraint from dragging the body any further.\r\n * \r\n * This is called automatically if the Pointer is released while actively\r\n * dragging a body. Or, you can call it manually to release a body from a\r\n * constraint without having to first release the pointer.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#stopDrag\r\n * @fires Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n */\r\n stopDrag: function ()\r\n {\r\n var body = this.body;\r\n var constraint = this.constraint;\r\n\r\n if (body)\r\n {\r\n this.world.emit(Events.DRAG_END, body, this);\r\n\r\n this.pointer = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n constraint.bodyB = null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Pointer Constraint instance and all of its references.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.removeConstraint(this.constraint);\r\n\r\n this.pointer = null;\r\n this.constraint = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n this.world.off(Events.BEFORE_UPDATE, this.update);\r\n\r\n this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PointerConstraint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PointerConstraint.js?')},"./node_modules/phaser/src/physics/matter-js/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Engine = __webpack_require__(/*! ./lib/core/Engine */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MatterBody = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar MatterEvents = __webpack_require__(/*! ./lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ \"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js\");\r\nvar MatterWorld = __webpack_require__(/*! ./lib/body/World */ \"./node_modules/phaser/src/physics/matter-js/lib/body/World.js\");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Matter World instance belongs.\r\n * @param {Phaser.Types.Physics.Matter.MatterWorldConfig} config - The Matter World configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Matter World instance belongs.\r\n *\r\n * @name Phaser.Physics.Matter.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * An instance of the MatterJS Engine.\r\n *\r\n * @name Phaser.Physics.Matter.World#engine\r\n * @type {MatterJS.Engine}\r\n * @since 3.0.0\r\n */\r\n this.engine = Engine.create(config);\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @name Phaser.Physics.Matter.World#localWorld\r\n * @type {MatterJS.World}\r\n * @since 3.0.0\r\n */\r\n this.localWorld = this.engine.world;\r\n\r\n var gravity = GetValue(config, 'gravity', null);\r\n\r\n if (gravity)\r\n {\r\n this.setGravity(gravity.x, gravity.y, gravity.scale);\r\n }\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Matter.World#walls\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n /**\r\n * A flag that toggles if the world is enabled or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = GetValue(config, 'enabled', true);\r\n\r\n /**\r\n * The correction argument is an optional Number that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where delta is changing between updates.\r\n * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step.\r\n * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * @name Phaser.Physics.Matter.World#correction\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.correction = GetValue(config, 'correction', 1);\r\n\r\n /**\r\n * This function is called every time the core game loop steps, which is bound to the\r\n * Request Animation Frame frequency unless otherwise modified.\r\n * \r\n * The function is passed two values: `time` and `delta`, both of which come from the game step values.\r\n * \r\n * It must return a number. This number is used as the delta value passed to Matter.Engine.update.\r\n * \r\n * You can override this function with your own to define your own timestep.\r\n * \r\n * If you need to update the Engine multiple times in a single game step then call\r\n * `World.update` as many times as required. Each call will trigger the `getDelta` function.\r\n * If you wish to have full control over when the Engine updates then see the property `autoUpdate`.\r\n *\r\n * You can also adjust the number of iterations that Engine.update performs.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @name Phaser.Physics.Matter.World#getDelta\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.getDelta = GetValue(config, 'getDelta', this.update60Hz);\r\n\r\n /**\r\n * Automatically call Engine.update every time the game steps.\r\n * If you disable this then you are responsible for calling `World.step` directly from your game.\r\n * If you call `set60Hz` or `set30Hz` then `autoUpdate` is reset to `true`.\r\n *\r\n * @name Phaser.Physics.Matter.World#autoUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.autoUpdate = GetValue(config, 'autoUpdate', true);\r\n\r\n /**\r\n * A flag that controls if the debug graphics will be drawn to or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * An instance of the Graphics object the debug bodies are drawn to, if enabled.\r\n *\r\n * @name Phaser.Physics.Matter.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * The default configuration values.\r\n *\r\n * @name Phaser.Physics.Matter.World#defaults\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetFastValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n bodyDebugFillColor: GetFastValue(config, 'debugBodyFillColor', 0xe3a7e3),\r\n staticBodyDebugColor: GetFastValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n debugShowJoint: GetFastValue(config, 'debugShowJoint', true),\r\n jointDebugColor: GetFastValue(config, 'debugJointColor', 0x000000),\r\n debugWireframes: GetFastValue(config, 'debugWireframes', true),\r\n debugShowInternalEdges: GetFastValue(config, 'debugShowInternalEdges', false),\r\n debugShowConvexHulls: GetFastValue(config, 'debugShowConvexHulls', false),\r\n debugConvexHullColor: GetFastValue(config, 'debugConvexHullColor', 0xaaaaaa),\r\n debugShowSleeping: GetFastValue(config, 'debugShowSleeping', false)\r\n };\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n\r\n this.setEventsProxy();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#setEventsProxy\r\n * @since 3.0.0\r\n */\r\n setEventsProxy: function ()\r\n {\r\n var _this = this;\r\n var engine = this.engine;\r\n\r\n MatterEvents.on(engine, 'beforeUpdate', function (event)\r\n {\r\n _this.emit(Events.BEFORE_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'afterUpdate', function (event)\r\n {\r\n _this.emit(Events.AFTER_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionStart', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_START, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionActive', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_ACTIVE, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionEnd', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_END, event, bodyA, bodyB);\r\n });\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Matter.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y=0] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=128] - The thickness of each wall, in pixels.\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 128; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(right, 'right', x + width, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n // position = 'left', 'right', 'top' or 'bottom'\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n // adjust center\r\n x += (width / 2);\r\n y += (height / 2);\r\n\r\n this.walls[position] = this.create(x, y, width, height, { isStatic: true, friction: 0, frictionStatic: 0 });\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} [description]\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity and gravity scale to 0.\r\n *\r\n * @method Phaser.Physics.Matter.World#disableGravity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n disableGravity: function ()\r\n {\r\n this.localWorld.gravity.x = 0;\r\n this.localWorld.gravity.y = 0;\r\n this.localWorld.gravity.scale = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity\r\n *\r\n * @method Phaser.Physics.Matter.World#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The world gravity x component.\r\n * @param {number} [y=1] - The world gravity y component.\r\n * @param {number} [scale] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setGravity: function (x, y, scale)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 1; }\r\n\r\n this.localWorld.gravity.x = x;\r\n this.localWorld.gravity.y = y;\r\n\r\n if (scale !== undefined)\r\n {\r\n this.localWorld.gravity.scale = scale;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a rectangle Matter body and adds it to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the world.\r\n * @param {number} y - The vertical position of the body in the world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n * @param {object} options - Optional Matter configuration object.\r\n *\r\n * @return {MatterJS.Body} The Matter.js body that was created.\r\n */\r\n create: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n MatterWorld.add(this.localWorld, body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Adds an object to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#add\r\n * @since 3.0.0\r\n *\r\n * @param {(object|object[])} object - Can be single or an array, and can be a body, composite or constraint\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n add: function (object)\r\n {\r\n MatterWorld.add(this.localWorld, object);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to be removed from the world.\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n remove: function (object, deep)\r\n {\r\n var body = (object.body) ? object.body : object;\r\n\r\n Composite.remove(this.localWorld, body, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#removeConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Constraint} constraint - [description]\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n removeConstraint: function (constraint, deep)\r\n {\r\n Composite.remove(this.localWorld, constraint, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set\r\n * the appropriate tiles in your layer to collide before calling this method!\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer -\r\n * An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTilemapLayer: function (tilemapLayer, options)\r\n {\r\n var layerData = tilemapLayer.layer;\r\n var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, { isColliding: true });\r\n\r\n this.convertTiles(tiles, options);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the\r\n * tiles are set to collide or not.\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTiles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTiles: function (tiles, options)\r\n {\r\n if (tiles.length === 0)\r\n {\r\n return this;\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n new MatterTileBody(this, tiles[i], options);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} isNonColliding - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n nextGroup: function (isNonColliding)\r\n {\r\n return MatterBody.nextGroup(isNonColliding);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextCategory\r\n * @since 3.0.0\r\n *\r\n * @return {number} Returns the next unique category bitfield.\r\n */\r\n nextCategory: function ()\r\n {\r\n return MatterBody.nextCategory();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#pause\r\n * @fires Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#resume\r\n * @fires Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.enabled && this.autoUpdate)\r\n {\r\n Engine.update(this.engine, this.getDelta(time, delta), this.correction);\r\n }\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.World#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n Engine.update(this.engine, delta, correction);\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 60Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update60Hz: function ()\r\n {\r\n return 1000 / 60;\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 30Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update30Hz: function ()\r\n {\r\n return 1000 / 30;\r\n },\r\n\r\n /**\r\n * Handles the rendering of bodies and debug information to the debug Graphics object, if enabled.\r\n *\r\n * @method Phaser.Physics.Matter.World#postUpdate\r\n * @private\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n if (!this.drawDebug)\r\n {\r\n return;\r\n }\r\n\r\n this.debugGraphic.clear();\r\n\r\n var bodies = Composite.allBodies(this.localWorld);\r\n\r\n if (this.defaults.debugWireframes)\r\n {\r\n if (this.defaults.debugShowConvexHulls)\r\n {\r\n this.renderConvexHulls(bodies);\r\n }\r\n\r\n this.renderWireframes(bodies);\r\n }\r\n else\r\n {\r\n this.renderBodies(bodies);\r\n }\r\n\r\n if (this.defaults.debugShowJoint)\r\n {\r\n this.renderJoints();\r\n }\r\n },\r\n\r\n /**\r\n * Renders the debug convex hulls from the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderConvexHulls\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderConvexHulls: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(1, this.defaults.debugConvexHullColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible || body.parts.length === 1)\r\n {\r\n continue;\r\n }\r\n\r\n graphics.moveTo(body.vertices[0].x, body.vertices[0].y);\r\n\r\n for (var j = 1; j < body.vertices.length; j++)\r\n {\r\n graphics.lineTo(body.vertices[j].x, body.vertices[j].y);\r\n }\r\n \r\n graphics.lineTo(body.vertices[0].x, body.vertices[0].y);\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the wireframes of the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderWireframes\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderWireframes: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n var showInternalEdges = this.defaults.debugShowInternalEdges;\r\n\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n for (var k = (body.parts.length > 1) ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n var part = body.parts[k];\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % vertLength].x, part.vertices[(j + 1) % vertLength].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n }\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderBodies\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderBodies: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n var showInternalEdges = this.defaults.debugShowInternalEdges || !this.defaults.debugWireframes;\r\n var showSleeping = this.defaults.debugShowSleeping;\r\n var wireframes = this.defaults.debugWireframes;\r\n\r\n var body;\r\n var part;\r\n var i;\r\n var k;\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n // Handle compound parts\r\n for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n part = body.parts[k];\r\n\r\n if (!part.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n if (showSleeping && body.isSleeping)\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n }\r\n else\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, part.render.opacity);\r\n }\r\n\r\n // Part polygon\r\n if (part.circleRadius)\r\n {\r\n graphics.beginPath();\r\n graphics.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI);\r\n }\r\n else\r\n {\r\n graphics.beginPath();\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n graphics.closePath();\r\n }\r\n\r\n if (!wireframes)\r\n {\r\n graphics.fillPath();\r\n }\r\n else\r\n {\r\n graphics.strokePath();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders world constraints.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderJoints\r\n * @private\r\n * @since 3.14.0\r\n */\r\n renderJoints: function ()\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(2, this.defaults.jointDebugColor);\r\n\r\n // Render constraints \r\n var constraints = Composite.allConstraints(this.localWorld);\r\n\r\n for (var i = 0; i < constraints.length; i++)\r\n {\r\n var constraint = constraints[i];\r\n\r\n if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\r\n {\r\n continue;\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.lineStyle(constraint.render.lineWidth, Common.colorToNumber(constraint.render.strokeStyle));\r\n }\r\n\r\n var bodyA = constraint.bodyA;\r\n var bodyB = constraint.bodyB;\r\n var start;\r\n var end;\r\n\r\n if (bodyA)\r\n {\r\n start = Vector.add(bodyA.position, constraint.pointA);\r\n }\r\n else\r\n {\r\n start = constraint.pointA;\r\n }\r\n\r\n if (constraint.render.type === 'pin')\r\n {\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 3, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n }\r\n else\r\n {\r\n if (bodyB)\r\n {\r\n end = Vector.add(bodyB.position, constraint.pointB);\r\n }\r\n else\r\n {\r\n end = constraint.pointB;\r\n }\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(start.x, start.y);\r\n\r\n if (constraint.render.type === 'spring')\r\n {\r\n var delta = Vector.sub(end, start);\r\n var normal = Vector.perp(Vector.normalise(delta));\r\n var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20));\r\n var offset;\r\n\r\n for (var j = 1; j < coils; j += 1)\r\n {\r\n offset = (j % 2 === 0) ? 1 : -1;\r\n\r\n graphics.lineTo(\r\n start.x + delta.x * (j / coils) + normal.x * offset * 4,\r\n start.y + delta.y * (j / coils) + normal.y * offset * 4\r\n );\r\n }\r\n }\r\n\r\n graphics.lineTo(end.x, end.y);\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.strokePath();\r\n }\r\n\r\n if (constraint.render.anchors)\r\n {\r\n graphics.fillStyle(Common.colorToNumber(constraint.render.strokeStyle));\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 6, 0, 2 * Math.PI);\r\n graphics.arc(end.x, end.y, 6, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n graphics.fillPath();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#fromPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} path - [description]\r\n * @param {array} points - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\n fromPath: function (path, points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n // var pathPattern = /L?\\s*([-\\d.e]+)[\\s,]*([-\\d.e]+)*/ig;\r\n\r\n // eslint-disable-next-line no-useless-escape\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig;\r\n\r\n path.replace(pathPattern, function (match, x, y)\r\n {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * Resets the internal collision IDs that Matter.JS uses for Body collision groups.\r\n * \r\n * You should call this before destroying your game if you need to restart the game\r\n * again on the same page, without first reloading the page. Or, if you wish to\r\n * consistently destroy a Scene that contains Matter.js and then run it again\r\n * later in the same game.\r\n *\r\n * @method Phaser.Physics.Matter.World#resetCollisionIDs\r\n * @since 3.17.0\r\n */\r\n resetCollisionIDs: function ()\r\n {\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * @method Phaser.Physics.Matter.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n MatterEvents.off(this.engine);\r\n\r\n this.removeAllListeners();\r\n\r\n MatterWorld.clear(this.localWorld, false);\r\n\r\n Engine.clear(this.engine);\r\n\r\n if (this.drawDebug)\r\n {\r\n this.debugGraphic.destroy();\r\n }\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * After destroying the world it cannot be re-used again.\r\n *\r\n * @method Phaser.Physics.Matter.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/World.js?")},"./node_modules/phaser/src/physics/matter-js/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to set restitution on objects.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the restitution on the physics object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.restitution = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Bounce.js?")},"./node_modules/phaser/src/physics/matter-js/components/Collision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Collision\r\n * @since 3.0.0\r\n */\r\nvar Collision = {\r\n\r\n /**\r\n * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}).\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique category bitfield.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionCategory: function (value)\r\n {\r\n this.body.collisionFilter.category = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique group index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionGroup: function (value)\r\n {\r\n this.body.collisionFilter.group = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollidesWith\r\n * @since 3.0.0\r\n *\r\n * @param {(number|number[])} categories - A unique category bitfield, or an array of them.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesWith: function (categories)\r\n {\r\n var flags = 0;\r\n\r\n if (!Array.isArray(categories))\r\n {\r\n flags = categories;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < categories.length; i++)\r\n {\r\n flags |= categories[i];\r\n }\r\n }\r\n\r\n this.body.collisionFilter.mask = flags;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Collision.js?")},"./node_modules/phaser/src/physics/matter-js/components/Force.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * A component to apply force to Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Force\r\n * @since 3.0.0\r\n */\r\nvar Force = {\r\n\r\n // force = vec2 / point\r\n\r\n /**\r\n * Applies a force to a body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForce\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForce: function (force)\r\n {\r\n this._tempVec2.set(this.body.position.x, this.body.position.y);\r\n\r\n Body.applyForce(this.body, this._tempVec2, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given position.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForceFrom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} position - The position in which the force comes from.\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForceFrom: function (position, force)\r\n {\r\n Body.applyForce(this.body, position, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the forward position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrust\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrust: function (speed)\r\n {\r\n var angle = this.body.angle;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the left position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustLeft: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the right position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustRight: function (speed)\r\n {\r\n var angle = this.body.angle + Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the back position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustBack\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustBack: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Force;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Force.js?')},"./node_modules/phaser/src/physics/matter-js/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * Sets new friction values for this Game Object's Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.\r\n * @param {number} [air] - If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.\r\n * @param {number} [fstatic] - If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never \"stick\" when it is nearly stationary.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (value, air, fstatic)\r\n {\r\n this.body.friction = value;\r\n\r\n if (air !== undefined)\r\n {\r\n this.body.frictionAir = air;\r\n }\r\n\r\n if (fstatic !== undefined)\r\n {\r\n this.body.frictionStatic = fstatic;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new air resistance for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionAir: function (value)\r\n {\r\n this.body.frictionAir = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never \"stick\" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new static friction for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionStatic: function (value)\r\n {\r\n this.body.frictionStatic = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Friction.js?")},"./node_modules/phaser/src/physics/matter-js/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to manipulate world gravity for Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * A togglable function for ignoring world gravity in real-time on the current body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Gravity#setIgnoreGravity\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to true to ignore the effect of world gravity, or false to not ignore it.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setIgnoreGravity: function (value)\r\n {\r\n this.body.ignoreGravity = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Gravity.js?")},"./node_modules/phaser/src/physics/matter-js/components/Mass.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Mass\r\n * @since 3.0.0\r\n */\r\nvar Mass = {\r\n\r\n /**\r\n * Sets the mass of the Game Object\'s Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new mass of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMass: function (value)\r\n {\r\n Body.setMass(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets density of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setDensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new density of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDensity: function (value)\r\n {\r\n Body.setDensity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The body\'s center of mass.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Mass#centerOfMass\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Math.Vector2} The center of mass.\r\n */\r\n centerOfMass: {\r\n\r\n get: function ()\r\n {\r\n return new Vector2(this.body.render.sprite.xOffset * this.width, this.body.render.sprite.yOffset * this.height);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mass;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Mass.js?')},"./node_modules/phaser/src/physics/matter-js/components/Sensor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sensor\r\n * @since 3.0.0\r\n */\r\nvar Sensor = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#setSensor\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSensor: function (value)\r\n {\r\n this.body.isSensor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#isSensor\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isSensor: function ()\r\n {\r\n return this.body.isSensor;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sensor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sensor.js?")},"./node_modules/phaser/src/physics/matter-js/components/SetBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ../lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PhysicsEditorParser = __webpack_require__(/*! ../PhysicsEditorParser */ \"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js\");\r\nvar Vertices = __webpack_require__(/*! ../lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.SetBody\r\n * @since 3.0.0\r\n */\r\nvar SetBody = {\r\n\r\n // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc\r\n\r\n /**\r\n * Set the body on a Game Object to a rectangle.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setRectangle: function (width, height, options)\r\n {\r\n return this.setBody({ type: 'rectangle', width: width, height: height }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCircle: function (radius, options)\r\n {\r\n return this.setBody({ type: 'circle', radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Set the body on the Game Object to a polygon shape.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setPolygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the polygon.\r\n * @param {number} sides - The amount of sides creating the polygon.\r\n * @param {object} options - A matterjs config object.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPolygon: function (radius, sides, options)\r\n {\r\n return this.setBody({ type: 'polygon', sides: sides, radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Creates a new matterjs trapezoid body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the trapezoid.\r\n * @param {number} height - The height of the trapezoid.\r\n * @param {number} slope - The angle of slope for the trapezoid.\r\n * @param {object} options - A matterjs config object for the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTrapezoid: function (width, height, slope, options)\r\n {\r\n return this.setBody({ type: 'trapezoid', width: width, height: height, slope: slope }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - [description]\r\n * @param {boolean} [addToWorld=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setExistingBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined)\r\n {\r\n addToWorld = true;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n }\r\n\r\n this.body = body;\r\n\r\n for (var i = 0; i < body.parts.length; i++)\r\n {\r\n body.parts[i].gameObject = this;\r\n }\r\n\r\n var _this = this;\r\n\r\n body.destroy = function destroy ()\r\n {\r\n _this.world.remove(_this.body);\r\n _this.body.gameObject = null;\r\n };\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(body);\r\n }\r\n\r\n if (this._originComponent)\r\n {\r\n this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBody: function (config, options)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n var body;\r\n\r\n // Allow them to do: shape: 'circle' instead of shape: { type: 'circle' }\r\n if (typeof config === 'string')\r\n {\r\n // Using defaults\r\n config = { type: config };\r\n }\r\n\r\n var shapeType = GetFastValue(config, 'type', 'rectangle');\r\n var bodyX = GetFastValue(config, 'x', this._tempVec2.x);\r\n var bodyY = GetFastValue(config, 'y', this._tempVec2.y);\r\n var bodyWidth = GetFastValue(config, 'width', this.width);\r\n var bodyHeight = GetFastValue(config, 'height', this.height);\r\n\r\n switch (shapeType)\r\n {\r\n case 'rectangle':\r\n body = Bodies.rectangle(bodyX, bodyY, bodyWidth, bodyHeight, options);\r\n break;\r\n\r\n case 'circle':\r\n var radius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n var maxSides = GetFastValue(config, 'maxSides', 25);\r\n body = Bodies.circle(bodyX, bodyY, radius, options, maxSides);\r\n break;\r\n\r\n case 'trapezoid':\r\n var slope = GetFastValue(config, 'slope', 0.5);\r\n body = Bodies.trapezoid(bodyX, bodyY, bodyWidth, bodyHeight, slope, options);\r\n break;\r\n\r\n case 'polygon':\r\n var sides = GetFastValue(config, 'sides', 5);\r\n var pRadius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n body = Bodies.polygon(bodyX, bodyY, sides, pRadius, options);\r\n break;\r\n\r\n case 'fromVertices':\r\n case 'fromVerts':\r\n\r\n var verts = GetFastValue(config, 'verts', null);\r\n\r\n if (verts)\r\n {\r\n // Has the verts array come from Vertices.fromPath, or is it raw?\r\n if (typeof verts === 'string')\r\n {\r\n verts = Vertices.fromPath(verts);\r\n }\r\n\r\n if (this.body && !this.body.hasOwnProperty('temp'))\r\n {\r\n Body.setVertices(this.body, verts);\r\n\r\n body = this.body;\r\n }\r\n else\r\n {\r\n var flagInternal = GetFastValue(config, 'flagInternal', false);\r\n var removeCollinear = GetFastValue(config, 'removeCollinear', 0.01);\r\n var minimumArea = GetFastValue(config, 'minimumArea', 10);\r\n \r\n body = Bodies.fromVertices(bodyX, bodyY, verts, options, flagInternal, removeCollinear, minimumArea);\r\n }\r\n }\r\n\r\n break;\r\n\r\n case 'fromPhysicsEditor':\r\n body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config);\r\n break;\r\n }\r\n\r\n if (body)\r\n {\r\n this.setExistingBody(body, config.addToWorld);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/SetBody.js?")},"./node_modules/phaser/src/physics/matter-js/components/Sleep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar MatterEvents = __webpack_require__(/*! ../lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sleep\r\n * @since 3.0.0\r\n */\r\nvar Sleep = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=60] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepThreshold: function (value)\r\n {\r\n if (value === undefined) { value = 60; }\r\n\r\n this.body.sleepThreshold = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} start - [description]\r\n * @param {boolean} end - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEvents: function (start, end)\r\n {\r\n this.setSleepStartEvent(start);\r\n this.setSleepEndEvent(end);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepStartEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepStart', function (event)\r\n {\r\n world.emit(Events.SLEEP_START, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepStart');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEndEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepEnd', function (event)\r\n {\r\n world.emit(Events.SLEEP_END, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepEnd');\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sleep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sleep.js?")},"./node_modules/phaser/src/physics/matter-js/components/Static.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Static\r\n * @since 3.0.0\r\n */\r\nvar Static = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#setStatic\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setStatic: function (value)\r\n {\r\n Body.setStatic(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#isStatic\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isStatic: function ()\r\n {\r\n return this.body.isStatic;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Static;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Static.js?')},"./node_modules/phaser/src/physics/matter-js/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n// Transform Component\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Transform\r\n * @since 3.0.0\r\n */\r\nvar Transform = {\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(value, this.y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(this.x, value);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n \r\n this._scaleX = value;\r\n\r\n if (this._scaleX === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n // Reset Matter scale back to 1 (sigh)\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, value, this._scaleY);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleY = value;\r\n\r\n if (this._scaleY === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, this._scaleX, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#angle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this.body.angle * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this.body.angle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n\r\n Body.setAngle(this.body, this._rotation);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the body.\r\n * @param {number} [y=x] - The vertical position of the body.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this._rotation = WrapAngle(radians);\r\n\r\n Body.setAngle(this.body, radians);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setFixedRotation: function ()\r\n {\r\n Body.setInertia(this.body, Infinity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n Body.setAngle(this.body, this.rotation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the x value.\r\n * @param {Phaser.Math.Vector2} [point] - The point (Vector2) from which scaling will occur.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setScale: function (x, y, point)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleX = x;\r\n this._scaleY = y;\r\n\r\n Body.scale(this.body, factorX, factorY, point);\r\n\r\n Body.scale(this.body, x, y, point);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Transform.js?')},"./node_modules/phaser/src/physics/matter-js/components/Velocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n Body.setAngularVelocity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this._tempVec2.set(x, this.body.velocity.y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this._tempVec2.set(this.body.velocity.x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets both the horizontal and vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Velocity.js?')},"./node_modules/phaser/src/physics/matter-js/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/matter-js/components/Bounce.js"),\r\n Collision: __webpack_require__(/*! ./Collision */ "./node_modules/phaser/src/physics/matter-js/components/Collision.js"),\r\n Force: __webpack_require__(/*! ./Force */ "./node_modules/phaser/src/physics/matter-js/components/Force.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/matter-js/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/matter-js/components/Gravity.js"),\r\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/matter-js/components/Mass.js"),\r\n Static: __webpack_require__(/*! ./Static */ "./node_modules/phaser/src/physics/matter-js/components/Static.js"),\r\n Sensor: __webpack_require__(/*! ./Sensor */ "./node_modules/phaser/src/physics/matter-js/components/Sensor.js"),\r\n SetBody: __webpack_require__(/*! ./SetBody */ "./node_modules/phaser/src/physics/matter-js/components/SetBody.js"),\r\n Sleep: __webpack_require__(/*! ./Sleep */ "./node_modules/phaser/src/physics/matter-js/components/Sleep.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/physics/matter-js/components/Transform.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/matter-js/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/index.js?')},"./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.AfterUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics After Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#AFTER_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.AfterUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'afterupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.BeforeUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Before Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#BEFORE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.BeforeUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'beforeupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionActiveEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Active Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that are colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_ACTIVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionactive';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionEndEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have finished colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have started to collide in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * stops dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * is actively dragging a body. It is emitted each time the pointer moves.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * starts dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {MatterJS.Body} part - The part of the body that was clicked on.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepEndEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body stop sleeping.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has stopped sleeping.\r\n */\r\nmodule.exports = 'sleepend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepStartEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body goes to sleep.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has gone to sleep.\r\n */\r\nmodule.exports = 'sleepstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AFTER_UPDATE: __webpack_require__(/*! ./AFTER_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js"),\r\n BEFORE_UPDATE: __webpack_require__(/*! ./BEFORE_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js"),\r\n COLLISION_ACTIVE: __webpack_require__(/*! ./COLLISION_ACTIVE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js"),\r\n COLLISION_END: __webpack_require__(/*! ./COLLISION_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js"),\r\n COLLISION_START: __webpack_require__(/*! ./COLLISION_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js"),\r\n SLEEP_END: __webpack_require__(/*! ./SLEEP_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js"),\r\n SLEEP_START: __webpack_require__(/*! ./SLEEP_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/index.js?')},"./node_modules/phaser/src/physics/matter-js/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js"),\r\n Image: __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js"),\r\n Matter: __webpack_require__(/*! ./CustomMain */ "./node_modules/phaser/src/physics/matter-js/CustomMain.js"),\r\n MatterPhysics: __webpack_require__(/*! ./MatterPhysics */ "./node_modules/phaser/src/physics/matter-js/MatterPhysics.js"),\r\n PolyDecomp: __webpack_require__(/*! ./poly-decomp */ "./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js"),\r\n Sprite: __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js"),\r\n TileBody: __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js"),\r\n PhysicsEditorParser: __webpack_require__(/*! ./PhysicsEditorParser */ "./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js")\r\n\r\n};\r\n\r\n/**\r\n * @namespace MatterJS\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Body` module contains methods for creating and manipulating body models.\r\n * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n *\r\n * @class MatterJS.Body\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n * with commonly used body configurations (such as rectangles, circles and other polygons).\r\n *\r\n * @class MatterJS.Bodies\r\n * @since 3.18.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n * It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n *\r\n * @class MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n * A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n * There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n *\r\n * @class MatterJS.World\r\n * @extends MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n * The stiffness of constraints can be modified to create springs or elastic.\r\n *\r\n * @class MatterJS.Constraint\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n * An engine is a controller that manages updating the simulation of the world.\r\n *\r\n * @class MatterJS.Engine\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @class MatterJS.Vertices\r\n * @since 3.0.0\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/index.js?')},"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Body` module contains methods for creating and manipulating body models.\r\n* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n\r\n* @class Body\r\n*/\r\n\r\nvar Body = {};\r\n\r\nmodule.exports = Body;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\n\r\n(function() {\r\n\r\n Body._inertiaScale = 4;\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n /**\r\n * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * Vertices must be specified in clockwise order.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {body} body\r\n */\r\n Body.create = function(options) {\r\n var defaults = {\r\n id: Common.nextId(),\r\n type: 'body',\r\n label: 'Body',\r\n gameObject: null,\r\n parts: [],\r\n plugin: {},\r\n angle: 0,\r\n vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),\r\n position: { x: 0, y: 0 },\r\n force: { x: 0, y: 0 },\r\n torque: 0,\r\n positionImpulse: { x: 0, y: 0 },\r\n previousPositionImpulse: { x: 0, y: 0 },\r\n constraintImpulse: { x: 0, y: 0, angle: 0 },\r\n totalContacts: 0,\r\n speed: 0,\r\n angularSpeed: 0,\r\n velocity: { x: 0, y: 0 },\r\n angularVelocity: 0,\r\n isSensor: false,\r\n isStatic: false,\r\n isSleeping: false,\r\n ignoreGravity: false,\r\n ignorePointer: false,\r\n motion: 0,\r\n sleepThreshold: 60,\r\n density: 0.001,\r\n restitution: 0,\r\n friction: 0.1,\r\n frictionStatic: 0.5,\r\n frictionAir: 0.01,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n },\r\n slop: 0.05,\r\n timeScale: 1,\r\n render: {\r\n visible: true,\r\n opacity: 1,\r\n sprite: {\r\n xScale: 1,\r\n yScale: 1,\r\n xOffset: 0,\r\n yOffset: 0\r\n },\r\n lineWidth: 0\r\n },\r\n\r\n events: null,\r\n bounds: null,\r\n chamfer: null,\r\n circleRadius: 0,\r\n positionPrev: null,\r\n anglePrev: 0,\r\n parent: null,\r\n\r\n axes: null,\r\n area: 0,\r\n mass: 0,\r\n inertia: 0,\r\n\r\n _original: null\r\n };\r\n\r\n var body = Common.extend(defaults, options);\r\n\r\n _initProperties(body, options);\r\n\r\n return body;\r\n };\r\n\r\n /**\r\n * Returns the next unique group index for which bodies will collide.\r\n * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.\r\n * See `body.collisionFilter` for more information.\r\n * @method nextGroup\r\n * @param {bool} [isNonColliding=false]\r\n * @return {Number} Unique group index\r\n */\r\n Body.nextGroup = function(isNonColliding) {\r\n if (isNonColliding)\r\n return Body._nextNonCollidingGroupId--;\r\n\r\n return Body._nextCollidingGroupId++;\r\n };\r\n\r\n /**\r\n * Returns the next unique category bitfield (starting after the initial default category `0x0001`).\r\n * There are 32 available. See `body.collisionFilter` for more information.\r\n * @method nextCategory\r\n * @return {Number} Unique category bitfield\r\n */\r\n Body.nextCategory = function() {\r\n Body._nextCategory = Body._nextCategory << 1;\r\n return Body._nextCategory;\r\n };\r\n\r\n /**\r\n * Initialises body properties.\r\n * @method _initProperties\r\n * @private\r\n * @param {body} body\r\n * @param {} [options]\r\n */\r\n var _initProperties = function(body, options) {\r\n options = options || {};\r\n\r\n // init required properties (order is important)\r\n Body.set(body, {\r\n bounds: body.bounds || Bounds.create(body.vertices),\r\n positionPrev: body.positionPrev || Vector.clone(body.position),\r\n anglePrev: body.anglePrev || body.angle,\r\n vertices: body.vertices,\r\n parts: body.parts || [body],\r\n isStatic: body.isStatic,\r\n isSleeping: body.isSleeping,\r\n parent: body.parent || body\r\n });\r\n\r\n Vertices.rotate(body.vertices, body.angle, body.position);\r\n Axes.rotate(body.axes, body.angle);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n\r\n // allow options to override the automatically calculated properties\r\n Body.set(body, {\r\n axes: options.axes || body.axes,\r\n area: options.area || body.area,\r\n mass: options.mass || body.mass,\r\n inertia: options.inertia || body.inertia\r\n });\r\n\r\n // render properties\r\n var defaultFillStyle = (body.isStatic ? '#2e2b44' : Common.choose(['#006BA6', '#0496FF', '#FFBC42', '#D81159', '#8F2D56'])),\r\n defaultStrokeStyle = '#000';\r\n body.render.fillStyle = body.render.fillStyle || defaultFillStyle;\r\n body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle;\r\n body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x);\r\n body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y);\r\n };\r\n\r\n /**\r\n * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist.\r\n * Prefer to use the actual setter functions in performance critical situations.\r\n * @method set\r\n * @param {body} body\r\n * @param {} settings A property name (or map of properties and values) to set on the body.\r\n * @param {} value The value to set if `settings` is a single property name.\r\n */\r\n Body.set = function(body, settings, value) {\r\n var property;\r\n\r\n if (typeof settings === 'string') {\r\n property = settings;\r\n settings = {};\r\n settings[property] = value;\r\n }\r\n\r\n for (property in settings) {\r\n\r\n if (!settings.hasOwnProperty(property))\r\n continue;\r\n\r\n value = settings[property];\r\n switch (property) {\r\n\r\n case 'isStatic':\r\n Body.setStatic(body, value);\r\n break;\r\n case 'isSleeping':\r\n Sleeping.set(body, value);\r\n break;\r\n case 'mass':\r\n Body.setMass(body, value);\r\n break;\r\n case 'density':\r\n Body.setDensity(body, value);\r\n break;\r\n case 'inertia':\r\n Body.setInertia(body, value);\r\n break;\r\n case 'vertices':\r\n Body.setVertices(body, value);\r\n break;\r\n case 'position':\r\n Body.setPosition(body, value);\r\n break;\r\n case 'angle':\r\n Body.setAngle(body, value);\r\n break;\r\n case 'velocity':\r\n Body.setVelocity(body, value);\r\n break;\r\n case 'angularVelocity':\r\n Body.setAngularVelocity(body, value);\r\n break;\r\n case 'parts':\r\n Body.setParts(body, value);\r\n break;\r\n default:\r\n body[property] = value;\r\n\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity.\r\n * @method setStatic\r\n * @param {body} body\r\n * @param {bool} isStatic\r\n */\r\n Body.setStatic = function(body, isStatic) {\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.isStatic = isStatic;\r\n\r\n if (isStatic) {\r\n part._original = {\r\n restitution: part.restitution,\r\n friction: part.friction,\r\n mass: part.mass,\r\n inertia: part.inertia,\r\n density: part.density,\r\n inverseMass: part.inverseMass,\r\n inverseInertia: part.inverseInertia\r\n };\r\n\r\n part.restitution = 0;\r\n part.friction = 1;\r\n part.mass = part.inertia = part.density = Infinity;\r\n part.inverseMass = part.inverseInertia = 0;\r\n\r\n part.positionPrev.x = part.position.x;\r\n part.positionPrev.y = part.position.y;\r\n part.anglePrev = part.angle;\r\n part.angularVelocity = 0;\r\n part.speed = 0;\r\n part.angularSpeed = 0;\r\n part.motion = 0;\r\n } else if (part._original) {\r\n part.restitution = part._original.restitution;\r\n part.friction = part._original.friction;\r\n part.mass = part._original.mass;\r\n part.inertia = part._original.inertia;\r\n part.density = part._original.density;\r\n part.inverseMass = part._original.inverseMass;\r\n part.inverseInertia = part._original.inverseInertia;\r\n\r\n part._original = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the mass of the body. Inverse mass, density and inertia are automatically updated to reflect the change.\r\n * @method setMass\r\n * @param {body} body\r\n * @param {number} mass\r\n */\r\n Body.setMass = function(body, mass) {\r\n var moment = body.inertia / (body.mass / 6);\r\n body.inertia = moment * (mass / 6);\r\n body.inverseInertia = 1 / body.inertia;\r\n\r\n body.mass = mass;\r\n body.inverseMass = 1 / body.mass;\r\n body.density = body.mass / body.area;\r\n };\r\n\r\n /**\r\n * Sets the density of the body. Mass and inertia are automatically updated to reflect the change.\r\n * @method setDensity\r\n * @param {body} body\r\n * @param {number} density\r\n */\r\n Body.setDensity = function(body, density) {\r\n Body.setMass(body, density * body.area);\r\n body.density = density;\r\n };\r\n\r\n /**\r\n * Sets the moment of inertia (i.e. second moment of area) of the body of the body. \r\n * Inverse inertia is automatically updated to reflect the change. Mass is not changed.\r\n * @method setInertia\r\n * @param {body} body\r\n * @param {number} inertia\r\n */\r\n Body.setInertia = function(body, inertia) {\r\n body.inertia = inertia;\r\n body.inverseInertia = 1 / body.inertia;\r\n };\r\n\r\n /**\r\n * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`).\r\n * Vertices will be automatically transformed to be orientated around their centre of mass as the origin.\r\n * They are then automatically translated to world space based on `body.position`.\r\n *\r\n * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array).\r\n * Vertices must form a convex hull, concave hulls are not supported.\r\n *\r\n * @method setVertices\r\n * @param {body} body\r\n * @param {vector[]} vertices\r\n */\r\n Body.setVertices = function(body, vertices) {\r\n // change vertices\r\n if (vertices[0].body === body) {\r\n body.vertices = vertices;\r\n } else {\r\n body.vertices = Vertices.create(vertices, body);\r\n }\r\n\r\n // update properties\r\n body.axes = Axes.fromVertices(body.vertices);\r\n body.area = Vertices.area(body.vertices);\r\n Body.setMass(body, body.density * body.area);\r\n\r\n // orient vertices around the centre of mass at origin (0, 0)\r\n var centre = Vertices.centre(body.vertices);\r\n Vertices.translate(body.vertices, centre, -1);\r\n\r\n // update inertia while vertices are at origin (0, 0)\r\n Body.setInertia(body, Body._inertiaScale * Vertices.inertia(body.vertices, body.mass));\r\n\r\n // update geometry\r\n Vertices.translate(body.vertices, body.position);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the parts of the `body` and updates mass, inertia and centroid.\r\n * Each part will have its parent set to `body`.\r\n * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.`\r\n * Note that this method will ensure that the first part in `body.parts` will always be the `body`.\r\n * @method setParts\r\n * @param {body} body\r\n * @param [body] parts\r\n * @param {bool} [autoHull=true]\r\n */\r\n Body.setParts = function(body, parts, autoHull) {\r\n var i;\r\n\r\n // add all the parts, ensuring that the first part is always the parent body\r\n parts = parts.slice(0);\r\n body.parts.length = 0;\r\n body.parts.push(body);\r\n body.parent = body;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var part = parts[i];\r\n if (part !== body) {\r\n part.parent = body;\r\n body.parts.push(part);\r\n }\r\n }\r\n\r\n if (body.parts.length === 1)\r\n return;\r\n\r\n autoHull = typeof autoHull !== 'undefined' ? autoHull : true;\r\n\r\n // find the convex hull of all parts to set on the parent body\r\n if (autoHull) {\r\n var vertices = [];\r\n for (i = 0; i < parts.length; i++) {\r\n vertices = vertices.concat(parts[i].vertices);\r\n }\r\n\r\n Vertices.clockwiseSort(vertices);\r\n\r\n var hull = Vertices.hull(vertices),\r\n hullCentre = Vertices.centre(hull);\r\n\r\n Body.setVertices(body, hull);\r\n Vertices.translate(body.vertices, hullCentre);\r\n }\r\n\r\n // sum the properties of all compound parts of the parent body\r\n var total = Body._totalProperties(body);\r\n\r\n body.area = total.area;\r\n body.parent = body;\r\n body.position.x = total.centre.x;\r\n body.position.y = total.centre.y;\r\n body.positionPrev.x = total.centre.x;\r\n body.positionPrev.y = total.centre.y;\r\n\r\n Body.setMass(body, total.mass);\r\n Body.setInertia(body, total.inertia);\r\n Body.setPosition(body, total.centre);\r\n };\r\n\r\n /**\r\n * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged.\r\n * @method setPosition\r\n * @param {body} body\r\n * @param {vector} position\r\n */\r\n Body.setPosition = function(body, position) {\r\n var delta = Vector.sub(position, body.position);\r\n body.positionPrev.x += delta.x;\r\n body.positionPrev.y += delta.y;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.position.x += delta.x;\r\n part.position.y += delta.y;\r\n Vertices.translate(part.vertices, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged.\r\n * @method setAngle\r\n * @param {body} body\r\n * @param {number} angle\r\n */\r\n Body.setAngle = function(body, angle) {\r\n var delta = angle - body.angle;\r\n body.anglePrev += delta;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.angle += delta;\r\n Vertices.rotate(part.vertices, delta, body.position);\r\n Axes.rotate(part.axes, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, delta, body.position, part.position);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setVelocity\r\n * @param {body} body\r\n * @param {vector} velocity\r\n */\r\n Body.setVelocity = function(body, velocity) {\r\n body.positionPrev.x = body.position.x - velocity.x;\r\n body.positionPrev.y = body.position.y - velocity.y;\r\n body.velocity.x = velocity.x;\r\n body.velocity.y = velocity.y;\r\n body.speed = Vector.magnitude(body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setAngularVelocity\r\n * @param {body} body\r\n * @param {number} velocity\r\n */\r\n Body.setAngularVelocity = function(body, velocity) {\r\n body.anglePrev = body.angle - velocity;\r\n body.angularVelocity = velocity;\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n };\r\n\r\n /**\r\n * Moves a body by a given vector relative to its current position, without imparting any velocity.\r\n * @method translate\r\n * @param {body} body\r\n * @param {vector} translation\r\n */\r\n Body.translate = function(body, translation) {\r\n Body.setPosition(body, Vector.add(body.position, translation));\r\n };\r\n\r\n /**\r\n * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {body} body\r\n * @param {number} rotation\r\n * @param {vector} [point]\r\n */\r\n Body.rotate = function(body, rotation, point) {\r\n if (!point) {\r\n Body.setAngle(body, body.angle + rotation);\r\n } else {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.setAngle(body, body.angle + rotation);\r\n }\r\n };\r\n\r\n /**\r\n * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre).\r\n * @method scale\r\n * @param {body} body\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} [point]\r\n */\r\n Body.scale = function(body, scaleX, scaleY, point) {\r\n var totalArea = 0,\r\n totalInertia = 0;\r\n\r\n point = point || body.position;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n // scale vertices\r\n Vertices.scale(part.vertices, scaleX, scaleY, point);\r\n\r\n // update properties\r\n part.axes = Axes.fromVertices(part.vertices);\r\n part.area = Vertices.area(part.vertices);\r\n Body.setMass(part, body.density * part.area);\r\n\r\n // update inertia (requires vertices to be at origin)\r\n Vertices.translate(part.vertices, { x: -part.position.x, y: -part.position.y });\r\n Body.setInertia(part, Body._inertiaScale * Vertices.inertia(part.vertices, part.mass));\r\n Vertices.translate(part.vertices, { x: part.position.x, y: part.position.y });\r\n\r\n if (i > 0) {\r\n totalArea += part.area;\r\n totalInertia += part.inertia;\r\n }\r\n\r\n // scale position\r\n part.position.x = point.x + (part.position.x - point.x) * scaleX;\r\n part.position.y = point.y + (part.position.y - point.y) * scaleY;\r\n\r\n // update bounds\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // handle parent body\r\n if (body.parts.length > 1) {\r\n body.area = totalArea;\r\n\r\n if (!body.isStatic) {\r\n Body.setMass(body, body.density * totalArea);\r\n Body.setInertia(body, totalInertia);\r\n }\r\n }\r\n\r\n // handle circles\r\n if (body.circleRadius) { \r\n if (scaleX === scaleY) {\r\n body.circleRadius *= scaleX;\r\n } else {\r\n // body is no longer a circle\r\n body.circleRadius = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration.\r\n * @method update\r\n * @param {body} body\r\n * @param {number} deltaTime\r\n * @param {number} timeScale\r\n * @param {number} correction\r\n */\r\n Body.update = function(body, deltaTime, timeScale, correction) {\r\n var deltaTimeSquared = Math.pow(deltaTime * timeScale * body.timeScale, 2);\r\n\r\n // from the previous step\r\n var frictionAir = 1 - body.frictionAir * timeScale * body.timeScale,\r\n velocityPrevX = body.position.x - body.positionPrev.x,\r\n velocityPrevY = body.position.y - body.positionPrev.y;\r\n\r\n // update velocity with Verlet integration\r\n body.velocity.x = (velocityPrevX * frictionAir * correction) + (body.force.x / body.mass) * deltaTimeSquared;\r\n body.velocity.y = (velocityPrevY * frictionAir * correction) + (body.force.y / body.mass) * deltaTimeSquared;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n body.position.x += body.velocity.x;\r\n body.position.y += body.velocity.y;\r\n\r\n // update angular velocity with Verlet integration\r\n body.angularVelocity = ((body.angle - body.anglePrev) * frictionAir * correction) + (body.torque / body.inertia) * deltaTimeSquared;\r\n body.anglePrev = body.angle;\r\n body.angle += body.angularVelocity;\r\n\r\n // track speed and acceleration\r\n body.speed = Vector.magnitude(body.velocity);\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n\r\n // transform the body geometry\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n Vertices.translate(part.vertices, body.velocity);\r\n \r\n if (i > 0) {\r\n part.position.x += body.velocity.x;\r\n part.position.y += body.velocity.y;\r\n }\r\n\r\n if (body.angularVelocity !== 0) {\r\n Vertices.rotate(part.vertices, body.angularVelocity, body.position);\r\n Axes.rotate(part.axes, body.angularVelocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, body.angularVelocity, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n * @method applyForce\r\n * @param {body} body\r\n * @param {vector} position\r\n * @param {vector} force\r\n */\r\n Body.applyForce = function(body, position, force) {\r\n body.force.x += force.x;\r\n body.force.y += force.y;\r\n var offset = { x: position.x - body.position.x, y: position.y - body.position.y };\r\n body.torque += offset.x * force.y - offset.y * force.x;\r\n };\r\n\r\n /**\r\n * Returns the sums of the properties of all compound parts of the parent body.\r\n * @method _totalProperties\r\n * @private\r\n * @param {body} body\r\n * @return {}\r\n */\r\n Body._totalProperties = function(body) {\r\n // from equations at:\r\n // https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory\r\n // http://output.to/sideway/default.asp?qno=121100087\r\n\r\n var properties = {\r\n mass: 0,\r\n area: 0,\r\n inertia: 0,\r\n centre: { x: 0, y: 0 }\r\n };\r\n\r\n // sum the properties of all compound parts of the parent body\r\n for (var i = body.parts.length === 1 ? 0 : 1; i < body.parts.length; i++) {\r\n var part = body.parts[i],\r\n mass = part.mass !== Infinity ? part.mass : 1;\r\n\r\n properties.mass += mass;\r\n properties.area += part.area;\r\n properties.inertia += part.inertia;\r\n properties.centre = Vector.add(properties.centre, Vector.mult(part.position, mass));\r\n }\r\n\r\n properties.centre = Vector.div(properties.centre, properties.mass);\r\n\r\n return properties;\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a body starts sleeping (where `this` is the body).\r\n *\r\n * @event sleepStart\r\n * @this {body} The body that has started sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a body ends sleeping (where `this` is the body).\r\n *\r\n * @event sleepEnd\r\n * @this {body} The body that has ended sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"body\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Body\"\r\n */\r\n\r\n /**\r\n * An array of bodies that make up this body. \r\n * The first body in the array must always be a self reference to the current body instance.\r\n * All bodies in the `parts` array together form a single rigid compound body.\r\n * Parts are allowed to overlap, have gaps or holes or even form concave bodies.\r\n * Parts themselves should never be added to a `World`, only the parent body should be.\r\n * Use `Body.setParts` when setting parts to ensure correct updates of all properties.\r\n *\r\n * @property parts\r\n * @type body[]\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n /**\r\n * A self reference if the body is _not_ a part of another body.\r\n * Otherwise this is a reference to the body that this is a part of.\r\n * See `body.parts`.\r\n *\r\n * @property parent\r\n * @type body\r\n */\r\n\r\n /**\r\n * A `Number` specifying the angle of the body, in radians.\r\n *\r\n * @property angle\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An array of `Vector` objects that specify the convex hull of the rigid body.\r\n * These should be provided about the origin `(0, 0)`. E.g.\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation).\r\n * The `Vector` objects are also augmented with additional properties required for efficient collision detection. \r\n *\r\n * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`).\r\n * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices.\r\n *\r\n * @property vertices\r\n * @type vector[]\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the current world-space position of the body.\r\n *\r\n * @property position\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`.\r\n *\r\n * @property force\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`.\r\n *\r\n * @property torque\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`).\r\n *\r\n * @readOnly\r\n * @property speed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`).\r\n *\r\n * @readOnly\r\n * @property angularSpeed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property velocity\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property angularVelocity\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.\r\n * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag.\r\n *\r\n * @property isStatic\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.\r\n *\r\n * @property isSensor\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken.\r\n * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag.\r\n *\r\n * @property isSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive.\r\n * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest.\r\n *\r\n * @readOnly\r\n * @property motion\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).\r\n *\r\n * @property sleepThreshold\r\n * @type number\r\n * @default 60\r\n */\r\n\r\n /**\r\n * A `Number` that defines the density of the body, that is its mass per unit area.\r\n * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object.\r\n * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood).\r\n *\r\n * @property density\r\n * @type number\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead.\r\n * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`).\r\n *\r\n * @property mass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse mass of the body (`1 / mass`).\r\n * If you modify this value, you must also modify the `body.mass` property.\r\n *\r\n * @property inverseMass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`.\r\n * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`).\r\n *\r\n * @property inertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`).\r\n * If you modify this value, you must also modify the `body.inertia` property.\r\n *\r\n * @property inverseInertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. \r\n * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy.\r\n * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula:\r\n *\r\n * Math.max(bodyA.restitution, bodyB.restitution)\r\n *\r\n * @property restitution\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means that the body may slide indefinitely.\r\n * A value of `1` means the body may come to a stop almost instantly after a force is applied.\r\n *\r\n * The effects of the value may be non-linear. \r\n * High values may be unstable depending on the body.\r\n * The engine uses a Coulomb friction model including static and kinetic friction.\r\n * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula:\r\n *\r\n * Math.min(bodyA.friction, bodyB.friction)\r\n *\r\n * @property friction\r\n * @type number\r\n * @default 0.1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the static friction of the body (in the Coulomb friction model). \r\n * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.\r\n * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.\r\n * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.\r\n *\r\n * @property frictionStatic\r\n * @type number\r\n * @default 0.5\r\n */\r\n\r\n /**\r\n * A `Number` that defines the air friction of the body (air resistance). \r\n * A value of `0` means the body will never slow as it moves through space.\r\n * The higher the value, the faster a body slows when moving through space.\r\n * The effects of the value are non-linear. \r\n *\r\n * @property frictionAir\r\n * @type number\r\n * @default 0.01\r\n */\r\n\r\n /**\r\n * An `Object` that specifies the collision filtering properties of this body.\r\n *\r\n * Collisions between two bodies will obey the following rules:\r\n * - If the two bodies have the same non-zero value of `collisionFilter.group`,\r\n * they will always collide if the value is positive, and they will never collide\r\n * if the value is negative.\r\n * - If the two bodies have different values of `collisionFilter.group` or if one\r\n * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:\r\n *\r\n * Each body belongs to a collision category, given by `collisionFilter.category`. This\r\n * value is used as a bit field and the category should have only one bit set, meaning that\r\n * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32\r\n * different collision categories available.\r\n *\r\n * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies\r\n * the categories it collides with (the value is the bitwise AND value of all these categories).\r\n *\r\n * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's\r\n * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`\r\n * are both true.\r\n *\r\n * @property collisionFilter\r\n * @type object\r\n */\r\n\r\n /**\r\n * An Integer `Number`, that specifies the collision group this body belongs to.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.group\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A bit field that specifies the collision category this body belongs to.\r\n * The category value should have only one bit set, for example `0x0001`.\r\n * This means there are up to 32 unique collision categories available.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.category\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A bit mask that specifies the collision categories this body may collide with.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.mask\r\n * @type object\r\n * @default -1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies.\r\n * Avoid changing this value unless you understand the purpose of `slop` in physics engines.\r\n * The default should generally suffice, although very large bodies may require larger values for stable stacking.\r\n *\r\n * @property slop\r\n * @type number\r\n * @default 0.05\r\n */\r\n\r\n /**\r\n * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.\r\n *\r\n * @property timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the body should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * Sets the opacity to use when rendering.\r\n *\r\n * @property render.opacity\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the sprite properties to use when rendering, if any.\r\n *\r\n * @property render.sprite\r\n * @type object\r\n */\r\n\r\n /**\r\n * An `String` that defines the path to the image to use as the sprite texture, if any.\r\n *\r\n * @property render.sprite.texture\r\n * @type string\r\n */\r\n \r\n /**\r\n * A `Number` that defines the scaling in the x-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.xScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the scaling in the y-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.yScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width).\r\n *\r\n * @property render.sprite.xOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the y-axis for the sprite (normalised by texture height).\r\n *\r\n * @property render.sprite.yOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined).\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.fillStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * An array of unique axis vectors (edge normals) used for collision detection.\r\n * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`.\r\n * They are constantly updated by `Body.update` during the simulation.\r\n *\r\n * @property axes\r\n * @type vector[]\r\n */\r\n \r\n /**\r\n * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`.\r\n *\r\n * @property area\r\n * @type string\r\n * @default \r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the AABB region for the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Body.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composite\r\n*/\r\n\r\nvar Composite = {};\r\n\r\nmodule.exports = Composite;\r\n\r\nvar Events = __webpack_require__(/*! ../core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properites section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} [options]\r\n * @return {composite} A new composite\r\n */\r\n Composite.create = function(options) {\r\n return Common.extend({ \r\n id: Common.nextId(),\r\n type: 'composite',\r\n parent: null,\r\n isModified: false,\r\n bodies: [], \r\n constraints: [], \r\n composites: [],\r\n label: 'Composite',\r\n plugin: {}\r\n }, options);\r\n };\r\n\r\n /**\r\n * Sets the composite's `isModified` flag. \r\n * If `updateParents` is true, all parents will be set (default: false).\r\n * If `updateChildren` is true, all children will be set (default: false).\r\n * @method setModified\r\n * @param {composite} composite\r\n * @param {boolean} isModified\r\n * @param {boolean} [updateParents=false]\r\n * @param {boolean} [updateChildren=false]\r\n */\r\n Composite.setModified = function(composite, isModified, updateParents, updateChildren) {\r\n composite.isModified = isModified;\r\n\r\n if (updateParents && composite.parent) {\r\n Composite.setModified(composite.parent, isModified, updateParents, updateChildren);\r\n }\r\n\r\n if (updateChildren) {\r\n for(var i = 0; i < composite.composites.length; i++) {\r\n var childComposite = composite.composites[i];\r\n Composite.setModified(childComposite, isModified, updateParents, updateChildren);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Triggers `beforeAdd` and `afterAdd` events on the `composite`.\r\n * @method add\r\n * @param {composite} composite\r\n * @param {} object\r\n * @return {composite} The original composite with the objects added\r\n */\r\n Composite.add = function(composite, object) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeAdd', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n // skip adding compound parts\r\n if (obj.parent !== obj) {\r\n Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)');\r\n break;\r\n }\r\n\r\n Composite.addBody(composite, obj);\r\n break;\r\n case 'constraint':\r\n Composite.addConstraint(composite, obj);\r\n break;\r\n case 'composite':\r\n Composite.addComposite(composite, obj);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.addConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterAdd', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Optionally searching its children recursively.\r\n * Triggers `beforeRemove` and `afterRemove` events on the `composite`.\r\n * @method remove\r\n * @param {composite} composite\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the objects removed\r\n */\r\n Composite.remove = function(composite, object, deep) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeRemove', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n Composite.removeBody(composite, obj, deep);\r\n break;\r\n case 'constraint':\r\n Composite.removeConstraint(composite, obj, deep);\r\n break;\r\n case 'composite':\r\n Composite.removeComposite(composite, obj, deep);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.removeConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterRemove', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a composite to the given composite.\r\n * @private\r\n * @method addComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @return {composite} The original compositeA with the objects from compositeB added\r\n */\r\n Composite.addComposite = function(compositeA, compositeB) {\r\n compositeA.composites.push(compositeB);\r\n compositeB.parent = compositeA;\r\n Composite.setModified(compositeA, true, true, false);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original compositeA with the composite removed\r\n */\r\n Composite.removeComposite = function(compositeA, compositeB, deep) {\r\n var position = compositeA.composites.indexOf(compositeB);\r\n if (position !== -1) {\r\n Composite.removeCompositeAt(compositeA, position);\r\n Composite.setModified(compositeA, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < compositeA.composites.length; i++){\r\n Composite.removeComposite(compositeA.composites[i], compositeB, true);\r\n }\r\n }\r\n\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite.\r\n * @private\r\n * @method removeCompositeAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the composite removed\r\n */\r\n Composite.removeCompositeAt = function(composite, position) {\r\n composite.composites.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a body to the given composite.\r\n * @private\r\n * @method addBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @return {composite} The original composite with the body added\r\n */\r\n Composite.addBody = function(composite, body) {\r\n composite.bodies.push(body);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBody = function(composite, body, deep) {\r\n var position = composite.bodies.indexOf(body);\r\n if (position !== -1) {\r\n Composite.removeBodyAt(composite, position);\r\n Composite.setModified(composite, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeBody(composite.composites[i], body, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeBodyAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBodyAt = function(composite, position) {\r\n composite.bodies.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a constraint to the given composite.\r\n * @private\r\n * @method addConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @return {composite} The original composite with the constraint added\r\n */\r\n Composite.addConstraint = function(composite, constraint) {\r\n composite.constraints.push(constraint);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a constraint from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraint = function(composite, constraint, deep) {\r\n var position = composite.constraints.indexOf(constraint);\r\n if (position !== -1) {\r\n Composite.removeConstraintAt(composite, position);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeConstraint(composite.composites[i], constraint, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeConstraintAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraintAt = function(composite, position) {\r\n composite.constraints.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes all bodies, constraints and composites from the given composite.\r\n * Optionally clearing its children recursively.\r\n * @method clear\r\n * @param {composite} composite\r\n * @param {boolean} keepStatic\r\n * @param {boolean} [deep=false]\r\n */\r\n Composite.clear = function(composite, keepStatic, deep) {\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.clear(composite.composites[i], keepStatic, true);\r\n }\r\n }\r\n \r\n if (keepStatic) {\r\n composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; });\r\n } else {\r\n composite.bodies.length = 0;\r\n }\r\n\r\n composite.constraints.length = 0;\r\n composite.composites.length = 0;\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns all bodies in the given composite, including all bodies in its children, recursively.\r\n * @method allBodies\r\n * @param {composite} composite\r\n * @return {body[]} All the bodies\r\n */\r\n Composite.allBodies = function(composite) {\r\n var bodies = [].concat(composite.bodies);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n bodies = bodies.concat(Composite.allBodies(composite.composites[i]));\r\n\r\n return bodies;\r\n };\r\n\r\n /**\r\n * Returns all constraints in the given composite, including all constraints in its children, recursively.\r\n * @method allConstraints\r\n * @param {composite} composite\r\n * @return {constraint[]} All the constraints\r\n */\r\n Composite.allConstraints = function(composite) {\r\n var constraints = [].concat(composite.constraints);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n constraints = constraints.concat(Composite.allConstraints(composite.composites[i]));\r\n\r\n return constraints;\r\n };\r\n\r\n /**\r\n * Returns all composites in the given composite, including all composites in its children, recursively.\r\n * @method allComposites\r\n * @param {composite} composite\r\n * @return {composite[]} All the composites\r\n */\r\n Composite.allComposites = function(composite) {\r\n var composites = [].concat(composite.composites);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n composites = composites.concat(Composite.allComposites(composite.composites[i]));\r\n\r\n return composites;\r\n };\r\n\r\n /**\r\n * Searches the composite recursively for an object matching the type and id supplied, null if not found.\r\n * @method get\r\n * @param {composite} composite\r\n * @param {number} id\r\n * @param {string} type\r\n * @return {object} The requested object, if found\r\n */\r\n Composite.get = function(composite, id, type) {\r\n var objects,\r\n object;\r\n\r\n switch (type) {\r\n case 'body':\r\n objects = Composite.allBodies(composite);\r\n break;\r\n case 'constraint':\r\n objects = Composite.allConstraints(composite);\r\n break;\r\n case 'composite':\r\n objects = Composite.allComposites(composite).concat(composite);\r\n break;\r\n }\r\n\r\n if (!objects)\r\n return null;\r\n\r\n object = objects.filter(function(object) { \r\n return object.id.toString() === id.toString(); \r\n });\r\n\r\n return object.length === 0 ? null : object[0];\r\n };\r\n\r\n /**\r\n * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add).\r\n * @method move\r\n * @param {compositeA} compositeA\r\n * @param {object[]} objects\r\n * @param {compositeB} compositeB\r\n * @return {composite} Returns compositeA\r\n */\r\n Composite.move = function(compositeA, objects, compositeB) {\r\n Composite.remove(compositeA, objects);\r\n Composite.add(compositeB, objects);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Assigns new ids for all objects in the composite, recursively.\r\n * @method rebase\r\n * @param {composite} composite\r\n * @return {composite} Returns composite\r\n */\r\n Composite.rebase = function(composite) {\r\n var objects = Composite.allBodies(composite)\r\n .concat(Composite.allConstraints(composite))\r\n .concat(Composite.allComposites(composite));\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n objects[i].id = Common.nextId();\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Translates all children in the composite by a given vector relative to their current positions, \r\n * without imparting any velocity.\r\n * @method translate\r\n * @param {composite} composite\r\n * @param {vector} translation\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.translate = function(composite, translation, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n Body.translate(bodies[i], translation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {composite} composite\r\n * @param {number} rotation\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.rotate = function(composite, rotation, point, recursive) {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.rotate(body, rotation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.\r\n * @method scale\r\n * @param {composite} composite\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.scale = function(composite, scaleX, scaleY, point, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + dx * scaleX,\r\n y: point.y + dy * scaleY\r\n });\r\n\r\n Body.scale(body, scaleX, scaleY);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies.\r\n * @method bounds\r\n * @param {composite} composite The composite.\r\n * @returns {bounds} The composite bounds.\r\n */\r\n Composite.bounds = function(composite) {\r\n var bodies = Composite.allBodies(composite),\r\n vertices = [];\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Bounds.create(vertices);\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, before objects have been added.\r\n *\r\n * @event beforeAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, after objects have been added.\r\n *\r\n * @event afterAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, before objects have been removed.\r\n *\r\n * @event beforeRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, after objects have been removed.\r\n *\r\n * @event afterRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"composite\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage composites.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Composite\"\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the composite has been modified during the current step.\r\n * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled.\r\n * If you need to change it manually, you should use the `Composite.setModified` method.\r\n *\r\n * @property isModified\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods.\r\n *\r\n * @property parent\r\n * @type composite\r\n * @default null\r\n */\r\n\r\n /**\r\n * An array of `Body` that are _direct_ children of this composite.\r\n * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method.\r\n *\r\n * @property bodies\r\n * @type body[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Constraint` that are _direct_ children of this composite.\r\n * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method.\r\n *\r\n * @property constraints\r\n * @type constraint[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Composite` that are _direct_ children of this composite.\r\n * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method.\r\n *\r\n * @property composites\r\n * @type composite[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/World.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n* A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n* There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class World\r\n* @extends Composite\r\n*/\r\n\r\nvar World = {};\r\n\r\nmodule.exports = World;\r\n\r\nvar Composite = __webpack_require__(/*! ./Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new world composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @constructor\r\n * @param {} options\r\n * @return {world} A new world\r\n */\r\n World.create = function(options) {\r\n var composite = Composite.create();\r\n\r\n var defaults = {\r\n label: \'World\',\r\n gravity: {\r\n x: 0,\r\n y: 1,\r\n scale: 0.001\r\n },\r\n bounds: { \r\n min: { x: -Infinity, y: -Infinity }, \r\n max: { x: Infinity, y: Infinity } \r\n }\r\n };\r\n \r\n return Common.extend(composite, defaults, options);\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * The gravity to apply on the world.\r\n *\r\n * @property gravity\r\n * @type object\r\n */\r\n\r\n /**\r\n * The gravity x component.\r\n *\r\n * @property gravity.x\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * The gravity y component.\r\n *\r\n * @property gravity.y\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * The gravity scale factor.\r\n *\r\n * @property gravity.scale\r\n * @type object\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the world bounds for collision detection.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n * @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }\r\n */\r\n\r\n // World is a Composite body\r\n // see src/module/Outro.js for these aliases:\r\n \r\n /**\r\n * An alias for Composite.add\r\n * @method add\r\n * @param {world} world\r\n * @param {} object\r\n * @return {composite} The original world with the objects added\r\n */\r\n\r\n /**\r\n * An alias for Composite.remove\r\n * @method remove\r\n * @param {world} world\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original world with the objects removed\r\n */\r\n\r\n /**\r\n * An alias for Composite.clear\r\n * @method clear\r\n * @param {world} world\r\n * @param {boolean} keepStatic\r\n */\r\n\r\n /**\r\n * An alias for Composite.addComposite\r\n * @method addComposite\r\n * @param {world} world\r\n * @param {composite} composite\r\n * @return {world} The original world with the objects from composite added\r\n */\r\n \r\n /**\r\n * An alias for Composite.addBody\r\n * @method addBody\r\n * @param {world} world\r\n * @param {body} body\r\n * @return {world} The original world with the body added\r\n */\r\n\r\n /**\r\n * An alias for Composite.addConstraint\r\n * @method addConstraint\r\n * @param {world} world\r\n * @param {constraint} constraint\r\n * @return {world} The original world with the constraint added\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/World.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs.\r\n*\r\n* @class Detector\r\n*/\r\n\r\n// TODO: speculative contacts\r\n\r\nvar Detector = {};\r\n\r\nmodule.exports = Detector;\r\n\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Finds all collisions given a list of pairs.\r\n * @method collisions\r\n * @param {pair[]} broadphasePairs\r\n * @param {engine} engine\r\n * @return {array} collisions\r\n */\r\n Detector.collisions = function(broadphasePairs, engine) {\r\n var collisions = [],\r\n pairsTable = engine.pairs.table;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n // @endif\r\n \r\n for (var i = 0; i < broadphasePairs.length; i++) {\r\n var bodyA = broadphasePairs[i][0], \r\n bodyB = broadphasePairs[i][1];\r\n\r\n if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping))\r\n continue;\r\n \r\n if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter))\r\n continue;\r\n\r\n // @if DEBUG\r\n metrics.midphaseTests += 1;\r\n // @endif\r\n\r\n // mid phase\r\n if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) {\r\n for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) {\r\n var partA = bodyA.parts[j];\r\n\r\n for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) {\r\n var partB = bodyB.parts[k];\r\n\r\n if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n // find a previous collision we could reuse\r\n var pairId = Pair.id(partA, partB),\r\n pair = pairsTable[pairId],\r\n previousCollision;\r\n\r\n if (pair && pair.isActive) {\r\n previousCollision = pair.collision;\r\n } else {\r\n previousCollision = null;\r\n }\r\n\r\n // narrow phase\r\n var collision = SAT.collides(partA, partB, previousCollision);\r\n\r\n // @if DEBUG\r\n metrics.narrowphaseTests += 1;\r\n if (collision.reused)\r\n metrics.narrowReuseCount += 1;\r\n // @endif\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n // @if DEBUG\r\n metrics.narrowDetections += 1;\r\n // @endif\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns `true` if both supplied collision filters will allow a collision to occur.\r\n * See `body.collisionFilter` for more information.\r\n * @method canCollide\r\n * @param {} filterA\r\n * @param {} filterB\r\n * @return {bool} `true` if collision can occur\r\n */\r\n Detector.canCollide = function(filterA, filterB) {\r\n if (filterA.group === filterB.group && filterA.group !== 0)\r\n return filterA.group > 0;\r\n\r\n return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures.\r\n*\r\n* @class Grid\r\n*/\r\n\r\nvar Grid = {};\r\n\r\nmodule.exports = Grid;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js\");\r\nvar Detector = __webpack_require__(/*! ./Detector */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new grid.\r\n * @method create\r\n * @param {} options\r\n * @return {grid} A new grid\r\n */\r\n Grid.create = function(options) {\r\n var defaults = {\r\n controller: Grid,\r\n detector: Detector.collisions,\r\n buckets: {},\r\n pairs: {},\r\n pairsList: [],\r\n bucketWidth: 48,\r\n bucketHeight: 48\r\n };\r\n\r\n return Common.extend(defaults, options);\r\n };\r\n\r\n /**\r\n * The width of a single grid bucket.\r\n *\r\n * @property bucketWidth\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * The height of a single grid bucket.\r\n *\r\n * @property bucketHeight\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * Updates the grid.\r\n * @method update\r\n * @param {grid} grid\r\n * @param {body[]} bodies\r\n * @param {engine} engine\r\n * @param {boolean} forceUpdate\r\n */\r\n Grid.update = function(grid, bodies, engine, forceUpdate) {\r\n var i, col, row,\r\n world = engine.world,\r\n buckets = grid.buckets,\r\n bucket,\r\n bucketId,\r\n gridChanged = false;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n metrics.broadphaseTests = 0;\r\n // @endif\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isSleeping && !forceUpdate)\r\n continue;\r\n\r\n // don't update out of world bodies\r\n if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x\r\n || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y)\r\n continue;\r\n\r\n var newRegion = Grid._getRegion(grid, body);\r\n\r\n // if the body has changed grid region\r\n if (!body.region || newRegion.id !== body.region.id || forceUpdate) {\r\n\r\n // @if DEBUG\r\n metrics.broadphaseTests += 1;\r\n // @endif\r\n\r\n if (!body.region || forceUpdate)\r\n body.region = newRegion;\r\n\r\n var union = Grid._regionUnion(newRegion, body.region);\r\n\r\n // update grid buckets affected by region change\r\n // iterate over the union of both regions\r\n for (col = union.startCol; col <= union.endCol; col++) {\r\n for (row = union.startRow; row <= union.endRow; row++) {\r\n bucketId = Grid._getBucketId(col, row);\r\n bucket = buckets[bucketId];\r\n\r\n var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol\r\n && row >= newRegion.startRow && row <= newRegion.endRow);\r\n\r\n var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol\r\n && row >= body.region.startRow && row <= body.region.endRow);\r\n\r\n // remove from old region buckets\r\n if (!isInsideNewRegion && isInsideOldRegion) {\r\n if (isInsideOldRegion) {\r\n if (bucket)\r\n Grid._bucketRemoveBody(grid, bucket, body);\r\n }\r\n }\r\n\r\n // add to new region buckets\r\n if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) {\r\n if (!bucket)\r\n bucket = Grid._createBucket(buckets, bucketId);\r\n Grid._bucketAddBody(grid, bucket, body);\r\n }\r\n }\r\n }\r\n\r\n // set the new region\r\n body.region = newRegion;\r\n\r\n // flag changes so we can update pairs\r\n gridChanged = true;\r\n }\r\n }\r\n\r\n // update pairs list only if pairs changed (i.e. a body changed region)\r\n if (gridChanged)\r\n grid.pairsList = Grid._createActivePairsList(grid);\r\n };\r\n\r\n /**\r\n * Clears the grid.\r\n * @method clear\r\n * @param {grid} grid\r\n */\r\n Grid.clear = function(grid) {\r\n grid.buckets = {};\r\n grid.pairs = {};\r\n grid.pairsList = [];\r\n };\r\n\r\n /**\r\n * Finds the union of two regions.\r\n * @method _regionUnion\r\n * @private\r\n * @param {} regionA\r\n * @param {} regionB\r\n * @return {} region\r\n */\r\n Grid._regionUnion = function(regionA, regionB) {\r\n var startCol = Math.min(regionA.startCol, regionB.startCol),\r\n endCol = Math.max(regionA.endCol, regionB.endCol),\r\n startRow = Math.min(regionA.startRow, regionB.startRow),\r\n endRow = Math.max(regionA.endRow, regionB.endRow);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Gets the region a given body falls in for a given grid.\r\n * @method _getRegion\r\n * @private\r\n * @param {} grid\r\n * @param {} body\r\n * @return {} region\r\n */\r\n Grid._getRegion = function(grid, body) {\r\n var bounds = body.bounds,\r\n startCol = Math.floor(bounds.min.x / grid.bucketWidth),\r\n endCol = Math.floor(bounds.max.x / grid.bucketWidth),\r\n startRow = Math.floor(bounds.min.y / grid.bucketHeight),\r\n endRow = Math.floor(bounds.max.y / grid.bucketHeight);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Creates a region.\r\n * @method _createRegion\r\n * @private\r\n * @param {} startCol\r\n * @param {} endCol\r\n * @param {} startRow\r\n * @param {} endRow\r\n * @return {} region\r\n */\r\n Grid._createRegion = function(startCol, endCol, startRow, endRow) {\r\n return { \r\n id: startCol + ',' + endCol + ',' + startRow + ',' + endRow,\r\n startCol: startCol, \r\n endCol: endCol, \r\n startRow: startRow, \r\n endRow: endRow \r\n };\r\n };\r\n\r\n /**\r\n * Gets the bucket id at the given position.\r\n * @method _getBucketId\r\n * @private\r\n * @param {} column\r\n * @param {} row\r\n * @return {string} bucket id\r\n */\r\n Grid._getBucketId = function(column, row) {\r\n return 'C' + column + 'R' + row;\r\n };\r\n\r\n /**\r\n * Creates a bucket.\r\n * @method _createBucket\r\n * @private\r\n * @param {} buckets\r\n * @param {} bucketId\r\n * @return {} bucket\r\n */\r\n Grid._createBucket = function(buckets, bucketId) {\r\n var bucket = buckets[bucketId] = [];\r\n return bucket;\r\n };\r\n\r\n /**\r\n * Adds a body to a bucket.\r\n * @method _bucketAddBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketAddBody = function(grid, bucket, body) {\r\n // add new pairs\r\n for (var i = 0; i < bucket.length; i++) {\r\n var bodyB = bucket[i];\r\n\r\n if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic))\r\n continue;\r\n\r\n // keep track of the number of buckets the pair exists in\r\n // important for Grid.update to work\r\n var pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair) {\r\n pair[2] += 1;\r\n } else {\r\n grid.pairs[pairId] = [body, bodyB, 1];\r\n }\r\n }\r\n\r\n // add to bodies (after pairs, otherwise pairs with self)\r\n bucket.push(body);\r\n };\r\n\r\n /**\r\n * Removes a body from a bucket.\r\n * @method _bucketRemoveBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketRemoveBody = function(grid, bucket, body) {\r\n // remove from bucket\r\n bucket.splice(Common.indexOf(bucket, body), 1);\r\n\r\n // update pair counts\r\n for (var i = 0; i < bucket.length; i++) {\r\n // keep track of the number of buckets the pair exists in\r\n // important for _createActivePairsList to work\r\n var bodyB = bucket[i],\r\n pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair)\r\n pair[2] -= 1;\r\n }\r\n };\r\n\r\n /**\r\n * Generates a list of the active pairs in the grid.\r\n * @method _createActivePairsList\r\n * @private\r\n * @param {} grid\r\n * @return [] pairs\r\n */\r\n Grid._createActivePairsList = function(grid) {\r\n var pairKeys,\r\n pair,\r\n pairs = [];\r\n\r\n // grid.pairs is used as a hashmap\r\n pairKeys = Common.keys(grid.pairs);\r\n\r\n // iterate over grid.pairs\r\n for (var k = 0; k < pairKeys.length; k++) {\r\n pair = grid.pairs[pairKeys[k]];\r\n\r\n // if pair exists in at least one bucket\r\n // it is a pair that needs further collision testing so push it\r\n if (pair[2] > 0) {\r\n pairs.push(pair);\r\n } else {\r\n delete grid.pairs[pairKeys[k]];\r\n }\r\n }\r\n\r\n return pairs;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js":function(module,exports){eval("/**\r\n* The `Matter.Pair` module contains methods for creating and manipulating collision pairs.\r\n*\r\n* @class Pair\r\n*/\r\n\r\nvar Pair = {};\r\n\r\nmodule.exports = Pair;\r\n\r\n(function() {\r\n \r\n /**\r\n * Creates a pair.\r\n * @method create\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n * @return {pair} A new pair\r\n */\r\n Pair.create = function(collision, timestamp) {\r\n var bodyA = collision.bodyA,\r\n bodyB = collision.bodyB;\r\n\r\n var pair = {\r\n id: Pair.id(bodyA, bodyB),\r\n bodyA: bodyA,\r\n bodyB: bodyB,\r\n activeContacts: [],\r\n separation: 0,\r\n isActive: true,\r\n confirmedActive: true,\r\n isSensor: bodyA.isSensor || bodyB.isSensor,\r\n timeCreated: timestamp,\r\n timeUpdated: timestamp,\r\n collision: null,\r\n inverseMass: 0,\r\n friction: 0,\r\n frictionStatic: 0,\r\n restitution: 0,\r\n slop: 0\r\n };\r\n\r\n Pair.update(pair, collision, timestamp);\r\n\r\n return pair;\r\n };\r\n\r\n /**\r\n * Updates a pair given a collision.\r\n * @method update\r\n * @param {pair} pair\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n */\r\n Pair.update = function(pair, collision, timestamp) {\r\n pair.collision = collision;\r\n\r\n if (collision.collided) {\r\n var supports = collision.supports,\r\n activeContacts = pair.activeContacts,\r\n parentA = collision.parentA,\r\n parentB = collision.parentB;\r\n\r\n pair.inverseMass = parentA.inverseMass + parentB.inverseMass;\r\n pair.friction = Math.min(parentA.friction, parentB.friction);\r\n pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic);\r\n pair.restitution = Math.max(parentA.restitution, parentB.restitution);\r\n pair.slop = Math.max(parentA.slop, parentB.slop);\r\n\r\n for (var i = 0; i < supports.length; i++) {\r\n activeContacts[i] = supports[i].contact;\r\n }\r\n\r\n // optimise array size\r\n var supportCount = supports.length;\r\n if (supportCount < activeContacts.length) {\r\n activeContacts.length = supportCount;\r\n }\r\n\r\n pair.separation = collision.depth;\r\n Pair.setActive(pair, true, timestamp);\r\n } else {\r\n if (pair.isActive === true)\r\n Pair.setActive(pair, false, timestamp);\r\n }\r\n };\r\n \r\n /**\r\n * Set a pair as active or inactive.\r\n * @method setActive\r\n * @param {pair} pair\r\n * @param {bool} isActive\r\n * @param {number} timestamp\r\n */\r\n Pair.setActive = function(pair, isActive, timestamp) {\r\n if (isActive) {\r\n pair.isActive = true;\r\n pair.timeUpdated = timestamp;\r\n } else {\r\n pair.isActive = false;\r\n pair.activeContacts.length = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Get the id for the given pair.\r\n * @method id\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @return {string} Unique pairId\r\n */\r\n Pair.id = function(bodyA, bodyB) {\r\n if (bodyA.id < bodyB.id) {\r\n return 'A' + bodyA.id + 'B' + bodyB.id;\r\n } else {\r\n return 'A' + bodyB.id + 'B' + bodyA.id;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.\r\n*\r\n* @class Pairs\r\n*/\r\n\r\nvar Pairs = {};\r\n\r\nmodule.exports = Pairs;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n \r\n Pairs._pairMaxIdleLife = 1000;\r\n\r\n /**\r\n * Creates a new pairs structure.\r\n * @method create\r\n * @param {object} options\r\n * @return {pairs} A new pairs structure\r\n */\r\n Pairs.create = function(options) {\r\n return Common.extend({ \r\n table: {},\r\n list: [],\r\n collisionStart: [],\r\n collisionActive: [],\r\n collisionEnd: []\r\n }, options);\r\n };\r\n\r\n /**\r\n * Updates pairs given a list of collisions.\r\n * @method update\r\n * @param {object} pairs\r\n * @param {collision[]} collisions\r\n * @param {number} timestamp\r\n */\r\n Pairs.update = function(pairs, collisions, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n collisionStart = pairs.collisionStart,\r\n collisionEnd = pairs.collisionEnd,\r\n collisionActive = pairs.collisionActive,\r\n collision,\r\n pairId,\r\n pair,\r\n i;\r\n\r\n // clear collision state arrays, but maintain old reference\r\n collisionStart.length = 0;\r\n collisionEnd.length = 0;\r\n collisionActive.length = 0;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pairsList[i].confirmedActive = false;\r\n }\r\n\r\n for (i = 0; i < collisions.length; i++) {\r\n collision = collisions[i];\r\n\r\n if (collision.collided) {\r\n pairId = Pair.id(collision.bodyA, collision.bodyB);\r\n\r\n pair = pairsTable[pairId];\r\n \r\n if (pair) {\r\n // pair already exists (but may or may not be active)\r\n if (pair.isActive) {\r\n // pair exists and is active\r\n collisionActive.push(pair);\r\n } else {\r\n // pair exists but was inactive, so a collision has just started again\r\n collisionStart.push(pair);\r\n }\r\n\r\n // update the pair\r\n Pair.update(pair, collision, timestamp);\r\n pair.confirmedActive = true;\r\n } else {\r\n // pair did not exist, create a new pair\r\n pair = Pair.create(collision, timestamp);\r\n pairsTable[pairId] = pair;\r\n\r\n // push the new pair\r\n collisionStart.push(pair);\r\n pairsList.push(pair);\r\n }\r\n }\r\n }\r\n\r\n // deactivate previously active pairs that are now inactive\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n if (pair.isActive && !pair.confirmedActive) {\r\n Pair.setActive(pair, false, timestamp);\r\n collisionEnd.push(pair);\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Finds and removes pairs that have been inactive for a set amount of time.\r\n * @method removeOld\r\n * @param {object} pairs\r\n * @param {number} timestamp\r\n */\r\n Pairs.removeOld = function(pairs, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n indexesToRemove = [],\r\n pair,\r\n collision,\r\n pairIndex,\r\n i;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n collision = pair.collision;\r\n \r\n // never remove sleeping pairs\r\n if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) {\r\n pair.timeUpdated = timestamp;\r\n continue;\r\n }\r\n\r\n // if pair is inactive for too long, mark it to be removed\r\n if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) {\r\n indexesToRemove.push(i);\r\n }\r\n }\r\n\r\n // remove marked pairs\r\n for (i = 0; i < indexesToRemove.length; i++) {\r\n pairIndex = indexesToRemove[i] - i;\r\n pair = pairsList[pairIndex];\r\n delete pairsTable[pair.id];\r\n pairsList.splice(pairIndex, 1);\r\n }\r\n };\r\n\r\n /**\r\n * Clears the given pairs structure.\r\n * @method clear\r\n * @param {pairs} pairs\r\n * @return {pairs} pairs\r\n */\r\n Pairs.clear = function(pairs) {\r\n pairs.table = {};\r\n pairs.list.length = 0;\r\n pairs.collisionStart.length = 0;\r\n pairs.collisionActive.length = 0;\r\n pairs.collisionEnd.length = 0;\r\n return pairs;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Query` module contains methods for performing collision queries.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Query\r\n*/\r\n\r\nvar Query = {};\r\n\r\nmodule.exports = Query;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Bodies = __webpack_require__(/*! ../factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Returns a list of collisions between `body` and `bodies`.\r\n * @method collides\r\n * @param {body} body\r\n * @param {body[]} bodies\r\n * @return {object[]} Collisions\r\n */\r\n Query.collides = function(body, bodies) {\r\n var collisions = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var bodyA = bodies[i];\r\n \r\n if (Bounds.overlaps(bodyA.bounds, body.bounds)) {\r\n for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) {\r\n var part = bodyA.parts[j];\r\n\r\n if (Bounds.overlaps(part.bounds, body.bounds)) {\r\n var collision = SAT.collides(part, body);\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.\r\n * @method ray\r\n * @param {body[]} bodies\r\n * @param {vector} startPoint\r\n * @param {vector} endPoint\r\n * @param {number} [rayWidth]\r\n * @return {object[]} Collisions\r\n */\r\n Query.ray = function(bodies, startPoint, endPoint, rayWidth) {\r\n rayWidth = rayWidth || 1e-100;\r\n\r\n var rayAngle = Vector.angle(startPoint, endPoint),\r\n rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),\r\n rayX = (endPoint.x + startPoint.x) * 0.5,\r\n rayY = (endPoint.y + startPoint.y) * 0.5,\r\n ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }),\r\n collisions = Query.collides(ray, bodies);\r\n\r\n for (var i = 0; i < collisions.length; i += 1) {\r\n var collision = collisions[i];\r\n collision.body = collision.bodyB = collision.bodyA; \r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.\r\n * @method region\r\n * @param {body[]} bodies\r\n * @param {bounds} bounds\r\n * @param {bool} [outside=false]\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.region = function(bodies, bounds, outside) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n overlaps = Bounds.overlaps(body.bounds, bounds);\r\n if ((overlaps && !outside) || (!overlaps && outside))\r\n result.push(body);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose vertices contain the given point, from the given set of bodies.\r\n * @method point\r\n * @param {body[]} bodies\r\n * @param {vector} point\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.point = function(bodies, point) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n \r\n if (Bounds.contains(body.bounds, point)) {\r\n for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n\r\n if (Bounds.contains(part.bounds, point)\r\n && Vertices.contains(part.vertices, point)) {\r\n result.push(body);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Resolver` module contains methods for resolving collision pairs.\r\n*\r\n* @class Resolver\r\n*/\r\n\r\nvar Resolver = {};\r\n\r\nmodule.exports = Resolver;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n Resolver._restingThresh = 4;\r\n Resolver._restingThreshTangent = 6;\r\n Resolver._positionDampen = 0.9;\r\n Resolver._positionWarming = 0.8;\r\n Resolver._frictionNormalMultiplier = 5;\r\n\r\n /**\r\n * Prepare pairs for position solving.\r\n * @method preSolvePosition\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolvePosition = function(pairs) {\r\n var i,\r\n pair,\r\n activeCount;\r\n\r\n // find total contacts on each body\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive)\r\n continue;\r\n \r\n activeCount = pair.activeContacts.length;\r\n pair.collision.parentA.totalContacts += activeCount;\r\n pair.collision.parentB.totalContacts += activeCount;\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair positions.\r\n * @method solvePosition\r\n * @param {pair[]} pairs\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Resolver.solvePosition = function(pairs, bodies, timeScale) {\r\n var i,\r\n normalX,\r\n normalY,\r\n pair,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n separation,\r\n penetration,\r\n positionImpulseA,\r\n positionImpulseB,\r\n contactShare,\r\n bodyBtoAX,\r\n bodyBtoAY,\r\n positionImpulse,\r\n impulseCoefficient = timeScale * Resolver._positionDampen;\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n body.previousPositionImpulse.x = body.positionImpulse.x;\r\n body.previousPositionImpulse.y = body.positionImpulse.y;\r\n }\r\n\r\n // find impulses required to resolve penetration\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n\r\n positionImpulseA = bodyA.previousPositionImpulse;\r\n positionImpulseB = bodyB.previousPositionImpulse;\r\n\r\n penetration = collision.penetration;\r\n\r\n bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x;\r\n bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y;\r\n\r\n normalX = normal.x;\r\n normalY = normal.y;\r\n\r\n separation = normalX * bodyBtoAX + normalY * bodyBtoAY;\r\n pair.separation = separation;\r\n\r\n positionImpulse = (separation - pair.slop) * impulseCoefficient;\r\n\r\n if (bodyA.isStatic || bodyB.isStatic)\r\n positionImpulse *= 2;\r\n \r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n contactShare = positionImpulse / bodyA.totalContacts;\r\n bodyA.positionImpulse.x += normalX * contactShare;\r\n bodyA.positionImpulse.y += normalY * contactShare;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n contactShare = positionImpulse / bodyB.totalContacts;\r\n bodyB.positionImpulse.x -= normalX * contactShare;\r\n bodyB.positionImpulse.y -= normalY * contactShare;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Apply position resolution.\r\n * @method postSolvePosition\r\n * @param {body[]} bodies\r\n */\r\n Resolver.postSolvePosition = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset contact count\r\n body.totalContacts = 0;\r\n\r\n if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) {\r\n // update body geometry\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n Vertices.translate(part.vertices, body.positionImpulse);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n part.position.x += body.positionImpulse.x;\r\n part.position.y += body.positionImpulse.y;\r\n }\r\n\r\n // move the body without changing velocity\r\n body.positionPrev.x += body.positionImpulse.x;\r\n body.positionPrev.y += body.positionImpulse.y;\r\n\r\n if (Vector.dot(body.positionImpulse, body.velocity) < 0) {\r\n // reset cached impulse if the body has velocity along it\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n } else {\r\n // warm the next iteration\r\n body.positionImpulse.x *= Resolver._positionWarming;\r\n body.positionImpulse.y *= Resolver._positionWarming;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Prepare pairs for velocity solving.\r\n * @method preSolveVelocity\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolveVelocity = function(pairs) {\r\n var i,\r\n j,\r\n pair,\r\n contacts,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n tangent,\r\n contact,\r\n contactVertex,\r\n normalImpulse,\r\n tangentImpulse,\r\n offset,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1];\r\n \r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n contacts = pair.activeContacts;\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n tangent = collision.tangent;\r\n\r\n // resolve each contact\r\n for (j = 0; j < contacts.length; j++) {\r\n contact = contacts[j];\r\n contactVertex = contact.vertex;\r\n normalImpulse = contact.normalImpulse;\r\n tangentImpulse = contact.tangentImpulse;\r\n\r\n if (normalImpulse !== 0 || tangentImpulse !== 0) {\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyA.position, tempA);\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyB.position, tempA);\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair velocities.\r\n * @method solveVelocity\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Resolver.solveVelocity = function(pairs, timeScale) {\r\n var timeScaleSquared = timeScale * timeScale,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1],\r\n tempB = Vector._temp[2],\r\n tempC = Vector._temp[3],\r\n tempD = Vector._temp[4],\r\n tempE = Vector._temp[5];\r\n \r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n var collision = pair.collision,\r\n bodyA = collision.parentA,\r\n bodyB = collision.parentB,\r\n normal = collision.normal,\r\n tangent = collision.tangent,\r\n contacts = pair.activeContacts,\r\n contactShare = 1 / contacts.length;\r\n\r\n // update body velocities\r\n bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x;\r\n bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y;\r\n bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x;\r\n bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y;\r\n bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev;\r\n bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev;\r\n\r\n // resolve each contact\r\n for (var j = 0; j < contacts.length; j++) {\r\n var contact = contacts[j],\r\n contactVertex = contact.vertex,\r\n offsetA = Vector.sub(contactVertex, bodyA.position, tempA),\r\n offsetB = Vector.sub(contactVertex, bodyB.position, tempB),\r\n velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC),\r\n velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), \r\n relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE),\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n\r\n var tangentVelocity = Vector.dot(tangent, relativeVelocity),\r\n tangentSpeed = Math.abs(tangentVelocity),\r\n tangentVelocityDirection = Common.sign(tangentVelocity);\r\n\r\n // raw impulses\r\n var normalImpulse = (1 + pair.restitution) * normalVelocity,\r\n normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier;\r\n\r\n // coulomb friction\r\n var tangentImpulse = tangentVelocity,\r\n maxFriction = Infinity;\r\n\r\n if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) {\r\n maxFriction = tangentSpeed;\r\n tangentImpulse = Common.clamp(\r\n pair.friction * tangentVelocityDirection * timeScaleSquared,\r\n -maxFriction, maxFriction\r\n );\r\n }\r\n\r\n // modify impulses accounting for mass, inertia and offset\r\n var oAcN = Vector.cross(offsetA, normal),\r\n oBcN = Vector.cross(offsetB, normal),\r\n share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN);\r\n\r\n normalImpulse *= share;\r\n tangentImpulse *= share;\r\n\r\n // handle high velocity and resting collisions separately\r\n if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) {\r\n // high normal velocity so clear cached contact normal impulse\r\n contact.normalImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // impulse constraint tends to 0\r\n var contactNormalImpulse = contact.normalImpulse;\r\n contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0);\r\n normalImpulse = contact.normalImpulse - contactNormalImpulse;\r\n }\r\n\r\n // handle high velocity and resting collisions separately\r\n if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) {\r\n // high tangent velocity so clear cached contact tangent impulse\r\n contact.tangentImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // tangent impulse tends to -tangentSpeed or +tangentSpeed\r\n var contactTangentImpulse = contact.tangentImpulse;\r\n contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction);\r\n tangentImpulse = contact.tangentImpulse - contactTangentImpulse;\r\n }\r\n\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.\r\n*\r\n* @class SAT\r\n*/\r\n\r\n// TODO: true circles and curves\r\n\r\nvar SAT = {};\r\n\r\nmodule.exports = SAT;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Detect collision between two bodies using the Separating Axis Theorem.\r\n * @method collides\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @param {collision} previousCollision\r\n * @return {collision} collision\r\n */\r\n SAT.collides = function(bodyA, bodyB, previousCollision) {\r\n var overlapAB,\r\n overlapBA, \r\n minOverlap,\r\n collision,\r\n canReusePrevCol = false;\r\n\r\n if (previousCollision) {\r\n // estimate total motion\r\n var parentA = bodyA.parent,\r\n parentB = bodyB.parent,\r\n motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed\r\n + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed;\r\n\r\n // we may be able to (partially) reuse collision result \r\n // but only safe if collision was resting\r\n canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2;\r\n\r\n // reuse collision object\r\n collision = previousCollision;\r\n } else {\r\n collision = { collided: false, bodyA: bodyA, bodyB: bodyB };\r\n }\r\n\r\n if (previousCollision && canReusePrevCol) {\r\n // if we can reuse the collision result\r\n // we only need to test the previously found axis\r\n var axisBodyA = collision.axisBody,\r\n axisBodyB = axisBodyA === bodyA ? bodyB : bodyA,\r\n axes = [axisBodyA.axes[previousCollision.axisNumber]];\r\n\r\n minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes);\r\n collision.reused = true;\r\n\r\n if (minOverlap.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n } else {\r\n // if we can\'t reuse a result, perform a full SAT test\r\n\r\n overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes);\r\n\r\n if (overlapAB.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes);\r\n\r\n if (overlapBA.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n if (overlapAB.overlap < overlapBA.overlap) {\r\n minOverlap = overlapAB;\r\n collision.axisBody = bodyA;\r\n } else {\r\n minOverlap = overlapBA;\r\n collision.axisBody = bodyB;\r\n }\r\n\r\n // important for reuse later\r\n collision.axisNumber = minOverlap.axisNumber;\r\n }\r\n\r\n collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB;\r\n collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA;\r\n collision.collided = true;\r\n collision.depth = minOverlap.overlap;\r\n collision.parentA = collision.bodyA.parent;\r\n collision.parentB = collision.bodyB.parent;\r\n \r\n bodyA = collision.bodyA;\r\n bodyB = collision.bodyB;\r\n\r\n // ensure normal is facing away from bodyA\r\n if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) {\r\n collision.normal = {\r\n x: minOverlap.axis.x,\r\n y: minOverlap.axis.y\r\n };\r\n } else {\r\n collision.normal = {\r\n x: -minOverlap.axis.x,\r\n y: -minOverlap.axis.y\r\n };\r\n }\r\n\r\n collision.tangent = Vector.perp(collision.normal);\r\n\r\n collision.penetration = collision.penetration || {};\r\n collision.penetration.x = collision.normal.x * collision.depth;\r\n collision.penetration.y = collision.normal.y * collision.depth; \r\n\r\n // find support points, there is always either exactly one or two\r\n var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal),\r\n supports = [];\r\n\r\n // find the supports from bodyB that are inside bodyA\r\n if (Vertices.contains(bodyA.vertices, verticesB[0]))\r\n supports.push(verticesB[0]);\r\n\r\n if (Vertices.contains(bodyA.vertices, verticesB[1]))\r\n supports.push(verticesB[1]);\r\n\r\n // find the supports from bodyA that are inside bodyB\r\n if (supports.length < 2) {\r\n var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal));\r\n \r\n if (Vertices.contains(bodyB.vertices, verticesA[0]))\r\n supports.push(verticesA[0]);\r\n\r\n if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1]))\r\n supports.push(verticesA[1]);\r\n }\r\n\r\n // account for the edge case of overlapping but no vertex containment\r\n if (supports.length < 1)\r\n supports = [verticesB[0]];\r\n \r\n collision.supports = supports;\r\n\r\n return collision;\r\n };\r\n\r\n /**\r\n * Find the overlap between two sets of vertices.\r\n * @method _overlapAxes\r\n * @private\r\n * @param {} verticesA\r\n * @param {} verticesB\r\n * @param {} axes\r\n * @return result\r\n */\r\n SAT._overlapAxes = function(verticesA, verticesB, axes) {\r\n var projectionA = Vector._temp[0], \r\n projectionB = Vector._temp[1],\r\n result = { overlap: Number.MAX_VALUE },\r\n overlap,\r\n axis;\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n axis = axes[i];\r\n\r\n SAT._projectToAxis(projectionA, verticesA, axis);\r\n SAT._projectToAxis(projectionB, verticesB, axis);\r\n\r\n overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min);\r\n\r\n if (overlap <= 0) {\r\n result.overlap = overlap;\r\n return result;\r\n }\r\n\r\n if (overlap < result.overlap) {\r\n result.overlap = overlap;\r\n result.axis = axis;\r\n result.axisNumber = i;\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Projects vertices on an axis and returns an interval.\r\n * @method _projectToAxis\r\n * @private\r\n * @param {} projection\r\n * @param {} vertices\r\n * @param {} axis\r\n */\r\n SAT._projectToAxis = function(projection, vertices, axis) {\r\n var min = Vector.dot(vertices[0], axis),\r\n max = min;\r\n\r\n for (var i = 1; i < vertices.length; i += 1) {\r\n var dot = Vector.dot(vertices[i], axis);\r\n\r\n if (dot > max) { \r\n max = dot; \r\n } else if (dot < min) { \r\n min = dot; \r\n }\r\n }\r\n\r\n projection.min = min;\r\n projection.max = max;\r\n };\r\n \r\n /**\r\n * Finds supporting vertices given two bodies along a given direction using hill-climbing.\r\n * @method _findSupports\r\n * @private\r\n * @param {} bodyA\r\n * @param {} bodyB\r\n * @param {} normal\r\n * @return [vector]\r\n */\r\n SAT._findSupports = function(bodyA, bodyB, normal) {\r\n var nearestDistance = Number.MAX_VALUE,\r\n vertexToBody = Vector._temp[0],\r\n vertices = bodyB.vertices,\r\n bodyAPosition = bodyA.position,\r\n distance,\r\n vertex,\r\n vertexA,\r\n vertexB;\r\n\r\n // find closest vertex on bodyB\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n\r\n if (distance < nearestDistance) {\r\n nearestDistance = distance;\r\n vertexA = vertex;\r\n }\r\n }\r\n\r\n // find next closest vertex using the two connected to it\r\n var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1;\r\n vertex = vertices[prevIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n nearestDistance = -Vector.dot(normal, vertexToBody);\r\n vertexB = vertex;\r\n\r\n var nextIndex = (vertexA.index + 1) % vertices.length;\r\n vertex = vertices[nextIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n if (distance < nearestDistance) {\r\n vertexB = vertex;\r\n }\r\n\r\n return [vertexA, vertexB];\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js?')},"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n* The stiffness of constraints can be modified to create springs or elastic.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Constraint\r\n*/\r\n\r\nvar Constraint = {};\r\n\r\nmodule.exports = Constraint;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Constraint._warming = 0.4;\r\n Constraint._torqueDampen = 1;\r\n Constraint._minLength = 0.000001;\r\n\r\n /**\r\n * Creates a new constraint.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above).\r\n * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`.\r\n * For compound bodies, constraints must be applied to the parent body (not one of its parts).\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {constraint} constraint\r\n */\r\n Constraint.create = function(options) {\r\n var constraint = options;\r\n\r\n // if bodies defined but no points, use body centre\r\n if (constraint.bodyA && !constraint.pointA)\r\n constraint.pointA = { x: 0, y: 0 };\r\n if (constraint.bodyB && !constraint.pointB)\r\n constraint.pointB = { x: 0, y: 0 };\r\n\r\n // calculate static length using initial world space points\r\n var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA,\r\n initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB,\r\n length = Vector.magnitude(Vector.sub(initialPointA, initialPointB));\r\n \r\n constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length;\r\n\r\n // option defaults\r\n constraint.id = constraint.id || Common.nextId();\r\n constraint.label = constraint.label || 'Constraint';\r\n constraint.type = 'constraint';\r\n constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7);\r\n constraint.damping = constraint.damping || 0;\r\n constraint.angularStiffness = constraint.angularStiffness || 0;\r\n constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA;\r\n constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB;\r\n constraint.plugin = {};\r\n\r\n // render\r\n var render = {\r\n visible: true,\r\n lineWidth: 2,\r\n strokeStyle: '#ffffff',\r\n type: 'line',\r\n anchors: true\r\n };\r\n\r\n if (constraint.length === 0 && constraint.stiffness > 0.1) {\r\n render.type = 'pin';\r\n render.anchors = false;\r\n } else if (constraint.stiffness < 0.9) {\r\n render.type = 'spring';\r\n }\r\n\r\n constraint.render = Common.extend(render, constraint.render);\r\n\r\n return constraint;\r\n };\r\n\r\n /**\r\n * Prepares for solving by constraint warming.\r\n * @private\r\n * @method preSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.preSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n body.position.x += impulse.x;\r\n body.position.y += impulse.y;\r\n body.angle += impulse.angle;\r\n }\r\n };\r\n\r\n /**\r\n * Solves all constraints in a list of collisions.\r\n * @private\r\n * @method solveAll\r\n * @param {constraint[]} constraints\r\n * @param {number} timeScale\r\n */\r\n Constraint.solveAll = function(constraints, timeScale) {\r\n // Solve fixed constraints first.\r\n for (var i = 0; i < constraints.length; i += 1) {\r\n var constraint = constraints[i],\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic),\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (fixedA || fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n\r\n // Solve free constraints last.\r\n for (i = 0; i < constraints.length; i += 1) {\r\n constraint = constraints[i];\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic);\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (!fixedA && !fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Solves a distance constraint with Gauss-Siedel method.\r\n * @private\r\n * @method solve\r\n * @param {constraint} constraint\r\n * @param {number} timeScale\r\n */\r\n Constraint.solve = function(constraint, timeScale) {\r\n var bodyA = constraint.bodyA,\r\n bodyB = constraint.bodyB,\r\n pointA = constraint.pointA,\r\n pointB = constraint.pointB;\r\n\r\n if (!bodyA && !bodyB)\r\n return;\r\n\r\n // update reference angle\r\n if (bodyA && !bodyA.isStatic) {\r\n Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA);\r\n constraint.angleA = bodyA.angle;\r\n }\r\n \r\n // update reference angle\r\n if (bodyB && !bodyB.isStatic) {\r\n Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB);\r\n constraint.angleB = bodyB.angle;\r\n }\r\n\r\n var pointAWorld = pointA,\r\n pointBWorld = pointB;\r\n\r\n if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA);\r\n if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB);\r\n\r\n if (!pointAWorld || !pointBWorld)\r\n return;\r\n\r\n var delta = Vector.sub(pointAWorld, pointBWorld),\r\n currentLength = Vector.magnitude(delta);\r\n\r\n // prevent singularity\r\n if (currentLength < Constraint._minLength) {\r\n currentLength = Constraint._minLength;\r\n }\r\n\r\n // solve distance constraint with Gauss-Siedel method\r\n var difference = (currentLength - constraint.length) / currentLength,\r\n stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness,\r\n force = Vector.mult(delta, difference * stiffness),\r\n massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0),\r\n inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0),\r\n resistanceTotal = massTotal + inertiaTotal,\r\n torque,\r\n share,\r\n normal,\r\n normalVelocity,\r\n relativeVelocity;\r\n\r\n if (constraint.damping) {\r\n var zero = Vector.create();\r\n normal = Vector.div(delta, currentLength);\r\n\r\n relativeVelocity = Vector.sub(\r\n bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero,\r\n bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero\r\n );\r\n\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n }\r\n\r\n if (bodyA && !bodyA.isStatic) {\r\n share = bodyA.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyA.constraintImpulse.x -= force.x * share;\r\n bodyA.constraintImpulse.y -= force.y * share;\r\n\r\n // apply forces\r\n bodyA.position.x -= force.x * share;\r\n bodyA.position.y -= force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share;\r\n bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyA.constraintImpulse.angle -= torque;\r\n bodyA.angle -= torque;\r\n }\r\n\r\n if (bodyB && !bodyB.isStatic) {\r\n share = bodyB.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyB.constraintImpulse.x += force.x * share;\r\n bodyB.constraintImpulse.y += force.y * share;\r\n \r\n // apply forces\r\n bodyB.position.x += force.x * share;\r\n bodyB.position.y += force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share;\r\n bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyB.constraintImpulse.angle += torque;\r\n bodyB.angle += torque;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Performs body updates required after solving constraints.\r\n * @private\r\n * @method postSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.postSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n Sleeping.set(body, false);\r\n\r\n // update geometry and reset\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n \r\n Vertices.translate(part.vertices, impulse);\r\n\r\n if (j > 0) {\r\n part.position.x += impulse.x;\r\n part.position.y += impulse.y;\r\n }\r\n\r\n if (impulse.angle !== 0) {\r\n Vertices.rotate(part.vertices, impulse.angle, body.position);\r\n Axes.rotate(part.axes, impulse.angle);\r\n if (j > 0) {\r\n Vector.rotateAbout(part.position, impulse.angle, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // dampen the cached impulse for warming next step\r\n impulse.angle *= Constraint._warming;\r\n impulse.x *= Constraint._warming;\r\n impulse.y *= Constraint._warming;\r\n }\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"constraint\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Constraint\"\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the constraint should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the constraint outline.\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the constraint outline.\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the constraint rendering type. \r\n * The possible values are 'line', 'pin', 'spring'.\r\n * An appropriate render type will be automatically chosen unless one is given in options.\r\n *\r\n * @property render.type\r\n * @type string\r\n * @default 'line'\r\n */\r\n\r\n /**\r\n * A `Boolean` that defines if the constraint's anchor points should be rendered.\r\n *\r\n * @property render.anchors\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * The first possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyA\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * The second possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyB\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\r\n *\r\n * @property pointA\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position.\r\n *\r\n * @property pointB\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`.\r\n * A value of `1` means the constraint should be very stiff.\r\n * A value of `0.2` means the constraint acts like a soft spring.\r\n *\r\n * @property stiffness\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the damping of the constraint, \r\n * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation.\r\n * Damping will only be apparent when the constraint also has a very low `stiffness`.\r\n * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation.\r\n * A value of `0` means the constraint will apply no damping.\r\n *\r\n * @property damping\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the target resting length of the constraint. \r\n * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n *\r\n * @property length\r\n * @type number\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {/**\r\n* The `Matter.Common` module contains utility functions that are common to all modules.\r\n*\r\n* @class Common\r\n*/\r\n\r\nvar Common = {};\r\n\r\nmodule.exports = Common;\r\n\r\n(function() {\r\n\r\n Common._nextId = 0;\r\n Common._seed = 0;\r\n Common._nowStartTime = +(new Date());\r\n\r\n /**\r\n * Extends the object in the first argument using the object in the second argument.\r\n * @method extend\r\n * @param {} obj\r\n * @param {boolean} deep\r\n * @return {} obj extended\r\n */\r\n Common.extend = function(obj, deep) {\r\n var argsStart,\r\n args,\r\n deepClone;\r\n\r\n if (typeof deep === 'boolean') {\r\n argsStart = 2;\r\n deepClone = deep;\r\n } else {\r\n argsStart = 1;\r\n deepClone = true;\r\n }\r\n\r\n for (var i = argsStart; i < arguments.length; i++) {\r\n var source = arguments[i];\r\n\r\n if (source) {\r\n for (var prop in source) {\r\n if (deepClone && source[prop] && source[prop].constructor === Object) {\r\n if (!obj[prop] || obj[prop].constructor === Object) {\r\n obj[prop] = obj[prop] || {};\r\n Common.extend(obj[prop], deepClone, source[prop]);\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n }\r\n }\r\n }\r\n \r\n return obj;\r\n };\r\n\r\n /**\r\n * Creates a new clone of the object, if deep is true references will also be cloned.\r\n * @method clone\r\n * @param {} obj\r\n * @param {bool} deep\r\n * @return {} obj cloned\r\n */\r\n Common.clone = function(obj, deep) {\r\n return Common.extend({}, deep, obj);\r\n };\r\n\r\n /**\r\n * Returns the list of keys for the given object.\r\n * @method keys\r\n * @param {} obj\r\n * @return {string[]} keys\r\n */\r\n Common.keys = function(obj) {\r\n if (Object.keys)\r\n return Object.keys(obj);\r\n\r\n // avoid hasOwnProperty for performance\r\n var keys = [];\r\n for (var key in obj)\r\n keys.push(key);\r\n return keys;\r\n };\r\n\r\n /**\r\n * Returns the list of values for the given object.\r\n * @method values\r\n * @param {} obj\r\n * @return {array} Array of the objects property values\r\n */\r\n Common.values = function(obj) {\r\n var values = [];\r\n \r\n if (Object.keys) {\r\n var keys = Object.keys(obj);\r\n for (var i = 0; i < keys.length; i++) {\r\n values.push(obj[keys[i]]);\r\n }\r\n return values;\r\n }\r\n \r\n // avoid hasOwnProperty for performance\r\n for (var key in obj)\r\n values.push(obj[key]);\r\n return values;\r\n };\r\n\r\n /**\r\n * Gets a value from `base` relative to the `path` string.\r\n * @method get\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} The object at the given path\r\n */\r\n Common.get = function(obj, path, begin, end) {\r\n path = path.split('.').slice(begin, end);\r\n\r\n for (var i = 0; i < path.length; i += 1) {\r\n obj = obj[path[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n /**\r\n * Sets a value on `base` relative to the given `path` string.\r\n * @method set\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {} val The value to set\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} Pass through `val` for chaining\r\n */\r\n Common.set = function(obj, path, val, begin, end) {\r\n var parts = path.split('.').slice(begin, end);\r\n Common.get(obj, path, 0, -1)[parts[parts.length - 1]] = val;\r\n return val;\r\n };\r\n\r\n /**\r\n * Shuffles the given array in-place.\r\n * The function uses a seeded random generator.\r\n * @method shuffle\r\n * @param {array} array\r\n * @return {array} array shuffled randomly\r\n */\r\n Common.shuffle = function(array) {\r\n for (var i = array.length - 1; i > 0; i--) {\r\n var j = Math.floor(Common.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n return array;\r\n };\r\n\r\n /**\r\n * Randomly chooses a value from a list with equal probability.\r\n * The function uses a seeded random generator.\r\n * @method choose\r\n * @param {array} choices\r\n * @return {object} A random choice object from the array\r\n */\r\n Common.choose = function(choices) {\r\n return choices[Math.floor(Common.random() * choices.length)];\r\n };\r\n\r\n /**\r\n * Returns true if the object is a HTMLElement, otherwise false.\r\n * @method isElement\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a HTMLElement, otherwise false\r\n */\r\n Common.isElement = function(obj) {\r\n if (typeof HTMLElement !== 'undefined') {\r\n return obj instanceof HTMLElement;\r\n }\r\n\r\n return !!(obj && obj.nodeType && obj.nodeName);\r\n };\r\n\r\n /**\r\n * Returns true if the object is an array.\r\n * @method isArray\r\n * @param {object} obj\r\n * @return {boolean} True if the object is an array, otherwise false\r\n */\r\n Common.isArray = function(obj) {\r\n return Object.prototype.toString.call(obj) === '[object Array]';\r\n };\r\n\r\n /**\r\n * Returns true if the object is a function.\r\n * @method isFunction\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a function, otherwise false\r\n */\r\n Common.isFunction = function(obj) {\r\n return typeof obj === \"function\";\r\n };\r\n\r\n /**\r\n * Returns true if the object is a plain object.\r\n * @method isPlainObject\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a plain object, otherwise false\r\n */\r\n Common.isPlainObject = function(obj) {\r\n return typeof obj === 'object' && obj.constructor === Object;\r\n };\r\n\r\n /**\r\n * Returns true if the object is a string.\r\n * @method isString\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a string, otherwise false\r\n */\r\n Common.isString = function(obj) {\r\n return toString.call(obj) === '[object String]';\r\n };\r\n \r\n /**\r\n * Returns the given value clamped between a minimum and maximum value.\r\n * @method clamp\r\n * @param {number} value\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} The value clamped between min and max inclusive\r\n */\r\n Common.clamp = function(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n \r\n /**\r\n * Returns the sign of the given value.\r\n * @method sign\r\n * @param {number} value\r\n * @return {number} -1 if negative, +1 if 0 or positive\r\n */\r\n Common.sign = function(value) {\r\n return value < 0 ? -1 : 1;\r\n };\r\n \r\n /**\r\n * Returns the current timestamp since the time origin (e.g. from page load).\r\n * The result will be high-resolution including decimal places if available.\r\n * @method now\r\n * @return {number} the current timestamp\r\n */\r\n Common.now = function() {\r\n if (window.performance) {\r\n if (window.performance.now) {\r\n return window.performance.now();\r\n } else if (window.performance.webkitNow) {\r\n return window.performance.webkitNow();\r\n }\r\n }\r\n\r\n return (new Date()) - Common._nowStartTime;\r\n };\r\n \r\n /**\r\n * Returns a random value between a minimum and a maximum value inclusive.\r\n * The function uses a seeded random generator.\r\n * @method random\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} A random number between min and max inclusive\r\n */\r\n Common.random = function(min, max) {\r\n min = (typeof min !== \"undefined\") ? min : 0;\r\n max = (typeof max !== \"undefined\") ? max : 1;\r\n return min + _seededRandom() * (max - min);\r\n };\r\n\r\n var _seededRandom = function() {\r\n // https://en.wikipedia.org/wiki/Linear_congruential_generator\r\n Common._seed = (Common._seed * 9301 + 49297) % 233280;\r\n return Common._seed / 233280;\r\n };\r\n\r\n /**\r\n * Converts a CSS hex colour string into an integer.\r\n * @method colorToNumber\r\n * @param {string} colorString\r\n * @return {number} An integer representing the CSS hex string\r\n */\r\n Common.colorToNumber = function(colorString) {\r\n colorString = colorString.replace('#','');\r\n\r\n if (colorString.length == 3) {\r\n colorString = colorString.charAt(0) + colorString.charAt(0)\r\n + colorString.charAt(1) + colorString.charAt(1)\r\n + colorString.charAt(2) + colorString.charAt(2);\r\n }\r\n\r\n return parseInt(colorString, 16);\r\n };\r\n\r\n /**\r\n * The console logging level to use, where each level includes all levels above and excludes the levels below.\r\n * The default level is 'debug' which shows all console messages. \r\n *\r\n * Possible level values are:\r\n * - 0 = None\r\n * - 1 = Debug\r\n * - 2 = Info\r\n * - 3 = Warn\r\n * - 4 = Error\r\n * @property Common.logLevel\r\n * @type {Number}\r\n * @default 1\r\n */\r\n Common.logLevel = 1;\r\n\r\n /**\r\n * Shows a `console.log` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method log\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.log = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.log.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.info` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method info\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.info = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 2) {\r\n console.info.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.warn` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method warn\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.warn = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.warn.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Returns the next unique sequential ID.\r\n * @method nextId\r\n * @return {Number} Unique sequential ID\r\n */\r\n Common.nextId = function() {\r\n return Common._nextId++;\r\n };\r\n\r\n /**\r\n * A cross browser compatible indexOf implementation.\r\n * @method indexOf\r\n * @param {array} haystack\r\n * @param {object} needle\r\n * @return {number} The position of needle in haystack, otherwise -1.\r\n */\r\n Common.indexOf = function(haystack, needle) {\r\n if (haystack.indexOf)\r\n return haystack.indexOf(needle);\r\n\r\n for (var i = 0; i < haystack.length; i++) {\r\n if (haystack[i] === needle)\r\n return i;\r\n }\r\n\r\n return -1;\r\n };\r\n\r\n /**\r\n * A cross browser compatible array map implementation.\r\n * @method map\r\n * @param {array} list\r\n * @param {function} func\r\n * @return {array} Values from list transformed by func.\r\n */\r\n Common.map = function(list, func) {\r\n if (list.map) {\r\n return list.map(func);\r\n }\r\n\r\n var mapped = [];\r\n\r\n for (var i = 0; i < list.length; i += 1) {\r\n mapped.push(func(list[i]));\r\n }\r\n\r\n return mapped;\r\n };\r\n\r\n /**\r\n * Takes a directed graph and returns the partially ordered set of vertices in topological order.\r\n * Circular dependencies are allowed.\r\n * @method topologicalSort\r\n * @param {object} graph\r\n * @return {array} Partially ordered set of vertices in topological order.\r\n */\r\n Common.topologicalSort = function(graph) {\r\n // https://github.com/mgechev/javascript-algorithms\r\n // Copyright (c) Minko Gechev (MIT license)\r\n // Modifications: tidy formatting and naming\r\n var result = [],\r\n visited = [],\r\n temp = [];\r\n\r\n for (var node in graph) {\r\n if (!visited[node] && !temp[node]) {\r\n Common._topologicalSort(node, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n Common._topologicalSort = function(node, visited, temp, graph, result) {\r\n var neighbors = graph[node] || [];\r\n temp[node] = true;\r\n\r\n for (var i = 0; i < neighbors.length; i += 1) {\r\n var neighbor = neighbors[i];\r\n\r\n if (temp[neighbor]) {\r\n // skip circular dependencies\r\n continue;\r\n }\r\n\r\n if (!visited[neighbor]) {\r\n Common._topologicalSort(neighbor, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n temp[node] = false;\r\n visited[node] = true;\r\n\r\n result.push(node);\r\n };\r\n\r\n /**\r\n * Takes _n_ functions as arguments and returns a new function that calls them in order.\r\n * The arguments applied when calling the new function will also be applied to every function passed.\r\n * The value of `this` refers to the last value returned in the chain that was not `undefined`.\r\n * Therefore if a passed function does not return a value, the previously returned value is maintained.\r\n * After all passed functions have been called the new function returns the last returned value (if any).\r\n * If any of the passed functions are a chain, then the chain will be flattened.\r\n * @method chain\r\n * @param ...funcs {function} The functions to chain.\r\n * @return {function} A new function that calls the passed functions in order.\r\n */\r\n Common.chain = function() {\r\n var funcs = [];\r\n\r\n for (var i = 0; i < arguments.length; i += 1) {\r\n var func = arguments[i];\r\n\r\n if (func._chained) {\r\n // flatten already chained functions\r\n funcs.push.apply(funcs, func._chained);\r\n } else {\r\n funcs.push(func);\r\n }\r\n }\r\n\r\n var chain = function() {\r\n // https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358\r\n var lastResult,\r\n args = new Array(arguments.length);\r\n\r\n for (var i = 0, l = arguments.length; i < l; i++) {\r\n args[i] = arguments[i];\r\n }\r\n\r\n for (i = 0; i < funcs.length; i += 1) {\r\n var result = funcs[i].apply(lastResult, args);\r\n\r\n if (typeof result !== 'undefined') {\r\n lastResult = result;\r\n }\r\n }\r\n\r\n return lastResult;\r\n };\r\n\r\n chain._chained = funcs;\r\n\r\n return chain;\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathBefore\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathBefore = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n func,\r\n Common.get(base, path)\r\n ));\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathAfter\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathAfter = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n Common.get(base, path),\r\n func\r\n ));\r\n };\r\n\r\n /**\r\n * Used to require external libraries outside of the bundle.\r\n * It first looks for the `globalName` on the environment's global namespace.\r\n * If the global is not found, it will fall back to using the standard `require` using the `moduleName`.\r\n * @private\r\n * @method _requireGlobal\r\n * @param {string} globalName The global module name\r\n * @param {string} moduleName The fallback CommonJS module name\r\n * @return {} The loaded module\r\n */\r\n Common._requireGlobal = function(globalName, moduleName) {\r\n var obj = (typeof window !== 'undefined' ? window[globalName] : typeof global !== 'undefined' ? global[globalName] : null);\r\n\r\n // Breaks webpack :(\r\n // return obj || require(moduleName);\r\n\r\n return obj;\r\n };\r\n})();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Common.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n* An engine is a controller that manages updating the simulation of the world.\r\n* See `Matter.Runner` for an optional game loop utility.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Engine\r\n*/\r\n\r\nvar Engine = {};\r\n\r\nmodule.exports = Engine;\r\n\r\nvar World = __webpack_require__(/*! ../body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\nvar Sleeping = __webpack_require__(/*! ./Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Resolver = __webpack_require__(/*! ../collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nvar Pairs = __webpack_require__(/*! ../collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nvar Metrics = __webpack_require__(/*! ./Metrics */ "./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js");\r\nvar Grid = __webpack_require__(/*! ../collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nvar Events = __webpack_require__(/*! ./Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Body = __webpack_require__(/*! ../body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {object} [options]\r\n * @return {engine} engine\r\n */\r\n Engine.create = function(element, options) {\r\n // options may be passed as the first (and only) argument\r\n options = Common.isElement(element) ? options : element;\r\n element = Common.isElement(element) ? element : null;\r\n options = options || {};\r\n\r\n if (element || options.render) {\r\n Common.warn(\'Engine.create: engine.render is deprecated (see docs)\');\r\n }\r\n\r\n var defaults = {\r\n positionIterations: 6,\r\n velocityIterations: 4,\r\n constraintIterations: 2,\r\n enableSleeping: false,\r\n events: [],\r\n plugin: {},\r\n timing: {\r\n timestamp: 0,\r\n timeScale: 1\r\n },\r\n broadphase: {\r\n controller: Grid\r\n }\r\n };\r\n\r\n var engine = Common.extend(defaults, options);\r\n\r\n // @deprecated\r\n if (element || engine.render) {\r\n var renderDefaults = {\r\n element: element,\r\n controller: Render\r\n };\r\n \r\n engine.render = Common.extend(renderDefaults, engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render && engine.render.controller) {\r\n engine.render = engine.render.controller.create(engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render) {\r\n engine.render.engine = engine;\r\n }\r\n\r\n engine.world = options.world || World.create(engine.world);\r\n engine.pairs = Pairs.create();\r\n engine.broadphase = engine.broadphase.controller.create(engine.broadphase);\r\n engine.metrics = engine.metrics || { extended: false };\r\n\r\n // @if DEBUG\r\n engine.metrics = Metrics.create(engine.metrics);\r\n // @endif\r\n\r\n return engine;\r\n };\r\n\r\n /**\r\n * Moves the simulation forward in time by `delta` ms.\r\n * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates.\r\n * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step.\r\n * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * Triggers `beforeUpdate` and `afterUpdate` events.\r\n * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.\r\n * @method update\r\n * @param {engine} engine\r\n * @param {number} [delta=16.666]\r\n * @param {number} [correction=1]\r\n */\r\n Engine.update = function(engine, delta, correction) {\r\n delta = delta || 1000 / 60;\r\n correction = correction || 1;\r\n\r\n var world = engine.world,\r\n timing = engine.timing,\r\n broadphase = engine.broadphase,\r\n broadphasePairs = [],\r\n i;\r\n\r\n // increment timestamp\r\n timing.timestamp += delta * timing.timeScale;\r\n\r\n // create an event object\r\n var event = {\r\n timestamp: timing.timestamp\r\n };\r\n\r\n Events.trigger(engine, \'beforeUpdate\', event);\r\n\r\n // get lists of all bodies and constraints, no matter what composites they are in\r\n var allBodies = Composite.allBodies(world),\r\n allConstraints = Composite.allConstraints(world);\r\n\r\n // @if DEBUG\r\n // reset metrics logging\r\n Metrics.reset(engine.metrics);\r\n // @endif\r\n\r\n // if sleeping enabled, call the sleeping controller\r\n if (engine.enableSleeping)\r\n Sleeping.update(allBodies, timing.timeScale);\r\n\r\n // applies gravity to all bodies\r\n Engine._bodiesApplyGravity(allBodies, world.gravity);\r\n\r\n // update all body position and rotation by integration\r\n Engine._bodiesUpdate(allBodies, delta, timing.timeScale, correction, world.bounds);\r\n\r\n // update all constraints (first pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // broadphase pass: find potential collision pairs\r\n if (broadphase.controller) {\r\n // if world is dirty, we must flush the whole grid\r\n if (world.isModified)\r\n broadphase.controller.clear(broadphase);\r\n\r\n // update the grid buckets based on current bodies\r\n broadphase.controller.update(broadphase, allBodies, engine, world.isModified);\r\n broadphasePairs = broadphase.pairsList;\r\n } else {\r\n // if no broadphase set, we just pass all bodies\r\n broadphasePairs = allBodies;\r\n }\r\n\r\n // clear all composite modified flags\r\n if (world.isModified) {\r\n Composite.setModified(world, false, false, true);\r\n }\r\n\r\n // narrowphase pass: find actual collisions, then create or update collision pairs\r\n var collisions = broadphase.detector(broadphasePairs, engine);\r\n\r\n // update collision pairs\r\n var pairs = engine.pairs,\r\n timestamp = timing.timestamp;\r\n Pairs.update(pairs, collisions, timestamp);\r\n Pairs.removeOld(pairs, timestamp);\r\n\r\n // wake up bodies involved in collisions\r\n if (engine.enableSleeping)\r\n Sleeping.afterCollisions(pairs.list, timing.timeScale);\r\n\r\n // trigger collision events\r\n if (pairs.collisionStart.length > 0)\r\n Events.trigger(engine, \'collisionStart\', { pairs: pairs.collisionStart });\r\n\r\n // iteratively resolve position between collisions\r\n Resolver.preSolvePosition(pairs.list);\r\n for (i = 0; i < engine.positionIterations; i++) {\r\n Resolver.solvePosition(pairs.list, allBodies, timing.timeScale);\r\n }\r\n Resolver.postSolvePosition(allBodies);\r\n\r\n // update all constraints (second pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // iteratively resolve velocity between collisions\r\n Resolver.preSolveVelocity(pairs.list);\r\n for (i = 0; i < engine.velocityIterations; i++) {\r\n Resolver.solveVelocity(pairs.list, timing.timeScale);\r\n }\r\n\r\n // trigger collision events\r\n if (pairs.collisionActive.length > 0)\r\n Events.trigger(engine, \'collisionActive\', { pairs: pairs.collisionActive });\r\n\r\n if (pairs.collisionEnd.length > 0)\r\n Events.trigger(engine, \'collisionEnd\', { pairs: pairs.collisionEnd });\r\n\r\n // @if DEBUG\r\n // update metrics log\r\n Metrics.update(engine.metrics, engine);\r\n // @endif\r\n\r\n // clear force buffers\r\n Engine._bodiesClearForces(allBodies);\r\n\r\n Events.trigger(engine, \'afterUpdate\', event);\r\n\r\n return engine;\r\n };\r\n \r\n /**\r\n * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`.\r\n * @method merge\r\n * @param {engine} engineA\r\n * @param {engine} engineB\r\n */\r\n Engine.merge = function(engineA, engineB) {\r\n Common.extend(engineA, engineB);\r\n \r\n if (engineB.world) {\r\n engineA.world = engineB.world;\r\n\r\n Engine.clear(engineA);\r\n\r\n var bodies = Composite.allBodies(engineA.world);\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n Sleeping.set(body, false);\r\n body.id = Common.nextId();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Clears the engine including the world, pairs and broadphase.\r\n * @method clear\r\n * @param {engine} engine\r\n */\r\n Engine.clear = function(engine) {\r\n var world = engine.world;\r\n \r\n Pairs.clear(engine.pairs);\r\n\r\n var broadphase = engine.broadphase;\r\n if (broadphase.controller) {\r\n var bodies = Composite.allBodies(world);\r\n broadphase.controller.clear(broadphase);\r\n broadphase.controller.update(broadphase, bodies, engine, true);\r\n }\r\n };\r\n\r\n /**\r\n * Zeroes the `body.force` and `body.torque` force buffers.\r\n * @method _bodiesClearForces\r\n * @private\r\n * @param {body[]} bodies\r\n */\r\n Engine._bodiesClearForces = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset force buffers\r\n body.force.x = 0;\r\n body.force.y = 0;\r\n body.torque = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Applys a mass dependant force to all given bodies.\r\n * @method _bodiesApplyGravity\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {vector} gravity\r\n */\r\n Engine._bodiesApplyGravity = function(bodies, gravity) {\r\n var gravityScale = typeof gravity.scale !== \'undefined\' ? gravity.scale : 0.001;\r\n\r\n if ((gravity.x === 0 && gravity.y === 0) || gravityScale === 0) {\r\n return;\r\n }\r\n \r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.ignoreGravity || body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n // apply gravity\r\n body.force.y += body.mass * gravity.y * gravityScale;\r\n body.force.x += body.mass * gravity.x * gravityScale;\r\n }\r\n };\r\n\r\n /**\r\n * Applys `Body.update` to all given `bodies`.\r\n * @method _bodiesUpdate\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {number} deltaTime \r\n * The amount of time elapsed between updates\r\n * @param {number} timeScale\r\n * @param {number} correction \r\n * The Verlet correction factor (deltaTime / lastDeltaTime)\r\n * @param {bounds} worldBounds\r\n */\r\n Engine._bodiesUpdate = function(bodies, deltaTime, timeScale, correction, worldBounds) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n Body.update(body, deltaTime, timeScale, correction);\r\n }\r\n };\r\n\r\n /**\r\n * An alias for `Runner.run`, see `Matter.Runner` for more information.\r\n * @method run\r\n * @param {engine} engine\r\n */\r\n\r\n /**\r\n * Fired just before an update\r\n *\r\n * @event beforeUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update and all collision events\r\n *\r\n * @event afterUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any)\r\n *\r\n * @event collisionStart\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any)\r\n *\r\n * @event collisionActive\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any)\r\n *\r\n * @event collisionEnd\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of position iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property positionIterations\r\n * @type number\r\n * @default 6\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of velocity iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property velocityIterations\r\n * @type number\r\n * @default 4\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of constraint iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n * The default value of `2` is usually very adequate.\r\n *\r\n * @property constraintIterations\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module.\r\n * Sleeping can improve stability and performance, but often at the expense of accuracy.\r\n *\r\n * @property enableSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * An `Object` containing properties regarding the timing systems of the engine. \r\n *\r\n * @property timing\r\n * @type object\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the global scaling factor of time for all bodies.\r\n * A value of `0` freezes the simulation.\r\n * A value of `0.1` gives a slow-motion effect.\r\n * A value of `1.2` gives a speed-up effect.\r\n *\r\n * @property timing.timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. \r\n * It is incremented on every `Engine.update` by the given `delta` argument. \r\n *\r\n * @property timing.timestamp\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`.\r\n * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`.\r\n *\r\n * A minimal custom renderer object must define at least three functions: `create`, `clear` and `world` (see `Matter.Render`).\r\n * It is also possible to instead pass the _module_ reference via `options.render.controller` and `Engine.create` will instantiate one for you.\r\n *\r\n * @property render\r\n * @type render\r\n * @deprecated see Demo.js for an example of creating a renderer\r\n * @default a Matter.Render instance\r\n */\r\n\r\n /**\r\n * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`.\r\n *\r\n * @property broadphase\r\n * @type grid\r\n * @default a Matter.Grid instance\r\n */\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @property world\r\n * @type world\r\n * @default a Matter.World instance\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Events` module contains methods to fire and listen to events on other objects.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Events\r\n*/\r\n\r\nvar Events = {};\r\n\r\nmodule.exports = Events;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Subscribes a callback function to the given object's `eventName`.\r\n * @method on\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.on = function(object, eventNames, callback) {\r\n var names = eventNames.split(' '),\r\n name;\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n object.events = object.events || {};\r\n object.events[name] = object.events[name] || [];\r\n object.events[name].push(callback);\r\n }\r\n\r\n return callback;\r\n };\r\n\r\n /**\r\n * Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all events.\r\n * @method off\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.off = function(object, eventNames, callback) {\r\n if (!eventNames) {\r\n object.events = {};\r\n return;\r\n }\r\n\r\n // handle Events.off(object, callback)\r\n if (typeof eventNames === 'function') {\r\n callback = eventNames;\r\n eventNames = Common.keys(object.events).join(' ');\r\n }\r\n\r\n var names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n var callbacks = object.events[names[i]],\r\n newCallbacks = [];\r\n\r\n if (callback && callbacks) {\r\n for (var j = 0; j < callbacks.length; j++) {\r\n if (callbacks[j] !== callback)\r\n newCallbacks.push(callbacks[j]);\r\n }\r\n }\r\n\r\n object.events[names[i]] = newCallbacks;\r\n }\r\n };\r\n\r\n /**\r\n * Fires all the callbacks subscribed to the given object's `eventName`, in the order they subscribed, if any.\r\n * @method trigger\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {} event\r\n */\r\n Events.trigger = function(object, eventNames, event) {\r\n var names,\r\n name,\r\n callbacks,\r\n eventClone;\r\n\r\n var events = object.events;\r\n \r\n if (events && Common.keys(events).length > 0) {\r\n if (!event)\r\n event = {};\r\n\r\n names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n callbacks = events[name];\r\n\r\n if (callbacks) {\r\n eventClone = Common.clone(event, false);\r\n eventClone.name = name;\r\n eventClone.source = object;\r\n\r\n for (var j = 0; j < callbacks.length; j++) {\r\n callbacks[j].apply(object, [eventClone]);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Events.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter` module is the top level namespace. It also includes a function for installing plugins on top of the library.\r\n*\r\n* @class Matter\r\n*/\r\n\r\nvar Matter = {};\r\n\r\nmodule.exports = Matter;\r\n\r\nvar Plugin = __webpack_require__(/*! ./Plugin */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js\");\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * The library name.\r\n * @property name\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.name = 'matter-js';\r\n\r\n /**\r\n * The library version.\r\n * @property version\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.version = '0.14.2';\r\n\r\n /**\r\n * A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.\r\n * Alternatively you may set `Matter.uses` manually and install them by calling `Plugin.use(Matter)`.\r\n * @property uses\r\n * @type {Array}\r\n */\r\n Matter.uses = [];\r\n\r\n /**\r\n * The plugins that have been installed through `Matter.Plugin.install`. Read only.\r\n * @property used\r\n * @readOnly\r\n * @type {Array}\r\n */\r\n Matter.used = [];\r\n\r\n /**\r\n * Installs the given plugins on the `Matter` namespace.\r\n * This is a short-hand for `Plugin.use`, see it for more information.\r\n * Call this function once at the start of your code, with all of the plugins you wish to install as arguments.\r\n * Avoid calling this function multiple times unless you intend to manually control installation order.\r\n * @method use\r\n * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument).\r\n */\r\n Matter.use = function() {\r\n Plugin.use(Matter, Array.prototype.slice.call(arguments));\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method before\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.before = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathBefore(Matter, path, func);\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method after\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.after = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathAfter(Matter, path, func);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js":function(module,exports,__webpack_require__){eval('// @if DEBUG\r\n/**\r\n* _Internal Class_, not generally used outside of the engine\'s internals.\r\n*\r\n*/\r\n\r\nvar Metrics = {};\r\n\r\nmodule.exports = Metrics;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new metrics.\r\n * @method create\r\n * @private\r\n * @return {metrics} A new metrics\r\n */\r\n Metrics.create = function(options) {\r\n var defaults = {\r\n extended: false,\r\n narrowDetections: 0,\r\n narrowphaseTests: 0,\r\n narrowReuse: 0,\r\n narrowReuseCount: 0,\r\n midphaseTests: 0,\r\n broadphaseTests: 0,\r\n narrowEff: 0.0001,\r\n midEff: 0.0001,\r\n broadEff: 0.0001,\r\n collisions: 0,\r\n buckets: 0,\r\n bodies: 0,\r\n pairs: 0\r\n };\r\n\r\n return Common.extend(defaults, false, options);\r\n };\r\n\r\n /**\r\n * Resets metrics.\r\n * @method reset\r\n * @private\r\n * @param {metrics} metrics\r\n */\r\n Metrics.reset = function(metrics) {\r\n if (metrics.extended) {\r\n metrics.narrowDetections = 0;\r\n metrics.narrowphaseTests = 0;\r\n metrics.narrowReuse = 0;\r\n metrics.narrowReuseCount = 0;\r\n metrics.midphaseTests = 0;\r\n metrics.broadphaseTests = 0;\r\n metrics.narrowEff = 0;\r\n metrics.midEff = 0;\r\n metrics.broadEff = 0;\r\n metrics.collisions = 0;\r\n metrics.buckets = 0;\r\n metrics.pairs = 0;\r\n metrics.bodies = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Updates metrics.\r\n * @method update\r\n * @private\r\n * @param {metrics} metrics\r\n * @param {engine} engine\r\n */\r\n Metrics.update = function(metrics, engine) {\r\n if (metrics.extended) {\r\n var world = engine.world,\r\n bodies = Composite.allBodies(world);\r\n\r\n metrics.collisions = metrics.narrowDetections;\r\n metrics.pairs = engine.pairs.list.length;\r\n metrics.bodies = bodies.length;\r\n metrics.midEff = (metrics.narrowDetections / (metrics.midphaseTests || 1)).toFixed(2);\r\n metrics.narrowEff = (metrics.narrowDetections / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n metrics.broadEff = (1 - (metrics.broadphaseTests / (bodies.length || 1))).toFixed(2);\r\n metrics.narrowReuse = (metrics.narrowReuseCount / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n //var broadphase = engine.broadphase[engine.broadphase.current];\r\n //if (broadphase.instance)\r\n // metrics.buckets = Common.keys(broadphase.instance.buckets).length;\r\n }\r\n };\r\n\r\n})();\r\n// @endif\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Plugin` module contains functions for registering and installing plugins on modules.\r\n*\r\n* @class Plugin\r\n*/\r\n\r\nvar Plugin = {};\r\n\r\nmodule.exports = Plugin;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Plugin._registry = {};\r\n\r\n /**\r\n * Registers a plugin object so it can be resolved later by name.\r\n * @method register\r\n * @param plugin {} The plugin to register.\r\n * @return {object} The plugin.\r\n */\r\n Plugin.register = function(plugin) {\r\n if (!Plugin.isPlugin(plugin)) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'does not implement all required fields.');\r\n }\r\n\r\n if (plugin.name in Plugin._registry) {\r\n var registered = Plugin._registry[plugin.name],\r\n pluginVersion = Plugin.versionParse(plugin.version).number,\r\n registeredVersion = Plugin.versionParse(registered.version).number;\r\n\r\n if (pluginVersion > registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'was upgraded to', Plugin.toString(plugin));\r\n Plugin._registry[plugin.name] = plugin;\r\n } else if (pluginVersion < registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'can not be downgraded to', Plugin.toString(plugin));\r\n } else if (plugin !== registered) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'is already registered to different plugin object');\r\n }\r\n } else {\r\n Plugin._registry[plugin.name] = plugin;\r\n }\r\n\r\n return plugin;\r\n };\r\n\r\n /**\r\n * Resolves a dependency to a plugin object from the registry if it exists. \r\n * The `dependency` may contain a version, but only the name matters when resolving.\r\n * @method resolve\r\n * @param dependency {string} The dependency.\r\n * @return {object} The plugin if resolved, otherwise `undefined`.\r\n */\r\n Plugin.resolve = function(dependency) {\r\n return Plugin._registry[Plugin.dependencyParse(dependency).name];\r\n };\r\n\r\n /**\r\n * Returns a pretty printed plugin name and version.\r\n * @method toString\r\n * @param plugin {} The plugin.\r\n * @return {string} Pretty printed plugin name and version.\r\n */\r\n Plugin.toString = function(plugin) {\r\n return typeof plugin === 'string' ? plugin : (plugin.name || 'anonymous') + '@' + (plugin.version || plugin.range || '0.0.0');\r\n };\r\n\r\n /**\r\n * Returns `true` if the object meets the minimum standard to be considered a plugin.\r\n * This means it must define the following properties:\r\n * - `name`\r\n * - `version`\r\n * - `install`\r\n * @method isPlugin\r\n * @param obj {} The obj to test.\r\n * @return {boolean} `true` if the object can be considered a plugin otherwise `false`.\r\n */\r\n Plugin.isPlugin = function(obj) {\r\n return obj && obj.name && obj.version && obj.install;\r\n };\r\n\r\n /**\r\n * Returns `true` if a plugin with the given `name` been installed on `module`.\r\n * @method isUsed\r\n * @param module {} The module.\r\n * @param name {string} The plugin name.\r\n * @return {boolean} `true` if a plugin with the given `name` been installed on `module`, otherwise `false`.\r\n */\r\n Plugin.isUsed = function(module, name) {\r\n return module.used.indexOf(name) > -1;\r\n };\r\n\r\n /**\r\n * Returns `true` if `plugin.for` is applicable to `module` by comparing against `module.name` and `module.version`.\r\n * If `plugin.for` is not specified then it is assumed to be applicable.\r\n * The value of `plugin.for` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * @method isFor\r\n * @param plugin {} The plugin.\r\n * @param module {} The module.\r\n * @return {boolean} `true` if `plugin.for` is applicable to `module`, otherwise `false`.\r\n */\r\n Plugin.isFor = function(plugin, module) {\r\n var parsed = plugin.for && Plugin.dependencyParse(plugin.for);\r\n return !plugin.for || (module.name === parsed.name && Plugin.versionSatisfies(module.version, parsed.range));\r\n };\r\n\r\n /**\r\n * Installs the plugins by calling `plugin.install` on each plugin specified in `plugins` if passed, otherwise `module.uses`.\r\n * For installing plugins on `Matter` see the convenience function `Matter.use`.\r\n * Plugins may be specified either by their name or a reference to the plugin object.\r\n * Plugins themselves may specify further dependencies, but each plugin is installed only once.\r\n * Order is important, a topological sort is performed to find the best resulting order of installation.\r\n * This sorting attempts to satisfy every dependency's requested ordering, but may not be exact in all cases.\r\n * This function logs the resulting status of each dependency in the console, along with any warnings.\r\n * - A green tick ✅ indicates a dependency was resolved and installed.\r\n * - An orange diamond 🔶 indicates a dependency was resolved but a warning was thrown for it or one if its dependencies.\r\n * - A red cross ❌ indicates a dependency could not be resolved.\r\n * Avoid calling this function multiple times on the same module unless you intend to manually control installation order.\r\n * @method use\r\n * @param module {} The module install plugins on.\r\n * @param [plugins=module.uses] {} The plugins to install on module (optional, defaults to `module.uses`).\r\n */\r\n Plugin.use = function(module, plugins) {\r\n module.uses = (module.uses || []).concat(plugins || []);\r\n\r\n if (module.uses.length === 0) {\r\n Common.warn('Plugin.use:', Plugin.toString(module), 'does not specify any dependencies to install.');\r\n return;\r\n }\r\n\r\n var dependencies = Plugin.dependencies(module),\r\n sortedDependencies = Common.topologicalSort(dependencies),\r\n status = [];\r\n\r\n for (var i = 0; i < sortedDependencies.length; i += 1) {\r\n if (sortedDependencies[i] === module.name) {\r\n continue;\r\n }\r\n\r\n var plugin = Plugin.resolve(sortedDependencies[i]);\r\n\r\n if (!plugin) {\r\n status.push('❌ ' + sortedDependencies[i]);\r\n continue;\r\n }\r\n\r\n if (Plugin.isUsed(module, plugin.name)) {\r\n continue;\r\n }\r\n\r\n if (!Plugin.isFor(plugin, module)) {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'is for', plugin.for, 'but installed on', Plugin.toString(module) + '.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin.install) {\r\n plugin.install(module);\r\n } else {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'does not specify an install function.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin._warned) {\r\n status.push('🔶 ' + Plugin.toString(plugin));\r\n delete plugin._warned;\r\n } else {\r\n status.push('✅ ' + Plugin.toString(plugin));\r\n }\r\n\r\n module.used.push(plugin.name);\r\n }\r\n\r\n if (status.length > 0 && !plugin.silent) {\r\n Common.info(status.join(' '));\r\n }\r\n };\r\n\r\n /**\r\n * Recursively finds all of a module's dependencies and returns a flat dependency graph.\r\n * @method dependencies\r\n * @param module {} The module.\r\n * @return {object} A dependency graph.\r\n */\r\n Plugin.dependencies = function(module, tracked) {\r\n var parsedBase = Plugin.dependencyParse(module),\r\n name = parsedBase.name;\r\n\r\n tracked = tracked || {};\r\n\r\n if (name in tracked) {\r\n return;\r\n }\r\n\r\n module = Plugin.resolve(module) || module;\r\n\r\n tracked[name] = Common.map(module.uses || [], function(dependency) {\r\n if (Plugin.isPlugin(dependency)) {\r\n Plugin.register(dependency);\r\n }\r\n\r\n var parsed = Plugin.dependencyParse(dependency),\r\n resolved = Plugin.resolve(dependency);\r\n\r\n if (resolved && !Plugin.versionSatisfies(resolved.version, parsed.range)) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(resolved), 'does not satisfy',\r\n Plugin.toString(parsed), 'used by', Plugin.toString(parsedBase) + '.'\r\n );\r\n\r\n resolved._warned = true;\r\n module._warned = true;\r\n } else if (!resolved) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(dependency), 'used by',\r\n Plugin.toString(parsedBase), 'could not be resolved.'\r\n );\r\n\r\n module._warned = true;\r\n }\r\n\r\n return parsed.name;\r\n });\r\n\r\n for (var i = 0; i < tracked[name].length; i += 1) {\r\n Plugin.dependencies(tracked[name][i], tracked);\r\n }\r\n\r\n return tracked;\r\n };\r\n\r\n /**\r\n * Parses a dependency string into its components.\r\n * The `dependency` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * This function can also handle dependencies that are already resolved (e.g. a module object).\r\n * @method dependencyParse\r\n * @param dependency {string} The dependency of the format `'module-name'` or `'module-name@version'`.\r\n * @return {object} The dependency parsed into its components.\r\n */\r\n Plugin.dependencyParse = function(dependency) {\r\n if (Common.isString(dependency)) {\r\n var pattern = /^[\\w-]+(@(\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?))?$/;\r\n\r\n if (!pattern.test(dependency)) {\r\n Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.');\r\n }\r\n\r\n return {\r\n name: dependency.split('@')[0],\r\n range: dependency.split('@')[1] || '*'\r\n };\r\n }\r\n\r\n return {\r\n name: dependency.name,\r\n range: dependency.range || dependency.version\r\n };\r\n };\r\n\r\n /**\r\n * Parses a version string into its components. \r\n * Versions are strictly of the format `x.y.z` (as in [semver](http://semver.org/)).\r\n * Versions may optionally have a prerelease tag in the format `x.y.z-alpha`.\r\n * Ranges are a strict subset of [npm ranges](https://docs.npmjs.com/misc/semver#advanced-range-syntax).\r\n * Only the following range types are supported:\r\n * - Tilde ranges e.g. `~1.2.3`\r\n * - Caret ranges e.g. `^1.2.3`\r\n * - Exact version e.g. `1.2.3`\r\n * - Any version `*`\r\n * @method versionParse\r\n * @param range {string} The version string.\r\n * @return {object} The version range parsed into its components.\r\n */\r\n Plugin.versionParse = function(range) {\r\n var pattern = /^\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?$/;\r\n\r\n if (!pattern.test(range)) {\r\n Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');\r\n }\r\n\r\n var identifiers = range.split('-');\r\n range = identifiers[0];\r\n\r\n var isRange = isNaN(Number(range[0])),\r\n version = isRange ? range.substr(1) : range,\r\n parts = Common.map(version.split('.'), function(part) {\r\n return Number(part);\r\n });\r\n\r\n return {\r\n isRange: isRange,\r\n version: version,\r\n range: range,\r\n operator: isRange ? range[0] : '',\r\n parts: parts,\r\n prerelease: identifiers[1],\r\n number: parts[0] * 1e8 + parts[1] * 1e4 + parts[2]\r\n };\r\n };\r\n\r\n /**\r\n * Returns `true` if `version` satisfies the given `range`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * If a version or range is not specified, then any version (`*`) is assumed to satisfy.\r\n * @method versionSatisfies\r\n * @param version {string} The version string.\r\n * @param range {string} The range string.\r\n * @return {boolean} `true` if `version` satisfies `range`, otherwise `false`.\r\n */\r\n Plugin.versionSatisfies = function(version, range) {\r\n range = range || '*';\r\n\r\n var rangeParsed = Plugin.versionParse(range),\r\n rangeParts = rangeParsed.parts,\r\n versionParsed = Plugin.versionParse(version),\r\n versionParts = versionParsed.parts;\r\n\r\n if (rangeParsed.isRange) {\r\n if (rangeParsed.operator === '*' || version === '*') {\r\n return true;\r\n }\r\n\r\n if (rangeParsed.operator === '~') {\r\n return versionParts[0] === rangeParts[0] && versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n if (rangeParsed.operator === '^') {\r\n if (rangeParts[0] > 0) {\r\n return versionParts[0] === rangeParts[0] && versionParsed.number >= rangeParsed.number;\r\n }\r\n\r\n if (rangeParts[1] > 0) {\r\n return versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n return versionParts[2] === rangeParts[2];\r\n }\r\n }\r\n\r\n return version === range || version === '*';\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies.\r\n*\r\n* @class Sleeping\r\n*/\r\n\r\nvar Sleeping = {};\r\n\r\nmodule.exports = Sleeping;\r\n\r\nvar Events = __webpack_require__(/*! ./Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n(function() {\r\n\r\n Sleeping._motionWakeThreshold = 0.18;\r\n Sleeping._motionSleepThreshold = 0.08;\r\n Sleeping._minBias = 0.9;\r\n\r\n /**\r\n * Puts bodies to sleep or wakes them up depending on their motion.\r\n * @method update\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Sleeping.update = function(bodies, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // update bodies sleeping status\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed;\r\n\r\n // wake up bodies if they have a force applied\r\n if (body.force.x !== 0 || body.force.y !== 0) {\r\n Sleeping.set(body, false);\r\n continue;\r\n }\r\n\r\n var minMotion = Math.min(body.motion, motion),\r\n maxMotion = Math.max(body.motion, motion);\r\n \r\n // biased average motion estimation between frames\r\n body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion;\r\n \r\n if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) {\r\n body.sleepCounter += 1;\r\n \r\n if (body.sleepCounter >= body.sleepThreshold)\r\n Sleeping.set(body, true);\r\n } else if (body.sleepCounter > 0) {\r\n body.sleepCounter -= 1;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Given a set of colliding pairs, wakes the sleeping bodies involved.\r\n * @method afterCollisions\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Sleeping.afterCollisions = function(pairs, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // wake up bodies involved in collisions\r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n // don't wake inactive pairs\r\n if (!pair.isActive)\r\n continue;\r\n\r\n var collision = pair.collision,\r\n bodyA = collision.bodyA.parent, \r\n bodyB = collision.bodyB.parent;\r\n \r\n // don't wake if at least one body is static\r\n if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic)\r\n continue;\r\n \r\n if (bodyA.isSleeping || bodyB.isSleeping) {\r\n var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB,\r\n movingBody = sleepingBody === bodyA ? bodyB : bodyA;\r\n\r\n if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) {\r\n Sleeping.set(sleepingBody, false);\r\n }\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Set a body as sleeping or awake.\r\n * @method set\r\n * @param {body} body\r\n * @param {boolean} isSleeping\r\n */\r\n Sleeping.set = function(body, isSleeping) {\r\n var wasSleeping = body.isSleeping;\r\n\r\n if (isSleeping) {\r\n body.isSleeping = true;\r\n body.sleepCounter = body.sleepThreshold;\r\n\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n\r\n body.anglePrev = body.angle;\r\n body.speed = 0;\r\n body.angularSpeed = 0;\r\n body.motion = 0;\r\n\r\n if (!wasSleeping) {\r\n Events.trigger(body, 'sleepStart');\r\n }\r\n } else {\r\n body.isSleeping = false;\r\n body.sleepCounter = 0;\r\n\r\n if (wasSleeping) {\r\n Events.trigger(body, 'sleepEnd');\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n* with commonly used body configurations (such as rectangles, circles and other polygons).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Bodies\r\n*/\r\n\r\n// TODO: true circle bodies\r\n\r\nvar Bodies = {};\r\n\r\nmodule.exports = Bodies;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar decomp = __webpack_require__(/*! ../../poly-decomp */ \"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new rigid body model with a rectangle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method rectangle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {object} [options]\r\n * @return {body} A new rectangle body\r\n */\r\n Bodies.rectangle = function(x, y, width, height, options) {\r\n options = options || {};\r\n\r\n var rectangle = { \r\n label: 'Rectangle Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, rectangle, options));\r\n };\r\n \r\n /**\r\n * Creates a new rigid body model with a trapezoid hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method trapezoid\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} slope\r\n * @param {object} [options]\r\n * @return {body} A new trapezoid body\r\n */\r\n Bodies.trapezoid = function(x, y, width, height, slope, options) {\r\n options = options || {};\r\n\r\n slope *= 0.5;\r\n var roof = (1 - (slope * 2)) * width;\r\n \r\n var x1 = width * slope,\r\n x2 = x1 + roof,\r\n x3 = x2 + x1,\r\n verticesPath;\r\n\r\n if (slope < 0.5) {\r\n verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n } else {\r\n verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n }\r\n\r\n var trapezoid = { \r\n label: 'Trapezoid Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(verticesPath)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, trapezoid, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a circle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method circle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @param {number} [maxSides]\r\n * @return {body} A new circle body\r\n */\r\n Bodies.circle = function(x, y, radius, options, maxSides) {\r\n options = options || {};\r\n\r\n var circle = {\r\n label: 'Circle Body',\r\n circleRadius: radius\r\n };\r\n \r\n // approximate circles with polygons until true circles implemented in SAT\r\n maxSides = maxSides || 25;\r\n var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius)));\r\n\r\n // optimisation: always use even number of sides (half the number of unique axes)\r\n if (sides % 2 === 1)\r\n sides += 1;\r\n\r\n return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a regular polygon hull with the given number of sides. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method polygon\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} sides\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @return {body} A new regular polygon body\r\n */\r\n Bodies.polygon = function(x, y, sides, radius, options) {\r\n options = options || {};\r\n\r\n if (sides < 3)\r\n return Bodies.circle(x, y, radius, options);\r\n\r\n var theta = 2 * Math.PI / sides,\r\n path = '',\r\n offset = theta * 0.5;\r\n\r\n for (var i = 0; i < sides; i += 1) {\r\n var angle = offset + (i * theta),\r\n xx = Math.cos(angle) * radius,\r\n yy = Math.sin(angle) * radius;\r\n\r\n path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' ';\r\n }\r\n\r\n var polygon = { \r\n label: 'Polygon Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(path)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, polygon, options));\r\n };\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices).\r\n * If the vertices are convex, they will pass through as supplied.\r\n * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available.\r\n * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail).\r\n * By default the decomposition will discard collinear edges (to improve performance).\r\n * It can also optionally discard any parts that have an area less than `minimumArea`.\r\n * If the vertices can not be decomposed, the result will fall back to using the convex hull.\r\n * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method fromVertices\r\n * @param {number} x\r\n * @param {number} y\r\n * @param [[vector]] vertexSets\r\n * @param {object} [options]\r\n * @param {bool} [flagInternal=false]\r\n * @param {number} [removeCollinear=0.01]\r\n * @param {number} [minimumArea=10]\r\n * @return {body}\r\n */\r\n Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) {\r\n var body,\r\n parts,\r\n isConvex,\r\n vertices,\r\n i,\r\n j,\r\n k,\r\n v,\r\n z;\r\n\r\n options = options || {};\r\n parts = [];\r\n\r\n flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;\r\n removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;\r\n minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;\r\n\r\n if (!decomp) {\r\n Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.');\r\n }\r\n\r\n // ensure vertexSets is an array of arrays\r\n if (!Common.isArray(vertexSets[0])) {\r\n vertexSets = [vertexSets];\r\n }\r\n\r\n for (v = 0; v < vertexSets.length; v += 1) {\r\n vertices = vertexSets[v];\r\n isConvex = Vertices.isConvex(vertices);\r\n\r\n if (isConvex || !decomp) {\r\n if (isConvex) {\r\n vertices = Vertices.clockwiseSort(vertices);\r\n } else {\r\n // fallback to convex hull when decomposition is not possible\r\n vertices = Vertices.hull(vertices);\r\n }\r\n\r\n parts.push({\r\n position: { x: x, y: y },\r\n vertices: vertices\r\n });\r\n } else {\r\n // initialise a decomposition\r\n var concave = vertices.map(function(vertex) {\r\n return [vertex.x, vertex.y];\r\n });\r\n\r\n // vertices are concave and simple, we can decompose into parts\r\n decomp.makeCCW(concave);\r\n if (removeCollinear !== false)\r\n decomp.removeCollinearPoints(concave, removeCollinear);\r\n\r\n // use the quick decomposition algorithm (Bayazit)\r\n var decomposed = decomp.quickDecomp(concave);\r\n\r\n // for each decomposed chunk\r\n for (i = 0; i < decomposed.length; i++) {\r\n var chunk = decomposed[i];\r\n\r\n // convert vertices into the correct structure\r\n var chunkVertices = chunk.map(function(vertices) {\r\n return {\r\n x: vertices[0],\r\n y: vertices[1]\r\n };\r\n });\r\n\r\n // skip small chunks\r\n if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea)\r\n continue;\r\n\r\n // create a compound part\r\n parts.push({\r\n position: Vertices.centre(chunkVertices),\r\n vertices: chunkVertices\r\n });\r\n }\r\n }\r\n }\r\n\r\n // create body parts\r\n for (i = 0; i < parts.length; i++) {\r\n parts[i] = Body.create(Common.extend(parts[i], options));\r\n }\r\n\r\n // flag internal edges (coincident part edges)\r\n if (flagInternal) {\r\n var coincident_max_dist = 5;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++) {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++) {\r\n for (z = 0; z < partB.vertices.length; z++) {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincident_max_dist && db < coincident_max_dist) {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (parts.length > 1) {\r\n // create the parent body to be returned, that contains generated compound parts\r\n body = Body.create(Common.extend({ parts: parts.slice(0) }, options));\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n } else {\r\n return parts[0];\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composites` module contains factory methods for creating composite bodies\r\n* with commonly used configurations (such as stacks and chains).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composites\r\n*/\r\n\r\nvar Composites = {};\r\n\r\nmodule.exports = Composites;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ \"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bodies = __webpack_require__(/*! ./Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method stack\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n var stack = Composite.create({ label: 'Stack' }),\r\n x = xx,\r\n y = yy,\r\n lastBody,\r\n i = 0;\r\n\r\n for (var row = 0; row < rows; row++) {\r\n var maxHeight = 0;\r\n \r\n for (var column = 0; column < columns; column++) {\r\n var body = callback(x, y, column, row, lastBody, i);\r\n \r\n if (body) {\r\n var bodyHeight = body.bounds.max.y - body.bounds.min.y,\r\n bodyWidth = body.bounds.max.x - body.bounds.min.x; \r\n\r\n if (bodyHeight > maxHeight)\r\n maxHeight = bodyHeight;\r\n \r\n Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 });\r\n\r\n x = body.bounds.max.x + columnGap;\r\n\r\n Composite.addBody(stack, body);\r\n \r\n lastBody = body;\r\n i += 1;\r\n } else {\r\n x += columnGap;\r\n }\r\n }\r\n \r\n y += maxHeight + rowGap;\r\n x = xx;\r\n }\r\n\r\n return stack;\r\n };\r\n \r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n * @method chain\r\n * @param {composite} composite\r\n * @param {number} xOffsetA\r\n * @param {number} yOffsetA\r\n * @param {number} xOffsetB\r\n * @param {number} yOffsetB\r\n * @param {object} options\r\n * @return {composite} A new composite containing objects chained together with constraints\r\n */\r\n Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) {\r\n var bodies = composite.bodies;\r\n \r\n for (var i = 1; i < bodies.length; i++) {\r\n var bodyA = bodies[i - 1],\r\n bodyB = bodies[i],\r\n bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y,\r\n bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, \r\n bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y,\r\n bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x;\r\n \r\n var defaults = {\r\n bodyA: bodyA,\r\n pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA },\r\n bodyB: bodyB,\r\n pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB }\r\n };\r\n \r\n var constraint = Common.extend(defaults, options);\r\n \r\n Composite.addConstraint(composite, Constraint.create(constraint));\r\n }\r\n\r\n composite.label += ' Chain';\r\n \r\n return composite;\r\n };\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n * @method mesh\r\n * @param {composite} composite\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {boolean} crossBrace\r\n * @param {object} options\r\n * @return {composite} The composite containing objects meshed together with constraints\r\n */\r\n Composites.mesh = function(composite, columns, rows, crossBrace, options) {\r\n var bodies = composite.bodies,\r\n row,\r\n col,\r\n bodyA,\r\n bodyB,\r\n bodyC;\r\n \r\n for (row = 0; row < rows; row++) {\r\n for (col = 1; col < columns; col++) {\r\n bodyA = bodies[(col - 1) + (row * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (row > 0) {\r\n for (col = 0; col < columns; col++) {\r\n bodyA = bodies[col + ((row - 1) * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n\r\n if (crossBrace && col > 0) {\r\n bodyC = bodies[(col - 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (crossBrace && col < columns - 1) {\r\n bodyC = bodies[(col + 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n }\r\n }\r\n }\r\n\r\n composite.label += ' Mesh';\r\n \r\n return composite;\r\n };\r\n \r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method pyramid\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) {\r\n var actualRows = Math.min(rows, Math.ceil(columns / 2)),\r\n lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0;\r\n \r\n if (row > actualRows)\r\n return;\r\n \r\n // reverse row order\r\n row = actualRows - row;\r\n \r\n var start = row,\r\n end = columns - 1 - row;\r\n\r\n if (column < start || column > end)\r\n return;\r\n \r\n // retroactively fix the first body's position, since width was unknown\r\n if (i === 1) {\r\n Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 });\r\n }\r\n\r\n var xOffset = lastBody ? column * lastBodyWidth : 0;\r\n \r\n return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i);\r\n });\r\n };\r\n\r\n /**\r\n * Creates a composite with a Newton's Cradle setup of bodies and constraints.\r\n * @method newtonsCradle\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} number\r\n * @param {number} size\r\n * @param {number} length\r\n * @return {composite} A new composite newtonsCradle body\r\n */\r\n Composites.newtonsCradle = function(xx, yy, number, size, length) {\r\n var newtonsCradle = Composite.create({ label: 'Newtons Cradle' });\r\n\r\n for (var i = 0; i < number; i++) {\r\n var separation = 1.9,\r\n circle = Bodies.circle(xx + i * (size * separation), yy + length, size, \r\n { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }),\r\n constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle });\r\n\r\n Composite.addBody(newtonsCradle, circle);\r\n Composite.addConstraint(newtonsCradle, constraint);\r\n }\r\n\r\n return newtonsCradle;\r\n };\r\n \r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n * @method car\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} wheelSize\r\n * @return {composite} A new composite car body\r\n */\r\n Composites.car = function(xx, yy, width, height, wheelSize) {\r\n var group = Body.nextGroup(true),\r\n wheelBase = 20,\r\n wheelAOffset = -width * 0.5 + wheelBase,\r\n wheelBOffset = width * 0.5 - wheelBase,\r\n wheelYOffset = 0;\r\n \r\n var car = Composite.create({ label: 'Car' }),\r\n body = Bodies.rectangle(xx, yy, width, height, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n chamfer: {\r\n radius: height * 0.5\r\n },\r\n density: 0.0002\r\n });\r\n \r\n var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var axelA = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelAOffset, y: wheelYOffset },\r\n bodyA: wheelA,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n var axelB = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelBOffset, y: wheelYOffset },\r\n bodyA: wheelB,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n Composite.addBody(car, body);\r\n Composite.addBody(car, wheelA);\r\n Composite.addBody(car, wheelB);\r\n Composite.addConstraint(car, axelA);\r\n Composite.addConstraint(car, axelB);\r\n\r\n return car;\r\n };\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n * @method softBody\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {boolean} crossBrace\r\n * @param {number} particleRadius\r\n * @param {} particleOptions\r\n * @param {} constraintOptions\r\n * @return {composite} A new composite softBody\r\n */\r\n Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) {\r\n particleOptions = Common.extend({ inertia: Infinity }, particleOptions);\r\n constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions);\r\n\r\n var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) {\r\n return Bodies.circle(x, y, particleRadius, particleOptions);\r\n });\r\n\r\n Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions);\r\n\r\n softBody.label = 'Soft Body';\r\n\r\n return softBody;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Axes` module contains methods for creating and manipulating sets of axes.\r\n*\r\n* @class Axes\r\n*/\r\n\r\nvar Axes = {};\r\n\r\nmodule.exports = Axes;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of axes from the given vertices.\r\n * @method fromVertices\r\n * @param {vertices} vertices\r\n * @return {axes} A new axes from the given vertices\r\n */\r\n Axes.fromVertices = function(vertices) {\r\n var axes = {};\r\n\r\n // find the unique axes, using edge normal gradients\r\n for (var i = 0; i < vertices.length; i++) {\r\n var j = (i + 1) % vertices.length, \r\n normal = Vector.normalise({ \r\n x: vertices[j].y - vertices[i].y, \r\n y: vertices[i].x - vertices[j].x\r\n }),\r\n gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y);\r\n \r\n // limit precision\r\n gradient = gradient.toFixed(3).toString();\r\n axes[gradient] = normal;\r\n }\r\n\r\n return Common.values(axes);\r\n };\r\n\r\n /**\r\n * Rotates a set of axes by the given angle.\r\n * @method rotate\r\n * @param {axes} axes\r\n * @param {number} angle\r\n */\r\n Axes.rotate = function(axes, angle) {\r\n if (angle === 0)\r\n return;\r\n \r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n var axis = axes[i],\r\n xx;\r\n xx = axis.x * cos - axis.y * sin;\r\n axis.y = axis.x * sin + axis.y * cos;\r\n axis.x = xx;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js?')},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js":function(module,exports){eval("/**\r\n* The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).\r\n*\r\n* @class Bounds\r\n*/\r\n\r\nvar Bounds = {};\r\n\r\nmodule.exports = Bounds;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new axis-aligned bounding box (AABB) for the given vertices.\r\n * @method create\r\n * @param {vertices} vertices\r\n * @return {bounds} A new bounds object\r\n */\r\n Bounds.create = function(vertices) {\r\n var bounds = { \r\n min: { x: 0, y: 0 }, \r\n max: { x: 0, y: 0 }\r\n };\r\n\r\n if (vertices)\r\n Bounds.update(bounds, vertices);\r\n \r\n return bounds;\r\n };\r\n\r\n /**\r\n * Updates bounds using the given vertices and extends the bounds given a velocity.\r\n * @method update\r\n * @param {bounds} bounds\r\n * @param {vertices} vertices\r\n * @param {vector} velocity\r\n */\r\n Bounds.update = function(bounds, vertices, velocity) {\r\n bounds.min.x = Infinity;\r\n bounds.max.x = -Infinity;\r\n bounds.min.y = Infinity;\r\n bounds.max.y = -Infinity;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertex = vertices[i];\r\n if (vertex.x > bounds.max.x) bounds.max.x = vertex.x;\r\n if (vertex.x < bounds.min.x) bounds.min.x = vertex.x;\r\n if (vertex.y > bounds.max.y) bounds.max.y = vertex.y;\r\n if (vertex.y < bounds.min.y) bounds.min.y = vertex.y;\r\n }\r\n \r\n if (velocity) {\r\n if (velocity.x > 0) {\r\n bounds.max.x += velocity.x;\r\n } else {\r\n bounds.min.x += velocity.x;\r\n }\r\n \r\n if (velocity.y > 0) {\r\n bounds.max.y += velocity.y;\r\n } else {\r\n bounds.min.y += velocity.y;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Returns true if the bounds contains the given point.\r\n * @method contains\r\n * @param {bounds} bounds\r\n * @param {vector} point\r\n * @return {boolean} True if the bounds contain the point, otherwise false\r\n */\r\n Bounds.contains = function(bounds, point) {\r\n return point.x >= bounds.min.x && point.x <= bounds.max.x \r\n && point.y >= bounds.min.y && point.y <= bounds.max.y;\r\n };\r\n\r\n /**\r\n * Returns true if the two bounds intersect.\r\n * @method overlaps\r\n * @param {bounds} boundsA\r\n * @param {bounds} boundsB\r\n * @return {boolean} True if the bounds overlap, otherwise false\r\n */\r\n Bounds.overlaps = function(boundsA, boundsB) {\r\n return (boundsA.min.x <= boundsB.max.x && boundsA.max.x >= boundsB.min.x\r\n && boundsA.max.y >= boundsB.min.y && boundsA.min.y <= boundsB.max.y);\r\n };\r\n\r\n /**\r\n * Translates the bounds by the given vector.\r\n * @method translate\r\n * @param {bounds} bounds\r\n * @param {vector} vector\r\n */\r\n Bounds.translate = function(bounds, vector) {\r\n bounds.min.x += vector.x;\r\n bounds.max.x += vector.x;\r\n bounds.min.y += vector.y;\r\n bounds.max.y += vector.y;\r\n };\r\n\r\n /**\r\n * Shifts the bounds to the given position.\r\n * @method shift\r\n * @param {bounds} bounds\r\n * @param {vector} position\r\n */\r\n Bounds.shift = function(bounds, position) {\r\n var deltaX = bounds.max.x - bounds.min.x,\r\n deltaY = bounds.max.y - bounds.min.y;\r\n \r\n bounds.min.x = position.x;\r\n bounds.max.x = position.x + deltaX;\r\n bounds.min.y = position.y;\r\n bounds.max.y = position.y + deltaY;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.\r\n*\r\n* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Svg\r\n*/\r\n\r\nvar Svg = {};\r\n\r\nmodule.exports = Svg;\r\n\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Converts an SVG path into an array of vector points.\r\n * If the input path forms a concave shape, you must decompose the result into convex parts before use.\r\n * See `Bodies.fromVertices` which provides support for this.\r\n * Note that this function is not guaranteed to support complex paths (such as those with holes).\r\n * You must load the `pathseg.js` polyfill on newer browsers.\r\n * @method pathToVertices\r\n * @param {SVGPathElement} path\r\n * @param {Number} [sampleLength=15]\r\n * @return {Vector[]} points\r\n */\r\n Svg.pathToVertices = function(path, sampleLength) {\r\n if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) {\r\n Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.');\r\n }\r\n\r\n // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js\r\n var i, il, total, point, segment, segments, \r\n segmentsQueue, lastSegment, \r\n lastPoint, segmentIndex, points = [],\r\n lx, ly, length = 0, x = 0, y = 0;\r\n\r\n sampleLength = sampleLength || 15;\r\n\r\n var addPoint = function(px, py, pathSegType) {\r\n // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1)\r\n var isRelative = pathSegType % 2 === 1 && pathSegType > 1;\r\n\r\n // when the last point doesn't equal the current point add the current point\r\n if (!lastPoint || px != lastPoint.x || py != lastPoint.y) {\r\n if (lastPoint && isRelative) {\r\n lx = lastPoint.x;\r\n ly = lastPoint.y;\r\n } else {\r\n lx = 0;\r\n ly = 0;\r\n }\r\n\r\n var point = {\r\n x: lx + px,\r\n y: ly + py\r\n };\r\n\r\n // set last point\r\n if (isRelative || !lastPoint) {\r\n lastPoint = point;\r\n }\r\n\r\n points.push(point);\r\n\r\n x = lx + px;\r\n y = ly + py;\r\n }\r\n };\r\n\r\n var addSegmentPoint = function(segment) {\r\n var segType = segment.pathSegTypeAsLetter.toUpperCase();\r\n\r\n // skip path ends\r\n if (segType === 'Z') \r\n return;\r\n\r\n // map segment to x and y\r\n switch (segType) {\r\n\r\n case 'M':\r\n case 'L':\r\n case 'T':\r\n case 'C':\r\n case 'S':\r\n case 'Q':\r\n x = segment.x;\r\n y = segment.y;\r\n break;\r\n case 'H':\r\n x = segment.x;\r\n break;\r\n case 'V':\r\n y = segment.y;\r\n break;\r\n }\r\n\r\n addPoint(x, y, segment.pathSegType);\r\n };\r\n\r\n // ensure path is absolute\r\n Svg._svgPathToAbsolute(path);\r\n\r\n // get total length\r\n total = path.getTotalLength();\r\n\r\n // queue segments\r\n segments = [];\r\n for (i = 0; i < path.pathSegList.numberOfItems; i += 1)\r\n segments.push(path.pathSegList.getItem(i));\r\n\r\n segmentsQueue = segments.concat();\r\n\r\n // sample through path\r\n while (length < total) {\r\n // get segment at position\r\n segmentIndex = path.getPathSegAtLength(length);\r\n segment = segments[segmentIndex];\r\n\r\n // new segment\r\n if (segment != lastSegment) {\r\n while (segmentsQueue.length && segmentsQueue[0] != segment)\r\n addSegmentPoint(segmentsQueue.shift());\r\n\r\n lastSegment = segment;\r\n }\r\n\r\n // add points in between when curving\r\n // TODO: adaptive sampling\r\n switch (segment.pathSegTypeAsLetter.toUpperCase()) {\r\n\r\n case 'C':\r\n case 'T':\r\n case 'S':\r\n case 'Q':\r\n case 'A':\r\n point = path.getPointAtLength(length);\r\n addPoint(point.x, point.y, 0);\r\n break;\r\n\r\n }\r\n\r\n // increment by sample value\r\n length += sampleLength;\r\n }\r\n\r\n // add remaining segments not passed by sampling\r\n for (i = 0, il = segmentsQueue.length; i < il; ++i)\r\n addSegmentPoint(segmentsQueue[i]);\r\n\r\n return points;\r\n };\r\n\r\n Svg._svgPathToAbsolute = function(path) {\r\n // http://phrogz.net/convert-svg-path-to-all-absolute-commands\r\n // Copyright (c) Gavin Kistner\r\n // http://phrogz.net/js/_ReuseLicense.txt\r\n // Modifications: tidy formatting and naming\r\n var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,\r\n x = 0, y = 0, len = segs.numberOfItems;\r\n\r\n for (var i = 0; i < len; ++i) {\r\n var seg = segs.getItem(i),\r\n segType = seg.pathSegTypeAsLetter;\r\n\r\n if (/[MLHVCSQTA]/.test(segType)) {\r\n if ('x' in seg) x = seg.x;\r\n if ('y' in seg) y = seg.y;\r\n } else {\r\n if ('x1' in seg) x1 = x + seg.x1;\r\n if ('x2' in seg) x2 = x + seg.x2;\r\n if ('y1' in seg) y1 = y + seg.y1;\r\n if ('y2' in seg) y2 = y + seg.y2;\r\n if ('x' in seg) x += seg.x;\r\n if ('y' in seg) y += seg.y;\r\n\r\n switch (segType) {\r\n\r\n case 'm':\r\n segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i);\r\n break;\r\n case 'l':\r\n segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i);\r\n break;\r\n case 'h':\r\n segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i);\r\n break;\r\n case 'v':\r\n segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i);\r\n break;\r\n case 'c':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i);\r\n break;\r\n case 's':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i);\r\n break;\r\n case 'q':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i);\r\n break;\r\n case 't':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i);\r\n break;\r\n case 'a':\r\n segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i);\r\n break;\r\n case 'z':\r\n case 'Z':\r\n x = x0;\r\n y = y0;\r\n break;\r\n\r\n }\r\n }\r\n\r\n if (segType == 'M' || segType == 'm') {\r\n x0 = x;\r\n y0 = y;\r\n }\r\n }\r\n };\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js":function(module,exports){eval("/**\r\n* The `Matter.Vector` module contains methods for creating and manipulating vectors.\r\n* Vectors are the basis of all the geometry related operations in the engine.\r\n* A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vector\r\n*/\r\n\r\n// TODO: consider params for reusing vector objects\r\n\r\nvar Vector = {};\r\n\r\nmodule.exports = Vector;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new vector.\r\n * @method create\r\n * @param {number} x\r\n * @param {number} y\r\n * @return {vector} A new vector\r\n */\r\n Vector.create = function(x, y) {\r\n return { x: x || 0, y: y || 0 };\r\n };\r\n\r\n /**\r\n * Returns a new vector with `x` and `y` copied from the given `vector`.\r\n * @method clone\r\n * @param {vector} vector\r\n * @return {vector} A new cloned vector\r\n */\r\n Vector.clone = function(vector) {\r\n return { x: vector.x, y: vector.y };\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector.\r\n * @method magnitude\r\n * @param {vector} vector\r\n * @return {number} The magnitude of the vector\r\n */\r\n Vector.magnitude = function(vector) {\r\n return Math.sqrt((vector.x * vector.x) + (vector.y * vector.y));\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation).\r\n * @method magnitudeSquared\r\n * @param {vector} vector\r\n * @return {number} The squared magnitude of the vector\r\n */\r\n Vector.magnitudeSquared = function(vector) {\r\n return (vector.x * vector.x) + (vector.y * vector.y);\r\n };\r\n\r\n /**\r\n * Rotates the vector about (0, 0) by specified angle.\r\n * @method rotate\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} [output]\r\n * @return {vector} The vector rotated about (0, 0)\r\n */\r\n Vector.rotate = function(vector, angle, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = vector.x * cos - vector.y * sin;\r\n output.y = vector.x * sin + vector.y * cos;\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Rotates the vector about a specified point by specified angle.\r\n * @method rotateAbout\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} point\r\n * @param {vector} [output]\r\n * @return {vector} A new vector rotated about the point\r\n */\r\n Vector.rotateAbout = function(vector, angle, point, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = point.x + ((vector.x - point.x) * cos - (vector.y - point.y) * sin);\r\n output.y = point.y + ((vector.x - point.x) * sin + (vector.y - point.y) * cos);\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Normalises a vector (such that its magnitude is `1`).\r\n * @method normalise\r\n * @param {vector} vector\r\n * @return {vector} A new vector normalised\r\n */\r\n Vector.normalise = function(vector) {\r\n var magnitude = Vector.magnitude(vector);\r\n if (magnitude === 0)\r\n return { x: 0, y: 0 };\r\n return { x: vector.x / magnitude, y: vector.y / magnitude };\r\n };\r\n\r\n /**\r\n * Returns the dot-product of two vectors.\r\n * @method dot\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The dot product of the two vectors\r\n */\r\n Vector.dot = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.x) + (vectorA.y * vectorB.y);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of two vectors.\r\n * @method cross\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The cross product of the two vectors\r\n */\r\n Vector.cross = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.y) - (vectorA.y * vectorB.x);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of three vectors.\r\n * @method cross3\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} vectorC\r\n * @return {number} The cross product of the three vectors\r\n */\r\n Vector.cross3 = function(vectorA, vectorB, vectorC) {\r\n return (vectorB.x - vectorA.x) * (vectorC.y - vectorA.y) - (vectorB.y - vectorA.y) * (vectorC.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Adds the two vectors.\r\n * @method add\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB added\r\n */\r\n Vector.add = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x + vectorB.x;\r\n output.y = vectorA.y + vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Subtracts the two vectors.\r\n * @method sub\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB subtracted\r\n */\r\n Vector.sub = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x - vectorB.x;\r\n output.y = vectorA.y - vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Multiplies a vector and a scalar.\r\n * @method mult\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector multiplied by scalar\r\n */\r\n Vector.mult = function(vector, scalar) {\r\n return { x: vector.x * scalar, y: vector.y * scalar };\r\n };\r\n\r\n /**\r\n * Divides a vector and a scalar.\r\n * @method div\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector divided by scalar\r\n */\r\n Vector.div = function(vector, scalar) {\r\n return { x: vector.x / scalar, y: vector.y / scalar };\r\n };\r\n\r\n /**\r\n * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction.\r\n * @method perp\r\n * @param {vector} vector\r\n * @param {bool} [negate=false]\r\n * @return {vector} The perpendicular vector\r\n */\r\n Vector.perp = function(vector, negate) {\r\n negate = negate === true ? -1 : 1;\r\n return { x: negate * -vector.y, y: negate * vector.x };\r\n };\r\n\r\n /**\r\n * Negates both components of a vector such that it points in the opposite direction.\r\n * @method neg\r\n * @param {vector} vector\r\n * @return {vector} The negated vector\r\n */\r\n Vector.neg = function(vector) {\r\n return { x: -vector.x, y: -vector.y };\r\n };\r\n\r\n /**\r\n * Returns the angle between the vector `vectorB - vectorA` and the x-axis in radians.\r\n * @method angle\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The angle in radians\r\n */\r\n Vector.angle = function(vectorA, vectorB) {\r\n return Math.atan2(vectorB.y - vectorA.y, vectorB.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Temporary vector pool (not thread-safe).\r\n * @property _temp\r\n * @type {vector[]}\r\n * @private\r\n */\r\n Vector._temp = [\r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create()\r\n ];\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n* A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n* A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vertices\r\n*/\r\n\r\nvar Vertices = {};\r\n\r\nmodule.exports = Vertices;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of `Matter.Body` compatible vertices.\r\n * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example:\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects,\r\n * but with some additional references required for efficient collision detection routines.\r\n *\r\n * Vertices must be specified in clockwise order.\r\n *\r\n * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided.\r\n *\r\n * @method create\r\n * @param {vector[]} points\r\n * @param {body} body\r\n */\r\n Vertices.create = function(points, body) {\r\n var vertices = [];\r\n\r\n for (var i = 0; i < points.length; i++) {\r\n var point = points[i],\r\n vertex = {\r\n x: point.x,\r\n y: point.y,\r\n index: i,\r\n body: body,\r\n isInternal: false,\r\n contact: null\r\n };\r\n\r\n vertex.contact = {\r\n vertex: vertex,\r\n normalImpulse: 0,\r\n tangentImpulse: 0\r\n };\r\n\r\n vertices.push(vertex);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), \r\n * into a `Matter.Vertices` object for the given `Matter.Body`.\r\n * For parsing SVG paths, see `Svg.pathToVertices`.\r\n * @method fromPath\r\n * @param {string} path\r\n * @param {body} body\r\n * @return {vertices} vertices\r\n */\r\n Vertices.fromPath = function(path, body) {\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig,\r\n points = [];\r\n\r\n path.replace(pathPattern, function(match, x, y) {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return Vertices.create(points, body);\r\n };\r\n\r\n /**\r\n * Returns the centre (centroid) of the set of vertices.\r\n * @method centre\r\n * @param {vertices} vertices\r\n * @return {vector} The centre point\r\n */\r\n Vertices.centre = function(vertices) {\r\n var area = Vertices.area(vertices, true),\r\n centre = { x: 0, y: 0 },\r\n cross,\r\n temp,\r\n j;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n j = (i + 1) % vertices.length;\r\n cross = Vector.cross(vertices[i], vertices[j]);\r\n temp = Vector.mult(Vector.add(vertices[i], vertices[j]), cross);\r\n centre = Vector.add(centre, temp);\r\n }\r\n\r\n return Vector.div(centre, 6 * area);\r\n };\r\n\r\n /**\r\n * Returns the average (mean) of the set of vertices.\r\n * @method mean\r\n * @param {vertices} vertices\r\n * @return {vector} The average point\r\n */\r\n Vertices.mean = function(vertices) {\r\n var average = { x: 0, y: 0 };\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n average.x += vertices[i].x;\r\n average.y += vertices[i].y;\r\n }\r\n\r\n return Vector.div(average, vertices.length);\r\n };\r\n\r\n /**\r\n * Returns the area of the set of vertices.\r\n * @method area\r\n * @param {vertices} vertices\r\n * @param {bool} signed\r\n * @return {number} The area\r\n */\r\n Vertices.area = function(vertices, signed) {\r\n var area = 0,\r\n j = vertices.length - 1;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n area += (vertices[j].x - vertices[i].x) * (vertices[j].y + vertices[i].y);\r\n j = i;\r\n }\r\n\r\n if (signed)\r\n return area / 2;\r\n\r\n return Math.abs(area) / 2;\r\n };\r\n\r\n /**\r\n * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass.\r\n * @method inertia\r\n * @param {vertices} vertices\r\n * @param {number} mass\r\n * @return {number} The polygon's moment of inertia\r\n */\r\n Vertices.inertia = function(vertices, mass) {\r\n var numerator = 0,\r\n denominator = 0,\r\n v = vertices,\r\n cross,\r\n j;\r\n\r\n // find the polygon's moment of inertia, using second moment of area\r\n // from equations at http://www.physicsforums.com/showthread.php?t=25293\r\n for (var n = 0; n < v.length; n++) {\r\n j = (n + 1) % v.length;\r\n cross = Math.abs(Vector.cross(v[j], v[n]));\r\n numerator += cross * (Vector.dot(v[j], v[j]) + Vector.dot(v[j], v[n]) + Vector.dot(v[n], v[n]));\r\n denominator += cross;\r\n }\r\n\r\n return (mass / 6) * (numerator / denominator);\r\n };\r\n\r\n /**\r\n * Translates the set of vertices in-place.\r\n * @method translate\r\n * @param {vertices} vertices\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n */\r\n Vertices.translate = function(vertices, vector, scalar) {\r\n var i;\r\n if (scalar) {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x * scalar;\r\n vertices[i].y += vector.y * scalar;\r\n }\r\n } else {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x;\r\n vertices[i].y += vector.y;\r\n }\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Rotates the set of vertices in-place.\r\n * @method rotate\r\n * @param {vertices} vertices\r\n * @param {number} angle\r\n * @param {vector} point\r\n */\r\n Vertices.rotate = function(vertices, angle, point) {\r\n if (angle === 0)\r\n return;\r\n\r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n dx = vertice.x - point.x,\r\n dy = vertice.y - point.y;\r\n \r\n vertice.x = point.x + (dx * cos - dy * sin);\r\n vertice.y = point.y + (dx * sin + dy * cos);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns `true` if the `point` is inside the set of `vertices`.\r\n * @method contains\r\n * @param {vertices} vertices\r\n * @param {vector} point\r\n * @return {boolean} True if the vertices contains point, otherwise false\r\n */\r\n Vertices.contains = function(vertices, point) {\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n nextVertice = vertices[(i + 1) % vertices.length];\r\n if ((point.x - vertice.x) * (nextVertice.y - vertice.y) + (point.y - vertice.y) * (vertice.x - nextVertice.x) > 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Scales the vertices from a point (default is centre) in-place.\r\n * @method scale\r\n * @param {vertices} vertices\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n */\r\n Vertices.scale = function(vertices, scaleX, scaleY, point) {\r\n if (scaleX === 1 && scaleY === 1)\r\n return vertices;\r\n\r\n point = point || Vertices.centre(vertices);\r\n\r\n var vertex,\r\n delta;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n delta = Vector.sub(vertex, point);\r\n vertices[i].x = point.x + delta.x * scaleX;\r\n vertices[i].y = point.y + delta.y * scaleY;\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices.\r\n * The radius parameter is a single number or an array to specify the radius for each vertex.\r\n * @method chamfer\r\n * @param {vertices} vertices\r\n * @param {number[]} radius\r\n * @param {number} quality\r\n * @param {number} qualityMin\r\n * @param {number} qualityMax\r\n */\r\n Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {\r\n if (typeof radius === 'number') {\r\n radius = [radius];\r\n } else {\r\n radius = radius || [8];\r\n }\r\n\r\n // quality defaults to -1, which is auto\r\n quality = (typeof quality !== 'undefined') ? quality : -1;\r\n qualityMin = qualityMin || 2;\r\n qualityMax = qualityMax || 14;\r\n\r\n var newVertices = [];\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var prevVertex = vertices[i - 1 >= 0 ? i - 1 : vertices.length - 1],\r\n vertex = vertices[i],\r\n nextVertex = vertices[(i + 1) % vertices.length],\r\n currentRadius = radius[i < radius.length ? i : radius.length - 1];\r\n\r\n if (currentRadius === 0) {\r\n newVertices.push(vertex);\r\n continue;\r\n }\r\n\r\n var prevNormal = Vector.normalise({ \r\n x: vertex.y - prevVertex.y, \r\n y: prevVertex.x - vertex.x\r\n });\r\n\r\n var nextNormal = Vector.normalise({ \r\n x: nextVertex.y - vertex.y, \r\n y: vertex.x - nextVertex.x\r\n });\r\n\r\n var diagonalRadius = Math.sqrt(2 * Math.pow(currentRadius, 2)),\r\n radiusVector = Vector.mult(Common.clone(prevNormal), currentRadius),\r\n midNormal = Vector.normalise(Vector.mult(Vector.add(prevNormal, nextNormal), 0.5)),\r\n scaledVertex = Vector.sub(vertex, Vector.mult(midNormal, diagonalRadius));\r\n\r\n var precision = quality;\r\n\r\n if (quality === -1) {\r\n // automatically decide precision\r\n precision = Math.pow(currentRadius, 0.32) * 1.75;\r\n }\r\n\r\n precision = Common.clamp(precision, qualityMin, qualityMax);\r\n\r\n // use an even value for precision, more likely to reduce axes by using symmetry\r\n if (precision % 2 === 1)\r\n precision += 1;\r\n\r\n var alpha = Math.acos(Vector.dot(prevNormal, nextNormal)),\r\n theta = alpha / precision;\r\n\r\n for (var j = 0; j < precision; j++) {\r\n newVertices.push(Vector.add(Vector.rotate(radiusVector, theta * j), scaledVertex));\r\n }\r\n }\r\n\r\n return newVertices;\r\n };\r\n\r\n /**\r\n * Sorts the input vertices into clockwise order in place.\r\n * @method clockwiseSort\r\n * @param {vertices} vertices\r\n * @return {vertices} vertices\r\n */\r\n Vertices.clockwiseSort = function(vertices) {\r\n var centre = Vertices.mean(vertices);\r\n\r\n vertices.sort(function(vertexA, vertexB) {\r\n return Vector.angle(centre, vertexA) - Vector.angle(centre, vertexB);\r\n });\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns true if the vertices form a convex shape (vertices must be in clockwise order).\r\n * @method isConvex\r\n * @param {vertices} vertices\r\n * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable).\r\n */\r\n Vertices.isConvex = function(vertices) {\r\n // http://paulbourke.net/geometry/polygonmesh/\r\n // Copyright (c) Paul Bourke (use permitted)\r\n\r\n var flag = 0,\r\n n = vertices.length,\r\n i,\r\n j,\r\n k,\r\n z;\r\n\r\n if (n < 3)\r\n return null;\r\n\r\n for (i = 0; i < n; i++) {\r\n j = (i + 1) % n;\r\n k = (i + 2) % n;\r\n z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y);\r\n z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x);\r\n\r\n if (z < 0) {\r\n flag |= 1;\r\n } else if (z > 0) {\r\n flag |= 2;\r\n }\r\n\r\n if (flag === 3) {\r\n return false;\r\n }\r\n }\r\n\r\n if (flag !== 0){\r\n return true;\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n /**\r\n * Returns the convex hull of the input vertices as a new array of points.\r\n * @method hull\r\n * @param {vertices} vertices\r\n * @return [vertex] vertices\r\n */\r\n Vertices.hull = function(vertices) {\r\n // http://geomalgorithms.com/a10-_hull-1.html\r\n\r\n var upper = [],\r\n lower = [], \r\n vertex,\r\n i;\r\n\r\n // sort vertices on x-axis (y-axis for ties)\r\n vertices = vertices.slice(0);\r\n vertices.sort(function(vertexA, vertexB) {\r\n var dx = vertexA.x - vertexB.x;\r\n return dx !== 0 ? dx : vertexA.y - vertexB.y;\r\n });\r\n\r\n // build lower hull\r\n for (i = 0; i < vertices.length; i += 1) {\r\n vertex = vertices[i];\r\n\r\n while (lower.length >= 2 \r\n && Vector.cross3(lower[lower.length - 2], lower[lower.length - 1], vertex) <= 0) {\r\n lower.pop();\r\n }\r\n\r\n lower.push(vertex);\r\n }\r\n\r\n // build upper hull\r\n for (i = vertices.length - 1; i >= 0; i -= 1) {\r\n vertex = vertices[i];\r\n\r\n while (upper.length >= 2 \r\n && Vector.cross3(upper[upper.length - 2], upper[upper.length - 1], vertex) <= 0) {\r\n upper.pop();\r\n }\r\n\r\n upper.push(vertex);\r\n }\r\n\r\n // concatenation of the lower and upper hulls gives the convex hull\r\n // omit last points because they are repeated at the beginning of the other list\r\n upper.pop();\r\n lower.pop();\r\n\r\n return upper.concat(lower);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * An attractors plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterAttractors\r\n */\r\nvar MatterAttractors = {\r\n // plugin meta\r\n name: 'matter-attractors', // PLUGIN_NAME\r\n version: '0.1.7', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Body.create', function() {\r\n MatterAttractors.Body.init(this);\r\n });\r\n\r\n base.before('Engine.update', function(engine) {\r\n MatterAttractors.Engine.update(engine);\r\n });\r\n },\r\n\r\n Body: {\r\n /**\r\n * Initialises the `body` to support attractors.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Body.init\r\n * @param {Matter.Body} body The body to init.\r\n * @returns {void} No return value.\r\n */\r\n init: function(body) {\r\n body.plugin.attractors = body.plugin.attractors || [];\r\n }\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Applies all attractors for all bodies in the `engine`.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var bodyA = bodies[i],\r\n attractors = bodyA.plugin.attractors;\r\n\r\n if (attractors && attractors.length > 0) {\r\n for (var j = i + 1; j < bodies.length; j += 1) {\r\n var bodyB = bodies[j];\r\n\r\n for (var k = 0; k < attractors.length; k += 1) {\r\n var attractor = attractors[k],\r\n forceVector = attractor;\r\n\r\n if (Matter.Common.isFunction(attractor)) {\r\n forceVector = attractor(bodyA, bodyB);\r\n }\r\n\r\n if (forceVector) {\r\n Matter.Body.applyForce(bodyB, bodyB.position, forceVector);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Defines some useful common attractor functions that can be used\r\n * by pushing them to your body's `body.plugin.attractors` array.\r\n * @namespace MatterAttractors.Attractors\r\n * @property {number} gravityConstant The gravitational constant used by the gravity attractor.\r\n */\r\n Attractors: {\r\n gravityConstant: 0.001,\r\n\r\n /**\r\n * An attractor function that applies Newton's law of gravitation.\r\n * Use this by pushing `MatterAttractors.Attractors.gravity` to your body's `body.plugin.attractors` array.\r\n * The gravitational constant defaults to `0.001` which you can change\r\n * at `MatterAttractors.Attractors.gravityConstant`.\r\n * @function MatterAttractors.Attractors.gravity\r\n * @param {Matter.Body} bodyA The first body.\r\n * @param {Matter.Body} bodyB The second body.\r\n * @returns {void} No return value.\r\n */\r\n gravity: function(bodyA, bodyB) {\r\n // use Newton's law of gravitation\r\n var bToA = Matter.Vector.sub(bodyB.position, bodyA.position),\r\n distanceSq = Matter.Vector.magnitudeSquared(bToA) || 0.0001,\r\n normal = Matter.Vector.normalise(bToA),\r\n magnitude = -MatterAttractors.Attractors.gravityConstant * (bodyA.mass * bodyB.mass / distanceSq),\r\n force = Matter.Vector.mult(normal, magnitude);\r\n\r\n // to apply forces to both bodies\r\n Matter.Body.applyForce(bodyA, bodyA.position, Matter.Vector.neg(force));\r\n Matter.Body.applyForce(bodyB, bodyB.position, force);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterAttractors;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.attractors` to instances of `Matter.Body`.\r\n * This is an array of callback functions that will be called automatically\r\n * for every pair of bodies, on every engine update.\r\n * @property {Function[]} body.plugin.attractors\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * An attractor function calculates the force to be applied\r\n * to `bodyB`, it should either:\r\n * - return the force vector to be applied to `bodyB`\r\n * - or apply the force to the body(s) itself\r\n * @callback AttractorFunction\r\n * @param {Matter.Body} bodyA\r\n * @param {Matter.Body} bodyB\r\n * @returns {(Vector|undefined)} a force vector (optional)\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * A coordinate wrapping plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterWrap\r\n */\r\nvar MatterWrap = {\r\n // plugin meta\r\n name: 'matter-wrap', // PLUGIN_NAME\r\n version: '0.1.4', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Engine.update', function() {\r\n MatterWrap.Engine.update(this);\r\n });\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Updates the engine by wrapping bodies and composites inside `engine.world`.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world),\r\n composites = Matter.Composite.allComposites(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n\r\n if (body.plugin.wrap) {\r\n MatterWrap.Body.wrap(body, body.plugin.wrap);\r\n }\r\n }\r\n\r\n for (i = 0; i < composites.length; i += 1) {\r\n var composite = composites[i];\r\n\r\n if (composite.plugin.wrap) {\r\n MatterWrap.Composite.wrap(composite, composite.plugin.wrap);\r\n }\r\n }\r\n }\r\n },\r\n\r\n Bounds: {\r\n /**\r\n * Returns a translation vector that wraps the `objectBounds` inside the `bounds`.\r\n * @function MatterWrap.Bounds.wrap\r\n * @param {Matter.Bounds} objectBounds The bounds of the object to wrap inside the bounds.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} A translation vector (only if wrapping is required).\r\n */\r\n wrap: function(objectBounds, bounds) {\r\n var x = null,\r\n y = null;\r\n\r\n if (typeof bounds.min.x !== 'undefined' && typeof bounds.max.x !== 'undefined') {\r\n if (objectBounds.min.x > bounds.max.x) {\r\n x = bounds.min.x - objectBounds.max.x;\r\n } else if (objectBounds.max.x < bounds.min.x) {\r\n x = bounds.max.x - objectBounds.min.x;\r\n }\r\n }\r\n\r\n if (typeof bounds.min.y !== 'undefined' && typeof bounds.max.y !== 'undefined') {\r\n if (objectBounds.min.y > bounds.max.y) {\r\n y = bounds.min.y - objectBounds.max.y;\r\n } else if (objectBounds.max.y < bounds.min.y) {\r\n y = bounds.max.y - objectBounds.min.y;\r\n }\r\n }\r\n\r\n if (x !== null || y !== null) {\r\n return {\r\n x: x || 0,\r\n y: y || 0\r\n };\r\n }\r\n }\r\n },\r\n\r\n Body: {\r\n /**\r\n * Wraps the `body` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the body will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Body.wrap\r\n * @param {Matter.Body} body The body to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(body, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(body.bounds, bounds);\r\n\r\n if (translation) {\r\n Matter.Body.translate(body, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n },\r\n\r\n Composite: {\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies\r\n * (not accounting for constraints).\r\n * @function MatterWrap.Composite.bounds\r\n * @param {Matter.Composite} composite The composite.\r\n * @returns {Matter.Bounds} The composite bounds.\r\n */\r\n bounds: function(composite) {\r\n var bodies = Matter.Composite.allBodies(composite),\r\n vertices = [];\r\n \r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Matter.Bounds.create(vertices);\r\n },\r\n\r\n /**\r\n * Wraps the `composite` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the composite will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Composite.wrap\r\n * @param {Matter.Composite} composite The composite to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the composite inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(composite, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(\r\n MatterWrap.Composite.bounds(composite), \r\n bounds\r\n );\r\n\r\n if (translation) {\r\n Matter.Composite.translate(composite, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterWrap;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.wrap` to instances of `Matter.Body`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} body.plugin.wrap\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `composite.plugin.wrap` to instances of `Matter.Composite`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} composite.plugin.wrap\r\n * @memberof Matter.Composite\r\n */\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js?")},"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js":function(module,exports){eval('/**\r\n * @author Stefan Hedman (http://steffe.se)\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// v0.3.0\r\n\r\nmodule.exports = {\r\n decomp: polygonDecomp,\r\n quickDecomp: polygonQuickDecomp,\r\n isSimple: polygonIsSimple,\r\n removeCollinearPoints: polygonRemoveCollinearPoints,\r\n removeDuplicatePoints: polygonRemoveDuplicatePoints,\r\n makeCCW: polygonMakeCCW\r\n};\r\n\r\n/**\r\n * Compute the intersection between two lines.\r\n * @static\r\n * @method lineInt\r\n * @param {Array} l1 Line vector 1\r\n * @param {Array} l2 Line vector 2\r\n * @param {Number} precision Precision to use when checking if the lines are parallel\r\n * @return {Array} The intersection point.\r\n */\r\nfunction lineInt(l1,l2,precision){\r\n precision = precision || 0;\r\n var i = [0,0]; // point\r\n var a1, b1, c1, a2, b2, c2, det; // scalars\r\n a1 = l1[1][1] - l1[0][1];\r\n b1 = l1[0][0] - l1[1][0];\r\n c1 = a1 * l1[0][0] + b1 * l1[0][1];\r\n a2 = l2[1][1] - l2[0][1];\r\n b2 = l2[0][0] - l2[1][0];\r\n c2 = a2 * l2[0][0] + b2 * l2[0][1];\r\n det = a1 * b2 - a2*b1;\r\n if (!scalar_eq(det, 0, precision)) { // lines are not parallel\r\n i[0] = (b2 * c1 - b1 * c2) / det;\r\n i[1] = (a1 * c2 - a2 * c1) / det;\r\n }\r\n return i;\r\n}\r\n\r\n/**\r\n * Checks if two line segments intersects.\r\n * @method segmentsIntersect\r\n * @param {Array} p1 The start vertex of the first line segment.\r\n * @param {Array} p2 The end vertex of the first line segment.\r\n * @param {Array} q1 The start vertex of the second line segment.\r\n * @param {Array} q2 The end vertex of the second line segment.\r\n * @return {Boolean} True if the two line segments intersect\r\n */\r\nfunction lineSegmentsIntersect(p1, p2, q1, q2){\r\n\tvar dx = p2[0] - p1[0];\r\n\tvar dy = p2[1] - p1[1];\r\n\tvar da = q2[0] - q1[0];\r\n\tvar db = q2[1] - q1[1];\r\n\r\n\t// segments are parallel\r\n\tif((da*dy - db*dx) === 0){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar s = (dx * (q1[1] - p1[1]) + dy * (p1[0] - q1[0])) / (da * dy - db * dx);\r\n\tvar t = (da * (p1[1] - q1[1]) + db * (q1[0] - p1[0])) / (db * dx - da * dy);\r\n\r\n\treturn (s>=0 && s<=1 && t>=0 && t<=1);\r\n}\r\n\r\n/**\r\n * Get the area of a triangle spanned by the three given points. Note that the area will be negative if the points are not given in counter-clockwise order.\r\n * @static\r\n * @method area\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @return {Number}\r\n */\r\nfunction triangleArea(a,b,c){\r\n return (((b[0] - a[0])*(c[1] - a[1]))-((c[0] - a[0])*(b[1] - a[1])));\r\n}\r\n\r\nfunction isLeft(a,b,c){\r\n return triangleArea(a,b,c) > 0;\r\n}\r\n\r\nfunction isLeftOn(a,b,c) {\r\n return triangleArea(a, b, c) >= 0;\r\n}\r\n\r\nfunction isRight(a,b,c) {\r\n return triangleArea(a, b, c) < 0;\r\n}\r\n\r\nfunction isRightOn(a,b,c) {\r\n return triangleArea(a, b, c) <= 0;\r\n}\r\n\r\nvar tmpPoint1 = [],\r\n tmpPoint2 = [];\r\n\r\n/**\r\n * Check if three points are collinear\r\n * @method collinear\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @param {Number} [thresholdAngle=0] Threshold angle to use when comparing the vectors. The function will return true if the angle between the resulting vectors is less than this value. Use zero for max precision.\r\n * @return {Boolean}\r\n */\r\nfunction collinear(a,b,c,thresholdAngle) {\r\n if(!thresholdAngle){\r\n return triangleArea(a, b, c) === 0;\r\n } else {\r\n var ab = tmpPoint1,\r\n bc = tmpPoint2;\r\n\r\n ab[0] = b[0]-a[0];\r\n ab[1] = b[1]-a[1];\r\n bc[0] = c[0]-b[0];\r\n bc[1] = c[1]-b[1];\r\n\r\n var dot = ab[0]*bc[0] + ab[1]*bc[1],\r\n magA = Math.sqrt(ab[0]*ab[0] + ab[1]*ab[1]),\r\n magB = Math.sqrt(bc[0]*bc[0] + bc[1]*bc[1]),\r\n angle = Math.acos(dot/(magA*magB));\r\n return angle < thresholdAngle;\r\n }\r\n}\r\n\r\nfunction sqdist(a,b){\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return dx * dx + dy * dy;\r\n}\r\n\r\n/**\r\n * Get a vertex at position i. It does not matter if i is out of bounds, this function will just cycle.\r\n * @method at\r\n * @param {Number} i\r\n * @return {Array}\r\n */\r\nfunction polygonAt(polygon, i){\r\n var s = polygon.length;\r\n return polygon[i < 0 ? i % s + s : i % s];\r\n}\r\n\r\n/**\r\n * Clear the polygon data\r\n * @method clear\r\n * @return {Array}\r\n */\r\nfunction polygonClear(polygon){\r\n polygon.length = 0;\r\n}\r\n\r\n/**\r\n * Append points "from" to "to"-1 from an other polygon "poly" onto this one.\r\n * @method append\r\n * @param {Polygon} poly The polygon to get points from.\r\n * @param {Number} from The vertex index in "poly".\r\n * @param {Number} to The end vertex index in "poly". Note that this vertex is NOT included when appending.\r\n * @return {Array}\r\n */\r\nfunction polygonAppend(polygon, poly, from, to){\r\n for(var i=from; i v[br][0])) {\r\n br = i;\r\n }\r\n }\r\n\r\n // reverse poly if clockwise\r\n if (!isLeft(polygonAt(polygon, br - 1), polygonAt(polygon, br), polygonAt(polygon, br + 1))) {\r\n polygonReverse(polygon);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Reverse the vertices in the polygon\r\n * @method reverse\r\n */\r\nfunction polygonReverse(polygon){\r\n var tmp = [];\r\n var N = polygon.length;\r\n for(var i=0; i!==N; i++){\r\n tmp.push(polygon.pop());\r\n }\r\n for(var i=0; i!==N; i++){\r\n\t\tpolygon[i] = tmp[i];\r\n }\r\n}\r\n\r\n/**\r\n * Check if a point in the polygon is a reflex point\r\n * @method isReflex\r\n * @param {Number} i\r\n * @return {Boolean}\r\n */\r\nfunction polygonIsReflex(polygon, i){\r\n return isRight(polygonAt(polygon, i - 1), polygonAt(polygon, i), polygonAt(polygon, i + 1));\r\n}\r\n\r\nvar tmpLine1=[],\r\n tmpLine2=[];\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee(polygon, a,b) {\r\n var p, dist, l1=tmpLine1, l2=tmpLine2;\r\n\r\n if (isLeftOn(polygonAt(polygon, a + 1), polygonAt(polygon, a), polygonAt(polygon, b)) && isRightOn(polygonAt(polygon, a - 1), polygonAt(polygon, a), polygonAt(polygon, b))) {\r\n return false;\r\n }\r\n dist = sqdist(polygonAt(polygon, a), polygonAt(polygon, b));\r\n for (var i = 0; i !== polygon.length; ++i) { // for each edge\r\n if ((i + 1) % polygon.length === a || i === a){ // ignore incident edges\r\n continue;\r\n }\r\n if (isLeftOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i + 1)) && isRightOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i))) { // if diag intersects an edge\r\n l1[0] = polygonAt(polygon, a);\r\n l1[1] = polygonAt(polygon, b);\r\n l2[0] = polygonAt(polygon, i);\r\n l2[1] = polygonAt(polygon, i + 1);\r\n p = lineInt(l1,l2);\r\n if (sqdist(polygonAt(polygon, a), p) < dist) { // if edge is blocking visibility to b\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee2\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee2(polygon, a,b) {\r\n // for each edge\r\n for (var i = 0; i !== polygon.length; ++i) {\r\n // ignore incident edges\r\n if (i === a || i === b || (i + 1) % polygon.length === a || (i + 1) % polygon.length === b){\r\n continue;\r\n }\r\n if( lineSegmentsIntersect(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i), polygonAt(polygon, i+1)) ){\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Copy the polygon from vertex i to vertex j.\r\n * @method copy\r\n * @param {Number} i\r\n * @param {Number} j\r\n * @param {Polygon} [targetPoly] Optional target polygon to save in.\r\n * @return {Polygon} The resulting copy.\r\n */\r\nfunction polygonCopy(polygon, i,j,targetPoly){\r\n var p = targetPoly || [];\r\n polygonClear(p);\r\n if (i < j) {\r\n // Insert all vertices from i to j\r\n for(var k=i; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n } else {\r\n\r\n // Insert vertices 0 to j\r\n for(var k=0; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n // Insert vertices i to end\r\n for(var k=i; k 0){\r\n return polygonSlice(polygon, edges);\r\n } else {\r\n return [polygon];\r\n }\r\n}\r\n\r\n/**\r\n * Slices the polygon given one or more cut edges. If given one, this function will return two polygons (false on failure). If many, an array of polygons.\r\n * @method slice\r\n * @param {Array} cutEdges A list of edges, as returned by .getCutEdges()\r\n * @return {Array}\r\n */\r\nfunction polygonSlice(polygon, cutEdges){\r\n if(cutEdges.length === 0){\r\n\t\treturn [polygon];\r\n }\r\n if(cutEdges instanceof Array && cutEdges.length && cutEdges[0] instanceof Array && cutEdges[0].length===2 && cutEdges[0][0] instanceof Array){\r\n\r\n var polys = [polygon];\r\n\r\n for(var i=0; i maxlevel){\r\n console.warn("quickDecomp: max level ("+maxlevel+") reached.");\r\n return result;\r\n }\r\n\r\n for (var i = 0; i < polygon.length; ++i) {\r\n if (polygonIsReflex(poly, i)) {\r\n reflexVertices.push(poly[i]);\r\n upperDist = lowerDist = Number.MAX_VALUE;\r\n\r\n\r\n for (var j = 0; j < polygon.length; ++j) {\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) && isRightOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j - 1))) { // if line intersects with an edge\r\n p = getIntersectionPoint(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j - 1)); // find the point of intersection\r\n if (isRight(polygonAt(poly, i + 1), polygonAt(poly, i), p)) { // make sure it\'s inside the poly\r\n d = sqdist(poly[i], p);\r\n if (d < lowerDist) { // keep only the closest intersection\r\n lowerDist = d;\r\n lowerInt = p;\r\n lowerIndex = j;\r\n }\r\n }\r\n }\r\n if (isLeft(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j + 1)) && isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))) {\r\n p = getIntersectionPoint(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j + 1));\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), p)) {\r\n d = sqdist(poly[i], p);\r\n if (d < upperDist) {\r\n upperDist = d;\r\n upperInt = p;\r\n upperIndex = j;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // if there are no vertices to connect to, choose a point in the middle\r\n if (lowerIndex === (upperIndex + 1) % polygon.length) {\r\n //console.log("Case 1: Vertex("+i+"), lowerIndex("+lowerIndex+"), upperIndex("+upperIndex+"), poly.size("+polygon.length+")");\r\n p[0] = (lowerInt[0] + upperInt[0]) / 2;\r\n p[1] = (lowerInt[1] + upperInt[1]) / 2;\r\n steinerPoints.push(p);\r\n\r\n if (i < upperIndex) {\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly, i, upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n if (lowerIndex !== 0){\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.end());\r\n polygonAppend(upperPoly, poly,lowerIndex,poly.length);\r\n }\r\n //upperPoly.insert(upperPoly.end(), poly.begin(), poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.end());\r\n polygonAppend(lowerPoly, poly,i,poly.length);\r\n }\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin(), poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly,0,upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,lowerIndex,i+1);\r\n }\r\n } else {\r\n // connect to the closest point within the triangle\r\n //console.log("Case 2: Vertex("+i+"), closestIndex("+closestIndex+"), poly.size("+polygon.length+")\\n");\r\n\r\n if (lowerIndex > upperIndex) {\r\n upperIndex += polygon.length;\r\n }\r\n closestDist = Number.MAX_VALUE;\r\n\r\n if(upperIndex < lowerIndex){\r\n return result;\r\n }\r\n\r\n for (var j = lowerIndex; j <= upperIndex; ++j) {\r\n if (\r\n isLeftOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) &&\r\n isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))\r\n ) {\r\n d = sqdist(polygonAt(poly, i), polygonAt(poly, j));\r\n if (d < closestDist && polygonCanSee2(poly, i, j)) {\r\n closestDist = d;\r\n closestIndex = j % polygon.length;\r\n }\r\n }\r\n }\r\n\r\n if (i < closestIndex) {\r\n polygonAppend(lowerPoly, poly,i,closestIndex+1);\r\n if (closestIndex !== 0){\r\n polygonAppend(upperPoly, poly,closestIndex,v.length);\r\n }\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n polygonAppend(lowerPoly, poly,i,v.length);\r\n }\r\n polygonAppend(lowerPoly, poly,0,closestIndex+1);\r\n polygonAppend(upperPoly, poly,closestIndex,i+1);\r\n }\r\n }\r\n\r\n // solve smallest poly first\r\n if (lowerPoly.length < upperPoly.length) {\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n } else {\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n result.push(polygon);\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Remove collinear points in the polygon.\r\n * @method removeCollinearPoints\r\n * @param {Number} [precision] The threshold angle to use when determining whether two edges are collinear. Use zero for finest precision.\r\n * @return {Number} The number of points removed\r\n */\r\nfunction polygonRemoveCollinearPoints(polygon, precision){\r\n var num = 0;\r\n for(var i=polygon.length-1; polygon.length>3 && i>=0; --i){\r\n if(collinear(polygonAt(polygon, i-1),polygonAt(polygon, i),polygonAt(polygon, i+1),precision)){\r\n // Remove the middle point\r\n polygon.splice(i%polygon.length,1);\r\n num++;\r\n }\r\n }\r\n return num;\r\n}\r\n\r\n/**\r\n * Remove duplicate points in the polygon.\r\n * @method removeDuplicatePoints\r\n * @param {Number} [precision] The threshold to use when determining whether two points are the same. Use zero for best precision.\r\n */\r\nfunction polygonRemoveDuplicatePoints(polygon, precision){\r\n for(var i=polygon.length-1; i>=1; --i){\r\n var pi = polygon[i];\r\n for(var j=i-1; j>=0; --j){\r\n if(points_eq(pi, polygon[j], precision)){\r\n polygon.splice(i,1);\r\n continue;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Check if two scalars are equal\r\n * @static\r\n * @method eq\r\n * @param {Number} a\r\n * @param {Number} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction scalar_eq(a,b,precision){\r\n precision = precision || 0;\r\n return Math.abs(a-b) <= precision;\r\n}\r\n\r\n/**\r\n * Check if two points are equal\r\n * @static\r\n * @method points_eq\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction points_eq(a,b,precision){\r\n return scalar_eq(a[0],b[0],precision) && scalar_eq(a[1],b[1],precision);\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js?')},"./node_modules/phaser/src/plugins/BasePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems;\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots.\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n // Here are the Scene events you can listen to.\r\n // At the very least you should offer a destroy handler for when the Scene closes down.\r\n\r\n // var eventEmitter = this.systems.events;\r\n\r\n // eventEmitter.once('destroy', this.sceneDestroy, this);\r\n // eventEmitter.on('start', this.sceneStart, this);\r\n // eventEmitter.on('preupdate', this.scenePreUpdate, this);\r\n // eventEmitter.on('update', this.sceneUpdate, this);\r\n // eventEmitter.on('postupdate', this.scenePostUpdate, this);\r\n // eventEmitter.on('pause', this.scenePause, this);\r\n // eventEmitter.on('resume', this.sceneResume, this);\r\n // eventEmitter.on('sleep', this.sceneSleep, this);\r\n // eventEmitter.on('wake', this.sceneWake, this);\r\n // eventEmitter.on('shutdown', this.sceneShutdown, this);\r\n // eventEmitter.on('destroy', this.sceneDestroy, this);\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/BasePlugin.js?")},"./node_modules/phaser/src/plugins/DefaultPlugins.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Plugins.DefaultPlugins\r\n * \r\n * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance.\r\n * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n */\r\n\r\nvar DefaultPlugins = {\r\n\r\n /**\r\n * These are the Global Managers that are created by the Phaser.Game instance.\r\n * They are referenced from Scene.Systems so that plugins can use them.\r\n * \r\n * @name Phaser.Plugins.Global\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n Global: [\r\n\r\n 'game',\r\n 'anims',\r\n 'cache',\r\n 'plugins',\r\n 'registry',\r\n 'scale',\r\n 'sound',\r\n 'textures'\r\n\r\n ],\r\n\r\n /**\r\n * These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are created in the order in which they appear in this array and EventEmitter is always first.\r\n * \r\n * @name Phaser.Plugins.CoreScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n CoreScene: [\r\n\r\n 'EventEmitter',\r\n\r\n 'CameraManager',\r\n 'GameObjectCreator',\r\n 'GameObjectFactory',\r\n 'ScenePlugin',\r\n 'DisplayList',\r\n 'UpdateList'\r\n\r\n ],\r\n\r\n /**\r\n * These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n * \r\n * You can elect not to have these plugins by either creating a DefaultPlugins object as part\r\n * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array\r\n * and building your own bundle.\r\n * \r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are always created in the order in which they appear in the array.\r\n * \r\n * @name Phaser.Plugins.DefaultScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n DefaultScene: [\r\n\r\n 'Clock',\r\n 'DataManagerPlugin',\r\n 'InputPlugin',\r\n 'Loader',\r\n 'TweenManager',\r\n 'LightsPlugin'\r\n\r\n ]\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n DefaultPlugins.DefaultScene.push('CameraManager3D');\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n DefaultPlugins.Global.push('facebook');\r\n}\r\n\r\nmodule.exports = DefaultPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/DefaultPlugins.js?")},"./node_modules/phaser/src/plugins/PluginCache.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n * \r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginCache.js?")},"./node_modules/phaser/src/plugins/PluginManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../loader/FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ./PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Remove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The PluginManager is responsible for installing and adding plugins to Phaser.\r\n *\r\n * It is a global system and therefore belongs to the Game instance, not a specific Scene.\r\n *\r\n * It works in conjunction with the PluginCache. Core internal plugins automatically register themselves \r\n * with the Cache, but it's the Plugin Manager that is responsible for injecting them into the Scenes.\r\n *\r\n * There are two types of plugin:\r\n *\r\n * 1. A Global Plugin\r\n * 2. A Scene Plugin\r\n *\r\n * A Global Plugin is a plugin that lives within the Plugin Manager rather than a Scene. You can get\r\n * access to it by calling `PluginManager.get` and providing a key. Any Scene that requests a plugin in\r\n * this way will all get access to the same plugin instance, allowing you to use a single plugin across\r\n * multiple Scenes.\r\n *\r\n * A Scene Plugin is a plugin dedicated to running within a Scene. These are different to Global Plugins\r\n * in that their instances do not live within the Plugin Manager, but within the Scene Systems class instead.\r\n * And that every Scene created is given its own unique instance of a Scene Plugin. Examples of core Scene\r\n * Plugins include the Input Plugin, the Tween Plugin and the physics Plugins.\r\n *\r\n * You can add a plugin to Phaser in three different ways:\r\n *\r\n * 1. Preload it\r\n * 2. Include it in your source code and install it via the Game Config\r\n * 3. Include it in your source code and install it within a Scene\r\n *\r\n * For examples of all of these approaches please see the Phaser 3 Examples Repo `plugins` folder.\r\n *\r\n * For information on creating your own plugin please see the Phaser 3 Plugin Template.\r\n *\r\n * @class PluginManager\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The game instance that owns this Plugin Manager.\r\n */\r\nvar PluginManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function PluginManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The game instance that owns this Plugin Manager.\r\n *\r\n * @name Phaser.Plugins.PluginManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The global plugins currently running and managed by this Plugin Manager.\r\n * A plugin must have been started at least once in order to appear in this list.\r\n *\r\n * @name Phaser.Plugins.PluginManager#plugins\r\n * @type {Phaser.Types.Plugins.GlobalPlugin[]}\r\n * @since 3.8.0\r\n */\r\n this.plugins = [];\r\n\r\n /**\r\n * A list of plugin keys that should be installed into Scenes as well as the Core Plugins.\r\n *\r\n * @name Phaser.Plugins.PluginManager#scenePlugins\r\n * @type {string[]}\r\n * @since 3.8.0\r\n */\r\n this.scenePlugins = [];\r\n\r\n /**\r\n * A temporary list of plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingGlobal\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingGlobal = [];\r\n\r\n /**\r\n * A temporary list of scene plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingScene\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingScene = [];\r\n\r\n if (game.isBooted)\r\n {\r\n this.boot();\r\n }\r\n else\r\n {\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n }\r\n },\r\n\r\n /**\r\n * Run once the game has booted and installs all of the plugins configured in the Game Config.\r\n *\r\n * @method Phaser.Plugins.PluginManager#boot\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var i;\r\n var entry;\r\n var key;\r\n var plugin;\r\n var start;\r\n var mapping;\r\n var data;\r\n var config = this.game.config;\r\n\r\n // Any plugins to install?\r\n var list = config.installGlobalPlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingGlobal);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'TestPlugin', plugin: TestPlugin, start: true, mapping: 'test', data: { msg: 'The plugin is alive' } }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n start = GetFastValue(entry, 'start', false);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n data = GetFastValue(entry, 'data', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.install(key, plugin, start, mapping, data);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n \r\n }\r\n }\r\n\r\n // Any scene plugins to install?\r\n list = config.installScenePlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingScene);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'moveSpritePlugin', plugin: MoveSpritePlugin, , mapping: 'move' }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.installScenePlugin(key, plugin, mapping);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n }\r\n }\r\n\r\n this._pendingGlobal = [];\r\n this._pendingScene = [];\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it.\r\n *\r\n * First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.)\r\n * Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager.\r\n * Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself.\r\n *\r\n * @method Phaser.Plugins.PluginManager#addToScene\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems class to install all the plugins in to.\r\n * @param {array} globalPlugins - An array of global plugins to install.\r\n * @param {array} scenePlugins - An array of scene plugins to install.\r\n */\r\n addToScene: function (sys, globalPlugins, scenePlugins)\r\n {\r\n var i;\r\n var pluginKey;\r\n var pluginList;\r\n var game = this.game;\r\n var scene = sys.scene;\r\n var map = sys.settings.map;\r\n var isBooted = sys.settings.isBooted;\r\n\r\n // Reference the GlobalPlugins from Game into Scene.Systems\r\n for (i = 0; i < globalPlugins.length; i++)\r\n {\r\n pluginKey = globalPlugins[i];\r\n\r\n if (game[pluginKey])\r\n {\r\n sys[pluginKey] = game[pluginKey];\r\n\r\n // Scene level injection\r\n if (map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = sys[pluginKey];\r\n }\r\n }\r\n else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = game;\r\n }\r\n }\r\n\r\n for (var s = 0; s < scenePlugins.length; s++)\r\n {\r\n pluginList = scenePlugins[s];\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n pluginKey = pluginList[i];\r\n\r\n if (!PluginCache.hasCore(pluginKey))\r\n {\r\n continue;\r\n }\r\n\r\n var source = PluginCache.getCore(pluginKey);\r\n\r\n var plugin = new source.plugin(scene, this);\r\n \r\n sys[source.mapping] = plugin;\r\n\r\n // Scene level injection\r\n if (source.custom)\r\n {\r\n scene[source.mapping] = plugin;\r\n }\r\n else if (map.hasOwnProperty(source.mapping))\r\n {\r\n scene[map[source.mapping]] = plugin;\r\n }\r\n\r\n // Scene is already booted, usually because this method is being called at run-time, so boot the plugin\r\n if (isBooted)\r\n {\r\n plugin.boot();\r\n }\r\n }\r\n }\r\n\r\n // And finally, inject any 'global scene plugins'\r\n pluginList = this.plugins;\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n var entry = pluginList[i];\r\n\r\n if (entry.mapping)\r\n {\r\n scene[entry.mapping] = entry.plugin;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Returns a list of plugins to be installed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getDefaultScenePlugins\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @return {string[]} A list keys of all the Scene Plugins to install.\r\n */\r\n getDefaultScenePlugins: function ()\r\n {\r\n var list = this.game.config.defaultPlugins;\r\n\r\n // Merge in custom Scene plugins\r\n list = list.concat(this.scenePlugins);\r\n\r\n return list;\r\n },\r\n\r\n /**\r\n * Installs a new Scene Plugin into the Plugin Manager and optionally adds it\r\n * to the given Scene as well. A Scene Plugin added to the manager in this way\r\n * will be automatically installed into all new Scenes using the key and mapping given.\r\n *\r\n * The `key` property is what the plugin is injected into Scene.Systems as.\r\n * The `mapping` property is optional, and if specified is what the plugin is installed into\r\n * the Scene as. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups');\r\n * \r\n * // and from within the scene:\r\n * this.sys.powerupsPlugin; // key value\r\n * this.powerups; // mapping value\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * @method Phaser.Plugins.PluginManager#installScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The property key that will be used to add this plugin to Scene.Systems.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {Phaser.Scene} [addToScene] - Optionally automatically add this plugin to the given Scene.\r\n * @param {boolean} [fromLoader=false] - Is this being called by the Loader?\r\n */\r\n installScenePlugin: function (key, plugin, mapping, addToScene, fromLoader)\r\n {\r\n if (fromLoader === undefined) { fromLoader = false; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Scene Plugin: ' + key);\r\n return;\r\n }\r\n\r\n if (!PluginCache.hasCore(key))\r\n {\r\n // Plugin is freshly loaded\r\n PluginCache.register(key, plugin, mapping, true);\r\n\r\n this.scenePlugins.push(key);\r\n }\r\n else if (!fromLoader && PluginCache.hasCore(key))\r\n {\r\n // Plugin wasn't from the loader but already exists\r\n console.warn('Scene Plugin key in use: ' + key);\r\n return;\r\n }\r\n\r\n if (addToScene)\r\n {\r\n var instance = new plugin(addToScene, this);\r\n\r\n addToScene.sys[key] = instance;\r\n\r\n if (mapping && mapping !== '')\r\n {\r\n addToScene[mapping] = instance;\r\n }\r\n\r\n instance.boot();\r\n }\r\n },\r\n\r\n /**\r\n * Installs a new Global Plugin into the Plugin Manager and optionally starts it running.\r\n * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed\r\n * and used by all Scenes in your game.\r\n *\r\n * The `key` property is what you use to access this plugin from the Plugin Manager.\r\n *\r\n * ```javascript\r\n * this.plugins.install('powerupsPlugin', pluginCode);\r\n * \r\n * // and from within the scene:\r\n * this.plugins.get('powerupsPlugin');\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * The same plugin can be installed multiple times into the Plugin Manager by simply giving each\r\n * instance its own unique key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#install\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The unique handle given to this plugin within the Plugin Manager.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {boolean} [start=false] - Automatically start the plugin running? This is always `true` if you provide a mapping value.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {any} [data] - A value passed to the plugin's `init` method.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if `start` was false, or game isn't yet booted.\r\n */\r\n install: function (key, plugin, start, mapping, data)\r\n {\r\n if (start === undefined) { start = false; }\r\n if (mapping === undefined) { mapping = null; }\r\n if (data === undefined) { data = null; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Plugin: ' + key);\r\n return null;\r\n }\r\n\r\n if (PluginCache.hasCustom(key))\r\n {\r\n console.warn('Plugin key in use: ' + key);\r\n return null;\r\n }\r\n\r\n if (mapping !== null)\r\n {\r\n start = true;\r\n }\r\n\r\n if (!this.game.isBooted)\r\n {\r\n this._pendingGlobal.push({ key: key, plugin: plugin, start: start, mapping: mapping, data: data });\r\n }\r\n else\r\n {\r\n // Add it to the plugin store\r\n PluginCache.registerCustom(key, plugin, mapping, data);\r\n\r\n if (start)\r\n {\r\n return this.start(key);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets an index of a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getIndex\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {integer} The index of the plugin within the plugins array.\r\n */\r\n getIndex: function (key)\r\n {\r\n var list = this.plugins;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var entry = list[i];\r\n\r\n if (entry.key === key)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Gets a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getEntry\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {Phaser.Types.Plugins.GlobalPlugin} The plugin entry.\r\n */\r\n getEntry: function (key)\r\n {\r\n var idx = this.getIndex(key);\r\n\r\n if (idx !== -1)\r\n {\r\n return this.plugins[idx];\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given global plugin, based on its key, is active or not.\r\n *\r\n * @method Phaser.Plugins.PluginManager#isActive\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {boolean} `true` if the plugin is active, otherwise `false`.\r\n */\r\n isActive: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n return (entry && entry.active);\r\n },\r\n\r\n /**\r\n * Starts a global plugin running.\r\n *\r\n * If the plugin was previously active then calling `start` will reset it to an active state and then\r\n * call its `start` method.\r\n *\r\n * If the plugin has never been run before a new instance of it will be created within the Plugin Manager,\r\n * its active state set and then both of its `init` and `start` methods called, in that order.\r\n *\r\n * If the plugin is already running under the given key then nothing happens.\r\n *\r\n * @method Phaser.Plugins.PluginManager#start\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to start.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given or plugin is already stopped.\r\n */\r\n start: function (key, runAs)\r\n {\r\n if (runAs === undefined) { runAs = key; }\r\n\r\n var entry = this.getEntry(runAs);\r\n\r\n // Plugin already running under this key?\r\n if (entry && !entry.active)\r\n {\r\n // It exists, we just need to start it up again\r\n entry.active = true;\r\n entry.plugin.start();\r\n }\r\n else if (!entry)\r\n {\r\n entry = this.createEntry(key, runAs);\r\n }\r\n\r\n return (entry) ? entry.plugin : null;\r\n },\r\n\r\n /**\r\n * Creates a new instance of a global plugin, adds an entry into the plugins array and returns it.\r\n *\r\n * @method Phaser.Plugins.PluginManager#createEntry\r\n * @private\r\n * @since 3.9.0\r\n *\r\n * @param {string} key - The key of the plugin to create an instance of.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given.\r\n */\r\n createEntry: function (key, runAs)\r\n {\r\n var entry = PluginCache.getCustom(key);\r\n\r\n if (entry)\r\n {\r\n var instance = new entry.plugin(this);\r\n\r\n entry = {\r\n key: runAs,\r\n plugin: instance,\r\n active: true,\r\n mapping: entry.mapping,\r\n data: entry.data\r\n };\r\n\r\n this.plugins.push(entry);\r\n\r\n instance.init(entry.data);\r\n instance.start();\r\n }\r\n\r\n return entry;\r\n },\r\n\r\n /**\r\n * Stops a global plugin from running.\r\n *\r\n * If the plugin is active then its active state will be set to false and the plugins `stop` method\r\n * will be called.\r\n *\r\n * If the plugin is not already running, nothing will happen.\r\n *\r\n * @method Phaser.Plugins.PluginManager#stop\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to stop.\r\n *\r\n * @return {Phaser.Plugins.PluginManager} The Plugin Manager.\r\n */\r\n stop: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry && entry.active)\r\n {\r\n entry.active = false;\r\n entry.plugin.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a global plugin from the Plugin Manager based on the given key and returns it.\r\n *\r\n * If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key,\r\n * then it will create a new instance of the cached plugin and return that.\r\n *\r\n * @method Phaser.Plugins.PluginManager#get\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n * @param {boolean} [autoStart=true] - Automatically start a new instance of the plugin if found in the cache, but not actively running.\r\n *\r\n * @return {?(Phaser.Plugins.BasePlugin|function)} The plugin, or `null` if no plugin was found matching the key.\r\n */\r\n get: function (key, autoStart)\r\n {\r\n if (autoStart === undefined) { autoStart = true; }\r\n\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n return entry.plugin;\r\n }\r\n else\r\n {\r\n var plugin = this.getClass(key);\r\n\r\n if (plugin && autoStart)\r\n {\r\n entry = this.createEntry(key, key);\r\n\r\n return (entry) ? entry.plugin : null;\r\n }\r\n else if (plugin)\r\n {\r\n return plugin;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns the plugin class from the cache.\r\n * Used internally by the Plugin Manager.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n *\r\n * @return {Phaser.Plugins.BasePlugin} A Plugin object\r\n */\r\n getClass: function (key)\r\n {\r\n return PluginCache.getCustomClass(key);\r\n },\r\n\r\n /**\r\n * Removes a global plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGlobalPlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeGlobalPlugin: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n Remove(this.plugins, entry);\r\n }\r\n\r\n PluginCache.removeCustom(key);\r\n },\r\n\r\n /**\r\n * Removes a scene plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * This will not remove the plugin from any active Scenes that are already using it.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeScenePlugin: function (key)\r\n {\r\n Remove(this.scenePlugins, key);\r\n\r\n PluginCache.remove(key);\r\n },\r\n\r\n /**\r\n * Registers a new type of Game Object with the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new Game Objects.\r\n *\r\n * The key is the property that will be injected into the factories and used to create the\r\n * Game Object. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback);\r\n * // later in your game code:\r\n * this.add.clown();\r\n * this.make.clown();\r\n * ```\r\n * \r\n * The callbacks are what are called when the factories try to create a Game Object\r\n * matching the given key. It's important to understand that the callbacks are invoked within\r\n * the context of the GameObjectFactory. In this context there are several properties available\r\n * to use:\r\n * \r\n * this.scene - A reference to the Scene that owns the GameObjectFactory.\r\n * this.displayList - A reference to the Display List the Scene owns.\r\n * this.updateList - A reference to the Update List the Scene owns.\r\n * \r\n * See the GameObjectFactory and GameObjectCreator classes for more details.\r\n * Any public property or method listed is available from your callbacks under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerGameObject\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} [factoryCallback] - The callback to invoke when the Game Object Factory is called.\r\n * @param {function} [creatorCallback] - The callback to invoke when the Game Object Creator is called.\r\n */\r\n registerGameObject: function (key, factoryCallback, creatorCallback)\r\n {\r\n if (factoryCallback)\r\n {\r\n GameObjectFactory.register(key, factoryCallback);\r\n }\r\n\r\n if (creatorCallback)\r\n {\r\n GameObjectCreator.register(key, creatorCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a previously registered Game Object from the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGameObject\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Game Object to be removed from the factories.\r\n * @param {boolean} [removeFromFactory=true] - Should the Game Object be removed from the Game Object Factory?\r\n * @param {boolean} [removeFromCreator=true] - Should the Game Object be removed from the Game Object Creator?\r\n */\r\n removeGameObject: function (key, removeFromFactory, removeFromCreator)\r\n {\r\n if (removeFromFactory === undefined) { removeFromFactory = true; }\r\n if (removeFromCreator === undefined) { removeFromCreator = true; }\r\n\r\n if (removeFromFactory)\r\n {\r\n GameObjectFactory.remove(key);\r\n }\r\n\r\n if (removeFromCreator)\r\n {\r\n GameObjectCreator.remove(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Registers a new file type with the global File Types Manager, making it available to all Loader\r\n * Plugins created after this.\r\n * \r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new loader file types.\r\n *\r\n * The key is the property that will be injected into the Loader Plugin and used to load the\r\n * files. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerFileType('wad', doomWadLoaderCallback);\r\n * // later in your preload code:\r\n * this.load.wad();\r\n * ```\r\n * \r\n * The callback is what is called when the loader tries to load a file matching the given key.\r\n * It's important to understand that the callback is invoked within\r\n * the context of the LoaderPlugin. In this context there are several properties / methods available\r\n * to use:\r\n * \r\n * this.addFile - A method to add the new file to the load queue.\r\n * this.scene - The Scene that owns the Loader Plugin instance.\r\n *\r\n * See the LoaderPlugin class for more details. Any public property or method listed is available from\r\n * your callback under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerFileType\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} callback - The callback to invoke when the Game Object Factory is called.\r\n * @param {Phaser.Scene} [addToScene] - Optionally add this file type into the Loader Plugin owned by the given Scene.\r\n */\r\n registerFileType: function (key, callback, addToScene)\r\n {\r\n FileTypesManager.register(key, callback);\r\n\r\n if (addToScene && addToScene.sys.load)\r\n {\r\n addToScene.sys.load[key] = callback;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Plugin Manager and all associated plugins.\r\n * It will iterate all plugins found and call their `destroy` methods.\r\n * \r\n * The PluginCache will remove all custom plugins.\r\n *\r\n * @method Phaser.Plugins.PluginManager#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.plugins.length; i++)\r\n {\r\n this.plugins[i].plugin.destroy();\r\n }\r\n\r\n PluginCache.destroyCustomPlugins();\r\n\r\n if (this.game.noReturn)\r\n {\r\n PluginCache.destroyCorePlugins();\r\n }\r\n\r\n this.game = null;\r\n this.plugins = [];\r\n this.scenePlugins = [];\r\n }\r\n\r\n});\r\n\r\n/*\r\n * \"Sometimes, the elegant implementation is just a function.\r\n * Not a method. Not a class. Not a framework. Just a function.\"\r\n * -- John Carmack\r\n */\r\n\r\nmodule.exports = PluginManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginManager.js?")},"./node_modules/phaser/src/plugins/ScenePlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n this.scene = scene;\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n * \r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * \r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n * \r\n * start\r\n * ready\r\n * preupdate\r\n * update\r\n * postupdate\r\n * resize\r\n * pause\r\n * resume\r\n * sleep\r\n * wake\r\n * transitioninit\r\n * transitionstart\r\n * transitioncomplete\r\n * transitionout\r\n * shutdown\r\n * destroy\r\n * \r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once(\'destroy\', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/ScenePlugin.js?')},"./node_modules/phaser/src/plugins/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Plugins\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BasePlugin: __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js"),\r\n DefaultPlugins: __webpack_require__(/*! ./DefaultPlugins */ "./node_modules/phaser/src/plugins/DefaultPlugins.js"),\r\n PluginCache: __webpack_require__(/*! ./PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js"),\r\n PluginManager: __webpack_require__(/*! ./PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/plugins/ScenePlugin.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/index.js?')},"./node_modules/phaser/src/polyfills/Array.forEach.js":function(module,exports){eval("/**\r\n* A polyfill for Array.forEach\r\n* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\r\n*/\r\nif (!Array.prototype.forEach)\r\n{\r\n Array.prototype.forEach = function (fun /*, thisArg */)\r\n {\r\n 'use strict';\r\n\r\n if (this === void 0 || this === null)\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var t = Object(this);\r\n var len = t.length >>> 0;\r\n\r\n if (typeof fun !== 'function')\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n if (i in t)\r\n {\r\n fun.call(thisArg, t[i], i, t);\r\n }\r\n }\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.forEach.js?")},"./node_modules/phaser/src/polyfills/Array.isArray.js":function(module,exports){eval("/**\r\n* A polyfill for Array.isArray\r\n*/\r\nif (!Array.isArray)\r\n{\r\n Array.isArray = function (arg)\r\n {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.isArray.js?")},"./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js":function(module,exports){eval("/* Copyright 2013 Chris Wilson\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n*/\r\n\r\n/*\r\n\r\nThis monkeypatch library is intended to be included in projects that are\r\nwritten to the proper AudioContext spec (instead of webkitAudioContext),\r\nand that use the new naming and proper bits of the Web Audio API (e.g.\r\nusing BufferSourceNode.start() instead of BufferSourceNode.noteOn()), but may\r\nhave to run on systems that only support the deprecated bits.\r\n\r\nThis library should be harmless to include if the browser supports\r\nunprefixed \"AudioContext\", and/or if it supports the new names.\r\n\r\nThe patches this library handles:\r\nif window.AudioContext is unsupported, it will be aliased to webkitAudioContext().\r\nif AudioBufferSourceNode.start() is unimplemented, it will be routed to noteOn() or\r\nnoteGrainOn(), depending on parameters.\r\n\r\nThe following aliases only take effect if the new names are not already in place:\r\n\r\nAudioBufferSourceNode.stop() is aliased to noteOff()\r\nAudioContext.createGain() is aliased to createGainNode()\r\nAudioContext.createDelay() is aliased to createDelayNode()\r\nAudioContext.createScriptProcessor() is aliased to createJavaScriptNode()\r\nAudioContext.createPeriodicWave() is aliased to createWaveTable()\r\nOscillatorNode.start() is aliased to noteOn()\r\nOscillatorNode.stop() is aliased to noteOff()\r\nOscillatorNode.setPeriodicWave() is aliased to setWaveTable()\r\nAudioParam.setTargetAtTime() is aliased to setTargetValueAtTime()\r\n\r\nThis library does NOT patch the enumerated type changes, as it is\r\nrecommended in the specification that implementations support both integer\r\nand string types for AudioPannerNode.panningModel, AudioPannerNode.distanceModel\r\nBiquadFilterNode.type and OscillatorNode.type.\r\n\r\n*/\r\n\r\n(function () {\r\n\r\n function fixSetTarget(param) {\r\n if (!param)\t// if NYI, just return\r\n return;\r\n if (!param.setTargetAtTime)\r\n param.setTargetAtTime = param.setTargetValueAtTime;\r\n }\r\n\r\n if (window.hasOwnProperty('webkitAudioContext') &&\r\n !window.hasOwnProperty('AudioContext')) {\r\n window.AudioContext = webkitAudioContext;\r\n\r\n if (!AudioContext.prototype.hasOwnProperty('createGain'))\r\n AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createDelay'))\r\n AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createScriptProcessor'))\r\n AudioContext.prototype.createScriptProcessor = AudioContext.prototype.createJavaScriptNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createPeriodicWave'))\r\n AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\r\n\r\n\r\n AudioContext.prototype.internal_createGain = AudioContext.prototype.createGain;\r\n AudioContext.prototype.createGain = function() {\r\n var node = this.internal_createGain();\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDelay = AudioContext.prototype.createDelay;\r\n AudioContext.prototype.createDelay = function(maxDelayTime) {\r\n var node = maxDelayTime ? this.internal_createDelay(maxDelayTime) : this.internal_createDelay();\r\n fixSetTarget(node.delayTime);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBufferSource = AudioContext.prototype.createBufferSource;\r\n AudioContext.prototype.createBufferSource = function() {\r\n var node = this.internal_createBufferSource();\r\n if (!node.start) {\r\n node.start = function ( when, offset, duration ) {\r\n if ( offset || duration )\r\n this.noteGrainOn( when || 0, offset, duration );\r\n else\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function( when, offset, duration ) {\r\n if( typeof duration !== 'undefined' )\r\n node.internal_start( when || 0, offset, duration );\r\n else\r\n node.internal_start( when || 0, offset || 0 );\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n fixSetTarget(node.playbackRate);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDynamicsCompressor = AudioContext.prototype.createDynamicsCompressor;\r\n AudioContext.prototype.createDynamicsCompressor = function() {\r\n var node = this.internal_createDynamicsCompressor();\r\n fixSetTarget(node.threshold);\r\n fixSetTarget(node.knee);\r\n fixSetTarget(node.ratio);\r\n fixSetTarget(node.reduction);\r\n fixSetTarget(node.attack);\r\n fixSetTarget(node.release);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBiquadFilter = AudioContext.prototype.createBiquadFilter;\r\n AudioContext.prototype.createBiquadFilter = function() {\r\n var node = this.internal_createBiquadFilter();\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n fixSetTarget(node.Q);\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n if (AudioContext.prototype.hasOwnProperty( 'createOscillator' )) {\r\n AudioContext.prototype.internal_createOscillator = AudioContext.prototype.createOscillator;\r\n AudioContext.prototype.createOscillator = function() {\r\n var node = this.internal_createOscillator();\r\n if (!node.start) {\r\n node.start = function ( when ) {\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function ( when ) {\r\n node.internal_start( when || 0);\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n if (!node.setPeriodicWave)\r\n node.setPeriodicWave = node.setWaveTable;\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n return node;\r\n };\r\n }\r\n }\r\n\r\n if (window.hasOwnProperty('webkitOfflineAudioContext') &&\r\n !window.hasOwnProperty('OfflineAudioContext')) {\r\n window.OfflineAudioContext = webkitOfflineAudioContext;\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js?")},"./node_modules/phaser/src/polyfills/Math.trunc.js":function(module,exports){eval("// ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc\r\nif (!Math.trunc) {\r\n Math.trunc = function trunc(x) {\r\n return x < 0 ? Math.ceil(x) : Math.floor(x);\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Math.trunc.js?")},"./node_modules/phaser/src/polyfills/Uint32Array.js":function(module,exports){eval("/**\r\n* Low-budget Float32Array knock-off, suitable for use with P2.js in IE9\r\n* Source: http://www.html5gamedevs.com/topic/5988-phaser-12-ie9/\r\n* Cameron Foale (http://www.kibibu.com)\r\n*/\r\nif (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'object')\r\n{\r\n var CheapArray = function (fakeType)\r\n {\r\n var proto = new Array(); // jshint ignore:line\r\n\r\n window[fakeType] = function(arg) {\r\n\r\n if (typeof(arg) === 'number')\r\n {\r\n Array.call(this, arg);\r\n\r\n this.length = arg;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = 0;\r\n }\r\n }\r\n else\r\n {\r\n Array.call(this, arg.length);\r\n\r\n this.length = arg.length;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = arg[i];\r\n }\r\n }\r\n };\r\n\r\n window[fakeType].prototype = proto;\r\n window[fakeType].constructor = window[fakeType];\r\n };\r\n\r\n CheapArray('Float32Array'); // jshint ignore:line\r\n CheapArray('Uint32Array'); // jshint ignore:line\r\n CheapArray('Uint16Array'); // jshint ignore:line\r\n CheapArray('Int16Array'); // jshint ignore:line\r\n CheapArray('ArrayBuffer'); // jshint ignore:line\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Uint32Array.js?")},"./node_modules/phaser/src/polyfills/console.js":function(module,exports){eval("/**\r\n * Also fix for the absent console in IE9\r\n */\r\nif (!window.console)\r\n{\r\n window.console = {};\r\n window.console.log = window.console.assert = function(){};\r\n window.console.warn = window.console.assert = function(){};\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/console.js?")},"./node_modules/phaser/src/polyfills/index.js":function(module,exports,__webpack_require__){eval('__webpack_require__(/*! ./Array.forEach */ "./node_modules/phaser/src/polyfills/Array.forEach.js");\r\n__webpack_require__(/*! ./Array.isArray */ "./node_modules/phaser/src/polyfills/Array.isArray.js");\r\n__webpack_require__(/*! ./AudioContextMonkeyPatch */ "./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js");\r\n__webpack_require__(/*! ./console */ "./node_modules/phaser/src/polyfills/console.js");\r\n__webpack_require__(/*! ./Math.trunc */ "./node_modules/phaser/src/polyfills/Math.trunc.js");\r\n__webpack_require__(/*! ./performance.now */ "./node_modules/phaser/src/polyfills/performance.now.js");\r\n__webpack_require__(/*! ./requestAnimationFrame */ "./node_modules/phaser/src/polyfills/requestAnimationFrame.js");\r\n__webpack_require__(/*! ./Uint32Array */ "./node_modules/phaser/src/polyfills/Uint32Array.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/index.js?')},"./node_modules/phaser/src/polyfills/performance.now.js":function(module,exports){eval("/**\r\n * performance.now\r\n */\r\n(function () {\r\n\r\n if ('performance' in window === false)\r\n {\r\n window.performance = {};\r\n }\r\n\r\n // Thanks IE8\r\n Date.now = (Date.now || function () {\r\n return new Date().getTime();\r\n });\r\n\r\n if ('now' in window.performance === false)\r\n {\r\n var nowOffset = Date.now();\r\n\r\n if (performance.timing && performance.timing.navigationStart)\r\n {\r\n nowOffset = performance.timing.navigationStart;\r\n }\r\n\r\n window.performance.now = function now ()\r\n {\r\n return Date.now() - nowOffset;\r\n }\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/performance.now.js?")},"./node_modules/phaser/src/polyfills/requestAnimationFrame.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {// References:\r\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n// https://gist.github.com/1579671\r\n// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\r\n// https://gist.github.com/timhall/4078614\r\n// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame\r\n\r\n// Expected to be used with Browserfiy\r\n// Browserify automatically detects the use of `global` and passes the\r\n// correct reference of `global`, `self`, and finally `window`\r\n\r\n// Date.now\r\nif (!(Date.now && Date.prototype.getTime)) {\r\n Date.now = function now() {\r\n return new Date().getTime();\r\n };\r\n}\r\n\r\n// performance.now\r\nif (!(global.performance && global.performance.now)) {\r\n var startTime = Date.now();\r\n if (!global.performance) {\r\n global.performance = {};\r\n }\r\n global.performance.now = function () {\r\n return Date.now() - startTime;\r\n };\r\n}\r\n\r\n// requestAnimationFrame\r\nvar lastTime = Date.now();\r\nvar vendors = ['ms', 'moz', 'webkit', 'o'];\r\n\r\nfor(var x = 0; x < vendors.length && !global.requestAnimationFrame; ++x) {\r\n global.requestAnimationFrame = global[vendors[x] + 'RequestAnimationFrame'];\r\n global.cancelAnimationFrame = global[vendors[x] + 'CancelAnimationFrame'] ||\r\n global[vendors[x] + 'CancelRequestAnimationFrame'];\r\n}\r\n\r\nif (!global.requestAnimationFrame) {\r\n global.requestAnimationFrame = function (callback) {\r\n if (typeof callback !== 'function') {\r\n throw new TypeError(callback + 'is not a function');\r\n }\r\n\r\n var currentTime = Date.now(),\r\n delay = 16 + lastTime - currentTime;\r\n\r\n if (delay < 0) {\r\n delay = 0;\r\n }\r\n\r\n lastTime = currentTime;\r\n\r\n return setTimeout(function () {\r\n lastTime = Date.now();\r\n callback(performance.now());\r\n }, delay);\r\n };\r\n}\r\n\r\nif (!global.cancelAnimationFrame) {\r\n global.cancelAnimationFrame = function(id) {\r\n clearTimeout(id);\r\n };\r\n}\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/requestAnimationFrame.js?")},"./node_modules/phaser/src/renderer/BlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/BlendModes.js?")},"./node_modules/phaser/src/renderer/ScaleModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n * \r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n * \r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/ScaleModes.js?")},"./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasSnapshot = __webpack_require__(/*! ../snapshot/CanvasSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GetBlendModes = __webpack_require__(/*! ./utils/GetBlendModes */ \"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Canvas Renderer is responsible for managing 2D canvas rendering contexts, including the one used by the Game's canvas. It tracks the internal state of a given context and can renderer textured Game Objects to it, taking into account alpha, blending, and scaling.\r\n *\r\n * @class CanvasRenderer\r\n * @memberof Phaser.Renderer.Canvas\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser Game instance that owns this renderer.\r\n */\r\nvar CanvasRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function CanvasRenderer (game)\r\n {\r\n /**\r\n * The Phaser Game instance that owns this renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.CANVAS;\r\n\r\n /**\r\n * The total number of Game Objects which were rendered in a frame.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#drawCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.drawCount = 0;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The local configuration settings of the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: game.config.clearBeforeRender,\r\n backgroundColor: game.config.backgroundColor,\r\n resolution: game.config.resolution,\r\n antialias: game.config.antialias,\r\n roundPixels: game.config.roundPixels\r\n };\r\n\r\n /**\r\n * The scale mode which should be used by the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#scaleMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = (game.config.antialias) ? ScaleModes.LINEAR : ScaleModes.NEAREST;\r\n\r\n /**\r\n * The canvas element which the Game uses.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.gameCanvas = game.canvas;\r\n\r\n var contextOptions = {\r\n alpha: game.config.transparent,\r\n desynchronized: game.config.desynchronized\r\n };\r\n\r\n /**\r\n * The canvas context used to render all Cameras in all Scenes during the game loop.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.gameContext = (this.game.config.context) ? this.game.config.context : this.gameCanvas.getContext('2d', contextOptions);\r\n\r\n /**\r\n * The canvas context currently used by the CanvasRenderer for all rendering operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.currentContext = this.gameContext;\r\n\r\n /**\r\n * The blend modes supported by the Canvas Renderer.\r\n *\r\n * This object maps the {@link Phaser.BlendModes} to canvas compositing operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#blendModes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.blendModes = GetBlendModes();\r\n\r\n // image-rendering: optimizeSpeed;\r\n // image-rendering: pixelated;\r\n\r\n /**\r\n * The scale mode currently in use by the Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentScaleMode\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.currentScaleMode = 0;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.16.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92\r\n };\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n this.init();\r\n },\r\n\r\n /**\r\n * Prepares the game canvas for rendering.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#init\r\n * @since 3.0.0\r\n */\r\n init: function ()\r\n {\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height)\r\n {\r\n this.resize(baseSize.width, baseSize.height);\r\n }\r\n },\r\n\r\n /**\r\n * Resize the main game canvas.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n */\r\n resize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n // Resizing a canvas will reset imageSmoothingEnabled (and probably other properties)\r\n if (this.scaleMode === ScaleModes.NEAREST)\r\n {\r\n Smoothing.disable(this.gameContext);\r\n }\r\n },\r\n\r\n /**\r\n * Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resetTransform\r\n * @since 3.0.0\r\n */\r\n resetTransform: function ()\r\n {\r\n this.currentContext.setTransform(1, 0, 0, 1, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the blend mode (compositing operation) of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {string} blendMode - The new blend mode which should be used.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setBlendMode: function (blendMode)\r\n {\r\n this.currentContext.globalCompositeOperation = blendMode;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Changes the Canvas Rendering Context that all draw operations are performed against.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setContext\r\n * @since 3.12.0\r\n *\r\n * @param {?CanvasRenderingContext2D} [ctx] - The new Canvas Rendering Context to draw everything to. Leave empty to reset to the Game Canvas.\r\n *\r\n * @return {this} The Canvas Renderer instance.\r\n */\r\n setContext: function (ctx)\r\n {\r\n this.currentContext = (ctx) ? ctx : this.gameContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the global alpha of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} alpha - The new alpha to use, where 0 is fully transparent and 1 is fully opaque.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setAlpha: function (alpha)\r\n {\r\n this.currentContext.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called at the start of the render loop.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n var config = this.config;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n ctx.globalAlpha = 1;\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\r\n if (config.clearBeforeRender)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n if (!config.transparent)\r\n {\r\n ctx.fillStyle = config.backgroundColor.rgba;\r\n ctx.fillRect(0, 0, width, height);\r\n }\r\n\r\n ctx.save();\r\n\r\n this.drawCount = 0;\r\n },\r\n\r\n /**\r\n * Renders the Scene to the given Camera.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.DisplayList} children - The Game Objects within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently unused.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n var list = children.list;\r\n var childCount = list.length;\r\n\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var ctx = (camera.renderToTexture) ? camera.context : scene.sys.context;\r\n\r\n // Save context pre-clip\r\n ctx.save();\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(cx, cy, cw, ch);\r\n ctx.clip();\r\n }\r\n\r\n this.currentContext = ctx;\r\n\r\n var mask = camera.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderCanvas(this, null, camera._maskCamera);\r\n }\r\n\r\n if (!camera.transparent)\r\n {\r\n ctx.fillStyle = camera.backgroundColor.rgba;\r\n ctx.fillRect(cx, cy, cw, ch);\r\n }\r\n\r\n ctx.globalAlpha = camera.alpha;\r\n\r\n ctx.globalCompositeOperation = 'source-over';\r\n\r\n this.drawCount += list.length;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n\r\n camera.matrix.copyToContext(ctx);\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderCanvas(this, child, camera);\r\n }\r\n\r\n child.renderCanvas(this, child, interpolationPercentage, camera);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderCanvas(this, child, camera);\r\n }\r\n }\r\n\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.globalAlpha = 1;\r\n\r\n camera.flashEffect.postRenderCanvas(ctx);\r\n camera.fadeEffect.postRenderCanvas(ctx);\r\n\r\n camera.dirty = false;\r\n\r\n if (mask)\r\n {\r\n mask.postRenderCanvas(this);\r\n }\r\n\r\n // Restore pre-clip context\r\n ctx.restore();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n scene.sys.context.drawImage(camera.canvas, cx, cy);\r\n }\r\n },\r\n\r\n /**\r\n * Restores the game context's global settings and takes a snapshot if one is scheduled.\r\n *\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n\r\n ctx.restore();\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n CanvasSnapshot(this.gameCanvas, state);\r\n\r\n state.callback = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given canvas.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas to grab from.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=canvas.width] - The width of the area to grab.\r\n * @param {integer} [height=canvas.height] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Canvas Renderer.\r\n */\r\n snapshotCanvas: function (canvas, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n CanvasSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gameCanvas.width, this.gameCanvas.height, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gameCanvas.width);\r\n state.height = Math.min(height, this.gameCanvas.height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and draws it to the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#batchSprite\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The texture based Game Object to draw.\r\n * @param {Phaser.Textures.Frame} frame - The frame to draw, doesn't have to be that owned by the Game Object.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, frame, camera, parentTransformMatrix)\r\n {\r\n var alpha = camera.alpha * sprite.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n \r\n var ctx = this.currentContext;\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var cd = frame.canvasData;\r\n\r\n var frameX = cd.x;\r\n var frameY = cd.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var res = frame.source.resolution;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frame.x;\r\n var y = -displayOriginY + frame.y;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n frameWidth = crop.cw;\r\n frameHeight = crop.ch;\r\n \r\n frameX = crop.cx;\r\n frameY = crop.cy;\r\n\r\n x = -displayOriginX + crop.x;\r\n y = -displayOriginY + crop.y;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (x >= 0)\r\n {\r\n x = -(x + frameWidth);\r\n }\r\n else if (x < 0)\r\n {\r\n x = (Math.abs(x) - frameWidth);\r\n }\r\n }\r\n \r\n if (sprite.flipY)\r\n {\r\n if (y >= 0)\r\n {\r\n y = -(y + frameHeight);\r\n }\r\n else if (y < 0)\r\n {\r\n y = (Math.abs(y) - frameHeight);\r\n }\r\n }\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY)\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n ctx.save();\r\n \r\n calcMatrix.setToContext(ctx);\r\n\r\n ctx.globalCompositeOperation = this.blendModes[sprite.blendMode];\r\n\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.drawImage(frame.source.image, frameX, frameY, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);\r\n\r\n ctx.restore();\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Canvas Renderer.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameCanvas = null;\r\n this.gameContext = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js?")},"./node_modules/phaser/src/renderer/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasRenderer: __webpack_require__(/*! ./CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js"),\r\n GetBlendModes: __webpack_require__(/*! ./utils/GetBlendModes */ "./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js"),\r\n SetTransform: __webpack_require__(/*! ./utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/index.js?')},"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar modes = __webpack_require__(/*! ../../BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar CanvasFeatures = __webpack_require__(/*! ../../../device/CanvasFeatures */ \"./node_modules/phaser/src/device/CanvasFeatures.js\");\r\n\r\n/**\r\n * Returns an array which maps the default blend modes to supported Canvas blend modes.\r\n *\r\n * If the browser doesn't support a blend mode, it will default to the normal `source-over` blend mode.\r\n *\r\n * @function Phaser.Renderer.Canvas.GetBlendModes\r\n * @since 3.0.0\r\n *\r\n * @return {array} Which Canvas blend mode corresponds to which default Phaser blend mode.\r\n */\r\nvar GetBlendModes = function ()\r\n{\r\n var output = [];\r\n var useNew = CanvasFeatures.supportNewBlendModes;\r\n var so = 'source-over';\r\n\r\n output[modes.NORMAL] = so;\r\n output[modes.ADD] = 'lighter';\r\n output[modes.MULTIPLY] = (useNew) ? 'multiply' : so;\r\n output[modes.SCREEN] = (useNew) ? 'screen' : so;\r\n output[modes.OVERLAY] = (useNew) ? 'overlay' : so;\r\n output[modes.DARKEN] = (useNew) ? 'darken' : so;\r\n output[modes.LIGHTEN] = (useNew) ? 'lighten' : so;\r\n output[modes.COLOR_DODGE] = (useNew) ? 'color-dodge' : so;\r\n output[modes.COLOR_BURN] = (useNew) ? 'color-burn' : so;\r\n output[modes.HARD_LIGHT] = (useNew) ? 'hard-light' : so;\r\n output[modes.SOFT_LIGHT] = (useNew) ? 'soft-light' : so;\r\n output[modes.DIFFERENCE] = (useNew) ? 'difference' : so;\r\n output[modes.EXCLUSION] = (useNew) ? 'exclusion' : so;\r\n output[modes.HUE] = (useNew) ? 'hue' : so;\r\n output[modes.SATURATION] = (useNew) ? 'saturation' : so;\r\n output[modes.COLOR] = (useNew) ? 'color' : so;\r\n output[modes.LUMINOSITY] = (useNew) ? 'luminosity' : so;\r\n output[modes.ERASE] = 'destination-out';\r\n output[modes.SOURCE_IN] = 'source-in';\r\n output[modes.SOURCE_OUT] = 'source-out';\r\n output[modes.SOURCE_ATOP] = 'source-atop';\r\n output[modes.DESTINATION_OVER] = 'destination-over';\r\n output[modes.DESTINATION_IN] = 'destination-in';\r\n output[modes.DESTINATION_OUT] = 'destination-out';\r\n output[modes.DESTINATION_ATOP] = 'destination-atop';\r\n output[modes.LIGHTER] = 'lighter';\r\n output[modes.COPY] = 'copy';\r\n output[modes.XOR] = 'xor';\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetBlendModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js?")},"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix\r\n * and then performs the following steps:\r\n * \r\n * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts.\r\n * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given.\r\n * 3. Sets the blend mode of the context to be that used by the Game Object.\r\n * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.\r\n * 5. Saves the context state.\r\n * 6. Sets the final matrix values into the context via setTransform.\r\n * \r\n * This function is only meant to be used internally. Most of the Canvas Renderer classes use it.\r\n *\r\n * @function Phaser.Renderer.Canvas.SetTransform\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on.\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering.\r\n * \r\n * @return {boolean} `true` if the Game Object context was set, otherwise `false`.\r\n */\r\nvar SetTransform = function (renderer, ctx, src, camera, parentMatrix)\r\n{\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n // Nothing to see, so don't waste time calculating stuff\r\n return false;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix);\r\n var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n gameObjectMatrix.e = src.x;\r\n gameObjectMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n // Alpha\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.save();\r\n\r\n calcMatrix.setToContext(ctx);\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = SetTransform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js?")},"./node_modules/phaser/src/renderer/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Renderer\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/renderer/canvas/index.js"),\r\n Snapshot: __webpack_require__(/*! ./snapshot */ "./node_modules/phaser/src/renderer/snapshot/index.js"),\r\n WebGL: __webpack_require__(/*! ./webgl */ "./node_modules/phaser/src/renderer/webgl/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/index.js?')},"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.Canvas\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar CanvasSnapshot = function (canvas, config)\r\n{\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = Math.abs(Math.round(GetFastValue(config, 'x', 0)));\r\n var y = Math.abs(Math.round(GetFastValue(config, 'y', 0)));\r\n var width = GetFastValue(config, 'width', canvas.width);\r\n var height = GetFastValue(config, 'height', canvas.height);\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n if (getPixel)\r\n {\r\n var context = canvas.getContext('2d');\r\n var imageData = context.getImageData(x, y, 1, 1);\r\n var data = imageData.data;\r\n\r\n callback.call(null, new Color(data[0], data[1], data[2], data[3] / 255));\r\n }\r\n else if (x !== 0 || y !== 0 || width !== canvas.width || height !== canvas.height)\r\n {\r\n // Area Grab\r\n var copyCanvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = copyCanvas.getContext('2d');\r\n\r\n ctx.drawImage(canvas, x, y, width, height, 0, 0, width, height);\r\n\r\n var image1 = new Image();\r\n \r\n image1.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.onload = function ()\r\n {\r\n callback.call(null, image1);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.src = copyCanvas.toDataURL(type, encoderOptions);\r\n }\r\n else\r\n {\r\n // Full Grab\r\n var image2 = new Image();\r\n \r\n image2.onerror = function ()\r\n {\r\n callback.call(null);\r\n };\r\n\r\n image2.onload = function ()\r\n {\r\n callback.call(null, image2);\r\n };\r\n\r\n image2.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = CanvasSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a WebGL canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.WebGL\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar WebGLSnapshot = function (sourceCanvas, config)\r\n{\r\n var gl = sourceCanvas.getContext('experimental-webgl');\r\n\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = GetFastValue(config, 'x', 0);\r\n var y = GetFastValue(config, 'y', 0);\r\n\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n var isFramebuffer = GetFastValue(config, 'isFramebuffer', false);\r\n\r\n var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth;\r\n var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight;\r\n\r\n if (getPixel)\r\n {\r\n var pixel = new Uint8Array(4);\r\n\r\n var destY = (isFramebuffer) ? y : bufferHeight - y;\r\n\r\n gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);\r\n\r\n callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255));\r\n }\r\n else\r\n {\r\n var width = GetFastValue(config, 'width', bufferWidth);\r\n var height = GetFastValue(config, 'height', bufferHeight);\r\n\r\n var total = width * height * 4;\r\n\r\n var pixels = new Uint8Array(total);\r\n\r\n gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\r\n \r\n var canvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n var imageData = ctx.getImageData(0, 0, width, height);\r\n \r\n var data = imageData.data;\r\n\r\n for (var py = 0; py < height; py++)\r\n {\r\n for (var px = 0; px < width; px++)\r\n {\r\n var sourceIndex = ((height - py) * width + px) * 4;\r\n var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4;\r\n\r\n data[destIndex + 0] = pixels[sourceIndex + 0];\r\n data[destIndex + 1] = pixels[sourceIndex + 1];\r\n data[destIndex + 2] = pixels[sourceIndex + 2];\r\n data[destIndex + 3] = pixels[sourceIndex + 3];\r\n }\r\n }\r\n\r\n ctx.putImageData(imageData, 0, 0);\r\n \r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n callback.call(null, image);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = WebGLSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Snapshot\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./CanvasSnapshot */ "./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js"),\r\n WebGL: __webpack_require__(/*! ./WebGLSnapshot */ "./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/index.js?')},"./node_modules/phaser/src/renderer/webgl/Utils.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Utils\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Packs four floats on a range from 0.0 to 1.0 into a single Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats\r\n * @since 3.0.0\r\n * \r\n * @param {number} r - Red component in a range from 0.0 to 1.0 \r\n * @param {number} g - Green component in a range from 0.0 to 1.0\r\n * @param {number} b - Blue component in a range from 0.0 to 1.0\r\n * @param {number} a - Alpha component in a range from 0.0 to 1.0\r\n * \r\n * @return {number} [description]\r\n */\r\n getTintFromFloats: function (r, g, b, a)\r\n {\r\n var ur = ((r * 255.0)|0) & 0xFF;\r\n var ug = ((g * 255.0)|0) & 0xFF;\r\n var ub = ((b * 255.0)|0) & 0xFF;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlpha: function (rgb, a)\r\n {\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n return ((ua << 24) | rgb) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a \r\n * swizzled Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlphaAndSwap: function (rgb, a)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0;\r\n },\r\n\r\n /**\r\n * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - RGB packed as a Uint24\r\n * \r\n * @return {array} Array of floats representing each component as a float \r\n */\r\n getFloatsFromUintRGB: function (rgb)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n\r\n return [ ur / 255.0, ug / 255.0, ub / 255.0 ];\r\n },\r\n\r\n /**\r\n * Counts how many attributes of 32 bits a vertex has\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getComponentCount\r\n * @since 3.0.0\r\n * \r\n * @param {array} attributes - Array of attributes \r\n * @param {WebGLRenderingContext} glContext - WebGLContext used for check types\r\n * \r\n * @return {number} Count of 32 bit attributes in vertex\r\n */\r\n getComponentCount: function (attributes, glContext)\r\n {\r\n var count = 0;\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n \r\n if (element.type === glContext.FLOAT)\r\n {\r\n count += element.size;\r\n }\r\n else\r\n {\r\n count += 1; // We'll force any other type to be 32 bit. for now\r\n }\r\n }\r\n\r\n return count;\r\n }\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/Utils.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * WebGLPipeline is a class that describes the way elements will be rendererd\r\n * in WebGL, specially focused on batching vertices (batching is not provided).\r\n * Pipelines are mostly used for describing 2D rendering passes but it's\r\n * flexible enough to be used for any type of rendering including 3D.\r\n * Internally WebGLPipeline will handle things like compiling shaders,\r\n * creating vertex buffers, assigning primitive topology and binding\r\n * vertex attributes.\r\n *\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - gl: Current WebGL context.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n * - vertices: An optional buffer of vertices\r\n * - attributes: An array describing the vertex attributes\r\n *\r\n * The vertex attributes properties are:\r\n * - name : String - Name of the attribute in the vertex shader\r\n * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1\r\n * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT)\r\n * - normalized : boolean - Is the attribute normalized\r\n * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C\r\n * Here you can find more information of how to describe an attribute:\r\n * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer\r\n *\r\n * @class WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for this WebGL Pipeline, as described above.\r\n */\r\nvar WebGLPipeline = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLPipeline (config)\r\n {\r\n /**\r\n * Name of the Pipeline. Used for identifying\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'WebGLPipeline';\r\n\r\n /**\r\n * The Game which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = config.game;\r\n\r\n /**\r\n * The canvas which this WebGL Pipeline renders to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#view\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.view = config.game.canvas;\r\n\r\n /**\r\n * Used to store the current game resolution\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Width of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * Height of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The WebGL context this WebGL Pipeline uses.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.0.0\r\n */\r\n this.gl = config.gl;\r\n\r\n /**\r\n * How many vertices have been fed to the current pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = 0;\r\n\r\n /**\r\n * The limit of vertices that the pipeline can hold\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexCapacity = config.vertexCapacity;\r\n\r\n /**\r\n * The WebGL Renderer which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer\r\n * @type {Phaser.Renderer.WebGL.WebGLRenderer}\r\n * @since 3.0.0\r\n */\r\n this.renderer = config.renderer;\r\n\r\n /**\r\n * Raw byte buffer of vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize));\r\n\r\n /**\r\n * The handle to a WebGL vertex buffer object.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The handle to a WebGL program\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#program\r\n * @type {WebGLProgram}\r\n * @since 3.0.0\r\n */\r\n this.program = this.renderer.createProgram(config.vertShader, config.fragShader);\r\n\r\n /**\r\n * Array of objects that describe the vertex attributes\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.attributes = config.attributes;\r\n\r\n /**\r\n * The size in bytes of the vertex\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexSize = config.vertexSize;\r\n\r\n /**\r\n * The primitive topology which the pipeline will use to submit draw calls\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#topology\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.topology = config.topology;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources\r\n * to the GPU.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes\r\n * @type {Uint8Array}\r\n * @since 3.0.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * This will store the amount of components of 32 bit length\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl);\r\n\r\n /**\r\n * Indicates if the current pipeline is flushing the contents to the GPU.\r\n * When the variable is set the flush function will be locked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked\r\n * @type {boolean}\r\n * @since 3.1.0\r\n */\r\n this.flushLocked = false;\r\n\r\n /**\r\n * Indicates if the current pipeline is active or not for this frame only.\r\n * Reset in the onRender method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n *\r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#boot\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Adds a description of vertex attribute to the pipeline\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - Name of the vertex attribute\r\n * @param {integer} size - Vertex component size\r\n * @param {integer} type - Type of the attribute\r\n * @param {boolean} normalized - Is the value normalized to a range\r\n * @param {integer} offset - Byte offset to the beginning of the first element in the vertex\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n addAttribute: function (name, size, type, normalized, offset)\r\n {\r\n this.attributes.push({\r\n name: name,\r\n size: size,\r\n type: this.renderer.glFormats[type],\r\n normalized: normalized,\r\n offset: offset\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the current batch of vertices is full.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the current batch should be flushed, otherwise `false`.\r\n */\r\n shouldFlush: function ()\r\n {\r\n return (this.vertexCount >= this.vertexCapacity);\r\n },\r\n\r\n /**\r\n * Resizes the properties used to describe the viewport\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width of this WebGL Pipeline.\r\n * @param {number} height - The new height of this WebGL Pipeline.\r\n * @param {number} resolution - The resolution this WebGL Pipeline should be resized to.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n this.width = width * resolution;\r\n this.height = height * resolution;\r\n this.resolution = resolution;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds the pipeline resources, including programs, vertex buffers and binds attributes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#bind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n bind: function ()\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var attributes = this.attributes;\r\n var program = this.program;\r\n var renderer = this.renderer;\r\n var vertexSize = this.vertexSize;\r\n\r\n renderer.setProgram(program);\r\n renderer.setVertexBuffer(vertexBuffer);\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n var location = gl.getAttribLocation(program, element.name);\r\n\r\n if (location >= 0)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset);\r\n }\r\n else if (location !== -1)\r\n {\r\n gl.disableVertexAttribArray(location);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whenever this WebGL Pipeline is bound to a WebGL Renderer.\r\n *\r\n * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n // This is for updating uniform data it's called on each bind attempt.\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before each frame is rendered, but after the canvas has been cleared.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPreRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before a Scene's Camera is rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function ()\r\n {\r\n // called for each camera\r\n return this;\r\n },\r\n\r\n /**\r\n * Called after each frame has been completely rendered and snapshots have been taken.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPostRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call\r\n * for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked) { return this; }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n\r\n if (vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n return;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n gl.drawArrays(topology, 0, vertexCount);\r\n\r\n this.vertexCount = 0;\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n destroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n delete this.program;\r\n delete this.vertexBuffer;\r\n delete this.gl;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new value of the `float` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1: function (name, x)\r\n {\r\n this.renderer.setFloat1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec2` uniform.\r\n * @param {number} y - The new Y component of the `vec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2: function (name, x, y)\r\n {\r\n this.renderer.setFloat2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec3` uniform.\r\n * @param {number} y - The new Y component of the `vec3` uniform.\r\n * @param {number} z - The new Z component of the `vec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3: function (name, x, y, z)\r\n {\r\n this.renderer.setFloat3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component of the uniform\r\n * @param {number} y - Y component of the uniform\r\n * @param {number} z - Z component of the uniform\r\n * @param {number} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setFloat4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1v: function (name, arr)\r\n {\r\n this.renderer.setFloat1v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2v: function (name, arr)\r\n {\r\n this.renderer.setFloat2v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3v: function (name, arr)\r\n {\r\n this.renderer.setFloat3v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4v: function (name, arr)\r\n {\r\n this.renderer.setFloat4v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new value of the `int` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt1: function (name, x)\r\n {\r\n this.renderer.setInt1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec2` uniform.\r\n * @param {integer} y - The new Y component of the `ivec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt2: function (name, x, y)\r\n {\r\n this.renderer.setInt2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec3` uniform.\r\n * @param {integer} y - The new Y component of the `ivec3` uniform.\r\n * @param {integer} z - The new Z component of the `ivec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt3: function (name, x, y, z)\r\n {\r\n this.renderer.setInt3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component of the uniform\r\n * @param {integer} y - Y component of the uniform\r\n * @param {integer} z - Z component of the uniform\r\n * @param {integer} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setInt4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix2: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix2(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix3: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix3(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Should the matrix be transpose\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix4: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix4(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../../math/pow2/IsSizePowerOfTwo */ \"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar TextureEvents = __webpack_require__(/*! ../../textures/events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLSnapshot = __webpack_require__(/*! ../snapshot/WebGLSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js\");\r\n\r\n// Default Pipelines\r\nvar BitmapMaskPipeline = __webpack_require__(/*! ./pipelines/BitmapMaskPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js\");\r\nvar ForwardDiffuseLightPipeline = __webpack_require__(/*! ./pipelines/ForwardDiffuseLightPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./pipelines/TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\n/**\r\n * @callback WebGLContextCallback\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer which owns the context.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * WebGLRenderer is a class that contains the needed functionality to keep the\r\n * WebGLRenderingContext state clean. The main idea of the WebGLRenderer is to keep track of\r\n * any context change that happens for WebGL rendering inside of Phaser. This means\r\n * if raw webgl functions are called outside the WebGLRenderer of the Phaser WebGL\r\n * rendering ecosystem they might pollute the current WebGLRenderingContext state producing\r\n * unexpected behavior. It's recommended that WebGL interaction is done through\r\n * WebGLRenderer and/or WebGLPipeline.\r\n *\r\n * @class WebGLRenderer\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance which owns this WebGL Renderer.\r\n */\r\nvar WebGLRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLRenderer (game)\r\n {\r\n var gameConfig = game.config;\r\n\r\n var contextCreationConfig = {\r\n alpha: gameConfig.transparent,\r\n desynchronized: gameConfig.desynchronized,\r\n depth: false,\r\n antialias: gameConfig.antialias,\r\n premultipliedAlpha: gameConfig.premultipliedAlpha,\r\n stencil: true,\r\n failIfMajorPerformanceCaveat: gameConfig.failIfMajorPerformanceCaveat,\r\n powerPreference: gameConfig.powerPreference\r\n };\r\n\r\n /**\r\n * The local configuration settings of this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: gameConfig.clearBeforeRender,\r\n antialias: gameConfig.antialias,\r\n backgroundColor: gameConfig.backgroundColor,\r\n contextCreation: contextCreationConfig,\r\n resolution: gameConfig.resolution,\r\n roundPixels: gameConfig.roundPixels,\r\n maxTextures: gameConfig.maxTextures,\r\n maxTextureSize: gameConfig.maxTextureSize,\r\n batchSize: gameConfig.batchSize,\r\n maxLights: gameConfig.maxLights\r\n };\r\n\r\n /**\r\n * The Game instance which owns this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.WEBGL;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The canvas which this WebGL Renderer draws to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = game.canvas;\r\n\r\n /**\r\n * An array of blend modes supported by the WebGL Renderer.\r\n * \r\n * This array includes the default blend modes as well as any custom blend modes added through {@link #addBlendMode}.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blendModes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.blendModes = [];\r\n\r\n /**\r\n * Keeps track of any WebGLTexture created with the current WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nativeTextures\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.nativeTextures = [];\r\n\r\n /**\r\n * This property is set to `true` if the WebGL context of the renderer is lost.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLost\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.contextLost = false;\r\n\r\n /**\r\n * This object will store all pipelines created through addPipeline\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pipelines = null;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.0.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92,\r\n isFramebuffer: false,\r\n bufferWidth: 0,\r\n bufferHeight: 0\r\n };\r\n\r\n // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc)\r\n\r\n /**\r\n * Cached value for the last texture unit that was used\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit\r\n * @type {integer}\r\n * @since 3.1.0\r\n */\r\n this.currentActiveTextureUnit = 0;\r\n\r\n /**\r\n * An array of the last texture handles that were bound to the WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentTextures\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.currentTextures = new Array(16);\r\n\r\n /**\r\n * Current framebuffer in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFramebuffer = null;\r\n\r\n /**\r\n * Current WebGLPipeline in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentPipeline = null;\r\n\r\n /**\r\n * Current WebGLProgram in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram\r\n * @type {WebGLProgram}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentProgram = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Vertex buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentVertexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentVertexBuffer = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Index buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentIndexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentIndexBuffer = null;\r\n\r\n /**\r\n * Current blend mode in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentBlendMode = Infinity;\r\n\r\n /**\r\n * Indicates if the the scissor state is enabled in WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissorEnabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.currentScissorEnabled = false;\r\n\r\n /**\r\n * Stores the current scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissor\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.currentScissor = null;\r\n\r\n /**\r\n * Stack of scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#scissorStack\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.scissorStack = [];\r\n\r\n /**\r\n * The handler to invoke when the context is lost.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLostHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextLostHandler = NOOP;\r\n\r\n /**\r\n * The handler to invoke when the context is restored.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextRestoredHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextRestoredHandler = NOOP;\r\n\r\n /**\r\n * The underlying WebGL context of the renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * Array of strings that indicate which WebGL extensions are supported by the browser\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.supportedExtensions = null;\r\n\r\n /**\r\n * Extensions loaded into the current context\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#extensions\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.extensions = {};\r\n\r\n /**\r\n * Stores the current WebGL component formats for further use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFormats\r\n * @type {array}\r\n * @default []\r\n * @since 3.2.0\r\n */\r\n this.glFormats = [];\r\n\r\n /**\r\n * Stores the supported WebGL texture compression formats.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#compression\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this.compression = {\r\n ETC1: false,\r\n PVRTC: false,\r\n S3TC: false\r\n };\r\n\r\n /**\r\n * Cached drawing buffer height to reduce gl calls.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#drawingBufferHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.drawingBufferHeight = 0;\r\n\r\n /**\r\n * A blank 32x32 transparent texture, as used by the Graphics system where needed.\r\n * This is set in the `boot` method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blankTexture\r\n * @type {WebGLTexture}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.blankTexture = null;\r\n\r\n /**\r\n * A default Camera used in calls when no other camera has been provided.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#defaultCamera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.defaultCamera = new BaseCamera(0, 0, 0, 0);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * The total number of masks currently stacked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskCount\r\n * @type {integer}\r\n * @since 3.17.0\r\n */\r\n this.maskCount = 0;\r\n\r\n /**\r\n * The mask stack.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskStack\r\n * @type {Phaser.Display.Masks.GeometryMask[]}\r\n * @since 3.17.0\r\n */\r\n this.maskStack = [];\r\n\r\n /**\r\n * Internal property that tracks the currently set mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal property that tracks the currently set camera mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentCameraMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentCameraMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal gl function mapping for uniform look-up.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/uniform\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFuncMap\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.glFuncMap = null;\r\n\r\n /**\r\n * The `type` of the Game Object being currently rendered.\r\n * This can be used by advanced render functions for batching look-ahead.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentType\r\n * @type {string}\r\n * @since 3.19.0\r\n */\r\n this.currentType = '';\r\n\r\n /**\r\n * Is the `type` of the Game Object being currently rendered different than the\r\n * type of the object before it in the display list? I.e. it's a 'new' type.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#newType\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.newType = false;\r\n\r\n /**\r\n * Does the `type` of the next Game Object in the display list match that\r\n * of the object being currently rendered?\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nextTypeMatch\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.nextTypeMatch = false;\r\n\r\n this.init(this.config);\r\n },\r\n\r\n /**\r\n * Creates a new WebGLRenderingContext and initializes all internal state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#init\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n init: function (config)\r\n {\r\n var gl;\r\n var game = this.game;\r\n var canvas = this.canvas;\r\n var clearColor = config.backgroundColor;\r\n\r\n // Did they provide their own context?\r\n if (game.config.context)\r\n {\r\n gl = game.config.context;\r\n }\r\n else\r\n {\r\n gl = canvas.getContext('webgl', config.contextCreation) || canvas.getContext('experimental-webgl', config.contextCreation);\r\n }\r\n\r\n if (!gl || gl.isContextLost())\r\n {\r\n this.contextLost = true;\r\n\r\n throw new Error('WebGL unsupported');\r\n }\r\n\r\n this.gl = gl;\r\n\r\n var _this = this;\r\n\r\n this.contextLostHandler = function (event)\r\n {\r\n _this.contextLost = true;\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_LOST, _this);\r\n\r\n event.preventDefault();\r\n };\r\n\r\n this.contextRestoredHandler = function ()\r\n {\r\n _this.contextLost = false;\r\n\r\n _this.init(_this.config);\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_RESTORED, _this);\r\n };\r\n\r\n canvas.addEventListener('webglcontextlost', this.contextLostHandler, false);\r\n canvas.addEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n // Set it back into the Game, so developers can access it from there too\r\n game.context = gl;\r\n\r\n for (var i = 0; i <= 27; i++)\r\n {\r\n this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD });\r\n }\r\n\r\n // ADD\r\n this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ];\r\n\r\n // MULTIPLY\r\n this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ];\r\n\r\n // SCREEN\r\n this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ];\r\n\r\n // ERASE\r\n this.blendModes[17] = { func: [ gl.ZERO, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_REVERSE_SUBTRACT };\r\n\r\n this.glFormats[0] = gl.BYTE;\r\n this.glFormats[1] = gl.SHORT;\r\n this.glFormats[2] = gl.UNSIGNED_BYTE;\r\n this.glFormats[3] = gl.UNSIGNED_SHORT;\r\n this.glFormats[4] = gl.FLOAT;\r\n\r\n // Set the gl function map\r\n this.glFuncMap = {\r\n\r\n mat2: { func: gl.uniformMatrix2fv, length: 1, matrix: true },\r\n mat3: { func: gl.uniformMatrix3fv, length: 1, matrix: true },\r\n mat4: { func: gl.uniformMatrix4fv, length: 1, matrix: true },\r\n\r\n '1f': { func: gl.uniform1f, length: 1 },\r\n '1fv': { func: gl.uniform1fv, length: 1 },\r\n '1i': { func: gl.uniform1i, length: 1 },\r\n '1iv': { func: gl.uniform1iv, length: 1 },\r\n\r\n '2f': { func: gl.uniform2f, length: 2 },\r\n '2fv': { func: gl.uniform2fv, length: 1 },\r\n '2i': { func: gl.uniform2i, length: 2 },\r\n '2iv': { func: gl.uniform2iv, length: 1 },\r\n\r\n '3f': { func: gl.uniform3f, length: 3 },\r\n '3fv': { func: gl.uniform3fv, length: 1 },\r\n '3i': { func: gl.uniform3i, length: 3 },\r\n '3iv': { func: gl.uniform3iv, length: 1 },\r\n\r\n '4f': { func: gl.uniform4f, length: 4 },\r\n '4fv': { func: gl.uniform4fv, length: 1 },\r\n '4i': { func: gl.uniform4i, length: 4 },\r\n '4iv': { func: gl.uniform4iv, length: 1 }\r\n\r\n };\r\n\r\n // Load supported extensions\r\n var exts = gl.getSupportedExtensions();\r\n\r\n if (!config.maxTextures)\r\n {\r\n config.maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\r\n }\r\n\r\n if (!config.maxTextureSize)\r\n {\r\n config.maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\r\n }\r\n\r\n var extString = 'WEBGL_compressed_texture_';\r\n var wkExtString = 'WEBKIT_' + extString;\r\n\r\n this.compression.ETC1 = gl.getExtension(extString + 'etc1') || gl.getExtension(wkExtString + 'etc1');\r\n this.compression.PVRTC = gl.getExtension(extString + 'pvrtc') || gl.getExtension(wkExtString + 'pvrtc');\r\n this.compression.S3TC = gl.getExtension(extString + 's3tc') || gl.getExtension(wkExtString + 's3tc');\r\n\r\n this.supportedExtensions = exts;\r\n\r\n // Setup initial WebGL state\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n gl.enable(gl.BLEND);\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n // Initialize all textures to null\r\n for (var index = 0; index < this.currentTextures.length; ++index)\r\n {\r\n this.currentTextures[index] = null;\r\n }\r\n\r\n // Clear previous pipelines and reload default ones\r\n this.pipelines = {};\r\n\r\n this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this }));\r\n this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this }));\r\n this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights }));\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n game.textures.once(TextureEvents.READY, this.boot, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal boot handler. Calls 'boot' on each pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#boot\r\n * @private\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n for (var pipelineName in this.pipelines)\r\n {\r\n this.pipelines[pipelineName].boot();\r\n }\r\n\r\n var blank = this.game.textures.getFrame('__DEFAULT');\r\n\r\n this.pipelines.TextureTintPipeline.currentFrame = blank;\r\n\r\n this.blankTexture = blank;\r\n\r\n var gl = this.gl;\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height, this.game.scale.resolution);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height || resolution !== this.resolution)\r\n {\r\n this.resize(baseSize.width, baseSize.height, resolution);\r\n }\r\n },\r\n\r\n /**\r\n * Resizes the drawing buffer to match that required by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n * @param {number} [resolution] - The new resolution of the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n this.width = width;\r\n this.height = height;\r\n this.resolution = resolution;\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n // Update all registered pipelines\r\n for (var pipelineName in pipelines)\r\n {\r\n pipelines[pipelineName].resize(width, height, resolution);\r\n }\r\n\r\n this.drawingBufferHeight = gl.drawingBufferHeight;\r\n\r\n gl.scissor(0, (gl.drawingBufferHeight - height), width, height);\r\n\r\n this.defaultCamera.setSize(width, height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a WebGL extension is supported\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - Name of the WebGL extension\r\n *\r\n * @return {boolean} `true` if the extension is supported, otherwise `false`.\r\n */\r\n hasExtension: function (extensionName)\r\n {\r\n return this.supportedExtensions ? this.supportedExtensions.indexOf(extensionName) : false;\r\n },\r\n\r\n /**\r\n * Loads a WebGL extension\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - The name of the extension to load.\r\n *\r\n * @return {object} WebGL extension if the extension is supported\r\n */\r\n getExtension: function (extensionName)\r\n {\r\n if (!this.hasExtension(extensionName)) { return null; }\r\n\r\n if (!(extensionName in this.extensions))\r\n {\r\n this.extensions[extensionName] = this.gl.getExtension(extensionName);\r\n }\r\n\r\n return this.extensions[extensionName];\r\n },\r\n\r\n /**\r\n * Flushes the current pipeline if the pipeline is bound\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#flush\r\n * @since 3.0.0\r\n */\r\n flush: function ()\r\n {\r\n if (this.currentPipeline)\r\n {\r\n this.currentPipeline.flush();\r\n }\r\n },\r\n\r\n /**\r\n * Checks if a pipeline is present in the current WebGLRenderer\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`.\r\n */\r\n hasPipeline: function (pipelineName)\r\n {\r\n return (pipelineName in this.pipelines);\r\n },\r\n\r\n /**\r\n * Returns the pipeline by name if the pipeline exists\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found.\r\n */\r\n getPipeline: function (pipelineName)\r\n {\r\n return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null;\r\n },\r\n\r\n /**\r\n * Removes a pipeline by name.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removePipeline: function (pipelineName)\r\n {\r\n delete this.pipelines[pipelineName];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a pipeline instance into the collection of pipelines\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - A unique string-based key for the pipeline.\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed.\r\n */\r\n addPipeline: function (pipelineName, pipelineInstance)\r\n {\r\n if (!this.hasPipeline(pipelineName))\r\n {\r\n this.pipelines[pipelineName] = pipelineInstance;\r\n }\r\n else\r\n {\r\n console.warn('Pipeline exists: ' + pipelineName);\r\n }\r\n\r\n pipelineInstance.name = pipelineName;\r\n\r\n this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution);\r\n\r\n return pipelineInstance;\r\n },\r\n\r\n /**\r\n * Pushes a new scissor state. This is used to set nested scissor states.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n *\r\n * @return {integer[]} An array containing the scissor values.\r\n */\r\n pushScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var scissorStack = this.scissorStack;\r\n\r\n var scissor = [ x, y, width, height ];\r\n\r\n scissorStack.push(scissor);\r\n\r\n this.setScissor(x, y, width, height, drawingBufferHeight);\r\n\r\n this.currentScissor = scissor;\r\n\r\n return scissor;\r\n },\r\n\r\n /**\r\n * Sets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor\r\n * @since 3.0.0\r\n * \r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n */\r\n setScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var gl = this.gl;\r\n\r\n var current = this.currentScissor;\r\n\r\n var setScissor = (width > 0 && height > 0);\r\n\r\n if (current && setScissor)\r\n {\r\n var cx = current[0];\r\n var cy = current[1];\r\n var cw = current[2];\r\n var ch = current[3];\r\n\r\n setScissor = (cx !== x || cy !== y || cw !== width || ch !== height);\r\n }\r\n\r\n if (setScissor)\r\n {\r\n this.flush();\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/scissor\r\n gl.scissor(x, (drawingBufferHeight - y - height), width, height);\r\n }\r\n },\r\n\r\n /**\r\n * Pops the last scissor state and sets it.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#popScissor\r\n * @since 3.0.0\r\n */\r\n popScissor: function ()\r\n {\r\n var scissorStack = this.scissorStack;\r\n\r\n // Remove the current scissor\r\n scissorStack.pop();\r\n\r\n // Reset the previous scissor\r\n var scissor = scissorStack[scissorStack.length - 1];\r\n\r\n if (scissor)\r\n {\r\n this.setScissor(scissor[0], scissor[1], scissor[2], scissor[3]);\r\n }\r\n\r\n this.currentScissor = scissor;\r\n },\r\n\r\n /**\r\n * Binds a WebGLPipeline and sets it as the current pipeline to be used.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated.\r\n */\r\n setPipeline: function (pipelineInstance, gameObject)\r\n {\r\n if (this.currentPipeline !== pipelineInstance ||\r\n this.currentPipeline.vertexBuffer !== this.currentVertexBuffer ||\r\n this.currentPipeline.program !== this.currentProgram)\r\n {\r\n this.flush();\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n }\r\n\r\n this.currentPipeline.onBind(gameObject);\r\n\r\n return this.currentPipeline;\r\n },\r\n\r\n /**\r\n * Is there an active stencil mask?\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasActiveStencilMask\r\n * @since 3.17.0\r\n * \r\n * @return {boolean} `true` if there is an active stencil mask, otherwise `false`.\r\n */\r\n hasActiveStencilMask: function ()\r\n {\r\n var mask = this.currentMask.mask;\r\n var camMask = this.currentCameraMask.mask;\r\n\r\n return ((mask && mask.isStencil) || (camMask && camMask.isStencil));\r\n },\r\n\r\n /**\r\n * Use this to reset the gl context to the state that Phaser requires to continue rendering.\r\n * Calling this will:\r\n * \r\n * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`.\r\n * * Clear the depth buffer and stencil buffers.\r\n * * Reset the viewport size.\r\n * * Reset the blend mode.\r\n * * Bind a blank texture as the active texture on texture unit zero.\r\n * * Rebinds the given pipeline instance.\r\n * \r\n * You should call this having previously called `clearPipeline` and then wishing to return\r\n * control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n */\r\n rebindPipeline: function (pipelineInstance)\r\n {\r\n var gl = this.gl;\r\n\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n if (this.hasActiveStencilMask())\r\n {\r\n gl.clear(gl.DEPTH_BUFFER_BIT);\r\n }\r\n else\r\n {\r\n // If there wasn't a stencil mask set before this call, we can disable it safely\r\n gl.disable(gl.STENCIL_TEST);\r\n gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.viewport(0, 0, this.width, this.height);\r\n\r\n this.setBlendMode(0, true);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture);\r\n\r\n this.currentActiveTextureUnit = 0;\r\n this.currentTextures[0] = this.blankTexture.glTexture;\r\n\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n this.currentPipeline.onBind();\r\n },\r\n\r\n /**\r\n * Flushes the current WebGLPipeline being used and then clears it, along with the\r\n * the current shader program and vertex buffer. Then resets the blend mode to NORMAL.\r\n * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when\r\n * you wish to return control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline\r\n * @since 3.16.0\r\n */\r\n clearPipeline: function ()\r\n {\r\n this.flush();\r\n\r\n this.currentPipeline = null;\r\n this.currentProgram = null;\r\n this.currentVertexBuffer = null;\r\n this.currentIndexBuffer = null;\r\n\r\n this.setBlendMode(0, true);\r\n },\r\n\r\n /**\r\n * Sets the blend mode to the value given.\r\n *\r\n * If the current blend mode is different from the one given, the pipeline is flushed and the new\r\n * blend mode is enabled.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} blendModeId - The blend mode to be set. Can be a `BlendModes` const or an integer value.\r\n * @param {boolean} [force=false] - Force the blend mode to be set, regardless of the currently set blend mode.\r\n *\r\n * @return {boolean} `true` if the blend mode was changed as a result of this call, forcing a flush, otherwise `false`.\r\n */\r\n setBlendMode: function (blendModeId, force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n var gl = this.gl;\r\n var blendMode = this.blendModes[blendModeId];\r\n\r\n if (force || (blendModeId !== CONST.BlendModes.SKIP_CHECK && this.currentBlendMode !== blendModeId))\r\n {\r\n this.flush();\r\n\r\n gl.enable(gl.BLEND);\r\n gl.blendEquation(blendMode.equation);\r\n\r\n if (blendMode.func.length > 2)\r\n {\r\n gl.blendFuncSeparate(blendMode.func[0], blendMode.func[1], blendMode.func[2], blendMode.func[3]);\r\n }\r\n else\r\n {\r\n gl.blendFunc(blendMode.func[0], blendMode.func[1]);\r\n }\r\n\r\n this.currentBlendMode = blendModeId;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Creates a new custom blend mode for the renderer.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {GLenum[]} func - An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.\r\n * @param {GLenum} equation - The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.\r\n *\r\n * @return {integer} The index of the new blend mode, used for referencing it in the future.\r\n */\r\n addBlendMode: function (func, equation)\r\n {\r\n var index = this.blendModes.push({ func: func, equation: equation });\r\n\r\n return index - 1;\r\n },\r\n\r\n /**\r\n * Updates the function bound to a given custom blend mode.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#updateBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode.\r\n * @param {function} func - The function to use for the blend mode.\r\n * @param {function} equation - The equation to use for the blend mode.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n updateBlendMode: function (index, func, equation)\r\n {\r\n if (this.blendModes[index])\r\n {\r\n this.blendModes[index].func = func;\r\n\r\n if (equation)\r\n {\r\n this.blendModes[index].equation = equation;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a custom blend mode from the renderer.\r\n * Any Game Objects still using this blend mode will error, so be sure to clear them first.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removeBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removeBlendMode: function (index)\r\n {\r\n if (index > 17 && this.blendModes[index])\r\n {\r\n this.blendModes.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current active texture for texture unit zero to be a blank texture.\r\n * This only happens if there isn't a texture already in use by texture unit zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlankTexture\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [force=false] - Force a blank texture set, regardless of what's already bound?\r\n */\r\n setBlankTexture: function (force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n if (force || this.currentActiveTextureUnit !== 0 || !this.currentTextures[0])\r\n {\r\n this.setTexture2D(this.blankTexture.glTexture, 0);\r\n }\r\n },\r\n\r\n /**\r\n * Binds a texture at a texture unit. If a texture is already\r\n * bound to that unit it will force a flush on the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL texture that needs to be bound.\r\n * @param {integer} textureUnit - The texture unit to which the texture will be bound.\r\n * @param {boolean} [flush=true] - Will the current pipeline be flushed if this is a new texture, or not?\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setTexture2D: function (texture, textureUnit, flush)\r\n {\r\n if (flush === undefined) { flush = true; }\r\n\r\n var gl = this.gl;\r\n\r\n if (texture !== this.currentTextures[textureUnit])\r\n {\r\n if (flush)\r\n {\r\n this.flush();\r\n }\r\n\r\n if (this.currentActiveTextureUnit !== textureUnit)\r\n {\r\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\r\n\r\n this.currentActiveTextureUnit = textureUnit;\r\n }\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n\r\n this.currentTextures[textureUnit] = texture;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a framebuffer. If there was another framebuffer already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer that needs to be bound.\r\n * @param {boolean} [updateScissor=false] - If a framebuffer is given, set the gl scissor to match the frame buffer size? Or, if `null` given, pop the scissor from the stack.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setFramebuffer: function (framebuffer, updateScissor)\r\n {\r\n if (updateScissor === undefined) { updateScissor = false; }\r\n\r\n var gl = this.gl;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n if (framebuffer !== this.currentFramebuffer)\r\n {\r\n if (framebuffer && framebuffer.renderTexture)\r\n {\r\n width = framebuffer.renderTexture.width;\r\n height = framebuffer.renderTexture.height;\r\n }\r\n else\r\n {\r\n this.flush();\r\n }\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n if (updateScissor)\r\n {\r\n if (framebuffer)\r\n {\r\n this.drawingBufferHeight = height;\r\n\r\n this.pushScissor(0, 0, width, height);\r\n }\r\n else\r\n {\r\n this.drawingBufferHeight = this.height;\r\n\r\n this.popScissor();\r\n }\r\n }\r\n\r\n this.currentFramebuffer = framebuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a program. If there was another program already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The program that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setProgram: function (program)\r\n {\r\n var gl = this.gl;\r\n\r\n if (program !== this.currentProgram)\r\n {\r\n this.flush();\r\n\r\n gl.useProgram(program);\r\n\r\n this.currentProgram = program;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a vertex buffer. If there is a vertex buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The buffer that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setVertexBuffer: function (vertexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (vertexBuffer !== this.currentVertexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n this.currentVertexBuffer = vertexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a index buffer. If there is a index buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} indexBuffer - The buffer the needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setIndexBuffer: function (indexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (indexBuffer !== this.currentIndexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n\r\n this.currentIndexBuffer = indexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a texture from an image source. If the source is not valid it creates an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTextureFromSource\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source of the texture.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} scaleMode - The scale mode to be used by the texture.\r\n *\r\n * @return {?WebGLTexture} The WebGL Texture that was created, or `null` if it couldn't be created.\r\n */\r\n createTextureFromSource: function (source, width, height, scaleMode)\r\n {\r\n var gl = this.gl;\r\n var filter = gl.NEAREST;\r\n var wrap = gl.CLAMP_TO_EDGE;\r\n var texture = null;\r\n\r\n width = source ? source.width : width;\r\n height = source ? source.height : height;\r\n\r\n if (IsSizePowerOfTwo(width, height))\r\n {\r\n wrap = gl.REPEAT;\r\n }\r\n\r\n if (scaleMode === CONST.ScaleModes.LINEAR && this.config.antialias)\r\n {\r\n filter = gl.LINEAR;\r\n }\r\n\r\n if (!source && typeof width === 'number' && typeof height === 'number')\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n }\r\n else\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, source);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * A wrapper for creating a WebGLTexture. If no pixel data is passed it will create an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {integer} mipLevel - Mip level of the texture.\r\n * @param {integer} minFilter - Filtering of the texture.\r\n * @param {integer} magFilter - Filtering of the texture.\r\n * @param {integer} wrapT - Wrapping mode of the texture.\r\n * @param {integer} wrapS - Wrapping mode of the texture.\r\n * @param {integer} format - Which format does the texture use.\r\n * @param {object} pixels - pixel data.\r\n * @param {integer} width - Width of the texture in pixels.\r\n * @param {integer} height - Height of the texture in pixels.\r\n * @param {boolean} pma - Does the texture have premultiplied alpha?\r\n *\r\n * @return {WebGLTexture} The WebGLTexture that was created.\r\n */\r\n createTexture2D: function (mipLevel, minFilter, magFilter, wrapT, wrapS, format, pixels, width, height, pma)\r\n {\r\n pma = (pma === undefined || pma === null) ? true : pma;\r\n\r\n var gl = this.gl;\r\n var texture = gl.createTexture();\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, pma);\r\n\r\n if (pixels === null || pixels === undefined)\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, width, height, 0, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, format, gl.UNSIGNED_BYTE, pixels);\r\n\r\n width = pixels.width;\r\n height = pixels.height;\r\n }\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n texture.isAlphaPremultiplied = pma;\r\n texture.isRenderTexture = false;\r\n texture.width = width;\r\n texture.height = height;\r\n\r\n this.nativeTextures.push(texture);\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Wrapper for creating WebGLFramebuffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - Width in pixels of the framebuffer\r\n * @param {integer} height - Height in pixels of the framebuffer\r\n * @param {WebGLTexture} renderTexture - The color texture to where the color pixels are written\r\n * @param {boolean} addDepthStencilBuffer - Indicates if the current framebuffer support depth and stencil buffers\r\n *\r\n * @return {WebGLFramebuffer} Raw WebGLFramebuffer\r\n */\r\n createFramebuffer: function (width, height, renderTexture, addDepthStencilBuffer)\r\n {\r\n var gl = this.gl;\r\n var framebuffer = gl.createFramebuffer();\r\n var complete = 0;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n if (addDepthStencilBuffer)\r\n {\r\n var depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n\r\n renderTexture.isRenderTexture = true;\r\n renderTexture.isAlphaPremultiplied = false;\r\n\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, renderTexture, 0);\r\n\r\n complete = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n\r\n if (complete !== gl.FRAMEBUFFER_COMPLETE)\r\n {\r\n var errors = {\r\n 36054: 'Incomplete Attachment',\r\n 36055: 'Missing Attachment',\r\n 36057: 'Incomplete Dimensions',\r\n 36061: 'Framebuffer Unsupported'\r\n };\r\n\r\n throw new Error('Framebuffer incomplete. Framebuffer status: ' + errors[complete]);\r\n }\r\n\r\n framebuffer.renderTexture = renderTexture;\r\n\r\n this.setFramebuffer(null);\r\n\r\n return framebuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createProgram\r\n * @since 3.0.0\r\n *\r\n * @param {string} vertexShader - Source to the vertex shader\r\n * @param {string} fragmentShader - Source to the fragment shader\r\n *\r\n * @return {WebGLProgram} Raw WebGLProgram\r\n */\r\n createProgram: function (vertexShader, fragmentShader)\r\n {\r\n var gl = this.gl;\r\n var program = gl.createProgram();\r\n var vs = gl.createShader(gl.VERTEX_SHADER);\r\n var fs = gl.createShader(gl.FRAGMENT_SHADER);\r\n\r\n gl.shaderSource(vs, vertexShader);\r\n gl.shaderSource(fs, fragmentShader);\r\n gl.compileShader(vs);\r\n gl.compileShader(fs);\r\n\r\n if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Vertex Shader:\\n' + gl.getShaderInfoLog(vs));\r\n }\r\n if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Fragment Shader:\\n' + gl.getShaderInfoLog(fs));\r\n }\r\n\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS))\r\n {\r\n throw new Error('Failed to link program:\\n' + gl.getProgramInfoLog(program));\r\n }\r\n\r\n return program;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - It's either ArrayBuffer or an integer indicating the size of the vbo\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\r\n *\r\n * @return {WebGLBuffer} Raw vertex buffer\r\n */\r\n createVertexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = gl.createBuffer();\r\n\r\n this.setVertexBuffer(vertexBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setVertexBuffer(null);\r\n\r\n return vertexBuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - Either ArrayBuffer or an integer indicating the size of the vbo.\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.\r\n *\r\n * @return {WebGLBuffer} Raw index buffer\r\n */\r\n createIndexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var indexBuffer = gl.createBuffer();\r\n\r\n this.setIndexBuffer(indexBuffer);\r\n\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setIndexBuffer(null);\r\n\r\n return indexBuffer;\r\n },\r\n\r\n /**\r\n * Removes the given texture from the nativeTextures array and then deletes it from the GPU.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteTexture\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL Texture to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteTexture: function (texture)\r\n {\r\n var index = this.nativeTextures.indexOf(texture);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(this.nativeTextures, index);\r\n }\r\n\r\n this.gl.deleteTexture(texture);\r\n\r\n if (this.currentTextures[0] === texture && !this.game.pendingDestroy)\r\n {\r\n // texture we just deleted is in use, so bind a blank texture\r\n this.setBlankTexture(true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLFramebuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The Framebuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteFramebuffer: function (framebuffer)\r\n {\r\n this.gl.deleteFramebuffer(framebuffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLProgram from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The shader program to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteProgram: function (program)\r\n {\r\n this.gl.deleteProgram(program);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLBuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The WebGLBuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteBuffer: function (buffer)\r\n {\r\n this.gl.deleteBuffer(buffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the pre-render operations for the given camera.\r\n * Handles any clipping needed by the camera and renders the background color if a color is visible.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to pre-render.\r\n */\r\n preRenderCamera: function (camera)\r\n {\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n var color = camera.backgroundColor;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n this.flush();\r\n\r\n this.pushScissor(cx, cy, cw, -ch);\r\n\r\n this.setFramebuffer(camera.framebuffer);\r\n\r\n var gl = this.gl;\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n TextureTintPipeline.projOrtho(cx, cw + cx, cy, ch + cy, -1000, 1000);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw + cx, ch + cy,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n \r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n else\r\n {\r\n this.pushScissor(cx, cy, cw, ch);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw , ch,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n }\r\n },\r\n\r\n getCurrentStencilMask: function ()\r\n {\r\n var prev = null;\r\n var stack = this.maskStack;\r\n var cameraMask = this.currentCameraMask;\r\n\r\n if (stack.length > 0)\r\n {\r\n prev = stack[stack.length - 1];\r\n }\r\n else if (cameraMask.mask && cameraMask.mask.isStencil)\r\n {\r\n prev = cameraMask;\r\n }\r\n\r\n return prev;\r\n },\r\n\r\n /**\r\n * Controls the post-render operations for the given camera.\r\n * Renders the foreground camera effects like flash and fading. It resets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to post-render.\r\n */\r\n postRenderCamera: function (camera)\r\n {\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n\r\n camera.dirty = false;\r\n\r\n this.popScissor();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n TextureTintPipeline.flush();\r\n\r\n this.setFramebuffer(null);\r\n\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0);\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline;\r\n\r\n pipeline.batchTexture(\r\n camera,\r\n camera.glTexture,\r\n camera.width, camera.height,\r\n camera.x, camera.y,\r\n camera.width, camera.height,\r\n camera.zoom, camera.zoom,\r\n camera.rotation,\r\n camera.flipX, !camera.flipY,\r\n 1, 1,\r\n 0, 0,\r\n 0, 0, camera.width, camera.height,\r\n getTint(camera._tintTL, camera._alphaTL),\r\n getTint(camera._tintTR, camera._alphaTR),\r\n getTint(camera._tintBL, camera._alphaBL),\r\n getTint(camera._tintBR, camera._alphaBR),\r\n (camera._isTinted && camera.tintFill),\r\n 0, 0,\r\n this.defaultCamera,\r\n null\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it\r\n this.setBlankTexture(true);\r\n }\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = null;\r\n\r\n camera.mask.postRenderWebGL(this, camera._maskCamera);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the current vertex buffer and updates pipelines.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n // Make sure we are bound to the main frame buffer\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n if (this.config.clearBeforeRender)\r\n {\r\n var clearColor = this.config.backgroundColor;\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPreRender();\r\n }\r\n\r\n // TODO - Find a way to stop needing to create these arrays every frame\r\n // and equally not need a huge array buffer created to hold them\r\n\r\n this.currentScissor = [ 0, 0, this.width, this.height ];\r\n this.scissorStack = [ this.currentScissor ];\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n gl.scissor(0, (this.drawingBufferHeight - this.height), this.width, this.height);\r\n }\r\n\r\n this.currentMask.mask = null;\r\n this.currentCameraMask.mask = null;\r\n this.maskStack.length = 0;\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n },\r\n\r\n /**\r\n * The core render step for a Scene Camera.\r\n * \r\n * Iterates through the given Game Object's array and renders them with the given Camera.\r\n * \r\n * This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked\r\n * by the Scene Systems.render method.\r\n * \r\n * This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.GameObject} children - The Game Object's within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently un-used.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var list = children.list;\r\n var childCount = list.length;\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onRender(scene, camera);\r\n }\r\n\r\n // Apply scissor for cam region + render background color, if not transparent\r\n this.preRenderCamera(camera);\r\n\r\n // Nothing to render, so bail out\r\n if (childCount === 0)\r\n {\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n\r\n return;\r\n }\r\n\r\n // Reset the current type\r\n this.currentType = '';\r\n \r\n var current = this.currentMask;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.blendMode !== this.currentBlendMode)\r\n {\r\n this.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask && current.mask !== mask)\r\n {\r\n // Render out the previously set mask\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n if (mask && current.mask !== mask)\r\n {\r\n mask.preRenderWebGL(this, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== this.currentType)\r\n {\r\n this.newType = true;\r\n this.currentType = type;\r\n }\r\n\r\n this.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === this.currentType) : false;\r\n\r\n child.renderWebGL(this, child, interpolationPercentage, camera);\r\n\r\n this.newType = false;\r\n }\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask)\r\n {\r\n // Render out the previously set mask, if it was the last item in the display list\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n },\r\n\r\n /**\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n this.flush();\r\n\r\n // Unbind custom framebuffer here\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n }\r\n\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPostRender();\r\n }\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gl.drawingBufferWidth);\r\n state.height = Math.min(height, this.gl.drawingBufferHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given frame buffer.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotFramebuffer\r\n * @since 3.19.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer to grab from.\r\n * @param {integer} bufferWidth - The width of the framebuffer.\r\n * @param {integer} bufferHeight - The height of the framebuffer.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=bufferWidth] - The width of the area to grab.\r\n * @param {integer} [height=bufferHeight] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotFramebuffer: function (framebuffer, bufferWidth, bufferHeight, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = bufferWidth; }\r\n if (height === undefined) { height = bufferHeight; }\r\n\r\n var currentFramebuffer = this.currentFramebuffer;\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n state.isFramebuffer = true;\r\n state.bufferWidth = bufferWidth;\r\n state.bufferHeight = bufferHeight;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n this.setFramebuffer(currentFramebuffer);\r\n\r\n state.callback = null;\r\n state.isFramebuffer = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture based on the given canvas element.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#canvasToTexture\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} srcCanvas - The Canvas element that will be used to populate the texture.\r\n * @param {WebGLTexture} [dstTexture] - Is this going to replace an existing texture? If so, pass it here.\r\n * @param {boolean} [noRepeat=false] - Should this canvas never be allowed to set REPEAT? (such as for Text objects)\r\n *\r\n * @return {WebGLTexture} The newly created WebGL Texture.\r\n */\r\n canvasToTexture: function (srcCanvas, dstTexture, noRepeat)\r\n {\r\n if (noRepeat === undefined) { noRepeat = false; }\r\n\r\n var gl = this.gl;\r\n\r\n if (!dstTexture)\r\n {\r\n var wrapping = gl.CLAMP_TO_EDGE;\r\n\r\n if (!noRepeat && IsSizePowerOfTwo(srcCanvas.width, srcCanvas.height))\r\n {\r\n wrapping = gl.REPEAT;\r\n }\r\n\r\n var filter = (this.config.antialias) ? gl.LINEAR : gl.NEAREST;\r\n\r\n dstTexture = this.createTexture2D(0, filter, filter, wrapping, wrapping, gl.RGBA, srcCanvas, srcCanvas.width, srcCanvas.height, true);\r\n }\r\n else\r\n {\r\n this.setTexture2D(dstTexture, 0);\r\n\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas);\r\n\r\n dstTexture.width = srcCanvas.width;\r\n dstTexture.height = srcCanvas.height;\r\n\r\n this.setTexture2D(null, 0);\r\n }\r\n\r\n return dstTexture;\r\n },\r\n\r\n /**\r\n * Sets the minification and magnification filter for a texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter\r\n * @since 3.0.0\r\n *\r\n * @param {integer} texture - The texture to set the filter for.\r\n * @param {integer} filter - The filter to set. 0 for linear filtering, 1 for nearest neighbor (blocky) filtering.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setTextureFilter: function (texture, filter)\r\n {\r\n var gl = this.gl;\r\n var glFilter = [ gl.LINEAR, gl.NEAREST ][filter];\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter);\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1f(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2f(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3f(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component\r\n * @param {number} y - Y component\r\n * @param {number} z - Z component\r\n * @param {number} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4f(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n\r\n setFloat4v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1i(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2i(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n * @param {integer} z - The new Z component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3i(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component\r\n * @param {integer} y - Y component\r\n * @param {integer} z - Z component\r\n * @param {integer} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4i(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.\r\n * @param {Float32Array} matrix - The new matrix value.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix2: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix2fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - [description]\r\n * @param {Float32Array} matrix - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix3: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix3fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Is the matrix transposed\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix4: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix4fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of texture units that can be used in a fragment shader.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextures\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum number of textures WebGL supports.\r\n */\r\n getMaxTextures: function ()\r\n {\r\n return this.config.maxTextures;\r\n },\r\n\r\n /**\r\n * Returns the largest texture size (either width or height) that can be created.\r\n * Note that VRAM may not allow a texture of any given size, it just expresses\r\n * hardware / driver support for a given size.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextureSize\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum supported texture size.\r\n */\r\n getMaxTextureSize: function ()\r\n {\r\n return this.config.maxTextureSize;\r\n },\r\n\r\n /**\r\n * Destroy this WebGLRenderer, cleaning up all related resources such as pipelines, native textures, etc.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n // Clear-up anything that should be cleared :)\r\n\r\n for (var i = 0; i < this.nativeTextures.length; i++)\r\n {\r\n this.gl.deleteTexture(this.nativeTextures[i]);\r\n }\r\n\r\n this.nativeTextures = [];\r\n\r\n for (var key in this.pipelines)\r\n {\r\n this.pipelines[key].destroy();\r\n\r\n delete this.pipelines[key];\r\n }\r\n\r\n this.defaultCamera.destroy();\r\n\r\n this.currentMask = null;\r\n this.currentCameraMask = null;\r\n\r\n this.canvas.removeEventListener('webglcontextlost', this.contextLostHandler, false);\r\n this.canvas.removeEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n this.game = null;\r\n this.gl = null;\r\n this.canvas = null;\r\n\r\n this.maskStack = [];\r\n\r\n this.contextLost = true;\r\n\r\n this.extensions = {};\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js?")},"./node_modules/phaser/src/renderer/webgl/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Utils: __webpack_require__(/*! ./Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js"),\r\n WebGLPipeline: __webpack_require__(/*! ./WebGLPipeline */ "./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js"),\r\n WebGLRenderer: __webpack_require__(/*! ./WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js"),\r\n Pipelines: __webpack_require__(/*! ./pipelines */ "./node_modules/phaser/src/renderer/webgl/pipelines/index.js"),\r\n\r\n // Constants\r\n BYTE: 0,\r\n SHORT: 1,\r\n UNSIGNED_BYTE: 2,\r\n UNSIGNED_SHORT: 3,\r\n FLOAT: 4\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/index.js?')},"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/BitmapMask-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/BitmapMask-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using \r\n * sampling two texture on the fragment shader and using the fragment's alpha to clip the region.\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class BitmapMaskPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline.\r\n */\r\nvar BitmapMaskPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n \r\n initialize:\r\n\r\n function BitmapMaskPipeline (config)\r\n {\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES),\r\n vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS),\r\n fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS),\r\n vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3),\r\n\r\n vertexSize: (config.vertexSize ? config.vertexSize :\r\n Float32Array.BYTES_PER_ELEMENT * 2),\r\n\r\n vertices: new Float32Array([\r\n -1, +1, -1, -7, +7, +1\r\n ]).buffer,\r\n\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = 1;\r\n\r\n /**\r\n * Dirty flag to check if resolution properties need to be updated on the \r\n * masking shader.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.resolutionDirty = true;\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n \r\n if (this.resolutionDirty)\r\n {\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n renderer.setInt1(program, 'uMainSampler', 0);\r\n renderer.setInt1(program, 'uMaskSampler', 1);\r\n this.resolutionDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} resolution - [description]\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n this.resolutionDirty = true;\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds necessary resources and renders the mask to a separated framebuffer.\r\n * The framebuffer for the masked object is also bound for further use.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - [description]\r\n */\r\n beginMask: function (mask, maskedObject, camera)\r\n {\r\n var renderer = this.renderer;\r\n var gl = this.gl;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n mask.prevFramebuffer = renderer.currentFramebuffer;\r\n\r\n renderer.setFramebuffer(mask.mainFramebuffer);\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n if (renderer.currentCameraMask.mask !== mask)\r\n {\r\n renderer.currentMask.mask = mask;\r\n renderer.currentMask.camera = camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The masked game objects framebuffer is unbound and its texture \r\n * is bound together with the mask texture and the mask shader and \r\n * a draw call with a single quad is processed. Here is where the\r\n * masking effect is applied. \r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as a mask.\r\n */\r\n endMask: function (mask, camera)\r\n {\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n // First we draw the mask to the mask fb\r\n renderer.setFramebuffer(mask.maskFramebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setBlendMode(0, true);\r\n\r\n bitmapMask.renderWebGL(renderer, bitmapMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n renderer.setFramebuffer(mask.prevFramebuffer);\r\n\r\n // Is there a stencil further up the stack?\r\n var prev = renderer.getCurrentStencilMask();\r\n\r\n if (prev)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, true);\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n\r\n // Bind bitmap mask pipeline and draw\r\n renderer.setPipeline(this);\r\n\r\n gl.activeTexture(gl.TEXTURE1);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.mainTexture);\r\n\r\n gl.uniform1i(gl.getUniformLocation(this.program, 'uInvertMaskAlpha'), mask.invertAlpha);\r\n\r\n // Finally, draw a triangle filling the whole screen\r\n gl.drawArrays(this.topology, 0, 3);\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMaskPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/ForwardDiffuse-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\nvar LIGHT_COUNT = 10;\r\n\r\n/**\r\n * @classdesc\r\n * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights.\r\n * This pipeline extends TextureTintPipeline so it implements all it's rendering functions\r\n * and batching system.\r\n *\r\n * @class ForwardDiffuseLightPipeline\r\n * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader.\r\n */\r\nvar ForwardDiffuseLightPipeline = new Class({\r\n\r\n Extends: TextureTintPipeline,\r\n\r\n initialize:\r\n\r\n function ForwardDiffuseLightPipeline (config)\r\n {\r\n LIGHT_COUNT = config.maxLights;\r\n\r\n config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString());\r\n\r\n TextureTintPipeline.call(this, config);\r\n\r\n /**\r\n * Default normal map texture to use.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap\r\n * @type {Phaser.Texture.Frame}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this.defaultNormalMap;\r\n\r\n /**\r\n * Inverse rotation matrix for normal map rotations.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.inverseRotationMatrix = new Float32Array([\r\n 1, 0, 0,\r\n 0, 1, 0,\r\n 0, 0, 1\r\n ]);\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n * \r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#boot\r\n * @override\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n this.defaultNormalMap = this.game.textures.getFrame('__DEFAULT');\r\n },\r\n\r\n /**\r\n * This function binds its base class resources and this lights 2D resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind\r\n * @override\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function (gameObject)\r\n {\r\n TextureTintPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n\r\n this.mvpUpdate();\r\n\r\n renderer.setInt1(program, 'uNormSampler', 1);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n if (gameObject)\r\n {\r\n this.setNormalMap(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function sets all the needed resources for each camera pass.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function (scene, camera)\r\n {\r\n this.active = false;\r\n\r\n var lightManager = scene.sys.lights;\r\n\r\n if (!lightManager || lightManager.lights.length <= 0 || !lightManager.active)\r\n {\r\n // Passthru\r\n return this;\r\n }\r\n\r\n var lights = lightManager.cull(camera);\r\n var lightCount = Math.min(lights.length, LIGHT_COUNT);\r\n\r\n if (lightCount === 0)\r\n {\r\n return this;\r\n }\r\n\r\n this.active = true;\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var cameraMatrix = camera.matrix;\r\n var point = {x: 0, y: 0};\r\n var height = renderer.height;\r\n var index;\r\n\r\n for (index = 0; index < LIGHT_COUNT; ++index)\r\n {\r\n // Reset lights\r\n renderer.setFloat1(program, 'uLights[' + index + '].radius', 0);\r\n }\r\n\r\n renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom);\r\n renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b);\r\n\r\n for (index = 0; index < lightCount; ++index)\r\n {\r\n var light = lights[index];\r\n var lightName = 'uLights[' + index + '].';\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n renderer.setFloat2(program, lightName + 'position', point.x - (camera.scrollX * light.scrollFactorX * camera.zoom), height - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n renderer.setFloat3(program, lightName + 'color', light.r, light.g, light.b);\r\n renderer.setFloat1(program, lightName + 'intensity', light.intensity);\r\n renderer.setFloat1(program, lightName + 'radius', light.radius);\r\n }\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad\r\n * @param {integer} textureWidth - Real texture width\r\n * @param {integer} textureHeight - Real texture height\r\n * @param {number} srcX - X coordinate of the quad\r\n * @param {number} srcY - Y coordinate of the quad\r\n * @param {number} srcWidth - Width of the quad\r\n * @param {number} srcHeight - Height of the quad\r\n * @param {number} scaleX - X component of scale\r\n * @param {number} scaleY - Y component of scale\r\n * @param {number} rotation - Rotation of the quad\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll\r\n * @param {number} displayOriginX - Horizontal origin in pixels\r\n * @param {number} displayOriginY - Vertical origin in pixels\r\n * @param {number} frameX - X coordinate of the texture frame\r\n * @param {number} frameY - Y coordinate of the texture frame\r\n * @param {number} frameWidth - Width of the texture frame\r\n * @param {number} frameHeight - Height of the texture frame\r\n * @param {integer} tintTL - Tint for top left\r\n * @param {integer} tintTR - Tint for top right\r\n * @param {integer} tintBL - Tint for bottom left\r\n * @param {integer} tintBR - Tint for bottom right\r\n * @param {number} tintEffect - The tint effect (0 for additive, 1 for replacement)\r\n * @param {number} uOffset - Horizontal offset on texture coordinate\r\n * @param {number} vOffset - Vertical offset on texture coordinate\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n this.renderer.setPipeline(this);\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.displayTexture)\r\n {\r\n normalTexture = gameObject.displayTexture.dataSource[gameObject.displayFrame.sourceIndex];\r\n }\r\n else if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n else if (gameObject.tileset)\r\n {\r\n normalTexture = gameObject.tileset.image.dataSource[0];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n console.warn('Normal map missing or invalid');\r\n return;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(rotation);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n // var x = -displayOriginX + frameX;\r\n // var y = -displayOriginY + frameY;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n // Do we need this? (doubt it)\r\n // if (camera.roundPixels)\r\n // {\r\n // x |= 0;\r\n // y |= 0;\r\n // }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Sets the Game Objects normal map as the active texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMap\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to update.\r\n */\r\n setNormalMap: function (gameObject)\r\n {\r\n if (!this.active || !gameObject)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n normalTexture = this.defaultNormalMap;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n\r\n this.renderer.setPipeline(gameObject.defaultPipeline);\r\n },\r\n\r\n /**\r\n * Rotates the normal map vectors inversely by the given angle.\r\n * Only works in 2D space.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation\r\n * @since 3.16.0\r\n * \r\n * @param {number} rotation - The angle of rotation in radians.\r\n */\r\n setNormalMapRotation: function (rotation)\r\n {\r\n var inverseRotationMatrix = this.inverseRotationMatrix;\r\n\r\n if (rotation)\r\n {\r\n var rot = -rotation;\r\n var c = Math.cos(rot);\r\n var s = Math.sin(rot);\r\n\r\n inverseRotationMatrix[1] = s;\r\n inverseRotationMatrix[3] = -s;\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = c;\r\n }\r\n else\r\n {\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = 1;\r\n inverseRotationMatrix[1] = inverseRotationMatrix[3] = 0;\r\n }\r\n\r\n this.renderer.setMatrix3(this.program, 'uInverseRotationMatrix', false, inverseRotationMatrix);\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The texture-based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture = sprite.texture.dataSource[sprite.frame.sourceIndex];\r\n\r\n if (normalTexture)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(sprite.rotation);\r\n\r\n TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix);\r\n }\r\n }\r\n\r\n});\r\n\r\nForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT;\r\n\r\nmodule.exports = ForwardDiffuseLightPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ \"./node_modules/phaser/src/geom/polygon/Earcut.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ModelViewProjection = __webpack_require__(/*! ./components/ModelViewProjection */ \"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/TextureTint-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/TextureTint-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * TextureTintPipeline implements the rendering infrastructure\r\n * for displaying textured objects\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class TextureTintPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above.\r\n */\r\nvar TextureTintPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n\r\n Mixins: [\r\n ModelViewProjection\r\n ],\r\n\r\n initialize:\r\n\r\n function TextureTintPipeline (config)\r\n {\r\n var rendererConfig = config.renderer.config;\r\n\r\n // Vertex Size = attribute size added together (2 + 2 + 1 + 4)\r\n\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES),\r\n vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS),\r\n fragShader: GetFastValue(config, 'fragShader', ShaderSourceFS),\r\n vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize),\r\n vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 5 + Uint8Array.BYTES_PER_ELEMENT * 4),\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n },\r\n {\r\n name: 'inTexCoord',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 2\r\n },\r\n {\r\n name: 'inTintEffect',\r\n size: 1,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 4\r\n },\r\n {\r\n name: 'inTint',\r\n size: 4,\r\n type: config.renderer.gl.UNSIGNED_BYTE,\r\n normalized: true,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 5\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Uint32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = new Uint32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = rendererConfig.batchSize;\r\n\r\n /**\r\n * Collection of batch information\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches\r\n * @type {array}\r\n * @since 3.1.0\r\n */\r\n this.batches = [];\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * Used internally to draw stroked triangles.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tempTriangle = [\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 }\r\n ];\r\n\r\n /**\r\n * The tint effect to be applied by the shader in the next geometry draw:\r\n * \r\n * 0 = texture multiplied by color\r\n * 1 = solid color + texture alpha\r\n * 2 = solid color, no texture\r\n * 3 = solid texture, no color\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tintEffect = 2;\r\n\r\n /**\r\n * Cached stroke tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Cached fill tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Internal texture frame reference.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 };\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.firstQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.prevQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Used internally for triangulating a polygon.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.polygonCache = [];\r\n\r\n this.mvpInit();\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n this.mvpUpdate();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resizes this pipeline and updates the projection.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width.\r\n * @param {number} height - The new height.\r\n * @param {number} resolution - The resolution.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n\r\n this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D\r\n * @since 3.1.0\r\n *\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This pipeline instance.\r\n */\r\n setTexture2D: function (texture, unit)\r\n {\r\n if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; }\r\n if (unit === undefined) { unit = 0; }\r\n\r\n if (this.requireTextureBatch(texture, unit))\r\n {\r\n this.pushBatch(texture, unit);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#requireTextureBatch\r\n * @since 3.16.0\r\n *\r\n * @param {WebGLTexture} texture - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {boolean} `true` if the pipeline needs to create a new batch, otherwise `false`.\r\n */\r\n requireTextureBatch: function (texture, unit)\r\n {\r\n var batches = this.batches;\r\n var batchLength = batches.length;\r\n\r\n if (batchLength > 0)\r\n {\r\n // If Texture Unit specified, we get the texture from the textures array, otherwise we use the texture property\r\n var currentTexture = (unit > 0) ? batches[batchLength - 1].textures[unit - 1] : batches[batchLength - 1].texture;\r\n\r\n return !(currentTexture === texture);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Creates a new batch object and pushes it to a batch array.\r\n * The batch object contains information relevant to the current \r\n * vertex batch like the offset in the vertex buffer, vertex count and \r\n * the textures used by that batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch\r\n * @since 3.1.0\r\n * \r\n * @param {WebGLTexture} texture - Optional WebGLTexture that will be assigned to the created batch.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n */\r\n pushBatch: function (texture, unit)\r\n {\r\n if (unit === 0)\r\n {\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: texture,\r\n textures: []\r\n });\r\n }\r\n else\r\n {\r\n var textures = [];\r\n\r\n textures[unit - 1] = texture;\r\n\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: null,\r\n textures: textures\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked)\r\n {\r\n return this;\r\n }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n var renderer = this.renderer;\r\n\r\n var batches = this.batches;\r\n var batchCount = batches.length;\r\n var batchVertexCount = 0;\r\n var batch = null;\r\n var batchNext;\r\n var textureIndex;\r\n var nTexture;\r\n\r\n if (batchCount === 0 || vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n\r\n return this;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n // Process the TEXTURE BATCHES\r\n\r\n for (var index = 0; index < batchCount - 1; index++)\r\n {\r\n batch = batches[index];\r\n batchNext = batches[index + 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = batchNext.first - batch.first;\r\n\r\n // Bail out if texture property is null (i.e. if a texture unit > 0)\r\n if (batch.texture === null || batchVertexCount <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n // Left over data\r\n batch = batches[batchCount - 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = vertexCount - batch.first;\r\n\r\n if (batch.texture && batchVertexCount > 0)\r\n {\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n this.vertexCount = 0;\r\n\r\n batches.length = 0;\r\n\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n // Will cause a flush if there are batchSize entries already\r\n this.renderer.setPipeline(this);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var frame = sprite.frame;\r\n var texture = frame.glTexture;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n var frameX = frame.x;\r\n var frameY = frame.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frameX;\r\n var y = -displayOriginY + frameY;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n u0 = crop.u0;\r\n v0 = crop.v0;\r\n u1 = crop.u1;\r\n v1 = crop.v1;\r\n\r\n frameWidth = crop.width;\r\n frameHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY))\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var xw = x + frameWidth;\r\n var yh = y + frameHeight;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n var tintEffect = (sprite._isTinted && sprite.tintFill);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 6 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0----3\r\n * |\\ B|\r\n * | \\ |\r\n * | \\ |\r\n * | A \\|\r\n * | \\\r\n * 1----2\r\n * ```\r\n * \r\n * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - The top-left x position.\r\n * @param {number} y0 - The top-left y position.\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {number} tintBR - The bottom-right tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 6 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n hasFlushed = true;\r\n\r\n this.setTexture2D(texture, unit);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n \r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n this.vertexCount += 6;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 3 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0\r\n * |\\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * 1-----2\r\n * ```\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri\r\n * @since 3.12.0\r\n *\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 3 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n this.setTexture2D(texture, unit);\r\n\r\n hasFlushed = true;\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n this.vertexCount += 3;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad using argument values instead of a Game Object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject.\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad.\r\n * @param {integer} textureWidth - Real texture width.\r\n * @param {integer} textureHeight - Real texture height.\r\n * @param {number} srcX - X coordinate of the quad.\r\n * @param {number} srcY - Y coordinate of the quad.\r\n * @param {number} srcWidth - Width of the quad.\r\n * @param {number} srcHeight - Height of the quad.\r\n * @param {number} scaleX - X component of scale.\r\n * @param {number} scaleY - Y component of scale.\r\n * @param {number} rotation - Rotation of the quad.\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped.\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped.\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll.\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll.\r\n * @param {number} displayOriginX - Horizontal origin in pixels.\r\n * @param {number} displayOriginY - Vertical origin in pixels.\r\n * @param {number} frameX - X coordinate of the texture frame.\r\n * @param {number} frameY - Y coordinate of the texture frame.\r\n * @param {number} frameWidth - Width of the texture frame.\r\n * @param {number} frameHeight - Height of the texture frame.\r\n * @param {integer} tintTL - Tint for top left.\r\n * @param {integer} tintTR - Tint for top right.\r\n * @param {integer} tintBL - Tint for bottom left.\r\n * @param {integer} tintBR - Tint for bottom right.\r\n * @param {number} tintEffect - The tint effect.\r\n * @param {number} uOffset - Horizontal offset on texture coordinate.\r\n * @param {number} vOffset - Vertical offset on texture coordinate.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container.\r\n * @param {boolean} [skipFlip=false] - Skip the renderTexture check.\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix,\r\n skipFlip)\r\n {\r\n this.renderer.setPipeline(this, gameObject);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds a Texture Frame into the batch for rendering.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered.\r\n * @param {number} x - The horizontal position to render the texture at.\r\n * @param {number} y - The vertical position to render the texture at.\r\n * @param {number} tint - The tint color.\r\n * @param {number} alpha - The alpha value.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix.\r\n */\r\n batchTextureFrame: function (\r\n frame,\r\n x, y,\r\n tint, alpha,\r\n transformMatrix,\r\n parentTransformMatrix\r\n )\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix);\r\n var calcMatrix = this._tempMatrix2;\r\n\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n if (parentTransformMatrix)\r\n {\r\n spriteMatrix.multiply(parentTransformMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n calcMatrix = spriteMatrix;\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n this.setTexture2D(frame.glTexture, 0);\r\n\r\n tint = Utils.getTintAppendFloatAlpha(tint, alpha);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, 0);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle has no transform values and isn't transformed into the local space.\r\n * Used for directly batching untransformed rectangles, such as Camera background colors.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {number} color - Color of the rectangle to draw.\r\n * @param {number} alpha - Alpha value of the rectangle to draw.\r\n */\r\n drawFillRect: function (x, y, width, height, color, alpha)\r\n {\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n this.setTexture2D();\r\n\r\n var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha);\r\n\r\n this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var x0 = calcMatrix.getX(x, y);\r\n var y0 = calcMatrix.getY(x, y);\r\n\r\n var x1 = calcMatrix.getX(x, yh);\r\n var y1 = calcMatrix.getY(x, yh);\r\n\r\n var x2 = calcMatrix.getX(xw, yh);\r\n var y2 = calcMatrix.getY(xw, yh);\r\n\r\n var x3 = calcMatrix.getX(xw, y);\r\n var y3 = calcMatrix.getY(xw, y);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.fillTint.BR, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a filled triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a stroked triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n * The triangle is created from 3 lines and drawn using the `batchStrokePath` method.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {number} lineWidth - The width of the line in pixels.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix)\r\n {\r\n var tempTriangle = this.tempTriangle;\r\n\r\n tempTriangle[0].x = x0;\r\n tempTriangle[0].y = y0;\r\n tempTriangle[0].width = lineWidth;\r\n\r\n tempTriangle[1].x = x1;\r\n tempTriangle[1].y = y1;\r\n tempTriangle[1].width = lineWidth;\r\n\r\n tempTriangle[2].x = x2;\r\n tempTriangle[2].y = y2;\r\n tempTriangle[2].width = lineWidth;\r\n\r\n tempTriangle[3].x = x0;\r\n tempTriangle[3].y = y0;\r\n tempTriangle[3].width = lineWidth;\r\n\r\n this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix);\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and then passing it through Earcut, which\r\n * creates a list of polygons. Each polygon is then added to the batch.\r\n * \r\n * The path is always automatically closed because it's filled.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillPath: function (path, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var length = path.length;\r\n var polygonCache = this.polygonCache;\r\n var polygonIndexArray;\r\n var point;\r\n\r\n var tintTL = this.fillTint.TL;\r\n var tintTR = this.fillTint.TR;\r\n var tintBL = this.fillTint.BL;\r\n var tintEffect = this.tintEffect;\r\n\r\n for (var pathIndex = 0; pathIndex < length; ++pathIndex)\r\n {\r\n point = path[pathIndex];\r\n polygonCache.push(point.x, point.y);\r\n }\r\n\r\n polygonIndexArray = Earcut(polygonCache);\r\n length = polygonIndexArray.length;\r\n\r\n var frame = this.currentFrame;\r\n\r\n for (var index = 0; index < length; index += 3)\r\n {\r\n var p0 = polygonIndexArray[index + 0] * 2;\r\n var p1 = polygonIndexArray[index + 1] * 2;\r\n var p2 = polygonIndexArray[index + 2] * 2;\r\n\r\n var x0 = polygonCache[p0 + 0];\r\n var y0 = polygonCache[p0 + 1];\r\n var x1 = polygonCache[p1 + 0];\r\n var y1 = polygonCache[p1 + 1];\r\n var x2 = polygonCache[p2 + 0];\r\n var y2 = polygonCache[p2 + 1];\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n \r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n \r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n \r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect);\r\n }\r\n\r\n polygonCache.length = 0;\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and calling `batchLine` for each section\r\n * of the path.\r\n * \r\n * The path is optionally closed at the end.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {number} lineWidth - The width of the line segments in pixels.\r\n * @param {boolean} pathOpen - Indicates if the path should be closed or left open.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n // Reset the closePath booleans\r\n this.prevQuad[4] = 0;\r\n this.firstQuad[4] = 0;\r\n\r\n var pathLength = path.length - 1;\r\n\r\n for (var pathIndex = 0; pathIndex < pathLength; pathIndex++)\r\n {\r\n var point0 = path[pathIndex];\r\n var point1 = path[pathIndex + 1];\r\n\r\n this.batchLine(\r\n point0.x,\r\n point0.y,\r\n point1.x,\r\n point1.y,\r\n point0.width / 2,\r\n point1.width / 2,\r\n lineWidth,\r\n pathIndex,\r\n !pathOpen && (pathIndex === pathLength - 1),\r\n currentMatrix,\r\n parentMatrix\r\n );\r\n }\r\n },\r\n\r\n /**\r\n * Creates a quad and adds it to the vertex batch based on the given line values.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine\r\n * @since 3.12.0\r\n *\r\n * @param {number} ax - X coordinate to the start of the line\r\n * @param {number} ay - Y coordinate to the start of the line\r\n * @param {number} bx - X coordinate to the end of the line\r\n * @param {number} by - Y coordinate to the end of the line\r\n * @param {number} aLineWidth - Width of the start of the line\r\n * @param {number} bLineWidth - Width of the end of the line\r\n * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers\r\n */\r\n batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var dx = bx - ax;\r\n var dy = by - ay;\r\n\r\n var len = Math.sqrt(dx * dx + dy * dy);\r\n var al0 = aLineWidth * (by - ay) / len;\r\n var al1 = aLineWidth * (ax - bx) / len;\r\n var bl0 = bLineWidth * (by - ay) / len;\r\n var bl1 = bLineWidth * (ax - bx) / len;\r\n\r\n var lx0 = bx - bl0;\r\n var ly0 = by - bl1;\r\n var lx1 = ax - al0;\r\n var ly1 = ay - al1;\r\n var lx2 = bx + bl0;\r\n var ly2 = by + bl1;\r\n var lx3 = ax + al0;\r\n var ly3 = ay + al1;\r\n\r\n // tx0 = bottom right\r\n var brX = calcMatrix.getX(lx0, ly0);\r\n var brY = calcMatrix.getY(lx0, ly0);\r\n\r\n // tx1 = bottom left\r\n var blX = calcMatrix.getX(lx1, ly1);\r\n var blY = calcMatrix.getY(lx1, ly1);\r\n\r\n // tx2 = top right\r\n var trX = calcMatrix.getX(lx2, ly2);\r\n var trY = calcMatrix.getY(lx2, ly2);\r\n\r\n // tx3 = top left\r\n var tlX = calcMatrix.getX(lx3, ly3);\r\n var tlY = calcMatrix.getY(lx3, ly3);\r\n\r\n var tint = this.strokeTint;\r\n var tintEffect = this.tintEffect;\r\n\r\n var tintTL = tint.TL;\r\n var tintTR = tint.TR;\r\n var tintBL = tint.BL;\r\n var tintBR = tint.BR;\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n // TL, BL, BR, TR\r\n this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n\r\n if (lineWidth <= 2)\r\n {\r\n // No point doing a linejoin if the line isn't thick enough\r\n return;\r\n }\r\n\r\n var prev = this.prevQuad;\r\n var first = this.firstQuad;\r\n\r\n if (index > 0 && prev[4])\r\n {\r\n this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n first[0] = tlX;\r\n first[1] = tlY;\r\n first[2] = blX;\r\n first[3] = blY;\r\n first[4] = 1;\r\n }\r\n\r\n if (closePath && first[4])\r\n {\r\n // Add a join for the final path segment\r\n this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n // Store it\r\n\r\n prev[0] = brX;\r\n prev[1] = brY;\r\n prev[2] = trX;\r\n prev[3] = trY;\r\n prev[4] = 1;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureTintPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Implements a model view projection matrices.\r\n * Pipelines can implement this for doing 2D and 3D rendering.\r\n *\r\n * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection\r\n * @since 3.0.0\r\n */\r\nvar ModelViewProjection = {\r\n\r\n /**\r\n * Dirty flag for checking if model matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n modelMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if view matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n viewMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if projection matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n projectionMatrixDirty: false,\r\n\r\n /**\r\n * Model matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n modelMatrix: null,\r\n\r\n /**\r\n * View matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n viewMatrix: null,\r\n\r\n /**\r\n * Projection matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n projectionMatrix: null,\r\n\r\n /**\r\n * Initializes MVP matrices with an identity matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit\r\n * @since 3.0.0\r\n */\r\n mvpInit: function ()\r\n {\r\n this.modelMatrixDirty = true;\r\n this.viewMatrixDirty = true;\r\n this.projectionMatrixDirty = true;\r\n \r\n this.modelMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.viewMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.projectionMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * If dirty flags are set then the matrices are uploaded to the GPU.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate\r\n * @since 3.0.0\r\n */\r\n mvpUpdate: function ()\r\n {\r\n var program = this.program;\r\n\r\n if (this.modelMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix);\r\n this.modelMatrixDirty = false;\r\n }\r\n \r\n if (this.viewMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n this.viewMatrixDirty = false;\r\n }\r\n\r\n if (this.projectionMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n this.projectionMatrixDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads an identity matrix to the model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity\r\n * @since 3.0.0\r\n */\r\n modelIdentity: function ()\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n \r\n modelMatrix[0] = 1;\r\n modelMatrix[1] = 0;\r\n modelMatrix[2] = 0;\r\n modelMatrix[3] = 0;\r\n modelMatrix[4] = 0;\r\n modelMatrix[5] = 1;\r\n modelMatrix[6] = 0;\r\n modelMatrix[7] = 0;\r\n modelMatrix[8] = 0;\r\n modelMatrix[9] = 0;\r\n modelMatrix[10] = 1;\r\n modelMatrix[11] = 0;\r\n modelMatrix[12] = 0;\r\n modelMatrix[13] = 0;\r\n modelMatrix[14] = 0;\r\n modelMatrix[15] = 1;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Scale model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelScale: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[0] = modelMatrix[0] * x;\r\n modelMatrix[1] = modelMatrix[1] * x;\r\n modelMatrix[2] = modelMatrix[2] * x;\r\n modelMatrix[3] = modelMatrix[3] * x;\r\n modelMatrix[4] = modelMatrix[4] * y;\r\n modelMatrix[5] = modelMatrix[5] * y;\r\n modelMatrix[6] = modelMatrix[6] * y;\r\n modelMatrix[7] = modelMatrix[7] * y;\r\n modelMatrix[8] = modelMatrix[8] * z;\r\n modelMatrix[9] = modelMatrix[9] * z;\r\n modelMatrix[10] = modelMatrix[10] * z;\r\n modelMatrix[11] = modelMatrix[11] * z;\r\n \r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelTranslate: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12];\r\n modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13];\r\n modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14];\r\n modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15];\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateX: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[4] = a10 * c + a20 * s;\r\n modelMatrix[5] = a11 * c + a21 * s;\r\n modelMatrix[6] = a12 * c + a22 * s;\r\n modelMatrix[7] = a13 * c + a23 * s;\r\n modelMatrix[8] = a20 * c - a10 * s;\r\n modelMatrix[9] = a21 * c - a11 * s;\r\n modelMatrix[10] = a22 * c - a12 * s;\r\n modelMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateY: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[0] = a00 * c - a20 * s;\r\n modelMatrix[1] = a01 * c - a21 * s;\r\n modelMatrix[2] = a02 * c - a22 * s;\r\n modelMatrix[3] = a03 * c - a23 * s;\r\n modelMatrix[8] = a00 * s + a20 * c;\r\n modelMatrix[9] = a01 * s + a21 * c;\r\n modelMatrix[10] = a02 * s + a22 * c;\r\n modelMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates the model matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateZ: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n\r\n modelMatrix[0] = a00 * c + a10 * s;\r\n modelMatrix[1] = a01 * c + a11 * s;\r\n modelMatrix[2] = a02 * c + a12 * s;\r\n modelMatrix[3] = a03 * c + a13 * s;\r\n modelMatrix[4] = a10 * c - a00 * s;\r\n modelMatrix[5] = a11 * c - a01 * s;\r\n modelMatrix[6] = a12 * c - a02 * s;\r\n modelMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads identity matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewIdentity: function ()\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n \r\n viewMatrix[0] = 1;\r\n viewMatrix[1] = 0;\r\n viewMatrix[2] = 0;\r\n viewMatrix[3] = 0;\r\n viewMatrix[4] = 0;\r\n viewMatrix[5] = 1;\r\n viewMatrix[6] = 0;\r\n viewMatrix[7] = 0;\r\n viewMatrix[8] = 0;\r\n viewMatrix[9] = 0;\r\n viewMatrix[10] = 1;\r\n viewMatrix[11] = 0;\r\n viewMatrix[12] = 0;\r\n viewMatrix[13] = 0;\r\n viewMatrix[14] = 0;\r\n viewMatrix[15] = 1;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Scales view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewScale: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[0] = viewMatrix[0] * x;\r\n viewMatrix[1] = viewMatrix[1] * x;\r\n viewMatrix[2] = viewMatrix[2] * x;\r\n viewMatrix[3] = viewMatrix[3] * x;\r\n viewMatrix[4] = viewMatrix[4] * y;\r\n viewMatrix[5] = viewMatrix[5] * y;\r\n viewMatrix[6] = viewMatrix[6] * y;\r\n viewMatrix[7] = viewMatrix[7] * y;\r\n viewMatrix[8] = viewMatrix[8] * z;\r\n viewMatrix[9] = viewMatrix[9] * z;\r\n viewMatrix[10] = viewMatrix[10] * z;\r\n viewMatrix[11] = viewMatrix[11] * z;\r\n \r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translates view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewTranslate: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12];\r\n viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13];\r\n viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14];\r\n viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateX: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[4] = a10 * c + a20 * s;\r\n viewMatrix[5] = a11 * c + a21 * s;\r\n viewMatrix[6] = a12 * c + a22 * s;\r\n viewMatrix[7] = a13 * c + a23 * s;\r\n viewMatrix[8] = a20 * c - a10 * s;\r\n viewMatrix[9] = a21 * c - a11 * s;\r\n viewMatrix[10] = a22 * c - a12 * s;\r\n viewMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateY: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[0] = a00 * c - a20 * s;\r\n viewMatrix[1] = a01 * c - a21 * s;\r\n viewMatrix[2] = a02 * c - a22 * s;\r\n viewMatrix[3] = a03 * c - a23 * s;\r\n viewMatrix[8] = a00 * s + a20 * c;\r\n viewMatrix[9] = a01 * s + a21 * c;\r\n viewMatrix[10] = a02 * s + a22 * c;\r\n viewMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateZ: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n\r\n viewMatrix[0] = a00 * c + a10 * s;\r\n viewMatrix[1] = a01 * c + a11 * s;\r\n viewMatrix[2] = a02 * c + a12 * s;\r\n viewMatrix[3] = a03 * c + a13 * s;\r\n viewMatrix[4] = a10 * c - a00 * s;\r\n viewMatrix[5] = a11 * c - a01 * s;\r\n viewMatrix[6] = a12 * c - a02 * s;\r\n viewMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix \r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix2D - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad2D: function (matrix2D)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[2] = 0.0;\r\n vm[3] = 0.0;\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[6] = 0.0;\r\n vm[7] = 0.0;\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[10] = 1.0;\r\n vm[11] = 0.0;\r\n vm[12] = 0.0;\r\n vm[13] = 0.0;\r\n vm[14] = 0.0;\r\n vm[15] = 1.0;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * Copies a 4x4 matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad: function (matrix)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix[0];\r\n vm[1] = matrix[1];\r\n vm[2] = matrix[2];\r\n vm[3] = matrix[3];\r\n vm[4] = matrix[4];\r\n vm[5] = matrix[5];\r\n vm[6] = matrix[6];\r\n vm[7] = matrix[7];\r\n vm[8] = matrix[8];\r\n vm[9] = matrix[9];\r\n vm[10] = matrix[10];\r\n vm[11] = matrix[11];\r\n vm[12] = matrix[12];\r\n vm[13] = matrix[13];\r\n vm[14] = matrix[14];\r\n vm[15] = matrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Loads identity matrix into the projection matrix.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projIdentity: function ()\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n \r\n projectionMatrix[0] = 1;\r\n projectionMatrix[1] = 0;\r\n projectionMatrix[2] = 0;\r\n projectionMatrix[3] = 0;\r\n projectionMatrix[4] = 0;\r\n projectionMatrix[5] = 1;\r\n projectionMatrix[6] = 0;\r\n projectionMatrix[7] = 0;\r\n projectionMatrix[8] = 0;\r\n projectionMatrix[9] = 0;\r\n projectionMatrix[10] = 1;\r\n projectionMatrix[11] = 0;\r\n projectionMatrix[12] = 0;\r\n projectionMatrix[13] = 0;\r\n projectionMatrix[14] = 0;\r\n projectionMatrix[15] = 1;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets up an orthographic projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projOrtho: function (left, right, bottom, top, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var leftRight = 1.0 / (left - right);\r\n var bottomTop = 1.0 / (bottom - top);\r\n var nearFar = 1.0 / (near - far);\r\n\r\n projectionMatrix[0] = -2.0 * leftRight;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = -2.0 * bottomTop;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = 2.0 * nearFar;\r\n projectionMatrix[11] = 0.0;\r\n projectionMatrix[12] = (left + right) * leftRight;\r\n projectionMatrix[13] = (top + bottom) * bottomTop;\r\n projectionMatrix[14] = (far + near) * nearFar;\r\n projectionMatrix[15] = 1.0;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Sets up a perspective projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovY - The fov value.\r\n * @param {number} aspectRatio - The aspectRatio value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projPersp: function (fovY, aspectRatio, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var fov = 1.0 / Math.tan(fovY / 2.0);\r\n var nearFar = 1.0 / (near - far);\r\n \r\n projectionMatrix[0] = fov / aspectRatio;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = fov;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = (far + near) * nearFar;\r\n projectionMatrix[11] = -1.0;\r\n projectionMatrix[12] = 0.0;\r\n projectionMatrix[13] = 0.0;\r\n projectionMatrix[14] = (2.0 * far * near) * nearFar;\r\n projectionMatrix[15] = 0.0;\r\n \r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = ModelViewProjection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Pipelines\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMaskPipeline: __webpack_require__(/*! ./BitmapMaskPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js"),\r\n ForwardDiffuseLightPipeline: __webpack_require__(/*! ./ForwardDiffuseLightPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js"),\r\n TextureTintPipeline: __webpack_require__(/*! ./TextureTintPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js"),\r\n ModelViewProjection: __webpack_require__(/*! ./components/ModelViewProjection */ "./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/index.js?')},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform vec2 uResolution;',\n 'uniform sampler2D uMainSampler;',\n 'uniform sampler2D uMaskSampler;',\n 'uniform bool uInvertMaskAlpha;',\n '',\n 'void main()',\n '{',\n ' vec2 uv = gl_FragCoord.xy / uResolution;',\n ' vec4 mainColor = texture2D(uMainSampler, uv);',\n ' vec4 maskColor = texture2D(uMaskSampler, uv);',\n ' float alpha = mainColor.a;',\n '',\n ' if (!uInvertMaskAlpha)',\n ' {',\n ' alpha *= (maskColor.a);',\n ' }',\n ' else',\n ' {',\n ' alpha *= (1.0 - maskColor.a);',\n ' }',\n '',\n ' gl_FragColor = vec4(mainColor.rgb * alpha, alpha);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_VS',\n '',\n 'precision mediump float;',\n '',\n 'attribute vec2 inPosition;',\n '',\n 'void main()',\n '{',\n ' gl_Position = vec4(inPosition, 0.0, 1.0);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js":function(module,exports){eval("module.exports = [\r\n '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS',\r\n '',\r\n 'precision mediump float;',\r\n '',\r\n 'struct Light',\r\n '{',\r\n ' vec2 position;',\r\n ' vec3 color;',\r\n ' float intensity;',\r\n ' float radius;',\r\n '};',\r\n '',\r\n 'const int kMaxLights = %LIGHT_COUNT%;',\r\n '',\r\n 'uniform vec4 uCamera; /* x, y, rotation, zoom */',\r\n 'uniform vec2 uResolution;',\r\n 'uniform sampler2D uMainSampler;',\r\n 'uniform sampler2D uNormSampler;',\r\n 'uniform vec3 uAmbientLightColor;',\r\n 'uniform Light uLights[kMaxLights];',\r\n 'uniform mat3 uInverseRotationMatrix;',\r\n '',\r\n 'varying vec2 outTexCoord;',\r\n 'varying vec4 outTint;',\r\n '',\r\n 'void 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(uInverseRotationMatrix * 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 ''\r\n].join('\\n');\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform sampler2D uMainSampler;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main()',\n '{',\n ' vec4 texture = texture2D(uMainSampler, outTexCoord);',\n ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);',\n ' vec4 color = texture;',\n '',\n ' if (outTintEffect == 0.0)',\n ' {',\n ' // Multiply texture tint',\n ' color = texture * texel;',\n ' }',\n ' else if (outTintEffect == 1.0)',\n ' {',\n ' // Solid color + texture alpha',\n ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);',\n ' color.a = texture.a * texel.a;',\n ' }',\n ' else if (outTintEffect == 2.0)',\n ' {',\n ' // Solid color, no texture',\n ' color = texel;',\n ' }',\n '',\n ' gl_FragColor = color;',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_VS',\n '',\n 'precision mediump float;',\n '',\n 'uniform mat4 uProjectionMatrix;',\n 'uniform mat4 uViewMatrix;',\n 'uniform mat4 uModelMatrix;',\n '',\n 'attribute vec2 inPosition;',\n 'attribute vec2 inTexCoord;',\n 'attribute float inTintEffect;',\n 'attribute vec4 inTint;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main ()',\n '{',\n ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);',\n '',\n ' outTexCoord = inTexCoord;',\n ' outTint = inTint;',\n ' outTintEffect = inTintEffect;',\n '}',\n '',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js?")},"./node_modules/phaser/src/scale/ScaleManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetInnerHeight = __webpack_require__(/*! ../dom/GetInnerHeight */ \"./node_modules/phaser/src/dom/GetInnerHeight.js\");\r\nvar GetTarget = __webpack_require__(/*! ../dom/GetTarget */ \"./node_modules/phaser/src/dom/GetTarget.js\");\r\nvar GetScreenOrientation = __webpack_require__(/*! ../dom/GetScreenOrientation */ \"./node_modules/phaser/src/dom/GetScreenOrientation.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Size = __webpack_require__(/*! ../structs/Size */ \"./node_modules/phaser/src/structs/Size.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scale Manager handles the scaling, resizing and alignment of the game canvas.\r\n * \r\n * The way scaling is handled is by setting the game canvas to a fixed size, which is defined in the\r\n * game configuration. You also define the parent container in the game config. If no parent is given,\r\n * it will default to using the document body. The Scale Manager will then look at the available space\r\n * within the _parent_ and scale the canvas accordingly. Scaling is handled by setting the canvas CSS\r\n * width and height properties, leaving the width and height of the canvas element itself untouched.\r\n * Scaling is therefore achieved by keeping the core canvas the same size and 'stretching'\r\n * it via its CSS properties. This gives the same result and speed as using the `transform-scale` CSS\r\n * property, without the need for browser prefix handling.\r\n * \r\n * The calculations for the scale are heavily influenced by the bounding parent size, which is the computed\r\n * dimensions of the canvas's parent. The CSS rules of the parent element play an important role in the\r\n * operation of the Scale Manager. For example, if the parent has no defined width or height, then actions\r\n * like auto-centering will fail to achieve the required result. The Scale Manager works in tandem with the\r\n * CSS you set-up on the page hosting your game, rather than taking control of it.\r\n * \r\n * #### Parent and Display canvas containment guidelines:\r\n *\r\n * - Style the Parent element (of the game canvas) to control the Parent size and thus the games size and layout.\r\n *\r\n * - The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.\r\n *\r\n * - The Parent element should _not_ apply a padding as this is not accounted for.\r\n * If a padding is required apply it to the Parent's parent or apply a margin to the Parent.\r\n * If you need to add a border, margin or any other CSS around your game container, then use a parent element and\r\n * apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.\r\n *\r\n * - The Display canvas layout CSS styles (i.e. margins, size) should not be altered / specified as\r\n * they may be updated by the Scale Manager.\r\n *\r\n * #### Scale Modes\r\n * \r\n * The way the scaling is handled is determined by the `scaleMode` property. The default is `NO_SCALE`,\r\n * which prevents Phaser from scaling or touching the canvas, or its parent, at all. In this mode, you are\r\n * responsible for all scaling. The other scaling modes afford you automatic scaling.\r\n * \r\n * If you wish to scale your game so that it always fits into the available space within the parent, you\r\n * should use the scale mode `FIT`. Look at the documentation for other scale modes to see what options are\r\n * available. Here is a basic config showing how to set this scale mode:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * mode: Phaser.Scale.FIT,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * Place the `scale` config object within your game config.\r\n * \r\n * If you wish for the canvas to be resized directly, so that the canvas itself fills the available space\r\n * (i.e. it isn't scaled, it's resized) then use the `RESIZE` scale mode. This will give you a 1:1 mapping\r\n * of canvas pixels to game size. In this mode CSS isn't used to scale the canvas, it's literally adjusted\r\n * to fill all available space within the parent. You should be extremely careful about the size of the\r\n * canvas you're creating when doing this, as the larger the area, the more work the GPU has to do and it's\r\n * very easy to hit fill-rate limits quickly.\r\n * \r\n * For complex, custom-scaling requirements, you should probably consider using the `RESIZE` scale mode,\r\n * with your own limitations in place re: canvas dimensions and managing the scaling with the game scenes\r\n * yourself. For the vast majority of games, however, the `FIT` mode is likely to be the most used.\r\n * \r\n * Please appreciate that the Scale Manager cannot perform miracles. All it does is scale your game canvas\r\n * as best it can, based on what it can infer from its surrounding area. There are all kinds of environments\r\n * where it's up to you to guide and help the canvas position itself, especially when built into rendering\r\n * frameworks like React and Vue. If your page requires meta tags to prevent user scaling gestures, or such\r\n * like, then it's up to you to ensure they are present in the html.\r\n * \r\n * #### Centering\r\n * \r\n * You can also have the game canvas automatically centered. Again, this relies heavily on the parent being\r\n * properly configured and styled, as the centering offsets are based entirely on the available space\r\n * within the parent element. Centering is disabled by default, or can be applied horizontally, vertically,\r\n * or both. Here's an example:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * autoCenter: Phaser.Scale.CENTER_BOTH,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * #### Fullscreen API\r\n * \r\n * If the browser supports it, you can send your game into fullscreen mode. In this mode, the game will fill\r\n * the entire display, removing all browser UI and anything else present on the screen. It will remain in this\r\n * mode until your game either disables it, or until the user tabs out or presses ESCape if on desktop. It's a\r\n * great way to achieve a desktop-game like experience from the browser, but it does require a modern browser\r\n * to handle it. Some mobile browsers also support this.\r\n *\r\n * @class ScaleManager\r\n * @memberof Phaser.Scale\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar ScaleManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function ScaleManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Scale.ScaleManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.16.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The DOM bounds of the canvas element.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvasBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.16.0\r\n */\r\n this.canvasBounds = new Rectangle();\r\n\r\n /**\r\n * The parent object of the Canvas. Often a div, or the browser window, or nothing in non-browser environments.\r\n * \r\n * This is set in the Game Config as the `parent` property. If undefined (or just not present), it will default\r\n * to use the document body. If specifically set to `null` Phaser will ignore all parent operations.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parent\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Is the parent element the browser window?\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentIsWindow\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.parentIsWindow = false;\r\n\r\n /**\r\n * The Parent Size component.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.parentSize = new Size();\r\n\r\n /**\r\n * The Game Size component.\r\n * \r\n * The un-modified game size, as requested in the game config (the raw width / height),\r\n * as used for world bounds, cameras, etc\r\n *\r\n * @name Phaser.Scale.ScaleManager#gameSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.gameSize = new Size();\r\n\r\n /**\r\n * The Base Size component.\r\n * \r\n * The modified game size, which is the gameSize * resolution, used to set the canvas width and height\r\n * (but not the CSS style)\r\n *\r\n * @name Phaser.Scale.ScaleManager#baseSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.baseSize = new Size();\r\n\r\n /**\r\n * The Display Size component.\r\n * \r\n * The size used for the canvas style, factoring in the scale mode, parent and other values.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displaySize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.displaySize = new Size();\r\n\r\n /**\r\n * The game scale mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#scaleMode\r\n * @type {Phaser.Scale.ScaleModeType}\r\n * @since 3.16.0\r\n */\r\n this.scaleMode = CONST.SCALE_MODE.NONE;\r\n\r\n /**\r\n * The canvas resolution.\r\n * \r\n * This is hard-coded to a value of 1 in the 3.16 release of Phaser and will be enabled at a later date.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resolution\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The game zoom factor.\r\n * \r\n * This value allows you to multiply your games base size by the given zoom factor.\r\n * This is then used when calculating the display size, even in `NO_SCALE` situations.\r\n * If you don't want Phaser to touch the canvas style at all, this value should be 1.\r\n * \r\n * Can also be set to `MAX_ZOOM` in which case the zoom value will be derived based\r\n * on the game size and available space within the parent.\r\n *\r\n * @name Phaser.Scale.ScaleManager#zoom\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.zoom = 1;\r\n\r\n /**\r\n * Internal flag set when the game zoom factor is modified.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_resetZoom\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this._resetZoom = false;\r\n\r\n /**\r\n * The scale factor between the baseSize and the canvasBounds.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displayScale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\n this.displayScale = new Vector2(1, 1);\r\n\r\n /**\r\n * If set, the canvas sizes will be automatically passed through Math.floor.\r\n * This results in rounded pixel display values, which is important for performance on legacy\r\n * and low powered devices, but at the cost of not achieving a 'perfect' fit in some browser windows.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoRound\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.autoRound = false;\r\n\r\n /**\r\n * Automatically center the canvas within the parent? The different centering modes are:\r\n * \r\n * 1. No centering.\r\n * 2. Center both horizontally and vertically.\r\n * 3. Center horizontally.\r\n * 4. Center vertically.\r\n * \r\n * Please be aware that in order to center the game canvas, you must have specified a parent\r\n * that has a size set, or the canvas parent is the document.body.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoCenter\r\n * @type {Phaser.Scale.CenterType}\r\n * @since 3.16.0\r\n */\r\n this.autoCenter = CONST.CENTER.NO_CENTER;\r\n\r\n /**\r\n * The current device orientation.\r\n * \r\n * Orientation events are dispatched via the Device Orientation API, typically only on mobile browsers.\r\n *\r\n * @name Phaser.Scale.ScaleManager#orientation\r\n * @type {Phaser.Scale.OrientationType}\r\n * @since 3.16.0\r\n */\r\n this.orientation = CONST.ORIENTATION.LANDSCAPE;\r\n\r\n /**\r\n * A reference to the Device.Fullscreen object.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreen\r\n * @type {Phaser.Device.Fullscreen}\r\n * @since 3.16.0\r\n */\r\n this.fullscreen;\r\n\r\n /**\r\n * The DOM Element which is sent into fullscreen mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreenTarget\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.fullscreenTarget = null;\r\n\r\n /**\r\n * Did Phaser create the fullscreen target div, or was it provided in the game config?\r\n *\r\n * @name Phaser.Scale.ScaleManager#_createdFullscreenTarget\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._createdFullscreenTarget = false;\r\n\r\n /**\r\n * Internal var that keeps track of the user, or the browser, requesting fullscreen changes.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.2\r\n */\r\n this._requestedFullscreenChange = false;\r\n\r\n /**\r\n * The dirty state of the Scale Manager.\r\n * Set if there is a change between the parent size and the current size.\r\n *\r\n * @name Phaser.Scale.ScaleManager#dirty\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * How many milliseconds should elapse before checking if the browser size has changed?\r\n * \r\n * Most modern browsers dispatch a 'resize' event, which the Scale Manager will listen for.\r\n * However, older browsers fail to do this, or do it consistently, so we fall back to a\r\n * more traditional 'size check' based on a time interval. You can control how often it is\r\n * checked here.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resizeInterval\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\n this.resizeInterval = 500;\r\n\r\n /**\r\n * Internal size interval tracker.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_lastCheck\r\n * @type {integer}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._lastCheck = 0;\r\n\r\n /**\r\n * Internal flag to check orientation state.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_checkOrientation\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._checkOrientation = false;\r\n\r\n /**\r\n * Internal object containing our defined event listeners.\r\n *\r\n * @name Phaser.Scale.ScaleManager#listeners\r\n * @type {object}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.listeners = {\r\n\r\n orientationChange: NOOP,\r\n windowResize: NOOP,\r\n fullScreenChange: NOOP,\r\n fullScreenError: NOOP\r\n\r\n };\r\n },\r\n\r\n /**\r\n * Called _before_ the canvas object is created and added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#preBoot\r\n * @protected\r\n * @listens Phaser.Core.Events#BOOT\r\n * @since 3.16.0\r\n */\r\n preBoot: function ()\r\n {\r\n // Parse the config to get the scaling values we need\r\n this.parseConfig(this.game.config);\r\n\r\n this.game.events.once('boot', this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now and the canvas has been added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#boot\r\n * @protected\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.game;\r\n\r\n this.canvas = game.canvas;\r\n\r\n this.fullscreen = game.device.fullscreen;\r\n\r\n if (this.scaleMode !== CONST.SCALE_MODE.RESIZE)\r\n {\r\n this.displaySize.setAspectMode(this.scaleMode);\r\n }\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n this.resize(this.width, this.height);\r\n }\r\n else\r\n {\r\n this.getParentBounds();\r\n\r\n // Only set the parent bounds if the parent has an actual size\r\n if (this.parentSize.width > 0 && this.parentSize.height > 0)\r\n {\r\n this.displaySize.setParent(this.parentSize);\r\n }\r\n\r\n this.refresh();\r\n }\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.step, this);\r\n\r\n this.startListeners();\r\n },\r\n\r\n /**\r\n * Parses the game configuration to set-up the scale defaults.\r\n *\r\n * @method Phaser.Scale.ScaleManager#parseConfig\r\n * @protected\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n parseConfig: function (config)\r\n {\r\n // Get the parent element, if any\r\n this.getParent(config);\r\n \r\n // Get the size of the parent element\r\n // This can often set a height of zero (especially for un-styled divs)\r\n this.getParentBounds();\r\n\r\n var width = config.width;\r\n var height = config.height;\r\n var scaleMode = config.scaleMode;\r\n var resolution = config.resolution;\r\n var zoom = config.zoom;\r\n var autoRound = config.autoRound;\r\n\r\n // If width = '100%', or similar value\r\n if (typeof width === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentWidth = this.parentSize.width;\r\n\r\n if (parentWidth === 0)\r\n {\r\n parentWidth = window.innerWidth;\r\n }\r\n\r\n var parentScaleX = parseInt(width, 10) / 100;\r\n\r\n width = Math.floor(parentWidth * parentScaleX);\r\n }\r\n\r\n // If height = '100%', or similar value\r\n if (typeof height === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentHeight = this.parentSize.height;\r\n\r\n if (parentHeight === 0)\r\n {\r\n parentHeight = window.innerHeight;\r\n }\r\n\r\n var parentScaleY = parseInt(height, 10) / 100;\r\n\r\n height = Math.floor(parentHeight * parentScaleY);\r\n }\r\n\r\n // This is fixed at 1 on purpose.\r\n // Changing it will break all user input.\r\n // Wait for another release to solve this issue.\r\n this.resolution = 1;\r\n\r\n this.scaleMode = scaleMode;\r\n\r\n this.autoRound = autoRound;\r\n\r\n this.autoCenter = config.autoCenter;\r\n\r\n this.resizeInterval = config.resizeInterval;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.setSize(width, height);\r\n\r\n if (zoom === CONST.ZOOM.MAX_ZOOM)\r\n {\r\n zoom = this.getMaxZoom();\r\n }\r\n\r\n this.zoom = zoom;\r\n\r\n if (zoom !== 1)\r\n {\r\n this._resetZoom = true;\r\n }\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.setSize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n if (config.minWidth > 0)\r\n {\r\n this.displaySize.setMin(config.minWidth * zoom, config.minHeight * zoom);\r\n }\r\n\r\n if (config.maxWidth > 0)\r\n {\r\n this.displaySize.setMax(config.maxWidth * zoom, config.maxHeight * zoom);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.orientation = GetScreenOrientation(width, height);\r\n },\r\n\r\n /**\r\n * Determines the parent element of the game canvas, if any, based on the game configuration.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParent\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n getParent: function (config)\r\n {\r\n var parent = config.parent;\r\n\r\n if (parent === null)\r\n {\r\n // User is responsible for managing the parent\r\n return;\r\n }\r\n\r\n this.parent = GetTarget(parent);\r\n this.parentIsWindow = (this.parent === document.body);\r\n\r\n if (config.expandParent && config.scaleMode !== CONST.SCALE_MODE.NONE)\r\n {\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow || DOMRect.height === 0)\r\n {\r\n document.documentElement.style.height = '100%';\r\n document.body.style.height = '100%';\r\n\r\n DOMRect = this.parent.getBoundingClientRect();\r\n\r\n // The parent STILL has no height, clearly no CSS\r\n // has been set on it even though we fixed the body :(\r\n if (!this.parentIsWindow && DOMRect.height === 0)\r\n {\r\n this.parent.style.overflow = 'hidden';\r\n this.parent.style.width = '100%';\r\n this.parent.style.height = '100%';\r\n }\r\n }\r\n }\r\n\r\n // And now get the fullscreenTarget\r\n if (config.fullscreenTarget && !this.fullscreenTarget)\r\n {\r\n this.fullscreenTarget = GetTarget(config.fullscreenTarget);\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the size of the parent bounds and updates the `parentSize` component, if the canvas has a dom parent.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParentBounds\r\n * @since 3.16.0\r\n * \r\n * @return {boolean} `true` if the parent bounds have changed size, otherwise `false`.\r\n */\r\n getParentBounds: function ()\r\n {\r\n if (!this.parent)\r\n {\r\n return false;\r\n }\r\n\r\n var parentSize = this.parentSize;\r\n\r\n // Ref. http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx for getBoundingClientRect\r\n\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow && this.game.device.os.iOS)\r\n {\r\n DOMRect.height = GetInnerHeight(true);\r\n }\r\n\r\n var resolution = this.resolution;\r\n var newWidth = DOMRect.width * resolution;\r\n var newHeight = DOMRect.height * resolution;\r\n\r\n if (parentSize.width !== newWidth || parentSize.height !== newHeight)\r\n {\r\n parentSize.setSize(newWidth, newHeight);\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to lock the orientation of the web browser using the Screen Orientation API.\r\n * \r\n * This API is only available on modern mobile browsers.\r\n * See https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation for details.\r\n *\r\n * @method Phaser.Scale.ScaleManager#lockOrientation\r\n * @since 3.16.0\r\n * \r\n * @param {string} orientation - The orientation you'd like to lock the browser in. Should be an API string such as 'landscape', 'landscape-primary', 'portrait', etc.\r\n * \r\n * @return {boolean} `true` if the orientation was successfully locked, otherwise `false`.\r\n */\r\n lockOrientation: function (orientation)\r\n {\r\n var lock = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;\r\n\r\n if (lock)\r\n {\r\n return lock(orientation);\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * This method will set the size of the Parent Size component, which is used in scaling\r\n * and centering calculations. You only need to call this method if you have explicitly\r\n * disabled the use of a parent in your game config, but still wish to take advantage of\r\n * other Scale Manager features.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setParentSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the parent.\r\n * @param {number} height - The new height of the parent.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setParentSize: function (width, height)\r\n {\r\n this.parentSize.setSize(width, height);\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * This method will set a new size for your game.\r\n * \r\n * It should only be used if you're looking to change the base size of your game and are using\r\n * one of the Scale Manager scaling modes, i.e. `FIT`. If you're using `NO_SCALE` and wish to\r\n * change the game and canvas size directly, then please use the `resize` method instead.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setGameSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setGameSize: function (width, height)\r\n {\r\n var autoRound = this.autoRound;\r\n var resolution = this.resolution;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Call this to modify the size of the Phaser canvas element directly.\r\n * You should only use this if you are using the `NO_SCALE` scale mode,\r\n * it will update all internal components completely.\r\n * \r\n * If all you want to do is change the size of the parent, see the `setParentSize` method.\r\n * \r\n * If all you want is to change the base size of the game, but still have the Scale Manager\r\n * manage all the scaling (i.e. you're **not** using `NO_SCALE`), then see the `setGameSize` method.\r\n * \r\n * This method will set the `gameSize`, `baseSize` and `displaySize` components to the given\r\n * dimensions. It will then resize the canvas width and height to the values given, by\r\n * directly setting the properties. Finally, if you have set the Scale Manager zoom value\r\n * to anything other than 1 (the default), it will set the canvas CSS width and height to\r\n * be the given size multiplied by the zoom factor (the canvas pixel size remains untouched).\r\n * \r\n * If you have enabled `autoCenter`, it is then passed to the `updateCenter` method and\r\n * the margins are set, allowing the canvas to be centered based on its parent element\r\n * alone. Finally, the `displayScale` is adjusted and the RESIZE event dispatched.\r\n *\r\n * @method Phaser.Scale.ScaleManager#resize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n var zoom = this.zoom;\r\n var resolution = this.resolution;\r\n var autoRound = this.autoRound;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n var style = this.canvas.style;\r\n\r\n var styleWidth = width * zoom;\r\n var styleHeight = height * zoom;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (styleWidth !== width || styleHeight !== height)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Sets the zoom value of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {integer} value - The new zoom value of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n this.zoom = value;\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Sets the zoom to be the maximum possible based on the _current_ parent size.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setMaxZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setMaxZoom: function ()\r\n {\r\n this.zoom = this.getMaxZoom();\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Refreshes the internal scale values, bounds sizes and orientation checks.\r\n * \r\n * Once finished, dispatches the resize event.\r\n * \r\n * This is called automatically by the Scale Manager when the browser window size changes,\r\n * as long as it is using a Scale Mode other than 'NONE'.\r\n *\r\n * @method Phaser.Scale.ScaleManager#refresh\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} [previousWidth] - The previous width of the game. Only set if the gameSize has changed.\r\n * @param {number} [previousHeight] - The previous height of the game. Only set if the gameSize has changed.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n refresh: function (previousWidth, previousHeight)\r\n {\r\n if (previousWidth === undefined) { previousWidth = this.width; }\r\n if (previousHeight === undefined) { previousHeight = this.height; }\r\n\r\n this.updateScale();\r\n this.updateBounds();\r\n this.updateOrientation();\r\n\r\n this.displayScale.set(this.baseSize.width / this.canvasBounds.width, this.baseSize.height / this.canvasBounds.height);\r\n\r\n var domContainer = this.game.domContainer;\r\n\r\n if (domContainer)\r\n {\r\n this.baseSize.setCSS(domContainer);\r\n\r\n var canvasStyle = this.canvas.style;\r\n var domStyle = domContainer.style;\r\n\r\n domStyle.transform = 'scale(' + this.displaySize.width / this.baseSize.width + ',' + this.displaySize.height / this.baseSize.height + ')';\r\n\r\n domStyle.marginLeft = canvasStyle.marginLeft;\r\n domStyle.marginTop = canvasStyle.marginTop;\r\n }\r\n\r\n this.emit(Events.RESIZE, this.gameSize, this.baseSize, this.displaySize, this.resolution, previousWidth, previousHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that checks the current screen orientation, only if the internal check flag is set.\r\n * \r\n * If the orientation has changed it updates the orientation property and then dispatches the orientation change event.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateOrientation\r\n * @fires Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.0\r\n */\r\n updateOrientation: function ()\r\n {\r\n if (this._checkOrientation)\r\n {\r\n this._checkOrientation = false;\r\n\r\n var newOrientation = GetScreenOrientation(this.width, this.height);\r\n\r\n if (newOrientation !== this.orientation)\r\n {\r\n this.orientation = newOrientation;\r\n \r\n this.emit(Events.ORIENTATION_CHANGE, newOrientation);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that manages updating the size components based on the scale mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateScale\r\n * @since 3.16.0\r\n */\r\n updateScale: function ()\r\n {\r\n var style = this.canvas.style;\r\n\r\n var width = this.gameSize.width;\r\n var height = this.gameSize.height;\r\n\r\n var styleWidth;\r\n var styleHeight;\r\n\r\n var zoom = this.zoom;\r\n var autoRound = this.autoRound;\r\n var resolution = 1;\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n // No scale\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (this._resetZoom)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n\r\n this._resetZoom = false;\r\n }\r\n }\r\n else if (this.scaleMode === CONST.SCALE_MODE.RESIZE)\r\n {\r\n // Resize to match parent\r\n\r\n // This will constrain using min/max\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n this.gameSize.setSize(this.displaySize.width, this.displaySize.height);\r\n\r\n this.baseSize.setSize(this.displaySize.width * resolution, this.displaySize.height * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n this.canvas.width = styleWidth;\r\n this.canvas.height = styleHeight;\r\n }\r\n else\r\n {\r\n // All other scale modes\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n // Update the parentSize incase the canvas / style change modified it\r\n this.getParentBounds();\r\n\r\n // Finally, update the centering\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Calculates and returns the largest possible zoom factor, based on the current\r\n * parent and game sizes. If the parent has no dimensions (i.e. an unstyled div),\r\n * or is smaller than the un-zoomed game, then this will return a value of 1 (no zoom)\r\n *\r\n * @method Phaser.Scale.ScaleManager#getMaxZoom\r\n * @since 3.16.0\r\n * \r\n * @return {integer} The maximum possible zoom factor. At a minimum this value is always at least 1.\r\n */\r\n getMaxZoom: function ()\r\n {\r\n var zoomH = SnapFloor(this.parentSize.width, this.gameSize.width, 0, true);\r\n var zoomV = SnapFloor(this.parentSize.height, this.gameSize.height, 0, true);\r\n \r\n return Math.max(Math.min(zoomH, zoomV), 1);\r\n },\r\n\r\n /**\r\n * Calculates and updates the canvas CSS style in order to center it within the\r\n * bounds of its parent. If you have explicitly set parent to be `null` in your\r\n * game config then this method will likely give incorrect results unless you have called the\r\n * `setParentSize` method first.\r\n * \r\n * It works by modifying the canvas CSS `marginLeft` and `marginTop` properties.\r\n * \r\n * If they have already been set by your own style sheet, or code, this will overwrite them.\r\n * \r\n * To prevent the Scale Manager from centering the canvas, either do not set the\r\n * `autoCenter` property in your game config, or make sure it is set to `NO_CENTER`.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateCenter\r\n * @since 3.16.0\r\n */\r\n updateCenter: function ()\r\n {\r\n var autoCenter = this.autoCenter;\r\n\r\n if (autoCenter === CONST.CENTER.NO_CENTER)\r\n {\r\n return;\r\n }\r\n\r\n var canvas = this.canvas;\r\n\r\n var style = canvas.style;\r\n\r\n var bounds = canvas.getBoundingClientRect();\r\n\r\n // var width = parseInt(canvas.style.width, 10) || canvas.width;\r\n // var height = parseInt(canvas.style.height, 10) || canvas.height;\r\n\r\n var width = bounds.width;\r\n var height = bounds.height;\r\n\r\n var offsetX = Math.floor((this.parentSize.width - width) / 2);\r\n var offsetY = Math.floor((this.parentSize.height - height) / 2);\r\n\r\n if (autoCenter === CONST.CENTER.CENTER_HORIZONTALLY)\r\n {\r\n offsetY = 0;\r\n }\r\n else if (autoCenter === CONST.CENTER.CENTER_VERTICALLY)\r\n {\r\n offsetX = 0;\r\n }\r\n\r\n style.marginLeft = offsetX + 'px';\r\n style.marginTop = offsetY + 'px';\r\n },\r\n\r\n /**\r\n * Updates the `canvasBounds` rectangle to match the bounding client rectangle of the\r\n * canvas element being used to track input events.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateBounds\r\n * @since 3.16.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var bounds = this.canvasBounds;\r\n var clientRect = this.canvas.getBoundingClientRect();\r\n\r\n bounds.x = clientRect.left + (window.pageXOffset || 0) - (document.documentElement.clientLeft || 0);\r\n bounds.y = clientRect.top + (window.pageYOffset || 0) - (document.documentElement.clientTop || 0);\r\n bounds.width = clientRect.width;\r\n bounds.height = clientRect.height;\r\n },\r\n\r\n /**\r\n * Transforms the pageX value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformX\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageX - The DOM pageX value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformX: function (pageX)\r\n {\r\n return (pageX - this.canvasBounds.left) * this.displayScale.x;\r\n },\r\n\r\n /**\r\n * Transforms the pageY value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformY\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageY - The DOM pageY value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformY: function (pageY)\r\n {\r\n return (pageY - this.canvasBounds.top) * this.displayScale.y;\r\n },\r\n\r\n /**\r\n * Sends a request to the browser to ask it to go in to full screen mode, using the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API Fullscreen API}.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerup`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n * \r\n * On touch devices, such as Android and iOS Safari, you should always use `pointerup` and NOT `pointerdown`,\r\n * otherwise the request will fail unless the document in which your game is embedded has already received\r\n * some form of touch input, which you cannot guarantee. Activating fullscreen via `pointerup` circumvents\r\n * this issue.\r\n * \r\n * Performing an action that navigates to another page, or opens another tab, will automatically cancel\r\n * fullscreen mode, as will the user pressing the ESC key. To cancel fullscreen mode directly from your game,\r\n * i.e. by clicking an icon, call the `stopFullscreen` method.\r\n * \r\n * A browser can only send one DOM element into fullscreen. You can control which element this is by\r\n * setting the `fullscreenTarget` property in your game config, or changing the property in the Scale Manager.\r\n * Note that the game canvas _must_ be a child of the target. If you do not give a target, Phaser will\r\n * automatically create a blank `
` element and move the canvas into it, before going fullscreen.\r\n * When it leaves fullscreen, the div will be removed.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n startFullscreen: function (fullscreenOptions)\r\n {\r\n if (fullscreenOptions === undefined) { fullscreenOptions = { navigationUI: 'hide' }; }\r\n\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return;\r\n }\r\n\r\n if (!fullscreen.active)\r\n {\r\n var fsTarget = this.getFullscreenTarget();\r\n\r\n this._requestedFullscreenChange = true;\r\n \r\n if (typeof Promise !== 'undefined')\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n }\r\n else\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT);\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions);\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this.fullscreenSuccessHandler();\r\n }\r\n else\r\n {\r\n this.fullscreenErrorHandler();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The browser has successfully entered fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenSuccessHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n */\r\n fullscreenSuccessHandler: function ()\r\n {\r\n this.getParentBounds();\r\n\r\n this.refresh();\r\n\r\n this.emit(Events.ENTER_FULLSCREEN);\r\n },\r\n\r\n /**\r\n * The browser failed to enter fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenErrorHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n * \r\n * @param {any} error - The DOM error event.\r\n */\r\n fullscreenErrorHandler: function (error)\r\n {\r\n this.removeFullscreenTarget();\r\n\r\n this.emit(Events.FULLSCREEN_FAILED, error);\r\n },\r\n\r\n /**\r\n * An internal method that gets the target element that is used when entering fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getFullscreenTarget\r\n * @since 3.16.0\r\n * \r\n * @return {object} The fullscreen target element.\r\n */\r\n getFullscreenTarget: function ()\r\n {\r\n if (!this.fullscreenTarget)\r\n {\r\n var fsTarget = document.createElement('div');\r\n\r\n fsTarget.style.margin = '0';\r\n fsTarget.style.padding = '0';\r\n fsTarget.style.width = '100%';\r\n fsTarget.style.height = '100%';\r\n\r\n this.fullscreenTarget = fsTarget;\r\n\r\n this._createdFullscreenTarget = true;\r\n }\r\n\r\n if (this._createdFullscreenTarget)\r\n {\r\n var canvasParent = this.canvas.parentNode;\r\n\r\n canvasParent.insertBefore(this.fullscreenTarget, this.canvas);\r\n\r\n this.fullscreenTarget.appendChild(this.canvas);\r\n }\r\n\r\n return this.fullscreenTarget;\r\n },\r\n\r\n /**\r\n * Removes the fullscreen target that was added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#removeFullscreenTarget\r\n * @since 3.17.0\r\n */\r\n removeFullscreenTarget: function ()\r\n {\r\n if (this._createdFullscreenTarget)\r\n {\r\n var fsTarget = this.fullscreenTarget;\r\n\r\n if (fsTarget && fsTarget.parentNode)\r\n {\r\n var parent = fsTarget.parentNode;\r\n\r\n parent.insertBefore(this.canvas, fsTarget);\r\n\r\n parent.removeChild(fsTarget);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calling this method will cancel fullscreen mode, if the browser has entered it.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopFullscreen\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.0\r\n */\r\n stopFullscreen: function ()\r\n {\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return false;\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this._requestedFullscreenChange = true;\r\n\r\n document[fullscreen.cancel]();\r\n }\r\n\r\n this.removeFullscreenTarget();\r\n\r\n // Get the parent size again as it will have changed\r\n this.getParentBounds();\r\n\r\n this.emit(Events.LEAVE_FULLSCREEN);\r\n\r\n this.refresh();\r\n },\r\n\r\n /**\r\n * Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it.\r\n * If not in fullscreen, this will request the browser to enter fullscreen mode.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerdown`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n *\r\n * @method Phaser.Scale.ScaleManager#toggleFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n toggleFullscreen: function (fullscreenOptions)\r\n {\r\n if (this.fullscreen.active)\r\n {\r\n this.stopFullscreen();\r\n }\r\n else\r\n {\r\n this.startFullscreen(fullscreenOptions);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that starts the different DOM event listeners running.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var listeners = this.listeners;\r\n\r\n listeners.orientationChange = function ()\r\n {\r\n _this._checkOrientation = true;\r\n _this.dirty = true;\r\n };\r\n\r\n listeners.windowResize = function ()\r\n {\r\n _this.dirty = true;\r\n };\r\n\r\n // Only dispatched on mobile devices\r\n window.addEventListener('orientationchange', listeners.orientationChange, false);\r\n\r\n window.addEventListener('resize', listeners.windowResize, false);\r\n\r\n if (this.fullscreen.available)\r\n {\r\n listeners.fullScreenChange = function (event)\r\n {\r\n return _this.onFullScreenChange(event);\r\n };\r\n\r\n listeners.fullScreenError = function (event)\r\n {\r\n return _this.onFullScreenError(event);\r\n };\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.addEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.addEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.addEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.addEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n }\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenchange event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenChange\r\n * @since 3.16.0\r\n */\r\n onFullScreenChange: function ()\r\n {\r\n // They pressed ESC while in fullscreen mode\r\n if (!this._requestedFullscreenChange)\r\n {\r\n this.stopFullscreen();\r\n }\r\n\r\n this._requestedFullscreenChange = false;\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenerror event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenError\r\n * @since 3.16.0\r\n */\r\n onFullScreenError: function ()\r\n {\r\n this.removeFullscreenTarget();\r\n },\r\n\r\n /**\r\n * Internal method, called automatically by the game step.\r\n * Monitors the elapsed time and resize interval to see if a parent bounds check needs to take place.\r\n *\r\n * @method Phaser.Scale.ScaleManager#step\r\n * @since 3.16.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (!this.parent)\r\n {\r\n return;\r\n }\r\n\r\n this._lastCheck += delta;\r\n\r\n if (this.dirty || this._lastCheck > this.resizeInterval)\r\n {\r\n // Returns true if the parent bounds have changed size\r\n if (this.getParentBounds())\r\n {\r\n this.refresh();\r\n }\r\n\r\n this.dirty = false;\r\n this._lastCheck = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Stops all DOM event listeners.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var listeners = this.listeners;\r\n\r\n window.removeEventListener('orientationchange', listeners.orientationChange, false);\r\n window.removeEventListener('resize', listeners.windowResize, false);\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.removeEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.removeEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.removeEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.removeEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n },\r\n\r\n /**\r\n * Destroys this Scale Manager, releasing all references to external resources.\r\n * Once destroyed, the Scale Manager cannot be used again.\r\n *\r\n * @method Phaser.Scale.ScaleManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.stopListeners();\r\n\r\n this.game = null;\r\n this.canvas = null;\r\n this.canvasBounds = null;\r\n this.parent = null;\r\n this.fullscreenTarget = null;\r\n\r\n this.parentSize.destroy();\r\n this.gameSize.destroy();\r\n this.baseSize.destroy();\r\n this.displaySize.destroy();\r\n },\r\n\r\n /**\r\n * Is the browser currently in fullscreen mode or not?\r\n *\r\n * @name Phaser.Scale.ScaleManager#isFullscreen\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isFullscreen: {\r\n\r\n get: function ()\r\n {\r\n return this.fullscreen.active;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game width.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.width;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game height.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.height;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a portrait orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isPortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isPortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.PORTRAIT);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a landscape orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.LANDSCAPE);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions portrait? (i.e. taller than they are wide)\r\n * \r\n * This is different to the device itself being in a portrait orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGamePortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGamePortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.height > this.width);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions landscape? (i.e. wider than they are tall)\r\n * \r\n * This is different to the device itself being in a landscape orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGameLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGameLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.width > this.height);\r\n }\r\n \r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScaleManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/ScaleManager.js?")},"./node_modules/phaser/src/scale/const/CENTER_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * @namespace Phaser.Scale.Center\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}.\r\n * \r\n * @typedef {Phaser.Scale.Center} Phaser.Scale.CenterType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas is not centered within the parent by Phaser.\r\n * You can still center it yourself via CSS.\r\n * \r\n * @name Phaser.Scale.Center.NO_CENTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_CENTER: 0,\r\n\r\n /**\r\n * The game canvas is centered both horizontally and vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_BOTH: 1,\r\n\r\n /**\r\n * The game canvas is centered horizontally within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_HORIZONTALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_HORIZONTALLY: 2,\r\n\r\n /**\r\n * The game canvas is centered both vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_VERTICALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_VERTICALLY: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/CENTER_CONST.js?")},"./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * @namespace Phaser.Scale.Orientation\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}.\r\n * \r\n * @typedef {Phaser.Scale.Orientation} Phaser.Scale.OrientationType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * A landscape orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.LANDSCAPE\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n LANDSCAPE: 'landscape-primary',\r\n\r\n /**\r\n * A portrait orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.PORTRAIT\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n PORTRAIT: 'portrait-primary'\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js?")},"./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * @namespace Phaser.Scale.ScaleModes\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}.\r\n * \r\n * @typedef {Phaser.Scale.ScaleModes} Phaser.Scale.ScaleModeType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it\r\n * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need\r\n * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.\r\n * \r\n * @name Phaser.Scale.ScaleModes.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n WIDTH_CONTROLS_HEIGHT: 1,\r\n\r\n /**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n HEIGHT_CONTROLS_WIDTH: 2,\r\n\r\n /**\r\n * The width and height are automatically adjusted to fit inside the given target area,\r\n * while keeping the aspect ratio. Depending on the aspect ratio there may be some space\r\n * inside the area which is not covered.\r\n * \r\n * @name Phaser.Scale.ScaleModes.FIT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n FIT: 3,\r\n\r\n /**\r\n * The width and height are automatically adjusted to make the size cover the entire target\r\n * area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Scale.ScaleModes.ENVELOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ENVELOP: 4,\r\n\r\n /**\r\n * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.\r\n * \r\n * @name Phaser.Scale.ScaleModes.RESIZE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n RESIZE: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js?")},"./node_modules/phaser/src/scale/const/ZOOM_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * @namespace Phaser.Scale.Zoom\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}.\r\n * \r\n * @typedef {Phaser.Scale.Zoom} Phaser.Scale.ZoomType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas will not be zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.NO_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_ZOOM: 1,\r\n\r\n /**\r\n * The game canvas will be 2x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_2X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_2X: 2,\r\n\r\n /**\r\n * The game canvas will be 4x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_4X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_4X: 4,\r\n\r\n /**\r\n * Calculate the zoom value based on the maximum multiplied game size that will\r\n * fit into the parent, or browser window if no parent is set.\r\n * \r\n * @name Phaser.Scale.Zoom.MAX_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n MAX_ZOOM: -1\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ZOOM_CONST.js?")},"./node_modules/phaser/src/scale/const/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = {\r\n\r\n CENTER: __webpack_require__(/*! ./CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n ORIENTATION: __webpack_require__(/*! ./ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n SCALE_MODE: __webpack_require__(/*! ./SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n ZOOM: __webpack_require__(/*! ./ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/index.js?')},"./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager has successfully entered fullscreen mode.\r\n *\r\n * @event Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'enterfullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode but failed.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @since 3.17.0\r\n */\r\nmodule.exports = 'fullscreenfailed';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'fullscreenunsupported';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js?")},"./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager was in fullscreen mode, but has since left, either directly via game code,\r\n * or via a user gestured, such as pressing the ESC key.\r\n *\r\n * @event Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'leavefullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Orientation Change Event.\r\n *\r\n * @event Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.1\r\n * \r\n * @param {string} orientation - \r\n */\r\nmodule.exports = 'orientationchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js?")},"./node_modules/phaser/src/scale/events/RESIZE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/RESIZE_EVENT.js?")},"./node_modules/phaser/src/scale/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scale.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ENTER_FULLSCREEN: __webpack_require__(/*! ./ENTER_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js"),\r\n FULLSCREEN_FAILED: __webpack_require__(/*! ./FULLSCREEN_FAILED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js"),\r\n FULLSCREEN_UNSUPPORTED: __webpack_require__(/*! ./FULLSCREEN_UNSUPPORTED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js"),\r\n LEAVE_FULLSCREEN: __webpack_require__(/*! ./LEAVE_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js"),\r\n ORIENTATION_CHANGE: __webpack_require__(/*! ./ORIENTATION_CHANGE_EVENT */ "./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js"),\r\n RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "./node_modules/phaser/src/scale/events/RESIZE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/index.js?')},"./node_modules/phaser/src/scale/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scale/const/index.js");\r\n\r\n/**\r\n * @namespace Phaser.Scale\r\n * \r\n * @borrows Phaser.Scale.Center.NO_CENTER as NO_CENTER\r\n * @borrows Phaser.Scale.Center.CENTER_BOTH as CENTER_BOTH\r\n * @borrows Phaser.Scale.Center.CENTER_HORIZONTALLY as CENTER_HORIZONTALLY\r\n * @borrows Phaser.Scale.Center.CENTER_VERTICALLY as CENTER_VERTICALLY\r\n * \r\n * @borrows Phaser.Scale.Orientation.LANDSCAPE as LANDSCAPE\r\n * @borrows Phaser.Scale.Orientation.PORTRAIT as PORTRAIT\r\n * \r\n * @borrows Phaser.Scale.ScaleModes.NONE as NONE\r\n * @borrows Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT as WIDTH_CONTROLS_HEIGHT\r\n * @borrows Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH as HEIGHT_CONTROLS_WIDTH\r\n * @borrows Phaser.Scale.ScaleModes.FIT as FIT\r\n * @borrows Phaser.Scale.ScaleModes.ENVELOP as ENVELOP\r\n * @borrows Phaser.Scale.ScaleModes.RESIZE as RESIZE\r\n * \r\n * @borrows Phaser.Scale.Zoom.NO_ZOOM as NO_ZOOM\r\n * @borrows Phaser.Scale.Zoom.ZOOM_2X as ZOOM_2X\r\n * @borrows Phaser.Scale.Zoom.ZOOM_4X as ZOOM_4X\r\n * @borrows Phaser.Scale.Zoom.MAX_ZOOM as MAX_ZOOM\r\n */\r\n\r\nvar Scale = {\r\n\r\n Center: __webpack_require__(/*! ./const/CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scale/events/index.js"),\r\n Orientation: __webpack_require__(/*! ./const/ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n ScaleManager: __webpack_require__(/*! ./ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js"),\r\n ScaleModes: __webpack_require__(/*! ./const/SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n Zoom: __webpack_require__(/*! ./const/ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nScale = Extend(false, Scale, CONST.CENTER);\r\nScale = Extend(false, Scale, CONST.ORIENTATION);\r\nScale = Extend(false, Scale, CONST.SCALE_MODE);\r\nScale = Extend(false, Scale, CONST.ZOOM);\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/index.js?')},"./node_modules/phaser/src/scene/GetPhysicsPlugins.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * Builds an array of which physics plugins should be activated for the given Scene.\r\n *\r\n * @function Phaser.Scenes.GetPhysicsPlugins\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of.\r\n *\r\n * @return {array} An array of Physics systems to start for this Scene.\r\n */\r\nvar GetPhysicsPlugins = function (sys)\r\n{\r\n var defaultSystem = sys.game.config.defaultPhysicsSystem;\r\n var sceneSystems = GetFastValue(sys.settings, 'physics', false);\r\n\r\n if (!defaultSystem && !sceneSystems)\r\n {\r\n // No default physics system or systems in this scene\r\n return;\r\n }\r\n\r\n // Let's build the systems array\r\n var output = [];\r\n\r\n if (defaultSystem)\r\n {\r\n output.push(UppercaseFirst(defaultSystem + 'Physics'));\r\n }\r\n\r\n if (sceneSystems)\r\n {\r\n for (var key in sceneSystems)\r\n {\r\n key = UppercaseFirst(key.concat('Physics'));\r\n\r\n if (output.indexOf(key) === -1)\r\n {\r\n output.push(key);\r\n }\r\n }\r\n }\r\n\r\n // An array of Physics systems to start for this Scene\r\n return output;\r\n};\r\n\r\nmodule.exports = GetPhysicsPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetPhysicsPlugins.js?")},"./node_modules/phaser/src/scene/GetScenePlugins.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\n\n/**\n * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene.\n *\n * @function Phaser.Scenes.GetScenePlugins\n * @since 3.0.0\n *\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins.\n *\n * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object.\n */\nvar GetScenePlugins = function (sys)\n{\n var defaultPlugins = sys.plugins.getDefaultScenePlugins();\n\n var scenePlugins = GetFastValue(sys.settings, 'plugins', false);\n\n // Scene Plugins always override Default Plugins\n if (Array.isArray(scenePlugins))\n {\n return scenePlugins;\n }\n else if (defaultPlugins)\n {\n return defaultPlugins;\n }\n else\n {\n // No default plugins or plugins in this scene\n return [];\n }\n};\n\nmodule.exports = GetScenePlugins;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetScenePlugins.js?")},"./node_modules/phaser/src/scene/InjectionMap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// These properties get injected into the Scene and map to local systems\r\n// The map value is the property that is injected into the Scene, the key is the Scene.Systems reference.\r\n// These defaults can be modified via the Scene config object\r\n// var config = {\r\n// map: {\r\n// add: 'makeStuff',\r\n// load: 'loader'\r\n// }\r\n// };\r\n\r\nvar InjectionMap = {\r\n\r\n game: 'game',\r\n\r\n anims: 'anims',\r\n cache: 'cache',\r\n plugins: 'plugins',\r\n registry: 'registry',\r\n scale: 'scale',\r\n sound: 'sound',\r\n textures: 'textures',\r\n\r\n events: 'events',\r\n cameras: 'cameras',\r\n add: 'add',\r\n make: 'make',\r\n scenePlugin: 'scene',\r\n displayList: 'children',\r\n lights: 'lights',\r\n\r\n data: 'data',\r\n input: 'input',\r\n load: 'load',\r\n time: 'time',\r\n tweens: 'tweens',\r\n\r\n arcadePhysics: 'physics',\r\n impactPhysics: 'impact',\r\n matterPhysics: 'matter'\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n InjectionMap.cameras3d = 'cameras3d';\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n InjectionMap.facebook = 'facebook';\r\n}\r\n\r\nmodule.exports = InjectionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/InjectionMap.js?")},"./node_modules/phaser/src/scene/Scene.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Systems = __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js");\r\n\r\n/**\r\n * @classdesc\r\n * A base Phaser.Scene class which can be extended for your own use.\r\n *\r\n * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}.\r\n *\r\n * @class Scene\r\n * @memberof Phaser\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Scene = new Class({\r\n\r\n initialize:\r\n\r\n function Scene (config)\r\n {\r\n /**\r\n * The Scene Systems. You must never overwrite this property, or all hell will break lose.\r\n *\r\n * @name Phaser.Scene#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = new Systems(this, config);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the game level Data Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the Sound Manager.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#sound\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n /**\r\n * A scene level Event Emitter.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A scene level Camera System.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A scene level Game Object Factory.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A scene level Game Object Creator.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scene\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A scene level Game Object Display List.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#children\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.children;\r\n\r\n /**\r\n * A scene level Lights Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#lights\r\n * @type {Phaser.GameObjects.LightsManager}\r\n * @since 3.0.0\r\n */\r\n this.lights;\r\n\r\n /**\r\n * A scene level Data Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.data;\r\n\r\n /**\r\n * A scene level Input Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#input\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.0.0\r\n */\r\n this.input;\r\n\r\n /**\r\n * A scene level Loader Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#load\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.load;\r\n\r\n /**\r\n * A scene level Time and Clock Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#time\r\n * @type {Phaser.Time.Clock}\r\n * @since 3.0.0\r\n */\r\n this.time;\r\n\r\n /**\r\n * A scene level Tween Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#tweens\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.tweens;\r\n\r\n /**\r\n * A scene level Arcade Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#physics\r\n * @type {Phaser.Physics.Arcade.ArcadePhysics}\r\n * @since 3.0.0\r\n */\r\n this.physics;\r\n\r\n /**\r\n * A scene level Impact Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#impact\r\n * @type {Phaser.Physics.Impact.ImpactPhysics}\r\n * @since 3.0.0\r\n */\r\n this.impact;\r\n\r\n /**\r\n * A scene level Matter Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#matter\r\n * @type {Phaser.Physics.Matter.MatterPhysics}\r\n * @since 3.0.0\r\n */\r\n this.matter;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * A scene level Facebook Instant Games Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.2\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Scene#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n },\r\n\r\n /**\r\n * Should be overridden by your own Scenes.\r\n * This method is called once per game step while the scene is running.\r\n *\r\n * @method Phaser.Scene#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Scene.js?')},"./node_modules/phaser/src/scene/SceneManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar LoaderEvents = __webpack_require__(/*! ../loader/events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Scene = __webpack_require__(/*! ./Scene */ \"./node_modules/phaser/src/scene/Scene.js\");\r\nvar Systems = __webpack_require__(/*! ./Systems */ \"./node_modules/phaser/src/scene/Systems.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Manager.\r\n *\r\n * The Scene Manager is a Game level system, responsible for creating, processing and updating all of the\r\n * Scenes in a Game instance.\r\n *\r\n *\r\n * @class SceneManager\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Scene Manager belongs to.\r\n * @param {object} sceneConfig - Scene specific configuration settings.\r\n */\r\nvar SceneManager = new Class({\r\n\r\n initialize:\r\n\r\n function SceneManager (game, sceneConfig)\r\n {\r\n /**\r\n * The Game that this SceneManager belongs to.\r\n *\r\n * @name Phaser.Scenes.SceneManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.\r\n *\r\n * @name Phaser.Scenes.SceneManager#keys\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.keys = {};\r\n\r\n /**\r\n * The array in which all of the scenes are kept.\r\n *\r\n * @name Phaser.Scenes.SceneManager#scenes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.scenes = [];\r\n\r\n /**\r\n * Scenes pending to be added are stored in here until the manager has time to add it.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of scenes waiting to be started once the game has booted.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_start\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._start = [];\r\n\r\n /**\r\n * An operations queue, because we don't manipulate the scenes array during processing.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_queue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._queue = [];\r\n\r\n /**\r\n * Boot time data to merge.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_data\r\n * @type {object}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._data = {};\r\n\r\n /**\r\n * Is the Scene Manager actively processing the Scenes list?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isProcessing\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isProcessing = false;\r\n\r\n /**\r\n * Has the Scene Manager properly started?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isBooted\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * Do any of the Cameras in any of the Scenes require a custom viewport?\r\n * If not we can skip scissor tests.\r\n *\r\n * @name Phaser.Scenes.SceneManager#customViewports\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.customViewports = 0;\r\n\r\n if (sceneConfig)\r\n {\r\n if (!Array.isArray(sceneConfig))\r\n {\r\n sceneConfig = [ sceneConfig ];\r\n }\r\n\r\n for (var i = 0; i < sceneConfig.length; i++)\r\n {\r\n // The i === 0 part just autostarts the first Scene given (unless it says otherwise in its config)\r\n this._pending.push({\r\n key: 'default',\r\n scene: sceneConfig[i],\r\n autoStart: (i === 0),\r\n data: {}\r\n });\r\n }\r\n }\r\n\r\n game.events.once(GameEvents.READY, this.bootQueue, this);\r\n },\r\n\r\n /**\r\n * Internal first-time Scene boot handler.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootQueue\r\n * @private\r\n * @since 3.2.0\r\n */\r\n bootQueue: function ()\r\n {\r\n if (this.isBooted)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n var key;\r\n var sceneConfig;\r\n\r\n for (i = 0; i < this._pending.length; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n key = entry.key;\r\n sceneConfig = entry.scene;\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n // Any data to inject?\r\n if (this._data[key])\r\n {\r\n newScene.sys.settings.data = this._data[key].data;\r\n\r\n if (this._data[key].autoStart)\r\n {\r\n entry.autoStart = true;\r\n }\r\n }\r\n\r\n if (entry.autoStart || newScene.sys.settings.active)\r\n {\r\n this._start.push(key);\r\n }\r\n }\r\n\r\n // Clear the pending lists\r\n this._pending.length = 0;\r\n\r\n this._data = {};\r\n\r\n this.isBooted = true;\r\n\r\n // _start might have been populated by the above\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n this._start.length = 0;\r\n },\r\n\r\n /**\r\n * Process the Scene operations queue.\r\n *\r\n * @method Phaser.Scenes.SceneManager#processQueue\r\n * @since 3.0.0\r\n */\r\n processQueue: function ()\r\n {\r\n var pendingLength = this._pending.length;\r\n var queueLength = this._queue.length;\r\n\r\n if (pendingLength === 0 && queueLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n\r\n if (pendingLength)\r\n {\r\n for (i = 0; i < pendingLength; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n this.add(entry.key, entry.scene, entry.autoStart, entry.data);\r\n }\r\n\r\n // _start might have been populated by this.add\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n // Clear the pending lists\r\n this._start.length = 0;\r\n this._pending.length = 0;\r\n\r\n return;\r\n }\r\n\r\n for (i = 0; i < this._queue.length; i++)\r\n {\r\n entry = this._queue[i];\r\n\r\n this[entry.op](entry.keyA, entry.keyB);\r\n }\r\n\r\n this._queue.length = 0;\r\n },\r\n\r\n /**\r\n * Adds a new Scene into the SceneManager.\r\n * You must give each Scene a unique key by which you'll identify it.\r\n *\r\n * The `sceneConfig` can be:\r\n *\r\n * * A `Phaser.Scene` object, or an object that extends it.\r\n * * A plain JavaScript object\r\n * * A JavaScript ES6 Class that extends `Phaser.Scene`\r\n * * A JavaScript ES5 prototype based Class\r\n * * A JavaScript function\r\n *\r\n * If a function is given then a new Scene will be created by calling it.\r\n *\r\n * @method Phaser.Scenes.SceneManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene\r\n * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {?Phaser.Scene} The added Scene, if it was added immediately, otherwise `null`.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n if (autoStart === undefined) { autoStart = false; }\r\n if (data === undefined) { data = {}; }\r\n\r\n // If processing or not booted then put scene into a holding pattern\r\n if (this.isProcessing || !this.isBooted)\r\n {\r\n this._pending.push({\r\n key: key,\r\n scene: sceneConfig,\r\n autoStart: autoStart,\r\n data: data\r\n });\r\n\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = { data: data };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n key = this.getKey(key, sceneConfig);\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n sceneConfig.key = key;\r\n\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Any data to inject?\r\n newScene.sys.settings.data = data;\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n if (autoStart || newScene.sys.settings.active)\r\n {\r\n if (this._pending.length)\r\n {\r\n this._start.push(key);\r\n }\r\n else\r\n {\r\n this.start(key);\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it will\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.SceneManager#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} scene - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'remove', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var sceneToRemove = this.getScene(key);\r\n\r\n if (!sceneToRemove || sceneToRemove.sys.isTransitioning())\r\n {\r\n return this;\r\n }\r\n\r\n var index = this.scenes.indexOf(sceneToRemove);\r\n var sceneKey = sceneToRemove.sys.settings.key;\r\n\r\n if (index > -1)\r\n {\r\n delete this.keys[sceneKey];\r\n this.scenes.splice(index, 1);\r\n\r\n if (this._start.indexOf(sceneKey) > -1)\r\n {\r\n index = this._start.indexOf(sceneKey);\r\n this._start.splice(index, 1);\r\n }\r\n\r\n sceneToRemove.sys.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boot the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootScene\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to boot.\r\n */\r\n bootScene: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.init)\r\n {\r\n scene.init.call(scene, settings.data);\r\n\r\n settings.status = CONST.INIT;\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_INIT, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n }\r\n\r\n var loader;\r\n\r\n if (sys.load)\r\n {\r\n loader = sys.load;\r\n\r\n loader.reset();\r\n }\r\n\r\n if (loader && scene.preload)\r\n {\r\n scene.preload.call(scene);\r\n\r\n // Is the loader empty?\r\n if (loader.list.size === 0)\r\n {\r\n this.create(scene);\r\n }\r\n else\r\n {\r\n settings.status = CONST.LOADING;\r\n\r\n // Start the loader going as we have something in the queue\r\n loader.once(LoaderEvents.COMPLETE, this.loadComplete, this);\r\n\r\n loader.start();\r\n }\r\n }\r\n else\r\n {\r\n // No preload? Then there was nothing to load either\r\n this.create(scene);\r\n }\r\n },\r\n\r\n /**\r\n * Handles load completion for a Scene's Loader.\r\n *\r\n * Starts the Scene that the Loader belongs to.\r\n *\r\n * @method Phaser.Scenes.SceneManager#loadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading.\r\n */\r\n loadComplete: function (loader)\r\n {\r\n var scene = loader.scene;\r\n\r\n // TODO - Remove. This should *not* be handled here\r\n // Try to unlock HTML5 sounds every time any loader completes\r\n if (this.game.sound && this.game.sound.onBlurPausedSounds)\r\n {\r\n this.game.sound.unlock();\r\n }\r\n\r\n this.create(scene);\r\n },\r\n\r\n /**\r\n * Handle payload completion for a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#payloadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading its Scene's payload.\r\n */\r\n payloadComplete: function (loader)\r\n {\r\n this.bootScene(loader.scene);\r\n },\r\n\r\n /**\r\n * Updates the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - Time elapsed.\r\n * @param {number} delta - Delta time from the last update.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.processQueue();\r\n\r\n this.isProcessing = true;\r\n\r\n // Loop through the active scenes in reverse order\r\n for (var i = this.scenes.length - 1; i >= 0; i--)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.status > CONST.START && sys.settings.status <= CONST.RUNNING)\r\n {\r\n sys.step(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#render\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer to use.\r\n */\r\n render: function (renderer)\r\n {\r\n // Loop through the scenes in forward order\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.visible && sys.settings.status >= CONST.LOADING && sys.settings.status < CONST.SLEEPING)\r\n {\r\n sys.render(renderer);\r\n }\r\n }\r\n\r\n this.isProcessing = false;\r\n },\r\n\r\n /**\r\n * Calls the given Scene's {@link Phaser.Scene#create} method and updates its status.\r\n *\r\n * @method Phaser.Scenes.SceneManager#create\r\n * @private\r\n * @fires Phaser.Scenes.Events#CREATE\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to create.\r\n */\r\n create: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.create)\r\n {\r\n settings.status = CONST.CREATING;\r\n\r\n scene.create.call(scene, settings.data);\r\n\r\n if (settings.status === CONST.DESTROYED)\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_START, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n // If the Scene has an update function we'll set it now, otherwise it'll remain as NOOP\r\n if (scene.update)\r\n {\r\n sys.sceneUpdate = scene.update;\r\n }\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n sys.events.emit(Events.CREATE, scene);\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from a function.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromFunction\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {function} scene - The function to create the Scene from.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromFunction: function (key, scene)\r\n {\r\n var newScene = new scene();\r\n\r\n if (newScene instanceof Scene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n\r\n return this.createSceneFromInstance(key, newScene);\r\n }\r\n else\r\n {\r\n newScene.sys = new Systems(newScene);\r\n\r\n newScene.sys.settings.key = key;\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n }\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene instance.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromInstance\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {Phaser.Scene} newScene - The Scene instance.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromInstance: function (key, newScene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from an Object definition.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromObject\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig)} sceneConfig - The Scene config.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromObject: function (key, sceneConfig)\r\n {\r\n var newScene = new Scene(sceneConfig);\r\n\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n // Extract callbacks\r\n\r\n var defaults = [ 'init', 'preload', 'create', 'update', 'render' ];\r\n\r\n for (var i = 0; i < defaults.length; i++)\r\n {\r\n var sceneCallback = GetValue(sceneConfig, defaults[i], null);\r\n\r\n if (sceneCallback)\r\n {\r\n newScene[defaults[i]] = sceneCallback;\r\n }\r\n }\r\n\r\n // Now let's move across any other functions or properties that may exist in the extend object:\r\n\r\n /*\r\n scene: {\r\n preload: preload,\r\n create: create,\r\n extend: {\r\n hello: 1,\r\n test: 'atari',\r\n addImage: addImage\r\n }\r\n }\r\n */\r\n\r\n if (sceneConfig.hasOwnProperty('extend'))\r\n {\r\n for (var propertyKey in sceneConfig.extend)\r\n {\r\n var value = sceneConfig.extend[propertyKey];\r\n\r\n if (propertyKey === 'data' && newScene.hasOwnProperty('data') && typeof value === 'object')\r\n {\r\n // Populate the DataManager\r\n newScene.data.merge(value);\r\n }\r\n else if (propertyKey !== 'sys')\r\n {\r\n newScene[propertyKey] = value;\r\n }\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Retrieves the key of a Scene from a Scene config.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getKey\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check in the Scene config.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|function)} sceneConfig - The Scene config.\r\n *\r\n * @return {string} The Scene key.\r\n */\r\n getKey: function (key, sceneConfig)\r\n {\r\n if (!key) { key = 'default'; }\r\n\r\n if (typeof sceneConfig === 'function')\r\n {\r\n return key;\r\n }\r\n else if (sceneConfig instanceof Scene)\r\n {\r\n key = sceneConfig.sys.settings.key;\r\n }\r\n else if (typeof sceneConfig === 'object' && sceneConfig.hasOwnProperty('key'))\r\n {\r\n key = sceneConfig.key;\r\n }\r\n\r\n // By this point it's either 'default' or extracted from the Scene\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n else\r\n {\r\n return key;\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all the current Scenes being managed by this Scene Manager.\r\n *\r\n * You can filter the output by the active state of the Scene and choose to have\r\n * the array returned in normal or reversed order.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScenes\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} [isActive=true] - Only include Scene's that are currently active?\r\n * @param {boolean} [inReverse=false] - Return the array of Scenes in reverse?\r\n *\r\n * @return {Phaser.Scene[]} An array containing all of the Scenes in the Scene Manager.\r\n */\r\n getScenes: function (isActive, inReverse)\r\n {\r\n if (isActive === undefined) { isActive = true; }\r\n if (inReverse === undefined) { inReverse = false; }\r\n\r\n var out = [];\r\n var scenes = this.scenes;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene && (!isActive || (isActive && scene.sys.isActive())))\r\n {\r\n out.push(scene);\r\n }\r\n }\r\n\r\n return (inReverse) ? out.reverse() : out;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScene\r\n * @since 3.0.0\r\n *\r\n * @param {string|Phaser.Scene} key - The Scene to retrieve.\r\n *\r\n * @return {?Phaser.Scene} The Scene.\r\n */\r\n getScene: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.keys[key])\r\n {\r\n return this.keys[key];\r\n }\r\n }\r\n else\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n if (key === this.scenes[i])\r\n {\r\n return key;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is running.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isActive();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is paused.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isPaused();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is visible.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isVisible();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is sleeping.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isSleeping();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Pauses the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its pause event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n pause: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.pause(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its resume event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n resume: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.resume(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the given Scene to sleep.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its sleep event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sleep: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.sleep(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Awakens the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its wake event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n wake: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.wake(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene on start, wake, or resume.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This Scene Manager.\r\n */\r\n run: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (!scene)\r\n {\r\n for (var i = 0; i < this._pending.length; i++)\r\n {\r\n if (this._pending[i].key === key)\r\n {\r\n this.queueOp('start', key, data);\r\n break;\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n if (scene.sys.isSleeping())\r\n {\r\n // Sleeping?\r\n scene.sys.wake(data);\r\n }\r\n else if (scene.sys.isBooted && !scene.sys.isActive())\r\n {\r\n // Paused?\r\n scene.sys.resume(data);\r\n }\r\n else\r\n {\r\n // Not actually running?\r\n this.start(key, data);\r\n }\r\n },\r\n\r\n /**\r\n * Starts the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n * @param {object} [data] - Optional data object to pass to Scene.Settings and Scene.init.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n start: function (key, data)\r\n {\r\n // If the Scene Manager is not running, then put the Scene into a holding pattern\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = {\r\n autoStart: true,\r\n data: data\r\n };\r\n\r\n return this;\r\n }\r\n\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n // If the Scene is already running (perhaps they called start from a launched sub-Scene?)\r\n // then we close it down before starting it again.\r\n if (scene.sys.isActive() || scene.sys.isPaused())\r\n {\r\n scene.sys.shutdown();\r\n\r\n scene.sys.start(data);\r\n }\r\n else\r\n {\r\n scene.sys.start(data);\r\n\r\n var loader;\r\n\r\n if (scene.sys.load)\r\n {\r\n loader = scene.sys.load;\r\n }\r\n\r\n // Files payload?\r\n if (loader && scene.sys.settings.hasOwnProperty('pack'))\r\n {\r\n loader.reset();\r\n\r\n if (loader.addPack({ payload: scene.sys.settings.pack }))\r\n {\r\n scene.sys.settings.status = CONST.LOADING;\r\n\r\n loader.once(LoaderEvents.COMPLETE, this.payloadComplete, this);\r\n\r\n loader.start();\r\n\r\n return this;\r\n }\r\n }\r\n }\r\n\r\n this.bootScene(scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n stop: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.shutdown();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sleeps one one Scene and starts the other.\r\n *\r\n * @method Phaser.Scenes.SceneManager#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} from - The Scene to sleep.\r\n * @param {string} to - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n switch: function (from, to)\r\n {\r\n var sceneA = this.getScene(from);\r\n var sceneB = this.getScene(to);\r\n\r\n if (sceneA && sceneB && sceneA !== sceneB)\r\n {\r\n this.sleep(from);\r\n\r\n if (this.isSleeping(to))\r\n {\r\n this.wake(to);\r\n }\r\n else\r\n {\r\n this.start(to);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene by numeric index.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the Scene to retrieve.\r\n *\r\n * @return {(Phaser.Scene|undefined)} The Scene.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.scenes[index];\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The key of the Scene.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n return this.scenes.indexOf(scene);\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'bringToTop', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index < this.scenes.length)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.push(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'sendToBack', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index > 0)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.unshift(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveDown', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA > 0)\r\n {\r\n var indexB = indexA - 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveUp', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA < this.scenes.length - 1)\r\n {\r\n var indexB = indexA + 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately above another Scene in the Scenes list.\r\n *\r\n * This means it will render over the top of the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveAbove', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n // Add in new location\r\n this.scenes.splice(indexA + 1, 0, tempScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately below another Scene in the Scenes list.\r\n *\r\n * This means it will render behind the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveBelow', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n if (indexA === 0)\r\n {\r\n this.scenes.unshift(tempScene);\r\n }\r\n else\r\n {\r\n // Add in new location\r\n this.scenes.splice(indexA, 0, tempScene);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queue a Scene operation for the next update.\r\n *\r\n * @method Phaser.Scenes.SceneManager#queueOp\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} op - The operation to perform.\r\n * @param {(string|Phaser.Scene)} keyA - Scene A.\r\n * @param {(string|Phaser.Scene)} [keyB] - Scene B.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n queueOp: function (op, keyA, keyB)\r\n {\r\n this._queue.push({ op: op, keyA: keyA, keyB: keyB });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the positions of two Scenes in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#swapPosition\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The first Scene to swap.\r\n * @param {(string|Phaser.Scene)} keyB - The second Scene to swap.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'swapPosition', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== indexB && indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexA);\r\n\r\n this.scenes[indexA] = this.scenes[indexB];\r\n this.scenes[indexB] = tempScene;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps debug information about each Scene to the developer console.\r\n *\r\n * @method Phaser.Scenes.SceneManager#dump\r\n * @since 3.2.0\r\n */\r\n dump: function ()\r\n {\r\n var out = [];\r\n var map = [ 'pending', 'init', 'start', 'loading', 'creating', 'running', 'paused', 'sleeping', 'shutdown', 'destroyed' ];\r\n\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n var key = (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED)) ? '[*] ' : '[-] ';\r\n key += sys.settings.key + ' (' + map[sys.settings.status] + ')';\r\n\r\n out.push(key);\r\n }\r\n\r\n console.log(out.join('\\n'));\r\n },\r\n\r\n /**\r\n * Destroy the SceneManager and all of its Scene's systems.\r\n *\r\n * @method Phaser.Scenes.SceneManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n sys.destroy();\r\n }\r\n\r\n this.update = NOOP;\r\n\r\n this.scenes = [];\r\n\r\n this._pending = [];\r\n this._start = [];\r\n this._queue = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SceneManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/SceneManager.js?")},"./node_modules/phaser/src/scene/ScenePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A proxy class to the Global Scene Manager.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this ScenePlugin belongs to.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene)\r\n {\r\n /**\r\n * The Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems instance of the Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The settings of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * The key of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = scene.sys.settings.key;\r\n\r\n /**\r\n * The Game's SceneManager.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#manager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.scene;\r\n\r\n /**\r\n * If this Scene is currently transitioning to another, this holds\r\n * the current percentage of the transition progress, between 0 and 1.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#transitionProgress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.transitionProgress = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_elapsed\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_target\r\n * @type {?Phaser.Scenes.Scene}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._target = null;\r\n\r\n /**\r\n * Transition duration.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_duration\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._duration = 0;\r\n\r\n /**\r\n * Transition callback.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * Transition callback scope.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdateScope\r\n * @type {object}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n\r\n /**\r\n * Will this Scene sleep (true) after the transition, or stop (false)\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willSleep\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willSleep = false;\r\n\r\n /**\r\n * Will this Scene be removed from the Scene Manager after the transition completes?\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willRemove\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willRemove = false;\r\n\r\n scene.sys.events.once(Events.BOOT, this.boot, this);\r\n scene.sys.events.on(Events.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(Events.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pluginStart\r\n * @private\r\n * @since 3.5.0\r\n */\r\n pluginStart: function ()\r\n {\r\n this._target = null;\r\n\r\n this.systems.events.once(Events.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and run the given one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to start.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n start: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', this.key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts this Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#restart\r\n * @since 3.4.0\r\n *\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n restart: function (data)\r\n {\r\n var key = this.key;\r\n\r\n this.manager.queueOp('stop', key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This will start a transition from the current Scene to the target Scene given.\r\n *\r\n * The transition will last for the duration specified in milliseconds.\r\n *\r\n * You can have the target Scene moved above or below this one in the display list.\r\n *\r\n * You can specify an update callback. This callback will be invoked _every frame_ for the duration\r\n * of the transition.\r\n *\r\n * This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop.\r\n *\r\n * There are also 5 transition related events: This scene will emit the event `transitionout` when\r\n * the transition begins, which is typically the frame after calling this method.\r\n *\r\n * The target Scene will emit the event `transitioninit` when that Scene's `init` method is called.\r\n * It will then emit the event `transitionstart` when its `create` method is called.\r\n * If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two,\r\n * as the Scenes `init` and `create` methods are not invoked when a Scene wakes up.\r\n *\r\n * When the duration of the transition has elapsed it will emit the event `transitioncomplete`.\r\n * These events are cleared of all listeners when the Scene shuts down, but not if it is sent to sleep.\r\n *\r\n * It's important to understand that the duration of the transition begins the moment you call this method.\r\n * If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the\r\n * time still counts down even while that is happening. If the game itself pauses, or something else causes\r\n * this Scenes update loop to stop, then the transition will also pause for that duration. There are\r\n * checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to\r\n * override this understand that until the target Scene completes it might never be unlocked for input events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transition\r\n * @fires Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Types.Scenes.SceneTransitionConfig} config - The transition configuration object.\r\n *\r\n * @return {boolean} `true` is the transition was started, otherwise `false`.\r\n */\r\n transition: function (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetFastValue(config, 'target', false);\r\n\r\n var target = this.manager.getScene(key);\r\n\r\n if (!key || !this.checkValidTransition(target))\r\n {\r\n return false;\r\n }\r\n\r\n var duration = GetFastValue(config, 'duration', 1000);\r\n\r\n this._elapsed = 0;\r\n this._target = target;\r\n this._duration = duration;\r\n this._willSleep = GetFastValue(config, 'sleep', false);\r\n this._willRemove = GetFastValue(config, 'remove', false);\r\n\r\n var callback = GetFastValue(config, 'onUpdate', null);\r\n\r\n if (callback)\r\n {\r\n this._onUpdate = callback;\r\n this._onUpdateScope = GetFastValue(config, 'onUpdateScope', this.scene);\r\n }\r\n\r\n var allowInput = GetFastValue(config, 'allowInput', false);\r\n\r\n this.settings.transitionAllowInput = allowInput;\r\n\r\n var targetSettings = target.sys.settings;\r\n\r\n targetSettings.isTransition = true;\r\n targetSettings.transitionFrom = this.scene;\r\n targetSettings.transitionDuration = duration;\r\n targetSettings.transitionAllowInput = allowInput;\r\n\r\n if (GetFastValue(config, 'moveAbove', false))\r\n {\r\n this.manager.moveAbove(this.key, key);\r\n }\r\n else if (GetFastValue(config, 'moveBelow', false))\r\n {\r\n this.manager.moveBelow(this.key, key);\r\n }\r\n\r\n if (target.sys.isSleeping())\r\n {\r\n target.sys.wake();\r\n }\r\n else\r\n {\r\n this.manager.start(key, GetFastValue(config, 'data'));\r\n }\r\n\r\n this.systems.events.emit(Events.TRANSITION_OUT, target, duration);\r\n\r\n this.systems.events.on(Events.UPDATE, this.step, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if this Scene can transition to the target Scene or not.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#checkValidTransition\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - The Scene to test against.\r\n *\r\n * @return {boolean} `true` if this Scene can transition, otherwise `false`.\r\n */\r\n checkValidTransition: function (target)\r\n {\r\n // Not a valid target if it doesn't exist, isn't active or is already transitioning in or out\r\n if (!target || target.sys.isActive() || target.sys.isTransitioning() || target === this.scene || this.systems.isTransitioning())\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * A single game step. This is only called if the parent Scene is transitioning\r\n * out to another Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#step\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n this._elapsed += delta;\r\n\r\n this.transitionProgress = Clamp(this._elapsed / this._duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.transitionProgress);\r\n }\r\n\r\n if (this._elapsed >= this._duration)\r\n {\r\n this.transitionComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called by `step` when the transition out of this scene to another is over.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transitionComplete\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n var targetSys = this._target.sys;\r\n var targetSettings = this._target.sys.settings;\r\n\r\n // Stop the step\r\n this.systems.events.off(Events.UPDATE, this.step, this);\r\n\r\n // Notify target scene\r\n targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene);\r\n\r\n // Clear target scene settings\r\n targetSettings.isTransition = false;\r\n targetSettings.transitionFrom = null;\r\n\r\n // Clear local settings\r\n this._duration = 0;\r\n this._target = null;\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n // Now everything is clear we can handle what happens to this Scene\r\n if (this._willRemove)\r\n {\r\n this.manager.remove(this.key);\r\n }\r\n else if (this._willSleep)\r\n {\r\n this.systems.sleep();\r\n }\r\n else\r\n {\r\n this.manager.stop(this.key);\r\n }\r\n },\r\n\r\n /**\r\n * Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene key.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene.\r\n * @param {boolean} autoStart - Whether to start the Scene after it's added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {Phaser.Scene} An instance of the Scene that was added to the Scene Manager.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n return this.manager.add(key, sceneConfig, autoStart, data);\r\n },\r\n\r\n /**\r\n * Launch the given Scene and run it in parallel with this one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#launch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to launch.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n launch: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('start', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene and emitted in its ready, wake, or resume events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n run: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('run', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pause the Scene - this stops the update step from happening but it still renders.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its pause event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n pause: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('pause', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume the Scene - starts the update loop again.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its resume event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n resume: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('resume', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene sleep (no update, no render) but doesn't shutdown.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its sleep event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sleep: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('sleep', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene wake-up (starts update and render)\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its wake event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n wake: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('wake', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes this Scene sleep then starts the Scene given.\r\n * \r\n * No checks are made to see if an instance of the given Scene is already running.\r\n * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple\r\n * instances of them _at the same time_. This means, calling this function\r\n * may launch another instance of the requested Scene if it's already running.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n switch: function (key)\r\n {\r\n if (key !== this.key)\r\n {\r\n this.manager.queueOp('switch', this.key, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shutdown the Scene, clearing display list, timers, etc.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n stop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the active state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed. If `false` it will be paused.\r\n * @param {string} [key] - The Scene to set the active state of.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted with its events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setActive: function (value, key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setActive(value, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visible state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible value.\r\n * @param {string} [key] - The Scene to set the visible state for.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setVisible: function (value, key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setVisible(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is sleeping or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isSleeping(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is running or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isActive(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is paused or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isPaused(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is visible or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isVisible(key);\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#swapPosition\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The first Scene to swap.\r\n * @param {string} [keyB] - The second Scene to swap. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.swapPosition(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be above.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveAbove(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be below.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveBelow(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it wil\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.remove(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveUp(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveDown(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.bringToTop(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.sendToBack(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve a Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to retrieve.\r\n *\r\n * @return {Phaser.Scene} The Scene.\r\n */\r\n get: function (key)\r\n {\r\n return this.manager.getScene(key);\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#getIndex\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to get the index of.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.getIndex(key);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(Events.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.off(Events.POST_UPDATE, this.step, this);\r\n eventEmitter.off(Events.TRANSITION_OUT);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(Events.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.settings = null;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('ScenePlugin', ScenePlugin, 'scenePlugin');\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/ScenePlugin.js?")},"./node_modules/phaser/src/scene/Settings.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Merge = __webpack_require__(/*! ../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\r\nvar InjectionMap = __webpack_require__(/*! ./InjectionMap */ \"./node_modules/phaser/src/scene/InjectionMap.js\");\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Settings\r\n */\r\n\r\nvar Settings = {\r\n\r\n /**\r\n * Takes a Scene configuration object and returns a fully formed System Settings object.\r\n *\r\n * @function Phaser.Scenes.Settings.create\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - The Scene configuration object used to create this Scene Settings.\r\n *\r\n * @return {Phaser.Types.Scenes.SettingsObject} The Scene Settings object created as a result of the config and default settings.\r\n */\r\n create: function (config)\r\n {\r\n if (typeof config === 'string')\r\n {\r\n config = { key: config };\r\n }\r\n else if (config === undefined)\r\n {\r\n // Pass the 'hasOwnProperty' checks\r\n config = {};\r\n }\r\n\r\n return {\r\n\r\n status: CONST.PENDING,\r\n\r\n key: GetValue(config, 'key', ''),\r\n active: GetValue(config, 'active', false),\r\n visible: GetValue(config, 'visible', true),\r\n\r\n isBooted: false,\r\n\r\n isTransition: false,\r\n transitionFrom: null,\r\n transitionDuration: 0,\r\n transitionAllowInput: true,\r\n\r\n // Loader payload array\r\n\r\n data: {},\r\n\r\n pack: GetValue(config, 'pack', false),\r\n\r\n // Cameras\r\n\r\n cameras: GetValue(config, 'cameras', null),\r\n\r\n // Scene Property Injection Map\r\n\r\n map: GetValue(config, 'map', Merge(InjectionMap, GetValue(config, 'mapAdd', {}))),\r\n\r\n // Physics\r\n\r\n physics: GetValue(config, 'physics', {}),\r\n\r\n // Loader\r\n\r\n loader: GetValue(config, 'loader', {}),\r\n\r\n // Plugins\r\n\r\n plugins: GetValue(config, 'plugins', false),\r\n\r\n // Input\r\n\r\n input: GetValue(config, 'input', {})\r\n\r\n };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Settings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Settings.js?")},"./node_modules/phaser/src/scene/Systems.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetPhysicsPlugins = __webpack_require__(/*! ./GetPhysicsPlugins */ \"./node_modules/phaser/src/scene/GetPhysicsPlugins.js\");\r\nvar GetScenePlugins = __webpack_require__(/*! ./GetScenePlugins */ \"./node_modules/phaser/src/scene/GetScenePlugins.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Settings = __webpack_require__(/*! ./Settings */ \"./node_modules/phaser/src/scene/Settings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Systems class.\r\n *\r\n * This class is available from within a Scene under the property `sys`.\r\n * It is responsible for managing all of the plugins a Scene has running, including the display list, and\r\n * handling the update step and renderer. It also contains references to global systems belonging to Game.\r\n *\r\n * @class Systems\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns this Systems instance.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Systems = new Class({\r\n\r\n initialize:\r\n\r\n function Systems (scene, config)\r\n {\r\n /**\r\n * A reference to the Scene that these Systems belong to.\r\n *\r\n * @name Phaser.Scenes.Systems#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Phaser Game instance.\r\n *\r\n * @name Phaser.Scenes.Systems#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Scenes.Systems#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * The Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.Scenes.Systems#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * The Scene Configuration object, as passed in when creating the Scene.\r\n *\r\n * @name Phaser.Scenes.Systems#config\r\n * @type {(string|Phaser.Types.Scenes.SettingsConfig)}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * The Scene Settings. This is the parsed output based on the Scene configuration.\r\n *\r\n * @name Phaser.Scenes.Systems#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = Settings.create(config);\r\n\r\n /**\r\n * A handy reference to the Scene canvas / context.\r\n *\r\n * @name Phaser.Scenes.Systems#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * A reference to the Canvas Rendering Context being used by the renderer.\r\n *\r\n * @name Phaser.Scenes.Systems#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context;\r\n\r\n // Global Systems - these are single-instance global managers that belong to Game\r\n\r\n /**\r\n * A reference to the global Animations Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.anims` property.\r\n *\r\n * @name Phaser.Scenes.Systems#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache. The Cache stores all files bought in to Phaser via\r\n * the Loader, with the exception of images. Images are stored in the Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cache` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the global Plugins Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.plugins` property.\r\n *\r\n * @name Phaser.Scenes.Systems#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n\r\n /**\r\n * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing\r\n * you to exchange data between Scenes via a universal and shared point.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.registry` property.\r\n *\r\n * @name Phaser.Scenes.Systems#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scale` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.15.0\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the global Sound Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.sound` property.\r\n *\r\n * @name Phaser.Scenes.Systems#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.textures` property.\r\n *\r\n * @name Phaser.Scenes.Systems#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n // Core Plugins - these are non-optional Scene plugins, needed by lots of the other systems\r\n\r\n /**\r\n * A reference to the Scene's Game Object Factory.\r\n * \r\n * Use this to quickly and easily create new Game Object's.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.add` property.\r\n *\r\n * @name Phaser.Scenes.Systems#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager.\r\n * \r\n * Use this to manipulate and create Cameras for this specific Scene.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cameras` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A reference to the Scene's Display List.\r\n * \r\n * Use this to organize the children contained in the display list.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.children` property.\r\n *\r\n * @name Phaser.Scenes.Systems#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene's Event Manager.\r\n * \r\n * Use this to listen for Scene specific events, such as `pause` and `shutdown`.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.events` property.\r\n *\r\n * @name Phaser.Scenes.Systems#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A reference to the Scene's Game Object Creator.\r\n * \r\n * Use this to quickly and easily create new Game Object's. The difference between this and the\r\n * Game Object Factory, is that the Creator just creates and returns Game Object instances, it\r\n * doesn't then add them to the Display List or Update List.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.make` property.\r\n *\r\n * @name Phaser.Scenes.Systems#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * \r\n * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene,\r\n * or pause or resume a Scene, or switch from this Scene to another.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scene` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scenePlugin\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scenePlugin;\r\n\r\n /**\r\n * A reference to the Scene's Update List.\r\n * \r\n * Use this to organize the children contained in the update list.\r\n * \r\n * The Update List is responsible for managing children that need their `preUpdate` methods called,\r\n * in order to process so internal components, such as Sprites with Animations.\r\n * \r\n * In the default set-up there is no reference to this from within the Scene itself.\r\n *\r\n * @name Phaser.Scenes.Systems#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n /**\r\n * The Scene Update function.\r\n *\r\n * This starts out as NOOP during init, preload and create, and at the end of create\r\n * it swaps to be whatever the Scene.update function is.\r\n *\r\n * @name Phaser.Scenes.Systems#sceneUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.sceneUpdate = NOOP;\r\n },\r\n\r\n /**\r\n * This method is called only once by the Scene Manager when the Scene is instantiated.\r\n * It is responsible for setting up all of the Scene plugins and references.\r\n * It should never be called directly.\r\n *\r\n * @method Phaser.Scenes.Systems#init\r\n * @protected\r\n * @fires Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n this.settings.status = CONST.INIT;\r\n\r\n // This will get replaced by the SceneManager with the actual update function, if it exists, once create is over.\r\n this.sceneUpdate = NOOP;\r\n\r\n this.game = game;\r\n this.renderer = game.renderer;\r\n\r\n this.canvas = game.canvas;\r\n this.context = game.context;\r\n\r\n var pluginManager = game.plugins;\r\n\r\n this.plugins = pluginManager;\r\n\r\n pluginManager.addToScene(this, DefaultPlugins.Global, [ DefaultPlugins.CoreScene, GetScenePlugins(this), GetPhysicsPlugins(this) ]);\r\n\r\n this.events.emit(Events.BOOT, this);\r\n\r\n this.settings.isBooted = true;\r\n },\r\n\r\n /**\r\n * Called by a plugin, it tells the System to install the plugin locally.\r\n *\r\n * @method Phaser.Scenes.Systems#install\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {array} plugin - An array of plugins to install into this Scene.\r\n */\r\n install: function (plugin)\r\n {\r\n if (!Array.isArray(plugin))\r\n {\r\n plugin = [ plugin ];\r\n }\r\n\r\n this.plugins.installLocal(this, plugin);\r\n },\r\n\r\n /**\r\n * A single game step. Called automatically by the Scene Manager as a result of a Request Animation\r\n * Frame or Set Timeout call to the main Game instance.\r\n *\r\n * @method Phaser.Scenes.Systems#step\r\n * @fires Phaser.Scenes.Events#PRE_UPDATE\r\n * @fires Phaser.Scenes.Events#_UPDATE\r\n * @fires Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n this.events.emit(Events.PRE_UPDATE, time, delta);\r\n\r\n this.events.emit(Events.UPDATE, time, delta);\r\n\r\n this.sceneUpdate.call(this.scene, time, delta);\r\n\r\n this.events.emit(Events.POST_UPDATE, time, delta);\r\n },\r\n\r\n /**\r\n * Called automatically by the Scene Manager.\r\n * Instructs the Scene to render itself via its Camera Manager to the renderer given.\r\n *\r\n * @method Phaser.Scenes.Systems#render\r\n * @fires Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that invoked the render call.\r\n */\r\n render: function (renderer)\r\n {\r\n var displayList = this.displayList;\r\n\r\n displayList.depthSort();\r\n\r\n this.cameras.render(renderer, displayList);\r\n\r\n this.events.emit(Events.RENDER, renderer);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next render.\r\n *\r\n * @method Phaser.Scenes.Systems#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.displayList.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.Scenes.Systems#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n this.displayList.depthSort();\r\n },\r\n\r\n /**\r\n * Pause this Scene.\r\n * A paused Scene still renders, it just doesn't run ANY of its update handlers or systems.\r\n *\r\n * @method Phaser.Scenes.Systems#pause\r\n * @fires Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'pause' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n pause: function (data)\r\n {\r\n if (this.settings.active)\r\n {\r\n this.settings.status = CONST.PAUSED;\r\n\r\n this.settings.active = false;\r\n\r\n this.events.emit(Events.PAUSE, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume this Scene from a paused state.\r\n *\r\n * @method Phaser.Scenes.Systems#resume\r\n * @fires Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'resume' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n resume: function (data)\r\n {\r\n if (!this.settings.active)\r\n {\r\n this.settings.status = CONST.RUNNING;\r\n\r\n this.settings.active = true;\r\n\r\n this.events.emit(Events.RESUME, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Send this Scene to sleep.\r\n *\r\n * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down\r\n * or have any of its systems or children removed, meaning it can be re-activated at any point and\r\n * will carry on from where it left off. It also keeps everything in memory and events and callbacks\r\n * from other Scenes may still invoke changes within it, so be careful what is left active.\r\n *\r\n * @method Phaser.Scenes.Systems#sleep\r\n * @fires Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'sleep' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n sleep: function (data)\r\n {\r\n this.settings.status = CONST.SLEEPING;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SLEEP, this, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Wake-up this Scene if it was previously asleep.\r\n *\r\n * @method Phaser.Scenes.Systems#wake\r\n * @fires Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'wake' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n wake: function (data)\r\n {\r\n var settings = this.settings;\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n settings.active = true;\r\n settings.visible = true;\r\n\r\n this.events.emit(Events.WAKE, this, data);\r\n\r\n if (settings.isTransition)\r\n {\r\n this.events.emit(Events.TRANSITION_WAKE, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this Scene sleeping?\r\n *\r\n * @method Phaser.Scenes.Systems#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is asleep, otherwise `false`.\r\n */\r\n isSleeping: function ()\r\n {\r\n return (this.settings.status === CONST.SLEEPING);\r\n },\r\n\r\n /**\r\n * Is this Scene running?\r\n *\r\n * @method Phaser.Scenes.Systems#isActive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is running, otherwise `false`.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.settings.status === CONST.RUNNING);\r\n },\r\n\r\n /**\r\n * Is this Scene paused?\r\n *\r\n * @method Phaser.Scenes.Systems#isPaused\r\n * @since 3.13.0\r\n *\r\n * @return {boolean} `true` if this Scene is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.settings.status === CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out to, or in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitioning\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is currently transitioning, otherwise `false`.\r\n */\r\n isTransitioning: function ()\r\n {\r\n return (this.settings.isTransition || this.scenePlugin._target !== null);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out from itself to another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionOut\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is in transition to another Scene, otherwise `false`.\r\n */\r\n isTransitionOut: function ()\r\n {\r\n return (this.scenePlugin._target !== null && this.scenePlugin._duration > 0);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionIn\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is transitioning in from another Scene, otherwise `false`.\r\n */\r\n isTransitionIn: function ()\r\n {\r\n return (this.settings.isTransition);\r\n },\r\n\r\n /**\r\n * Is this Scene visible and rendering?\r\n *\r\n * @method Phaser.Scenes.Systems#isVisible\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is visible, otherwise `false`.\r\n */\r\n isVisible: function ()\r\n {\r\n return this.settings.visible;\r\n },\r\n\r\n /**\r\n * Sets the visible state of this Scene.\r\n * An invisible Scene will not render, but will still process updates.\r\n *\r\n * @method Phaser.Scenes.Systems#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to render this Scene, otherwise `false`.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.settings.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the active state of this Scene.\r\n * \r\n * An active Scene will run its core update loop.\r\n *\r\n * @method Phaser.Scenes.Systems#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed, if previously paused. If `false` it will be paused.\r\n * @param {object} [data] - A data object that will be passed in the 'resume' or 'pause' events.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setActive: function (value, data)\r\n {\r\n if (value)\r\n {\r\n return this.resume(data);\r\n }\r\n else\r\n {\r\n return this.pause(data);\r\n }\r\n },\r\n\r\n /**\r\n * Start this Scene running and rendering.\r\n * Called automatically by the SceneManager.\r\n *\r\n * @method Phaser.Scenes.Systems#start\r\n * @fires Phaser.Scenes.Events#START\r\n * @fires Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Optional data object that may have been passed to this Scene from another.\r\n */\r\n start: function (data)\r\n {\r\n if (data)\r\n {\r\n this.settings.data = data;\r\n }\r\n\r\n this.settings.status = CONST.START;\r\n\r\n this.settings.active = true;\r\n this.settings.visible = true;\r\n\r\n // For plugins to listen out for\r\n this.events.emit(Events.START, this);\r\n\r\n // For user-land code to listen out for\r\n this.events.emit(Events.READY, this, data);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and send a shutdown event to all of its systems.\r\n * A Scene that has been shutdown will not run its update loop or render, but it does\r\n * not destroy any of its plugins or references. It is put into hibernation for later use.\r\n * If you don't ever plan to use this Scene again, then it should be destroyed instead\r\n * to free-up resources.\r\n *\r\n * @method Phaser.Scenes.Systems#shutdown\r\n * @fires Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'shutdown' event.\r\n */\r\n shutdown: function (data)\r\n {\r\n this.events.off(Events.TRANSITION_INIT);\r\n this.events.off(Events.TRANSITION_START);\r\n this.events.off(Events.TRANSITION_COMPLETE);\r\n this.events.off(Events.TRANSITION_OUT);\r\n\r\n this.settings.status = CONST.SHUTDOWN;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SHUTDOWN, this, data);\r\n },\r\n\r\n /**\r\n * Destroy this Scene and send a destroy event all of its systems.\r\n * A destroyed Scene cannot be restarted.\r\n * You should not call this directly, instead use `SceneManager.remove`.\r\n *\r\n * @method Phaser.Scenes.Systems#destroy\r\n * @private\r\n * @fires Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.settings.status = CONST.DESTROYED;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.DESTROY, this);\r\n\r\n this.events.removeAllListeners();\r\n\r\n var props = [ 'scene', 'game', 'anims', 'cache', 'plugins', 'registry', 'sound', 'textures', 'add', 'camera', 'displayList', 'events', 'make', 'scenePlugin', 'updateList' ];\r\n\r\n for (var i = 0; i < props.length; i++)\r\n {\r\n this[props[i]] = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Systems;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Systems.js?")},"./node_modules/phaser/src/scene/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Scene consts.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PENDING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING: 0,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.INIT\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.START\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n START: 2,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.LOADING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADING: 3,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.CREATING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATING: 4,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.RUNNING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RUNNING: 5,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PAUSED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 6,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SLEEPING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SLEEPING: 7,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SHUTDOWN\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHUTDOWN: 8,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.DESTROYED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DESTROYED: 9\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/const.js?")},"./node_modules/phaser/src/scene/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/scene/events/CREATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/CREATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/scene/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/READY_EVENT.js?")},"./node_modules/phaser/src/scene/events/RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RENDER_EVENT.js?")},"./node_modules/phaser/src/scene/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/scene/events/SLEEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SLEEP_EVENT.js?")},"./node_modules/phaser/src/scene/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/scene/events/BOOT_EVENT.js"),\r\n CREATE: __webpack_require__(/*! ./CREATE_EVENT */ "./node_modules/phaser/src/scene/events/CREATE_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/scene/events/DESTROY_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/scene/events/PAUSE_EVENT.js"),\r\n POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/scene/events/READY_EVENT.js"),\r\n RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "./node_modules/phaser/src/scene/events/RENDER_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/scene/events/RESUME_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js"),\r\n SLEEP: __webpack_require__(/*! ./SLEEP_EVENT */ "./node_modules/phaser/src/scene/events/SLEEP_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/scene/events/START_EVENT.js"),\r\n TRANSITION_COMPLETE: __webpack_require__(/*! ./TRANSITION_COMPLETE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js"),\r\n TRANSITION_INIT: __webpack_require__(/*! ./TRANSITION_INIT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js"),\r\n TRANSITION_OUT: __webpack_require__(/*! ./TRANSITION_OUT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js"),\r\n TRANSITION_START: __webpack_require__(/*! ./TRANSITION_START_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js"),\r\n TRANSITION_WAKE: __webpack_require__(/*! ./TRANSITION_WAKE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/UPDATE_EVENT.js"),\r\n WAKE: __webpack_require__(/*! ./WAKE_EVENT */ "./node_modules/phaser/src/scene/events/WAKE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/index.js?')},"./node_modules/phaser/src/scene/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scene/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Scenes\r\n */\r\n\r\nvar Scene = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scene/events/index.js"),\r\n SceneManager: __webpack_require__(/*! ./SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/scene/ScenePlugin.js"),\r\n Settings: __webpack_require__(/*! ./Settings */ "./node_modules/phaser/src/scene/Settings.js"),\r\n Systems: __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nScene = Extend(false, Scene, CONST);\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/index.js?')},"./node_modules/phaser/src/sound/BaseSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Class containing all the shared state and behavior of a sound object, independent of the implementation.\r\n *\r\n * @class BaseSound\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n */\r\nvar BaseSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSound (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to the sound manager.\r\n *\r\n * @name Phaser.Sound.BaseSound#manager\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * Asset key for the sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#key\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Flag indicating if sound is currently playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * Flag indicating if sound is currently paused.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPaused = false;\r\n\r\n /**\r\n * A property that holds the value of sound's actual playback rate,\r\n * after its rate and detune values has been combined with global\r\n * rate and detune values.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalRate\r\n * @type {number}\r\n * @default 1\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalRate = 1;\r\n\r\n /**\r\n * A value representing the duration, in seconds.\r\n * It could be total sound duration or a marker duration.\r\n *\r\n * @name Phaser.Sound.BaseSound#duration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.duration = this.duration || 0;\r\n\r\n /**\r\n * The total duration of the sound in seconds.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalDuration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = this.totalDuration || 0;\r\n\r\n /**\r\n * A config object used to store default sound settings' values.\r\n * Default values will be set by properties' setters.\r\n *\r\n * @name Phaser.Sound.BaseSound#config\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n\r\n };\r\n\r\n /**\r\n * Reference to the currently used config.\r\n * It could be default config or marker config.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentConfig\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.currentConfig = this.config;\r\n\r\n this.config = Extend(this.config, config);\r\n\r\n /**\r\n * Object containing markers definitions.\r\n *\r\n * @name Phaser.Sound.BaseSound#markers\r\n * @type {Object.}\r\n * @default {}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.markers = {};\r\n\r\n /**\r\n * Currently playing marker.\r\n * 'null' if whole sound is playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentMarker\r\n * @type {Phaser.Types.Sound.SoundMarker}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.currentMarker = null;\r\n\r\n /**\r\n * Flag indicating if destroy method was called on this sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#pendingRemove\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRemove = false;\r\n },\r\n\r\n /**\r\n * Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object.\r\n * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.\r\n *\r\n * @method Phaser.Sound.BaseSound#addMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object.\r\n *\r\n * @return {boolean} Whether the marker was added successfully.\r\n */\r\n addMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('addMarker ' + marker.name + ' already exists in Sound');\r\n\r\n return false;\r\n }\r\n\r\n marker = Extend(true, {\r\n name: '',\r\n start: 0,\r\n duration: this.totalDuration - (marker.start || 0),\r\n config: {\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }\r\n }, marker);\r\n\r\n this.markers[marker.name] = marker;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Updates previously added marker.\r\n *\r\n * @method Phaser.Sound.BaseSound#updateMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values.\r\n *\r\n * @return {boolean} Whether the marker was updated successfully.\r\n */\r\n updateMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio Marker: ' + marker.name + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.markers[marker.name] = Extend(true, this.markers[marker.name], marker);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a marker from the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#removeMarker\r\n * @since 3.0.0\r\n *\r\n * @param {string} markerName - The name of the marker to remove.\r\n *\r\n * @return {?Phaser.Types.Sound.SoundMarker} Removed marker object or 'null' if there was no marker with provided name.\r\n */\r\n removeMarker: function (markerName)\r\n {\r\n var marker = this.markers[markerName];\r\n\r\n if (!marker)\r\n {\r\n return null;\r\n }\r\n\r\n this.markers[markerName] = null;\r\n\r\n return marker;\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.BaseSound#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (markerName === undefined) { markerName = ''; }\r\n\r\n if (typeof markerName === 'object')\r\n {\r\n config = markerName;\r\n markerName = '';\r\n }\r\n\r\n if (typeof markerName !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!markerName)\r\n {\r\n this.currentMarker = null;\r\n this.currentConfig = this.config;\r\n this.duration = this.totalDuration;\r\n }\r\n else\r\n {\r\n if (!this.markers[markerName])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Marker: ' + markerName + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.currentMarker = this.markers[markerName];\r\n this.currentConfig = this.currentMarker.config;\r\n this.duration = this.currentMarker.duration;\r\n }\r\n\r\n this.resetConfig();\r\n\r\n this.currentConfig = Extend(this.currentConfig, config);\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#pause\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.isPaused || !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#resume\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (!this.isPaused || this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#stop\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!this.isPaused && !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.mute = this.currentConfig.mute;\r\n this.volume = this.currentConfig.volume;\r\n this.rate = this.currentConfig.rate;\r\n this.detune = this.currentConfig.detune;\r\n this.loop = this.currentConfig.loop;\r\n },\r\n\r\n /**\r\n * Method used internally for resetting values of some of the config properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#resetConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n resetConfig: function ()\r\n {\r\n this.currentConfig.seek = 0;\r\n this.currentConfig.delay = 0;\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.BaseSound#update\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: NOOP,\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n var cent = 1.0005777895065548; // Math.pow(2, 1/1200);\r\n var totalDetune = this.currentConfig.detune + this.manager.detune;\r\n var detuneRate = Math.pow(cent, totalDetune);\r\n\r\n this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate;\r\n },\r\n\r\n /**\r\n * Destroys this sound and all associated events and marks it for removal from the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSound#destroy\r\n * @fires Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.pendingRemove)\r\n {\r\n return;\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n this.pendingRemove = true;\r\n this.manager = null;\r\n this.key = '';\r\n this.removeAllListeners();\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.config = null;\r\n this.currentConfig = null;\r\n this.markers = null;\r\n this.currentMarker = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSound.js?")},"./node_modules/phaser/src/sound/BaseSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clone = __webpack_require__(/*! ../utils/object/Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback.\r\n * The audio file type and the encoding of those files are extremely important.\r\n *\r\n * Not all browsers can play all audio formats.\r\n *\r\n * There is a good guide to what\'s supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support).\r\n *\r\n * @class BaseSoundManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar BaseSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to game.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * Local reference to the JSON Cache, as used by Audio Sprites.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#jsonCache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @readonly\r\n * @since 3.7.0\r\n */\r\n this.jsonCache = game.cache.json;\r\n\r\n /**\r\n * An array containing all added sounds.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#sounds\r\n * @type {Phaser.Sound.BaseSound[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.sounds = [];\r\n\r\n /**\r\n * Global mute setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#mute\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.mute = false;\r\n\r\n /**\r\n * Global volume setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#volume\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.volume = 1;\r\n\r\n /**\r\n * Flag indicating if sounds should be paused when game looses focus,\r\n * for instance when user switches to another tab/program/app.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#pauseOnBlur\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.pauseOnBlur = true;\r\n\r\n /**\r\n * Property that actually holds the value of global playback rate.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_rate\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._rate = 1;\r\n\r\n /**\r\n * Property that actually holds the value of global detune.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_detune\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._detune = 0;\r\n\r\n /**\r\n * Mobile devices require sounds to be triggered from an explicit user action,\r\n * such as a tap, before any sound can be loaded/played on a web page.\r\n * Set to true if the audio system is currently locked awaiting user interaction.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#locked\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.locked = this.locked || false;\r\n\r\n /**\r\n * Flag used internally for handling when the audio system\r\n * has been unlocked, if there ever was a need for it.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#unlocked\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.unlocked = false;\r\n\r\n game.events.on(GameEvents.BLUR, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onBlur();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.FOCUS, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onFocus();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.update, this);\r\n game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#add\r\n * @override\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.BaseSound} The new sound instance.\r\n */\r\n add: NOOP,\r\n\r\n /**\r\n * Adds a new audio sprite sound into the sound manager.\r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#addAudioSprite\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Types.Sound.AudioSpriteSound} The new audio sprite sound instance.\r\n */\r\n addAudioSprite: function (key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = this.jsonCache.get(key).spritemap;\r\n\r\n for (var markerName in sound.spritemap)\r\n {\r\n if (!sound.spritemap.hasOwnProperty(markerName))\r\n {\r\n continue;\r\n }\r\n\r\n var markerConfig = Clone(config);\r\n\r\n var marker = sound.spritemap[markerName];\r\n\r\n markerConfig.loop = (marker.hasOwnProperty(\'loop\')) ? marker.loop : false;\r\n\r\n sound.addMarker({\r\n name: markerName,\r\n start: marker.start,\r\n duration: marker.end - marker.start,\r\n config: markerConfig\r\n });\r\n }\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Enables playing sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#play\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {(Phaser.Types.Sound.SoundConfig|Phaser.Types.Sound.SoundMarker)} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (key, extra)\r\n {\r\n var sound = this.add(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n if (extra)\r\n {\r\n if (extra.name)\r\n {\r\n sound.addMarker(extra);\r\n\r\n return sound.play(extra.name);\r\n }\r\n else\r\n {\r\n return sound.play(extra);\r\n }\r\n }\r\n else\r\n {\r\n return sound.play();\r\n }\r\n },\r\n\r\n /**\r\n * Enables playing audio sprite sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#playAudioSprite\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {string} spriteName - The name of the sound sprite to play.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {boolean} Whether the audio sprite sound started playing successfully.\r\n */\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n var sound = this.addAudioSprite(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n return sound.play(spriteName, config);\r\n },\r\n\r\n /**\r\n * Removes a sound from the sound manager.\r\n * The removed sound is destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSound} sound - The sound object to remove.\r\n *\r\n * @return {boolean} True if the sound was removed successfully, otherwise false.\r\n */\r\n remove: function (sound)\r\n {\r\n var index = this.sounds.indexOf(sound);\r\n\r\n if (index !== -1)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Removes all sounds from the sound manager that have an asset key matching the given value.\r\n * The removed sounds are destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#removeByKey\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to match when removing sound objects.\r\n *\r\n * @return {number} The number of matching sound objects that were removed.\r\n */\r\n removeByKey: function (key)\r\n {\r\n var removed = 0;\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n var sound = this.sounds[i];\r\n\r\n if (sound.key === key)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(i, 1);\r\n\r\n removed++;\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Pauses all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#pauseAll\r\n * @fires Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\n pauseAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.pause();\r\n });\r\n\r\n this.emit(Events.PAUSE_ALL, this);\r\n },\r\n\r\n /**\r\n * Resumes all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#resumeAll\r\n * @fires Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\n resumeAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.resume();\r\n });\r\n\r\n this.emit(Events.RESUME_ALL, this);\r\n },\r\n\r\n /**\r\n * Stops all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#stopAll\r\n * @fires Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n */\r\n stopAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.stop();\r\n });\r\n\r\n this.emit(Events.STOP_ALL, this);\r\n },\r\n\r\n /**\r\n * Method used internally for unlocking audio playback on devices that\r\n * require user interaction before any sound can be played on a web page.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#unlock\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n unlock: NOOP,\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onBlur\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: NOOP,\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onFocus\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: NOOP,\r\n\r\n /**\r\n * Update method called on every game step.\r\n * Removes destroyed sounds and updates every active sound in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#update\r\n * @protected\r\n * @fires Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.unlocked)\r\n {\r\n this.unlocked = false;\r\n this.locked = false;\r\n\r\n this.emit(Events.UNLOCKED, this);\r\n }\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n if (this.sounds[i].pendingRemove)\r\n {\r\n this.sounds.splice(i, 1);\r\n }\r\n }\r\n\r\n this.sounds.forEach(function (sound)\r\n {\r\n sound.update(time, delta);\r\n });\r\n },\r\n\r\n /**\r\n * Destroys all the sounds in the game and all associated events.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.destroy();\r\n });\r\n\r\n this.sounds.length = 0;\r\n this.sounds = null;\r\n\r\n this.game = null;\r\n },\r\n\r\n /**\r\n * Method used internally for iterating only over active sounds and skipping sounds that are marked for removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#forEachActiveSound\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.EachActiveSoundCallback} callback - Callback function. (manager: Phaser.Sound.BaseSoundManager, sound: Phaser.Sound.BaseSound, index: number, sounds: Phaser.Manager.BaseSound[]) => void\r\n * @param {*} [scope] - Callback context.\r\n */\r\n forEachActiveSound: function (callback, scope)\r\n {\r\n var _this = this;\r\n\r\n this.sounds.forEach(function (sound, index)\r\n {\r\n if (!sound.pendingRemove)\r\n {\r\n callback.call(scope || _this, sound, index, _this.sounds);\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Sets the global playback rate at which all the sounds will be played.\r\n *\r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setRate\r\n * @fires Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - Global playback rate at which all the sounds will be played.\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global playback rate at which all the sounds will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audio\'s playback speed.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#rate\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this._rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rate = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setDetune\r\n * @fires Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#detune\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this._detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._detune = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_DETUNE, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSoundManager.js?')},"./node_modules/phaser/src/sound/SoundManagerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HTML5AudioSoundManager = __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js");\r\nvar NoAudioSoundManager = __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js");\r\nvar WebAudioSoundManager = __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js");\r\n\r\n/**\r\n * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.\r\n *\r\n * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes\r\n *\r\n * @function Phaser.Sound.SoundManagerCreator\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar SoundManagerCreator = {\r\n\r\n create: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n return new NoAudioSoundManager(game);\r\n }\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new WebAudioSoundManager(game);\r\n }\r\n\r\n return new HTML5AudioSoundManager(game);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SoundManagerCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/SoundManagerCreator.js?')},"./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Complete Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they complete playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('complete', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded All Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method,\r\n * once all files passed to the method have been decoded (or errored).\r\n * \r\n * Use `Phaser.Sound.Events#DECODED` to listen for single sounds being decoded, and `DECODED_ALL` to\r\n * listen for them all completing.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decodedall', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.once('decodedall', handler);\r\n * this.sound.decodeAudio([ audioFiles ]);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n */\r\nmodule.exports = 'decodedall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decoded', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.on('decoded', handler);\r\n * this.sound.decodeAudio(key, audioData);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED\r\n * @since 3.18.0\r\n * \r\n * @param {string} key - The key of the audio file that was decoded and added to the audio cache.\r\n */\r\nmodule.exports = 'decoded';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_EVENT.js?")},"./node_modules/phaser/src/sound/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Destroy Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are destroyed, either\r\n * directly or via a Sound Manager.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('destroy', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('destroy', listener);\r\n * music.destroy();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/sound/events/DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Detune Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their detune value changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('detune', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('detune', listener);\r\n * music.play();\r\n * music.setDetune(200);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Detune Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `detune` property of the Sound Manager is changed, which globally\r\n * adjusts the detuning of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} detune - The updated detune value.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Mute Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `mute` property is changed, either directly\r\n * or via the `setMute` method. This changes the mute state of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('mute', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound Manager is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Rate Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `rate` property of the Sound Manager is changed, which globally\r\n * adjusts the playback rate of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} rate - The updated rate value.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Volume Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `volume` property is changed, either directly\r\n * or via the `setVolume` method. This changes the volume of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('volume', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} volume - The new global volume of the Sound Manager.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOPED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Looped Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('looped', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('looped', listener);\r\n * music.setLoop(true);\r\n * music.play();\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOP]{@linkcode Phaser.Sound.Events#event:LOOP} event, which only emits when the loop state of a Sound is changed.\r\n *\r\n * @event Phaser.Sound.Events#LOOPED\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'looped';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOPED_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Loop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their loop state is changed.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('loop', listener);\r\n * music.setLoop(true);\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOPED]{@linkcode Phaser.Sound.Events#event:LOOPED} event, which emits each time a Sound loops during playback.\r\n *\r\n * @event Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} loop - The new loop value. `true` if the Sound will loop, otherwise `false`.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Mute Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their mute state changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('mute', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('mute', listener);\r\n * music.play();\r\n * music.setMute(true);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `pauseAll` method is invoked and after all current Sounds\r\n * have been paused.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('pauseall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Pause Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are paused.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('pause', listener);\r\n * music.play();\r\n * music.pause();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PLAY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Play Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are played.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('play', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('play', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'play';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PLAY_EVENT.js?")},"./node_modules/phaser/src/sound/events/RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Rate Change Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their rate changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('rate', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('rate', listener);\r\n * music.play();\r\n * music.setRate(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} rate - The new rate of the Sound.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `resumeAll` method is invoked and after all current Sounds\r\n * have been resumed.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('resumeall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Resume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are resumed from a paused state.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('resume', listener);\r\n * music.play();\r\n * music.pause();\r\n * music.resume();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/SEEK_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Seek Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are seeked to a new position.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('seek', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('seek', listener);\r\n * music.play();\r\n * music.setSeek(5000);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'seek';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/SEEK_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Stop All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `stopAll` method is invoked and after all current Sounds\r\n * have been stopped.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('stopall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'stopall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Stop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are stopped.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('stop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('stop', listener);\r\n * music.play();\r\n * music.stop();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'stop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Unlocked Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched during the update loop when the Sound Manager becomes unlocked. For\r\n * Web Audio this is on the first user gesture on the page.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js?")},"./node_modules/phaser/src/sound/events/VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Volume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their volume changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('volume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('volume', listener);\r\n * music.play();\r\n * music.setVolume(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} volume - The new volume of the Sound.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js"),\r\n DECODED: __webpack_require__(/*! ./DECODED_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_EVENT.js"),\r\n DECODED_ALL: __webpack_require__(/*! ./DECODED_ALL_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/sound/events/DESTROY_EVENT.js"),\r\n DETUNE: __webpack_require__(/*! ./DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/DETUNE_EVENT.js"),\r\n GLOBAL_DETUNE: __webpack_require__(/*! ./GLOBAL_DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js"),\r\n GLOBAL_MUTE: __webpack_require__(/*! ./GLOBAL_MUTE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js"),\r\n GLOBAL_RATE: __webpack_require__(/*! ./GLOBAL_RATE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js"),\r\n GLOBAL_VOLUME: __webpack_require__(/*! ./GLOBAL_VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js"),\r\n LOOP: __webpack_require__(/*! ./LOOP_EVENT */ "./node_modules/phaser/src/sound/events/LOOP_EVENT.js"),\r\n LOOPED: __webpack_require__(/*! ./LOOPED_EVENT */ "./node_modules/phaser/src/sound/events/LOOPED_EVENT.js"),\r\n MUTE: __webpack_require__(/*! ./MUTE_EVENT */ "./node_modules/phaser/src/sound/events/MUTE_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_EVENT.js"),\r\n PLAY: __webpack_require__(/*! ./PLAY_EVENT */ "./node_modules/phaser/src/sound/events/PLAY_EVENT.js"),\r\n RATE: __webpack_require__(/*! ./RATE_EVENT */ "./node_modules/phaser/src/sound/events/RATE_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_EVENT.js"),\r\n SEEK: __webpack_require__(/*! ./SEEK_EVENT */ "./node_modules/phaser/src/sound/events/SEEK_EVENT.js"),\r\n STOP_ALL: __webpack_require__(/*! ./STOP_ALL_EVENT */ "./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js"),\r\n STOP: __webpack_require__(/*! ./STOP_EVENT */ "./node_modules/phaser/src/sound/events/STOP_EVENT.js"),\r\n UNLOCKED: __webpack_require__(/*! ./UNLOCKED_EVENT */ "./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js"),\r\n VOLUME: __webpack_require__(/*! ./VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/VOLUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/index.js?')},"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * HTML5 Audio implementation of the sound.\r\n *\r\n * @class HTML5AudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar HTML5AudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * An array containing all HTML5 Audio tags that could be used for individual\r\n * sound's playback. Number of instances depends on the config value passed\r\n * to the Loader#audio method call, default is 1.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#tags\r\n * @type {HTMLAudioElement[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.tags = manager.game.cache.audio.get(key);\r\n\r\n if (!this.tags)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * Reference to an HTML5 Audio tag used for playing sound.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#audio\r\n * @type {HTMLAudioElement}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.audio = null;\r\n\r\n /**\r\n * Timestamp as generated by the Request Animation Frame or SetTimeout\r\n * representing the time at which the delayed sound playback should start.\r\n * Set to 0 if sound playback is not delayed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * Audio tag's playback position recorded on previous\r\n * update method call. Set to 0 if sound is not playing.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#previousTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.previousTime = 0;\r\n\r\n this.duration = this.tags[0].duration;\r\n\r\n this.totalDuration = this.tags[0].duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (this.manager.isLocked(this, 'play', [ markerName, config ]))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.isLocked(this, 'pause'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.isLocked(this, 'resume'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (this.manager.isLocked(this, 'stop'))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAndPlayAudioTag: function ()\r\n {\r\n if (!this.pickAudioTag())\r\n {\r\n this.reset();\r\n return false;\r\n }\r\n\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n\r\n this.previousTime = offset;\r\n this.audio.currentTime = offset;\r\n this.applyConfig();\r\n\r\n if (delay === 0)\r\n {\r\n this.startTime = 0;\r\n\r\n if (this.audio.paused)\r\n {\r\n this.playCatchPromise();\r\n }\r\n }\r\n else\r\n {\r\n this.startTime = window.performance.now() + delay * 1000;\r\n\r\n if (!this.audio.paused)\r\n {\r\n this.audio.pause();\r\n }\r\n }\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * This method performs the audio tag pooling logic. It first looks for\r\n * unused audio tag to assign to this sound object. If there are no unused\r\n * audio tags, based on HTML5AudioSoundManager#override property value, it\r\n * looks for sound with most advanced playback and hijacks its audio tag or\r\n * does nothing.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAudioTag: function ()\r\n {\r\n if (this.audio)\r\n {\r\n return true;\r\n }\r\n\r\n for (var i = 0; i < this.tags.length; i++)\r\n {\r\n var audio = this.tags[i];\r\n\r\n if (audio.dataset.used === 'false')\r\n {\r\n audio.dataset.used = 'true';\r\n this.audio = audio;\r\n return true;\r\n }\r\n }\r\n\r\n if (!this.manager.override)\r\n {\r\n return false;\r\n }\r\n\r\n var otherSounds = [];\r\n\r\n this.manager.forEachActiveSound(function (sound)\r\n {\r\n if (sound.key === this.key && sound.audio)\r\n {\r\n otherSounds.push(sound);\r\n }\r\n }, this);\r\n\r\n otherSounds.sort(function (a1, a2)\r\n {\r\n if (a1.loop === a2.loop)\r\n {\r\n // sort by progress\r\n return (a2.seek / a2.duration) - (a1.seek / a1.duration);\r\n }\r\n return a1.loop ? 1 : -1;\r\n });\r\n\r\n var selectedSound = otherSounds[0];\r\n\r\n this.audio = selectedSound.audio;\r\n\r\n selectedSound.reset();\r\n selectedSound.audio = null;\r\n selectedSound.startTime = 0;\r\n selectedSound.previousTime = 0;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used for playing audio tag and catching possible exceptions\r\n * thrown from rejected Promise returned from play method call.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#playCatchPromise\r\n * @private\r\n * @since 3.0.0\r\n */\r\n playCatchPromise: function ()\r\n {\r\n var playPromise = this.audio.play();\r\n\r\n if (playPromise)\r\n {\r\n // eslint-disable-next-line no-unused-vars\r\n playPromise.catch(function (reason)\r\n {\r\n console.warn(reason);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stopAndReleaseAudioTag\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndReleaseAudioTag: function ()\r\n {\r\n this.audio.pause();\r\n this.audio.dataset.used = 'false';\r\n this.audio = null;\r\n this.startTime = 0;\r\n this.previousTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally to reset sound state, usually when stopping sound\r\n * or when hijacking audio tag from another sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#reset\r\n * @private\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n BaseSound.prototype.stop.call(this);\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for pausing sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.currentConfig.delay = Math.max(0, (this.startTime - window.performance.now()) / 1000);\r\n\r\n this.stopAndReleaseAudioTag();\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for resuming sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#onFocus\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n this.pickAndPlayAudioTag();\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (!this.isPlaying)\r\n {\r\n return;\r\n }\r\n\r\n // handling delayed playback\r\n if (this.startTime > 0)\r\n {\r\n if (this.startTime < time - this.manager.audioPlayDelay)\r\n {\r\n this.audio.currentTime += Math.max(0, time - this.startTime) / 1000;\r\n this.startTime = 0;\r\n this.previousTime = this.audio.currentTime;\r\n this.playCatchPromise();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // handle looping and ending\r\n var startTime = this.currentMarker ? this.currentMarker.start : 0;\r\n var endTime = startTime + this.duration;\r\n var currentTime = this.audio.currentTime;\r\n\r\n if (this.currentConfig.loop)\r\n {\r\n if (currentTime >= endTime - this.manager.loopEndOffset)\r\n {\r\n this.audio.currentTime = startTime + Math.max(0, currentTime - endTime);\r\n currentTime = this.audio.currentTime;\r\n }\r\n else if (currentTime < startTime)\r\n {\r\n this.audio.currentTime += startTime;\r\n currentTime = this.audio.currentTime;\r\n }\r\n\r\n if (currentTime < this.previousTime)\r\n {\r\n this.emit(Events.LOOPED, this);\r\n }\r\n }\r\n else if (currentTime >= endTime)\r\n {\r\n this.reset();\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n\r\n return;\r\n }\r\n\r\n this.previousTime = currentTime;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.tags = null;\r\n\r\n if (this.audio)\r\n {\r\n this.stopAndReleaseAudioTag();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to determine mute setting of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateMute\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateMute: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.muted = this.currentConfig.mute || this.manager.mute;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total volume of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateVolume\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateVolume: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.volume = this.currentConfig.volume * this.manager.volume;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n if (this.audio)\r\n {\r\n this.audio.playbackRate = this.totalRate;\r\n }\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n\r\n if (this.manager.isLocked(this, 'mute', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateMute();\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n\r\n if (this.manager.isLocked(this, 'volume', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateVolume();\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n if (this.manager.isLocked(this, Events.RATE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n if (this.manager.isLocked(this, Events.DETUNE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n return this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.isLocked(this, 'seek', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n if (this.isPlaying)\r\n {\r\n this.previousTime = value;\r\n this.audio.currentTime = value;\r\n }\r\n else if (this.isPaused)\r\n {\r\n this.currentConfig.seek = value;\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.manager.isLocked(this, 'loop', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.audio)\r\n {\r\n this.audio.loop = value;\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSound.js?")},"./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar HTML5AudioSound = __webpack_require__(/*! ./HTML5AudioSound */ \"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js\");\r\n\r\n/**\r\n * HTML5 Audio implementation of the Sound Manager.\r\n *\r\n * @class HTML5AudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar HTML5AudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSoundManager (game)\r\n {\r\n /**\r\n * Flag indicating whether if there are no idle instances of HTML5 Audio tag,\r\n * for any particular sound, if one of the used tags should be hijacked and used\r\n * for succeeding playback or if succeeding Phaser.Sound.HTML5AudioSound#play\r\n * call should be ignored.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#override\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.override = true;\r\n\r\n /**\r\n * Value representing time difference, in seconds, between calling\r\n * play method on an audio tag and when it actually starts playing.\r\n * It is used to achieve more accurate delayed sound playback.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since audio play delay varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#audioPlayDelay\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.audioPlayDelay = 0.1;\r\n\r\n /**\r\n * A value by which we should offset the loop end marker of the\r\n * looping sound to compensate for lag, caused by changing audio\r\n * tag playback position, in order to achieve gapless looping.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since loop lag varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#loopEndOffset\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.loopEndOffset = 0.05;\r\n\r\n /**\r\n * An array for keeping track of all the sounds\r\n * that were paused when game lost focus.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#onBlurPausedSounds\r\n * @type {Phaser.Sound.HTML5AudioSound[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.onBlurPausedSounds = [];\r\n\r\n this.locked = 'ontouchstart' in window;\r\n\r\n /**\r\n * A queue of all actions performed on sound objects while audio was locked.\r\n * Once the audio gets unlocked, after an explicit user interaction,\r\n * all actions will be performed in chronological order.\r\n * Array of object types: { sound: Phaser.Sound.HTML5AudioSound, name: string, value?: * }\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#lockedActionsQueue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.lockedActionsQueue = this.locked ? [] : null;\r\n\r\n /**\r\n * Property that actually holds the value of global mute\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_mute\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._mute = false;\r\n\r\n /**\r\n * Property that actually holds the value of global volume\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_volume\r\n * @type {boolean}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._volume = 1;\r\n\r\n BaseSoundManager.call(this, game);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new HTML5AudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Unlocks HTML5 Audio loading and playback on mobile\r\n * devices on the initial explicit user interaction.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n this.locked = false;\r\n\r\n var _this = this;\r\n\r\n this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n if (tags[i].dataset.locked === 'true')\r\n {\r\n _this.locked = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (!this.locked)\r\n {\r\n return;\r\n }\r\n\r\n var moved = false;\r\n\r\n var detectMove = function ()\r\n {\r\n moved = true;\r\n };\r\n\r\n var unlock = function ()\r\n {\r\n if (moved)\r\n {\r\n moved = false;\r\n return;\r\n }\r\n\r\n document.body.removeEventListener('touchmove', detectMove);\r\n document.body.removeEventListener('touchend', unlock);\r\n\r\n var lockedTags = [];\r\n\r\n _this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n var tag = tags[i];\r\n\r\n if (tag.dataset.locked === 'true')\r\n {\r\n lockedTags.push(tag);\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (lockedTags.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var lastTag = lockedTags[lockedTags.length - 1];\r\n\r\n lastTag.oncanplaythrough = function ()\r\n {\r\n lastTag.oncanplaythrough = null;\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.dataset.locked = 'false';\r\n });\r\n\r\n _this.unlocked = true;\r\n };\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.load();\r\n });\r\n };\r\n\r\n this.once(Events.UNLOCKED, function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.currentMarker === null && sound.duration === 0)\r\n {\r\n sound.duration = sound.tags[0].duration;\r\n }\r\n\r\n sound.totalDuration = sound.tags[0].duration;\r\n });\r\n\r\n while (this.lockedActionsQueue.length)\r\n {\r\n var lockedAction = this.lockedActionsQueue.shift();\r\n\r\n if (lockedAction.sound[lockedAction.prop].apply)\r\n {\r\n lockedAction.sound[lockedAction.prop].apply(lockedAction.sound, lockedAction.value || []);\r\n }\r\n else\r\n {\r\n lockedAction.sound[lockedAction.prop] = lockedAction.value;\r\n }\r\n }\r\n\r\n }, this);\r\n\r\n document.body.addEventListener('touchmove', detectMove, false);\r\n document.body.addEventListener('touchend', unlock, false);\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.isPlaying)\r\n {\r\n this.onBlurPausedSounds.push(sound);\r\n sound.onBlur();\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.onBlurPausedSounds.forEach(function (sound)\r\n {\r\n sound.onFocus();\r\n });\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n this.onBlurPausedSounds = null;\r\n },\r\n\r\n /**\r\n * Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters\r\n * to check if sound manager is locked and then either perform action immediately or queue it\r\n * to be performed once the sound manager gets unlocked.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#isLocked\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action.\r\n * @param {string} prop - Name of the method to be called or property to be assigned a value to.\r\n * @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.\r\n *\r\n * @return {boolean} Whether the sound manager is locked.\r\n */\r\n isLocked: function (sound, prop, value)\r\n {\r\n if (sound.tags[0].dataset.locked === 'true')\r\n {\r\n this.lockedActionsQueue.push({\r\n sound: sound,\r\n prop: prop,\r\n value: value\r\n });\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this._mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._mute = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateMute();\r\n });\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this._volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._volume = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateVolume();\r\n });\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js?")},"./node_modules/phaser/src/sound/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound\r\n */\r\n\r\nmodule.exports = {\r\n\r\n SoundManagerCreator: __webpack_require__(/*! ./SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js"),\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js"),\r\n\r\n BaseSound: __webpack_require__(/*! ./BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js"),\r\n BaseSoundManager: __webpack_require__(/*! ./BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js"),\r\n\r\n WebAudioSound: __webpack_require__(/*! ./webaudio/WebAudioSound */ "./node_modules/phaser/src/sound/webaudio/WebAudioSound.js"),\r\n WebAudioSoundManager: __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js"),\r\n\r\n HTML5AudioSound: __webpack_require__(/*! ./html5/HTML5AudioSound */ "./node_modules/phaser/src/sound/html5/HTML5AudioSound.js"),\r\n HTML5AudioSoundManager: __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js"),\r\n\r\n NoAudioSound: __webpack_require__(/*! ./noaudio/NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js"),\r\n NoAudioSoundManager: __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/index.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSound.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar NoAudioSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSound (manager, key, config)\r\n {\r\n if (config === void 0) { config = {}; }\r\n\r\n EventEmitter.call(this);\r\n\r\n this.manager = manager;\r\n this.key = key;\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.totalRate = 1;\r\n this.duration = 0;\r\n this.totalDuration = 0;\r\n\r\n this.config = Extend({\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }, config);\r\n\r\n this.currentConfig = this.config;\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.seek = 0;\r\n this.loop = false;\r\n this.markers = {};\r\n this.currentMarker = null;\r\n this.pendingRemove = false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n addMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n updateMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n removeMarker: function (markerName)\r\n {\r\n return null;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (markerName, config)\r\n {\r\n return false;\r\n },\r\n\r\n pause: function ()\r\n {\r\n return false;\r\n },\r\n\r\n resume: function ()\r\n {\r\n return false;\r\n },\r\n\r\n stop: function ()\r\n {\r\n return false;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.manager.remove(this);\r\n\r\n BaseSound.prototype.destroy.call(this);\r\n }\r\n});\r\n\r\nmodule.exports = NoAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSound.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar NoAudioSound = __webpack_require__(/*! ./NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound manager. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound manager logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar NoAudioSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n this.game = game;\r\n this.sounds = [];\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.pauseOnBlur = true;\r\n this.locked = false;\r\n },\r\n\r\n add: function (key, config)\r\n {\r\n var sound = new NoAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n addAudioSprite: function (key, config)\r\n {\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = {};\r\n\r\n return sound;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (key, extra)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n return false;\r\n },\r\n\r\n remove: function (sound)\r\n {\r\n return BaseSoundManager.prototype.remove.call(this, sound);\r\n },\r\n\r\n removeByKey: function (key)\r\n {\r\n return BaseSoundManager.prototype.removeByKey.call(this, key);\r\n },\r\n\r\n pauseAll: NOOP,\r\n resumeAll: NOOP,\r\n stopAll: NOOP,\r\n update: NOOP,\r\n setRate: NOOP,\r\n setDetune: NOOP,\r\n setMute: NOOP,\r\n setVolume: NOOP,\r\n\r\n forEachActiveSound: function (callbackfn, scope)\r\n {\r\n BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope);\r\n },\r\n\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = NoAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js?')},"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound.\r\n *\r\n * @class WebAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar WebAudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function WebAudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * Audio buffer containing decoded data of the audio asset to be played.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#audioBuffer\r\n * @type {AudioBuffer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.audioBuffer = manager.game.cache.audio.get(key);\r\n\r\n if (!this.audioBuffer)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * A reference to an audio source node used for playing back audio from\r\n * audio data stored in Phaser.Sound.WebAudioSound#audioBuffer.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#source\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.source = null;\r\n\r\n /**\r\n * A reference to a second audio source used for gapless looped playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopSource\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.loopSource = null;\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#muteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.muteNode = manager.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#volumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.volumeNode = manager.context.createGain();\r\n\r\n /**\r\n * The time at which the sound should have started playback from the beginning.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#playTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.playTime = 0;\r\n\r\n /**\r\n * The time at which the sound source should have actually started playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time at which the sound loop source should actually start playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopTime = 0;\r\n\r\n /**\r\n * An array where we keep track of all rate updates during playback.\r\n * Array of object types: { time: number, rate: number }\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rateUpdates\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.rateUpdates = [];\r\n\r\n /**\r\n * Used for keeping track when sound source playback has ended\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasEnded\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasEnded = false;\r\n\r\n /**\r\n * Used for keeping track when sound source has looped\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasLooped\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasLooped = false;\r\n\r\n this.muteNode.connect(this.volumeNode);\r\n\r\n this.volumeNode.connect(manager.destination);\r\n\r\n this.duration = this.audioBuffer.duration;\r\n\r\n this.totalDuration = this.audioBuffer.duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * \r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.getCurrentTime(); // Equivalent to setting paused time\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartBufferSource: function ()\r\n {\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var when = this.manager.context.currentTime + delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n var duration = this.duration - seek;\r\n\r\n this.playTime = when - seek;\r\n this.startTime = when;\r\n this.source = this.createBufferSource();\r\n\r\n this.applyConfig();\r\n\r\n this.source.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n\r\n this.resetConfig();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartLoopBufferSource: function ()\r\n {\r\n var when = this.getLoopTime();\r\n var offset = this.currentMarker ? this.currentMarker.start : 0;\r\n var duration = this.duration;\r\n\r\n this.loopTime = when;\r\n this.loopSource = this.createBufferSource();\r\n this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0);\r\n this.loopSource.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createBufferSource\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {AudioBufferSourceNode}\r\n */\r\n createBufferSource: function ()\r\n {\r\n var _this = this;\r\n var source = this.manager.context.createBufferSource();\r\n\r\n source.buffer = this.audioBuffer;\r\n\r\n source.connect(this.muteNode);\r\n\r\n source.onended = function (ev)\r\n {\r\n if (ev.target === _this.source)\r\n {\r\n // sound ended\r\n if (_this.currentConfig.loop)\r\n {\r\n _this.hasLooped = true;\r\n }\r\n else\r\n {\r\n _this.hasEnded = true;\r\n }\r\n }\r\n\r\n // else was stopped\r\n };\r\n\r\n return source;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveBufferSource: function ()\r\n {\r\n if (this.source)\r\n {\r\n this.source.stop();\r\n this.source.disconnect();\r\n this.source = null;\r\n }\r\n\r\n this.playTime = 0;\r\n this.startTime = 0;\r\n\r\n this.stopAndRemoveLoopBufferSource();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveLoopBufferSource: function ()\r\n {\r\n if (this.loopSource)\r\n {\r\n this.loopSource.stop();\r\n this.loopSource.disconnect();\r\n this.loopSource = null;\r\n }\r\n\r\n this.loopTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: 1\r\n });\r\n\r\n BaseSound.prototype.applyConfig.call(this);\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (this.hasEnded)\r\n {\r\n this.hasEnded = false;\r\n\r\n BaseSound.prototype.stop.call(this);\r\n\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n }\r\n else if (this.hasLooped)\r\n {\r\n this.hasLooped = false;\r\n this.source = this.loopSource;\r\n this.loopSource = null;\r\n this.playTime = this.startTime = this.loopTime;\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: this.totalRate\r\n });\r\n\r\n this.createAndStartLoopBufferSource();\r\n\r\n this.emit(Events.LOOPED, this);\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.audioBuffer = null;\r\n this.stopAndRemoveBufferSource();\r\n this.muteNode.disconnect();\r\n this.muteNode = null;\r\n this.volumeNode.disconnect();\r\n this.volumeNode = null;\r\n this.rateUpdates.length = 0;\r\n this.rateUpdates = null;\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n var now = this.manager.context.currentTime;\r\n\r\n if (this.source && typeof this.totalRate === 'number')\r\n {\r\n this.source.playbackRate.setValueAtTime(this.totalRate, now);\r\n }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.rateUpdates.push({\r\n time: Math.max(this.startTime, now) - this.playTime,\r\n rate: this.totalRate\r\n });\r\n\r\n if (this.loopSource)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for calculating current playback time of a playing sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getCurrentTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getCurrentTime: function ()\r\n {\r\n var currentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length; i++)\r\n {\r\n var nextTime = 0;\r\n\r\n if (i < this.rateUpdates.length - 1)\r\n {\r\n nextTime = this.rateUpdates[i + 1].time;\r\n }\r\n else\r\n {\r\n nextTime = this.manager.context.currentTime - this.playTime;\r\n }\r\n\r\n currentTime += (nextTime - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n return currentTime;\r\n },\r\n\r\n /**\r\n * Method used internally for calculating the time\r\n * at witch the loop source should start playing.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getLoopTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getLoopTime: function ()\r\n {\r\n var lastRateUpdateCurrentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length - 1; i++)\r\n {\r\n lastRateUpdateCurrentTime += (this.rateUpdates[i + 1].time - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n var lastRateUpdate = this.rateUpdates[this.rateUpdates.length - 1];\r\n\r\n return this.playTime + lastRateUpdate.time + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.WebAudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.muteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n this.muteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.WebAudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.volumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n this.volumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return this.startTime - this.playTime;\r\n }\r\n\r\n return this.getCurrentTime();\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n this.currentConfig.seek = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n\r\n if (value)\r\n {\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSound.js?")},"./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64ToArrayBuffer = __webpack_require__(/*! ../../utils/base64/Base64ToArrayBuffer */ \"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js\");\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar WebAudioSound = __webpack_require__(/*! ./WebAudioSound */ \"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound manager.\r\n *\r\n * @class WebAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar WebAudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function WebAudioSoundManager (game)\r\n {\r\n /**\r\n * The AudioContext being used for playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#context\r\n * @type {AudioContext}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.context = this.createAudioContext(game);\r\n\r\n /**\r\n * Gain node responsible for controlling global muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterMuteNode = this.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling global volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterVolumeNode = this.context.createGain();\r\n\r\n this.masterMuteNode.connect(this.masterVolumeNode);\r\n\r\n this.masterVolumeNode.connect(this.context.destination);\r\n\r\n /**\r\n * Destination node for connecting individual sounds to.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#destination\r\n * @type {AudioNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.destination = this.masterMuteNode;\r\n\r\n this.locked = this.context.state === 'suspended' && ('ontouchstart' in window || 'onclick' in window);\r\n\r\n BaseSoundManager.call(this, game);\r\n\r\n if (this.locked)\r\n {\r\n this.unlock();\r\n }\r\n },\r\n\r\n /**\r\n * Method responsible for instantiating and returning AudioContext instance.\r\n * If an instance of an AudioContext class was provided through the game config,\r\n * that instance will be returned instead. This can come in handy if you are reloading\r\n * a Phaser game on a page that never properly refreshes (such as in an SPA project)\r\n * and you want to reuse already instantiated AudioContext.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#createAudioContext\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n *\r\n * @return {AudioContext} The AudioContext instance to be used for playback.\r\n */\r\n createAudioContext: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n\r\n if (audioConfig && audioConfig.context)\r\n {\r\n audioConfig.context.resume();\r\n\r\n return audioConfig.context;\r\n }\r\n\r\n return new AudioContext();\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new WebAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Decode audio data into a format ready for playback via Web Audio.\r\n * \r\n * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n * \r\n * The `audioKey` is the key that will be used to save the decoded audio to the audio cache.\r\n * \r\n * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig`\r\n * objects as the first and only argument.\r\n * \r\n * Decoding is an async process, so be sure to listen for the events to know when decoding has completed.\r\n * \r\n * Once the audio has decoded it can be added to the Sound Manager or played via its key.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#decodeAudio\r\n * @fires Phaser.Sound.Events#DECODED\r\n * @fires Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n *\r\n * @param {(Phaser.Types.Sound.DecodeAudioConfig[]|string)} [audioKey] - The string-based key to be used to reference the decoded audio in the audio cache, or an array of audio config objects.\r\n * @param {(ArrayBuffer|string)} [audioData] - The audio data, either a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n */\r\n decodeAudio: function (audioKey, audioData)\r\n {\r\n var audioFiles;\r\n\r\n if (!Array.isArray(audioKey))\r\n {\r\n audioFiles = [ { key: audioKey, data: audioData } ];\r\n }\r\n else\r\n {\r\n audioFiles = audioKey;\r\n }\r\n\r\n var cache = this.game.cache.audio;\r\n var remaining = audioFiles.length;\r\n\r\n for (var i = 0; i < audioFiles.length; i++)\r\n {\r\n var entry = audioFiles[i];\r\n\r\n var key = entry.key;\r\n var data = entry.data;\r\n\r\n if (typeof data === 'string')\r\n {\r\n data = Base64ToArrayBuffer(data);\r\n }\r\n\r\n var success = function (key, audioBuffer)\r\n {\r\n cache.add(key, audioBuffer);\r\n \r\n this.emit(Events.DECODED, key);\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n \r\n var failure = function (key, error)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + key + ' - ', error ? error.message : '');\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n\r\n this.context.decodeAudioData(data, success, failure);\r\n }\r\n },\r\n\r\n /**\r\n * Unlocks Web Audio API on the initial input event.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n var _this = this;\r\n\r\n var unlockHandler = function unlockHandler ()\r\n {\r\n if (_this.context)\r\n {\r\n _this.context.resume().then(function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n \r\n _this.unlocked = true;\r\n }, function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n });\r\n }\r\n };\r\n\r\n if (document.body)\r\n {\r\n document.body.addEventListener('touchstart', unlockHandler, false);\r\n document.body.addEventListener('touchend', unlockHandler, false);\r\n document.body.addEventListener('click', unlockHandler, false);\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.suspend();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.resume();\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.destination = null;\r\n this.masterVolumeNode.disconnect();\r\n this.masterVolumeNode = null;\r\n this.masterMuteNode.disconnect();\r\n this.masterMuteNode = null;\r\n\r\n if (this.game.config.audio && this.game.config.audio.context)\r\n {\r\n this.context.suspend();\r\n }\r\n else\r\n {\r\n var _this = this;\r\n\r\n this.context.close().then(function ()\r\n {\r\n\r\n _this.context = null;\r\n\r\n });\r\n }\r\n\r\n BaseSoundManager.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.masterMuteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.masterVolumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterVolumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js?")},"./node_modules/phaser/src/structs/List.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\n\r\n/**\r\n * @callback EachListCallback\r\n *\r\n * @param {I} item - The item which is currently being processed.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * List is a generic implementation of an ordered list which contains utility methods for retrieving, manipulating, and iterating items.\r\n *\r\n * @class List\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n *\r\n * @param {*} parent - The parent of this list.\r\n */\r\nvar List = new Class({\r\n\r\n initialize:\r\n\r\n function List (parent)\r\n {\r\n /**\r\n * The parent of this list.\r\n *\r\n * @name Phaser.Structs.List#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The objects that belong to this collection.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.List#list\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The index of the current element.\r\n * \r\n * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties.\r\n *\r\n * @name Phaser.Structs.List#position\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * A callback that is invoked every time a child is added to this list.\r\n *\r\n * @name Phaser.Structs.List#addCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.addCallback = NOOP;\r\n\r\n /**\r\n * A callback that is invoked every time a child is removed from this list.\r\n *\r\n * @name Phaser.Structs.List#removeCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.removeCallback = NOOP;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.Structs.List#_sortKey\r\n * @type {string}\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n },\r\n\r\n /**\r\n * Adds the given item to the end of the list. Each item must be unique.\r\n *\r\n * @method Phaser.Structs.List#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*|Array.<*>} child - The item, or array of items, to add to the list.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The list's underlying array.\r\n */\r\n add: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Add(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Add(this.list, child, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an item to list, starting at a specified index. Each item must be unique within the list.\r\n *\r\n * @method Phaser.Structs.List#addAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to add to the list.\r\n * @param {integer} [index=0] - The index in the list at which the element(s) will be inserted.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The List's underlying array.\r\n */\r\n addAt: function (child, index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the item at a given position inside the List.\r\n *\r\n * @method Phaser.Structs.List#getAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The index of the item.\r\n *\r\n * @return {*} The retrieved item, or `undefined` if it's outside the List's bounds.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Locates an item within the List and returns its index.\r\n *\r\n * @method Phaser.Structs.List#getIndex\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to locate.\r\n *\r\n * @return {integer} The index of the item within the List, or -1 if it's not in the List.\r\n */\r\n getIndex: function (child)\r\n {\r\n // Return -1 if given child isn't a child of this display list\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this List so the items are in order based on the given property.\r\n * For example, `sort('alpha')` would sort the List contents based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.Structs.List#sort\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [children,$return]\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name`\r\n * property matching the given argument. Should more than one child have\r\n * the same name only the first is returned.\r\n *\r\n * @method Phaser.Structs.List#getByName\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?*} The first child with a matching name, or null if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random child from the group.\r\n *\r\n * @method Phaser.Structs.List#getRandom\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child).\r\n * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from.\r\n *\r\n * @return {?*} A random child of this Group.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Returns the first element in a given part of the List which matches a specific criterion.\r\n *\r\n * @method Phaser.Structs.List#getFirst\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} property - The name of the property to test or a falsey value to have no criterion.\r\n * @param {*} value - The value to test the `property` against, or `undefined` to allow any value and only check for existence.\r\n * @param {number} [startIndex=0] - The position in the List to start the search at.\r\n * @param {number} [endIndex] - The position in the List to optionally stop the search at. It won't be checked.\r\n *\r\n * @return {?*} The first item which matches the given criterion, or `null` if no such item exists.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all children in this List.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('parent')` would return only children that have a property called `parent`.\r\n *\r\n * You can also specify a value to compare the property to:\r\n * \r\n * `getAll('visible', true)` would return only children that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this List had 100 children,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 children in the List.\r\n *\r\n * @method Phaser.Structs.List#getAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - An optional property to test against the value argument.\r\n * @param {*} [value] - If property is set then Child.property must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n *\r\n * @return {Array.<*>} All items of the List which match the given criterion, if any.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of items in the List which have a property matching the given value.\r\n *\r\n * @method Phaser.Structs.List#count\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The property to test on each item.\r\n * @param {*} value - The value to test the property against.\r\n *\r\n * @return {integer} The total number of matching elements.\r\n */\r\n count: function (property, value)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value);\r\n },\r\n\r\n /**\r\n * Swaps the positions of two items in the list.\r\n *\r\n * @method Phaser.Structs.List#swap\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {*} child1 - The first item to swap.\r\n * @param {*} child2 - The second item to swap.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n },\r\n\r\n /**\r\n * Moves an item in the List to a new position.\r\n *\r\n * @method Phaser.Structs.List#moveTo\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move.\r\n * @param {integer} index - Moves an item in the List to a new position.\r\n *\r\n * @return {*} The item that was moved.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n return ArrayUtils.MoveTo(this.list, child, index);\r\n },\r\n\r\n /**\r\n * Removes one or many items from the List.\r\n *\r\n * @method Phaser.Structs.List#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to remove.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item, or array of items, which were successfully removed from the List.\r\n */\r\n remove: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Remove(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Remove(this.list, child, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the item at the given position in the List.\r\n *\r\n * @method Phaser.Structs.List#removeAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The position to remove the item from.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\n removeAt: function (index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the items within the given range in the List.\r\n *\r\n * @method Phaser.Structs.List#removeBetween\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - The index to start removing from.\r\n * @param {integer} [endIndex] - The position to stop removing at. The item at this position won't be removed.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Array.<*>} An array of the items which were removed.\r\n */\r\n removeBetween: function (startIndex, endIndex, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes all the items.\r\n *\r\n * @method Phaser.Structs.List#removeAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n * \r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n removeAll: function (skipCallback)\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this.list[i], skipCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given child to the top of this List.\r\n *\r\n * @method Phaser.Structs.List#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to bring to the top of the List.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n bringToTop: function (child)\r\n {\r\n return ArrayUtils.BringToTop(this.list, child);\r\n },\r\n\r\n /**\r\n * Sends the given child to the bottom of this List.\r\n *\r\n * @method Phaser.Structs.List#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to send to the back of the list.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n sendToBack: function (child)\r\n {\r\n return ArrayUtils.SendToBack(this.list, child);\r\n },\r\n\r\n /**\r\n * Moves the given child up one place in this group unless it's already at the top.\r\n *\r\n * @method Phaser.Structs.List#moveUp\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move up.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Moves the given child down one place in this group unless it's already at the bottom.\r\n *\r\n * @method Phaser.Structs.List#moveDown\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move down.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Reverses the order of all children in this List.\r\n *\r\n * @method Phaser.Structs.List#reverse\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the items in the list.\r\n *\r\n * @method Phaser.Structs.List#shuffle\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.\r\n *\r\n * @method Phaser.Structs.List#replace\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [oldChild,newChild,$return]\r\n *\r\n * @param {*} oldChild - The child in this List that will be replaced.\r\n * @param {*} newChild - The child to be inserted into this List.\r\n *\r\n * @return {*} Returns the oldChild that was replaced within this group.\r\n */\r\n replace: function (oldChild, newChild)\r\n {\r\n return ArrayUtils.Replace(this.list, oldChild, newChild);\r\n },\r\n\r\n /**\r\n * Checks if an item exists within the List.\r\n *\r\n * @method Phaser.Structs.List#exists\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to check for the existence of.\r\n *\r\n * @return {boolean} `true` if the item is found in the list, otherwise `false`.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property `key` to the given value on all members of this List.\r\n *\r\n * @method Phaser.Structs.List#setAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The name of the property to set.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all children to the given callback.\r\n *\r\n * @method Phaser.Structs.List#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachListCallback.} - [callback]\r\n *\r\n * @param {EachListCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the List and recreates its internal array.\r\n *\r\n * @method Phaser.Structs.List#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.list = [];\r\n },\r\n\r\n /**\r\n * Destroys this List.\r\n *\r\n * @method Phaser.Structs.List#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.parent = null;\r\n this.addCallback = null;\r\n this.removeCallback = null;\r\n },\r\n\r\n /**\r\n * The number of items inside the List.\r\n *\r\n * @name Phaser.Structs.List#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The first item in the List or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#first\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The last item in the List, or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#last\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The next item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List.\r\n *\r\n * @name Phaser.Structs.List#next\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The previous item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards.\r\n *\r\n * @name Phaser.Structs.List#previous\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = List;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/List.js?")},"./node_modules/phaser/src/structs/Map.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachMapCallback\r\n *\r\n * @param {string} key - The key of the Map entry.\r\n * @param {E} entry - The value of the Map entry.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The keys of a Map can be arbitrary values.\r\n * \r\n * ```javascript\r\n * var map = new Map([\r\n * [ 1, 'one' ],\r\n * [ 2, 'two' ],\r\n * [ 3, 'three' ]\r\n * ]);\r\n * ```\r\n *\r\n * @class Map\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic K\r\n * @generic V\r\n * @genericUse {V[]} - [elements]\r\n *\r\n * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with.\r\n */\r\nvar Map = new Class({\r\n\r\n initialize:\r\n\r\n function Map (elements)\r\n {\r\n /**\r\n * The entries in this Map.\r\n *\r\n * @genericUse {Object.} - [$type]\r\n *\r\n * @name Phaser.Structs.Map#entries\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.entries = {};\r\n\r\n /**\r\n * The number of key / value pairs in this Map.\r\n *\r\n * @name Phaser.Structs.Map#size\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.size = 0;\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i][0], elements[i][1]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds an element with a specified `key` and `value` to this Map.\r\n * If the `key` already exists, the value will be replaced.\r\n *\r\n * @method Phaser.Structs.Map#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [value]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to be added to this Map.\r\n * @param {*} value - The value of the element to be added to this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n set: function (key, value)\r\n {\r\n if (!this.has(key))\r\n {\r\n this.size++;\r\n }\r\n\r\n this.entries[key] = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the value associated to the `key`, or `undefined` if there is none.\r\n *\r\n * @method Phaser.Structs.Map#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [$return]\r\n *\r\n * @param {string} key - The key of the element to return from the `Map` object.\r\n *\r\n * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object.\r\n */\r\n get: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n return this.entries[key];\r\n }\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all the values stored in this Map.\r\n *\r\n * @method Phaser.Structs.Map#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array of the values stored in this Map.\r\n */\r\n getArray: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns a boolean indicating whether an element with the specified key exists or not.\r\n *\r\n * @method Phaser.Structs.Map#has\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n *\r\n * @param {string} key - The key of the element to test for presence of in this Map.\r\n *\r\n * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return (this.entries.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Delete the specified element from this Map.\r\n *\r\n * @method Phaser.Structs.Map#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to delete from this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n delete: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n delete this.entries[key];\r\n this.size--;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all entries from this Map.\r\n *\r\n * @method Phaser.Structs.Map#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n clear: function ()\r\n {\r\n Object.keys(this.entries).forEach(function (prop)\r\n {\r\n delete this.entries[prop];\r\n\r\n }, this);\r\n\r\n this.size = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all entries keys in this Map.\r\n *\r\n * @method Phaser.Structs.Map#keys\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K[]} - [$return]\r\n *\r\n * @return {string[]} Array containing entries' keys.\r\n */\r\n keys: function ()\r\n {\r\n return Object.keys(this.entries);\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all entries.\r\n *\r\n * @method Phaser.Structs.Map#values\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An `Array` of entries.\r\n */\r\n values: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Map to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Map#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n var entries = this.entries;\r\n\r\n // eslint-disable-next-line no-console\r\n console.group('Map');\r\n\r\n for (var key in entries)\r\n {\r\n console.log(key, entries[key]);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes all entries in this Map to the given callback.\r\n *\r\n * @method Phaser.Structs.Map#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachMapCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n each: function (callback)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (callback(key, entries[key]) === false)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the value exists within this Map. Otherwise, returns `false`.\r\n *\r\n * @method Phaser.Structs.Map#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V} - [value]\r\n *\r\n * @param {*} value - The value to search for.\r\n *\r\n * @return {boolean} `true` if the value is found, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (entries[key] === value)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Merges all new keys from the given Map into this one.\r\n * If it encounters a key that already exists it will be skipped unless override is set to `true`.\r\n *\r\n * @method Phaser.Structs.Map#merge\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [map,$return]\r\n *\r\n * @param {Phaser.Structs.Map} map - The Map to merge in to this Map.\r\n * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n merge: function (map, override)\r\n {\r\n if (override === undefined) { override = false; }\r\n\r\n var local = this.entries;\r\n var source = map.entries;\r\n\r\n for (var key in source)\r\n {\r\n if (local.hasOwnProperty(key) && override)\r\n {\r\n local[key] = source[key];\r\n }\r\n else\r\n {\r\n this.set(key, source[key]);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Map;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Map.js?")},"./node_modules/phaser/src/structs/ProcessQueue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Process Queue maintains three internal lists.\r\n * \r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * When new items are added to a Process Queue they are put in the pending list, rather than being added\r\n * immediately the active list. Equally, items that are removed are put into the destroy list, rather than\r\n * being destroyed immediately. This allows the Process Queue to carefully process each item at a specific, fixed\r\n * time, rather than at the time of the request from the API.\r\n *\r\n * @class ProcessQueue\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n */\r\nvar ProcessQueue = new Class({\r\n\r\n initialize:\r\n\r\n function ProcessQueue ()\r\n {\r\n /**\r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_pending\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_active\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_destroy\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The total number of items awaiting processing.\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Adds a new item to the Process Queue.\r\n * The item is added to the pending list and made active in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to add to the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n add: function (item)\r\n {\r\n this._pending.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an item from the Process Queue.\r\n * The item is added to the pending destroy and fully removed in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to be removed from the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n remove: function (item)\r\n {\r\n this._destroy.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Update this queue. First it will process any items awaiting destruction, and remove them.\r\n * \r\n * Then it will check to see if there are any items pending insertion, and move them to an\r\n * active state. Finally, it will return a list of active items for further processing.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#update\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n update: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return this._active;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var i;\r\n var item;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(item);\r\n\r\n if (idx !== -1)\r\n {\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the pending addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during an update\r\n\r\n list = this._pending;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n this._active.push(item);\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n\r\n // The owner of this queue can now safely do whatever it needs to with the active list\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Returns the current list of active items.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#getActive\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n getActive: function ()\r\n {\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Immediately destroys this process queue, clearing all of its internal arrays and resetting the process totals.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this._toProcess = 0;\r\n\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ProcessQueue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/ProcessQueue.js?")},"./node_modules/phaser/src/structs/RTree.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Vladimir Agafonkin\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar quickselect = __webpack_require__(/*! ../utils/array/QuickSelect */ \"./node_modules/phaser/src/utils/array/QuickSelect.js\");\r\n\r\n/**\r\n * @classdesc\r\n * RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles.\r\n * It's based on an optimized R-tree data structure with bulk insertion support.\r\n *\r\n * Spatial index is a special data structure for points and rectangles that allows you to perform queries like\r\n * \"all items within this bounding box\" very efficiently (e.g. hundreds of times faster than looping over all items).\r\n *\r\n * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`.\r\n * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations.\r\n * \r\n * rbush is forked from https://github.com/mourner/rbush by Vladimir Agafonkin\r\n *\r\n * @class RTree\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\n\r\nfunction rbush (maxEntries)\r\n{\r\n var format = [ '.left', '.top', '.right', '.bottom' ];\r\n\r\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\r\n\r\n // max entries in a node is 9 by default; min node fill is 40% for best performance\r\n this._maxEntries = Math.max(4, maxEntries || 9);\r\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\r\n\r\n this.clear();\r\n}\r\n\r\nrbush.prototype = {\r\n\r\n all: function ()\r\n {\r\n return this._all(this.data, []);\r\n },\r\n\r\n search: function (bbox)\r\n {\r\n var node = this.data,\r\n result = [],\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return result;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf) result.push(child);\r\n else if (contains(bbox, childBBox)) this._all(child, result);\r\n else nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return result;\r\n },\r\n\r\n collides: function (bbox)\r\n {\r\n var node = this.data,\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return false;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf || contains(bbox, childBBox)) return true;\r\n nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return false;\r\n },\r\n\r\n load: function (data)\r\n {\r\n if (!(data && data.length)) return this;\r\n\r\n if (data.length < this._minEntries) {\r\n for (var i = 0, len = data.length; i < len; i++) {\r\n this.insert(data[i]);\r\n }\r\n return this;\r\n }\r\n\r\n // recursively build the tree with the given data from scratch using OMT algorithm\r\n var node = this._build(data.slice(), 0, data.length - 1, 0);\r\n\r\n if (!this.data.children.length) {\r\n // save as is if tree is empty\r\n this.data = node;\r\n\r\n } else if (this.data.height === node.height) {\r\n // split root if trees have the same height\r\n this._splitRoot(this.data, node);\r\n\r\n } else {\r\n if (this.data.height < node.height) {\r\n // swap trees if inserted one is bigger\r\n var tmpNode = this.data;\r\n this.data = node;\r\n node = tmpNode;\r\n }\r\n\r\n // insert the small tree into the large tree at appropriate level\r\n this._insert(node, this.data.height - node.height - 1, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n insert: function (item)\r\n {\r\n if (item) this._insert(item, this.data.height - 1);\r\n return this;\r\n },\r\n\r\n clear: function ()\r\n {\r\n this.data = createNode([]);\r\n return this;\r\n },\r\n\r\n remove: function (item, equalsFn)\r\n {\r\n if (!item) return this;\r\n\r\n var node = this.data,\r\n bbox = this.toBBox(item),\r\n path = [],\r\n indexes = [],\r\n i, parent, index, goingUp;\r\n\r\n // depth-first iterative tree traversal\r\n while (node || path.length) {\r\n\r\n if (!node) { // go up\r\n node = path.pop();\r\n parent = path[path.length - 1];\r\n i = indexes.pop();\r\n goingUp = true;\r\n }\r\n\r\n if (node.leaf) { // check current node\r\n index = findItem(item, node.children, equalsFn);\r\n\r\n if (index !== -1) {\r\n // item found, remove the item and condense tree upwards\r\n node.children.splice(index, 1);\r\n path.push(node);\r\n this._condense(path);\r\n return this;\r\n }\r\n }\r\n\r\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\r\n path.push(node);\r\n indexes.push(i);\r\n i = 0;\r\n parent = node;\r\n node = node.children[0];\r\n\r\n } else if (parent) { // go right\r\n i++;\r\n node = parent.children[i];\r\n goingUp = false;\r\n\r\n } else node = null; // nothing found\r\n }\r\n\r\n return this;\r\n },\r\n\r\n toBBox: function (item) { return item; },\r\n\r\n compareMinX: compareNodeMinX,\r\n compareMinY: compareNodeMinY,\r\n\r\n toJSON: function () { return this.data; },\r\n\r\n fromJSON: function (data)\r\n {\r\n this.data = data;\r\n return this;\r\n },\r\n\r\n _all: function (node, result)\r\n {\r\n var nodesToSearch = [];\r\n while (node) {\r\n if (node.leaf) result.push.apply(result, node.children);\r\n else nodesToSearch.push.apply(nodesToSearch, node.children);\r\n\r\n node = nodesToSearch.pop();\r\n }\r\n return result;\r\n },\r\n\r\n _build: function (items, left, right, height)\r\n {\r\n var N = right - left + 1,\r\n M = this._maxEntries,\r\n node;\r\n\r\n if (N <= M) {\r\n // reached leaf level; return leaf\r\n node = createNode(items.slice(left, right + 1));\r\n calcBBox(node, this.toBBox);\r\n return node;\r\n }\r\n\r\n if (!height) {\r\n // target height of the bulk-loaded tree\r\n height = Math.ceil(Math.log(N) / Math.log(M));\r\n\r\n // target number of root entries to maximize storage utilization\r\n M = Math.ceil(N / Math.pow(M, height - 1));\r\n }\r\n\r\n node = createNode([]);\r\n node.leaf = false;\r\n node.height = height;\r\n\r\n // split the items into M mostly square tiles\r\n\r\n var N2 = Math.ceil(N / M),\r\n N1 = N2 * Math.ceil(Math.sqrt(M)),\r\n i, j, right2, right3;\r\n\r\n multiSelect(items, left, right, N1, this.compareMinX);\r\n\r\n for (i = left; i <= right; i += N1) {\r\n\r\n right2 = Math.min(i + N1 - 1, right);\r\n\r\n multiSelect(items, i, right2, N2, this.compareMinY);\r\n\r\n for (j = i; j <= right2; j += N2) {\r\n\r\n right3 = Math.min(j + N2 - 1, right2);\r\n\r\n // pack each entry recursively\r\n node.children.push(this._build(items, j, right3, height - 1));\r\n }\r\n }\r\n\r\n calcBBox(node, this.toBBox);\r\n\r\n return node;\r\n },\r\n\r\n _chooseSubtree: function (bbox, node, level, path)\r\n {\r\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\r\n\r\n while (true) {\r\n path.push(node);\r\n\r\n if (node.leaf || path.length - 1 === level) break;\r\n\r\n minArea = minEnlargement = Infinity;\r\n\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n child = node.children[i];\r\n area = bboxArea(child);\r\n enlargement = enlargedArea(bbox, child) - area;\r\n\r\n // choose entry with the least area enlargement\r\n if (enlargement < minEnlargement) {\r\n minEnlargement = enlargement;\r\n minArea = area < minArea ? area : minArea;\r\n targetNode = child;\r\n\r\n } else if (enlargement === minEnlargement) {\r\n // otherwise choose one with the smallest area\r\n if (area < minArea) {\r\n minArea = area;\r\n targetNode = child;\r\n }\r\n }\r\n }\r\n\r\n node = targetNode || node.children[0];\r\n }\r\n\r\n return node;\r\n },\r\n\r\n _insert: function (item, level, isNode)\r\n {\r\n var toBBox = this.toBBox,\r\n bbox = isNode ? item : toBBox(item),\r\n insertPath = [];\r\n\r\n // find the best node for accommodating the item, saving all nodes along the path too\r\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\r\n\r\n // put the item into the node\r\n node.children.push(item);\r\n extend(node, bbox);\r\n\r\n // split on node overflow; propagate upwards if necessary\r\n while (level >= 0) {\r\n if (insertPath[level].children.length > this._maxEntries) {\r\n this._split(insertPath, level);\r\n level--;\r\n } else break;\r\n }\r\n\r\n // adjust bboxes along the insertion path\r\n this._adjustParentBBoxes(bbox, insertPath, level);\r\n },\r\n\r\n // split overflowed node into two\r\n _split: function (insertPath, level)\r\n {\r\n var node = insertPath[level],\r\n M = node.children.length,\r\n m = this._minEntries;\r\n\r\n this._chooseSplitAxis(node, m, M);\r\n\r\n var splitIndex = this._chooseSplitIndex(node, m, M);\r\n\r\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\r\n newNode.height = node.height;\r\n newNode.leaf = node.leaf;\r\n\r\n calcBBox(node, this.toBBox);\r\n calcBBox(newNode, this.toBBox);\r\n\r\n if (level) insertPath[level - 1].children.push(newNode);\r\n else this._splitRoot(node, newNode);\r\n },\r\n\r\n _splitRoot: function (node, newNode)\r\n {\r\n // split root node\r\n this.data = createNode([node, newNode]);\r\n this.data.height = node.height + 1;\r\n this.data.leaf = false;\r\n calcBBox(this.data, this.toBBox);\r\n },\r\n\r\n _chooseSplitIndex: function (node, m, M)\r\n {\r\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\r\n\r\n minOverlap = minArea = Infinity;\r\n\r\n for (i = m; i <= M - m; i++) {\r\n bbox1 = distBBox(node, 0, i, this.toBBox);\r\n bbox2 = distBBox(node, i, M, this.toBBox);\r\n\r\n overlap = intersectionArea(bbox1, bbox2);\r\n area = bboxArea(bbox1) + bboxArea(bbox2);\r\n\r\n // choose distribution with minimum overlap\r\n if (overlap < minOverlap) {\r\n minOverlap = overlap;\r\n index = i;\r\n\r\n minArea = area < minArea ? area : minArea;\r\n\r\n } else if (overlap === minOverlap) {\r\n // otherwise choose distribution with minimum area\r\n if (area < minArea) {\r\n minArea = area;\r\n index = i;\r\n }\r\n }\r\n }\r\n\r\n return index;\r\n },\r\n\r\n // sorts node children by the best axis for split\r\n _chooseSplitAxis: function (node, m, M)\r\n {\r\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\r\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\r\n xMargin = this._allDistMargin(node, m, M, compareMinX),\r\n yMargin = this._allDistMargin(node, m, M, compareMinY);\r\n\r\n // if total distributions margin value is minimal for x, sort by minX,\r\n // otherwise it's already sorted by minY\r\n if (xMargin < yMargin) node.children.sort(compareMinX);\r\n },\r\n\r\n // total margin of all possible split distributions where each node is at least m full\r\n _allDistMargin: function (node, m, M, compare)\r\n {\r\n node.children.sort(compare);\r\n\r\n var toBBox = this.toBBox,\r\n leftBBox = distBBox(node, 0, m, toBBox),\r\n rightBBox = distBBox(node, M - m, M, toBBox),\r\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\r\n i, child;\r\n\r\n for (i = m; i < M - m; i++) {\r\n child = node.children[i];\r\n extend(leftBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(leftBBox);\r\n }\r\n\r\n for (i = M - m - 1; i >= m; i--) {\r\n child = node.children[i];\r\n extend(rightBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(rightBBox);\r\n }\r\n\r\n return margin;\r\n },\r\n\r\n _adjustParentBBoxes: function (bbox, path, level)\r\n {\r\n // adjust bboxes along the given tree path\r\n for (var i = level; i >= 0; i--) {\r\n extend(path[i], bbox);\r\n }\r\n },\r\n\r\n _condense: function (path)\r\n {\r\n // go through the path, removing empty nodes and updating bboxes\r\n for (var i = path.length - 1, siblings; i >= 0; i--) {\r\n if (path[i].children.length === 0) {\r\n if (i > 0) {\r\n siblings = path[i - 1].children;\r\n siblings.splice(siblings.indexOf(path[i]), 1);\r\n\r\n } else this.clear();\r\n\r\n } else calcBBox(path[i], this.toBBox);\r\n }\r\n },\r\n\r\n compareMinX: function (a, b)\r\n {\r\n return a.left - b.left;\r\n },\r\n\r\n compareMinY: function (a, b)\r\n {\r\n return a.top - b.top;\r\n },\r\n\r\n toBBox: function (a)\r\n {\r\n return {\r\n minX: a.left,\r\n minY: a.top,\r\n maxX: a.right,\r\n maxY: a.bottom\r\n };\r\n }\r\n};\r\n\r\nfunction findItem (item, items, equalsFn)\r\n{\r\n if (!equalsFn) return items.indexOf(item);\r\n\r\n for (var i = 0; i < items.length; i++) {\r\n if (equalsFn(item, items[i])) return i;\r\n }\r\n return -1;\r\n}\r\n\r\n// calculate node's bbox from bboxes of its children\r\nfunction calcBBox (node, toBBox)\r\n{\r\n distBBox(node, 0, node.children.length, toBBox, node);\r\n}\r\n\r\n// min bounding rectangle of node children from k to p-1\r\nfunction distBBox (node, k, p, toBBox, destNode)\r\n{\r\n if (!destNode) destNode = createNode(null);\r\n destNode.minX = Infinity;\r\n destNode.minY = Infinity;\r\n destNode.maxX = -Infinity;\r\n destNode.maxY = -Infinity;\r\n\r\n for (var i = k, child; i < p; i++) {\r\n child = node.children[i];\r\n extend(destNode, node.leaf ? toBBox(child) : child);\r\n }\r\n\r\n return destNode;\r\n}\r\n\r\nfunction extend (a, b)\r\n{\r\n a.minX = Math.min(a.minX, b.minX);\r\n a.minY = Math.min(a.minY, b.minY);\r\n a.maxX = Math.max(a.maxX, b.maxX);\r\n a.maxY = Math.max(a.maxY, b.maxY);\r\n return a;\r\n}\r\n\r\nfunction compareNodeMinX (a, b) { return a.minX - b.minX; }\r\nfunction compareNodeMinY (a, b) { return a.minY - b.minY; }\r\n\r\nfunction bboxArea (a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\r\nfunction bboxMargin (a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\r\n\r\nfunction enlargedArea (a, b)\r\n{\r\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\r\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\r\n}\r\n\r\nfunction intersectionArea (a, b)\r\n{\r\n var minX = Math.max(a.minX, b.minX),\r\n minY = Math.max(a.minY, b.minY),\r\n maxX = Math.min(a.maxX, b.maxX),\r\n maxY = Math.min(a.maxY, b.maxY);\r\n\r\n return Math.max(0, maxX - minX) *\r\n Math.max(0, maxY - minY);\r\n}\r\n\r\nfunction contains (a, b)\r\n{\r\n return a.minX <= b.minX &&\r\n a.minY <= b.minY &&\r\n b.maxX <= a.maxX &&\r\n b.maxY <= a.maxY;\r\n}\r\n\r\nfunction intersects (a, b)\r\n{\r\n return b.minX <= a.maxX &&\r\n b.minY <= a.maxY &&\r\n b.maxX >= a.minX &&\r\n b.maxY >= a.minY;\r\n}\r\n\r\nfunction createNode (children)\r\n{\r\n return {\r\n children: children,\r\n height: 1,\r\n leaf: true,\r\n minX: Infinity,\r\n minY: Infinity,\r\n maxX: -Infinity,\r\n maxY: -Infinity\r\n };\r\n}\r\n\r\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\r\n// combines selection algorithm with binary divide & conquer approach\r\n\r\nfunction multiSelect (arr, left, right, n, compare)\r\n{\r\n var stack = [left, right],\r\n mid;\r\n\r\n while (stack.length)\r\n {\r\n right = stack.pop();\r\n left = stack.pop();\r\n\r\n if (right - left <= n) continue;\r\n\r\n mid = left + Math.ceil((right - left) / n / 2) * n;\r\n quickselect(arr, mid, left, right, compare);\r\n\r\n stack.push(left, mid, mid, right);\r\n }\r\n}\r\n\r\nmodule.exports = rbush;\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/RTree.js?")},"./node_modules/phaser/src/structs/Set.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachSetCallback\r\n *\r\n * @param {E} entry - The Set entry.\r\n * @param {number} index - The index of the entry within the Set.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Set is a collection of unique elements.\r\n *\r\n * @class Set\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [elements]\r\n *\r\n * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set.\r\n */\r\nvar Set = new Class({\r\n\r\n initialize:\r\n\r\n function Set (elements)\r\n {\r\n /**\r\n * The entries of this Set. Stored internally as an array.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.Set#entries\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.entries = [];\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect.\r\n *\r\n * @method Phaser.Structs.Set#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to insert into this Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n set: function (value)\r\n {\r\n if (this.entries.indexOf(value) === -1)\r\n {\r\n this.entries.push(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value.\r\n * If no elements of this Set satisfy the condition then this method will return `null`.\r\n *\r\n * @method Phaser.Structs.Set#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value,$return]\r\n *\r\n * @param {string} property - The property name to check on the elements of this Set.\r\n * @param {*} value - The value to check for.\r\n *\r\n * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition.\r\n */\r\n get: function (property, value)\r\n {\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n if (entry[property] === value)\r\n {\r\n return entry;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array containing all the values in this Set.\r\n *\r\n * @method Phaser.Structs.Set#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array containing all the values in this Set.\r\n */\r\n getArray: function ()\r\n {\r\n return this.entries.slice(0);\r\n },\r\n\r\n /**\r\n * Removes the given value from this Set if this Set contains that value.\r\n *\r\n * @method Phaser.Structs.Set#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to remove from the Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n delete: function (value)\r\n {\r\n var index = this.entries.indexOf(value);\r\n\r\n if (index > -1)\r\n {\r\n this.entries.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Set to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Set#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.group('Set');\r\n\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n console.log(entry);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`.\r\n *\r\n * @method Phaser.Structs.Set#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n each: function (callback, callbackScope)\r\n {\r\n var i;\r\n var temp = this.entries.slice();\r\n var len = temp.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * For when you absolutely know this Set won't be modified during the iteration.\r\n *\r\n * @method Phaser.Structs.Set#iterate\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterate: function (callback, callbackScope)\r\n {\r\n var i;\r\n var len = this.entries.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Goes through each entry in this Set and invokes the given function on them, passing in the arguments.\r\n *\r\n * @method Phaser.Structs.Set#iterateLocal\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {string} callbackKey - The key of the function to be invoked on each Set entry.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterateLocal: function (callbackKey)\r\n {\r\n var i;\r\n var args = [];\r\n\r\n for (i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n var len = this.entries.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n entry[callbackKey].apply(entry, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears this Set so that it no longer contains any values.\r\n *\r\n * @method Phaser.Structs.Set#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n clear: function ()\r\n {\r\n this.entries.length = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if this Set contains the given value, otherwise returns `false`.\r\n *\r\n * @method Phaser.Structs.Set#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {*} value - The value to check for in this Set.\r\n *\r\n * @return {boolean} `true` if the given value was found in this Set, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n return (this.entries.indexOf(value) > -1);\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument.\r\n *\r\n * @method Phaser.Structs.Set#union\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the union with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument.\r\n */\r\n union: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n set.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set that contains only the values which are in this Set and that are also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#intersect\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to intersect this set with.\r\n *\r\n * @return {Phaser.Structs.Set} The result of the intersection, as a new Set.\r\n */\r\n intersect: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all the values in this Set which are *not* also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#difference\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the difference with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method.\r\n */\r\n difference: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (!set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * The size of this Set. This is the number of entries within it.\r\n * Changing the size will truncate the Set if the given value is smaller than the current size.\r\n * Increasing the size larger than the current size has no effect.\r\n *\r\n * @name Phaser.Structs.Set#size\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n size: {\r\n\r\n get: function ()\r\n {\r\n return this.entries.length;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value < this.entries.length)\r\n {\r\n return this.entries.length = value;\r\n }\r\n else\r\n {\r\n return this.entries.length;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Set;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Set.js?")},"./node_modules/phaser/src/structs/Size.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Size component allows you to set `width` and `height` properties and define the relationship between them.\r\n * \r\n * The component can automatically maintain the aspect ratios between the two values, and clamp them\r\n * to a defined min-max range. You can also control the dominant axis. When dimensions are given to the Size component\r\n * that would cause it to exceed its min-max range, the dimensions are adjusted based on the dominant axis.\r\n *\r\n * @class Size\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The width of the Size component.\r\n * @param {number} [height=width] - The height of the Size component. If not given, it will use the `width`.\r\n * @param {integer} [aspectMode=0] - The aspect mode of the Size component. Defaults to 0, no mode.\r\n * @param {any} [parent=null] - The parent of this Size component. Can be any object with public `width` and `height` properties. Dimensions are clamped to keep them within the parent bounds where possible.\r\n */\r\nvar Size = new Class({\r\n\r\n initialize:\r\n\r\n function Size (width, height, aspectMode, parent)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (aspectMode === undefined) { aspectMode = 0; }\r\n if (parent === undefined) { parent = null; }\r\n\r\n /**\r\n * Internal width value.\r\n *\r\n * @name Phaser.Structs.Size#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * Internal height value.\r\n *\r\n * @name Phaser.Structs.Size#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * Internal parent reference.\r\n *\r\n * @name Phaser.Structs.Size#_parent\r\n * @type {any}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._parent = parent;\r\n\r\n /**\r\n * The aspect mode this Size component will use when calculating its dimensions.\r\n * This property is read-only. To change it use the `setAspectMode` method.\r\n *\r\n * @name Phaser.Structs.Size#aspectMode\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectMode = aspectMode;\r\n\r\n /**\r\n * The proportional relationship between the width and height.\r\n * \r\n * This property is read-only and is updated automatically when either the `width` or `height` properties are changed,\r\n * depending on the aspect mode.\r\n *\r\n * @name Phaser.Structs.Size#aspectRatio\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectRatio = (height === 0) ? 1 : width / height;\r\n\r\n /**\r\n * The minimum allowed width.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minWidth = 0;\r\n\r\n /**\r\n * The minimum allowed height.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minHeight = 0;\r\n\r\n /**\r\n * The maximum allowed width.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxWidth = Number.MAX_VALUE;\r\n\r\n /**\r\n * The maximum allowed height.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxHeight = Number.MAX_VALUE;\r\n\r\n /**\r\n * A Vector2 containing the horizontal and vertical snap values, which the width and height are snapped to during resizing.\r\n * \r\n * By default this is disabled.\r\n * \r\n * This property is read-only. To change it see the `setSnap` method.\r\n *\r\n * @name Phaser.Structs.Size#snapTo\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.snapTo = new Vector2();\r\n },\r\n\r\n /**\r\n * Sets the aspect mode of this Size component.\r\n * \r\n * The aspect mode controls what happens when you modify the `width` or `height` properties, or call `setSize`.\r\n * \r\n * It can be a number from 0 to 4, or a Size constant:\r\n * \r\n * 0. NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * 1. WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.\r\n * 2. HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.\r\n * 3. FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * 4. ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setAspectMode\r\n * @since 3.16.0\r\n *\r\n * @param {integer} [value=0] - The aspect mode value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectMode: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.aspectMode = value;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * By setting a Snap To value when this Size component is modified its dimensions will automatically\r\n * by snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,\r\n * and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)\r\n * \r\n * Note that snapping takes place before adjustments by the parent, or the min / max settings. If these\r\n * values are not multiples of the given snap values, then this can result in un-snapped dimensions.\r\n * \r\n * Call this method with no arguments to reset the snap values.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setSnap\r\n * @since 3.16.0\r\n *\r\n * @param {number} [snapWidth=0] - The amount to snap the width to. If you don't want to snap the width, pass a value of zero.\r\n * @param {number} [snapHeight=snapWidth] - The amount to snap the height to. If not provided it will use the `snapWidth` value. If you don't want to snap the height, pass a value of zero.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSnap: function (snapWidth, snapHeight)\r\n {\r\n if (snapWidth === undefined) { snapWidth = 0; }\r\n if (snapHeight === undefined) { snapHeight = snapWidth; }\r\n\r\n this.snapTo.set(snapWidth, snapHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets, or clears, the parent of this Size component.\r\n * \r\n * To clear the parent call this method with no arguments.\r\n * \r\n * The parent influences the maximum extents to which this Size compoent can expand,\r\n * based on the aspect mode:\r\n * \r\n * NONE - The parent clamps both the width and height.\r\n * WIDTH_CONTROLS_HEIGHT - The parent clamps just the width.\r\n * HEIGHT_CONTROLS_WIDTH - The parent clamps just the height.\r\n * FIT - The parent clamps whichever axis is required to ensure the size fits within it.\r\n * ENVELOP - The parent is used to ensure the size fully envelops the parent.\r\n * \r\n * Calling this method automatically calls `setSize`.\r\n *\r\n * @method Phaser.Structs.Size#setParent\r\n * @since 3.16.0\r\n *\r\n * @param {any} [parent] - Sets the parent of this Size component. Don't provide a value to clear an existing parent.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setParent: function (parent)\r\n {\r\n this._parent = parent;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the minimum width and height values this Size component will allow.\r\n * \r\n * The minimum values can never be below zero, or greater than the maximum values.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMin\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The minimum allowed width of the Size component.\r\n * @param {number} [height=width] - The minimum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMin: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.minWidth = Clamp(width, 0, this.maxWidth);\r\n this.minHeight = Clamp(height, 0, this.maxHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the maximum width and height values this Size component will allow.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the maximums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMax\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=Number.MAX_VALUE] - The maximum allowed width of the Size component.\r\n * @param {number} [height=width] - The maximum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMax: function (width, height)\r\n {\r\n if (width === undefined) { width = Number.MAX_VALUE; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.maxWidth = Clamp(width, this.minWidth, Number.MAX_VALUE);\r\n this.maxHeight = Clamp(height, this.minHeight, Number.MAX_VALUE);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets the width and height of this Size component based on the aspect mode.\r\n * \r\n * If the aspect mode is 'none' then calling this method will change the aspect ratio, otherwise the current\r\n * aspect ratio is honored across all other modes.\r\n * \r\n * If snapTo values have been set then the given width and height are snapped first, prior to any further\r\n * adjustment via min/max values, or a parent.\r\n * \r\n * If minimum and/or maximum dimensions have been specified, the values given to this method will be clamped into\r\n * that range prior to adjustment, but may still exceed them depending on the aspect mode.\r\n * \r\n * If this Size component has a parent set, and the aspect mode is `fit` or `envelop`, then the given sizes will\r\n * be clamped to the range specified by the parent.\r\n *\r\n * @method Phaser.Structs.Size#setSize\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n \r\n switch (this.aspectMode)\r\n {\r\n case Size.NONE:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n break;\r\n\r\n case Size.WIDTH_CONTROLS_HEIGHT:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(this._width * (1 / this.aspectRatio), false);\r\n break;\r\n\r\n case Size.HEIGHT_CONTROLS_WIDTH:\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this._width = this.getNewWidth(this._height * this.aspectRatio, false);\r\n break;\r\n\r\n case Size.FIT:\r\n this.constrain(width, height, true);\r\n break;\r\n\r\n case Size.ENVELOP:\r\n this.constrain(width, height, false);\r\n break;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new aspect ratio, overriding what was there previously.\r\n * \r\n * It then calls `setSize` immediately using the current dimensions.\r\n *\r\n * @method Phaser.Structs.Size#setAspectRatio\r\n * @since 3.16.0\r\n *\r\n * @param {number} ratio - The new aspect ratio.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectRatio: function (ratio)\r\n {\r\n this.aspectRatio = ratio;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets a new width and height for this Size component and updates the aspect ratio based on them.\r\n * \r\n * It _doesn't_ change the `aspectMode` and still factors in size limits such as the min max and parent bounds.\r\n *\r\n * @method Phaser.Structs.Size#resize\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a new width and passes it through the min/max clamp and then checks it doesn't exceed the parent width.\r\n *\r\n * @method Phaser.Structs.Size#getNewWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified width value.\r\n */\r\n getNewWidth: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n \r\n value = Clamp(value, this.minWidth, this.maxWidth);\r\n\r\n if (checkParent && this._parent && value > this._parent.width)\r\n {\r\n value = Math.max(this.minWidth, this._parent.width);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * Takes a new height and passes it through the min/max clamp and then checks it doesn't exceed the parent height.\r\n *\r\n * @method Phaser.Structs.Size#getNewHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified height value.\r\n */\r\n getNewHeight: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n\r\n value = Clamp(value, this.minHeight, this.maxHeight);\r\n\r\n if (checkParent && this._parent && value > this._parent.height)\r\n {\r\n value = Math.max(this.minHeight, this._parent.height);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * If `fit` is true there may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * If `fit` is false the size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#constrain\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n * @param {boolean} [fit=true] - Perform a `fit` (true) constraint, or an `envelop` (false) constraint.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n constrain: function (width, height, fit)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (fit === undefined) { fit = true; }\r\n\r\n width = this.getNewWidth(width);\r\n height = this.getNewHeight(height);\r\n\r\n var snap = this.snapTo;\r\n var newRatio = (height === 0) ? 1 : width / height;\r\n\r\n if ((fit && this.aspectRatio > newRatio) || (!fit && this.aspectRatio < newRatio))\r\n {\r\n // We need to change the height to fit the width\r\n // height = width / this.aspectRatio;\r\n\r\n width = SnapFloor(width, snap.x);\r\n\r\n height = width / this.aspectRatio;\r\n\r\n if (snap.y > 0)\r\n {\r\n height = SnapFloor(height, snap.y);\r\n\r\n // Reduce the width accordingly\r\n width = height * this.aspectRatio;\r\n }\r\n }\r\n else if ((fit && this.aspectRatio < newRatio) || (!fit && this.aspectRatio > newRatio))\r\n {\r\n // We need to change the width to fit the height\r\n // width = height * this.aspectRatio;\r\n\r\n height = SnapFloor(height, snap.y);\r\n\r\n width = height * this.aspectRatio;\r\n\r\n if (snap.x > 0)\r\n {\r\n width = SnapFloor(width, snap.x);\r\n\r\n // Reduce the height accordingly\r\n height = width * (1 / this.aspectRatio);\r\n }\r\n }\r\n\r\n this._width = width;\r\n this._height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * There may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#fitTo\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n fitTo: function (width, height)\r\n {\r\n return this.constrain(width, height, true);\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted so that they fully envlop the given dimensions, while keeping the aspect ratio.\r\n * \r\n * The size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the values are clamped so that it never exceeds the parent\r\n * on the longest axis.\r\n *\r\n * @method Phaser.Structs.Size#envelop\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n envelop: function (width, height)\r\n {\r\n return this.constrain(width, height, false);\r\n },\r\n\r\n /**\r\n * Sets the width of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the width may also update the height and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setWidth: function (value)\r\n {\r\n return this.setSize(value, this._height);\r\n },\r\n\r\n /**\r\n * Sets the height of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the height may also update the width and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} height - The new height of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setHeight: function (value)\r\n {\r\n return this.setSize(this._width, value);\r\n },\r\n\r\n /**\r\n * Returns a string representation of this Size component.\r\n *\r\n * @method Phaser.Structs.Size#toString\r\n * @since 3.16.0\r\n *\r\n * @return {string} A string representation of this Size component.\r\n */\r\n toString: function ()\r\n {\r\n return '[{ Size (width=' + this._width + ' height=' + this._height + ' aspectRatio=' + this.aspectRatio + ' aspectMode=' + this.aspectMode + ') }]';\r\n },\r\n\r\n /**\r\n * Sets the values of this Size component to the `element.style.width` and `height`\r\n * properties of the given DOM Element. The properties are set as `px` values.\r\n *\r\n * @method Phaser.Structs.Size#setCSS\r\n * @since 3.17.0\r\n *\r\n * @param {HTMLElement} element - The DOM Element to set the CSS style on.\r\n */\r\n setCSS: function (element)\r\n {\r\n if (element && element.style)\r\n {\r\n element.style.width = this._width + 'px';\r\n element.style.height = this._height + 'px';\r\n }\r\n },\r\n\r\n /**\r\n * Copies the aspect mode, aspect ratio, width and height from this Size component\r\n * to the given Size component. Note that the parent, if set, is not copied across.\r\n *\r\n * @method Phaser.Structs.Size#copy\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Structs.Size} destination - The Size component to copy the values to.\r\n *\r\n * @return {Phaser.Structs.Size} The updated destination Size component.\r\n */\r\n copy: function (destination)\r\n {\r\n destination.setAspectMode(this.aspectMode);\r\n\r\n destination.aspectRatio = this.aspectRatio;\r\n\r\n return destination.setSize(this.width, this.height);\r\n },\r\n\r\n /**\r\n * Destroys this Size component.\r\n * \r\n * This clears the local properties and any parent object, if set.\r\n * \r\n * A destroyed Size component cannot be re-used.\r\n *\r\n * @method Phaser.Structs.Size#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this._parent = null;\r\n this.snapTo = null;\r\n },\r\n\r\n /**\r\n * The width of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minWidth` and `maxWidth`, if enabled.\r\n * \r\n * A width can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `height` if the aspect ratio lock is enabled.\r\n * You can also use the `setWidth` and `getWidth` methods.\r\n *\r\n * @name Phaser.Structs.Size#width\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(value, this._height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minHeight` and `maxHeight`, if enabled.\r\n * \r\n * A height can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `width` if the aspect ratio lock is enabled.\r\n * You can also use the `setHeight` and `getHeight` methods.\r\n *\r\n * @name Phaser.Structs.Size#height\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(this._width, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * \r\n * @name Phaser.Structs.Size.NONE\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.NONE = 0;\r\n\r\n/**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Structs.Size.WIDTH_CONTROLS_HEIGHT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.WIDTH_CONTROLS_HEIGHT = 1;\r\n\r\n/**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Structs.Size.HEIGHT_CONTROLS_WIDTH\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.HEIGHT_CONTROLS_WIDTH = 2;\r\n\r\n/**\r\n * The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * \r\n * @name Phaser.Structs.Size.FIT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.FIT = 3;\r\n\r\n/**\r\n * The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Structs.Size.ENVELOP\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.ENVELOP = 4;\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Size.js?")},"./node_modules/phaser/src/structs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Structs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n List: __webpack_require__(/*! ./List */ "./node_modules/phaser/src/structs/List.js"),\r\n Map: __webpack_require__(/*! ./Map */ "./node_modules/phaser/src/structs/Map.js"),\r\n ProcessQueue: __webpack_require__(/*! ./ProcessQueue */ "./node_modules/phaser/src/structs/ProcessQueue.js"),\r\n RTree: __webpack_require__(/*! ./RTree */ "./node_modules/phaser/src/structs/RTree.js"),\r\n Set: __webpack_require__(/*! ./Set */ "./node_modules/phaser/src/structs/Set.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/structs/Size.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/index.js?')},"./node_modules/phaser/src/textures/CanvasTexture.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ "./node_modules/phaser/src/display/color/Color.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar Texture = __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.\r\n *\r\n * You can use the properties of this texture to draw to the canvas element directly, using all of the standard\r\n * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.\r\n *\r\n * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to\r\n * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this\r\n * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep\r\n * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading\r\n * texture data to it. This restriction does not apply if using the Canvas Renderer.\r\n * \r\n * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify\r\n * sections of the canvas using the `add` method.\r\n * \r\n * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying\r\n * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause\r\n * graphical errors.\r\n *\r\n * @class CanvasTexture\r\n * @extends Phaser.Textures.Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {HTMLCanvasElement} source - The canvas element that is used as the base of this texture.\r\n * @param {integer} width - The width of the canvas.\r\n * @param {integer} height - The height of the canvas.\r\n */\r\nvar CanvasTexture = new Class({\r\n\r\n Extends: Texture,\r\n\r\n initialize:\r\n\r\n function CanvasTexture (manager, key, source, width, height)\r\n {\r\n Texture.call(this, manager, key, source, width, height);\r\n\r\n this.add(\'__BASE\', 0, 0, 0, width, height);\r\n\r\n /**\r\n * A reference to the Texture Source of this Canvas.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#_source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._source = this.frames[\'__BASE\'].source;\r\n\r\n /**\r\n * The source Canvas Element.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#canvas\r\n * @readonly\r\n * @type {HTMLCanvasElement}\r\n * @since 3.7.0\r\n */\r\n this.canvas = this._source.image;\r\n\r\n /**\r\n * The 2D Canvas Rendering Context.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#context\r\n * @readonly\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.7.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The width of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#width\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#height\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The context image data.\r\n * Use the `update` method to populate this when the canvas changes.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#imageData\r\n * @type {ImageData}\r\n * @since 3.13.0\r\n */\r\n this.imageData = this.context.getImageData(0, 0, width, height);\r\n\r\n /**\r\n * A Uint8ClampedArray view into the `buffer`.\r\n * Use the `update` method to populate this when the canvas changes.\r\n * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#data\r\n * @type {Uint8ClampedArray}\r\n * @since 3.13.0\r\n */\r\n this.data = null;\r\n\r\n if (this.imageData)\r\n {\r\n this.data = this.imageData.data;\r\n }\r\n\r\n /**\r\n * An Uint32Array view into the `buffer`.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#pixels\r\n * @type {Uint32Array}\r\n * @since 3.13.0\r\n */\r\n this.pixels = null;\r\n\r\n /**\r\n * An ArrayBuffer the same size as the context ImageData.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#buffer\r\n * @type {ArrayBuffer}\r\n * @since 3.13.0\r\n */\r\n this.buffer;\r\n\r\n if (this.data)\r\n {\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * This re-creates the `imageData` from the current context.\r\n * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.\r\n *\r\n * Warning: This is a very expensive operation, so use it sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#update\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n update: function ()\r\n {\r\n this.imageData = this.context.getImageData(0, 0, this.width, this.height);\r\n\r\n this.data = this.imageData.data;\r\n\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n\r\n if (this.manager.game.config.renderType === CONST.WEBGL)\r\n {\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#draw\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate to draw the source at.\r\n * @param {integer} y - The y coordinate to draw the source at.\r\n * @param {(HTMLImageElement|HTMLCanvasElement)} source - The element to draw to this canvas.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n draw: function (x, y, source)\r\n {\r\n this.context.drawImage(source, x, y);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Draws the given texture frame to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#drawFrame\r\n * @since 3.16.0\r\n * \r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {integer} [x=0] - The x coordinate to draw the source at.\r\n * @param {integer} [y=0] - The y coordinate to draw the source at.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n drawFrame: function (key, frame, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n var textureFrame = this.manager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var width = textureFrame.cutWidth;\r\n var height = textureFrame.cutHeight;\r\n var res = textureFrame.source.resolution;\r\n\r\n this.context.drawImage(\r\n textureFrame.source.image,\r\n cd.x, cd.y,\r\n width,\r\n height,\r\n x, y,\r\n width / res,\r\n height / res\r\n );\r\n\r\n return this.update();\r\n }\r\n else\r\n {\r\n return this;\r\n }\r\n },\r\n\r\n /**\r\n * Sets a pixel in the CanvasTexture to the given color and alpha values.\r\n *\r\n * This is an expensive operation to run in large quantities, so use sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setPixel\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n setPixel: function (x, y, red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n x = Math.abs(Math.floor(x));\r\n y = Math.abs(Math.floor(y));\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var imageData = this.context.getImageData(x, y, 1, 1);\r\n\r\n imageData.data[0] = red;\r\n imageData.data[1] = green;\r\n imageData.data[2] = blue;\r\n imageData.data[3] = alpha;\r\n\r\n this.context.putImageData(imageData, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the ImageData into the context of this CanvasTexture at the given coordinates.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#putData\r\n * @since 3.16.0\r\n * \r\n * @param {ImageData} imageData - The ImageData to put at the given location.\r\n * @param {integer} x - The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [dirtyX=0] - Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyY=0] - Vertical position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyWidth] - Width of the rectangle to be painted. Defaults to the width of the image data.\r\n * @param {integer} [dirtyHeight] - Height of the rectangle to be painted. Defaults to the height of the image data.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n putData: function (imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight)\r\n {\r\n if (dirtyX === undefined) { dirtyX = 0; }\r\n if (dirtyY === undefined) { dirtyY = 0; }\r\n if (dirtyWidth === undefined) { dirtyWidth = imageData.width; }\r\n if (dirtyHeight === undefined) { dirtyHeight = imageData.height; }\r\n\r\n this.context.putImageData(imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an ImageData region from this CanvasTexture from the position and size specified.\r\n * You can write this back using `CanvasTexture.putData`, or manipulate it.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getData\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param {integer} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * \r\n * @return {ImageData} The ImageData extracted from this CanvasTexture.\r\n */\r\n getData: function (x, y, width, height)\r\n {\r\n x = Clamp(Math.floor(x), 0, this.width - 1);\r\n y = Clamp(Math.floor(y), 0, this.height - 1);\r\n width = Clamp(width, 1, this.width - x);\r\n height = Clamp(height, 1, this.height - y);\r\n\r\n var imageData = this.context.getImageData(x, y, width, height);\r\n\r\n return imageData;\r\n },\r\n\r\n /**\r\n * Get the color of a specific pixel from this texture and store it in a Color object.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixel\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {Phaser.Display.Color} [out] - A Color object to store the pixel values in. If not provided a new Color object will be created.\r\n * \r\n * @return {Phaser.Display.Color} An object with the red, green, blue and alpha values set in the r, g, b and a properties.\r\n */\r\n getPixel: function (x, y, out)\r\n {\r\n if (!out)\r\n {\r\n out = new Color();\r\n }\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var data = this.data;\r\n\r\n var r = data[index + 0];\r\n var g = data[index + 1];\r\n var b = data[index + 2];\r\n var a = data[index + 3];\r\n\r\n out.setTo(r, g, b, a);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing all of the pixels in the given region.\r\n *\r\n * If the requested region extends outside the bounds of this CanvasTexture,\r\n * the region is truncated to fit.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixels\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given.\r\n * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.\r\n * \r\n * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects.\r\n */\r\n getPixels: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = width; }\r\n\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n var left = Clamp(x, 0, this.width);\r\n var right = Clamp(x + width, 0, this.width);\r\n var top = Clamp(y, 0, this.height);\r\n var bottom = Clamp(y + height, 0, this.height);\r\n\r\n var pixel = new Color();\r\n\r\n var out = [];\r\n\r\n for (var py = top; py < bottom; py++)\r\n {\r\n var row = [];\r\n\r\n for (var px = left; px < right; px++)\r\n {\r\n pixel = this.getPixel(px, py, pixel);\r\n\r\n row.push({ x: px, y: py, color: pixel.color, alpha: pixel.alphaGL });\r\n }\r\n\r\n out.push(row);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the Image Data index for the given pixel in this CanvasTexture.\r\n *\r\n * The index can be used to read directly from the `this.data` array.\r\n *\r\n * The index points to the red value in the array. The subsequent 3 indexes\r\n * point to green, blue and alpha respectively.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getIndex\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * \r\n * @return {integer} \r\n */\r\n getIndex: function (x, y)\r\n {\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n if (x < this.width && y < this.height)\r\n {\r\n return (x + y * this.width) * 4;\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n },\r\n\r\n /**\r\n * This should be called manually if you are running under WebGL.\r\n * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the\r\n * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#refresh\r\n * @since 3.7.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n refresh: function ()\r\n {\r\n this._source.update();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the Canvas Element.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getCanvas\r\n * @since 3.7.0\r\n *\r\n * @return {HTMLCanvasElement} The Canvas DOM element this texture is using.\r\n */\r\n getCanvas: function ()\r\n {\r\n return this.canvas;\r\n },\r\n\r\n /**\r\n * Gets the 2D Canvas Rendering Context.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getContext\r\n * @since 3.7.0\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context this texture is using.\r\n */\r\n getContext: function ()\r\n {\r\n return this.context;\r\n },\r\n\r\n /**\r\n * Clears the given region of this Canvas Texture, resetting it back to transparent.\r\n * If no region is given, the whole Canvas Texture is cleared.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#clear\r\n * @since 3.7.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region to clear.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region to clear.\r\n * @param {integer} [width] - The width of the region.\r\n * @param {integer} [height] - The height of the region.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n clear: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n\r\n this.context.clearRect(x, y, width, height);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Changes the size of this Canvas Texture.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The new width of the Canvas.\r\n * @param {integer} [height] - The new height of the Canvas. If not given it will use the width as the height.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n // Update the Canvas\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n // Update the Texture Source\r\n this._source.width = width;\r\n this._source.height = height;\r\n this._source.isPowerOf2 = IsSizePowerOfTwo(width, height);\r\n\r\n // Update the Frame\r\n this.frames[\'__BASE\'].setSize(width, height, 0, 0);\r\n\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n Texture.prototype.destroy.call(this);\r\n\r\n this._source = null;\r\n this.canvas = null;\r\n this.context = null;\r\n this.imageData = null;\r\n this.data = null;\r\n this.pixels = null;\r\n this.buffer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/CanvasTexture.js?')},"./node_modules/phaser/src/textures/Frame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n * \r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The width of the frame before being trimmed.\r\n * @param {integer} height - The height of the frame before being trimmed.\r\n * @param {integer} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n * \r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n \r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n \r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Frame.js?')},"./node_modules/phaser/src/textures/Texture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Frame = __webpack_require__(/*! ./Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar TextureSource = __webpack_require__(/*! ./TextureSource */ \"./node_modules/phaser/src/textures/TextureSource.js\");\r\n\r\nvar TEXTURE_MISSING_ERROR = 'Texture.frame missing: ';\r\n\r\n/**\r\n * @classdesc\r\n * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames.\r\n * The Frames represent the different areas of the Texture. For example a texture atlas\r\n * may have many Frames, one for each element within the atlas. Where-as a single image would have\r\n * just one frame, that encompasses the whole image.\r\n * \r\n * Every Texture, no matter where it comes from, always has at least 1 frame called the `__BASE` frame.\r\n * This frame represents the entirety of the source image.\r\n *\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * @class Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} source - An array of sources that are used to create the texture. Usually Images, but can also be a Canvas.\r\n * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images.\r\n * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images.\r\n */\r\nvar Texture = new Class({\r\n\r\n initialize:\r\n\r\n function Texture (manager, key, source, width, height)\r\n {\r\n if (!Array.isArray(source))\r\n {\r\n source = [ source ];\r\n }\r\n\r\n /**\r\n * A reference to the Texture Manager this Texture belongs to.\r\n *\r\n * @name Phaser.Textures.Texture#manager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique string-based key of this Texture.\r\n *\r\n * @name Phaser.Textures.Texture#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * An array of TextureSource instances.\r\n * These are unique to this Texture and contain the actual Image (or Canvas) data.\r\n *\r\n * @name Phaser.Textures.Texture#source\r\n * @type {Phaser.Textures.TextureSource[]}\r\n * @since 3.0.0\r\n */\r\n this.source = [];\r\n\r\n /**\r\n * An array of TextureSource data instances.\r\n * Used to store additional data images, such as normal maps or specular maps.\r\n *\r\n * @name Phaser.Textures.Texture#dataSource\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.dataSource = [];\r\n\r\n /**\r\n * A key-value object pair associating the unique Frame keys with the Frames objects.\r\n *\r\n * @name Phaser.Textures.Texture#frames\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.frames = {};\r\n\r\n /**\r\n * Any additional data that was set in the source JSON (if any),\r\n * or any extra data you'd like to store relating to this texture\r\n *\r\n * @name Phaser.Textures.Texture#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * The name of the first frame of the Texture.\r\n *\r\n * @name Phaser.Textures.Texture#firstFrame\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.firstFrame = '__BASE';\r\n\r\n /**\r\n * The total number of Frames in this Texture, including the `__BASE` frame.\r\n * \r\n * A Texture will always contain at least 1 frame because every Texture contains a `__BASE` frame by default,\r\n * in addition to any extra frames that have been added to it, such as when parsing a Sprite Sheet or Texture Atlas.\r\n *\r\n * @name Phaser.Textures.Texture#frameTotal\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameTotal = 0;\r\n\r\n // Load the Sources\r\n for (var i = 0; i < source.length; i++)\r\n {\r\n this.source.push(new TextureSource(this, source[i], width, height));\r\n }\r\n },\r\n\r\n /**\r\n * Adds a new Frame to this Texture.\r\n *\r\n * A Frame is a rectangular region of a TextureSource with a unique index or string-based key.\r\n * \r\n * The name given must be unique within this Texture. If it already exists, this method will return `null`.\r\n *\r\n * @method Phaser.Textures.Texture#add\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n *\r\n * @return {?Phaser.Textures.Frame} The Frame that was added to this Texture, or `null` if the given name already exists.\r\n */\r\n add: function (name, sourceIndex, x, y, width, height)\r\n {\r\n if (this.has(name))\r\n {\r\n return null;\r\n }\r\n\r\n var frame = new Frame(this, name, sourceIndex, x, y, width, height);\r\n\r\n this.frames[name] = frame;\r\n\r\n // Set the first frame of the Texture (other than __BASE)\r\n // This is used to ensure we don't spam the display with entire\r\n // atlases of sprite sheets, but instead just the first frame of them\r\n // should the dev incorrectly specify the frame index\r\n if (this.firstFrame === '__BASE')\r\n {\r\n this.firstFrame = name;\r\n }\r\n\r\n this.frameTotal++;\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Removes the given Frame from this Texture. The Frame is destroyed immediately.\r\n * \r\n * Any Game Objects using this Frame should stop using it _before_ you remove it,\r\n * as it does not happen automatically.\r\n *\r\n * @method Phaser.Textures.Texture#remove\r\n * @since 3.19.0\r\n *\r\n * @param {string} name - The key of the Frame to remove.\r\n *\r\n * @return {boolean} True if a Frame with the matching key was removed from this Texture.\r\n */\r\n remove: function (name)\r\n {\r\n if (this.has(name))\r\n {\r\n var frame = this.get(name);\r\n\r\n frame.destroy();\r\n\r\n delete this.frames[name];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Checks to see if a Frame matching the given key exists within this Texture.\r\n *\r\n * @method Phaser.Textures.Texture#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The key of the Frame to check for.\r\n *\r\n * @return {boolean} True if a Frame with the matching key exists in this Texture.\r\n */\r\n has: function (name)\r\n {\r\n return (this.frames[name]);\r\n },\r\n\r\n /**\r\n * Gets a Frame from this Texture based on either the key or the index of the Frame.\r\n *\r\n * In a Texture Atlas Frames are typically referenced by a key.\r\n * In a Sprite Sheet Frames are referenced by an index.\r\n * Passing no value for the name returns the base texture.\r\n *\r\n * @method Phaser.Textures.Texture#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} The Texture Frame.\r\n */\r\n get: function (name)\r\n {\r\n // null, undefined, empty string, zero\r\n if (!name)\r\n {\r\n name = this.firstFrame;\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n frame = this.frames[this.firstFrame];\r\n }\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Takes the given TextureSource and returns the index of it within this Texture.\r\n * If it's not in this Texture, it returns -1.\r\n * Unless this Texture has multiple TextureSources, such as with a multi-atlas, this\r\n * method will always return zero or -1.\r\n *\r\n * @method Phaser.Textures.Texture#getTextureSourceIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureSource} source - The TextureSource to check.\r\n *\r\n * @return {integer} The index of the TextureSource within this Texture, or -1 if not in this Texture.\r\n */\r\n getTextureSourceIndex: function (source)\r\n {\r\n for (var i = 0; i < this.source.length; i++)\r\n {\r\n if (this.source[i] === source)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Returns an array of all the Frames in the given TextureSource.\r\n *\r\n * @method Phaser.Textures.Texture#getFramesFromTextureSource\r\n * @since 3.0.0\r\n *\r\n * @param {integer} sourceIndex - The index of the TextureSource to get the Frames from.\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {Phaser.Textures.Frame[]} An array of Texture Frames.\r\n */\r\n getFramesFromTextureSource: function (sourceIndex, includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = [];\r\n\r\n for (var frameName in this.frames)\r\n {\r\n if (frameName === '__BASE' && !includeBase)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = this.frames[frameName];\r\n\r\n if (frame.sourceIndex === sourceIndex)\r\n {\r\n out.push(frame);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array with all of the names of the Frames in this Texture.\r\n *\r\n * Useful if you want to randomly assign a Frame to a Game Object, as you can\r\n * pick a random element from the returned array.\r\n *\r\n * @method Phaser.Textures.Texture#getFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {string[]} An array of all Frame names in this Texture.\r\n */\r\n getFrameNames: function (includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = Object.keys(this.frames);\r\n\r\n if (!includeBase)\r\n {\r\n var idx = out.indexOf('__BASE');\r\n\r\n if (idx !== -1)\r\n {\r\n out.splice(idx, 1);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the source image it uses to render with.\r\n *\r\n * This will return the actual DOM Image or Canvas element.\r\n *\r\n * @method Phaser.Textures.Texture#getSourceImage\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture)} The DOM Image, Canvas Element or Render Texture.\r\n */\r\n getSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (frame)\r\n {\r\n return frame.source.image;\r\n }\r\n else\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n return this.frames['__BASE'].source.image;\r\n }\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the data source image it uses to render with.\r\n * You can use this to get the normal map for an image for example.\r\n *\r\n * This will return the actual DOM Image.\r\n *\r\n * @method Phaser.Textures.Texture#getDataSourceImage\r\n * @since 3.7.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement)} The DOM Image or Canvas Element.\r\n */\r\n getDataSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n var idx;\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n idx = this.frames['__BASE'].sourceIndex;\r\n }\r\n else\r\n {\r\n idx = frame.sourceIndex;\r\n }\r\n\r\n return this.dataSource[idx].image;\r\n },\r\n\r\n /**\r\n * Adds a data source image to this Texture.\r\n *\r\n * An example of a data source image would be a normal map, where all of the Frames for this Texture\r\n * equally apply to the normal map.\r\n *\r\n * @method Phaser.Textures.Texture#setDataSource\r\n * @since 3.0.0\r\n *\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} data - The source image.\r\n */\r\n setDataSource: function (data)\r\n {\r\n if (!Array.isArray(data))\r\n {\r\n data = [ data ];\r\n }\r\n \r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var source = this.source[i];\r\n\r\n this.dataSource.push(new TextureSource(this, data[i], source.width, source.height));\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * The mode applies to the entire Texture, not just a specific Frame of it.\r\n *\r\n * @method Phaser.Textures.Texture#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].setFilter(filterMode);\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].setFilter(filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.Texture#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].destroy();\r\n }\r\n\r\n for (var frameName in this.frames)\r\n {\r\n var frame = this.frames[frameName];\r\n\r\n frame.destroy();\r\n }\r\n\r\n this.source = [];\r\n this.dataSource = [];\r\n this.frames = {};\r\n\r\n this.manager.removeKey(this.key);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Texture.js?")},"./node_modules/phaser/src/textures/TextureManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar CanvasTexture = __webpack_require__(/*! ./CanvasTexture */ \"./node_modules/phaser/src/textures/CanvasTexture.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GenerateTexture = __webpack_require__(/*! ../create/GenerateTexture */ \"./node_modules/phaser/src/create/GenerateTexture.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Parser = __webpack_require__(/*! ./parsers */ \"./node_modules/phaser/src/textures/parsers/index.js\");\r\nvar Texture = __webpack_require__(/*! ./Texture */ \"./node_modules/phaser/src/textures/Texture.js\");\r\n\r\n/**\r\n * @callback EachTextureCallback\r\n *\r\n * @param {Phaser.Textures.Texture} texture - Each texture in Texture Manager.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * Access it via `scene.textures`.\r\n *\r\n * @class TextureManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Texture Manager belongs to.\r\n */\r\nvar TextureManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function TextureManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Game that this TextureManager belongs to.\r\n *\r\n * @name Phaser.Textures.TextureManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The name of this manager.\r\n *\r\n * @name Phaser.Textures.TextureManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'TextureManager';\r\n\r\n /**\r\n * An object that has all of textures that Texture Manager creates.\r\n * Textures are assigned to keys so we can access to any texture that this object has directly by key value without iteration.\r\n *\r\n * @name Phaser.Textures.TextureManager#list\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The temporary canvas element to save an pixel data of an arbitrary texture in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempCanvas\r\n * @type {HTMLCanvasElement}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempCanvas = CanvasPool.create2D(this, 1, 1);\r\n\r\n /**\r\n * The context of the temporary canvas element made to save an pixel data in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempContext\r\n * @type {CanvasRenderingContext2D}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempContext = this._tempCanvas.getContext('2d');\r\n\r\n /**\r\n * An counting value used for emitting 'ready' event after all of managers in game is loaded.\r\n *\r\n * @name Phaser.Textures.TextureManager#_pending\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pending = 0;\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot Handler called by Phaser.Game when it first starts up.\r\n *\r\n * @method Phaser.Textures.TextureManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this._pending = 2;\r\n\r\n this.on(Events.LOAD, this.updatePending, this);\r\n this.on(Events.ERROR, this.updatePending, this);\r\n\r\n this.addBase64('__DEFAULT', this.game.config.defaultImage);\r\n this.addBase64('__MISSING', this.game.config.missingImage);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * After 'onload' or 'onerror' invoked twice, emit 'ready' event.\r\n *\r\n * @method Phaser.Textures.TextureManager#updatePending\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updatePending: function ()\r\n {\r\n this._pending--;\r\n\r\n if (this._pending === 0)\r\n {\r\n this.off(Events.LOAD);\r\n this.off(Events.ERROR);\r\n\r\n this.emit(Events.READY);\r\n }\r\n },\r\n\r\n /**\r\n * Checks the given texture key and throws a console.warn if the key is already in use, then returns false.\r\n * If you wish to avoid the console.warn then use `TextureManager.exists` instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#checkKey\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The texture key to check.\r\n *\r\n * @return {boolean} `true` if it's safe to use the texture key, otherwise `false`.\r\n */\r\n checkKey: function (key)\r\n {\r\n if (this.exists(key))\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Texture key already in use: ' + key);\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a Texture from the Texture Manager and destroys it. This will immediately\r\n * clear all references to it from the Texture Manager, and if it has one, destroy its\r\n * WebGLTexture. This will emit a `removetexture` event.\r\n *\r\n * Note: If you have any Game Objects still using this texture they will start throwing\r\n * errors the next time they try to render. Make sure that removing the texture is the final\r\n * step when clearing down to avoid this.\r\n *\r\n * @method Phaser.Textures.TextureManager#remove\r\n * @fires Phaser.Textures.Events#REMOVE\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the Texture to remove, or a reference to it.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n remove: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.exists(key))\r\n {\r\n key = this.get(key);\r\n }\r\n else\r\n {\r\n console.warn('No texture found matching key: ' + key);\r\n return this;\r\n }\r\n }\r\n\r\n // By this point key should be a Texture, if not, the following fails anyway\r\n if (this.list.hasOwnProperty(key.key))\r\n {\r\n key.destroy();\r\n\r\n this.emit(Events.REMOVE, key.key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a key from the Texture Manager but does not destroy the Texture that was using the key.\r\n *\r\n * @method Phaser.Textures.TextureManager#removeKey\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key to remove from the texture list.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n removeKey: function (key)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n delete this.list[key];\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Base64 encoded data.\r\n *\r\n * @method Phaser.Textures.TextureManager#addBase64\r\n * @fires Phaser.Textures.Events#ADD\r\n * @fires Phaser.Textures.Events#ERROR\r\n * @fires Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {*} data - The Base64 encoded data.\r\n * \r\n * @return {this} This Texture Manager instance.\r\n */\r\n addBase64: function (key, data)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var _this = this;\r\n\r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n _this.emit(Events.ERROR, key);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n var texture = _this.create(key, image);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n _this.emit(Events.ADD, key, texture);\r\n\r\n _this.emit(Events.LOAD, key, texture);\r\n };\r\n\r\n image.src = data;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.\r\n * \r\n * You can also provide the image type and encoder options.\r\n * \r\n * This will only work with bitmap based texture frames, such as those created from Texture Atlases.\r\n * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please\r\n * see the WebGL Snapshot function instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#getBase64\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {string} [type='image/png'] - [description]\r\n * @param {number} [encoderOptions=0.92] - [description]\r\n * \r\n * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found.\r\n */\r\n getBase64: function (key, frame, type, encoderOptions)\r\n {\r\n if (type === undefined) { type = 'image/png'; }\r\n if (encoderOptions === undefined) { encoderOptions = 0.92; }\r\n\r\n var data = '';\r\n\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame && (textureFrame.source.isRenderTexture || textureFrame.source.isGLTexture))\r\n {\r\n console.warn('Cannot getBase64 from WebGL Texture');\r\n }\r\n else if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var canvas = CanvasPool.create2D(this, cd.width, cd.height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n ctx.drawImage(\r\n textureFrame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n 0,\r\n 0,\r\n cd.width,\r\n cd.height\r\n );\r\n\r\n data = canvas.toDataURL(type, encoderOptions);\r\n\r\n CanvasPool.remove(canvas);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Image element.\r\n *\r\n * @method Phaser.Textures.TextureManager#addImage\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {HTMLImageElement|HTMLCanvasElement} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addImage: function (key, source, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.\r\n * \r\n * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.\r\n * \r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Textures.TextureManager#addGLTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {WebGLTexture} glTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addGLTexture: function (key, glTexture, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, glTexture, width, height);\r\n\r\n texture.add('__BASE', 0, 0, 0, width, height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Render Texture to the Texture Manager using the given key.\r\n * This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.\r\n *\r\n * @method Phaser.Textures.TextureManager#addRenderTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.GameObjects.RenderTexture} renderTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addRenderTexture: function (key, renderTexture)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, renderTexture);\r\n\r\n texture.add('__BASE', 0, 0, 0, renderTexture.width, renderTexture.height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given config values.\r\n * Generated textures consist of a Canvas element to which the texture data is drawn.\r\n * See the Phaser.Create function for the more direct way to create textures.\r\n *\r\n * @method Phaser.Textures.TextureManager#generate\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {object} config - The configuration object needed to generate the texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n generate: function (key, config)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, 1, 1);\r\n\r\n config.canvas = canvas;\r\n\r\n GenerateTexture(config);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using a blank Canvas element of the size given.\r\n *\r\n * Canvas elements are automatically pooled and calling this method will\r\n * extract a free canvas from the CanvasPool, or create one if none are available.\r\n *\r\n * @method Phaser.Textures.TextureManager#createCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {integer} [width=256] - The width of the Canvas element.\r\n * @param {integer} [height=256] - The height of the Canvas element.\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n createCanvas: function (key, width, height)\r\n {\r\n if (width === undefined) { width = 256; }\r\n if (height === undefined) { height = 256; }\r\n\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, width, height, CONST.CANVAS, true);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Creates a new Canvas Texture object from an existing Canvas element\r\n * and adds it to this Texture Manager, unless `skipCache` is true.\r\n *\r\n * @method Phaser.Textures.TextureManager#addCanvas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLCanvasElement} source - The Canvas element to form the base of the new Texture.\r\n * @param {boolean} [skipCache=false] - Skip adding this Texture into the Cache?\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n addCanvas: function (key, source, skipCache)\r\n {\r\n if (skipCache === undefined) { skipCache = false; }\r\n\r\n var texture = null;\r\n\r\n if (skipCache)\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n }\r\n else if (this.checkKey(key))\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n\r\n this.list[key] = texture;\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a new Texture Atlas to this Texture Manager.\r\n * It can accept either JSON Array or JSON Hash formats, as exported by Texture Packer and similar software.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlas: function (key, source, data, dataSource)\r\n {\r\n // New Texture Packer format?\r\n if (Array.isArray(data.textures) || Array.isArray(data.frames))\r\n {\r\n return this.addAtlasJSONArray(key, source, data, dataSource);\r\n }\r\n else\r\n {\r\n return this.addAtlasJSONHash(key, source, data, dataSource);\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Array within the JSON.\r\n * This is known as a JSON Array in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONArray\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(HTMLImageElement|HTMLImageElement[])} source - The source Image element/s.\r\n * @param {(object|object[])} data - The Texture Atlas data/s.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONArray: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n // Multi-Atlas?\r\n if (Array.isArray(data))\r\n {\r\n var singleAtlasFile = (data.length === 1); // multi-pack with one atlas file for all images\r\n\r\n // !! Assumes the textures are in the same order in the source array as in the json data !!\r\n for (var i = 0; i < texture.source.length; i++)\r\n {\r\n var atlasData = singleAtlasFile ? data[0] : data[i];\r\n\r\n Parser.JSONArray(texture, i, atlasData);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONArray(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Object within the JSON.\r\n * This is known as a JSON Hash in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONHash\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONHash: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n if (Array.isArray(data))\r\n {\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n Parser.JSONHash(texture, i, data[i]);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONHash(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager, where the atlas data is given\r\n * in the XML format.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasXML\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas XML data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasXML: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n \r\n Parser.AtlasXML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Unity Texture Atlas to this Texture Manager.\r\n * The data must be in the form of a Unity YAML file.\r\n *\r\n * @method Phaser.Textures.TextureManager#addUnityAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addUnityAtlas: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.UnityYAML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheet\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {Phaser.Types.Textures.SpriteSheetConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheet: function (key, source, config)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n var width = texture.source[0].width;\r\n var height = texture.source[0].height;\r\n\r\n Parser.SpriteSheet(texture, 0, 0, 0, width, height, config);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheetFromAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.Types.Textures.SpriteSheetFromAtlasConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheetFromAtlas: function (key, config)\r\n {\r\n if (!this.checkKey(key))\r\n {\r\n return null;\r\n }\r\n\r\n var atlasKey = GetValue(config, 'atlas', null);\r\n var atlasFrame = GetValue(config, 'frame', null);\r\n\r\n if (!atlasKey || !atlasFrame)\r\n {\r\n return;\r\n }\r\n\r\n var atlas = this.get(atlasKey);\r\n var sheet = atlas.get(atlasFrame);\r\n\r\n if (sheet)\r\n {\r\n var texture = this.create(key, sheet.source.image);\r\n\r\n if (sheet.trimmed)\r\n {\r\n // If trimmed we need to help the parser adjust\r\n Parser.SpriteSheetFromAtlas(texture, sheet, config);\r\n }\r\n else\r\n {\r\n Parser.SpriteSheet(texture, 0, sheet.cutX, sheet.cutY, sheet.cutWidth, sheet.cutHeight, config);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n\r\n return texture;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given source and dimensions.\r\n *\r\n * @method Phaser.Textures.TextureManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {integer} width - The width of the Texture.\r\n * @param {integer} height - The height of the Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n create: function (key, source, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = new Texture(this, key, source, width, height);\r\n\r\n this.list[key] = texture;\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Checks the given key to see if a Texture using it exists within this Texture Manager.\r\n *\r\n * @method Phaser.Textures.TextureManager#exists\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {boolean} Returns `true` if a Texture matching the given key exists in this Texture Manager.\r\n */\r\n exists: function (key)\r\n {\r\n return (this.list.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Returns a Texture from the Texture Manager that matches the given key.\r\n * If the key is undefined it will return the `__DEFAULT` Texture.\r\n * If the key is given, but not found, it will return the `__MISSING` Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was created.\r\n */\r\n get: function (key)\r\n {\r\n if (key === undefined) { key = '__DEFAULT'; }\r\n\r\n if (this.list[key])\r\n {\r\n return this.list[key];\r\n }\r\n else\r\n {\r\n return this.list['__MISSING'];\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a clone of that Frame if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#cloneFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} frame - The string or index of the Frame to be cloned.\r\n *\r\n * @return {Phaser.Textures.Frame} A Clone of the given Frame.\r\n */\r\n cloneFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame).clone();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a reference to that Frame, if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#getFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} A Texture Frame object.\r\n */\r\n getFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array with all of the keys of all Textures in this Texture Manager.\r\n * The output array will exclude the `__DEFAULT` and `__MISSING` keys.\r\n *\r\n * @method Phaser.Textures.TextureManager#getTextureKeys\r\n * @since 3.0.0\r\n *\r\n * @return {string[]} An array containing all of the Texture keys stored in this Texture Manager.\r\n */\r\n getTextureKeys: function ()\r\n {\r\n var output = [];\r\n\r\n for (var key in this.list)\r\n {\r\n if (key !== '__DEFAULT' && key !== '__MISSING')\r\n {\r\n output.push(key);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a new\r\n * Color object that has been populated with the color and alpha values of the pixel\r\n * at that location in the Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixel\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {?Phaser.Display.Color} A Color object populated with the color values of the requested pixel,\r\n * or `null` if the coordinates were out of bounds.\r\n */\r\n getPixel: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n\r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n\r\n return new Color(rgb.data[0], rgb.data[1], rgb.data[2], rgb.data[3]);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255\r\n * corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate\r\n * is out of bounds it will return null.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixelAlpha\r\n * @since 3.10.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {integer} A value between 0 and 255, or `null` if the coordinates were out of bounds.\r\n */\r\n getPixelAlpha: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n \r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n \r\n return rgb.data[3];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Sets the given Game Objects `texture` and `frame` properties so that it uses\r\n * the Texture and Frame specified in the `key` and `frame` arguments to this method.\r\n *\r\n * @method Phaser.Textures.TextureManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the texture would be set on.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object the texture was set on.\r\n */\r\n setTexture: function (gameObject, key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n gameObject.texture = this.list[key];\r\n gameObject.frame = gameObject.texture.get(frame);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Changes the key being used by a Texture to the new key provided.\r\n * \r\n * The old key is removed, allowing it to be re-used.\r\n * \r\n * Game Objects are linked to Textures by a reference to the Texture object, so\r\n * all existing references will be retained.\r\n *\r\n * @method Phaser.Textures.TextureManager#renameTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} currentKey - The current string-based key of the Texture you wish to rename.\r\n * @param {string} newKey - The new unique string-based key to use for the Texture.\r\n *\r\n * @return {boolean} `true` if the Texture key was successfully renamed, otherwise `false`.\r\n */\r\n renameTexture: function (currentKey, newKey)\r\n {\r\n var texture = this.get(currentKey);\r\n\r\n if (texture && currentKey !== newKey)\r\n {\r\n texture.key = newKey;\r\n\r\n this.list[newKey] = texture;\r\n\r\n delete this.list[currentKey];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Passes all Textures to the given callback.\r\n *\r\n * @method Phaser.Textures.TextureManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {EachTextureCallback} callback - The callback function to be sent the Textures.\r\n * @param {object} scope - The value to use as `this` when executing the callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Texture Manager and all Textures stored within it.\r\n *\r\n * @method Phaser.Textures.TextureManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var texture in this.list)\r\n {\r\n this.list[texture].destroy();\r\n }\r\n\r\n this.list = {};\r\n\r\n this.game = null;\r\n\r\n CanvasPool.remove(this._tempCanvas);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureManager.js?")},"./node_modules/phaser/src/textures/TextureSource.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Texture Source is the encapsulation of the actual source data for a Texture.\r\n * This is typically an Image Element, loaded from the file system or network, or a Canvas Element.\r\n *\r\n * A Texture can contain multiple Texture Sources, which only happens when a multi-atlas is loaded.\r\n *\r\n * @class TextureSource\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)} source - The source image data.\r\n * @param {integer} [width] - Optional width of the source image. If not given it\'s derived from the source itself.\r\n * @param {integer} [height] - Optional height of the source image. If not given it\'s derived from the source itself.\r\n */\r\nvar TextureSource = new Class({\r\n\r\n initialize:\r\n\r\n function TextureSource (texture, source, width, height)\r\n {\r\n var game = texture.manager.game;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.7.0\r\n */\r\n this.renderer = game.renderer;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The source of the image data.\r\n * This is either an Image Element, a Canvas Element, a RenderTexture or a WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#source\r\n * @type {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)}\r\n * @since 3.12.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The image data.\r\n * This is either an Image element or a Canvas element.\r\n *\r\n * @name Phaser.Textures.TextureSource#image\r\n * @type {(HTMLImageElement|HTMLCanvasElement)}\r\n * @since 3.0.0\r\n */\r\n this.image = source;\r\n\r\n /**\r\n * Currently un-used.\r\n *\r\n * @name Phaser.Textures.TextureSource#compressionAlgorithm\r\n * @type {integer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.compressionAlgorithm = null;\r\n\r\n /**\r\n * The resolution of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#resolution\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The width of the source image. If not specified in the constructor it will check\r\n * the `naturalWidth` and then `width` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width || source.naturalWidth || source.width || 0;\r\n\r\n /**\r\n * The height of the source image. If not specified in the constructor it will check\r\n * the `naturalHeight` and then `height` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height || source.naturalHeight || source.height || 0;\r\n\r\n /**\r\n * The Scale Mode the image will use when rendering.\r\n * Either Linear or Nearest.\r\n *\r\n * @name Phaser.Textures.TextureSource#scaleMode\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = ScaleModes.DEFAULT;\r\n\r\n /**\r\n * Is the source image a Canvas Element?\r\n *\r\n * @name Phaser.Textures.TextureSource#isCanvas\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isCanvas = (source instanceof HTMLCanvasElement);\r\n\r\n /**\r\n * Is the source image a Render Texture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isRenderTexture\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.isRenderTexture = (source.type === \'RenderTexture\');\r\n\r\n /**\r\n * Is the source image a WebGLTexture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isGLTexture\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.isGLTexture = (source instanceof WebGLTexture);\r\n\r\n /**\r\n * Are the source image dimensions a power of two?\r\n *\r\n * @name Phaser.Textures.TextureSource#isPowerOf2\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isPowerOf2 = IsSizePowerOfTwo(this.width, this.height);\r\n\r\n /**\r\n * The WebGL Texture of the source image. If this TextureSource is driven from a WebGLTexture\r\n * already, then this is a reference to that WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.glTexture = null;\r\n\r\n this.init(game);\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture, if required, and sets the Texture filter mode.\r\n *\r\n * @method Phaser.Textures.TextureSource#init\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n if (this.renderer)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n if (this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image);\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n \r\n this.glTexture = this.renderer.createTextureFromSource(null, this.width, this.height, this.scaleMode);\r\n }\r\n else if (this.isGLTexture)\r\n {\r\n this.glTexture = this.source;\r\n }\r\n else\r\n {\r\n this.glTexture = this.renderer.createTextureFromSource(this.image, this.width, this.height, this.scaleMode);\r\n }\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n }\r\n }\r\n\r\n if (!game.config.antialias)\r\n {\r\n this.setFilter(1);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * @method Phaser.Textures.TextureSource#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n this.renderer.setTextureFilter(this.glTexture, filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * If this TextureSource is backed by a Canvas and is running under WebGL,\r\n * it updates the WebGLTexture using the canvas data.\r\n *\r\n * @method Phaser.Textures.TextureSource#update\r\n * @since 3.7.0\r\n */\r\n update: function ()\r\n {\r\n if (this.renderer.gl && this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image, this.glTexture);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture Source and nulls the references.\r\n *\r\n * @method Phaser.Textures.TextureSource#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.glTexture)\r\n {\r\n this.renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n if (this.isCanvas)\r\n {\r\n CanvasPool.remove(this.image);\r\n }\r\n\r\n this.renderer = null;\r\n this.texture = null;\r\n this.source = null;\r\n this.image = null;\r\n this.glTexture = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureSource;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureSource.js?')},"./node_modules/phaser/src/textures/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Filter Types.\r\n *\r\n * @namespace Phaser.Textures.FilterMode\r\n * @memberof Phaser.Textures\r\n * @since 3.0.0\r\n */\r\nvar CONST = {\r\n\r\n /**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest neighbor filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n \r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/const.js?")},"./node_modules/phaser/src/textures/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Add Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is added to it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was added to the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager.\r\n */\r\nmodule.exports = 'addtexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ADD_EVENT.js?")},"./node_modules/phaser/src/textures/events/ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Error Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture it requested to load failed.\r\n * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that failed to load into the Texture Manager.\r\n */\r\nmodule.exports = 'onerror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ERROR_EVENT.js?")},"./node_modules/phaser/src/textures/events/LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture has finished loading on it.\r\n * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`.\r\n * \r\n * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event.\r\n *\r\n * @event Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was loaded by the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager.\r\n */\r\nmodule.exports = 'onload';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/LOAD_EVENT.js?")},"./node_modules/phaser/src/textures/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This internal event signifies that the Texture Manager is now ready and the Game can continue booting.\r\n * \r\n * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking\r\n * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game\r\n * instance, which tells the Game to carry on booting.\r\n *\r\n * @event Phaser.Textures.Events#READY\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/READY_EVENT.js?")},"./node_modules/phaser/src/textures/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Remove Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is removed from it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`.\r\n * \r\n * If you have any Game Objects still using the removed texture, they will start throwing\r\n * errors the next time they try to render. Be sure to clear all use of the texture in this event handler.\r\n *\r\n * @event Phaser.Textures.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was removed from the Texture Manager.\r\n */\r\nmodule.exports = 'removetexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/textures/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/textures/events/ADD_EVENT.js"),\r\n ERROR: __webpack_require__(/*! ./ERROR_EVENT */ "./node_modules/phaser/src/textures/events/ERROR_EVENT.js"),\r\n LOAD: __webpack_require__(/*! ./LOAD_EVENT */ "./node_modules/phaser/src/textures/events/LOAD_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/textures/events/READY_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/textures/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/index.js?')},"./node_modules/phaser/src/textures/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar FilterMode = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/textures/const.js");\r\n\r\n/**\r\n * @namespace Phaser.Textures\r\n */\r\n\r\n/**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Nearest Neighbor filter type.\r\n * \r\n * @name Phaser.Textures.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\nvar Textures = {\r\n\r\n CanvasTexture: __webpack_require__(/*! ./CanvasTexture */ "./node_modules/phaser/src/textures/CanvasTexture.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/textures/events/index.js"),\r\n FilterMode: FilterMode,\r\n Frame: __webpack_require__(/*! ./Frame */ "./node_modules/phaser/src/textures/Frame.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/textures/parsers/index.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js"),\r\n TextureManager: __webpack_require__(/*! ./TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js"),\r\n TextureSource: __webpack_require__(/*! ./TextureSource */ "./node_modules/phaser/src/textures/TextureSource.js")\r\n\r\n};\r\n\r\nTextures = Extend(false, Textures, FilterMode);\r\n\r\nmodule.exports = Textures;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/index.js?')},"./node_modules/phaser/src/textures/parsers/AtlasXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Parses an XML Texture Atlas object and adds all the Frames into a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.AtlasXML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {*} xml - The XML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar AtlasXML = function (texture, sourceIndex, xml)\r\n{\r\n // Malformed?\r\n if (!xml.getElementsByTagName('TextureAtlas'))\r\n {\r\n console.warn('Invalid Texture Atlas XML given');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = xml.getElementsByTagName('SubTexture');\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i].attributes;\r\n\r\n var name = frame.name.value;\r\n var x = parseInt(frame.x.value, 10);\r\n var y = parseInt(frame.y.value, 10);\r\n var width = parseInt(frame.width.value, 10);\r\n var height = parseInt(frame.height.value, 10);\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(name, sourceIndex, x, y, width, height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (frame.frameX)\r\n {\r\n var frameX = Math.abs(parseInt(frame.frameX.value, 10));\r\n var frameY = Math.abs(parseInt(frame.frameY.value, 10));\r\n var frameWidth = parseInt(frame.frameWidth.value, 10);\r\n var frameHeight = parseInt(frame.frameHeight.value, 10);\r\n\r\n newFrame.setTrim(\r\n width,\r\n height,\r\n frameX,\r\n frameY,\r\n frameWidth,\r\n frameHeight\r\n );\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = AtlasXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/AtlasXML.js?")},"./node_modules/phaser/src/textures/parsers/Canvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds a Canvas Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Canvas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Canvas = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Canvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Canvas.js?")},"./node_modules/phaser/src/textures/parsers/Image.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds an Image Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Image\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Image = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Image.js?")},"./node_modules/phaser/src/textures/parsers/JSONArray.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Array and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an array of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONArray\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONArray = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'] && !json['textures'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Array');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = (Array.isArray(json.textures)) ? json.textures[sourceIndex].frames : json.frames;\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var src = frames[i];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(src.filename, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n if (src.anchor)\r\n {\r\n newFrame.customPivot = true;\r\n newFrame.pivotX = src.anchor.x;\r\n newFrame.pivotY = src.anchor.y;\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONArray.js?")},"./node_modules/phaser/src/textures/parsers/JSONHash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an object of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONHash\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONHash = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Hash given, missing \\'frames\\' Object');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed Object\r\n var frames = json['frames'];\r\n var newFrame;\r\n\r\n for (var key in frames)\r\n {\r\n var src = frames[key];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(key, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONHash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONHash.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheet.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture.\r\n * \r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheet\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {integer} x - [description]\r\n * @param {integer} y - [description]\r\n * @param {integer} width - [description]\r\n * @param {integer} height - [description]\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - [description]\r\n * @param {number} [config.endFrame=-1] - [description]\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (frameWidth === null)\r\n {\r\n throw new Error('TextureManager.SpriteSheet: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var row = Math.floor((width - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n if (total === 0)\r\n {\r\n console.warn('SpriteSheet frame dimensions will result in zero frames.');\r\n }\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var fx = margin;\r\n var fy = margin;\r\n var ax = 0;\r\n var ay = 0;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n ax = 0;\r\n ay = 0;\r\n\r\n var w = fx + frameWidth;\r\n var h = fy + frameHeight;\r\n\r\n if (w > width)\r\n {\r\n ax = w - width;\r\n }\r\n\r\n if (h > height)\r\n {\r\n ay = h - height;\r\n }\r\n\r\n texture.add(i, sourceIndex, x + fx, y + fy, frameWidth - ax, frameHeight - ay);\r\n\r\n fx += frameWidth + spacing;\r\n\r\n if (fx + frameWidth > width)\r\n {\r\n fx = margin;\r\n fy += frameHeight + spacing;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheet.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheetFromAtlas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {Phaser.Textures.Frame} frame - The Frame that contains the Sprite Sheet.\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - Index of the start frame in the sprite sheet\r\n * @param {number} [config.endFrame=-1] - Index of the end frame in the sprite sheet. -1 mean all the rest of the frames\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheetFromAtlas = function (texture, frame, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (!frameWidth)\r\n {\r\n throw new Error('TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas frame)\r\n var source = texture.source[0];\r\n texture.add('__BASE', 0, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var x = frame.cutX;\r\n var y = frame.cutY;\r\n\r\n var cutWidth = frame.cutWidth;\r\n var cutHeight = frame.cutHeight;\r\n var sheetWidth = frame.realWidth;\r\n var sheetHeight = frame.realHeight;\r\n\r\n var row = Math.floor((sheetWidth - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((sheetHeight - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n // trim offsets\r\n\r\n var leftPad = frame.x;\r\n var leftWidth = frameWidth - leftPad;\r\n\r\n var rightWidth = frameWidth - ((sheetWidth - cutWidth) - leftPad);\r\n\r\n var topPad = frame.y;\r\n var topHeight = frameHeight - topPad;\r\n\r\n var bottomHeight = frameHeight - ((sheetHeight - cutHeight) - topPad);\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var sheetFrame;\r\n var frameX = margin;\r\n var frameY = margin;\r\n var frameIndex = 0;\r\n var sourceIndex = frame.sourceIndex;\r\n\r\n for (var sheetY = 0; sheetY < column; sheetY++)\r\n {\r\n var topRow = (sheetY === 0);\r\n var bottomRow = (sheetY === column - 1);\r\n\r\n for (var sheetX = 0; sheetX < row; sheetX++)\r\n {\r\n var leftRow = (sheetX === 0);\r\n var rightRow = (sheetX === row - 1);\r\n\r\n sheetFrame = texture.add(frameIndex, sourceIndex, x + frameX, y + frameY, frameWidth, frameHeight);\r\n\r\n if (leftRow || topRow || rightRow || bottomRow)\r\n {\r\n var destX = (leftRow) ? leftPad : 0;\r\n var destY = (topRow) ? topPad : 0;\r\n\r\n var trimWidth = 0;\r\n var trimHeight = 0;\r\n\r\n if (leftRow)\r\n {\r\n trimWidth += (frameWidth - leftWidth);\r\n }\r\n\r\n if (rightRow)\r\n {\r\n trimWidth += (frameWidth - rightWidth);\r\n }\r\n\r\n if (topRow)\r\n {\r\n trimHeight += (frameHeight - topHeight);\r\n }\r\n\r\n if (bottomRow)\r\n {\r\n trimHeight += (frameHeight - bottomHeight);\r\n }\r\n\r\n var destWidth = frameWidth - trimWidth;\r\n var destHeight = frameHeight - trimHeight;\r\n\r\n sheetFrame.cutWidth = destWidth;\r\n sheetFrame.cutHeight = destHeight;\r\n\r\n sheetFrame.setTrim(frameWidth, frameHeight, destX, destY, destWidth, destHeight);\r\n }\r\n\r\n frameX += spacing;\r\n\r\n if (leftRow)\r\n {\r\n frameX += leftWidth;\r\n }\r\n else if (rightRow)\r\n {\r\n frameX += rightWidth;\r\n }\r\n else\r\n {\r\n frameX += frameWidth;\r\n }\r\n\r\n frameIndex++;\r\n }\r\n\r\n frameX = margin;\r\n frameY += spacing;\r\n\r\n if (topRow)\r\n {\r\n frameY += topHeight;\r\n }\r\n else if (bottomRow)\r\n {\r\n frameY += bottomHeight;\r\n }\r\n else\r\n {\r\n frameY += frameHeight;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheetFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js?")},"./node_modules/phaser/src/textures/parsers/UnityYAML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar imageHeight = 0;\r\n\r\n/**\r\n * @function addFrame\r\n * @private\r\n * @since 3.0.0\r\n */\r\nvar addFrame = function (texture, sourceIndex, name, frame)\r\n{\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n\r\n var y = imageHeight - frame.y - frame.height;\r\n\r\n texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n /*\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n */\r\n};\r\n\r\n/**\r\n * Parses a Unity YAML File and creates Frames in the Texture.\r\n * For more details about Sprite Meta Data see https://docs.unity3d.com/ScriptReference/SpriteMetaData.html\r\n *\r\n * @function Phaser.Textures.Parsers.UnityYAML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} yaml - The YAML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar UnityYAML = function (texture, sourceIndex, yaml)\r\n{\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n imageHeight = source.height;\r\n\r\n var data = yaml.split('\\n');\r\n\r\n var lineRegExp = /^[ ]*(- )*(\\w+)+[: ]+(.*)/;\r\n\r\n var prevSprite = '';\r\n var currentSprite = '';\r\n var rect = { x: 0, y: 0, width: 0, height: 0 };\r\n\r\n // var pivot = { x: 0, y: 0 };\r\n // var border = { x: 0, y: 0, z: 0, w: 0 };\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var results = data[i].match(lineRegExp);\r\n\r\n if (!results)\r\n {\r\n continue;\r\n }\r\n\r\n var isList = (results[1] === '- ');\r\n var key = results[2];\r\n var value = results[3];\r\n\r\n if (isList)\r\n {\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n\r\n prevSprite = currentSprite;\r\n }\r\n\r\n rect = { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n\r\n if (key === 'name')\r\n {\r\n // Start new list\r\n currentSprite = value;\r\n continue;\r\n }\r\n\r\n switch (key)\r\n {\r\n case 'x':\r\n case 'y':\r\n case 'width':\r\n case 'height':\r\n rect[key] = parseInt(value, 10);\r\n break;\r\n\r\n // case 'pivot':\r\n // pivot = eval('var obj = ' + value);\r\n // break;\r\n\r\n // case 'border':\r\n // border = eval('var obj = ' + value);\r\n // break;\r\n }\r\n }\r\n\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = UnityYAML;\r\n\r\n/*\r\nExample data:\r\n\r\nTextureImporter:\r\n spritePivot: {x: .5, y: .5}\r\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\r\n spritePixelsToUnits: 100\r\n spriteSheet:\r\n sprites:\r\n - name: asteroids_0\r\n rect:\r\n serializedVersion: 2\r\n x: 5\r\n y: 328\r\n width: 65\r\n height: 82\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n - name: asteroids_1\r\n rect:\r\n serializedVersion: 2\r\n x: 80\r\n y: 322\r\n width: 53\r\n height: 88\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n spritePackingTag: Asteroids\r\n*/\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/UnityYAML.js?")},"./node_modules/phaser/src/textures/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AtlasXML: __webpack_require__(/*! ./AtlasXML */ "./node_modules/phaser/src/textures/parsers/AtlasXML.js"),\r\n Canvas: __webpack_require__(/*! ./Canvas */ "./node_modules/phaser/src/textures/parsers/Canvas.js"),\r\n Image: __webpack_require__(/*! ./Image */ "./node_modules/phaser/src/textures/parsers/Image.js"),\r\n JSONArray: __webpack_require__(/*! ./JSONArray */ "./node_modules/phaser/src/textures/parsers/JSONArray.js"),\r\n JSONHash: __webpack_require__(/*! ./JSONHash */ "./node_modules/phaser/src/textures/parsers/JSONHash.js"),\r\n SpriteSheet: __webpack_require__(/*! ./SpriteSheet */ "./node_modules/phaser/src/textures/parsers/SpriteSheet.js"),\r\n SpriteSheetFromAtlas: __webpack_require__(/*! ./SpriteSheetFromAtlas */ "./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js"),\r\n UnityYAML: __webpack_require__(/*! ./UnityYAML */ "./node_modules/phaser/src/textures/parsers/UnityYAML.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/Formats.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Formats\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * CSV Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.CSV\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CSV: 0,\r\n\r\n /**\r\n * Tiled JSON Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.TILED_JSON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TILED_JSON: 1,\r\n\r\n /**\r\n * 2D Array Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.ARRAY_2D\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n ARRAY_2D: 2,\r\n\r\n /**\r\n * Weltmeister (Impact.js) Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.WELTMEISTER\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WELTMEISTER: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Formats.js?")},"./node_modules/phaser/src/tilemaps/ImageCollection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image.\r\n *\r\n * Image Collections are normally created automatically when Tiled data is loaded.\r\n *\r\n * @class ImageCollection\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @param {string} name - The name of the image collection in the map data.\r\n * @param {integer} firstgid - The first image index this image collection contains.\r\n * @param {integer} [width=32] - Width of widest image (in pixels).\r\n * @param {integer} [height=32] - Height of tallest image (in pixels).\r\n * @param {integer} [margin=0] - The margin around all images in the collection (in pixels).\r\n * @param {integer} [spacing=0] - The spacing between each image in the collection (in pixels).\r\n * @param {object} [properties={}] - Custom Image Collection properties.\r\n */\r\nvar ImageCollection = new Class({\r\n\r\n initialize:\r\n\r\n function ImageCollection (name, firstgid, width, height, margin, spacing, properties)\r\n {\r\n if (width === undefined || width <= 0) { width = 32; }\r\n if (height === undefined || height <= 0) { height = 32; }\r\n if (margin === undefined) { margin = 0; }\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n /**\r\n * The name of the Image Collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The Tiled firstgid value.\r\n * This is the starting index of the first image index this Image Collection contains.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid | 0;\r\n\r\n /**\r\n * The width of the widest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageWidth = width | 0;\r\n\r\n /**\r\n * The height of the tallest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageHeight = height | 0;\r\n\r\n /**\r\n * The margin around the images in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageMarge\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageMargin = margin | 0;\r\n\r\n /**\r\n * The spacing between each image in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageSpacing = spacing | 0;\r\n\r\n /**\r\n * Image Collection-specific properties that are typically defined in the Tiled editor.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = properties || {};\r\n\r\n /**\r\n * The cached images that are a part of this collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#images\r\n * @type {array}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.images = [];\r\n\r\n /**\r\n * The total number of images in the image collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this image collection contains the given image index.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#containsImageIndex\r\n * @since 3.0.0\r\n * \r\n * @param {integer} imageIndex - The image index to search for.\r\n * \r\n * @return {boolean} True if this Image Collection contains the given index.\r\n */\r\n containsImageIndex: function (imageIndex)\r\n {\r\n return (imageIndex >= this.firstgid && imageIndex < (this.firstgid + this.total));\r\n },\r\n\r\n /**\r\n * Add an image to this Image Collection.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#addImage\r\n * @since 3.0.0\r\n * \r\n * @param {integer} gid - The gid of the image in the Image Collection.\r\n * @param {string} image - The the key of the image in the Image Collection and in the cache.\r\n *\r\n * @return {Phaser.Tilemaps.ImageCollection} This ImageCollection object.\r\n */\r\n addImage: function (gid, image)\r\n {\r\n this.images.push({ gid: gid, image: image });\r\n this.total++;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImageCollection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ImageCollection.js?')},"./node_modules/phaser/src/tilemaps/ParseToTilemap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Parse = __webpack_require__(/*! ./parsers/Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js");\r\nvar Tilemap = __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js");\r\n\r\n/**\r\n * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When\r\n * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from\r\n * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For\r\n * an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @function Phaser.Tilemaps.ParseToTilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels.\r\n * @param {integer} [width=10] - The width of the map in tiles.\r\n * @param {integer} [height=10] - The height of the map in tiles.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nvar ParseToTilemap = function (scene, key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n if (tileWidth === undefined) { tileWidth = 32; }\r\n if (tileHeight === undefined) { tileHeight = 32; }\r\n if (width === undefined) { width = 10; }\r\n if (height === undefined) { height = 10; }\r\n if (insertNull === undefined) { insertNull = false; }\r\n\r\n var mapData = null;\r\n\r\n if (Array.isArray(data))\r\n {\r\n var name = key !== undefined ? key : \'map\';\r\n mapData = Parse(name, Formats.ARRAY_2D, data, tileWidth, tileHeight, insertNull);\r\n }\r\n else if (key !== undefined)\r\n {\r\n var tilemapData = scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData)\r\n {\r\n console.warn(\'No map data found for key \' + key);\r\n }\r\n else\r\n {\r\n mapData = Parse(key, tilemapData.format, tilemapData.data, tileWidth, tileHeight, insertNull);\r\n }\r\n }\r\n\r\n if (mapData === null)\r\n {\r\n mapData = new MapData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n }\r\n\r\n return new Tilemap(scene, mapData);\r\n};\r\n\r\nmodule.exports = ParseToTilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ParseToTilemap.js?')},"./node_modules/phaser/src/tilemaps/Tile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle */ \"./node_modules/phaser/src/geom/rectangle/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data\r\n * representation, so its position information is stored without factoring in scroll, layer\r\n * scale or layer position.\r\n *\r\n * @class Tile\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The LayerData object in the Tilemap that this tile belongs to.\r\n * @param {integer} index - The unique index of this tile within the map.\r\n * @param {integer} x - The x coordinate of this tile in tile coordinates.\r\n * @param {integer} y - The y coordinate of this tile in tile coordinates.\r\n * @param {integer} width - Width of the tile in pixels.\r\n * @param {integer} height - Height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels). Tiled maps support\r\n * multiple tileset sizes within one map, but they are still placed at intervals of the base\r\n * tile width.\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels). Tiled maps\r\n * support multiple tileset sizes within one map, but they are still placed at intervals of the\r\n * base tile height.\r\n */\r\nvar Tile = new Class({\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Flip,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Tile (layer, index, x, y, width, height, baseWidth, baseHeight)\r\n {\r\n /**\r\n * The LayerData in the Tilemap data that this tile belongs to.\r\n *\r\n * @name Phaser.Tilemaps.Tile#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = layer;\r\n\r\n /**\r\n * The index of this tile within the map data corresponding to the tileset, or -1 if this\r\n * represents a blank tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The x map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#x\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseWidth = (baseWidth !== undefined) ? baseWidth : width;\r\n\r\n /**\r\n * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseHeight = (baseHeight !== undefined) ? baseHeight : height;\r\n\r\n /**\r\n * The x coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelX = 0;\r\n\r\n /**\r\n * The y coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelY = 0;\r\n\r\n this.updatePixelXY();\r\n\r\n /**\r\n * Tile specific properties. These usually come from Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tile#properties\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.properties = {};\r\n\r\n /**\r\n * The rotation angle of this tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the left side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the right side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideRight = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the top side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideUp\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideUp = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the bottom side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideDown\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideDown = false;\r\n\r\n /**\r\n * Whether the tile's left edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceLeft = false;\r\n\r\n /**\r\n * Whether the tile's right edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceRight = false;\r\n\r\n /**\r\n * Whether the tile's top edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceTop\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceTop = false;\r\n\r\n /**\r\n * Whether the tile's bottom edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceBottom\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceBottom = false;\r\n\r\n /**\r\n * Tile collision callback.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallback = null;\r\n\r\n /**\r\n * The context in which the collision callback will be called.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallbackContext\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallbackContext = this;\r\n\r\n /**\r\n * The tint to apply to this tile. Note: tint is currently a single color value instead of\r\n * the 4 corner tint component on other GameObjects.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tint\r\n * @type {number}\r\n * @default\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * An empty object where physics-engine specific information (e.g. bodies) may be stored.\r\n *\r\n * @name Phaser.Tilemaps.Tile#physics\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.physics = {};\r\n },\r\n\r\n /**\r\n * Check if the given x and y world coordinates are within this Tile. This does not factor in\r\n * camera scroll, layer scale or layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#containsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to test.\r\n * @param {number} y - The y coordinate to test.\r\n *\r\n * @return {boolean} True if the coordinates are within this Tile, otherwise false.\r\n */\r\n containsPoint: function (x, y)\r\n {\r\n return !(x < this.pixelX || y < this.pixelY || x > this.right || y > this.bottom);\r\n },\r\n\r\n /**\r\n * Copies the tile data & properties from the given tile to this tile. This copies everything\r\n * except for position and interesting faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The tile to copy from.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n copy: function (tile)\r\n {\r\n this.index = tile.index;\r\n this.alpha = tile.alpha;\r\n this.properties = tile.properties;\r\n this.visible = tile.visible;\r\n this.setFlip(tile.flipX, tile.flipY);\r\n this.tint = tile.tint;\r\n this.rotation = tile.rotation;\r\n this.collideUp = tile.collideUp;\r\n this.collideDown = tile.collideDown;\r\n this.collideLeft = tile.collideLeft;\r\n this.collideRight = tile.collideRight;\r\n this.collisionCallback = tile.collisionCallback;\r\n this.collisionCallbackContext = tile.collisionCallbackContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The collision group for this Tile, defined within the Tileset. This returns a reference to\r\n * the collision group stored within the Tileset, so any modification of the returned object\r\n * will impact all tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getCollisionGroup: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileCollisionGroup(this.index) : null;\r\n },\r\n\r\n /**\r\n * The tile data for this Tile, defined within the Tileset. This typically contains Tiled\r\n * collision data, tile animations and terrain information. This returns a reference to the tile\r\n * data stored within the Tileset, so any modification of the returned object will impact all\r\n * tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTileData\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getTileData: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileData(this.index) : null;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the left side of the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getLeft: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? tilemapLayer.tileToWorldX(this.x, camera) : this.x * this.baseWidth;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the right side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getRight: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? this.getLeft(camera) + this.width * tilemapLayer.scaleX : this.getLeft(camera) + this.width;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the top side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getTop: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile in grid\r\n // units is the bottom left, so the y coordinate needs to be adjusted by the difference\r\n // between the base size and this tile's size.\r\n return tilemapLayer\r\n ? tilemapLayer.tileToWorldY(this.y, camera) - (this.height - this.baseHeight) * tilemapLayer.scaleY\r\n : this.y * this.baseHeight - (this.height - this.baseHeight);\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the bottom side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n\r\n * @method Phaser.Tilemaps.Tile#getBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getBottom: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer\r\n ? this.getTop(camera) + this.height * tilemapLayer.scaleY\r\n : this.getTop(camera) + this.height;\r\n },\r\n\r\n\r\n /**\r\n * Gets the world rectangle bounding box for the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n * @param {object} [output] - [description]\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)}\r\n */\r\n getBounds: function (camera, output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.x = this.getLeft();\r\n output.y = this.getTop();\r\n output.width = this.getRight() - output.x;\r\n output.height = this.getBottom() - output.y;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterX: function (camera)\r\n {\r\n return (this.getLeft(camera) + this.getRight(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterY: function (camera)\r\n {\r\n return (this.getTop(camera) + this.getBottom(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Clean up memory.\r\n *\r\n * @method Phaser.Tilemaps.Tile#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n this.properties = undefined;\r\n },\r\n\r\n /**\r\n * Check for intersection with this tile. This does not factor in camera scroll, layer scale or\r\n * layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x axis in pixels.\r\n * @param {number} y - The y axis in pixels.\r\n * @param {number} right - The right point.\r\n * @param {number} bottom - The bottom point.\r\n *\r\n * @return {boolean}\r\n */\r\n intersects: function (x, y, right, bottom)\r\n {\r\n return !(\r\n right <= this.pixelX || bottom <= this.pixelY ||\r\n x >= this.right || y >= this.bottom\r\n );\r\n },\r\n\r\n /**\r\n * Checks if the tile is interesting.\r\n *\r\n * @method Phaser.Tilemaps.Tile#isInteresting\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} collides - If true, will consider the tile interesting if it collides on any side.\r\n * @param {boolean} faces - If true, will consider the tile interesting if it has an interesting face.\r\n *\r\n * @return {boolean} True if the Tile is interesting, otherwise false.\r\n */\r\n isInteresting: function (collides, faces)\r\n {\r\n if (collides && faces) { return (this.canCollide || this.hasInterestingFace); }\r\n else if (collides) { return this.collides; }\r\n else if (faces) { return this.hasInterestingFace; }\r\n return false;\r\n },\r\n\r\n /**\r\n * Reset collision status flags.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetCollision: function (recalculateFaces)\r\n {\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = false;\r\n this.collideRight = false;\r\n this.collideUp = false;\r\n this.collideDown = false;\r\n\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetFaces\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetFaces: function ()\r\n {\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision flags for each side of this tile and updates the interesting faces list.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} left - Indicating collide with any object on the left.\r\n * @param {boolean} [right] - Indicating collide with any object on the right.\r\n * @param {boolean} [up] - Indicating collide with any object on the top.\r\n * @param {boolean} [down] - Indicating collide with any object on the bottom.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces\r\n * for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollision: function (left, right, up, down, recalculateFaces)\r\n {\r\n if (right === undefined) { right = left; }\r\n if (up === undefined) { up = left; }\r\n if (down === undefined) { down = left; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = left;\r\n this.collideRight = right;\r\n this.collideUp = up;\r\n this.collideDown = down;\r\n\r\n this.faceLeft = left;\r\n this.faceRight = right;\r\n this.faceTop = up;\r\n this.faceBottom = down;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback to be called when this tile is hit by an object. The callback must true for\r\n * collision processing to take place.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollisionCallback\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - Callback function.\r\n * @param {object} context - Callback will be called within this context.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollisionCallback: function (callback, context)\r\n {\r\n if (callback === null)\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n }\r\n else\r\n {\r\n this.collisionCallback = callback;\r\n this.collisionCallbackContext = context;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the tile and updates its pixelX and pixelY.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tile in pixels.\r\n * @param {integer} tileHeight - The height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels).\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setSize: function (tileWidth, tileHeight, baseWidth, baseHeight)\r\n {\r\n if (tileWidth !== undefined) { this.width = tileWidth; }\r\n if (tileHeight !== undefined) { this.height = tileHeight; }\r\n if (baseWidth !== undefined) { this.baseWidth = baseWidth; }\r\n if (baseHeight !== undefined) { this.baseHeight = baseHeight; }\r\n\r\n this.updatePixelXY();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Used internally. Updates the tile's world XY position based on the current tile size.\r\n *\r\n * @method Phaser.Tilemaps.Tile#updatePixelXY\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n updatePixelXY: function ()\r\n {\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile is the\r\n // bottom left, while the Phaser renderer assumes the origin is the top left. The y\r\n // coordinate needs to be adjusted by the difference.\r\n this.pixelX = this.x * this.baseWidth;\r\n this.pixelY = this.y * this.baseHeight;\r\n\r\n // this.pixelY = this.y * this.baseHeight - (this.height - this.baseHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces or has a collision callback set.\r\n *\r\n * @name Phaser.Tilemaps.Tile#canCollide\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canCollide: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.collisionCallback);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collides\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile has any interesting faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#hasInterestingFace\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n hasInterestingFace: {\r\n get: function ()\r\n {\r\n return (this.faceTop || this.faceBottom || this.faceLeft || this.faceRight);\r\n }\r\n },\r\n\r\n /**\r\n * The tileset that contains this Tile. This is null if accessed from a LayerData instance\r\n * before the tile is placed in a StaticTilemapLayer or DynamicTilemapLayer, or if the tile has\r\n * an index that doesn't correspond to any of the map's tilesets.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tileset\r\n * @type {?Phaser.Tilemaps.Tileset}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tileset: {\r\n\r\n get: function ()\r\n {\r\n var tilemapLayer = this.layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n var tileset = tilemapLayer.gidMap[this.index];\r\n\r\n if (tileset)\r\n {\r\n return tileset;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tilemap layer that contains this Tile. This will only return null if accessed from a\r\n * LayerData instance before the tile is placed within a StaticTilemapLayer or\r\n * DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemapLayer\r\n * @type {?Phaser.Tilemaps.StaticTilemapLayer|Phaser.Tilemaps.DynamicTilemapLayer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemapLayer: {\r\n get: function ()\r\n {\r\n return this.layer.tilemapLayer;\r\n }\r\n },\r\n\r\n /**\r\n * The tilemap that contains this Tile. This will only return null if accessed from a LayerData\r\n * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemap\r\n * @type {?Phaser.Tilemaps.Tilemap}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemap: {\r\n get: function ()\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer ? tilemapLayer.tilemap : null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tile.js?")},"./node_modules/phaser/src/tilemaps/Tilemap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DynamicTilemapLayer = __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar Formats = __webpack_require__(/*! ./Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar LayerData = __webpack_require__(/*! ./mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar Rotate = __webpack_require__(/*! ../math/Rotate */ \"./node_modules/phaser/src/math/Rotate.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar StaticTilemapLayer = __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js\");\r\nvar Tile = __webpack_require__(/*! ./Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar Tileset = __webpack_require__(/*! ./Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * @callback TilemapFilterCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found in the filtered area.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The object.\r\n */\r\n\r\n/**\r\n * @callback TilemapFindCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {boolean} `true` if the callback should be invoked, otherwise `false`.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data\r\n * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or\r\n * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display\r\n * objects that actually render tiles.\r\n *\r\n * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free\r\n * software package specifically for creating tile maps, and is available from:\r\n * http://www.mapeditor.org\r\n *\r\n * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only\r\n * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer.\r\n *\r\n * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a\r\n * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides\r\n * it.\r\n *\r\n * @class Tilemap\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {Phaser.Tilemaps.MapData} mapData - A MapData instance containing Tilemap data.\r\n */\r\nvar Tilemap = new Class({\r\n\r\n initialize:\r\n\r\n function Tilemap (scene, mapData)\r\n {\r\n /**\r\n * @name Phaser.Tilemaps.Tilemap#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The base width of a tile in pixels. Note that individual layers may have a different tile\r\n * width.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = mapData.tileWidth;\r\n\r\n /**\r\n * The base height of a tile in pixels. Note that individual layers may have a different\r\n * tile height.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = mapData.tileHeight;\r\n\r\n /**\r\n * The width of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = mapData.width;\r\n\r\n /**\r\n * The height of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = mapData.height;\r\n\r\n /**\r\n * The orientation of the map data (as specified in Tiled), usually 'orthogonal'.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = mapData.orientation;\r\n\r\n /**\r\n * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'.\r\n *\r\n * The draw orders are:\r\n *\r\n * right-down\r\n * left-down\r\n * right-up\r\n * left-up\r\n *\r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = mapData.renderOrder;\r\n\r\n /**\r\n * The format of the map data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#format\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.format = mapData.format;\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled, usually 1).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#version\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.version = mapData.version;\r\n\r\n /**\r\n * Map specific properties as specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = mapData.properties;\r\n\r\n /**\r\n * The width of the map in pixels based on width * tileWidth.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = mapData.widthInPixels;\r\n\r\n /**\r\n * The height of the map in pixels based on height * tileHeight.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = mapData.heightInPixels;\r\n\r\n /**\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#imageCollections\r\n * @type {Phaser.Tilemaps.ImageCollection[]}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = mapData.imageCollections;\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = mapData.images;\r\n\r\n /**\r\n * An array of Tilemap layer data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layers\r\n * @type {Phaser.Tilemaps.LayerData[]}\r\n * @since 3.0.0\r\n */\r\n this.layers = mapData.layers;\r\n\r\n /**\r\n * An array of Tilesets used in the map.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = mapData.tilesets;\r\n\r\n /**\r\n * An array of ObjectLayer instances parsed from Tiled object layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#objects\r\n * @type {Phaser.Tilemaps.ObjectLayer[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = mapData.objects;\r\n\r\n /**\r\n * The index of the currently selected LayerData object.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#currentLayerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentLayerIndex = 0;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this map.\r\n *\r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n *\r\n * The draw orders are:\r\n *\r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n *\r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n *\r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * Calling this method _after_ creating Static or Dynamic Tilemap Layers will **not** automatically\r\n * update them to use the new render order. If you call this method after creating layers, use their\r\n * own `setRenderOrder` methods to change them as needed.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'number')\r\n {\r\n renderOrder = orders[renderOrder];\r\n }\r\n\r\n if (orders.indexOf(renderOrder) > -1)\r\n {\r\n this.renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.\r\n * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled\r\n * editor.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#addTilesetImage\r\n * @since 3.0.0\r\n *\r\n * @param {string} tilesetName - The name of the tileset as specified in the map data.\r\n * @param {string} [key] - The key of the Phaser.Cache image used for this tileset. If\r\n * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter.\r\n * @param {integer} [tileWidth] - The width of the tile (in pixels) in the Tileset Image. If not\r\n * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled\r\n * JSON file.\r\n * @param {integer} [tileHeight] - The height of the tiles (in pixels) in the Tileset Image. If\r\n * not given it will default to the map's tileHeight value, or the tileHeight specified in the\r\n * Tiled JSON file.\r\n * @param {integer} [tileMargin] - The margin around the tiles in the sheet (in pixels). If not\r\n * specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [tileSpacing] - The spacing between each the tile in the sheet (in pixels).\r\n * If not specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [gid=0] - If adding multiple tilesets to a blank map, specify the starting\r\n * GID this set will use here.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} Returns the Tileset object that was created or updated, or null if it\r\n * failed.\r\n */\r\n addTilesetImage: function (tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid)\r\n {\r\n if (tilesetName === undefined) { return null; }\r\n if (key === undefined || key === null) { key = tilesetName; }\r\n\r\n if (!this.scene.sys.textures.exists(key))\r\n {\r\n console.warn('Invalid Tileset Image: ' + key);\r\n return null;\r\n }\r\n\r\n var texture = this.scene.sys.textures.get(key);\r\n\r\n var index = this.getTilesetIndex(tilesetName);\r\n\r\n if (index === null && this.format === Formats.TILED_JSON)\r\n {\r\n console.warn('No data found for Tileset: ' + tilesetName);\r\n return null;\r\n }\r\n\r\n var tileset = this.tilesets[index];\r\n\r\n if (tileset)\r\n {\r\n tileset.setTileSize(tileWidth, tileHeight);\r\n tileset.setSpacing(tileMargin, tileSpacing);\r\n tileset.setImage(texture);\r\n\r\n return tileset;\r\n }\r\n\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (gid === undefined) { gid = 0; }\r\n\r\n tileset = new Tileset(tilesetName, gid, tileWidth, tileHeight, tileMargin, tileSpacing);\r\n\r\n tileset.setImage(texture);\r\n\r\n this.tilesets.push(tileset);\r\n\r\n return tileset;\r\n },\r\n\r\n /**\r\n * Turns the DynamicTilemapLayer associated with the given layer into a StaticTilemapLayer. If\r\n * no layer specified, the map's current layer is used. This is useful if you want to manipulate\r\n * a map at the start of a scene, but then make it non-manipulable and optimize it for speed.\r\n * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value\r\n * returned from this method if you want to manipulate the new StaticTilemapLayer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#convertLayerToStatic\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer)} [layer] - The name of the layer from Tiled, the\r\n * index of the layer in the map, or a DynamicTilemapLayer.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer that was created, or null if it\r\n * failed.\r\n */\r\n convertLayerToStatic: function (layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n var dynamicLayer = layer.tilemapLayer;\r\n\r\n if (!dynamicLayer || !(dynamicLayer instanceof DynamicTilemapLayer))\r\n {\r\n return null;\r\n }\r\n\r\n var staticLayer = new StaticTilemapLayer(\r\n dynamicLayer.scene,\r\n dynamicLayer.tilemap,\r\n dynamicLayer.layerIndex,\r\n dynamicLayer.tileset,\r\n dynamicLayer.x,\r\n dynamicLayer.y\r\n );\r\n\r\n this.scene.sys.displayList.add(staticLayer);\r\n\r\n dynamicLayer.destroy();\r\n\r\n return staticLayer;\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'copy')) { return this; }\r\n\r\n if (layer !== null)\r\n {\r\n TilemapComponents.Copy(\r\n srcTileX, srcTileY,\r\n width, height,\r\n destTileX, destTileY,\r\n recalculateFaces, layer\r\n );\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set to this new layer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createBlankDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of this layer. Must be unique within the map.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n * @param {integer} [width] - The width of the layer in tiles. If not specified, it will default to the map's width.\r\n * @param {integer} [height] - The height of the layer in tiles. If not specified, it will default to the map's height.\r\n * @param {integer} [tileWidth] - The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth.\r\n * @param {integer} [tileHeight] - The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer that was created, or `null` if it failed.\r\n */\r\n createBlankDynamicLayer: function (name, tileset, x, y, width, height, tileWidth, tileHeight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n\r\n var index = this.getLayerIndex(name);\r\n\r\n if (index !== null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + name);\r\n return null;\r\n }\r\n\r\n var layerData = new LayerData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n\r\n var row;\r\n\r\n for (var tileY = 0; tileY < height; tileY++)\r\n {\r\n row = [];\r\n\r\n for (var tileX = 0; tileX < width; tileX++)\r\n {\r\n row.push(new Tile(layerData, -1, tileX, tileY, tileWidth, tileHeight, this.tileWidth, this.tileHeight));\r\n }\r\n\r\n layerData.data.push(row);\r\n }\r\n\r\n this.layers.push(layerData);\r\n\r\n this.currentLayerIndex = this.layers.length - 1;\r\n\r\n var dynamicLayer = new DynamicTilemapLayer(this.scene, this, this.currentLayerIndex, tileset, x, y);\r\n\r\n dynamicLayer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(dynamicLayer);\r\n\r\n return dynamicLayer;\r\n },\r\n\r\n /**\r\n * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createDynamicLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n\r\n if (x === undefined)\r\n {\r\n x = layerData.x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n y = layerData.y;\r\n }\r\n\r\n var layer = new DynamicTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given gid in the map data. All properties from\r\n * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy\r\n * way to configure Sprite properties from within the map editor. For example giving an object a\r\n * property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created.\r\n *\r\n * Custom object properties not sharing names with the Sprite's own properties are copied to the\r\n * Sprite's {@link Phaser.GameObjects.Sprite#data data store}.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromObjects\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the object layer (from Tiled) to create Sprites from.\r\n * @param {(integer|string)} id - Either the id (object), gid (tile object) or name (object or\r\n * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects\r\n * with the same graphic. The same name can be used on multiple objects.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=the scene the map is within] - The Scene to create the Sprites within.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromObjects: function (name, id, spriteConfig, scene)\r\n {\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n if (scene === undefined) { scene = this.scene; }\r\n\r\n var objectLayer = this.getObjectLayer(name);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('Cannot create from object. Invalid objectgroup name given: ' + name);\r\n return;\r\n }\r\n\r\n var objects = objectLayer.objects;\r\n var sprites = [];\r\n\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n var found = false;\r\n var obj = objects[i];\r\n\r\n if (obj.gid !== undefined && typeof id === 'number' && obj.gid === id ||\r\n obj.id !== undefined && typeof id === 'number' && obj.id === id ||\r\n obj.name !== undefined && typeof id === 'string' && obj.name === id)\r\n {\r\n found = true;\r\n }\r\n\r\n if (found)\r\n {\r\n var config = Extend({}, spriteConfig, obj.properties);\r\n\r\n config.x = obj.x;\r\n config.y = obj.y;\r\n\r\n var sprite = scene.make.sprite(config);\r\n\r\n sprite.name = obj.name;\r\n\r\n if (obj.width) { sprite.displayWidth = obj.width; }\r\n if (obj.height) { sprite.displayHeight = obj.height; }\r\n\r\n // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin.\r\n var offset = {\r\n x: sprite.originX * sprite.displayWidth,\r\n y: (sprite.originY - 1) * sprite.displayHeight\r\n };\r\n\r\n // If the object is rotated, then the origin offset also needs to be rotated.\r\n if (obj.rotation)\r\n {\r\n var angle = DegToRad(obj.rotation);\r\n Rotate(offset, angle);\r\n sprite.rotation = angle;\r\n }\r\n\r\n sprite.x += offset.x;\r\n sprite.y += offset.y;\r\n\r\n if (obj.flippedHorizontal !== undefined || obj.flippedVertical !== undefined)\r\n {\r\n sprite.setFlip(obj.flippedHorizontal, obj.flippedVertical);\r\n }\r\n\r\n if (!obj.visible) { sprite.visible = false; }\r\n\r\n for (var key in obj.properties)\r\n {\r\n if (sprite.hasOwnProperty(key))\r\n {\r\n continue;\r\n }\r\n\r\n sprite.setData(key, obj.properties[key]);\r\n }\r\n\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.GameObjects.Sprite[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, layer);\r\n },\r\n\r\n /**\r\n * Creates a new StaticTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for\r\n * more information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createStaticLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createStaticLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n if (x === undefined && this.layers[index].x) { x = this.layers[index].x; }\r\n if (y === undefined && this.layers[index].y) { y = this.layers[index].y; }\r\n\r\n var layer = new StaticTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any\r\n * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllLayers();\r\n this.tilesets.length = 0;\r\n this.objects.length = 0;\r\n this.scene = undefined;\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n if (this._isStaticCall(layer, 'fill')) { return this; }\r\n\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each object in the given object layer, run the given filter callback function. Any\r\n * objects that pass the filter test (i.e. where the callback returns true) will returned as a\r\n * new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterObjects\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFilterCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject[]} An array of object that match the search, or null if the objectLayer given was invalid.\r\n */\r\n filterObjects: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.filter(callback, context);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findByIndex: function (findIndex, skip, reverse, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, layer);\r\n },\r\n\r\n /**\r\n * Find the first object in the given object layer that satisfies the provided testing function.\r\n * I.e. finds the first object for which `callback` returns true. Similar to\r\n * Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findObject\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFindCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} An object that matches the search, or null if no object found.\r\n */\r\n findObject: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.find(callback, context) || null;\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the image layer index based on its name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getImageIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the image to get.\r\n *\r\n * @return {integer} The index of the image in this tilemap, or null if not found.\r\n */\r\n getImageIndex: function (name)\r\n {\r\n return this.getIndex(this.images, name);\r\n },\r\n\r\n /**\r\n * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name\r\n * property matches the given `name`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {array} location - The Tilemap array to search.\r\n * @param {string} name - The name of the array element to get.\r\n *\r\n * @return {number} The index of the element in the array, or null if not found.\r\n */\r\n getIndex: function (location, name)\r\n {\r\n for (var i = 0; i < location.length; i++)\r\n {\r\n if (location[i].name === name)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the maps current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.LayerData} The corresponding LayerData within this.layers.\r\n */\r\n getLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n return (index !== null) ? this.layers[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer\r\n * is found with that name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getObjectLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} [name] - The name of the object layer from Tiled.\r\n *\r\n * @return {?Phaser.Tilemaps.ObjectLayer} The corresponding ObjectLayer within this.objects or null.\r\n */\r\n getObjectLayer: function (name)\r\n {\r\n var index = this.getIndex(this.objects, name);\r\n\r\n return (index !== null) ? this.objects[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndex: function (layer)\r\n {\r\n if (layer === undefined)\r\n {\r\n return this.currentLayerIndex;\r\n }\r\n else if (typeof layer === 'string')\r\n {\r\n return this.getLayerIndexByName(layer);\r\n }\r\n else if (typeof layer === 'number' && layer < this.layers.length)\r\n {\r\n return layer;\r\n }\r\n else if (layer instanceof StaticTilemapLayer || layer instanceof DynamicTilemapLayer)\r\n {\r\n return layer.layerIndex;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the index of the LayerData within this.layers that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndexByName\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the layer to get.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndexByName: function (name)\r\n {\r\n return this.getIndex(this.layers, name);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the Tileset that has the given `name`, or null if an invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileset\r\n * @since 3.14.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} The Tileset, or `null` if no matching named tileset was found.\r\n */\r\n getTileset: function (name)\r\n {\r\n var index = this.getIndex(this.tilesets, name);\r\n\r\n return (index !== null) ? this.tilesets[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {integer} The Tileset index within this.tilesets.\r\n */\r\n getTilesetIndex: function (name)\r\n {\r\n return this.getIndex(this.tilesets, name);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAt(tileX, tileY, layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, layer);\r\n },\r\n\r\n /**\r\n * The LayerData object that is currently selected in the map. You can set this property using\r\n * any type supported by setLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n layer: {\r\n get: function ()\r\n {\r\n return this.layers[this.currentLayerIndex];\r\n },\r\n\r\n set: function (layer)\r\n {\r\n this.setLayer(layer);\r\n }\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid or the coordinates were out of bounds.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTilesAt')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'randomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given TilemapLayer from this Tilemap without destroying it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be removed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n removeLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the given TilemapLayer and removes it from this Tilemap.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroyLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be destroyed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n destroyLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n layer = this.layers[index];\r\n\r\n layer.destroy();\r\n\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or\r\n * DynamicTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeAllLayers\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n removeAllLayers: function ()\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].tilemapLayer)\r\n {\r\n layers[i].tilemapLayer.destroy(false);\r\n }\r\n }\r\n\r\n layers.length = 0;\r\n\r\n this.currentLayerIndex = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Tile, or an array of Tiles, from the layer to which they belong,\r\n * and optionally recalculates the collision information.\r\n *\r\n * This cannot be applied to Tiles that belong to Static Tilemap Layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTile\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Tilemaps.Tile|Phaser.Tilemaps.Tile[])} tiles - The Tile to remove, or an array of Tiles.\r\n * @param {integer} [replaceIndex=-1] - After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Returns an array of Tiles that were removed.\r\n */\r\n removeTile: function (tiles, replaceIndex, recalculateFaces)\r\n {\r\n if (replaceIndex === undefined) { replaceIndex = -1; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var removed = [];\r\n\r\n if (!Array.isArray(tiles))\r\n {\r\n tiles = [ tiles ];\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n removed.push(this.removeTileAt(tile.x, tile.y, true, recalculateFaces, tile.tilemapLayer));\r\n\r\n if (replaceIndex > -1)\r\n {\r\n this.putTileAt(replaceIndex, tile.x, tile.y, recalculateFaces, tile.tilemapLayer);\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns the Tile that was removed, or null if the layer given was invalid.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebug: function (graphics, styleConfig, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws a debug representation of all layers within this Tilemap to the given Graphics object.\r\n *\r\n * This is helpful when you want to get a quick idea of which of your tiles are colliding and which\r\n * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to\r\n * place the debug representation wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebugFull\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebugFull: function (graphics, styleConfig)\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layers[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'replaceByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordindates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current layer to the LayerData associated with `layer`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n this.currentLayerIndex = index;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and\r\n * tileHeight for all layers. This also updates the base size on all tiles across all layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setBaseTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles the map uses for calculations.\r\n * @param {integer} tileHeight - The height of the tiles the map uses for calculations.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setBaseTileSize: function (tileWidth, tileHeight)\r\n {\r\n this.tileWidth = tileWidth;\r\n this.tileHeight = tileHeight;\r\n this.widthInPixels = this.width * tileWidth;\r\n this.heightInPixels = this.height * tileHeight;\r\n\r\n // Update the base tile size on all layers & tiles\r\n for (var i = 0; i < this.layers.length; i++)\r\n {\r\n this.layers[i].baseTileWidth = tileWidth;\r\n this.layers[i].baseTileHeight = tileHeight;\r\n\r\n var mapData = this.layers[i].data;\r\n var mapWidth = this.layers[i].width;\r\n var mapHeight = this.layers[i].height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(undefined, undefined, tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's\r\n * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any\r\n * tiles the layer has.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayerTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles (in pixels) in the layer.\r\n * @param {integer} tileHeight - The height of the tiles (in pixels) in the layer.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayerTileSize: function (tileWidth, tileHeight, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return this; }\r\n\r\n layer.tileWidth = tileWidth;\r\n layer.tileHeight = tileHeight;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n shuffle: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'shuffle')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'swapByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldX: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldX(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldY: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldY(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the map's current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'weightedRandomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Used internally to check if a layer is static and prints out a warning.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#_isStaticCall\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean}\r\n */\r\n _isStaticCall: function (layer, functionName)\r\n {\r\n if (layer.tilemapLayer instanceof StaticTilemapLayer)\r\n {\r\n console.warn(functionName + ': You cannot change the tiles in a static tilemap layer');\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tilemap.js?")},"./node_modules/phaser/src/tilemaps/TilemapCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Types.Tilemaps.TilemapConfig} [config] - The config options for the Tilemap.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectCreator.register(\'tilemap\', function (config)\r\n{\r\n // Defaults are applied in ParseToTilemap\r\n var c = (config !== undefined) ? config : {};\r\n\r\n return ParseToTilemap(\r\n this.scene,\r\n c.key,\r\n c.tileWidth,\r\n c.tileHeight,\r\n c.width,\r\n c.height,\r\n c.data,\r\n c.insertNull\r\n );\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapCreator.js?')},"./node_modules/phaser/src/tilemaps/TilemapFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ \"./node_modules/phaser/src/tilemaps/ParseToTilemap.js\");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tilemap\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [width=10] - The width of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [height=10] - The height of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes. Pass in `null` for no data.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n // Allow users to specify null to indicate that they want the default value, since null is\r\n // shorter & more legible than undefined. Convert null to undefined to allow ParseToTilemap\r\n // defaults to take effect.\r\n\r\n if (key === null) { key = undefined; }\r\n if (tileWidth === null) { tileWidth = undefined; }\r\n if (tileHeight === null) { tileHeight = undefined; }\r\n if (width === null) { width = undefined; }\r\n if (height === null) { height = undefined; }\r\n\r\n return ParseToTilemap(this.scene, key, tileWidth, tileHeight, width, height, data, insertNull);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapFactory.js?")},"./node_modules/phaser/src/tilemaps/Tileset.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tileset is a combination of an image containing the tiles and a container for data about\r\n * each tile.\r\n *\r\n * @class Tileset\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tileset in the map data.\r\n * @param {integer} firstgid - The first tile index this tileset contains.\r\n * @param {integer} [tileWidth=32] - Width of each tile (in pixels).\r\n * @param {integer} [tileHeight=32] - Height of each tile (in pixels).\r\n * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels).\r\n * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels).\r\n * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset.\r\n * These typically are custom properties created in Tiled when editing a tileset.\r\n * @param {object} [tileData={}] - Data stored per tile. These typically are created in Tiled\r\n * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor.\r\n */\r\nvar Tileset = new Class({\r\n\r\n initialize:\r\n\r\n function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData)\r\n {\r\n if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; }\r\n if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (tileProperties === undefined) { tileProperties = {}; }\r\n if (tileData === undefined) { tileData = {}; }\r\n\r\n /**\r\n * The name of the Tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The starting index of the first tile index this Tileset contains.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid;\r\n\r\n /**\r\n * The width of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = tileWidth;\r\n\r\n /**\r\n * The height of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = tileHeight;\r\n\r\n /**\r\n * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileMargin\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileMargin = tileMargin;\r\n\r\n /**\r\n * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileSpacing = tileSpacing;\r\n\r\n /**\r\n * Tileset-specific properties per tile that are typically defined in the Tiled editor in the\r\n * Tileset editor.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileProperties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileProperties = tileProperties;\r\n\r\n /**\r\n * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within\r\n * the Tileset collision editor. This is where collision objects and terrain are stored.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileData = tileData;\r\n\r\n /**\r\n * The cached image that contains the individual tiles. Use setImage to set.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#image\r\n * @type {?Phaser.Textures.Texture}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.image = null;\r\n\r\n /**\r\n * The gl texture used by the WebGL renderer.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#glTexture\r\n * @type {?WebGLTexture}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * The number of tile rows in the the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#rows\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.rows = 0;\r\n\r\n /**\r\n * The number of tile columns in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#columns\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.columns = 0;\r\n\r\n /**\r\n * The total number of tiles in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n\r\n /**\r\n * The look-up table to specific tile image texture coordinates (UV in pixels). Each element\r\n * contains the coordinates for a tile in an object of the form {x, y}.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#texCoordinates\r\n * @type {object[]}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.texCoordinates = [];\r\n },\r\n\r\n /**\r\n * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined in Tiled under the Tileset editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?(object|undefined)}\r\n */\r\n getTileProperties: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileProperties[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained\r\n * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision\r\n * info and terrain mapping.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object|undefined}\r\n */\r\n getTileData: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileData[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined within Tiled's tileset collision editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object}\r\n */\r\n getTileCollisionGroup: function (tileIndex)\r\n {\r\n var data = this.getTileData(tileIndex);\r\n\r\n return (data && data.objectgroup) ? data.objectgroup : null;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this Tileset contains the given tile index.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#containsTileIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {boolean}\r\n */\r\n containsTileIndex: function (tileIndex)\r\n {\r\n return (\r\n tileIndex >= this.firstgid &&\r\n tileIndex < (this.firstgid + this.total)\r\n );\r\n },\r\n\r\n /**\r\n * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index.\r\n * Returns null if tile index is not contained in this Tileset.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object} Object in the form { x, y } representing the top-left UV coordinate\r\n * within the Tileset image.\r\n */\r\n getTileTextureCoordinates: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.texCoordinates[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setImage\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The image that contains the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setImage: function (texture)\r\n {\r\n this.image = texture;\r\n\r\n this.glTexture = texture.get().source.glTexture;\r\n\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile width & height and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileWidth] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight] - The height of a tile in pixels.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setTileSize: function (tileWidth, tileHeight)\r\n {\r\n if (tileWidth !== undefined) { this.tileWidth = tileWidth; }\r\n if (tileHeight !== undefined) { this.tileHeight = tileHeight; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setSpacing\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels).\r\n * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setSpacing: function (margin, spacing)\r\n {\r\n if (margin !== undefined) { this.tileMargin = margin; }\r\n if (spacing !== undefined) { this.tileSpacing = spacing; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates tile texture coordinates and tileset data.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#updateTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} imageWidth - The (expected) width of the image to slice.\r\n * @param {integer} imageHeight - The (expected) height of the image to slice.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n updateTileData: function (imageWidth, imageHeight)\r\n {\r\n var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing);\r\n var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing);\r\n\r\n if (rowCount % 1 !== 0 || colCount % 1 !== 0)\r\n {\r\n console.warn('Image tile area not tile size multiple in: ' + this.name);\r\n }\r\n\r\n // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated\r\n // - hence the floor when calculating the rows/columns.\r\n rowCount = Math.floor(rowCount);\r\n colCount = Math.floor(colCount);\r\n\r\n this.rows = rowCount;\r\n this.columns = colCount;\r\n\r\n // In Tiled, \"empty\" spaces in a tileset count as tiles and hence count towards the gid\r\n this.total = rowCount * colCount;\r\n\r\n this.texCoordinates.length = 0;\r\n\r\n var tx = this.tileMargin;\r\n var ty = this.tileMargin;\r\n\r\n for (var y = 0; y < this.rows; y++)\r\n {\r\n for (var x = 0; x < this.columns; x++)\r\n {\r\n this.texCoordinates.push({ x: tx, y: ty });\r\n tx += this.tileWidth + this.tileSpacing;\r\n }\r\n\r\n tx = this.tileMargin;\r\n ty += this.tileHeight + this.tileSpacing;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tileset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tileset.js?")},"./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\n\r\n/**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesAt\r\n * @private\r\n * @since 3.0.0\r\n * \r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesAt = function (tileX, tileY, layer)\r\n{\r\n var tile = GetTileAt(tileX, tileY, true, layer);\r\n var above = GetTileAt(tileX, tileY - 1, true, layer);\r\n var below = GetTileAt(tileX, tileY + 1, true, layer);\r\n var left = GetTileAt(tileX - 1, tileY, true, layer);\r\n var right = GetTileAt(tileX + 1, tileY, true, layer);\r\n var tileCollides = tile && tile.collides;\r\n\r\n // Assume the changed tile has all interesting edges\r\n if (tileCollides)\r\n {\r\n tile.faceTop = true;\r\n tile.faceBottom = true;\r\n tile.faceLeft = true;\r\n tile.faceRight = true;\r\n }\r\n\r\n // Reset edges that are shared between tile and its neighbors\r\n if (above && above.collides)\r\n {\r\n if (tileCollides) { tile.faceTop = false; }\r\n above.faceBottom = !tileCollides;\r\n }\r\n\r\n if (below && below.collides)\r\n {\r\n if (tileCollides) { tile.faceBottom = false; }\r\n below.faceTop = !tileCollides;\r\n }\r\n\r\n if (left && left.collides)\r\n {\r\n if (tileCollides) { tile.faceLeft = false; }\r\n left.faceRight = !tileCollides;\r\n }\r\n\r\n if (right && right.collides)\r\n {\r\n if (tileCollides) { tile.faceRight = false; }\r\n right.faceLeft = !tileCollides;\r\n }\r\n\r\n if (tile && !tile.collides) { tile.resetFaces(); }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = CalculateFacesAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js?')},"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesWithin = function (tileX, tileY, width, height, layer)\r\n{\r\n var above = null;\r\n var below = null;\r\n var left = null;\r\n var right = null;\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (tile)\r\n {\r\n if (tile.collides)\r\n {\r\n above = GetTileAt(tile.x, tile.y - 1, true, layer);\r\n below = GetTileAt(tile.x, tile.y + 1, true, layer);\r\n left = GetTileAt(tile.x - 1, tile.y, true, layer);\r\n right = GetTileAt(tile.x + 1, tile.y, true, layer);\r\n\r\n tile.faceTop = (above && above.collides) ? false : true;\r\n tile.faceBottom = (below && below.collides) ? false : true;\r\n tile.faceLeft = (left && left.collides) ? false : true;\r\n tile.faceRight = (right && right.collides) ? false : true;\r\n }\r\n else\r\n {\r\n tile.resetFaces();\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = CalculateFacesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js?')},"./node_modules/phaser/src/tilemaps/components/Copy.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\n\r\n/**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @function Phaser.Tilemaps.Components.Copy\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n{\r\n if (srcTileX < 0) { srcTileX = 0; }\r\n if (srcTileY < 0) { srcTileY = 0; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var srcTiles = GetTilesWithin(srcTileX, srcTileY, width, height, null, layer);\r\n\r\n var offsetX = destTileX - srcTileX;\r\n var offsetY = destTileY - srcTileY;\r\n\r\n for (var i = 0; i < srcTiles.length; i++)\r\n {\r\n var tileX = srcTiles[i].x + offsetX;\r\n var tileY = srcTiles[i].y + offsetY;\r\n if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height)\r\n {\r\n if (layer.data[tileY][tileX])\r\n {\r\n layer.data[tileY][tileX].copy(srcTiles[i]);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(destTileX - 1, destTileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Copy;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Copy.js?')},"./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ReplaceByIndex = __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js");\r\n\r\n/**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @function Phaser.Tilemaps.Components.CreateFromTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\nvar CreateFromTiles = function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n{\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n var tilemapLayer = layer.tilemapLayer;\r\n if (scene === undefined) { scene = tilemapLayer.scene; }\r\n if (camera === undefined) { camera = scene.cameras.main; }\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n var sprites = [];\r\n var i;\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (indexes.indexOf(tile.index) !== -1)\r\n {\r\n spriteConfig.x = TileToWorldX(tile.x, camera, layer);\r\n spriteConfig.y = TileToWorldY(tile.y, camera, layer);\r\n\r\n var sprite = scene.make.sprite(spriteConfig);\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n if (typeof replacements === \'number\')\r\n {\r\n // Assume 1 replacement for all types of tile given\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements, 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n else if (Array.isArray(replacements))\r\n {\r\n // Assume 1 to 1 mapping with indexes array\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements[i], 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n\r\n return sprites;\r\n};\r\n\r\nmodule.exports = CreateFromTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js?')},"./node_modules/phaser/src/tilemaps/components/CullTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js");\r\nvar SnapCeil = __webpack_require__(/*! ../../math/snap/SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js");\r\n\r\n/**\r\n * Returns the tiles in the given layer that are within the camera\'s viewport. This is used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CullTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n * @param {array} [outputArray] - An optional array to store the Tile objects within.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\nvar CullTiles = function (layer, camera, outputArray, renderOrder)\r\n{\r\n if (outputArray === undefined) { outputArray = []; }\r\n if (renderOrder === undefined) { renderOrder = 0; }\r\n\r\n outputArray.length = 0;\r\n\r\n var tilemap = layer.tilemapLayer.tilemap;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n // We need to use the tile sizes defined for the map as a whole, not the layer,\r\n // in order to calculate the bounds correctly. As different sized tiles may be\r\n // placed on the grid and we cannot trust layer.baseTileWidth to give us the true size.\r\n var tileW = Math.floor(tilemap.tileWidth * tilemapLayer.scaleX);\r\n var tileH = Math.floor(tilemap.tileHeight * tilemapLayer.scaleY);\r\n\r\n var drawLeft = 0;\r\n var drawRight = mapWidth;\r\n var drawTop = 0;\r\n var drawBottom = mapHeight;\r\n\r\n if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)\r\n {\r\n // Camera world view bounds, snapped for scaled tile size\r\n // Cull Padding values are given in tiles, not pixels\r\n\r\n var boundsLeft = SnapFloor(camera.worldView.x - tilemapLayer.x, tileW, 0, true) - tilemapLayer.cullPaddingX;\r\n var boundsRight = SnapCeil(camera.worldView.right - tilemapLayer.x, tileW, 0, true) + tilemapLayer.cullPaddingX;\r\n var boundsTop = SnapFloor(camera.worldView.y - tilemapLayer.y, tileH, 0, true) - tilemapLayer.cullPaddingY;\r\n var boundsBottom = SnapCeil(camera.worldView.bottom - tilemapLayer.y, tileH, 0, true) + tilemapLayer.cullPaddingY;\r\n\r\n drawLeft = Math.max(0, boundsLeft);\r\n drawRight = Math.min(mapWidth, boundsRight);\r\n drawTop = Math.max(0, boundsTop);\r\n drawBottom = Math.min(mapHeight, boundsBottom);\r\n }\r\n\r\n var x;\r\n var y;\r\n var tile;\r\n\r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n\r\n tilemapLayer.tilesDrawn = outputArray.length;\r\n tilemapLayer.tilesTotal = mapWidth * mapHeight;\r\n\r\n return outputArray;\r\n};\r\n\r\nmodule.exports = CullTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CullTiles.js?')},"./node_modules/phaser/src/tilemaps/components/Fill.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @function Phaser.Tilemaps.Components.Fill\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} recalculateFaces - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The tile layer to use. If not given the current layer is used.\r\n */\r\nvar Fill = function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n{\r\n var doesIndexCollide = (layer.collideIndexes.indexOf(index) !== -1);\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = index;\r\n\r\n SetTileCollision(tiles[i], doesIndexCollide);\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Fill;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Fill.js?')},"./node_modules/phaser/src/tilemaps/components/FilterTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FilterTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles.\r\n */\r\nvar FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return tiles.filter(callback, context);\r\n};\r\n\r\nmodule.exports = FilterTiles;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FilterTiles.js?')},"./node_modules/phaser/src/tilemaps/components/FindByIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} The first (or n skipped) tile with the matching index.\r\n */\r\nvar FindByIndex = function (findIndex, skip, reverse, layer)\r\n{\r\n if (skip === undefined) { skip = 0; }\r\n if (reverse === undefined) { reverse = false; }\r\n\r\n var count = 0;\r\n var tx;\r\n var ty;\r\n var tile;\r\n\r\n if (reverse)\r\n {\r\n for (ty = layer.height - 1; ty >= 0; ty--)\r\n {\r\n for (tx = layer.width - 1; tx >= 0; tx--)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (ty = 0; ty < layer.height; ty++)\r\n {\r\n for (tx = 0; tx < layer.width; tx++)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = FindByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindByIndex.js?")},"./node_modules/phaser/src/tilemaps/components/FindTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback FindTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n *\r\n * @return {boolean} Return `true` if the callback should run, otherwise `false`.\r\n */\r\n\r\n/**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} A Tile that matches the search, or null if no Tile found\r\n */\r\nvar FindTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n return tiles.find(callback, context) || null;\r\n};\r\n\r\nmodule.exports = FindTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindTile.js?')},"./node_modules/phaser/src/tilemaps/components/ForEachTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback EachTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n */\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.ForEachTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ForEachTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n tiles.forEach(callback, context);\r\n};\r\n\r\nmodule.exports = ForEachTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ForEachTile.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAt = function (tileX, tileY, nonNull, layer)\r\n{\r\n if (nonNull === undefined) { nonNull = false; }\r\n\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX] || null;\r\n if (tile === null)\r\n {\r\n return null;\r\n }\r\n else if (tile.index === -1)\r\n {\r\n return nonNull ? tile : null;\r\n }\r\n else\r\n {\r\n return tile;\r\n }\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n};\r\n\r\nmodule.exports = GetTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAtWorldXY = function (worldX, worldY, nonNull, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return GetTileAt(tileX, tileY, nonNull, layer);\r\n};\r\n\r\nmodule.exports = GetTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n if (tileX === undefined) { tileX = 0; }\r\n if (tileY === undefined) { tileY = 0; }\r\n if (width === undefined) { width = layer.width; }\r\n if (height === undefined) { height = layer.height; }\r\n\r\n var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false);\r\n var isColliding = GetFastValue(filteringOptions, 'isColliding', false);\r\n var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false);\r\n\r\n // Clip x, y to top left of map, while shrinking width/height to match.\r\n if (tileX < 0)\r\n {\r\n width += tileX;\r\n tileX = 0;\r\n }\r\n if (tileY < 0)\r\n {\r\n height += tileY;\r\n tileY = 0;\r\n }\r\n\r\n // Clip width and height to bottom right of map.\r\n if (tileX + width > layer.width)\r\n {\r\n width = Math.max(layer.width - tileX, 0);\r\n }\r\n if (tileY + height > layer.height)\r\n {\r\n height = Math.max(layer.height - tileY, 0);\r\n }\r\n\r\n var results = [];\r\n\r\n for (var ty = tileY; ty < tileY + height; ty++)\r\n {\r\n for (var tx = tileX; tx < tileX + width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile !== null)\r\n {\r\n if (isNotEmpty && tile.index === -1) { continue; }\r\n if (isColliding && !tile.collides) { continue; }\r\n if (hasInterestingFace && !tile.hasInterestingFace) { continue; }\r\n results.push(tile);\r\n }\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js?")},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Geom = __webpack_require__(/*! ../../geom/ */ "./node_modules/phaser/src/geom/index.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Intersects = __webpack_require__(/*! ../../geom/intersects/ */ "./node_modules/phaser/src/geom/intersects/index.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\nvar TriangleToRectangle = function (triangle, rect)\r\n{\r\n return Intersects.RectangleToTriangle(rect, triangle);\r\n};\r\n\r\n// Note: Could possibly be optimized by copying the shape and shifting it into tilemapLayer\r\n// coordinates instead of shifting the tiles.\r\n\r\n/**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinShape\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinShape = function (shape, filteringOptions, camera, layer)\r\n{\r\n if (shape === undefined) { return []; }\r\n\r\n // intersectTest is a function with parameters: shape, rect\r\n var intersectTest = NOOP;\r\n if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; }\r\n else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; }\r\n else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; }\r\n else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; }\r\n\r\n // Top left corner of the shapes\'s bounding box, rounded down to include partial tiles\r\n var xStart = WorldToTileX(shape.left, true, camera, layer);\r\n var yStart = WorldToTileY(shape.top, true, camera, layer);\r\n\r\n // Bottom right corner of the shapes\'s bounding box, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(shape.right, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(shape.bottom, false, camera, layer));\r\n\r\n // Tiles within bounding rectangle of shape. Bounds are forced to be at least 1 x 1 tile in size\r\n // to grab tiles for shapes that don\'t have a height or width (e.g. a horizontal line).\r\n var width = Math.max(xEnd - xStart, 1);\r\n var height = Math.max(yEnd - yStart, 1);\r\n var tiles = GetTilesWithin(xStart, yStart, width, height, filteringOptions, layer);\r\n\r\n var tileWidth = layer.tileWidth;\r\n var tileHeight = layer.tileHeight;\r\n if (layer.tilemapLayer)\r\n {\r\n tileWidth *= layer.tilemapLayer.scaleX;\r\n tileHeight *= layer.tilemapLayer.scaleY;\r\n }\r\n\r\n var results = [];\r\n var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n tileRect.x = TileToWorldX(tile.x, camera, layer);\r\n tileRect.y = TileToWorldY(tile.y, camera, layer);\r\n if (intersectTest(shape, tileRect))\r\n {\r\n results.push(tile);\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithinShape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n{\r\n // Top left corner of the rect, rounded down to include partial tiles\r\n var xStart = WorldToTileX(worldX, true, camera, layer);\r\n var yStart = WorldToTileY(worldY, true, camera, layer);\r\n\r\n // Bottom right corner of the rect, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(worldX + width, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(worldY + height, false, camera, layer));\r\n\r\n return GetTilesWithin(xStart, yStart, xEnd - xStart, yEnd - yStart, filteringOptions, layer);\r\n};\r\n\r\nmodule.exports = GetTilesWithinWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAt = function (tileX, tileY, layer)\r\n{\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX];\r\n return (tile !== null && tile.index > -1);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = HasTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasTileAt = __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAtWorldXY = function (worldX, worldY, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return HasTileAt(tileX, tileY, layer);\r\n};\r\n\r\nmodule.exports = HasTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given tile coordinates are within the bounds of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.IsInLayerBounds\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`.\r\n */\r\nvar IsInLayerBounds = function (tileX, tileY, layer)\r\n{\r\n return (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height);\r\n};\r\n\r\nmodule.exports = IsInLayerBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js?")},"./node_modules/phaser/src/tilemaps/components/PutTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!IsInLayerBounds(tileX, tileY, layer)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var oldTile = layer.data[tileY][tileX];\r\n var oldTileCollides = oldTile && oldTile.collides;\r\n\r\n if (tile instanceof Tile)\r\n {\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height);\r\n }\r\n layer.data[tileY][tileX].copy(tile);\r\n }\r\n else\r\n {\r\n var index = tile;\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight);\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX].index = index;\r\n }\r\n }\r\n\r\n // Updating colliding flag on the new tile\r\n var newTile = layer.data[tileY][tileX];\r\n var collides = layer.collideIndexes.indexOf(newTile.index) !== -1;\r\n SetTileCollision(newTile, collides);\r\n\r\n // Recalculate faces only if the colliding flag at (tileX, tileY) has changed\r\n if (recalculateFaces && (oldTileCollides !== newTile.collides))\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return newTile;\r\n};\r\n\r\nmodule.exports = PutTileAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = PutTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/PutTilesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\n\r\n/**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTilesAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!Array.isArray(tilesArray)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n // Force the input array to be a 2D array\r\n if (!Array.isArray(tilesArray[0]))\r\n {\r\n tilesArray = [ tilesArray ];\r\n }\r\n\r\n var height = tilesArray.length;\r\n var width = tilesArray[0].length;\r\n\r\n for (var ty = 0; ty < height; ty++)\r\n {\r\n for (var tx = 0; tx < width; tx++)\r\n {\r\n var tile = tilesArray[ty][tx];\r\n PutTileAt(tile, tileX + tx, tileY + ty, false, layer);\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = PutTilesAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTilesAt.js?')},"./node_modules/phaser/src/tilemaps/components/Randomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Randomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Randomize = function (tileX, tileY, width, height, indexes, layer)\r\n{\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n // If no indicies are given, then find all the unique indexes within the specified region\r\n if (indexes === undefined)\r\n {\r\n indexes = [];\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n if (indexes.indexOf(tiles[i].index) === -1)\r\n {\r\n indexes.push(tiles[i].index);\r\n }\r\n }\r\n }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = GetRandom(indexes);\r\n }\r\n};\r\n\r\nmodule.exports = Randomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Randomize.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\n\r\n/**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAt = function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n{\r\n if (replaceWithNull === undefined) { replaceWithNull = false; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (!IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n return null;\r\n }\r\n\r\n var tile = layer.data[tileY][tileX];\r\n\r\n if (!tile)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX] = (replaceWithNull) ? null : new Tile(layer, -1, tileX, tileY, tile.width, tile.height);\r\n }\r\n\r\n // Recalculate faces only if the removed tile was a colliding tile\r\n if (recalculateFaces && tile && tile.collides)\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = RemoveTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RemoveTileAt = __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = RemoveTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/RenderDebug.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Color = __webpack_require__(/*! ../../display/color */ "./node_modules/phaser/src/display/color/index.js");\r\n\r\nvar defaultTileColor = new Color(105, 210, 231, 150);\r\nvar defaultCollidingTileColor = new Color(243, 134, 48, 200);\r\nvar defaultFaceColor = new Color(40, 39, 37, 150);\r\n\r\n/**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @function Phaser.Tilemaps.Components.RenderDebug\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {object} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {?Phaser.Display.Color} [styleConfig.tileColor=blue] - Color to use for drawing a filled rectangle at\r\n * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.collidingTileColor=orange] - Color to use for drawing a filled\r\n * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.faceColor=grey] - Color to use for drawing a line at interesting\r\n * tile faces. If set to null, interesting tile faces will not be drawn.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar RenderDebug = function (graphics, styleConfig, layer)\r\n{\r\n if (styleConfig === undefined) { styleConfig = {}; }\r\n\r\n // Default colors without needlessly creating Color objects\r\n var tileColor = (styleConfig.tileColor !== undefined) ? styleConfig.tileColor : defaultTileColor;\r\n var collidingTileColor = (styleConfig.collidingTileColor !== undefined) ? styleConfig.collidingTileColor : defaultCollidingTileColor;\r\n var faceColor = (styleConfig.faceColor !== undefined) ? styleConfig.faceColor : defaultFaceColor;\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n\r\n graphics.translateCanvas(layer.tilemapLayer.x, layer.tilemapLayer.y);\r\n graphics.scaleCanvas(layer.tilemapLayer.scaleX, layer.tilemapLayer.scaleY);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n var tw = tile.width;\r\n var th = tile.height;\r\n var x = tile.pixelX;\r\n var y = tile.pixelY;\r\n\r\n var color = tile.collides ? collidingTileColor : tileColor;\r\n\r\n if (color !== null)\r\n {\r\n graphics.fillStyle(color.color, color.alpha / 255);\r\n graphics.fillRect(x, y, tw, th);\r\n }\r\n\r\n // Inset the face line to prevent neighboring tile\'s lines from overlapping\r\n x += 1;\r\n y += 1;\r\n tw -= 2;\r\n th -= 2;\r\n\r\n if (faceColor !== null)\r\n {\r\n graphics.lineStyle(1, faceColor.color, faceColor.alpha / 255);\r\n\r\n if (tile.faceTop) { graphics.lineBetween(x, y, x + tw, y); }\r\n if (tile.faceRight) { graphics.lineBetween(x + tw, y, x + tw, y + th); }\r\n if (tile.faceBottom) { graphics.lineBetween(x, y + th, x + tw, y + th); }\r\n if (tile.faceLeft) { graphics.lineBetween(x, y, x, y + th); }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = RenderDebug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RenderDebug.js?')},"./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.ReplaceByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ReplaceByIndex = function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i] && tiles[i].index === findIndex)\r\n {\r\n tiles[i].index = newIndex;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ReplaceByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollision.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollision = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Update the array of colliding indexes\r\n for (var i = 0; i < indexes.length; i++)\r\n {\r\n SetLayerCollisionIndex(indexes[i], collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (tile && indexes.indexOf(tile.index) !== -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollision.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionBetween\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionBetween = function (start, stop, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (start > stop) { return; }\r\n\r\n // Update the array of colliding indexes\r\n for (var index = start; index <= stop; index++)\r\n {\r\n SetLayerCollisionIndex(index, collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile)\r\n {\r\n if (tile.index >= start && tile.index <= stop)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByExclusion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByExclusion = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Note: this only updates layer.collideIndexes for tile indexes found currently in the layer\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile && indexes.indexOf(tile.index) === -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n SetLayerCollisionIndex(tile.index, collides, layer);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByExclusion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that\r\n * has a value of true. Any tile that doesn\'t have "collides" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a\r\n * "types" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByProperty\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByProperty = function (properties, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n for (var property in properties)\r\n {\r\n if (!HasValue(tile.properties, property)) { continue; }\r\n\r\n var values = properties[property];\r\n if (!Array.isArray(values))\r\n {\r\n values = [ values ];\r\n }\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n if (tile.properties[property] === values[i])\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByProperty;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ \"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js\");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ \"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js\");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionFromCollisionGroup = function (collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n var collisionGroup = tile.getCollisionGroup();\r\n\r\n // It's possible in Tiled to have a collision group without any shapes, e.g. create a\r\n // shape and then delete the shape.\r\n if (collisionGroup && collisionGroup.objects && collisionGroup.objects.length > 0)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionFromCollisionGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js?")},"./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to keep track of the tile indexes that collide within a layer. This\r\n * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The tile index to set the collision boolean for.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetLayerCollisionIndex = function (tileIndex, collides, layer)\r\n{\r\n var loc = layer.collideIndexes.indexOf(tileIndex);\r\n\r\n if (collides && loc === -1)\r\n {\r\n layer.collideIndexes.push(tileIndex);\r\n }\r\n else if (!collides && loc !== -1)\r\n {\r\n layer.collideIndexes.splice(loc, 1);\r\n }\r\n};\r\n\r\nmodule.exports = SetLayerCollisionIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to set the colliding state of a tile. This does not recalculate\r\n * interesting faces.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n */\r\nvar SetTileCollision = function (tile, collides)\r\n{\r\n if (collides)\r\n {\r\n tile.setCollision(true, true, true, true, false);\r\n }\r\n else\r\n {\r\n tile.resetCollision(false);\r\n }\r\n};\r\n\r\nmodule.exports = SetTileCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileCollision.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileIndexCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileIndexCallback = function (indexes, callback, callbackContext, layer)\r\n{\r\n if (typeof indexes === 'number')\r\n {\r\n layer.callbacks[indexes] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n else\r\n {\r\n for (var i = 0, len = indexes.length; i < len; i++)\r\n {\r\n layer.callbacks[indexes[i]] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SetTileIndexCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileLocationCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileLocationCallback = function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].setCollisionCallback(callback, callbackContext);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetTileLocationCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js?')},"./node_modules/phaser/src/tilemaps/components/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ShuffleArray = __webpack_require__(/*! ../../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they\'re all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Shuffle\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Shuffle = function (tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var indexes = tiles.map(function (tile) { return tile.index; });\r\n ShuffleArray(indexes);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = indexes[i];\r\n }\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Shuffle.js?')},"./node_modules/phaser/src/tilemaps/components/SwapByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.SwapByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i])\r\n {\r\n if (tiles[i].index === indexA)\r\n {\r\n tiles[i].index = indexB;\r\n }\r\n else if (tiles[i].index === indexB)\r\n {\r\n tiles[i].index = indexA;\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SwapByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SwapByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldX = function (tileX, camera, layer)\r\n{\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldX = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldX = tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX);\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return layerWorldX + tileX * tileWidth;\r\n};\r\n\r\nmodule.exports = TileToWorldX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldX.js?")},"./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in world coordinates.\r\n */\r\nvar TileToWorldXY = function (tileX, tileY, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = TileToWorldX(tileX, camera, layer);\r\n point.y = TileToWorldY(tileY, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = TileToWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldY = function (tileY, camera, layer)\r\n{\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldY = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldY = (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return layerWorldY + tileY * tileHeight;\r\n};\r\n\r\nmodule.exports = TileToWorldY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldY.js?")},"./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index\'s weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.WeightedRandomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, layer)\r\n{\r\n if (weightedIndexes === undefined) { return; }\r\n\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var weightTotal = 0;\r\n for (i = 0; i < weightedIndexes.length; i++)\r\n {\r\n weightTotal += weightedIndexes[i].weight;\r\n }\r\n\r\n if (weightTotal <= 0) { return; }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var rand = Math.random() * weightTotal;\r\n var sum = 0;\r\n var randomIndex = -1;\r\n for (var j = 0; j < weightedIndexes.length; j++)\r\n {\r\n sum += weightedIndexes[j].weight;\r\n if (rand <= sum)\r\n {\r\n var chosen = weightedIndexes[j].index;\r\n randomIndex = Array.isArray(chosen)\r\n ? chosen[Math.floor(Math.random() * chosen.length)]\r\n : chosen;\r\n break;\r\n }\r\n }\r\n\r\n tiles[i].index = randomIndex;\r\n }\r\n};\r\n\r\nmodule.exports = WeightedRandomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The X location in tile units.\r\n */\r\nvar WorldToTileX = function (worldX, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's horizontal scroll\r\n worldX = worldX - (tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX));\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldX / tileWidth)\r\n : worldX / tileWidth;\r\n};\r\n\r\nmodule.exports = WorldToTileX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileX.js?")},"./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in tile units.\r\n */\r\nvar WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = WorldToTileX(worldX, snapToFloor, camera, layer);\r\n point.y = WorldToTileY(worldY, snapToFloor, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = WorldToTileXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The Y location in tile units.\r\n */\r\nvar WorldToTileY = function (worldY, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's vertical scroll\r\n worldY = worldY - (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldY / tileHeight)\r\n : worldY / tileHeight;\r\n};\r\n\r\nmodule.exports = WorldToTileY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileY.js?")},"./node_modules/phaser/src/tilemaps/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CalculateFacesAt: __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js"),\r\n CalculateFacesWithin: __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js"),\r\n Copy: __webpack_require__(/*! ./Copy */ "./node_modules/phaser/src/tilemaps/components/Copy.js"),\r\n CreateFromTiles: __webpack_require__(/*! ./CreateFromTiles */ "./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js"),\r\n CullTiles: __webpack_require__(/*! ./CullTiles */ "./node_modules/phaser/src/tilemaps/components/CullTiles.js"),\r\n Fill: __webpack_require__(/*! ./Fill */ "./node_modules/phaser/src/tilemaps/components/Fill.js"),\r\n FilterTiles: __webpack_require__(/*! ./FilterTiles */ "./node_modules/phaser/src/tilemaps/components/FilterTiles.js"),\r\n FindByIndex: __webpack_require__(/*! ./FindByIndex */ "./node_modules/phaser/src/tilemaps/components/FindByIndex.js"),\r\n FindTile: __webpack_require__(/*! ./FindTile */ "./node_modules/phaser/src/tilemaps/components/FindTile.js"),\r\n ForEachTile: __webpack_require__(/*! ./ForEachTile */ "./node_modules/phaser/src/tilemaps/components/ForEachTile.js"),\r\n GetTileAt: __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js"),\r\n GetTileAtWorldXY: __webpack_require__(/*! ./GetTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js"),\r\n GetTilesWithin: __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js"),\r\n GetTilesWithinShape: __webpack_require__(/*! ./GetTilesWithinShape */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js"),\r\n GetTilesWithinWorldXY: __webpack_require__(/*! ./GetTilesWithinWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js"),\r\n HasTileAt: __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js"),\r\n HasTileAtWorldXY: __webpack_require__(/*! ./HasTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js"),\r\n IsInLayerBounds: __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js"),\r\n PutTileAt: __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js"),\r\n PutTileAtWorldXY: __webpack_require__(/*! ./PutTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js"),\r\n PutTilesAt: __webpack_require__(/*! ./PutTilesAt */ "./node_modules/phaser/src/tilemaps/components/PutTilesAt.js"),\r\n Randomize: __webpack_require__(/*! ./Randomize */ "./node_modules/phaser/src/tilemaps/components/Randomize.js"),\r\n RemoveTileAt: __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js"),\r\n RemoveTileAtWorldXY: __webpack_require__(/*! ./RemoveTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js"),\r\n RenderDebug: __webpack_require__(/*! ./RenderDebug */ "./node_modules/phaser/src/tilemaps/components/RenderDebug.js"),\r\n ReplaceByIndex: __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js"),\r\n SetCollision: __webpack_require__(/*! ./SetCollision */ "./node_modules/phaser/src/tilemaps/components/SetCollision.js"),\r\n SetCollisionBetween: __webpack_require__(/*! ./SetCollisionBetween */ "./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js"),\r\n SetCollisionByExclusion: __webpack_require__(/*! ./SetCollisionByExclusion */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js"),\r\n SetCollisionByProperty: __webpack_require__(/*! ./SetCollisionByProperty */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js"),\r\n SetCollisionFromCollisionGroup: __webpack_require__(/*! ./SetCollisionFromCollisionGroup */ "./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js"),\r\n SetTileIndexCallback: __webpack_require__(/*! ./SetTileIndexCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js"),\r\n SetTileLocationCallback: __webpack_require__(/*! ./SetTileLocationCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/tilemaps/components/Shuffle.js"),\r\n SwapByIndex: __webpack_require__(/*! ./SwapByIndex */ "./node_modules/phaser/src/tilemaps/components/SwapByIndex.js"),\r\n TileToWorldX: __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js"),\r\n TileToWorldXY: __webpack_require__(/*! ./TileToWorldXY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js"),\r\n TileToWorldY: __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js"),\r\n WeightedRandomize: __webpack_require__(/*! ./WeightedRandomize */ "./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js"),\r\n WorldToTileX: __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js"),\r\n WorldToTileXY: __webpack_require__(/*! ./WorldToTileXY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js"),\r\n WorldToTileY: __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/index.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DynamicTilemapLayerRender = __webpack_require__(/*! ./DynamicTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a\r\n * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the\r\n * tiles in a DynamicTilemapLayer.\r\n * \r\n * Use this over a Static Tilemap Layer when you need those features.\r\n *\r\n * @class DynamicTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar DynamicTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n DynamicTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'DynamicTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally with the canvas render. This holds the tiles that are visible within the\r\n * camera.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * The total number of tiles drawn by the renderer in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles, this._renderOrder);\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces)\r\n {\r\n TilemapComponents.Copy(srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces)\r\n {\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces)\r\n {\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces)\r\n {\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes)\r\n {\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces)\r\n {\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setSkipCull\r\n * @since 3.11.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCullPadding\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|integer[])} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} [callback] - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n shuffle: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will recieve a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes)\r\n {\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var halfWidth = tile.width / 2;\r\n var halfHeight = tile.height / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n \r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n \r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tile.width, tile.height,\r\n -halfWidth, -halfHeight,\r\n tile.width, tile.height\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (tileCount === 0 || alpha <= 0)\r\n {\r\n return;\r\n }\r\n\r\n var gidMap = src.gidMap;\r\n var pipeline = src.pipeline;\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n\r\n var x = src.x;\r\n var y = src.y;\r\n\r\n var sx = src.scaleX;\r\n var sy = src.scaleY;\r\n\r\n var tilesets = src.tileset;\r\n\r\n // Loop through each tileset in this layer, drawing just the tiles that are in that set each time\r\n // Doing it this way around allows us to batch tiles using the same tileset\r\n for (var c = 0; c < tilesets.length; c++)\r\n {\r\n var currentSet = tilesets[c];\r\n var texture = currentSet.glTexture;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (tileset !== currentSet)\r\n {\r\n // Skip tiles that aren\'t in this set\r\n continue;\r\n }\r\n \r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords === null)\r\n {\r\n continue;\r\n }\r\n\r\n var frameWidth = tile.width;\r\n var frameHeight = tile.height;\r\n\r\n var frameX = tileTexCoords.x;\r\n var frameY = tileTexCoords.y;\r\n\r\n var tw = tile.width * 0.5;\r\n var th = tile.height * 0.5;\r\n\r\n var tint = getTint(tile.tint, alpha * tile.alpha);\r\n\r\n pipeline.batchTexture(\r\n src,\r\n texture,\r\n texture.width, texture.height,\r\n x + ((tw + tile.pixelX) * sx), y + ((th + tile.pixelY) * sy),\r\n tile.width, tile.height,\r\n sx, sy,\r\n tile.rotation,\r\n tile.flipX, tile.flipY,\r\n scrollFactorX, scrollFactorY,\r\n tw, th,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tint, tint, tint, tint, false,\r\n 0, 0,\r\n camera,\r\n null,\r\n true\r\n );\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js?')},"./node_modules/phaser/src/tilemaps/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/tilemaps/components/index.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/tilemaps/parsers/index.js"),\r\n\r\n Formats: __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js"),\r\n ImageCollection: __webpack_require__(/*! ./ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js"),\r\n ParseToTilemap: __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js"),\r\n Tile: __webpack_require__(/*! ./Tile */ "./node_modules/phaser/src/tilemaps/Tile.js"),\r\n Tilemap: __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js"),\r\n TilemapCreator: __webpack_require__(/*! ./TilemapCreator */ "./node_modules/phaser/src/tilemaps/TilemapCreator.js"),\r\n TilemapFactory: __webpack_require__(/*! ./TilemapFactory */ "./node_modules/phaser/src/tilemaps/TilemapFactory.js"),\r\n Tileset: __webpack_require__(/*! ./Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js"),\r\n\r\n LayerData: __webpack_require__(/*! ./mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js"),\r\n MapData: __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js"),\r\n ObjectLayer: __webpack_require__(/*! ./mapdata/ObjectLayer */ "./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js"),\r\n\r\n DynamicTilemapLayer: __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js"),\r\n StaticTilemapLayer: __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/index.js?')},"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled,\r\n * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference\r\n * to this data and use it to look up and perform operations on tiles.\r\n *\r\n * @class LayerData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} [config] - [description]\r\n */\r\nvar LayerData = new Class({\r\n\r\n initialize:\r\n\r\n function LayerData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the layer, if specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'layer');\r\n\r\n /**\r\n * The x offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = GetFastValue(config, 'x', 0);\r\n\r\n /**\r\n * The y offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = GetFastValue(config, 'y', 0);\r\n\r\n /**\r\n * The width in tile of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height in tiles of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * The pixel width of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The pixel height of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileHeight = GetFastValue(config, 'baseTileHeight', this.tileHeight);\r\n\r\n /**\r\n * The width in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.baseTileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.alpha = GetFastValue(config, 'alpha', 1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * Layer specific properties (can be specified in Tiled)\r\n *\r\n * @name Phaser.Tilemaps.LayerData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#indexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.indexes = GetFastValue(config, 'indexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#collideIndexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.collideIndexes = GetFastValue(config, 'collideIndexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#callbacks\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = GetFastValue(config, 'callbacks', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#bodies\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.bodies = GetFastValue(config, 'bodies', []);\r\n\r\n /**\r\n * An array of the tile indexes\r\n *\r\n * @name Phaser.Tilemaps.LayerData#data\r\n * @type {(number[])}\r\n * @since 3.0.0\r\n */\r\n this.data = GetFastValue(config, 'data', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tilemapLayer\r\n * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)}\r\n * @since 3.0.0\r\n */\r\n this.tilemapLayer = GetFastValue(config, 'tilemapLayer', null);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LayerData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/LayerData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/MapData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this\r\n * format. A Tilemap object get a copy of this data and then unpacks the needed properties into\r\n * itself.\r\n *\r\n * @class MapData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.MapDataConfig} [config] - The Map configuration object.\r\n */\r\nvar MapData = new Class({\r\n\r\n initialize:\r\n\r\n function MapData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * \r\n * @name Phaser.Tilemaps.MapData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'map');\r\n\r\n /**\r\n * The width of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * If the map is infinite or not.\r\n *\r\n * @name Phaser.Tilemaps.MapData#infinite\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.infinite = GetFastValue(config, 'infinite', false);\r\n\r\n /**\r\n * The width of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The height of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * The width in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.tileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#format\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.format = GetFastValue(config, 'format', null);\r\n\r\n /**\r\n * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.\r\n * \r\n * @name Phaser.Tilemaps.MapData#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = GetFastValue(config, 'orientation', 'orthogonal');\r\n\r\n /**\r\n * Determines the draw order of tilemap. Default is right-down\r\n * \r\n * 0, or 'right-down'\r\n * 1, or 'left-down'\r\n * 2, or 'right-up'\r\n * 3, or 'left-up'\r\n * \r\n * @name Phaser.Tilemaps.MapData#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = GetFastValue(config, 'renderOrder', 'right-down');\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled).\r\n * \r\n * @name Phaser.Tilemaps.MapData#version\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.version = GetFastValue(config, 'version', '1');\r\n\r\n /**\r\n * Map specific properties (can be specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * An array with all the layers configured to the MapData.\r\n * \r\n * @name Phaser.Tilemaps.MapData#layers\r\n * @type {(Phaser.Tilemaps.LayerData[]|Phaser.Tilemaps.ObjectLayer)}\r\n * @since 3.0.0\r\n */\r\n this.layers = GetFastValue(config, 'layers', []);\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = GetFastValue(config, 'images', []);\r\n\r\n /**\r\n * An object of Tiled Object Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#objects\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', {});\r\n\r\n /**\r\n * An object of collision data. Must be created as physics object or will return undefined.\r\n * \r\n * @name Phaser.Tilemaps.MapData#collision\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collision = GetFastValue(config, 'collision', {});\r\n\r\n /**\r\n * An array of Tilesets.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = GetFastValue(config, 'tilesets', []);\r\n\r\n /**\r\n * The collection of images the map uses(specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#imageCollections\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = GetFastValue(config, 'imageCollections', []);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#tiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.tiles = GetFastValue(config, 'tiles', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MapData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/MapData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled\r\n * object layer, except:\r\n * - \"x\" & \"y\" properties are ignored since these cannot be changed in Tiled.\r\n * - \"offsetx\" & \"offsety\" are applied to the individual object coordinates directly, so they\r\n * are ignored as well.\r\n * - \"draworder\" is ignored.\r\n *\r\n * @class ObjectLayer\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.ObjectLayerConfig} [config] - The data for the layer from the Tiled JSON object.\r\n */\r\nvar ObjectLayer = new Class({\r\n\r\n initialize:\r\n\r\n function ObjectLayer (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the Object Layer.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'object layer');\r\n\r\n /**\r\n * The opacity of the layer, between 0 and 1.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#opacity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.opacity = GetFastValue(config, 'opacity', 1);\r\n\r\n /**\r\n * The custom properties defined on the Object Layer, keyed by their name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * The type of each custom property defined on the Object Layer, keyed by its name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#propertyTypes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.propertyTypes = GetFastValue(config, 'propertytypes', {});\r\n\r\n /**\r\n * The type of the layer, which should be `objectgroup`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(config, 'type', 'objectgroup');\r\n\r\n /**\r\n * Whether the layer is shown (`true`) or hidden (`false`).\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * An array of all objects on this Object Layer.\r\n *\r\n * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique),\r\n * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees),\r\n * `properties` (if any), `visible` state (`true` if visible, `false` otherwise),\r\n * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels).\r\n *\r\n * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property,\r\n * a `flippedVertical` property, and `flippedAntiDiagonal` property.\r\n * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains\r\n * information on flipping and rotation.\r\n *\r\n * Polylines have a `polyline` property, which is an array of objects corresponding to points,\r\n * where each point has an `x` property and a `y` property. Polygons have an identically structured\r\n * array in their `polygon` property. Text objects have a `text` property with the text's properties.\r\n *\r\n * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#objects\r\n * @type {Phaser.Types.Tilemaps.TiledObject[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ObjectLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js?")},"./node_modules/phaser/src/tilemaps/parsers/Parse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js");\r\nvar ParseCSV = __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js");\r\nvar ParseJSONTiled = __webpack_require__(/*! ./tiled/ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js");\r\nvar ParseWeltmeister = __webpack_require__(/*! ./impact/ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js");\r\n\r\n/**\r\n * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format\r\n * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth &\r\n * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from\r\n * the map data.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer} mapFormat - See ../Formats.js.\r\n * @param {(integer[][]|string|object)} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {integer} tileHeight - The height of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The created `MapData` object.\r\n */\r\nvar Parse = function (name, mapFormat, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var newMap;\r\n\r\n switch (mapFormat)\r\n {\r\n case (Formats.ARRAY_2D):\r\n newMap = Parse2DArray(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.CSV):\r\n newMap = ParseCSV(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.TILED_JSON):\r\n newMap = ParseJSONTiled(name, data, insertNull);\r\n break;\r\n case (Formats.WELTMEISTER):\r\n newMap = ParseWeltmeister(name, data, insertNull);\r\n break;\r\n default:\r\n console.warn(\'Unrecognized tilemap data format: \' + mapFormat);\r\n newMap = null;\r\n }\r\n\r\n return newMap;\r\n};\r\n\r\nmodule.exports = Parse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse.js?')},"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar LayerData = __webpack_require__(/*! ../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar MapData = __webpack_require__(/*! ../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * Parses a 2D array of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse2DArray\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer[][]} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} [description]\r\n */\r\nvar Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var layerData = new LayerData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight\r\n });\r\n\r\n var mapData = new MapData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n format: Formats.ARRAY_2D,\r\n layers: [ layerData ]\r\n });\r\n\r\n var tiles = [];\r\n var height = data.length;\r\n var width = 0;\r\n\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n tiles[y] = [];\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var tileIndex = parseInt(row[x], 10);\r\n\r\n if (isNaN(tileIndex) || tileIndex === -1)\r\n {\r\n tiles[y][x] = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, tileWidth, tileHeight);\r\n }\r\n else\r\n {\r\n tiles[y][x] = new Tile(layerData, tileIndex, x, y, tileWidth, tileHeight);\r\n }\r\n }\r\n\r\n if (width === 0)\r\n {\r\n width = row.length;\r\n }\r\n }\r\n\r\n mapData.width = layerData.width = width;\r\n mapData.height = layerData.height = height;\r\n mapData.widthInPixels = layerData.widthInPixels = width * tileWidth;\r\n mapData.heightInPixels = layerData.heightInPixels = height * tileHeight;\r\n layerData.data = tiles;\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = Parse2DArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js?')},"./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ \"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js\");\r\n\r\n/**\r\n * Parses a CSV string of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.ParseCSV\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {string} data - CSV string of tile indexes.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The resulting MapData object.\r\n */\r\nvar ParseCSV = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var array2D = data\r\n .trim()\r\n .split('\\n')\r\n .map(function (row) { return row.split(','); });\r\n\r\n var map = Parse2DArray(name, array2D, tileWidth, tileHeight, insertNull);\r\n map.format = Formats.CSV;\r\n\r\n return map;\r\n};\r\n\r\nmodule.exports = ParseCSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n var layerData = new LayerData({\r\n name: layer.name,\r\n width: layer.width,\r\n height: layer.height,\r\n tileWidth: layer.tilesize,\r\n tileHeight: layer.tilesize,\r\n visible: layer.visible === 1\r\n });\r\n\r\n var row = [];\r\n var tileGrid = [];\r\n\r\n // Loop through the data field in the JSON. This is a 2D array containing the tile indexes,\r\n // one after the other. The indexes are relative to the tileset that contains the tile.\r\n for (var y = 0; y < layer.data.length; y++)\r\n {\r\n for (var x = 0; x < layer.data[y].length; x++)\r\n {\r\n // In Weltmeister, 0 = no tile, but the Tilemap API expects -1 = no tile.\r\n var index = layer.data[y][x] - 1;\r\n\r\n var tile;\r\n\r\n if (index > -1)\r\n {\r\n tile = new Tile(layerData, index, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n else\r\n {\r\n tile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n\r\n row.push(tile);\r\n }\r\n\r\n tileGrid.push(row);\r\n row = [];\r\n }\r\n\r\n layerData.data = tileGrid;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var tilesetsNames = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n // A relative filepath to the source image (within Weltmeister) is used for the name\r\n var tilesetName = layer.tilesetName;\r\n\r\n // Only add unique tilesets that have a valid name. Collision layers will have a blank name.\r\n if (tilesetName !== '' && tilesetsNames.indexOf(tilesetName) === -1)\r\n {\r\n tilesetsNames.push(tilesetName);\r\n\r\n // Tiles are stored with an ID relative to the tileset, rather than a globally unique ID\r\n // across all tilesets. Also, tilesets in Weltmeister have no margin or padding.\r\n tilesets.push(new Tileset(tilesetName, 0, layer.tilesize, layer.tilesize, 0, 0));\r\n }\r\n }\r\n\r\n return tilesets;\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js");\r\n\r\n/**\r\n * Parses a Weltmeister JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseWeltmeister\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Weltmeister JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?object} [description]\r\n */\r\nvar ParseWeltmeister = function (name, json, insertNull)\r\n{\r\n if (json.layer.length === 0)\r\n {\r\n console.warn(\'No layers found in the Weltmeister map: \' + name);\r\n return null;\r\n }\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n if (json.layer[i].width > width) { width = json.layer[i].width; }\r\n if (json.layer[i].height > height) { height = json.layer[i].height; }\r\n }\r\n\r\n var mapData = new MapData({\r\n width: width,\r\n height: height,\r\n name: name,\r\n tileWidth: json.layer[0].tilesize,\r\n tileHeight: json.layer[0].tilesize,\r\n format: Formats.WELTMEISTER\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.tilesets = ParseTilesets(json);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseWeltmeister;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Impact\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js"),\r\n ParseWeltmeister: __webpack_require__(/*! ./ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Parse: __webpack_require__(/*! ./Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js"),\r\n Parse2DArray: __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js"),\r\n ParseCSV: __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js"),\r\n\r\n Impact: __webpack_require__(/*! ./impact/ */ "./node_modules/phaser/src/tilemaps/parsers/impact/index.js"),\r\n Tiled: __webpack_require__(/*! ./tiled/ */ "./node_modules/phaser/src/tilemaps/parsers/tiled/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * Copy properties from tileset to tiles.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n */\r\nvar AssignTileProperties = function (mapData)\r\n{\r\n var layerData;\r\n var tile;\r\n var sid;\r\n var set;\r\n var row;\r\n\r\n // go through each of the map data layers\r\n for (var i = 0; i < mapData.layers.length; i++)\r\n {\r\n layerData = mapData.layers[i];\r\n\r\n set = null;\r\n\r\n // rows of tiles\r\n for (var j = 0; j < layerData.data.length; j++)\r\n {\r\n row = layerData.data[j];\r\n\r\n // individual tiles\r\n for (var k = 0; k < row.length; k++)\r\n {\r\n tile = row[k];\r\n\r\n if (tile === null || tile.index < 0)\r\n {\r\n continue;\r\n }\r\n\r\n // find the relevant tileset\r\n sid = mapData.tiles[tile.index][2];\r\n set = mapData.tilesets[sid];\r\n\r\n // Ensure that a tile\'s size matches its tileset\r\n tile.width = set.tileWidth;\r\n tile.height = set.tileHeight;\r\n\r\n // if that tile type has any properties, add them to the tile object\r\n if (set.tileProperties && set.tileProperties[tile.index - set.firstgid])\r\n {\r\n tile.properties = Extend(\r\n tile.properties, set.tileProperties[tile.index - set.firstgid]\r\n );\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = AssignTileProperties;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decode base-64 encoded data, for example as exported by Tiled.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.Base64Decode\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Base-64 encoded data to decode.\r\n *\r\n * @return {array} Array containing the decoded bytes.\r\n */\r\nvar Base64Decode = function (data)\r\n{\r\n var binaryString = window.atob(data);\r\n var len = binaryString.length;\r\n var bytes = new Array(len / 4);\r\n\r\n // Interpret binaryString as an array of bytes representing little-endian encoded uint32 values.\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n bytes[i / 4] = (\r\n binaryString.charCodeAt(i) |\r\n binaryString.charCodeAt(i + 1) << 8 |\r\n binaryString.charCodeAt(i + 2) << 16 |\r\n binaryString.charCodeAt(i + 3) << 24\r\n ) >>> 0;\r\n }\r\n\r\n return bytes;\r\n};\r\n\r\nmodule.exports = Base64Decode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Master list of tiles -> x, y, index in tileset.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar BuildTilesetIndex = function (mapData)\r\n{\r\n var tiles = [];\r\n\r\n for (var i = 0; i < mapData.tilesets.length; i++)\r\n {\r\n var set = mapData.tilesets[i];\r\n\r\n var x = set.tileMargin;\r\n var y = set.tileMargin;\r\n\r\n var count = 0;\r\n var countX = 0;\r\n var countY = 0;\r\n\r\n for (var t = set.firstgid; t < set.firstgid + set.total; t++)\r\n {\r\n // Can add extra properties here as needed\r\n tiles[t] = [ x, y, i ];\r\n\r\n x += set.tileWidth + set.tileSpacing;\r\n\r\n count++;\r\n\r\n if (count === set.total)\r\n {\r\n break;\r\n }\r\n\r\n countX++;\r\n\r\n if (countX === set.columns)\r\n {\r\n x = set.tileMargin;\r\n y += set.tileHeight + set.tileSpacing;\r\n\r\n countX = 0;\r\n countY++;\r\n\r\n if (countY === set.rows)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return tiles;\r\n};\r\n\r\nmodule.exports = BuildTilesetIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FLIPPED_HORIZONTAL = 0x80000000;\r\nvar FLIPPED_VERTICAL = 0x40000000;\r\nvar FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left corners\r\n\r\n/**\r\n * See Tiled documentation on tile flipping:\r\n * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID\r\n * @since 3.0.0\r\n *\r\n * @param {number} gid - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseGID = function (gid)\r\n{\r\n var flippedHorizontal = Boolean(gid & FLIPPED_HORIZONTAL);\r\n var flippedVertical = Boolean(gid & FLIPPED_VERTICAL);\r\n var flippedAntiDiagonal = Boolean(gid & FLIPPED_ANTI_DIAGONAL);\r\n gid = gid & ~(FLIPPED_HORIZONTAL | FLIPPED_VERTICAL | FLIPPED_ANTI_DIAGONAL);\r\n\r\n // Parse the flip flags into something Phaser can use\r\n var rotation = 0;\r\n var flipped = false;\r\n\r\n if (flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = false;\r\n }\r\n\r\n return {\r\n gid: gid,\r\n flippedHorizontal: flippedHorizontal,\r\n flippedVertical: flippedVertical,\r\n flippedAntiDiagonal: flippedAntiDiagonal,\r\n rotation: rotation,\r\n flipped: flipped\r\n };\r\n};\r\n\r\nmodule.exports = ParseGID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseImageLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseImageLayers = function (json)\r\n{\r\n var images = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'imagelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curi = json.layers[i];\r\n\r\n images.push({\r\n name: curi.name,\r\n image: curi.image,\r\n x: GetFastValue(curi, 'offsetx', 0) + curi.x,\r\n y: GetFastValue(curi, 'offsety', 0) + curi.y,\r\n alpha: curi.opacity,\r\n visible: curi.visible,\r\n properties: GetFastValue(curi, 'properties', {})\r\n });\r\n }\r\n\r\n return images;\r\n};\r\n\r\nmodule.exports = ParseImageLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js");\r\nvar ParseImageLayers = __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js");\r\nvar ParseObjectLayers = __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js");\r\nvar BuildTilesetIndex = __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js");\r\nvar AssignTileProperties = __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js");\r\n\r\n/**\r\n * Parses a Tiled JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Tiled JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can\'t be parsed.\r\n */\r\nvar ParseJSONTiled = function (name, json, insertNull)\r\n{\r\n if (json.orientation !== \'orthogonal\')\r\n {\r\n console.warn(\'Only orthogonal map types are supported in this version of Phaser\');\r\n return null;\r\n }\r\n\r\n // Map data will consist of: layers, objects, images, tilesets, sizes\r\n var mapData = new MapData({\r\n width: json.width,\r\n height: json.height,\r\n name: name,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n orientation: json.orientation,\r\n format: Formats.TILED_JSON,\r\n version: json.version,\r\n properties: json.properties,\r\n renderOrder: json.renderorder,\r\n infinite: json.infinite\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.images = ParseImageLayers(json);\r\n\r\n var sets = ParseTilesets(json);\r\n mapData.tilesets = sets.tilesets;\r\n mapData.imageCollections = sets.imageCollections;\r\n\r\n mapData.objects = ParseObjectLayers(json);\r\n\r\n mapData.tiles = BuildTilesetIndex(mapData);\r\n\r\n AssignTileProperties(mapData);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseJSONTiled;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pick = __webpack_require__(/*! ../../../utils/object/Pick */ \"./node_modules/phaser/src/utils/object/Pick.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\n\r\nvar copyPoints = function (p) { return { x: p.x, y: p.y }; };\r\n\r\nvar commonObjectProps = [ 'id', 'name', 'type', 'rotation', 'properties', 'visible', 'x', 'y', 'width', 'height' ];\r\n\r\n/**\r\n * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.)\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} tiledObject - Tiled object to convert to an internal parsed object normalising and copying properties over.\r\n * @param {number} [offsetX=0] - Optional additional offset to apply to the object's x property. Defaults to 0.\r\n * @param {number} [offsetY=0] - Optional additional offset to apply to the object's y property. Defaults to 0.\r\n *\r\n * @return {object} The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.\r\n */\r\nvar ParseObject = function (tiledObject, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n var parsedObject = Pick(tiledObject, commonObjectProps);\r\n\r\n parsedObject.x += offsetX;\r\n parsedObject.y += offsetY;\r\n\r\n if (tiledObject.gid)\r\n {\r\n // Object tiles\r\n var gidInfo = ParseGID(tiledObject.gid);\r\n parsedObject.gid = gidInfo.gid;\r\n parsedObject.flippedHorizontal = gidInfo.flippedHorizontal;\r\n parsedObject.flippedVertical = gidInfo.flippedVertical;\r\n parsedObject.flippedAntiDiagonal = gidInfo.flippedAntiDiagonal;\r\n }\r\n else if (tiledObject.polyline)\r\n {\r\n parsedObject.polyline = tiledObject.polyline.map(copyPoints);\r\n }\r\n else if (tiledObject.polygon)\r\n {\r\n parsedObject.polygon = tiledObject.polygon.map(copyPoints);\r\n }\r\n else if (tiledObject.ellipse)\r\n {\r\n parsedObject.ellipse = tiledObject.ellipse;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n else if (tiledObject.text)\r\n {\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n parsedObject.text = tiledObject.text;\r\n }\r\n else\r\n {\r\n // Otherwise, assume it is a rectangle\r\n parsedObject.rectangle = true;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n\r\n return parsedObject;\r\n};\r\n\r\nmodule.exports = ParseObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js\");\r\nvar ObjectLayer = __webpack_require__(/*! ../../mapdata/ObjectLayer */ \"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js\");\r\n\r\n/**\r\n * Parses a Tiled JSON object into an array of ObjectLayer objects.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObjectLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - The Tiled JSON object.\r\n *\r\n * @return {array} An array of all object layers in the tilemap as `ObjectLayer`s.\r\n */\r\nvar ParseObjectLayers = function (json)\r\n{\r\n var objectLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'objectgroup')\r\n {\r\n continue;\r\n }\r\n\r\n var curo = json.layers[i];\r\n var offsetX = GetFastValue(curo, 'offsetx', 0);\r\n var offsetY = GetFastValue(curo, 'offsety', 0);\r\n var objects = [];\r\n\r\n for (var j = 0; j < curo.objects.length; j++)\r\n {\r\n var parsedObject = ParseObject(curo.objects[j], offsetX, offsetY);\r\n\r\n objects.push(parsedObject);\r\n }\r\n\r\n var objectLayer = new ObjectLayer(curo);\r\n objectLayer.objects = objects;\r\n\r\n objectLayers.push(objectLayer);\r\n }\r\n\r\n return objectLayers;\r\n};\r\n\r\nmodule.exports = ParseObjectLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64Decode = __webpack_require__(/*! ./Base64Decode */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var infiniteMap = GetFastValue(json, 'infinite', false);\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'tilelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curl = json.layers[i];\r\n\r\n // Base64 decode data if necessary. NOTE: uncompressed base64 only.\r\n if (curl.compression)\r\n {\r\n console.warn(\r\n 'TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer \\''\r\n + curl.name + '\\''\r\n );\r\n continue;\r\n }\r\n else if (curl.encoding && curl.encoding === 'base64')\r\n {\r\n curl.data = Base64Decode(curl.data);\r\n delete curl.encoding; // Allow the same map to be parsed multiple times\r\n }\r\n\r\n // This is an array containing the tile indexes, one after the other. -1 = no tile,\r\n // everything else = the tile index (starting at 1 for Tiled, 0 for CSV) If the map\r\n // contains multiple tilesets then the indexes are relative to that which the set starts\r\n // from. Need to set which tileset in the cache = which tileset in the JSON, if you do this\r\n // manually it means you can use the same map data but a new tileset.\r\n\r\n var layerData;\r\n var gidInfo;\r\n var tile;\r\n var blankTile;\r\n\r\n var output = [];\r\n var x = 0;\r\n\r\n if (infiniteMap)\r\n {\r\n var layerOffsetX = GetFastValue(curl, 'startx', 0) + curl.x;\r\n var layerOffsetY = GetFastValue(curl, 'starty', 0) + curl.y;\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: layerOffsetX,\r\n y: layerOffsetY,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n for (var c = 0; c < curl.height; c++)\r\n {\r\n output.push([ null ]);\r\n\r\n for (var j = 0; j < curl.width; j++)\r\n {\r\n output[c][j] = null;\r\n }\r\n }\r\n\r\n for (c = 0, len = curl.chunks.length; c < len; c++)\r\n {\r\n var chunk = curl.chunks[c];\r\n\r\n var offsetX = (chunk.x - layerOffsetX);\r\n var offsetY = (chunk.y - layerOffsetY);\r\n\r\n var y = 0;\r\n\r\n for (var t = 0, len2 = chunk.data.length; t < len2; t++)\r\n {\r\n var newOffsetX = x + offsetX;\r\n var newOffsetY = y + offsetY;\r\n\r\n gidInfo = ParseGID(chunk.data[t]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, newOffsetX, newOffsetY, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n output[newOffsetY][newOffsetX] = tile;\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, newOffsetX, newOffsetY, json.tilewidth, json.tileheight);\r\n\r\n output[newOffsetY][newOffsetX] = blankTile;\r\n }\r\n\r\n x++;\r\n\r\n if (x === chunk.width)\r\n {\r\n y++;\r\n x = 0;\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: GetFastValue(curl, 'offsetx', 0) + curl.x,\r\n y: GetFastValue(curl, 'offsety', 0) + curl.y,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n var row = [];\r\n\r\n // Loop through the data field in the JSON.\r\n for (var k = 0, len = curl.data.length; k < len; k++)\r\n {\r\n gidInfo = ParseGID(curl.data[k]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, x, output.length, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n row.push(tile);\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, output.length, json.tilewidth, json.tileheight);\r\n row.push(blankTile);\r\n }\r\n\r\n x++;\r\n\r\n if (x === curl.width)\r\n {\r\n output.push(row);\r\n x = 0;\r\n row = [];\r\n }\r\n }\r\n }\r\n\r\n layerData.data = output;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js");\r\nvar ImageCollection = __webpack_require__(/*! ../../ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js");\r\n\r\n/**\r\n * Tilesets and Image Collections\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var imageCollections = [];\r\n var lastSet = null;\r\n var stringID;\r\n\r\n for (var i = 0; i < json.tilesets.length; i++)\r\n {\r\n // name, firstgid, width, height, margin, spacing, properties\r\n var set = json.tilesets[i];\r\n\r\n if (set.source)\r\n {\r\n console.warn(\'Phaser can\\\'t load external tilesets. Use the Embed Tileset button and then export the map again.\');\r\n }\r\n else if (set.image)\r\n {\r\n var newSet = new Tileset(set.name, set.firstgid, set.tilewidth, set.tileheight, set.margin, set.spacing);\r\n\r\n if (json.version > 1)\r\n {\r\n // Tiled 1.2+\r\n\r\n if (Array.isArray(set.tiles))\r\n {\r\n var tiles = {};\r\n var props = {};\r\n\r\n for (var t = 0; t < set.tiles.length; t++)\r\n {\r\n var tile = set.tiles[t];\r\n\r\n // Convert tileproperties\r\n if (tile.properties)\r\n {\r\n var newPropData = {};\r\n\r\n tile.properties.forEach(function (propData)\r\n {\r\n newPropData[propData[\'name\']] = propData[\'value\'];\r\n });\r\n\r\n props[tile.id] = newPropData;\r\n }\r\n\r\n // Convert objectgroup\r\n if (tile.objectgroup)\r\n {\r\n tiles[tile.id] = { objectgroup: tile.objectgroup };\r\n\r\n if (tile.objectgroup.objects)\r\n {\r\n var parsedObjects2 = tile.objectgroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n\r\n tiles[tile.id].objectgroup.objects = parsedObjects2;\r\n }\r\n }\r\n\r\n // Copy animation data\r\n if (tile.animation)\r\n {\r\n if (tiles.hasOwnProperty(tile.id))\r\n {\r\n tiles[tile.id].animation = tile.animation;\r\n }\r\n else\r\n {\r\n tiles[tile.id] = { animation: tile.animation };\r\n }\r\n }\r\n }\r\n\r\n newSet.tileData = tiles;\r\n newSet.tileProperties = props;\r\n }\r\n }\r\n else\r\n {\r\n // Tiled 1\r\n\r\n // Properties stored per-tile in object with string indexes starting at "0"\r\n if (set.tileproperties)\r\n {\r\n newSet.tileProperties = set.tileproperties;\r\n }\r\n\r\n // Object & terrain shapes stored per-tile in object with string indexes starting at "0"\r\n if (set.tiles)\r\n {\r\n newSet.tileData = set.tiles;\r\n\r\n // Parse the objects into Phaser format to match handling of other Tiled objects\r\n for (stringID in newSet.tileData)\r\n {\r\n var objectGroup = newSet.tileData[stringID].objectgroup;\r\n if (objectGroup && objectGroup.objects)\r\n {\r\n var parsedObjects1 = objectGroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n newSet.tileData[stringID].objectgroup.objects = parsedObjects1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // For a normal sliced tileset the row/count/size information is computed when updated.\r\n // This is done (again) after the image is set.\r\n newSet.updateTileData(set.imagewidth, set.imageheight);\r\n\r\n tilesets.push(newSet);\r\n }\r\n else\r\n {\r\n var newCollection = new ImageCollection(set.name, set.firstgid, set.tilewidth,\r\n set.tileheight, set.margin, set.spacing, set.properties);\r\n\r\n for (stringID in set.tiles)\r\n {\r\n var image = set.tiles[stringID].image;\r\n var gid = set.firstgid + parseInt(stringID, 10);\r\n newCollection.addImage(gid, image);\r\n }\r\n\r\n imageCollections.push(newCollection);\r\n }\r\n\r\n // We\'ve got a new Tileset, so set the lastgid into the previous one\r\n if (lastSet)\r\n {\r\n lastSet.lastgid = set.firstgid - 1;\r\n }\r\n\r\n lastSet = set;\r\n }\r\n\r\n return { tilesets: tilesets, imageCollections: imageCollections };\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Tiled\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AssignTileProperties: __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js"),\r\n Base64Decode: __webpack_require__(/*! ./Base64Decode */ "./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js"),\r\n BuildTilesetIndex: __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js"),\r\n ParseGID: __webpack_require__(/*! ./ParseGID */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js"),\r\n ParseImageLayers: __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js"),\r\n ParseJSONTiled: __webpack_require__(/*! ./ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js"),\r\n ParseObject: __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js"),\r\n ParseObjectLayers: __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js"),\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/index.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar StaticTilemapLayerRender = __webpack_require__(/*! ./StaticTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Static Tilemap Layer is optimized for rendering speed over flexibility. You cannot apply per-tile\r\n * effects like tint or alpha, or change the tiles or tilesets the layer uses.\r\n * \r\n * Use a Static Tilemap Layer instead of a Dynamic Tilemap Layer when you don't need tile manipulation features.\r\n *\r\n * @class StaticTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar StaticTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n StaticTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function StaticTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'StaticTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally by the Canvas renderer.\r\n * This holds the tiles that are visible within the camera in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles drawn by the renderer in the last frame.\r\n * \r\n * This only works when rending with Canvas.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.12.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * A reference to the renderer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * An array of vertex buffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexBuffer\r\n * @type {WebGLBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = [];\r\n\r\n /**\r\n * An array of ArrayBuffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#bufferData\r\n * @type {ArrayBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.bufferData = [];\r\n\r\n /**\r\n * An array of Float32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewF32\r\n * @type {Float32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = [];\r\n\r\n /**\r\n * An array of Uint32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewU32\r\n * @type {Uint32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = [];\r\n\r\n /**\r\n * An array of booleans, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single boolean.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#dirty\r\n * @type {boolean[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dirty = [];\r\n\r\n /**\r\n * An array of integers, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single integer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexCount\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = [];\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_tempMatrix\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.14.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.updateVBOData();\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.updateVBOData();\r\n }, this);\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Prepares the VBO data arrays for population by the `upload` method.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#updateVBOData\r\n * @private\r\n * @since 3.14.0\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n updateVBOData: function ()\r\n {\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Upload the tile data to a VBO.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#upload\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to render to.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n upload: function (camera, tilesetIndex)\r\n {\r\n var renderer = this.renderer;\r\n var gl = renderer.gl;\r\n\r\n var pipeline = renderer.pipelines.TextureTintPipeline;\r\n\r\n if (this.dirty[tilesetIndex])\r\n {\r\n var tileset = this.tileset[tilesetIndex];\r\n var mapWidth = this.layer.width;\r\n var mapHeight = this.layer.height;\r\n var width = tileset.image.source[0].width;\r\n var height = tileset.image.source[0].height;\r\n var mapData = this.layer.data;\r\n var tile;\r\n var row;\r\n var col;\r\n var renderOrder = this._renderOrder;\r\n var minTileIndex = tileset.firstgid;\r\n var maxTileIndex = tileset.firstgid + tileset.total;\r\n \r\n var vertexBuffer = this.vertexBuffer[tilesetIndex];\r\n var bufferData = this.bufferData[tilesetIndex];\r\n var vOffset = -1;\r\n var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6;\r\n\r\n this.vertexCount[tilesetIndex] = 0;\r\n \r\n if (bufferData === null)\r\n {\r\n bufferData = new ArrayBuffer(bufferSize);\r\n\r\n this.bufferData[tilesetIndex] = bufferData;\r\n\r\n this.vertexViewF32[tilesetIndex] = new Float32Array(bufferData);\r\n this.vertexViewU32[tilesetIndex] = new Uint32Array(bufferData);\r\n }\r\n \r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n \r\n this.dirty[tilesetIndex] = false;\r\n \r\n if (vertexBuffer === null)\r\n {\r\n vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW);\r\n \r\n this.vertexBuffer[tilesetIndex] = vertexBuffer;\r\n }\r\n else\r\n {\r\n renderer.setVertexBuffer(vertexBuffer);\r\n \r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a single tile into the batch.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#batchTile\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {integer} vOffset - The vertex offset.\r\n * @param {any} tile - The tile being rendered.\r\n * @param {any} tileset - The tileset being used for rendering.\r\n * @param {integer} width - The width of the tileset image in pixels.\r\n * @param {integer} height - The height of the tileset image in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the layer is being rendered with.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {integer} The new vOffset value.\r\n */\r\n batchTile: function (vOffset, tile, tileset, width, height, camera, tilesetIndex)\r\n {\r\n var texCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (!texCoords)\r\n {\r\n return vOffset;\r\n }\r\n\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n\r\n var halfTileWidth = tileWidth / 2;\r\n var halfTileHeight = tileHeight / 2;\r\n\r\n var u0 = texCoords.x / width;\r\n var v0 = texCoords.y / height;\r\n var u1 = (texCoords.x + tileWidth) / width;\r\n var v1 = (texCoords.y + tileHeight) / height;\r\n\r\n var matrix = this._tempMatrix;\r\n\r\n var x = -halfTileWidth;\r\n var y = -halfTileHeight;\r\n\r\n if (tile.flipX)\r\n {\r\n tileWidth *= -1;\r\n x += tileset.tileWidth;\r\n }\r\n\r\n if (tile.flipY)\r\n {\r\n tileHeight *= -1;\r\n y += tileset.tileHeight;\r\n }\r\n\r\n var xw = x + tileWidth;\r\n var yh = y + tileHeight;\r\n\r\n matrix.applyITRS(halfTileWidth + tile.pixelX, halfTileHeight + tile.pixelY, tile.rotation, 1, 1);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, camera.alpha * this.alpha * tile.alpha);\r\n\r\n var tx0 = matrix.getX(x, y);\r\n var ty0 = matrix.getY(x, y);\r\n\r\n var tx1 = matrix.getX(x, yh);\r\n var ty1 = matrix.getY(x, yh);\r\n\r\n var tx2 = matrix.getX(xw, yh);\r\n var ty2 = matrix.getY(xw, yh);\r\n\r\n var tx3 = matrix.getX(xw, y);\r\n var ty3 = matrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32[tilesetIndex];\r\n var vertexViewU32 = this.vertexViewU32[tilesetIndex];\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx1;\r\n vertexViewF32[++vOffset] = ty1;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx3;\r\n vertexViewF32[++vOffset] = ty3;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n this.vertexCount[tilesetIndex] += 6;\r\n\r\n return vOffset;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles);\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setSkipCull\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCullPadding\r\n * @since 3.12.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} worldY - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {number} height - How many tiles high from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from in tile coordinates.\r\n * @param {integer} tileY - Y position to get the tile from in tile coordinates.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should\r\n * be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a\r\n * collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.]\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Destroys this StaticTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n // Undo the camera scroll\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n ctx.globalAlpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n var halfWidth = tileWidth / 2;\r\n var halfHeight = tileHeight / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n\r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n\r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tileWidth, tileHeight,\r\n -halfWidth, -halfHeight,\r\n tileWidth, tileHeight\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StaticTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StaticTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * \r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n * \r\n * A Static Tilemap Layer renders immediately and does not use any batching.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n var tilesets = src.tileset;\r\n\r\n var pipeline = src.pipeline;\r\n var pipelineVertexBuffer = pipeline.vertexBuffer;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n pipeline.modelIdentity();\r\n pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);\r\n pipeline.modelScale(src.scaleX, src.scaleY, 1);\r\n pipeline.viewLoad2D(camera.matrix.matrix);\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n src.upload(camera, i);\r\n\r\n if (src.vertexCount[i] > 0)\r\n {\r\n if (renderer.currentPipeline && renderer.currentPipeline.vertexCount > 0)\r\n {\r\n renderer.flush();\r\n }\r\n \r\n pipeline.vertexBuffer = src.vertexBuffer[i];\r\n \r\n renderer.setPipeline(pipeline);\r\n \r\n renderer.setTexture2D(tilesets[i].glTexture, 0);\r\n \r\n renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);\r\n }\r\n }\r\n\r\n // Restore the pipeline\r\n pipeline.vertexBuffer = pipelineVertexBuffer;\r\n\r\n pipeline.viewIdentity();\r\n pipeline.modelIdentity();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js?")},"./node_modules/phaser/src/time/Clock.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar TimerEvent = __webpack_require__(/*! ./TimerEvent */ \"./node_modules/phaser/src/time/TimerEvent.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Clock is a Scene plugin which creates and updates Timer Events for its Scene.\r\n *\r\n * @class Clock\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Clock.\r\n */\r\nvar Clock = new Class({\r\n\r\n initialize:\r\n\r\n function Clock (scene)\r\n {\r\n /**\r\n * The Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems object of the Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The current time of the Clock, in milliseconds.\r\n *\r\n * If accessed externally, this is equivalent to the `time` parameter normally passed to a Scene's `update` method.\r\n *\r\n * @name Phaser.Time.Clock#now\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.now = 0;\r\n\r\n // Scale the delta time coming into the Clock by this factor\r\n // which then influences anything using this Clock for calculations, like TimerEvents\r\n\r\n /**\r\n * The scale of the Clock's time delta.\r\n * \r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock.\r\n *\r\n * @name Phaser.Time.Clock#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Whether the Clock is paused (`true`) or active (`false`).\r\n *\r\n * When paused, the Clock will not update any of its Timer Events, thus freezing time.\r\n *\r\n * @name Phaser.Time.Clock#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * An array of all Timer Events whose delays haven't expired - these are actively updating Timer Events.\r\n *\r\n * @name Phaser.Time.Clock#_active\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be added to the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingInsertion\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be removed from the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingRemoval\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n // Sync with the TimeStep\r\n this.now = this.systems.game.loop.time;\r\n \r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#addEvent\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n addEvent: function (config)\r\n {\r\n var event = new TimerEvent(config);\r\n\r\n this._pendingInsertion.push(event);\r\n\r\n return event;\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * This is a shortcut for {@link #addEvent} which can be shorter and is compatible with the syntax of the GreenSock Animation Platform (GSAP).\r\n *\r\n * @method Phaser.Time.Clock#delayedCall\r\n * @since 3.0.0\r\n *\r\n * @param {number} delay - The delay of the function call, in milliseconds.\r\n * @param {function} callback - The function to call after the delay expires.\r\n * @param {Array.<*>} args - The arguments to call the function with.\r\n * @param {*} callbackScope - The scope (`this` object) to call the function with.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n delayedCall: function (delay, callback, args, callbackScope)\r\n {\r\n return this.addEvent({ delay: delay, callback: callback, args: args, callbackScope: callbackScope });\r\n },\r\n\r\n /**\r\n * Clears and recreates the array of pending Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#clearPendingEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n clearPendingEvents: function ()\r\n {\r\n this._pendingInsertion = [];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules all active Timer Events for removal at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#removeAllEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n removeAllEvents: function ()\r\n {\r\n this._pendingRemoval = this._pendingRemoval.concat(this._active);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the arrays of active and pending Timer Events. Called at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var event;\r\n\r\n // Delete old events\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n event = this._pendingRemoval[i];\r\n\r\n var index = this._active.indexOf(event);\r\n\r\n if (index > -1)\r\n {\r\n this._active.splice(index, 1);\r\n }\r\n\r\n // Pool them?\r\n event.destroy();\r\n }\r\n\r\n for (i = 0; i < toInsert; i++)\r\n {\r\n event = this._pendingInsertion[i];\r\n\r\n this._active.push(event);\r\n }\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * Updates the Clock's internal time and all of its Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.now = time;\r\n\r\n if (this.paused)\r\n {\r\n return;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < this._active.length; i++)\r\n {\r\n var event = this._active[i];\r\n\r\n if (event.paused)\r\n {\r\n continue;\r\n }\r\n\r\n // Use delta time to increase elapsed.\r\n // Avoids needing to adjust for pause / resume.\r\n // Automatically smoothed by TimeStep class.\r\n // In testing accurate to +- 1ms!\r\n event.elapsed += delta * event.timeScale;\r\n\r\n if (event.elapsed >= event.delay)\r\n {\r\n var remainder = event.elapsed - event.delay;\r\n\r\n // Limit it, in case it's checked in the callback\r\n event.elapsed = event.delay;\r\n\r\n // Process the event\r\n if (!event.hasDispatched && event.callback)\r\n {\r\n event.hasDispatched = true;\r\n event.callback.apply(event.callbackScope, event.args);\r\n }\r\n\r\n if (event.repeatCount > 0)\r\n {\r\n event.repeatCount--;\r\n\r\n event.elapsed = remainder;\r\n event.hasDispatched = false;\r\n }\r\n else\r\n {\r\n this._pendingRemoval.push(event);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Time.Clock#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this._pendingInsertion.length; i++)\r\n {\r\n this._pendingInsertion[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._active.length; i++)\r\n {\r\n this._active[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._pendingRemoval.length; i++)\r\n {\r\n this._pendingRemoval[i].destroy();\r\n }\r\n\r\n this._active.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Time.Clock#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Clock', Clock, 'time');\r\n\r\nmodule.exports = Clock;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/Clock.js?")},"./node_modules/phaser/src/time/TimerEvent.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timer Event represents a delayed function call. It's managed by a Scene's {@link Clock} and will call its function after a set amount of time has passed. The Timer Event can optionally repeat - i.e. call its function multiple times before finishing, or loop indefinitely.\r\n *\r\n * Because it's managed by a Clock, a Timer Event is based on game time, will be affected by its Clock's time scale, and will pause if its Clock pauses.\r\n *\r\n * @class TimerEvent\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event, including its delay and callback.\r\n */\r\nvar TimerEvent = new Class({\r\n\r\n initialize:\r\n\r\n function TimerEvent (config)\r\n {\r\n /**\r\n * The delay in ms at which this TimerEvent fires.\r\n *\r\n * @name Phaser.Time.TimerEvent#delay\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.delay = 0;\r\n\r\n /**\r\n * The total number of times this TimerEvent will repeat before finishing.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeat\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.repeat = 0;\r\n\r\n /**\r\n * If repeating this contains the current repeat count.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeatCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCount = 0;\r\n\r\n /**\r\n * True if this TimerEvent loops, otherwise false.\r\n *\r\n * @name Phaser.Time.TimerEvent#loop\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.loop = false;\r\n\r\n /**\r\n * The callback that will be called when the TimerEvent occurs.\r\n *\r\n * @name Phaser.Time.TimerEvent#callback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.callback;\r\n\r\n /**\r\n * The scope in which the callback will be called.\r\n *\r\n * @name Phaser.Time.TimerEvent#callbackScope\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n\r\n /**\r\n * Additional arguments to be passed to the callback.\r\n *\r\n * @name Phaser.Time.TimerEvent#args\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.args;\r\n\r\n /**\r\n * Scale the time causing this TimerEvent to update.\r\n *\r\n * @name Phaser.Time.TimerEvent#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Start this many MS into the elapsed (useful if you want a long duration with repeat, but for the first loop to fire quickly)\r\n *\r\n * @name Phaser.Time.TimerEvent#startAt\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startAt = 0;\r\n\r\n /**\r\n * The time in milliseconds which has elapsed since the Timer Event's creation.\r\n *\r\n * This value is local for the Timer Event and is relative to its Clock. As such, it's influenced by the Clock's time scale and paused state, the Timer Event's initial {@link #startAt} property, and the Timer Event's {@link #timeScale} and {@link #paused} state.\r\n *\r\n * @name Phaser.Time.TimerEvent#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Whether or not this timer is paused.\r\n *\r\n * @name Phaser.Time.TimerEvent#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Whether the Timer Event's function has been called.\r\n *\r\n * When the Timer Event fires, this property will be set to `true` before the callback function is invoked and will be reset immediately afterward if the Timer Event should repeat. The value of this property does not directly influence whether the Timer Event will be removed from its Clock, but can prevent it from firing.\r\n *\r\n * @name Phaser.Time.TimerEvent#hasDispatched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasDispatched = false;\r\n\r\n this.reset(config);\r\n },\r\n\r\n /**\r\n * Completely reinitializes the Timer Event, regardless of its current state, according to a configuration object.\r\n *\r\n * @method Phaser.Time.TimerEvent#reset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The new state for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} This TimerEvent object.\r\n */\r\n reset: function (config)\r\n {\r\n this.delay = GetFastValue(config, 'delay', 0);\r\n\r\n // Can also be set to -1 for an infinite loop (same as setting loop: true)\r\n this.repeat = GetFastValue(config, 'repeat', 0);\r\n\r\n this.loop = GetFastValue(config, 'loop', false);\r\n\r\n this.callback = GetFastValue(config, 'callback', undefined);\r\n\r\n this.callbackScope = GetFastValue(config, 'callbackScope', this.callback);\r\n\r\n this.args = GetFastValue(config, 'args', []);\r\n\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n this.startAt = GetFastValue(config, 'startAt', 0);\r\n\r\n this.paused = GetFastValue(config, 'paused', false);\r\n\r\n this.elapsed = this.startAt;\r\n this.hasDispatched = false;\r\n this.repeatCount = (this.repeat === -1 || this.loop) ? 999999999999 : this.repeat;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the progress of the current iteration, not factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} A number between 0 and 1 representing the current progress.\r\n */\r\n getProgress: function ()\r\n {\r\n return (this.elapsed / this.delay);\r\n },\r\n\r\n /**\r\n * Gets the progress of the timer overall, factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getOverallProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} The overall progress of the Timer Event, between 0 and 1.\r\n */\r\n getOverallProgress: function ()\r\n {\r\n if (this.repeat > 0)\r\n {\r\n var totalDuration = this.delay + (this.delay * this.repeat);\r\n var totalElapsed = this.elapsed + (this.delay * (this.repeat - this.repeatCount));\r\n\r\n return (totalElapsed / totalDuration);\r\n }\r\n else\r\n {\r\n return this.getProgress();\r\n }\r\n },\r\n\r\n /**\r\n * Returns the number of times this Timer Event will repeat before finishing.\r\n *\r\n * This should not be confused with the number of times the Timer Event will fire before finishing. A return value of 0 doesn't indicate that the Timer Event has finished running - it indicates that it will not repeat after the next time it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#getRepeatCount\r\n * @since 3.0.0\r\n *\r\n * @return {number} How many times the Timer Event will repeat.\r\n */\r\n getRepeatCount: function ()\r\n {\r\n return this.repeatCount;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsed\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in milliseconds.\r\n */\r\n getElapsed: function ()\r\n {\r\n return this.elapsed;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event in seconds.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsedSeconds\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in seconds.\r\n */\r\n getElapsedSeconds: function ()\r\n {\r\n return this.elapsed * 0.001;\r\n },\r\n\r\n /**\r\n * Forces the Timer Event to immediately expire, thus scheduling its removal in the next frame.\r\n *\r\n * @method Phaser.Time.TimerEvent#remove\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [dispatchCallback=false] - If `true`, the function of the Timer Event will be called before its removal.\r\n */\r\n remove: function (dispatchCallback)\r\n {\r\n if (dispatchCallback === undefined) { dispatchCallback = false; }\r\n\r\n this.elapsed = this.delay;\r\n\r\n this.hasDispatched = !dispatchCallback;\r\n\r\n this.repeatCount = 0;\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Timer Event, i.e. its callback, scope, and arguments.\r\n *\r\n * Normally, this method is only called by the Clock when it shuts down. As such, it doesn't stop the Timer Event. If called manually, the Timer Event will still be updated by the Clock, but it won't do anything when it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.callback = undefined;\r\n this.callbackScope = undefined;\r\n this.args = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimerEvent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/TimerEvent.js?")},"./node_modules/phaser/src/time/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Time\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clock: __webpack_require__(/*! ./Clock */ "./node_modules/phaser/src/time/Clock.js"),\r\n TimerEvent: __webpack_require__(/*! ./TimerEvent */ "./node_modules/phaser/src/time/TimerEvent.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/index.js?')},"./node_modules/phaser/src/tweens/Timeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween.\r\n *\r\n * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence\r\n * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline.\r\n *\r\n * @class Timeline\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager which owns this Timeline.\r\n */\r\nvar Timeline = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Timeline (manager)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Tween Manager which owns this Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#manager\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A constant value which allows this Timeline to be easily identified as one.\r\n *\r\n * @name Phaser.Tweens.Timeline#isTimeline\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isTimeline = true;\r\n\r\n /**\r\n * An array of Tween objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Timeline#data\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.data = [];\r\n\r\n /**\r\n * The cached size of the data array.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalData\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalData = 0;\r\n\r\n /**\r\n * If true then duration, delay, etc values are all frame totals, rather than ms.\r\n *\r\n * @name Phaser.Tweens.Timeline#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Timeline#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this Timeline? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween)\r\n *\r\n * @name Phaser.Tweens.Timeline#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before this Timeline loops.\r\n *\r\n * @name Phaser.Tweens.Timeline#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Timeline#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Timeline#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer value, as used by `loopDelay` and `completeDelay`.\r\n *\r\n * @name Phaser.Tweens.Timeline#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * The current state of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the Timeline when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Timeline#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * Does the Timeline start off paused? (if so it needs to be started with Timeline.play)\r\n *\r\n * @name Phaser.Tweens.Timeline#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Timeline#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_.\r\n *\r\n * @name Phaser.Tweens.Timeline#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for all Tweens in this Timeline to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Timeline#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely.\r\n * `onLoop` When a Timeline loops.\r\n * `onStart` When the Timeline starts playing.\r\n * `onUpdate` When a Timeline updates a child Tween.\r\n * `onYoyo` When a Timeline starts a yoyo.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onComplete: null,\r\n onLoop: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Timeline based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Timeline#dispatchTimelineEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTimelineEvent: function (event, callback)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n * \r\n * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @method Phaser.Tweens.Timeline#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The time scale value to set.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Timeline#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the time scale applied to this Timeline.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Check whether or not the Timeline is playing.\r\n *\r\n * @method Phaser.Tweens.Timeline#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Timeline is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Tweens.TweenBuilderConfig|object)} config - The configuration object for the Tween.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n add: function (config)\r\n {\r\n return this.queue(TweenBuilder(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Tween to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#queue\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be added to this Timeline.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n queue: function (tween)\r\n {\r\n if (!this.isPlaying())\r\n {\r\n tween.parent = this;\r\n tween.parentIsTimeline = true;\r\n\r\n this.data.push(tween);\r\n\r\n this.totalData = this.data.length;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks whether a Tween has an offset value.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasOffset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {boolean} `true` if the tween has a non-null offset.\r\n */\r\n hasOffset: function (tween)\r\n {\r\n return (tween.offset !== null);\r\n },\r\n\r\n /**\r\n * Checks whether the offset value is a number or a directive that is relative to previous tweens.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetAbsolute\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the result is a number, `false` if it is a directive like \" -= 1000\".\r\n */\r\n isOffsetAbsolute: function (value)\r\n {\r\n return (typeof(value) === 'number');\r\n },\r\n\r\n /**\r\n * Checks if the offset is a relative value rather than an absolute one.\r\n * If the value is just a number, this returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetRelative\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the value is relative, i.e \" -= 1000\". If `false`, the offset is absolute.\r\n */\r\n isOffsetRelative: function (value)\r\n {\r\n var t = typeof(value);\r\n\r\n if (t === 'string')\r\n {\r\n var op = value[0];\r\n\r\n if (op === '-' || op === '+')\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Parses the relative offset value, returning a positive or negative number.\r\n *\r\n * @method Phaser.Tweens.Timeline#getRelativeOffset\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here.\r\n * @param {number} base - The value to use as the offset.\r\n *\r\n * @return {number} The parsed offset value.\r\n */\r\n getRelativeOffset: function (value, base)\r\n {\r\n var op = value[0];\r\n var num = parseFloat(value.substr(2));\r\n var result = base;\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n result += num;\r\n break;\r\n\r\n case '-':\r\n result -= num;\r\n break;\r\n }\r\n\r\n // Cannot ever be < 0\r\n return Math.max(0, result);\r\n },\r\n\r\n /**\r\n * Calculates the total duration of the timeline.\r\n * \r\n * Computes all tween durations and returns the full duration of the timeline.\r\n * \r\n * The resulting number is stored in the timeline, not as a return value.\r\n *\r\n * @method Phaser.Tweens.Timeline#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var prevEnd = 0;\r\n var totalDuration = 0;\r\n var offsetDuration = 0;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.init();\r\n\r\n if (this.hasOffset(tween))\r\n {\r\n if (this.isOffsetAbsolute(tween.offset))\r\n {\r\n // An actual number, so it defines the start point from the beginning of the timeline\r\n tween.calculatedOffset = tween.offset;\r\n\r\n if (tween.offset === 0)\r\n {\r\n offsetDuration = 0;\r\n }\r\n }\r\n else if (this.isOffsetRelative(tween.offset))\r\n {\r\n // A relative offset (i.e. '-=1000', so starts at 'offset' ms relative to the PREVIOUS Tweens ending time)\r\n tween.calculatedOffset = this.getRelativeOffset(tween.offset, prevEnd);\r\n }\r\n }\r\n else\r\n {\r\n // Sequential\r\n tween.calculatedOffset = offsetDuration;\r\n }\r\n\r\n prevEnd = tween.totalDuration + tween.calculatedOffset;\r\n\r\n totalDuration += tween.totalDuration;\r\n offsetDuration += tween.totalDuration;\r\n }\r\n\r\n // Excludes loop values\r\n this.duration = totalDuration;\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n },\r\n\r\n /**\r\n * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed.\r\n * Returns a boolean indicating whether the timeline is auto-started or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Timeline is started. `false` if it is paused.\r\n */\r\n init: function ()\r\n {\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.paused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Resets all of the timeline's tweens back to their initial states.\r\n * The boolean parameter indicates whether tweens that are looping should reset as well, or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#resetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - If `true`, resets all looping tweens to their initial values.\r\n */\r\n resetTweens: function (resetFromLoop)\r\n {\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.play(resetFromLoop);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a callback for the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - The internal type of callback to set.\r\n * @param {function} callback - Timeline allows multiple tweens to be linked together to create a streaming sequence.\r\n * @param {array} [params] - The parameters to pass to the callback.\r\n * @param {object} [scope] - The context scope of the callback.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n if (Timeline.TYPES.indexOf(type) !== -1)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passed a Tween to the Tween Manager and requests it be made active.\r\n *\r\n * @method Phaser.Tweens.Timeline#makeActive\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The tween object to make active.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} The Timeline's Tween Manager reference.\r\n */\r\n makeActive: function (tween)\r\n {\r\n return this.manager.makeActive(tween);\r\n },\r\n\r\n /**\r\n * Starts playing the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#play\r\n * @fires Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n */\r\n play: function ()\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return;\r\n }\r\n\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.manager.makeActive(this);\r\n\r\n return;\r\n }\r\n else\r\n {\r\n this.resetTweens(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_START, this.callbacks.onStart);\r\n },\r\n\r\n /**\r\n * Updates the Timeline's `state` and fires callbacks and events.\r\n *\r\n * @method Phaser.Tweens.Timeline#nextState\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n *\r\n * @see Phaser.Tweens.Timeline#update\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n // Reset the elapsed time\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n\r\n this.loopCounter--;\r\n\r\n this.resetTweens(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager.\r\n * Otherwise, returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#update\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Timeline has finished and should be removed from the Tween Manager.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.manager.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n var stillRunning = this.totalData;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n if (tween.update(timestamp, delta))\r\n {\r\n stillRunning--;\r\n }\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_UPDATE, this.callbacks.onUpdate);\r\n\r\n // Anything still running? If not, we're done\r\n if (stillRunning === 0)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n },\r\n\r\n /**\r\n * Pauses the Timeline, retaining its internal state.\r\n * \r\n * Calling this on a Timeline that is already paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#pause\r\n * @fires Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n this.emit(Events.TIMELINE_PAUSE, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a paused Timeline from where it was when it was paused.\r\n * \r\n * Calling this on a Timeline that isn't paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#resume\r\n * @fires Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n\r\n this.emit(Events.TIMELINE_RESUME, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if any of the Tweens in this Timeline as operating on the target object.\r\n * \r\n * Returns `false` if no Tweens operate on the target object.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check all Tweens against.\r\n *\r\n * @return {boolean} `true` if there is at least a single Tween that operates on the target object, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n if (this.data[i].hasTarget(target))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags\r\n * them for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n this.data[i].stop();\r\n }\r\n }\r\n\r\n});\r\n\r\nTimeline.TYPES = [ 'onStart', 'onUpdate', 'onLoop', 'onComplete', 'onYoyo' ];\r\n\r\nmodule.exports = Timeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/Timeline.js?")},"./node_modules/phaser/src/tweens/TweenManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NumberTweenBuilder = __webpack_require__(/*! ./builders/NumberTweenBuilder */ \"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar StaggerBuilder = __webpack_require__(/*! ./builders/StaggerBuilder */ \"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js\");\r\nvar TimelineBuilder = __webpack_require__(/*! ./builders/TimelineBuilder */ \"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines.\r\n *\r\n * @class TweenManager\r\n * @memberof Phaser.Tweens\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Tween Manager.\r\n */\r\nvar TweenManager = new Class({\r\n\r\n initialize:\r\n\r\n function TweenManager (scene)\r\n {\r\n /**\r\n * The Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Systems object of the Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The time scale of the Tween Manager.\r\n *\r\n * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be added to the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_add\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._add = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines pending to be later added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which are still incomplete and are actively processed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_active\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_destroy\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The number of Tweens and Timelines which need to be processed by the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.timeScale = 1;\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#createTimeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n createTimeline: function (config)\r\n {\r\n return TimelineBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and add it to the active Tween list/\r\n *\r\n * @method Phaser.Tweens.TweenManager#timeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n timeline: function (config)\r\n {\r\n var timeline = TimelineBuilder(this, config);\r\n\r\n if (!timeline.paused)\r\n {\r\n this._add.push(timeline);\r\n\r\n this._toProcess++;\r\n }\r\n\r\n return timeline;\r\n },\r\n\r\n /**\r\n * Create a Tween and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween object.\r\n */\r\n create: function (config)\r\n {\r\n return TweenBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween.\r\n */\r\n add: function (config)\r\n {\r\n var tween = TweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Add an existing tween into the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to add.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n existing: function (tween)\r\n {\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a Number Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#addCounter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - The configuration object for the Number Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Number Tween.\r\n */\r\n addCounter: function (config)\r\n {\r\n var tween = NumberTweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @method Phaser.Tweens.TweenManager#stagger\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\n stagger: function (value, options)\r\n {\r\n return StaggerBuilder(value, options);\r\n },\r\n\r\n /**\r\n * Updates the Tween Manager's internal lists at the start of the frame.\r\n *\r\n * This method will return immediately if no changes have been indicated.\r\n *\r\n * @method Phaser.Tweens.TweenManager#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var pending = this._pending;\r\n var i;\r\n var tween;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(tween);\r\n\r\n if (idx === -1)\r\n {\r\n // Not in the active array, is it in pending instead?\r\n idx = pending.indexOf(tween);\r\n\r\n if (idx > -1)\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n pending.splice(idx, 1);\r\n }\r\n }\r\n else\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during the update\r\n\r\n list = this._add;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n // Return true if the Tween should be started right away, otherwise false\r\n if (tween.init())\r\n {\r\n tween.play();\r\n\r\n this._active.push(tween);\r\n }\r\n else\r\n {\r\n this._pending.push(tween);\r\n }\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Updates all Tweens and Timelines of the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time in milliseconds.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n // Process active tweens\r\n var list = this._active;\r\n var tween;\r\n\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // If Tween.update returns 'true' then it means it has completed,\r\n // so move it to the destroy list\r\n if (tween.update(timestamp, delta))\r\n {\r\n this._destroy.push(tween);\r\n this._toProcess++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Removes the given tween from the Tween Manager, regardless of its state (pending or active).\r\n *\r\n * @method Phaser.Tweens.TweenManager#remove\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be removed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n remove: function (tween)\r\n {\r\n ArrayRemove(this._add, tween);\r\n ArrayRemove(this._pending, tween);\r\n ArrayRemove(this._active, tween);\r\n ArrayRemove(this._destroy, tween);\r\n\r\n tween.state = TWEEN_CONST.REMOVED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't.\r\n *\r\n * @method Phaser.Tweens.TweenManager#makeActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n makeActive: function (tween)\r\n {\r\n if (this._add.indexOf(tween) !== -1 || this._active.indexOf(tween) !== -1)\r\n {\r\n return this;\r\n }\r\n\r\n var idx = this._pending.indexOf(tween);\r\n\r\n if (idx !== -1)\r\n {\r\n this._pending.splice(idx, 1);\r\n }\r\n\r\n this._add.push(tween);\r\n\r\n tween.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Tweens to the given callback.\r\n *\r\n * @method Phaser.Tweens.TweenManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [scope] - The scope (`this` object) to call the function with.\r\n * @param {...*} [args] - The arguments to pass into the function. Its first argument will always be the Tween currently being iterated.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all active Tweens and Timelines in the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getAllTweens\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing references to all active Tweens and Timelines.\r\n */\r\n getAllTweens: function ()\r\n {\r\n var list = this._active;\r\n var output = [];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n output.push(list[i]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The scale of the time delta, usually 1.\r\n */\r\n getGlobalTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s).\r\n */\r\n getTweensOf: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n var output = [];\r\n var i;\r\n\r\n if (Array.isArray(target))\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n for (var t = 0; t < target.length; t++)\r\n {\r\n if (tween.hasTarget(target[t]))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given object is being affected by a playing Tween.\r\n *\r\n * @method Phaser.Tweens.TweenManager#isTweening\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - target Phaser.Tweens.Tween object\r\n *\r\n * @return {boolean} returns if target tween object is active or not\r\n */\r\n isTweening: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target) && tween.isPlaying())\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame.\r\n *\r\n * @method Phaser.Tweens.TweenManager#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killAll: function ()\r\n {\r\n var tweens = this.getAllTweens();\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @see {@link #getTweensOf}\r\n *\r\n * @method Phaser.Tweens.TweenManager#killTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killTweensOf: function (target)\r\n {\r\n var tweens = this.getTweensOf(target);\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#pauseAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#resumeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new scale of the time delta for this Tween Manager.\r\n *\r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens.\r\n *\r\n * @method Phaser.Tweens.TweenManager#setGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new scale of the time delta, where 1 is the normal speed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n setGlobalTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Tweens.TweenManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.killAll();\r\n\r\n this._add = [];\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n\r\n this._toProcess = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Tweens.TweenManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('TweenManager', TweenManager, 'tweens');\r\n\r\nmodule.exports = TweenManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/TweenManager.js?")},"./node_modules/phaser/src/tweens/builders/GetBoolean.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetBoolean.js?")},"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EaseMap = __webpack_require__(/*! ../../math/easing/EaseMap */ \"./node_modules/phaser/src/math/easing/EaseMap.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * This internal function is used to return the correct ease function for a Tween.\r\n * \r\n * It can take a variety of input, including an EaseMap based string, or a custom function.\r\n *\r\n * @function Phaser.Tweens.Builders.GetEaseFunction\r\n * @since 3.0.0\r\n *\r\n * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function.\r\n * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease.\r\n *\r\n * @return {function} The ease function.\r\n */\r\nvar GetEaseFunction = function (ease, easeParams)\r\n{\r\n // Default ease function\r\n var easeFunction = EaseMap.Power0;\r\n\r\n // Prepare ease function\r\n if (typeof ease === 'string')\r\n {\r\n // String based look-up\r\n\r\n // 1) They specified it correctly\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n else\r\n {\r\n // Do some string manipulation to try and find it\r\n var direction = '';\r\n\r\n if (ease.indexOf('.'))\r\n {\r\n // quad.in = Quad.easeIn\r\n // quad.out = Quad.easeOut\r\n // quad.inout =Quad.easeInOut\r\n\r\n direction = ease.substr(ease.indexOf('.') + 1);\r\n\r\n if (direction.toLowerCase() === 'in')\r\n {\r\n direction = 'easeIn';\r\n }\r\n else if (direction.toLowerCase() === 'out')\r\n {\r\n direction = 'easeOut';\r\n }\r\n else if (direction.toLowerCase() === 'inout')\r\n {\r\n direction = 'easeInOut';\r\n }\r\n }\r\n\r\n ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction);\r\n\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n }\r\n }\r\n else if (typeof ease === 'function')\r\n {\r\n // Custom function\r\n easeFunction = ease;\r\n }\r\n else if (Array.isArray(ease) && ease.length === 4)\r\n {\r\n // Bezier function (TODO)\r\n }\r\n\r\n // No custom ease parameters?\r\n if (!easeParams)\r\n {\r\n // Return ease function\r\n return easeFunction;\r\n }\r\n\r\n var cloneParams = easeParams.slice(0);\r\n\r\n cloneParams.unshift(0);\r\n\r\n // Return ease function with custom ease parameters\r\n return function (v)\r\n {\r\n cloneParams[0] = v;\r\n\r\n return easeFunction.apply(this, cloneParams);\r\n };\r\n};\r\n\r\nmodule.exports = GetEaseFunction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetEaseFunction.js?")},"./node_modules/phaser/src/tweens/builders/GetNewValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internal function used by the Tween Builder to create a function that will return\r\n * the given value from the source.\r\n *\r\n * @function Phaser.Tweens.Builders.GetNewValue\r\n * @since 3.0.0\r\n *\r\n * @param {any} source - The source object to get the value from.\r\n * @param {string} key - The property to get from the source.\r\n * @param {any} defaultValue - A default value to return should the source not have the property set.\r\n *\r\n * @return {function} A function which when called will return the property value from the source.\r\n */\r\nvar GetNewValue = function (source, key, defaultValue)\r\n{\r\n var valueCallback;\r\n\r\n if (source.hasOwnProperty(key))\r\n {\r\n var t = typeof(source[key]);\r\n\r\n if (t === 'function')\r\n {\r\n valueCallback = function (target, targetKey, value, targetIndex, totalTargets, tween)\r\n {\r\n return source[key](target, targetKey, value, targetIndex, totalTargets, tween);\r\n };\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return source[key];\r\n };\r\n }\r\n }\r\n else if (typeof defaultValue === 'function')\r\n {\r\n valueCallback = defaultValue;\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return defaultValue;\r\n };\r\n }\r\n\r\n return valueCallback;\r\n};\r\n\r\nmodule.exports = GetNewValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetNewValue.js?")},"./node_modules/phaser/src/tweens/builders/GetProps.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RESERVED = __webpack_require__(/*! ../tween/ReservedProps */ \"./node_modules/phaser/src/tweens/tween/ReservedProps.js\");\r\n\r\n/**\r\n * Internal function used by the Tween Builder to return an array of properties\r\n * that the Tween will be operating on. It takes a tween configuration object\r\n * and then checks that none of the `props` entries start with an underscore, or that\r\n * none of the direct properties are on the Reserved list.\r\n *\r\n * @function Phaser.Tweens.Builders.GetProps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig} config - The configuration object of the Tween to get the properties from.\r\n *\r\n * @return {string[]} An array of all the properties the tween will operate on.\r\n */\r\nvar GetProps = function (config)\r\n{\r\n var key;\r\n var keys = [];\r\n\r\n // First see if we have a props object\r\n\r\n if (config.hasOwnProperty('props'))\r\n {\r\n for (key in config.props)\r\n {\r\n // Skip any property that starts with an underscore\r\n if (key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config.props[key] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (key in config)\r\n {\r\n // Skip any property that is in the ReservedProps list or that starts with an underscore\r\n if (RESERVED.indexOf(key) === -1 && key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config[key] });\r\n }\r\n }\r\n }\r\n\r\n return keys;\r\n};\r\n\r\nmodule.exports = GetProps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetProps.js?")},"./node_modules/phaser/src/tweens/builders/GetTargets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Extracts an array of targets from a Tween configuration object.\r\n *\r\n * The targets will be looked for in a `targets` property. If it's a function, its return value will be used as the result.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTargets\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object to use.\r\n *\r\n * @return {array} An array of targets (may contain only one element), or `null` if no targets were specified.\r\n */\r\nvar GetTargets = function (config)\r\n{\r\n var targets = GetValue(config, 'targets', null);\r\n\r\n if (targets === null)\r\n {\r\n return targets;\r\n }\r\n\r\n if (typeof targets === 'function')\r\n {\r\n targets = targets.call();\r\n }\r\n\r\n if (!Array.isArray(targets))\r\n {\r\n targets = [ targets ];\r\n }\r\n\r\n return targets;\r\n};\r\n\r\nmodule.exports = GetTargets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTargets.js?")},"./node_modules/phaser/src/tweens/builders/GetTweens.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Internal function used by the Timeline Builder.\r\n * \r\n * It returns an array of all tweens in the given timeline config.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} An array of Tween instances that the Timeline will manage.\r\n */\r\nvar GetTweens = function (config)\r\n{\r\n var tweens = GetValue(config, 'tweens', null);\r\n\r\n if (tweens === null)\r\n {\r\n return [];\r\n }\r\n else if (typeof tweens === 'function')\r\n {\r\n tweens = tweens.call();\r\n }\r\n\r\n if (!Array.isArray(tweens))\r\n {\r\n tweens = [ tweens ];\r\n }\r\n\r\n return tweens;\r\n};\r\n\r\nmodule.exports = GetTweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTweens.js?")},"./node_modules/phaser/src/tweens/builders/GetValueOp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetActive (def)\r\n{\r\n return (!!def.getActive && typeof def.getActive === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetStart (def)\r\n{\r\n return (!!def.getStart && typeof def.getStart === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetEnd (def)\r\n{\r\n return (!!def.getEnd && typeof def.getEnd === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetters (def)\r\n{\r\n return hasGetStart(def) || hasGetEnd(def) || hasGetActive(def);\r\n}\r\n\r\n/**\r\n * Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.\r\n * \r\n * `getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * `getEnd` is invoked once any start delays have expired and returns what the value should tween to.\r\n * `getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.\r\n *\r\n * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.\r\n * A string can be provided to specify a relative end value which consists of an operation\r\n * (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current\r\n * value, or `/=` to divide the current value) followed by its operand.\r\n * \r\n * A function can be provided to allow greater control over the end value; it will receive the target\r\n * object being tweened, the name of the property being tweened, and the current value of the property\r\n * as its arguments.\r\n * \r\n * If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`\r\n * callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`\r\n * property is provided, the property will be used as the effective value under the same rules described here.\r\n *\r\n * @function Phaser.Tweens.Builders.GetValueOp\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The name of the property to modify.\r\n * @param {*} propertyValue - The ending value of the property, as described above.\r\n *\r\n * @return {function} An array of functions, `getActive`, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.\r\n */\r\nvar GetValueOp = function (key, propertyValue)\r\n{\r\n var callbacks;\r\n\r\n // The returned value sets what the property will be at the END of the Tween (usually called at the start of the Tween)\r\n var getEnd = function (target, key, value) { return value; };\r\n\r\n // The returned value sets what the property will be at the START of the Tween (usually called at the end of the Tween)\r\n var getStart = function (target, key, value) { return value; };\r\n\r\n // What to set the property to the moment the TweenData is invoked\r\n var getActive = null;\r\n\r\n var t = typeof(propertyValue);\r\n\r\n if (t === 'number')\r\n {\r\n // props: {\r\n // x: 400,\r\n // y: 300\r\n // }\r\n\r\n getEnd = function ()\r\n {\r\n return propertyValue;\r\n };\r\n }\r\n else if (t === 'string')\r\n {\r\n // props: {\r\n // x: '+=400',\r\n // y: '-=300',\r\n // z: '*=2',\r\n // w: '/=2'\r\n // }\r\n\r\n var op = propertyValue[0];\r\n var num = parseFloat(propertyValue.substr(2));\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n getEnd = function (target, key, value)\r\n {\r\n return value + num;\r\n };\r\n break;\r\n\r\n case '-':\r\n getEnd = function (target, key, value)\r\n {\r\n return value - num;\r\n };\r\n break;\r\n\r\n case '*':\r\n getEnd = function (target, key, value)\r\n {\r\n return value * num;\r\n };\r\n break;\r\n\r\n case '/':\r\n getEnd = function (target, key, value)\r\n {\r\n return value / num;\r\n };\r\n break;\r\n\r\n default:\r\n getEnd = function ()\r\n {\r\n return parseFloat(propertyValue);\r\n };\r\n }\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the getEnd function and no getStart\r\n\r\n // props: {\r\n // x: function (target, key, value, targetIndex, totalTargets, tween) { return value + 50); },\r\n // }\r\n\r\n getEnd = propertyValue;\r\n }\r\n else if (t === 'object')\r\n {\r\n if (hasGetters(propertyValue))\r\n {\r\n /*\r\n x: {\r\n // Called the moment Tween is active. The returned value sets the property on the target immediately.\r\n getActive: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the start of the Tween. The returned value sets what the property will be at the END of the Tween.\r\n getEnd: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the end of the Tween. The returned value sets what the property will be at the START of the Tween.\r\n getStart: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (hasGetActive(propertyValue))\r\n {\r\n getActive = propertyValue.getActive;\r\n }\r\n\r\n if (hasGetEnd(propertyValue))\r\n {\r\n getEnd = propertyValue.getEnd;\r\n }\r\n\r\n if (hasGetStart(propertyValue))\r\n {\r\n getStart = propertyValue.getStart;\r\n }\r\n }\r\n else if (propertyValue.hasOwnProperty('value'))\r\n {\r\n // 'value' may still be a string, function or a number\r\n // props: {\r\n // x: { value: 400, ... },\r\n // y: { value: 300, ... }\r\n // }\r\n\r\n callbacks = GetValueOp(key, propertyValue.value);\r\n }\r\n else\r\n {\r\n // 'from' and 'to' may still be a string, function or a number\r\n // props: {\r\n // x: { from: 400, to: 600 },\r\n // y: { from: 300, to: 500 }\r\n // }\r\n\r\n // Same as above, but the 'start' value is set immediately on the target\r\n // props: {\r\n // x: { start: 400, to: 600 },\r\n // y: { start: 300, to: 500 }\r\n // }\r\n\r\n // 'start' value is set immediately, then it goes 'from' to 'to' during the tween\r\n // props: {\r\n // x: { start: 200, from: 400, to: 600 },\r\n // y: { start: 300, from: 300, to: 500 }\r\n // }\r\n\r\n var hasTo = propertyValue.hasOwnProperty('to');\r\n var hasFrom = propertyValue.hasOwnProperty('from');\r\n var hasStart = propertyValue.hasOwnProperty('start');\r\n\r\n if (hasTo && (hasFrom || hasStart))\r\n {\r\n callbacks = GetValueOp(key, propertyValue.to);\r\n\r\n if (hasStart)\r\n {\r\n var startCallbacks = GetValueOp(key, propertyValue.start);\r\n \r\n callbacks.getActive = startCallbacks.getEnd;\r\n }\r\n \r\n if (hasFrom)\r\n {\r\n var fromCallbacks = GetValueOp(key, propertyValue.from);\r\n \r\n callbacks.getStart = fromCallbacks.getEnd;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // If callback not set by the else if block above then set it here and return it\r\n if (!callbacks)\r\n {\r\n callbacks = {\r\n getActive: getActive,\r\n getEnd: getEnd,\r\n getStart: getStart\r\n };\r\n }\r\n\r\n return callbacks;\r\n};\r\n\r\nmodule.exports = GetValueOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetValueOp.js?")},"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Number Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.NumberTweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar NumberTweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // var tween = this.tweens.addCounter({\r\n // from: 100,\r\n // to: 200,\r\n // ... (normal tween properties)\r\n // })\r\n //\r\n // Then use it in your game via:\r\n //\r\n // tween.getValue()\r\n\r\n var from = GetValue(config, 'from', 0);\r\n var to = GetValue(config, 'to', 1);\r\n\r\n var targets = [ { value: from } ];\r\n\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n\r\n var data = [];\r\n\r\n var ops = GetValueOp('value', to);\r\n\r\n var tweenData = TweenData(\r\n targets[0],\r\n 0,\r\n 'value',\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n ease,\r\n delay,\r\n duration,\r\n yoyo,\r\n hold,\r\n repeat,\r\n repeatDelay,\r\n false,\r\n false\r\n );\r\n\r\n tweenData.start = from;\r\n tweenData.current = from;\r\n tweenData.to = to;\r\n\r\n data.push(tweenData);\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = NumberTweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @function Phaser.Tweens.Builders.StaggerBuilder\r\n * @since 3.19.0\r\n *\r\n * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.\r\n * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\nvar StaggerBuilder = function (value, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var result;\r\n\r\n var start = GetValue(options, 'start', 0);\r\n var ease = GetValue(options, 'ease', null);\r\n var grid = GetValue(options, 'grid', null);\r\n\r\n var from = GetValue(options, 'from', 0);\r\n\r\n var fromFirst = (from === 'first');\r\n var fromCenter = (from === 'center');\r\n var fromLast = (from === 'last');\r\n var fromValue = (typeof(from) === 'number');\r\n\r\n var isRange = (Array.isArray(value));\r\n var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value);\r\n var value2 = (isRange) ? parseFloat(value[1]) : 0;\r\n var maxValue = Math.max(value1, value2);\r\n\r\n if (isRange)\r\n {\r\n start += value1;\r\n }\r\n\r\n if (grid)\r\n {\r\n // Pre-calc the grid to save doing it for ever tweendata update\r\n var gridWidth = grid[0];\r\n var gridHeight = grid[1];\r\n\r\n var fromX = 0;\r\n var fromY = 0;\r\n\r\n var distanceX = 0;\r\n var distanceY = 0;\r\n\r\n var gridValues = [];\r\n\r\n if (fromLast)\r\n {\r\n fromX = gridWidth - 1;\r\n fromY = gridHeight - 1;\r\n }\r\n else if (fromValue)\r\n {\r\n fromX = from % gridWidth;\r\n fromY = Math.floor(from / gridWidth);\r\n }\r\n else if (fromCenter)\r\n {\r\n fromX = (gridWidth - 1) / 2;\r\n fromY = (gridHeight - 1) / 2;\r\n }\r\n\r\n var gridMax = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var toY = 0; toY < gridHeight; toY++)\r\n {\r\n gridValues[toY] = [];\r\n\r\n for (var toX = 0; toX < gridWidth; toX++)\r\n {\r\n distanceX = fromX - toX;\r\n distanceY = fromY - toY;\r\n\r\n var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\r\n\r\n if (dist > gridMax)\r\n {\r\n gridMax = dist;\r\n }\r\n\r\n gridValues[toY][toX] = dist;\r\n }\r\n }\r\n }\r\n\r\n var easeFunction = (ease) ? GetEaseFunction(ease) : null;\r\n\r\n if (grid)\r\n {\r\n result = function (target, key, value, index)\r\n {\r\n var gridSpace = 0;\r\n var toX = index % gridWidth;\r\n var toY = Math.floor(index / gridWidth);\r\n \r\n if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight)\r\n {\r\n gridSpace = gridValues[toY][toX];\r\n }\r\n\r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var diff = (value2 - value1);\r\n \r\n if (easeFunction)\r\n {\r\n output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = (gridSpace / gridMax) * diff;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (gridSpace * value1) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = gridSpace * value1;\r\n }\r\n\r\n return output + start;\r\n };\r\n }\r\n else\r\n {\r\n result = function (target, key, value, index, total)\r\n {\r\n // zero offset\r\n total--;\r\n \r\n var fromIndex;\r\n \r\n if (fromFirst)\r\n {\r\n fromIndex = index;\r\n }\r\n else if (fromCenter)\r\n {\r\n fromIndex = Math.abs((total / 2) - index);\r\n }\r\n else if (fromLast)\r\n {\r\n fromIndex = total - index;\r\n }\r\n else if (fromValue)\r\n {\r\n fromIndex = Math.abs(from - index);\r\n }\r\n \r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var spacing;\r\n\r\n if (fromCenter)\r\n {\r\n spacing = ((value2 - value1) / total) * (fromIndex * 2);\r\n }\r\n else\r\n {\r\n spacing = ((value2 - value1) / total) * fromIndex;\r\n }\r\n \r\n if (easeFunction)\r\n {\r\n output = spacing * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = spacing;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (total * maxValue) * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = fromIndex * value1;\r\n }\r\n \r\n return output + start;\r\n };\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = StaggerBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/StaggerBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetTweens = __webpack_require__(/*! ./GetTweens */ \"./node_modules/phaser/src/tweens/builders/GetTweens.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Timeline = __webpack_require__(/*! ../Timeline */ \"./node_modules/phaser/src/tweens/Timeline.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * Builds a Timeline of Tweens based on a configuration object.\r\n *\r\n * @function Phaser.Tweens.Builders.TimelineBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager to which the Timeline will belong.\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline.\r\n */\r\nvar TimelineBuilder = function (manager, config)\r\n{\r\n var timeline = new Timeline(manager);\r\n\r\n var tweens = GetTweens(config);\r\n\r\n if (tweens.length === 0)\r\n {\r\n timeline.paused = true;\r\n\r\n return timeline;\r\n }\r\n\r\n var defaults = Clone(Defaults);\r\n\r\n defaults.targets = GetTargets(config);\r\n\r\n // totalDuration: If specified each tween in the Timeline is given an equal portion of the totalDuration\r\n\r\n var totalDuration = GetAdvancedValue(config, 'totalDuration', 0);\r\n\r\n if (totalDuration > 0)\r\n {\r\n defaults.duration = Math.floor(totalDuration / tweens.length);\r\n }\r\n else\r\n {\r\n defaults.duration = GetNewValue(config, 'duration', defaults.duration);\r\n }\r\n\r\n defaults.delay = GetNewValue(config, 'delay', defaults.delay);\r\n defaults.easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n defaults.ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), defaults.easeParams);\r\n defaults.hold = GetNewValue(config, 'hold', defaults.hold);\r\n defaults.repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n defaults.repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n defaults.yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n defaults.flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n defaults.flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n // Create the Tweens\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n timeline.queue(TweenBuilder(timeline, tweens[i], defaults));\r\n }\r\n\r\n timeline.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n timeline.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n timeline.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n timeline.paused = GetBoolean(config, 'paused', false);\r\n timeline.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Callbacks\r\n\r\n var scope = GetValue(config, 'callbackScope', timeline);\r\n\r\n var timelineArray = [ timeline ];\r\n\r\n var onStart = GetValue(config, 'onStart', false);\r\n\r\n // The Start of the Timeline\r\n if (onStart)\r\n {\r\n var onStartScope = GetValue(config, 'onStartScope', scope);\r\n var onStartParams = GetValue(config, 'onStartParams', []);\r\n\r\n timeline.setCallback('onStart', onStart, timelineArray.concat(onStartParams), onStartScope);\r\n }\r\n\r\n var onUpdate = GetValue(config, 'onUpdate', false);\r\n\r\n // Every time the Timeline updates (regardless which Tweens are running)\r\n if (onUpdate)\r\n {\r\n var onUpdateScope = GetValue(config, 'onUpdateScope', scope);\r\n var onUpdateParams = GetValue(config, 'onUpdateParams', []);\r\n\r\n timeline.setCallback('onUpdate', onUpdate, timelineArray.concat(onUpdateParams), onUpdateScope);\r\n }\r\n\r\n var onLoop = GetValue(config, 'onLoop', false);\r\n\r\n // Called when the whole Timeline loops\r\n if (onLoop)\r\n {\r\n var onLoopScope = GetValue(config, 'onLoopScope', scope);\r\n var onLoopParams = GetValue(config, 'onLoopParams', []);\r\n\r\n timeline.setCallback('onLoop', onLoop, timelineArray.concat(onLoopParams), onLoopScope);\r\n }\r\n\r\n var onYoyo = GetValue(config, 'onYoyo', false);\r\n\r\n // Called when a Timeline yoyos\r\n if (onYoyo)\r\n {\r\n var onYoyoScope = GetValue(config, 'onYoyoScope', scope);\r\n var onYoyoParams = GetValue(config, 'onYoyoParams', []);\r\n\r\n timeline.setCallback('onYoyo', onYoyo, timelineArray.concat(null, onYoyoParams), onYoyoScope);\r\n }\r\n\r\n var onComplete = GetValue(config, 'onComplete', false);\r\n\r\n // Called when the Timeline completes, after the completeDelay, etc.\r\n if (onComplete)\r\n {\r\n var onCompleteScope = GetValue(config, 'onCompleteScope', scope);\r\n var onCompleteParams = GetValue(config, 'onCompleteParams', []);\r\n\r\n timeline.setCallback('onComplete', onComplete, timelineArray.concat(onCompleteParams), onCompleteScope);\r\n }\r\n\r\n return timeline;\r\n};\r\n\r\nmodule.exports = TimelineBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TimelineBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetProps = __webpack_require__(/*! ./GetProps */ \"./node_modules/phaser/src/tweens/builders/GetProps.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.TweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar TweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // Create arrays of the Targets and the Properties\r\n var targets = (defaults.targets) ? defaults.targets : GetTargets(config);\r\n\r\n // var props = (defaults.props) ? defaults.props : GetProps(config);\r\n var props = GetProps(config);\r\n\r\n // Default Tween values\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n var flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n var flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n var data = [];\r\n\r\n // Loop through every property defined in the Tween, i.e.: props { x, y, alpha }\r\n for (var p = 0; p < props.length; p++)\r\n {\r\n var key = props[p].key;\r\n var value = props[p].value;\r\n\r\n // Create 1 TweenData per target, per property\r\n for (var t = 0; t < targets.length; t++)\r\n {\r\n var ops = GetValueOp(key, value);\r\n\r\n var tweenData = TweenData(\r\n targets[t],\r\n t,\r\n key,\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n GetEaseFunction(GetValue(value, 'ease', ease), easeParams),\r\n GetNewValue(value, 'delay', delay),\r\n GetNewValue(value, 'duration', duration),\r\n GetBoolean(value, 'yoyo', yoyo),\r\n GetNewValue(value, 'hold', hold),\r\n GetNewValue(value, 'repeat', repeat),\r\n GetNewValue(value, 'repeatDelay', repeatDelay),\r\n GetBoolean(value, 'flipX', flipX),\r\n GetBoolean(value, 'flipY', flipY)\r\n );\r\n\r\n data.push(tweenData);\r\n }\r\n }\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = TweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Builders\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetBoolean: __webpack_require__(/*! ./GetBoolean */ "./node_modules/phaser/src/tweens/builders/GetBoolean.js"),\r\n GetEaseFunction: __webpack_require__(/*! ./GetEaseFunction */ "./node_modules/phaser/src/tweens/builders/GetEaseFunction.js"),\r\n GetNewValue: __webpack_require__(/*! ./GetNewValue */ "./node_modules/phaser/src/tweens/builders/GetNewValue.js"),\r\n GetProps: __webpack_require__(/*! ./GetProps */ "./node_modules/phaser/src/tweens/builders/GetProps.js"),\r\n GetTargets: __webpack_require__(/*! ./GetTargets */ "./node_modules/phaser/src/tweens/builders/GetTargets.js"),\r\n GetTweens: __webpack_require__(/*! ./GetTweens */ "./node_modules/phaser/src/tweens/builders/GetTweens.js"),\r\n GetValueOp: __webpack_require__(/*! ./GetValueOp */ "./node_modules/phaser/src/tweens/builders/GetValueOp.js"),\r\n NumberTweenBuilder: __webpack_require__(/*! ./NumberTweenBuilder */ "./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js"),\r\n TimelineBuilder: __webpack_require__(/*! ./TimelineBuilder */ "./node_modules/phaser/src/tweens/builders/TimelineBuilder.js"),\r\n TweenBuilder: __webpack_require__(/*! ./TweenBuilder */ "./node_modules/phaser/src/tweens/builders/TweenBuilder.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/index.js?')},"./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Complete Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it completes playback.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('complete', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Loop Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it loops.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 4,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('loop', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Pause Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is paused.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('pause', listener);\r\n * // At some point later ...\r\n * timeline.pause();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Resume Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is resumed from a paused state.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('resume', listener);\r\n * // At some point later ...\r\n * timeline.resume();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Start Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it starts.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('start', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Update Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it updates, which can happen a lot of times per second,\r\n * so be careful about listening to this event unless you absolutely require it.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('update', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Active Event.\r\n * \r\n * This event is dispatched by a Tween when it becomes active within the Tween Manager.\r\n * \r\n * An 'active' Tween is one that is now progressing, although it may not yet be updating\r\n * any target properties, due to settings such as `delay`. If you need an event for when\r\n * the Tween starts actually updating its first property, see `TWEEN_START`.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('active', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('active', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'active';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Complete Event.\r\n * \r\n * This event is dispatched by a Tween when it completes playback entirely, factoring in repeats and loops.\r\n * \r\n * If the Tween has been set to loop or repeat infinitely, this event will not be dispatched\r\n * unless the `Tween.stop` method is called.\r\n * \r\n * If a Tween has a `completeDelay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('complete', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Loop Event.\r\n * \r\n * This event is dispatched by a Tween when it loops.\r\n * \r\n * This event will only be dispatched if the Tween has a loop count set.\r\n * \r\n * If a Tween has a `loopDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 6\r\n * });\r\n * tween.on('loop', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Repeat Event.\r\n * \r\n * This event is dispatched by a Tween when one of the properties it is tweening repeats.\r\n * \r\n * This event will only be dispatched if the Tween has a property with a repeat count set.\r\n * \r\n * If a Tween has a `repeatDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('repeat', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * repeat: 4\r\n * });\r\n * tween.on('repeat', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The key of the property that just repeated.\r\n * @param {any} target - The target that the property just repated on.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Start Event.\r\n * \r\n * This event is dispatched by a Tween when it starts tweening its first property.\r\n * \r\n * A Tween will only emit this event once, as it can only start once.\r\n * \r\n * If a Tween has a `delay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('start', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Update Event.\r\n * \r\n * This event is dispatched by a Tween every time it updates _any_ of the properties it is tweening.\r\n * \r\n * A Tween that is changing 3 properties of a target will emit this event 3 times per change, once per property.\r\n * \r\n * **Note:** This is a very high frequency event and may be dispatched multiple times, every single frame.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * });\r\n * tween.on('update', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that was updated, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Yoyo Event.\r\n * \r\n * This event is dispatched by a Tween whenever a property it is tweening yoyos.\r\n * \r\n * This event will only be dispatched if the Tween has a property with `yoyo` set.\r\n * \r\n * If the Tween has a `hold` value, this event is dispatched when the hold expires.\r\n * \r\n * This event is dispatched for every property, and for every target, that yoyos.\r\n * For example, if a Tween was updating 2 properties and had 10 targets, this event\r\n * would be dispatched 20 times (twice per target). So be careful how you use it!\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('yoyo', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * yoyo: true\r\n * });\r\n * tween.on('yoyo', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that yoyo'd, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was yoyo'd. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'yoyo';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js?")},"./node_modules/phaser/src/tweens/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n TIMELINE_COMPLETE: __webpack_require__(/*! ./TIMELINE_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js"),\r\n TIMELINE_LOOP: __webpack_require__(/*! ./TIMELINE_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js"),\r\n TIMELINE_PAUSE: __webpack_require__(/*! ./TIMELINE_PAUSE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js"),\r\n TIMELINE_RESUME: __webpack_require__(/*! ./TIMELINE_RESUME_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js"),\r\n TIMELINE_START: __webpack_require__(/*! ./TIMELINE_START_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js"),\r\n TIMELINE_UPDATE: __webpack_require__(/*! ./TIMELINE_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js"),\r\n TWEEN_ACTIVE: __webpack_require__(/*! ./TWEEN_ACTIVE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js"),\r\n TWEEN_COMPLETE: __webpack_require__(/*! ./TWEEN_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js"),\r\n TWEEN_LOOP: __webpack_require__(/*! ./TWEEN_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js"),\r\n TWEEN_REPEAT: __webpack_require__(/*! ./TWEEN_REPEAT_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js"),\r\n TWEEN_START: __webpack_require__(/*! ./TWEEN_START_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js"),\r\n TWEEN_UPDATE: __webpack_require__(/*! ./TWEEN_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js"),\r\n TWEEN_YOYO: __webpack_require__(/*! ./TWEEN_YOYO_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/index.js?')},"./node_modules/phaser/src/tweens/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./tween/const */ "./node_modules/phaser/src/tweens/tween/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Tweens\r\n */\r\n\r\nvar Tweens = {\r\n\r\n Builders: __webpack_require__(/*! ./builders */ "./node_modules/phaser/src/tweens/builders/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/tweens/events/index.js"),\r\n\r\n TweenManager: __webpack_require__(/*! ./TweenManager */ "./node_modules/phaser/src/tweens/TweenManager.js"),\r\n Tween: __webpack_require__(/*! ./tween/Tween */ "./node_modules/phaser/src/tweens/tween/Tween.js"),\r\n TweenData: __webpack_require__(/*! ./tween/TweenData */ "./node_modules/phaser/src/tweens/tween/TweenData.js"),\r\n Timeline: __webpack_require__(/*! ./Timeline */ "./node_modules/phaser/src/tweens/Timeline.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nTweens = Extend(false, Tweens, CONST);\r\n\r\nmodule.exports = Tweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/index.js?')},"./node_modules/phaser/src/tweens/tween/Defaults.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Types.Tweens.TweenConfigDefaults\r\n * @since 3.0.0\r\n * \r\n * @property {(object|object[])} targets - The object, or an array of objects, to run the tween on.\r\n * @property {number} [delay=0] - The number of milliseconds to delay before the tween will start.\r\n * @property {number} [duration=1000] - The duration of the tween in milliseconds.\r\n * @property {string} [ease='Power0'] - The easing equation to use for the tween.\r\n * @property {array} [easeParams] - Optional easing parameters.\r\n * @property {number} [hold=0] - The number of milliseconds to hold the tween for before yoyo'ing.\r\n * @property {number} [repeat=0] - The number of times to repeat the tween.\r\n * @property {number} [repeatDelay=0] - The number of milliseconds to pause before a tween will repeat.\r\n * @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.\r\n * @property {boolean} [flipX=false] - Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.\r\n * @property {boolean} [flipY=false] - Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.\r\n */\r\n\r\nvar TWEEN_DEFAULTS = {\r\n targets: null,\r\n delay: 0,\r\n duration: 1000,\r\n ease: 'Power0',\r\n easeParams: null,\r\n hold: 0,\r\n repeat: 0,\r\n repeatDelay: 0,\r\n yoyo: false,\r\n flipX: false,\r\n flipY: false\r\n};\r\n\r\nmodule.exports = TWEEN_DEFAULTS;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Defaults.js?")},"./node_modules/phaser/src/tweens/tween/ReservedProps.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// RESERVED properties that a Tween config object uses\r\n\r\n// completeDelay: The time the tween will wait before the onComplete event is dispatched once it has completed\r\n// delay: The time the tween will wait before it first starts\r\n// duration: The duration of the tween\r\n// ease: The ease function used by the tween\r\n// easeParams: The parameters to go with the ease function (if any)\r\n// flipX: flip X the GameObject on tween end\r\n// flipY: flip Y the GameObject on tween end// hold: The time the tween will pause before running a yoyo\r\n// hold: The time the tween will pause before running a yoyo\r\n// loop: The time the tween will pause before starting either a yoyo or returning to the start for a repeat\r\n// loopDelay: \r\n// offset: Used when the Tween is part of a Timeline\r\n// paused: Does the tween start in a paused state, or playing?\r\n// props: The properties being tweened by the tween\r\n// repeat: The number of times the tween will repeat itself (a value of 1 means the tween will play twice, as it repeated once)\r\n// repeatDelay: The time the tween will pause for before starting a repeat. The tween holds in the start state.\r\n// targets: The targets the tween is updating.\r\n// useFrames: Use frames or milliseconds?\r\n// yoyo: boolean - Does the tween reverse itself (yoyo) when it reaches the end?\r\n\r\nmodule.exports = [\r\n 'callbackScope',\r\n 'completeDelay',\r\n 'delay',\r\n 'duration',\r\n 'ease',\r\n 'easeParams',\r\n 'flipX',\r\n 'flipY',\r\n 'hold',\r\n 'loop',\r\n 'loopDelay',\r\n 'offset',\r\n 'onActive',\r\n 'onActiveParams',\r\n 'onActiveScope',\r\n 'onComplete',\r\n 'onCompleteParams',\r\n 'onCompleteScope',\r\n 'onLoop',\r\n 'onLoopParams',\r\n 'onLoopScope',\r\n 'onRepeat',\r\n 'onRepeatParams',\r\n 'onRepeatScope',\r\n 'onStart',\r\n 'onStartParams',\r\n 'onStartScope',\r\n 'onUpdate',\r\n 'onUpdateParams',\r\n 'onUpdateScope',\r\n 'onYoyo',\r\n 'onYoyoParams',\r\n 'onYoyoScope',\r\n 'paused',\r\n 'props',\r\n 'repeat',\r\n 'repeatDelay',\r\n 'targets',\r\n 'useFrames',\r\n 'yoyo'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/ReservedProps.js?")},"./node_modules/phaser/src/tweens/tween/Tween.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tween is able to manipulate the properties of one or more objects to any given value, based\r\n * on a duration and type of ease. They are rarely instantiated directly and instead should be\r\n * created via the TweenManager.\r\n *\r\n * @class Tween\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - A reference to the parent of this Tween. Either the Tween Manager or a Tween Timeline instance.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig[]} data - An array of TweenData objects, each containing a unique property to be tweened.\r\n * @param {array} targets - An array of targets to be tweened.\r\n */\r\nvar Tween = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Tween (parent, data, targets)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the parent of this Tween.\r\n * Either the Tween Manager or a Tween Timeline instance.\r\n *\r\n * @name Phaser.Tweens.Tween#parent\r\n * @type {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * Is the parent of this Tween a Timeline?\r\n *\r\n * @name Phaser.Tweens.Tween#parentIsTimeline\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.parentIsTimeline = parent.hasOwnProperty('isTimeline');\r\n\r\n /**\r\n * An array of TweenData objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Tween#data\r\n * @type {Phaser.Types.Tweens.TweenDataConfig[]}\r\n * @since 3.0.0\r\n */\r\n this.data = data;\r\n\r\n /**\r\n * The cached length of the data array.\r\n *\r\n * @name Phaser.Tweens.Tween#totalData\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalData = data.length;\r\n\r\n /**\r\n * An array of references to the target/s this Tween is operating on.\r\n *\r\n * @name Phaser.Tweens.Tween#targets\r\n * @type {object[]}\r\n * @since 3.0.0\r\n */\r\n this.targets = targets;\r\n\r\n /**\r\n * Cached target total (not necessarily the same as the data total)\r\n *\r\n * @name Phaser.Tweens.Tween#totalTargets\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalTargets = targets.length;\r\n\r\n /**\r\n * If `true` then duration, delay, etc values are all frame totals.\r\n *\r\n * @name Phaser.Tweens.Tween#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Tween#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this tween? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL TweenDatas again. Use TweenData.repeat to loop a single element.\r\n *\r\n * @name Phaser.Tweens.Tween#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before the tween loops.\r\n *\r\n * @name Phaser.Tweens.Tween#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Tween#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onStart' event fires.\r\n * This is the shortest `delay` value across all of the TweenDatas of this Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#startDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.19.0\r\n */\r\n this.startDelay = 0;\r\n\r\n /**\r\n * Has this Tween started playback yet?\r\n * This boolean is toggled when the Tween leaves the 'delayed' state and starts running.\r\n *\r\n * @name Phaser.Tweens.Tween#hasStarted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.hasStarted = false;\r\n\r\n /**\r\n * Is this Tween currently seeking?\r\n * This boolean is toggled in the `Tween.seek` method.\r\n * When a tween is seeking it will not dispatch any events or callbacks.\r\n *\r\n * @name Phaser.Tweens.Tween#isSeeking\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isSeeking = false;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = -1 (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Tween#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer (used by timeline offset, loopDelay and completeDelay)\r\n *\r\n * @name Phaser.Tweens.Tween#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline.\r\n *\r\n * @name Phaser.Tweens.Tween#offset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.offset = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline. The calculated offset amount.\r\n *\r\n * @name Phaser.Tweens.Tween#calculatedOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.calculatedOffset = 0;\r\n\r\n /**\r\n * The current state of the tween\r\n *\r\n * @name Phaser.Tweens.Tween#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the tween when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Tween#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n /**\r\n * Does the Tween start off paused? (if so it needs to be started with Tween.play)\r\n *\r\n * @name Phaser.Tweens.Tween#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through the Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Tween to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Tween#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the Tween, excluding loops.\r\n *\r\n * @name Phaser.Tweens.Tween#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for the Tween to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Tween#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @name Phaser.Tweens.Tween#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onActive: null,\r\n onComplete: null,\r\n onLoop: null,\r\n onRepeat: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Tween#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Returns the current value of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the Tween.\r\n */\r\n getValue: function ()\r\n {\r\n return this.data[0].current;\r\n },\r\n\r\n /**\r\n * Set the scale the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Tween#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The scale factor for timescale.\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time applied to this Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The timescale of this tween (between 0 and 1)\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently active.\r\n *\r\n * @method Phaser.Tweens.Tween#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently paused.\r\n *\r\n * @method Phaser.Tweens.Tween#isPaused\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.state === TWEEN_CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * See if this Tween is currently acting upon the given target.\r\n *\r\n * @method Phaser.Tweens.Tween#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check against this Tween.\r\n *\r\n * @return {boolean} `true` if the given target is a target of this Tween, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n return (this.targets.indexOf(target) !== -1);\r\n },\r\n\r\n /**\r\n * Updates the value of a property of this Tween to a new value, without adjusting the\r\n * Tween duration or current progress.\r\n * \r\n * You can optionally tell it to set the 'start' value to be the current value (before the change).\r\n *\r\n * @method Phaser.Tweens.Tween#updateTo\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The property to set the new value for.\r\n * @param {*} value - The new value of the property.\r\n * @param {boolean} [startToCurrent=false] - Should this change set the start value to be the current value?\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n updateTo: function (key, value, startToCurrent)\r\n {\r\n if (startToCurrent === undefined) { startToCurrent = false; }\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (tweenData.key === key)\r\n {\r\n tweenData.end = value;\r\n\r\n if (startToCurrent)\r\n {\r\n tweenData.start = tweenData.current;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts the tween from the beginning.\r\n *\r\n * @method Phaser.Tweens.Tween#restart\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n restart: function ()\r\n {\r\n // Reset these so they're ready for the next update\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return this.seek(0);\r\n }\r\n else if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n else if (this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n return this;\r\n }\r\n else\r\n {\r\n return this.play();\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that calculates the overall duration of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var maxDuration = 0;\r\n var minDelay = Number.MAX_SAFE_INTEGER;\r\n\r\n var data = this.data;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n // Set t1 (duration + hold + yoyo)\r\n tweenData.t1 = tweenData.duration + tweenData.hold;\r\n\r\n if (tweenData.yoyo)\r\n {\r\n tweenData.t1 += tweenData.duration;\r\n }\r\n\r\n // Set t2 (repeatDelay + duration + hold + yoyo)\r\n tweenData.t2 = tweenData.t1 + tweenData.repeatDelay;\r\n\r\n // Total Duration\r\n tweenData.totalDuration = tweenData.delay + tweenData.t1;\r\n\r\n if (tweenData.repeat === -1)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * 999999999999);\r\n }\r\n else if (tweenData.repeat > 0)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * tweenData.repeat);\r\n }\r\n\r\n if (tweenData.totalDuration > maxDuration)\r\n {\r\n // Get the longest TweenData from the Tween, used to calculate the Tween TD\r\n maxDuration = tweenData.totalDuration;\r\n }\r\n\r\n if (tweenData.delay < minDelay)\r\n {\r\n minDelay = tweenData.delay;\r\n }\r\n }\r\n\r\n // Excludes loop values\r\n\r\n // If duration has been set to 0 then we give it a super-low value so that it always\r\n // renders at least 1 frame, but no more, without causing divided by zero errors elsewhere.\r\n this.duration = Math.max(maxDuration, 0.001);\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n\r\n // How long before this Tween starts playback?\r\n this.startDelay = minDelay;\r\n },\r\n\r\n /**\r\n * Called by TweenManager.preUpdate as part of its loop to check pending and active tweens.\r\n * Should not be called directly.\r\n *\r\n * @method Phaser.Tweens.Tween#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Tween should be moved from the pending list to the active list by the Tween Manager.\r\n */\r\n init: function ()\r\n {\r\n // You can't have a paused Tween if it's part of a Timeline\r\n if (this.paused && !this.parentIsTimeline)\r\n {\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n return false;\r\n }\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n }\r\n\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n this.elapsed = 0;\r\n this.totalElapsed = 0;\r\n\r\n this.state = TWEEN_CONST.INIT;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal method that makes this Tween active within the TweenManager\r\n * and emits the onActive event and callback.\r\n *\r\n * @method Phaser.Tweens.Tween#makeActive\r\n * @fires Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n */\r\n makeActive: function ()\r\n {\r\n this.parent.makeActive(this);\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_ACTIVE, this.callbacks.onActive);\r\n },\r\n\r\n /**\r\n * Internal method that advances to the next state of the Tween during playback.\r\n *\r\n * @method Phaser.Tweens.Tween#nextState\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.0.0\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.loopCounter--;\r\n\r\n this.resetTweenData(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Pauses the Tween immediately. Use `resume` to continue playback.\r\n *\r\n * @method Phaser.Tweens.Tween#pause\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return this;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Starts a Tween playing.\r\n * \r\n * You only need to call this method if you have configured the tween to be paused on creation.\r\n * \r\n * If the Tween is already playing, calling this method again will have no effect. If you wish to\r\n * restart the Tween, use `Tween.restart` instead.\r\n * \r\n * Calling this method after the Tween has completed will start the Tween playing again from the start.\r\n * This is the same as calling `Tween.seek(0)` and then `Tween.play()`.\r\n *\r\n * @method Phaser.Tweens.Tween#play\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetFromTimeline=false] - Is this Tween being played as part of a Timeline?\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n play: function (resetFromTimeline)\r\n {\r\n if (resetFromTimeline === undefined) { resetFromTimeline = false; }\r\n\r\n var state = this.state;\r\n\r\n if (state === TWEEN_CONST.INIT && !this.parentIsTimeline)\r\n {\r\n this.resetTweenData(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n return this;\r\n }\r\n else if (state === TWEEN_CONST.ACTIVE || (state === TWEEN_CONST.PENDING_ADD && this._pausedState === TWEEN_CONST.PENDING_ADD))\r\n {\r\n return this;\r\n }\r\n else if (!this.parentIsTimeline && (state === TWEEN_CONST.PENDING_REMOVE || state === TWEEN_CONST.REMOVED))\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n\r\n if (this.parentIsTimeline)\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n if (this.calculatedOffset === 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n else\r\n {\r\n this.countdown = this.calculatedOffset;\r\n\r\n this.state = TWEEN_CONST.OFFSET_DELAY;\r\n }\r\n }\r\n else if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.makeActive();\r\n }\r\n else\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.makeActive();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that resets all of the Tween Data, including the progress and elapsed values.\r\n *\r\n * @method Phaser.Tweens.Tween#resetTweenData\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - Has this method been called as part of a loop?\r\n */\r\n resetTweenData: function (resetFromLoop)\r\n {\r\n var data = this.data;\r\n var total = this.totalData;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n var target = tweenData.target;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n if (resetFromLoop)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, key, tweenData.start, targetIndex, totalTargets, this);\r\n\r\n tweenData.end = tweenData.getEndValue(target, key, tweenData.end, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n\r\n if (tweenData.getActiveValue)\r\n {\r\n target[key] = tweenData.getActiveValue(tweenData.target, tweenData.key, tweenData.start);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resumes the playback of a previously paused Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#resume\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n }\r\n else\r\n {\r\n this.play();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in the Tween.\r\n * \r\n * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration.\r\n * \r\n * The given position is a value between 0 and 1 which represents how far through the Tween to seek to.\r\n * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start.\r\n * \r\n * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats.\r\n * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,\r\n * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration.\r\n * \r\n * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`\r\n * jumps per step. The longer the Tween, the longer this can take.\r\n *\r\n * @method Phaser.Tweens.Tween#seek\r\n * @since 3.0.0\r\n *\r\n * @param {number} toPosition - A value between 0 and 1 which represents the progress point to seek to.\r\n * @param {number} [delta=16.6] - The size of each step when seeking through the Tween. A higher value completes faster but at a cost of less precision.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n seek: function (toPosition, delta)\r\n {\r\n if (delta === undefined) { delta = 16.6; }\r\n\r\n if (this.totalDuration >= 3600000)\r\n {\r\n console.warn('Tween.seek duration too long');\r\n\r\n return this;\r\n }\r\n\r\n if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.makeActive();\r\n }\r\n\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.updateTweenData(this, tweenData, 0, targetIndex, totalTargets);\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n }\r\n\r\n this.calcDuration();\r\n\r\n var wasPaused = false;\r\n\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n wasPaused = true;\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.isSeeking = true;\r\n\r\n do\r\n {\r\n this.update(0, delta);\r\n\r\n } while (this.totalProgress < toPosition);\r\n\r\n this.isSeeking = false;\r\n\r\n if (wasPaused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an event based callback to be invoked during playback.\r\n * \r\n * Calling this method will replace a previously set callback for the given type, if any exists.\r\n * \r\n * The types available are:\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @method Phaser.Tweens.Tween#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - Type of the callback to set.\r\n * @param {function} callback - The function to invoke when this callback happens.\r\n * @param {array} [params] - An array of parameters for specified callbacks types.\r\n * @param {any} [scope] - The context the callback will be invoked in.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flags the Tween as being complete, whatever stage of progress it is at.\r\n *\r\n * If an onComplete callback has been defined it will automatically invoke it, unless a `delay`\r\n * argument is provided, in which case the Tween will delay for that period of time before calling the callback.\r\n *\r\n * If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead.\r\n *\r\n * @method Phaser.Tweens.Tween#complete\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.2.0\r\n *\r\n * @param {number} [delay=0] - The time to wait before invoking the complete callback. If zero it will fire immediately.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n complete: function (delay)\r\n {\r\n if (delay === undefined) { delay = 0; }\r\n\r\n if (delay)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = delay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately removes this Tween from the TweenManager and all of its internal arrays,\r\n * no matter what stage it as it. Then sets the tween state to `REMOVED`.\r\n * \r\n * You should dispose of your reference to this tween after calling this method, to\r\n * free it from memory.\r\n *\r\n * @method Phaser.Tweens.Tween#remove\r\n * @since 3.17.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n remove: function ()\r\n {\r\n this.parent.remove(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Tween#stop\r\n * @since 3.0.0\r\n *\r\n * @param {number} [resetTo] - If you want to seek the tween, provide a value between 0 and 1.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n stop: function (resetTo)\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n if (resetTo !== undefined)\r\n {\r\n this.seek(resetTo);\r\n }\r\n }\r\n\r\n if (this.state !== TWEEN_CONST.REMOVED)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED || this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n if (this.parentIsTimeline)\r\n {\r\n this.parent.manager._destroy.push(this);\r\n this.parent.manager._toProcess++;\r\n }\r\n else\r\n {\r\n this.parent._destroy.push(this);\r\n this.parent._toProcess++;\r\n }\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that advances the Tween based on the time values.\r\n *\r\n * @method Phaser.Tweens.Tween#update\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @fires Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.parent.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n if (!this.hasStarted && !this.isSeeking)\r\n {\r\n this.startDelay -= delta;\r\n \r\n if (this.startDelay <= 0)\r\n {\r\n this.hasStarted = true;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_START, this.callbacks.onStart);\r\n }\r\n }\r\n\r\n var stillRunning = false;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (this.updateTweenData(this, tweenData, delta))\r\n {\r\n stillRunning = true;\r\n }\r\n }\r\n\r\n // Anything still running? If not, we're done\r\n if (!stillRunning)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.OFFSET_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Internal method that will emit a TweenData based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenDataEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData object that caused this event.\r\n */\r\n dispatchTweenDataEvent: function (event, callback, tweenData)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, tweenData.key, tweenData.target);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = tweenData.target;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Tween based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTweenEvent: function (event, callback)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n \r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play in reverse.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromEnd\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @fires Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromEnd: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.yoyo)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a yoyo\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_YOYO, tween.callbacks.onYoyo, tweenData);\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n return TWEEN_CONST.PLAYING_BACKWARD;\r\n }\r\n else if (tweenData.repeatCounter > 0)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a Repeat.\r\n // So we're going to go right back to the start to repeat it again.\r\n\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play from the start.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromStart\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromStart: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.repeatCounter > 0)\r\n {\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method that advances the TweenData based on the time value given.\r\n *\r\n * @method Phaser.Tweens.Tween#updateTweenData\r\n * @fires Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} delta - Either a value in ms, or 1 if Tween.useFrames is true.\r\n *\r\n * @return {boolean} True if the tween is not complete (e.g., playing), or false if the tween is complete.\r\n */\r\n updateTweenData: function (tween, tweenData, delta)\r\n {\r\n var target = tweenData.target;\r\n\r\n switch (tweenData.state)\r\n {\r\n case TWEEN_CONST.PLAYING_FORWARD:\r\n case TWEEN_CONST.PLAYING_BACKWARD:\r\n\r\n if (!target)\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n break;\r\n }\r\n\r\n var elapsed = tweenData.elapsed;\r\n var duration = tweenData.duration;\r\n var diff = 0;\r\n\r\n elapsed += delta;\r\n\r\n if (elapsed > duration)\r\n {\r\n diff = elapsed - duration;\r\n elapsed = duration;\r\n }\r\n\r\n var forward = (tweenData.state === TWEEN_CONST.PLAYING_FORWARD);\r\n var progress = elapsed / duration;\r\n\r\n tweenData.elapsed = elapsed;\r\n tweenData.progress = progress;\r\n\r\n if (progress === 1)\r\n {\r\n if (forward)\r\n {\r\n tweenData.current = tweenData.end;\r\n target[tweenData.key] = tweenData.end;\r\n\r\n if (tweenData.hold > 0)\r\n {\r\n tweenData.elapsed = tweenData.hold - diff;\r\n\r\n tweenData.state = TWEEN_CONST.HOLD_DELAY;\r\n }\r\n else\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n tweenData.current = tweenData.start;\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = this.setStateFromStart(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n var v = (forward) ? tweenData.ease(progress) : tweenData.ease(1 - progress);\r\n\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n\r\n target[tweenData.key] = tweenData.current;\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_UPDATE, tween.callbacks.onUpdate, tweenData);\r\n\r\n break;\r\n\r\n case TWEEN_CONST.DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.REPEAT_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.HOLD_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, Math.abs(tweenData.elapsed));\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.PENDING_RENDER:\r\n\r\n if (target)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, tweenData.key, target[tweenData.key], tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n }\r\n\r\n break;\r\n }\r\n\r\n // Return TRUE if this TweenData still playing, otherwise return FALSE\r\n return (tweenData.state !== TWEEN_CONST.COMPLETE);\r\n }\r\n\r\n});\r\n\r\n// onActive = 'active' event = When the Tween is moved from the pending to the active list in the manager, even if playback delayed\r\n// onStart = 'start' event = When the Tween starts playing from a delayed state (will happen same time as onActive if no delay)\r\n// onYoyo = 'yoyo' event = When the Tween starts a yoyo\r\n// onRepeat = 'repeat' event = When a TweenData repeats playback (if any)\r\n// onComplete = 'complete' event = When the Tween finishes all playback (can sometimes never happen if repeat -1), also when 'stop' called\r\n// onUpdate = 'update' event = When the Tween updates a TweenData during playback (expensive!)\r\n// onLoop = 'loop' event = Used to loop ALL TweenDatas in a Tween\r\n\r\nTween.TYPES = [\r\n 'onActive',\r\n 'onComplete',\r\n 'onLoop',\r\n 'onRepeat',\r\n 'onStart',\r\n 'onUpdate',\r\n 'onYoyo'\r\n];\r\n\r\n/**\r\n * Creates a new Tween object.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectFactory.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.add(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\n/**\r\n * Creates a new Tween object and returns it.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectCreator.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.create(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\r\nmodule.exports = Tween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Tween.js?")},"./node_modules/phaser/src/tweens/tween/TweenData.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target.\r\n * A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.\r\n *\r\n * This is an internal function used by the TweenBuilder and should not be accessed directly, instead,\r\n * Tweens should be created using the GameObjectFactory or GameObjectCreator.\r\n *\r\n * @function Phaser.Tweens.TweenData\r\n * @since 3.0.0\r\n *\r\n * @param {any} target - The target to tween.\r\n * @param {integer} index - The target index within the Tween targets array.\r\n * @param {string} key - The property of the target to tween.\r\n * @param {function} getEnd - What the property will be at the END of the Tween.\r\n * @param {function} getStart - What the property will be at the START of the Tween.\r\n * @param {?function} getActive - If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * @param {function} ease - The ease function this tween uses.\r\n * @param {number} delay - Time in ms/frames before tween will start.\r\n * @param {number} duration - Duration of the tween in ms/frames.\r\n * @param {boolean} yoyo - Determines whether the tween should return back to its start value after hold has expired.\r\n * @param {number} hold - Time in ms/frames the tween will pause before repeating or returning to its starting value if yoyo is set to true.\r\n * @param {number} repeat - Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n * @param {number} repeatDelay - Time in ms/frames before the repeat will start.\r\n * @param {boolean} flipX - Should toggleFlipX be called when yoyo or repeat happens?\r\n * @param {boolean} flipY - Should toggleFlipY be called when yoyo or repeat happens?\r\n *\r\n * @return {Phaser.Types.Tweens.TweenDataConfig} The config object describing this TweenData.\r\n */\r\nvar TweenData = function (target, index, key, getEnd, getStart, getActive, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)\r\n{\r\n return {\r\n\r\n // The target to tween\r\n target: target,\r\n\r\n // The index of the target within the tween targets array\r\n index: index,\r\n\r\n // The property of the target to tween\r\n key: key,\r\n\r\n // What to set the property to the moment the TweenData is invoked.\r\n getActiveValue: getActive,\r\n\r\n // The returned value sets what the property will be at the END of the Tween.\r\n getEndValue: getEnd,\r\n\r\n // The returned value sets what the property will be at the START of the Tween.\r\n getStartValue: getStart,\r\n\r\n // The ease function this tween uses.\r\n ease: ease,\r\n\r\n // Duration of the tween in ms/frames, excludes time for yoyo or repeats.\r\n duration: 0,\r\n\r\n // The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo)\r\n totalDuration: 0,\r\n\r\n // Time in ms/frames before tween will start.\r\n delay: 0,\r\n\r\n // Cause the tween to return back to its start value after hold has expired.\r\n yoyo: yoyo,\r\n\r\n // Time in ms/frames the tween will pause before running the yoyo or starting a repeat.\r\n hold: 0,\r\n\r\n // Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n repeat: 0,\r\n\r\n // Time in ms/frames before the repeat will start.\r\n repeatDelay: 0,\r\n\r\n // Automatically call toggleFlipX when the TweenData yoyos or repeats\r\n flipX: flipX,\r\n\r\n // Automatically call toggleFlipY when the TweenData yoyos or repeats\r\n flipY: flipY,\r\n\r\n // Between 0 and 1 showing completion of this TweenData.\r\n progress: 0,\r\n\r\n // Delta counter.\r\n elapsed: 0,\r\n\r\n // How many repeats are left to run?\r\n repeatCounter: 0,\r\n\r\n // Ease Value Data:\r\n\r\n start: 0,\r\n current: 0,\r\n end: 0,\r\n\r\n // Time Durations\r\n t1: 0,\r\n t2: 0,\r\n\r\n // LoadValue generation functions\r\n gen: {\r\n delay: delay,\r\n duration: duration,\r\n hold: hold,\r\n repeat: repeat,\r\n repeatDelay: repeatDelay\r\n },\r\n\r\n // TWEEN_CONST.CREATED\r\n state: 0\r\n };\r\n};\r\n\r\nmodule.exports = TweenData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/TweenData.js?")},"./node_modules/phaser/src/tweens/tween/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/const.js?")},"./node_modules/phaser/src/utils/Class.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/Class.js?")},"./node_modules/phaser/src/utils/NOOP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/NOOP.js?")},"./node_modules/phaser/src/utils/array/Add.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Add.js?")},"./node_modules/phaser/src/utils/array/AddAt.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/AddAt.js?")},"./node_modules/phaser/src/utils/array/BringToTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/BringToTop.js?")},"./node_modules/phaser/src/utils/array/CountAllMatching.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/CountAllMatching.js?')},"./node_modules/phaser/src/utils/array/Each.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Each.js?")},"./node_modules/phaser/src/utils/array/EachInRange.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/EachInRange.js?')},"./node_modules/phaser/src/utils/array/FindClosestInSorted.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/FindClosestInSorted.js?")},"./node_modules/phaser/src/utils/array/GetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetAll.js?")},"./node_modules/phaser/src/utils/array/GetFirst.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetFirst.js?")},"./node_modules/phaser/src/utils/array/GetRandom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetRandom.js?")},"./node_modules/phaser/src/utils/array/MoveDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveDown.js?")},"./node_modules/phaser/src/utils/array/MoveTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveTo.js?")},"./node_modules/phaser/src/utils/array/MoveUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveUp.js?")},"./node_modules/phaser/src/utils/array/NumberArray.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\r\n * the given `start` and `end` arguments. For example:\r\n *\r\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\r\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n *\r\n * This is equivalent to `numberArrayStep(start, end, 1)`.\r\n *\r\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\r\n * strings, not integers. For example:\r\n *\r\n * `var array = numberArray(1, 4, \'Level \'); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]`\r\n * `var array = numberArray(5, 7, \'HD-\', \'.png\'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]`\r\n *\r\n * @function Phaser.Utils.Array.NumberArray\r\n * @since 3.0.0\r\n *\r\n * @param {number} start - The minimum value the array starts with.\r\n * @param {number} end - The maximum value the array contains.\r\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\r\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\r\n *\r\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\r\n */\r\nvar NumberArray = function (start, end, prefix, suffix)\r\n{\r\n var result = [];\r\n\r\n for (var i = start; i <= end; i++)\r\n {\r\n if (prefix || suffix)\r\n {\r\n var key = (prefix) ? prefix + i.toString() : i.toString();\r\n\r\n if (suffix)\r\n {\r\n key = key.concat(suffix);\r\n }\r\n\r\n result.push(key);\r\n }\r\n else\r\n {\r\n result.push(i);\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArray.js?')},"./node_modules/phaser/src/utils/array/NumberArrayStep.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js");\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArrayStep.js?')},"./node_modules/phaser/src/utils/array/QuickSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/QuickSelect.js?")},"./node_modules/phaser/src/utils/array/Range.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Shuffle = __webpack_require__(/*! ./Shuffle */ \"./node_modules/phaser/src/utils/array/Shuffle.js\");\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Range.js?")},"./node_modules/phaser/src/utils/array/Remove.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn\'t found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Remove.js?')},"./node_modules/phaser/src/utils/array/RemoveAt.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveAt.js?")},"./node_modules/phaser/src/utils/array/RemoveBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveBetween.js?')},"./node_modules/phaser/src/utils/array/RemoveRandomElement.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveRandomElement.js?')},"./node_modules/phaser/src/utils/array/Replace.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Replace.js?")},"./node_modules/phaser/src/utils/array/RotateLeft.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The "rotation" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/RotateRight.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The "rotation" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateRight.js?')},"./node_modules/phaser/src/utils/array/SafeRange.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SafeRange.js?")},"./node_modules/phaser/src/utils/array/SendToBack.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SendToBack.js?")},"./node_modules/phaser/src/utils/array/SetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SetAll.js?")},"./node_modules/phaser/src/utils/array/Shuffle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Shuffle.js?")},"./node_modules/phaser/src/utils/array/SpliceOne.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SpliceOne.js?")},"./node_modules/phaser/src/utils/array/StableSort.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\r\n//! © 2017 Angry Bytes and contributors. MIT licensed.\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.StableSortFunctions\r\n */\r\n\r\n(function() {\r\n\r\n /**\r\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array to be sorted.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar stable = function(arr, comp) {\r\n return exec(arr.slice(), comp);\r\n};\r\n\r\n /**\r\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\r\n *\r\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\r\n * @memberof Phaser.Utils.Array.StableSortFunctions\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted array.\r\n */\r\nstable.inplace = function(arr, comp) {\r\n var result = exec(arr, comp);\r\n\r\n // This simply copies back if the result isn't in the original array,\r\n // which happens on an odd number of passes.\r\n if (result !== arr) {\r\n pass(result, null, arr.length, arr);\r\n }\r\n\r\n return arr;\r\n};\r\n\r\n// Execute the sort using the input array and a second buffer as work space.\r\n// Returns one of those two, containing the final result.\r\nfunction exec(arr, comp) {\r\n if (typeof(comp) !== 'function') {\r\n comp = function(a, b) {\r\n return String(a).localeCompare(b);\r\n };\r\n }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n var len = arr.length;\r\n if (len <= 1) {\r\n return arr;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n for (var chk = 1; chk < len; chk *= 2) {\r\n pass(arr, comp, chk, buffer);\r\n\r\n var tmp = arr;\r\n arr = buffer;\r\n buffer = tmp;\r\n }\r\n\r\n return arr;\r\n}\r\n\r\n// Run a single pass with the given chunk size.\r\nvar pass = function(arr, comp, chk, result) {\r\n var len = arr.length;\r\n var i = 0;\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl) {\r\n r = l + chk;\r\n e = r + chk;\r\n if (r > len) r = len;\r\n if (e > len) e = len;\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n while (true) {\r\n // Compare the chunks.\r\n if (li < r && ri < e) {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0) {\r\n result[i++] = arr[li++];\r\n }\r\n else {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n // Nothing to compare, just flush what's left.\r\n else if (li < r) {\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e) {\r\n result[i++] = arr[ri++];\r\n }\r\n // Both iterators are at the chunk ends.\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// Export using CommonJS or to the window.\r\nif (true) {\r\n module.exports = stable;\r\n}\r\nelse {}\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/StableSort.js?")},"./node_modules/phaser/src/utils/array/Swap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Swap.js?")},"./node_modules/phaser/src/utils/array/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: __webpack_require__(/*! ./matrix */ "./node_modules/phaser/src/utils/array/matrix/index.js"),\r\n\r\n Add: __webpack_require__(/*! ./Add */ "./node_modules/phaser/src/utils/array/Add.js"),\r\n AddAt: __webpack_require__(/*! ./AddAt */ "./node_modules/phaser/src/utils/array/AddAt.js"),\r\n BringToTop: __webpack_require__(/*! ./BringToTop */ "./node_modules/phaser/src/utils/array/BringToTop.js"),\r\n CountAllMatching: __webpack_require__(/*! ./CountAllMatching */ "./node_modules/phaser/src/utils/array/CountAllMatching.js"),\r\n Each: __webpack_require__(/*! ./Each */ "./node_modules/phaser/src/utils/array/Each.js"),\r\n EachInRange: __webpack_require__(/*! ./EachInRange */ "./node_modules/phaser/src/utils/array/EachInRange.js"),\r\n FindClosestInSorted: __webpack_require__(/*! ./FindClosestInSorted */ "./node_modules/phaser/src/utils/array/FindClosestInSorted.js"),\r\n GetAll: __webpack_require__(/*! ./GetAll */ "./node_modules/phaser/src/utils/array/GetAll.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/utils/array/GetFirst.js"),\r\n GetRandom: __webpack_require__(/*! ./GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js"),\r\n MoveDown: __webpack_require__(/*! ./MoveDown */ "./node_modules/phaser/src/utils/array/MoveDown.js"),\r\n MoveTo: __webpack_require__(/*! ./MoveTo */ "./node_modules/phaser/src/utils/array/MoveTo.js"),\r\n MoveUp: __webpack_require__(/*! ./MoveUp */ "./node_modules/phaser/src/utils/array/MoveUp.js"),\r\n NumberArray: __webpack_require__(/*! ./NumberArray */ "./node_modules/phaser/src/utils/array/NumberArray.js"),\r\n NumberArrayStep: __webpack_require__(/*! ./NumberArrayStep */ "./node_modules/phaser/src/utils/array/NumberArrayStep.js"),\r\n QuickSelect: __webpack_require__(/*! ./QuickSelect */ "./node_modules/phaser/src/utils/array/QuickSelect.js"),\r\n Range: __webpack_require__(/*! ./Range */ "./node_modules/phaser/src/utils/array/Range.js"),\r\n Remove: __webpack_require__(/*! ./Remove */ "./node_modules/phaser/src/utils/array/Remove.js"),\r\n RemoveAt: __webpack_require__(/*! ./RemoveAt */ "./node_modules/phaser/src/utils/array/RemoveAt.js"),\r\n RemoveBetween: __webpack_require__(/*! ./RemoveBetween */ "./node_modules/phaser/src/utils/array/RemoveBetween.js"),\r\n RemoveRandomElement: __webpack_require__(/*! ./RemoveRandomElement */ "./node_modules/phaser/src/utils/array/RemoveRandomElement.js"),\r\n Replace: __webpack_require__(/*! ./Replace */ "./node_modules/phaser/src/utils/array/Replace.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js"),\r\n SafeRange: __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js"),\r\n SendToBack: __webpack_require__(/*! ./SendToBack */ "./node_modules/phaser/src/utils/array/SendToBack.js"),\r\n SetAll: __webpack_require__(/*! ./SetAll */ "./node_modules/phaser/src/utils/array/SetAll.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js"),\r\n SpliceOne: __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js"),\r\n StableSort: __webpack_require__(/*! ./StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js"),\r\n Swap: __webpack_require__(/*! ./Swap */ "./node_modules/phaser/src/utils/array/Swap.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/index.js?')},"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/MatrixToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = __webpack_require__(/*! ../../string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/MatrixToString.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseRows.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseRows.js?")},"./node_modules/phaser/src/utils/array/matrix/Rotate180.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/Rotate180.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\nvar TransposeMatrix = __webpack_require__(/*! ./TransposeMatrix */ \"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js\");\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/RotateRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateRight.js?')},"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: __webpack_require__(/*! ./CheckMatrix */ "./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js"),\r\n MatrixToString: __webpack_require__(/*! ./MatrixToString */ "./node_modules/phaser/src/utils/array/matrix/MatrixToString.js"),\r\n ReverseColumns: __webpack_require__(/*! ./ReverseColumns */ "./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js"),\r\n ReverseRows: __webpack_require__(/*! ./ReverseRows */ "./node_modules/phaser/src/utils/array/matrix/ReverseRows.js"),\r\n Rotate180: __webpack_require__(/*! ./Rotate180 */ "./node_modules/phaser/src/utils/array/matrix/Rotate180.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/matrix/RotateLeft.js"),\r\n RotateMatrix: __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/matrix/RotateRight.js"),\r\n TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/index.js?')},"./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n/**\r\n * Converts an ArrayBuffer into a base64 string.\r\n * \r\n * The resulting string can optionally be a data uri if the `mediaType` argument is provided.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs for more details.\r\n *\r\n * @function Phaser.Utils.Base64.ArrayBufferToBase64\r\n * @since 3.18.0\r\n * \r\n * @param {ArrayBuffer} arrayBuffer - The Array Buffer to encode.\r\n * @param {string} [mediaType] - An optional media type, i.e. `audio/ogg` or `image/jpeg`. If included the resulting string will be a data URI.\r\n * \r\n * @return {string} The base64 encoded Array Buffer.\r\n */\r\nvar ArrayBufferToBase64 = function (arrayBuffer, mediaType)\r\n{\r\n var bytes = new Uint8Array(arrayBuffer);\r\n var len = bytes.length;\r\n\r\n var base64 = (mediaType) ? 'data:' + mediaType + ';base64,' : '';\r\n\r\n for (var i = 0; i < len; i += 3)\r\n {\r\n base64 += chars[bytes[i] >> 2];\r\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\r\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\r\n base64 += chars[bytes[i + 2] & 63];\r\n }\r\n\r\n if ((len % 3) === 2)\r\n {\r\n base64 = base64.substring(0, base64.length - 1) + '=';\r\n }\r\n else if (len % 3 === 1)\r\n {\r\n base64 = base64.substring(0, base64.length - 2) + '==';\r\n }\r\n \r\n return base64;\r\n};\r\n\r\nmodule.exports = ArrayBufferToBase64;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js?")},"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n// Use a lookup table to find the index.\r\nvar lookup = new Uint8Array(256);\r\n\r\nfor (var i = 0; i < chars.length; i++)\r\n{\r\n lookup[chars.charCodeAt(i)] = i;\r\n}\r\n\r\n/**\r\n * Converts a base64 string, either with or without a data uri, into an Array Buffer.\r\n *\r\n * @function Phaser.Utils.Base64.Base64ToArrayBuffer\r\n * @since 3.18.0\r\n * \r\n * @param {string} base64 - The base64 string to be decoded. Can optionally contain a data URI header, which will be stripped out prior to decoding.\r\n * \r\n * @return {ArrayBuffer} An ArrayBuffer decoded from the base64 data.\r\n */\r\nvar Base64ToArrayBuffer = function (base64)\r\n{\r\n // Is it a data uri? if so, strip the header away\r\n base64 = base64.substr(base64.indexOf(',') + 1);\r\n\r\n var len = base64.length;\r\n var bufferLength = len * 0.75;\r\n var p = 0;\r\n var encoded1;\r\n var encoded2;\r\n var encoded3;\r\n var encoded4;\r\n\r\n if (base64[len - 1] === '=')\r\n {\r\n bufferLength--;\r\n\r\n if (base64[len - 2] === '=')\r\n {\r\n bufferLength--;\r\n }\r\n }\r\n\r\n var arrayBuffer = new ArrayBuffer(bufferLength);\r\n var bytes = new Uint8Array(arrayBuffer);\r\n\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n encoded1 = lookup[base64.charCodeAt(i)];\r\n encoded2 = lookup[base64.charCodeAt(i + 1)];\r\n encoded3 = lookup[base64.charCodeAt(i + 2)];\r\n encoded4 = lookup[base64.charCodeAt(i + 3)];\r\n\r\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\r\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\r\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\r\n }\r\n\r\n return arrayBuffer;\r\n};\r\n\r\nmodule.exports = Base64ToArrayBuffer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js?")},"./node_modules/phaser/src/utils/base64/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Base64\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ArrayBufferToBase64: __webpack_require__(/*! ./ArrayBufferToBase64 */ "./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js"),\r\n Base64ToArrayBuffer: __webpack_require__(/*! ./Base64ToArrayBuffer */ "./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/index.js?')},"./node_modules/phaser/src/utils/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Array: __webpack_require__(/*! ./array/ */ "./node_modules/phaser/src/utils/array/index.js"),\r\n Base64: __webpack_require__(/*! ./base64/ */ "./node_modules/phaser/src/utils/base64/index.js"),\r\n Objects: __webpack_require__(/*! ./object/ */ "./node_modules/phaser/src/utils/object/index.js"),\r\n String: __webpack_require__(/*! ./string/ */ "./node_modules/phaser/src/utils/string/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/index.js?')},"./node_modules/phaser/src/utils/object/Clone.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shallow Object Clone. Will not clone nested objects.\r\n *\r\n * @function Phaser.Utils.Objects.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - the object from which to clone\r\n *\r\n * @return {object} a new object with the same properties as the input obj\r\n */\r\nvar Clone = function (obj)\r\n{\r\n var clone = {};\r\n\r\n for (var key in obj)\r\n {\r\n if (Array.isArray(obj[key]))\r\n {\r\n clone[key] = obj[key].slice(0);\r\n }\r\n else\r\n {\r\n clone[key] = obj[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Clone.js?")},"./node_modules/phaser/src/utils/object/Extend.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Extend.js?")},"./node_modules/phaser/src/utils/object/GetAdvancedValue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = __webpack_require__(/*! ../../math */ \"./node_modules/phaser/src/math/index.js\");\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetAdvancedValue.js?")},"./node_modules/phaser/src/utils/object/GetFastValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetFastValue.js?")},"./node_modules/phaser/src/utils/object/GetMinMaxValue.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Retrieves and clamps a numerical value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetMinMaxValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`).\r\n * @param {number} min - The minimum value which can be returned.\r\n * @param {number} max - The maximum value which can be returned.\r\n * @param {number} defaultValue - The value to return if the property doesn\'t exist. It\'s also constrained to the given bounds.\r\n *\r\n * @return {number} The clamped value from the `source` object.\r\n */\r\nvar GetMinMaxValue = function (source, key, min, max, defaultValue)\r\n{\r\n if (defaultValue === undefined) { defaultValue = min; }\r\n\r\n var value = GetValue(source, key, defaultValue);\r\n\r\n return Clamp(value, min, max);\r\n};\r\n\r\nmodule.exports = GetMinMaxValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetMinMaxValue.js?')},"./node_modules/phaser/src/utils/object/GetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetValue.js?")},"./node_modules/phaser/src/utils/object/HasAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains all requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAll\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to ensure the source object contains\r\n *\r\n * @return {boolean} true if the source object contains all keys, false otherwise.\r\n */\r\nvar HasAll = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (!source.hasOwnProperty(keys[i]))\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = HasAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAll.js?")},"./node_modules/phaser/src/utils/object/HasAny.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains at least one of the requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAny\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to search the object for\r\n *\r\n * @return {boolean} true if the source object contains at least one of the keys, false otherwise\r\n */\r\nvar HasAny = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (source.hasOwnProperty(keys[i]))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = HasAny;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAny.js?")},"./node_modules/phaser/src/utils/object/HasValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determine whether the source object has a property with the specified key.\r\n *\r\n * @function Phaser.Utils.Objects.HasValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source object to be checked.\r\n * @param {string} key - The property to check for within the object\r\n *\r\n * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`.\r\n */\r\nvar HasValue = function (source, key)\r\n{\r\n return (source.hasOwnProperty(key));\r\n};\r\n\r\nmodule.exports = HasValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasValue.js?")},"./node_modules/phaser/src/utils/object/IsPlainObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/IsPlainObject.js?")},"./node_modules/phaser/src/utils/object/Merge.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1 and obj2.\r\n * If a value exists in both obj1 and obj2, the value in obj1 is used.\r\n * \r\n * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this\r\n * function on shallow objects.\r\n *\r\n * @function Phaser.Utils.Objects.Merge\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object.\r\n * @param {object} obj2 - The second object.\r\n *\r\n * @return {object} A new object containing the union of obj1's and obj2's properties.\r\n */\r\nvar Merge = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (!clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Merge;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Merge.js?")},"./node_modules/phaser/src/utils/object/MergeRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1.\r\n * \r\n * Then scans obj2. If a property is found in obj2 that *also* exists in obj1, the value from obj2 is used, otherwise the property is skipped.\r\n *\r\n * @function Phaser.Utils.Objects.MergeRight\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object to merge.\r\n * @param {object} obj2 - The second object to merge. Keys from this object which also exist in `obj1` will be copied to `obj1`.\r\n *\r\n * @return {object} The merged object. `obj1` and `obj2` are not modified.\r\n */\r\nvar MergeRight = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = MergeRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/MergeRight.js?')},"./node_modules/phaser/src/utils/object/Pick.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasValue = __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Returns a new object that only contains the `keys` that were found on the object provided.\r\n * If no `keys` are found, an empty object is returned.\r\n *\r\n * @function Phaser.Utils.Objects.Pick\r\n * @since 3.18.0\r\n *\r\n * @param {object} object - The object to pick the provided keys from.\r\n * @param {array} keys - An array of properties to retrieve from the provided object.\r\n *\r\n * @return {object} A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.\r\n */\r\nvar Pick = function (object, keys)\r\n{\r\n var obj = {};\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var key = keys[i];\r\n\r\n if (HasValue(object, key))\r\n {\r\n obj[key] = object[key];\r\n }\r\n }\r\n\r\n return obj;\r\n};\r\n\r\nmodule.exports = Pick;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Pick.js?')},"./node_modules/phaser/src/utils/object/SetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a value in an object, allowing for dot notation to control the depth of the property.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var data = {\r\n * world: {\r\n * position: {\r\n * x: 200,\r\n * y: 100\r\n * }\r\n * }\r\n * };\r\n * \r\n * SetValue(data, 'world.position.y', 300);\r\n * \r\n * console.log(data.world.position.y); // 300\r\n * ```\r\n *\r\n * @function Phaser.Utils.Objects.SetValue\r\n * @since 3.17.0\r\n *\r\n * @param {object} source - The object to set the value in.\r\n * @param {string} key - The name of the property in the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`)\r\n * @param {any} value - The value to set into the property, if found in the source object.\r\n *\r\n * @return {boolean} `true` if the property key was valid and the value was set, otherwise `false`.\r\n */\r\nvar SetValue = function (source, key, value)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return false;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n source[key] = value;\r\n\r\n return true;\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var prev = source;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n prev = parent;\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n prev[keys[keys.length - 1]] = value;\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n};\r\n\r\nmodule.exports = SetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/SetValue.js?")},"./node_modules/phaser/src/utils/object/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Objects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clone: __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js"),\r\n Extend: __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/utils/object/Extend.js"),\r\n GetAdvancedValue: __webpack_require__(/*! ./GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js"),\r\n GetFastValue: __webpack_require__(/*! ./GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js"),\r\n GetMinMaxValue: __webpack_require__(/*! ./GetMinMaxValue */ "./node_modules/phaser/src/utils/object/GetMinMaxValue.js"),\r\n GetValue: __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js"),\r\n HasAll: __webpack_require__(/*! ./HasAll */ "./node_modules/phaser/src/utils/object/HasAll.js"),\r\n HasAny: __webpack_require__(/*! ./HasAny */ "./node_modules/phaser/src/utils/object/HasAny.js"),\r\n HasValue: __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js"),\r\n IsPlainObject: __webpack_require__(/*! ./IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js"),\r\n Merge: __webpack_require__(/*! ./Merge */ "./node_modules/phaser/src/utils/object/Merge.js"),\r\n MergeRight: __webpack_require__(/*! ./MergeRight */ "./node_modules/phaser/src/utils/object/MergeRight.js"),\r\n Pick: __webpack_require__(/*! ./Pick */ "./node_modules/phaser/src/utils/object/Pick.js"),\r\n SetValue: __webpack_require__(/*! ./SetValue */ "./node_modules/phaser/src/utils/object/SetValue.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/index.js?')},"./node_modules/phaser/src/utils/string/Format.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a string and replaces instances of markers with values in the given array.\r\n * The markers take the form of `%1`, `%2`, etc. I.e.:\r\n *\r\n * `Format(\"The %1 is worth %2 gold\", [ 'Sword', 500 ])`\r\n *\r\n * @function Phaser.Utils.String.Format\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string containing the replacement markers.\r\n * @param {array} values - An array containing values that will replace the markers. If no value exists an empty string is inserted instead.\r\n *\r\n * @return {string} The string containing replaced values.\r\n */\r\nvar Format = function (string, values)\r\n{\r\n return string.replace(/%([0-9]+)/g, function (s, n)\r\n {\r\n return values[Number(n) - 1];\r\n });\r\n};\r\n\r\nmodule.exports = Format;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Format.js?")},"./node_modules/phaser/src/utils/string/Pad.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Pad.js?")},"./node_modules/phaser/src/utils/string/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and reverses it, returning the reversed string.\r\n * For example if given the string `Atari 520ST` it would return `TS025 iratA`.\r\n *\r\n * @function Phaser.Utils.String.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string to be reversed.\r\n *\r\n * @return {string} The reversed string.\r\n */\r\nvar Reverse = function (string)\r\n{\r\n return string.split('').reverse().join('');\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Reverse.js?")},"./node_modules/phaser/src/utils/string/UUID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates and returns an RFC4122 version 4 compliant UUID.\r\n * \r\n * The string is in the form: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` where each `x` is replaced with a random\r\n * hexadecimal digit from 0 to f, and `y` is replaced with a random hexadecimal digit from 8 to b.\r\n *\r\n * @function Phaser.Utils.String.UUID\r\n * @since 3.12.0\r\n *\r\n * @return {string} The UUID string.\r\n */\r\nvar UUID = function ()\r\n{\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c)\r\n {\r\n var r = Math.random() * 16 | 0;\r\n var v = (c === 'x') ? r : (r & 0x3 | 0x8);\r\n\r\n return v.toString(16);\r\n });\r\n};\r\n\r\nmodule.exports = UUID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UUID.js?")},"./node_modules/phaser/src/utils/string/UppercaseFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Capitalizes the first letter of a string if there is one.\r\n * @example\r\n * UppercaseFirst('abc');\r\n * // returns 'Abc'\r\n * @example\r\n * UppercaseFirst('the happy family');\r\n * // returns 'The happy family'\r\n * @example\r\n * UppercaseFirst('');\r\n * // returns ''\r\n *\r\n * @function Phaser.Utils.String.UppercaseFirst\r\n * @since 3.0.0\r\n *\r\n * @param {string} str - The string to capitalize.\r\n *\r\n * @return {string} A new string, same as the first, but with the first letter capitalized.\r\n */\r\nvar UppercaseFirst = function (str)\r\n{\r\n return str && str[0].toUpperCase() + str.slice(1);\r\n};\r\n\r\nmodule.exports = UppercaseFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UppercaseFirst.js?")},"./node_modules/phaser/src/utils/string/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.String\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Format: __webpack_require__(/*! ./Format */ "./node_modules/phaser/src/utils/string/Format.js"),\r\n Pad: __webpack_require__(/*! ./Pad */ "./node_modules/phaser/src/utils/string/Pad.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/utils/string/Reverse.js"),\r\n UppercaseFirst: __webpack_require__(/*! ./UppercaseFirst */ "./node_modules/phaser/src/utils/string/UppercaseFirst.js"),\r\n UUID: __webpack_require__(/*! ./UUID */ "./node_modules/phaser/src/utils/string/UUID.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/index.js?')},"./node_modules/process/browser.js":function(module,exports){eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?")},"./node_modules/webpack/buildin/global.js":function(module,exports){eval('var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function("return this")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === "object") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it\'s\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?')},1:function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! /Users/danieldanielecki/Downloads/tappyplane/node_modules/phaser/src/phaser.js */"./node_modules/phaser/src/phaser.js");\n\n\n//# sourceURL=webpack:///multi_./node_modules/phaser/src/phaser.js?')}}); \ No newline at end of file diff --git a/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE b/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE deleted file mode 100644 index 525e331..0000000 --- a/cordova/platforms/android/app/src/main/assets/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE +++ /dev/null @@ -1,5717 +0,0 @@ -/*!*********************************************!*\ - !*** ./node_modules/eventemitter3/index.js ***! - \*********************************************/ - -/*! no static exports found */ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/Camera.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/CameraManager.js ***! - \*******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js ***! - \***********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/index.js ***! - \***********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js ***! - \******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js ***! - \******************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/AdInstance.js ***! - \*****************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js ***! - \*********************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js ***! - \******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Product.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Purchase.js ***! - \***************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/Angle.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/Call.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetFirst.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetLast.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/GridAlign.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncAlpha.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnCircle.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnEllipse.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnLine.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnRectangle.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnTriangle.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlayAnimation.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueInc.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueSet.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomCircle.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomEllipse.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomLine.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomRectangle.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomTriangle.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Rotate.js ***! - \***************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAround.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAroundDistance.js ***! - \*****************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleX.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleXY.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleY.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetAlpha.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetBlendMode.js ***! - \*********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetDepth.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetHitArea.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetOrigin.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetRotation.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScale.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleY.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetTint.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetVisible.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ShiftPosition.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/Shuffle.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmoothStep.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmootherStep.js ***! - \*********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Spread.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ToggleVisible.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/WrapInRectangle.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/index.js ***! - \**************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/animations/Animation.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationFrame.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationManager.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! - \**************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! - \*****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! - \******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! - \****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! - \**************************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! - \******************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! - \****************************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! - \*****************************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! - \***************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! - \****************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! - \************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! - \*************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! - \************************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/animations/index.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/cache/BaseCache.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/CacheManager.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/ADD_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/REMOVE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/cache/index.js ***! - \************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/BaseCamera.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/Camera.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/CameraManager.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Fade.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Flash.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Pan.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Shake.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Zoom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/index.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js ***! - \********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js ***! - \******************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/index.js ***! - \*****************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/FixedKeyControl.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js ***! - \************************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/index.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/cameras/index.js ***! - \**************************************************/ - -/*!******************************************!*\ - !*** ./node_modules/phaser/src/const.js ***! - \******************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/core/Config.js ***! - \************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/core/CreateRenderer.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/core/DebugHeader.js ***! - \*****************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/core/Game.js ***! - \**********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/core/TimeStep.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/VisibilityHandler.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BLUR_EVENT.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BOOT_EVENT.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/DESTROY_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/FOCUS_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/HIDDEN_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PAUSE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_STEP_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/READY_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/RESUME_EVENT.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/STEP_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/VISIBLE_EVENT.js ***! - \**************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/core/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/core/index.js ***! - \***********************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/GenerateTexture.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/create/index.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/Arne16.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/C64.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/CGA.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/JMP.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/MSX.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/index.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/curves/CubicBezierCurve.js ***! - \************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/Curve.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/curves/EllipseCurve.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/LineCurve.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/curves/QuadraticBezierCurve.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/SplineCurve.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/index.js ***! - \*************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/MoveTo.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/Path.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManager.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManagerPlugin.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \**********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/SET_DATA_EVENT.js ***! - \***************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/data/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/data/index.js ***! - \***********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Audio.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/device/Browser.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/device/CanvasFeatures.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/device/Features.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/device/Fullscreen.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Input.js ***! - \*************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/device/OS.js ***! - \**********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Video.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/index.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/const.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomRight.js ***! - \*****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/Center.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/LeftCenter.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/QuickSet.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/RightCenter.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/index.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomRight.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftBottom.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftCenter.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftTop.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightBottom.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightCenter.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightTop.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/index.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/CenterOn.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetLeft.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetY.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetTop.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetTop.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/index.js ***! - \*********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasInterpolation.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasPool.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/Smoothing.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/TouchAction.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/UserSelect.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/index.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Color.js ***! - \********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ColorToRGBA.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ComponentToHex.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor32.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSLToColor.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVColorWheel.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVToRGB.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HexStringToColor.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HueToComponent.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToColor.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToRGB.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Interpolate.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ObjectToColor.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBStringToColor.js ***! - \*******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToHSV.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToString.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RandomRGB.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ValueToColor.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/index.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/display/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/BitmapMask.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/GeometryMask.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/index.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/shader/BaseShader.js ***! - \**************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/AddToDOM.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/dom/CreateDOMContainer.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/dom/DOMContentLoaded.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetInnerHeight.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetScreenOrientation.js ***! - \*************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetTarget.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/ParseXML.js ***! - \*************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/dom/RemoveFromDOM.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/dom/RequestAnimationFrame.js ***! - \**************************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/dom/index.js ***! - \**********************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/events/EventEmitter.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/events/index.js ***! - \*************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObject.js ***! - \****************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js ***! - \*************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/DisplayList.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObject.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectCreator.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectFactory.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/UpdateList.js ***! - \***********************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js ***! - \******************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/const.js ***! - \*****************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js ***! - \*************************************************************************************/ - -/*!***************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js ***! - \***************************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js ***! - \********************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js ***! - \********************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js ***! - \*******************************************************************************************/ - -/*!**************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js ***! - \**************************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js ***! - \*******************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js ***! - \************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js ***! - \************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js ***! - \***********************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js ***! - \******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Blitter.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Bob.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Alpha.js ***! - \*****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Animation.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/BlendMode.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ComputedSize.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Crop.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Depth.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Flip.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/GetBounds.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Mask.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Origin.js ***! - \******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/PathFollower.js ***! - \************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Pipeline.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ScrollFactor.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Size.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Texture.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TextureCrop.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Tint.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ToJSON.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Transform.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TransformMatrix.js ***! - \***************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Visible.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/index.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/Container.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCreator.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElement.js ***! - \**********************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js ***! - \*********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/index.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/Extern.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Commands.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Graphics.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/Group.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupFactory.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/Image.js ***! - \************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageFactory.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageRender.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js ***! - \*************************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/Light.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsManager.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js ***! - \********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/Mesh.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js ***! - \************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshRender.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/EmitterOp.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/GravityWell.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/Particle.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js ***! - \*********************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js ***! - \*********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/index.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js ***! - \*************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/index.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js ***! - \*********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/Quad.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js ***! - \***********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js ***! - \***********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/Shader.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js ***! - \***************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js ***! - \**********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/Shape.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js ***! - \**********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/Arc.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/Curve.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/Grid.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js ***! - \*************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/Line.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js ***! - \**************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/Star.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js ***! - \************************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js ***! - \**************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js ***! - \******************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js ***! - \*************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/Sprite.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js ***! - \***************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/GetTextSize.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/MeasureText.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/TextStyle.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/Text.js ***! - \*****************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCreator.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextFactory.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextRender.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js ***! - \******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/Zone.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Area.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circle.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circumference.js ***! - \**************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CircumferencePoint.js ***! - \*******************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Clone.js ***! - \******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Contains.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsPoint.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsRect.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CopyFrom.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Equals.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetBounds.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoint.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoints.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Offset.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/OffsetPoint.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Random.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/const.js ***! - \***********************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Area.js ***! - \******************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Circumference.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsPoint.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsRect.js ***! - \**************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CopyFrom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Ellipse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Equals.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetBounds.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoint.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoints.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Offset.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/OffsetPoint.js ***! - \*************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Random.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/index.js ***! - \*******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/index.js ***! - \***********************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToCircle.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToRectangle.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js ***! - \**********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js ***! - \*************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToCircle.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js ***! - \****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js ***! - \**************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToCircle.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToLine.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToRectangle.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLine.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLineSegment.js ***! - \***********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToValues.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToCircle.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToLine.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js ***! - \***********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/index.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Angle.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/BresenhamPoints.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CenterOn.js ***! - \*******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Clone.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CopyFrom.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Equals.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Extend.js ***! - \*****************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetMidPoint.js ***! - \**********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNearestPoint.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNormal.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoint.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoints.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetShortestDistance.js ***! - \******************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Height.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Length.js ***! - \*****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Line.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalAngle.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalY.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Offset.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/PerpSlope.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Random.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/ReflectAngle.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Rotate.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundPoint.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundXY.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/SetToAngle.js ***! - \*********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Slope.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Width.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/index.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Clone.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/CopyFrom.js ***! - \********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Equals.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetCentroid.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitude.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitudeSq.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js ***! - \**********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Interpolate.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Invert.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Negative.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Point.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Project.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/ProjectUnit.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/SetMagnitude.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/index.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/ContainsPoint.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Earcut.js ***! - \********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetAABB.js ***! - \*********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetNumberArray.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetPoints.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Perimeter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Polygon.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Reverse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Smooth.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Area.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Ceil.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CeilAll.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CenterOn.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Clone.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Contains.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsPoint.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsRect.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CopyFrom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Decompose.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Equals.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitInside.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitOutside.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Floor.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FloorAll.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FromPoints.js ***! - \**************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetCenter.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoint.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoints.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetSize.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Inflate.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Intersection.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MarchingAnts.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergePoints.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeRect.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeXY.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Offset.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/OffsetPoint.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Overlaps.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Perimeter.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js ***! - \******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Random.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/RandomOutside.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Rectangle.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/SameDimensions.js ***! - \******************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Scale.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Union.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/index.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Area.js ***! - \*******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildEquilateral.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildRight.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CenterOn.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Centroid.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCenter.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCircle.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Clone.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Contains.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsArray.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsPoint.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CopyFrom.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Decompose.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Equals.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoint.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoints.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/InCenter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Offset.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Perimeter.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Random.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Rotate.js ***! - \*********************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundXY.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Triangle.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreateInteractiveObject.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreatePixelPerfectHandler.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPlugin.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPluginCache.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/input/Pointer.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_END_EVENT.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_START_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DROP_EVENT.js ***! - \************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js ***! - \***************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js ***! - \****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js ***! - \******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js ***! - \*********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/START_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/events/index.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Axis.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Button.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Gamepad.js ***! - \**********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/GamepadPlugin.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js ***! - \******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js ***! - \***************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js ***! - \*****************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/index.js ***! - \****************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js ***! - \*************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js ***! - \***********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js ***! - \*********************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/index.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/index.js ***! - \********************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/index.js ***! - \************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardManager.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js ***! - \*************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js ***! - \*******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/index.js ***! - \*********************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/DownDuration.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustDown.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustUp.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/Key.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyMap.js ***! - \***************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/UpDuration.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/MouseManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/TouchManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/index.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/loader/File.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/FileTypesManager.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/loader/GetURL.js ***! - \**************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/LoaderPlugin.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/MergeXHRSettings.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/MultiFile.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRLoader.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRSettings.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/const.js ***! - \*************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/ADD_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/START_EVENT.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/index.js ***! - \********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BinaryFile.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/CSSFile.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/GLSLFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js ***! - \********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLFile.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js ***! - \*********************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ImageFile.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/JSONFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PackFile.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PluginFile.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SVGFile.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SceneFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScriptFile.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TextFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/XMLFile.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/index.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/index.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Average.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Bernstein.js ***! - \***************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Between.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/CatmullRom.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/CeilTo.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/Clamp.js ***! - \***********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/DegToRad.js ***! - \**************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Difference.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Factorial.js ***! - \***************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/FloatBetween.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/FloorTo.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/FromPercent.js ***! - \*****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/GetSpeed.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEven.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEvenStrict.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Linear.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MaxAdd.js ***! - \************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MinSub.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Percent.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Quaternion.js ***! - \****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RadToDeg.js ***! - \**************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXY.js ***! - \**************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZ.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZW.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Rotate.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAround.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAroundDistance.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateVec3.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundAwayFromZero.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundTo.js ***! - \*************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/SinCosTableGenerator.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/SmoothStep.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/SmootherStep.js ***! - \******************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/ToXY.js ***! - \**********************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/TransformXY.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector2.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Within.js ***! - \************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/Wrap.js ***! - \**********************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Between.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPoints.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPointsY.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenY.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/CounterClockwise.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Normalize.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Reverse.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/RotateTo.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/ShortestBetween.js ***! - \***************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Wrap.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/WrapDegrees.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/const.js ***! - \***********************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceBetween.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistancePower.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceSquared.js ***! - \******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/index.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/EaseMap.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/index.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/In.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/InOut.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/Out.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/In.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/InOut.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/Out.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/index.js ***! - \***************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/In.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/InOut.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/Out.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/index.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/index.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/index.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/Linear.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/index.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/In.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/InOut.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/Out.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/index.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/index.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/index.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/Stepped.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/index.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Equal.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/GreaterThan.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/LessThan.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/index.js ***! - \***********************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/BezierInterpolation.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \*******************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/LinearInterpolation.js ***! - \***************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \*******************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \*********************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \****************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/index.js ***! - \****************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \***********************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapCeil.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapFloor.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapTo.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/index.js ***! - \****************************************************/ - -/*!*******************************************!*\ - !*** ./node_modules/phaser/src/phaser.js ***! - \*******************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadePhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeSprite.js ***! - \****************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Collider.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapX.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapY.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/PhysicsGroup.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateY.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticBody.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Acceleration.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Angular.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Bounce.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Debug.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Drag.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Enable.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Gravity.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Immovable.js ***! - \************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Mass.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/OverlapRect.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Size.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/index.js ***! - \********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/const.js ***! - \*********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js ***! - \********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js ***! - \**********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js ***! - \**********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js ***! - \**********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js ***! - \******************************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/COLLIDES.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/CollisionMap.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/DefaultDefs.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/GetVelocity.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactBody.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactPhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactSprite.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateY.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Solver.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/TYPE.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/UpdateMotion.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Acceleration.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyScale.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyType.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Bounce.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/CheckAgainst.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Collides.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Debug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Gravity.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Offset.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/SetGameObject.js ***! - \****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/index.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/index.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/physics/index.js ***! - \**************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/CustomMain.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/Factory.js ***! - \**************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterGameObject.js ***! - \***********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterImage.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterPhysics.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterSprite.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterTileBody.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PointerConstraint.js ***! - \************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/World.js ***! - \************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Bounce.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Collision.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Force.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Friction.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Gravity.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Mass.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sensor.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/SetBody.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sleep.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Static.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Transform.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Velocity.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/index.js ***! - \***********************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js ***! - \*********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js ***! - \************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js ***! - \*********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js ***! - \****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js ***! - \******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/index.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/index.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Body.js ***! - \********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js ***! - \*************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/World.js ***! - \*********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js ***! - \*****************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js ***! - \************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js ***! - \********************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Common.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Events.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js ***! - \**************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js ***! - \***********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js ***! - \************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/plugins/BasePlugin.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/DefaultPlugins.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginCache.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginManager.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/ScenePlugin.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/plugins/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.forEach.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.isArray.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Math.trunc.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Uint32Array.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/console.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/index.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/performance.now.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/requestAnimationFrame.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/BlendModes.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/ScaleModes.js ***! - \********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js ***! - \*******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/index.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js ***! - \***********************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/renderer/index.js ***! - \***************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js ***! - \********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/index.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/Utils.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js ***! - \*****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js ***! - \********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js ***! - \*****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js ***! - \*********************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js ***! - \********************************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/index.js ***! - \*******************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js ***! - \*******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js ***! - \****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js ***! - \****************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/ScaleManager.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/CENTER_CONST.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ZOOM_CONST.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/index.js ***! - \******************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js ***! - \*************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js ***! - \******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/RESIZE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scale/index.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetPhysicsPlugins.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetScenePlugins.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/InjectionMap.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/Scene.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/SceneManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scene/ScenePlugin.js ***! - \******************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/scene/Settings.js ***! - \***************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/scene/Systems.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/CREATE_EVENT.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/READY_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RENDER_EVENT.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SLEEP_EVENT.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/START_EVENT.js ***! - \*************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/WAKE_EVENT.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/index.js ***! - \************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSound.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSoundManager.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/SoundManagerCreator.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js ***! - \*******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_EVENT.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DETUNE_EVENT.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOPED_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOP_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/MUTE_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PLAY_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RATE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/SEEK_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/VOLUME_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/index.js ***! - \*******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSound.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js ***! - \***********************************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/sound/index.js ***! - \************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSound.js ***! - \***************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js ***! - \**********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSound.js ***! - \*****************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js ***! - \************************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/List.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Map.js ***! - \************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/structs/ProcessQueue.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/RTree.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Set.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/Size.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/index.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/CanvasTexture.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/Frame.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/textures/Texture.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureManager.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureSource.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/const.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ADD_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ERROR_EVENT.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/LOAD_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/READY_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/REMOVE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/index.js ***! - \**********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/index.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/AtlasXML.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Canvas.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Image.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONArray.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONHash.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheet.js ***! - \*****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js ***! - \**************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/UnityYAML.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/index.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Formats.js ***! - \*****************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ImageCollection.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ParseToTilemap.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tile.js ***! - \**************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tilemap.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapCreator.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapFactory.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tileset.js ***! - \*****************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js ***! - \*****************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Copy.js ***! - \*************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CullTiles.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Fill.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FilterTiles.js ***! - \********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindByIndex.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindTile.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ForEachTile.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js ***! - \***********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js ***! - \****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js ***! - \******************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTilesAt.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Randomize.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RenderDebug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollision.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js ***! - \****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js ***! - \********************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js ***! - \*******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js ***! - \***************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js ***! - \*******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileCollision.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js ***! - \********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Shuffle.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SwapByIndex.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldY.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileY.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/index.js ***! - \**************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/index.js ***! - \***************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/LayerData.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/MapData.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js ***! - \*****************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/index.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/index.js ***! - \***********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js ***! - \********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js ***! - \************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js ***! - \*************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/index.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/Clock.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/time/TimerEvent.js ***! - \****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/index.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/tweens/Timeline.js ***! - \****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/TweenManager.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetBoolean.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetEaseFunction.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetNewValue.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetProps.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTargets.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTweens.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetValueOp.js ***! - \***************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/StaggerBuilder.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TimelineBuilder.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TweenBuilder.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/index.js ***! - \**********************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js ***! - \************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/index.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/tweens/index.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Defaults.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/ReservedProps.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Tween.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/TweenData.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/const.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/Class.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/utils/NOOP.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Add.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/AddAt.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/BringToTop.js ***! - \***********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/CountAllMatching.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Each.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/EachInRange.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/FindClosestInSorted.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetAll.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetFirst.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetRandom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveDown.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveTo.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveUp.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArray.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArrayStep.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/QuickSelect.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Range.js ***! - \******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Remove.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveAt.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveBetween.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveRandomElement.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Replace.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SafeRange.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SendToBack.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SetAll.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Shuffle.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SpliceOne.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/StableSort.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Swap.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/index.js ***! - \******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/MatrixToString.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseRows.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/Rotate180.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateLeft.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateRight.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \***********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/index.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js ***! - \*********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/index.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Clone.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Extend.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetAdvancedValue.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetFastValue.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetMinMaxValue.js ***! - \****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetValue.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAll.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAny.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasValue.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/IsPlainObject.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Merge.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/MergeRight.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Pick.js ***! - \******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/SetValue.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Format.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Pad.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Reverse.js ***! - \*********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UUID.js ***! - \******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UppercaseFirst.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/index.js ***! - \*******************************************************/ - -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ - -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ - -/*!*************************************************!*\ - !*** multi ./node_modules/phaser/src/phaser.js ***! - \*************************************************/ diff --git a/cordova/platforms/android/app/src/main/res/xml/config.xml b/cordova/platforms/android/app/src/main/res/xml/config.xml index 95d0fb3..56ed44f 100644 --- a/cordova/platforms/android/app/src/main/res/xml/config.xml +++ b/cordova/platforms/android/app/src/main/res/xml/config.xml @@ -1,5 +1,5 @@ - + diff --git a/cordova/platforms/android/cordova-plugin-browsertab/tappyplane-BrowserTab.gradle b/cordova/platforms/android/cordova-plugin-browsertab/flyingplane-BrowserTab.gradle similarity index 100% rename from cordova/platforms/android/cordova-plugin-browsertab/tappyplane-BrowserTab.gradle rename to cordova/platforms/android/cordova-plugin-browsertab/flyingplane-BrowserTab.gradle diff --git a/cordova/platforms/android/cordova-plugin-buildinfo/tappyplane-BuildInfo.gradle b/cordova/platforms/android/cordova-plugin-buildinfo/flyingplane-BuildInfo.gradle similarity index 100% rename from cordova/platforms/android/cordova-plugin-buildinfo/tappyplane-BuildInfo.gradle rename to cordova/platforms/android/cordova-plugin-buildinfo/flyingplane-BuildInfo.gradle diff --git a/cordova/platforms/android/platform_www/cordova_plugins.js b/cordova/platforms/android/platform_www/cordova_plugins.js index 553a2b0..4e3bcb6 100644 --- a/cordova/platforms/android/platform_www/cordova_plugins.js +++ b/cordova/platforms/android/platform_www/cordova_plugins.js @@ -90,6 +90,7 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "cordova-plugin-customurlscheme": "5.0.2", "cordova-plugin-browsertab": "0.2.0", "cordova-universal-links-plugin": "1.2.1", - "admob-plus-cordova": "1.28.0" + "admob-plus-cordova": "1.28.0", + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "1.0.2" }; }); \ No newline at end of file diff --git a/cordova/platforms/android/project.properties b/cordova/platforms/android/project.properties index 50e94eb..421a24f 100644 --- a/cordova/platforms/android/project.properties +++ b/cordova/platforms/android/project.properties @@ -15,6 +15,6 @@ cordova.system.library.1=com.facebook.android:facebook-android-sdk:11.3.0 cordova.system.library.2=com.android.billingclient:billing:5.0.0 cordova.system.library.3=androidx.legacy:legacy-support-v4:1.0.0 cordova.system.library.4=com.android.support:customtabs:23.3.0 -cordova.gradle.include.1=cordova-plugin-buildinfo/tappyplane-BuildInfo.gradle -cordova.gradle.include.2=cordova-plugin-browsertab/tappyplane-BrowserTab.gradle -cordova.system.library.5=com.google.android.gms:play-services-ads:20.6.0 \ No newline at end of file +cordova.gradle.include.1=cordova-plugin-buildinfo/flyingplane-BuildInfo.gradle +cordova.gradle.include.2=cordova-plugin-browsertab/flyingplane-BrowserTab.gradle +cordova.system.library.5=com.google.android.gms:play-services-ads:20.6.0 diff --git a/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.h b/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.h new file mode 100644 index 0000000..b87709b --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.h @@ -0,0 +1,36 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +@import UIKit; +#import + +@class CDVViewController; +@class CDVCommandQueue; + +@interface CDVCommandDelegateImpl : NSObject { + @private + __weak CDVViewController* _viewController; + NSRegularExpression* _callbackIdPattern; + @protected + __weak CDVCommandQueue* _commandQueue; + BOOL _delayResponses; +} +- (id)initWithViewController:(CDVViewController*)viewController; +- (void)flushCommandQueueWithDelayedJs; +@end diff --git a/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.m b/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.m new file mode 100644 index 0000000..bdb35da --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/Classes/Private/CDVCommandDelegateImpl.m @@ -0,0 +1,181 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "CDVCommandDelegateImpl.h" +#import "CDVJSON_private.h" +#import +#import +#import + +@implementation CDVCommandDelegateImpl + +@synthesize urlTransformer; + +- (id)initWithViewController:(CDVViewController*)viewController +{ + self = [super init]; + if (self != nil) { + _viewController = viewController; + _commandQueue = _viewController.commandQueue; + + NSError* err = nil; + _callbackIdPattern = [NSRegularExpression regularExpressionWithPattern:@"[^A-Za-z0-9._-]" options:0 error:&err]; + if (err != nil) { + // Couldn't initialize Regex + NSLog(@"Error: Couldn't initialize regex"); + _callbackIdPattern = nil; + } + } + return self; +} + +- (NSString*)pathForResource:(NSString*)resourcepath +{ + NSBundle* mainBundle = [NSBundle mainBundle]; + NSMutableArray* directoryParts = [NSMutableArray arrayWithArray:[resourcepath componentsSeparatedByString:@"/"]]; + NSString* filename = [directoryParts lastObject]; + + [directoryParts removeLastObject]; + + NSString* directoryPartsJoined = [directoryParts componentsJoinedByString:@"/"]; + NSString* directoryStr = _viewController.wwwFolderName; + + if ([directoryPartsJoined length] > 0) { + directoryStr = [NSString stringWithFormat:@"%@/%@", _viewController.wwwFolderName, [directoryParts componentsJoinedByString:@"/"]]; + } + + return [mainBundle pathForResource:filename ofType:@"" inDirectory:directoryStr]; +} + +- (void)flushCommandQueueWithDelayedJs +{ + _delayResponses = YES; + [_commandQueue executePending]; + _delayResponses = NO; +} + +- (void)evalJsHelper2:(NSString*)js +{ + CDV_EXEC_LOG(@"Exec: evalling: %@", [js substringToIndex:MIN([js length], 160)]); + [_viewController.webViewEngine evaluateJavaScript:js completionHandler:^(id obj, NSError* error) { + // TODO: obj can be something other than string + if ([obj isKindOfClass:[NSString class]]) { + NSString* commandsJSON = (NSString*)obj; + if ([commandsJSON length] > 0) { + CDV_EXEC_LOG(@"Exec: Retrieved new exec messages by chaining."); + } + + [self->_commandQueue enqueueCommandBatch:commandsJSON]; + [self->_commandQueue executePending]; + } + }]; +} + +- (void)evalJsHelper:(NSString*)js +{ + // Cycle the run-loop before executing the JS. + // For _delayResponses - + // This ensures that we don't eval JS during the middle of an existing JS + // function (possible since WKWebViewDelegate callbacks can be synchronous). + // For !isMainThread - + // It's a hard error to eval on the non-UI thread. + // For !_commandQueue.currentlyExecuting - + // This works around a bug where sometimes alerts() within callbacks can cause + // dead-lock. + // If the commandQueue is currently executing, then we know that it is safe to + // execute the callback immediately. + // Using (dispatch_get_main_queue()) does *not* fix deadlocks for some reason, + // but performSelectorOnMainThread: does. + if (_delayResponses || ![NSThread isMainThread] || !_commandQueue.currentlyExecuting) { + [self performSelectorOnMainThread:@selector(evalJsHelper2:) withObject:js waitUntilDone:NO]; + } else { + [self evalJsHelper2:js]; + } +} + +- (BOOL)isValidCallbackId:(NSString*)callbackId +{ + if ((callbackId == nil) || (_callbackIdPattern == nil)) { + return NO; + } + + // Disallow if too long or if any invalid characters were found. + if (([callbackId length] > 100) || [_callbackIdPattern firstMatchInString:callbackId options:0 range:NSMakeRange(0, [callbackId length])]) { + return NO; + } + return YES; +} + +- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId +{ + CDV_EXEC_LOG(@"Exec(%@): Sending result. Status=%@", callbackId, result.status); + // This occurs when there is are no win/fail callbacks for the call. + if ([@"INVALID" isEqualToString:callbackId]) { + return; + } + // This occurs when the callback id is malformed. + if (![self isValidCallbackId:callbackId]) { + NSLog(@"Invalid callback id received by sendPluginResult"); + return; + } + int status = [result.status intValue]; + BOOL keepCallback = [result.keepCallback boolValue]; + NSString* argumentsAsJSON = [result argumentsAsJSON]; + BOOL debug = NO; + +#ifdef DEBUG + debug = YES; +#endif + + NSString* js = [NSString stringWithFormat:@"cordova.require('cordova/exec').nativeCallback('%@',%d,%@,%d, %d)", callbackId, status, argumentsAsJSON, keepCallback, debug]; + + [self evalJsHelper:js]; +} + +- (void)evalJs:(NSString*)js +{ + [self evalJs:js scheduledOnRunLoop:YES]; +} + +- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop +{ + js = [NSString stringWithFormat:@"try{cordova.require('cordova/exec').nativeEvalAndFetch(function(){%@})}catch(e){console.log('exception nativeEvalAndFetch : '+e);};", js]; + if (scheduledOnRunLoop) { + [self evalJsHelper:js]; + } else { + [self evalJsHelper2:js]; + } +} + +- (id)getCommandInstance:(NSString*)pluginName +{ + return [_viewController getCommandInstance:pluginName]; +} + +- (void)runInBackground:(void (^)(void))block +{ + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); +} + +- (NSDictionary*)settings +{ + return _viewController.settings; +} + +@end diff --git a/cordova/platforms/ios/CordovaLib/Classes/Public/CDVAllowList.m b/cordova/platforms/ios/CordovaLib/Classes/Public/CDVAllowList.m new file mode 100644 index 0000000..739ca98 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/Classes/Public/CDVAllowList.m @@ -0,0 +1,285 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +NSString* const kCDVDefaultAllowListRejectionString = @"ERROR allowList rejection: url='%@'"; +NSString* const kCDVDefaultSchemeName = @"cdv-default-scheme"; + +@interface CDVAllowListPattern : NSObject { + @private + NSRegularExpression* _scheme; + NSRegularExpression* _host; + NSNumber* _port; + NSRegularExpression* _path; +} + ++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards; +- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path; +- (bool)matches:(NSURL*)url; + +@end + +@implementation CDVAllowListPattern + ++ (NSString*)regexFromPattern:(NSString*)pattern allowWildcards:(bool)allowWildcards +{ + NSString* regex = [NSRegularExpression escapedPatternForString:pattern]; + + if (allowWildcards) { + regex = [regex stringByReplacingOccurrencesOfString:@"\\*" withString:@".*"]; + + /* [NSURL path] has the peculiarity that a trailing slash at the end of a path + * will be omitted. This regex tweak compensates for that. + */ + if ([regex hasSuffix:@"\\/.*"]) { + regex = [NSString stringWithFormat:@"%@(\\/.*)?", [regex substringToIndex:([regex length] - 4)]]; + } + } + return [NSString stringWithFormat:@"%@$", regex]; +} + +- (id)initWithScheme:(NSString*)scheme host:(NSString*)host port:(NSString*)port path:(NSString*)path +{ + self = [super init]; // Potentially change "self" + if (self) { + if ((scheme == nil) || [scheme isEqualToString:@"*"]) { + _scheme = nil; + } else { + _scheme = [NSRegularExpression regularExpressionWithPattern:[CDVAllowListPattern regexFromPattern:scheme allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil]; + } + if ([host isEqualToString:@"*"] || host == nil) { + _host = nil; + } else if ([host hasPrefix:@"*."]) { + _host = [NSRegularExpression regularExpressionWithPattern:[NSString stringWithFormat:@"([a-z0-9.-]*\\.)?%@", [CDVAllowListPattern regexFromPattern:[host substringFromIndex:2] allowWildcards:false]] options:NSRegularExpressionCaseInsensitive error:nil]; + } else { + _host = [NSRegularExpression regularExpressionWithPattern:[CDVAllowListPattern regexFromPattern:host allowWildcards:NO] options:NSRegularExpressionCaseInsensitive error:nil]; + } + if ((port == nil) || [port isEqualToString:@"*"]) { + _port = nil; + } else { + _port = [[NSNumber alloc] initWithInteger:[port integerValue]]; + } + if ((path == nil) || [path isEqualToString:@"/*"]) { + _path = nil; + } else { + _path = [NSRegularExpression regularExpressionWithPattern:[CDVAllowListPattern regexFromPattern:path allowWildcards:YES] options:0 error:nil]; + } + } + return self; +} + +- (bool)matches:(NSURL*)url +{ + return (_scheme == nil || [_scheme numberOfMatchesInString:[url scheme] options:NSMatchingAnchored range:NSMakeRange(0, [[url scheme] length])]) && + (_host == nil || ([url host] != nil && [_host numberOfMatchesInString:[url host] options:NSMatchingAnchored range:NSMakeRange(0, [[url host] length])])) && + (_port == nil || [[url port] isEqualToNumber:_port]) && + (_path == nil || [_path numberOfMatchesInString:[url path] options:NSMatchingAnchored range:NSMakeRange(0, [[url path] length])]) + ; +} + +@end + +@interface CDVAllowList () + +@property (nonatomic, readwrite, strong) NSMutableArray* allowList; +@property (nonatomic, readwrite, strong) NSMutableSet* permittedSchemes; + +- (void)addAllowListEntry:(NSString*)pattern; + +@end + +@implementation CDVAllowList + +@synthesize allowList, permittedSchemes, allowListRejectionFormatString; + +- (id)initWithArray:(NSArray*)array +{ + self = [super init]; + if (self) { + self.allowList = [[NSMutableArray alloc] init]; + self.permittedSchemes = [[NSMutableSet alloc] init]; + self.allowListRejectionFormatString = kCDVDefaultAllowListRejectionString; + + for (NSString* pattern in array) { + [self addAllowListEntry:pattern]; + } + } + return self; +} + +- (BOOL)isIPv4Address:(NSString*)externalHost +{ + // an IPv4 address has 4 octets b.b.b.b where b is a number between 0 and 255. + // for our purposes, b can also be the wildcard character '*' + + // we could use a regex to solve this problem but then I would have two problems + // anyways, this is much clearer and maintainable + NSArray* octets = [externalHost componentsSeparatedByString:@"."]; + NSUInteger num_octets = [octets count]; + + // quick check + if (num_octets != 4) { + return NO; + } + + // restrict number parsing to 0-255 + NSNumberFormatter* numberFormatter = [[NSNumberFormatter alloc] init]; + [numberFormatter setMinimum:[NSNumber numberWithUnsignedInteger:0]]; + [numberFormatter setMaximum:[NSNumber numberWithUnsignedInteger:255]]; + + // iterate through each octet, and test for a number between 0-255 or if it equals '*' + for (NSUInteger i = 0; i < num_octets; ++i) { + NSString* octet = [octets objectAtIndex:i]; + + if ([octet isEqualToString:@"*"]) { // passes - check next octet + continue; + } else if ([numberFormatter numberFromString:octet] == nil) { // fails - not a number and not within our range, return + return NO; + } + } + + return YES; +} + +- (void)addAllowListEntry:(NSString*)origin +{ + if (self.allowList == nil) { + return; + } + + if ([origin isEqualToString:@"*"]) { + NSLog(@"Unlimited access to network resources"); + self.allowList = nil; + self.permittedSchemes = nil; + } else { // specific access + NSRegularExpression* parts = [NSRegularExpression regularExpressionWithPattern:@"^((\\*|[A-Za-z-]+):/?/?)?(((\\*\\.)?[^*/:]+)|\\*)?(:(\\d+))?(/.*)?" options:0 error:nil]; + NSTextCheckingResult* m = [parts firstMatchInString:origin options:NSMatchingAnchored range:NSMakeRange(0, [origin length])]; + if (m != nil) { + NSRange r; + NSString* scheme = nil; + r = [m rangeAtIndex:2]; + if (r.location != NSNotFound) { + scheme = [origin substringWithRange:r]; + } + + NSString* host = nil; + r = [m rangeAtIndex:3]; + if (r.location != NSNotFound) { + host = [origin substringWithRange:r]; + } + + // Special case for two urls which are allowed to have empty hosts + if (([scheme isEqualToString:@"file"] || [scheme isEqualToString:@"content"]) && (host == nil)) { + host = @"*"; + } + + NSString* port = nil; + r = [m rangeAtIndex:7]; + if (r.location != NSNotFound) { + port = [origin substringWithRange:r]; + } + + NSString* path = nil; + r = [m rangeAtIndex:8]; + if (r.location != NSNotFound) { + path = [origin substringWithRange:r]; + } + + if (scheme == nil) { + // XXX making it stupid friendly for people who forget to include protocol/SSL + [self.allowList addObject:[[CDVAllowListPattern alloc] initWithScheme:@"http" host:host port:port path:path]]; + [self.allowList addObject:[[CDVAllowListPattern alloc] initWithScheme:@"https" host:host port:port path:path]]; + } else { + [self.allowList addObject:[[CDVAllowListPattern alloc] initWithScheme:scheme host:host port:port path:path]]; + } + + if (self.permittedSchemes != nil) { + if ([scheme isEqualToString:@"*"]) { + self.permittedSchemes = nil; + } else if (scheme != nil) { + [self.permittedSchemes addObject:scheme]; + } + } + } + } +} + +- (BOOL)schemeIsAllowed:(NSString*)scheme +{ + if ([scheme isEqualToString:@"http"] || + [scheme isEqualToString:@"https"] || + [scheme isEqualToString:@"ftp"] || + [scheme isEqualToString:@"ftps"]) { + return YES; + } + + return (self.permittedSchemes == nil) || [self.permittedSchemes containsObject:scheme]; +} + +- (BOOL)URLIsAllowed:(NSURL*)url +{ + return [self URLIsAllowed:url logFailure:YES]; +} + +- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure +{ + // Shortcut acceptance: Are all urls allowListed ("*" in allowList)? + if (allowList == nil) { + return YES; + } + + // Shortcut rejection: Check that the scheme is supported + NSString* scheme = [[url scheme] lowercaseString]; + if (![self schemeIsAllowed:scheme]) { + if (logFailure) { + NSLog(@"%@", [self errorStringForURL:url]); + } + return NO; + } + + // http[s] and ftp[s] should also validate against the common set in the kCDVDefaultSchemeName list + if ([scheme isEqualToString:@"http"] || [scheme isEqualToString:@"https"] || [scheme isEqualToString:@"ftp"] || [scheme isEqualToString:@"ftps"]) { + NSURL* newUrl = [NSURL URLWithString:[NSString stringWithFormat:@"%@://%@%@", kCDVDefaultSchemeName, [url host], [[url path] stringByAddingPercentEncodingWithAllowedCharacters:NSCharacterSet.URLPathAllowedCharacterSet]]]; + // If it is allowed, we are done. If not, continue to check for the actual scheme-specific list + if ([self URLIsAllowed:newUrl logFailure:NO]) { + return YES; + } + } + + // Check the url against patterns in the allowList + for (CDVAllowListPattern* p in self.allowList) { + if ([p matches:url]) { + return YES; + } + } + + if (logFailure) { + NSLog(@"%@", [self errorStringForURL:url]); + } + // if we got here, the url host is not in the white-list, do nothing + return NO; +} + +- (NSString*)errorStringForURL:(NSURL*)url +{ + return [NSString stringWithFormat:self.allowListRejectionFormatString, [url absoluteString]]; +} + +@end diff --git a/cordova/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist b/cordova/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist index 70869a1..94ceaea 100644 --- a/cordova/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/cordova/platforms/ios/CordovaLib/CordovaLib.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist @@ -7,12 +7,12 @@ Cordova.xcscheme_^#shared#^_ orderHint - 15 + 16 CordovaLib.xcscheme_^#shared#^_ orderHint - 14 + 15 diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDV.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDV.h new file mode 100644 index 0000000..2002ac8 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDV.h @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAllowList.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAllowList.h new file mode 100644 index 0000000..57814b1 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAllowList.h @@ -0,0 +1,34 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +extern NSString* const kCDVDefaultAllowListRejectionString; + +@interface CDVAllowList : NSObject + +@property (nonatomic, copy) NSString* allowListRejectionFormatString; + +- (id)initWithArray:(NSArray*)array; +- (BOOL)schemeIsAllowed:(NSString*)scheme; +- (BOOL)URLIsAllowed:(NSURL*)url; +- (BOOL)URLIsAllowed:(NSURL*)url logFailure:(BOOL)logFailure; +- (NSString*)errorStringForURL:(NSURL*)url; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAppDelegate.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAppDelegate.h new file mode 100644 index 0000000..e2cd85d --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAppDelegate.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVAppDelegate : UIResponder + +@property (nullable, nonatomic, strong) IBOutlet UIWindow* window; +@property (nullable, nonatomic, strong) IBOutlet CDVViewController* viewController; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailability.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailability.h new file mode 100644 index 0000000..5f6d889 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailability.h @@ -0,0 +1,121 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#define __CORDOVA_IOS__ + +#define __CORDOVA_0_9_6 906 +#define __CORDOVA_1_0_0 10000 +#define __CORDOVA_1_1_0 10100 +#define __CORDOVA_1_2_0 10200 +#define __CORDOVA_1_3_0 10300 +#define __CORDOVA_1_4_0 10400 +#define __CORDOVA_1_4_1 10401 +#define __CORDOVA_1_5_0 10500 +#define __CORDOVA_1_6_0 10600 +#define __CORDOVA_1_6_1 10601 +#define __CORDOVA_1_7_0 10700 +#define __CORDOVA_1_8_0 10800 +#define __CORDOVA_1_8_1 10801 +#define __CORDOVA_1_9_0 10900 +#define __CORDOVA_2_0_0 20000 +#define __CORDOVA_2_1_0 20100 +#define __CORDOVA_2_2_0 20200 +#define __CORDOVA_2_3_0 20300 +#define __CORDOVA_2_4_0 20400 +#define __CORDOVA_2_5_0 20500 +#define __CORDOVA_2_6_0 20600 +#define __CORDOVA_2_7_0 20700 +#define __CORDOVA_2_8_0 20800 +#define __CORDOVA_2_9_0 20900 +#define __CORDOVA_3_0_0 30000 +#define __CORDOVA_3_1_0 30100 +#define __CORDOVA_3_2_0 30200 +#define __CORDOVA_3_3_0 30300 +#define __CORDOVA_3_4_0 30400 +#define __CORDOVA_3_4_1 30401 +#define __CORDOVA_3_5_0 30500 +#define __CORDOVA_3_6_0 30600 +#define __CORDOVA_3_7_0 30700 +#define __CORDOVA_3_8_0 30800 +#define __CORDOVA_3_9_0 30900 +#define __CORDOVA_3_9_1 30901 +#define __CORDOVA_3_9_2 30902 +#define __CORDOVA_4_0_0 40000 +#define __CORDOVA_4_0_1 40001 +#define __CORDOVA_4_1_0 40100 +#define __CORDOVA_4_1_1 40101 +#define __CORDOVA_4_2_0 40200 +#define __CORDOVA_4_2_1 40201 +#define __CORDOVA_4_3_0 40300 +#define __CORDOVA_4_3_1 40301 +#define __CORDOVA_4_4_0 40400 +#define __CORDOVA_4_5_0 40500 +#define __CORDOVA_4_5_1 40501 +#define __CORDOVA_4_5_2 40502 +#define __CORDOVA_4_5_4 40504 +#define __CORDOVA_5_0_0 50000 +#define __CORDOVA_5_0_1 50001 +#define __CORDOVA_5_1_0 50100 +#define __CORDOVA_5_1_1 50101 +#define __CORDOVA_6_0_0 60000 +#define __CORDOVA_6_1_0 60100 +#define __CORDOVA_6_2_0 60200 +#define __CORDOVA_6_3_0 60300 +#define __CORDOVA_7_0_0 70000 +#define __CORDOVA_7_0_1 70001 +/* coho:next-version,insert-before */ +#define __CORDOVA_NA 99999 /* not available */ + +/* + #if CORDOVA_VERSION_MIN_REQUIRED >= __CORDOVA_4_0_0 + // do something when its at least 4.0.0 + #else + // do something else (non 4.0.0) + #endif + */ +#ifndef CORDOVA_VERSION_MIN_REQUIRED + /* coho:next-version-min-required,replace-after */ + #define CORDOVA_VERSION_MIN_REQUIRED __CORDOVA_7_0_1 +#endif + +/* + Returns YES if it is at least version specified as NSString(X) + Usage: + if (IsAtLeastiOSVersion(@"5.1")) { + // do something for iOS 5.1 or greater + } + */ +#define IsAtLeastiOSVersion(X) ([[[UIDevice currentDevice] systemVersion] compare:X options:NSNumericSearch] != NSOrderedAscending) + +/* Return the string version of the decimal version */ +#define CDV_VERSION [NSString stringWithFormat:@"%d.%d.%d", \ + (CORDOVA_VERSION_MIN_REQUIRED / 10000), \ + (CORDOVA_VERSION_MIN_REQUIRED % 10000) / 100, \ + (CORDOVA_VERSION_MIN_REQUIRED % 10000) % 100] + +// Enable this to log all exec() calls. +#define CDV_ENABLE_EXEC_LOGGING 0 +#if CDV_ENABLE_EXEC_LOGGING + #define CDV_EXEC_LOG NSLog +#else + #define CDV_EXEC_LOG(...) do { \ +} while (NO) +#endif diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailabilityDeprecated.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailabilityDeprecated.h new file mode 100644 index 0000000..abf7a16 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVAvailabilityDeprecated.h @@ -0,0 +1,26 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +#ifdef __clang__ + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated("Deprecated in Cordova " #version ". " msg))) +#else + #define CDV_DEPRECATED(version, msg) __attribute__((deprecated())) +#endif diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandDelegate.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandDelegate.h new file mode 100644 index 0000000..76b9523 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandDelegate.h @@ -0,0 +1,49 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@class CDVPlugin; +@class CDVPluginResult; +@class CDVAllowList; + +typedef NSURL* (^ UrlTransformerBlock)(NSURL*); + +@protocol CDVCommandDelegate + +@property (nonatomic, readonly) NSDictionary* settings; +@property (nonatomic, copy) UrlTransformerBlock urlTransformer; + +- (NSString*)pathForResource:(NSString*)resourcepath; +- (id)getCommandInstance:(NSString*)pluginName; + +// Sends a plugin result to the JS. This is thread-safe. +- (void)sendPluginResult:(CDVPluginResult*)result callbackId:(NSString*)callbackId; +// Evaluates the given JS. This is thread-safe. +- (void)evalJs:(NSString*)js; +// Can be used to evaluate JS right away instead of scheduling it on the run-loop. +// This is required for dispatch resign and pause events, but should not be used +// without reason. Without the run-loop delay, alerts used in JS callbacks may result +// in dead-lock. This method must be called from the UI thread. +- (void)evalJs:(NSString*)js scheduledOnRunLoop:(BOOL)scheduledOnRunLoop; +// Runs the given block on a background thread using a shared thread-pool. +- (void)runInBackground:(void (^)(void))block; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandQueue.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandQueue.h new file mode 100644 index 0000000..cb7bd6e --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVCommandQueue.h @@ -0,0 +1,39 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@class CDVInvokedUrlCommand; +@class CDVViewController; + +@interface CDVCommandQueue : NSObject + +@property (nonatomic, readonly) BOOL currentlyExecuting; + +- (id)initWithViewController:(CDVViewController*)viewController; +- (void)dispose; + +- (void)resetRequestId; +- (void)enqueueCommandBatch:(NSString*)batchJSON; + +- (void)fetchCommandsFromJs; +- (void)executePending; +- (BOOL)execute:(CDVInvokedUrlCommand*)command; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVConfigParser.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVConfigParser.h new file mode 100644 index 0000000..0a93703 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVConfigParser.h @@ -0,0 +1,32 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVConfigParser : NSObject +{ + NSString* featureName; +} + +@property (nonatomic, readonly, strong) NSMutableDictionary* pluginsDict; +@property (nonatomic, readonly, strong) NSMutableDictionary* settings; +@property (nonatomic, readonly, strong) NSMutableArray* startupPluginNames; +@property (nonatomic, readonly, strong) NSString* startPage; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVInvokedUrlCommand.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVInvokedUrlCommand.h new file mode 100644 index 0000000..993e0a2 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVInvokedUrlCommand.h @@ -0,0 +1,52 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVInvokedUrlCommand : NSObject { + NSString* _callbackId; + NSString* _className; + NSString* _methodName; + NSArray* _arguments; +} + +@property (nonatomic, readonly) NSArray* arguments; +@property (nonatomic, readonly) NSString* callbackId; +@property (nonatomic, readonly) NSString* className; +@property (nonatomic, readonly) NSString* methodName; + ++ (CDVInvokedUrlCommand*)commandFromJson:(NSArray*)jsonEntry; + +- (id)initWithArguments:(NSArray*)arguments + callbackId:(NSString*)callbackId + className:(NSString*)className + methodName:(NSString*)methodName; + +- (id)initFromJson:(NSArray*)jsonEntry; + +// Returns the argument at the given index. +// If index >= the number of arguments, returns nil. +// If the argument at the given index is NSNull, returns nil. +- (id)argumentAtIndex:(NSUInteger)index; +// Same as above, but returns defaultValue instead of nil. +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue; +// Same as above, but returns defaultValue instead of nil, and if the argument is not of the expected class, returns defaultValue +- (id)argumentAtIndex:(NSUInteger)index withDefault:(id)defaultValue andClass:(Class)aClass; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin+Resources.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin+Resources.h new file mode 100644 index 0000000..178ecb3 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin+Resources.h @@ -0,0 +1,39 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface CDVPlugin (CDVPluginResources) + +/* + This will return the localized string for a key in a .bundle that is named the same as your class + For example, if your plugin class was called Foo, and you have a Spanish localized strings file, it will + try to load the desired key from Foo.bundle/es.lproj/Localizable.strings + */ +- (NSString*)pluginLocalizedString:(NSString*)key; + +/* + This will return the image for a name in a .bundle that is named the same as your class + For example, if your plugin class was called Foo, and you have an image called "bar", + it will try to load the image from Foo.bundle/bar.png (and appropriately named retina versions) + */ +- (UIImage*)pluginImageResource:(NSString*)name; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin.h new file mode 100644 index 0000000..a29b34c --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPlugin.h @@ -0,0 +1,74 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import +#import +#import + +@interface UIView (org_apache_cordova_UIView_Extension) + +@property (nonatomic, weak) UIScrollView* scrollView; + +@end + +extern NSString* const CDVPageDidLoadNotification; +extern NSString* const CDVPluginHandleOpenURLNotification; +extern NSString* const CDVPluginHandleOpenURLWithAppSourceAndAnnotationNotification; +extern NSString* const CDVPluginResetNotification; +extern NSString* const CDVViewWillAppearNotification; +extern NSString* const CDVViewDidAppearNotification; +extern NSString* const CDVViewWillDisappearNotification; +extern NSString* const CDVViewDidDisappearNotification; +extern NSString* const CDVViewWillLayoutSubviewsNotification; +extern NSString* const CDVViewDidLayoutSubviewsNotification; +extern NSString* const CDVViewWillTransitionToSizeNotification; + +@interface CDVPlugin : NSObject {} + +@property (nonatomic, readonly, weak) UIView* webView; +@property (nonatomic, readonly, weak) id webViewEngine; + +@property (nonatomic, weak) UIViewController* viewController; +@property (nonatomic, weak) id commandDelegate; + +@property (readonly, assign) BOOL hasPendingOperation; + +- (void)pluginInitialize; + +- (void)handleOpenURL:(NSNotification*)notification; +- (void)handleOpenURLWithApplicationSourceAndAnnotation:(NSNotification*)notification; +- (void)onAppTerminate; +- (void)onMemoryWarning; +- (void)onReset; +- (void)dispose; + +/* + // see initWithWebView implementation + - (void) onPause {} + - (void) onResume {} + - (void) onOrientationWillChange {} + - (void) onOrientationDidChange {} + */ + +- (id)appDelegate; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPluginResult.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPluginResult.h new file mode 100644 index 0000000..39b56e8 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVPluginResult.h @@ -0,0 +1,83 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +typedef NS_ENUM(NSUInteger, CDVCommandStatus) { + CDVCommandStatus_NO_RESULT NS_SWIFT_NAME(noResult) = 0, + CDVCommandStatus_OK NS_SWIFT_NAME(ok), + CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION NS_SWIFT_NAME(classNotFoundException), + CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION NS_SWIFT_NAME(illegalAccessException), + CDVCommandStatus_INSTANTIATION_EXCEPTION NS_SWIFT_NAME(instantiationException), + CDVCommandStatus_MALFORMED_URL_EXCEPTION NS_SWIFT_NAME(malformedUrlException), + CDVCommandStatus_IO_EXCEPTION NS_SWIFT_NAME(ioException), + CDVCommandStatus_INVALID_ACTION NS_SWIFT_NAME(invalidAction), + CDVCommandStatus_JSON_EXCEPTION NS_SWIFT_NAME(jsonException), + CDVCommandStatus_ERROR NS_SWIFT_NAME(error) +}; + +// This exists to preserve compatibility with early Swift plugins, who are +// using CDVCommandStatus as ObjC-style constants rather than as Swift enum +// values. +// This declares extern'ed constants (implemented in CDVPluginResult.m) +#define SWIFT_ENUM_COMPAT_HACK(enumVal) extern const CDVCommandStatus SWIFT_##enumVal NS_SWIFT_NAME(enumVal) +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_NO_RESULT); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_OK); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_CLASS_NOT_FOUND_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_ILLEGAL_ACCESS_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_INSTANTIATION_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_MALFORMED_URL_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_IO_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_INVALID_ACTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_JSON_EXCEPTION); +SWIFT_ENUM_COMPAT_HACK(CDVCommandStatus_ERROR); +#undef SWIFT_ENUM_COMPAT_HACK + +@interface CDVPluginResult : NSObject {} + +@property (nonatomic, strong, readonly) NSNumber* status; +@property (nonatomic, strong, readonly) id message; +@property (nonatomic, strong) NSNumber* keepCallback; +// This property can be used to scope the lifetime of another object. For example, +// Use it to store the associated NSData when `message` is created using initWithBytesNoCopy. +@property (nonatomic, strong) id associatedObject; + +- (CDVPluginResult*)init; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsString:(NSString*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArray:(NSArray*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsInt:(int)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSInteger:(NSInteger)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsNSUInteger:(NSUInteger)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDouble:(double)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsBool:(BOOL)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsDictionary:(NSDictionary*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsArrayBuffer:(NSData*)theMessage; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageAsMultipart:(NSArray*)theMessages; ++ (CDVPluginResult*)resultWithStatus:(CDVCommandStatus)statusOrdinal messageToErrorObject:(int)errorCode; + ++ (void)setVerbose:(BOOL)verbose; ++ (BOOL)isVerbose; + +- (void)setKeepCallbackAsBool:(BOOL)bKeepCallback; + +- (NSString*)argumentsAsJSON; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVScreenOrientationDelegate.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVScreenOrientationDelegate.h new file mode 100644 index 0000000..49c3c27 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVScreenOrientationDelegate.h @@ -0,0 +1,28 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@protocol CDVScreenOrientationDelegate + +- (UIInterfaceOrientationMask)supportedInterfaceOrientations; + +- (BOOL)shouldAutorotate; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVTimer.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVTimer.h new file mode 100644 index 0000000..6d31593 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVTimer.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVTimer : NSObject + ++ (void)start:(NSString*)name; ++ (void)stop:(NSString*)name; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVURLSchemeHandler.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVURLSchemeHandler.h new file mode 100644 index 0000000..f0440ab --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVURLSchemeHandler.h @@ -0,0 +1,34 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import + + +@interface CDVURLSchemeHandler : NSObject + +@property (nonatomic, weak) CDVViewController* viewController; + +@property (nonatomic) CDVPlugin* schemePlugin; + +- (instancetype)initWithVC:(CDVViewController *)controller; + + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVViewController.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVViewController.h new file mode 100644 index 0000000..8429505 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVViewController.h @@ -0,0 +1,100 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import +#import +#import +#import +#import +#import +#import +#import +#import + +@protocol CDVWebViewEngineConfigurationDelegate + +@optional +/// Provides a fully configured WKWebViewConfiguration which will be overriden with +/// any related settings you add to config.xml (e.g., `PreferredContentMode`). +/// Useful for more complex configuration, including websiteDataStore. +/// +/// Example usage: +/// +/// extension CDVViewController: CDVWebViewEngineConfigurationDelegate { +/// public func configuration() -> WKWebViewConfiguration { +/// // return your config here +/// } +/// } +- (nonnull WKWebViewConfiguration*)configuration; + +@end + +@interface CDVViewController : UIViewController { + @protected + id _webViewEngine; + @protected + id _commandDelegate; + @protected + CDVCommandQueue* _commandQueue; +} + +NS_ASSUME_NONNULL_BEGIN + +@property (nonatomic, readonly, weak) IBOutlet UIView* webView; +@property (nonatomic, readonly, strong) UIView* launchView; + +@property (nullable, nonatomic, readonly, strong) NSMutableDictionary* pluginObjects; +@property (nonatomic, readonly, strong) NSDictionary* pluginsMap; +@property (nonatomic, readonly, strong) NSMutableDictionary* settings; +@property (nonatomic, readonly, strong) NSXMLParser* configParser; + +@property (nonatomic, readwrite, copy) NSString* appScheme; +@property (nonatomic, readwrite, copy) NSString* configFile; +@property (nonatomic, readwrite, copy) NSString* wwwFolderName; +@property (nonatomic, readwrite, copy) NSString* startPage; +@property (nonatomic, readonly, strong) CDVCommandQueue* commandQueue; +@property (nonatomic, readonly, strong) id webViewEngine; +@property (nonatomic, readonly, strong) id commandDelegate; + +/** + Takes/Gives an array of UIInterfaceOrientation (int) objects + ex. UIInterfaceOrientationPortrait +*/ +@property (nonatomic, readwrite, strong) NSArray* supportedOrientations; + +- (UIView*)newCordovaViewWithFrame:(CGRect)bounds; + +- (nullable NSString*)appURLScheme; +- (nullable NSURL*)errorURL; + +- (NSArray*)parseInterfaceOrientations:(NSArray*)orientations; +- (BOOL)supportsOrientation:(UIInterfaceOrientation)orientation; + +- (nullable id)getCommandInstance:(NSString*)pluginName; +- (void)registerPlugin:(CDVPlugin*)plugin withClassName:(NSString*)className; +- (void)registerPlugin:(CDVPlugin*)plugin withPluginName:(NSString*)pluginName; + +- (void)parseSettingsWithParser:(NSObject *)delegate; + +- (void)showLaunchScreen:(BOOL)visible; + +NS_ASSUME_NONNULL_END + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h new file mode 100644 index 0000000..40187bc --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewEngineProtocol.h @@ -0,0 +1,51 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +#define kCDVWebViewEngineScriptMessageHandlers @"kCDVWebViewEngineScriptMessageHandlers" +#define kCDVWebViewEngineWKNavigationDelegate @"kCDVWebViewEngineWKNavigationDelegate" +#define kCDVWebViewEngineWKUIDelegate @"kCDVWebViewEngineWKUIDelegate" +#define kCDVWebViewEngineWebViewPreferences @"kCDVWebViewEngineWebViewPreferences" + +@protocol CDVWebViewEngineProtocol + +NS_ASSUME_NONNULL_BEGIN + +@property (nonatomic, strong, readonly) UIView* engineWebView; + +- (id)loadRequest:(NSURLRequest*)request; +- (id)loadHTMLString:(NSString*)string baseURL:(nullable NSURL*)baseURL; +- (void)evaluateJavaScript:(NSString*)javaScriptString completionHandler:(void (^_Nullable)(id, NSError*))completionHandler; + +- (NSURL*)URL; +- (BOOL)canLoadRequest:(NSURLRequest*)request; +- (nullable instancetype)initWithFrame:(CGRect)frame; + +/// Convenience Initializer +/// @param frame The frame for the new web view. +/// @param configuration The configuration for the new web view. +- (nullable instancetype)initWithFrame:(CGRect)frame configuration:(nullable WKWebViewConfiguration *)configuration; + +- (void)updateWithInfo:(NSDictionary*)info; + +NS_ASSUME_NONNULL_END + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewProcessPoolFactory.h b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewProcessPoolFactory.h new file mode 100644 index 0000000..b156289 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/CDVWebViewProcessPoolFactory.h @@ -0,0 +1,27 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface CDVWebViewProcessPoolFactory : NSObject +@property (nonatomic, retain) WKProcessPool* sharedPool; + ++(instancetype) sharedFactory; +-(WKProcessPool*) sharedProcessPool; +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/NSDictionary+CordovaPreferences.h b/cordova/platforms/ios/CordovaLib/include/Cordova/NSDictionary+CordovaPreferences.h new file mode 100644 index 0000000..9be2be2 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/NSDictionary+CordovaPreferences.h @@ -0,0 +1,35 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import +#import + +@interface NSDictionary (CordovaPreferences) + +- (id)cordovaSettingForKey:(NSString*)key; +- (BOOL)cordovaBoolSettingForKey:(NSString*)key defaultValue:(BOOL)defaultValue; +- (CGFloat)cordovaFloatSettingForKey:(NSString*)key defaultValue:(CGFloat)defaultValue; + +@end + +@interface NSMutableDictionary (CordovaPreferences) + +- (void)setCordovaSetting:(id)value forKey:(NSString*)key; + +@end diff --git a/cordova/platforms/ios/CordovaLib/include/Cordova/NSMutableArray+QueueAdditions.h b/cordova/platforms/ios/CordovaLib/include/Cordova/NSMutableArray+QueueAdditions.h new file mode 100644 index 0000000..79e6516 --- /dev/null +++ b/cordova/platforms/ios/CordovaLib/include/Cordova/NSMutableArray+QueueAdditions.h @@ -0,0 +1,29 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface NSMutableArray (QueueAdditions) + +- (id)cdv_pop; +- (id)cdv_queueHead; +- (id)cdv_dequeue; +- (void)cdv_enqueue:(id)obj; + +@end diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Info.plist new file mode 100644 index 0000000..5bc9d13 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Info.plist @@ -0,0 +1,33 @@ + + + + + ApplicationProperties + + ApplicationPath + Applications/FlyingPlane.app + Architectures + + arm64 + + CFBundleIdentifier + com.doyban.flyingplane + CFBundleShortVersionString + 1.2.2 + CFBundleVersion + 1.2.2 + SigningIdentity + Apple Development: Daniel Danielecki (9H98636TF9) + Team + 9D3QHQ7CMS + + ArchiveVersion + 2 + CreationDate + 2023-11-25T14:56:01Z + Name + FlyingPlane + SchemeName + FlyingPlane + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon60x60@2x.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon60x60@2x.png new file mode 100644 index 0000000..8b906e4 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon60x60@2x.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon76x76@2x~ipad.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon76x76@2x~ipad.png new file mode 100644 index 0000000..9254980 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/AppIcon76x76@2x~ipad.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Assets.car b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Assets.car new file mode 100644 index 0000000..31bdfd5 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Assets.car differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib new file mode 100644 index 0000000..aacd02a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib new file mode 100644 index 0000000..5381ad6 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/Info.plist new file mode 100644 index 0000000..32288e8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib new file mode 100644 index 0000000..29c6297 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib new file mode 100644 index 0000000..29c6297 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane new file mode 100755 index 0000000..8203c2f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane.entitlements b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane.entitlements new file mode 100644 index 0000000..cc15e2f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/FlyingPlane.entitlements differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/FBAEMKit b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/FBAEMKit new file mode 100755 index 0000000..bd65c89 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/FBAEMKit differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/Info.plist new file mode 100644 index 0000000..4f19cd1 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..c0372e4 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBAEMKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + 11zGf8Uyk+XWIv1lJAdcseVY0aA= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/FBLPromises b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/FBLPromises new file mode 100755 index 0000000..cb70066 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/FBLPromises differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/Info.plist new file mode 100644 index 0000000..6939f1b Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..dca8ccc --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBLPromises.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + qfU0pkIlkNWUDJRjQ0rl8fK7w6Q= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit new file mode 100755 index 0000000..89c0fe7 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/Info.plist new file mode 100644 index 0000000..f99cde6 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings new file mode 100644 index 0000000..c446a5a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings new file mode 100644 index 0000000..d48ac6a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings new file mode 100644 index 0000000..755f99a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings new file mode 100644 index 0000000..d3dab1c Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings new file mode 100644 index 0000000..b74f9a5 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings new file mode 100644 index 0000000..9982d50 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings new file mode 100644 index 0000000..b5e9dda Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings new file mode 100644 index 0000000..044f1db Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings new file mode 100644 index 0000000..6217b22 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings new file mode 100644 index 0000000..9c3d962 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings new file mode 100644 index 0000000..d36066e Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..440aa12 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3f881e0 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..c89dc1d Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings new file mode 100644 index 0000000..d671444 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings new file mode 100644 index 0000000..8788e3a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..042a842 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..fe81583 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings new file mode 100644 index 0000000..2d09a44 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings new file mode 100644 index 0000000..eeab075 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings new file mode 100644 index 0000000..ea01b4b Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings new file mode 100644 index 0000000..acab360 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings new file mode 100644 index 0000000..6776f7f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings new file mode 100644 index 0000000..a8b2bfc Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings new file mode 100644 index 0000000..bf658e1 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..46852dd Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings new file mode 100644 index 0000000..446bb86 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings new file mode 100644 index 0000000..7eb42fd Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings new file mode 100644 index 0000000..dbeb2b0 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings new file mode 100644 index 0000000..50dfad4 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3812057 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings new file mode 100644 index 0000000..7bfa934 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings new file mode 100644 index 0000000..49f7b44 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings new file mode 100644 index 0000000..263d46f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings new file mode 100644 index 0000000..8a76917 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings new file mode 100644 index 0000000..eea0f5f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings new file mode 100644 index 0000000..6cd9f7e Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings new file mode 100644 index 0000000..d1a1996 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings new file mode 100644 index 0000000..8ca54cd Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3d0e97a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings new file mode 100644 index 0000000..22497ba Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings new file mode 100644 index 0000000..c0260e8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings new file mode 100644 index 0000000..5a54fb5 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings new file mode 100644 index 0000000..3e766f8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/Info.plist new file mode 100644 index 0000000..349109e Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6375bdc --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,1085 @@ + + + + + files + + FacebookSDKStrings.bundle/Info.plist + + M5ozCayW/Of5suTBHwNLj3Ir4ac= + + FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings + + hash + + KgOcb+vpOSQTROF4RZggUwm/3pY= + + optional + + + FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings + + hash + + Ede2VMa9a78YI5ByOkylTwbhy6I= + + optional + + + FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings + + hash + + x7RNoGt/8a2G28PoUi+VhsxJb6s= + + optional + + + FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings + + hash + + xmbVAoTdtkQHj/QHhbcdTbiww/c= + + optional + + + FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings + + hash + + HpTvLsaPVA6nOu7XXDT3qWXKm7E= + + optional + + + FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings + + hash + + SxCeeiRn2wnNUyB/66SzRfAnUs8= + + optional + + + FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings + + hash + + fE6wEAYh1EVDG0r8DyzX5CXDkGM= + + optional + + + FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings + + hash + + xLU+FPlEceZ+OUBMYroA8l2WHw8= + + optional + + + FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings + + hash + + S92s3kBfGfIvmxAfMwN8gRQjMY8= + + optional + + + FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings + + hash + + Fi+PLuov138zSBtRHcXa6VBASaU= + + optional + + + FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings + + hash + + 7bV7omNtrTUmDywgZgV9Xa+X3ew= + + optional + + + FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings + + hash + + wQojaW2RP8BDWUnGRxnW+DC15/8= + + optional + + + FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings + + hash + + FaIGsDKnFgeJBjILqsmc8ZL1nmk= + + optional + + + FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings + + hash + + Er+OLL7R4qZm1iYu6J+ErT+ug54= + + optional + + + FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings + + hash + + tcjLFMaNC7pFW8ygpCjtz5SVb24= + + optional + + + FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings + + hash + + RgD9fqthf2528PDAuU+fwo6XvSM= + + optional + + + FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings + + hash + + /VqJt5CiY5jcjaJv2Y9EmCBou8s= + + optional + + + FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings + + hash + + wdtPWPMN7LiTsfOnTcy/H5dmxgc= + + optional + + + FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings + + hash + + HKeVxMb1cOjJhcCILg+IA1YP5Lk= + + optional + + + FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings + + hash + + dWPi9ZZiiI/+QzXFTfOpwSOVpSs= + + optional + + + FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings + + hash + + PV/w9jygTU2mKgtMd0//2bWBZYY= + + optional + + + FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings + + hash + + rOG1URNC+nfSpyxK93q5JemUktk= + + optional + + + FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings + + hash + + vGkvZvqtRZLat5SRc3KpheLaJe8= + + optional + + + FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings + + hash + + 7D92k5ZS1sWQhpMvCwFkczSgw7E= + + optional + + + FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings + + hash + + zxeJrf6mEi/l3GaN54fijDrquSI= + + optional + + + FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings + + hash + + QpgW+7BQhQ6+OZ6lp8S0HW40mKY= + + optional + + + FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings + + hash + + c/X0HBYc3ZnzLjE6JNShgXzlD9k= + + optional + + + FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings + + hash + + g5cpfTpypPEWh5meM2rqPbcMjC8= + + optional + + + FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings + + hash + + DngVIQ+oFWlKgBRu+Yl6SQXgs2k= + + optional + + + FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings + + hash + + enfiPAX72DcNPxkj9caAHga02O8= + + optional + + + FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings + + hash + + +Bv92AzyY/q0T9xuMy67WqjNPI8= + + optional + + + FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings + + hash + + nDhRH+XHIe+S8m5tB+mjA3HeZ2M= + + optional + + + FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings + + hash + + OfE9JJGJJR7SZfoaJ7MGGLaLLSI= + + optional + + + FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings + + hash + + zB4Ubm66gSeZpBPdaqfet0yrG30= + + optional + + + FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings + + hash + + jfdN4ShL+SWzixkHF9Hrpvns9W8= + + optional + + + FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings + + hash + + k91E416LjSLvj1/3jLRqgmGoAcU= + + optional + + + FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings + + hash + + BwQjEDWGD6zIbL/XR16s9DO8K44= + + optional + + + FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings + + hash + + moJKqSjf0IevHP5m62diIdC3V+I= + + optional + + + FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings + + hash + + QjkjCZBR84x6o8Yzd9DmH3yF3HA= + + optional + + + FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings + + hash + + wvjinijOrFgCmbRxPic40tIPk54= + + optional + + + FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings + + hash + + P5rT0KUOaFOUr5qarw40SIxlf3Q= + + optional + + + FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings + + hash + + 7MXFgrKeSFwNeIyY/tO7ZS8l2i8= + + optional + + + FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings + + hash + + 4em6I3Fyg+b5k0iCmCmUF7VMA6k= + + optional + + + FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings + + hash + + qZ2lTxRaE8QmFlvj7iYtQnQb6+8= + + optional + + + Info.plist + + 4KE3CXGy+xGE7i7YqfFTdzcZU6M= + + + files2 + + FacebookSDKStrings.bundle/Info.plist + + hash + + M5ozCayW/Of5suTBHwNLj3Ir4ac= + + hash2 + + 8EgAGGUy4V+/FhH0LLm5r+04zvTtL77wlmaHwhJAOwo= + + + FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings + + hash + + KgOcb+vpOSQTROF4RZggUwm/3pY= + + hash2 + + z/F02QKfl29IhY3D/ihxeGTWa4IEX51cGHF+qt7tVtw= + + optional + + + FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings + + hash + + Ede2VMa9a78YI5ByOkylTwbhy6I= + + hash2 + + h6OGim4yw2Go+1ntn9y1tNIrS5k1oV8460dU5/0pYWA= + + optional + + + FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings + + hash + + x7RNoGt/8a2G28PoUi+VhsxJb6s= + + hash2 + + c65eBCAJVPtqc0gzacA4N0jBOuj4C43yEBnQrbeLNB0= + + optional + + + FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings + + hash + + xmbVAoTdtkQHj/QHhbcdTbiww/c= + + hash2 + + Z9Fv9Vsx5r30Ye6XohbScaPvUA1MysnJZQZJnQ+XMxw= + + optional + + + FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings + + hash + + HpTvLsaPVA6nOu7XXDT3qWXKm7E= + + hash2 + + 5L/SkTqXHoqEtsWCRHjINeZ611ORznsedlxxsXL3Ixw= + + optional + + + FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings + + hash + + SxCeeiRn2wnNUyB/66SzRfAnUs8= + + hash2 + + itbMpDlaM8/yghRaz9oL7tl3koZmotT+1yj348D5BlY= + + optional + + + FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings + + hash + + fE6wEAYh1EVDG0r8DyzX5CXDkGM= + + hash2 + + xTWy9skvuZNEJ/bND6YtxplP6HfTiChSD+3dtZMLVvo= + + optional + + + FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings + + hash + + xLU+FPlEceZ+OUBMYroA8l2WHw8= + + hash2 + + NPcm9OPLgRqbNc3V3j7ChdOhLI+7u3i4Iai8tfqZTzM= + + optional + + + FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings + + hash + + S92s3kBfGfIvmxAfMwN8gRQjMY8= + + hash2 + + ufQP2hBvqtGv3PkL/n/4FcUU977jpusnXvbhB3+g0es= + + optional + + + FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings + + hash + + Fi+PLuov138zSBtRHcXa6VBASaU= + + hash2 + + /Ep5fzngOVykodxxukmiTd0kieBnJKF4i60DZ5S3o/U= + + optional + + + FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings + + hash + + 7bV7omNtrTUmDywgZgV9Xa+X3ew= + + hash2 + + KzqFlb+OarxPEqBeomj02+cxKGRc60M7iaF4tGUzUh4= + + optional + + + FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings + + hash + + wQojaW2RP8BDWUnGRxnW+DC15/8= + + hash2 + + VF43OKZn9/x18HMwPs8XtPP3rmwwGV1zNXo2v3J9/V8= + + optional + + + FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings + + hash + + FaIGsDKnFgeJBjILqsmc8ZL1nmk= + + hash2 + + +B9CPTqROM5Nx0jGBmwJ4B9QAX/V9qpaG6uhLYlU5+w= + + optional + + + FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings + + hash + + Er+OLL7R4qZm1iYu6J+ErT+ug54= + + hash2 + + sY2o7hKAvSH7k6b4/x6Cl+dqInq3+JvSqz5quMZ1pTU= + + optional + + + FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings + + hash + + tcjLFMaNC7pFW8ygpCjtz5SVb24= + + hash2 + + YOhNULW9ded9yKW3XDhRsemNFkVdW1G/XlKz50ycJSA= + + optional + + + FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings + + hash + + RgD9fqthf2528PDAuU+fwo6XvSM= + + hash2 + + yndknl0oCBflrqKN+bYaehbELZh2TgaKFZtUUjc1ATE= + + optional + + + FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings + + hash + + /VqJt5CiY5jcjaJv2Y9EmCBou8s= + + hash2 + + mvei8dipX1jfymRGO9ZmYGEfM+qEyh1dV/xA8vOAFQY= + + optional + + + FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings + + hash + + wdtPWPMN7LiTsfOnTcy/H5dmxgc= + + hash2 + + UZu36VyQElvaOpgM0oMsR75LKZR0hqhpJ2a2/CY5bBE= + + optional + + + FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings + + hash + + HKeVxMb1cOjJhcCILg+IA1YP5Lk= + + hash2 + + NPHR3x6j8OqW848BH10wT+ytfDnt3hWItCPvam4hzfc= + + optional + + + FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings + + hash + + dWPi9ZZiiI/+QzXFTfOpwSOVpSs= + + hash2 + + gELt3ILZ8omMsUXsTWeXKhygsRLZAKxw6ZOnFtEh8zg= + + optional + + + FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings + + hash + + PV/w9jygTU2mKgtMd0//2bWBZYY= + + hash2 + + RTkhJrdInKWtKPp4j1oeK5uyv+gqrz0TwRA0jzIDMbI= + + optional + + + FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings + + hash + + rOG1URNC+nfSpyxK93q5JemUktk= + + hash2 + + IJbzSINAywYbwsGatHkbKGIx+I6HcdFxMznUQ7QX3IA= + + optional + + + FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings + + hash + + vGkvZvqtRZLat5SRc3KpheLaJe8= + + hash2 + + AXGunMjAqgra+f9gr4nvK7cD6IslzYSUwIS7K6GemLc= + + optional + + + FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings + + hash + + 7D92k5ZS1sWQhpMvCwFkczSgw7E= + + hash2 + + F2+QtiUgfzrP+IuovYNTJZTs4CxaMziSHxiFcbbqwok= + + optional + + + FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings + + hash + + zxeJrf6mEi/l3GaN54fijDrquSI= + + hash2 + + BGbsKJW+hWP7C8d2B7ZqCEO4w+Xt98w7hH6+vo49cUM= + + optional + + + FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings + + hash + + QpgW+7BQhQ6+OZ6lp8S0HW40mKY= + + hash2 + + EXD9MTbTaMNUThICpW79u1gqBlYIqrgllYd06ZexcK4= + + optional + + + FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings + + hash + + c/X0HBYc3ZnzLjE6JNShgXzlD9k= + + hash2 + + g5fhQAjES9j7A+V4a/3YWBHtR7q/kZrv7nmAwVhQ5no= + + optional + + + FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings + + hash + + g5cpfTpypPEWh5meM2rqPbcMjC8= + + hash2 + + cj8TQpzXQ1P2XVeOXUOVNUHQgEIJn2JF7RbKNMH2Ih4= + + optional + + + FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings + + hash + + DngVIQ+oFWlKgBRu+Yl6SQXgs2k= + + hash2 + + qfo02B/YNhohC8DNAvcvd2mBcSf9DFgzRJveAlevvtE= + + optional + + + FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings + + hash + + enfiPAX72DcNPxkj9caAHga02O8= + + hash2 + + T6veSbZHqFaj0fg0a2XmjxyMb9l/4CtG9ztkA38Zk7o= + + optional + + + FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings + + hash + + +Bv92AzyY/q0T9xuMy67WqjNPI8= + + hash2 + + U58wgLeo6ca8Vke0o3s5WSDI+H1cMn7MsloWOJdYJHY= + + optional + + + FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings + + hash + + nDhRH+XHIe+S8m5tB+mjA3HeZ2M= + + hash2 + + wQP85kdie6QyEWBX+lPsZzCfd53NxhphxZg31G39X1w= + + optional + + + FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings + + hash + + OfE9JJGJJR7SZfoaJ7MGGLaLLSI= + + hash2 + + UO1kLwrQ9GHukIyF71AbMlxGNLS50xgKv2OxXpMRzvw= + + optional + + + FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings + + hash + + zB4Ubm66gSeZpBPdaqfet0yrG30= + + hash2 + + 1L1GTQzcab4OJf2ziKpd3aCcIozAQ/FMvIFnxoagD6o= + + optional + + + FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings + + hash + + jfdN4ShL+SWzixkHF9Hrpvns9W8= + + hash2 + + E7LlcYhl8JJt12wTifRxNh1KrLlX05w6hfQI6MIIYO8= + + optional + + + FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings + + hash + + k91E416LjSLvj1/3jLRqgmGoAcU= + + hash2 + + GEm/4nUubovD5twaLZr0N9peb3SDHO3z3M08ICEbqWk= + + optional + + + FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings + + hash + + BwQjEDWGD6zIbL/XR16s9DO8K44= + + hash2 + + xNUYaP5hKuCyin90IDBPAtilRh5PZrO7PrqA0NJplwY= + + optional + + + FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings + + hash + + moJKqSjf0IevHP5m62diIdC3V+I= + + hash2 + + ojJM4sphClmTIZmcMB3e2DRDOVUCBH6YGbqOuFpypKc= + + optional + + + FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings + + hash + + QjkjCZBR84x6o8Yzd9DmH3yF3HA= + + hash2 + + J+bQBeBsUs50PBhH81SWmC7PwRVS+HzK+VFKSbRIqiM= + + optional + + + FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings + + hash + + wvjinijOrFgCmbRxPic40tIPk54= + + hash2 + + /qGZE6HK2doaSgHRjuzMbzWglDbOSsp3BrDB7p25s5I= + + optional + + + FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings + + hash + + P5rT0KUOaFOUr5qarw40SIxlf3Q= + + hash2 + + ItGPXoc7Yw7Wat59wN8EAlfXAxl/rFekZQBUJhNCRCU= + + optional + + + FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings + + hash + + 7MXFgrKeSFwNeIyY/tO7ZS8l2i8= + + hash2 + + tzJdva8lQC3CRgfCby24cnrMKfPO059bQNKqO5bXSqY= + + optional + + + FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings + + hash + + 4em6I3Fyg+b5k0iCmCmUF7VMA6k= + + hash2 + + /+H0BCqP6GjuVGsVNeziVarvK+JK+KPU2S9jaEYlmqY= + + optional + + + FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings + + hash + + qZ2lTxRaE8QmFlvj7iYtQnQb6+8= + + hash2 + + RnXql3LXk7tkVGyRpi7oKqU+4XUYEbTuid9jpOjiKDw= + + optional + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics new file mode 100755 index 0000000..936d251 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/Info.plist new file mode 100644 index 0000000..160c823 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..c49076a --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKCoreKit_Basics.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + SdmuMAnAtKhOQDCm6zpkAW41kfc= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit new file mode 100755 index 0000000..babb898 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/Info.plist new file mode 100644 index 0000000..6e03d67 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..4a148f3 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKLoginKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + bUnslPyHbd4LoAKPpQI04acqiK4= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/FBSDKShareKit b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/FBSDKShareKit new file mode 100755 index 0000000..dd2c3e0 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/FBSDKShareKit differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/Info.plist new file mode 100644 index 0000000..2276d28 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..9200479 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/FBSDKShareKit.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + Rt4GNn4m0cZYb26ZT9/Arrr86/c= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/GoogleUtilities b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/GoogleUtilities new file mode 100755 index 0000000..2abaeaa Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/GoogleUtilities differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/Info.plist new file mode 100644 index 0000000..d60e911 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..1fb4c0b --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/GoogleUtilities.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + ijbpDq2HqoQAOyAzASvUNrRryPo= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAVFoundation.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAVFoundation.dylib new file mode 100755 index 0000000..0041e2b Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAVFoundation.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAccelerate.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAccelerate.dylib new file mode 100755 index 0000000..99d46b8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftAccelerate.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCore.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCore.dylib new file mode 100755 index 0000000..aa0dc51 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCore.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreAudio.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreAudio.dylib new file mode 100755 index 0000000..c39cafe Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreAudio.dylib differ diff --git a/cordova/platforms/ios/www/assets/audio/click.wav b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreFoundation.dylib old mode 100644 new mode 100755 similarity index 54% rename from cordova/platforms/ios/www/assets/audio/click.wav rename to cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreFoundation.dylib index a92759a..ef774d7 Binary files a/cordova/platforms/ios/www/assets/audio/click.wav and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreFoundation.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreGraphics.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreGraphics.dylib new file mode 100755 index 0000000..6418967 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreGraphics.dylib differ diff --git a/cordova/www/assets/audio/click.wav b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreImage.dylib old mode 100644 new mode 100755 similarity index 54% rename from cordova/www/assets/audio/click.wav rename to cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreImage.dylib index a92759a..a0962c0 Binary files a/cordova/www/assets/audio/click.wav and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreImage.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreLocation.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreLocation.dylib new file mode 100755 index 0000000..889cf75 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreLocation.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreMedia.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreMedia.dylib new file mode 100755 index 0000000..e39024f Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftCoreMedia.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDarwin.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDarwin.dylib new file mode 100755 index 0000000..7b3f8ab Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDarwin.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDispatch.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDispatch.dylib new file mode 100755 index 0000000..4a8d070 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftDispatch.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftFoundation.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftFoundation.dylib new file mode 100755 index 0000000..734b084 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftFoundation.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftMetal.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftMetal.dylib new file mode 100755 index 0000000..5a7e888 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftMetal.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftObjectiveC.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftObjectiveC.dylib new file mode 100755 index 0000000..076d360 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftObjectiveC.dylib differ diff --git a/cordova/platforms/android/app/src/main/assets/www/assets/audio/click.wav b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftQuartzCore.dylib old mode 100644 new mode 100755 similarity index 51% rename from cordova/platforms/android/app/src/main/assets/www/assets/audio/click.wav rename to cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftQuartzCore.dylib index a92759a..e612b32 Binary files a/cordova/platforms/android/app/src/main/assets/www/assets/audio/click.wav and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftQuartzCore.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftUIKit.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftUIKit.dylib new file mode 100755 index 0000000..bcf530b Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftUIKit.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftos.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftos.dylib new file mode 100755 index 0000000..5c81a9a Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftos.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftsimd.dylib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftsimd.dylib new file mode 100755 index 0000000..1a5bc88 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/libswiftsimd.dylib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/Info.plist new file mode 100644 index 0000000..3ebf88b Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..46573ba --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/_CodeSignature/CodeResources @@ -0,0 +1,101 @@ + + + + + files + + Info.plist + + Yar6jBON1X5I4kmkyr5JwiDZ0u0= + + + files2 + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/nanopb b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/nanopb new file mode 100755 index 0000000..5c46123 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Frameworks/nanopb.framework/nanopb differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Info.plist b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Info.plist new file mode 100644 index 0000000..b89ac72 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/Info.plist differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/MainViewController.nib b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/MainViewController.nib new file mode 100644 index 0000000..79d8989 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/MainViewController.nib differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/PkgInfo b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/PkgInfo new file mode 100644 index 0000000..bd04210 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/PkgInfo @@ -0,0 +1 @@ +APPL???? \ No newline at end of file diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/_CodeSignature/CodeResources b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/_CodeSignature/CodeResources new file mode 100644 index 0000000..4414059 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/_CodeSignature/CodeResources @@ -0,0 +1,1954 @@ + + + + + files + + AppIcon60x60@2x.png + + BKV7dwH8NEpAgJ6FnmiJ43LWs7I= + + AppIcon76x76@2x~ipad.png + + dgZI66jQMjUbfn4SYykmD1wD+Fg= + + Assets.car + + j8qpmR4EFZ40ACFsBVc2s81q1P4= + + CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib + + lfA503RZNztX4I2aM8h+quhMnEw= + + CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib + + IGfNxGad34FrJfeJ/2a451+tKEI= + + CDVLaunchScreen.storyboardc/Info.plist + + n2t8gsDpfE6XkhG31p7IQJRxTxU= + + CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib + + ZVgM1+KwZcZnwhgaI0F7Bt1ba2c= + + CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib + + ZVgM1+KwZcZnwhgaI0F7Bt1ba2c= + + FlyingPlane.entitlements + + 92uFdjUKwebxx0y1y8mEZw6kiP4= + + Frameworks/FBAEMKit.framework/FBAEMKit + + GIHARY/CGo33FTNFjaA4pY+VfOg= + + Frameworks/FBAEMKit.framework/Info.plist + + 11zGf8Uyk+XWIv1lJAdcseVY0aA= + + Frameworks/FBAEMKit.framework/_CodeSignature/CodeResources + + OUDSRP/0HSXtNY/PtSQxSEzBR3w= + + Frameworks/FBLPromises.framework/FBLPromises + + xcTxE5vx7jbmXvJIEio/AzXOpoY= + + Frameworks/FBLPromises.framework/Info.plist + + qfU0pkIlkNWUDJRjQ0rl8fK7w6Q= + + Frameworks/FBLPromises.framework/_CodeSignature/CodeResources + + x8pqVPSOCHA6GWthm22ERVk/uuo= + + Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit + + tT7rOwxJF0DpaE2xFsd1zKyu5kc= + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/Info.plist + + M5ozCayW/Of5suTBHwNLj3Ir4ac= + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings + + hash + + KgOcb+vpOSQTROF4RZggUwm/3pY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings + + hash + + Ede2VMa9a78YI5ByOkylTwbhy6I= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings + + hash + + x7RNoGt/8a2G28PoUi+VhsxJb6s= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings + + hash + + xmbVAoTdtkQHj/QHhbcdTbiww/c= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings + + hash + + HpTvLsaPVA6nOu7XXDT3qWXKm7E= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings + + hash + + SxCeeiRn2wnNUyB/66SzRfAnUs8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings + + hash + + fE6wEAYh1EVDG0r8DyzX5CXDkGM= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings + + hash + + xLU+FPlEceZ+OUBMYroA8l2WHw8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings + + hash + + S92s3kBfGfIvmxAfMwN8gRQjMY8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings + + hash + + Fi+PLuov138zSBtRHcXa6VBASaU= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings + + hash + + 7bV7omNtrTUmDywgZgV9Xa+X3ew= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings + + hash + + wQojaW2RP8BDWUnGRxnW+DC15/8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings + + hash + + FaIGsDKnFgeJBjILqsmc8ZL1nmk= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings + + hash + + Er+OLL7R4qZm1iYu6J+ErT+ug54= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings + + hash + + tcjLFMaNC7pFW8ygpCjtz5SVb24= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings + + hash + + RgD9fqthf2528PDAuU+fwo6XvSM= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings + + hash + + /VqJt5CiY5jcjaJv2Y9EmCBou8s= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings + + hash + + wdtPWPMN7LiTsfOnTcy/H5dmxgc= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings + + hash + + HKeVxMb1cOjJhcCILg+IA1YP5Lk= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings + + hash + + dWPi9ZZiiI/+QzXFTfOpwSOVpSs= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings + + hash + + PV/w9jygTU2mKgtMd0//2bWBZYY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings + + hash + + rOG1URNC+nfSpyxK93q5JemUktk= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings + + hash + + vGkvZvqtRZLat5SRc3KpheLaJe8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings + + hash + + 7D92k5ZS1sWQhpMvCwFkczSgw7E= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings + + hash + + zxeJrf6mEi/l3GaN54fijDrquSI= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings + + hash + + QpgW+7BQhQ6+OZ6lp8S0HW40mKY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings + + hash + + c/X0HBYc3ZnzLjE6JNShgXzlD9k= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings + + hash + + g5cpfTpypPEWh5meM2rqPbcMjC8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings + + hash + + DngVIQ+oFWlKgBRu+Yl6SQXgs2k= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings + + hash + + enfiPAX72DcNPxkj9caAHga02O8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings + + hash + + +Bv92AzyY/q0T9xuMy67WqjNPI8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings + + hash + + nDhRH+XHIe+S8m5tB+mjA3HeZ2M= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings + + hash + + OfE9JJGJJR7SZfoaJ7MGGLaLLSI= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings + + hash + + zB4Ubm66gSeZpBPdaqfet0yrG30= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings + + hash + + jfdN4ShL+SWzixkHF9Hrpvns9W8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings + + hash + + k91E416LjSLvj1/3jLRqgmGoAcU= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings + + hash + + BwQjEDWGD6zIbL/XR16s9DO8K44= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings + + hash + + moJKqSjf0IevHP5m62diIdC3V+I= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings + + hash + + QjkjCZBR84x6o8Yzd9DmH3yF3HA= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings + + hash + + wvjinijOrFgCmbRxPic40tIPk54= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings + + hash + + P5rT0KUOaFOUr5qarw40SIxlf3Q= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings + + hash + + 7MXFgrKeSFwNeIyY/tO7ZS8l2i8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings + + hash + + 4em6I3Fyg+b5k0iCmCmUF7VMA6k= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings + + hash + + qZ2lTxRaE8QmFlvj7iYtQnQb6+8= + + optional + + + Frameworks/FBSDKCoreKit.framework/Info.plist + + 4KE3CXGy+xGE7i7YqfFTdzcZU6M= + + Frameworks/FBSDKCoreKit.framework/_CodeSignature/CodeResources + + gqG970Rk1zuIfYDZFcU70J21wy0= + + Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics + + ARt5txhYKiMHU+OYiJh/2a2rIYA= + + Frameworks/FBSDKCoreKit_Basics.framework/Info.plist + + SdmuMAnAtKhOQDCm6zpkAW41kfc= + + Frameworks/FBSDKCoreKit_Basics.framework/_CodeSignature/CodeResources + + 3gVjr4qRV0KBBTtrKAr7UZF9alw= + + Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit + + 93OMIv9VqTXHNXRGOzM9A8O9s/I= + + Frameworks/FBSDKLoginKit.framework/Info.plist + + bUnslPyHbd4LoAKPpQI04acqiK4= + + Frameworks/FBSDKLoginKit.framework/_CodeSignature/CodeResources + + NwZ4i/hMsShgt/dHjD2xny+nuVo= + + Frameworks/FBSDKShareKit.framework/FBSDKShareKit + + oj+9kS6oqnEoPZPeB6QFl9D1WQM= + + Frameworks/FBSDKShareKit.framework/Info.plist + + Rt4GNn4m0cZYb26ZT9/Arrr86/c= + + Frameworks/FBSDKShareKit.framework/_CodeSignature/CodeResources + + dwsJjqZ9yljowb3pFwh+wFDUg2Q= + + Frameworks/GoogleUtilities.framework/GoogleUtilities + + +/AjDmIcojhek0P/HDFKB5dqvCE= + + Frameworks/GoogleUtilities.framework/Info.plist + + ijbpDq2HqoQAOyAzASvUNrRryPo= + + Frameworks/GoogleUtilities.framework/_CodeSignature/CodeResources + + 4PIS7w9KVKPVW1Tjjy2n+gXyp50= + + Frameworks/libswiftAVFoundation.dylib + + gNQPwaxjRg5DKIael7QpJpNwues= + + Frameworks/libswiftAccelerate.dylib + + dl/HIwb/Ssuy9gSyDQtBFdg6CL0= + + Frameworks/libswiftCore.dylib + + GXARMT5hiungQlWbM7nZz/ibqmE= + + Frameworks/libswiftCoreAudio.dylib + + Dc6uue+PqU5e1JMsjIG/Qepc5cU= + + Frameworks/libswiftCoreFoundation.dylib + + EismnA+yl3KnmraQil7d9ZLt1y8= + + Frameworks/libswiftCoreGraphics.dylib + + +0SgFPnaOJscFcCizZMIVowVIRc= + + Frameworks/libswiftCoreImage.dylib + + d4Qwq6hBTkq+3HzJFdX5SVAPQrw= + + Frameworks/libswiftCoreLocation.dylib + + zBQ7r0mRB85qTp8DDeOjKY0RF5g= + + Frameworks/libswiftCoreMedia.dylib + + a5FpCR2tJor1H+5HuMAKKIZ6tTY= + + Frameworks/libswiftDarwin.dylib + + voC8Lg45L+ry/f0WEKgggVXlsrs= + + Frameworks/libswiftDispatch.dylib + + /YmuCewL7AeXuxyjrjPYsOrlEr0= + + Frameworks/libswiftFoundation.dylib + + PSIHoYgM7PvVZiK36AtiJlexed8= + + Frameworks/libswiftMetal.dylib + + 5owrrL2jdeVQfZ7ez3cFxNjGaoI= + + Frameworks/libswiftObjectiveC.dylib + + xH44VAlXv0CiWQxugOGt7M9mIlI= + + Frameworks/libswiftQuartzCore.dylib + + S3sxoVg596x69e6aHzke2y69CX0= + + Frameworks/libswiftUIKit.dylib + + ngJ4Ja9cXzJsgx+GdbD+ZBLRd1c= + + Frameworks/libswiftos.dylib + + m4Bz62dmLyF4cG3UdNV6lUtuuTo= + + Frameworks/libswiftsimd.dylib + + aBMaZoD6+k2ld0yJC3O+9w4LVTM= + + Frameworks/nanopb.framework/Info.plist + + Yar6jBON1X5I4kmkyr5JwiDZ0u0= + + Frameworks/nanopb.framework/_CodeSignature/CodeResources + + X49PFAq50/Y4lRx0twc10xuPKc0= + + Frameworks/nanopb.framework/nanopb + + rMW1pzZ4bik+k3MUZd3dUOWEsDg= + + Info.plist + + AH0O95DohvI9BTZzrRTU8f6bmO4= + + MainViewController.nib + + 77/2ZKIio7oAcG0+QMEwa1g0zXI= + + PkgInfo + + n57qDP4tZfLD1rCS43W0B4LQjzE= + + config.xml + + RuwFeL8ameW2emm15pfPvrxMx+g= + + embedded.mobileprovision + + pZ4K0+GGFxqS6iWm4M38GEgii2o= + + www/app.47a27a5ba1050a8bf966.js + + 8rbygrptHT5lKk5+xNAnKYda1O0= + + www/app.47a27a5ba1050a8bf966.js.LICENSE + + TbPX9RkGrvAnqetfNZLQszlAknU= + + www/assets/audio/click.wav + + mQ2ymew2zlt98eO1V52xZfEKRm4= + + www/assets/audio/crash.wav + + ML/LZzFD4BgZHaCcV+L1fhSo7bo= + + www/assets/audio/explosion.wav + + gH1sbhOIC0hYUEMJ2cLamvJdjdo= + + www/assets/audio/gameover.wav + + dtKbDTQk4UKkEml9jLSlWb7PO4g= + + www/assets/audio/plane.wav + + aavGYhYDdvU9CqA6xcLtDOQn/2M= + + www/assets/audio/wind.wav + + SCi55VElFP5HLWoI+Cc6rixBgkE= + + www/assets/images/background.png + + PLETNIV9aU8ONdgyhqYDSTA88xw= + + www/assets/images/musicOff.png + + J3nB3V+VsGulUm440URntjq49Kw= + + www/assets/images/musicOn.png + + P2Ao5GHAHLJtTMoiZpcNX6v1Sf4= + + www/assets/images/sheet_black1x.png + + zbqOLtsGb7VdAmlGZkwk+c688C4= + + www/assets/images/yellowSheet.png + + ccdP0zyu9k99PhBSlC98uBnKukQ= + + www/assets/json/planes.json + + hf2dyHs65lrmdyanVm/FPvJLBDU= + + www/assets/json/shapes.json + + Wdhhk4LVkO3iVWH54eldVoz0bck= + + www/assets/json/sheet.json + + 3rvecRgtylS/E64gGdHSX1ENvxs= + + www/assets/spritesheets/planes.png + + yzGySkpzPCABPBki0FlnAXdGY/M= + + www/assets/spritesheets/sheet.png + + tMDdtmYFQh92DFveNg5QFbKBsro= + + www/assets/xml/sheet_black1x.xml + + nl279fcU2vCfDZv7aAVr0a56Wlw= + + www/assets/xml/yellowSheet.xml + + 7XzGR36rRjpxI73pxwTemKd8Avs= + + www/cordova-js-src/exec.js + + AeFQ6qjr2tcMNVPPVkqfHrV6IZA= + + www/cordova-js-src/platform.js + + BE1CcpMz3w6aKhXmXsOm0p+Az00= + + www/cordova-js-src/plugin/ios/console.js + + JxsXQKuPPSgt9+pzHn59exrCEE8= + + www/cordova-js-src/plugin/ios/launchscreen.js + + jY23HLemhJLqgZ5EwTYOnoSqO2A= + + www/cordova-js-src/plugin/ios/logger.js + + PQ9t01dGnm6HmW1BKdNWeuEgjsM= + + www/cordova-js-src/plugin/ios/wkwebkit.js + + CoyM4VnDuqAd3JKdWTdowYJVfmQ= + + www/cordova.js + + iFrWAxc76KnKnq598sQ42JhVaHU= + + www/cordova_plugins.js + + X2tldQv9kxLvFv3Rj2ixupWDCjM= + + www/index.html + + 6Cmu0QmazkSgXmv7I4C8WtCp0M8= + + www/plugins/admob-plus-cordova/www/admob.js + + I1c3713ZZg18Yz7EdgPh2oFmhv8= + + www/plugins/cordova-plugin-browsertab/www/browsertab.js + + birVWBpyJylU0o/tgEiSB+++SAs= + + www/plugins/cordova-plugin-buildinfo/www/buildinfo.js + + 2hEZAbclcyXvP42AK9X1dDUxARI= + + www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js + + 0NrlXTwBHUS5u9XaqkoSJ+waVDo= + + www/plugins/cordova-plugin-facebook-connect/www/facebook-native.js + + E6dAeCaYJXltHAfwQMJhIx/6H7k= + + www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js + + SYsklvOH/+qpKSbz3LHmv5XDAQ8= + + www/plugins/cordova-plugin-purchase/www/store.js + + oTFB8b5+C/zODJfc+3qPpvYM9Ww= + + www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js + + nEkobfswS3yvOBZWNiVk1bM6ONk= + + www/plugins/cordova-universal-links-plugin/www/universal_links.js + + DAjXJv6VM9UoS8J0wCgBoFkavSQ= + + www/plugins/es6-promise-plugin/www/promise.js + + SaYUot7eUOO74AAVeBga+HSnf/E= + + www/vendor.47a27a5ba1050a8bf966.js + + FaQ7hanR/+KvzcCFaB9CFDEL0PA= + + www/vendor.47a27a5ba1050a8bf966.js.LICENSE + + Vnw3W4hMj3CHRjVdavRuMxzACQI= + + + files2 + + AppIcon60x60@2x.png + + hash2 + + 95ishil4RRm4RGhXr81AeO9xC01SV31QfttER0cTA+c= + + + AppIcon76x76@2x~ipad.png + + hash2 + + ey5fun0yjkLtkPOQGkC5kJTQQV7CBkD+GEzaG+io8so= + + + Assets.car + + hash2 + + mUCSCY7TiOQHGLyivHxtVZIFAOt0AHAdfSUCBVrn8og= + + + CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/objects-13.0+.nib + + hash2 + + 2vHYXhU7pwLVytDzcoc0JTM1OJdq479IGwJZKcVe4dI= + + + CDVLaunchScreen.storyboardc/01J-lp-oVM-view-Ze5-6b-2t3.nib/runtime.nib + + hash2 + + DgmjNUu7nwFehOhUJN1BhMUWnHSgQyRKkmC9dqH5BIg= + + + CDVLaunchScreen.storyboardc/Info.plist + + hash2 + + HyVdXMU7Ux4/KalAao30mpWOK/lEPT4gvYN09wf31cg= + + + CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/objects-13.0+.nib + + hash2 + + VPNjf2cf66XxnoLsT0p/tEi7PPwPsYDwiapXH8jwU+I= + + + CDVLaunchScreen.storyboardc/UIViewController-01J-lp-oVM.nib/runtime.nib + + hash2 + + VPNjf2cf66XxnoLsT0p/tEi7PPwPsYDwiapXH8jwU+I= + + + FlyingPlane.entitlements + + hash2 + + e8Fu49zBmqMHcWVy3RzSlFC7tOxkW7mWWj4lEtwlOzc= + + + Frameworks/FBAEMKit.framework/FBAEMKit + + hash2 + + rgk1oAffw/PKt3coDDnJA34BZ8vVWBOm6cJJGclsUrU= + + + Frameworks/FBAEMKit.framework/Info.plist + + hash2 + + YfHooOFi/2fBcAEI1o2WmZQJ2gdkJ0N/Uc9ydnWg6DU= + + + Frameworks/FBAEMKit.framework/_CodeSignature/CodeResources + + hash2 + + 8cH+wZkxZeXqRovIIvFHWqxfwnc7B3UQW5k8qkIrTAA= + + + Frameworks/FBLPromises.framework/FBLPromises + + hash2 + + lBH60cqNfAW89h+GJvvVi+L7RxITCW6bmYL7spRfgw8= + + + Frameworks/FBLPromises.framework/Info.plist + + hash2 + + LInuigYYecNnnAjs0DmNzuZ2K3XHM36gnIJLBigq22s= + + + Frameworks/FBLPromises.framework/_CodeSignature/CodeResources + + hash2 + + 36pXN2B/1zfl9NoupFGcKZRK2h2mXhnnKN4elXqYgkA= + + + Frameworks/FBSDKCoreKit.framework/FBSDKCoreKit + + hash2 + + Y2mdjL2OOcrHO7uA77XLCCAY883hb9lxOWDHXm//HZI= + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/Info.plist + + hash2 + + 8EgAGGUy4V+/FhH0LLm5r+04zvTtL77wlmaHwhJAOwo= + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/af.lproj/FacebookSDK.strings + + hash2 + + z/F02QKfl29IhY3D/ihxeGTWa4IEX51cGHF+qt7tVtw= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ar.lproj/FacebookSDK.strings + + hash2 + + h6OGim4yw2Go+1ntn9y1tNIrS5k1oV8460dU5/0pYWA= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/bn.lproj/FacebookSDK.strings + + hash2 + + c65eBCAJVPtqc0gzacA4N0jBOuj4C43yEBnQrbeLNB0= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/cs.lproj/FacebookSDK.strings + + hash2 + + Z9Fv9Vsx5r30Ye6XohbScaPvUA1MysnJZQZJnQ+XMxw= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/da.lproj/FacebookSDK.strings + + hash2 + + 5L/SkTqXHoqEtsWCRHjINeZ611ORznsedlxxsXL3Ixw= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/de.lproj/FacebookSDK.strings + + hash2 + + itbMpDlaM8/yghRaz9oL7tl3koZmotT+1yj348D5BlY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/el.lproj/FacebookSDK.strings + + hash2 + + xTWy9skvuZNEJ/bND6YtxplP6HfTiChSD+3dtZMLVvo= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en.lproj/FacebookSDK.strings + + hash2 + + NPcm9OPLgRqbNc3V3j7ChdOhLI+7u3i4Iai8tfqZTzM= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/en_GB.lproj/FacebookSDK.strings + + hash2 + + ufQP2hBvqtGv3PkL/n/4FcUU977jpusnXvbhB3+g0es= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es.lproj/FacebookSDK.strings + + hash2 + + /Ep5fzngOVykodxxukmiTd0kieBnJKF4i60DZ5S3o/U= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/es_ES.lproj/FacebookSDK.strings + + hash2 + + KzqFlb+OarxPEqBeomj02+cxKGRc60M7iaF4tGUzUh4= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fi.lproj/FacebookSDK.strings + + hash2 + + VF43OKZn9/x18HMwPs8XtPP3rmwwGV1zNXo2v3J9/V8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fil.lproj/FacebookSDK.strings + + hash2 + + +B9CPTqROM5Nx0jGBmwJ4B9QAX/V9qpaG6uhLYlU5+w= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/fr.lproj/FacebookSDK.strings + + hash2 + + sY2o7hKAvSH7k6b4/x6Cl+dqInq3+JvSqz5quMZ1pTU= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/gu.lproj/FacebookSDK.strings + + hash2 + + YOhNULW9ded9yKW3XDhRsemNFkVdW1G/XlKz50ycJSA= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/he.lproj/FacebookSDK.strings + + hash2 + + yndknl0oCBflrqKN+bYaehbELZh2TgaKFZtUUjc1ATE= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hi.lproj/FacebookSDK.strings + + hash2 + + mvei8dipX1jfymRGO9ZmYGEfM+qEyh1dV/xA8vOAFQY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hr.lproj/FacebookSDK.strings + + hash2 + + UZu36VyQElvaOpgM0oMsR75LKZR0hqhpJ2a2/CY5bBE= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/hu.lproj/FacebookSDK.strings + + hash2 + + NPHR3x6j8OqW848BH10wT+ytfDnt3hWItCPvam4hzfc= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/id.lproj/FacebookSDK.strings + + hash2 + + gELt3ILZ8omMsUXsTWeXKhygsRLZAKxw6ZOnFtEh8zg= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/it.lproj/FacebookSDK.strings + + hash2 + + RTkhJrdInKWtKPp4j1oeK5uyv+gqrz0TwRA0jzIDMbI= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ja.lproj/FacebookSDK.strings + + hash2 + + IJbzSINAywYbwsGatHkbKGIx+I6HcdFxMznUQ7QX3IA= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/kn.lproj/FacebookSDK.strings + + hash2 + + AXGunMjAqgra+f9gr4nvK7cD6IslzYSUwIS7K6GemLc= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ko.lproj/FacebookSDK.strings + + hash2 + + F2+QtiUgfzrP+IuovYNTJZTs4CxaMziSHxiFcbbqwok= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ml.lproj/FacebookSDK.strings + + hash2 + + BGbsKJW+hWP7C8d2B7ZqCEO4w+Xt98w7hH6+vo49cUM= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/mr.lproj/FacebookSDK.strings + + hash2 + + EXD9MTbTaMNUThICpW79u1gqBlYIqrgllYd06ZexcK4= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ms.lproj/FacebookSDK.strings + + hash2 + + g5fhQAjES9j7A+V4a/3YWBHtR7q/kZrv7nmAwVhQ5no= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nb.lproj/FacebookSDK.strings + + hash2 + + cj8TQpzXQ1P2XVeOXUOVNUHQgEIJn2JF7RbKNMH2Ih4= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/nl.lproj/FacebookSDK.strings + + hash2 + + qfo02B/YNhohC8DNAvcvd2mBcSf9DFgzRJveAlevvtE= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pa.lproj/FacebookSDK.strings + + hash2 + + T6veSbZHqFaj0fg0a2XmjxyMb9l/4CtG9ztkA38Zk7o= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pl.lproj/FacebookSDK.strings + + hash2 + + U58wgLeo6ca8Vke0o3s5WSDI+H1cMn7MsloWOJdYJHY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt.lproj/FacebookSDK.strings + + hash2 + + wQP85kdie6QyEWBX+lPsZzCfd53NxhphxZg31G39X1w= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/pt_PT.lproj/FacebookSDK.strings + + hash2 + + UO1kLwrQ9GHukIyF71AbMlxGNLS50xgKv2OxXpMRzvw= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ru.lproj/FacebookSDK.strings + + hash2 + + 1L1GTQzcab4OJf2ziKpd3aCcIozAQ/FMvIFnxoagD6o= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sk.lproj/FacebookSDK.strings + + hash2 + + E7LlcYhl8JJt12wTifRxNh1KrLlX05w6hfQI6MIIYO8= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/sv.lproj/FacebookSDK.strings + + hash2 + + GEm/4nUubovD5twaLZr0N9peb3SDHO3z3M08ICEbqWk= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/ta.lproj/FacebookSDK.strings + + hash2 + + xNUYaP5hKuCyin90IDBPAtilRh5PZrO7PrqA0NJplwY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/te.lproj/FacebookSDK.strings + + hash2 + + ojJM4sphClmTIZmcMB3e2DRDOVUCBH6YGbqOuFpypKc= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/th.lproj/FacebookSDK.strings + + hash2 + + J+bQBeBsUs50PBhH81SWmC7PwRVS+HzK+VFKSbRIqiM= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/tr.lproj/FacebookSDK.strings + + hash2 + + /qGZE6HK2doaSgHRjuzMbzWglDbOSsp3BrDB7p25s5I= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/vi.lproj/FacebookSDK.strings + + hash2 + + ItGPXoc7Yw7Wat59wN8EAlfXAxl/rFekZQBUJhNCRCU= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh.lproj/FacebookSDK.strings + + hash2 + + tzJdva8lQC3CRgfCby24cnrMKfPO059bQNKqO5bXSqY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_HK.lproj/FacebookSDK.strings + + hash2 + + /+H0BCqP6GjuVGsVNeziVarvK+JK+KPU2S9jaEYlmqY= + + optional + + + Frameworks/FBSDKCoreKit.framework/FacebookSDKStrings.bundle/zh_Hant_TW.lproj/FacebookSDK.strings + + hash2 + + RnXql3LXk7tkVGyRpi7oKqU+4XUYEbTuid9jpOjiKDw= + + optional + + + Frameworks/FBSDKCoreKit.framework/Info.plist + + hash2 + + v3BeWuru+s+VotyQL5/FVsnUQWlyBedeeW8tO8FtJgk= + + + Frameworks/FBSDKCoreKit.framework/_CodeSignature/CodeResources + + hash2 + + QB5YthbU2V+vKJ+3sNjHjI8/avmRpKMBHQ05n2r2sss= + + + Frameworks/FBSDKCoreKit_Basics.framework/FBSDKCoreKit_Basics + + hash2 + + 0cV4t7CpSlbOlixDYcLasgAo4/TrKksiX1llR65Nuks= + + + Frameworks/FBSDKCoreKit_Basics.framework/Info.plist + + hash2 + + OR7vNZkNXrx9pTEQlGT6FjELEMbf1BSMUBb7yGHuBCA= + + + Frameworks/FBSDKCoreKit_Basics.framework/_CodeSignature/CodeResources + + hash2 + + g1aVMtIoUoaDVta/uUDnXUUDQQn6/UdqgttgOx/WxcQ= + + + Frameworks/FBSDKLoginKit.framework/FBSDKLoginKit + + hash2 + + dL69Oz/71jqdbF4EFcR+60mg+uWPpwMcggUc1Tvp97A= + + + Frameworks/FBSDKLoginKit.framework/Info.plist + + hash2 + + w6N+4soUX285Zbx/MQDQdAD7z72NszybzaBGI4XTsmw= + + + Frameworks/FBSDKLoginKit.framework/_CodeSignature/CodeResources + + hash2 + + GgvWhe6lvBcV9q50t6uUBFW8/rq8NtVUIAwCGJXroas= + + + Frameworks/FBSDKShareKit.framework/FBSDKShareKit + + hash2 + + 8nvRI326fVm8JlPZ7zZ6jJqKiycsBsHGKq1GojN9Dmw= + + + Frameworks/FBSDKShareKit.framework/Info.plist + + hash2 + + IYRkqL+ZIeXPFzEzUERFPdDV7GRef+3jUJrAlKAA3jY= + + + Frameworks/FBSDKShareKit.framework/_CodeSignature/CodeResources + + hash2 + + lNlqgf00txDozITT7nFfx1144MvWEUWUivqvoKzg3BA= + + + Frameworks/GoogleUtilities.framework/GoogleUtilities + + hash2 + + 7ZcwNOd1ZiUXv7XlqkgM76KjAHgUA2CKFyG+TnbXNJQ= + + + Frameworks/GoogleUtilities.framework/Info.plist + + hash2 + + ctPhh642NEvSy4Uqq/WwfkwBd01QiQf9rAkrEdFP8Fg= + + + Frameworks/GoogleUtilities.framework/_CodeSignature/CodeResources + + hash2 + + t1yxmfX2BkQbBdapHNC8uI9aDV9XaxTG5roe5tPyb5w= + + + Frameworks/libswiftAVFoundation.dylib + + hash2 + + cuR9leC6TDKU72TwV8e6UXFsOwdoDvQZqvA2dQG9Ug0= + + + Frameworks/libswiftAccelerate.dylib + + hash2 + + hTyY3SOHiQopscJ4kormf7C9mFhp20kkBGaY7Ag7N24= + + + Frameworks/libswiftCore.dylib + + hash2 + + g/2Aeq+SXHE20Rz72denLdT9VAwwyg01oNVUXedJmu8= + + + Frameworks/libswiftCoreAudio.dylib + + hash2 + + jdfsYrJrgcYgYVVroEQDxtxPbpEV72RimP6lVxByOA4= + + + Frameworks/libswiftCoreFoundation.dylib + + hash2 + + BSdlQJzv3XSvtoXa7ia3hzbEWyKuFqPv7dpBXlnDbPs= + + + Frameworks/libswiftCoreGraphics.dylib + + hash2 + + 5/JQ8pqPs3Lu1i7/RVPV5sFy+BhR4PBuBt2aGXUCtwc= + + + Frameworks/libswiftCoreImage.dylib + + hash2 + + hsgPuNFx+TkOBppU3NrNIkezxJ43Vj1CeT+t6knm6mU= + + + Frameworks/libswiftCoreLocation.dylib + + hash2 + + aKvukZhtVtso+t4A6hXhlRjE79JVGQwMIIBZ0EP2QgE= + + + Frameworks/libswiftCoreMedia.dylib + + hash2 + + ECQOdIC4/x/TwjEv2tD3gWrNmeNFjuwJWJMw2noAwKM= + + + Frameworks/libswiftDarwin.dylib + + hash2 + + vRhB2j2cGnh7pT4AIhB5FiHMrAQAhslT+Bx/njmhQdQ= + + + Frameworks/libswiftDispatch.dylib + + hash2 + + IBtXy8gV2nJC3A0OO0Xy7ocM5IGwDPgwGbUoj8q8GTE= + + + Frameworks/libswiftFoundation.dylib + + hash2 + + /nECAXyeZid9dxsKcHGvnomrh5Fyw6ITHBt0j3P96BY= + + + Frameworks/libswiftMetal.dylib + + hash2 + + i7kJ1coezSlXatUE4jqZNqywPJA4F1DBVEtcKyztbm4= + + + Frameworks/libswiftObjectiveC.dylib + + hash2 + + CFCRr4b6kNamq7lsAOKZoUPe8bZOKmBIeYRd9JuOfaI= + + + Frameworks/libswiftQuartzCore.dylib + + hash2 + + uUJjivAEwRYiiD1q4l2XibQAI7CXp00IiZsaa4mg454= + + + Frameworks/libswiftUIKit.dylib + + hash2 + + F93uSIrAbK0UG108JjS0pb+MytWWSQwRUnjQ1Ge5g5A= + + + Frameworks/libswiftos.dylib + + hash2 + + Iti+1qVg9a9F4jvyZGQpacAqkwKudM2Z2wbGQ5fksJs= + + + Frameworks/libswiftsimd.dylib + + hash2 + + g4KJpfZgKSC/8YgcKcBPED1cvDGUjQ6XcY+NnF1CkLc= + + + Frameworks/nanopb.framework/Info.plist + + hash2 + + k4jZBCusmyHk6UdKr6f0qtqAVk+rCTef8ehLUiTVCMw= + + + Frameworks/nanopb.framework/_CodeSignature/CodeResources + + hash2 + + VkCrj/WseuDe3tcs+frl8GmbsuSBkYLdelUP12ebTaA= + + + Frameworks/nanopb.framework/nanopb + + hash2 + + lagX0Ti4qWdUv8kOmmkY77LcTMrYG1WGywa6tNa4OWs= + + + MainViewController.nib + + hash2 + + S7cM+x7WAUnYZRrY19O/TW6ZEoFqhqoiDv40XvMKVfM= + + + config.xml + + hash2 + + /bo8xw29njiW9b4nMR2cmPsPjkqoGzIz/u6R9Bs+z8M= + + + embedded.mobileprovision + + hash2 + + wvTuw660pqyyry6+HiJVAGIgqXU9cUxF0K02an81fqk= + + + www/app.47a27a5ba1050a8bf966.js + + hash2 + + 1GfffiT+aKzaKYmKxQtbFcdCi0j5Zis4bn0BVaO1wow= + + + www/app.47a27a5ba1050a8bf966.js.LICENSE + + hash2 + + v2uP7rKx1xxd/GliZIsZPuTIuxZ5skbuMv71Qld3BgE= + + + www/assets/audio/click.wav + + hash2 + + qhDUAOl6WaqPwfi8iLJMfYiO3pvZ5FezQK1lmgRbRAo= + + + www/assets/audio/crash.wav + + hash2 + + CU7V+194IuivpyRGQeZDmEVbbw5HSDtqPqRK9kQoMgM= + + + www/assets/audio/explosion.wav + + hash2 + + dOKJfOwPohv7x3R167SJSYupwRElhrNnQY78Yl2Zqe8= + + + www/assets/audio/gameover.wav + + hash2 + + VgSZuHnezeWraKBMYkfjVfdoF0R6af2yszCPgXGY0o0= + + + www/assets/audio/plane.wav + + hash2 + + iaaz9ffLzmspRvY0GXjX9UrIABpdHc7cR4MbiB3jAmY= + + + www/assets/audio/wind.wav + + hash2 + + eDEJxzKYLLmowYO54xevQZ1N61oswOp9TaOOcQEnKS8= + + + www/assets/images/background.png + + hash2 + + HLMgT7rfN/4NTnaT/HDvdnt30uoNGdnxm6E4BMrVkRg= + + + www/assets/images/musicOff.png + + hash2 + + 9oF2b9MhzO8CcVatld24cpjsnR23QUcxXSwLUiCF3yE= + + + www/assets/images/musicOn.png + + hash2 + + luhznoP4ozmUbX+2m3kAura5JKAhj0XOxGuxgFX10cw= + + + www/assets/images/sheet_black1x.png + + hash2 + + IdFvOsqaOEsptXI+1Q9CxiQdHR1EH6SLNfU4ZJlRDOM= + + + www/assets/images/yellowSheet.png + + hash2 + + dLHI8gkLUj58hEz2k/TO0KGlZDSxQOEY22cBHGkkVjU= + + + www/assets/json/planes.json + + hash2 + + vPsqq6edVcI5GrWr1vVuX4XKB2slPxLnZbWH8XZ5cVc= + + + www/assets/json/shapes.json + + hash2 + + saBglIZqylQE8Qd/xWjbxM8WJ743lRcwuWIONzBwlzo= + + + www/assets/json/sheet.json + + hash2 + + 7GxygawABPsP0kYlNUv9a+GucdqrEHdJ5T+eIRlyvQE= + + + www/assets/spritesheets/planes.png + + hash2 + + 3zGeHMCCY+OoI3Z+JOkm3oxtya0na7husWiy5Uqn3j8= + + + www/assets/spritesheets/sheet.png + + hash2 + + MEkR0x87yIFw6oAMHZGx2YMYDsdGRytHrHWA+JK7XRM= + + + www/assets/xml/sheet_black1x.xml + + hash2 + + pjdrAcKRq3BxHztyAD7K02pdifOXg2qDtf5Y5J9GXtQ= + + + www/assets/xml/yellowSheet.xml + + hash2 + + R0KvKbRwTcO9Zyy0CZ+GBvC8jcBEf5mG2Q0gW0CV7Hs= + + + www/cordova-js-src/exec.js + + hash2 + + FnDGh2PMtuKxE9b8Wg/ZWdrBgDuB+vndel99cBgN5aM= + + + www/cordova-js-src/platform.js + + hash2 + + nwRHFguFy7vK+gjXcCcfSr+M+JvGtEcFxHjtk4IL+zA= + + + www/cordova-js-src/plugin/ios/console.js + + hash2 + + HuL9WB5RqLOMFMdAR++aP57rv/LQG5T9zKeVR9nn5Gw= + + + www/cordova-js-src/plugin/ios/launchscreen.js + + hash2 + + Z662XHG69WWif7omIBCAH7nyqPc3Sfi+OzQbNaxjTL4= + + + www/cordova-js-src/plugin/ios/logger.js + + hash2 + + XbC6O2UB458r+PaXfBMthdABxHwJ5TICU7fhTKmnsr4= + + + www/cordova-js-src/plugin/ios/wkwebkit.js + + hash2 + + JAZIg4JGZCV/JFGR55NsvTovDSAKoRwd/+TnHryUMwA= + + + www/cordova.js + + hash2 + + Fzaxvy58WiJ8jMpD2ISGFCg7if2m2KlvfTlQfzvYjqQ= + + + www/cordova_plugins.js + + hash2 + + sxwcz0Rytk1+AgaHbxBZqvfS22BzpWX+TjFv9pOCqIU= + + + www/index.html + + hash2 + + fr+oitwD4nalbqqROowotjF/mehjFdsZGkkXZaAIS3c= + + + www/plugins/admob-plus-cordova/www/admob.js + + hash2 + + Ol8RWTKZisPvfs9jC+LYL9XZ4/K3Qck3S/MRbzuOqYI= + + + www/plugins/cordova-plugin-browsertab/www/browsertab.js + + hash2 + + zs73y7+o1rzcs2xYzh98auZckGxZ/qWyime7I/aBTvA= + + + www/plugins/cordova-plugin-buildinfo/www/buildinfo.js + + hash2 + + +HsCiH5ftL7HT6I2kBkKbyvALEDwvgsuZCjW4ONN3m0= + + + www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js + + hash2 + + SbvHr9WKyz3ru8I7xjp3L/R4cE0LwxQb91YQEXPQIi4= + + + www/plugins/cordova-plugin-facebook-connect/www/facebook-native.js + + hash2 + + NGiy0c1K9mfDS8t3I4WxOK+nj889HfUXaYoM+cgdS4Y= + + + www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js + + hash2 + + WBSoYyeSaqFp+9KaYwKBBHNADDzlxzf1Vvar1PDd1OQ= + + + www/plugins/cordova-plugin-purchase/www/store.js + + hash2 + + fhHLvqy4Hd7ICWClxDQSakg0Uu472Zlzn42uOwGuqHM= + + + www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js + + hash2 + + x9KFKQn1xUAJTM96w38DaNL/NFpUykWJx9rwjblWuZc= + + + www/plugins/cordova-universal-links-plugin/www/universal_links.js + + hash2 + + YEGB0V7XwP+bfcFJpnh8vu1hBaoPtveWyFdwzfQTX6Y= + + + www/plugins/es6-promise-plugin/www/promise.js + + hash2 + + 9CIW7f5Dk7yEK84D9evgQc6ryThptFDJtCnHYeOvWAo= + + + www/vendor.47a27a5ba1050a8bf966.js + + hash2 + + 0PjGxNJnRr2FGIv0REqAnatFOa4mWhkH0X+YQrlDvRo= + + + www/vendor.47a27a5ba1050a8bf966.js.LICENSE + + hash2 + + Lt7fxrgdkS9N/cwTxotvuDqLXeSHCGj9nPTL665Ob90= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/config.xml b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/config.xml new file mode 100644 index 0000000..ead54af --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/config.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FlyingPlane + Tap Plane Game + Doyban + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/embedded.mobileprovision b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/embedded.mobileprovision new file mode 100644 index 0000000..9eb9004 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/embedded.mobileprovision differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/background.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/background.png new file mode 100755 index 0000000..05c6a07 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/background.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOff.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOff.png new file mode 100644 index 0000000..2bb7a52 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOff.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOn.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOn.png new file mode 100644 index 0000000..77495ee Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/musicOn.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/sheet_black1x.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/sheet_black1x.png new file mode 100644 index 0000000..dd0db72 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/sheet_black1x.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/yellowSheet.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/yellowSheet.png new file mode 100644 index 0000000..13227e8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/images/yellowSheet.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/planes.json b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/planes.json new file mode 100755 index 0000000..5d20b85 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/planes.json @@ -0,0 +1,272 @@ +{ + "textures": [ + { + "image": "planes.png", + "format": "RGBA8888", + "size": { + "w": 415, + "h": 267 + }, + "scale": 1, + "frames": [ + { + "filename": "planeBlue1.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 9, + "y": 9, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeBlue2.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 112, + "y": 9, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeBlue3.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 215, + "y": 9, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeGreen1.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 318, + "y": 9, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeGreen2.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 9, + "y": 97, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeGreen3.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 112, + "y": 97, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeRed1.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 215, + "y": 97, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeRed2.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 318, + "y": 97, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeRed3.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 9, + "y": 185, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeYellow1.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 112, + "y": 185, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeYellow2.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 215, + "y": 185, + "w": 88, + "h": 73 + } + }, + { + "filename": "planeYellow3.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 88, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 88, + "h": 73 + }, + "frame": { + "x": 318, + "y": 185, + "w": 88, + "h": 73 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:dcb2fb64e67eb5be6e12e0a0ba4ca597:f554458c79da0bc2b857acfc1d98daa9:df2dfba190092c027256f49a772a7a59$" + } +} diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/shapes.json b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/shapes.json new file mode 100755 index 0000000..2462827 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/shapes.json @@ -0,0 +1,181 @@ +{ + "generator_info": "Shape definitions generated with PhysicsEditor. Visit https://www.codeandweb.com/physicseditor", + "groundGrass": { + "type": "fromPhysicsEditor", + "label": "ground", + "isStatic": true, + "density": 0.1, + "restitution": 0, + "friction": 0.1, + "frictionAir": 0.01, + "frictionStatic": 0.5, + "collisionFilter": { + "group": 0, + "category": 1, + "mask": 255 + }, + "fixtures": [ + { + "label": "", + "isSensor": false, + "vertices": [ + [ { "x":0, "y":35 }, { "x":0, "y":71 }, { "x":41, "y":41 }, { "x":34, "y":33 } ], + [ { "x":808, "y":35 }, { "x":773, "y":28 }, { "x":808, "y":71 } ], + [ { "x":597, "y":27 }, { "x":572, "y":54 }, { "x":636, "y":23 } ], + [ { "x":754, "y":11 }, { "x":751, "y":9 }, { "x":572, "y":54 }, { "x":754, "y":13 } ], + [ { "x":764, "y":24 }, { "x":761, "y":22 }, { "x":572, "y":54 }, { "x":764, "y":26 } ], + [ { "x":438, "y":12 }, { "x":372, "y":12 }, { "x":349, "y":27 }, { "x":471, "y":44 } ], + [ { "x":745, "y":0 }, { "x":722, "y":0 }, { "x":636, "y":23 }, { "x":572, "y":54 }, { "x":751, "y":9 }, { "x":751, "y":7 } ], + [ { "x":769, "y":26 }, { "x":764, "y":26 }, { "x":572, "y":54 }, { "x":808, "y":71 }, { "x":773, "y":28 } ], + [ { "x":657, "y":3 }, { "x":636, "y":23 }, { "x":722, "y":0 } ], + [ { "x":156, "y":7 }, { "x":134, "y":33 }, { "x":256, "y":7 }, { "x":251, "y":4 } ], + [ { "x":41, "y":41 }, { "x":0, "y":71 }, { "x":94, "y":44 } ], + [ { "x":511, "y":44 }, { "x":94, "y":44 }, { "x":533, "y":54 } ], + [ { "x":761, "y":20 }, { "x":754, "y":13 }, { "x":572, "y":54 }, { "x":761, "y":22 } ], + [ { "x":267, "y":10 }, { "x":256, "y":7 }, { "x":134, "y":33 }, { "x":269, "y":12 } ], + [ { "x":280, "y":15 }, { "x":269, "y":12 }, { "x":134, "y":33 }, { "x":282, "y":17 } ], + [ { "x":293, "y":20 }, { "x":282, "y":17 }, { "x":134, "y":33 }, { "x":295, "y":22 } ], + [ { "x":306, "y":25 }, { "x":295, "y":22 }, { "x":134, "y":33 }, { "x":308, "y":27 } ], + [ { "x":0, "y":71 }, { "x":808, "y":71 }, { "x":533, "y":54 }, { "x":94, "y":44 } ], + [ { "x":349, "y":27 }, { "x":134, "y":33 }, { "x":97, "y":42 }, { "x":94, "y":44 }, { "x":471, "y":44 } ], + [ { "x":572, "y":54 }, { "x":533, "y":54 }, { "x":808, "y":71 } ] + ] + } + ] + }, + "rock": { + "type": "fromPhysicsEditor", + "label": "groundRock", + "isStatic": false, + "density": 0.10000000149011612, + "restitution": 0, + "friction": 0.10000000149011612, + "frictionAir": 0.009999999776482582, + "frictionStatic": 0.5, + "collisionFilter": { + "group": 0, + "category": 1, + "mask": 255 + }, + "fixtures": [ + { + "label": "", + "isSensor": false, + "vertices": [ + [ { "x":28, "y":129 }, { "x":27, "y":132 }, { "x":31, "y":128 } ], + [ { "x":62, "y":0 }, { "x":60, "y":4 }, { "x":56, "y":29 }, { "x":81, "y":96 }, { "x":71, "y":1 } ], + [ { "x":87, "y":102 }, { "x":82, "y":102 }, { "x":27, "y":132 }, { "x":12, "y":192 }, { "x":88, "y":104 } ], + [ { "x":101, "y":177 }, { "x":95, "y":172 }, { "x":0, "y":239 }, { "x":107, "y":239 }, { "x":103, "y":190 } ], + [ { "x":108, "y":229 }, { "x":105, "y":214 }, { "x":107, "y":239 } ], + [ { "x":95, "y":172 }, { "x":88, "y":104 }, { "x":12, "y":192 }, { "x":0, "y":239 } ], + [ { "x":0, "y":232 }, { "x":0, "y":239 }, { "x":5, "y":218 } ], + [ { "x":7, "y":206 }, { "x":5, "y":218 }, { "x":12, "y":192 } ], + [ { "x":82, "y":102 }, { "x":81, "y":96 }, { "x":31, "y":128 }, { "x":27, "y":132 } ], + [ { "x":56, "y":29 }, { "x":54, "y":33 }, { "x":50, "y":58 }, { "x":81, "y":96 } ], + [ { "x":50, "y":58 }, { "x":48, "y":62 }, { "x":37, "y":121 }, { "x":81, "y":96 } ], + [ { "x":37, "y":121 }, { "x":31, "y":128 }, { "x":81, "y":96 } ] + ] + } + ] + }, + "rockDown": { + "type": "fromPhysicsEditor", + "label": "rockDown", + "isStatic": false, + "density": 0.10000000149011612, + "restitution": 0, + "friction": 0.10000000149011612, + "frictionAir": 0.009999999776482582, + "frictionStatic": 0.5, + "collisionFilter": { + "group": 0, + "category": 1, + "mask": 255 + }, + "fixtures": [ + { + "label": "", + "isSensor": false, + "vertices": [ + [ { "x":70, "y":239 }, { "x":73, "y":223 }, { "x":81, "y":142 }, { "x":37, "y":118 }, { "x":61, "y":238 } ], + [ { "x":87, "y":137 }, { "x":88, "y":135 }, { "x":36, "y":115 }, { "x":37, "y":118 }, { "x":82, "y":137 } ], + [ { "x":101, "y":61 }, { "x":102, "y":56 }, { "x":106, "y":17 }, { "x":2, "y":14 }, { "x":95, "y":67 } ], + [ { "x":0, "y":0 }, { "x":2, "y":14 }, { "x":106, "y":17 }, { "x":108, "y":10 }, { "x":108, "y":0 } ], + [ { "x":34, "y":115 }, { "x":36, "y":115 }, { "x":15, "y":58 }, { "x":27, "y":107 } ], + [ { "x":95, "y":67 }, { "x":2, "y":14 }, { "x":88, "y":135 } ], + [ { "x":81, "y":142 }, { "x":82, "y":137 }, { "x":37, "y":118 } ], + [ { "x":6, "y":29 }, { "x":8, "y":32 }, { "x":88, "y":135 }, { "x":4, "y":17 } ], + [ { "x":13, "y":55 }, { "x":15, "y":58 }, { "x":88, "y":135 }, { "x":8, "y":32 } ], + [ { "x":36, "y":115 }, { "x":88, "y":135 }, { "x":15, "y":58 } ] + ] + } + ] + }, + "starGold": { + "type": "fromPhysicsEditor", + "label": "star", + "isStatic": false, + "density": 0.10000000149011612, + "restitution": 0, + "friction": 0.10000000149011612, + "frictionAir": 0.009999999776482582, + "frictionStatic": 0.5, + "collisionFilter": { + "group": 0, + "category": 1, + "mask": 255 + }, + "fixtures": [ + { + "label": "", + "isSensor": false, + "vertices": [ + [ { "x":33, "y":36 }, { "x":33, "y":27 }, { "x":19, "y":35 }, { "x":24, "y":37 } ], + [ { "x":7, "y":37 }, { "x":15, "y":37 }, { "x":19, "y":35 }, { "x":38, "y":11 }, { "x":28, "y":8 }, { "x":11, "y":8 }, { "x":5, "y":24 }, { "x":5, "y":32 } ], + [ { "x":0, "y":12 }, { "x":0, "y":18 }, { "x":5, "y":24 }, { "x":11, "y":8 } ], + [ { "x":39, "y":18 }, { "x":39, "y":13 }, { "x":38, "y":11 }, { "x":37, "y":19 } ], + [ { "x":17, "y":0 }, { "x":11, "y":8 }, { "x":28, "y":8 }, { "x":22, "y":0 } ], + [ { "x":33, "y":27 }, { "x":37, "y":19 }, { "x":38, "y":11 }, { "x":19, "y":35 } ] + ] + } + ] + }, + "planeRed1": { + "type": "fromPhysicsEditor", + "label": "plane", + "isStatic": false, + "density": 0.10000000149011612, + "restitution": 0, + "friction": 0.10000000149011612, + "frictionAir": 0.009999999776482582, + "frictionStatic": 0.5, + "collisionFilter": { + "group": 0, + "category": 1, + "mask": 255 + }, + "fixtures": [ + { + "label": "", + "isSensor": false, + "vertices": [ + [ { "x":20, "y":50 }, { "x":20, "y":52 }, { "x":34, "y":60 }, { "x":22, "y":50 } ], + [ { "x":79, "y":17 }, { "x":77, "y":25 }, { "x":77, "y":58 }, { "x":86, "y":65 }, { "x":86, "y":18 } ], + [ { "x":3, "y":31 }, { "x":9, "y":32 }, { "x":23, "y":17 }, { "x":2, "y":25 } ], + [ { "x":30, "y":65 }, { "x":34, "y":60 }, { "x":20, "y":52 }, { "x":18, "y":53 }, { "x":19, "y":62 }, { "x":22, "y":65 } ], + [ { "x":0, "y":15 }, { "x":0, "y":23 }, { "x":2, "y":25 }, { "x":23, "y":17 }, { "x":20, "y":13 }, { "x":15, "y":11 }, { "x":5, "y":11 } ], + [ { "x":62, "y":73 }, { "x":68, "y":68 }, { "x":69, "y":65 }, { "x":64, "y":18 }, { "x":48, "y":65 }, { "x":49, "y":69 }, { "x":52, "y":72 } ], + [ { "x":77, "y":22 }, { "x":74, "y":19 }, { "x":64, "y":18 }, { "x":69, "y":65 }, { "x":74, "y":64 }, { "x":77, "y":58 } ], + [ { "x":77, "y":61 }, { "x":77, "y":58 }, { "x":74, "y":64 } ], + [ { "x":71, "y":14 }, { "x":74, "y":11 }, { "x":74, "y":4 }, { "x":71, "y":0 }, { "x":24, "y":0 }, { "x":21, "y":5 }, { "x":30, "y":14 } ], + [ { "x":84, "y":67 }, { "x":86, "y":65 }, { "x":77, "y":58 }, { "x":78, "y":65 }, { "x":80, "y":67 } ], + [ { "x":25, "y":13 }, { "x":30, "y":14 }, { "x":21, "y":5 }, { "x":21, "y":8 } ], + [ { "x":88, "y":38 }, { "x":86, "y":37 }, { "x":86, "y":46 }, { "x":88, "y":44 } ], + [ { "x":48, "y":65 }, { "x":64, "y":18 }, { "x":65, "y":14 }, { "x":30, "y":14 }, { "x":30, "y":17 }, { "x":34, "y":60 }, { "x":38, "y":63 } ], + [ { "x":9, "y":32 }, { "x":34, "y":60 }, { "x":30, "y":17 }, { "x":23, "y":17 } ], + [ { "x":22, "y":50 }, { "x":34, "y":60 }, { "x":22, "y":47 } ] + ] + } + ] + } +} diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/sheet.json b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/sheet.json new file mode 100755 index 0000000..b0f0952 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/json/sheet.json @@ -0,0 +1,1406 @@ +{ + "textures": [ + { + "image": "sheet.png", + "format": "RGBA8888", + "size": { + "w": 1022, + "h": 1004 + }, + "scale": 1, + "frames": [ + { + "filename": "groundDirt.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 808, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 808, + "h": 71 + }, + "frame": { + "x": 5, + "y": 5, + "w": 808, + "h": 71 + } + }, + { + "filename": "groundGrass.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 808, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 808, + "h": 71 + }, + "frame": { + "x": 5, + "y": 86, + "w": 808, + "h": 71 + } + }, + { + "filename": "groundIce.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 808, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 808, + "h": 71 + }, + "frame": { + "x": 5, + "y": 167, + "w": 808, + "h": 71 + } + }, + { + "filename": "groundRock.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 808, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 808, + "h": 71 + }, + "frame": { + "x": 5, + "y": 248, + "w": 808, + "h": 71 + } + }, + { + "filename": "groundSnow.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 808, + "h": 71 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 808, + "h": 71 + }, + "frame": { + "x": 5, + "y": 329, + "w": 808, + "h": 71 + } + }, + { + "filename": "UIbg.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 264, + "h": 264 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 264, + "h": 264 + }, + "frame": { + "x": 5, + "y": 410, + "w": 264, + "h": 264 + } + }, + { + "filename": "textGameOver.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 412, + "h": 78 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 412, + "h": 78 + }, + "frame": { + "x": 279, + "y": 410, + "w": 412, + "h": 78 + } + }, + { + "filename": "textGetReady.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 400, + "h": 73 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 400, + "h": 73 + }, + "frame": { + "x": 279, + "y": 498, + "w": 400, + "h": 73 + } + }, + { + "filename": "rock.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 823, + "y": 5, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockDown.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 5, + "y": 684, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockGrass.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 123, + "y": 684, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockGrassDown.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 241, + "y": 684, + "w": 108, + "h": 239 + } + }, + { + "filename": "buttonLarge.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 196, + "h": 70 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 196, + "h": 70 + }, + "frame": { + "x": 279, + "y": 581, + "w": 196, + "h": 70 + } + }, + { + "filename": "rockIce.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 359, + "y": 661, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockIceDown.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 823, + "y": 254, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockSnow.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 477, + "y": 661, + "w": 108, + "h": 239 + } + }, + { + "filename": "rockSnowDown.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 108, + "h": 239 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 108, + "h": 239 + }, + "frame": { + "x": 595, + "y": 581, + "w": 108, + "h": 239 + } + }, + { + "filename": "letterW.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 76, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 76, + "h": 64 + }, + "frame": { + "x": 941, + "y": 5, + "w": 76, + "h": 64 + } + }, + { + "filename": "letterO.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 60, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 60, + "h": 66 + }, + "frame": { + "x": 5, + "y": 933, + "w": 60, + "h": 66 + } + }, + { + "filename": "letterD.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 54, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 54, + "h": 66 + }, + "frame": { + "x": 75, + "y": 933, + "w": 54, + "h": 66 + } + }, + { + "filename": "letterC.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 52, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 52, + "h": 66 + }, + "frame": { + "x": 139, + "y": 933, + "w": 52, + "h": 66 + } + }, + { + "filename": "letterG.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 52, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 52, + "h": 66 + }, + "frame": { + "x": 201, + "y": 933, + "w": 52, + "h": 66 + } + }, + { + "filename": "buttonSmall.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 136, + "h": 80 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 136, + "h": 80 + }, + "frame": { + "x": 595, + "y": 830, + "w": 136, + "h": 80 + } + }, + { + "filename": "letterU.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 66 + }, + "frame": { + "x": 263, + "y": 933, + "w": 51, + "h": 66 + } + }, + { + "filename": "letterB.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 50, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 50, + "h": 66 + }, + "frame": { + "x": 324, + "y": 933, + "w": 50, + "h": 66 + } + }, + { + "filename": "letterQ.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 60, + "h": 79 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 60, + "h": 79 + }, + "frame": { + "x": 941, + "y": 79, + "w": 60, + "h": 79 + } + }, + { + "filename": "number0.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 53, + "h": 78 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 53, + "h": 78 + }, + "frame": { + "x": 701, + "y": 410, + "w": 53, + "h": 78 + } + }, + { + "filename": "number4.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 55, + "h": 76 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 55, + "h": 76 + }, + "frame": { + "x": 941, + "y": 168, + "w": 55, + "h": 76 + } + }, + { + "filename": "letterM.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 66, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 66, + "h": 64 + }, + "frame": { + "x": 485, + "y": 581, + "w": 66, + "h": 64 + } + }, + { + "filename": "number6.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 53, + "h": 77 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 53, + "h": 77 + }, + "frame": { + "x": 941, + "y": 254, + "w": 53, + "h": 77 + } + }, + { + "filename": "number9.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 53, + "h": 77 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 53, + "h": 77 + }, + "frame": { + "x": 941, + "y": 341, + "w": 53, + "h": 77 + } + }, + { + "filename": "letterA.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 61, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 61, + "h": 64 + }, + "frame": { + "x": 689, + "y": 498, + "w": 61, + "h": 64 + } + }, + { + "filename": "medalBronze.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 114, + "h": 119 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 114, + "h": 119 + }, + "frame": { + "x": 713, + "y": 572, + "w": 114, + "h": 119 + } + }, + { + "filename": "medalGold.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 114, + "h": 119 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 114, + "h": 119 + }, + "frame": { + "x": 713, + "y": 701, + "w": 114, + "h": 119 + } + }, + { + "filename": "medalSilver.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 114, + "h": 119 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 114, + "h": 119 + }, + "frame": { + "x": 741, + "y": 830, + "w": 114, + "h": 119 + } + }, + { + "filename": "letterK.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 53, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 53, + "h": 64 + }, + "frame": { + "x": 760, + "y": 498, + "w": 53, + "h": 64 + } + }, + { + "filename": "tapTick.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 59, + "h": 59 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 59, + "h": 59 + }, + "frame": { + "x": 823, + "y": 503, + "w": 59, + "h": 59 + } + }, + { + "filename": "number3.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 78 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 78 + }, + "frame": { + "x": 837, + "y": 572, + "w": 51, + "h": 78 + } + }, + { + "filename": "number8.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 78 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 78 + }, + "frame": { + "x": 837, + "y": 660, + "w": 51, + "h": 78 + } + }, + { + "filename": "letterN.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 53, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 53, + "h": 64 + }, + "frame": { + "x": 941, + "y": 428, + "w": 53, + "h": 64 + } + }, + { + "filename": "letterR.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 65 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 65 + }, + "frame": { + "x": 837, + "y": 748, + "w": 51, + "h": 65 + } + }, + { + "filename": "letterP.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 48, + "h": 65 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 48, + "h": 65 + }, + "frame": { + "x": 764, + "y": 410, + "w": 48, + "h": 65 + } + }, + { + "filename": "number2.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 77 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 77 + }, + "frame": { + "x": 384, + "y": 910, + "w": 51, + "h": 77 + } + }, + { + "filename": "number7.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 76 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 76 + }, + "frame": { + "x": 445, + "y": 910, + "w": 51, + "h": 76 + } + }, + { + "filename": "number5.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 50, + "h": 76 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 50, + "h": 76 + }, + "frame": { + "x": 506, + "y": 910, + "w": 50, + "h": 76 + } + }, + { + "filename": "tapLeft.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 85, + "h": 42 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 85, + "h": 42 + }, + "frame": { + "x": 566, + "y": 920, + "w": 85, + "h": 42 + } + }, + { + "filename": "letterV.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 61, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 61, + "h": 64 + }, + "frame": { + "x": 661, + "y": 920, + "w": 61, + "h": 64 + } + }, + { + "filename": "number1.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 37, + "h": 76 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 37, + "h": 76 + }, + "frame": { + "x": 865, + "y": 823, + "w": 37, + "h": 76 + } + }, + { + "filename": "letterI.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 22, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 22, + "h": 64 + }, + "frame": { + "x": 561, + "y": 581, + "w": 22, + "h": 64 + } + }, + { + "filename": "tapRight.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 85, + "h": 42 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 85, + "h": 42 + }, + "frame": { + "x": 892, + "y": 503, + "w": 85, + "h": 42 + } + }, + { + "filename": "letterX.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 58, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 58, + "h": 64 + }, + "frame": { + "x": 898, + "y": 555, + "w": 58, + "h": 64 + } + }, + { + "filename": "letterH.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 51, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 51, + "h": 64 + }, + "frame": { + "x": 966, + "y": 555, + "w": 51, + "h": 64 + } + }, + { + "filename": "letterY.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 57, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 57, + "h": 64 + }, + "frame": { + "x": 898, + "y": 629, + "w": 57, + "h": 64 + } + }, + { + "filename": "letterT.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 52, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 52, + "h": 64 + }, + "frame": { + "x": 965, + "y": 629, + "w": 52, + "h": 64 + } + }, + { + "filename": "letterZ.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 50, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 50, + "h": 64 + }, + "frame": { + "x": 898, + "y": 703, + "w": 50, + "h": 64 + } + }, + { + "filename": "letterS.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 46, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 46, + "h": 66 + }, + "frame": { + "x": 958, + "y": 703, + "w": 46, + "h": 66 + } + }, + { + "filename": "letterE.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 45, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 45, + "h": 64 + }, + "frame": { + "x": 865, + "y": 909, + "w": 45, + "h": 64 + } + }, + { + "filename": "puffLarge.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 42, + "h": 35 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 42, + "h": 35 + }, + "frame": { + "x": 898, + "y": 777, + "w": 42, + "h": 35 + } + }, + { + "filename": "letterJ.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 42, + "h": 66 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 42, + "h": 66 + }, + "frame": { + "x": 912, + "y": 822, + "w": 42, + "h": 66 + } + }, + { + "filename": "letterF.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 44, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 44, + "h": 64 + }, + "frame": { + "x": 920, + "y": 898, + "w": 44, + "h": 64 + } + }, + { + "filename": "letterL.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 44, + "h": 64 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 44, + "h": 64 + }, + "frame": { + "x": 964, + "y": 779, + "w": 44, + "h": 64 + } + }, + { + "filename": "starBronze.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 39, + "h": 38 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 39, + "h": 38 + }, + "frame": { + "x": 732, + "y": 959, + "w": 39, + "h": 38 + } + }, + { + "filename": "starGold.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 39, + "h": 38 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 39, + "h": 38 + }, + "frame": { + "x": 781, + "y": 959, + "w": 39, + "h": 38 + } + }, + { + "filename": "puffSmall.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 25, + "h": 21 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 25, + "h": 21 + }, + "frame": { + "x": 830, + "y": 959, + "w": 25, + "h": 21 + } + }, + { + "filename": "tap.png", + "rotated": false, + "trimmed": true, + "sourceSize": { + "w": 59, + "h": 59 + }, + "spriteSourceSize": { + "x": 18, + "y": 18, + "w": 41, + "h": 41 + }, + "frame": { + "x": 974, + "y": 853, + "w": 41, + "h": 41 + } + }, + { + "filename": "starSilver.png", + "rotated": false, + "trimmed": false, + "sourceSize": { + "w": 39, + "h": 38 + }, + "spriteSourceSize": { + "x": 0, + "y": 0, + "w": 39, + "h": 38 + }, + "frame": { + "x": 974, + "y": 904, + "w": 39, + "h": 38 + } + } + ] + } + ], + "meta": { + "app": "https://www.codeandweb.com/texturepacker", + "version": "3.0", + "smartupdate": "$TexturePacker:SmartUpdate:5b9fa9cccdeac18e7bb76c8240d5cb8b:75f210db0d65059f9f6054ec57b21204:9c44ecd7e9a522007eaff2949095bc1d$" + } +} diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/planes.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/planes.png new file mode 100755 index 0000000..2bdba78 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/planes.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/sheet.png b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/sheet.png new file mode 100755 index 0000000..c50cb6d Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/spritesheets/sheet.png differ diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/sheet_black1x.xml b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/sheet_black1x.xml new file mode 100644 index 0000000..4dfc147 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/sheet_black1x.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/yellowSheet.xml b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/yellowSheet.xml new file mode 100644 index 0000000..c8918f8 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/assets/xml/yellowSheet.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/exec.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/exec.js new file mode 100644 index 0000000..466220d --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/exec.js @@ -0,0 +1,159 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +/** + * Creates the exec bridge used to notify the native code of + * commands. + */ +var cordova = require('cordova'); +var utils = require('cordova/utils'); +var base64 = require('cordova/base64'); + +function massageArgsJsToNative (args) { + if (!args || utils.typeName(args) !== 'Array') { + return args; + } + var ret = []; + args.forEach(function (arg, i) { + if (utils.typeName(arg) === 'ArrayBuffer') { + ret.push({ + CDVType: 'ArrayBuffer', + data: base64.fromArrayBuffer(arg) + }); + } else { + ret.push(arg); + } + }); + return ret; +} + +function massageMessageNativeToJs (message) { + if (message.CDVType === 'ArrayBuffer') { + var stringToArrayBuffer = function (str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function (b64) { + return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef + }; + message = base64ToArrayBuffer(message.data); + } + return message; +} + +function convertMessageToArgsNativeToJs (message) { + var args = []; + if (!message || !Object.prototype.hasOwnProperty.call(message, 'CDVType')) { + args.push(message); + } else if (message.CDVType === 'MultiPart') { + message.messages.forEach(function (e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; +} + +var iOSExec = function () { + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = + { success: successCallback, fail: failCallback }; + } + + actionArgs = massageArgsJsToNative(actionArgs); + + // CB-10133 DataClone DOM Exception 25 guard (fast function remover) + var command = [callbackId, service, action, JSON.parse(JSON.stringify(actionArgs))]; + window.webkit.messageHandlers.cordova.postMessage(command); +}; + +iOSExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + Promise.resolve().then(function () { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line + }); +}; + +// for backwards compatibility +iOSExec.nativeEvalAndFetch = function (func) { + try { + func(); + } catch (e) { + console.log(e); + } +}; + +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec () { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec) ? cexec : iOSExec; +} + +function execProxy () { + cordovaExec().apply(null, arguments); +} + +execProxy.nativeFetchMessages = function () { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function () { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function () { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/platform.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/platform.js new file mode 100644 index 0000000..83868c8 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/platform.js @@ -0,0 +1,39 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +module.exports = { + id: 'ios', + bootstrap: function () { + // Attach the console polyfill that is iOS-only to window.console + // see the file under plugin/ios/console.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/console', 'window.console'); + + // Attach the wkwebkit utility to window.WkWebView + // see the file under plugin/ios/wkwebkit.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/wkwebkit', 'window.WkWebView'); + + // Attach the splashscreen utility to window.navigator.splashscreen + // see the file under plugin/ios/launchscreen.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/launchscreen', 'navigator.splashscreen'); + + require('cordova/channel').onNativeReady.fire(); + } +}; diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/console.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/console.js new file mode 100644 index 0000000..0a4820e --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/console.js @@ -0,0 +1,186 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// ------------------------------------------------------------------------------ + +var logger = require('cordova/plugin/ios/logger'); + +// ------------------------------------------------------------------------------ +// object that we're exporting +// ------------------------------------------------------------------------------ +var console = module.exports; + +// ------------------------------------------------------------------------------ +// copy of the original console object +// ------------------------------------------------------------------------------ +var WinConsole = window.console; + +// ------------------------------------------------------------------------------ +// whether to use the logger +// ------------------------------------------------------------------------------ +var UseLogger = false; + +// ------------------------------------------------------------------------------ +// Timers +// ------------------------------------------------------------------------------ +var Timers = {}; + +// ------------------------------------------------------------------------------ +// used for unimplemented methods +// ------------------------------------------------------------------------------ +function noop () {} + +// ------------------------------------------------------------------------------ +// used for unimplemented methods +// ------------------------------------------------------------------------------ +console.useLogger = function (value) { + if (arguments.length) UseLogger = !!value; + + if (UseLogger) { + if (logger.useConsole()) { + throw new Error('console and logger are too intertwingly'); + } + } + + return UseLogger; +}; + +// ------------------------------------------------------------------------------ +console.log = function () { + if (logger.useConsole()) return; + logger.log.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.error = function () { + if (logger.useConsole()) return; + logger.error.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.warn = function () { + if (logger.useConsole()) return; + logger.warn.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.info = function () { + if (logger.useConsole()) return; + logger.info.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.debug = function () { + if (logger.useConsole()) return; + logger.debug.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.assert = function (expression) { + if (expression) return; + + var message = logger.format.apply(logger.format, [].slice.call(arguments, 1)); + console.log('ASSERT: ' + message); +}; + +// ------------------------------------------------------------------------------ +console.clear = function () {}; + +// ------------------------------------------------------------------------------ +console.dir = function (object) { + console.log('%o', object); +}; + +// ------------------------------------------------------------------------------ +console.dirxml = function (node) { + console.log(node.innerHTML); +}; + +// ------------------------------------------------------------------------------ +console.trace = noop; + +// ------------------------------------------------------------------------------ +console.group = console.log; + +// ------------------------------------------------------------------------------ +console.groupCollapsed = console.log; + +// ------------------------------------------------------------------------------ +console.groupEnd = noop; + +// ------------------------------------------------------------------------------ +console.time = function (name) { + Timers[name] = new Date().valueOf(); +}; + +// ------------------------------------------------------------------------------ +console.timeEnd = function (name) { + var timeStart = Timers[name]; + if (!timeStart) { + console.warn('unknown timer: ' + name); + return; + } + + var timeElapsed = new Date().valueOf() - timeStart; + console.log(name + ': ' + timeElapsed + 'ms'); +}; + +// ------------------------------------------------------------------------------ +console.timeStamp = noop; + +// ------------------------------------------------------------------------------ +console.profile = noop; + +// ------------------------------------------------------------------------------ +console.profileEnd = noop; + +// ------------------------------------------------------------------------------ +console.count = noop; + +// ------------------------------------------------------------------------------ +console.exception = console.log; + +// ------------------------------------------------------------------------------ +console.table = function (data, columns) { + console.log('%o', data); +}; + +// ------------------------------------------------------------------------------ +// return a new function that calls both functions passed as args +// ------------------------------------------------------------------------------ +function wrappedOrigCall (orgFunc, newFunc) { + return function () { + var args = [].slice.call(arguments); + try { orgFunc.apply(WinConsole, args); } catch (e) {} + try { newFunc.apply(console, args); } catch (e) {} + }; +} + +// ------------------------------------------------------------------------------ +// For every function that exists in the original console object, that +// also exists in the new console object, wrap the new console method +// with one that calls both +// ------------------------------------------------------------------------------ +for (var key in console) { + if (typeof WinConsole[key] === 'function') { + console[key] = wrappedOrigCall(WinConsole[key], console[key]); + } +} diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/launchscreen.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/launchscreen.js new file mode 100644 index 0000000..2460696 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/launchscreen.js @@ -0,0 +1,33 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var exec = require('cordova/exec'); + +var launchscreen = { + show: function () { + exec(null, null, 'LaunchScreen', 'show', []); + }, + hide: function () { + exec(null, null, 'LaunchScreen', 'hide', []); + } +}; + +module.exports = launchscreen; diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/logger.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/logger.js new file mode 100644 index 0000000..6f59e1c --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/logger.js @@ -0,0 +1,348 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +// ------------------------------------------------------------------------------ +// The logger module exports the following properties/functions: +// +// LOG - constant for the level LOG +// ERROR - constant for the level ERROR +// WARN - constant for the level WARN +// INFO - constant for the level INFO +// DEBUG - constant for the level DEBUG +// logLevel() - returns current log level +// logLevel(value) - sets and returns a new log level +// useConsole() - returns whether logger is using console +// useConsole(value) - sets and returns whether logger is using console +// log(message,...) - logs a message at level LOG +// error(message,...) - logs a message at level ERROR +// warn(message,...) - logs a message at level WARN +// info(message,...) - logs a message at level INFO +// debug(message,...) - logs a message at level DEBUG +// logLevel(level,message,...) - logs a message specified level +// +// ------------------------------------------------------------------------------ + +var logger = exports; + +var exec = require('cordova/exec'); + +var UseConsole = false; +var UseLogger = true; +var Queued = []; +var DeviceReady = false; +var CurrentLevel; + +var originalConsole = console; + +/** + * Logging levels + */ + +var Levels = [ + 'LOG', + 'ERROR', + 'WARN', + 'INFO', + 'DEBUG' +]; + +/* + * add the logging levels to the logger object and + * to a separate levelsMap object for testing + */ + +var LevelsMap = {}; +for (var i = 0; i < Levels.length; i++) { + var level = Levels[i]; + LevelsMap[level] = i; + logger[level] = level; +} + +CurrentLevel = LevelsMap.WARN; + +/** + * Getter/Setter for the logging level + * + * Returns the current logging level. + * + * When a value is passed, sets the logging level to that value. + * The values should be one of the following constants: + * logger.LOG + * logger.ERROR + * logger.WARN + * logger.INFO + * logger.DEBUG + * + * The value used determines which messages get printed. The logging + * values above are in order, and only messages logged at the logging + * level or above will actually be displayed to the user. E.g., the + * default level is WARN, so only messages logged with LOG, ERROR, or + * WARN will be displayed; INFO and DEBUG messages will be ignored. + */ +logger.level = function (value) { + if (arguments.length) { + if (LevelsMap[value] === null) { + throw new Error('invalid logging level: ' + value); + } + CurrentLevel = LevelsMap[value]; + } + + return Levels[CurrentLevel]; +}; + +/** + * Getter/Setter for the useConsole functionality + * + * When useConsole is true, the logger will log via the + * browser 'console' object. + */ +logger.useConsole = function (value) { + if (arguments.length) UseConsole = !!value; + + if (UseConsole) { + if (typeof console === 'undefined') { + throw new Error('global console object is not defined'); + } + + if (typeof console.log !== 'function') { + throw new Error('global console object does not have a log function'); + } + + if (typeof console.useLogger === 'function') { + if (console.useLogger()) { + throw new Error('console and logger are too intertwingly'); + } + } + } + + return UseConsole; +}; + +/** + * Getter/Setter for the useLogger functionality + * + * When useLogger is true, the logger will log via the + * native Logger plugin. + */ +logger.useLogger = function (value) { + // Enforce boolean + if (arguments.length) UseLogger = !!value; + return UseLogger; +}; + +/** + * Logs a message at the LOG level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.log = function (message) { logWithArgs('LOG', arguments); }; + +/** + * Logs a message at the ERROR level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.error = function (message) { logWithArgs('ERROR', arguments); }; + +/** + * Logs a message at the WARN level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.warn = function (message) { logWithArgs('WARN', arguments); }; + +/** + * Logs a message at the INFO level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.info = function (message) { logWithArgs('INFO', arguments); }; + +/** + * Logs a message at the DEBUG level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.debug = function (message) { logWithArgs('DEBUG', arguments); }; + +// log at the specified level with args +function logWithArgs (level, args) { + args = [level].concat([].slice.call(args)); + logger.logLevel.apply(logger, args); +} + +// return the correct formatString for an object +function formatStringForMessage (message) { + return (typeof message === 'string') ? '' : '%o'; +} + +/** + * Logs a message at the specified level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.logLevel = function (level /* , ... */) { + // format the message with the parameters + var formatArgs = [].slice.call(arguments, 1); + var fmtString = formatStringForMessage(formatArgs[0]); + if (fmtString.length > 0) { + formatArgs.unshift(fmtString); // add formatString + } + + var message = logger.format.apply(logger.format, formatArgs); + + if (LevelsMap[level] === null) { + throw new Error('invalid logging level: ' + level); + } + + if (LevelsMap[level] > CurrentLevel) return; + + // queue the message if not yet at deviceready + if (!DeviceReady && !UseConsole) { + Queued.push([level, message]); + return; + } + + // Log using the native logger if that is enabled + if (UseLogger) { + exec(null, null, 'Console', 'logLevel', [level, message]); + } + + // Log using the console if that is enabled + if (UseConsole) { + // make sure console is not using logger + if (console.useLogger()) { + throw new Error('console and logger are too intertwingly'); + } + + // log to the console + switch (level) { + case logger.LOG: originalConsole.log(message); break; + case logger.ERROR: originalConsole.log('ERROR: ' + message); break; + case logger.WARN: originalConsole.log('WARN: ' + message); break; + case logger.INFO: originalConsole.log('INFO: ' + message); break; + case logger.DEBUG: originalConsole.log('DEBUG: ' + message); break; + } + } +}; + +/** + * Formats a string and arguments following it ala console.log() + * + * Any remaining arguments will be appended to the formatted string. + * + * for rationale, see FireBug's Console API: + * http://getfirebug.com/wiki/index.php/Console_API + */ +logger.format = function (formatString, args) { + return __format(arguments[0], [].slice.call(arguments, 1)).join(' '); +}; + +// ------------------------------------------------------------------------------ +/** + * Formats a string and arguments following it ala vsprintf() + * + * format chars: + * %j - format arg as JSON + * %o - format arg as JSON + * %c - format arg as '' + * %% - replace with '%' + * any other char following % will format it's + * arg via toString(). + * + * Returns an array containing the formatted string and any remaining + * arguments. + */ +function __format (formatString, args) { + if (formatString === null || formatString === undefined) return ['']; + if (arguments.length === 1) return [formatString.toString()]; + + if (typeof formatString !== 'string') { formatString = formatString.toString(); } + + var pattern = /(.*?)%(.)(.*)/; + var rest = formatString; + var result = []; + + while (args.length) { + var match = pattern.exec(rest); + if (!match) break; + + var arg = args.shift(); + rest = match[3]; + result.push(match[1]); + + if (match[2] === '%') { + result.push('%'); + args.unshift(arg); + continue; + } + + result.push(__formatted(arg, match[2])); + } + + result.push(rest); + + var remainingArgs = [].slice.call(args); + remainingArgs.unshift(result.join('')); + return remainingArgs; +} + +function __formatted (object, formatChar) { + try { + switch (formatChar) { + case 'j': + case 'o': return JSON.stringify(object); + case 'c': return ''; + } + } catch (e) { + return 'error JSON.stringify()ing argument: ' + e; + } + + if ((object === null) || (object === undefined)) { + return Object.prototype.toString.call(object); + } + + return object.toString(); +} + +// ------------------------------------------------------------------------------ +// when deviceready fires, log queued messages +logger.__onDeviceReady = function () { + if (DeviceReady) return; + + DeviceReady = true; + + for (var i = 0; i < Queued.length; i++) { + var messageArgs = Queued[i]; + logger.logLevel(messageArgs[0], messageArgs[1]); + } + + Queued = null; +}; + +// add a deviceready event to log queued messages +document.addEventListener('deviceready', logger.__onDeviceReady, false); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/wkwebkit.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/wkwebkit.js new file mode 100644 index 0000000..35c819c --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova-js-src/plugin/ios/wkwebkit.js @@ -0,0 +1,42 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + +var exec = require('cordova/exec'); + +var WkWebKit = { + allowsBackForwardNavigationGestures: function (allow) { + exec(null, null, 'CDVWebViewEngine', 'allowsBackForwardNavigationGestures', [allow]); + }, + convertFilePath: function (path) { + if (!path || !window.CDV_ASSETS_URL) { + return path; + } + if (path.startsWith('/')) { + return window.CDV_ASSETS_URL + '/_app_file_' + path; + } + if (path.startsWith('file://')) { + return window.CDV_ASSETS_URL + path.replace('file://', '/_app_file_'); + } + return path; + } +}; + +module.exports = WkWebKit; diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova.js new file mode 100644 index 0000000..c100506 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/cordova.js @@ -0,0 +1,2104 @@ +// Platform: ios +// cordova-js rel/6.0.0-10-g07379820 +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ +;(function() { +var PLATFORM_VERSION_BUILD_LABEL = '6.3.0'; +// file: src/scripts/require.js +var require; +var define; + +(function () { + var modules = {}; + // Stack of moduleIds currently being built. + var requireStack = []; + // Map of module ID -> index into requireStack of modules currently being built. + var inProgressModules = {}; + var SEPARATOR = '.'; + + function build (module) { + var factory = module.factory; + var localRequire = function (id) { + var resultantId = id; + // Its a relative path, so lop off the last portion and add the id (minus "./") + if (id.charAt(0) === '.') { + resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2); + } + return require(resultantId); + }; + module.exports = {}; + delete module.factory; + factory(localRequire, module.exports, module); + return module.exports; + } + + require = function (id) { + if (!modules[id]) { + throw new Error('module ' + id + ' not found'); + } else if (id in inProgressModules) { + var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id; + throw new Error('Cycle in require graph: ' + cycle); + } + if (modules[id].factory) { + try { + inProgressModules[id] = requireStack.length; + requireStack.push(id); + return build(modules[id]); + } finally { + delete inProgressModules[id]; + requireStack.pop(); + } + } + return modules[id].exports; + }; + + define = function (id, factory) { + if (Object.prototype.hasOwnProperty.call(modules, id)) { + throw new Error('module ' + id + ' already defined'); + } + + modules[id] = { + id: id, + factory: factory + }; + }; + + define.remove = function (id) { + delete modules[id]; + }; + + define.moduleMap = modules; +})(); + +// Export for use in node +if (typeof module === 'object' && typeof require === 'function') { + module.exports.require = require; + module.exports.define = define; +} + +// file: src/cordova.js +define("cordova", function(require, exports, module) { + +// Workaround for Windows 10 in hosted environment case +// http://www.w3.org/html/wg/drafts/html/master/browsers.html#named-access-on-the-window-object +if (window.cordova && !(window.cordova instanceof HTMLElement)) { + throw new Error('cordova already defined'); +} + +var channel = require('cordova/channel'); +var platform = require('cordova/platform'); + +/** + * Intercept calls to addEventListener + removeEventListener and handle deviceready, + * resume, and pause events. + */ +var m_document_addEventListener = document.addEventListener; +var m_document_removeEventListener = document.removeEventListener; +var m_window_addEventListener = window.addEventListener; +var m_window_removeEventListener = window.removeEventListener; + +/** + * Houses custom event handlers to intercept on document + window event listeners. + */ +var documentEventHandlers = {}; +var windowEventHandlers = {}; + +document.addEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof documentEventHandlers[e] !== 'undefined') { + documentEventHandlers[e].subscribe(handler); + } else { + m_document_addEventListener.call(document, evt, handler, capture); + } +}; + +window.addEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + if (typeof windowEventHandlers[e] !== 'undefined') { + windowEventHandlers[e].subscribe(handler); + } else { + m_window_addEventListener.call(window, evt, handler, capture); + } +}; + +document.removeEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof documentEventHandlers[e] !== 'undefined') { + documentEventHandlers[e].unsubscribe(handler); + } else { + m_document_removeEventListener.call(document, evt, handler, capture); + } +}; + +window.removeEventListener = function (evt, handler, capture) { + var e = evt.toLowerCase(); + // If unsubscribing from an event that is handled by a plugin + if (typeof windowEventHandlers[e] !== 'undefined') { + windowEventHandlers[e].unsubscribe(handler); + } else { + m_window_removeEventListener.call(window, evt, handler, capture); + } +}; + +function createEvent (type, data) { + var event = document.createEvent('Events'); + event.initEvent(type, false, false); + if (data) { + for (var i in data) { + if (Object.prototype.hasOwnProperty.call(data, i)) { + event[i] = data[i]; + } + } + } + return event; +} + +var cordova = { + define: define, + require: require, + version: PLATFORM_VERSION_BUILD_LABEL, + platformVersion: PLATFORM_VERSION_BUILD_LABEL, + platformId: platform.id, + + /** + * Methods to add/remove your own addEventListener hijacking on document + window. + */ + addWindowEventHandler: function (event) { + return (windowEventHandlers[event] = channel.create(event)); + }, + addStickyDocumentEventHandler: function (event) { + return (documentEventHandlers[event] = channel.createSticky(event)); + }, + addDocumentEventHandler: function (event) { + return (documentEventHandlers[event] = channel.create(event)); + }, + removeWindowEventHandler: function (event) { + delete windowEventHandlers[event]; + }, + removeDocumentEventHandler: function (event) { + delete documentEventHandlers[event]; + }, + + /** + * Retrieve original event handlers that were replaced by Cordova + * + * @return object + */ + getOriginalHandlers: function () { + return { + document: { + addEventListener: m_document_addEventListener, + removeEventListener: m_document_removeEventListener + }, + window: { + addEventListener: m_window_addEventListener, + removeEventListener: m_window_removeEventListener + } + }; + }, + + /** + * Method to fire event from native code + * bNoDetach is required for events which cause an exception which needs to be caught in native code + */ + fireDocumentEvent: function (type, data, bNoDetach) { + var evt = createEvent(type, data); + if (typeof documentEventHandlers[type] !== 'undefined') { + if (bNoDetach) { + documentEventHandlers[type].fire(evt); + } else { + setTimeout(function () { + // Fire deviceready on listeners that were registered before cordova.js was loaded. + if (type === 'deviceready') { + document.dispatchEvent(evt); + } + documentEventHandlers[type].fire(evt); + }, 0); + } + } else { + document.dispatchEvent(evt); + } + }, + + fireWindowEvent: function (type, data) { + var evt = createEvent(type, data); + if (typeof windowEventHandlers[type] !== 'undefined') { + setTimeout(function () { + windowEventHandlers[type].fire(evt); + }, 0); + } else { + window.dispatchEvent(evt); + } + }, + + /** + * Plugin callback mechanism. + */ + // Randomize the starting callbackId to avoid collisions after refreshing or navigating. + // This way, it's very unlikely that any new callback would get the same callbackId as an old callback. + callbackId: Math.floor(Math.random() * 2000000000), + callbacks: {}, + callbackStatus: { + NO_RESULT: 0, + OK: 1, + CLASS_NOT_FOUND_EXCEPTION: 2, + ILLEGAL_ACCESS_EXCEPTION: 3, + INSTANTIATION_EXCEPTION: 4, + MALFORMED_URL_EXCEPTION: 5, + IO_EXCEPTION: 6, + INVALID_ACTION: 7, + JSON_EXCEPTION: 8, + ERROR: 9 + }, + + /** + * Called by native code when returning successful result from an action. + */ + callbackSuccess: function (callbackId, args) { + cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning error result from an action. + */ + callbackError: function (callbackId, args) { + // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative. + // Derive success from status. + cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback); + }, + + /** + * Called by native code when returning the result from an action. + */ + callbackFromNative: function (callbackId, isSuccess, status, args, keepCallback) { + try { + var callback = cordova.callbacks[callbackId]; + if (callback) { + if (isSuccess && status === cordova.callbackStatus.OK) { + callback.success && callback.success.apply(null, args); + } else if (!isSuccess) { + callback.fail && callback.fail.apply(null, args); + } + /* + else + Note, this case is intentionally not caught. + this can happen if isSuccess is true, but callbackStatus is NO_RESULT + which is used to remove a callback from the list without calling the callbacks + typically keepCallback is false in this case + */ + // Clear callback if not expecting any more results + if (!keepCallback) { + delete cordova.callbacks[callbackId]; + } + } + } catch (err) { + var msg = 'Error in ' + (isSuccess ? 'Success' : 'Error') + ' callbackId: ' + callbackId + ' : ' + err; + cordova.fireWindowEvent('cordovacallbackerror', { message: msg, error: err }); + throw err; + } + }, + + addConstructor: function (func) { + channel.onCordovaReady.subscribe(function () { + try { + func(); + } catch (e) { + console.log('Failed to run constructor: ' + e); + } + }); + } +}; + +module.exports = cordova; + +}); + +// file: src/common/argscheck.js +define("cordova/argscheck", function(require, exports, module) { + +var utils = require('cordova/utils'); + +var moduleExports = module.exports; + +var typeMap = { + A: 'Array', + D: 'Date', + N: 'Number', + S: 'String', + F: 'Function', + O: 'Object' +}; + +function extractParamName (callee, argIndex) { + return (/\(\s*([^)]*?)\s*\)/).exec(callee)[1].split(/\s*,\s*/)[argIndex]; +} + +/** + * Checks the given arguments' types and throws if they are not as expected. + * + * `spec` is a string where each character stands for the required type of the + * argument at the same position. In other words: the character at `spec[i]` + * specifies the required type for `args[i]`. The characters in `spec` are the + * first letter of the required type's name. The supported types are: + * + * Array, Date, Number, String, Function, Object + * + * Lowercase characters specify arguments that must not be `null` or `undefined` + * while uppercase characters allow those values to be passed. + * + * Finally, `*` can be used to allow any type at the corresponding position. + * + * @example + * function foo (arr, opts) { + * // require `arr` to be an Array and `opts` an Object, null or undefined + * checkArgs('aO', 'my.package.foo', arguments); + * // ... + * } + * @param {String} spec - the type specification for `args` as described above + * @param {String} functionName - full name of the callee. + * Used in the error message + * @param {Array|arguments} args - the arguments to be checked against `spec` + * @param {Function} [opt_callee=args.callee] - the recipient of `args`. + * Used to extract parameter names for the error message + * @throws {TypeError} if args do not satisfy spec + */ +function checkArgs (spec, functionName, args, opt_callee) { + if (!moduleExports.enableChecks) { + return; + } + var errMsg = null; + var typeName; + for (var i = 0; i < spec.length; ++i) { + var c = spec.charAt(i); + var cUpper = c.toUpperCase(); + var arg = args[i]; + // Asterix means allow anything. + if (c === '*') { + continue; + } + typeName = utils.typeName(arg); + if ((arg === null || arg === undefined) && c === cUpper) { + continue; + } + if (typeName !== typeMap[cUpper]) { + errMsg = 'Expected ' + typeMap[cUpper]; + break; + } + } + if (errMsg) { + errMsg += ', but got ' + typeName + '.'; + errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg; + // Don't log when running unit tests. + if (typeof jasmine === 'undefined') { + console.error(errMsg); + } + throw TypeError(errMsg); + } +} + +function getValue (value, defaultValue) { + return value === undefined ? defaultValue : value; +} + +moduleExports.checkArgs = checkArgs; +moduleExports.getValue = getValue; +moduleExports.enableChecks = true; + +}); + +// file: src/common/base64.js +define("cordova/base64", function(require, exports, module) { + +var base64 = exports; + +base64.fromArrayBuffer = function (arrayBuffer) { + var array = new Uint8Array(arrayBuffer); + return uint8ToBase64(array); +}; + +base64.toArrayBuffer = function (str) { + var decodedStr = atob(str); + var arrayBuffer = new ArrayBuffer(decodedStr.length); + var array = new Uint8Array(arrayBuffer); + for (var i = 0, len = decodedStr.length; i < len; i++) { + array[i] = decodedStr.charCodeAt(i); + } + return arrayBuffer; +}; + +// ------------------------------------------------------------------------------ + +/* This code is based on the performance tests at http://jsperf.com/b64tests + * This 12-bit-at-a-time algorithm was the best performing version on all + * platforms tested. + */ + +var b64_6bit = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; +var b64_12bit; + +var b64_12bitTable = function () { + b64_12bit = []; + for (var i = 0; i < 64; i++) { + for (var j = 0; j < 64; j++) { + b64_12bit[i * 64 + j] = b64_6bit[i] + b64_6bit[j]; + } + } + b64_12bitTable = function () { return b64_12bit; }; + return b64_12bit; +}; + +function uint8ToBase64 (rawData) { + var numBytes = rawData.byteLength; + var output = ''; + var segment; + var table = b64_12bitTable(); + for (var i = 0; i < numBytes - 2; i += 3) { + segment = (rawData[i] << 16) + (rawData[i + 1] << 8) + rawData[i + 2]; + output += table[segment >> 12]; + output += table[segment & 0xfff]; + } + if (numBytes - i === 2) { + segment = (rawData[i] << 16) + (rawData[i + 1] << 8); + output += table[segment >> 12]; + output += b64_6bit[(segment & 0xfff) >> 6]; + output += '='; + } else if (numBytes - i === 1) { + segment = (rawData[i] << 16); + output += table[segment >> 12]; + output += '=='; + } + return output; +} + +}); + +// file: src/common/builder.js +define("cordova/builder", function(require, exports, module) { + +var utils = require('cordova/utils'); + +function each (objects, func, context) { + for (var prop in objects) { + if (Object.prototype.hasOwnProperty.call(objects, prop)) { + func.apply(context, [objects[prop], prop]); + } + } +} + +function clobber (obj, key, value) { + var needsProperty = false; + try { + obj[key] = value; + } catch (e) { + needsProperty = true; + } + // Getters can only be overridden by getters. + if (needsProperty || obj[key] !== value) { + utils.defineGetter(obj, key, function () { + return value; + }); + } +} + +function assignOrWrapInDeprecateGetter (obj, key, value, message) { + if (message) { + utils.defineGetter(obj, key, function () { + console.log(message); + delete obj[key]; + clobber(obj, key, value); + return value; + }); + } else { + clobber(obj, key, value); + } +} + +function include (parent, objects, clobber, merge) { + each(objects, function (obj, key) { + try { + var result = obj.path ? require(obj.path) : {}; + + if (clobber) { + // Clobber if it doesn't exist. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else if (typeof obj.path !== 'undefined') { + // If merging, merge properties onto parent, otherwise, clobber. + if (merge) { + recursiveMerge(parent[key], result); + } else { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } + } + result = parent[key]; + } else { + // Overwrite if not currently defined. + if (typeof parent[key] === 'undefined') { + assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated); + } else { + // Set result to what already exists, so we can build children into it if they exist. + result = parent[key]; + } + } + + if (obj.children) { + include(result, obj.children, clobber, merge); + } + } catch (e) { + utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"'); + } + }); +} + +/** + * Merge properties from one object onto another recursively. Properties from + * the src object will overwrite existing target property. + * + * @param target Object to merge properties into. + * @param src Object to merge properties from. + */ +function recursiveMerge (target, src) { + for (var prop in src) { + if (Object.prototype.hasOwnProperty.call(src, prop)) { + if (target.prototype && target.prototype.constructor === target) { + // If the target object is a constructor override off prototype. + clobber(target.prototype, prop, src[prop]); + } else { + if (typeof src[prop] === 'object' && typeof target[prop] === 'object') { + recursiveMerge(target[prop], src[prop]); + } else { + clobber(target, prop, src[prop]); + } + } + } + } +} + +exports.buildIntoButDoNotClobber = function (objects, target) { + include(target, objects, false, false); +}; +exports.buildIntoAndClobber = function (objects, target) { + include(target, objects, true, false); +}; +exports.buildIntoAndMerge = function (objects, target) { + include(target, objects, true, true); +}; +exports.recursiveMerge = recursiveMerge; +exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter; + +}); + +// file: src/common/channel.js +define("cordova/channel", function(require, exports, module) { + +var utils = require('cordova/utils'); +var nextGuid = 1; + +/** + * Custom pub-sub "channel" that can have functions subscribed to it + * This object is used to define and control firing of events for + * cordova initialization, as well as for custom events thereafter. + * + * The order of events during page load and Cordova startup is as follows: + * + * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed. + * onNativeReady* Internal event that indicates the Cordova native side is ready. + * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created. + * onDeviceReady* User event fired to indicate that Cordova is ready + * onResume User event fired to indicate a start/resume lifecycle event + * onPause User event fired to indicate a pause lifecycle event + * + * The events marked with an * are sticky. Once they have fired, they will stay in the fired state. + * All listeners that subscribe after the event is fired will be executed right away. + * + * The only Cordova events that user code should register for are: + * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript + * pause App has moved to background + * resume App has returned to foreground + * + * Listeners can be registered as: + * document.addEventListener("deviceready", myDeviceReadyListener, false); + * document.addEventListener("resume", myResumeListener, false); + * document.addEventListener("pause", myPauseListener, false); + * + * The DOM lifecycle events should be used for saving and restoring state + * window.onload + * window.onunload + * + */ + +/** + * Channel + * @constructor + * @param type String the channel name + */ +var Channel = function (type, sticky) { + this.type = type; + // Map of guid -> function. + this.handlers = {}; + // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired. + this.state = sticky ? 1 : 0; + // Used in sticky mode to remember args passed to fire(). + this.fireArgs = null; + // Used by onHasSubscribersChange to know if there are any listeners. + this.numHandlers = 0; + // Function that is called when the first listener is subscribed, or when + // the last listener is unsubscribed. + this.onHasSubscribersChange = null; +}; +var channel = { + /** + * Calls the provided function only after all of the channels specified + * have been fired. All channels must be sticky channels. + */ + join: function (h, c) { + var len = c.length; + var i = len; + var f = function () { + if (!(--i)) h(); + }; + for (var j = 0; j < len; j++) { + if (c[j].state === 0) { + throw Error('Can only use join with sticky channels.'); + } + c[j].subscribe(f); + } + if (!len) h(); + }, + + create: function (type) { + return (channel[type] = new Channel(type, false)); + }, + createSticky: function (type) { + return (channel[type] = new Channel(type, true)); + }, + + /** + * cordova Channels that must fire before "deviceready" is fired. + */ + deviceReadyChannelsArray: [], + deviceReadyChannelsMap: {}, + + /** + * Indicate that a feature needs to be initialized before it is ready to be used. + * This holds up Cordova's "deviceready" event until the feature has been initialized + * and Cordova.initComplete(feature) is called. + * + * @param feature {String} The unique feature name + */ + waitForInitialization: function (feature) { + if (feature) { + var c = channel[feature] || this.createSticky(feature); + this.deviceReadyChannelsMap[feature] = c; + this.deviceReadyChannelsArray.push(c); + } + }, + + /** + * Indicate that initialization code has completed and the feature is ready to be used. + * + * @param feature {String} The unique feature name + */ + initializationComplete: function (feature) { + var c = this.deviceReadyChannelsMap[feature]; + if (c) { + c.fire(); + } + } +}; + +function checkSubscriptionArgument (argument) { + if (typeof argument !== 'function' && typeof argument.handleEvent !== 'function') { + throw new Error( + 'Must provide a function or an EventListener object ' + + 'implementing the handleEvent interface.' + ); + } +} + +/** + * Subscribes the given function to the channel. Any time that + * Channel.fire is called so too will the function. + * Optionally specify an execution context for the function + * and a guid that can be used to stop subscribing to the channel. + * Returns the guid. + */ +Channel.prototype.subscribe = function (eventListenerOrFunction, eventListener) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid; + + if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + eventListener = eventListenerOrFunction; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + + if (this.state === 2) { + handleEvent.apply(eventListener || this, this.fireArgs); + return; + } + + guid = eventListenerOrFunction.observer_guid; + if (typeof eventListener === 'object') { + handleEvent = utils.close(eventListener, handleEvent); + } + + if (!guid) { + // First time any channel has seen this subscriber + guid = '' + nextGuid++; + } + handleEvent.observer_guid = guid; + eventListenerOrFunction.observer_guid = guid; + + // Don't add the same handler more than once. + if (!this.handlers[guid]) { + this.handlers[guid] = handleEvent; + this.numHandlers++; + if (this.numHandlers === 1) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + +/** + * Unsubscribes the function with the given guid from the channel. + */ +Channel.prototype.unsubscribe = function (eventListenerOrFunction) { + checkSubscriptionArgument(eventListenerOrFunction); + var handleEvent, guid, handler; + + if (eventListenerOrFunction && typeof eventListenerOrFunction === 'object') { + // Received an EventListener object implementing the handleEvent interface + handleEvent = eventListenerOrFunction.handleEvent; + } else { + // Received a function to handle event + handleEvent = eventListenerOrFunction; + } + + guid = handleEvent.observer_guid; + handler = this.handlers[guid]; + if (handler) { + delete this.handlers[guid]; + this.numHandlers--; + if (this.numHandlers === 0) { + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + +/** + * Calls all functions subscribed to this channel. + */ +Channel.prototype.fire = function (e) { + var fireArgs = Array.prototype.slice.call(arguments); + // Apply stickiness. + if (this.state === 1) { + this.state = 2; + this.fireArgs = fireArgs; + } + if (this.numHandlers) { + // Copy the values first so that it is safe to modify it from within + // callbacks. + var toCall = []; + for (var item in this.handlers) { + toCall.push(this.handlers[item]); + } + for (var i = 0; i < toCall.length; ++i) { + toCall[i].apply(this, fireArgs); + } + if (this.state === 2 && this.numHandlers) { + this.numHandlers = 0; + this.handlers = {}; + this.onHasSubscribersChange && this.onHasSubscribersChange(); + } + } +}; + +// defining them here so they are ready super fast! +// DOM event that is received when the web page is loaded and parsed. +channel.createSticky('onDOMContentLoaded'); + +// Event to indicate the Cordova native side is ready. +channel.createSticky('onNativeReady'); + +// Event to indicate that all Cordova JavaScript objects have been created +// and it's time to run plugin constructors. +channel.createSticky('onCordovaReady'); + +// Event to indicate that all automatically loaded JS plugins are loaded and ready. +// FIXME remove this +channel.createSticky('onPluginsReady'); + +// Event to indicate that Cordova is ready +channel.createSticky('onDeviceReady'); + +// Event to indicate a resume lifecycle event +channel.create('onResume'); + +// Event to indicate a pause lifecycle event +channel.create('onPause'); + +// Channels that must fire before "deviceready" is fired. +channel.waitForInitialization('onCordovaReady'); +channel.waitForInitialization('onDOMContentLoaded'); + +module.exports = channel; + +}); + +// file: ../cordova-ios/cordova-js-src/exec.js +define("cordova/exec", function(require, exports, module) { + +/** + * Creates the exec bridge used to notify the native code of + * commands. + */ +var cordova = require('cordova'); +var utils = require('cordova/utils'); +var base64 = require('cordova/base64'); + +function massageArgsJsToNative (args) { + if (!args || utils.typeName(args) !== 'Array') { + return args; + } + var ret = []; + args.forEach(function (arg, i) { + if (utils.typeName(arg) === 'ArrayBuffer') { + ret.push({ + CDVType: 'ArrayBuffer', + data: base64.fromArrayBuffer(arg) + }); + } else { + ret.push(arg); + } + }); + return ret; +} + +function massageMessageNativeToJs (message) { + if (message.CDVType === 'ArrayBuffer') { + var stringToArrayBuffer = function (str) { + var ret = new Uint8Array(str.length); + for (var i = 0; i < str.length; i++) { + ret[i] = str.charCodeAt(i); + } + return ret.buffer; + }; + var base64ToArrayBuffer = function (b64) { + return stringToArrayBuffer(atob(b64)); // eslint-disable-line no-undef + }; + message = base64ToArrayBuffer(message.data); + } + return message; +} + +function convertMessageToArgsNativeToJs (message) { + var args = []; + if (!message || !Object.prototype.hasOwnProperty.call(message, 'CDVType')) { + args.push(message); + } else if (message.CDVType === 'MultiPart') { + message.messages.forEach(function (e) { + args.push(massageMessageNativeToJs(e)); + }); + } else { + args.push(massageMessageNativeToJs(message)); + } + return args; +} + +var iOSExec = function () { + var successCallback, failCallback, service, action, actionArgs; + var callbackId = null; + if (typeof arguments[0] !== 'string') { + // FORMAT ONE + successCallback = arguments[0]; + failCallback = arguments[1]; + service = arguments[2]; + action = arguments[3]; + actionArgs = arguments[4]; + + // Since we need to maintain backwards compatibility, we have to pass + // an invalid callbackId even if no callback was provided since plugins + // will be expecting it. The Cordova.exec() implementation allocates + // an invalid callbackId and passes it even if no callbacks were given. + callbackId = 'INVALID'; + } else { + throw new Error('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' + // eslint-disable-line + 'cordova.exec(null, null, \'Service\', \'action\', [ arg1, arg2 ]);'); + } + + // If actionArgs is not provided, default to an empty array + actionArgs = actionArgs || []; + + // Register the callbacks and add the callbackId to the positional + // arguments if given. + if (successCallback || failCallback) { + callbackId = service + cordova.callbackId++; + cordova.callbacks[callbackId] = + { success: successCallback, fail: failCallback }; + } + + actionArgs = massageArgsJsToNative(actionArgs); + + // CB-10133 DataClone DOM Exception 25 guard (fast function remover) + var command = [callbackId, service, action, JSON.parse(JSON.stringify(actionArgs))]; + window.webkit.messageHandlers.cordova.postMessage(command); +}; + +iOSExec.nativeCallback = function (callbackId, status, message, keepCallback, debug) { + var success = status === 0 || status === 1; + var args = convertMessageToArgsNativeToJs(message); + Promise.resolve().then(function () { + cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line + }); +}; + +// for backwards compatibility +iOSExec.nativeEvalAndFetch = function (func) { + try { + func(); + } catch (e) { + console.log(e); + } +}; + +// Proxy the exec for bridge changes. See CB-10106 + +function cordovaExec () { + var cexec = require('cordova/exec'); + var cexec_valid = (typeof cexec.nativeFetchMessages === 'function') && (typeof cexec.nativeEvalAndFetch === 'function') && (typeof cexec.nativeCallback === 'function'); + return (cexec_valid && execProxy !== cexec) ? cexec : iOSExec; +} + +function execProxy () { + cordovaExec().apply(null, arguments); +} + +execProxy.nativeFetchMessages = function () { + return cordovaExec().nativeFetchMessages.apply(null, arguments); +}; + +execProxy.nativeEvalAndFetch = function () { + return cordovaExec().nativeEvalAndFetch.apply(null, arguments); +}; + +execProxy.nativeCallback = function () { + return cordovaExec().nativeCallback.apply(null, arguments); +}; + +module.exports = execProxy; + +}); + +// file: src/common/exec/proxy.js +define("cordova/exec/proxy", function(require, exports, module) { + +// internal map of proxy function +var CommandProxyMap = {}; + +module.exports = { + + // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...); + add: function (id, proxyObj) { + console.log('adding proxy for ' + id); + CommandProxyMap[id] = proxyObj; + return proxyObj; + }, + + // cordova.commandProxy.remove("Accelerometer"); + remove: function (id) { + var proxy = CommandProxyMap[id]; + delete CommandProxyMap[id]; + CommandProxyMap[id] = null; + return proxy; + }, + + get: function (service, action) { + return (CommandProxyMap[service] ? CommandProxyMap[service][action] : null); + } +}; + +}); + +// file: src/common/init.js +define("cordova/init", function(require, exports, module) { + +var channel = require('cordova/channel'); +var cordova = require('cordova'); +var modulemapper = require('cordova/modulemapper'); +var platform = require('cordova/platform'); +var pluginloader = require('cordova/pluginloader'); + +var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady]; + +function logUnfiredChannels (arr) { + for (var i = 0; i < arr.length; ++i) { + if (arr[i].state !== 2) { + console.log('Channel not fired: ' + arr[i].type); + } + } +} + +window.setTimeout(function () { + if (channel.onDeviceReady.state !== 2) { + console.log('deviceready has not fired after 5 seconds.'); + logUnfiredChannels(platformInitChannelsArray); + logUnfiredChannels(channel.deviceReadyChannelsArray); + } +}, 5000); + +if (!window.console) { + window.console = { + log: function () {} + }; +} +if (!window.console.warn) { + window.console.warn = function (msg) { + this.log('warn: ' + msg); + }; +} + +// Register pause, resume and deviceready channels as events on document. +channel.onPause = cordova.addDocumentEventHandler('pause'); +channel.onResume = cordova.addDocumentEventHandler('resume'); +channel.onActivated = cordova.addDocumentEventHandler('activated'); +channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready'); + +// Listen for DOMContentLoaded and notify our channel subscribers. +if (document.readyState === 'complete' || document.readyState === 'interactive') { + channel.onDOMContentLoaded.fire(); +} else { + document.addEventListener('DOMContentLoaded', function () { + channel.onDOMContentLoaded.fire(); + }, false); +} + +// _nativeReady is global variable that the native side can set +// to signify that the native code is ready. It is a global since +// it may be called before any cordova JS is ready. +if (window._nativeReady) { + channel.onNativeReady.fire(); +} + +modulemapper.clobbers('cordova', 'cordova'); +modulemapper.clobbers('cordova/exec', 'cordova.exec'); +modulemapper.clobbers('cordova/exec', 'Cordova.exec'); + +// Call the platform-specific initialization. +platform.bootstrap && platform.bootstrap(); + +// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js. +// The delay allows the attached modules to be defined before the plugin loader looks for them. +setTimeout(function () { + pluginloader.load(function () { + channel.onPluginsReady.fire(); + }); +}, 0); + +/** + * Create all cordova objects once native side is ready. + */ +channel.join(function () { + modulemapper.mapModules(window); + + platform.initialize && platform.initialize(); + + // Fire event to notify that all objects are created + channel.onCordovaReady.fire(); + + // Fire onDeviceReady event once page has fully loaded, all + // constructors have run and cordova info has been received from native + // side. + channel.join(function () { + require('cordova').fireDocumentEvent('deviceready'); + }, channel.deviceReadyChannelsArray); +}, platformInitChannelsArray); + +}); + +// file: src/common/modulemapper.js +define("cordova/modulemapper", function(require, exports, module) { + +var builder = require('cordova/builder'); +var moduleMap = define.moduleMap; +var symbolList; +var deprecationMap; + +exports.reset = function () { + symbolList = []; + deprecationMap = {}; +}; + +function addEntry (strategy, moduleName, symbolPath, opt_deprecationMessage) { + if (!(moduleName in moduleMap)) { + throw new Error('Module ' + moduleName + ' does not exist.'); + } + symbolList.push(strategy, moduleName, symbolPath); + if (opt_deprecationMessage) { + deprecationMap[symbolPath] = opt_deprecationMessage; + } +} + +// Note: Android 2.3 does have Function.bind(). +exports.clobbers = function (moduleName, symbolPath, opt_deprecationMessage) { + addEntry('c', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.merges = function (moduleName, symbolPath, opt_deprecationMessage) { + addEntry('m', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.defaults = function (moduleName, symbolPath, opt_deprecationMessage) { + addEntry('d', moduleName, symbolPath, opt_deprecationMessage); +}; + +exports.runs = function (moduleName) { + addEntry('r', moduleName, null); +}; + +function prepareNamespace (symbolPath, context) { + if (!symbolPath) { + return context; + } + return symbolPath.split('.').reduce(function (cur, part) { + return (cur[part] = cur[part] || {}); + }, context); +} + +exports.mapModules = function (context) { + var origSymbols = {}; + context.CDV_origSymbols = origSymbols; + for (var i = 0, len = symbolList.length; i < len; i += 3) { + var strategy = symbolList[i]; + var moduleName = symbolList[i + 1]; + var module = require(moduleName); + // + if (strategy === 'r') { + continue; + } + var symbolPath = symbolList[i + 2]; + var lastDot = symbolPath.lastIndexOf('.'); + var namespace = symbolPath.substr(0, lastDot); + var lastName = symbolPath.substr(lastDot + 1); + + var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null; + var parentObj = prepareNamespace(namespace, context); + var target = parentObj[lastName]; + + if (strategy === 'm' && target) { + builder.recursiveMerge(target, module); + } else if ((strategy === 'd' && !target) || (strategy !== 'd')) { + if (!(symbolPath in origSymbols)) { + origSymbols[symbolPath] = target; + } + builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg); + } + } +}; + +exports.getOriginalSymbol = function (context, symbolPath) { + var origSymbols = context.CDV_origSymbols; + if (origSymbols && (symbolPath in origSymbols)) { + return origSymbols[symbolPath]; + } + var parts = symbolPath.split('.'); + var obj = context; + for (var i = 0; i < parts.length; ++i) { + obj = obj && obj[parts[i]]; + } + return obj; +}; + +exports.reset(); + +}); + +// file: ../cordova-ios/cordova-js-src/platform.js +define("cordova/platform", function(require, exports, module) { + +module.exports = { + id: 'ios', + bootstrap: function () { + // Attach the console polyfill that is iOS-only to window.console + // see the file under plugin/ios/console.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/console', 'window.console'); + + // Attach the wkwebkit utility to window.WkWebView + // see the file under plugin/ios/wkwebkit.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/wkwebkit', 'window.WkWebView'); + + // Attach the splashscreen utility to window.navigator.splashscreen + // see the file under plugin/ios/launchscreen.js + require('cordova/modulemapper').clobbers('cordova/plugin/ios/launchscreen', 'navigator.splashscreen'); + + require('cordova/channel').onNativeReady.fire(); + } +}; + +}); + +// file: ../cordova-ios/cordova-js-src/plugin/ios/console.js +define("cordova/plugin/ios/console", function(require, exports, module) { + +// ------------------------------------------------------------------------------ + +var logger = require('cordova/plugin/ios/logger'); + +// ------------------------------------------------------------------------------ +// object that we're exporting +// ------------------------------------------------------------------------------ +var console = module.exports; + +// ------------------------------------------------------------------------------ +// copy of the original console object +// ------------------------------------------------------------------------------ +var WinConsole = window.console; + +// ------------------------------------------------------------------------------ +// whether to use the logger +// ------------------------------------------------------------------------------ +var UseLogger = false; + +// ------------------------------------------------------------------------------ +// Timers +// ------------------------------------------------------------------------------ +var Timers = {}; + +// ------------------------------------------------------------------------------ +// used for unimplemented methods +// ------------------------------------------------------------------------------ +function noop () {} + +// ------------------------------------------------------------------------------ +// used for unimplemented methods +// ------------------------------------------------------------------------------ +console.useLogger = function (value) { + if (arguments.length) UseLogger = !!value; + + if (UseLogger) { + if (logger.useConsole()) { + throw new Error('console and logger are too intertwingly'); + } + } + + return UseLogger; +}; + +// ------------------------------------------------------------------------------ +console.log = function () { + if (logger.useConsole()) return; + logger.log.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.error = function () { + if (logger.useConsole()) return; + logger.error.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.warn = function () { + if (logger.useConsole()) return; + logger.warn.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.info = function () { + if (logger.useConsole()) return; + logger.info.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.debug = function () { + if (logger.useConsole()) return; + logger.debug.apply(logger, [].slice.call(arguments)); +}; + +// ------------------------------------------------------------------------------ +console.assert = function (expression) { + if (expression) return; + + var message = logger.format.apply(logger.format, [].slice.call(arguments, 1)); + console.log('ASSERT: ' + message); +}; + +// ------------------------------------------------------------------------------ +console.clear = function () {}; + +// ------------------------------------------------------------------------------ +console.dir = function (object) { + console.log('%o', object); +}; + +// ------------------------------------------------------------------------------ +console.dirxml = function (node) { + console.log(node.innerHTML); +}; + +// ------------------------------------------------------------------------------ +console.trace = noop; + +// ------------------------------------------------------------------------------ +console.group = console.log; + +// ------------------------------------------------------------------------------ +console.groupCollapsed = console.log; + +// ------------------------------------------------------------------------------ +console.groupEnd = noop; + +// ------------------------------------------------------------------------------ +console.time = function (name) { + Timers[name] = new Date().valueOf(); +}; + +// ------------------------------------------------------------------------------ +console.timeEnd = function (name) { + var timeStart = Timers[name]; + if (!timeStart) { + console.warn('unknown timer: ' + name); + return; + } + + var timeElapsed = new Date().valueOf() - timeStart; + console.log(name + ': ' + timeElapsed + 'ms'); +}; + +// ------------------------------------------------------------------------------ +console.timeStamp = noop; + +// ------------------------------------------------------------------------------ +console.profile = noop; + +// ------------------------------------------------------------------------------ +console.profileEnd = noop; + +// ------------------------------------------------------------------------------ +console.count = noop; + +// ------------------------------------------------------------------------------ +console.exception = console.log; + +// ------------------------------------------------------------------------------ +console.table = function (data, columns) { + console.log('%o', data); +}; + +// ------------------------------------------------------------------------------ +// return a new function that calls both functions passed as args +// ------------------------------------------------------------------------------ +function wrappedOrigCall (orgFunc, newFunc) { + return function () { + var args = [].slice.call(arguments); + try { orgFunc.apply(WinConsole, args); } catch (e) {} + try { newFunc.apply(console, args); } catch (e) {} + }; +} + +// ------------------------------------------------------------------------------ +// For every function that exists in the original console object, that +// also exists in the new console object, wrap the new console method +// with one that calls both +// ------------------------------------------------------------------------------ +for (var key in console) { + if (typeof WinConsole[key] === 'function') { + console[key] = wrappedOrigCall(WinConsole[key], console[key]); + } +} + +}); + +// file: ../cordova-ios/cordova-js-src/plugin/ios/launchscreen.js +define("cordova/plugin/ios/launchscreen", function(require, exports, module) { + +var exec = require('cordova/exec'); + +var launchscreen = { + show: function () { + exec(null, null, 'LaunchScreen', 'show', []); + }, + hide: function () { + exec(null, null, 'LaunchScreen', 'hide', []); + } +}; + +module.exports = launchscreen; + +}); + +// file: ../cordova-ios/cordova-js-src/plugin/ios/logger.js +define("cordova/plugin/ios/logger", function(require, exports, module) { + +// ------------------------------------------------------------------------------ +// The logger module exports the following properties/functions: +// +// LOG - constant for the level LOG +// ERROR - constant for the level ERROR +// WARN - constant for the level WARN +// INFO - constant for the level INFO +// DEBUG - constant for the level DEBUG +// logLevel() - returns current log level +// logLevel(value) - sets and returns a new log level +// useConsole() - returns whether logger is using console +// useConsole(value) - sets and returns whether logger is using console +// log(message,...) - logs a message at level LOG +// error(message,...) - logs a message at level ERROR +// warn(message,...) - logs a message at level WARN +// info(message,...) - logs a message at level INFO +// debug(message,...) - logs a message at level DEBUG +// logLevel(level,message,...) - logs a message specified level +// +// ------------------------------------------------------------------------------ + +var logger = exports; + +var exec = require('cordova/exec'); + +var UseConsole = false; +var UseLogger = true; +var Queued = []; +var DeviceReady = false; +var CurrentLevel; + +var originalConsole = console; + +/** + * Logging levels + */ + +var Levels = [ + 'LOG', + 'ERROR', + 'WARN', + 'INFO', + 'DEBUG' +]; + +/* + * add the logging levels to the logger object and + * to a separate levelsMap object for testing + */ + +var LevelsMap = {}; +for (var i = 0; i < Levels.length; i++) { + var level = Levels[i]; + LevelsMap[level] = i; + logger[level] = level; +} + +CurrentLevel = LevelsMap.WARN; + +/** + * Getter/Setter for the logging level + * + * Returns the current logging level. + * + * When a value is passed, sets the logging level to that value. + * The values should be one of the following constants: + * logger.LOG + * logger.ERROR + * logger.WARN + * logger.INFO + * logger.DEBUG + * + * The value used determines which messages get printed. The logging + * values above are in order, and only messages logged at the logging + * level or above will actually be displayed to the user. E.g., the + * default level is WARN, so only messages logged with LOG, ERROR, or + * WARN will be displayed; INFO and DEBUG messages will be ignored. + */ +logger.level = function (value) { + if (arguments.length) { + if (LevelsMap[value] === null) { + throw new Error('invalid logging level: ' + value); + } + CurrentLevel = LevelsMap[value]; + } + + return Levels[CurrentLevel]; +}; + +/** + * Getter/Setter for the useConsole functionality + * + * When useConsole is true, the logger will log via the + * browser 'console' object. + */ +logger.useConsole = function (value) { + if (arguments.length) UseConsole = !!value; + + if (UseConsole) { + if (typeof console === 'undefined') { + throw new Error('global console object is not defined'); + } + + if (typeof console.log !== 'function') { + throw new Error('global console object does not have a log function'); + } + + if (typeof console.useLogger === 'function') { + if (console.useLogger()) { + throw new Error('console and logger are too intertwingly'); + } + } + } + + return UseConsole; +}; + +/** + * Getter/Setter for the useLogger functionality + * + * When useLogger is true, the logger will log via the + * native Logger plugin. + */ +logger.useLogger = function (value) { + // Enforce boolean + if (arguments.length) UseLogger = !!value; + return UseLogger; +}; + +/** + * Logs a message at the LOG level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.log = function (message) { logWithArgs('LOG', arguments); }; + +/** + * Logs a message at the ERROR level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.error = function (message) { logWithArgs('ERROR', arguments); }; + +/** + * Logs a message at the WARN level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.warn = function (message) { logWithArgs('WARN', arguments); }; + +/** + * Logs a message at the INFO level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.info = function (message) { logWithArgs('INFO', arguments); }; + +/** + * Logs a message at the DEBUG level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.debug = function (message) { logWithArgs('DEBUG', arguments); }; + +// log at the specified level with args +function logWithArgs (level, args) { + args = [level].concat([].slice.call(args)); + logger.logLevel.apply(logger, args); +} + +// return the correct formatString for an object +function formatStringForMessage (message) { + return (typeof message === 'string') ? '' : '%o'; +} + +/** + * Logs a message at the specified level. + * + * Parameters passed after message are used applied to + * the message with utils.format() + */ +logger.logLevel = function (level /* , ... */) { + // format the message with the parameters + var formatArgs = [].slice.call(arguments, 1); + var fmtString = formatStringForMessage(formatArgs[0]); + if (fmtString.length > 0) { + formatArgs.unshift(fmtString); // add formatString + } + + var message = logger.format.apply(logger.format, formatArgs); + + if (LevelsMap[level] === null) { + throw new Error('invalid logging level: ' + level); + } + + if (LevelsMap[level] > CurrentLevel) return; + + // queue the message if not yet at deviceready + if (!DeviceReady && !UseConsole) { + Queued.push([level, message]); + return; + } + + // Log using the native logger if that is enabled + if (UseLogger) { + exec(null, null, 'Console', 'logLevel', [level, message]); + } + + // Log using the console if that is enabled + if (UseConsole) { + // make sure console is not using logger + if (console.useLogger()) { + throw new Error('console and logger are too intertwingly'); + } + + // log to the console + switch (level) { + case logger.LOG: originalConsole.log(message); break; + case logger.ERROR: originalConsole.log('ERROR: ' + message); break; + case logger.WARN: originalConsole.log('WARN: ' + message); break; + case logger.INFO: originalConsole.log('INFO: ' + message); break; + case logger.DEBUG: originalConsole.log('DEBUG: ' + message); break; + } + } +}; + +/** + * Formats a string and arguments following it ala console.log() + * + * Any remaining arguments will be appended to the formatted string. + * + * for rationale, see FireBug's Console API: + * http://getfirebug.com/wiki/index.php/Console_API + */ +logger.format = function (formatString, args) { + return __format(arguments[0], [].slice.call(arguments, 1)).join(' '); +}; + +// ------------------------------------------------------------------------------ +/** + * Formats a string and arguments following it ala vsprintf() + * + * format chars: + * %j - format arg as JSON + * %o - format arg as JSON + * %c - format arg as '' + * %% - replace with '%' + * any other char following % will format it's + * arg via toString(). + * + * Returns an array containing the formatted string and any remaining + * arguments. + */ +function __format (formatString, args) { + if (formatString === null || formatString === undefined) return ['']; + if (arguments.length === 1) return [formatString.toString()]; + + if (typeof formatString !== 'string') { formatString = formatString.toString(); } + + var pattern = /(.*?)%(.)(.*)/; + var rest = formatString; + var result = []; + + while (args.length) { + var match = pattern.exec(rest); + if (!match) break; + + var arg = args.shift(); + rest = match[3]; + result.push(match[1]); + + if (match[2] === '%') { + result.push('%'); + args.unshift(arg); + continue; + } + + result.push(__formatted(arg, match[2])); + } + + result.push(rest); + + var remainingArgs = [].slice.call(args); + remainingArgs.unshift(result.join('')); + return remainingArgs; +} + +function __formatted (object, formatChar) { + try { + switch (formatChar) { + case 'j': + case 'o': return JSON.stringify(object); + case 'c': return ''; + } + } catch (e) { + return 'error JSON.stringify()ing argument: ' + e; + } + + if ((object === null) || (object === undefined)) { + return Object.prototype.toString.call(object); + } + + return object.toString(); +} + +// ------------------------------------------------------------------------------ +// when deviceready fires, log queued messages +logger.__onDeviceReady = function () { + if (DeviceReady) return; + + DeviceReady = true; + + for (var i = 0; i < Queued.length; i++) { + var messageArgs = Queued[i]; + logger.logLevel(messageArgs[0], messageArgs[1]); + } + + Queued = null; +}; + +// add a deviceready event to log queued messages +document.addEventListener('deviceready', logger.__onDeviceReady, false); + +}); + +// file: ../cordova-ios/cordova-js-src/plugin/ios/wkwebkit.js +define("cordova/plugin/ios/wkwebkit", function(require, exports, module) { + +var exec = require('cordova/exec'); + +var WkWebKit = { + allowsBackForwardNavigationGestures: function (allow) { + exec(null, null, 'CDVWebViewEngine', 'allowsBackForwardNavigationGestures', [allow]); + }, + convertFilePath: function (path) { + if (!path || !window.CDV_ASSETS_URL) { + return path; + } + if (path.startsWith('/')) { + return window.CDV_ASSETS_URL + '/_app_file_' + path; + } + if (path.startsWith('file://')) { + return window.CDV_ASSETS_URL + path.replace('file://', '/_app_file_'); + } + return path; + } +}; + +module.exports = WkWebKit; + +}); + +// file: src/common/pluginloader.js +define("cordova/pluginloader", function(require, exports, module) { + +var modulemapper = require('cordova/modulemapper'); + +// Helper function to inject a + + + + + FlyingPlane + + + + + + + + + +
+ +
+ +
+ + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/admob-plus-cordova/www/admob.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/admob-plus-cordova/www/admob.js new file mode 100644 index 0000000..731f9a1 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/admob-plus-cordova/www/admob.js @@ -0,0 +1,678 @@ +cordova.define("admob-plus-cordova.AdMob", function(require, exports, module) { +'use strict'; + +var cordova$1 = require('cordova'); +var channel = require('cordova/channel'); +var exec = require('cordova/exec'); + +function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } + +function _interopNamespace(e) { + if (e && e.__esModule) return e; + var n = Object.create(null); + if (e) { + Object.keys(e).forEach(function (k) { + if (k !== 'default') { + var d = Object.getOwnPropertyDescriptor(e, k); + Object.defineProperty(n, k, d.get ? d : { + enumerable: true, + get: function () { return e[k]; } + }); + } + }); + } + n["default"] = e; + return Object.freeze(n); +} + +var cordova__namespace = /*#__PURE__*/_interopNamespace(cordova$1); +var channel__default = /*#__PURE__*/_interopDefaultLegacy(channel); +var exec__default = /*#__PURE__*/_interopDefaultLegacy(exec); + +/****************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + if (typeof b !== "function" && b !== null) + throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __spreadArray(to, from, pack) { + if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) { + if (ar || !(i in from)) { + if (!ar) ar = Array.prototype.slice.call(from, 0, i); + ar[i] = from[i]; + } + } + return to.concat(ar || Array.prototype.slice.call(from)); +} + +// THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +var NativeActions; +(function (NativeActions) { + NativeActions["adCreate"] = "adCreate"; + NativeActions["adHide"] = "adHide"; + NativeActions["adIsLoaded"] = "adIsLoaded"; + NativeActions["adLoad"] = "adLoad"; + NativeActions["adShow"] = "adShow"; + NativeActions["bannerConfig"] = "bannerConfig"; + NativeActions["bannerHide"] = "bannerHide"; + NativeActions["bannerLoad"] = "bannerLoad"; + NativeActions["bannerShow"] = "bannerShow"; + NativeActions["configRequest"] = "configRequest"; + NativeActions["configure"] = "configure"; + NativeActions["interstitialIsLoaded"] = "interstitialIsLoaded"; + NativeActions["interstitialLoad"] = "interstitialLoad"; + NativeActions["interstitialShow"] = "interstitialShow"; + NativeActions["ready"] = "ready"; + NativeActions["requestTrackingAuthorization"] = "requestTrackingAuthorization"; + NativeActions["rewardedInterstitialIsLoaded"] = "rewardedInterstitialIsLoaded"; + NativeActions["rewardedInterstitialLoad"] = "rewardedInterstitialLoad"; + NativeActions["rewardedInterstitialShow"] = "rewardedInterstitialShow"; + NativeActions["rewardedIsLoaded"] = "rewardedIsLoaded"; + NativeActions["rewardedLoad"] = "rewardedLoad"; + NativeActions["rewardedShow"] = "rewardedShow"; + NativeActions["setAppMuted"] = "setAppMuted"; + NativeActions["setAppVolume"] = "setAppVolume"; + NativeActions["start"] = "start"; +})(NativeActions || (NativeActions = {})); +var Events; +(function (Events) { + Events["adClick"] = "admob.ad.click"; + Events["adDismiss"] = "admob.ad.dismiss"; + Events["adImpression"] = "admob.ad.impression"; + Events["adLoad"] = "admob.ad.load"; + Events["adLoadFail"] = "admob.ad.loadfail"; + Events["adReward"] = "admob.ad.reward"; + Events["adShow"] = "admob.ad.show"; + Events["adShowFail"] = "admob.ad.showfail"; + Events["bannerClick"] = "admob.banner.click"; + Events["bannerClose"] = "admob.banner.close"; + Events["bannerImpression"] = "admob.banner.impression"; + Events["bannerLoad"] = "admob.banner.load"; + Events["bannerLoadFail"] = "admob.banner.loadfail"; + Events["bannerOpen"] = "admob.banner.open"; + Events["bannerSize"] = "admob.banner.size"; + Events["bannerSizeChange"] = "admob.banner.sizechange"; + Events["interstitialDismiss"] = "admob.interstitial.dismiss"; + Events["interstitialImpression"] = "admob.interstitial.impression"; + Events["interstitialLoad"] = "admob.interstitial.load"; + Events["interstitialLoadFail"] = "admob.interstitial.loadfail"; + Events["interstitialShow"] = "admob.interstitial.show"; + Events["interstitialShowFail"] = "admob.interstitial.showfail"; + Events["ready"] = "admob.ready"; + Events["rewardedDismiss"] = "admob.rewarded.dismiss"; + Events["rewardedImpression"] = "admob.rewarded.impression"; + Events["rewardedInterstitialDismiss"] = "admob.rewardedi.dismiss"; + Events["rewardedInterstitialImpression"] = "admob.rewardedi.impression"; + Events["rewardedInterstitialLoad"] = "admob.rewardedi.load"; + Events["rewardedInterstitialLoadFail"] = "admob.rewardedi.loadfail"; + Events["rewardedInterstitialReward"] = "admob.rewardedi.reward"; + Events["rewardedInterstitialShow"] = "admob.rewardedi.show"; + Events["rewardedInterstitialShowFail"] = "admob.rewardedi.showfail"; + Events["rewardedLoad"] = "admob.rewarded.load"; + Events["rewardedLoadFail"] = "admob.rewarded.loadfail"; + Events["rewardedReward"] = "admob.rewarded.reward"; + Events["rewardedShow"] = "admob.rewarded.show"; + Events["rewardedShowFail"] = "admob.rewarded.showfail"; +})(Events || (Events = {})); +var AdSizeType; +(function (AdSizeType) { + AdSizeType[AdSizeType["BANNER"] = 0] = "BANNER"; + AdSizeType[AdSizeType["LARGE_BANNER"] = 1] = "LARGE_BANNER"; + AdSizeType[AdSizeType["MEDIUM_RECTANGLE"] = 2] = "MEDIUM_RECTANGLE"; + AdSizeType[AdSizeType["FULL_BANNER"] = 3] = "FULL_BANNER"; + AdSizeType[AdSizeType["LEADERBOARD"] = 4] = "LEADERBOARD"; + AdSizeType[AdSizeType["SMART_BANNER"] = 5] = "SMART_BANNER"; +})(AdSizeType || (AdSizeType = {})); +var execAsync = function (action, args) { + return new Promise(function (resolve, reject) { + cordova.exec(resolve, reject, 'AdMob', action, args); + }); +}; + +var started = false; +var startPromise = null; +/** @internal */ +function start() { + return __awaiter(this, void 0, void 0, function () { + var result; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + startPromise = execAsync(NativeActions.start); + return [4 /*yield*/, startPromise]; + case 1: + result = _a.sent(); + started = true; + return [2 /*return*/, result]; + } + }); + }); +} +/** @internal */ +var MobileAd = /** @class */ (function () { + function MobileAd(opts) { + var _a; + this._created = false; + this._init = null; + this.opts = opts; + this.id = (_a = opts.id) !== null && _a !== void 0 ? _a : MobileAd.nextId(); + MobileAd.allAds[this.id] = this; + } + MobileAd.getAdById = function (id) { + return this.allAds[id]; + }; + MobileAd.nextId = function () { + var storage = window.localStorage; + var key = 'admob-ad-id-counter'; + var value = storage.getItem(key); + if (value !== null) { + MobileAd.idCounter = Number(value); + } + MobileAd.idCounter += 1; + storage.setItem(key, "".concat(MobileAd.idCounter)); + return MobileAd.idCounter; + }; + Object.defineProperty(MobileAd.prototype, "adUnitId", { + get: function () { + return this.opts.adUnitId; + }, + enumerable: false, + configurable: true + }); + MobileAd.prototype.on = function () { + var _this = this; + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var eventName = args[0], cb = args[1], rest = args.slice(2); + var type = "admob.ad.".concat(eventName.toLowerCase()); + var listener = function (evt) { + if (evt.ad === _this) { + cb(evt); + } + }; + document.addEventListener.apply(document, __spreadArray([type, listener], rest, false)); + return function () { + document.removeEventListener.apply(document, __spreadArray([type, listener], rest, false)); + }; + }; + MobileAd.prototype.isLoaded = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.init()]; + case 1: + _a.sent(); + return [2 /*return*/, execAsync(NativeActions.adIsLoaded, [ + { id: this.id }, + ])]; + } + }); + }); + }; + MobileAd.prototype.load = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.init() + // TODO read `opts` in native code? + ]; + case 1: + _a.sent(); + // TODO read `opts` in native code? + return [4 /*yield*/, execAsync(NativeActions.adLoad, [__assign(__assign({}, this.opts), { id: this.id })])]; + case 2: + // TODO read `opts` in native code? + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + MobileAd.prototype.show = function (opts) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, this.init()]; + case 1: + _a.sent(); + return [2 /*return*/, execAsync(NativeActions.adShow, [__assign(__assign({}, opts), { id: this.id })])]; + } + }); + }); + }; + MobileAd.prototype.hide = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, execAsync(NativeActions.adHide, [{ id: this.id }])]; + }); + }); + }; + MobileAd.prototype.init = function () { + var _a; + return __awaiter(this, void 0, void 0, function () { + var cls; + return __generator(this, function (_b) { + switch (_b.label) { + case 0: + if (this._created) + return [2 /*return*/]; + if (!!started) return [3 /*break*/, 2]; + if (startPromise === null) + start(); + return [4 /*yield*/, startPromise]; + case 1: + _b.sent(); + _b.label = 2; + case 2: + if (this._init === null) { + cls = (_a = this.constructor.cls) !== null && _a !== void 0 ? _a : this.constructor.name; + this._init = execAsync(NativeActions.adCreate, [ + __assign(__assign({}, this.opts), { id: this.id, cls: cls }), + ]); + } + return [4 /*yield*/, this._init]; + case 3: + _b.sent(); + this._created = true; + return [2 /*return*/]; + } + }); + }); + }; + MobileAd.type = ''; + MobileAd.allAds = {}; + MobileAd.idCounter = 0; + return MobileAd; +}()); +var MaxAdContentRating; +(function (MaxAdContentRating) { + MaxAdContentRating["G"] = "G"; + MaxAdContentRating["MA"] = "MA"; + MaxAdContentRating["PG"] = "PG"; + MaxAdContentRating["T"] = "T"; + MaxAdContentRating["UNSPECIFIED"] = ""; +})(MaxAdContentRating || (MaxAdContentRating = {})); +var TrackingAuthorizationStatus; +(function (TrackingAuthorizationStatus) { + TrackingAuthorizationStatus[TrackingAuthorizationStatus["notDetermined"] = 0] = "notDetermined"; + TrackingAuthorizationStatus[TrackingAuthorizationStatus["restricted"] = 1] = "restricted"; + TrackingAuthorizationStatus[TrackingAuthorizationStatus["denied"] = 2] = "denied"; + TrackingAuthorizationStatus[TrackingAuthorizationStatus["authorized"] = 3] = "authorized"; +})(TrackingAuthorizationStatus || (TrackingAuthorizationStatus = {})); + +var AppOpenAdOrientation; +(function (AppOpenAdOrientation) { + AppOpenAdOrientation[AppOpenAdOrientation["Portrait"] = 1] = "Portrait"; + AppOpenAdOrientation[AppOpenAdOrientation["PortraitUpsideDown"] = 2] = "PortraitUpsideDown"; + AppOpenAdOrientation[AppOpenAdOrientation["LandscapeRight"] = 3] = "LandscapeRight"; + AppOpenAdOrientation[AppOpenAdOrientation["LandscapeLeft"] = 4] = "LandscapeLeft"; +})(AppOpenAdOrientation || (AppOpenAdOrientation = {})); +var AppOpenAd = /** @class */ (function (_super) { + __extends(AppOpenAd, _super); + function AppOpenAd() { + return _super !== null && _super.apply(this, arguments) || this; + } + AppOpenAd.prototype.isLoaded = function () { + return _super.prototype.isLoaded.call(this); + }; + AppOpenAd.prototype.load = function () { + return _super.prototype.load.call(this); + }; + AppOpenAd.prototype.show = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, _super.prototype.show.call(this)]; + }); + }); + }; + AppOpenAd.cls = 'AppOpenAd'; + AppOpenAd.Orientation = AppOpenAdOrientation; + return AppOpenAd; +}(MobileAd)); + +var colorToRGBA = (function () { + var canvas = document.createElement('canvas'); + canvas.width = canvas.height = 1; + var ctx = canvas.getContext('2d'); + if (!ctx) + return function () { return undefined; }; + return function (col) { + ctx.clearRect(0, 0, 1, 1); + // In order to detect invalid values, + // we can't rely on col being in the same format as what fillStyle is computed as, + // but we can ask it to implicitly compute a normalized value twice and compare. + ctx.fillStyle = '#000'; + ctx.fillStyle = col; + var computed = ctx.fillStyle; + ctx.fillStyle = '#fff'; + ctx.fillStyle = col; + if (computed !== ctx.fillStyle) { + return; // invalid color + } + ctx.fillRect(0, 0, 1, 1); + var data = ctx.getImageData(0, 0, 1, 1).data; + return { r: data[0], g: data[1], b: data[2], a: data[3] }; + }; +})(); +var BannerAd = /** @class */ (function (_super) { + __extends(BannerAd, _super); + function BannerAd(opts) { + var _this = _super.call(this, __assign({ position: 'bottom', size: AdSizeType.SMART_BANNER }, opts)) || this; + _this._loaded = false; + return _this; + } + BannerAd.config = function (opts) { + if (cordova.platformId === "ios" /* Platforms.ios */) { + var bgColor = opts.backgroundColor; + return execAsync(NativeActions.bannerConfig, [ + __assign(__assign({}, opts), { backgroundColor: bgColor ? colorToRGBA(bgColor) : bgColor }), + ]); + } + return false; + }; + BannerAd.prototype.load = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: return [4 /*yield*/, _super.prototype.load.call(this)]; + case 1: + _a.sent(); + this._loaded = true; + return [2 /*return*/]; + } + }); + }); + }; + BannerAd.prototype.show = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!!this._loaded) return [3 /*break*/, 2]; + return [4 /*yield*/, this.load()]; + case 1: + _a.sent(); + _a.label = 2; + case 2: return [2 /*return*/, _super.prototype.show.call(this)]; + } + }); + }); + }; + BannerAd.prototype.hide = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, _super.prototype.hide.call(this)]; + }); + }); + }; + BannerAd.cls = 'BannerAd'; + return BannerAd; +}(MobileAd)); + +var InterstitialAd = /** @class */ (function (_super) { + __extends(InterstitialAd, _super); + function InterstitialAd() { + return _super !== null && _super.apply(this, arguments) || this; + } + InterstitialAd.prototype.isLoaded = function () { + return _super.prototype.isLoaded.call(this); + }; + InterstitialAd.prototype.load = function () { + return _super.prototype.load.call(this); + }; + InterstitialAd.prototype.show = function () { + return _super.prototype.show.call(this); + }; + InterstitialAd.cls = 'InterstitialAd'; + return InterstitialAd; +}(MobileAd)); + +var NativeAd = /** @class */ (function (_super) { + __extends(NativeAd, _super); + function NativeAd() { + return _super !== null && _super.apply(this, arguments) || this; + } + NativeAd.prototype.isLoaded = function () { + return _super.prototype.isLoaded.call(this); + }; + NativeAd.prototype.hide = function () { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, _super.prototype.hide.call(this)]; + }); + }); + }; + NativeAd.prototype.load = function () { + return _super.prototype.load.call(this); + }; + NativeAd.prototype.show = function (opts) { + return __awaiter(this, void 0, void 0, function () { + return __generator(this, function (_a) { + return [2 /*return*/, _super.prototype.show.call(this, __assign({ x: 0, y: 0, width: 0, height: 0 }, opts))]; + }); + }); + }; + NativeAd.prototype.showWith = function (elm) { + return __awaiter(this, void 0, void 0, function () { + var update, observer; + var _this = this; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + update = function () { return __awaiter(_this, void 0, void 0, function () { + var r; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + r = elm.getBoundingClientRect(); + return [4 /*yield*/, this.show({ + x: r.x, + y: r.y, + width: r.width, + height: r.height, + })]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); }; + observer = new MutationObserver(update); + observer.observe(document.body, { + attributes: true, + childList: true, + subtree: true, + }); + document.addEventListener('scroll', update); + window.addEventListener('resize', update); + return [4 /*yield*/, update()]; + case 1: + _a.sent(); + return [2 /*return*/]; + } + }); + }); + }; + NativeAd.cls = 'NativeAd'; + return NativeAd; +}(MobileAd)); + +var RewardedAd = /** @class */ (function (_super) { + __extends(RewardedAd, _super); + function RewardedAd() { + return _super !== null && _super.apply(this, arguments) || this; + } + RewardedAd.prototype.isLoaded = function () { + return _super.prototype.isLoaded.call(this); + }; + RewardedAd.prototype.load = function () { + return _super.prototype.load.call(this); + }; + RewardedAd.prototype.show = function () { + return _super.prototype.show.call(this); + }; + RewardedAd.cls = 'RewardedAd'; + return RewardedAd; +}(MobileAd)); + +var RewardedInterstitialAd = /** @class */ (function (_super) { + __extends(RewardedInterstitialAd, _super); + function RewardedInterstitialAd() { + return _super !== null && _super.apply(this, arguments) || this; + } + RewardedInterstitialAd.prototype.isLoaded = function () { + return _super.prototype.isLoaded.call(this); + }; + RewardedInterstitialAd.prototype.load = function () { + return _super.prototype.load.call(this); + }; + RewardedInterstitialAd.prototype.show = function () { + return _super.prototype.show.call(this); + }; + RewardedInterstitialAd.cls = 'RewardedInterstitialAd'; + return RewardedInterstitialAd; +}(MobileAd)); + +var AdMob = /** @class */ (function () { + function AdMob() { + this.AppOpenAd = AppOpenAd; + this.BannerAd = BannerAd; + this.InterstitialAd = InterstitialAd; + this.NativeAd = NativeAd; + this.RewardedAd = RewardedAd; + this.RewardedInterstitialAd = RewardedInterstitialAd; + this.Events = Events; + this.TrackingAuthorizationStatus = TrackingAuthorizationStatus; + } + AdMob.prototype.configure = function (config) { + return execAsync(NativeActions.configure, [config]); + }; + AdMob.prototype.configRequest = function (requestConfig) { + return execAsync(NativeActions.configRequest, [requestConfig]); + }; + AdMob.prototype.setAppMuted = function (value) { + return execAsync(NativeActions.setAppMuted, [value]); + }; + AdMob.prototype.setAppVolume = function (value) { + return execAsync(NativeActions.setAppVolume, [value]); + }; + AdMob.prototype.start = function () { + return start(); + }; + AdMob.prototype.requestTrackingAuthorization = function () { + return __awaiter(this, void 0, void 0, function () { + var n; + return __generator(this, function (_a) { + switch (_a.label) { + case 0: + if (!(cordova.platformId === "ios" /* Platforms.ios */)) return [3 /*break*/, 2]; + return [4 /*yield*/, execAsync(NativeActions.requestTrackingAuthorization)]; + case 1: + n = _a.sent(); + if (n !== false) { + return [2 /*return*/, TrackingAuthorizationStatus[TrackingAuthorizationStatus[n]]]; + } + _a.label = 2; + case 2: return [2 /*return*/, false]; + } + }); + }); + }; + return AdMob; +}()); + +var admob = new AdMob(); +function onMessageFromNative(event) { + var data = event.data; + if (data && data.adId) { + data.ad = MobileAd.getAdById(data.adId); + } + cordova__namespace.fireDocumentEvent(event.type, data); +} +var feature = 'onAdMobPlusReady'; +channel__default["default"].createSticky(feature); +channel__default["default"].waitForInitialization(feature); +channel__default["default"].onCordovaReady.subscribe(function () { + exec__default["default"](onMessageFromNative, console.error, 'AdMob', NativeActions.ready, []); + channel__default["default"].initializationComplete(feature); +}); + +module.exports = admob; + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-browsertab/www/browsertab.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-browsertab/www/browsertab.js new file mode 100644 index 0000000..0459016 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-browsertab/www/browsertab.js @@ -0,0 +1,34 @@ +cordova.define("cordova-plugin-browsertab.BrowserTab", function(require, exports, module) { +/* + * Copyright 2016 Google Inc. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the + * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing permissions and + * limitations under the License. + */ + +var exec = require('cordova/exec'); + +exports.isAvailable = function(success, error) { + exec(success, error, 'BrowserTab', 'isAvailable', []); +}; + +exports.openUrl = function(url, opt_error) { + var doNothing = function() {}; + var error = (!opt_error) ? doNothing : opt_error; + exec(doNothing, error, 'BrowserTab', 'openUrl', [url]); +}; + +exports.close = function(opt_error) { + var doNothing = function() {}; + var error = (!opt_error) ? doNothing : opt_error; + exec(doNothing, error, 'BrowserTab', 'close', []); +}; + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-buildinfo/www/buildinfo.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-buildinfo/www/buildinfo.js new file mode 100644 index 0000000..faa9b94 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-buildinfo/www/buildinfo.js @@ -0,0 +1,165 @@ +cordova.define("cordova-plugin-buildinfo.BuildInfo", function(require, exports, module) { +/* +The MIT License (MIT) + +Copyright (c) 2016 Mikihiro Hayashi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +var exec = require('cordova/exec'); +var channel = require('cordova/channel'); + +module.exports = { + baseUrl: null, + packageName: '', + basePackageName: '', + displayName: '', + name: '', + version: '', + versionCode: 0, + debug: false, + buildDate: null, + installDate: null, + buildType: '', + flavor: '' +}; + +function _buldinfoCheckCordovaPlatform() { + var allowPlatforms = ['android', 'ios', 'windows', 'osx', 'browser', 'electron']; + var platformId = (cordova && cordova.platformId) ? cordova.platformId : null; + return (-1 !== allowPlatforms.indexOf(platformId)); +} + +function _findBaseUrl() { + var path = null; + var scripts = document.getElementsByTagName('script'); + var findScriptPath = '/cordova.js'; + var findScriptPathLen = findScriptPath.length; + + for (var i = scripts.length - 1; i >= 0; i--) { + var src = scripts[i].src.replace(/\?.*$/, ''); + + if (src.length >= findScriptPathLen && src.substring(src.length - findScriptPathLen) == findScriptPath) { + path = src.substring(0, src.length - findScriptPathLen) + '/'; + break; + } + } + + return path; +} + + +if (_buldinfoCheckCordovaPlatform()) { + + channel.onCordovaReady.subscribe(function () { + // Platform Check + var allowPlatforms = ['android', 'ios', 'windows', 'osx', 'browser', 'electron']; + var platformId = (cordova && cordova.platformId) ? cordova.platformId : null; + if (-1 == allowPlatforms.indexOf(platformId)) { + console.debug('BuildInfo init skip.'); + return; + } + + var args = []; + + // Android Only + // defined buildInfoBuildConfigClassName variable + // BuildConfig class name. + // ex: + if ('undefined' !== typeof buildInfoBuildConfigClassName) { + args.push(buildInfoBuildConfigClassName); + } + + exec( + function (res) { + if (!res) { + return; + } + + module.exports.baseUrl = _findBaseUrl(); + + if ('undefined' !== typeof res.packageName) { + module.exports.packageName = res.packageName; + } + + if ('undefined' !== typeof res.basePackageName) { + module.exports.basePackageName = res.basePackageName; + } + + if ('undefined' !== typeof res.displayName) { + module.exports.displayName = res.displayName; + } + + if ('undefined' !== typeof res.name) { + module.exports.name = res.name; + } + + if ('undefined' !== typeof res.version) { + module.exports.version = res.version; + } + + if ('undefined' !== typeof res.versionCode) { + module.exports.versionCode = res.versionCode; + } + + if ('undefined' !== typeof res.debug) { + module.exports.debug = res.debug; + } + + if ('undefined' !== typeof res.buildType) { + module.exports.buildType = res.buildType; + } + + if ('undefined' !== typeof res.flavor) { + module.exports.flavor = res.flavor; + } + + if ('undefined' !== typeof res.buildDate) { + if (res.buildDate instanceof Date) { + module.exports.buildDate = res.buildDate; + } else { + module.exports.buildDate = new Date(res.buildDate); + } + } + + if ('undefined' !== typeof res.installDate) { + if (res.installDate instanceof Date) { + module.exports.installDate = res.installDate; + } else { + module.exports.installDate = new Date(res.installDate); + } + } + + if ('undefined' !== typeof res.windows) { + module.exports.windows = res.windows; + } + }, + function (msg) { + console.error('BuildInfo init fail'); + console.error(msg); + }, + 'BuildInfo', + 'init', + args + ); + }); +} + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js new file mode 100644 index 0000000..72fee9e --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-customurlscheme/www/ios/LaunchMyApp.js @@ -0,0 +1,12 @@ +cordova.define("cordova-plugin-customurlscheme.LaunchMyApp", function(require, exports, module) { +"use strict"; + +/* + Q: Why an empty file? + A: iOS doesn't need plumbing to get the plugin to work, so.. + - Including no file would mean the import in index.html would differ per platform. + - Also, using one version and adding a userAgent check for Android feels wrong. + - And if you're not using PhoneGap Build, you could paste your handleOpenUrl JS function here. +*/ + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-facebook-connect/www/facebook-native.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-facebook-connect/www/facebook-native.js new file mode 100644 index 0000000..b91426a --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-facebook-connect/www/facebook-native.js @@ -0,0 +1,151 @@ +cordova.define("cordova-plugin-facebook-connect.FacebookConnectPlugin", function(require, exports, module) { +var exec = require('cordova/exec') + +exports.getApplicationId = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'getApplicationId', []) +} + +exports.setApplicationId = function (appId, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setApplicationId', [appId]) +} + +exports.getApplicationName = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'getApplicationName', []) +} + +exports.setApplicationName = function (appName, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setApplicationName', [appName]) +} + +exports.getLoginStatus = function (force, s, f) { + if (typeof force === 'function') { + s = force; + f = s; + force = false; + } + exec(s, f, 'FacebookConnectPlugin', 'getLoginStatus', [force]) +} + +exports.showDialog = function (options, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'showDialog', [options]) +} + +exports.login = function (permissions, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'login', permissions) +} + +exports.loginWithLimitedTracking = function (permissions, nonce, s, f) { + if (!nonce) { + exec(s, f, 'FacebookConnectPlugin', 'loginWithLimitedTracking', [permissions]) + } else { + exec(s, f, 'FacebookConnectPlugin', 'loginWithLimitedTracking', [permissions, nonce]) + } +} + +exports.checkHasCorrectPermissions = function (permissions, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'checkHasCorrectPermissions', permissions) +} + +exports.isDataAccessExpired = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'isDataAccessExpired', []) +} + +exports.reauthorizeDataAccess = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'reauthorizeDataAccess', []) +} + +exports.setAutoLogAppEventsEnabled = function (enabled, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setAutoLogAppEventsEnabled', [enabled]); +} + +exports.setAdvertiserIDCollectionEnabled = function (enabled, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setAdvertiserIDCollectionEnabled', [enabled]); +} + +exports.setAdvertiserTrackingEnabled = function (enabled, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setAdvertiserTrackingEnabled', [enabled]); +} + +exports.setDataProcessingOptions = function (options, country, state, s, f) { + if (!(country >= 0 && state >= 0)) { + exec(s, f, 'FacebookConnectPlugin', 'setDataProcessingOptions', [options]); + } else { + exec(s, f, 'FacebookConnectPlugin', 'setDataProcessingOptions', [options, country, state]); + } +} + +exports.setUserData = function (userData, s, f) { + exec(s, f, 'FacebookConnectPlugin', 'setUserData', [userData]) +} + +exports.clearUserData = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'clearUserData', []) +} + +exports.logEvent = function (name, params, valueToSum, s, f) { + // Prevent NSNulls getting into iOS, messes up our [command.argument count] + if (!params && !valueToSum) { + exec(s, f, 'FacebookConnectPlugin', 'logEvent', [name]) + } else if (params && !valueToSum) { + exec(s, f, 'FacebookConnectPlugin', 'logEvent', [name, params]) + } else if (params && valueToSum) { + exec(s, f, 'FacebookConnectPlugin', 'logEvent', [name, params, valueToSum]) + } else { + f('Invalid arguments') + } +} + +exports.logPurchase = function (value, currency, params, s, f) { + if (typeof params === 'function') { + s = params; + f = s; + params = undefined; + } + if (!params) { + exec(s, f, 'FacebookConnectPlugin', 'logPurchase', [value, currency]) + } else { + exec(s, f, 'FacebookConnectPlugin', 'logPurchase', [value, currency, params]) + } +} + +exports.getAccessToken = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'getAccessToken', []) +} + +exports.logout = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'logout', []) +} + +exports.getCurrentProfile = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'getCurrentProfile', []) +} + +exports.api = function (graphPath, permissions, httpMethod, s, f) { + permissions = permissions || [] + if (typeof httpMethod === 'function') { + s = httpMethod; + f = s; + httpMethod = undefined; + } + if (httpMethod) { + httpMethod = httpMethod.toUpperCase(); + if (httpMethod != 'POST' && httpMethod != 'DELETE') { + httpMethod = undefined; + } + } + if (!httpMethod) { + exec(s, f, 'FacebookConnectPlugin', 'graphApi', [graphPath, permissions]) + } else { + exec(s, f, 'FacebookConnectPlugin', 'graphApi', [graphPath, permissions, httpMethod]) + } +} + +exports.getDeferredApplink = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'getDeferredApplink', []) +} + +exports.activateApp = function (s, f) { + exec(s, f, 'FacebookConnectPlugin', 'activateApp', []) +} + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js new file mode 100644 index 0000000..2e1b645 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-inappbrowser/www/inappbrowser.js @@ -0,0 +1,122 @@ +cordova.define("cordova-plugin-inappbrowser.inappbrowser", function(require, exports, module) { +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +(function () { + var exec = require('cordova/exec'); + var channel = require('cordova/channel'); + var modulemapper = require('cordova/modulemapper'); + var urlutil = require('cordova/urlutil'); + + function InAppBrowser () { + this.channels = { + beforeload: channel.create('beforeload'), + loadstart: channel.create('loadstart'), + loadstop: channel.create('loadstop'), + loaderror: channel.create('loaderror'), + exit: channel.create('exit'), + customscheme: channel.create('customscheme'), + message: channel.create('message') + }; + } + + InAppBrowser.prototype = { + _eventHandler: function (event) { + if (event && event.type in this.channels) { + if (event.type === 'beforeload') { + this.channels[event.type].fire(event, this._loadAfterBeforeload); + } else { + this.channels[event.type].fire(event); + } + } + }, + _loadAfterBeforeload: function (strUrl) { + strUrl = urlutil.makeAbsolute(strUrl); + exec(null, null, 'InAppBrowser', 'loadAfterBeforeload', [strUrl]); + }, + close: function (eventname) { + exec(null, null, 'InAppBrowser', 'close', []); + }, + show: function (eventname) { + exec(null, null, 'InAppBrowser', 'show', []); + }, + hide: function (eventname) { + exec(null, null, 'InAppBrowser', 'hide', []); + }, + addEventListener: function (eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].subscribe(f); + } + }, + removeEventListener: function (eventname, f) { + if (eventname in this.channels) { + this.channels[eventname].unsubscribe(f); + } + }, + + executeScript: function (injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, 'InAppBrowser', 'injectScriptCode', [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, 'InAppBrowser', 'injectScriptFile', [injectDetails.file, !!cb]); + } else { + throw new Error('executeScript requires exactly one of code or file to be specified'); + } + }, + + insertCSS: function (injectDetails, cb) { + if (injectDetails.code) { + exec(cb, null, 'InAppBrowser', 'injectStyleCode', [injectDetails.code, !!cb]); + } else if (injectDetails.file) { + exec(cb, null, 'InAppBrowser', 'injectStyleFile', [injectDetails.file, !!cb]); + } else { + throw new Error('insertCSS requires exactly one of code or file to be specified'); + } + } + }; + + module.exports = function (strUrl, strWindowName, strWindowFeatures, callbacks) { + // Don't catch calls that write to existing frames (e.g. named iframes). + if (window.frames && window.frames[strWindowName]) { + var origOpenFunc = modulemapper.getOriginalSymbol(window, 'open'); + return origOpenFunc.apply(window, arguments); + } + + strUrl = urlutil.makeAbsolute(strUrl); + var iab = new InAppBrowser(); + + callbacks = callbacks || {}; + for (var callbackName in callbacks) { + iab.addEventListener(callbackName, callbacks[callbackName]); + } + + var cb = function (eventname) { + iab._eventHandler(eventname); + }; + + strWindowFeatures = strWindowFeatures || ''; + + exec(cb, cb, 'InAppBrowser', 'open', [strUrl, strWindowName, strWindowFeatures]); + return iab; + }; +})(); + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-purchase/www/store.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-purchase/www/store.js new file mode 100644 index 0000000..2b350f5 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-purchase/www/store.js @@ -0,0 +1,6382 @@ +cordova.define("cordova-plugin-purchase.CdvPurchase", function(require, exports, module) { +"use strict"; +var CdvPurchase; +(function (CdvPurchase) { + const ERROR_CODES_BASE = 6777000; + /** + * Error codes + */ + let ErrorCode; + (function (ErrorCode) { + /** Error: Failed to intialize the in-app purchase library */ + ErrorCode[ErrorCode["SETUP"] = ERROR_CODES_BASE + 1] = "SETUP"; + /** Error: Failed to load in-app products metadata */ + ErrorCode[ErrorCode["LOAD"] = ERROR_CODES_BASE + 2] = "LOAD"; + /** Error: Failed to make a purchase */ + ErrorCode[ErrorCode["PURCHASE"] = ERROR_CODES_BASE + 3] = "PURCHASE"; + /** Error: Failed to load the purchase receipt */ + ErrorCode[ErrorCode["LOAD_RECEIPTS"] = ERROR_CODES_BASE + 4] = "LOAD_RECEIPTS"; + /** Error: Client is not allowed to issue the request */ + ErrorCode[ErrorCode["CLIENT_INVALID"] = ERROR_CODES_BASE + 5] = "CLIENT_INVALID"; + /** Error: Purchase flow has been cancelled by user */ + ErrorCode[ErrorCode["PAYMENT_CANCELLED"] = ERROR_CODES_BASE + 6] = "PAYMENT_CANCELLED"; + /** Error: Something is suspicious about a purchase */ + ErrorCode[ErrorCode["PAYMENT_INVALID"] = ERROR_CODES_BASE + 7] = "PAYMENT_INVALID"; + /** Error: The user is not allowed to make a payment */ + ErrorCode[ErrorCode["PAYMENT_NOT_ALLOWED"] = ERROR_CODES_BASE + 8] = "PAYMENT_NOT_ALLOWED"; + /** Error: Unknown error */ + ErrorCode[ErrorCode["UNKNOWN"] = ERROR_CODES_BASE + 10] = "UNKNOWN"; + /** Error: Failed to refresh the purchase receipt */ + ErrorCode[ErrorCode["REFRESH_RECEIPTS"] = ERROR_CODES_BASE + 11] = "REFRESH_RECEIPTS"; + /** Error: The product identifier is invalid */ + ErrorCode[ErrorCode["INVALID_PRODUCT_ID"] = ERROR_CODES_BASE + 12] = "INVALID_PRODUCT_ID"; + /** Error: Cannot finalize a transaction or acknowledge a purchase */ + ErrorCode[ErrorCode["FINISH"] = ERROR_CODES_BASE + 13] = "FINISH"; + /** Error: Failed to communicate with the server */ + ErrorCode[ErrorCode["COMMUNICATION"] = ERROR_CODES_BASE + 14] = "COMMUNICATION"; + /** Error: Subscriptions are not available */ + ErrorCode[ErrorCode["SUBSCRIPTIONS_NOT_AVAILABLE"] = ERROR_CODES_BASE + 15] = "SUBSCRIPTIONS_NOT_AVAILABLE"; + /** Error: Purchase information is missing token */ + ErrorCode[ErrorCode["MISSING_TOKEN"] = ERROR_CODES_BASE + 16] = "MISSING_TOKEN"; + /** Error: Verification of store data failed */ + ErrorCode[ErrorCode["VERIFICATION_FAILED"] = ERROR_CODES_BASE + 17] = "VERIFICATION_FAILED"; + /** Error: Bad response from the server */ + ErrorCode[ErrorCode["BAD_RESPONSE"] = ERROR_CODES_BASE + 18] = "BAD_RESPONSE"; + /** Error: Failed to refresh the store */ + ErrorCode[ErrorCode["REFRESH"] = ERROR_CODES_BASE + 19] = "REFRESH"; + /** Error: Payment has expired */ + ErrorCode[ErrorCode["PAYMENT_EXPIRED"] = ERROR_CODES_BASE + 20] = "PAYMENT_EXPIRED"; + /** Error: Failed to download the content */ + ErrorCode[ErrorCode["DOWNLOAD"] = ERROR_CODES_BASE + 21] = "DOWNLOAD"; + /** Error: Failed to update a subscription */ + ErrorCode[ErrorCode["SUBSCRIPTION_UPDATE_NOT_AVAILABLE"] = ERROR_CODES_BASE + 22] = "SUBSCRIPTION_UPDATE_NOT_AVAILABLE"; + /** Error: The requested product is not available in the store. */ + ErrorCode[ErrorCode["PRODUCT_NOT_AVAILABLE"] = ERROR_CODES_BASE + 23] = "PRODUCT_NOT_AVAILABLE"; + /** Error: The user has not allowed access to Cloud service information */ + ErrorCode[ErrorCode["CLOUD_SERVICE_PERMISSION_DENIED"] = ERROR_CODES_BASE + 24] = "CLOUD_SERVICE_PERMISSION_DENIED"; + /** Error: The device could not connect to the network. */ + ErrorCode[ErrorCode["CLOUD_SERVICE_NETWORK_CONNECTION_FAILED"] = ERROR_CODES_BASE + 25] = "CLOUD_SERVICE_NETWORK_CONNECTION_FAILED"; + /** Error: The user has revoked permission to use this cloud service. */ + ErrorCode[ErrorCode["CLOUD_SERVICE_REVOKED"] = ERROR_CODES_BASE + 26] = "CLOUD_SERVICE_REVOKED"; + /** Error: The user has not yet acknowledged Apple’s privacy policy */ + ErrorCode[ErrorCode["PRIVACY_ACKNOWLEDGEMENT_REQUIRED"] = ERROR_CODES_BASE + 27] = "PRIVACY_ACKNOWLEDGEMENT_REQUIRED"; + /** Error: The app is attempting to use a property for which it does not have the required entitlement. */ + ErrorCode[ErrorCode["UNAUTHORIZED_REQUEST_DATA"] = ERROR_CODES_BASE + 28] = "UNAUTHORIZED_REQUEST_DATA"; + /** Error: The offer identifier is invalid. */ + ErrorCode[ErrorCode["INVALID_OFFER_IDENTIFIER"] = ERROR_CODES_BASE + 29] = "INVALID_OFFER_IDENTIFIER"; + /** Error: The price you specified in App Store Connect is no longer valid. */ + ErrorCode[ErrorCode["INVALID_OFFER_PRICE"] = ERROR_CODES_BASE + 30] = "INVALID_OFFER_PRICE"; + /** Error: The signature in a payment discount is not valid. */ + ErrorCode[ErrorCode["INVALID_SIGNATURE"] = ERROR_CODES_BASE + 31] = "INVALID_SIGNATURE"; + /** Error: Parameters are missing in a payment discount. */ + ErrorCode[ErrorCode["MISSING_OFFER_PARAMS"] = ERROR_CODES_BASE + 32] = "MISSING_OFFER_PARAMS"; + })(ErrorCode = CdvPurchase.ErrorCode || (CdvPurchase.ErrorCode = {})); + /** + * Create an {@link IError} instance + * + * @internal + */ + function storeError(code, message) { + return { isError: true, code, message }; + } + CdvPurchase.storeError = storeError; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Integrate with https://www.iaptic.com/ + * + * @example + * const iaptic = new CdvPurchase.Iaptic({ + * url: 'https://validator.iaptic.com', + * appName: 'test', + * apiKey: 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx', + * }); + * store.validator = iaptic.validator; + */ + class Iaptic { + constructor(config, store) { + this.config = config; + if (!config.url) { + config.url = 'https://validator.iaptic.com'; + } + this.store = store !== null && store !== void 0 ? store : CdvPurchase.store; + this.log = this.store.log.child('Iaptic'); + } + /** + * Provides a client token generated on iaptic's servers + * + * Can be passed to the Braintree Adapter at initialization. + * + * @example + * store.initialize([ + * { + * platform: Platform.BRAINTREE, + * options: { + * clientTokenProvider: iaptic.braintreeClientTokenProvider + * } + * } + * ]); + */ + get braintreeClientTokenProvider() { + return callback => { + this.log.info('Calling Braintree clientTokenProvider'); + CdvPurchase.Utils.ajax(this.log, { + url: `${this.config.url}/v3/braintree/client-token?appName=${this.config.appName}&apiKey=${this.config.apiKey}`, + method: 'POST', + data: { + applicationUsername: CdvPurchase.store.getApplicationUsername(), + customerId: CdvPurchase.Braintree.customerId, + }, + success: body => { + this.log.info('clientTokenProvider success: ' + JSON.stringify(body)); + callback(body.clientToken); + }, + error: err => { + this.log.info('clientTokenProvider error: ' + JSON.stringify(err)); + callback(CdvPurchase.storeError(err, 'ERROR ' + err)); + }, + }); + }; + } + /** + * Determine the eligibility of discounts based on the content of the application receipt. + * + * The secret sauce used here is to wait for validation of the application receipt. + * The receipt validator will return the necessary data to determine eligibility. + * + * Receipt validation is expected to happen after loading product information, so the implementation here is to + * wait for a validation response. + */ + get appStoreDiscountEligibilityDeterminer() { + // the user needs the appStoreDiscountEligibilityDeterminer, let's start listening to receipt validation events. + let latestReceipt; + this.log.debug("AppStore eligibility determiner is listening..."); + this.store.when().verified(receipt => { + if (receipt.platform === CdvPurchase.Platform.APPLE_APPSTORE) { + this.log.debug("Got a verified AppStore receipt."); + latestReceipt = receipt; + } + }); + return (_appStoreReceipt, requests, callback) => { + this.log.debug("AppStore eligibility determiner"); + if (latestReceipt) { + this.log.debug("Using cached receipt"); + return callback(analyzeReceipt(latestReceipt, requests)); + } + const onVerified = (receipt) => { + if (receipt.platform === CdvPurchase.Platform.APPLE_APPSTORE) { + this.log.debug("Receipt is verified, let's analyze the content and respond."); + this.store.off(onVerified); + callback(analyzeReceipt(receipt, requests)); + } + }; + this.log.debug("Waiting for receipt"); + this.store.when().verified(onVerified); + }; + function analyzeReceipt(receipt, requests) { + const ineligibleIntro = receipt.raw.ineligible_for_intro_price; + return requests.map(request => { + var _a; + if (request.discountType === 'Introductory' && ineligibleIntro && ineligibleIntro.find(id => request.productId === id)) { + // User is not eligible for this introductory offer + return false; + } + else if (request.discountType === 'Subscription') { + // Discount only available if user is or was a subscriber + const matchingPurchase = (_a = receipt.raw.collection) === null || _a === void 0 ? void 0 : _a.find(purchase => purchase.id === request.productId); + return matchingPurchase ? true : false; + } + else { + // In other cases, assume the user is eligible + return true; + } + }); + } + } + /** Validator URL */ + get validator() { + return `${this.config.url}/v1/validate?appName=${this.config.appName}&apiKey=${this.config.apiKey}`; + } + } + CdvPurchase.Iaptic = Iaptic; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Desired logging level for the {@link Logger} + * + * @see {@link Store.verbosity} + */ + let LogLevel; + (function (LogLevel) { + /** Disable all logging (default) */ + LogLevel[LogLevel["QUIET"] = 0] = "QUIET"; + /** Show only error messages */ + LogLevel[LogLevel["ERROR"] = 1] = "ERROR"; + /** Show warnings and errors */ + LogLevel[LogLevel["WARNING"] = 2] = "WARNING"; + /** Also show information messages */ + LogLevel[LogLevel["INFO"] = 3] = "INFO"; + /** Enable internal debugging messages. */ + LogLevel[LogLevel["DEBUG"] = 4] = "DEBUG"; + })(LogLevel = CdvPurchase.LogLevel || (CdvPurchase.LogLevel = {})); + ; + class Logger { + /** @internal */ + constructor(store, prefix = '') { + /** All log lines are prefixed with this string */ + this.prefix = ''; + this.store = store; + this.prefix = prefix || 'CdvPurchase'; + } + /** + * Create a child logger, whose prefix will be this one's + the given string. + * + * @example + * const log = store.log.child('AppStore') + */ + child(prefix) { + return new Logger(this.store, this.prefix + '.' + prefix); + } + /** + * Logs an error message, only if `store.verbosity` >= store.ERROR + */ + error(o) { + log(this.store.verbosity, LogLevel.ERROR, this.prefix, o); + // show the stack trace + try { + throw new Error(toString(o)); + } + catch (e) { + log(this.store.verbosity, LogLevel.ERROR, this.prefix, e.stack); + } + } + /** + * Logs a warning message, only if `store.verbosity` >= store.WARNING + */ + warn(o) { log(this.store.verbosity, LogLevel.WARNING, this.prefix, o); } + /** + * Logs an info message, only if `store.verbosity` >= store.INFO + */ + info(o) { log(this.store.verbosity, LogLevel.INFO, this.prefix, o); } + /** + * Logs a debug message, only if `store.verbosity` >= store.DEBUG + */ + debug(o) { log(this.store.verbosity, LogLevel.DEBUG, this.prefix, o); } + /** + * Add warning logs on a console describing an exceptions. + * + * This method is mostly used when executing user registered callbacks. + * + * @param context - a string describing why the method was called + * @param error - a javascript Error object thrown by a exception + */ + logCallbackException(context, err) { + this.warn("A callback in \'" + context + "\' failed with an exception."); + if (typeof err === 'string') + this.warn(" " + err); + else if (err) { + const errAny = err; + if (errAny.fileName) + this.warn(" " + errAny.fileName + ":" + errAny.lineNumber); + if (err.message) + this.warn(" " + err.message); + if (err.stack) + this.warn(" " + err.stack); + } + } + } + /** + * Console object used to display log lines. + * + * It can be replaced by your implementation if you want to, for example, send logs to a remote server. + * + * @example + * Logger.console = { + * log: (message) => { remoteLog('LOG', message); } + * warn: (message) => { remoteLog('WARN', message); } + * error: (message) => { remoteLog('ERROR', message); } + * } + */ + Logger.console = window.console; + CdvPurchase.Logger = Logger; + const LOG_LEVEL_STRING = ["QUIET", "ERROR", "WARNING", "INFO", "DEBUG"]; + function toString(o) { + if (typeof o !== 'string') + o = JSON.stringify(o); + return o; + } + function log(verbosity, level, prefix, o) { + var maxLevel = verbosity === true ? 1 : verbosity; + if (level > maxLevel) + return; + if (typeof o !== 'string') + o = JSON.stringify(o); + const fullPrefix = prefix ? `[${prefix}] ` : ''; + const logStr = (level === LogLevel.ERROR) ? ((str) => Logger.console.error(str)) + : (level === LogLevel.WARNING) ? ((str) => Logger.console.warn(str)) + : ((str) => Logger.console.log(str)); + if (LOG_LEVEL_STRING[level]) + logStr(`${fullPrefix}${LOG_LEVEL_STRING[level]}: ${o}`); + else + logStr(`${fullPrefix}${o}`); + } +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + Utils.nonEnumerable = (target, name, desc) => { + if (desc) { + desc.enumerable = false; + return desc; + } + Object.defineProperty(target, name, { + set(value) { + Object.defineProperty(this, name, { + value, writable: true, configurable: true, + }); + }, + configurable: true, + }); + }; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** Product definition from a store */ + class Product { + /** @internal */ + constructor(p, decorator) { + /** @internal */ + this.className = 'Product'; + /** Product title from the store. */ + this.title = ''; + /** Product full description from the store. */ + this.description = ''; + this.platform = p.platform; + this.type = p.type; + this.id = p.id; + this.group = p.group; + this.offers = []; + Object.defineProperty(this, 'pricing', { enumerable: false, get: () => { var _a; return (_a = this.offers[0]) === null || _a === void 0 ? void 0 : _a.pricingPhases[0]; } }); + Object.defineProperty(this, 'canPurchase', { enumerable: false, get: () => decorator.canPurchase(this) }); + Object.defineProperty(this, 'owned', { enumerable: false, get: () => decorator.owned(this) }); + } + /** + * Shortcut to offers[0].pricingPhases[0] + * + * Useful when you know products have a single offer and a single pricing phase. + */ + get pricing() { + var _a; + // see Object.defineProperty in the constructor for the actual implementation. + return (_a = this.offers[0]) === null || _a === void 0 ? void 0 : _a.pricingPhases[0]; + } + /** + * Returns true if the product can be purchased. + */ + get canPurchase() { + // Pseudo implementation to make typescript happy. + // see Object.defineProperty in the constructor for the actual implementation. + return false; + } + /** + * Returns true if the product is owned. + */ + get owned() { + // Pseudo implementation to make typescript happy. + // see Object.defineProperty in the constructor for the actual implementation. + return false; + } + /** + * Find and return an offer for this product from its id + * + * If id isn't specified, returns the first offer. + * + * @param id - Identifier of the offer to return + * @return An Offer or undefined if no match is found + */ + getOffer(id = '') { + if (!id) + return this.offers[0]; + return this.offers.find(o => o.id === id); + } + /** + * Add an offer to this product. + * + * @internal + */ + addOffer(offer) { + if (this.getOffer(offer.id)) + return this; + this.offers.push(offer); + return this; + } + } + CdvPurchase.Product = Product; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * @internal + */ + let Internal; + (function (Internal) { + /** Queue of receipts to validate */ + class ReceiptsToValidate { + constructor() { + this.array = []; + } + get length() { + return this.array.length; + } + get() { + return this.array.concat(); + } + add(receipt) { + if (!this.has(receipt)) + this.array.push(receipt); + } + clear() { + while (this.array.length !== 0) + this.array.pop(); + } + has(receipt) { + return !!this.array.find(el => el === receipt); + } + } + Internal.ReceiptsToValidate = ReceiptsToValidate; + /** Handles communication with the remote receipt validation service */ + class Validator { + constructor(controller, log) { + /** List of receipts waiting for validation */ + this.receiptsToValidate = new ReceiptsToValidate(); + /** List of verified receipts */ + this.verifiedReceipts = []; + this.numRequests = 0; + this.numResponses = 0; + /** + * For each md5-hashed values of the validator request's ".transaction" field, + * store the response from the server. + * + * This way, if a subsequent request is necessary (without a couple of minutes) + * we just reuse the same data. + */ + this.cache = {}; + this.controller = controller; + this.log = log.child('Validator'); + } + incrRequestsCounter() { + this.numRequests = (this.numRequests + 1) | 0; + this.log.debug(`Validation requests=${this.numRequests} responses=${this.numResponses}`); + } + incrResponsesCounter() { + this.numResponses = (this.numResponses + 1) | 0; + this.log.debug(`Validation requests=${this.numRequests} responses=${this.numResponses}`); + } + /** Add/update a verified receipt from the server response */ + addVerifiedReceipt(receipt, data) { + for (const vr of this.verifiedReceipts) { + if (vr.platform === receipt.platform && vr.id === data.id) { + // update existing receipt + this.log.debug("Updating existing receipt."); + vr.set(receipt, data); + return vr; + } + } + this.log.debug("Register a new verified receipt."); + const newVR = new CdvPurchase.VerifiedReceipt(receipt, data, this.controller); + this.verifiedReceipts.push(newVR); + return newVR; + } + /** Add a receipt to the validation queue. It'll get validated after a few milliseconds. */ + add(receiptOrTransaction) { + this.log.debug("Schedule validation: " + JSON.stringify(receiptOrTransaction)); + const receipt = (receiptOrTransaction instanceof CdvPurchase.Transaction) ? receiptOrTransaction.parentReceipt : receiptOrTransaction; + if (!this.receiptsToValidate.has(receipt)) { + this.incrRequestsCounter(); + this.receiptsToValidate.add(receipt); + } + } + /** Run validation for all receipts in the queue */ + run() { + // pseudo implementation + const receipts = this.receiptsToValidate.get(); + this.receiptsToValidate.clear(); + const onResponse = async (r) => { + const { receipt, payload } = r; + this.incrResponsesCounter(); + try { + const adapter = this.controller.adapters.find(receipt.platform); + await (adapter === null || adapter === void 0 ? void 0 : adapter.handleReceiptValidationResponse(receipt, payload)); + if (payload.ok) { + const vr = this.addVerifiedReceipt(receipt, payload.data); + this.controller.verifiedCallbacks.trigger(vr); + // this.verifiedCallbacks.trigger(data.receipt); + } + else { + this.controller.unverifiedCallbacks.trigger({ receipt, payload }); + } + } + catch (err) { + this.log.error('Exception probably caused by an invalid response from the validator.' + err.message); + this.controller.unverifiedCallbacks.trigger({ receipt, payload: { + ok: false, + code: CdvPurchase.ErrorCode.VERIFICATION_FAILED, + message: err.message, + } }); + } + }; + receipts.forEach(receipt => this.runOnReceipt(receipt, onResponse)); + } + async runOnReceipt(receipt, callback) { + if (receipt.platform === CdvPurchase.Platform.TEST) { + this.log.debug('Using Test Adapter mock verify function.'); + return CdvPurchase.Test.Adapter.verify(receipt, callback); + } + if (!this.controller.validator) { + this.incrResponsesCounter(); + return; + } + const body = await this.buildRequestBody(receipt); + if (!body) { + this.incrResponsesCounter(); + return; + } + if (typeof this.controller.validator === 'function') + return this.runValidatorFunction(this.controller.validator, receipt, body, callback); + const target = typeof this.controller.validator === 'string' + ? { + url: this.controller.validator, + timeout: 20000, // validation request will timeout after 20 seconds by default + } + : this.controller.validator; + return this.runValidatorRequest(target, receipt, body, callback); + } + runValidatorFunction(validator, receipt, body, callback) { + try { + validator(body, (payload) => callback({ receipt, payload })); + } + catch (error) { + this.log.warn("user provided validator function failed with error: " + (error === null || error === void 0 ? void 0 : error.stack)); + } + } + async buildRequestBody(receipt) { + var _a, _b, _c; + // Let the adapter generate the initial content + const adapter = this.controller.adapters.find(receipt.platform); + const body = await (adapter === null || adapter === void 0 ? void 0 : adapter.receiptValidationBody(receipt)); + if (!body) + return; + // Add the applicationUsername + body.additionalData = Object.assign(Object.assign({}, (_a = body.additionalData) !== null && _a !== void 0 ? _a : {}), { applicationUsername: this.controller.getApplicationUsername() }); + if (!body.additionalData.applicationUsername) + delete body.additionalData.applicationUsername; + // Add device information + body.device = Object.assign(Object.assign({}, (_b = body.device) !== null && _b !== void 0 ? _b : {}), CdvPurchase.Validator.Internal.getDeviceInfo(this.controller)); + // Add legacy pricing information + if (((_c = body.offers) === null || _c === void 0 ? void 0 : _c.length) === 1) { + const offer = body.offers[0]; + if (offer.pricingPhases.length === 1) { + const pricing = offer.pricingPhases[0]; + body.currency = pricing.currency; + body.priceMicros = pricing.priceMicros; + } + else if (offer.pricingPhases.length === 2) { + const pricing = offer.pricingPhases[1]; + body.currency = pricing.currency; + body.priceMicros = pricing.priceMicros; + const intro = offer.pricingPhases[0]; + body.introPriceMicros = intro.priceMicros; + } + } + return body; + } + removeExpiredCache() { + const now = +new Date(); + const deleteList = []; + for (const hash in this.cache) { + if (this.cache[hash].expires < now) { + deleteList.push(hash); + } + } + for (const hash of deleteList) { + delete this.cache[hash]; + } + } + runValidatorRequest(target, receipt, body, callback) { + this.removeExpiredCache(); + const bodyTransactionHash = CdvPurchase.Utils.md5(JSON.stringify(body.transaction)); + const cached = this.cache[bodyTransactionHash]; + if (cached) { + return callback({ receipt, payload: cached.payload }); + } + CdvPurchase.Utils.ajax(this.log.child("Ajax"), { + url: target.url, + method: 'POST', + customHeaders: target.headers, + timeout: target.timeout, + data: body, + success: (response) => { + var _a; + this.log.debug("validator success, response: " + JSON.stringify(response)); + if (!isValidatorResponsePayload(response)) + return callback({ + receipt, + payload: { + ok: false, + code: CdvPurchase.ErrorCode.BAD_RESPONSE, + message: 'Validator responded with invalid data', + data: { latest_receipt: (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.latest_receipt }, + } + }); + this.cache[bodyTransactionHash] = { + payload: response, + expires: (+new Date()) + 120000, // expires in 2 minutes + }; + callback({ receipt, payload: response }); + }, + error: (status, message, data) => { + var fullMessage = "Error " + status + ": " + message; + this.log.debug("validator failed, response: " + JSON.stringify(fullMessage)); + this.log.debug("body => " + JSON.stringify(data)); + callback({ + receipt, + payload: { + ok: false, + message: fullMessage, + code: CdvPurchase.ErrorCode.COMMUNICATION, + status: status, + data: {}, + } + }); + } + }); + } + } + Internal.Validator = Validator; + /** + * Check if a payload looks like a valid validator response. + */ + function isValidatorResponsePayload(payload) { + // TODO: could be made more robust. + return (!!payload) + && (typeof payload === 'object') + && ('ok' in payload) + && (typeof payload.ok === 'boolean'); + } + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** @internal */ + let Internal; + (function (Internal) { + /** + * The list of active platform adapters + */ + class Adapters { + constructor() { + /** + * List of instantiated adapters. + * + * They are added to this list by "initialize()". + */ + this.list = []; + } + add(log, adapters, context) { + adapters.forEach(po => { + log.info(""); + if (this.find(po.platform)) + return; + switch (po.platform) { + case CdvPurchase.Platform.APPLE_APPSTORE: + return this.list.push(new CdvPurchase.AppleAppStore.Adapter(context, po.options || {})); + case CdvPurchase.Platform.GOOGLE_PLAY: + return this.list.push(new CdvPurchase.GooglePlay.Adapter(context)); + case CdvPurchase.Platform.BRAINTREE: + if (!po.options) { + log.error('Options missing for Braintree initialization. Use {platform: Platform.BRAINTREE, options: {...}} in your call to store.initialize'); + } + return this.list.push(new CdvPurchase.Braintree.Adapter(context, po.options)); + case CdvPurchase.Platform.TEST: + default: + return this.list.push(new CdvPurchase.Test.Adapter(context)); + } + }); + } + /** + * Initialize some platform adapters. + */ + async initialize(platforms, context) { + const newPlatforms = platforms.map(p => typeof p === 'string' ? { platform: p } : p).filter(p => !this.find(p.platform)); + const log = context.log.child('Adapters'); + log.info("Adding platforms: " + JSON.stringify(newPlatforms)); + this.add(log, newPlatforms, context); + const products = context.registeredProducts.byPlatform(); + const result = await Promise.all(newPlatforms.map(async (platformToInit) => { + var _a, _b, _c; + const platformProducts = (_c = (_b = (_a = products.filter(p => p.platform === platformToInit.platform)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.products) !== null && _c !== void 0 ? _c : []; + const adapter = this.find(platformToInit.platform); + if (!adapter) + return; + log.info(`${adapter.name} initializing...`); + if (!adapter.isSupported) { + log.info(`${adapter.name} is not supported.`); + return; // skip unsupported adapters + } + const initResult = await adapter.initialize(); + adapter.ready = true; + log.info(`${adapter.name} initialized. ${initResult ? JSON.stringify(initResult) : ''}`); + if (initResult === null || initResult === void 0 ? void 0 : initResult.code) + return initResult; + log.info(`${adapter.name} products: ${JSON.stringify(platformProducts)}`); + if (platformProducts.length === 0) + return; + const loadProductsResult = await adapter.loadProducts(platformProducts); + log.info(`${adapter.name} products loaded: ${JSON.stringify(loadProductsResult)}`); + const loadedProducts = loadProductsResult.filter(p => p instanceof CdvPurchase.Product); + context.listener.productsUpdated(platformToInit.platform, loadedProducts); + const loadReceiptsResult = await adapter.loadReceipts(); + log.info(`${adapter.name} receipts loaded: ${JSON.stringify(loadReceiptsResult)}`); + return loadProductsResult.filter(lr => 'code' in lr && 'message' in lr)[0]; + })); + return result.filter(err => err); + } + /** + * Retrieve a platform adapter. + */ + find(platform) { + return this.list.filter(a => a.id === platform)[0]; + } + /** + * Retrieve the first platform adapter in the ready state, if any. + * + * You can optionally force the platform adapter you are looking for. + * + * Useful for methods that accept an optional "platform" argument, so they either act + * on the only active adapter or on the one selected by the user, if it's ready. + */ + findReady(platform) { + return this.list.filter(adapter => (!platform || adapter.id === platform) && adapter.ready)[0]; + } + } + Internal.Adapters = Adapters; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** + * Manage a list of callbacks + */ + class Callbacks { + /** + * @param className - Type of callbacks (used to help with debugging) + * @param finalStateMode - If true, newly registered callbacks will be called immediately when the event was already triggered. + */ + constructor(logger, className, finalStateMode = false) { + /** List of registered callbacks */ + this.callbacks = []; + /** Number of times those callbacks have been triggered */ + this.numTriggers = 0; + this.logger = logger; + this.className = className; + this.finalStateMode = finalStateMode; + } + /** Add a callback to the list */ + push(callback) { + if (this.finalStateMode && this.numTriggers > 0) { + callback(this.lastTriggerArgument); + } + else { + this.callbacks.push(callback); + } + } + /** Call all registered callbacks with the given value */ + trigger(value) { + this.lastTriggerArgument = value; + this.numTriggers++; + const callbacks = this.callbacks; + if (this.finalStateMode) { + // in final state mode, callbacks are only triggered once + this.callbacks = []; + } + callbacks.forEach(callback => { + CdvPurchase.Utils.safeCall(this.logger, this.className, callback, value); + }); + } + /** Remove a callback from the list */ + remove(callback) { + this.callbacks = this.callbacks.filter(el => el !== callback); + } + } + Internal.Callbacks = Callbacks; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** @internal */ + let Internal; + (function (Internal) { + /** + * Ready callbacks + */ + class ReadyCallbacks { + constructor(logger) { + /** True when the plugin is ready */ + this.isReady = false; + /** Callbacks when the store is ready */ + this.readyCallbacks = []; + this.logger = logger; + } + /** Register a callback to be called when the plugin is ready. */ + add(cb) { + if (this.isReady) + return setTimeout(cb, 0); + this.readyCallbacks.push(cb); + } + /** Calls the ready callbacks */ + trigger() { + this.isReady = true; + this.readyCallbacks.forEach(cb => CdvPurchase.Utils.safeCall(this.logger, 'ready()', cb, undefined)); + this.readyCallbacks = []; + } + remove(cb) { + this.readyCallbacks = this.readyCallbacks.filter(el => el !== cb); + } + } + Internal.ReadyCallbacks = ReadyCallbacks; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +/// +/// +/// +/// +/// +/** + * Namespace for the cordova-plugin-purchase plugin. + * + * All classes, enumerations and variables defined by the plugin are in this namespace. + * + * Throughout the documentation, in order to keep examples readable, we omit the `CdvPurchase` prefix. + * + * When you see, for example `ProductType.PAID_SUBSCRIPTION`, it refers to `CdvPurchase.ProductType.PAID_SUBSCRIPTION`. + * + * In the files that interact with the plugin, I recommend creating those shortcuts (and more if needed): + * + * ```ts + * const {store, ProductType, Platform, LogLevel} = CdvPurchase; + * ``` + */ +var CdvPurchase; +(function (CdvPurchase) { + /** + * Current release number of the plugin. + */ + CdvPurchase.PLUGIN_VERSION = '13.6.0'; + /** + * Entry class of the plugin. + */ + class Store { + constructor() { + /** + * Payment platform adapters. + */ + this.adapters = new CdvPurchase.Internal.Adapters(); + /** + * List of registered products. + * + * Products are added to this list of products by {@link Store.register}, an internal job will defer loading to the platform adapters. + */ + this.registeredProducts = new CdvPurchase.Internal.RegisteredProducts(); + /** Logger */ + this.log = new CdvPurchase.Logger(this); + /** + * Verbosity level used by the plugin logger + * + * Set to: + * + * - LogLevel.QUIET or 0 to disable all logging (default) + * - LogLevel.ERROR or 1 to show only error messages + * - LogLevel.WARNING or 2 to show warnings and errors + * - LogLevel.INFO or 3 to also show information messages + * - LogLevel.DEBUG or 4 to enable internal debugging messages. + * + * @see {@link LogLevel} + */ + this.verbosity = CdvPurchase.LogLevel.ERROR; + /** List of callbacks for the "ready" events */ + this._readyCallbacks = new CdvPurchase.Internal.ReadyCallbacks(this.log); + /** Callbacks when a product definition was updated */ + this.updatedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'productUpdated()'); + /** Callback when a receipt was updated */ + this.updatedReceiptsCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'receiptUpdated()'); + /** Callbacks when a product is owned */ + // private ownedCallbacks = new Callbacks(); + /** Callbacks when a transaction has been approved */ + this.approvedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'approved()'); + /** Callbacks when a transaction has been finished */ + this.finishedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'finished()'); + /** Callbacks when a transaction is pending */ + this.pendingCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'pending()'); + /** Callbacks when a receipt has been validated */ + this.verifiedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'verified()'); + /** Callbacks when a receipt has been validated */ + this.unverifiedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'unverified()'); + /** Callbacks when all receipts have been loaded */ + this.receiptsReadyCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'receiptsReady()', true); + /** Callbacks when all receipts have been verified */ + this.receiptsVerifiedCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'receiptsVerified()', true); + /** Callbacks for errors */ + this.errorCallbacks = new CdvPurchase.Internal.Callbacks(this.log, 'error()'); + this.initializedHasBeenCalled = false; + /** + * Version of the plugin currently installed. + */ + this.version = CdvPurchase.PLUGIN_VERSION; + const store = this; + this.listener = new CdvPurchase.Internal.StoreAdapterListener({ + updatedCallbacks: this.updatedCallbacks, + updatedReceiptCallbacks: this.updatedReceiptsCallbacks, + approvedCallbacks: this.approvedCallbacks, + finishedCallbacks: this.finishedCallbacks, + pendingCallbacks: this.pendingCallbacks, + receiptsReadyCallbacks: this.receiptsReadyCallbacks, + }, this.log); + this.transactionStateMonitors = new CdvPurchase.Internal.TransactionStateMonitors(this.when()); + this._validator = new CdvPurchase.Internal.Validator({ + adapters: this.adapters, + getApplicationUsername: this.getApplicationUsername.bind(this), + get localReceipts() { return store.localReceipts; }, + get validator() { return store.validator; }, + get validator_privacy_policy() { return store.validator_privacy_policy; }, + verifiedCallbacks: this.verifiedCallbacks, + unverifiedCallbacks: this.unverifiedCallbacks, + finish: (receipt) => this.finish(receipt), + }, this.log); + new CdvPurchase.Internal.ReceiptsMonitor({ + hasLocalReceipts: () => this.localReceipts.length > 0, + hasValidator: () => !!this.validator, + numValidationRequests: () => this._validator.numRequests, + numValidationResponses: () => this._validator.numResponses, + off: this.off.bind(this), + when: this.when.bind(this), + receiptsVerified: () => { store.receiptsVerifiedCallbacks.trigger(); }, + log: this.log, + }).launch(); + } + /** + * Retrieve a platform adapter. + * + * The platform adapter has to have been initialized before. + * + * @see {@link initialize} + */ + getAdapter(platform) { + return this.adapters.find(platform); + } + /** + * Get the application username as a string by either calling or returning {@link Store.applicationUsername} + */ + getApplicationUsername() { + if (this.applicationUsername instanceof Function) + return this.applicationUsername(); + return this.applicationUsername; + } + /** + * Register a product. + * + * @example + * store.register([{ + * id: 'subscription1', + * type: ProductType.PAID_SUBSCRIPTION, + * platform: Platform.APPLE_APPSTORE, + * }, { + * id: 'subscription1', + * type: ProductType.PAID_SUBSCRIPTION, + * platform: Platform.GOOGLE_PLAY, + * }, { + * id: 'consumable1', + * type: ProductType.CONSUMABLE, + * platform: Platform.BRAINTREE, + * }]); + */ + register(product) { + this.registeredProducts.add(product); + } + /** + * Call to initialize the in-app purchase plugin. + * + * @param platforms - List of payment platforms to initialize, default to Store.defaultPlatform(). + */ + async initialize(platforms = [this.defaultPlatform()]) { + if (this.initializedHasBeenCalled) { + this.log.warn('store.initialized() has been called already.'); + return []; + } + this.log.info('initialize()'); + this.initializedHasBeenCalled = true; + const store = this; + const ret = this.adapters.initialize(platforms, { + error: this.triggerError.bind(this), + get verbosity() { return store.verbosity; }, + getApplicationUsername() { return store.getApplicationUsername(); }, + get listener() { return store.listener; }, + get log() { return store.log; }, + get registeredProducts() { return store.registeredProducts; }, + apiDecorators: { + canPurchase: this.canPurchase.bind(this), + owned: this.owned.bind(this), + finish: this.finish.bind(this), + order: this.order.bind(this), + verify: this.verify.bind(this), + }, + }); + ret.then(() => { + this._readyCallbacks.trigger(); + this.listener.setSupportedPlatforms(this.adapters.list.filter(a => a.isSupported).map(a => a.id)); + }); + return ret; + } + /** + * @deprecated - use store.initialize(), store.update() or store.restorePurchases() + */ + refresh() { + throw new Error("use store.initialize() or store.update()"); + } + /** + * Call to refresh the price of products and status of purchases. + */ + async update() { + var _a; + this.log.info('update()'); + // Load products metadata + for (const registration of this.registeredProducts.byPlatform()) { + const products = await ((_a = this.adapters.findReady(registration.platform)) === null || _a === void 0 ? void 0 : _a.loadProducts(registration.products)); + products === null || products === void 0 ? void 0 : products.forEach(p => { + if (p instanceof CdvPurchase.Product) + this.updatedCallbacks.trigger(p); + }); + } + } + /** + * Register a callback to be called when the plugin is ready. + * + * This happens when all the platforms are initialized and their products loaded. + */ + ready(cb) { this._readyCallbacks.add(cb); } + /** true if the plugin is initialized and ready */ + get isReady() { return this._readyCallbacks.isReady; } + /** + * Setup events listener. + * + * @example + * store.when() + * .productUpdated(product => updateUI(product)) + * .approved(transaction => transaction.verify()) + * .verified(receipt => receipt.finish()); + */ + when() { + const ret = { + productUpdated: (cb) => (this.updatedCallbacks.push(cb), ret), + receiptUpdated: (cb) => (this.updatedReceiptsCallbacks.push(cb), ret), + updated: (cb) => (this.updatedCallbacks.push(cb), this.updatedReceiptsCallbacks.push(cb), ret), + // owned: (cb: Callback) => (this.ownedCallbacks.push(cb), ret), + approved: (cb) => (this.approvedCallbacks.push(cb), ret), + pending: (cb) => (this.pendingCallbacks.push(cb), ret), + finished: (cb) => (this.finishedCallbacks.push(cb), ret), + verified: (cb) => (this.verifiedCallbacks.push(cb), ret), + unverified: (cb) => (this.unverifiedCallbacks.push(cb), ret), + receiptsReady: (cb) => (this.receiptsReadyCallbacks.push(cb), ret), + receiptsVerified: (cb) => (this.receiptsVerifiedCallbacks.push(cb), ret), + }; + return ret; + } + /** + * Remove a callback from any listener it might have been added to. + */ + off(callback) { + this.updatedCallbacks.remove(callback); + this.updatedReceiptsCallbacks.remove(callback); + this.approvedCallbacks.remove(callback); + this.finishedCallbacks.remove(callback); + this.pendingCallbacks.remove(callback); + this.verifiedCallbacks.remove(callback); + this.unverifiedCallbacks.remove(callback); + this.receiptsReadyCallbacks.remove(callback); + this.receiptsVerifiedCallbacks.remove(callback); + this.errorCallbacks.remove(callback); + this._readyCallbacks.remove(callback); + } + /** + * Setup a function to be notified of changes to a transaction state. + * + * @param transaction The transaction to monitor. + * @param onChange Function to be called when the transaction status changes. + * @return A monitor which can be stopped with `monitor.stop()` + * + * @example + * const monitor = store.monitor(transaction, state => { + * console.log('new state: ' + state); + * if (state === TransactionState.FINISHED) + * monitor.stop(); + * }); + */ + monitor(transaction, onChange) { + return this.transactionStateMonitors.start(transaction, CdvPurchase.Utils.safeCallback(this.log, 'monitor()', onChange)); + } + /** + * List of all active products. + * + * Products are active if their details have been successfully loaded from the store. + */ + get products() { + // concatenate products all all active platforms + return [].concat(...this.adapters.list.map(a => a.products)); + } + /** + * Find a product from its id and platform + * + * @param productId Product identifier on the platform. + * @param platform The product the product exists in. Can be omitted if you're only using a single payment platform. + */ + get(productId, platform) { + var _a; + return (_a = this.adapters.findReady(platform)) === null || _a === void 0 ? void 0 : _a.products.find(p => p.id === productId); + } + /** + * List of all receipts present on the device. + */ + get localReceipts() { + // concatenate products all all active platforms + return [].concat(...this.adapters.list.map(a => a.receipts)); + } + /** List of all transaction from the local receipts. */ + get localTransactions() { + const ret = []; + for (const receipt of this.localReceipts) { + ret.push(...receipt.transactions); + } + return ret; + } + /** + * List of receipts verified with the receipt validation service. + * + * Those receipt contains more information and are generally more up-to-date than the local ones. + */ + get verifiedReceipts() { + return this._validator.verifiedReceipts; + } + /** + * List of all purchases from the verified receipts. + */ + get verifiedPurchases() { + return CdvPurchase.Internal.VerifiedReceipts.getVerifiedPurchases(this.verifiedReceipts); + } + /** + * Find the last verified purchase for a given product, from those verified by the receipt validator. + */ + findInVerifiedReceipts(product) { + return CdvPurchase.Internal.VerifiedReceipts.find(this.verifiedReceipts, product); + } + /** + * Find the latest transaction for a given product, from those reported by the device. + */ + findInLocalReceipts(product) { + return CdvPurchase.Internal.LocalReceipts.find(this.localReceipts, product); + } + /** Return true if a product or offer can be purchased */ + canPurchase(offer) { + const product = (offer instanceof CdvPurchase.Offer) ? this.get(offer.productId, offer.platform) : offer; + const adapter = this.adapters.findReady(offer.platform); + if (!(adapter === null || adapter === void 0 ? void 0 : adapter.checkSupport('order'))) + return false; + return CdvPurchase.Internal.LocalReceipts.canPurchase(this.localReceipts, product); + } + /** + * Return true if a product is owned + * + * @param product - The product object or identifier of the product. + */ + owned(product) { + return CdvPurchase.Internal.owned({ + product: typeof product === 'string' ? { id: product } : product, + verifiedReceipts: this.validator ? this.verifiedReceipts : undefined, + localReceipts: this.localReceipts, + }); + } + /** + * Place an order for a given offer. + */ + async order(offer, additionalData) { + this.log.info(`order(${offer.productId})`); + const adapter = this.adapters.findReady(offer.platform); + if (!adapter) + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_NOT_ALLOWED, 'Adapter not found or not ready (' + offer.platform + ')'); + const ret = await adapter.order(offer, additionalData || {}); + if (ret && 'isError' in ret) + CdvPurchase.store.triggerError(ret); + return ret; + } + /** + * Request a payment. + * + * A payment is a custom amount to charge the user. Make sure the selected payment platform + * supports Payment Requests. + * + * @param paymentRequest Parameters of the payment request + * @param additionalData Additional parameters + */ + requestPayment(paymentRequest, additionalData) { + var _a, _b, _c, _d, _e; + const adapter = this.adapters.findReady(paymentRequest.platform); + if (!adapter) + return CdvPurchase.PaymentRequestPromise.failed(CdvPurchase.ErrorCode.PAYMENT_NOT_ALLOWED, 'Adapter not found or not ready (' + paymentRequest.platform + ')'); + // fill-in missing total amount as the sum of all items. + if (!paymentRequest.amountMicros) { + paymentRequest.amountMicros = 0; + for (const item of paymentRequest.items) { + paymentRequest.amountMicros += (_b = (_a = item === null || item === void 0 ? void 0 : item.pricing) === null || _a === void 0 ? void 0 : _a.priceMicros) !== null && _b !== void 0 ? _b : 0; + } + } + // fill-in the missing if set in the items. + if (!paymentRequest.currency) { + for (const item of paymentRequest.items) { + if ((_c = item === null || item === void 0 ? void 0 : item.pricing) === null || _c === void 0 ? void 0 : _c.currency) { + paymentRequest.currency = item.pricing.currency; + } + } + } + else { + for (const item of paymentRequest.items) { + if ((_d = item === null || item === void 0 ? void 0 : item.pricing) === null || _d === void 0 ? void 0 : _d.currency) { + if (paymentRequest.currency !== item.pricing.currency) { + return CdvPurchase.PaymentRequestPromise.failed(CdvPurchase.ErrorCode.PAYMENT_INVALID, 'Currencies do not match'); + } + } + else if (item === null || item === void 0 ? void 0 : item.pricing) { + item.pricing.currency = paymentRequest.currency; + } + } + } + // fill-in item amount when there's just 1 item. + if (paymentRequest.items.length === 1) { + const item = paymentRequest.items[0]; + if (item && !item.pricing) { + item.pricing = { + priceMicros: (_e = paymentRequest.amountMicros) !== null && _e !== void 0 ? _e : 0, + currency: paymentRequest.currency, + }; + } + } + const promise = new CdvPurchase.PaymentRequestPromise(); + adapter.requestPayment(paymentRequest, additionalData).then(result => { + promise.trigger(result); + if (result instanceof CdvPurchase.Transaction) { + const onStateChange = (state) => { + promise.trigger(result); + if (result.state === CdvPurchase.TransactionState.FINISHED) + monitor.stop(); + }; + const monitor = this.monitor(result, onStateChange); + } + }); + return promise; + } + /** + * Returns true if a platform supports the requested functionality. + * + * @example + * store.checkSupport(Platform.APPLE_APPSTORE, 'requestPayment'); + * // => false + */ + checkSupport(platform, functionality) { + const adapter = this.adapters.find(platform); + if (!adapter) + return false; // the selected adapter hasn't been initialized + return adapter.checkSupport(functionality); + } + /** + * Verify a receipt or transacting with the receipt validation service. + * + * This will be called from the Receipt or Transaction objects using the API decorators. + */ + async verify(receiptOrTransaction) { + this.log.info(`verify(${receiptOrTransaction.className})`); + this._validator.add(receiptOrTransaction); + // Run validation after 200ms, so if the same receipt is to be validated multiple times it will just create one call. + setTimeout(() => this._validator.run(), 200); + } + /** + * Finalize a transaction. + * + * This will be called from the Receipt, Transaction or VerifiedReceipt objects using the API decorators. + */ + async finish(receipt) { + this.log.info(`finish(${receipt.className})`); + const transactions = receipt instanceof CdvPurchase.VerifiedReceipt + ? receipt.sourceReceipt.transactions + : receipt instanceof CdvPurchase.Receipt + ? receipt.transactions + : [receipt]; + transactions.forEach(transaction => { + var _a; + const adapter = (_a = this.adapters.findReady(transaction.platform)) === null || _a === void 0 ? void 0 : _a.finish(transaction); + }); + } + /** + * Replay the users transactions. + * + * This method exists to cover an Apple AppStore requirement. + */ + async restorePurchases() { + for (const adapter of this.adapters.list) { + if (adapter.ready) + await adapter.restorePurchases(); + } + // store.triggerError(storeError(ErrorCode.UNKNOWN, 'restorePurchases() is not implemented yet')); + } + /** + * Open the subscription management interface for the selected platform. + * + * If platform is not specified, the first available platform will be used. + * + * @example + * const activeSubscription: Purchase = // ... + * store.manageSubscriptions(activeSubscription.platform); + */ + async manageSubscriptions(platform) { + this.log.info('manageSubscriptions()'); + const adapter = this.adapters.findReady(platform); + if (!adapter) + return CdvPurchase.storeError(CdvPurchase.ErrorCode.SETUP, "Found no adapter ready to handle 'manageSubscription'"); + return adapter.manageSubscriptions(); + } + /** + * Opens the billing methods page on AppStore, Play, Microsoft, ... + * + * From this page, the user can update their payment methods. + * + * If platform is not specified, the first available platform will be used. + * + * @example + * if (purchase.isBillingRetryPeriod) + * store.manageBilling(purchase.platform); + */ + async manageBilling(platform) { + this.log.info('manageBilling()'); + const adapter = this.adapters.findReady(platform); + if (!adapter) + return CdvPurchase.storeError(CdvPurchase.ErrorCode.SETUP, "Found no adapter ready to handle 'manageBilling'"); + return adapter.manageBilling(); + } + /** + * The default payment platform to use depending on the OS. + * + * - on iOS: `APPLE_APPSTORE` + * - on Android: `GOOGLE_PLAY` + */ + defaultPlatform() { + switch (window.cordova.platformId) { + case 'android': return CdvPurchase.Platform.GOOGLE_PLAY; + case 'ios': return CdvPurchase.Platform.APPLE_APPSTORE; + default: return CdvPurchase.Platform.TEST; + } + } + /** + * Register an error handler. + * + * @param error An error callback that takes the error as an argument + * + * @example + * store.error(function(error) { + * console.error('CdvPurchase ERROR: ' + error.message); + * }); + */ + error(error) { + this.errorCallbacks.push(error); + } + /** + * Trigger an error event. + * + * @internal + */ + triggerError(error) { + this.errorCallbacks.trigger(error); + } + } + CdvPurchase.Store = Store; +})(CdvPurchase || (CdvPurchase = {})); +// Create the CdvPurchase.store object at startup. +setTimeout(() => { + console.log('Create CdvPurchase...'); + /* + if (window.CdvPurchase) { + Object.assign(window.CdvPurchase, CdvPurchase, { store: window.CdvPurchase.store }); + } + else { + window.CdvPurchase = CdvPurchase; + } + if (!window.CdvPurchase.store) { + window.CdvPurchase.store = new CdvPurchase.Store(); + // Let's maximize backward compatibility + Object.assign(window.CdvPurchase.store, CdvPurchase.LogLevel, CdvPurchase.ProductType, CdvPurchase.ErrorCode, CdvPurchase.Platform); + } + */ + window.CdvPurchase = CdvPurchase; + window.CdvPurchase.store = new CdvPurchase.Store(); + // Let's maximize backward compatibility + Object.assign(window.CdvPurchase.store, CdvPurchase.LogLevel, CdvPurchase.ProductType, CdvPurchase.ErrorCode, CdvPurchase.Platform); +}, 0); +// Ensure utility are included when compiling typescript. +/// +/// +var CdvPurchase; +(function (CdvPurchase) { + /** Types of In-App Products */ + let ProductType; + (function (ProductType) { + /** Type: An consumable product, that can be purchased multiple time */ + ProductType["CONSUMABLE"] = "consumable"; + /** Type: A non-consumable product, that can purchased only once and the user keeps forever */ + ProductType["NON_CONSUMABLE"] = "non consumable"; + /** @deprecated use PAID_SUBSCRIPTION */ + ProductType["FREE_SUBSCRIPTION"] = "free subscription"; + /** Type: An auto-renewable subscription */ + ProductType["PAID_SUBSCRIPTION"] = "paid subscription"; + /** Type: An non-renewing subscription */ + ProductType["NON_RENEWING_SUBSCRIPTION"] = "non renewing subscription"; + /** Type: The application bundle */ + ProductType["APPLICATION"] = "application"; + })(ProductType = CdvPurchase.ProductType || (CdvPurchase.ProductType = {})); + /** + * Type of recurring payment + * + * - FINITE_RECURRING: Payment recurs for a fixed number of billing period set in `paymentPhase.cycles`. + * - INFINITE_RECURRING: Payment recurs for infinite billing periods unless cancelled. + * - NON_RECURRING: A one time charge that does not repeat. + */ + let RecurrenceMode; + (function (RecurrenceMode) { + RecurrenceMode["NON_RECURRING"] = "NON_RECURRING"; + RecurrenceMode["FINITE_RECURRING"] = "FINITE_RECURRING"; + RecurrenceMode["INFINITE_RECURRING"] = "INFINITE_RECURRING"; + })(RecurrenceMode = CdvPurchase.RecurrenceMode || (CdvPurchase.RecurrenceMode = {})); + /** Mode of payment */ + let PaymentMode; + (function (PaymentMode) { + /** Used for subscriptions, pay at the beginning of each billing period */ + PaymentMode["PAY_AS_YOU_GO"] = "PayAsYouGo"; + /** Pay the whole amount up front */ + PaymentMode["UP_FRONT"] = "UpFront"; + /** Nothing to be paid */ + PaymentMode["FREE_TRIAL"] = "FreeTrial"; + })(PaymentMode = CdvPurchase.PaymentMode || (CdvPurchase.PaymentMode = {})); + /** + * Purchase platforms supported by the plugin + */ + let Platform; + (function (Platform) { + /** Apple AppStore */ + Platform["APPLE_APPSTORE"] = "ios-appstore"; + /** Google Play */ + Platform["GOOGLE_PLAY"] = "android-playstore"; + /** Windows Store */ + Platform["WINDOWS_STORE"] = "windows-store-transaction"; + /** Braintree */ + Platform["BRAINTREE"] = "braintree"; + // /** Stripe */ + // STRIPE = 'stripe', + /** Test platform */ + Platform["TEST"] = "test"; + })(Platform = CdvPurchase.Platform || (CdvPurchase.Platform = {})); + /** Possible states of a product */ + let TransactionState; + (function (TransactionState) { + // REQUESTED = 'requested', + TransactionState["INITIATED"] = "initiated"; + TransactionState["PENDING"] = "pending"; + TransactionState["APPROVED"] = "approved"; + TransactionState["CANCELLED"] = "cancelled"; + TransactionState["FINISHED"] = "finished"; + // OWNED = 'owned', + // EXPIRED = 'expired', + TransactionState["UNKNOWN_STATE"] = ""; + })(TransactionState = CdvPurchase.TransactionState || (CdvPurchase.TransactionState = {})); + /** Whether or not the user intends to let the subscription auto-renew. */ + let RenewalIntent; + (function (RenewalIntent) { + /** The user intends to let the subscription expire without renewing. */ + RenewalIntent["LAPSE"] = "Lapse"; + /** The user intends to renew the subscription. */ + RenewalIntent["RENEW"] = "Renew"; + })(RenewalIntent = CdvPurchase.RenewalIntent || (CdvPurchase.RenewalIntent = {})); + /** Whether or not the user was notified or agreed to a price change */ + let PriceConsentStatus; + (function (PriceConsentStatus) { + PriceConsentStatus["NOTIFIED"] = "Notified"; + PriceConsentStatus["AGREED"] = "Agreed"; + })(PriceConsentStatus = CdvPurchase.PriceConsentStatus || (CdvPurchase.PriceConsentStatus = {})); + /** Reason why a subscription has been canceled */ + let CancelationReason; + (function (CancelationReason) { + /** Not canceled */ + CancelationReason["NOT_CANCELED"] = ""; + /** Subscription canceled by the developer. */ + CancelationReason["DEVELOPER"] = "Developer"; + /** Subscription canceled by the system for an unspecified reason. */ + CancelationReason["SYSTEM"] = "System"; + /** Subscription upgraded or downgraded to a new subscription. */ + CancelationReason["SYSTEM_REPLACED"] = "System.Replaced"; + /** Product not available for purchase at the time of renewal. */ + CancelationReason["SYSTEM_PRODUCT_UNAVAILABLE"] = "System.ProductUnavailable"; + /** Billing error; for example customer’s payment information is no longer valid. */ + CancelationReason["SYSTEM_BILLING_ERROR"] = "System.BillingError"; + /** Transaction is gone; It has been deleted. */ + CancelationReason["SYSTEM_DELETED"] = "System.Deleted"; + /** Subscription canceled by the user for an unspecified reason. */ + CancelationReason["CUSTOMER"] = "Customer"; + /** Customer canceled their transaction due to an actual or perceived issue within your app. */ + CancelationReason["CUSTOMER_TECHNICAL_ISSUES"] = "Customer.TechnicalIssues"; + /** Customer did not agree to a recent price increase. See also priceConsentStatus. */ + CancelationReason["CUSTOMER_PRICE_INCREASE"] = "Customer.PriceIncrease"; + /** Customer canceled for cost-related reasons. */ + CancelationReason["CUSTOMER_COST"] = "Customer.Cost"; + /** Customer claimed to have found a better app. */ + CancelationReason["CUSTOMER_FOUND_BETTER_APP"] = "Customer.FoundBetterApp"; + /** Customer did not feel he is using this service enough. */ + CancelationReason["CUSTOMER_NOT_USEFUL_ENOUGH"] = "Customer.NotUsefulEnough"; + /** Subscription canceled for another reason; for example, if the customer made the purchase accidentally. */ + CancelationReason["CUSTOMER_OTHER_REASON"] = "Customer.OtherReason"; + /** Subscription canceled for unknown reasons. */ + CancelationReason["UNKNOWN"] = "Unknown"; + })(CancelationReason = CdvPurchase.CancelationReason || (CdvPurchase.CancelationReason = {})); +})(CdvPurchase || (CdvPurchase = {})); +/// +/// +/// +var CdvPurchase; +(function (CdvPurchase) { + /** + * One of the available offers to purchase a given product + */ + class Offer { + /** @internal */ + constructor(options, decorator) { + /** className, used to make sure we're passing an actual instance of the "Offer" class. */ + this.className = 'Offer'; + this.id = options.id; + this.pricingPhases = options.pricingPhases; + // Object.defineProperty(this, 'product', { enumerable: false, get: () => options.product }); + Object.defineProperty(this, 'productId', { enumerable: true, get: () => options.product.id }); + Object.defineProperty(this, 'productType', { enumerable: true, get: () => options.product.type }); + Object.defineProperty(this, 'productGroup', { enumerable: true, get: () => options.product.group }); + Object.defineProperty(this, 'platform', { enumerable: true, get: () => options.product.platform }); + Object.defineProperty(this, 'order', { enumerable: false, get: () => (additionalData) => decorator.order(this, additionalData) }); + Object.defineProperty(this, 'canPurchase', { enumerable: false, get: () => decorator.canPurchase(this) }); + } + /** Identifier of the product related to this offer */ + get productId() { return ''; } + /** Type of the product related to this offer */ + get productType() { return CdvPurchase.ProductType.APPLICATION; } + /** Group the product related to this offer is member of */ + get productGroup() { return undefined; } + /** Platform this offer is available from */ + get platform() { return CdvPurchase.Platform.TEST; } + /** + * Initiate a purchase of this offer. + * + * @example + * store.get("my-product").getOffer().order(); + */ + async order(additionalData) { + // Pseudo implementation to make typescript happy. + // see Object.defineProperty in the constructor for the actual implementation. + return; + } + /** + * true if the offer can be purchased. + */ + get canPurchase() { + // Pseudo implementation to make typescript happy. + // see Object.defineProperty in the constructor for the actual implementation. + return false; + } + } + CdvPurchase.Offer = Offer; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + class PaymentRequestPromise { + constructor() { + this.failedCallbacks = new CdvPurchase.Internal.PromiseLike(); + this.initiatedCallbacks = new CdvPurchase.Internal.PromiseLike(); + this.approvedCallbacks = new CdvPurchase.Internal.PromiseLike(); + this.finishedCallbacks = new CdvPurchase.Internal.PromiseLike(); + this.cancelledCallback = new CdvPurchase.Internal.PromiseLike(); + } + failed(callback) { + this.failedCallbacks.push(callback); + return this; + } + initiated(callback) { + this.initiatedCallbacks.push(callback); + return this; + } + approved(callback) { + this.approvedCallbacks.push(callback); + return this; + } + finished(callback) { + this.finishedCallbacks.push(callback); + return this; + } + cancelled(callback) { + this.cancelledCallback.push(callback); + return this; + } + /** @internal */ + trigger(argument) { + if (!argument) { + this.cancelledCallback.resolve(); + } + else if ('isError' in argument) { + this.failedCallbacks.resolve(argument); + } + else { + switch (argument.state) { + case CdvPurchase.TransactionState.INITIATED: + this.initiatedCallbacks.resolve(argument); + break; + case CdvPurchase.TransactionState.APPROVED: + this.approvedCallbacks.resolve(argument); + break; + case CdvPurchase.TransactionState.FINISHED: + this.finishedCallbacks.resolve(argument); + break; + } + } + return this; + } + /** + * Return a failed promise. + * + * @internal + */ + static failed(code, message) { + return new PaymentRequestPromise().trigger(CdvPurchase.storeError(code, message)); + } + /** + * Return a failed promise. + * + * @internal + */ + static cancelled() { + return new PaymentRequestPromise().trigger(); + } + /** + * Return an initiated transaction. + * + * @internal + */ + static initiated(transaction) { + return new PaymentRequestPromise().trigger(transaction); + } + } + CdvPurchase.PaymentRequestPromise = PaymentRequestPromise; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + class Receipt { + /** @internal */ + constructor(platform, decorator) { + /** @internal */ + this.className = 'Receipt'; + /** List of transactions contained in the receipt, ordered by date ascending. */ + this.transactions = []; + this.platform = platform; + Object.defineProperty(this, 'verify', { 'enumerable': false, get() { return () => decorator.verify(this); } }); + Object.defineProperty(this, 'finish', { 'enumerable': false, get() { return () => decorator.finish(this); } }); + } + /** Verify a receipt */ + async verify() { } + /** Finish all transactions in a receipt */ + async finish() { } + /** Return true if the receipt contains the given transaction */ + hasTransaction(value) { + return !!this.transactions.find(t => t === value); + } + /** Return the last transaction in this receipt */ + lastTransaction() { + return this.transactions[this.transactions.length - 1]; + } + } + CdvPurchase.Receipt = Receipt; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Transaction as reported by the device + * + * @see {@link Receipt} + * @see {@link store.localTransactions} + */ + class Transaction { + /** @internal */ + constructor(platform, parentReceipt, decorator) { + /** @internal */ + this.className = 'Transaction'; + /** Transaction identifier. */ + this.transactionId = ''; + /** State this transaction is in */ + this.state = CdvPurchase.TransactionState.UNKNOWN_STATE; + /** Purchased products */ + this.products = []; + this.platform = platform; + Object.defineProperty(this, 'finish', { 'enumerable': false, get() { return () => decorator.finish(this); } }); + Object.defineProperty(this, 'verify', { 'enumerable': false, get() { return () => decorator.verify(this); } }); + Object.defineProperty(this, 'parentReceipt', { 'enumerable': false, get() { return parentReceipt; } }); + } + /** + * Finish a transaction. + * + * When the application has delivered the product, it should finalizes the order. + * Only after that, money will be transferred to your account. + * This method ensures that no customers is charged for a product that couldn't be delivered. + * + * @example + * store.when() + * .approved(transaction => transaction.verify()) + * .verified(receipt => receipt.finish()) + */ + async finish() { } // actual implementation in the constructor + /** + * Verify a transaction. + * + * This will trigger a call to the receipt validation service for the attached receipt. + * Once the receipt has been verified, you can finish the transaction. + * + * @example + * store.when() + * .approved(transaction => transaction.verify()) + * .verified(receipt => receipt.finish()) + */ + async verify() { } // actual implementation in the constructor + /** + * Return the receipt this transaction is part of. + */ + get parentReceipt() { return {}; } // actual implementation in the constructor + } + CdvPurchase.Transaction = Transaction; +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** + * Monitor the updates for products and receipt. + * + * Call the callbacks when appropriate. + */ + class StoreAdapterListener { + constructor(delegate, log) { + /** The list of supported platforms, needs to be set by "store.initialize" */ + this.supportedPlatforms = []; + /** Those platforms have reported that their receipts are ready */ + this.platformWithReceiptsReady = []; + this.lastTransactionState = {}; + this.delegate = delegate; + this.log = log.child('AdapterListener'); + } + static makeTransactionToken(transaction) { + return transaction.platform + '|' + transaction.transactionId; + } + setSupportedPlatforms(platforms) { + this.log.debug('setSupportedPlatforms: ' + platforms.join(',')); + this.supportedPlatforms = platforms; + if (this.supportedPlatforms.length === this.platformWithReceiptsReady.length) { + this.delegate.receiptsReadyCallbacks.trigger(); + } + } + receiptsReady(platform) { + if (this.supportedPlatforms.length > 0 && this.platformWithReceiptsReady.length === this.supportedPlatforms.length) { + return; + } + if (this.platformWithReceiptsReady.indexOf(platform) < 0) { + this.log.debug('receiptsReady: ' + platform); + this.platformWithReceiptsReady.push(platform); + if (this.platformWithReceiptsReady.length === this.supportedPlatforms.length) { + this.log.debug('calling receiptsReady()'); + this.delegate.receiptsReadyCallbacks.trigger(); + } + } + } + productsUpdated(platform, products) { + products.forEach(product => this.delegate.updatedCallbacks.trigger(product)); + } + receiptsUpdated(platform, receipts) { + receipts.forEach(receipt => { + this.delegate.updatedReceiptCallbacks.trigger(receipt); + receipt.transactions.forEach(transaction => { + const transactionToken = StoreAdapterListener.makeTransactionToken(transaction); + const lastState = this.lastTransactionState[transactionToken]; + if (transaction.state === CdvPurchase.TransactionState.APPROVED) { + this.delegate.approvedCallbacks.trigger(transaction); + // better retrigger (so validation is rerun on potential update) + } + else if (lastState !== transaction.state) { + if (transaction.state === CdvPurchase.TransactionState.FINISHED) { + this.delegate.finishedCallbacks.trigger(transaction); + } + else if (transaction.state === CdvPurchase.TransactionState.PENDING) { + this.delegate.pendingCallbacks.trigger(transaction); + } + } + this.lastTransactionState[transactionToken] = transaction.state; + }); + }); + } + } + Internal.StoreAdapterListener = StoreAdapterListener; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** Analyze the list of local receipts. */ + class LocalReceipts { + /** + * Find the latest transaction for a given product, from those reported by the device. + */ + static find(localReceipts, product) { + var _a, _b; + if (!product) + return undefined; + let found; + for (const receipt of localReceipts) { + if (product.platform && receipt.platform !== product.platform) + continue; + for (const transaction of receipt.transactions) { + for (const trProducts of transaction.products) { + if (trProducts.id === product.id) { + // No matching transaction has been found or the tested one is newer than the already found one? + // Then we chose the tested one. + if (!found || ((_a = transaction.purchaseDate) !== null && _a !== void 0 ? _a : 0) < ((_b = found.purchaseDate) !== null && _b !== void 0 ? _b : 1)) + found = transaction; + } + } + } + } + return found; + } + /** Return true if a product is owned */ + static isOwned(localReceipts, product) { + if (!product) + return false; + const transaction = LocalReceipts.find(localReceipts, product); + if (!transaction) + return false; + if (transaction.isConsumed) + return false; + if (transaction.isPending) + return false; + if (transaction.expirationDate) + return transaction.expirationDate.getTime() > +new Date(); + return true; + } + static canPurchase(localReceipts, product) { + if (!product) + return false; + const transaction = LocalReceipts.find(localReceipts, product); + if (!transaction) + return true; + if (transaction.isConsumed) + return true; + if (transaction.expirationDate) + return transaction.expirationDate.getTime() <= +new Date(); + return true; + } + } + Internal.LocalReceipts = LocalReceipts; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** + * Return true if a product is owned. + * + * Will use the list of verified receipts if provided. + * Will only use the list of local receipts if verifiedReceipt is undefined. + */ + function owned(options) { + if (options.verifiedReceipts !== undefined) { + return Internal.VerifiedReceipts.isOwned(options.verifiedReceipts, options.product); + } + else if (options.localReceipts !== undefined) { + return Internal.LocalReceipts.isOwned(options.localReceipts, options.product); + } + else { + return false; + } + } + Internal.owned = owned; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + class PromiseLike { + constructor() { + this.resolved = false; + /** List of registered callbacks */ + this.callbacks = []; + } + /** Add a callback to the list */ + push(callback) { + if (this.resolved) + setTimeout(callback, 0, this.resolvedArgument); + else + this.callbacks.push(callback); + } + /** Call all registered callbacks with the given value */ + resolve(value) { + if (this.resolved) + return; // do not resolve twice + this.resolved = true; + this.resolvedArgument = value; + this.callbacks.forEach(cb => setTimeout(cb, 0, value)); + this.callbacks = []; + } + } + Internal.PromiseLike = PromiseLike; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + class ReceiptsMonitor { + constructor(controller) { + this.hasCalledReceiptsVerified = false; + this.controller = controller; + this.log = controller.log.child('ReceiptsMonitor'); + } + callReceiptsVerified() { + if (this.hasCalledReceiptsVerified) + return; + this.hasCalledReceiptsVerified = true; + this.log.info('receiptsVerified()'); + // ensure those 2 events are called in order. + this.controller.when().receiptsReady(() => { + setTimeout(() => { + this.controller.receiptsVerified(); + }, 0); + }); + } + launch() { + const check = () => { + this.log.debug(`check(${this.controller.numValidationResponses()}/${this.controller.numValidationRequests()})`); + if (this.controller.numValidationRequests() === this.controller.numValidationResponses()) { + if (this.intervalChecker !== undefined) { + clearInterval(this.intervalChecker); + this.intervalChecker = undefined; + } + this.controller.off(check); + this.callReceiptsVerified(); + } + }; + this.controller.when() + .verified(check) + .unverified(check) + .receiptsReady(() => { + this.log.debug('receiptsReady...'); + if (!this.controller.hasLocalReceipts() || !this.controller.hasValidator()) { + setTimeout(() => { + check(); + }, 0); + } + // check every 10s, to handle cases where neither "verified" nor "unverified" have been triggered. + this.intervalChecker = setInterval(() => { + this.log.debug('keep checking every 10s...'); + check(); + }, 10000); + }); + } + } + Internal.ReceiptsMonitor = ReceiptsMonitor; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + class RegisteredProducts { + constructor() { + this.list = []; + } + find(platform, id) { + return this.list.find(rp => rp.platform === platform && rp.id === id); + } + add(product) { + const products = Array.isArray(product) ? product : [product]; + const newProducts = products.filter(p => !this.find(p.platform, p.id)); + for (const p of newProducts) + this.list.push(p); + } + byPlatform() { + const byPlatform = {}; + this.list.forEach(p => { + byPlatform[p.platform] = (byPlatform[p.platform] || []).concat(p); + }); + return Object.keys(byPlatform).map(platform => ({ + platform: platform, + products: byPlatform[platform] + })); + } + } + Internal.RegisteredProducts = RegisteredProducts; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** + * Retry failed requests + * + * When setup and/or load failed, the plugin will retry over and over till it can connect + * to the store. + * + * However, to be nice with the battery, it'll double the retry timeout each time. + * + * Special case, when the device goes online, it'll trigger all retry callback in the queue. + */ + class Retry { + constructor(minTimeout = 5000, maxTimeout = 120000) { + this.maxTimeout = 120000; + this.minTimeout = 5000; + this.retryTimeout = 5000; + this.retries = []; + this.minTimeout = minTimeout; + this.maxTimeout = maxTimeout; + this.retryTimeout = minTimeout; + document.addEventListener("online", () => { + const a = this.retries; + this.retries = []; + this.retryTimeout = this.minTimeout; + for (var i = 0; i < a.length; ++i) { + clearTimeout(a[i].tid); + a[i].fn.call(this); + } + }, false); + } + retry(fn) { + var tid = setTimeout(() => { + this.retries = this.retries.filter(function (o) { + return tid !== o.tid; + }); + fn(); + }, this.retryTimeout); + this.retries.push({ tid: tid, fn: fn }); + this.retryTimeout *= 2; + // Max out the waiting time to 2 minutes. + if (this.retryTimeout > this.maxTimeout) + this.retryTimeout = this.maxTimeout; + } + } + Internal.Retry = Retry; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** @internal */ + let Internal; + (function (Internal) { + /** + * Helper class to monitor changes in transaction states. + * + * @example + * const monitor = monitors.start(transaction, (state) => { + * // ... transaction state has changed + * }); + * monitor.stop(); + */ + class TransactionStateMonitors { + constructor(when) { + this.monitors = []; + when + .approved(transaction => this.callOnChange(transaction)) + .finished(transaction => this.callOnChange(transaction)); + } + findMonitors(transaction) { + return this.monitors.filter(monitor => monitor.transaction.platform === transaction.platform + && monitor.transaction.transactionId === transaction.transactionId); + } + callOnChange(transaction) { + this.findMonitors(transaction).forEach(monitor => { + if (monitor.lastChange !== transaction.state) { + monitor.lastChange = transaction.state; + monitor.onChange(transaction.state); + } + }); + } + /** + * Start monitoring the provided transaction for state changes. + */ + start(transaction, onChange) { + const monitorId = CdvPurchase.Utils.uuidv4(); + this.monitors.push({ monitorId, transaction, onChange, lastChange: transaction.state }); + setTimeout(onChange, 0, transaction.state); + return { + transaction, + stop: () => this.stop(monitorId), + }; + } + stop(monitorId) { + this.monitors = this.monitors.filter(m => m.monitorId !== monitorId); + } + } + Internal.TransactionStateMonitors = TransactionStateMonitors; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Internal; + (function (Internal) { + /** Analyze the list of local receipts. */ + class VerifiedReceipts { + /** + * Find the last verified purchase for a given product, from those verified by the receipt validator. + */ + static find(verifiedReceipts, product) { + var _a, _b; + if (!product) + return undefined; + let found; + for (const receipt of verifiedReceipts) { + if (product.platform && receipt.platform !== product.platform) + continue; + for (const purchase of receipt.collection) { + if (purchase.id === product.id) { + if (((_a = found === null || found === void 0 ? void 0 : found.purchaseDate) !== null && _a !== void 0 ? _a : 0) < ((_b = purchase.purchaseDate) !== null && _b !== void 0 ? _b : 1)) + found = purchase; + } + } + } + return found; + } + /** Return true if a product is owned, based on the content of the list of verified receipts */ + static isOwned(verifiedReceipts, product) { + if (!product) + return false; + const purchase = VerifiedReceipts.find(verifiedReceipts, product); + if (!purchase) + return false; + if (purchase === null || purchase === void 0 ? void 0 : purchase.isExpired) + return false; + if (purchase === null || purchase === void 0 ? void 0 : purchase.expiryDate) { + return (purchase.expiryDate > +new Date()); + } + return true; + } + static getVerifiedPurchases(verifiedReceipts) { + var _a, _b, _c, _d; + const indexed = {}; + for (const receipt of verifiedReceipts) { + for (const purchase of receipt.collection) { + const key = receipt.platform + ':' + purchase.id; + const existing = indexed[key]; + if (!existing || (existing && ((_b = (_a = existing.lastRenewalDate) !== null && _a !== void 0 ? _a : existing.purchaseDate) !== null && _b !== void 0 ? _b : 0) < ((_d = (_c = purchase.lastRenewalDate) !== null && _c !== void 0 ? _c : purchase.purchaseDate) !== null && _d !== void 0 ? _d : 0))) { + indexed[key] = Object.assign(Object.assign({}, purchase), { platform: receipt.platform }); + } + } + } + return Object.keys(indexed).map(key => indexed[key]); + } + } + Internal.VerifiedReceipts = VerifiedReceipts; + })(Internal = CdvPurchase.Internal || (CdvPurchase.Internal = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Define types for ApplePay + * + * At the moment Apple Pay is only supported as an extension for Braintree. + */ + let ApplePay; + (function (ApplePay) { + /** The fields that describe a contact. */ + let ContactField; + (function (ContactField) { + ContactField["Name"] = "name"; + ContactField["EmailAddress"] = "emailAddress"; + ContactField["PhoneNumber"] = "phoneNumber"; + ContactField["PostalAddress"] = "postalAddress"; + ContactField["PhoneticName"] = "phoneticName"; + })(ContactField = ApplePay.ContactField || (ApplePay.ContactField = {})); + /** A type that represents a payment method. */ + let PaymentNetwork; + (function (PaymentNetwork) { + /** An American Express payment card. */ + PaymentNetwork["Amex"] = "Amex"; + /** A QR code used for payment. */ + PaymentNetwork["Barcode"] = "Barcode"; + /** A Cartes Bancaires payment card. */ + PaymentNetwork["CartesBancaires"] = "CartesBancaires"; + /** A China Union Pay payment card. */ + PaymentNetwork["ChinaUnionPay"] = "ChinaUnionPay"; + /** The Dankort payment card. */ + PaymentNetwork["Dankort"] = "Dankort"; + /** A Discover payment card. */ + PaymentNetwork["Discover"] = "Discover"; + /** The electronic funds transfer at point of sale (EFTPOS) payment method. */ + PaymentNetwork["Eftpos"] = "Eftpos"; + /** An Electron debit card. */ + PaymentNetwork["Electron"] = "Electron"; + /** The Elo payment card. */ + PaymentNetwork["Elo"] = "Elo"; + /** A Girocard payment method. */ + PaymentNetwork["Girocard"] = "Girocard"; + /** An iD payment card. */ + PaymentNetwork["IDCredit"] = "IDCredit"; + /** The Interac payment method. */ + PaymentNetwork["Interac"] = "Interac"; + /** A JCB payment card. */ + PaymentNetwork["JCB"] = "JCB"; + /** A mada payment card. */ + PaymentNetwork["Mada"] = "Mada"; + /** A Maestro payment card. */ + PaymentNetwork["Maestro"] = "Maestro"; + /** A MasterCard payment card. */ + PaymentNetwork["MasterCard"] = "MasterCard"; + /** A Mir payment card. */ + PaymentNetwork["Mir"] = "Mir"; + /** A Nanaco payment card. */ + PaymentNetwork["Nanaco"] = "Nanaco"; + /** Store credit and debit cards. */ + PaymentNetwork["PrivateLabel"] = "PrivateLabel"; + /** A QUICPay payment card. */ + PaymentNetwork["QuicPay"] = "QuicPay"; + /** A Suica payment card. */ + PaymentNetwork["Suica"] = "Suica"; + /** A Visa payment card. */ + PaymentNetwork["Visa"] = "Visa"; + /** A Visa V Pay payment card. */ + PaymentNetwork["VPay"] = "VPay"; + /** A WAON payment card. */ + PaymentNetwork["Waon"] = "Waon"; + })(PaymentNetwork = ApplePay.PaymentNetwork || (ApplePay.PaymentNetwork = {})); + /** Capabilities for processing payment. */ + let MerchantCapability; + (function (MerchantCapability) { + /** Support for the 3-D Secure protocol. */ + MerchantCapability["ThreeDS"] = "3DS"; + /** Support for the EMV protocol. */ + MerchantCapability["EMV"] = "EMV"; + /** Support for credit cards. */ + MerchantCapability["Credit"] = "Credit"; + /** Support for debit cards. */ + MerchantCapability["Debit"] = "Debit"; + })(MerchantCapability = ApplePay.MerchantCapability || (ApplePay.MerchantCapability = {})); + })(ApplePay = CdvPurchase.ApplePay || (CdvPurchase.ApplePay = {})); +})(CdvPurchase || (CdvPurchase = {})); +/// +/// +/// +/// +/// +var CdvPurchase; +(function (CdvPurchase) { + /** + * Apple AppStore adapter using StoreKit version 1 + */ + let AppleAppStore; + (function (AppleAppStore) { + /** + * In the first stages of a purchase, the transaction doesn't have an identifier. + * + * In the meantime, we generate a virtual transaction identifier. + */ + function virtualTransactionId(productId) { + return `virtual.${productId}`; + } + /** + * Adapter for Apple AppStore using StoreKit version 1 + */ + class Adapter { + constructor(context, options) { + var _a, _b; + this.id = CdvPurchase.Platform.APPLE_APPSTORE; + this.name = 'AppStore'; + this.ready = false; + this._canMakePayments = false; + /** + * Set to true to force a full refresh of the receipt when preparing a receipt validation call. + * + * This is typically done when placing an order and restoring purchases. + */ + this.forceReceiptReload = false; + /** List of products loaded from AppStore */ + this._products = []; + this.validProducts = {}; + this._paymentMonitor = () => { }; + /** True iff the appStoreReceipt is already being initialized */ + this._appStoreReceiptLoading = false; + /** List of functions waiting for the appStoreReceipt to be initialized */ + this._appStoreReceiptCallbacks = []; + this.context = context; + this.bridge = new AppleAppStore.Bridge.Bridge(); + this.log = context.log.child('AppleAppStore'); + this.discountEligibilityDeterminer = options.discountEligibilityDeterminer; + this.needAppReceipt = (_a = options.needAppReceipt) !== null && _a !== void 0 ? _a : true; + this.autoFinish = (_b = options.autoFinish) !== null && _b !== void 0 ? _b : false; + this.pseudoReceipt = new CdvPurchase.Receipt(CdvPurchase.Platform.APPLE_APPSTORE, this.context.apiDecorators); + this.receiptsUpdated = CdvPurchase.Utils.debounce(() => { + this._receiptsUpdated(); + }, 300); + } + get products() { return this._products; } + /** Find a given product from ID */ + getProduct(id) { return this._products.find(p => p.id === id); } + get receipts() { + return (this._receipt ? [this._receipt] : []) + .concat(this.pseudoReceipt ? this.pseudoReceipt : []); + } + addValidProducts(registerProducts, validProducts) { + validProducts.forEach(vp => { + const rp = registerProducts.find(p => p.id === vp.id); + if (!rp) + return; + this.validProducts[vp.id] = Object.assign(Object.assign({}, vp), rp); + }); + } + /** Returns true on iOS, the only platform supported by this adapter */ + get isSupported() { + return window.cordova.platformId === 'ios'; + } + upsertTransactionInProgress(productId, state) { + const transactionId = virtualTransactionId(productId); + return new Promise(resolve => { + const existing = this.pseudoReceipt.transactions.find(t => t.transactionId === transactionId); + if (existing) { + existing.state = state; + existing.refresh(productId); + resolve(existing); + } + else { + const tr = new AppleAppStore.SKTransaction(CdvPurchase.Platform.APPLE_APPSTORE, this.pseudoReceipt, this.context.apiDecorators); + tr.state = state; + tr.transactionId = transactionId; + tr.refresh(productId); + this.pseudoReceipt.transactions.push(tr); + resolve(tr); + } + }); + } + removeTransactionInProgress(productId) { + const transactionId = virtualTransactionId(productId); + this.pseudoReceipt.transactions = this.pseudoReceipt.transactions.filter(t => t.transactionId !== transactionId); + } + async upsertTransaction(productId, transactionId, state) { + return new Promise(resolve => { + this.initializeAppReceipt(() => { + var _a; + if (!this._receipt) { + // this should not happen + this.log.warn('Failed to load the application receipt, cannot proceed with handling the purchase'); + return; + } + const existing = (_a = this._receipt) === null || _a === void 0 ? void 0 : _a.transactions.find(t => t.transactionId === transactionId); + if (existing) { + existing.state = state; + existing.refresh(productId); + resolve(existing); + } + else { + const tr = new AppleAppStore.SKTransaction(CdvPurchase.Platform.APPLE_APPSTORE, this._receipt, this.context.apiDecorators); + tr.state = state; + tr.transactionId = transactionId; + tr.refresh(productId); + this._receipt.transactions.push(tr); + resolve(tr); + } + }); + }); + } + removeTransaction(transactionId) { + if (this._receipt) { + this._receipt.transactions = this._receipt.transactions.filter(t => t.transactionId !== transactionId); + } + } + /** Notify the store that the receipts have been updated */ + _receiptsUpdated() { + if (this._receipt) { + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this._receipt, this.pseudoReceipt]); + this.context.listener.receiptsReady(CdvPurchase.Platform.APPLE_APPSTORE); + } + else { + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this.pseudoReceipt]); + } + } + setPaymentMonitor(fn) { + this._paymentMonitor = fn; + } + callPaymentMonitor(status, code, message) { + this._paymentMonitor(status); + } + initialize() { + return new Promise(resolve => { + this.log.info('bridge.init'); + const bridgeLogger = this.log.child('Bridge'); + this.bridge.init({ + autoFinish: this.autoFinish, + debug: this.context.verbosity === CdvPurchase.LogLevel.DEBUG, + log: msg => bridgeLogger.debug(msg), + error: (code, message, options) => { + this.log.error('ERROR: ' + code + ' - ' + message); + if (code === CdvPurchase.ErrorCode.PAYMENT_CANCELLED) { + // When the user closes the payment sheet, this generates a + // PAYMENT_CANCELLED error that isn't an error anymore since version 13 + // of the plugin. + this.callPaymentMonitor('cancelled', CdvPurchase.ErrorCode.PAYMENT_CANCELLED, message); + return; + } + else { + this.context.error(CdvPurchase.storeError(code, message)); + } + }, + ready: () => { + this.log.info('ready'); + }, + purchased: async (transactionIdentifier, productId, originalTransactionIdentifier, transactionDate, discountId) => { + this.log.info('purchase: id:' + transactionIdentifier + ' product:' + productId + ' originalTransaction:' + originalTransactionIdentifier + ' - date:' + transactionDate + ' - discount:' + discountId); + // we can add the transaction to the receipt here + const transaction = await this.upsertTransaction(productId, transactionIdentifier, CdvPurchase.TransactionState.APPROVED); + transaction.refresh(productId, originalTransactionIdentifier, transactionDate, discountId); + this.removeTransactionInProgress(productId); + this.receiptsUpdated(); + this.callPaymentMonitor('purchased'); + }, + purchaseEnqueued: async (productId, quantity) => { + this.log.info('purchaseEnqueued: ' + productId + ' - ' + quantity); + // let create a temporary transaction + await this.upsertTransactionInProgress(productId, CdvPurchase.TransactionState.INITIATED); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this.pseudoReceipt]); + }, + purchaseFailed: (productId, code, message) => { + this.log.info('purchaseFailed: ' + productId + ' - ' + code + ' - ' + message); + this.removeTransactionInProgress(productId); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this.pseudoReceipt]); + this.callPaymentMonitor('failed', code, message); + }, + purchasing: async (productId) => { + // purchase has been requested, but there's no transactionIdentifier yet. + // we can create a dummy transaction + this.log.info('purchasing: ' + productId); + await this.upsertTransactionInProgress(productId, CdvPurchase.TransactionState.INITIATED); + // In order to prevent a receipt validation attempt here + // (which might happen if it hasn't been possible earlier) + // We should add "purchasing" transactions into a second, pseudo receipt. + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this.pseudoReceipt]); + }, + deferred: async (productId) => { + this.log.info('deferred: ' + productId); + await this.upsertTransactionInProgress(productId, CdvPurchase.TransactionState.PENDING); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [this.pseudoReceipt]); + this.callPaymentMonitor('deferred'); + }, + finished: async (transactionIdentifier, productId) => { + this.log.info('finish: ' + transactionIdentifier + ' - ' + productId); + this.removeTransactionInProgress(productId); + await this.upsertTransaction(productId, transactionIdentifier, CdvPurchase.TransactionState.FINISHED); + this.receiptsUpdated(); + }, + restored: async (transactionIdentifier, productId) => { + this.log.info('restore: ' + transactionIdentifier + ' - ' + productId); + await this.upsertTransaction(productId, transactionIdentifier, CdvPurchase.TransactionState.APPROVED); + this.receiptsUpdated(); + }, + receiptsRefreshed: (receipt) => { + this.log.info('receiptsRefreshed'); + if (this._receipt) + this._receipt.refresh(receipt, this.needAppReceipt, this.context.apiDecorators); + }, + restoreFailed: (errorCode) => { + this.log.info('restoreFailed: ' + errorCode); + }, + restoreCompleted: () => { + this.log.info('restoreCompleted'); + }, + }, async () => { + this.log.info('bridge.init done'); + await this.canMakePayments(); + resolve(undefined); + }, (code, message) => { + this.log.info('bridge.init failed: ' + code + ' - ' + message); + resolve(CdvPurchase.storeError(code, message)); + }); + }); + } + loadReceipts() { + return new Promise((resolve) => { + setTimeout(() => { + this.initializeAppReceipt(() => { + this.receiptsUpdated(); + if (this._receipt) { + resolve([this._receipt, this.pseudoReceipt]); + } + else { + resolve([this.pseudoReceipt]); + } + }); + }, 300); + }); + } + async canMakePayments() { + return new Promise(resolve => { + this.bridge.canMakePayments(() => { + this._canMakePayments = true; + resolve(true); + }, (message) => { + this.log.warn(`canMakePayments: ${message}`); + this._canMakePayments = false; + resolve(false); + }); + }); + } + /** + * Create the application receipt + */ + async initializeAppReceipt(callback) { + if (this._receipt) { + this.log.debug('initializeAppReceipt() => already initialized.'); + return callback(undefined); + } + this._appStoreReceiptCallbacks.push(callback); + if (this._appStoreReceiptLoading) { + this.log.debug('initializeAppReceipt() => already loading.'); + return; + } + this._appStoreReceiptLoading = true; + const nativeData = await this.loadAppStoreReceipt(); + const callCallbacks = (arg) => { + const callbacks = this._appStoreReceiptCallbacks; + this._appStoreReceiptCallbacks = []; + callbacks.forEach(cb => { + cb(arg); + }); + }; + if (!(nativeData === null || nativeData === void 0 ? void 0 : nativeData.appStoreReceipt)) { + this.log.warn('no appStoreReceipt'); + this._appStoreReceiptLoading = false; + callCallbacks(CdvPurchase.storeError(CdvPurchase.ErrorCode.REFRESH, 'No appStoreReceipt')); + return; + } + this._receipt = new AppleAppStore.SKApplicationReceipt(nativeData, this.needAppReceipt, this.context.apiDecorators); + callCallbacks(undefined); + } + prepareReceipt(nativeData) { + if (nativeData === null || nativeData === void 0 ? void 0 : nativeData.appStoreReceipt) { + if (!this._receipt) { + this._receipt = new AppleAppStore.SKApplicationReceipt(nativeData, this.needAppReceipt, this.context.apiDecorators); + } + else { + this._receipt.refresh(nativeData, this.needAppReceipt, this.context.apiDecorators); + } + } + } + /** Promisified loading of the AppStore receipt */ + async loadAppStoreReceipt() { + let resolved = false; + return new Promise(resolve => { + var _a; + if ((_a = this.bridge.appStoreReceipt) === null || _a === void 0 ? void 0 : _a.appStoreReceipt) { + this.log.debug('using cached appstore receipt'); + return resolve(this.bridge.appStoreReceipt); + } + this.log.debug('loading appstore receipt...'); + this.bridge.loadReceipts(receipt => { + this.log.debug('appstore receipt loaded'); + if (!resolved) + resolve(receipt); + resolved = true; + }, (code, message) => { + // this should not happen: native side never triggers an error + this.log.warn('Failed to load appStoreReceipt: ' + code + ' - ' + message); + if (!resolved) + resolve(undefined); + resolved = true; + }); + // If the receipt cannot be loaded, timeout after 5 seconds + setTimeout(function () { + if (!resolved) + resolve(undefined); + resolved = true; + }, 5000); + }).then(result => { + this.context.listener.receiptsReady(CdvPurchase.Platform.APPLE_APPSTORE); + return result; + }).catch(reason => { + this.context.listener.receiptsReady(CdvPurchase.Platform.APPLE_APPSTORE); + return reason; + }); + } + async loadEligibility(validProducts) { + if (!this.discountEligibilityDeterminer) { + return new AppleAppStore.Internal.DiscountEligibilities([], []); + } + const eligibilityRequests = []; + validProducts.forEach(valid => { + var _a; + (_a = valid.discounts) === null || _a === void 0 ? void 0 : _a.forEach(discount => { + eligibilityRequests.push({ + productId: valid.id, + discountId: discount.id, + discountType: discount.type, + }); + }); + }); + if (eligibilityRequests.length > 0) { + const applicationReceipt = await this.loadAppStoreReceipt(); + if (!applicationReceipt || !applicationReceipt.appStoreReceipt) { + this.log.debug('no receipt, assuming introductory price are available.'); + return new AppleAppStore.Internal.DiscountEligibilities(eligibilityRequests, eligibilityRequests.map(r => r.discountType === "Introductory")); + } + else { + this.log.debug('calling discount eligibility determiner.'); + const response = await this.callDiscountEligibilityDeterminer(applicationReceipt, eligibilityRequests); + this.log.debug('response: ' + JSON.stringify(response)); + return new AppleAppStore.Internal.DiscountEligibilities(eligibilityRequests, response); + } + } + else { + return new AppleAppStore.Internal.DiscountEligibilities([], []); + } + } + callDiscountEligibilityDeterminer(applicationReceipt, eligibilityRequests) { + return new Promise(resolve => { + if (!this.discountEligibilityDeterminer) + return resolve([]); + this.discountEligibilityDeterminer(applicationReceipt, eligibilityRequests, resolve); + }); + } + loadProducts(products) { + return new Promise(resolve => { + this.log.info('bridge.load'); + this.bridge.load(products.map(p => p.id), async (validProducts, invalidProducts) => { + this.log.info('bridge.loaded: ' + JSON.stringify({ validProducts, invalidProducts })); + this.addValidProducts(products, validProducts); + const eligibilities = await this.loadEligibility(validProducts); + this.log.info('eligibilities ready.'); + // for any valid product that includes a discount, check the eligibility. + const ret = products.map(p => { + if (invalidProducts.indexOf(p.id) >= 0) { + this.log.debug(`${p.id} is invalid`); + return CdvPurchase.storeError(CdvPurchase.ErrorCode.INVALID_PRODUCT_ID, 'Product not found in AppStore. #400'); + } + else { + const valid = validProducts.find(v => v.id === p.id); + this.log.debug(`${p.id} is valid: ${JSON.stringify(valid)}`); + if (!valid) + return CdvPurchase.storeError(CdvPurchase.ErrorCode.INVALID_PRODUCT_ID, 'Product not found in AppStore. #404'); + let product = this.getProduct(p.id); + if (product) { + this.log.debug('refreshing existing product'); + product === null || product === void 0 ? void 0 : product.refresh(valid, this.context.apiDecorators, eligibilities); + } + else { + this.log.debug('registering existing product'); + product = new AppleAppStore.SKProduct(valid, p, this.context.apiDecorators, eligibilities); + this._products.push(product); + } + return product; + } + }); + this.log.debug(`Products loaded: ${JSON.stringify(ret)}`); + resolve(ret); + }, (code, message) => { + return products.map(p => CdvPurchase.storeError(code, message)); + }); + }); + } + async order(offer, additionalData) { + let resolved = false; + return new Promise(resolve => { + var _a; + const callResolve = (result) => { + if (resolved) + return; + this.setPaymentMonitor(() => { }); + resolved = true; + resolve(result); + }; + this.log.info('order'); + const discountId = offer.id !== AppleAppStore.DEFAULT_OFFER_ID ? offer.id : undefined; + const discount = (_a = additionalData === null || additionalData === void 0 ? void 0 : additionalData.appStore) === null || _a === void 0 ? void 0 : _a.discount; + if (discountId && !discount) { + return callResolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.MISSING_OFFER_PARAMS, 'Missing additionalData.appStore.discount when ordering a discount offer')); + } + if (discountId && ((discount === null || discount === void 0 ? void 0 : discount.id) !== discountId)) { + return callResolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.INVALID_OFFER_IDENTIFIER, 'Offer identifier does not match additionalData.appStore.discount.id')); + } + this.setPaymentMonitor((status, code, message) => { + this.log.info('order.paymentMonitor => ' + status + ' ' + (code !== null && code !== void 0 ? code : '') + ' ' + (message !== null && message !== void 0 ? message : '')); + if (resolved) + return; + switch (status) { + case 'cancelled': + callResolve(CdvPurchase.storeError(code !== null && code !== void 0 ? code : CdvPurchase.ErrorCode.PAYMENT_CANCELLED, message !== null && message !== void 0 ? message : 'The user cancelled the order.')); + break; + case 'failed': + // note, "failed" might be triggered before "cancelled", + // so we'll give some time to catch the "cancelled" event. + setTimeout(() => { + callResolve(CdvPurchase.storeError(code !== null && code !== void 0 ? code : CdvPurchase.ErrorCode.PURCHASE, message !== null && message !== void 0 ? message : 'Purchase failed')); + }, 500); + break; + case 'purchased': + case 'deferred': + callResolve(undefined); + break; + } + }); + const success = () => { + this.log.info('order.success'); + // We'll monitor the payment before resolving. + }; + const error = () => { + this.log.info('order.error'); + callResolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Failed to place order')); + }; + // When we switch AppStore user, the cached receipt isn't from the new user. + // so after a purchase, we want to make sure we're using the receipt from the logged in user. + this.forceReceiptReload = true; + this.bridge.purchase(offer.productId, 1, this.context.getApplicationUsername(), discount, success, error); + }); + } + finish(transaction) { + return new Promise(resolve => { + this.log.info('finish(' + transaction.transactionId + ')'); + if (transaction.transactionId === AppleAppStore.APPLICATION_VIRTUAL_TRANSACTION_ID || transaction.transactionId === virtualTransactionId(transaction.products[0].id)) { + // this is a virtual transaction, nothing to do. + transaction.state = CdvPurchase.TransactionState.FINISHED; + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [transaction.parentReceipt]); + return resolve(undefined); + } + const success = () => { + transaction.state = CdvPurchase.TransactionState.FINISHED; + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [transaction.parentReceipt]); + resolve(undefined); + }; + const error = (msg) => { + if (msg === null || msg === void 0 ? void 0 : msg.includes('[#CdvPurchase:100]')) { + // already finished + success(); + } + else { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.FINISH, 'Failed to finish transaction')); + } + }; + this.bridge.finish(transaction.transactionId, success, error); + }); + } + refreshReceipt() { + return new Promise(resolve => { + const success = (receipt) => { + // at that point, the receipt should have been refreshed. + resolve(receipt); + }; + const error = (code, message) => { + resolve(CdvPurchase.storeError(code, message)); + }; + this.bridge.refreshReceipts(success, error); + }); + } + async receiptValidationBody(receipt) { + if (receipt.platform !== CdvPurchase.Platform.APPLE_APPSTORE) + return; + if (receipt !== this._receipt) + return; // do not validate the pseudo receipt + const skReceipt = receipt; + let applicationReceipt = skReceipt.nativeData; + if (this.forceReceiptReload) { + this.forceReceiptReload = false; + const nativeData = await this.loadAppStoreReceipt(); + if (nativeData) { + applicationReceipt = nativeData; + this.prepareReceipt(nativeData); + } + } + if (!skReceipt.nativeData.appStoreReceipt) { + this.log.info('Cannot prepare the receipt validation body, because appStoreReceipt is missing. Refreshing...'); + const result = await this.refreshReceipt(); + if (!result || 'isError' in result) { + this.log.warn('Failed to refresh receipt, cannot run receipt validation.'); + if (result) + this.log.error(result); + return; + } + this.log.info('Receipt refreshed.'); + applicationReceipt = result; + } + const transaction = skReceipt.transactions.slice(-1)[0]; + return { + id: applicationReceipt.bundleIdentifier, + type: CdvPurchase.ProductType.APPLICATION, + // send all products and offers so validator get pricing information + products: Object.values(this.validProducts).map(vp => new AppleAppStore.SKProduct(vp, vp, this.context.apiDecorators, { isEligible: () => true })), + transaction: { + type: 'ios-appstore', + id: transaction === null || transaction === void 0 ? void 0 : transaction.transactionId, + appStoreReceipt: applicationReceipt.appStoreReceipt, + } + }; + } + async handleReceiptValidationResponse(_receipt, response) { + var _a, _b; + // we can add the purchaseDate to the application transaction + let localReceiptUpdated = false; + if (response.ok) { + const vTransaction = (_a = response.data) === null || _a === void 0 ? void 0 : _a.transaction; + if ((vTransaction === null || vTransaction === void 0 ? void 0 : vTransaction.type) === 'ios-appstore' && 'original_application_version' in vTransaction) { + (_b = this._receipt) === null || _b === void 0 ? void 0 : _b.transactions.forEach(t => { + if (t.transactionId === AppleAppStore.APPLICATION_VIRTUAL_TRANSACTION_ID) { + if (vTransaction.original_purchase_date_ms) { + t.purchaseDate = new Date(parseInt(vTransaction.original_purchase_date_ms)); + localReceiptUpdated = true; + } + } + }); + } + } + if (localReceiptUpdated) + this.context.listener.receiptsUpdated(CdvPurchase.Platform.APPLE_APPSTORE, [_receipt]); + } + async requestPayment(payment, additionalData) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'requestPayment not supported'); + } + async manageSubscriptions() { + this.bridge.manageSubscriptions(); + return; + } + async manageBilling() { + this.bridge.manageBilling(); + return; + } + checkSupport(functionality) { + if (functionality === 'order') + return this._canMakePayments; + const supported = [ + 'order', 'manageBilling', 'manageSubscriptions' + ]; + return supported.indexOf(functionality) >= 0; + } + restorePurchases() { + return new Promise(resolve => { + this.forceReceiptReload = true; + this.bridge.restore(); + this.bridge.refreshReceipts(obj => { + resolve(); + }, (code, message) => { + resolve(); + }); + }); + } + presentCodeRedemptionSheet() { + return new Promise(resolve => { + this.bridge.presentCodeRedemptionSheet(resolve); + }); + } + } + AppleAppStore.Adapter = Adapter; + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let AppleAppStore; + (function (AppleAppStore) { + let Bridge; + (function (Bridge_1) { + /** No-operation function, used as a default for callbacks */ + const noop = (args) => { }; + /** Logger */ + let log = noop; + /** Execute a native method */ + function exec(methodName, options, success, error) { + window.cordova.exec(success, error, "InAppPurchase", methodName, options); + } + ; + /** Execute a javascript-side method in a try-catch block */ + function protectCall(callback, context, ...args) { + if (!callback) { + return; + } + try { + // const args = Array.prototype.slice.call(arguments, 2); + callback.apply(this, args); + } + catch (err) { + log('exception in ' + context + ': "' + err + '"'); + } + } + ; + class Bridge { + constructor() { + /** Transactions for a given product */ + this.transactionsForProduct = {}; + /** True when the SDK has been initialized */ + this.initialized = false; + /** List of registered product identifiers */ + this.registeredProducts = []; + /** True if "restoreCompleted" or "restoreFailed" should be called when restore is done */ + this.needRestoreNotification = false; + /* + private eventQueue: { + state: TransactionState; + errorCode: ErrorCode | undefined; + errorText: string | undefined; + transactionIdentifier: string; + productId: string; + /** @deprecated * + transactionReceipt: never; + originalTransactionIdentifier: string | undefined; + transactionDate: string; + discountId: string; + }[] = []; + + private timer: number | null = null; + */ + /** List of transaction updates to process */ + this.pendingUpdates = []; + /** @deprecated */ + this.onPurchased = false; + /** @deprecated */ + this.onFailed = false; + /** @deprecated */ + this.onRestored = false; + window.storekit = this; // used by native to communicate with this bridge + this.options = { + error: noop, + ready: noop, + purchased: noop, + purchaseEnqueued: noop, + purchasing: noop, + purchaseFailed: noop, + deferred: noop, + finished: noop, + restored: noop, + receiptsRefreshed: noop, + restoreFailed: noop, + restoreCompleted: noop, + }; + // if (window.localStorage && window.localStorage.sk_transactionForProduct) + // this.transactionsForProduct = JSON.parse(window.localStorage.sk_transactionForProduct); + // Remove support for receipt.forTransaction(...) + // `appStoreReceipt` is now the only supported receipt format on iOS (drops support for iOS <= 6) + // if (window.localStorage.sk_receiptForTransaction) + // delete window.localStorage.sk_receiptForTransaction; + } + init(options, success, error) { + this.options = { + error: options.error || noop, + ready: options.ready || noop, + purchased: options.purchased || noop, + purchaseEnqueued: options.purchaseEnqueued || noop, + purchasing: options.purchasing || noop, + purchaseFailed: options.purchaseFailed || noop, + deferred: options.deferred || noop, + finished: options.finished || noop, + restored: options.restored || noop, + receiptsRefreshed: options.receiptsRefreshed || noop, + restoreFailed: options.restoreFailed || noop, + restoreCompleted: options.restoreCompleted || noop, + }; + if (options.debug) { + exec('debug', [], noop, noop); + log = options.log || function (msg) { + console.log("[CdvPurchase.AppAppStore.Bridge] " + msg); + }; + } + if (options.autoFinish) { + exec('autoFinish', [], noop, noop); + } + const setupOk = () => { + log('setup ok'); + protectCall(this.options.ready, 'options.ready'); + protectCall(success, 'init.success'); + this.initialized = true; + setTimeout(() => this.processPendingTransactions(), 50); + }; + const setupFailed = () => { + log('setup failed'); + // protectCall(this.options.error, 'options.error', ErrorCode.SETUP, 'Setup failed'); + protectCall(error, 'init.error', CdvPurchase.ErrorCode.SETUP, 'Setup failed'); + }; + exec('setup', [], setupOk, setupFailed); + } + processPendingTransactions() { + log('processing pending transactions'); + exec('processPendingTransactions', [], () => { + this.finalizeTransactionUpdates(); + }, undefined); + } + /** + * Makes an in-app purchase. + * + * @param {String} productId The product identifier. e.g. "com.example.MyApp.myproduct" + * @param {int} quantity Quantity of product to purchase + */ + purchase(productId, quantity, applicationUsername, discount, success, error) { + quantity = (quantity | 0) || 1; + const options = this.options; + // Many people forget to load information about their products from apple's servers before allowing + // users to purchase them... leading them to spam us with useless issues and comments. + // Let's chase them down! + if (this.registeredProducts.indexOf(productId) < 0) { + const msg = 'Purchasing ' + productId + ' failed. Ensure the product was loaded first with Bridge.load(...)!'; + log(msg); + if (typeof options.error === 'function') { + protectCall(options.error, 'options.error', CdvPurchase.ErrorCode.PURCHASE, 'Trying to purchase a unknown product.', { productId, quantity }); + } + return; + } + const purchaseOk = () => { + log('Purchase enqueued ' + productId); + if (typeof options.purchaseEnqueued === 'function') { + protectCall(options.purchaseEnqueued, 'options.purchaseEnqueued', productId, quantity); + } + protectCall(success, 'purchase.success'); + }; + const purchaseFailed = () => { + const errMsg = 'Purchase failed: ' + productId; + log(errMsg); + if (typeof options.error === 'function') { + protectCall(options.error, 'options.error', CdvPurchase.ErrorCode.PURCHASE, errMsg, { productId, quantity }); + } + protectCall(error, 'purchase.error'); + }; + exec('purchase', [productId, quantity, applicationUsername, discount || {}], purchaseOk, purchaseFailed); + } + /** + * Checks if device/user is allowed to make in-app purchases + */ + canMakePayments(success, error) { + return exec("canMakePayments", [], success, error); + } + /** + * Asks the payment queue to restore previously completed purchases. + * + * The restored transactions are passed to the onRestored callback, so make sure you define a handler for that first. + */ + restore(callback) { + this.needRestoreNotification = true; + exec('restoreCompletedTransactions', [], callback, callback); + } + manageSubscriptions(callback) { + exec('manageSubscriptions', [], callback, callback); + } + manageBilling(callback) { + exec('manageBilling', [], callback, callback); + } + presentCodeRedemptionSheet(callback) { + exec('presentCodeRedemptionSheet', [], callback, callback); + } + /** + * Retrieves localized product data, including price (as localized + * string), name, description of multiple products. + * + * @param {Array} productIds + * An array of product identifier strings. + * + * @param {Function} callback + * Called once with the result of the products request. Signature: + * + * function(validProducts, invalidProductIds) + * + * where validProducts receives an array of objects of the form: + * + * { + * id: "", + * title: "", + * description: "", + * price: "" + * } + * + * and invalidProductIds receives an array of product identifier + * strings which were rejected by the app store. + */ + load(productIds, success, error) { + const options = this.options; + if (typeof productIds === "string") { + productIds = [productIds]; + } + if (!productIds) { + // Empty array, nothing to do. + protectCall(success, 'load.success', [], []); + } + else if (!productIds.length) { + // Empty array, nothing to do. + protectCall(success, 'load.success', [], []); + } + else { + if (typeof productIds[0] !== 'string') { + const msg = 'invalid productIds given to store.load: ' + JSON.stringify(productIds); + log(msg); + protectCall(options.error, 'options.error', CdvPurchase.ErrorCode.LOAD, msg); + protectCall(error, 'load.error', CdvPurchase.ErrorCode.LOAD, msg); + return; + } + log('load ' + JSON.stringify(productIds)); + const loadOk = (array) => { + const valid = array[0]; + const invalid = array[1]; + log('load ok: { valid:' + JSON.stringify(valid) + ' invalid:' + JSON.stringify(invalid) + ' }'); + protectCall(success, 'load.success', valid, invalid); + }; + const loadFailed = (errMessage) => { + log('load failed'); + log(errMessage); + const message = 'Load failed: ' + errMessage; + protectCall(options.error, 'options.error', CdvPurchase.ErrorCode.LOAD, message); + protectCall(error, 'load.error', CdvPurchase.ErrorCode.LOAD, message); + }; + this.registeredProducts = this.registeredProducts.concat(productIds); + exec('load', [productIds], loadOk, loadFailed); + } + } + /* + * Finish an unfinished transaction. + * + * @param {String} transactionId + * Identifier of the transaction to finish. + * + * You have to call this method manually except when using the autoFinish option. + */ + finish(transactionId, success, error) { + exec('finishTransaction', [transactionId], success, error); + } + finalizeTransactionUpdates() { + for (let i = 0; i < this.pendingUpdates.length; ++i) { + const args = this.pendingUpdates[i]; + this.transactionUpdated(args.state, args.errorCode, args.errorText, args.transactionIdentifier, args.productId, args.transactionReceipt, args.originalTransactionIdentifier, args.transactionDate, args.discountId); + } + this.pendingUpdates = []; + } + lastTransactionUpdated() { + // no more pending transactions + } + // This is called from native. + // + // Note that it may eventually be called before initialization... unfortunately. + // In this case, we'll just keep pending updates in a list for later processing. + transactionUpdated(state, errorCode, errorText, transactionIdentifier, productId, transactionReceipt, originalTransactionIdentifier, transactionDate, discountId) { + if (!this.initialized) { + this.pendingUpdates.push({ state, errorCode, errorText, transactionIdentifier, productId, transactionReceipt, originalTransactionIdentifier, transactionDate, discountId }); + return; + } + log("transaction updated:" + transactionIdentifier + " state:" + state + " product:" + productId); + if (productId && transactionIdentifier) { + if (this.transactionsForProduct[productId]) { + this.transactionsForProduct[productId].push(transactionIdentifier); + } + else { + this.transactionsForProduct[productId] = [transactionIdentifier]; + } + } + switch (state) { + case "PaymentTransactionStatePurchasing": + protectCall(this.options.purchasing, 'options.purchasing', productId); + return; + case "PaymentTransactionStatePurchased": + protectCall(this.options.purchased, 'options.purchase', transactionIdentifier, productId, originalTransactionIdentifier, transactionDate, discountId); + return; + case "PaymentTransactionStateDeferred": + protectCall(this.options.deferred, 'options.deferred', productId); + return; + case "PaymentTransactionStateFailed": + protectCall(this.options.purchaseFailed, 'options.purchaseFailed', productId, errorCode || CdvPurchase.ErrorCode.UNKNOWN, errorText || 'ERROR'); + protectCall(this.options.error, 'options.error', errorCode || CdvPurchase.ErrorCode.UNKNOWN, errorText || 'ERROR', { productId }); + return; + case "PaymentTransactionStateRestored": + protectCall(this.options.restored, 'options.restore', transactionIdentifier, productId); + return; + case "PaymentTransactionStateFinished": + protectCall(this.options.finished, 'options.finish', transactionIdentifier, productId); + return; + } + } + restoreCompletedTransactionsFinished() { + if (!this.needRestoreNotification) + return; + this.needRestoreNotification = false; + protectCall(this.options.restoreCompleted, 'options.restoreCompleted'); + } + restoreCompletedTransactionsFailed(errorCode) { + if (!this.needRestoreNotification) + return; + this.needRestoreNotification = false; + protectCall(this.options.restoreFailed, 'options.restoreFailed', errorCode); + } + parseReceiptArgs(args) { + const base64 = args[0]; + const bundleIdentifier = args[1]; + const bundleShortVersion = args[2]; + const bundleNumericVersion = args[3]; + const bundleSignature = args[4]; + log('infoPlist: ' + bundleIdentifier + "," + bundleShortVersion + "," + bundleNumericVersion + "," + bundleSignature); + return { + appStoreReceipt: base64, + bundleIdentifier: bundleIdentifier, + bundleShortVersion: bundleShortVersion, + bundleNumericVersion: bundleNumericVersion, + bundleSignature: bundleSignature + }; + } + refreshReceipts(successCb, errorCb) { + const loaded = (args) => { + const data = this.parseReceiptArgs(args); + this.appStoreReceipt = data; + protectCall(this.options.receiptsRefreshed, 'options.receiptsRefreshed', data); + protectCall(successCb, "refreshReceipts.success", data); + }; + const error = (errMessage) => { + log('refresh receipt failed: ' + errMessage); + if (errMessage.includes("(@AMSErrorDomain:100)")) { + log('authentication failed, indicated by the string "(@AMSErrorDomain:100)"'); + } + protectCall(this.options.error, 'options.error', CdvPurchase.ErrorCode.REFRESH_RECEIPTS, 'Failed to refresh receipt: ' + errMessage); + protectCall(errorCb, "refreshReceipts.error", CdvPurchase.ErrorCode.REFRESH_RECEIPTS, 'Failed to refresh receipt: ' + errMessage); + }; + this.appStoreReceipt = null; + log('refreshing appStoreReceipt'); + exec('appStoreRefreshReceipt', [], loaded, error); + } + loadReceipts(callback, errorCb) { + const loaded = (args) => { + const data = this.parseReceiptArgs(args); + this.appStoreReceipt = data; + protectCall(callback, 'loadReceipts.callback', data); + }; + const error = (errMessage) => { + // should not happen (native side never triggers an error) + // log('load failed: ' + errMessage); + // protectCall(this.options.error, 'options.error', ErrorCode.LOAD_RECEIPTS, 'Failed to load receipt: ' + errMessage); + // protectCall(errorCb, 'loadReceipts.error', ErrorCode.LOAD_RECEIPTS, 'Failed to load receipt: ' + errMessage); + }; + log('loading appStoreReceipt'); + exec('appStoreReceipt', [], loaded, error); + } + } + Bridge_1.Bridge = Bridge; + })(Bridge = AppleAppStore.Bridge || (AppleAppStore.Bridge = {})); + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Apple AppStore adapter using StoreKit version 1 + */ + let AppleAppStore; + (function (AppleAppStore) { + /** @internal */ + let Internal; + (function (Internal) { + class DiscountEligibilities { + constructor(request, response) { + this.request = request; + this.response = response; + } + isEligible(productId, discountType, discountId) { + var _a; + for (let i = 0; i < this.request.length; ++i) { + const req = this.request[i]; + if (req.productId === productId && req.discountId === discountId && req.discountType === discountType) { + return (_a = this.response[i]) !== null && _a !== void 0 ? _a : false; + } + } + return false; + } + } + Internal.DiscountEligibilities = DiscountEligibilities; + })(Internal = AppleAppStore.Internal || (AppleAppStore.Internal = {})); + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Apple AppStore adapter using StoreKit version 1 + */ + let AppleAppStore; + (function (AppleAppStore) { + AppleAppStore.DEFAULT_OFFER_ID = '$'; + class SKOffer extends CdvPurchase.Offer { + constructor(options, decorator) { + super(options, decorator); + this.offerType = options.offerType; + } + } + AppleAppStore.SKOffer = SKOffer; + class SKProduct extends CdvPurchase.Product { + constructor(validProduct, p, decorator, eligibilities) { + super(p, decorator); + this.raw = validProduct; + this.refresh(validProduct, decorator, eligibilities); + } + removeIneligibleDiscounts(eligibilities) { + this.offers = this.offers.filter(offer => { + const skOffer = offer; + if (skOffer.offerType === 'Default') + return true; + return eligibilities.isEligible(this.id, skOffer.offerType, offer.id); + }); + } + refresh(valid, decorator, eligibilities) { + var _a; + this.raw = valid; + this.title = valid.title; + this.description = valid.description; + this.countryCode = valid.countryCode; + if (valid.group) + this.group = valid.group; + this.removeIneligibleDiscounts(eligibilities); + // default offer + const finalPhase = { + price: valid.price, + priceMicros: valid.priceMicros, + currency: valid.currency, + billingPeriod: formatBillingPeriod(valid.billingPeriod, valid.billingPeriodUnit), + paymentMode: this.type === CdvPurchase.ProductType.PAID_SUBSCRIPTION ? CdvPurchase.PaymentMode.PAY_AS_YOU_GO : CdvPurchase.PaymentMode.UP_FRONT, + recurrenceMode: this.type === CdvPurchase.ProductType.PAID_SUBSCRIPTION ? CdvPurchase.RecurrenceMode.INFINITE_RECURRING : CdvPurchase.RecurrenceMode.NON_RECURRING, + }; + // intro price is now in the discounts array + // if (valid.introPrice && valid.introPriceMicros !== undefined) { + // const introPrice: PricingPhase = { + // price: valid.introPrice, + // priceMicros: valid.introPriceMicros, + // currency: valid.currency, + // billingPeriod: formatBillingPeriod(valid.introPricePeriod, valid.introPricePeriodUnit), + // paymentMode: valid.introPricePaymentMode, + // recurrenceMode: RecurrenceMode.FINITE_RECURRING, + // billingCycles: 1, + // } + // pricingPhases.push(introPrice); + // } + // discounts + (_a = valid.discounts) === null || _a === void 0 ? void 0 : _a.forEach(discount => { + if (eligibilities.isEligible(valid.id, discount.type, discount.id)) { + const pricingPhases = []; + const numCycles = discount.paymentMode === CdvPurchase.PaymentMode.PAY_AS_YOU_GO ? discount.period : 1; + const numPeriods = discount.paymentMode === CdvPurchase.PaymentMode.PAY_AS_YOU_GO ? 1 : discount.period; + const discountPhase = { + price: discount.price, + priceMicros: discount.priceMicros, + currency: valid.currency, + billingPeriod: formatBillingPeriod(numPeriods, discount.periodUnit), + billingCycles: numCycles, + paymentMode: discount.paymentMode, + recurrenceMode: CdvPurchase.RecurrenceMode.FINITE_RECURRING, + }; + pricingPhases.push(discountPhase); + pricingPhases.push(finalPhase); + this.addOffer(new SKOffer({ id: discount.id, product: this, pricingPhases, offerType: discount.type }, decorator)); + } + }); + if (!hasIntroductoryOffer(this)) { + this.addOffer(new SKOffer({ + id: AppleAppStore.DEFAULT_OFFER_ID, + product: this, + pricingPhases: [finalPhase], + offerType: 'Default', + }, decorator)); + } + function hasIntroductoryOffer(product) { + return product.offers.filter(offer => { + return offer.offerType === 'Introductory'; + }).length > 0; + } + /** + * Return ISO form of an IPeriodUnit + number of periods + */ + function formatBillingPeriod(numPeriods, period) { + if (numPeriods && period) + return `P${numPeriods}${period[0]}`; + else + return undefined; + } + } + } + AppleAppStore.SKProduct = SKProduct; + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let AppleAppStore; + (function (AppleAppStore) { + /** + * Transaction ID used for the application virtual transaction + */ + AppleAppStore.APPLICATION_VIRTUAL_TRANSACTION_ID = 'appstore.application'; + /** + * StoreKit 1 exposes a single receipt that contains all transactions. + */ + class SKApplicationReceipt extends CdvPurchase.Receipt { + constructor(applicationReceipt, needApplicationReceipt, decorator) { + super(CdvPurchase.Platform.APPLE_APPSTORE, decorator); + this.nativeData = applicationReceipt; + this.refresh(this.nativeData, needApplicationReceipt, decorator); + } + refresh(nativeData, needApplicationReceipt, decorator) { + this.nativeData = nativeData; + if (needApplicationReceipt) { + const existing = this.transactions.find(t => t.transactionId === AppleAppStore.APPLICATION_VIRTUAL_TRANSACTION_ID); + if (existing) { + return; + } + const t = new CdvPurchase.Transaction(CdvPurchase.Platform.APPLE_APPSTORE, this, decorator); + t.transactionId = AppleAppStore.APPLICATION_VIRTUAL_TRANSACTION_ID; + t.state = CdvPurchase.TransactionState.APPROVED; + t.products.push({ + id: nativeData.bundleIdentifier, + }); + this.transactions.push(t); + } + } + } + AppleAppStore.SKApplicationReceipt = SKApplicationReceipt; + /** StoreKit transaction */ + class SKTransaction extends CdvPurchase.Transaction { + refresh(productId, originalTransactionIdentifier, transactionDate, discountId) { + if (productId) + this.products = [{ id: productId, offerId: discountId }]; + if (originalTransactionIdentifier) + this.originalTransactionId = originalTransactionIdentifier; + if (transactionDate) + this.purchaseDate = new Date(+transactionDate); + } + } + AppleAppStore.SKTransaction = SKTransaction; + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let AppleAppStore; + (function (AppleAppStore) { + let VerifyReceipt; + (function (VerifyReceipt) { + /** The reason a subscription expired. + * https://developer.apple.com/documentation/appstorereceipts/expiration_intent + */ + let AppleExpirationIntent; + (function (AppleExpirationIntent) { + /** The customer voluntarily canceled their subscription. */ + AppleExpirationIntent["CANCELED"] = "1"; + /** Billing error; for example, the customer"s payment information was no longer valid. */ + AppleExpirationIntent["BILLING_ERROR"] = "2"; + /** The customer did not agree to a recent price increase. */ + AppleExpirationIntent["PRICE_INCREASE"] = "3"; + /** The product was not available for purchase at the time of renewal. */ + AppleExpirationIntent["PRODUCT_NOT_AVAILABLE"] = "4"; + /** Unknown error. */ + AppleExpirationIntent["UNKNOWN"] = "5"; + })(AppleExpirationIntent = VerifyReceipt.AppleExpirationIntent || (VerifyReceipt.AppleExpirationIntent = {})); + })(VerifyReceipt = AppleAppStore.VerifyReceipt || (AppleAppStore.VerifyReceipt = {})); + })(AppleAppStore = CdvPurchase.AppleAppStore || (CdvPurchase.AppleAppStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + // export type Nonce = { + // type: PaymentMethod.THREE_D_SECURE; + // value: string; + // }; + // export type NonceProvider = (type: PaymentMethod, callback: Callback) => void; + // export enum PaymentMethod { + // THREE_D_SECURE = 'THREE_D_SECURE', + // } + class BraintreeReceipt extends CdvPurchase.Receipt { + constructor(paymentRequest, dropInResult, decorator) { + // Now we have to send this to the server + the request + // result.paymentDescription; // "1111" + // result.paymentMethodType; // "VISA" + // result.deviceData; // undefined + // result.paymentMethodNonce; // {"isDefault":false,"nonce":"tokencc_bh_rdjmsc_76vjtq_9tzsv3_4467mg_tt4"} + var _a, _b, _c; + super(CdvPurchase.Platform.BRAINTREE, decorator); + const transaction = new CdvPurchase.Transaction(CdvPurchase.Platform.BRAINTREE, this, decorator); + transaction.purchaseDate = new Date(); + transaction.products = ((_a = paymentRequest.items) === null || _a === void 0 ? void 0 : _a.filter(p => p).map(product => ({ id: (product === null || product === void 0 ? void 0 : product.id) || '' }))) || []; + transaction.state = CdvPurchase.TransactionState.APPROVED; + transaction.transactionId = (_c = (_b = dropInResult.paymentMethodNonce) === null || _b === void 0 ? void 0 : _b.nonce) !== null && _c !== void 0 ? _c : `UNKNOWN_${dropInResult.paymentMethodType}_${dropInResult.paymentDescription}`; + this.transactions = [transaction]; + this.dropInResult = dropInResult; + this.paymentRequest = paymentRequest; + this.refresh(paymentRequest, dropInResult, decorator); + } + refresh(paymentRequest, dropInResult, decorator) { + var _a, _b; + this.dropInResult = dropInResult; + this.paymentRequest = paymentRequest; + const transaction = new CdvPurchase.Transaction(CdvPurchase.Platform.BRAINTREE, this, decorator); + transaction.products = paymentRequest.items.filter(p => p).map(product => ({ id: (product === null || product === void 0 ? void 0 : product.id) || '' })); + transaction.state = CdvPurchase.TransactionState.APPROVED; + transaction.transactionId = (_b = (_a = dropInResult.paymentMethodNonce) === null || _a === void 0 ? void 0 : _a.nonce) !== null && _b !== void 0 ? _b : `UNKNOWN_${dropInResult.paymentMethodType}_${dropInResult.paymentDescription}`; + transaction.amountMicros = paymentRequest.amountMicros; + transaction.currency = paymentRequest.currency; + this.transactions = [transaction]; + } + } + Braintree.BraintreeReceipt = BraintreeReceipt; + class Adapter { + constructor(context, options) { + this.id = CdvPurchase.Platform.BRAINTREE; + this.name = 'BrainTree'; + this.ready = false; + this.products = []; + this._receipts = []; + this.context = context; + this.log = context.log.child("Braintree"); + this.options = options; + } + get receipts() { return this._receipts; } + get isSupported() { + return Braintree.IosBridge.Bridge.isSupported() || Braintree.AndroidBridge.Bridge.isSupported(); + } + /** + * Initialize the Braintree Adapter. + */ + initialize() { + return new Promise(resolve => { + this.log.info("initialize()"); + if (Braintree.IosBridge.Bridge.isSupported()) { + this.log.info("instantiating ios bridge..."); + this.iosBridge = new Braintree.IosBridge.Bridge(this.log, (callback) => { + if (this.options.tokenizationKey) + callback(this.options.tokenizationKey); + else if (this.options.clientTokenProvider) + this.options.clientTokenProvider(callback); + else + callback(CdvPurchase.storeError(CdvPurchase.ErrorCode.CLIENT_INVALID, 'Braintree iOS Bridge requires a clientTokenProvider or tokenizationKey')); + }, this.options.applePay); + this.iosBridge.initialize(this.context, resolve); + } + else if (Braintree.AndroidBridge.Bridge.isSupported() && !this.androidBridge) { + this.log.info("instantiating android bridge..."); + this.androidBridge = new Braintree.AndroidBridge.Bridge(this.log); + this.log.info("calling android bridge -> initialize..."); + const auth = this.options.tokenizationKey + ? this.options.tokenizationKey + : this.options.clientTokenProvider + ? this.options.clientTokenProvider + : ''; + this.androidBridge.initialize(auth, resolve); + } + else { + this.log.info("platform not supported..."); + resolve(undefined); + } + this.context.listener.receiptsReady(CdvPurchase.Platform.BRAINTREE); + }); + } + async loadProducts(products) { + return products.map(p => CdvPurchase.storeError(CdvPurchase.ErrorCode.PRODUCT_NOT_AVAILABLE, 'N/A')); + } + async loadReceipts() { + this.context.listener.receiptsReady(CdvPurchase.Platform.BRAINTREE); + return []; + } + async order(offer) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'N/A: Not implemented with Braintree'); + } + async finish(transaction) { + transaction.state = CdvPurchase.TransactionState.FINISHED; + this.context.listener.receiptsUpdated(CdvPurchase.Platform.TEST, [transaction.parentReceipt]); + return; + } + async manageSubscriptions() { + this.log.info('N/A: manageSubscriptions() is not available with Braintree'); + return; + } + async manageBilling() { + this.log.info('N/A: manageBilling() is not available with Braintree'); + return; + } + // async getNonce(paymentMethod: PaymentMethod): Promise { + // return new Promise(resolve => { + // if (this.options.nonceProvider) { + // this.options.nonceProvider(paymentMethod, resolve); + // } + // else { + // resolve({ + // code: ErrorCode.UNAUTHORIZED_REQUEST_DATA, + // message: 'Braintree requires a nonceProvider', + // }); + // } + // }); + // } + async launchDropIn(paymentRequest, dropInRequest) { + if (this.androidBridge) + return this.androidBridge.launchDropIn(dropInRequest); + if (this.iosBridge) + return this.iosBridge.launchDropIn(paymentRequest, dropInRequest); + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Braintree is not available'); + } + async requestPayment(paymentRequest, additionalData) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + this.log.info("requestPayment()" + JSON.stringify(paymentRequest)); + const dropInRequest = ((_a = additionalData === null || additionalData === void 0 ? void 0 : additionalData.braintree) === null || _a === void 0 ? void 0 : _a.dropInRequest) || {}; + // Apple Pay + if (!await Braintree.IosBridge.ApplePayPlugin.isSupported(this.log)) { + this.log.info("Apple Pay is not supported."); + dropInRequest.applePayDisabled = true; + } + // Google Pay + if (this.options.googlePay || dropInRequest.googlePayRequest) { + const googlePay = Object.assign(Object.assign({}, ((_b = this.options.googlePay) !== null && _b !== void 0 ? _b : {})), ((_c = dropInRequest.googlePayRequest) !== null && _c !== void 0 ? _c : {})); + if (!googlePay.transactionInfo) { + googlePay.transactionInfo = { + currencyCode: ((_d = paymentRequest.currency) !== null && _d !== void 0 ? _d : ''), + totalPrice: ((_e = paymentRequest.amountMicros) !== null && _e !== void 0 ? _e : 0) / 1000000, + totalPriceStatus: Braintree.GooglePay.TotalPriceStatus.FINAL, + }; + } + dropInRequest.googlePayRequest = googlePay; + } + // 3DS + if (this.options.threeDSecure || dropInRequest.threeDSecureRequest) { + const threeDS = Object.assign(Object.assign({}, ((_f = this.options.threeDSecure) !== null && _f !== void 0 ? _f : {})), ((_g = dropInRequest.threeDSecureRequest) !== null && _g !== void 0 ? _g : {})); + if (!threeDS.amount) { + threeDS.amount = asDecimalString((_h = paymentRequest.amountMicros) !== null && _h !== void 0 ? _h : 0); + } + if (!threeDS.billingAddress && paymentRequest.billingAddress) { + threeDS.billingAddress = { + givenName: paymentRequest.billingAddress.givenName, + surname: paymentRequest.billingAddress.surname, + countryCodeAlpha2: paymentRequest.billingAddress.countryCode, + postalCode: paymentRequest.billingAddress.postalCode, + locality: paymentRequest.billingAddress.locality, + streetAddress: paymentRequest.billingAddress.streetAddress1, + extendedAddress: paymentRequest.billingAddress.streetAddress2, + line3: paymentRequest.billingAddress.streetAddress3, + phoneNumber: paymentRequest.billingAddress.phoneNumber, + region: paymentRequest.billingAddress.region, + }; + } + if (!threeDS.email) { + threeDS.email = paymentRequest.email; + } + dropInRequest.threeDSecureRequest = threeDS; + } + const response = await this.launchDropIn(paymentRequest, dropInRequest); + if (!dropInResponseIsOK(response)) + return dropInResponseError(this.log, response); + const dropInResult = response; + this.log.info("launchDropIn success: " + JSON.stringify({ paymentRequest, dropInResult })); + if (!((_j = dropInResult.paymentMethodNonce) === null || _j === void 0 ? void 0 : _j.nonce)) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.BAD_RESPONSE, 'launchDropIn returned no paymentMethodNonce'); + } + let receipt = this._receipts.find(r => { var _a, _b; return ((_a = r.dropInResult.paymentMethodNonce) === null || _a === void 0 ? void 0 : _a.nonce) === ((_b = dropInResult.paymentMethodNonce) === null || _b === void 0 ? void 0 : _b.nonce); }); + if (receipt) { + receipt.refresh(paymentRequest, dropInResult, this.context.apiDecorators); + } + else { + receipt = new BraintreeReceipt(paymentRequest, dropInResult, this.context.apiDecorators); + this.receipts.push(receipt); + } + this.context.listener.receiptsUpdated(CdvPurchase.Platform.BRAINTREE, [receipt]); + return receipt.transactions[0]; + } + async receiptValidationBody(receipt) { + var _a, _b, _c, _d, _e; + if (!isBraintreeReceipt(receipt)) { + this.log.error("Unexpected error, expecting a BraintreeReceipt: " + JSON.stringify(receipt)); + return; + } + this.log.info("create receiptValidationBody for: " + JSON.stringify(receipt)); + return { + id: (_c = (_b = (_a = receipt.paymentRequest.items) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : 'unknown', + type: CdvPurchase.ProductType.CONSUMABLE, + priceMicros: receipt.paymentRequest.amountMicros, + currency: receipt.paymentRequest.currency, + products: [], + transaction: { + type: CdvPurchase.Platform.BRAINTREE, + deviceData: receipt.dropInResult.deviceData, + id: 'nonce', + paymentMethodNonce: (_e = (_d = receipt.dropInResult.paymentMethodNonce) === null || _d === void 0 ? void 0 : _d.nonce) !== null && _e !== void 0 ? _e : '', + paymentDescription: receipt.dropInResult.paymentDescription, + paymentMethodType: receipt.dropInResult.paymentMethodType, + } + }; + } + /** + * Handle a response from a receipt validation process. + * + * @param receipt The receipt being validated. + * @param response The response payload from the receipt validation process. + * @returns A promise that resolves when the response has been handled. + */ + async handleReceiptValidationResponse(receipt, response) { + var _a; + this.log.info("receipt validation response: " + JSON.stringify(response)); + if ((response === null || response === void 0 ? void 0 : response.data) && ('transaction' in response.data)) { + if (response.data.transaction.type === 'braintree') { + const lCustomerId = (_a = response.data.transaction.data.transaction) === null || _a === void 0 ? void 0 : _a.customer.id; + if (lCustomerId && !Braintree.customerId) { + this.log.info("customerId updated: " + lCustomerId); + Braintree.customerId = lCustomerId; + } + } + } + } + checkSupport(functionality) { + return functionality === 'requestPayment'; + } + async restorePurchases() { + } + } + Braintree.Adapter = Adapter; + function asDecimalString(amountMicros) { + const amountCents = '' + (amountMicros / 10000); + return (amountCents.slice(0, -2) || '0') + '.' + (amountCents.slice(-2, -1) || '0') + (amountCents.slice(-1) || '0'); + } + function isBraintreeReceipt(receipt) { + return receipt.platform === CdvPurchase.Platform.BRAINTREE; + } + const dropInResponseIsOK = (response) => { + return (!!response) && !('code' in response && 'message' in response); + }; + /** + * Returns the error response from Drop In + * + * If the "error" is that the user cancelled the payment, then returns undefined + * (as per the specification for requestPayment) + */ + const dropInResponseError = (log, response) => { + if (!response) { + log.warn("launchDropIn failed: no response"); + return CdvPurchase.storeError(CdvPurchase.ErrorCode.BAD_RESPONSE, 'Braintree failed to launch drop in'); + } + else { + // Failed + if (response.code === CdvPurchase.ErrorCode.PAYMENT_CANCELLED) { + log.info("User cancelled the payment request"); + return undefined; + } + log.warn("launchDropIn failed: " + JSON.stringify(response)); + return response; + } + }; + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + /** + * Cordova plugin ID for the braintree plugin. + */ + const PLUGIN_ID = 'BraintreePlugin'; + let AndroidBridge; + (function (AndroidBridge) { + /** + * Bridge to access native functions. + * + * This tries to export pretty raw functions from the underlying native SDKs. + */ + class Bridge { + constructor(log) { + this.log = log.child("AndroidBridge"); + } + /** Receive asynchronous messages from the native side */ + listener(msg) { + // Handle changes to purchase that are being notified + // through the PurchasesUpdatedListener on the native side (android) + this.log.debug('listener: ' + JSON.stringify(msg)); + if (!msg || !msg.type) { + return; + } + if (msg.type === "getClientToken") { + this.getClientToken(); + } + else if (msg.type === "ready") { + } + } + // Braintree reported an error + // private onError(message: string) { + // this.log.warn("Braintree reported an error: " + message); + // // TODO - bubble that up to the client + // } + /* + * Initialize the braintree client. + * + * @param clientTokenProvider Provide clientTokens to the SDK when it needs them. + */ + initialize(clientTokenProvider, callback) { + try { + // Set a listener (see "listener()" function above) + if (typeof clientTokenProvider === 'string') { + const token = clientTokenProvider; + this.clientTokenProvider = (callback) => { callback(token); }; + } + else { + this.clientTokenProvider = clientTokenProvider; + } + this.log.info("exec.setListener()"); + const listener = this.listener.bind(this); + window.cordova.exec(listener, null, PLUGIN_ID, "setListener", []); + callback(undefined); + } + catch (err) { + this.log.warn("initialization failed: " + (err === null || err === void 0 ? void 0 : err.message)); + callback(CdvPurchase.storeError(CdvPurchase.ErrorCode.SETUP, 'Failed to initialize Braintree Android Bridge: ' + (err === null || err === void 0 ? void 0 : err.message))); + } + } + /** + * Fetches a client token and sends it to the SDK. + * + * This method is called by the native side when the SDK requests a Client Token. + */ + getClientToken() { + this.log.info("getClientToken()"); + if (this.clientTokenProvider) { + this.log.debug("clientTokenProvider set, calling."); + this.clientTokenProvider((value) => { + if (typeof value === 'string') { + window.cordova.exec(null, null, PLUGIN_ID, "onClientTokenSuccess", [value]); + } + else { + window.cordova.exec(null, null, PLUGIN_ID, "onClientTokenFailure", [value.code, value.message]); + } + }); + } + else { + this.log.debug("clientTokenProvider not set, retrying later..."); + setTimeout(() => this.getClientToken(), 1000); // retry after 1s (over and over) + } + } + /** Returns true on Android, the only platform supported by this Braintree bridge */ + static isSupported() { + return window.cordova.platformId === 'android'; + } + async isApplePaySupported() { + return false; + } + launchDropIn(dropInRequest) { + return new Promise(resolve => { + window.cordova.exec((result) => { + this.log.info("dropInSuccess: " + JSON.stringify(result)); + resolve(result); + }, (err) => { + this.log.info("dropInFailure: " + err); + const errCode = err.split("|")[0]; + const errMessage = err.split("|").slice(1).join(''); + if (errCode === "UserCanceledException") { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_CANCELLED, errMessage)); + } + else if (errCode === "AuthorizationException") { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.UNAUTHORIZED_REQUEST_DATA, errMessage)); + } + else { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, err)); + } + }, PLUGIN_ID, "launchDropIn", [dropInRequest]); + }); + } + } + AndroidBridge.Bridge = Bridge; + // /** + // * Successful callback result for the presentDropInPaymentUI method. + // */ + // interface PaymentUIResult { + // /** + // * Indicates if the user used the cancel button to close the dialog without + // * completing the payment. + // */ + // userCancelled: boolean; + // /** + // * The nonce for the payment transaction (if a payment was completed). + // */ + // nonce: string; + // /** + // * The payment type (if a payment was completed). + // */ + // type: string; + // /** + // * A description of the payment method (if a payment was completed). + // */ + // localizedDescription: string; + // /** + // * Information about the credit card used to complete a payment (if a credit card was used). + // */ + // card: { + // /** + // * The last two digits of the credit card used. + // */ + // lastTwo: string; + // /** + // * An enumerated value used to indicate the type of credit card used. + // * + // * Can be one of the following values: + // * + // * BTCardNetworkUnknown + // * BTCardNetworkAMEX + // * BTCardNetworkDinersClub + // * BTCardNetworkDiscover + // * BTCardNetworkMasterCard + // * BTCardNetworkVisa + // * BTCardNetworkJCB + // * BTCardNetworkLaser + // * BTCardNetworkMaestro + // * BTCardNetworkUnionPay + // * BTCardNetworkSolo + // * BTCardNetworkSwitch + // * BTCardNetworkUKMaestro + // */ + // network: string; + // }; + // /** + // * Information about the PayPal account used to complete a payment (if a PayPal account was used). + // */ + // payPalAccount: { + // email: string; + // firstName: string; + // lastName: string; + // phone: string; + // billingAddress: string; + // shippingAddress: string; + // clientMetadataId: string; + // payerId: string; + // }; + // /** + // * Information about the Apple Pay card used to complete a payment (if Apple Pay was used). + // */ + // applePaycard: { + // }; + // /** + // * Information about 3D Secure card used to complete a payment (if 3D Secure was used). + // */ + // threeDSecureInfo: { + // liabilityShifted: boolean; + // liabilityShiftPossible: boolean; + // }; + // /** + // * Information about Venmo account used to complete a payment (if a Venmo account was used). + // */ + // venmoAccount: { + // username: string; + // }; + // } + })(AndroidBridge = Braintree.AndroidBridge || (Braintree.AndroidBridge = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + let IosBridge; + (function (IosBridge) { + /** + * Cordova plugin ID for the braintree-applepay plugin. + */ + const PLUGIN_ID = 'BraintreeApplePayPlugin'; + /** + * Bridge to the cordova-plugin-purchase-braintree-applepay plugin + */ + class ApplePayPlugin { + /** + * Retrieve the plugin definition. + * + * Useful to check if it is installed. + */ + static get() { + return window.CdvPurchaseBraintreeApplePay; + } + /** + * Initiate a payment with Apple Pay. + */ + static requestPayment(request) { + return new Promise(resolve => { + var _a; + if (!((_a = ApplePayPlugin.get()) === null || _a === void 0 ? void 0 : _a.installed)) { + return resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.SETUP, 'cordova-plugin-purchase-braintree-applepay does not appear to be installed.')); + } + else { + const success = (result) => { + resolve(result); + }; + const failure = (err) => { + const message = err !== null && err !== void 0 ? err : 'payment request failed'; + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Braintree+ApplePay ERROR: ' + message)); + }; + window.cordova.exec(success, failure, PLUGIN_ID, 'presentDropInPaymentUI', [request]); + } + }); + } + /** + * Returns true if the device supports Apple Pay. + * + * This does not necessarily mean the user has a card setup already. + */ + static isSupported(log) { + return new Promise(resolve => { + var _a; + if (window.cordova.platformId !== 'ios') { + log.info('BraintreeApplePayPlugin is only available for ios.'); + return resolve(false); + } + if (!((_a = ApplePayPlugin.get()) === null || _a === void 0 ? void 0 : _a.installed)) { + log.info('BraintreeApplePayPlugin does not appear to be installed.'); + return resolve(false); + } + try { + window.cordova.exec((result) => { + resolve(result); + }, () => { + log.info('BraintreeApplePayPlugin is not available.'); + resolve(false); + }, PLUGIN_ID, "isApplePaySupported", []); + } + catch (err) { + log.info('BraintreeApplePayPlugin is not installed.'); + resolve(false); + } + }); + } + } + IosBridge.ApplePayPlugin = ApplePayPlugin; + })(IosBridge = Braintree.IosBridge || (Braintree.IosBridge = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + /** + * Cordova plugin ID for the braintree ios plugin. + */ + const PLUGIN_ID = 'BraintreePlugin'; + let IosBridge; + (function (IosBridge) { + class Bridge { + constructor(log, clientTokenProvider, applePayOptions) { + this.log = log.child("IosBridge"); + this.clientTokenProvider = clientTokenProvider; + this.applePayOptions = applePayOptions; + } + initialize(verbosity, callback) { + window.cordova.exec(null, null, "BraintreePlugin", "setVerbosity", [verbosity.verbosity]); + window.cordova.exec(message => this.log.debug('(Native) ' + message), null, "BraintreePlugin", "setLogger", []); + setTimeout(() => callback(undefined), 0); + } + async continueDropInForApplePay(paymentRequest, DropInRequest, dropInResult) { + var _a, _b, _c, _d, _e, _f, _g, _h, _j; + const request = ((_b = (_a = this.applePayOptions) === null || _a === void 0 ? void 0 : _a.preparePaymentRequest) === null || _b === void 0 ? void 0 : _b.call(_a, paymentRequest)) || { + merchantCapabilities: [CdvPurchase.ApplePay.MerchantCapability.ThreeDS], + }; + if (!request.paymentSummaryItems) { + const items = paymentRequest.items.filter(p => p).map((product, index) => { + var _a, _b, _c; + return ({ + type: 'final', + label: (product === null || product === void 0 ? void 0 : product.title) || (product === null || product === void 0 ? void 0 : product.id) || `Item #${index + 1}`, + amount: `${Math.round(((_c = (_b = (_a = product === null || product === void 0 ? void 0 : product.pricing) === null || _a === void 0 ? void 0 : _a.priceMicros) !== null && _b !== void 0 ? _b : paymentRequest.amountMicros) !== null && _c !== void 0 ? _c : 0) / 10000) / 100}`, + }); + }); + const total = { + type: 'final', + label: (_d = (_c = this.applePayOptions) === null || _c === void 0 ? void 0 : _c.companyName) !== null && _d !== void 0 ? _d : 'Total', + amount: `${Math.round(((_e = paymentRequest.amountMicros) !== null && _e !== void 0 ? _e : 0) / 10000) / 100}`, + }; + request.paymentSummaryItems = [...items, total]; + } + const result = await IosBridge.ApplePayPlugin.requestPayment(request); + this.log.info('Result from Apple Pay: ' + JSON.stringify(result)); + if ('isError' in result) + return result; + if (result.userCancelled) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_CANCELLED, 'User cancelled the payment request'); + } + return { + paymentMethodNonce: { + isDefault: false, + nonce: (_g = (_f = result.applePayCardNonce) === null || _f === void 0 ? void 0 : _f.nonce) !== null && _g !== void 0 ? _g : '', + type: (_j = (_h = result.applePayCardNonce) === null || _h === void 0 ? void 0 : _h.type) !== null && _j !== void 0 ? _j : '', + }, + paymentMethodType: dropInResult.paymentMethodType, + deviceData: dropInResult.deviceData, + paymentDescription: dropInResult.paymentDescription, + }; + } + launchDropIn(paymentRequest, dropInRequest) { + return new Promise(async (resolve) => { + const onSuccess = (result) => { + this.log.info("dropInSuccess: " + JSON.stringify(result)); + if (result.paymentMethodType === Braintree.DropIn.PaymentMethod.APPLE_PAY) { + this.log.info("it's an ApplePay request, we have to process it."); + this.continueDropInForApplePay(paymentRequest, dropInRequest, result).then(resolve); + } + else { + resolve(result); + } + }; + const onError = (errorString) => { + this.log.info("dropInFailure: " + errorString); + const [errCode, errMessage] = errorString.split('|'); + if (errCode === "UserCanceledException") { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_CANCELLED, errMessage)); + } + else { + resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'ERROR ' + errCode + ': ' + errMessage)); + } + }; + this.clientTokenProvider((clientToken) => { + if (typeof clientToken === 'string') + window.cordova.exec(onSuccess, onError, "BraintreePlugin", "launchDropIn", [clientToken, dropInRequest]); + else // failed to get token + resolve(clientToken); + }); + }); + } + braintreePlugin() { + return window.CdvPurchaseBraintree; + } + static isSupported() { + return window.cordova.platformId === 'ios'; + } + } + IosBridge.Bridge = Bridge; + })(IosBridge = Braintree.IosBridge || (Braintree.IosBridge = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + let DropIn; + (function (DropIn) { + /** How a field will behave in CardForm. */ + let CardFormFieldStatus; + (function (CardFormFieldStatus) { + CardFormFieldStatus[CardFormFieldStatus["DISABLED"] = 0] = "DISABLED"; + CardFormFieldStatus[CardFormFieldStatus["OPTIONAL"] = 1] = "OPTIONAL"; + CardFormFieldStatus[CardFormFieldStatus["REQUIRED"] = 2] = "REQUIRED"; + })(CardFormFieldStatus = DropIn.CardFormFieldStatus || (DropIn.CardFormFieldStatus = {})); + })(DropIn = Braintree.DropIn || (Braintree.DropIn = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + let DropIn; + (function (DropIn) { + /** Payment method used or selected by the user. */ + let PaymentMethod; + (function (PaymentMethod) { + /** Google only */ + PaymentMethod["GOOGLE_PAY"] = "GOOGLE_PAY"; + /** ios only */ + PaymentMethod["LASER"] = "LASER"; + /** ios only */ + PaymentMethod["UK_MAESTRO"] = "UK_MAESTRO"; + /** ios only */ + PaymentMethod["SWITCH"] = "SWITCH"; + /** ios only */ + PaymentMethod["SOLOR"] = "SOLO"; + /** ios only */ + PaymentMethod["APPLE_PAY"] = "APPLE_PAY"; + PaymentMethod["AMEX"] = "AMEX"; + PaymentMethod["DINERS_CLUB"] = "DINERS_CLUB"; + PaymentMethod["DISCOVER"] = "DISCOVER"; + PaymentMethod["JCB"] = "JCB"; + PaymentMethod["MAESTRO"] = "MAESTRO"; + PaymentMethod["MASTERCARD"] = "MASTERCARD"; + PaymentMethod["PAYPAL"] = "PAYPAL"; + PaymentMethod["VISA"] = "VISA"; + PaymentMethod["VENMO"] = "VENMO"; + PaymentMethod["UNIONPAY"] = "UNIONPAY"; + PaymentMethod["HIPER"] = "HIPER"; + PaymentMethod["HIPERCARD"] = "HIPERCARD"; + PaymentMethod["UNKNOWN"] = "UNKNOWN"; + })(PaymentMethod = DropIn.PaymentMethod || (DropIn.PaymentMethod = {})); + })(DropIn = Braintree.DropIn || (Braintree.DropIn = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + let GooglePay; + (function (GooglePay) { + /** + * The Google Pay API will collect the billing address for you if required + */ + let BillingAddressFormat; + (function (BillingAddressFormat) { + /** + * When this format is used, the billing address returned will only contain the minimal info, including name, country code, and postal code. + * + * Note that some countries do not use postal codes, so the postal code field will be empty in those countries. + */ + BillingAddressFormat[BillingAddressFormat["MIN"] = 0] = "MIN"; + /** + * When this format is used, the billing address returned will be the full address. + * + * Only select this format when it's required to process the order since it can increase friction during the checkout process and can lead to a lower conversion rate. + */ + BillingAddressFormat[BillingAddressFormat["FULL"] = 1] = "FULL"; + })(BillingAddressFormat = GooglePay.BillingAddressFormat || (GooglePay.BillingAddressFormat = {})); + /** + * This enum represents the status of the total price of a transaction. + * + * It can take on one of the following values: + * - TotalPriceStatus.NOT_CURRENTLY_KNOWN: The total price is not currently known. + * - TotalPriceStatus.ESTIMATED: The total price is an estimate. + * - TotalPriceStatus.FINAL: The total price is final. + */ + let TotalPriceStatus; + (function (TotalPriceStatus) { + /** The total price is not currently known. */ + TotalPriceStatus[TotalPriceStatus["NOT_CURRENTLY_KNOWN"] = 1] = "NOT_CURRENTLY_KNOWN"; + /** The total price is an estimate. */ + TotalPriceStatus[TotalPriceStatus["ESTIMATED"] = 2] = "ESTIMATED"; + /** The total price is final. */ + TotalPriceStatus[TotalPriceStatus["FINAL"] = 3] = "FINAL"; + })(TotalPriceStatus = GooglePay.TotalPriceStatus || (GooglePay.TotalPriceStatus = {})); + })(GooglePay = Braintree.GooglePay || (Braintree.GooglePay = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Braintree; + (function (Braintree) { + let ThreeDSecure; + (function (ThreeDSecure) { + /** The account type */ + let AccountType; + (function (AccountType) { + AccountType["UNSPECIFIED"] = "00"; + AccountType["CREDIT"] = "01"; + AccountType["DEBIT"] = "02"; + })(AccountType = ThreeDSecure.AccountType || (ThreeDSecure.AccountType = {})); + /** The shipping method */ + let ShippingMethod; + (function (ShippingMethod) { + /** Unspecified */ + ShippingMethod[ShippingMethod["UNSPECIFIED"] = 0] = "UNSPECIFIED"; + /** Same say */ + ShippingMethod[ShippingMethod["SAME_DAY"] = 1] = "SAME_DAY"; + /** Overnight / Expedited */ + ShippingMethod[ShippingMethod["EXPEDITED"] = 2] = "EXPEDITED"; + /** Priority */ + ShippingMethod[ShippingMethod["PRIORITY"] = 3] = "PRIORITY"; + /** Ground */ + ShippingMethod[ShippingMethod["GROUND"] = 4] = "GROUND"; + /** Electronic delivery */ + ShippingMethod[ShippingMethod["ELECTRONIC_DELIVERY"] = 5] = "ELECTRONIC_DELIVERY"; + /** Ship to store */ + ShippingMethod[ShippingMethod["SHIP_TO_STORE"] = 6] = "SHIP_TO_STORE"; + })(ShippingMethod = ThreeDSecure.ShippingMethod || (ThreeDSecure.ShippingMethod = {})); + let Version; + (function (Version) { + /** 3DS 1.0 */ + Version[Version["V1"] = 0] = "V1"; + /** 3DS 2.0 */ + Version[Version["V2"] = 1] = "V2"; + })(Version = ThreeDSecure.Version || (ThreeDSecure.Version = {})); + })(ThreeDSecure = Braintree.ThreeDSecure || (Braintree.ThreeDSecure = {})); + })(Braintree = CdvPurchase.Braintree || (CdvPurchase.Braintree = {})); +})(CdvPurchase || (CdvPurchase = {})); +/// +/// +var CdvPurchase; +(function (CdvPurchase) { + let GooglePlay; + (function (GooglePlay) { + class Transaction extends CdvPurchase.Transaction { + constructor(purchase, parentReceipt, decorator) { + super(CdvPurchase.Platform.GOOGLE_PLAY, parentReceipt, decorator); + this.nativePurchase = purchase; + this.refresh(purchase); + } + static toState(state, isAcknowledged) { + switch (state) { + case GooglePlay.Bridge.PurchaseState.PENDING: + return CdvPurchase.TransactionState.INITIATED; + case GooglePlay.Bridge.PurchaseState.PURCHASED: + // if (isAcknowledged) + // return TransactionState.FINISHED; (this prevents receipt validation...) + // else + return CdvPurchase.TransactionState.APPROVED; + case GooglePlay.Bridge.PurchaseState.UNSPECIFIED_STATE: + return CdvPurchase.TransactionState.UNKNOWN_STATE; + } + } + /** + * Refresh the value in the transaction based on the native purchase update + */ + refresh(purchase) { + this.nativePurchase = purchase; + this.transactionId = `${purchase.orderId || purchase.purchaseToken}`; + this.purchaseId = `${purchase.purchaseToken}`; + this.products = purchase.productIds.map(productId => ({ id: productId })); + if (purchase.purchaseTime) + this.purchaseDate = new Date(purchase.purchaseTime); + this.isPending = (purchase.getPurchaseState === GooglePlay.Bridge.PurchaseState.PENDING); + if (typeof purchase.acknowledged !== 'undefined') + this.isAcknowledged = purchase.acknowledged; + if (typeof purchase.autoRenewing !== 'undefined') + this.renewalIntent = purchase.autoRenewing ? CdvPurchase.RenewalIntent.RENEW : CdvPurchase.RenewalIntent.LAPSE; + this.state = Transaction.toState(purchase.getPurchaseState, purchase.acknowledged); + } + } + GooglePlay.Transaction = Transaction; + class Receipt extends CdvPurchase.Receipt { + /** @internal */ + constructor(purchase, decorator) { + super(CdvPurchase.Platform.GOOGLE_PLAY, decorator); + this.transactions = [new Transaction(purchase, this, decorator)]; + this.purchaseToken = purchase.purchaseToken; + this.orderId = purchase.orderId; + } + /** Refresh the content of the purchase based on the native BridgePurchase */ + refreshPurchase(purchase) { + var _a; + (_a = this.transactions[0]) === null || _a === void 0 ? void 0 : _a.refresh(purchase); + this.orderId = purchase.orderId; + } + } + GooglePlay.Receipt = Receipt; + class Adapter { + constructor(context, autoRefreshIntervalMillis = 1000 * 3600 * 24) { + /** Adapter identifier */ + this.id = CdvPurchase.Platform.GOOGLE_PLAY; + /** Adapter name */ + this.name = 'GooglePlay'; + /** Has the adapter been successfully initialized */ + this.ready = false; + this._receipts = []; + /** The GooglePlay bridge */ + this.bridge = new GooglePlay.Bridge.Bridge(); + /** Prevent double initialization */ + this.initialized = false; + /** Used to retry failed commands */ + this.retry = new CdvPurchase.Internal.Retry(); + this.autoRefreshIntervalMillis = 0; + if (Adapter._instance) + throw new Error('GooglePlay adapter already initialized'); + this._products = new GooglePlay.Products(context.apiDecorators); + this.autoRefreshIntervalMillis = autoRefreshIntervalMillis; + this.context = context; + this.log = context.log.child('GooglePlay'); + Adapter._instance = this; + } + /** List of products managed by the GooglePlay adapter */ + get products() { return this._products.products; } + get receipts() { return this._receipts; } + /** Returns true on Android, the only platform supported by this adapter */ + get isSupported() { + return window.cordova.platformId === 'android'; + } + async initialize() { + this.log.info("Initialize"); + if (this.initializationPromise) + return this.initializationPromise; + return this.initializationPromise = new Promise((resolve) => { + const bridgeLogger = this.log.child('Bridge'); + const iabOptions = { + onSetPurchases: this.onSetPurchases.bind(this), + onPurchasesUpdated: this.onPurchasesUpdated.bind(this), + onPurchaseConsumed: this.onPurchaseConsumed.bind(this), + showLog: this.context.verbosity >= CdvPurchase.LogLevel.DEBUG ? true : false, + log: (msg) => bridgeLogger.info(msg), + }; + const iabReady = () => { + this.log.debug("Ready"); + // Auto-refresh every 24 hours (or autoRefreshIntervalMillis) + if (this.autoRefreshIntervalMillis > 0) { + window.setInterval(() => this.getPurchases(), this.autoRefreshIntervalMillis); + } + resolve(undefined); + }; + const iabError = (err) => { + this.initialized = false; + this.context.error(CdvPurchase.storeError(CdvPurchase.ErrorCode.SETUP, "Init failed - " + err)); + this.retry.retry(() => this.initialize()); + }; + this.bridge.init(iabReady, iabError, iabOptions); + }); + } + /** Prepare the list of SKUs sorted by type */ + getSkusOf(products) { + const inAppSkus = []; + const subsSkus = []; + for (const product of products) { + if (product.type === CdvPurchase.ProductType.PAID_SUBSCRIPTION) + subsSkus.push(product.id); + else + inAppSkus.push(product.id); + } + return { inAppSkus, subsSkus }; + } + /** @inheritdoc */ + loadReceipts() { + return new Promise((resolve) => { + // let's also refresh purchases + this.getPurchases() + .then(err => { + resolve(this._receipts); + }); + }); + } + /** @inheritDoc */ + loadProducts(products) { + return new Promise((resolve) => { + this.log.debug("Load: " + JSON.stringify(products)); + /** Called when a list of product definitions have been loaded */ + const iabLoaded = (validProducts) => { + this.log.debug("Loaded: " + JSON.stringify(validProducts)); + const ret = products.map(registeredProduct => { + const validProduct = validProducts.find(vp => vp.productId === registeredProduct.id); + if (validProduct && validProduct.productId) { + return this._products.addProduct(registeredProduct, validProduct); + } + else { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.INVALID_PRODUCT_ID, `Product with id ${registeredProduct.id} not found.`); + } + }); + resolve(ret); + }; + /** Start loading products */ + const go = () => { + const { inAppSkus, subsSkus } = this.getSkusOf(products); + this.log.debug("getAvailableProducts: " + JSON.stringify(inAppSkus) + " | " + JSON.stringify(subsSkus)); + this.bridge.getAvailableProducts(inAppSkus, subsSkus, iabLoaded, (err) => { + // failed to load products, retry later. + this.retry.retry(go); + this.context.error(CdvPurchase.storeError(CdvPurchase.ErrorCode.LOAD, 'Loading product info failed - ' + err + ' - retrying later...')); + }); + }; + go(); + }); + } + /** @inheritDoc */ + finish(transaction) { + return new Promise(resolve => { + const onSuccess = () => { + if (transaction.state !== CdvPurchase.TransactionState.FINISHED) { + transaction.state = CdvPurchase.TransactionState.FINISHED; + this.context.listener.receiptsUpdated(CdvPurchase.Platform.GOOGLE_PLAY, [transaction.parentReceipt]); + } + resolve(undefined); + }; + const onFailure = (message, code) => resolve(CdvPurchase.storeError(code || CdvPurchase.ErrorCode.UNKNOWN, message)); + const firstProduct = transaction.products[0]; + if (!firstProduct) + return resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.FINISH, 'Cannot finish a transaction with no product')); + const product = this._products.getProduct(firstProduct.id); + if (!product) + return resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.FINISH, 'Cannot finish transaction, unknown product ' + firstProduct.id)); + const receipt = this._receipts.find(r => r.hasTransaction(transaction)); + if (!receipt) + return resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.FINISH, 'Cannot finish transaction, linked receipt not found.')); + if (!receipt.purchaseToken) + return resolve(CdvPurchase.storeError(CdvPurchase.ErrorCode.FINISH, 'Cannot finish transaction, linked receipt contains no purchaseToken.')); + if (product.type === CdvPurchase.ProductType.NON_RENEWING_SUBSCRIPTION || product.type === CdvPurchase.ProductType.CONSUMABLE) { + if (!transaction.isConsumed) + return this.bridge.consumePurchase(onSuccess, onFailure, receipt.purchaseToken); + } + else { // subscription and non-consumable + if (!transaction.isAcknowledged) + return this.bridge.acknowledgePurchase(onSuccess, onFailure, receipt.purchaseToken); + } + // nothing to do + resolve(undefined); + }); + } + /** Called by the bridge when a purchase has been consumed */ + onPurchaseConsumed(purchase) { + this.log.debug("onPurchaseConsumed: " + purchase.orderId); + purchase.acknowledged = true; // consumed is the equivalent of acknowledged for consumables + this.onPurchasesUpdated([purchase]); + } + /** Called when the platform reports update for some purchases */ + onPurchasesUpdated(purchases) { + this.log.debug("onPurchaseUpdated: " + purchases.map(p => p.orderId).join(', ')); + // GooglePlay generates one receipt for each purchase + purchases.forEach(purchase => { + const existingReceipt = this.receipts.find(r => r.purchaseToken === purchase.purchaseToken); + if (existingReceipt) { + existingReceipt.refreshPurchase(purchase); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.GOOGLE_PLAY, [existingReceipt]); + } + else { + const newReceipt = new Receipt(purchase, this.context.apiDecorators); + this.receipts.push(newReceipt); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.GOOGLE_PLAY, [newReceipt]); + } + }); + } + /** Called when the platform reports some purchases */ + onSetPurchases(purchases) { + this.log.debug("onSetPurchases: " + JSON.stringify(purchases)); + this.onPurchasesUpdated(purchases); + this.context.listener.receiptsReady(CdvPurchase.Platform.GOOGLE_PLAY); + } + onPriceChangeConfirmationResult(result) { + } + /** Refresh purchases from GooglePlay */ + getPurchases() { + return new Promise(resolve => { + this.log.debug('getPurchases'); + const success = () => { + this.log.debug('getPurchases success'); + setTimeout(() => resolve(undefined), 0); + }; + const failure = (message, code) => { + this.log.warn('getPurchases failed: ' + message + ' (' + code + ')'); + setTimeout(() => resolve(CdvPurchase.storeError(code || CdvPurchase.ErrorCode.UNKNOWN, message)), 0); + }; + this.bridge.getPurchases(success, failure); + }); + } + /** @inheritDoc */ + async order(offer, additionalData) { + return new Promise(resolve => { + this.log.info("Order - " + JSON.stringify(offer)); + const buySuccess = () => resolve(undefined); + const buyFailed = (message, code) => { + this.log.warn('Order failed: ' + JSON.stringify({ message, code })); + resolve(CdvPurchase.storeError(code !== null && code !== void 0 ? code : CdvPurchase.ErrorCode.UNKNOWN, message)); + }; + if (offer.productType === CdvPurchase.ProductType.PAID_SUBSCRIPTION) { + const idAndToken = offer.id; // offerId contains the productId and token (format productId@offerToken) + // find if the user already owns a product in the same group + const oldPurchaseToken = this.findOldPurchaseToken(offer.productId, offer.productGroup); + if (oldPurchaseToken) { + if (!additionalData.googlePlay) + additionalData.googlePlay = { oldPurchaseToken }; + else if (!additionalData.googlePlay.oldPurchaseToken) { + additionalData.googlePlay.oldPurchaseToken = oldPurchaseToken; + } + } + this.bridge.subscribe(buySuccess, buyFailed, idAndToken, additionalData); + } + else { + this.bridge.buy(buySuccess, buyFailed, offer.productId, additionalData); + } + }); + } + /** + * Find a purchaseToken for an owned product in the same group as the requested one. + * + * @param productId - The product identifier to request matching purchaseToken for. + * @param productGroup - The group of the product to request matching purchaseToken for. + * + * @return A purchaseToken, undefined if none have been found. + */ + findOldPurchaseToken(productId, productGroup) { + if (!productGroup) + return undefined; + const oldReceipt = this._receipts.find(r => { + return !!r.transactions.find(t => { + return !!t.products.find(p => { + const product = this._products.getProduct(p.id); + if (!product) + return false; + if (!CdvPurchase.Internal.LocalReceipts.isOwned([r], product)) + return false; + return (p.id === productId) || (productGroup && product.group === productGroup); + }); + }); + }); + return oldReceipt === null || oldReceipt === void 0 ? void 0 : oldReceipt.purchaseToken; + } + /** + * Prepare for receipt validation + */ + async receiptValidationBody(receipt) { + var _a; + const transaction = receipt.transactions[0]; + if (!transaction) + return; + const productId = (_a = transaction.products[0]) === null || _a === void 0 ? void 0 : _a.id; + if (!productId) + return; + const product = this._products.getProduct(productId); + if (!product) + return; + const purchase = transaction.nativePurchase; + return { + id: productId, + type: product.type, + offers: product.offers, + products: this._products.products, + transaction: { + type: CdvPurchase.Platform.GOOGLE_PLAY, + id: receipt.transactions[0].transactionId, + purchaseToken: purchase.purchaseToken, + signature: purchase.signature, + receipt: purchase.receipt, + } + }; + } + async handleReceiptValidationResponse(receipt, response) { + var _a; + if (response === null || response === void 0 ? void 0 : response.ok) { + const transaction = (_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.transaction; + if ((transaction === null || transaction === void 0 ? void 0 : transaction.type) !== CdvPurchase.Platform.GOOGLE_PLAY) + return; + switch (transaction.kind) { + case 'androidpublisher#productPurchase': + break; + case 'androidpublisher#subscriptionPurchase': + break; + case 'androidpublisher#subscriptionPurchaseV2': + transaction; + break; + case 'fovea#subscriptionGone': + // the transaction doesn't exist anymore + break; + } + } + return; // Nothing specific to do on GooglePlay + } + async requestPayment(payment, additionalData) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'requestPayment not supported'); + } + async manageSubscriptions() { + this.bridge.manageSubscriptions(); + return; + } + async manageBilling() { + this.bridge.manageBilling(); + return; + } + checkSupport(functionality) { + const supported = [ + 'order', 'manageBilling', 'manageSubscriptions' + ]; + return supported.indexOf(functionality) >= 0; + } + restorePurchases() { + return new Promise(resolve => { + this.bridge.getPurchases(resolve, (message, code) => { + this.log.warn('getPurchases() failed: ' + (code !== null && code !== void 0 ? code : 'ERROR') + ': ' + message); + resolve(); + }); + }); + } + } + GooglePlay.Adapter = Adapter; + })(GooglePlay = CdvPurchase.GooglePlay || (CdvPurchase.GooglePlay = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let GooglePlay; + (function (GooglePlay) { + let Bridge; + (function (Bridge) { + /* export namespace V11 { + export interface Subscription { + product_format: "v11.0"; + productId: string; + title: string; + name: string; + billing_period: string; + billing_period_unit: string; + description: string; + price: string; + price_amount_micros: string; + price_currency_code: string; + trial_period: string; + trial_period_unit: string; + formatted_price: string; + freeTrialPeriod: string; + introductoryPrice: string; + introductoryPriceAmountMicros: string; + introductoryPriceCycles: string; + introductoryPricePeriod: string; + subscriptionPeriod: string; + } + } */ + let RecurrenceMode; + (function (RecurrenceMode) { + RecurrenceMode["FINITE_RECURRING"] = "FINITE_RECURRING"; + RecurrenceMode["INFINITE_RECURRING"] = "INFINITE_RECURRING"; + RecurrenceMode["NON_RECURRING"] = "NON_RECURRING"; + })(RecurrenceMode = Bridge.RecurrenceMode || (Bridge.RecurrenceMode = {})); + })(Bridge = GooglePlay.Bridge || (GooglePlay.Bridge = {})); + })(GooglePlay = CdvPurchase.GooglePlay || (CdvPurchase.GooglePlay = {})); +})(CdvPurchase || (CdvPurchase = {})); +/* + * Copyright (C) 2012-2013 by Guillaume Charhon + * Modifications 10/16/2013 by Brian Thurlow + */ +/*global cordova */ +var CdvPurchase; +(function (CdvPurchase) { + let GooglePlay; + (function (GooglePlay) { + /** Replace SKU ProrationMode. + * + * See https://developer.android.com/reference/com/android/billingclient/api/BillingFlowParams.ProrationMode */ + let ProrationMode; + (function (ProrationMode) { + /** Replacement takes effect immediately, and the remaining time will be prorated and credited to the user. */ + ProrationMode["IMMEDIATE_WITH_TIME_PRORATION"] = "IMMEDIATE_WITH_TIME_PRORATION"; + /** Replacement takes effect immediately, and the billing cycle remains the same. */ + ProrationMode["IMMEDIATE_AND_CHARGE_PRORATED_PRICE"] = "IMMEDIATE_AND_CHARGE_PRORATED_PRICE"; + /** Replacement takes effect immediately, and the new price will be charged on next recurrence time. */ + ProrationMode["IMMEDIATE_WITHOUT_PRORATION"] = "IMMEDIATE_WITHOUT_PRORATION"; + /** Replacement takes effect when the old plan expires, and the new price will be charged at the same time. */ + ProrationMode["DEFERRED"] = "DEFERRED"; + /** Replacement takes effect immediately, and the user is charged full price of new plan and is given a full billing cycle of subscription, plus remaining prorated time from the old plan. */ + ProrationMode["IMMEDIATE_AND_CHARGE_FULL_PRICE"] = "IMMEDIATE_AND_CHARGE_FULL_PRICE"; + })(ProrationMode = GooglePlay.ProrationMode || (GooglePlay.ProrationMode = {})); + let Bridge; + (function (Bridge_2) { + let log = function log(msg) { + console.log("InAppBilling[js]: " + msg); + }; + let PurchaseState; + (function (PurchaseState) { + PurchaseState[PurchaseState["UNSPECIFIED_STATE"] = 0] = "UNSPECIFIED_STATE"; + PurchaseState[PurchaseState["PURCHASED"] = 1] = "PURCHASED"; + PurchaseState[PurchaseState["PENDING"] = 2] = "PENDING"; + })(PurchaseState = Bridge_2.PurchaseState || (Bridge_2.PurchaseState = {})); + class Bridge { + constructor() { + this.options = {}; + } + init(success, fail, options) { + if (!options) + options = {}; + if (options.log) + log = options.log; + this.options = { + showLog: options.showLog !== false, + onPurchaseConsumed: options.onPurchaseConsumed, + onPurchasesUpdated: options.onPurchasesUpdated, + onSetPurchases: options.onSetPurchases, + }; + if (this.options.showLog) { + log('setup ok'); + } + // Set a listener (see "listener()" function above) + const listener = this.listener.bind(this); + window.cordova.exec(listener, function (err) { }, "InAppBillingPlugin", "setListener", []); + window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "init", []); + } + load(success, fail, skus, inAppSkus, subsSkus) { + var hasSKUs = false; + // Optional Load SKUs to Inventory. + if (typeof skus !== "undefined") { + if (typeof skus === "string") { + skus = [skus]; + } + if (skus.length > 0) { + if (typeof skus[0] !== 'string') { + var msg = 'invalid productIds: ' + JSON.stringify(skus); + if (this.options.showLog) { + log(msg); + } + fail(msg, CdvPurchase.ErrorCode.INVALID_PRODUCT_ID); + return; + } + if (this.options.showLog) { + log('load ' + JSON.stringify(skus)); + } + hasSKUs = true; + } + } + window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "load", [skus, inAppSkus, subsSkus]); + } + listener(msg) { + // Handle changes to purchase that are being notified + // through the PurchasesUpdatedListener on the native side (android) + if (this.options.showLog) { + log('listener: ' + JSON.stringify(msg)); + } + if (!msg || !msg.type) { + return; + } + if (msg.type === "setPurchases" && this.options.onSetPurchases) { + this.options.onSetPurchases(msg.data.purchases); + } + if (msg.type === "purchasesUpdated" && this.options.onPurchasesUpdated) { + this.options.onPurchasesUpdated(msg.data.purchases); + } + if (msg.type === "purchaseConsumed" && this.options.onPurchaseConsumed) { + this.options.onPurchaseConsumed(msg.data.purchase); + } + if (msg.type === "onPriceChangeConfirmationResultOK" && this.options.onPriceChangeConfirmationResult) { + this.options.onPriceChangeConfirmationResult("OK"); + } + if (msg.type === "onPriceChangeConfirmationResultUserCanceled" && this.options.onPriceChangeConfirmationResult) { + this.options.onPriceChangeConfirmationResult("UserCanceled"); + } + if (msg.type === "onPriceChangeConfirmationResultUnknownSku" && this.options.onPriceChangeConfirmationResult) { + this.options.onPriceChangeConfirmationResult("UnknownProduct"); + } + } + getPurchases(success, fail) { + if (this.options.showLog) { + log('getPurchases()'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "getPurchases", ["null"]); + } + buy(success, fail, productId, additionalData) { + if (this.options.showLog) { + log('buy()'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "buy", [ + productId, extendAdditionalData(additionalData) + ]); + } + subscribe(success, fail, productId, additionalData) { + var _a; + if (this.options.showLog) { + log('subscribe()'); + } + if (((_a = additionalData.googlePlay) === null || _a === void 0 ? void 0 : _a.oldPurchaseToken) && this.options.showLog) { + log('subscribe() -> upgrading from an old purchase'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "subscribe", [ + productId, extendAdditionalData(additionalData) + ]); + } + consumePurchase(success, fail, purchaseToken) { + if (this.options.showLog) { + log('consumePurchase()'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "consumePurchase", [purchaseToken]); + } + acknowledgePurchase(success, fail, purchaseToken) { + if (this.options.showLog) { + log('acknowledgePurchase()'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "acknowledgePurchase", [purchaseToken]); + } + getAvailableProducts(inAppSkus, subsSkus, success, fail) { + if (this.options.showLog) { + log('getAvailableProducts()'); + } + return window.cordova.exec(success, errorCb(fail), "InAppBillingPlugin", "getAvailableProducts", [inAppSkus, subsSkus]); + } + manageSubscriptions() { + return window.cordova.exec(function () { }, function () { }, "InAppBillingPlugin", "manageSubscriptions", []); + } + manageBilling() { + return window.cordova.exec(function () { }, function () { }, "InAppBillingPlugin", "manageBilling", []); + } + launchPriceChangeConfirmationFlow(productId) { + return window.cordova.exec(function () { }, function () { }, "InAppBillingPlugin", "launchPriceChangeConfirmationFlow", [productId]); + } + } + Bridge_2.Bridge = Bridge; + // Generates a `fail` function that accepts an optional error code + // in the first part of the error string. + // + // format: `code|message` + // + // `fail` function will be called with `message` as a first argument + // and `code` as a second argument (or undefined). This ensures + // backward compatibility with legacy code + function errorCb(fail) { + return function (error) { + if (!fail) + return; + const tokens = typeof error === 'string' ? error.split('|') : []; + if (tokens.length > 1 && /^[-+]?(\d+)$/.test(tokens[0])) { + var code = tokens[0]; + var message = tokens[1]; + fail(message, +code); + } + else { + fail(error); + } + }; + } + function ensureObject(obj) { + return !!obj && obj.constructor === Object ? obj : {}; + } + function extendAdditionalData(ad) { + const additionalData = ensureObject(ad === null || ad === void 0 ? void 0 : ad.googlePlay); + if (!additionalData.accountId && (ad === null || ad === void 0 ? void 0 : ad.applicationUsername)) { + additionalData.accountId = CdvPurchase.Utils.md5(ad.applicationUsername); + } + return additionalData; + } + })(Bridge = GooglePlay.Bridge || (GooglePlay.Bridge = {})); + })(GooglePlay = CdvPurchase.GooglePlay || (CdvPurchase.GooglePlay = {})); +})(CdvPurchase || (CdvPurchase = {})); +/// +var CdvPurchase; +(function (CdvPurchase) { + let GooglePlay; + (function (GooglePlay) { + class GProduct extends CdvPurchase.Product { + } + GooglePlay.GProduct = GProduct; + class InAppOffer extends CdvPurchase.Offer { + constructor() { + super(...arguments); + this.type = 'inapp'; + } + } + GooglePlay.InAppOffer = InAppOffer; + class SubscriptionOffer extends CdvPurchase.Offer { + constructor(options, decorator) { + super(options, decorator); + this.type = 'subs'; + this.tags = options.tags; + this.token = options.token; + } + } + GooglePlay.SubscriptionOffer = SubscriptionOffer; + class Products { + constructor(decorator) { + /** List of products managed by the GooglePlay adapter */ + this.products = []; + /** List of offers managed by the GooglePlay adapter */ + this.offers = []; + this.decorator = decorator; + } + getProduct(id) { + return this.products.find(p => p.id === id); + } + getOffer(id) { + return this.offers.find(p => p.id === id); + } + /** */ + addProduct(registeredProduct, vp) { + const existingProduct = this.getProduct(registeredProduct.id); + const p = existingProduct !== null && existingProduct !== void 0 ? existingProduct : new GProduct(registeredProduct, this.decorator); + p.title = vp.title || vp.name || p.title; + p.description = vp.description || p.description; + // Process the product depending on the format + if ('product_format' in vp && vp.product_format === "v12.0") { + if (vp.product_type === "subs") + this.onSubsV12Loaded(p, vp); + else + this.onInAppLoaded(p, vp); + } + // else if ('billing_period_unit' in vp) { + // return this.iabSubsV11Loaded(p, vp); + // } + else { + this.onInAppLoaded(p, vp); + } + if (!existingProduct) { + this.products.push(p); + } + return p; + } + onSubsV12Loaded(product, vp) { + // console.log('iabSubsV12Loaded: ' + JSON.stringify(vp)); + vp.offers.forEach((productOffer) => { + const offer = this.iabSubsOfferV12Loaded(product, vp, productOffer); + product.addOffer(offer); + }); + /* + var firstOffer = vp.offers[0]; + if (firstOffer && firstOffer.pricing_phases.length > 0) { + const attributes = { + state: store.VALID, + title: vp.name, + description: vp.description, + offers: vp.offers.map(function (offer) { + return vp.productId + '@' + offer.token; + }), + }; + this.iabSubsAddV12Attributes(attributes, firstOffer); + const p = this.getProduct(vp.productId); + p.set(attributes); + p.trigger("loaded"); + } + */ + return product; + } + iabSubsOfferV12Loaded(product, vp, productOffer) { + const offerId = vp.productId + '@' + productOffer.token; + const existingOffer = this.getOffer(offerId); + const pricingPhases = productOffer.pricing_phases.map(p => this.toPricingPhase(p)); + if (existingOffer) { + existingOffer.pricingPhases = pricingPhases; + return existingOffer; + } + else { + const offer = new SubscriptionOffer({ id: offerId, product, pricingPhases, token: productOffer.token, tags: productOffer.tags }, this.decorator); + this.offers.push(offer); + return offer; + } + /* + // Backward compatibility (might be incomplete if user have complex pricing models, but might as well be complete...) + if (productOffer.pricing_phases.length > 0) { + iabSubsAddV12Attributes(offerAttributes, productOffer); + } + var offerP = store.get(offerAttributes.id); + if (!offerP) { + store.register(offerAttributes); + offerP = store.get(offerAttributes.id); + } + offerP.set(offerAttributes); + offerP.trigger("loaded"); + */ + } + /* + private iabSubsV11Loaded(p: Product, vp: SubscriptionV11): Product { + // console.log('iabSubsV11Loaded: ' + JSON.stringify(vp)); + var p = store.products.byId[vp.productId]; + var attributes = { + state: store.VALID, + title: vp.name || trimTitle(vp.title), + description: vp.description, + }; + var currency = vp.price_currency_code || ""; + var price = vp.formatted_price || vp.price; + var priceMicros = vp.price_amount_micros; + var subscriptionPeriod = vp.subscriptionPeriod ? vp.subscriptionPeriod : ""; + var introPriceSubscriptionPeriod = vp.introductoryPricePeriod ? vp.introductoryPricePeriod : ""; + var introPriceNumberOfPeriods = vp.introductoryPriceCycles ? vp.introductoryPriceCycles : 0; + var introPricePeriodUnit = normalizeISOPeriodUnit(introPriceSubscriptionPeriod); + var introPricePeriodCount = normalizeISOPeriodCount(introPriceSubscriptionPeriod); + var introPricePeriod = (introPriceNumberOfPeriods || 1) * (introPricePeriodCount || 1); + var introPriceMicros = vp.introductoryPriceAmountMicros ? vp.introductoryPriceAmountMicros : ""; + var introPrice = vp.introductoryPrice ? vp.introductoryPrice : ""; + var introPricePaymentMode; + + if (vp.freeTrialPeriod) { + introPricePaymentMode = 'FreeTrial'; + try { + introPricePeriodUnit = normalizeISOPeriodUnit(vp.freeTrialPeriod); + introPricePeriodCount = normalizeISOPeriodCount(vp.freeTrialPeriod); + introPricePeriod = introPricePeriodCount; + } + catch (e) { + store.log.warn('Failed to parse free trial period: ' + vp.freeTrialPeriod); + } + } + else if (vp.introductoryPrice) { + if (vp.introductoryPrice < vp.price && subscriptionPeriod === introPriceSubscriptionPeriod) { + introPricePaymentMode = 'PayAsYouGo'; + } + else if (introPriceNumberOfPeriods === 1) { + introPricePaymentMode = 'UpFront'; + } + } + + if (!introPricePaymentMode) { + introPricePeriod = null; + introPricePeriodUnit = null; + } + + var parsedSubscriptionPeriod = {}; + if (subscriptionPeriod) { + parsedSubscriptionPeriod.unit = normalizeISOPeriodUnit(subscriptionPeriod); + parsedSubscriptionPeriod.count = normalizeISOPeriodCount(subscriptionPeriod); + } + + var trialPeriod = vp.trial_period || null; + var trialPeriodUnit = vp.trial_period_unit || null; + var billingPeriod = parsedSubscriptionPeriod.count || vp.billing_period || null; + var billingPeriodUnit = parsedSubscriptionPeriod.unit || vp.billing_period_unit || null; + + var pricingPhases = []; + if (trialPeriod) { + pricingPhases.push({ + paymentMode: 'FreeTrial', + recurrenceMode: store.FINITE_RECURRING, + period: vp.freeTrialPeriod || toISO8601Duration(trialPeriodUnit, trialPeriod), + cycles: 1, + price: null, + priceMicros: 0, + currency: currency, + }); + } + else if (introPricePeriod) { + pricingPhases.push({ + paymentMode: 'PayAsYouGo', + recurrenceMode: store.FINITE_RECURRING, + period: vp.introPriceSubscriptionPeriod || toISO8601Duration(introPricePeriodUnit, introPricePeriodCount), + cycles: vp.introductoryPriceCycles || 1, + price: null, // formatted price not available + priceMicros: introPriceMicros, + currency: currency, + }); + } + + pricingPhases.push({ + paymentMode: 'PayAsYouGo', + recurrenceMode: store.INFINITE_RECURRING, + period: vp.subscriptionPeriod || toISO8601Duration(billingPeriodUnit, billingPeriod), // ISO8601 duration + cycles: 0, + price: price, + priceMicros: priceMicros, + currency: currency, + }); + attributes.pricingPhases = pricingPhases; + + if (store.compatibility > 0 && store.compatibility < 11.999) { + Object.assign(attributes, { + price: price, + priceMicros: priceMicros, + currency: currency, + trialPeriod: trialPeriod, + trialPeriodUnit: trialPeriodUnit, + billingPeriod: billingPeriod, + billingPeriodUnit: billingPeriodUnit, + introPrice: introPrice, + introPriceMicros: introPriceMicros, + introPricePeriod: introPricePeriod, + introPricePeriodUnit: introPricePeriodUnit, + introPricePaymentMode: introPricePaymentMode, + }); + } + + if (store.compatibility > 0 && store.compatibility < 9.999) { + Object.assign(attributes, { + introPriceNumberOfPeriods: introPricePeriod, + introPriceSubscriptionPeriod: introPricePeriodUnit, + }); + } + + p.set(attributes); + p.trigger("loaded"); + } + */ + onInAppLoaded(p, vp) { + var _a, _b, _c, _d; + // console.log('iabInAppLoaded: ' + JSON.stringify(vp)); + const existingOffer = this.getOffer(vp.productId); + const pricingPhases = [{ + price: (_b = (_a = vp.formatted_price) !== null && _a !== void 0 ? _a : vp.price) !== null && _b !== void 0 ? _b : `${((_c = vp.price_amount_micros) !== null && _c !== void 0 ? _c : 0) / 1000000} ${vp.price_currency_code}`, + priceMicros: (_d = vp.price_amount_micros) !== null && _d !== void 0 ? _d : 0, + currency: vp.price_currency_code, + recurrenceMode: CdvPurchase.RecurrenceMode.NON_RECURRING, + }]; + if (existingOffer) { + // state: store.VALID, + // title: vp.name || trimTitle(vp.title), + // description: vp.description, + // currency: vp.price_currency_code || "", + // price: vp.formatted_price || vp.price, + // priceMicros: vp.price_amount_micros, + existingOffer.pricingPhases = pricingPhases; + p.offers = [existingOffer]; + } + else { + const newOffer = new InAppOffer({ id: vp.productId, product: p, pricingPhases }, this.decorator); + this.offers.push(newOffer); + p.offers = [newOffer]; + } + // p.set({ + // state: store.VALID, + // title: vp.name || trimTitle(vp.title), + // description: vp.description, + // currency: vp.price_currency_code || "", + // price: vp.formatted_price || vp.price, + // priceMicros: vp.price_amount_micros, + // }); + // p.trigger("loaded"); + return p; + } + toPaymentMode(phase) { + return phase.price_amount_micros === 0 + ? CdvPurchase.PaymentMode.FREE_TRIAL + : phase.recurrence_mode === GooglePlay.Bridge.RecurrenceMode.NON_RECURRING + ? CdvPurchase.PaymentMode.UP_FRONT + : CdvPurchase.PaymentMode.PAY_AS_YOU_GO; + } + toRecurrenceMode(mode) { + switch (mode) { + case GooglePlay.Bridge.RecurrenceMode.FINITE_RECURRING: return CdvPurchase.RecurrenceMode.FINITE_RECURRING; + case GooglePlay.Bridge.RecurrenceMode.INFINITE_RECURRING: return CdvPurchase.RecurrenceMode.INFINITE_RECURRING; + case GooglePlay.Bridge.RecurrenceMode.NON_RECURRING: return CdvPurchase.RecurrenceMode.NON_RECURRING; + } + } + toPricingPhase(phase) { + return { + price: phase.formatted_price, + priceMicros: phase.price_amount_micros, + currency: phase.price_currency_code, + billingPeriod: phase.billing_period, + billingCycles: phase.billing_cycle_count, + recurrenceMode: this.toRecurrenceMode(phase.recurrence_mode), + paymentMode: this.toPaymentMode(phase), + }; + } + } + GooglePlay.Products = Products; + })(GooglePlay = CdvPurchase.GooglePlay || (CdvPurchase.GooglePlay = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let GooglePlay; + (function (GooglePlay) { + let PublisherAPI; + (function (PublisherAPI) { + let GoogleErrorReason; + (function (GoogleErrorReason) { + /** The subscription purchase is no longer available for query because it has been expired for too long. */ + GoogleErrorReason["SUBSCRIPTION_NO_LONGER_AVAILABLE"] = "subscriptionPurchaseNoLongerAvailable"; + /** The purchase token is no longer valid. */ + GoogleErrorReason["PURCHASE_TOKEN_NO_LONGER_VALID"] = "purchaseTokenNoLongerValid"; + })(GoogleErrorReason = PublisherAPI.GoogleErrorReason || (PublisherAPI.GoogleErrorReason = {})); + /** + * Those are actually HTTP status codes. + * + * Duplicated here for documentation purposes. + */ + let ErrorCode; + (function (ErrorCode) { + /** The subscription purchase is no longer available for query because it has been expired for too long. */ + ErrorCode[ErrorCode["GONE"] = 410] = "GONE"; + })(ErrorCode = PublisherAPI.ErrorCode || (PublisherAPI.ErrorCode = {})); + })(PublisherAPI = GooglePlay.PublisherAPI || (GooglePlay.PublisherAPI = {})); + })(GooglePlay = CdvPurchase.GooglePlay || (CdvPurchase.GooglePlay = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** + * Test Adapter and related classes. + */ + let Test; + (function (Test) { + const platform = CdvPurchase.Platform.TEST; + let verifiedPurchases = []; + function updateVerifiedPurchases(tr) { + tr.products.forEach(p => { + var _a, _b, _c, _d; + const existing = verifiedPurchases.find(v => p.id === v.id); + const attributes = { + id: p.id, + purchaseDate: (_a = tr.purchaseDate) === null || _a === void 0 ? void 0 : _a.getTime(), + expiryDate: (_b = tr.expirationDate) === null || _b === void 0 ? void 0 : _b.getTime(), + lastRenewalDate: (_c = tr.lastRenewalDate) === null || _c === void 0 ? void 0 : _c.getTime(), + renewalIntent: tr.renewalIntent, + renewalIntentChangeDate: (_d = tr.renewalIntentChangeDate) === null || _d === void 0 ? void 0 : _d.getTime(), + }; + if (existing) { + Object.assign(existing, attributes); + } + else { + verifiedPurchases.push(attributes); + } + }); + } + /** + * Test Adapter used for local testing with mock products. + * + * This adapter simulates a payment platform that supports both In-App Products and Payment Requests. + * + * The list of supported In-App Products + * + * @see {@link Test.TEST_PRODUCTS} + */ + class Adapter { + constructor(context) { + this.id = CdvPurchase.Platform.TEST; + this.name = 'Test'; + this.ready = false; + this.products = []; + this.receipts = []; + this.context = context; + this.log = context.log.child("Test"); + } + get isSupported() { + return true; + } + async initialize() { return; } + async loadReceipts() { + return new Promise((resolve) => { + setTimeout(() => { + this.context.listener.receiptsReady(CdvPurchase.Platform.TEST); + resolve(this.receipts); + }, 600); + }); + } + async loadProducts(products) { + return products.map(registerProduct => { + if (!Test.testProductsArray.find(p => p.id === registerProduct.id && p.type === registerProduct.type)) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PRODUCT_NOT_AVAILABLE, 'This product is not available'); + } + // Ensure it's not been loaded already. + const existingProduct = this.products.find(p => p.id === registerProduct.id); + if (existingProduct) + return existingProduct; + // Enable the active subscription if loaded by the user. + if (registerProduct.id === Test.testProducts.PAID_SUBSCRIPTION_ACTIVE.id) { + setTimeout(() => { + this.reportActiveSubscription(); + }, 500); // it'll get reported in 500ms + } + const product = Test.initTestProduct(registerProduct.id, this.context.apiDecorators); + if (!product) + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PRODUCT_NOT_AVAILABLE, 'Could not load this product'); + this.products.push(product); + this.context.listener.productsUpdated(CdvPurchase.Platform.TEST, [product]); + return product; + }); + } + async order(offer) { + // Purchasing products with "-fail-" in the id will fail. + if (offer.id.indexOf("-fail-") > 0) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Purchase failed.'); + } + const product = this.products.find(p => p.id === offer.productId); + if (!CdvPurchase.Internal.LocalReceipts.canPurchase(this.receipts, product)) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Product already owned'); + } + // a receipt containing a transaction with the given product. + const response = prompt(`Do you want to purchase ${offer.productId} for ${offer.pricingPhases[0].price}?\nEnter "Y" to confirm.\nEnter "E" to fail with an error.\Anything else to cancel.`); + if ((response === null || response === void 0 ? void 0 : response.toUpperCase()) === 'E') + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PURCHASE, 'Purchase failed'); + if ((response === null || response === void 0 ? void 0 : response.toUpperCase()) !== 'Y') + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_CANCELLED, 'Purchase flow has been cancelled by the user'); + // purchase succeeded, let's generate a mock receipt. + const receipt = new CdvPurchase.Receipt(platform, this.context.apiDecorators); + const tr = new CdvPurchase.Transaction(platform, receipt, this.context.apiDecorators); + receipt.transactions = [tr]; + tr.products = [{ + id: offer.productId, + offerId: offer.id, + }]; + tr.state = CdvPurchase.TransactionState.APPROVED; + tr.purchaseDate = new Date(); + tr.transactionId = offer.productId + '-' + (new Date().getTime()); + tr.isAcknowledged = false; + updateVerifiedPurchases(tr); + this.receipts.push(receipt); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.TEST, [receipt]); + } + finish(transaction) { + return new Promise(resolve => { + setTimeout(() => { + transaction.state = CdvPurchase.TransactionState.FINISHED; + transaction.isAcknowledged = true; + updateVerifiedPurchases(transaction); + const product = this.products.find(p => transaction.products[0].id === p.id); + if ((product === null || product === void 0 ? void 0 : product.type) === CdvPurchase.ProductType.CONSUMABLE) + transaction.isConsumed = true; + const receipts = this.receipts.filter(r => r.hasTransaction(transaction)); + this.context.listener.receiptsUpdated(platform, receipts); + resolve(undefined); + }, 500); + }); + } + async receiptValidationBody(receipt) { + return; + } + async handleReceiptValidationResponse(receipt, response) { + return; + } + /** + * This function simulates a payment process by prompting the user to confirm the payment. + * + * It creates a `Receipt` and `Transaction` object and returns the `Transaction` object if the user enters "Y" in the prompt. + * + * @param paymentRequest - An object containing information about the payment, such as the amount and currency. + * @param additionalData - Additional data to be included in the receipt. + * + * @returns A promise that resolves to either an error object (if the user enters "E" in the prompt), + * a `Transaction` object (if the user confirms the payment), or `undefined` (if the user does not confirm the payment). + * + * @example + * + * const paymentRequest = { + * amountMicros: 1000000, + * currency: "USD", + * items: [{ id: "product-1" }, { id: "product-2" }] + * }; + * const result = await requestPayment(paymentRequest); + * if (result?.isError) { + * console.error(`Error: ${result.message}`); + * } else if (result) { + * console.log(`Transaction approved: ${result.transactionId}`); + * } else { + * console.log("Payment cancelled by user"); + * } + */ + async requestPayment(paymentRequest, additionalData) { + var _a; + await CdvPurchase.Utils.asyncDelay(100); // maybe app has some UI to update... and "prompt" prevents that + const response = prompt(`Mock payment of ${((_a = paymentRequest.amountMicros) !== null && _a !== void 0 ? _a : 0) / 1000000} ${paymentRequest.currency}. Enter "Y" to confirm. Enter "E" to trigger an error.`); + if ((response === null || response === void 0 ? void 0 : response.toUpperCase()) === 'E') + return CdvPurchase.storeError(CdvPurchase.ErrorCode.PAYMENT_NOT_ALLOWED, 'Payment not allowed'); + if ((response === null || response === void 0 ? void 0 : response.toUpperCase()) !== 'Y') + return; + const receipt = new CdvPurchase.Receipt(platform, this.context.apiDecorators); + const transaction = new CdvPurchase.Transaction(CdvPurchase.Platform.TEST, receipt, this.context.apiDecorators); + transaction.purchaseDate = new Date(); + transaction.products = paymentRequest.items.filter(p => p).map(product => ({ id: (product === null || product === void 0 ? void 0 : product.id) || '' })), + transaction.state = CdvPurchase.TransactionState.APPROVED; + transaction.transactionId = 'payment-' + new Date().getTime(); + transaction.amountMicros = paymentRequest.amountMicros; + transaction.currency = paymentRequest.currency; + receipt.transactions = [transaction]; + this.receipts.push(receipt); + setTimeout(() => { + this.context.listener.receiptsUpdated(platform, [receipt]); + }, 400); + return transaction; + } + async manageSubscriptions() { + alert('Pseudo subscription management interface. Close it when you are done.'); + return; + } + async manageBilling() { + alert('Pseudo billing management interface. Close it when you are done.'); + return; + } + reportActiveSubscription() { + if (this.receipts.find(r => r.transactions[0].transactionId === transactionId(1))) { + // already reported + return; + } + const RENEWS_EVERY_MS = 2 * 60000; // 2 minutes + const receipt = new CdvPurchase.Receipt(platform, this.context.apiDecorators); + const makeTransaction = (n) => { + var _a, _b; + const tr = new CdvPurchase.Transaction(platform, receipt, this.context.apiDecorators); + tr.products = [{ + id: Test.testProducts.PAID_SUBSCRIPTION_ACTIVE.id, + offerId: Test.testProducts.PAID_SUBSCRIPTION_ACTIVE.extra.offerId, + }]; + tr.state = CdvPurchase.TransactionState.APPROVED; + tr.transactionId = transactionId(n); + tr.isAcknowledged = n == 1; + tr.renewalIntent = CdvPurchase.RenewalIntent.RENEW; + const firstPurchase = +(((_b = (_a = receipt === null || receipt === void 0 ? void 0 : receipt.transactions) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.purchaseDate) || new Date()); + tr.purchaseDate = new Date(firstPurchase); + tr.lastRenewalDate = new Date(firstPurchase + RENEWS_EVERY_MS * (n - 1)); + tr.expirationDate = new Date(firstPurchase + RENEWS_EVERY_MS * n); + updateVerifiedPurchases(tr); + return tr; + }; + receipt.transactions.push(makeTransaction(1)); + this.receipts.push(receipt); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.TEST, [receipt]); + function transactionId(n) { + return 'test-active-subscription-transaction-' + n; + } + let transactionNumber = 1; + setInterval(() => { + this.log.info('auto-renewing the mock subscription'); + transactionNumber += 1; + receipt.transactions.push(makeTransaction(transactionNumber)); + this.context.listener.receiptsUpdated(CdvPurchase.Platform.TEST, [receipt]); + }, RENEWS_EVERY_MS); + } + static verify(receipt, callback) { + setTimeout(() => { + var _a, _b; + callback({ + receipt, + payload: { + ok: true, + data: { + id: (_b = (_a = receipt.transactions[0]) === null || _a === void 0 ? void 0 : _a.products[0]) === null || _b === void 0 ? void 0 : _b.id, + latest_receipt: true, + transaction: { type: 'test' }, + collection: verifiedPurchases, + } + } + }); + }, 500); + } + checkSupport(functionality) { + return true; + } + async restorePurchases() { + } + } + Test.Adapter = Adapter; + })(Test = CdvPurchase.Test || (CdvPurchase.Test = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Test; + (function (Test) { + const platform = CdvPurchase.Platform.TEST; + /** + * Definition of the test products. + */ + Test.testProducts = { + /** + * A valid consumable product. + * + * - id: "test-consumable" + * - type: ProductType.CONSUMABLE + */ + CONSUMABLE: { + platform, + id: 'test-consumable', + type: CdvPurchase.ProductType.CONSUMABLE, + }, + /** + * A consumable product for which the purchase will always fail. + * + * - id: "test-consumable-fail" + * - type: ProductType.CONSUMABLE + */ + CONSUMABLE_FAILING: { + platform, + id: 'test-consumable-fail', + type: CdvPurchase.ProductType.CONSUMABLE, + }, + /** + * A valid non-consumable product. + * + * - id: "test-non-consumable" + * - type: ProductType.NON_CONSUMABLE + */ + NON_CONSUMABLE: { + platform, + id: 'test-non-consumable', + type: CdvPurchase.ProductType.NON_CONSUMABLE, + }, + /** + * A paid-subscription that auto-renews for the duration of the session. + * + * This subscription has a free trial period, that renews every week, 3 times. + * It then costs $4.99 per month. + * + * - id: "test-subscription" + * - type: ProductType.PAID_SUBSCRIPTION + */ + PAID_SUBSCRIPTION: { + platform, + id: 'test-subscription', + type: CdvPurchase.ProductType.PAID_SUBSCRIPTION, + }, + /** + * A paid-subscription that is already active when the app starts. + * + * It behaves as if the user subscribed on a different device. It will renew forever. + * + * - id: "test-subscription-active" + * - type: ProductType.PAID_SUBSCRIPTION + */ + PAID_SUBSCRIPTION_ACTIVE: { + platform, + id: 'test-subscription-active', + type: CdvPurchase.ProductType.PAID_SUBSCRIPTION, + /** @internal */ + extra: { + offerId: 'test-paid-subscription-active-offer1', + } + }, + }; + /** + * List of test products definitions as an array. + */ + Test.testProductsArray = Object.values(Test.testProducts); + /** + * Initialize a test product. + * + * @internal + */ + function initTestProduct(productId, decorator) { + const key = Object.keys(Test.testProducts).find(key => Test.testProducts[key] && Test.testProducts[key].id === productId); + if (!key) + return; + const product = new CdvPurchase.Product(Test.testProducts[key], decorator); + switch (key) { + case 'CONSUMABLE': + product.title = 'Test Consumable'; + product.description = 'A consumable product that you can purchase'; + product.addOffer(new CdvPurchase.Offer({ + id: 'test-consumable-offer1', + pricingPhases: [{ + price: '$4.99', + currency: 'USD', + priceMicros: 4990000, + paymentMode: CdvPurchase.PaymentMode.UP_FRONT, + recurrenceMode: CdvPurchase.RecurrenceMode.NON_RECURRING, + }], + product, + }, decorator)); + break; + case 'CONSUMABLE_FAILING': + product.title = 'Failing Consumable'; + product.description = 'A consumable product that cannot be purchased'; + product.addOffer(new CdvPurchase.Offer({ + id: 'test-consumable-fail-offer1', + pricingPhases: [{ + price: '$1.99', + currency: 'USD', + priceMicros: 1990000, + paymentMode: CdvPurchase.PaymentMode.UP_FRONT, + recurrenceMode: CdvPurchase.RecurrenceMode.NON_RECURRING, + }], + product, + }, decorator)); + break; + case 'NON_CONSUMABLE': + product.title = 'Non Consumable'; + product.description = 'A non consumable product'; + product.addOffer(new CdvPurchase.Offer({ + id: 'test-non-consumable-offer1', + pricingPhases: [{ + price: '$9.99', + currency: 'USD', + priceMicros: 9990000, + paymentMode: CdvPurchase.PaymentMode.UP_FRONT, + recurrenceMode: CdvPurchase.RecurrenceMode.NON_RECURRING, + }], + product, + }, decorator)); + break; + case 'PAID_SUBSCRIPTION': + product.title = 'A subscription product'; + product.description = 'An auto-renewing paid subscription with a trial period'; + product.addOffer(new CdvPurchase.Offer({ + id: 'test-paid-subscription-offer1', + product, + pricingPhases: [{ + price: '$0.00', + currency: 'USD', + priceMicros: 0, + paymentMode: CdvPurchase.PaymentMode.FREE_TRIAL, + recurrenceMode: CdvPurchase.RecurrenceMode.FINITE_RECURRING, + billingCycles: 3, + billingPeriod: 'P1W', + }, { + price: '$4.99', + currency: 'USD', + priceMicros: 4990000, + paymentMode: CdvPurchase.PaymentMode.PAY_AS_YOU_GO, + recurrenceMode: CdvPurchase.RecurrenceMode.INFINITE_RECURRING, + billingPeriod: 'P1M', + }], + }, decorator)); + break; + case 'PAID_SUBSCRIPTION_ACTIVE': + product.title = 'An owned subscription product'; + product.description = 'An active paid subscription'; + product.addOffer(new CdvPurchase.Offer({ + id: Test.testProducts.PAID_SUBSCRIPTION_ACTIVE.extra.offerId, + product, + pricingPhases: [{ + price: '$19.99', + currency: 'USD', + priceMicros: 19990000, + paymentMode: CdvPurchase.PaymentMode.PAY_AS_YOU_GO, + recurrenceMode: CdvPurchase.RecurrenceMode.INFINITE_RECURRING, + billingPeriod: 'P1Y', + }], + }, decorator)); + break; + default: + const unhandledSwitchCase = key; + throw new Error(`Unhandled enum case: ${unhandledSwitchCase}`); + } + return product; + } + Test.initTestProduct = initTestProduct; + })(Test = CdvPurchase.Test || (CdvPurchase.Test = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let WindowsStore; + (function (WindowsStore) { + class Adapter { + constructor() { + this.id = CdvPurchase.Platform.WINDOWS_STORE; + this.name = 'WindowsStore'; + this.ready = false; + this.products = []; + this.receipts = []; + } + async initialize() { return; } + get isSupported() { + return false; + } + async loadProducts(products) { + return products.map(p => CdvPurchase.storeError(CdvPurchase.ErrorCode.PRODUCT_NOT_AVAILABLE, 'TODO')); + } + async loadReceipts() { + return []; + } + async order(offer) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'TODO: Not implemented'); + } + async finish(transaction) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'TODO: Not implemented'); + } + async handleReceiptValidationResponse(receipt, response) { + return; + } + async receiptValidationBody(receipt) { + return; + } + async requestPayment(payment, additionalData) { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'requestPayment not supported'); + } + async manageSubscriptions() { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'manageSubscriptions not supported'); + } + async manageBilling() { + return CdvPurchase.storeError(CdvPurchase.ErrorCode.UNKNOWN, 'manageBilling not supported'); + } + checkSupport(functionality) { + return false; + } + async restorePurchases() { + } + } + WindowsStore.Adapter = Adapter; + })(WindowsStore = CdvPurchase.WindowsStore || (CdvPurchase.WindowsStore = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + let Ajax; + (function (Ajax) { + /** HTTP status returned when a request times out */ + Ajax.HTTP_REQUEST_TIMEOUT = 408; + })(Ajax = Utils.Ajax || (Utils.Ajax = {})); + /** + * Simplified version of jQuery's ajax method based on XMLHttpRequest. + * + * Uses cordova's http plugin when installed. + * + * Only supports JSON requests. + */ + function ajax(log, options) { + if (typeof window !== 'undefined' && window.cordova && window.cordova.plugin && window.cordova.plugin.http) { + return ajaxWithHttpPlugin(log, options); + } + var doneCb = function () { }; + var xhr = new XMLHttpRequest(); + if (options.timeout) { + xhr.timeout = options.timeout; + xhr.ontimeout = function ( /*event*/) { + log.warn("ajax -> request to " + options.url + " timeout"); + Utils.callExternal(log, 'ajax.error', options.error, Ajax.HTTP_REQUEST_TIMEOUT, "Timeout"); + }; + } + xhr.open(options.method || 'POST', options.url, true); + xhr.onreadystatechange = function ( /*event*/) { + try { + if (xhr.readyState === 4) { + if (xhr.status === 200) { + Utils.callExternal(log, 'ajax.success', options.success, JSON.parse(xhr.responseText)); + } + else { + log.warn("ajax -> request to " + options.url + " failed with status " + xhr.status + " (" + xhr.statusText + ")"); + Utils.callExternal(log, 'ajax.error', options.error, xhr.status, xhr.statusText); + } + } + } + catch (e) { + log.warn("ajax -> request to " + options.url + " failed with an exception: " + e.message); + if (options.error) + options.error(417, e.message, null); + } + if (xhr.readyState === 4) + Utils.callExternal(log, 'ajax.done', doneCb); + }; + const customHeaders = options.customHeaders; + if (customHeaders) { + Object.keys(customHeaders).forEach(function (header) { + log.debug('ajax -> adding custom header: ' + header); + xhr.setRequestHeader(header, customHeaders[header]); + }); + } + xhr.setRequestHeader("Accept", "application/json"); + log.debug('ajax -> send request to ' + options.url); + if (options.data) { + xhr.setRequestHeader("Content-Type", "application/json;charset=UTF-8"); + xhr.send(JSON.stringify(options.data)); + } + else { + xhr.send(); + } + return { + done: function (cb) { doneCb = cb; return this; } + }; + } + Utils.ajax = ajax; + /** + * Simplified version of jQuery's ajax method based on XMLHttpRequest. + * + * Uses the http plugin. + */ + function ajaxWithHttpPlugin(log, options) { + let doneCb = function () { }; + const ajaxOptions = { + method: (options.method || 'get').toLowerCase(), + data: options.data, + serializer: 'json', + // responseType: 'json', + }; + if (options.customHeaders) { + log.debug('ajax[http] -> adding custom headers: ' + JSON.stringify(options.customHeaders)); + ajaxOptions.headers = options.customHeaders; + } + log.debug('ajax[http] -> send request to ' + options.url); + const ajaxDone = (response) => { + try { + if (response.status == 200) { + Utils.callExternal(log, 'ajax.success', options.success, JSON.parse(response.data)); + } + else { + log.warn("ajax[http] -> request to " + options.url + " failed with status " + response.status + " (" + response.error + ")"); + Utils.callExternal(log, 'ajax.error', options.error, response.status, response.error); + } + } + catch (e) { + log.warn("ajax[http] -> request to " + options.url + " failed with an exception: " + e.message); + if (options.error) + Utils.callExternal(log, 'ajax.error', options.error, 417, e.message); + } + Utils.callExternal(log, 'ajax.done', doneCb); + }; + window.cordova.plugin.http.sendRequest(options.url, ajaxOptions, ajaxDone, ajaxDone); + return { + done: function (cb) { doneCb = cb; return this; } + }; + } + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + /** + * Calls an user-registered callback. + * + * Won't throw exceptions, only logs errors. + * + * @param name a short string describing the callback + * @param callback the callback to call (won't fail if undefined) + * + * @example + * ```js + * Utils.callExternal(store.log, "ajax.error", options.error, 404, "Not found"); + * ``` + * + * @internal + */ + function callExternal(log, name, callback, ...args) { + try { + const args = Array.prototype.slice.call(arguments, 3); + // store.log.debug("calling " + name + "(" + JSON.stringify(args2) + ")"); + if (callback) + callback.apply(CdvPurchase.store, args); + } + catch (e) { + log.logCallbackException(name, e); + } + } + Utils.callExternal = callExternal; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + /** @internal */ + function delay(fn, milliseconds) { + return setTimeout(fn, milliseconds); + } + Utils.delay = delay; + /** @internal */ + function debounce(fn, milliseconds) { + let timeout = null; + const later = function (context, args) { + timeout = null; + fn(); + }; + const debounced = function () { + if (timeout) + window.clearTimeout(timeout); + timeout = setTimeout(later, milliseconds); + }; + return debounced; + } + Utils.debounce = debounce; + function asyncDelay(milliseconds) { + return new Promise(resolve => setTimeout(resolve, milliseconds)); + } + Utils.asyncDelay = asyncDelay; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + /** + * Generate a plain english version of the billing cycle in a pricing phase. + * + * Example outputs: + * + * - "3x 1 month": for `FINITE_RECURRING`, 3 cycles, period "P1M" + * - "for 1 year": for `NON_RECURRING`, period "P1Y" + * - "every week": for `INFINITE_RECURRING, period "P1W" + * + * @example + * Utils.formatBillingCycleEN(offer.pricingPhases[0]) + */ + function formatBillingCycleEN(pricingPhase) { + switch (fixedRecurrenceMode(pricingPhase)) { + case CdvPurchase.RecurrenceMode.FINITE_RECURRING: + return `${pricingPhase.billingCycles}x ${Utils.formatDurationEN(pricingPhase.billingPeriod)}`; + case CdvPurchase.RecurrenceMode.NON_RECURRING: + return 'for ' + Utils.formatDurationEN(pricingPhase.billingPeriod); + default: // INFINITE_RECURRING + return 'every ' + Utils.formatDurationEN(pricingPhase.billingPeriod, { omitOne: true }); + } + } + Utils.formatBillingCycleEN = formatBillingCycleEN; + /** + * FINITE_RECURRING with billingCycles=1 is like NON_RECURRING + * FINITE_RECURRING with billingCycles=0 is like INFINITE_RECURRING + */ + function fixedRecurrenceMode(pricingPhase) { + var _a; + const cycles = (_a = pricingPhase.billingCycles) !== null && _a !== void 0 ? _a : 0; + if (pricingPhase.recurrenceMode === CdvPurchase.RecurrenceMode.FINITE_RECURRING) { + if (cycles == 1) + return CdvPurchase.RecurrenceMode.NON_RECURRING; + if (cycles <= 0) + return CdvPurchase.RecurrenceMode.INFINITE_RECURRING; + } + return pricingPhase.recurrenceMode; + } + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + /** + * Format a simple ISO 8601 duration to plain English. + * + * This works for non-composite durations, i.e. that have a single unit with associated amount. For example: "P1Y" or "P3W". + * + * See https://en.wikipedia.org/wiki/ISO_8601#Durations + * + * This method is provided as a utility for getting simple things done quickly. In your application, you'll probably + * need some other method that supports multiple locales. + * + * @param iso - Duration formatted in IS0 8601 + * @return The duration in plain english. Example: "1 year" or "3 weeks". + */ + function formatDurationEN(iso, options) { + if (!iso) + return ''; + const l = iso.length; + const n = iso.slice(1, l - 1); + if (n === '1') { + if (options === null || options === void 0 ? void 0 : options.omitOne) { + return ({ 'D': 'day', 'W': 'week', 'M': 'month', 'Y': 'year', }[iso[l - 1]]) || iso[l - 1]; + } + else { + return ({ 'D': '1 day', 'W': '1 week', 'M': '1 month', 'Y': '1 year', }[iso[l - 1]]) || iso[l - 1]; + } + } + else { + const u = ({ 'D': 'days', 'W': 'weeks', 'M': 'months', 'Y': 'years', }[iso[l - 1]]) || iso[l - 1]; + return `${n} ${u}`; + } + } + Utils.formatDurationEN = formatDurationEN; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + const HEX2STR = "0123456789abcdef".split(""); + function toHexString(r) { + for (var n = "", e = 0; e < 4; e++) + n += HEX2STR[r >> 8 * e + 4 & 15] + HEX2STR[r >> 8 * e & 15]; + return n; + } + function hexStringFromArray(array) { + const out = []; + for (var arrayLength = array.length, i = 0; i < arrayLength; i++) + out.push(toHexString(array[i])); + return out.join(""); + } + function add32(r, n) { + return r + n & 4294967295; + } + function complexShift(r, n, e, t, o, u, shiftFunction) { + function shiftAdd32(op0, op1, v1) { + return add32(op0 << op1 | op0 >>> 32 - op1, v1); + } + function add32x4(i0, i1, j0, j1) { + return add32(add32(i1, i0), add32(j0, j1)); + } + return shiftAdd32(add32x4(r, n, t, u), o, e); + } + var step1Function = function (shiftFunction, n, e, t, o, u, f, a) { return complexShift(e & t | ~e & o, n, e, u, f, a, shiftFunction); }; + var step2Function = function (shiftFunction, n, e, t, o, u, f, a) { return complexShift(e & o | t & ~o, n, e, u, f, a, shiftFunction); }; + var step3Function = function (shiftFunction, n, e, t, o, u, f, a) { return complexShift(e ^ t ^ o, n, e, u, f, a, shiftFunction); }; + var step4Function = function (shiftFunction, n, e, t, o, u, f, a) { return complexShift(t ^ (e | ~o), n, e, u, f, a, shiftFunction); }; + function hashStep(inOutVec4, strAsInts, shiftFunction) { + if (!shiftFunction) + shiftFunction = add32; + let v0 = inOutVec4[0]; + let v1 = inOutVec4[1]; + let v2 = inOutVec4[2]; + let v3 = inOutVec4[3]; + var step1 = step1Function.bind(null, shiftFunction); + v0 = step1(v0, v1, v2, v3, strAsInts[0], 7, -680876936); + v3 = step1(v3, v0, v1, v2, strAsInts[1], 12, -389564586); + v2 = step1(v2, v3, v0, v1, strAsInts[2], 17, 606105819); + v1 = step1(v1, v2, v3, v0, strAsInts[3], 22, -1044525330); + v0 = step1(v0, v1, v2, v3, strAsInts[4], 7, -176418897); + v3 = step1(v3, v0, v1, v2, strAsInts[5], 12, 1200080426); + v2 = step1(v2, v3, v0, v1, strAsInts[6], 17, -1473231341); + v1 = step1(v1, v2, v3, v0, strAsInts[7], 22, -45705983); + v0 = step1(v0, v1, v2, v3, strAsInts[8], 7, 1770035416); + v3 = step1(v3, v0, v1, v2, strAsInts[9], 12, -1958414417); + v2 = step1(v2, v3, v0, v1, strAsInts[10], 17, -42063); + v1 = step1(v1, v2, v3, v0, strAsInts[11], 22, -1990404162); + v0 = step1(v0, v1, v2, v3, strAsInts[12], 7, 1804603682); + v3 = step1(v3, v0, v1, v2, strAsInts[13], 12, -40341101); + v2 = step1(v2, v3, v0, v1, strAsInts[14], 17, -1502002290); + v1 = step1(v1, v2, v3, v0, strAsInts[15], 22, 1236535329); + var step2 = step2Function.bind(null, shiftFunction); + v0 = step2(v0, v1, v2, v3, strAsInts[1], 5, -165796510); + v3 = step2(v3, v0, v1, v2, strAsInts[6], 9, -1069501632); + v2 = step2(v2, v3, v0, v1, strAsInts[11], 14, 643717713); + v1 = step2(v1, v2, v3, v0, strAsInts[0], 20, -373897302); + v0 = step2(v0, v1, v2, v3, strAsInts[5], 5, -701558691); + v3 = step2(v3, v0, v1, v2, strAsInts[10], 9, 38016083); + v2 = step2(v2, v3, v0, v1, strAsInts[15], 14, -660478335); + v1 = step2(v1, v2, v3, v0, strAsInts[4], 20, -405537848); + v0 = step2(v0, v1, v2, v3, strAsInts[9], 5, 568446438); + v3 = step2(v3, v0, v1, v2, strAsInts[14], 9, -1019803690); + v2 = step2(v2, v3, v0, v1, strAsInts[3], 14, -187363961); + v1 = step2(v1, v2, v3, v0, strAsInts[8], 20, 1163531501); + v0 = step2(v0, v1, v2, v3, strAsInts[13], 5, -1444681467); + v3 = step2(v3, v0, v1, v2, strAsInts[2], 9, -51403784); + v2 = step2(v2, v3, v0, v1, strAsInts[7], 14, 1735328473); + v1 = step2(v1, v2, v3, v0, strAsInts[12], 20, -1926607734); + var step3 = step3Function.bind(null, shiftFunction); + v0 = step3(v0, v1, v2, v3, strAsInts[5], 4, -378558); + v3 = step3(v3, v0, v1, v2, strAsInts[8], 11, -2022574463); + v2 = step3(v2, v3, v0, v1, strAsInts[11], 16, 1839030562); + v1 = step3(v1, v2, v3, v0, strAsInts[14], 23, -35309556); + v0 = step3(v0, v1, v2, v3, strAsInts[1], 4, -1530992060); + v3 = step3(v3, v0, v1, v2, strAsInts[4], 11, 1272893353); + v2 = step3(v2, v3, v0, v1, strAsInts[7], 16, -155497632); + v1 = step3(v1, v2, v3, v0, strAsInts[10], 23, -1094730640); + v0 = step3(v0, v1, v2, v3, strAsInts[13], 4, 681279174); + v3 = step3(v3, v0, v1, v2, strAsInts[0], 11, -358537222); + v2 = step3(v2, v3, v0, v1, strAsInts[3], 16, -722521979); + v1 = step3(v1, v2, v3, v0, strAsInts[6], 23, 76029189); + v0 = step3(v0, v1, v2, v3, strAsInts[9], 4, -640364487); + v3 = step3(v3, v0, v1, v2, strAsInts[12], 11, -421815835); + v2 = step3(v2, v3, v0, v1, strAsInts[15], 16, 530742520); + v1 = step3(v1, v2, v3, v0, strAsInts[2], 23, -995338651); + var step4 = step4Function.bind(null, shiftFunction); + v0 = step4(v0, v1, v2, v3, strAsInts[0], 6, -198630844); + v3 = step4(v3, v0, v1, v2, strAsInts[7], 10, 1126891415); + v2 = step4(v2, v3, v0, v1, strAsInts[14], 15, -1416354905); + v1 = step4(v1, v2, v3, v0, strAsInts[5], 21, -57434055); + v0 = step4(v0, v1, v2, v3, strAsInts[12], 6, 1700485571); + v3 = step4(v3, v0, v1, v2, strAsInts[3], 10, -1894986606); + v2 = step4(v2, v3, v0, v1, strAsInts[10], 15, -1051523); + v1 = step4(v1, v2, v3, v0, strAsInts[1], 21, -2054922799); + v0 = step4(v0, v1, v2, v3, strAsInts[8], 6, 1873313359); + v3 = step4(v3, v0, v1, v2, strAsInts[15], 10, -30611744); + v2 = step4(v2, v3, v0, v1, strAsInts[6], 15, -1560198380); + v1 = step4(v1, v2, v3, v0, strAsInts[13], 21, 1309151649); + v0 = step4(v0, v1, v2, v3, strAsInts[4], 6, -145523070); + v3 = step4(v3, v0, v1, v2, strAsInts[11], 10, -1120210379); + v2 = step4(v2, v3, v0, v1, strAsInts[2], 15, 718787259); + v1 = step4(v1, v2, v3, v0, strAsInts[9], 21, -343485551); + inOutVec4[0] = shiftFunction(v0, inOutVec4[0]); + inOutVec4[1] = shiftFunction(v1, inOutVec4[1]); + inOutVec4[2] = shiftFunction(v2, inOutVec4[2]); + inOutVec4[3] = shiftFunction(v3, inOutVec4[3]); + } + ; + function stringToIntArray(r) { + for (var ret = [], e = 0; e < 64; e += 4) + ret[e >> 2] = r.charCodeAt(e) + (r.charCodeAt(e + 1) << 8) + (r.charCodeAt(e + 2) << 16) + (r.charCodeAt(e + 3) << 24); + return ret; + } + function computeMD5(str, shiftFunction) { + let lastCharIndex; + const strLength = str.length; + const vec4 = [1732584193, -271733879, -1732584194, 271733878]; + for (lastCharIndex = 64; lastCharIndex <= strLength; lastCharIndex += 64) + hashStep(vec4, stringToIntArray(str.substring(lastCharIndex - 64, lastCharIndex)), shiftFunction); + const vec16 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + const reminderLength = (str = str.substring(lastCharIndex - 64)).length; + // process by batch of 64 + let vec16Index; + for (vec16Index = 0; vec16Index < reminderLength; vec16Index++) + vec16[vec16Index >> 2] |= str.charCodeAt(vec16Index) << (vec16Index % 4 << 3); + vec16[vec16Index >> 2] |= 128 << (vec16Index % 4 << 3); + if (vec16Index > 55) { + hashStep(vec4, vec16, shiftFunction); + for (vec16Index = 16; vec16Index--;) + vec16[vec16Index] = 0; + } + vec16[14] = 8 * strLength; + hashStep(vec4, vec16, shiftFunction); + return vec4; + } + ; + /** + * Returns the MD5 hash-value of the passed string. + * + * Based on the work of Jeff Mott, who did a pure JS implementation of the MD5 algorithm that was published by Ronald L. Rivest in 1991. + * Code was imported from https://github.com/pvorb/node-md5 + * + * I cleaned up the all-including minified version of it. + */ + function md5(str) { + if (!str) + return ''; + let shiftFunction; + if ("5d41402abc4b2a76b9719d911017c592" !== hexStringFromArray(computeMD5("hello"))) + shiftFunction = function (r, n) { + const e = (65535 & r) + (65535 & n); + return (r >> 16) + (n >> 16) + (e >> 16) << 16 | 65535 & e; + }; + return hexStringFromArray(computeMD5(str, shiftFunction)); + } + Utils.md5 = md5; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + /** + * Return a safer version of a callback that runs inside a try/catch block. + * + * @param logger - Used to log errors. + * @param className - Type of callback, helps debugging when a function failed. + * @param callback - The callback function is turn into a safer version. + */ + function safeCallback(logger, className, callback) { + return function (value) { + safeCall(logger, className, callback, value); + }; + } + Utils.safeCallback = safeCallback; + /** + * Run a callback inside a try/catch block. + * + * @param logger - Used to log errors. + * @param className - Type of callback, helps debugging when a function failed. + * @param callback - The callback function is turn into a safer version. + * @param value - Value passed to the callback. + */ + function safeCall(logger, className, callback, value) { + setTimeout(() => { + try { + logger.debug(`Calling callback: type=${className} name=${callback.name}`); + callback(value); + } + catch (error) { + logger.error(`Error in callback: type=${className} name=${callback.name}`); + const errorAsError = error; + if ('message' in errorAsError) + logger.error(errorAsError.message); + if ('fileName' in error) + logger.error('in ' + error.fileName + ':' + error.lineNumber); + if ('stack' in errorAsError) + logger.error(errorAsError.stack); + } + }, 0); + } + Utils.safeCall = safeCall; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Utils; + (function (Utils) { + function getCryptoExtension() { + return (window.crypto || window.msCrypto); + } + /** Returns an UUID v4. Uses `window.crypto` internally to generate random values. */ + function uuidv4() { + // @ts-ignore + return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, function (c) { + return (c ^ getCryptoExtension().getRandomValues(new Uint8Array(1))[0] & 15 >> c / 4).toString(16); + }); + } + Utils.uuidv4 = uuidv4; + })(Utils = CdvPurchase.Utils || (CdvPurchase.Utils = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Validator; + (function (Validator) { + /** + * @internal + */ + let Internal; + (function (Internal) { + function isArray(arg) { + return Object.prototype.toString.call(arg) === '[object Array]'; + } + function isObject(arg) { + return Object.prototype.toString.call(arg) === '[object Object]'; + } + // List of functions allowed by store.validator_privacy_policy + function getPrivacyPolicy(store) { + if (typeof store.validator_privacy_policy === 'string') + return store.validator_privacy_policy.split(','); + else if (isArray(store.validator_privacy_policy)) + return store.validator_privacy_policy; + else // default: no tracking + return ['analytics', 'support', 'fraud']; + } + function getDeviceInfo(store) { + const privacyPolicy = getPrivacyPolicy(store); // string[] + function allowed(policy) { + return privacyPolicy.indexOf(policy) >= 0; + } + // Different versions of the plugin use different response fields. + // Sending this information allows the validator to reply with only expected information. + const ret = { + plugin: 'cordova-plugin-purchase/' + CdvPurchase.PLUGIN_VERSION, + }; + const wdw = window; + // the cordova-plugin-device global object + const device = isObject(wdw.device) ? wdw.device : {}; + // Send the receipt validator information about the device. + // This will allow to make vendor or device specific fixes and detect class + // of devices with issues. + // Knowing running version of OS and libraries also required for handling + // support requests. + if (allowed('analytics') || allowed('support')) { + // Version of ionic (if applicable) + const ionic = wdw.Ionic || wdw.ionic; + if (ionic && ionic.version) + ret.ionic = ionic.version; + // Information from the cordova-plugin-device (if installed) + if (device.cordova) + ret.cordova = device.cordova; // Version of cordova + if (device.model) + ret.model = device.model; // Device model + if (device.platform) + ret.platform = device.platform; // OS + if (device.version) + ret.version = device.version; // OS version + if (device.manufacturer) + ret.manufacturer = device.manufacturer; // Device manufacturer + } + // Device identifiers are used for tracking users across services + // It is sometimes required for support requests too, but I choose to + // keep this out. + if (allowed('tracking')) { + if (device.serial) + ret.serial = device.serial; // Hardware serial number + if (device.uuid) + ret.uuid = device.uuid; // Device UUID + } + // Running from a simulator is an error condition for in-app purchases. + // Since only developers run in a simulator, let's always report that. + if (device.isVirtual) + ret.isVirtual = device.isVirtual; // Simulator + // Probably nobody wants to disable fraud discovery. + // A fingerprint of the device identifiers is used for fraud discovery. + // An alert should be triggered by the validator when a lot of devices + // share a single receipt. + if (allowed('fraud')) { + // For fraud discovery, we only need a fingerprint of the device. + var fingerprint = ''; + if (device.serial) + fingerprint = 'serial:' + device.serial; // Hardware serial number + else if (device.uuid) + fingerprint = 'uuid:' + device.uuid; // Device UUID + else { + // Using only model and manufacturer, we might end-up with many + // users sharing the same fingerprint, which is fine for fraud discovery. + if (device.model) + fingerprint += '/' + device.model; + if (device.manufacturer) + fingerprint = '/' + device.manufacturer; + } + // Fingerprint is hashed to keep required level of privacy. + if (fingerprint) + ret.fingerprint = CdvPurchase.Utils.md5(fingerprint); + } + return ret; + } + Internal.getDeviceInfo = getDeviceInfo; + })(Internal = Validator.Internal || (Validator.Internal = {})); + })(Validator = CdvPurchase.Validator || (CdvPurchase.Validator = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + let Validator; + (function (Validator) { + let Request; + (function (Request) { + ; + })(Request = Validator.Request || (Validator.Request = {})); + })(Validator = CdvPurchase.Validator || (CdvPurchase.Validator = {})); +})(CdvPurchase || (CdvPurchase = {})); +var CdvPurchase; +(function (CdvPurchase) { + /** Receipt data as validated by the receipt validation server */ + class VerifiedReceipt { + /** + * @internal + */ + constructor(receipt, response, decorator) { + var _a; + /** @internal */ + this.className = 'VerifiedReceipt'; + this.id = response.id; + this.sourceReceipt = receipt; + this.collection = (_a = response.collection) !== null && _a !== void 0 ? _a : []; + this.latestReceipt = response.latest_receipt; + this.nativeTransactions = [response.transaction]; + this.warning = response.warning; + Object.defineProperty(this, 'raw', { 'enumerable': false, get() { return response; } }); + Object.defineProperty(this, 'finish', { 'enumerable': false, get() { return () => decorator.finish(this); } }); + } + /** Platform this receipt originated from */ + get platform() { return this.sourceReceipt.platform; } + /** Get raw response data from the receipt validation request */ + get raw() { return {}; } // actual implementation as "defineProperty" in constructor. + /** + * Update the receipt content + * + * @internal + */ + set(receipt, response) { + var _a; + this.id = response.id; + this.sourceReceipt = receipt; + this.collection = (_a = response.collection) !== null && _a !== void 0 ? _a : []; + this.latestReceipt = response.latest_receipt; + this.nativeTransactions = [response.transaction]; + this.warning = response.warning; + } + /** Finish all transactions in the receipt */ + async finish() { } + } + CdvPurchase.VerifiedReceipt = VerifiedReceipt; +})(CdvPurchase || (CdvPurchase = {})); + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js new file mode 100644 index 0000000..d16bfdc --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-plugin-x-socialsharing/www/SocialSharing.js @@ -0,0 +1,160 @@ +cordova.define("cordova-plugin-x-socialsharing.SocialSharing", function(require, exports, module) { +function SocialSharing() { +} + +// Override this method (after deviceready) to set the location where you want the iPad popup arrow to appear. +// If not overridden with different values, the popup is not used. Example: +// +// window.plugins.socialsharing.iPadPopupCoordinates = function() { +// return "100,100,200,300"; +// }; +SocialSharing.prototype.iPadPopupCoordinates = function () { + // left,top,width,height + return "-1,-1,-1,-1"; +}; + +SocialSharing.prototype.setIPadPopupCoordinates = function (coords) { + console.log("Deprecated - setIPadPopupCoordinates no longer works since plugin version 5.5.0. See https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin/issues/1052"); + // left,top,width,height + cordova.exec(function() {}, this._getErrorCallback(function() {}, "setIPadPopupCoordinates"), "SocialSharing", "setIPadPopupCoordinates", [coords]); +}; + +SocialSharing.prototype.available = function (callback) { + cordova.exec(function (avail) { + callback(avail ? true : false); + }, null, "SocialSharing", "available", []); +}; + +// this is the recommended way to share as it is the most feature-rich with respect to what you pass in and get back +SocialSharing.prototype.shareWithOptions = function (options, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareWithOptions"), "SocialSharing", "shareWithOptions", [options]); +}; + +SocialSharing.prototype.shareW3C = function (sharedata) { + return new Promise(function(resolve, reject) { + var options = { + subject: sharedata.title, + message: sharedata.text, + url: sharedata.url, + iPadCoordinates: sharedata.iPadCoordinates || undefined + }; + if(sharedata.hasOwnProperty('title') || + sharedata.hasOwnProperty('text') || + sharedata.hasOwnProperty('url')) { + cordova.exec(resolve, reject, "SocialSharing", "shareWithOptions", [options]); + } else { + reject(); + } + }); +}; + +SocialSharing.prototype.share = function (message, subject, fileOrFileArray, url, iPadCoordinates, successCallback, errorCallback) { + if (typeof iPadCoordinates === 'function') { + errorCallback = successCallback; + successCallback = iPadCoordinates; + iPadCoordinates = ""; + } + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "share"), "SocialSharing", "share", [message, subject, this._asArray(fileOrFileArray), url, iPadCoordinates]); +}; + +SocialSharing.prototype.shareViaTwitter = function (message, file /* multiple not allowed by twitter */, url, successCallback, errorCallback) { + var fileArray = this._asArray(file); + var ecb = this._getErrorCallback(errorCallback, "shareViaTwitter"); + if (fileArray.length > 1) { + ecb("shareViaTwitter supports max one file"); + } else { + cordova.exec(successCallback, ecb, "SocialSharing", "shareViaTwitter", [message, null, fileArray, url]); + } +}; + +SocialSharing.prototype.shareViaFacebook = function (message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebook"), "SocialSharing", "shareViaFacebook", [message, null, this._asArray(fileOrFileArray), url]); +}; + +SocialSharing.prototype.shareViaFacebookWithPasteMessageHint = function (message, fileOrFileArray, url, pasteMessageHint, successCallback, errorCallback) { + pasteMessageHint = pasteMessageHint || "If you like you can paste a message from your clipboard"; + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaFacebookWithPasteMessageHint"), "SocialSharing", "shareViaFacebookWithPasteMessageHint", [message, null, this._asArray(fileOrFileArray), url, pasteMessageHint]); +}; + +SocialSharing.prototype.shareViaWhatsApp = function (message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsApp"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, null, null]); +}; + +SocialSharing.prototype.shareViaWhatsAppToReceiver = function (receiver, message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToReceiver"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, receiver, null]); +}; + +SocialSharing.prototype.shareViaWhatsAppToPhone = function (phone, message, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaWhatsAppToPhone"), "SocialSharing", "shareViaWhatsApp", [message, null, this._asArray(fileOrFileArray), url, null, phone]); +}; + +SocialSharing.prototype.shareViaSMS = function (options, phonenumbers, successCallback, errorCallback) { + var opts = options; + if (typeof options === "string") { + opts = {"message":options}; // for backward compatibility as the options param used to be the message + } + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaSMS"), "SocialSharing", "shareViaSMS", [opts, phonenumbers]); +}; + +SocialSharing.prototype.shareViaEmail = function (message, subject, toArray, ccArray, bccArray, fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaEmail"), "SocialSharing", "shareViaEmail", [message, subject, this._asArray(toArray), this._asArray(ccArray), this._asArray(bccArray), this._asArray(fileOrFileArray)]); +}; + +SocialSharing.prototype.canShareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareVia"), "SocialSharing", "canShareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); +}; + +SocialSharing.prototype.canShareViaEmail = function (successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "canShareViaEmail"), "SocialSharing", "canShareViaEmail", []); +}; + +SocialSharing.prototype.shareViaInstagram = function (message, fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareViaInstagram"), "SocialSharing", "shareViaInstagram", [message, null, this._asArray(fileOrFileArray), null]); +}; + +SocialSharing.prototype.shareVia = function (via, message, subject, fileOrFileArray, url, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "shareVia"), "SocialSharing", "shareVia", [message, subject, this._asArray(fileOrFileArray), url, via]); +}; + +SocialSharing.prototype.saveToPhotoAlbum = function (fileOrFileArray, successCallback, errorCallback) { + cordova.exec(successCallback, this._getErrorCallback(errorCallback, "saveToPhotoAlbum"), "SocialSharing", "saveToPhotoAlbum", [this._asArray(fileOrFileArray)]); +}; + +SocialSharing.prototype._asArray = function (param) { + if (param == null) { + param = []; + } else if (typeof param === 'string') { + param = new Array(param); + } + return param; +}; + +SocialSharing.prototype._getErrorCallback = function (ecb, functionName) { + if (typeof ecb === 'function') { + return ecb; + } else { + return function (result) { + console.log("The injected error callback of '" + functionName + "' received: " + JSON.stringify(result)); + } + } +}; + +SocialSharing.install = function () { + if (!window.plugins) { + window.plugins = {}; + } + + window.plugins.socialsharing = new SocialSharing(); + + // Note only polyfill navigator.share if it is not defined, since shareW3C implements L1 of the spec, + // and an existing navigator.share method could implement L2. + if (!navigator.share) { + navigator.share = window.plugins.socialsharing.shareW3C; + } + + return window.plugins.socialsharing; +}; + +cordova.addConstructor(SocialSharing.install); + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-universal-links-plugin/www/universal_links.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-universal-links-plugin/www/universal_links.js new file mode 100644 index 0000000..2ccaf3f --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/cordova-universal-links-plugin/www/universal_links.js @@ -0,0 +1,59 @@ +cordova.define("cordova-universal-links-plugin.universalLinks", function(require, exports, module) { +var exec = require('cordova/exec'), + channel = require('cordova/channel'), + + // Reference name for the plugin + PLUGIN_NAME = 'UniversalLinks', + + // Default event name that is used by the plugin + DEFAULT_EVENT_NAME = 'didLaunchAppFromLink'; + +// Plugin methods on the native side that can be called from JavaScript +pluginNativeMethod = { + SUBSCRIBE: 'jsSubscribeForEvent', + UNSUBSCRIBE: 'jsUnsubscribeFromEvent' +}; + +var universalLinks = { + + /** + * Subscribe to event. + * If plugin already captured that event - callback will be called immidietly. + * + * @param {String} eventName - name of the event you are subscribing on; if null - default plugin event is used + * @param {Function} callback - callback that is called when event is captured + */ + subscribe: function(eventName, callback) { + if (!callback) { + console.warn('Universal Links: can\'t subscribe to event without a callback'); + return; + } + + if (!eventName) { + eventName = DEFAULT_EVENT_NAME; + } + + var innerCallback = function(msg) { + callback(msg.data); + }; + + exec(innerCallback, null, PLUGIN_NAME, pluginNativeMethod.SUBSCRIBE, [eventName]); + }, + + /** + * Unsubscribe from the event. + * + * @param {String} eventName - from what event we are unsubscribing + */ + unsubscribe: function(eventName) { + if (!eventName) { + eventName = DEFAULT_EVENT_NAME; + } + + exec(null, null, PLUGIN_NAME, pluginNativeMethod.UNSUBSCRIBE, [eventName]); + } +}; + +module.exports = universalLinks; + +}); diff --git a/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/es6-promise-plugin/www/promise.js b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/es6-promise-plugin/www/promise.js new file mode 100644 index 0000000..6cce47a --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcarchive/Products/Applications/FlyingPlane.app/www/plugins/es6-promise-plugin/www/promise.js @@ -0,0 +1,13 @@ +cordova.define("es6-promise-plugin.Promise", function(require, exports, module) { +/*! + * @overview es6-promise - a tiny implementation of Promises/A+. + * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) + * @license Licensed under MIT license + * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE + * @version v4.2.2+97478eb6 + */ + +!function t(e,n,r){function o(u,s){if(!n[u]){if(!e[u]){var c="function"==typeof require&&require;if(!s&&c)return c(u,!0);if(i)return i(u,!0);var f=new Error("Cannot find module '"+u+"'");throw f.code="MODULE_NOT_FOUND",f}var a=n[u]={exports:{}};e[u][0].call(a.exports,function(t){var n=e[u][1][t];return o(n?n:t)},a,a.exports,t,e,n,r)}return n[u].exports}for(var i="function"==typeof require&&require,u=0;ut;t+=2){var e=te[t],n=te[t+1];e(n),te[t]=void 0,te[t+1]=void 0}H=0}function p(){try{var e=t,n=e("vertx");return I=n.runOnLoop||n.runOnContext,c()}catch(r){return l()}}function d(t,e){var n=this,r=new this.constructor(y);void 0===r[ne]&&D(r);var o=n._state;if(o){var i=arguments[o-1];Q(function(){return L(o,r,i,n._result)})}else O(n,r,t,e);return r}function v(t){var e=this;if(t&&"object"==typeof t&&t.constructor===e)return t;var n=new e(y);return E(n,t),n}function y(){}function m(){return new TypeError("You cannot resolve a promise with itself")}function _(){return new TypeError("A promises callback cannot return that same promise.")}function w(t){try{return t.then}catch(e){return ue.error=e,ue}}function g(t,e,n,r){try{t.call(e,n,r)}catch(o){return o}}function b(t,e,n){Q(function(t){var r=!1,o=g(n,e,function(n){r||(r=!0,e!==n?E(t,n):j(t,n))},function(e){r||(r=!0,x(t,e))},"Settle: "+(t._label||" unknown promise"));!r&&o&&(r=!0,x(t,o))},t)}function T(t,e){e._state===oe?j(t,e._result):e._state===ie?x(t,e._result):O(e,void 0,function(e){return E(t,e)},function(e){return x(t,e)})}function A(t,e,r){e.constructor===t.constructor&&r===d&&e.constructor.resolve===v?T(t,e):r===ue?(x(t,ue.error),ue.error=null):void 0===r?j(t,e):n(r)?b(t,e,r):j(t,e)}function E(t,n){t===n?x(t,m()):e(n)?A(t,n,w(n)):j(t,n)}function S(t){t._onerror&&t._onerror(t._result),M(t)}function j(t,e){t._state===re&&(t._result=e,t._state=oe,0!==t._subscribers.length&&Q(M,t))}function x(t,e){t._state===re&&(t._state=ie,t._result=e,Q(S,t))}function O(t,e,n,r){var o=t._subscribers,i=o.length;t._onerror=null,o[i]=e,o[i+oe]=n,o[i+ie]=r,0===i&&t._state&&Q(M,t)}function M(t){var e=t._subscribers,n=t._state;if(0!==e.length){for(var r=void 0,o=void 0,i=t._result,u=0;ui;i++)e.resolve(t[i]).then(n,r)}):new e(function(t,e){return e(new TypeError("You must pass an array to race."))})}function Y(t){var e=this,n=new e(y);return x(n,t),n}function K(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function W(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function z(){var t=void 0;if("undefined"!=typeof o)t=o;else if("undefined"!=typeof self)t=self;else try{t=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var n=t.Promise;if(n){var r=null;try{r=Object.prototype.toString.call(n.resolve())}catch(e){}if("[object Promise]"===r&&!n.cast)return}t.Promise=ae}var B=void 0;B=Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)};var G=B,H=0,I=void 0,J=void 0,Q=function(t,e){te[H]=t,te[H+1]=e,H+=2,2===H&&(J?J(h):ee())},R="undefined"!=typeof window?window:void 0,V=R||{},X=V.MutationObserver||V.WebKitMutationObserver,Z="undefined"==typeof self&&"undefined"!=typeof r&&"[object process]"==={}.toString.call(r),$="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel,te=new Array(1e3),ee=void 0;ee=Z?s():X?f():$?a():void 0===R&&"function"==typeof t?p():l();var ne=Math.random().toString(36).substring(16),re=void 0,oe=1,ie=2,ue=new P,se=new P,ce=0,fe=function(){function t(t,e){this._instanceConstructor=t,this.promise=new t(y),this.promise[ne]||D(this.promise),G(e)?(this.length=e.length,this._remaining=e.length,this._result=new Array(this.length),0===this.length?j(this.promise,this._result):(this.length=this.length||0,this._enumerate(e),0===this._remaining&&j(this.promise,this._result))):x(this.promise,F())}return t.prototype._enumerate=function(t){for(var e=0;this._state===re&&e1)for(var n=1;n + + diff --git a/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcuserdata/danieldanielecki.xcuserdatad/UserInterfaceState.xcuserstate b/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcuserdata/danieldanielecki.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000..9009a71 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane.xcodeproj/project.xcworkspace/xcuserdata/danieldanielecki.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/cordova/platforms/ios/FlyingPlane.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist b/cordova/platforms/ios/FlyingPlane.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000..63a4dac --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,14 @@ + + + + + SchemeUserState + + FlyingPlane.xcscheme_^#shared#^_ + + orderHint + 14 + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/FlyingPlane.xcscheme b/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/FlyingPlane.xcscheme new file mode 100644 index 0000000..7a99f52 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/FlyingPlane.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/TappyPlane.xcscheme b/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/TappyPlane.xcscheme index 7a99f52..db301af 100644 --- a/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/TappyPlane.xcscheme +++ b/cordova/platforms/ios/FlyingPlane.xcworkspace/xcshareddata/xcschemes/TappyPlane.xcscheme @@ -27,8 +27,6 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + + - - SchemeUserState + FlyingPlane.xcscheme_^#shared#^_ + + orderHint + 6 + TappyPlane.xcscheme_^#shared#^_ orderHint - 13 + 14 diff --git a/cordova/platforms/ios/FlyingPlane/AppDelegate.h b/cordova/platforms/ios/FlyingPlane/AppDelegate.h new file mode 100644 index 0000000..8c27551 --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/AppDelegate.h @@ -0,0 +1,24 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface AppDelegate : CDVAppDelegate + +@end diff --git a/cordova/platforms/ios/FlyingPlane/AppDelegate.m b/cordova/platforms/ios/FlyingPlane/AppDelegate.m new file mode 100644 index 0000000..3d2b6ff --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/AppDelegate.m @@ -0,0 +1,31 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "AppDelegate.h" +#import "MainViewController.h" + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.viewController = [[MainViewController alloc] init]; + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +@end diff --git a/cordova/platforms/ios/FlyingPlane/FlyingPlane-Info.plist b/cordova/platforms/ios/FlyingPlane/FlyingPlane-Info.plist new file mode 100644 index 0000000..c01f51b --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/FlyingPlane-Info.plist @@ -0,0 +1,347 @@ + + + + + CFBundleDevelopmentRegion + en_US + CFBundleDisplayName + FlyingPlane + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.2.2 + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + mycoolapp + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + CFBundleURLSchemes + + fb757927572827959 + + + + + CFBundleVersion + 1.2.2 + FacebookAdvertiserIDCollectionEnabled + + FacebookAppID + 757927572827959 + FacebookAutoLogAppEventsEnabled + + FacebookDisplayName + FlyingPlane + FacebookHybridAppEvents + false + FacebookClientToken + 3d96137028b193e43debe1bced4b5bd3 + LSApplicationQueriesSchemes + + fbapi + fb-messenger-api + fbauth2 + fbshareextension + + LSRequiresIPhoneOS + + NSMainNibFile + + UIMainStoryboardFile~ipad + + NSPhotoLibraryAddUsageDescription + This app requires photo library access to function properly. + NSPhotoLibraryUsageDescription + This app requires photo library access to function properly. + SKAdNetworkItems + + + SKAdNetworkIdentifier + cstr6suwn9.skadnetwork + + + SKAdNetworkIdentifier + 4fzdc2evr5.skadnetwork + + + SKAdNetworkIdentifier + 2fnua5tdw4.skadnetwork + + + SKAdNetworkIdentifier + ydx93a7ass.skadnetwork + + + SKAdNetworkIdentifier + 5a6flpkh64.skadnetwork + + + SKAdNetworkIdentifier + p78axxw29g.skadnetwork + + + SKAdNetworkIdentifier + v72qych5uu.skadnetwork + + + SKAdNetworkIdentifier + c6k4g5qg8m.skadnetwork + + + SKAdNetworkIdentifier + s39g8k73mm.skadnetwork + + + SKAdNetworkIdentifier + 3qy4746246.skadnetwork + + + SKAdNetworkIdentifier + 3sh42y64q3.skadnetwork + + + SKAdNetworkIdentifier + f38h382jlk.skadnetwork + + + SKAdNetworkIdentifier + hs6bdukanm.skadnetwork + + + SKAdNetworkIdentifier + prcb7njmu6.skadnetwork + + + SKAdNetworkIdentifier + v4nxqhlyqp.skadnetwork + + + SKAdNetworkIdentifier + wzmmz9fp6w.skadnetwork + + + SKAdNetworkIdentifier + yclnxrl5pm.skadnetwork + + + SKAdNetworkIdentifier + t38b2kh725.skadnetwork + + + SKAdNetworkIdentifier + 7ug5zh24hu.skadnetwork + + + SKAdNetworkIdentifier + 9rd848q2bz.skadnetwork + + + SKAdNetworkIdentifier + n6fk4nfna4.skadnetwork + + + SKAdNetworkIdentifier + kbd757ywx3.skadnetwork + + + SKAdNetworkIdentifier + 9t245vhmpl.skadnetwork + + + SKAdNetworkIdentifier + 4468km3ulz.skadnetwork + + + SKAdNetworkIdentifier + 2u9pt9hc89.skadnetwork + + + SKAdNetworkIdentifier + 8s468mfl3y.skadnetwork + + + SKAdNetworkIdentifier + av6w8kgt66.skadnetwork + + + SKAdNetworkIdentifier + klf5c3l5u5.skadnetwork + + + SKAdNetworkIdentifier + ppxm28t8ap.skadnetwork + + + SKAdNetworkIdentifier + 424m5254lk.skadnetwork + + + SKAdNetworkIdentifier + uw77j35x4d.skadnetwork + + + SKAdNetworkIdentifier + 578prtvx9j.skadnetwork + + + SKAdNetworkIdentifier + 4dzt52r2t5.skadnetwork + + + SKAdNetworkIdentifier + e5fvkxwrpn.skadnetwork + + + SKAdNetworkIdentifier + 8c4e2ghe7u.skadnetwork + + + SKAdNetworkIdentifier + zq492l623r.skadnetwork + + + SKAdNetworkIdentifier + 3qcr597p9d.skadnetwork + + + UILaunchStoryboardName + CDVLaunchScreen + UIMainStoryboardFile + CDVLaunchScreen + UIRequiresFullScreen + + UIStatusBarStyle + + UISupportedInterfaceOrientations + + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + GADApplicationIdentifier + ca-app-pub-4865595196880143~7209793334 + GADDelayAppMeasurementInit + + NSAppTransportSecurity + + NSExceptionDomains + + m.facebook.com + + graph.facebook.com + + api.facebook.com + + fbcdn.net + + NSIncludesSubdomains + + + akamaihd.net + + NSIncludesSubdomains + + + + NSAllowsArbitraryLoads + + NSAllowsArbitraryLoadsForMedia + + NSAllowsArbitraryLoadsInWebContent + + + + + diff --git a/cordova/platforms/ios/FlyingPlane/TappyPlane-Prefix.pch b/cordova/platforms/ios/FlyingPlane/FlyingPlane-Prefix.pch similarity index 100% rename from cordova/platforms/ios/FlyingPlane/TappyPlane-Prefix.pch rename to cordova/platforms/ios/FlyingPlane/FlyingPlane-Prefix.pch diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Contents.json b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Contents.json index a833483..cddbfb2 100644 --- a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Contents.json @@ -67,7 +67,7 @@ "size" : "60x60" }, { - "filename" : "Icon-20.png", + "filename" : "Icon-20 1.png", "idiom" : "ipad", "scale" : "1x", "size" : "20x20" @@ -79,7 +79,7 @@ "size" : "20x20" }, { - "filename" : "Icon-29.png", + "filename" : "Icon-29 2.png", "idiom" : "ipad", "scale" : "1x", "size" : "29x29" @@ -91,7 +91,7 @@ "size" : "29x29" }, { - "filename" : "Icon-40.png", + "filename" : "Icon-40 3.png", "idiom" : "ipad", "scale" : "1x", "size" : "40x40" @@ -103,7 +103,7 @@ "size" : "40x40" }, { - "filename" : "Icon-50.png", + "filename" : "Icon-50 1.png", "idiom" : "ipad", "scale" : "1x", "size" : "50x50" @@ -115,7 +115,7 @@ "size" : "50x50" }, { - "filename" : "Icon-72.png", + "filename" : "Icon-72 1.png", "idiom" : "ipad", "scale" : "1x", "size" : "72x72" @@ -127,7 +127,7 @@ "size" : "72x72" }, { - "filename" : "Icon-76.png", + "filename" : "Icon-76 1.png", "idiom" : "ipad", "scale" : "1x", "size" : "76x76" @@ -145,7 +145,7 @@ "size" : "83.5x83.5" }, { - "filename" : "Icon-1024 1.png", + "filename" : "Icon-1024.png", "idiom" : "ios-marketing", "scale" : "1x", "size" : "1024x1024" @@ -174,14 +174,14 @@ "size" : "29x29" }, { - "filename" : "Icon-88.png", + "filename" : "Icon-87 1.png", "idiom" : "watch", "role" : "companionSettings", "scale" : "3x", "size" : "29x29" }, { - "filename" : "Icon-64.png", + "filename" : "Icon-1024 8.png", "idiom" : "watch", "role" : "notificationCenter", "scale" : "2x", @@ -197,7 +197,7 @@ "subtype" : "38mm" }, { - "filename" : "Icon-88 2.png", + "filename" : "Icon-88 1.png", "idiom" : "watch", "role" : "appLauncher", "scale" : "2x", @@ -205,7 +205,7 @@ "subtype" : "40mm" }, { - "filename" : "Icon-88 1.png", + "filename" : "Icon-1024 7.png", "idiom" : "watch", "role" : "appLauncher", "scale" : "2x", @@ -213,7 +213,7 @@ "subtype" : "41mm" }, { - "filename" : "Icon-100 2.png", + "filename" : "Icon-100 1.png", "idiom" : "watch", "role" : "appLauncher", "scale" : "2x", @@ -221,7 +221,7 @@ "subtype" : "44mm" }, { - "filename" : "Icon-100 1.png", + "filename" : "Icon-1024 6.png", "idiom" : "watch", "role" : "appLauncher", "scale" : "2x", @@ -229,7 +229,7 @@ "subtype" : "45mm" }, { - "filename" : "Icon-114 1.png", + "filename" : "Icon-1024 5.png", "idiom" : "watch", "role" : "appLauncher", "scale" : "2x", @@ -253,7 +253,7 @@ "subtype" : "42mm" }, { - "filename" : "Icon-196 1.png", + "filename" : "Icon-1024 4.png", "idiom" : "watch", "role" : "quickLook", "scale" : "2x", @@ -261,7 +261,7 @@ "subtype" : "44mm" }, { - "filename" : "Icon-256 1.png", + "filename" : "Icon-1024 3.png", "idiom" : "watch", "role" : "quickLook", "scale" : "2x", @@ -269,7 +269,7 @@ "subtype" : "45mm" }, { - "filename" : "Icon-256.png", + "filename" : "Icon-1024 1.png", "idiom" : "watch", "role" : "quickLook", "scale" : "2x", @@ -277,7 +277,7 @@ "subtype" : "49mm" }, { - "filename" : "Icon-1024.png", + "filename" : "Icon-1024 2.png", "idiom" : "watch-marketing", "scale" : "1x", "size" : "1024x1024" diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 1.png index b90b3f0..88241ee 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 2.png deleted file mode 100644 index b90b3f0..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100 2.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100.png index b90b3f0..88241ee 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-100.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 1.png index 20d9b5f..77ff944 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 2.png new file mode 100644 index 0000000..03ef592 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 2.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 3.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 3.png new file mode 100644 index 0000000..9d682ef Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 3.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 4.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 4.png new file mode 100644 index 0000000..d7c5048 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 4.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 5.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 5.png new file mode 100644 index 0000000..3baec4d Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 5.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 6.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 6.png new file mode 100644 index 0000000..eff4af0 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 6.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 7.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 7.png new file mode 100644 index 0000000..23a1764 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 7.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 8.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 8.png new file mode 100644 index 0000000..7354a19 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024 8.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024.png new file mode 100644 index 0000000..03ef592 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-1024.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114 1.png deleted file mode 100644 index ffb0aeb..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114 1.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114.png index ffb0aeb..939c04f 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-114.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120 1.png index a0e014c..bd72dae 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120.png index a0e014c..bd72dae 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-120.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-144.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-144.png index 203eadd..76e8808 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-144.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-144.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-152.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-152.png index 5a88b0d..c18e203 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-152.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-152.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-167.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-167.png index 9e66898..23d4bf8 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-167.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-167.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-172.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-172.png index 6988468..82ff3f7 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-172.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-172.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-180.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-180.png index 376db62..f0d128e 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-180.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-180.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196 1.png deleted file mode 100644 index e46f8e1..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196 1.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196.png index e46f8e1..e822143 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-196.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-20 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-20 1.png new file mode 100644 index 0000000..0494e24 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-20 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256 1.png deleted file mode 100644 index 2c6cc74..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256 1.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256.png deleted file mode 100644 index 2c6cc74..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-256.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 1.png index 42b4ca0..32cda4e 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 2.png new file mode 100644 index 0000000..32cda4e Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-29 2.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 1.png index f7ec12c..cdd0723 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 2.png index f7ec12c..cdd0723 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 2.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 2.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 3.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 3.png new file mode 100644 index 0000000..cdd0723 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-40 3.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-48.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-48.png index e925e3d..6b7899f 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-48.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-48.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-50 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-50 1.png new file mode 100644 index 0000000..2c365b9 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-50 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-55.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-55.png index 3c8a960..99d27a1 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-55.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-55.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-57.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-57.png index a732ad7..4b2b8d1 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-57.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-57.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 1.png index 89c290e..d6589bc 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 2.png index 89c290e..d6589bc 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 2.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58 2.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58.png index 89c290e..d6589bc 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-58.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-60.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-60.png index 705f648..40fbd25 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-60.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-60.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-64.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-64.png deleted file mode 100644 index 63c726c..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-64.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-72 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-72 1.png new file mode 100644 index 0000000..12087a8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-72 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-76 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-76 1.png new file mode 100644 index 0000000..6fd8404 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-76 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 1.png index 95763a4..6c52d59 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 2.png index 95763a4..6c52d59 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 2.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80 2.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80.png index 95763a4..6c52d59 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-80.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87 1.png new file mode 100644 index 0000000..ee037a8 Binary files /dev/null and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87.png index 81c7f9b..ee037a8 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-87.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 1.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 1.png index 939c1ac..d122b65 100644 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 1.png and b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 1.png differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 2.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 2.png deleted file mode 100644 index 939c1ac..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88 2.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88.png deleted file mode 100644 index 939c1ac..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/Icon-88.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-1024.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-1024.png deleted file mode 100644 index 20d9b5f..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-1024.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-20.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-20.png deleted file mode 100644 index d718e0b..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-20.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-29.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-29.png deleted file mode 100644 index 42b4ca0..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-29.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-40.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-40.png deleted file mode 100644 index f7ec12c..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-40.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-50.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-50.png deleted file mode 100644 index 6f25a13..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-50.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-72.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-72.png deleted file mode 100644 index ece5cca..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-72.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-76.png b/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-76.png deleted file mode 100644 index 94e6647..0000000 Binary files a/cordova/platforms/ios/FlyingPlane/Images.xcassets/AppIcon.appiconset/icon-76.png and /dev/null differ diff --git a/cordova/platforms/ios/FlyingPlane/MainViewController.h b/cordova/platforms/ios/FlyingPlane/MainViewController.h new file mode 100644 index 0000000..1bbe01c --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/MainViewController.h @@ -0,0 +1,24 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import + +@interface MainViewController : CDVViewController + +@end diff --git a/cordova/platforms/ios/FlyingPlane/MainViewController.m b/cordova/platforms/ios/FlyingPlane/MainViewController.m new file mode 100644 index 0000000..b99433a --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/MainViewController.m @@ -0,0 +1,30 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ + +#import "MainViewController.h" + +@implementation MainViewController + +- (void)viewDidLoad +{ + [super viewDidLoad]; + [self.launchView setAlpha:1]; +} + +@end diff --git a/cordova/platforms/ios/FlyingPlane/MainViewController.xib b/cordova/platforms/ios/FlyingPlane/MainViewController.xib new file mode 100644 index 0000000..e45d65c --- /dev/null +++ b/cordova/platforms/ios/FlyingPlane/MainViewController.xib @@ -0,0 +1,138 @@ + + + + + 1280 + 11C25 + 1919 + 1138.11 + 566.00 + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + 916 + + + IBProxyObject + IBUIView + + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + PluginDependencyRecalculationVersion + + + + + IBFilesOwner + IBCocoaTouchFramework + + + IBFirstResponder + IBCocoaTouchFramework + + + + 274 + {{0, 20}, {320, 460}} + + + + 3 + MQA + + 2 + + + + IBCocoaTouchFramework + + + + + + + view + + + + 3 + + + + + + 0 + + + + + + 1 + + + + + -1 + + + File's Owner + + + -2 + + + + + + + MainViewController + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + UIResponder + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + + + + + 3 + + + + + MainViewController + UIViewController + + IBProjectSource + ./Classes/MainViewController.h + + + + + 0 + IBCocoaTouchFramework + YES + 3 + 916 + + diff --git a/cordova/platforms/ios/FlyingPlane/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m b/cordova/platforms/ios/FlyingPlane/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m index cf4b6f6..3dc26da 100644 --- a/cordova/platforms/ios/FlyingPlane/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m +++ b/cordova/platforms/ios/FlyingPlane/Plugins/cordova-plugin-inappbrowser/CDVWKInAppBrowser.m @@ -6,9 +6,9 @@ Licensed to the Apache Software Foundation (ASF) under one to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -75,7 +75,7 @@ - (void)close:(CDVInvokedUrlCommand*)command NSLog(@"IAB.close() called but it was already closed."); return; } - + // Things are cleaned up in browserExit. [self.inAppBrowserViewController close]; } @@ -85,28 +85,28 @@ - (BOOL) isSystemUrl:(NSURL*)url if ([[url host] isEqualToString:@"itunes.apple.com"]) { return YES; } - + return NO; } - (void)open:(CDVInvokedUrlCommand*)command { CDVPluginResult* pluginResult; - + NSString* url = [command argumentAtIndex:0]; NSString* target = [command argumentAtIndex:1 withDefault:kInAppBrowserTargetSelf]; NSString* options = [command argumentAtIndex:2 withDefault:@"" andClass:[NSString class]]; - + self.callbackId = command.callbackId; - + if (url != nil) { NSURL* baseUrl = [self.webViewEngine URL]; NSURL* absoluteUrl = [[NSURL URLWithString:url relativeToURL:baseUrl] absoluteURL]; - + if ([self isSystemUrl:absoluteUrl]) { target = kInAppBrowserTargetSystem; } - + if ([target isEqualToString:kInAppBrowserTargetSelf]) { [self openInCordovaWebView:absoluteUrl withOptions:options]; } else if ([target isEqualToString:kInAppBrowserTargetSystem]) { @@ -114,12 +114,12 @@ - (void)open:(CDVInvokedUrlCommand*)command } else { // _blank or anything else [self openInInAppBrowser:absoluteUrl withOptions:options]; } - + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; } else { pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"incorrect number of arguments"]; } - + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } @@ -127,17 +127,17 @@ - (void)open:(CDVInvokedUrlCommand*)command - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options { CDVInAppBrowserOptions* browserOptions = [CDVInAppBrowserOptions parseOptions:options]; - + WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore]; if (browserOptions.cleardata) { - + NSDate* dateFrom = [NSDate dateWithTimeIntervalSince1970:0]; [dataStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:dateFrom completionHandler:^{ NSLog(@"Removed all WKWebView data"); self.inAppBrowserViewController.webView.configuration.processPool = [[WKProcessPool alloc] init]; // create new process pool to flush all data }]; } - + if (browserOptions.clearcache) { bool isAtLeastiOS11 = false; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 @@ -145,7 +145,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options isAtLeastiOS11 = true; } #endif - + if(isAtLeastiOS11){ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 // Deletes all cookies @@ -173,7 +173,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options }]; } } - + if (browserOptions.clearsessioncache) { bool isAtLeastiOS11 = false; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 @@ -202,12 +202,12 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options if (self.inAppBrowserViewController == nil) { self.inAppBrowserViewController = [[CDVWKInAppBrowserViewController alloc] initWithBrowserOptions: browserOptions andSettings:self.commandDelegate.settings]; self.inAppBrowserViewController.navigationDelegate = self; - + if ([self.viewController conformsToProtocol:@protocol(CDVScreenOrientationDelegate)]) { self.inAppBrowserViewController.orientationDelegate = (UIViewController *)self.viewController; } } - + [self.inAppBrowserViewController showLocationBar:browserOptions.location]; [self.inAppBrowserViewController showToolBar:browserOptions.toolbar :browserOptions.toolbarposition]; if (browserOptions.closebuttoncaption != nil || browserOptions.closebuttoncolor != nil) { @@ -224,7 +224,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } self.inAppBrowserViewController.modalPresentationStyle = presentationStyle; - + // Set Transition Style UIModalTransitionStyle transitionStyle = UIModalTransitionStyleCoverVertical; // default if (browserOptions.transitionstyle != nil) { @@ -235,7 +235,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } self.inAppBrowserViewController.modalTransitionStyle = transitionStyle; - + //prevent webView from bouncing if (browserOptions.disallowoverscroll) { if ([self.inAppBrowserViewController.webView respondsToSelector:@selector(scrollView)]) { @@ -248,7 +248,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } } - + // use of beforeload event if([browserOptions.beforeload isKindOfClass:[NSString class]]){ _beforeload = browserOptions.beforeload; @@ -256,7 +256,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options _beforeload = @"yes"; } _waitForBeforeload = ![_beforeload isEqualToString:@""]; - + [self.inAppBrowserViewController navigateTo:url]; if (!browserOptions.hidden) { [self show:nil withNoAnimate:browserOptions.hidden]; @@ -273,7 +273,7 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate if(command == nil && noAnimate == YES){ initHidden = YES; } - + if (self.inAppBrowserViewController == nil) { NSLog(@"Tried to show IAB after it was closed."); return; @@ -282,20 +282,20 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate NSLog(@"Tried to show IAB while already shown"); return; } - + if(!initHidden){ _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; } - + __block CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] initWithRootViewController:self.inAppBrowserViewController]; nav.orientationDelegate = self.inAppBrowserViewController; nav.navigationBarHidden = YES; nav.modalPresentationStyle = self.inAppBrowserViewController.modalPresentationStyle; nav.presentationController.delegate = self.inAppBrowserViewController; - + __weak CDVWKInAppBrowser* weakSelf = self; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ if (weakSelf.inAppBrowserViewController != nil) { @@ -330,16 +330,16 @@ - (void)hide:(CDVInvokedUrlCommand*)command if (self.inAppBrowserViewController == nil) { NSLog(@"Tried to hide IAB after it was closed."); return; - - + + } if (_previousStatusBarStyle == -1) { NSLog(@"Tried to hide IAB while already hidden"); return; } - + _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ if (self.inAppBrowserViewController != nil) { @@ -400,7 +400,7 @@ - (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper { // Ensure a message handler bridge is created to communicate with the CDVWKInAppBrowserViewController [self evaluateJavaScript: [NSString stringWithFormat:@"(function(w){if(!w._cdvMessageHandler) {w._cdvMessageHandler = function(id,d){w.webkit.messageHandlers.%@.postMessage({d:d, id:id});}}})(window)", IAB_BRIDGE_NAME]]; - + if (jsWrapper != nil) { NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil]; NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; @@ -432,7 +432,7 @@ - (void)evaluateJavaScript:(NSString *)script { - (void)injectScriptCode:(CDVInvokedUrlCommand*)command { NSString* jsWrapper = nil; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"_cdvMessageHandler('%@',JSON.stringify([eval(%%@)]));", command.callbackId]; } @@ -442,7 +442,7 @@ - (void)injectScriptCode:(CDVInvokedUrlCommand*)command - (void)injectScriptFile:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('script'); c.src = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -454,7 +454,7 @@ - (void)injectScriptFile:(CDVInvokedUrlCommand*)command - (void)injectStyleCode:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('style'); c.innerHTML = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -466,7 +466,7 @@ - (void)injectStyleCode:(CDVInvokedUrlCommand*)command - (void)injectStyleFile:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -498,7 +498,7 @@ - (BOOL)isValidCallbackId:(NSString *)callbackId * other code execution is possible. */ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { - + NSURL* url = navigationAction.request.URL; NSURL* mainDocumentURL = navigationAction.request.mainDocumentURL; BOOL isTopLevelNavigation = [url isEqual:mainDocumentURL]; @@ -506,7 +506,7 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig BOOL useBeforeLoad = NO; NSString* httpMethod = navigationAction.request.HTTPMethod; NSString* errorMessage = nil; - + if([_beforeload isEqualToString:@"post"]){ //TODO handle POST requests by preserving POST data then remove this condition errorMessage = @"beforeload doesn't yet support POST requests"; @@ -525,12 +525,12 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"beforeload", @"url":[url absoluteString]}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; decisionHandler(WKNavigationActionPolicyCancel); return; } - + if(errorMessage != nil){ NSLog(errorMessage); CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR @@ -538,7 +538,7 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } - + //if is an app store link, let the system handle it, otherwise it fails to load it if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) { [theWebView stopLoading]; @@ -550,14 +550,14 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"loadstart", @"url":[url absoluteString]}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } if (useBeforeLoad) { _waitForBeforeload = YES; } - + if(shouldStart){ // Fix GH-417 & GH-424: Handle non-default target attribute // Based on https://stackoverflow.com/a/25713070/777265 @@ -574,13 +574,13 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig #pragma mark WKScriptMessageHandler delegate - (void)userContentController:(nonnull WKUserContentController *)userContentController didReceiveScriptMessage:(nonnull WKScriptMessage *)message { - + CDVPluginResult* pluginResult = nil; - + if([message.body isKindOfClass:[NSDictionary class]]){ NSDictionary* messageContent = (NSDictionary*) message.body; NSString* scriptCallbackId = messageContent[@"id"]; - + if([messageContent objectForKey:@"d"]){ NSString* scriptResult = messageContent[@"d"]; NSError* __autoreleasing error = nil; @@ -630,7 +630,7 @@ - (void)didFinishNavigation:(WKWebView*)theWebView CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"loadstop", @"url":url}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } } @@ -649,7 +649,7 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(NSError*)error CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:@{@"type":@"loaderror", @"url":url, @"code": [NSNumber numberWithInteger:error.code], @"message": error.localizedDescription}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } } @@ -662,16 +662,16 @@ - (void)browserExit [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; self.callbackId = nil; } - + [self.inAppBrowserViewController.configuration.userContentController removeScriptMessageHandlerForName:IAB_BRIDGE_NAME]; self.inAppBrowserViewController.configuration = nil; - + [self.inAppBrowserViewController.webView stopLoading]; [self.inAppBrowserViewController.webView removeFromSuperview]; [self.inAppBrowserViewController.webView setUIDelegate:nil]; [self.inAppBrowserViewController.webView setNavigationDelegate:nil]; self.inAppBrowserViewController.webView = nil; - + // Set navigationDelegate to nil to ensure no callbacks are received from it. self.inAppBrowserViewController.navigationDelegate = nil; self.inAppBrowserViewController = nil; @@ -684,10 +684,10 @@ - (void)browserExit if (IsAtLeastiOSVersion(@"7.0")) { if (_previousStatusBarStyle != -1) { [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; - + } } - + _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7 } @@ -710,10 +710,10 @@ - (id)initWithBrowserOptions: (CDVInAppBrowserOptions*) browserOptions andSettin _settings = settings; self.webViewUIDelegate = [[CDVWKInAppBrowserUIDelegate alloc] initWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; [self.webViewUIDelegate setViewController:self]; - + [self createViews]; } - + return self; } @@ -724,14 +724,14 @@ -(void)dealloc { - (void)createViews { // We create the views in code for primarily for ease of upgrades and not requiring an external .xib to be included - + CGRect webViewBounds = self.view.bounds; BOOL toolbarIsAtBottom = ![_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]; webViewBounds.size.height -= _browserOptions.location ? FOOTER_HEIGHT : TOOLBAR_HEIGHT; WKUserContentController* userContentController = [[WKUserContentController alloc] init]; - + WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init]; - + NSString *userAgent = configuration.applicationNameForUserAgent; if ( [self settingForKey:@"OverrideUserAgent"] == nil && @@ -747,7 +747,7 @@ - (void)createViews configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool]; #endif [configuration.userContentController addScriptMessageHandler:self name:IAB_BRIDGE_NAME]; - + //WKWebView options configuration.allowsInlineMediaPlayback = _browserOptions.allowinlinemediaplayback; if (IsAtLeastiOSVersion(@"10.0")) { @@ -760,7 +760,7 @@ - (void)createViews }else{ // iOS 9 configuration.mediaPlaybackRequiresUserAction = _browserOptions.mediaplaybackrequiresuseraction; } - + if (@available(iOS 13.0, *)) { NSString *contentMode = [self settingForKey:@"PreferredContentMode"]; if ([contentMode isEqual: @"mobile"]) { @@ -768,23 +768,23 @@ - (void)createViews } else if ([contentMode isEqual: @"desktop"]) { configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop; } - + } - + self.webView = [[WKWebView alloc] initWithFrame:webViewBounds configuration:configuration]; - + [self.view addSubview:self.webView]; [self.view sendSubviewToBack:self.webView]; - - + + self.webView.navigationDelegate = self; self.webView.UIDelegate = self.webViewUIDelegate; self.webView.backgroundColor = [UIColor whiteColor]; if ([self settingForKey:@"OverrideUserAgent"] != nil) { self.webView.customUserAgent = [self settingForKey:@"OverrideUserAgent"]; } - + self.webView.clearsContextBeforeDrawing = YES; self.webView.clipsToBounds = YES; self.webView.contentMode = UIViewContentModeScaleToFill; @@ -795,13 +795,13 @@ - (void)createViews [self.webView setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; self.webView.allowsLinkPreview = NO; self.webView.allowsBackForwardNavigationGestures = NO; - + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 if (@available(iOS 11.0, *)) { [self.webView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; } #endif - + self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; self.spinner.alpha = 1.000; self.spinner.autoresizesSubviews = YES; @@ -816,18 +816,18 @@ - (void)createViews self.spinner.opaque = NO; self.spinner.userInteractionEnabled = NO; [self.spinner stopAnimating]; - + self.closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; self.closeButton.enabled = YES; - + UIBarButtonItem* flexibleSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; - + UIBarButtonItem* fixedSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; fixedSpaceButton.width = 20; - + float toolbarY = toolbarIsAtBottom ? self.view.bounds.size.height - TOOLBAR_HEIGHT : 0.0; CGRect toolbarFrame = CGRectMake(0.0, toolbarY, self.view.bounds.size.width, TOOLBAR_HEIGHT); - + self.toolbar = [[UIToolbar alloc] initWithFrame:toolbarFrame]; self.toolbar.alpha = 1.000; self.toolbar.autoresizesSubviews = YES; @@ -846,10 +846,10 @@ - (void)createViews if (!_browserOptions.toolbartranslucent) { // Set toolbar translucent to no if user sets it in options self.toolbar.translucent = NO; } - + CGFloat labelInset = 5.0; float locationBarY = toolbarIsAtBottom ? self.view.bounds.size.height - FOOTER_HEIGHT : self.view.bounds.size.height - LOCATIONBAR_HEIGHT; - + self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(labelInset, locationBarY, self.view.bounds.size.width - labelInset, LOCATIONBAR_HEIGHT)]; self.addressLabel.adjustsFontSizeToFitWidth = NO; self.addressLabel.alpha = 1.000; @@ -863,13 +863,13 @@ - (void)createViews self.addressLabel.enabled = YES; self.addressLabel.hidden = NO; self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail; - + if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) { [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"]; } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) { [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"]; } - + self.addressLabel.multipleTouchEnabled = NO; self.addressLabel.numberOfLines = 1; self.addressLabel.opaque = NO; @@ -878,7 +878,7 @@ - (void)createViews self.addressLabel.textAlignment = NSTextAlignmentLeft; self.addressLabel.textColor = [UIColor colorWithWhite:1.000 alpha:1.000]; self.addressLabel.userInteractionEnabled = NO; - + NSString* frontArrowString = NSLocalizedString(@"►", nil); // create arrow from Unicode char self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)]; self.forwardButton.enabled = YES; @@ -907,7 +907,7 @@ - (void)createViews } else { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; } - + self.view.backgroundColor = [UIColor clearColor]; [self.view addSubview:self.toolbar]; [self.view addSubview:self.addressLabel]; @@ -934,7 +934,7 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b self.closeButton.enabled = YES; // If color on closebutton is requested then initialize with that that color, otherwise use initialize with default self.closeButton.tintColor = colorString != nil ? [self colorFromHexString:colorString] : [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; - + NSMutableArray* items = [self.toolbar.items mutableCopy]; [items replaceObjectAtIndex:buttonIndex withObject:self.closeButton]; [self.toolbar setItems:items]; @@ -943,43 +943,43 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b - (void)showLocationBar:(BOOL)show { CGRect locationbarFrame = self.addressLabel.frame; - + BOOL toolbarVisible = !self.toolbar.hidden; - + // prevent double show/hide if (show == !(self.addressLabel.hidden)) { return; } - + if (show) { self.addressLabel.hidden = NO; - + if (toolbarVisible) { // toolBar at the bottom, leave as is // put locationBar on top of the toolBar - + CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= FOOTER_HEIGHT; [self setWebViewFrame:webViewBounds]; - + locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; } else { // no toolBar, so put locationBar at the bottom - + CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= LOCATIONBAR_HEIGHT; [self setWebViewFrame:webViewBounds]; - + locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; } } else { self.addressLabel.hidden = YES; - + if (toolbarVisible) { // locationBar is on top of toolBar, hide locationBar - + // webView take up whole height less toolBar height CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= TOOLBAR_HEIGHT; @@ -995,18 +995,18 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition { CGRect toolbarFrame = self.toolbar.frame; CGRect locationbarFrame = self.addressLabel.frame; - + BOOL locationbarVisible = !self.addressLabel.hidden; - + // prevent double show/hide if (show == !(self.toolbar.hidden)) { return; } - + if (show) { self.toolbar.hidden = NO; CGRect webViewBounds = self.view.bounds; - + if (locationbarVisible) { // locationBar at the bottom, move locationBar up // put toolBar at the bottom @@ -1020,7 +1020,7 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition webViewBounds.size.height -= TOOLBAR_HEIGHT; self.toolbar.frame = toolbarFrame; } - + if ([toolbarPosition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { toolbarFrame.origin.y = 0; webViewBounds.origin.y += toolbarFrame.size.height; @@ -1029,19 +1029,19 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition toolbarFrame.origin.y = (webViewBounds.size.height + LOCATIONBAR_HEIGHT); } [self setWebViewFrame:webViewBounds]; - + } else { self.toolbar.hidden = YES; - + if (locationbarVisible) { // locationBar is on top of toolBar, hide toolBar // put locationBar at the bottom - + // webView take up whole height less locationBar height CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= LOCATIONBAR_HEIGHT; [self setWebViewFrame:webViewBounds]; - + // move locationBar down locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; @@ -1089,9 +1089,9 @@ - (BOOL)prefersStatusBarHidden { - (void)close { self.currentURL = nil; - + __weak UIViewController* weakSelf = self; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ isExiting = TRUE; @@ -1127,7 +1127,7 @@ - (void)goForward:(id)sender - (void)viewWillAppear:(BOOL)animated { [self rePositionViews]; - + [super viewWillAppear:animated]; } @@ -1143,21 +1143,21 @@ - (float) getStatusBarOffset { - (void) rePositionViews { CGRect viewBounds = [self.webView bounds]; CGFloat statusBarHeight = [self getStatusBarOffset]; - + // orientation portrait or portraitUpsideDown: status bar is on the top and web view is to be aligned to the bottom of the status bar // orientation landscapeLeft or landscapeRight: status bar height is 0 in but lets account for it in case things ever change in the future viewBounds.origin.y = statusBarHeight; - + // account for web view height portion that may have been reduced by a previous call to this method viewBounds.size.height = viewBounds.size.height - statusBarHeight + lastReducedStatusBarHeight; lastReducedStatusBarHeight = statusBarHeight; - + if ((_browserOptions.toolbar) && ([_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop])) { // if we have to display the toolbar on top of the web view, we need to account for its height viewBounds.origin.y += TOOLBAR_HEIGHT; self.toolbar.frame = CGRectMake(self.toolbar.frame.origin.x, statusBarHeight, self.toolbar.frame.size.width, self.toolbar.frame.size.height); } - + self.webView.frame = viewBounds; } @@ -1175,18 +1175,18 @@ - (UIColor *)colorFromHexString:(NSString *)hexString { #pragma mark WKNavigationDelegate - (void)webView:(WKWebView *)theWebView didStartProvisionalNavigation:(WKNavigation *)navigation{ - + // loading url, start spinner, update back/forward - + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; - + NSLog(_browserOptions.hidespinner ? @"Yes" : @"No"); if(!_browserOptions.hidespinner) { [self.spinner startAnimating]; } - + return [self.navigationDelegate didStartProvisionalNavigation:theWebView]; } @@ -1194,40 +1194,40 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig { NSURL *url = navigationAction.request.URL; NSURL *mainDocumentURL = navigationAction.request.mainDocumentURL; - + BOOL isTopLevelNavigation = [url isEqual:mainDocumentURL]; - + if (isTopLevelNavigation) { self.currentURL = url; } - + [self.navigationDelegate webView:theWebView decidePolicyForNavigationAction:navigationAction decisionHandler:decisionHandler]; } - (void)webView:(WKWebView *)theWebView didFinishNavigation:(WKNavigation *)navigation { // update url, stop spinner, update back/forward - + self.addressLabel.text = [self.currentURL absoluteString]; self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; theWebView.scrollView.contentInset = UIEdgeInsetsZero; - + [self.spinner stopAnimating]; - + [self.navigationDelegate didFinishNavigation:theWebView]; } - + - (void)webView:(WKWebView*)theWebView failedNavigation:(NSString*) delegateName withError:(nonnull NSError *)error{ // log fail message, stop spinner, update back/forward NSLog(@"webView:%@ - %ld: %@", delegateName, (long)error.code, [error localizedDescription]); - + self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; [self.spinner stopAnimating]; - + self.addressLabel.text = NSLocalizedString(@"Load Error", nil); - + [self.navigationDelegate webView:theWebView didFailNavigation:error]; } @@ -1235,7 +1235,7 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(null_unspecified WKNav { [self webView:theWebView failedNavigation:@"didFailNavigation" withError:error]; } - + - (void)webView:(WKWebView*)theWebView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(nonnull NSError *)error { [self webView:theWebView failedNavigation:@"didFailProvisionalNavigation" withError:error]; @@ -1265,7 +1265,7 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { return [self.orientationDelegate supportedInterfaceOrientations]; } - + return 1 << UIInterfaceOrientationPortrait; } diff --git a/cordova/platforms/ios/FlyingPlane/Resources/TappyPlane.entitlements b/cordova/platforms/ios/FlyingPlane/Resources/FlyingPlane.entitlements similarity index 70% rename from cordova/platforms/ios/FlyingPlane/Resources/TappyPlane.entitlements rename to cordova/platforms/ios/FlyingPlane/Resources/FlyingPlane.entitlements index 1cc02fd..66fd59f 100644 --- a/cordova/platforms/ios/FlyingPlane/Resources/TappyPlane.entitlements +++ b/cordova/platforms/ios/FlyingPlane/Resources/FlyingPlane.entitlements @@ -4,8 +4,8 @@ com.apple.developer.associated-domains - applinks:xxxxx.page.link - applinks:xxxx-zzzzz.firebaseapp.com + applinks:doyban.page.link + applinks:tappyplane-b349f.firebaseapp.com \ No newline at end of file diff --git a/cordova/platforms/ios/FlyingPlane/TappyPlane-Info.plist b/cordova/platforms/ios/FlyingPlane/TappyPlane-Info.plist deleted file mode 100644 index 2d21c47..0000000 --- a/cordova/platforms/ios/FlyingPlane/TappyPlane-Info.plist +++ /dev/null @@ -1,318 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en_US - CFBundleDisplayName - FlyingPlane - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0.5 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - mycoolapp - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959 - - - - CFBundleURLSchemes - - fb757927572827959FACEBOOK_URL_SCHEME_SUFFIX_PLACEHOLDER - OTHER_APP_SCHEMES_PLACEHOLDER - - - - CFBundleVersion - 1.0.5 - FacebookAdvertiserIDCollectionEnabled - - FacebookAppID - 757927572827959 - FacebookAutoLogAppEventsEnabled - - FacebookDisplayName - FlyingPlane - FacebookHybridAppEvents - false - LSApplicationQueriesSchemes - - fbapi - fb-messenger-api - fbauth2 - fbshareextension - - LSRequiresIPhoneOS - - NSMainNibFile - - NSMainNibFile~ipad - - NSPhotoLibraryAddUsageDescription - This app requires photo library access to function properly. - NSPhotoLibraryUsageDescription - This app requires photo library access to function properly. - SKAdNetworkItems - - - SKAdNetworkIdentifier - cstr6suwn9.skadnetwork - - - SKAdNetworkIdentifier - 4fzdc2evr5.skadnetwork - - - SKAdNetworkIdentifier - 2fnua5tdw4.skadnetwork - - - SKAdNetworkIdentifier - ydx93a7ass.skadnetwork - - - SKAdNetworkIdentifier - 5a6flpkh64.skadnetwork - - - SKAdNetworkIdentifier - p78axxw29g.skadnetwork - - - SKAdNetworkIdentifier - v72qych5uu.skadnetwork - - - SKAdNetworkIdentifier - c6k4g5qg8m.skadnetwork - - - SKAdNetworkIdentifier - s39g8k73mm.skadnetwork - - - SKAdNetworkIdentifier - 3qy4746246.skadnetwork - - - SKAdNetworkIdentifier - 3sh42y64q3.skadnetwork - - - SKAdNetworkIdentifier - f38h382jlk.skadnetwork - - - SKAdNetworkIdentifier - hs6bdukanm.skadnetwork - - - SKAdNetworkIdentifier - prcb7njmu6.skadnetwork - - - SKAdNetworkIdentifier - v4nxqhlyqp.skadnetwork - - - SKAdNetworkIdentifier - wzmmz9fp6w.skadnetwork - - - SKAdNetworkIdentifier - yclnxrl5pm.skadnetwork - - - SKAdNetworkIdentifier - t38b2kh725.skadnetwork - - - SKAdNetworkIdentifier - 7ug5zh24hu.skadnetwork - - - SKAdNetworkIdentifier - 9rd848q2bz.skadnetwork - - - SKAdNetworkIdentifier - n6fk4nfna4.skadnetwork - - - SKAdNetworkIdentifier - kbd757ywx3.skadnetwork - - - SKAdNetworkIdentifier - 9t245vhmpl.skadnetwork - - - SKAdNetworkIdentifier - 4468km3ulz.skadnetwork - - - SKAdNetworkIdentifier - 2u9pt9hc89.skadnetwork - - - SKAdNetworkIdentifier - 8s468mfl3y.skadnetwork - - - SKAdNetworkIdentifier - av6w8kgt66.skadnetwork - - - SKAdNetworkIdentifier - klf5c3l5u5.skadnetwork - - - SKAdNetworkIdentifier - ppxm28t8ap.skadnetwork - - - SKAdNetworkIdentifier - 424m5254lk.skadnetwork - - - SKAdNetworkIdentifier - uw77j35x4d.skadnetwork - - - SKAdNetworkIdentifier - 578prtvx9j.skadnetwork - - - SKAdNetworkIdentifier - 4dzt52r2t5.skadnetwork - - - SKAdNetworkIdentifier - e5fvkxwrpn.skadnetwork - - - SKAdNetworkIdentifier - 8c4e2ghe7u.skadnetwork - - - SKAdNetworkIdentifier - zq492l623r.skadnetwork - - - SKAdNetworkIdentifier - 3qcr597p9d.skadnetwork - - - UILaunchStoryboardName - CDVLaunchScreen - UIRequiresFullScreen - - UIStatusBarStyle - - UISupportedInterfaceOrientations - - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - FacebookUrlSchemeSuffix - FACEBOOK_URL_SCHEME_SUFFIX_PLACEHOLDER - FacebookAutoLogAppEventsEnabled_PLACEHOLDER - FACEBOOK_AUTO_LOG_APP_EVENTS_PLACEHOLDER - FacebookAdvertiserIDCollectionEnabled_PLACEHOLDER - FACEBOOK_ADVERTISER_ID_COLLECTION_PLACEHOLDER - GADApplicationIdentifier - ca-app-pub-4865595196880143~7209793334 - GADDelayAppMeasurementInit - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsArbitraryLoadsForMedia - - NSAllowsArbitraryLoadsInWebContent - - - NSUserTrackingUsageDescription - This identifier will be used to deliver personalized ads to you. - - diff --git a/cordova/platforms/ios/FlyingPlane/config.xml b/cordova/platforms/ios/FlyingPlane/config.xml index 5d926ac..a3f603b 100644 --- a/cordova/platforms/ios/FlyingPlane/config.xml +++ b/cordova/platforms/ios/FlyingPlane/config.xml @@ -1,5 +1,5 @@ - + @@ -57,6 +57,9 @@ + + + FlyingPlane Tap Plane Game Doyban @@ -96,7 +99,8 @@ - - + + + diff --git a/cordova/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj b/cordova/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj index 6f31788..3ebb491 100644 --- a/cordova/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj +++ b/cordova/platforms/ios/Pods/Pods.xcodeproj/project.pbxproj @@ -478,7 +478,7 @@ 8E487CE2B6CB70B9626F27EC5DA3A32A /* FBSDKInternalUtility+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E4568FD6940D6FC7E0E205B6E147339 /* FBSDKInternalUtility+Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; 9156F5BE783BBBFBD8D0558C5639632C /* FBSDKLikeBoxBorderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 42A4A20F8BB160E621A95DDADAD4C668 /* FBSDKLikeBoxBorderView.m */; }; 918D08E3DAC440BC77BBDAA665B07B3A /* FBSDKDeviceButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 6EACE3B95C85186AD3CA47F9C2805242 /* FBSDKDeviceButton.m */; }; - 91CAA14521CC2D859B8889790AD4B340 /* Pods-TappyPlane-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3804EE5A63C917040F7E7FFBD020128A /* Pods-TappyPlane-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 91CAA14521CC2D859B8889790AD4B340 /* Pods-FlyingPlane-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3804EE5A63C917040F7E7FFBD020128A /* Pods-FlyingPlane-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; 91F783E857DBC9F9338292B22D4F928A /* FBLPromise+Delay.h in Headers */ = {isa = PBXBuildFile; fileRef = 8762C0B6B430898AD5D59248D31546DC /* FBLPromise+Delay.h */; settings = {ATTRIBUTES = (Public, ); }; }; 92691664F9359169D71D5240BE32B3C9 /* FBSDKSKAdNetworkEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = 2DFD1C8002C670D737D1A452FE66F8C7 /* FBSDKSKAdNetworkEvent.m */; }; 9281F1DA27B3CA4F88676975EF1B6ECE /* FBSDKLoginKit-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B61488553DD2EE375E4B8DFE19C6324 /* FBSDKLoginKit-dummy.m */; }; @@ -496,7 +496,7 @@ 95515D1C818949F8F6907FDE5B695E12 /* FBSDKDeviceLoginManagerResult.m in Sources */ = {isa = PBXBuildFile; fileRef = 625F6E0D8CCD541C8D32EC47D14BAF8E /* FBSDKDeviceLoginManagerResult.m */; }; 955D4A80738147F481F5BE3A0B357C33 /* GULSwizzler.m in Sources */ = {isa = PBXBuildFile; fileRef = 0E71753D9D0BFE30956D8396CAD807C9 /* GULSwizzler.m */; }; 96F02730298AEA9D03043E0F4BA7DB62 /* FBSDKServerConfiguration+Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = D12A3A5D26C50D079C4D873BE4EE7231 /* FBSDKServerConfiguration+Internal.h */; settings = {ATTRIBUTES = (Private, ); }; }; - 974B05401384538216D39DA21E75A735 /* Pods-TappyPlane-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1717BB8C3B40EA23A63D618CD34D104 /* Pods-TappyPlane-dummy.m */; }; + 974B05401384538216D39DA21E75A735 /* Pods-FlyingPlane-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A1717BB8C3B40EA23A63D618CD34D104 /* Pods-FlyingPlane-dummy.m */; }; 97762F1A03036091F8774E7355E72461 /* FBSDKAppEventsConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = D518CF205FFD2F271835308B066DC1E4 /* FBSDKAppEventsConfiguration.m */; }; 986BF78D8F76CA7D024B89FF650DAD4D /* FBSDKSmartDeviceDialogView.h in Headers */ = {isa = PBXBuildFile; fileRef = DBA96DC4ED9BC883F36EE1DF08502FDA /* FBSDKSmartDeviceDialogView.h */; settings = {ATTRIBUTES = (Private, ); }; }; 98F22A4666F21D458CE6EBC6E0D8BA4E /* FBSDKDevicePoller.m in Sources */ = {isa = PBXBuildFile; fileRef = 819DA7FC78C22DCA3AE49C146EE3F731 /* FBSDKDevicePoller.m */; }; @@ -1032,7 +1032,7 @@ 0D1F8EC60AAD376CBA8663DC01616C14 /* FBSDKCameraEffectTextures.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKCameraEffectTextures.m; path = FBSDKShareKit/FBSDKShareKit/FBSDKCameraEffectTextures.m; sourceTree = ""; }; 0D2DD2D2505D74F8CABD8C19A3DE16E9 /* FBSDKPaymentProductRequestorCreating.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKPaymentProductRequestorCreating.h; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKPaymentProductRequestorCreating.h; sourceTree = ""; }; 0D5A0E0728333D824389CCCD93685E77 /* GoogleMobileAds.xcframework */ = {isa = PBXFileReference; includeInIndex = 1; name = GoogleMobileAds.xcframework; path = "Frameworks/GoogleMobileAdsFramework-Current/GoogleMobileAds.xcframework"; sourceTree = ""; }; - 0D71EAC41914D9F8EB5AC257427E1620 /* Pods-TappyPlane.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-TappyPlane.modulemap"; sourceTree = ""; }; + 0D71EAC41914D9F8EB5AC257427E1620 /* Pods-FlyingPlane.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-FlyingPlane.modulemap"; sourceTree = ""; }; 0D9BEC54FC300541EA4086B11C18B367 /* FBAEMAdvertiserMultiEntryRule.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBAEMAdvertiserMultiEntryRule.h; path = Sources/FBAEMKit/FBAEMAdvertiserMultiEntryRule.h; sourceTree = ""; }; 0DBA19518B918639D2775ABA77FC5F76 /* FBSDKShareKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FBSDKShareKit-dummy.m"; sourceTree = ""; }; 0DBABF2E4DF2E5E0A0EEA7F3C83951A1 /* FBSDKHumanSilhouetteIcon.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKHumanSilhouetteIcon.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/UI/FBSDKHumanSilhouetteIcon.m; sourceTree = ""; }; @@ -1086,7 +1086,7 @@ 1C857B825807141A79B496BDFE39F31C /* FBSDKSKAdNetworkRule.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKSKAdNetworkRule.m; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/SKAdNetwork/FBSDKSKAdNetworkRule.m; sourceTree = ""; }; 1CFBE8D0A07BB8D961FD2A4818285A6D /* FBSDKShareKit-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "FBSDKShareKit-umbrella.h"; sourceTree = ""; }; 1D620E6A974C76AB419A7CEB6A795693 /* FBSDKLoginKit.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = FBSDKLoginKit.debug.xcconfig; sourceTree = ""; }; - 1E137AB2A21505B2583B4075BB9E0581 /* Pods-TappyPlane-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-TappyPlane-frameworks.sh"; sourceTree = ""; }; + 1E137AB2A21505B2583B4075BB9E0581 /* Pods-FlyingPlane-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-FlyingPlane-frameworks.sh"; sourceTree = ""; }; 1E4876B4A0197FA2884D701D27AA756B /* FBSDKModalFormPresentationController.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKModalFormPresentationController.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Device/FBSDKModalFormPresentationController.m; sourceTree = ""; }; 1E7A3322FC0B90C129332E5D34E2B7AA /* FBSDKDeviceViewControllerBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceViewControllerBase.m; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKDeviceViewControllerBase.m; sourceTree = ""; }; 1E9BA01B5ACA03C88EE54AB13115185B /* FBSDKAccessToken+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKAccessToken+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAccessToken+Internal.h"; sourceTree = ""; }; @@ -1184,7 +1184,7 @@ 3794B1C508B6CAEA6463B057B4B85976 /* FBAEMRequestBody.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBAEMRequestBody.m; path = Sources/FBAEMKit/FBAEMRequestBody.m; sourceTree = ""; }; 37CE9DB674071C9370C0D75A16A43E8B /* FBSDKLoginCompletion+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKLoginCompletion+Internal.h"; path = "FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginCompletion+Internal.h"; sourceTree = ""; }; 37D986C13DEECB924C1843DBF7770E7F /* FBAEMConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBAEMConfiguration.m; path = Sources/FBAEMKit/FBAEMConfiguration.m; sourceTree = ""; }; - 3804EE5A63C917040F7E7FFBD020128A /* Pods-TappyPlane-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-TappyPlane-umbrella.h"; sourceTree = ""; }; + 3804EE5A63C917040F7E7FFBD020128A /* Pods-FlyingPlane-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-FlyingPlane-umbrella.h"; sourceTree = ""; }; 3852E7C9BC553B62A134FFE9BC63B5EF /* FBSDKAppEventsUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsUtility.m; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsUtility.m; sourceTree = ""; }; 3878C8302AAC17FA133E2A1CA5997DE6 /* FBSDKShareButton.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKShareButton.m; path = FBSDKShareKit/FBSDKShareKit/FBSDKShareButton.m; sourceTree = ""; }; 38F798367AAB625DBE60CA8E9DE0CF02 /* FBSDKError.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKError.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKError.h; sourceTree = ""; }; @@ -1198,7 +1198,7 @@ 3AAD1A948BDC51E5398819C1D788FCA0 /* FBSDKDeviceLoginManager.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceLoginManager.h; path = FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.h; sourceTree = ""; }; 3B64ADBF248CBF502986B4ABB52229FE /* GULLogger.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GULLogger.m; path = GoogleUtilities/Logger/GULLogger.m; sourceTree = ""; }; 3B784CFFFBC0A56D1B1D542DF3D53257 /* FBSDKSwizzling.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKSwizzling.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKSwizzling.h; sourceTree = ""; }; - 3C510EA1A5EF66672EA3AAB9182AD8F1 /* Pods-TappyPlane-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TappyPlane-Info.plist"; sourceTree = ""; }; + 3C510EA1A5EF66672EA3AAB9182AD8F1 /* Pods-FlyingPlane-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FlyingPlane-Info.plist"; sourceTree = ""; }; 3C5E9659FADDFCD48412395C7F9F35F7 /* FBSDKTimeSpentData.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTimeSpentData.h; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKTimeSpentData.h; sourceTree = ""; }; 3CF7407A013F87F6A438887A9B6BCC46 /* FBSDKDeviceUtilities.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKDeviceUtilities.m; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Device/FBSDKDeviceUtilities.m; sourceTree = ""; }; 3D4FBC1199964E3EF0AC97D58003FEA2 /* GULNetworkURLSession.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GULNetworkURLSession.h; path = GoogleUtilities/Network/Public/GoogleUtilities/GULNetworkURLSession.h; sourceTree = ""; }; @@ -1207,7 +1207,7 @@ 3E4A6BFC37947CD5713E6E32FCECEDAC /* GULOriginalIMPConvenienceMacros.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GULOriginalIMPConvenienceMacros.h; path = GoogleUtilities/MethodSwizzler/Public/GoogleUtilities/GULOriginalIMPConvenienceMacros.h; sourceTree = ""; }; 3E501204B4A5BE3343CA29C6DA3DA889 /* NSNotificationCenter+Extensions.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSNotificationCenter+Extensions.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/NSNotificationCenter+Extensions.h"; sourceTree = ""; }; 3E64632896B946EB96DFC2F61EAA7BD2 /* FacebookSDK.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = FacebookSDK.strings; path = es.lproj/FacebookSDK.strings; sourceTree = ""; }; - 3ED1892AFED2483DCEE17130D1616D99 /* Pods-TappyPlane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TappyPlane.debug.xcconfig"; sourceTree = ""; }; + 3ED1892AFED2483DCEE17130D1616D99 /* Pods-FlyingPlane.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FlyingPlane.debug.xcconfig"; sourceTree = ""; }; 3F188992DEAF92EDF0AA138AD98AC416 /* FBSDKAppEvents+ApplicationActivating.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKAppEvents+ApplicationActivating.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppEvents+ApplicationActivating.h"; sourceTree = ""; }; 3F273D0B20EDB4F790D6D27FD35DD9A6 /* FBLPromise+Delay.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "FBLPromise+Delay.m"; path = "Sources/FBLPromises/FBLPromise+Delay.m"; sourceTree = ""; }; 3F5970A056002B833883BC56083A13D3 /* FBSDKEventBinding.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKEventBinding.m; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/Codeless/FBSDKEventBinding.m; sourceTree = ""; }; @@ -1542,7 +1542,7 @@ 9F3A61B97E0E232ACDC8DC5E246ED5EE /* FacebookSDK.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = FacebookSDK.strings; path = hr.lproj/FacebookSDK.strings; sourceTree = ""; }; 9F4A69859F799DE2EB7EB6E08BC4425B /* FBSDKFeatureManager+FeatureChecking.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKFeatureManager+FeatureChecking.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FeatureManager/FBSDKFeatureManager+FeatureChecking.h"; sourceTree = ""; }; A0CDB43D144C126713B43564A57266DF /* FBSDKModelManager+IntegrityParametersProcessorProvider.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKModelManager+IntegrityParametersProcessorProvider.h"; path = "FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/ML/FBSDKModelManager+IntegrityParametersProcessorProvider.h"; sourceTree = ""; }; - A1717BB8C3B40EA23A63D618CD34D104 /* Pods-TappyPlane-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-TappyPlane-dummy.m"; sourceTree = ""; }; + A1717BB8C3B40EA23A63D618CD34D104 /* Pods-FlyingPlane-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-FlyingPlane-dummy.m"; sourceTree = ""; }; A1C8A7C662AAD60EBB85E5A6809E6958 /* FBSDKCoreKit-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "FBSDKCoreKit-dummy.m"; sourceTree = ""; }; A1E35411D14025516729FD3EAB0BE8A7 /* GULNetworkInfo.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = GULNetworkInfo.h; path = GoogleUtilities/Environment/Public/GoogleUtilities/GULNetworkInfo.h; sourceTree = ""; }; A251A3D6FA4415C6EEF509CB9B9B400B /* FBSDKTimeSpentRecordingCreating.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKTimeSpentRecordingCreating.h; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKTimeSpentRecordingCreating.h; sourceTree = ""; }; @@ -1697,7 +1697,7 @@ CD625AD6466B5F40A2461D19739B3E13 /* FBSDKAppEventsStateManager+AppEventsStatePersisting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKAppEventsStateManager+AppEventsStatePersisting.h"; path = "FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager+AppEventsStatePersisting.h"; sourceTree = ""; }; CDE8879710E36FBD6057524C28C76D64 /* FBSDKAppEventsStateManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsStateManager.m; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsStateManager.m; sourceTree = ""; }; CE540082436C26C2C49EB34693CE2D8A /* FBSDKBasicUtility.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKBasicUtility.m; path = Sources/FBSDKCoreKit_Basics/FBSDKBasicUtility.m; sourceTree = ""; }; - CEA592B19AACC87B0653E60F077BCA13 /* Pods-TappyPlane.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-TappyPlane.release.xcconfig"; sourceTree = ""; }; + CEA592B19AACC87B0653E60F077BCA13 /* Pods-FlyingPlane.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-FlyingPlane.release.xcconfig"; sourceTree = ""; }; CEC2C71AA956A400633C32AD31034ED0 /* FBSDKDeviceDialogView.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKDeviceDialogView.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Device/FBSDKDeviceDialogView.h; sourceTree = ""; }; CEFD92EDC8230ACF293B6565B8006C2F /* nanopb-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "nanopb-dummy.m"; sourceTree = ""; }; CF1AAAA73C6C8EE3BCCD51DE6B40F415 /* FBLPromise+Reduce.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "FBLPromise+Reduce.m"; path = "Sources/FBLPromises/FBLPromise+Reduce.m"; sourceTree = ""; }; @@ -1708,7 +1708,7 @@ D01731DE6BAD9C8C20E0EAA97B49C11E /* FBSDKClientTokenProviding.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKClientTokenProviding.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKClientTokenProviding.h; sourceTree = ""; }; D0352389AF87CDF90F7389DC8CE9B20D /* FBSDKGameRequestFrictionlessRecipientCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGameRequestFrictionlessRecipientCache.h; path = FBSDKShareKit/FBSDKShareKit/Internal/FBSDKGameRequestFrictionlessRecipientCache.h; sourceTree = ""; }; D039458BF70095A581BE3DEDD9C414DF /* FBSDKWebDialog.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKWebDialog.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKWebDialog.h; sourceTree = ""; }; - D0A9C89CEB1D0457FC790A4DD85ADD6A /* Pods-TappyPlane-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-TappyPlane-acknowledgements.markdown"; sourceTree = ""; }; + D0A9C89CEB1D0457FC790A4DD85ADD6A /* Pods-FlyingPlane-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-FlyingPlane-acknowledgements.markdown"; sourceTree = ""; }; D0DD54A44CDE3A6DDC68705E3E8C9030 /* FBSDKProfileCreating.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKProfileCreating.h; path = FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKProfileCreating.h; sourceTree = ""; }; D113EBAA625EAF294E5386B25DE45202 /* FBSDKAppLinkResolverRequestBuilder.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkResolverRequestBuilder.h; path = FBSDKCoreKit/FBSDKCoreKit/AppLink/Resolver/FBSDKAppLinkResolverRequestBuilder.h; sourceTree = ""; }; D12A3A5D26C50D079C4D873BE4EE7231 /* FBSDKServerConfiguration+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKServerConfiguration+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKServerConfiguration+Internal.h"; sourceTree = ""; }; @@ -1752,7 +1752,7 @@ DD11EDECEEE54705FF5CA99D65D8E7EE /* LoginConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = LoginConfiguration.swift; path = FBSDKLoginKit/FBSDKLoginKit/Swift/LoginConfiguration.swift; sourceTree = ""; }; DD5BB356F189759277464D11F2E87FA3 /* FBSDKErrorConfigurationProvider.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKErrorConfigurationProvider.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/ServerConfiguration/FBSDKErrorConfigurationProvider.h; sourceTree = ""; }; DD7CE2941002510D4383FD8B2A9F3A41 /* FBSDKShareMediaContent.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKShareMediaContent.m; path = FBSDKShareKit/FBSDKShareKit/FBSDKShareMediaContent.m; sourceTree = ""; }; - DDEE50ECCEBB5C35C55665BDC26188BC /* Pods-TappyPlane-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-TappyPlane-acknowledgements.plist"; sourceTree = ""; }; + DDEE50ECCEBB5C35C55665BDC26188BC /* Pods-FlyingPlane-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-FlyingPlane-acknowledgements.plist"; sourceTree = ""; }; DE2D7CADB1FF16E2DAA54919BBD75400 /* FBSDKGraphRequestPiggybackManaging.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKGraphRequestPiggybackManaging.h; path = FBSDKCoreKit/FBSDKCoreKit/Internal/Network/FBSDKGraphRequestPiggybackManaging.h; sourceTree = ""; }; DE31F420E3F7D3DADA373DCFC6745F91 /* FBSDKFeature.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKFeature.h; path = FBSDKCoreKit/FBSDKCoreKit/FBSDKFeature.h; sourceTree = ""; }; DE5198074CFA4C41C62D7A876D5652D7 /* FacebookSDK.strings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.strings; name = FacebookSDK.strings; path = pt_PT.lproj/FacebookSDK.strings; sourceTree = ""; }; @@ -1833,7 +1833,7 @@ F453CF008A1BBA0F8F1162BD24F69DDC /* FBSDKWebViewAppLinkResolver.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKWebViewAppLinkResolver.h; path = FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKWebViewAppLinkResolver.h; sourceTree = ""; }; F4BE4546C45B283B5CB55378A0B0D840 /* FBSDKAppLinkTarget.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = FBSDKAppLinkTarget.h; path = FBSDKCoreKit/FBSDKCoreKit/AppLink/FBSDKAppLinkTarget.h; sourceTree = ""; }; F52BF861F7D080F552191BD60DEF57E4 /* FBSDKAppLinkUtility+Internal.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "FBSDKAppLinkUtility+Internal.h"; path = "FBSDKCoreKit/FBSDKCoreKit/Internal/FBSDKAppLinkUtility+Internal.h"; sourceTree = ""; }; - F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-TappyPlane */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-TappyPlane"; path = Pods_TappyPlane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-FlyingPlane */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-FlyingPlane"; path = FlyingPlane.framework; sourceTree = BUILT_PRODUCTS_DIR; }; F5440DC8BDC3459A145FF5DC7056B823 /* Permission.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Permission.swift; path = Sources/FacebookCore/Swift/Permission.swift; sourceTree = ""; }; F55CEDA38A150059D586AE654F08BAB6 /* FBSDKAppEventsConfigurationManager.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = FBSDKAppEventsConfigurationManager.m; path = FBSDKCoreKit/FBSDKCoreKit/AppEvents/Internal/FBSDKAppEventsConfigurationManager.m; sourceTree = ""; }; F56AA768462B9BDB29E80548863E1992 /* GULNetwork.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = GULNetwork.m; path = GoogleUtilities/Network/GULNetwork.m; sourceTree = ""; }; @@ -1980,7 +1980,7 @@ 06301413B8668200348805F853A195D6 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 0EFCBA96B4580CA9EC70D536A075CEAA /* Pods-TappyPlane */, + 0EFCBA96B4580CA9EC70D536A075CEAA /* Pods-FlyingPlane */, ); name = "Targets Support Files"; sourceTree = ""; @@ -2013,21 +2013,21 @@ name = Frameworks; sourceTree = ""; }; - 0EFCBA96B4580CA9EC70D536A075CEAA /* Pods-TappyPlane */ = { + 0EFCBA96B4580CA9EC70D536A075CEAA /* Pods-FlyingPlane */ = { isa = PBXGroup; children = ( - 0D71EAC41914D9F8EB5AC257427E1620 /* Pods-TappyPlane.modulemap */, - D0A9C89CEB1D0457FC790A4DD85ADD6A /* Pods-TappyPlane-acknowledgements.markdown */, - DDEE50ECCEBB5C35C55665BDC26188BC /* Pods-TappyPlane-acknowledgements.plist */, - A1717BB8C3B40EA23A63D618CD34D104 /* Pods-TappyPlane-dummy.m */, - 1E137AB2A21505B2583B4075BB9E0581 /* Pods-TappyPlane-frameworks.sh */, - 3C510EA1A5EF66672EA3AAB9182AD8F1 /* Pods-TappyPlane-Info.plist */, - 3804EE5A63C917040F7E7FFBD020128A /* Pods-TappyPlane-umbrella.h */, - 3ED1892AFED2483DCEE17130D1616D99 /* Pods-TappyPlane.debug.xcconfig */, - CEA592B19AACC87B0653E60F077BCA13 /* Pods-TappyPlane.release.xcconfig */, - ); - name = "Pods-TappyPlane"; - path = "Target Support Files/Pods-TappyPlane"; + 0D71EAC41914D9F8EB5AC257427E1620 /* Pods-FlyingPlane.modulemap */, + D0A9C89CEB1D0457FC790A4DD85ADD6A /* Pods-FlyingPlane-acknowledgements.markdown */, + DDEE50ECCEBB5C35C55665BDC26188BC /* Pods-FlyingPlane-acknowledgements.plist */, + A1717BB8C3B40EA23A63D618CD34D104 /* Pods-FlyingPlane-dummy.m */, + 1E137AB2A21505B2583B4075BB9E0581 /* Pods-FlyingPlane-frameworks.sh */, + 3C510EA1A5EF66672EA3AAB9182AD8F1 /* Pods-FlyingPlane-Info.plist */, + 3804EE5A63C917040F7E7FFBD020128A /* Pods-FlyingPlane-umbrella.h */, + 3ED1892AFED2483DCEE17130D1616D99 /* Pods-FlyingPlane.debug.xcconfig */, + CEA592B19AACC87B0653E60F077BCA13 /* Pods-FlyingPlane.release.xcconfig */, + ); + name = "Pods-FlyingPlane"; + path = "Target Support Files/Pods-FlyingPlane"; sourceTree = ""; }; 1A3C192B00836FBBABB4C48D09B9E7CC /* Frameworks */ = { @@ -2851,7 +2851,7 @@ 85128AF76199890A6DD56FE81089D883 /* FBSDKShareKit */, B43874C6CBB50E7134FBEC24BABFE14F /* GoogleUtilities */, 06FC5C9CF96D60C50FCD47D339C91951 /* nanopb */, - F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-TappyPlane */, + F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-FlyingPlane */, 3347A1AB6546F0A3977529B8F199DC41 /* PromisesObjC */, ); name = Products; @@ -3712,7 +3712,7 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 91CAA14521CC2D859B8889790AD4B340 /* Pods-TappyPlane-umbrella.h in Headers */, + 91CAA14521CC2D859B8889790AD4B340 /* Pods-FlyingPlane-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -3768,9 +3768,9 @@ /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 0A979E576F702A8FA11644FD27669220 /* Pods-TappyPlane */ = { + 0A979E576F702A8FA11644FD27669220 /* Pods-FlyingPlane */ = { isa = PBXNativeTarget; - buildConfigurationList = F81A3862FE624BD0C46EA28381C3D3D8 /* Build configuration list for PBXNativeTarget "Pods-TappyPlane" */; + buildConfigurationList = F81A3862FE624BD0C46EA28381C3D3D8 /* Build configuration list for PBXNativeTarget "Pods-FlyingPlane" */; buildPhases = ( E69245DC9927B0B8BCA3CB94268EFAF6 /* Headers */, 7DBE91E1C681CE944EB5E426FA0948BC /* Sources */, @@ -3792,9 +3792,9 @@ 8630F541F032447F7319BE69488E22E6 /* PBXTargetDependency */, CBE9EB3182C40A9F207B92EAF27DADB1 /* PBXTargetDependency */, ); - name = "Pods-TappyPlane"; - productName = Pods_TappyPlane; - productReference = F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-TappyPlane */; + name = "Pods-FlyingPlane"; + productName = FlyingPlane; + productReference = F538C185B0F3F9DC0F470CCF847E8DCA /* Pods-FlyingPlane */; productType = "com.apple.product-type.framework"; }; 10C5885FCB0908EF785774EE52473DAB /* FBSDKLoginKit */ = { @@ -4043,7 +4043,7 @@ 458B188365A307B3C128ABF524D1A3E3 /* GoogleUserMessagingPlatform */, 8D7F5D5DD528D21A72DC87ADA5B12E2D /* GoogleUtilities */, D2B5E7DCCBBFB32341D857D01211A1A3 /* nanopb */, - 0A979E576F702A8FA11644FD27669220 /* Pods-TappyPlane */, + 0A979E576F702A8FA11644FD27669220 /* Pods-FlyingPlane */, 2BBF7206D7FAC92C82A042A99C4A98F8 /* PromisesObjC */, ); }; @@ -4403,7 +4403,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 974B05401384538216D39DA21E75A735 /* Pods-TappyPlane-dummy.m in Sources */, + 974B05401384538216D39DA21E75A735 /* Pods-FlyingPlane-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -5520,7 +5520,7 @@ }; FB0FDDC63661552E471CB58095CE4F9B /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3ED1892AFED2483DCEE17130D1616D99 /* Pods-TappyPlane.debug.xcconfig */; + baseConfigurationReference = 3ED1892AFED2483DCEE17130D1616D99 /* Pods-FlyingPlane.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -5532,7 +5532,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-TappyPlane/Pods-TappyPlane-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -5541,7 +5541,7 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TappyPlane/Pods-TappyPlane.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -5557,7 +5557,7 @@ }; FED3FA2ECE81AC34FD6CD7ADBDD890E3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = CEA592B19AACC87B0653E60F077BCA13 /* Pods-TappyPlane.release.xcconfig */; + baseConfigurationReference = CEA592B19AACC87B0653E60F077BCA13 /* Pods-FlyingPlane.release.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -5569,7 +5569,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-TappyPlane/Pods-TappyPlane-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -5578,7 +5578,7 @@ "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-TappyPlane/Pods-TappyPlane.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -5713,7 +5713,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - F81A3862FE624BD0C46EA28381C3D3D8 /* Build configuration list for PBXNativeTarget "Pods-TappyPlane" */ = { + F81A3862FE624BD0C46EA28381C3D3D8 /* Build configuration list for PBXNativeTarget "Pods-FlyingPlane" */ = { isa = XCConfigurationList; buildConfigurations = ( FB0FDDC63661552E471CB58095CE4F9B /* Debug */, diff --git a/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/Pods-TappyPlane.xcscheme b/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/Pods-FlyingPlane.xcscheme similarity index 100% rename from cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/Pods-TappyPlane.xcscheme rename to cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/Pods-FlyingPlane.xcscheme diff --git a/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist b/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist index 241ff52..0bbbbdd 100644 --- a/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/cordova/platforms/ios/Pods/Pods.xcodeproj/xcuserdata/danieldanielecki.xcuserdatad/xcschemes/xcschememanagement.plist @@ -8,66 +8,90 @@ isShown + orderHint + 0 FBSDKCoreKit-FacebookSDKStrings.xcscheme isShown + orderHint + 2 FBSDKCoreKit.xcscheme isShown + orderHint + 1 FBSDKCoreKit_Basics.xcscheme isShown + orderHint + 3 FBSDKLoginKit.xcscheme isShown + orderHint + 4 FBSDKShareKit.xcscheme isShown + orderHint + 5 Google-Mobile-Ads-SDK.xcscheme isShown + orderHint + 7 GoogleAppMeasurement.xcscheme isShown + orderHint + 8 GoogleUserMessagingPlatform.xcscheme isShown + orderHint + 9 GoogleUtilities.xcscheme isShown + orderHint + 10 Pods-FlyingPlane.xcscheme - isShown - + orderHint + 12 PromisesObjC.xcscheme isShown + orderHint + 13 nanopb.xcscheme isShown + orderHint + 11 SuppressBuildableAutocreation diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-Info.plist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-Info.plist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-Info.plist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-Info.plist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-acknowledgements.markdown b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-acknowledgements.markdown similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-acknowledgements.markdown rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-acknowledgements.markdown diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-acknowledgements.plist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-acknowledgements.plist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-acknowledgements.plist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-acknowledgements.plist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-dummy.m b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-dummy.m similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-dummy.m rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-dummy.m diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Debug-input-files.xcfilelist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Debug-input-files.xcfilelist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Debug-input-files.xcfilelist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Debug-input-files.xcfilelist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Debug-output-files.xcfilelist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Debug-output-files.xcfilelist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Debug-output-files.xcfilelist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Debug-output-files.xcfilelist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Release-input-files.xcfilelist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Release-input-files.xcfilelist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Release-input-files.xcfilelist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Release-input-files.xcfilelist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Release-output-files.xcfilelist b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Release-output-files.xcfilelist similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks-Release-output-files.xcfilelist rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks-Release-output-files.xcfilelist diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks.sh b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks.sh similarity index 99% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks.sh rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks.sh index fb94ca3..48e066b 100755 --- a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-frameworks.sh +++ b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-frameworks.sh @@ -41,7 +41,7 @@ install_framework() if [ -L "${source}" ]; then echo "Symlinked..." - source="$(readlink "${source}")" + source="$(readlink -f "${source}")" fi if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-umbrella.h b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-umbrella.h similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane-umbrella.h rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane-umbrella.h diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.debug.xcconfig b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.debug.xcconfig similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.debug.xcconfig rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.debug.xcconfig diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.modulemap b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.modulemap similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.modulemap rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.modulemap diff --git a/cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.release.xcconfig b/cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.release.xcconfig similarity index 100% rename from cordova/platforms/ios/Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.release.xcconfig rename to cordova/platforms/ios/Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.release.xcconfig diff --git a/cordova/platforms/ios/exportOptions.plist b/cordova/platforms/ios/exportOptions.plist new file mode 100644 index 0000000..00b0541 --- /dev/null +++ b/cordova/platforms/ios/exportOptions.plist @@ -0,0 +1,10 @@ + + + + + compileBitcode + + method + development + + \ No newline at end of file diff --git a/cordova/platforms/ios/frameworks.json b/cordova/platforms/ios/frameworks.json index a178d10..6f3ef91 100644 --- a/cordova/platforms/ios/frameworks.json +++ b/cordova/platforms/ios/frameworks.json @@ -3,5 +3,6 @@ "Social.framework": 1, "MessageUI.framework": 1, "SafariServices.framework": 1, - "AppTrackingTransparency.framework": 1 + "AppTrackingTransparency.framework": 1, + "WebKit.framework": 1 } \ No newline at end of file diff --git a/cordova/platforms/ios/ios.json b/cordova/platforms/ios/ios.json index 3bcded6..6c1646c 100644 --- a/cordova/platforms/ios/ios.json +++ b/cordova/platforms/ios/ios.json @@ -63,6 +63,10 @@ { "xml": "", "count": 1 + }, + { + "xml": "", + "count": 1 } ] } @@ -234,6 +238,9 @@ "USAGE": "This identifier will be used to deliver personalized ads to you.", "DISABLESDKCRASHREPORTING": "false", "PACKAGE_NAME": "com.doyban.flyingplane" + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "PACKAGE_NAME": "com.doyban.flyingplane" } }, "dependent_plugins": {}, @@ -330,6 +337,7 @@ "cordova-plugin-browsertab": "0.2.0", "cordova-plugin-androidx": "3.0.0", "cordova-universal-links-plugin": "1.2.1", - "admob-plus-cordova": "1.28.0" + "admob-plus-cordova": "1.28.0", + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "1.0.2" } } diff --git a/cordova/platforms/ios/platform_www/cordova_plugins.js b/cordova/platforms/ios/platform_www/cordova_plugins.js index 762576b..ce3422b 100644 --- a/cordova/platforms/ios/platform_www/cordova_plugins.js +++ b/cordova/platforms/ios/platform_www/cordova_plugins.js @@ -92,6 +92,7 @@ cordova.define('cordova/plugin_list', function(require, exports, module) { "cordova-plugin-browsertab": "0.2.0", "cordova-plugin-androidx": "3.0.0", "cordova-universal-links-plugin": "1.2.1", - "admob-plus-cordova": "1.28.0" + "admob-plus-cordova": "1.28.0", + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": "1.0.2" }; }); \ No newline at end of file diff --git a/cordova/platforms/ios/pods-debug.xcconfig b/cordova/platforms/ios/pods-debug.xcconfig index be07f3f..2908117 100644 --- a/cordova/platforms/ios/pods-debug.xcconfig +++ b/cordova/platforms/ios/pods-debug.xcconfig @@ -1,2 +1,2 @@ // DO NOT MODIFY -- auto-generated by Apache Cordova -#include "Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.debug.xcconfig" \ No newline at end of file +#include "Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.debug.xcconfig" diff --git a/cordova/platforms/ios/pods-release.xcconfig b/cordova/platforms/ios/pods-release.xcconfig index 464a533..c72f261 100644 --- a/cordova/platforms/ios/pods-release.xcconfig +++ b/cordova/platforms/ios/pods-release.xcconfig @@ -1,2 +1,2 @@ // DO NOT MODIFY -- auto-generated by Apache Cordova -#include "Pods/Target Support Files/Pods-TappyPlane/Pods-TappyPlane.release.xcconfig" \ No newline at end of file +#include "Pods/Target Support Files/Pods-FlyingPlane/Pods-FlyingPlane.release.xcconfig" diff --git a/cordova/platforms/ios/www/app.9225d8b7cdd4505af1b3.js b/cordova/platforms/ios/www/app.9225d8b7cdd4505af1b3.js deleted file mode 100644 index f9b37ba..0000000 --- a/cordova/platforms/ios/www/app.9225d8b7cdd4505af1b3.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.9225d8b7cdd4505af1b3.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}({"./node_modules/@firebase/analytics/dist/esm/index.esm2017.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnalytics", function() { return getAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGoogleAnalyticsClientId", function() { return getGoogleAnalyticsClientId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeAnalytics", function() { return initializeAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSupported", function() { return isSupported; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logEvent", function() { return logEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAnalyticsCollectionEnabled", function() { return setAnalyticsCollectionEnabled; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConsent", function() { return setConsent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCurrentScreen", function() { return setCurrentScreen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultEventParameters", function() { return setDefaultEventParameters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserId", function() { return setUserId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserProperties", function() { return setUserProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });\n/* harmony import */ var _firebase_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @firebase/app */ "./node_modules/@firebase/app/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @firebase/logger */ "./node_modules/@firebase/logger/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @firebase/util */ "./node_modules/@firebase/util/dist/index.esm2017.js");\n/* harmony import */ var _firebase_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @firebase/component */ "./node_modules/@firebase/component/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_installations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @firebase/installations */ "./node_modules/@firebase/installations/dist/esm/index.esm2017.js");\n\n\n\n\n\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Type constant for Firebase Analytics.\r\n */\r\nconst ANALYTICS_TYPE = \'analytics\';\r\n// Key to attach FID to in gtag params.\r\nconst GA_FID_KEY = \'firebase_id\';\r\nconst ORIGIN_KEY = \'origin\';\r\nconst FETCH_TIMEOUT_MILLIS = 60 * 1000;\r\nconst DYNAMIC_CONFIG_URL = \'https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig\';\r\nconst GTAG_URL = \'https://www.googletagmanager.com/gtag/js\';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new _firebase_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"](\'@firebase/analytics\');\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n ["already-exists" /* AnalyticsError.ALREADY_EXISTS */]: \'A Firebase Analytics instance with the appId {$id} \' +\r\n \' already exists. \' +\r\n \'Only one Firebase Analytics instance can be created for each appId.\',\r\n ["already-initialized" /* AnalyticsError.ALREADY_INITIALIZED */]: \'initializeAnalytics() cannot be called again with different options than those \' +\r\n \'it was initially called with. It can be called again with the same options to \' +\r\n \'return the existing instance, or getAnalytics() can be used \' +\r\n \'to get a reference to the already-intialized instance.\',\r\n ["already-initialized-settings" /* AnalyticsError.ALREADY_INITIALIZED_SETTINGS */]: \'Firebase Analytics has already been initialized.\' +\r\n \'settings() must be called before initializing any Analytics instance\' +\r\n \'or it will have no effect.\',\r\n ["interop-component-reg-failed" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */]: \'Firebase Analytics Interop Component failed to instantiate: {$reason}\',\r\n ["invalid-analytics-context" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */]: \'Firebase Analytics is not supported in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */]: \'IndexedDB unavailable or restricted in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */]: \'The config fetch request timed out while in an exponential backoff state.\' +\r\n \' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.\',\r\n ["config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */]: \'Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}\',\r\n ["no-api-key" /* AnalyticsError.NO_API_KEY */]: \'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid API key.\',\r\n ["no-app-id" /* AnalyticsError.NO_APP_ID */]: \'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid app ID.\',\r\n ["no-client-id" /* AnalyticsError.NO_CLIENT_ID */]: \'The "client_id" field is empty.\',\r\n ["invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */]: \'Trusted Types detected an invalid gtag resource: {$gtagURL}.\'\r\n};\r\nconst ERROR_FACTORY = new _firebase_util__WEBPACK_IMPORTED_MODULE_2__["ErrorFactory"](\'analytics\', \'Analytics\', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Verifies and creates a TrustedScriptURL.\r\n */\r\nfunction createGtagTrustedTypesScriptURL(url) {\r\n if (!url.startsWith(GTAG_URL)) {\r\n const err = ERROR_FACTORY.create("invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */, {\r\n gtagURL: url\r\n });\r\n logger.warn(err.message);\r\n return \'\';\r\n }\r\n return url;\r\n}\r\n/**\r\n * Makeshift polyfill for Promise.allSettled(). Resolves when all promises\r\n * have either resolved or rejected.\r\n *\r\n * @param promises Array of promises to wait for.\r\n */\r\nfunction promiseAllSettled(promises) {\r\n return Promise.all(promises.map(promise => promise.catch(e => e)));\r\n}\r\n/**\r\n * Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.\r\n *\r\n * @param policyName A string containing the name of the policy\r\n * @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods\r\n * | the TrustedTypePolicy reference documentation}.\r\n */\r\nfunction createTrustedTypesPolicy(policyName, policyOptions) {\r\n // Create a TrustedTypes policy that we can use for updating src\r\n // properties\r\n let trustedTypesPolicy;\r\n if (window.trustedTypes) {\r\n trustedTypesPolicy = window.trustedTypes.createPolicy(policyName, policyOptions);\r\n }\r\n return trustedTypesPolicy;\r\n}\r\n/**\r\n * Inserts gtag script tag into the page to asynchronously download gtag.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction insertScriptTag(dataLayerName, measurementId) {\r\n const trustedTypesPolicy = createTrustedTypesPolicy(\'firebase-js-sdk-policy\', {\r\n createScriptURL: createGtagTrustedTypesScriptURL\r\n });\r\n const script = document.createElement(\'script\');\r\n // We are not providing an analyticsId in the URL because it would trigger a `page_view`\r\n // without fid. We will initialize ga-id using gtag (config) command together with fid.\r\n const gtagScriptURL = `${GTAG_URL}?l=${dataLayerName}&id=${measurementId}`;\r\n script.src = trustedTypesPolicy\r\n ? trustedTypesPolicy === null || trustedTypesPolicy === void 0 ? void 0 : trustedTypesPolicy.createScriptURL(gtagScriptURL)\r\n : gtagScriptURL;\r\n script.async = true;\r\n document.head.appendChild(script);\r\n}\r\n/**\r\n * Get reference to, or create, global datalayer.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction getOrCreateDataLayer(dataLayerName) {\r\n // Check for existing dataLayer and create if needed.\r\n let dataLayer = [];\r\n if (Array.isArray(window[dataLayerName])) {\r\n dataLayer = window[dataLayerName];\r\n }\r\n else {\r\n window[dataLayerName] = dataLayer;\r\n }\r\n return dataLayer;\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'config\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param measurementId GA Measurement ID to set config for.\r\n * @param gtagParams Gtag config params to set.\r\n */\r\nasync function gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams) {\r\n // If config is already fetched, we know the appId and can use it to look up what FID promise we\r\n /// are waiting for, and wait only on that one.\r\n const correspondingAppId = measurementIdToAppId[measurementId];\r\n try {\r\n if (correspondingAppId) {\r\n await initializationPromisesMap[correspondingAppId];\r\n }\r\n else {\r\n // If config is not fetched yet, wait for all configs (we don\'t know which one we need) and\r\n // find the appId (if any) corresponding to this measurementId. If there is one, wait on\r\n // that appId\'s initialization promise. If there is none, promise resolves and gtag\r\n // call goes through.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === measurementId);\r\n if (foundConfig) {\r\n await initializationPromisesMap[foundConfig.appId];\r\n }\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n gtagCore("config" /* GtagCommand.CONFIG */, measurementId, gtagParams);\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'event\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementId GA Measurement ID to log event to.\r\n * @param gtagParams Params to log with this event.\r\n */\r\nasync function gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams) {\r\n try {\r\n let initializationPromisesToWaitFor = [];\r\n // If there\'s a \'send_to\' param, check if any ID specified matches\r\n // an initializeIds() promise we are waiting for.\r\n if (gtagParams && gtagParams[\'send_to\']) {\r\n let gaSendToList = gtagParams[\'send_to\'];\r\n // Make it an array if is isn\'t, so it can be dealt with the same way.\r\n if (!Array.isArray(gaSendToList)) {\r\n gaSendToList = [gaSendToList];\r\n }\r\n // Checking \'send_to\' fields requires having all measurement ID results back from\r\n // the dynamic config fetch.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n for (const sendToId of gaSendToList) {\r\n // Any fetched dynamic measurement ID that matches this \'send_to\' ID\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === sendToId);\r\n const initializationPromise = foundConfig && initializationPromisesMap[foundConfig.appId];\r\n if (initializationPromise) {\r\n initializationPromisesToWaitFor.push(initializationPromise);\r\n }\r\n else {\r\n // Found an item in \'send_to\' that is not associated\r\n // directly with an FID, possibly a group. Empty this array,\r\n // exit the loop early, and let it get populated below.\r\n initializationPromisesToWaitFor = [];\r\n break;\r\n }\r\n }\r\n }\r\n // This will be unpopulated if there was no \'send_to\' field , or\r\n // if not all entries in the \'send_to\' field could be mapped to\r\n // a FID. In these cases, wait on all pending initialization promises.\r\n if (initializationPromisesToWaitFor.length === 0) {\r\n initializationPromisesToWaitFor = Object.values(initializationPromisesMap);\r\n }\r\n // Run core gtag function with args after all relevant initialization\r\n // promises have been resolved.\r\n await Promise.all(initializationPromisesToWaitFor);\r\n // Workaround for http://b/141370449 - third argument cannot be undefined.\r\n gtagCore("event" /* GtagCommand.EVENT */, measurementId, gtagParams || {});\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n}\r\n/**\r\n * Wraps a standard gtag function with extra code to wait for completion of\r\n * relevant initialization promises before sending requests.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n */\r\nfunction wrapGtag(gtagCore, \r\n/**\r\n * Allows wrapped gtag calls to wait on whichever intialization promises are required,\r\n * depending on the contents of the gtag params\' `send_to` field, if any.\r\n */\r\ninitializationPromisesMap, \r\n/**\r\n * Wrapped gtag calls sometimes require all dynamic config fetches to have returned\r\n * before determining what initialization promises (which include FIDs) to wait for.\r\n */\r\ndynamicConfigPromisesList, \r\n/**\r\n * Wrapped gtag config calls can narrow down which initialization promise (with FID)\r\n * to wait for if the measurementId is already fetched, by getting the corresponding appId,\r\n * which is the key for the initialization promises map.\r\n */\r\nmeasurementIdToAppId) {\r\n /**\r\n * Wrapper around gtag that ensures FID is sent with gtag calls.\r\n * @param command Gtag command type.\r\n * @param idOrNameOrParams Measurement ID if command is EVENT/CONFIG, params if command is SET.\r\n * @param gtagParams Params if event is EVENT/CONFIG.\r\n */\r\n async function gtagWrapper(command, ...args) {\r\n try {\r\n // If event, check that relevant initialization promises have completed.\r\n if (command === "event" /* GtagCommand.EVENT */) {\r\n const [measurementId, gtagParams] = args;\r\n // If EVENT, second arg must be measurementId.\r\n await gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams);\r\n }\r\n else if (command === "config" /* GtagCommand.CONFIG */) {\r\n const [measurementId, gtagParams] = args;\r\n // If CONFIG, second arg must be measurementId.\r\n await gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams);\r\n }\r\n else if (command === "consent" /* GtagCommand.CONSENT */) {\r\n const [gtagParams] = args;\r\n gtagCore("consent" /* GtagCommand.CONSENT */, \'update\', gtagParams);\r\n }\r\n else if (command === "get" /* GtagCommand.GET */) {\r\n const [measurementId, fieldName, callback] = args;\r\n gtagCore("get" /* GtagCommand.GET */, measurementId, fieldName, callback);\r\n }\r\n else if (command === "set" /* GtagCommand.SET */) {\r\n const [customParams] = args;\r\n // If SET, second arg must be params.\r\n gtagCore("set" /* GtagCommand.SET */, customParams);\r\n }\r\n else {\r\n gtagCore(command, ...args);\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n }\r\n return gtagWrapper;\r\n}\r\n/**\r\n * Creates global gtag function or wraps existing one if found.\r\n * This wrapped function attaches Firebase instance ID (FID) to gtag \'config\' and\r\n * \'event\' calls that belong to the GAID associated with this Firebase instance.\r\n *\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param dataLayerName Name of global GA datalayer array.\r\n * @param gtagFunctionName Name of global gtag function ("gtag" if not user-specified).\r\n */\r\nfunction wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagFunctionName) {\r\n // Create a basic core gtag function\r\n let gtagCore = function (..._args) {\r\n // Must push IArguments object, not an array.\r\n window[dataLayerName].push(arguments);\r\n };\r\n // Replace it with existing one if found\r\n if (window[gtagFunctionName] &&\r\n typeof window[gtagFunctionName] === \'function\') {\r\n // @ts-ignore\r\n gtagCore = window[gtagFunctionName];\r\n }\r\n window[gtagFunctionName] = wrapGtag(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId);\r\n return {\r\n gtagCore,\r\n wrappedGtag: window[gtagFunctionName]\r\n };\r\n}\r\n/**\r\n * Returns the script tag in the DOM matching both the gtag url pattern\r\n * and the provided data layer name.\r\n */\r\nfunction findGtagScriptOnPage(dataLayerName) {\r\n const scriptTags = window.document.getElementsByTagName(\'script\');\r\n for (const tag of Object.values(scriptTags)) {\r\n if (tag.src &&\r\n tag.src.includes(GTAG_URL) &&\r\n tag.src.includes(dataLayerName)) {\r\n return tag;\r\n }\r\n }\r\n return null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Backoff factor for 503 errors, which we want to be conservative about\r\n * to avoid overloading servers. Each retry interval will be\r\n * BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one\r\n * will be ~30 seconds (with fuzzing).\r\n */\r\nconst LONG_RETRY_FACTOR = 30;\r\n/**\r\n * Base wait interval to multiplied by backoffFactor^backoffCount.\r\n */\r\nconst BASE_INTERVAL_MILLIS = 1000;\r\n/**\r\n * Stubbable retry data storage class.\r\n */\r\nclass RetryData {\r\n constructor(throttleMetadata = {}, intervalMillis = BASE_INTERVAL_MILLIS) {\r\n this.throttleMetadata = throttleMetadata;\r\n this.intervalMillis = intervalMillis;\r\n }\r\n getThrottleMetadata(appId) {\r\n return this.throttleMetadata[appId];\r\n }\r\n setThrottleMetadata(appId, metadata) {\r\n this.throttleMetadata[appId] = metadata;\r\n }\r\n deleteThrottleMetadata(appId) {\r\n delete this.throttleMetadata[appId];\r\n }\r\n}\r\nconst defaultRetryData = new RetryData();\r\n/**\r\n * Set GET request headers.\r\n * @param apiKey App API key.\r\n */\r\nfunction getHeaders(apiKey) {\r\n return new Headers({\r\n Accept: \'application/json\',\r\n \'x-goog-api-key\': apiKey\r\n });\r\n}\r\n/**\r\n * Fetches dynamic config from backend.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfig(appFields) {\r\n var _a;\r\n const { appId, apiKey } = appFields;\r\n const request = {\r\n method: \'GET\',\r\n headers: getHeaders(apiKey)\r\n };\r\n const appUrl = DYNAMIC_CONFIG_URL.replace(\'{app-id}\', appId);\r\n const response = await fetch(appUrl, request);\r\n if (response.status !== 200 && response.status !== 304) {\r\n let errorMessage = \'\';\r\n try {\r\n // Try to get any error message text from server response.\r\n const jsonResponse = (await response.json());\r\n if ((_a = jsonResponse.error) === null || _a === void 0 ? void 0 : _a.message) {\r\n errorMessage = jsonResponse.error.message;\r\n }\r\n }\r\n catch (_ignored) { }\r\n throw ERROR_FACTORY.create("config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */, {\r\n httpStatus: response.status,\r\n responseMessage: errorMessage\r\n });\r\n }\r\n return response.json();\r\n}\r\n/**\r\n * Fetches dynamic config from backend, retrying if failed.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfigWithRetry(app, \r\n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\r\nretryData = defaultRetryData, timeoutMillis) {\r\n const { appId, apiKey, measurementId } = app.options;\r\n if (!appId) {\r\n throw ERROR_FACTORY.create("no-app-id" /* AnalyticsError.NO_APP_ID */);\r\n }\r\n if (!apiKey) {\r\n if (measurementId) {\r\n return {\r\n measurementId,\r\n appId\r\n };\r\n }\r\n throw ERROR_FACTORY.create("no-api-key" /* AnalyticsError.NO_API_KEY */);\r\n }\r\n const throttleMetadata = retryData.getThrottleMetadata(appId) || {\r\n backoffCount: 0,\r\n throttleEndTimeMillis: Date.now()\r\n };\r\n const signal = new AnalyticsAbortSignal();\r\n setTimeout(async () => {\r\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\r\n signal.abort();\r\n }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\r\n return attemptFetchDynamicConfigWithRetry({ appId, apiKey, measurementId }, throttleMetadata, signal, retryData);\r\n}\r\n/**\r\n * Runs one retry attempt.\r\n * @param appFields Necessary app config fields.\r\n * @param throttleMetadata Ongoing metadata to determine throttling times.\r\n * @param signal Abort signal.\r\n */\r\nasync function attemptFetchDynamicConfigWithRetry(appFields, { throttleEndTimeMillis, backoffCount }, signal, retryData = defaultRetryData // for testing\r\n) {\r\n var _a;\r\n const { appId, measurementId } = appFields;\r\n // Starts with a (potentially zero) timeout to support resumption from stored state.\r\n // Ensures the throttle end time is honored if the last attempt timed out.\r\n // Note the SDK will never make a request if the fetch timeout expires at this point.\r\n try {\r\n await setAbortableTimeout(signal, throttleEndTimeMillis);\r\n }\r\n catch (e) {\r\n if (measurementId) {\r\n logger.warn(`Timed out fetching this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`);\r\n return { appId, measurementId };\r\n }\r\n throw e;\r\n }\r\n try {\r\n const response = await fetchDynamicConfig(appFields);\r\n // Note the SDK only clears throttle state if response is success or non-retriable.\r\n retryData.deleteThrottleMetadata(appId);\r\n return response;\r\n }\r\n catch (e) {\r\n const error = e;\r\n if (!isRetriableError(error)) {\r\n retryData.deleteThrottleMetadata(appId);\r\n if (measurementId) {\r\n logger.warn(`Failed to fetch this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\r\n return { appId, measurementId };\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n const backoffMillis = Number((_a = error === null || error === void 0 ? void 0 : error.customData) === null || _a === void 0 ? void 0 : _a.httpStatus) === 503\r\n ? Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\r\n : Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis);\r\n // Increments backoff state.\r\n const throttleMetadata = {\r\n throttleEndTimeMillis: Date.now() + backoffMillis,\r\n backoffCount: backoffCount + 1\r\n };\r\n // Persists state.\r\n retryData.setThrottleMetadata(appId, throttleMetadata);\r\n logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\r\n return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\r\n }\r\n}\r\n/**\r\n * Supports waiting on a backoff by:\r\n *\r\n *
    \r\n *
  • Promisifying setTimeout, so we can set a timeout in our Promise chain
  • \r\n *
  • Listening on a signal bus for abort events, just like the Fetch API
  • \r\n *
  • Failing in the same way the Fetch API fails, so timing out a live request and a throttled\r\n * request appear the same.
  • \r\n *
\r\n *\r\n *

Visible for testing.\r\n */\r\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\r\n return new Promise((resolve, reject) => {\r\n // Derives backoff from given end time, normalizing negative numbers to zero.\r\n const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\r\n const timeout = setTimeout(resolve, backoffMillis);\r\n // Adds listener, rather than sets onabort, because signal is a shared object.\r\n signal.addEventListener(() => {\r\n clearTimeout(timeout);\r\n // If the request completes before this timeout, the rejection has no effect.\r\n reject(ERROR_FACTORY.create("fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */, {\r\n throttleEndTimeMillis\r\n }));\r\n });\r\n });\r\n}\r\n/**\r\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\r\n */\r\nfunction isRetriableError(e) {\r\n if (!(e instanceof _firebase_util__WEBPACK_IMPORTED_MODULE_2__["FirebaseError"]) || !e.customData) {\r\n return false;\r\n }\r\n // Uses string index defined by ErrorData, which FirebaseError implements.\r\n const httpStatus = Number(e.customData[\'httpStatus\']);\r\n return (httpStatus === 429 ||\r\n httpStatus === 500 ||\r\n httpStatus === 503 ||\r\n httpStatus === 504);\r\n}\r\n/**\r\n * Shims a minimal AbortSignal (copied from Remote Config).\r\n *\r\n *

AbortController\'s AbortSignal conveniently decouples fetch timeout logic from other aspects\r\n * of networking, such as retries. Firebase doesn\'t use AbortController enough to justify a\r\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\r\n * swapped out if/when we do.\r\n */\r\nclass AnalyticsAbortSignal {\r\n constructor() {\r\n this.listeners = [];\r\n }\r\n addEventListener(listener) {\r\n this.listeners.push(listener);\r\n }\r\n abort() {\r\n this.listeners.forEach(listener => listener());\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Event parameters to set on \'gtag\' during initialization.\r\n */\r\nlet defaultEventParametersForInit;\r\n/**\r\n * Logs an analytics event through the Firebase SDK.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param eventName Google Analytics event name, choose from standard list or use a custom string.\r\n * @param eventParams Analytics event parameters.\r\n */\r\nasync function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\r\n if (options && options.global) {\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, eventParams);\r\n return;\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n const params = Object.assign(Object.assign({}, eventParams), { \'send_to\': measurementId });\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, params);\r\n }\r\n}\r\n/**\r\n * Set screen_name parameter for this Google Analytics ID.\r\n *\r\n * @deprecated Use {@link logEvent} with `eventName` as \'screen_view\' and add relevant `eventParams`.\r\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param screenName Screen name string to set.\r\n */\r\nasync function setCurrentScreen$1(gtagFunction, initializationPromise, screenName, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'screen_name\': screenName });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'screen_name\': screenName\r\n });\r\n }\r\n}\r\n/**\r\n * Set user_id parameter for this Google Analytics ID.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param id User ID string to set\r\n */\r\nasync function setUserId$1(gtagFunction, initializationPromise, id, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'user_id\': id });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_id\': id\r\n });\r\n }\r\n}\r\n/**\r\n * Set all other user properties other than user_id and screen_name.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param properties Map of user properties to set\r\n */\r\nasync function setUserProperties$1(gtagFunction, initializationPromise, properties, options) {\r\n if (options && options.global) {\r\n const flatProperties = {};\r\n for (const key of Object.keys(properties)) {\r\n // use dot notation for merge behavior in gtag.js\r\n flatProperties[`user_properties.${key}`] = properties[key];\r\n }\r\n gtagFunction("set" /* GtagCommand.SET */, flatProperties);\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_properties\': properties\r\n });\r\n }\r\n}\r\n/**\r\n * Retrieves a unique Google Analytics identifier for the web client.\r\n * See {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id | client_id}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n */\r\nasync function internalGetGoogleAnalyticsClientId(gtagFunction, initializationPromise) {\r\n const measurementId = await initializationPromise;\r\n return new Promise((resolve, reject) => {\r\n gtagFunction("get" /* GtagCommand.GET */, measurementId, \'client_id\', (clientId) => {\r\n if (!clientId) {\r\n reject(ERROR_FACTORY.create("no-client-id" /* AnalyticsError.NO_CLIENT_ID */));\r\n }\r\n resolve(clientId);\r\n });\r\n });\r\n}\r\n/**\r\n * Set whether collection is enabled for this ID.\r\n *\r\n * @param enabled If true, collection is enabled for this ID.\r\n */\r\nasync function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {\r\n const measurementId = await initializationPromise;\r\n window[`ga-disable-${measurementId}`] = !enabled;\r\n}\r\n/**\r\n * Consent parameters to default to during \'gtag\' initialization.\r\n */\r\nlet defaultConsentSettingsForInit;\r\n/**\r\n * Sets the variable {@link defaultConsentSettingsForInit} for use in the initialization of\r\n * analytics.\r\n *\r\n * @param consentSettings Maps the applicable end user consent state for gtag.js.\r\n */\r\nfunction _setConsentDefaultForInit(consentSettings) {\r\n defaultConsentSettingsForInit = consentSettings;\r\n}\r\n/**\r\n * Sets the variable `defaultEventParametersForInit` for use in the initialization of\r\n * analytics.\r\n *\r\n * @param customParams Any custom params the user may pass to gtag.js.\r\n */\r\nfunction _setDefaultEventParametersForInit(customParams) {\r\n defaultEventParametersForInit = customParams;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function validateIndexedDB() {\r\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["isIndexedDBAvailable"])()) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: \'IndexedDB is not available in this environment.\'\r\n }).message);\r\n return false;\r\n }\r\n else {\r\n try {\r\n await Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["validateIndexedDBOpenable"])();\r\n }\r\n catch (e) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: e === null || e === void 0 ? void 0 : e.toString()\r\n }).message);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Initialize the analytics instance in gtag.js by calling config command with fid.\r\n *\r\n * NOTE: We combine analytics initialization and setting fid together because we want fid to be\r\n * part of the `page_view` event that\'s sent during the initialization\r\n * @param app Firebase app\r\n * @param gtagCore The gtag function that\'s not wrapped.\r\n * @param dynamicConfigPromisesList Array of all dynamic config promises.\r\n * @param measurementIdToAppId Maps measurementID to appID.\r\n * @param installations _FirebaseInstallationsInternal instance.\r\n *\r\n * @returns Measurement ID.\r\n */\r\nasync function _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\r\n var _a;\r\n const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\r\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\r\n dynamicConfigPromise\r\n .then(config => {\r\n measurementIdToAppId[config.measurementId] = config.appId;\r\n if (app.options.measurementId &&\r\n config.measurementId !== app.options.measurementId) {\r\n logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` +\r\n ` does not match the measurement ID fetched from the server (${config.measurementId}).` +\r\n ` To ensure analytics events are always sent to the correct Analytics property,` +\r\n ` update the` +\r\n ` measurement ID field in the local config or remove it from the local config.`);\r\n }\r\n })\r\n .catch(e => logger.error(e));\r\n // Add to list to track state of all dynamic config promises.\r\n dynamicConfigPromisesList.push(dynamicConfigPromise);\r\n const fidPromise = validateIndexedDB().then(envIsValid => {\r\n if (envIsValid) {\r\n return installations.getId();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n const [dynamicConfig, fid] = await Promise.all([\r\n dynamicConfigPromise,\r\n fidPromise\r\n ]);\r\n // Detect if user has already put the gtag + + + FlyingPlane @@ -38,8 +40,6 @@

- - - + diff --git a/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js b/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js deleted file mode 100644 index 09cc95c..0000000 --- a/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see vendor.9225d8b7cdd4505af1b3.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=1)}({"./node_modules/eventemitter3/index.js":function(module,exports,__webpack_require__){"use strict";eval("\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n//# sourceURL=webpack:///./node_modules/eventemitter3/index.js?")},"./node_modules/phaser/plugins/camera3d/src/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Matrix4 = __webpack_require__(/*! ../../../src/math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar RandomXYZ = __webpack_require__(/*! ../../../src/math/RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js");\r\nvar RandomXYZW = __webpack_require__(/*! ../../../src/math/RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js");\r\nvar RotateVec3 = __webpack_require__(/*! ../../../src/math/RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js");\r\nvar Set = __webpack_require__(/*! ../../../src/structs/Set */ "./node_modules/phaser/src/structs/Set.js");\r\nvar Sprite3D = __webpack_require__(/*! ./sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\nvar tmpVec4 = new Vector4();\r\nvar dirvec = new Vector3();\r\nvar rightvec = new Vector3();\r\nvar billboardMatrix = new Matrix4();\r\n\r\n// @author attribute https://github.com/mattdesl/cam3d/wiki\r\n\r\n/**\r\n * @typedef {object} RayDef\r\n *\r\n * @property {Phaser.Math.Vector3} origin - [description]\r\n * @property {Phaser.Math.Vector3} direction - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar Camera = new Class({\r\n\r\n initialize:\r\n\r\n function Camera (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList = scene.sys.displayList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList = scene.sys.updateList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#direction\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.direction = new Vector3(0, 0, -1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#up\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.up = new Vector3(0, 1, 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#position\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector3();\r\n\r\n\r\n /**\r\n * The mapping from 3D size units to pixels.\r\n * In the default case 1 3D unit = 128 pixels. So a sprite that is\r\n * 256 x 128 px in size will be 2 x 1 units.\r\n * Change to whatever best fits your game assets.\r\n *\r\n * @name Phaser.Cameras.Sprite3D#pixelScale\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelScale = 128;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#projection\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.projection = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#view\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.view = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#combined\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.combined = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#invProjectionView\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.invProjectionView = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#near\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.near = 1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#far\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.far = 100;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#ray\r\n * @type {RayDef}\r\n * @since 3.0.0\r\n */\r\n this.ray = {\r\n origin: new Vector3(),\r\n direction: new Vector3()\r\n };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#billboardMatrixDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.billboardMatrixDirty = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPosition: function (x, y, z)\r\n {\r\n this.position.set(x, y, z);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setScene: function (scene)\r\n {\r\n this.scene = scene;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPixelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPixelScale: function (value)\r\n {\r\n this.pixelScale = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite3D} sprite3D - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n add: function (sprite3D)\r\n {\r\n this.children.set(sprite3D);\r\n\r\n this.displayList.add(sprite3D.gameObject);\r\n this.updateList.add(sprite3D.gameObject);\r\n\r\n this.updateChildren();\r\n\r\n return sprite3D;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n remove: function (child)\r\n {\r\n this.displayList.remove(child.gameObject);\r\n this.updateList.remove(child.gameObject);\r\n\r\n this.children.delete(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n clear: function ()\r\n {\r\n var children = this.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.remove(children[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {array} [description]\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n create: function (x, y, z, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var child = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n this.updateChildren();\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {number} quantity - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createMultiple: function (quantity, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var child = new Sprite3D(this.scene, 0, 0, 0, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n output.push(child);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // Create a bunch of Sprite3D objects in a rectangle\r\n // size and spacing are Vec3s (or if integers are converted to vec3s)\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createRect\r\n * @since 3.0.0\r\n *\r\n * @param {(number|{x:number,y:number})} size - [description]\r\n * @param {(number|{x:number,y:number,z:number})} spacing - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} [frame] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createRect: function (size, spacing, key, frame)\r\n {\r\n if (typeof size === \'number\') { size = { x: size, y: size, z: size }; }\r\n if (typeof spacing === \'number\') { spacing = { x: spacing, y: spacing, z: spacing }; }\r\n\r\n var quantity = size.x * size.y * size.z;\r\n\r\n var sprites = this.createMultiple(quantity, key, frame);\r\n\r\n var i = 0;\r\n\r\n for (var z = 0.5 - (size.z / 2); z < (size.z / 2); z++)\r\n {\r\n for (var y = 0.5 - (size.y / 2); y < (size.y / 2); y++)\r\n {\r\n for (var x = 0.5 - (size.x / 2); x < (size.x / 2); x++)\r\n {\r\n var bx = (x * spacing.x);\r\n var by = (y * spacing.y);\r\n var bz = (z * spacing.z);\r\n\r\n sprites[i].position.set(bx, by, bz);\r\n\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n this.update();\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomSphere\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radius=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomSphere: function (radius, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZ(sprites[i].position, radius);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomCube\r\n * @since 3.0.0\r\n *\r\n * @param {number} [scale=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomCube: function (scale, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZW(sprites[i].position, scale);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translateChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translateChildren: function (vec3, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.add(vec3);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#transformChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n transformChildren: function (mat4, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.transformMat4(mat4);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Sets the width and height of the viewport. Does not update any matrices.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setViewport: function (width, height)\r\n {\r\n this.viewportWidth = width;\r\n this.viewportHeight = height;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Translates this camera by a specified Vector3 object\r\n * or x, y, z parameters. Any undefined x y z values will\r\n * default to zero, leaving that component unaffected.\r\n * If you wish to set the camera position directly call setPosition instead.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translate: function (x, y, z)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.position.x += x.x || 0;\r\n this.position.y += x.y || 0;\r\n this.position.z += x.z || 0;\r\n }\r\n else\r\n {\r\n this.position.x += x || 0;\r\n this.position.y += y || 0;\r\n this.position.z += z || 0;\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n lookAt: function (x, y, z)\r\n {\r\n var dir = this.direction;\r\n var up = this.up;\r\n\r\n if (typeof x === \'object\')\r\n {\r\n dir.copy(x);\r\n }\r\n else\r\n {\r\n dir.set(x, y, z);\r\n }\r\n\r\n dir.subtract(this.position).normalize();\r\n\r\n // Calculate right vector\r\n tmpVec3.copy(dir).cross(up).normalize();\r\n\r\n // Calculate up vector\r\n up.copy(tmpVec3).cross(dir).normalize();\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotate: function (radians, axis)\r\n {\r\n RotateVec3(this.direction, axis, radians);\r\n RotateVec3(this.up, axis, radians);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} point - [description]\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotateAround: function (point, radians, axis)\r\n {\r\n tmpVec3.copy(point).subtract(this.position);\r\n\r\n this.translate(tmpVec3);\r\n this.rotate(radians, axis);\r\n this.translate(tmpVec3.negate());\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - [description]\r\n * @param {Phaser.Math.Vector4} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector4} [description]\r\n */\r\n project: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector4(); }\r\n\r\n // TODO: support viewport XY\r\n var viewportWidth = this.viewportWidth;\r\n var viewportHeight = this.viewportHeight;\r\n var n = Camera.NEAR_RANGE;\r\n var f = Camera.FAR_RANGE;\r\n\r\n // For useful Z and W values we should do the usual steps: clip space -> NDC -> window coords\r\n\r\n // Implicit 1.0 for w component\r\n tmpVec4.set(vec.x, vec.y, vec.z, 1.0);\r\n\r\n // Transform into clip space\r\n tmpVec4.transformMat4(this.combined);\r\n\r\n // Avoid divide by zero when 0x0x0 camera projects to a 0x0x0 vec3\r\n if (tmpVec4.w === 0)\r\n {\r\n tmpVec4.w = 1;\r\n }\r\n\r\n // Now into NDC\r\n tmpVec4.x = tmpVec4.x / tmpVec4.w;\r\n tmpVec4.y = tmpVec4.y / tmpVec4.w;\r\n tmpVec4.z = tmpVec4.z / tmpVec4.w;\r\n\r\n // And finally into window coordinates\r\n out.x = viewportWidth / 2 * tmpVec4.x + (0 + viewportWidth / 2);\r\n out.y = viewportHeight / 2 * tmpVec4.y + (0 + viewportHeight / 2);\r\n out.z = (f - n) / 2 * tmpVec4.z + (f + n) / 2;\r\n\r\n // If the out vector has a fourth component, we also store (1/clip.w), same idea as gl_FragCoord.w\r\n if (out.w === 0 || out.w)\r\n {\r\n out.w = 1 / tmpVec4.w;\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec - [description]\r\n * @param {Phaser.Math.Vector3} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector3} [description]\r\n */\r\n unproject: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector3(); }\r\n\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n\r\n return out.copy(vec).unproject(viewport, this.invProjectionView);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPickRay\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {RayDef} [description]\r\n */\r\n getPickRay: function (x, y)\r\n {\r\n var origin = this.ray.origin.set(x, y, 0);\r\n var direction = this.ray.direction.set(x, y, 1);\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n var mtx = this.invProjectionView;\r\n\r\n origin.unproject(viewport, mtx);\r\n\r\n direction.unproject(viewport, mtx);\r\n\r\n direction.subtract(origin).normalize();\r\n\r\n return this.ray;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n updateChildren: function ()\r\n {\r\n var children = this.children.entries;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].project(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n // Overriden by subclasses\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n update: function ()\r\n {\r\n return this.updateChildren();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateBillboardMatrix\r\n * @since 3.0.0\r\n */\r\n updateBillboardMatrix: function ()\r\n {\r\n var dir = dirvec.set(this.direction).negate();\r\n\r\n // Better view-aligned billboards might use this:\r\n // var dir = tmp.set(camera.position).subtract(p).normalize();\r\n\r\n var right = rightvec.set(this.up).cross(dir).normalize();\r\n var up = tmpVec3.set(dir).cross(right).normalize();\r\n\r\n var out = billboardMatrix.val;\r\n\r\n out[0] = right.x;\r\n out[1] = right.y;\r\n out[2] = right.z;\r\n out[3] = 0;\r\n\r\n out[4] = up.x;\r\n out[5] = up.y;\r\n out[6] = up.z;\r\n out[7] = 0;\r\n\r\n out[8] = dir.x;\r\n out[9] = dir.y;\r\n out[10] = dir.z;\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n this.billboardMatrixDirty = false;\r\n },\r\n\r\n /**\r\n * This is a utility function for canvas 3D rendering,\r\n * which determines the "point size" of a camera-facing\r\n * sprite billboard given its 3D world position\r\n * (origin at center of sprite) and its world width\r\n * and height in x/y.\r\n *\r\n * We place into the output Vector2 the scaled width\r\n * and height. If no `out` is specified, a new Vector2\r\n * will be created for convenience (this should be avoided\r\n * in tight loops).\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPointSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vec - The position of the 3D Sprite.\r\n * @param {Phaser.Math.Vector2} size - The x and y dimensions.\r\n * @param {Phaser.Math.Vector2} out - The result, scaled x and y dimensions.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointSize: function (vec, size, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n // TODO: optimize this with a simple distance calculation:\r\n // https://developer.valvesoftware.com/wiki/Field_of_View\r\n\r\n if (this.billboardMatrixDirty)\r\n {\r\n this.updateBillboardMatrix();\r\n }\r\n\r\n var tmp = tmpVec3;\r\n\r\n var dx = (size.x / this.pixelScale) / 2;\r\n var dy = (size.y / this.pixelScale) / 2;\r\n\r\n tmp.set(-dx, -dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var tlx = tmp.x;\r\n var tly = tmp.y;\r\n\r\n tmp.set(dx, dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var brx = tmp.x;\r\n var bry = tmp.y;\r\n\r\n // var w = Math.abs(brx - tlx);\r\n // var h = Math.abs(bry - tly);\r\n\r\n // Allow the projection to get negative ...\r\n var w = brx - tlx;\r\n var h = bry - tly;\r\n\r\n return out.set(w, h);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.children.clear();\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setX: function (value)\r\n {\r\n this.position.x = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setY: function (value)\r\n {\r\n this.position.y = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setZ: function (value)\r\n {\r\n this.position.z = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nCamera.FAR_RANGE = 1.0;\r\nCamera.NEAR_RANGE = 0.0;\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/Camera.js?')},"./node_modules/phaser/plugins/camera3d/src/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar OrthographicCamera = __webpack_require__(/*! ./OrthographicCamera */ \"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js\");\r\nvar PerspectiveCamera = __webpack_require__(/*! ./PerspectiveCamera */ \"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../../src/plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CameraManager\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Sprite3D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n scene.sys.events.once('boot', this.boot, this);\r\n scene.sys.events.on('start', this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene3D.CameraManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once('destroy', this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on('update', this.update, this);\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n add: function (fieldOfView, width, height)\r\n {\r\n return this.addPerspectiveCamera(fieldOfView, width, height);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n addOrthographicCamera: function (width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new OrthographicCamera(this.scene, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n addPerspectiveCamera: function (fieldOfView, width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new PerspectiveCamera(this.scene, fieldOfView, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - [description]\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n getCamera: function (name)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n if (this.cameras[i].name === name)\r\n {\r\n return this.cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeCamera\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} camera - [description]\r\n */\r\n removeCamera: function (camera)\r\n {\r\n var cameraIndex = this.cameras.indexOf(camera);\r\n\r\n if (cameraIndex !== -1)\r\n {\r\n this.cameras.splice(cameraIndex, 1);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n removeAll: function ()\r\n {\r\n while (this.cameras.length > 0)\r\n {\r\n var camera = this.cameras.pop();\r\n\r\n camera.destroy();\r\n }\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestep - [description]\r\n * @param {number} delta - [description]\r\n */\r\n update: function (timestep, delta)\r\n {\r\n for (var i = 0, l = this.cameras.length; i < l; ++i)\r\n {\r\n this.cameras[i].update(timestep, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('update', this.update, this);\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n this.removeAll();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off('start', this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager3D', CameraManager, 'cameras3d');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/CameraManager.js?")},"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class OrthographicCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar OrthographicCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n initialize:\r\n\r\n function OrthographicCamera (scene, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._zoom = 1.0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#near\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.near = 0;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} yDown - [description]\r\n * @param {number} [viewportWidth] - [description]\r\n * @param {number} [viewportHeight] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n setToOrtho: function (yDown, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = this.viewportWidth; }\r\n if (viewportHeight === undefined) { viewportHeight = this.viewportHeight; }\r\n\r\n var zoom = this.zoom;\r\n\r\n this.up.set(0, (yDown) ? -1 : 1, 0);\r\n this.direction.set(0, 0, (yDown) ? 1 : -1);\r\n this.position.set(zoom * viewportWidth / 2, zoom * viewportHeight / 2, 0);\r\n\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var w = this.viewportWidth;\r\n var h = this.viewportHeight;\r\n var near = Math.abs(this.near);\r\n var far = Math.abs(this.far);\r\n var zoom = this.zoom;\r\n\r\n if (w === 0 || h === 0)\r\n {\r\n // What to do here... hmm?\r\n return this;\r\n }\r\n\r\n this.projection.ortho(\r\n zoom * -w / 2, zoom * w / 2,\r\n zoom * -h / 2, zoom * h / 2,\r\n near,\r\n far\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#zoom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = OrthographicCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class PerspectiveCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [fieldOfView=80] - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar PerspectiveCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n // FOV is converted to radians automatically\r\n initialize:\r\n\r\n function PerspectiveCamera (scene, fieldOfView, viewportWidth, viewportHeight)\r\n {\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportWidth\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportHeight\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#fieldOfView\r\n * @type {integer}\r\n * @default 80\r\n * @since 3.0.0\r\n */\r\n this.fieldOfView = fieldOfView * Math.PI / 180;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n setFOV: function (value)\r\n {\r\n this.fieldOfView = value * Math.PI / 180;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var aspect = this.viewportWidth / this.viewportHeight;\r\n\r\n // Create a perspective matrix for our camera\r\n this.projection.perspective(\r\n this.fieldOfView,\r\n aspect,\r\n Math.abs(this.near),\r\n Math.abs(this.far)\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PerspectiveCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Sprite3D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/plugins/camera3d/src/CameraManager.js"),\r\n OrthographicCamera: __webpack_require__(/*! ./OrthographicCamera */ "./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js"),\r\n PerspectiveCamera: __webpack_require__(/*! ./PerspectiveCamera */ "./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/index.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GameObject = __webpack_require__(/*! ../../../../src/gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Sprite = __webpack_require__(/*! ../../../../src/gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite 3D Game Object.\r\n *\r\n * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow\r\n * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space.\r\n *\r\n * @class Sprite3D\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberOf Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The x position of this Game Object.\r\n * @param {number} y - The y position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite3D = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n initialize:\r\n\r\n function Sprite3D (scene, x, y, z, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite3D\');\r\n\r\n /**\r\n * The encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = new Sprite(scene, 0, 0, texture, frame);\r\n\r\n /**\r\n * The position of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#position\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector4(x, y, z);\r\n\r\n /**\r\n * The 2D size of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#size\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.size = new Vector2(this.gameObject.width, this.gameObject.height);\r\n\r\n /**\r\n * The 2D scale of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#scale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.scale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether to automatically set the horizontal scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleX\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleX = true;\r\n\r\n /**\r\n * Whether to automatically set the vertical scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleY\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleY = true;\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#_visible\r\n * @type {boolean}\r\n * @default true\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = true;\r\n },\r\n\r\n /**\r\n * Project this Sprite onto the given 3D Camera.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Sprite3D.Camera} camera - The 3D Camera onto which to project this Sprite.\r\n */\r\n project: function (camera)\r\n {\r\n var pos = this.position;\r\n\r\n var gameObject = this.gameObject;\r\n\r\n camera.project(pos, gameObject);\r\n\r\n camera.getPointSize(pos, this.size, this.scale);\r\n\r\n if (this.scale.x <= 0 || this.scale.y <= 0)\r\n {\r\n gameObject.setVisible(false);\r\n }\r\n else\r\n {\r\n if (!gameObject.visible)\r\n {\r\n gameObject.setVisible(true);\r\n }\r\n\r\n if (this.adjustScaleX)\r\n {\r\n gameObject.scaleX = this.scale.x;\r\n }\r\n\r\n if (this.adjustScaleY)\r\n {\r\n gameObject.scaleY = this.scale.y;\r\n }\r\n\r\n gameObject.setDepth(gameObject.z * -1);\r\n }\r\n },\r\n\r\n /**\r\n * Set the visible state of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} This Sprite3D Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.gameObject.visible = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite3D;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../../src/utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite3D\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite3D(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function \'this\' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ \"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object.\r\n * @param {number} y - The vertical position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite3D', function (x, y, z, key, frame)\r\n{\r\n var sprite = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(sprite.gameObject);\r\n this.updateList.add(sprite.gameObject);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js?")},"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} AdInstance\r\n *\r\n * @property {any} instance - Represents an instance of an ad.\r\n * @property {string} placementID - The Audience Network placement ID of this ad instance.\r\n * @property {boolean} shown - Has this ad already been shown in-game?\r\n * @property {boolean} video - Is this a video ad?\r\n */\r\n\r\nvar AdInstance = function (placementID, instance, video)\r\n{\r\n return {\r\n instance: instance,\r\n placementID: placementID,\r\n shown: false,\r\n video: video\r\n };\r\n};\r\n\r\nmodule.exports = AdInstance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/AdInstance.js?")},"./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js":function(module,exports,__webpack_require__){eval("/* eslint no-console: 0 */\r\n\r\n/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AdInstance = __webpack_require__(/*! ./AdInstance */ \"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js\");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DataManager = __webpack_require__(/*! ../../../src/data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Leaderboard = __webpack_require__(/*! ./Leaderboard */ \"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js\");\r\nvar Product = __webpack_require__(/*! ./Product */ \"./node_modules/phaser/plugins/fbinstant/src/Product.js\");\r\nvar Purchase = __webpack_require__(/*! ./Purchase */ \"./node_modules/phaser/plugins/fbinstant/src/Purchase.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Facebook Instant Games Plugin for Phaser 3 provides a seamless bridge between Phaser\r\n * and the Facebook Instant Games API version 6.2.\r\n * \r\n * You can access this plugin via the `facebook` property in a Scene, i.e:\r\n * \r\n * ```javascript\r\n * this.facebook.getPlatform();\r\n * ```\r\n * \r\n * If this is unavailable please check to make sure you're using a build of Phaser that has\r\n * this plugin within it. You can quickly check this by looking at the dev tools console\r\n * header - the Phaser version number will have `-FB` after it if this plugin is loaded.\r\n *\r\n * If you are building your own version of Phaser then use this Webpack DefinePlugin flag:\r\n * \r\n * `\"typeof PLUGIN_FBINSTANT\": JSON.stringify(true)`\r\n * \r\n * You will find that every Instant Games API method has a mapping in this plugin.\r\n * For a full list please consult either the plugin documentation, or the 6.2 SDK documentation\r\n * at https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2\r\n * \r\n * Internally this plugin uses its own Data Manager to handle seamless user data updates and provides\r\n * handy functions for advertisement displaying, opening share dialogs, logging, leaderboards, purchase API requests,\r\n * loader integration and more.\r\n * \r\n * To get started with Facebook Instant Games you will need to register on Facebook and create a new Instant\r\n * Game app that has its own unique app ID. Facebook have also provided a dashboard interface for setting up\r\n * various features for your game, including leaderboards, ad requests and the payments API. There are lots\r\n * of guides on the Facebook Developers portal to assist with setting these\r\n * various systems up: https://developers.facebook.com/docs/games/instant-games/guides\r\n * \r\n * For more details follow the Quick Start guide here: https://developers.facebook.com/docs/games/instant-games\r\n *\r\n * @class FacebookInstantGamesPlugin\r\n * @memberOf Phaser\r\n * @constructor\r\n * @extends Phaser.Events.EventEmitter\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar FacebookInstantGamesPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function FacebookInstantGamesPlugin (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#game\r\n * @type {Phaser.Game}\r\n * @readOnly\r\n * @since 3.13.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Data Manager instance.\r\n * It allows you to store, query and retrieve any key/value data you may need to store.\r\n * It's also used internally by the plugin to store FBIG API data.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.13.0\r\n */\r\n this.data = new DataManager(this);\r\n\r\n this.on('setdata', this.setDataHandler, this);\r\n this.on('changedata', this.changeDataHandler, this);\r\n\r\n /**\r\n * Has the Facebook Instant Games API loaded yet?\r\n * This is set automatically during the boot process.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#hasLoaded\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.hasLoaded = false;\r\n\r\n /**\r\n * Is the Data Manager currently locked?\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#dataLocked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.dataLocked = false;\r\n\r\n /**\r\n * A list of the Facebook Instant Games APIs that are available,\r\n * based on the given platform, context and user privacy settings.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#supportedAPIs\r\n * @type {string[]}\r\n * @since 3.13.0\r\n */\r\n this.supportedAPIs = [];\r\n\r\n /**\r\n * Holds the entry point that the game was launched from.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPoint\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.entryPoint = '';\r\n\r\n /**\r\n * An object that contains any data associated with the entry point that the game was launched from.\r\n * The contents of the object are developer-defined, and can occur from entry points on different platforms.\r\n * This will return null for older mobile clients, as well as when there is no data associated with the particular entry point.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPointData\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.entryPointData = null;\r\n\r\n /**\r\n * A unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = null;\r\n\r\n /**\r\n * The current context in which your game is running. This can be either `null` or\r\n * one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextType\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.contextType = null;\r\n\r\n /**\r\n * The current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#locale\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.locale = null;\r\n\r\n /**\r\n * The platform on which the game is currently running, i.e. `IOS`.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#platform\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.platform = null;\r\n\r\n /**\r\n * The string representation of the Facebook Instant Games SDK version being used.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#version\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.version = null;\r\n\r\n /**\r\n * Holds the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerID\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerID = null;\r\n\r\n /**\r\n * The player's localized display name.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerName\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerName = null;\r\n\r\n /**\r\n * A url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerPhotoURL\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerPhotoURL = null;\r\n\r\n /**\r\n * Whether a player can subscribe to the game bot or not.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerCanSubscribeBot\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.playerCanSubscribeBot = false;\r\n\r\n /**\r\n * Does the current platform and context allow for use of the payments API?\r\n * Currently this is only available on Facebook.com and Android 6+.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#paymentsReady\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.paymentsReady = false;\r\n\r\n /**\r\n * The set of products that are registered to the game.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#catalog\r\n * @type {Product[]}\r\n * @since 3.13.0\r\n */\r\n this.catalog = [];\r\n\r\n /**\r\n * Contains all of the player's unconsumed purchases.\r\n * The game must fetch the current player's purchases as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#purchases\r\n * @type {Purchase[]}\r\n * @since 3.13.0\r\n */\r\n this.purchases = [];\r\n\r\n /**\r\n * Contains all of the leaderboard data, as populated by the `getLeaderboard()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#leaderboards\r\n * @type {Phaser.FacebookInstantGamesLeaderboard[]}\r\n * @since 3.13.0\r\n */\r\n this.leaderboards = {};\r\n\r\n /**\r\n * Contains AdInstance objects, as created by the `preloadAds()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#ads\r\n * @type {AdInstance[]}\r\n * @since 3.13.0\r\n */\r\n this.ads = [];\r\n },\r\n\r\n /**\r\n * Internal set data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#setDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n setDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Internal change data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#changeDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n changeDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Call this method from your `Scene.preload` in order to sync the load progress\r\n * of the Phaser Loader with the Facebook Instant Games loader display, i.e.:\r\n * \r\n * ```javascript\r\n * this.facebook.showLoadProgress(this);\r\n * this.facebook.once('startgame', this.startGame, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showLoadProgress\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene for which you want to show loader progress for.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showLoadProgress: function (scene)\r\n {\r\n scene.load.on('progress', function (value)\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n FBInstant.setLoadingProgress(value * 100);\r\n }\r\n\r\n }, this);\r\n\r\n scene.load.on('complete', function ()\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n this.hasLoaded = true;\r\n\r\n FBInstant.startGameAsync().then(this.gameStarted.bind(this));\r\n }\r\n \r\n }, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is called automatically when the game has finished loading,\r\n * if you used the `showLoadProgress` method. If your game doesn't need to\r\n * load any assets, or you're managing the load yourself, then call this\r\n * method directly to start the API running.\r\n * \r\n * When the API has finished starting this plugin will emit a `startgame` event\r\n * which you should listen for.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#gameStarted\r\n * @since 3.13.0\r\n */\r\n gameStarted: function ()\r\n {\r\n var APIs = FBInstant.getSupportedAPIs();\r\n\r\n var supported = {};\r\n\r\n var dotToUpper = function (match)\r\n {\r\n return match[1].toUpperCase();\r\n };\r\n\r\n APIs.forEach(function (api)\r\n {\r\n api = api.replace(/\\../g, dotToUpper);\r\n\r\n supported[api] = true;\r\n });\r\n\r\n this.supportedAPIs = supported;\r\n\r\n this.getID();\r\n this.getType();\r\n this.getLocale();\r\n this.getPlatform();\r\n this.getSDKVersion();\r\n\r\n this.getPlayerID();\r\n this.getPlayerName();\r\n this.getPlayerPhotoURL();\r\n\r\n var _this = this;\r\n\r\n FBInstant.onPause(function ()\r\n {\r\n _this.emit('pause');\r\n });\r\n\r\n FBInstant.getEntryPointAsync().then(function (entrypoint)\r\n {\r\n _this.entryPoint = entrypoint;\r\n _this.entryPointData = FBInstant.getEntryPointData();\r\n\r\n _this.emit('startgame');\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n // Facebook.com and Android 6 only\r\n if (this.supportedAPIs.paymentsPurchaseAsync)\r\n {\r\n FBInstant.payments.onReady(function ()\r\n {\r\n _this.paymentsReady = true;\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Checks to see if a given Facebook Instant Games API is available or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#checkAPI\r\n * @since 3.13.0\r\n * \r\n * @param {string} api - The API to check for, i.e. `player.getID`.\r\n * \r\n * @return {boolean} `true` if the API is supported, otherwise `false`.\r\n */\r\n checkAPI: function (api)\r\n {\r\n if (!this.supportedAPIs[api])\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * \r\n * It is only populated if `contextGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getID\r\n * @since 3.13.0\r\n * \r\n * @return {string} The context ID.\r\n */\r\n getID: function ()\r\n {\r\n if (!this.contextID && this.supportedAPIs.contextGetID)\r\n {\r\n this.contextID = FBInstant.context.getID();\r\n }\r\n\r\n return this.contextID;\r\n },\r\n\r\n /**\r\n * Returns the current context in which your game is running. This can be either `null` or one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * It is only populated if `contextGetType` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getType\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The context type.\r\n */\r\n getType: function ()\r\n {\r\n if (!this.contextType && this.supportedAPIs.contextGetType)\r\n {\r\n this.contextType = FBInstant.context.getType();\r\n }\r\n\r\n return this.contextType;\r\n },\r\n\r\n /**\r\n * Returns the current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * It is only populated if `getLocale` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLocale\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current locale.\r\n */\r\n getLocale: function ()\r\n {\r\n if (!this.locale && this.supportedAPIs.getLocale)\r\n {\r\n this.locale = FBInstant.getLocale();\r\n }\r\n\r\n return this.locale;\r\n },\r\n\r\n /**\r\n * Returns the platform on which the game is currently running, i.e. `IOS`.\r\n * It is only populated if `getPlatform` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlatform\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current platform.\r\n */\r\n getPlatform: function ()\r\n {\r\n if (!this.platform && this.supportedAPIs.getPlatform)\r\n {\r\n this.platform = FBInstant.getPlatform();\r\n }\r\n\r\n return this.platform;\r\n },\r\n\r\n /**\r\n * Returns the string representation of the Facebook Instant Games SDK version being used.\r\n * It is only populated if `getSDKVersion` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getSDKVersion\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The sdk version.\r\n */\r\n getSDKVersion: function ()\r\n {\r\n if (!this.version && this.supportedAPIs.getSDKVersion)\r\n {\r\n this.version = FBInstant.getSDKVersion();\r\n }\r\n\r\n return this.version;\r\n },\r\n\r\n /**\r\n * Returns the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * It is only populated if `playerGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerID\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player ID.\r\n */\r\n getPlayerID: function ()\r\n {\r\n if (!this.playerID && this.supportedAPIs.playerGetID)\r\n {\r\n this.playerID = FBInstant.player.getID();\r\n }\r\n\r\n return this.playerID;\r\n },\r\n\r\n /**\r\n * Returns the player's localized display name.\r\n * It is only populated if `playerGetName` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerName\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's localized display name.\r\n */\r\n getPlayerName: function ()\r\n {\r\n if (!this.playerName && this.supportedAPIs.playerGetName)\r\n {\r\n this.playerName = FBInstant.player.getName();\r\n }\r\n\r\n return this.playerName;\r\n },\r\n\r\n /**\r\n * Returns the url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * It is only populated if `playerGetPhoto` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerPhotoURL\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's photo url.\r\n */\r\n getPlayerPhotoURL: function ()\r\n {\r\n if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto)\r\n {\r\n this.playerPhotoURL = FBInstant.player.getPhoto();\r\n }\r\n\r\n return this.playerPhotoURL;\r\n },\r\n\r\n /**\r\n * Load the player's photo and store it in the Texture Manager, ready for use in-game.\r\n * \r\n * This method works by using a Scene Loader instance and then asking the Loader to\r\n * retrieve the image.\r\n * \r\n * When complete the plugin will emit a `photocomplete` event, along with the key of the photo.\r\n * \r\n * ```javascript\r\n * this.facebook.loadPlayerPhoto(this, 'player').once('photocomplete', function (key) {\r\n * this.add.image(x, y, 'player');\r\n * }, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#loadPlayerPhoto\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene that will be responsible for loading this photo.\r\n * @param {string} key - The key to use when storing the photo in the Texture Manager.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n loadPlayerPhoto: function (scene, key)\r\n {\r\n if (this.playerPhotoURL)\r\n {\r\n scene.load.setCORS('anonymous');\r\n \r\n scene.load.image(key, this.playerPhotoURL);\r\n \r\n scene.load.once('filecomplete-image-' + key, function ()\r\n {\r\n this.emit('photocomplete', key);\r\n\r\n }, this);\r\n \r\n scene.load.start();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current player can subscribe to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they can subscribe, the `playerCanSubscribeBot` property is set to `true`\r\n * and this plugin will emit the `cansubscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `cansubscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#canSubscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n canSubscribeBot: function ()\r\n {\r\n if (this.supportedAPIs.playerCanSubscribeBotAsync)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.canSubscribeBotAsync().then(function ()\r\n {\r\n _this.playerCanSubscribeBot = true;\r\n\r\n _this.emit('cansubscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('cansubscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('cansubscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subscribes the current player to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `subscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `subscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#subscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n subscribeBot: function ()\r\n {\r\n if (this.playerCanSubscribeBot)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.subscribeBotAsync().then(function ()\r\n {\r\n _this.emit('subscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('subscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('subscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the associated data from the player based on the given key, or array of keys.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the data is set into this plugins Data Manager and the\r\n * `getdata` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getData\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} keys - The key/s of the data to retrieve.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getData: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(keys))\r\n {\r\n keys = [ keys ];\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getDataAsync(keys).then(function (data)\r\n {\r\n _this.dataLocked = true;\r\n\r\n for (var key in data)\r\n {\r\n _this.data.set(key, data[key]);\r\n }\r\n\r\n _this.dataLocked = false;\r\n\r\n _this.emit('getdata', data);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set data to be saved to the designated cloud storage of the current player. The game can store up to 1MB of data for each unique player.\r\n * \r\n * The data save is requested in an async call, so the result isn't available immediately.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to replace the data object directly.\r\n * \r\n * When the APIs `setDataAsync` call resolves it will emit the `savedata` event from this plugin. If the call fails for some\r\n * reason it will emit `savedatafail` instead.\r\n * \r\n * The call resolving does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and\r\n * has been scheduled to be saved. It also guarantees that all values that were set are now available in `getData`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveData\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage.\r\n * The object must contain only serializable values - any non-serializable values will cause the entire modification to be rejected.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveData: function (data)\r\n {\r\n if (!this.checkAPI('playerSetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savedatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately flushes any changes to the player data to the designated cloud storage.\r\n * This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate\r\n * and known by the game. Non-critical changes should rely on the platform to persist them in the background.\r\n * NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to flush the data directly.\r\n * \r\n * When the APIs `flushDataAsync` call resolves it will emit the `flushdata` event from this plugin. If the call fails for some\r\n * reason it will emit `flushdatafail` instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#flushData\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n flushData: function ()\r\n {\r\n if (!this.checkAPI('playerFlushDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.flushDataAsync().then(function ()\r\n {\r\n _this.emit('flushdata');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('flushdatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve stats from the designated cloud storage of the current player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `getstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getStats\r\n * @since 3.13.0\r\n * \r\n * @param {string[]} [keys] - An optional array of unique keys to retrieve stats for. If the function is called without it, it will fetch all stats.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getStats: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getStatsAsync(keys).then(function (data)\r\n {\r\n _this.emit('getstats', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Save the stats of the current player to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `savestats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `savestatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage as stats. Note that only numerical values are stored.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveStats: function (data)\r\n {\r\n if (!this.checkAPI('playerSetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setStatsAsync(output).then(function ()\r\n {\r\n _this.emit('savestats', output);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savestatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increment the stats of the current player and save them to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data object provided for this call should contain offsets for how much to modify the stats by:\r\n * \r\n * ```javascript\r\n * this.facebook.incStats({\r\n * level: 1,\r\n * zombiesSlain: 17,\r\n * rank: -1\r\n * });\r\n * ```\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `incstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `incstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#incStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs indicating how much to increment each stat in cloud storage. Note that only numerical values are processed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n incStats: function (data)\r\n {\r\n if (!this.checkAPI('playerIncrementStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.incrementStatsAsync(output).then(function (stats)\r\n {\r\n _this.emit('incstats', stats);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('incstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the data associated with the individual gameplay session for the current context.\r\n * \r\n * This function should be called whenever the game would like to update the current session data.\r\n * \r\n * This session data may be used to populate a variety of payloads, such as game play webhooks.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveSession\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An arbitrary data object, which must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveSession: function (data)\r\n {\r\n if (!this.checkAPI('setSessionData'))\r\n {\r\n return this;\r\n }\r\n\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length <= 1000)\r\n {\r\n FBInstant.setSessionData(data);\r\n }\r\n else\r\n {\r\n console.warn('Session data too long. Max 1000 chars.');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openShare\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openShare: function (text, key, frame, sessionData)\r\n {\r\n return this._share('SHARE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user invite a friend to play this game, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openInvite\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openInvite: function (text, key, frame, sessionData)\r\n {\r\n return this._share('INVITE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openRequest\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openRequest: function (text, key, frame, sessionData)\r\n {\r\n return this._share('REQUEST', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openChallenge\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openChallenge: function (text, key, frame, sessionData)\r\n {\r\n return this._share('CHALLENGE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * Internal share handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_share\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} intent - (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _share: function (intent, text, key, frame, sessionData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (sessionData === undefined) { sessionData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n // intent (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n // image string A base64 encoded image to be shared.\r\n // text string A text message to be shared.\r\n // data Object? A blob of data to attach to the share. All game sessions launched from the share will be able to access this blob through FBInstant.getEntryPointData().\r\n\r\n var payload = {\r\n intent: intent,\r\n image: imageData,\r\n text: text,\r\n data: sessionData\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.shareAsync(payload).then(function ()\r\n {\r\n _this.emit('resume');\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive.\r\n * If one of the bounds is null only the other bound will be checked against.\r\n * It will always return the original result for the first call made in a context in a given game play session.\r\n * Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#isSizeBetween\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min] - The minimum bound of the context size query.\r\n * @param {integer} [max] - The maximum bound of the context size query.\r\n * \r\n * @return {object} The Context Size Response object in the format: `{answer: boolean, minSize: number?, maxSize: number?}`.\r\n */\r\n isSizeBetween: function (min, max)\r\n {\r\n if (!this.checkAPI('contextIsSizeBetween'))\r\n {\r\n return this;\r\n }\r\n\r\n return FBInstant.context.isSizeBetween(min, max);\r\n },\r\n\r\n /**\r\n * Request a switch into a specific context. If the player does not have permission to enter that context,\r\n * or if the player does not provide permission for the game to enter that context, this will emit a `switchfail` event.\r\n * \r\n * Otherwise, the plugin will emit the `switch` event when the game has switched into the specified context.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchContext: function (contextID)\r\n {\r\n if (!this.checkAPI('contextSwitchAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (contextID !== this.contextID)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.context.switchAsync(contextID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n\r\n _this.emit('switch', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchfail', e);\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Opens a context selection dialog for the player. If the player selects an available context,\r\n * the client will attempt to switch into that context, and emit the `choose` event if successful.\r\n * Otherwise, if the player exits the menu or the client fails to switch into the new context, the `choosefail` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#chooseContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n chooseContext: function (options)\r\n {\r\n if (!this.checkAPI('contextChooseAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.chooseAsync(options).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('choose', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('choosefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to create or switch into a context between a specified player and the current player.\r\n * This plugin will emit the `create` event once the context switch is completed.\r\n * If the API call fails, such as if the player listed is not a Connected Player of the current player or if the\r\n * player does not provide permission to enter the new context, then the plugin will emit a 'createfail' event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} playerID - ID of the player.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createContext: function (playerID)\r\n {\r\n if (!this.checkAPI('contextCreateAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.createAsync(playerID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('create', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('createfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches an array of ConnectedPlayer objects containing information about active players\r\n * (people who played the game in the last 90 days) that are connected to the current player.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `players` event along\r\n * with the player data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `playersfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayers\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPlayers: function ()\r\n {\r\n if (!this.checkAPI('playerGetConnectedPlayersAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getConnectedPlayersAsync().then(function (players)\r\n {\r\n _this.emit('players', players);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('playersfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches the game's product catalog.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getcatalog` event along\r\n * with the catalog data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getcatalogfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getCatalog\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getCatalog: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var catalog = this.catalog;\r\n\r\n FBInstant.payments.getCatalogAsync().then(function (data)\r\n {\r\n catalog = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n catalog.push(Product(item));\r\n });\r\n\r\n _this.emit('getcatalog', catalog);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getcatalogfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches a single Product from the game's product catalog.\r\n * \r\n * The product catalog must have been populated using `getCatalog` prior to calling this method.\r\n * \r\n * Use this to look-up product details based on a purchase list.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getProduct\r\n * @since 3.17.0\r\n * \r\n * @param {string} productID - The Product ID of the item to get from the catalog.\r\n * \r\n * @return {?Product} The Product from the catalog, or `null` if it couldn't be found or the catalog isn't populated.\r\n */\r\n getProduct: function (productID)\r\n {\r\n for (var i = 0; i < this.catalog.length; i++)\r\n {\r\n if (this.catalog[i].productID === productID)\r\n {\r\n return this.catalog[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Begins the purchase flow for a specific product.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `purchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `purchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#purchase\r\n * @since 3.13.0\r\n * \r\n * @param {string} productID - The identifier of the product to purchase.\r\n * @param {string} [developerPayload] - An optional developer-specified payload, to be included in the returned purchase's signed request.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n purchase: function (productID, developerPayload)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var config = {productID: productID};\r\n\r\n if (developerPayload)\r\n {\r\n config.developerPayload = developerPayload;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.purchaseAsync(config).then(function (data)\r\n {\r\n var purchase = Purchase(data);\r\n\r\n _this.emit('purchase', purchase);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('purchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches all of the player's unconsumed purchases. The game must fetch the current player's purchases\r\n * as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getpurchases` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getpurchasesfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPurchases\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPurchases: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var purchases = this.purchases;\r\n\r\n FBInstant.payments.getPurchasesAsync().then(function (data)\r\n {\r\n purchases = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n purchases.push(Purchase(item));\r\n });\r\n\r\n _this.emit('getpurchases', purchases);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getpurchasesfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player,\r\n * the game should request the consumption of the purchased product. Once the purchase is successfully consumed,\r\n * the game should immediately provide the player with the effects of their purchase.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `consumepurchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `consumepurchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#consumePurchase\r\n * @since 3.17.0\r\n * \r\n * @param {string} purchaseToken - The purchase token of the purchase that should be consumed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n consumePurchase: function (purchaseToken)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function ()\r\n {\r\n _this.emit('consumepurchase', purchaseToken);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('consumepurchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Informs Facebook of a custom update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#update\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n update: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('CUSTOM', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Informs Facebook of a leaderboard update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#updateLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n updateLeaderboard: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('LEADERBOARD', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_update\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} action - The update action.\r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _update: function (action, cta, text, key, frame, template, updateData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (cta === undefined) { cta = ''; }\r\n\r\n if (typeof text === 'string')\r\n {\r\n text = {default: text};\r\n }\r\n\r\n if (updateData === undefined) { updateData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n var payload = {\r\n action: action,\r\n cta: cta,\r\n image: imageData,\r\n text: text,\r\n template: template,\r\n data: updateData,\r\n strategy: 'IMMEDIATE',\r\n notification: 'NO_PUSH'\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.updateAsync(payload).then(function ()\r\n {\r\n _this.emit('update');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('updatefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Request that the client switch to a different Instant Game.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the game switches successfully this plugin will emit the `switchgame` event and the client will load the new game.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `switchgamefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchGame\r\n * @since 3.13.0\r\n * \r\n * @param {string} appID - The Application ID of the Instant Game to switch to. The application must be an Instant Game, and must belong to the same business as the current game.\r\n * @param {object} [data] - An optional data payload. This will be set as the entrypoint data for the game being switched to. Must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchGame: function (appID, data)\r\n {\r\n if (!this.checkAPI('switchGameAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (data)\r\n {\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length > 1000)\r\n {\r\n console.warn('Switch Game data too long. Max 1000 chars.');\r\n return this;\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.switchGameAsync(appID, data).then(function ()\r\n {\r\n _this.emit('switchgame', appID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchgamefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Prompts the user to create a shortcut to the game if they are eligible to.\r\n * Can only be called once per session.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the user choose to create a shortcut this plugin will emit the `shortcutcreated` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `shortcutcreatedfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createShortcut\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createShortcut: function ()\r\n {\r\n var _this = this;\r\n\r\n FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut)\r\n {\r\n if (canCreateShortcut)\r\n {\r\n FBInstant.createShortcutAsync().then(function ()\r\n {\r\n _this.emit('shortcutcreated');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('shortcutfailed', e);\r\n });\r\n }\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the game.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#quit\r\n * @since 3.13.0\r\n */\r\n quit: function ()\r\n {\r\n FBInstant.quit();\r\n },\r\n\r\n /**\r\n * Log an app event with FB Analytics.\r\n * \r\n * See https://developers.facebook.com/docs/javascript/reference/v2.8#app_events for more details about FB Analytics.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#log\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - Name of the event. Must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters.\r\n * @param {number} [value] - An optional numeric value that FB Analytics can calculate a sum with.\r\n * @param {object} [params] - An optional object that can contain up to 25 key-value pairs to be logged with the event. Keys must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters. Values must be less than 100 characters in length.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n log: function (name, value, params)\r\n {\r\n if (!this.checkAPI('logEvent'))\r\n {\r\n return this;\r\n }\r\n\r\n if (params === undefined) { params = {}; }\r\n\r\n if (name.length >= 2 && name.length <= 40)\r\n {\r\n FBInstant.logEvent(name, parseFloat(value), params);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an interstitial ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showAd()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getInterstitialAdAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getInterstitialAdAsync(id).then(function (interstitial)\r\n {\r\n data = interstitial;\r\n\r\n return interstitial.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, false);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an rewarded video ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showVideo()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadVideoAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadVideoAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getRewardedVideoAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getRewardedVideoAsync(id).then(function (reward)\r\n {\r\n data = reward;\r\n\r\n return reward.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, true);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showAd\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showAd: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial video ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showVideo\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showVideo: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID && ad.video)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to match the current player with other users looking for people to play with.\r\n * If successful, a new Messenger group thread will be created containing the matched players and the player will\r\n * be context switched to that thread. This plugin will also dispatch the `matchplayer` event, containing the new context ID and Type.\r\n * \r\n * The default minimum and maximum number of players in one matched thread are 2 and 20 respectively,\r\n * depending on how many players are trying to get matched around the same time.\r\n * \r\n * The values can be changed in `fbapp-config.json`. See the Bundle Config documentation for documentation about `fbapp-config.json`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#matchPlayer\r\n * @since 3.13.0\r\n * \r\n * @param {string} [matchTag] - Optional extra information about the player used to group them with similar players. Players will only be grouped with other players with exactly the same tag. The tag must only include letters, numbers, and underscores and be 100 characters or less in length.\r\n * @param {boolean} [switchImmediately=false] - Optional extra parameter that specifies whether the player should be immediately switched to the new context when a match is found. By default this will be false which will mean the player needs explicitly press play after being matched to switch to the new context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n matchPlayer: function (matchTag, switchImmediately)\r\n {\r\n if (matchTag === undefined) { matchTag = null; }\r\n if (switchImmediately === undefined) { switchImmediately = false; }\r\n\r\n if (!this.checkAPI('matchPlayerAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function ()\r\n {\r\n _this.getID();\r\n _this.getType();\r\n\r\n _this.emit('matchplayer', _this.contextID, _this.contextType);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetch a specific leaderboard belonging to this Instant Game.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getleaderboard` event will be emitted along with a Leaderboard object instance.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - The name of the leaderboard. Each leaderboard for an Instant Game must have its own distinct name.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getLeaderboard: function (name)\r\n {\r\n if (!this.checkAPI('getLeaderboardAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.getLeaderboardAsync(name).then(function (data)\r\n {\r\n var leaderboard = new Leaderboard(_this, data);\r\n\r\n _this.leaderboards[name] = leaderboard;\r\n\r\n _this.emit('getleaderboard', leaderboard);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the Facebook API and then destroys this plugin.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#destroy\r\n * @since 3.13.0\r\n */\r\n destroy: function ()\r\n {\r\n FBInstant.quit();\r\n\r\n this.data.destroy();\r\n\r\n this.removeAllListeners();\r\n\r\n this.catalog = [];\r\n this.purchases = [];\r\n this.leaderboards = [];\r\n this.ads = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FacebookInstantGamesPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js?")},"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar LeaderboardScore = __webpack_require__(/*! ./LeaderboardScore */ \"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js\");\r\n\r\n/**\r\n * @classdesc\r\n * This class represents one single Leaderboard that belongs to a Facebook Instant Game.\r\n * \r\n * You do not need to instantiate this class directly, it will be created when you use the\r\n * `getLeaderboard()` method of the main plugin.\r\n *\r\n * @class FacebookInstantGamesLeaderboard\r\n * @memberOf Phaser\r\n * @constructor\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.FacebookInstantGamesPlugin} plugin - A reference to the Facebook Instant Games Plugin.\r\n * @param {any} data - An Instant Game leaderboard instance.\r\n */\r\nvar Leaderboard = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Leaderboard (plugin, data)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#plugin\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * An Instant Game leaderboard instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#ref\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.ref = data;\r\n\r\n /**\r\n * The name of the leaderboard.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#name\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.name = data.getName();\r\n\r\n /**\r\n * The ID of the context that the leaderboard is associated with, or null if the leaderboard is not tied to a particular context.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = data.getContextID();\r\n\r\n /**\r\n * The total number of player entries in the leaderboard.\r\n * This value defaults to zero. Populate it via the `getEntryCount()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#entryCount\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n this.entryCount = 0;\r\n\r\n /**\r\n * The players score object.\r\n * This value defaults to `null`. Populate it via the `getPlayerScore()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#playerScore\r\n * @type {LeaderboardScore}\r\n * @since 3.13.0\r\n */\r\n this.playerScore = null;\r\n\r\n /**\r\n * The scores in the Leaderboard from the currently requested range.\r\n * This value defaults to an empty array. Populate it via the `getScores()` method.\r\n * The contents of this array are reset each time `getScores()` is called.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#scores\r\n * @type {LeaderboardScore[]}\r\n * @since 3.13.0\r\n */\r\n this.scores = [];\r\n\r\n this.getEntryCount();\r\n },\r\n\r\n /**\r\n * Fetches the total number of player entries in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getentrycount` event along with the count and name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getEntryCount\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getEntryCount: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getEntryCountAsync().then(function (count)\r\n {\r\n _this.entryCount = count;\r\n\r\n _this.emit('getentrycount', count, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the player's score. If the player has an existing score, the old score will only be replaced if the new score is better than it.\r\n * NOTE: If the leaderboard is associated with a specific context, the game must be in that context to set a score for the player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `setscore` event along with the LeaderboardScore object and the name of the Leaderboard.\r\n * \r\n * If the save fails the event will send `null` as the score value.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#setScore\r\n * @since 3.13.0\r\n * \r\n * @param {integer} score - The new score for the player. Must be a 64-bit integer number.\r\n * @param {(string|any)} [data] - Metadata to associate with the stored score. Must be less than 2KB in size. If an object is given it will be passed to `JSON.stringify`.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n setScore: function (score, data)\r\n {\r\n if (data === undefined) { data = ''; }\r\n\r\n if (typeof data === 'object')\r\n {\r\n data = JSON.stringify(data);\r\n }\r\n\r\n var _this = this;\r\n\r\n this.ref.setScoreAsync(score, data).then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('setscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('setscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the players leaderboard entry and stores it in the `playerScore` property.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getplayerscore` event along with the score and the name of the Leaderboard.\r\n * \r\n * If the player has not yet saved a score, the event will send `null` as the score value, and `playerScore` will be set to `null` as well.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getPlayerScore\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getPlayerScore: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getPlayerEntryAsync().then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('getplayerscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('getplayerscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, ordered by score ranking in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getScores\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getEntriesAsync(count, offset).then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, based on the current player's connected players (including the current player), ordered by local rank within the set of connected players.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getconnectedscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getConnectedScores\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getConnectedScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getConnectedPlayerEntriesAsync().then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getconnectedscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Leaderboard;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js?")},"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} LeaderboardScore\r\n *\r\n * @property {integer} score - An integer score value.\r\n * @property {string} scoreFormatted - The score value, formatted with the score format associated with the leaderboard.\r\n * @property {integer} timestamp - The Unix timestamp of when the leaderboard entry was last updated.\r\n * @property {integer} rank - The entry's leaderboard ranking.\r\n * @property {string} data - The developer-specified payload associated with the score, or null if one was not set.\r\n * @property {string} playerName - The player's localized display name.\r\n * @property {string} playerPhotoURL - A url to the player's public profile photo.\r\n * @property {string} playerID - The game's unique identifier for the player.\r\n */\r\n\r\nvar LeaderboardScore = function (entry)\r\n{\r\n return {\r\n score: entry.getScore(),\r\n scoreFormatted: entry.getFormattedScore(),\r\n timestamp: entry.getTimestamp(),\r\n rank: entry.getRank(),\r\n data: entry.getExtraData(),\r\n playerName: entry.getPlayer().getName(),\r\n playerPhotoURL: entry.getPlayer().getPhoto(),\r\n playerID: entry.getPlayer().getID()\r\n };\r\n};\r\n\r\nmodule.exports = LeaderboardScore;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js?")},"./node_modules/phaser/plugins/fbinstant/src/Product.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Product\r\n *\r\n * @property {string} [title] - The title of the product.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [description] - The product description.\r\n * @property {string} [imageURI] - A link to the product's associated image.\r\n * @property {string} [price] - The price of the product.\r\n * @property {string} [priceCurrencyCode] - The currency code for the product.\r\n */\r\n\r\nvar Product = function (data)\r\n{\r\n return {\r\n title: GetFastValue(data, 'title', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n description: GetFastValue(data, 'description', ''),\r\n imageURI: GetFastValue(data, 'imageURI', ''),\r\n price: GetFastValue(data, 'price', ''),\r\n priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '')\r\n };\r\n};\r\n\r\nmodule.exports = Product;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Product.js?")},"./node_modules/phaser/plugins/fbinstant/src/Purchase.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Purchase\r\n *\r\n * @property {string} [developerPayload] - A developer-specified string, provided during the purchase of the product.\r\n * @property {string} [paymentID] - The identifier for the purchase transaction.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [purchaseTime] - Unix timestamp of when the purchase occurred.\r\n * @property {string} [purchaseToken] - A token representing the purchase that may be used to consume the purchase.\r\n * @property {string} [signedRequest] - Server-signed encoding of the purchase request.\r\n */\r\n\r\nvar Purchase = function (data)\r\n{\r\n return {\r\n developerPayload: GetFastValue(data, 'developerPayload', ''),\r\n paymentID: GetFastValue(data, 'paymentID', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n purchaseTime: GetFastValue(data, 'purchaseTime', ''),\r\n purchaseToken: GetFastValue(data, 'purchaseToken', ''),\r\n signedRequest: GetFastValue(data, 'signedRequest', '')\r\n };\r\n};\r\n\r\nmodule.exports = Purchase;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Purchase.js?")},"./node_modules/phaser/src/actions/Angle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `angle` property,\r\n * and then adds the given value to each of their `angle` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Angle(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Angle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `angle` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Angle = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'angle', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Angle.js?")},"./node_modules/phaser/src/actions/Call.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and passes each of them to the given callback.\r\n *\r\n * @function Phaser.Actions.Call\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.\r\n * @param {*} context - The scope in which the callback will be invoked.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that was passed to this Action.\r\n */\r\nvar Call = function (items, callback, context)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n callback.call(context, item);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Call;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Call.js?")},"./node_modules/phaser/src/actions/GetFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the first element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetFirst(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetFirst\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The first object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetFirst = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetFirst.js?")},"./node_modules/phaser/src/actions/GetLast.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the last element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetLast(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetLast\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The last object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetLast = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetLast;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetLast.js?")},"./node_modules/phaser/src/actions/GridAlign.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AlignIn = __webpack_require__(/*! ../display/align/in/QuickSet */ \"./node_modules/phaser/src/display/align/in/QuickSet.js\");\r\nvar CONST = __webpack_require__(/*! ../display/align/const */ \"./node_modules/phaser/src/display/align/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Zone = __webpack_require__(/*! ../gameobjects/zone/Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\nvar tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1);\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then aligns them based on the grid configuration given to this action.\r\n *\r\n * @function Phaser.Actions.GridAlign\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.GridAlignConfig} options - The GridAlign Configuration object.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar GridAlign = function (items, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var width = GetFastValue(options, 'width', -1);\r\n var height = GetFastValue(options, 'height', -1);\r\n var cellWidth = GetFastValue(options, 'cellWidth', 1);\r\n var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);\r\n var position = GetFastValue(options, 'position', CONST.TOP_LEFT);\r\n var x = GetFastValue(options, 'x', 0);\r\n var y = GetFastValue(options, 'y', 0);\r\n\r\n var cx = 0;\r\n var cy = 0;\r\n var w = (width * cellWidth);\r\n var h = (height * cellHeight);\r\n\r\n tempZone.setPosition(x, y);\r\n tempZone.setSize(cellWidth, cellHeight);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n AlignIn(items[i], tempZone, position);\r\n\r\n if (width === -1)\r\n {\r\n // We keep laying them out horizontally until we've done them all\r\n cy += cellHeight;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n cy = 0;\r\n tempZone.x += cellWidth;\r\n tempZone.y = y;\r\n }\r\n }\r\n else if (height === -1)\r\n {\r\n // We keep laying them out vertically until we've done them all\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n }\r\n }\r\n else\r\n {\r\n // We keep laying them out until we hit the column limit\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n cy += cellHeight;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n // We've hit the column limit, so return, even if there are items left\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = GridAlign;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GridAlign.js?")},"./node_modules/phaser/src/actions/IncAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `alpha` property,\r\n * and then adds the given value to each of their `alpha` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `alpha` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncAlpha.js?")},"./node_modules/phaser/src/actions/IncX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `x` property,\r\n * and then adds the given value to each of their `x` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `x` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncX.js?")},"./node_modules/phaser/src/actions/IncXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.IncXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to be added to the `x` property.\r\n * @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueInc(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = IncXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncXY.js?")},"./node_modules/phaser/src/actions/IncY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `y` property,\r\n * and then adds the given value to each of their `y` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `y` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncY.js?")},"./node_modules/phaser/src/actions/PlaceOnCircle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnCircle = function (items, circle, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = circle.x + (circle.radius * Math.cos(angle));\r\n items[i].y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnCircle.js?")},"./node_modules/phaser/src/actions/PlaceOnEllipse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of an Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnEllipse = function (items, ellipse, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n var a = ellipse.width / 2;\r\n var b = ellipse.height / 2;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = ellipse.x + a * Math.cos(angle);\r\n items[i].y = ellipse.y + b * Math.sin(angle);\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnEllipse.js?")},"./node_modules/phaser/src/actions/PlaceOnLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoints = __webpack_require__(/*! ../geom/line/GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\n\r\n/**\r\n * Positions an array of Game Objects on evenly spaced points of a Line.\r\n *\r\n * @function Phaser.Actions.PlaceOnLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnLine = function (items, line)\r\n{\r\n var points = GetPoints(line, items.length);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = points[i];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnLine.js?')},"./node_modules/phaser/src/actions/PlaceOnRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MarchingAnts = __webpack_require__(/*! ../geom/rectangle/MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nvar RotateLeft = __webpack_require__(/*! ../utils/array/RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js");\r\nvar RotateRight = __webpack_require__(/*! ../utils/array/RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.\r\n * \r\n * Placement starts from the top-left of the rectangle, and proceeds in a clockwise direction.\r\n * If the `shift` parameter is given you can offset where placement begins.\r\n *\r\n * @function Phaser.Actions.PlaceOnRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects on.\r\n * @param {integer} [shift=1] - An optional positional offset.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnRectangle = function (items, rect, shift)\r\n{\r\n if (shift === undefined) { shift = 0; }\r\n\r\n var points = MarchingAnts(rect, false, items.length);\r\n\r\n if (shift > 0)\r\n {\r\n RotateLeft(points, shift);\r\n }\r\n else if (shift < 0)\r\n {\r\n RotateRight(points, Math.abs(shift));\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = points[i].x;\r\n items[i].y = points[i].y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnRectangle.js?')},"./node_modules/phaser/src/actions/PlaceOnTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BresenhamPoints = __webpack_require__(/*! ../geom/line/BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects on.\r\n * @param {number} [stepRate=1] - An optional step rate, to increase or decrease the packing of the Game Objects on the lines.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnTriangle = function (items, triangle, stepRate)\r\n{\r\n var p1 = BresenhamPoints({ x1: triangle.x1, y1: triangle.y1, x2: triangle.x2, y2: triangle.y2 }, stepRate);\r\n var p2 = BresenhamPoints({ x1: triangle.x2, y1: triangle.y2, x2: triangle.x3, y2: triangle.y3 }, stepRate);\r\n var p3 = BresenhamPoints({ x1: triangle.x3, y1: triangle.y3, x2: triangle.x1, y2: triangle.y1 }, stepRate);\r\n\r\n // Remove overlaps\r\n p1.pop();\r\n p2.pop();\r\n p3.pop();\r\n\r\n p1 = p1.concat(p2, p3);\r\n\r\n var step = p1.length / items.length;\r\n var p = 0;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = p1[Math.floor(p)];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n\r\n p += step;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnTriangle.js?')},"./node_modules/phaser/src/actions/PlayAnimation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Play an animation with the given key, starting at the given startFrame on all Game Objects in items.\r\n *\r\n * @function Phaser.Actions.PlayAnimation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} key - The name of the animation to play.\r\n * @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlayAnimation = function (items, key, startFrame)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].anims.play(key, startFrame);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlayAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlayAnimation.js?")},"./node_modules/phaser/src/actions/PropertyValueInc.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then adds the given value to it.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueInc\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to be added to the property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueInc = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueInc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueInc.js?")},"./node_modules/phaser/src/actions/PropertyValueSet.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueSet\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueSet = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueSet.js?")},"./node_modules/phaser/src/actions/RandomCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/circle/Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomCircle = function (items, circle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(circle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomCircle.js?')},"./node_modules/phaser/src/actions/RandomEllipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/ellipse/Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomEllipse = function (items, ellipse)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(ellipse, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomEllipse.js?')},"./node_modules/phaser/src/actions/RandomLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/line/Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations on the Line.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Line` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects randomly on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomLine = function (items, line)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(line, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomLine.js?')},"./node_modules/phaser/src/actions/RandomRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/rectangle/Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Rectangle.\r\n *\r\n * @function Phaser.Actions.RandomRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomRectangle = function (items, rect)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(rect, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomRectangle.js?')},"./node_modules/phaser/src/actions/RandomTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/triangle/Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomTriangle = function (items, triangle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(triangle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomTriangle.js?')},"./node_modules/phaser/src/actions/Rotate.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `rotation` property,\r\n * and then adds the given value to each of their `rotation` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Rotate(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `rotation` property (in radians).\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Rotate = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Rotate.js?")},"./node_modules/phaser/src/actions/RotateAround.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Rotates each item around the given point by the given angle.\r\n *\r\n * @function Phaser.Actions.RotateAround\r\n * @since 3.0.0\r\n * @see Phaser.Math.RotateAroundDistance\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAround = function (items, point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n RotateAroundDistance(item, x, y, angle, Math.max(1, DistanceBetween(item.x, item.y, x, y)));\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAround.js?')},"./node_modules/phaser/src/actions/RotateAroundDistance.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathRotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\n\r\n/**\r\n * Rotates an array of Game Objects around a point by the given angle and distance.\r\n *\r\n * @function Phaser.Actions.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n * @param {number} distance - The distance from the point of rotation in pixels.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAroundDistance = function (items, point, angle, distance)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n // There\'s nothing to do\r\n if (distance === 0)\r\n {\r\n return items;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n MathRotateAroundDistance(items[i], x, y, angle, distance);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAroundDistance.js?')},"./node_modules/phaser/src/actions/ScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleX` property,\r\n * and then adds the given value to each of their `scaleX` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleX` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleX.js?")},"./node_modules/phaser/src/actions/ScaleXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.ScaleXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to be added to the `scaleX` property.\r\n * @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueInc(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleXY.js?")},"./node_modules/phaser/src/actions/ScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleY` property,\r\n * and then adds the given value to each of their `scaleY` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleY` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleY.js?")},"./node_modules/phaser/src/actions/SetAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `alpha`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetAlpha.js?")},"./node_modules/phaser/src/actions/SetBlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `blendMode`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetBlendMode(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetBlendMode\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetBlendMode = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'blendMode', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetBlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetBlendMode.js?")},"./node_modules/phaser/src/actions/SetDepth.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `depth`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetDepth(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetDepth\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetDepth = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'depth', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetDepth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetDepth.js?")},"./node_modules/phaser/src/actions/SetHitArea.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes all provided Game Objects to the Input Manager to enable them for input with identical areas and callbacks.\r\n * \r\n * @see {@link Phaser.GameObjects.GameObject#setInteractive}\r\n *\r\n * @function Phaser.Actions.SetHitArea\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {*} hitArea - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetHitArea = function (items, hitArea, hitAreaCallback)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setInteractive(hitArea, hitAreaCallback);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetHitArea;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetHitArea.js?")},"./node_modules/phaser/src/actions/SetOrigin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetOrigin\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} originX - The amount to set the `originX` property to.\r\n * @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.\r\n * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetOrigin = function (items, originX, originY, stepX, stepY, index, direction)\r\n{\r\n if (originY === undefined || originY === null) { originY = originX; }\r\n\r\n PropertyValueSet(items, 'originX', originX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'originY', originY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetOrigin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetOrigin.js?")},"./node_modules/phaser/src/actions/SetRotation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `rotation`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetRotation(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetRotation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetRotation = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetRotation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetRotation.js?")},"./node_modules/phaser/src/actions/SetScale.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetScale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to set the `scaleX` property to.\r\n * @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueSet(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScale.js?")},"./node_modules/phaser/src/actions/SetScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleX`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleX.js?")},"./node_modules/phaser/src/actions/SetScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleY`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleY.js?")},"./node_modules/phaser/src/actions/SetTint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public method setTint() and then updates it to the given value(s). You can specify tint color per corner or provide only one color value for `topLeft` parameter, in which case whole item will be tinted with that color.\r\n *\r\n * @function Phaser.Actions.SetTint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} topLeft - The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.\r\n * @param {number} [topRight] - The tint to be applied to top-right corner of item.\r\n * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item.\r\n * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetTint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetTint.js?")},"./node_modules/phaser/src/actions/SetVisible.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `visible`\r\n * and then sets it to the given value.\r\n *\r\n * To use this with a Group: `SetVisible(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {boolean} value - The value to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetVisible = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'visible', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetVisible.js?")},"./node_modules/phaser/src/actions/SetX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `x`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetX.js?")},"./node_modules/phaser/src/actions/SetXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `x` and `y`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to set the `x` property to.\r\n * @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueSet(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetXY.js?")},"./node_modules/phaser/src/actions/SetY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `y`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetY.js?")},"./node_modules/phaser/src/actions/ShiftPosition.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Iterate through the items array changing the position of each element to be that of the element that came before\r\n * it in the array (or after it if direction = 1)\r\n * \r\n * The first items position is set to x/y.\r\n * \r\n * The final x/y coords are returned\r\n *\r\n * @function Phaser.Actions.ShiftPosition\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} x - The x coordinate to place the first item in the array at.\r\n * @param {number} y - The y coordinate to place the first item in the array at.\r\n * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An optional objec to store the final objects position in.\r\n *\r\n * @return {Phaser.Math.Vector2} The output vector.\r\n */\r\nvar ShiftPosition = function (items, x, y, direction, output)\r\n{\r\n if (direction === undefined) { direction = 0; }\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var px;\r\n var py;\r\n\r\n if (items.length > 1)\r\n {\r\n var i;\r\n var cx;\r\n var cy;\r\n var cur;\r\n\r\n if (direction === 0)\r\n {\r\n // Bottom to Top\r\n\r\n var len = items.length - 1;\r\n\r\n px = items[len].x;\r\n py = items[len].y;\r\n\r\n for (i = len - 1; i >= 0; i--)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[len].x = x;\r\n items[len].y = y;\r\n }\r\n else\r\n {\r\n // Top to Bottom\r\n\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n for (i = 1; i < items.length; i++)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n }\r\n else\r\n {\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n\r\n // Return the final set of coordinates as they\'re effectively lost from the shift and may be needed\r\n\r\n output.x = px;\r\n output.y = py;\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ShiftPosition;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ShiftPosition.js?')},"./node_modules/phaser/src/actions/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayShuffle = __webpack_require__(/*! ../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the array in place. The shuffled array is both modified and returned.\r\n *\r\n * @function Phaser.Actions.Shuffle\r\n * @since 3.0.0\r\n * @see Phaser.Utils.Array.Shuffle\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar Shuffle = function (items)\r\n{\r\n return ArrayShuffle(items);\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Shuffle.js?')},"./node_modules/phaser/src/actions/SmoothStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmoothStep = __webpack_require__(/*! ../math/SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js");\r\n\r\n/**\r\n * Smoothstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmoothStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmoothStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmoothStep.js?')},"./node_modules/phaser/src/actions/SmootherStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmootherStep = __webpack_require__(/*! ../math/SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js");\r\n\r\n/**\r\n * Smootherstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmootherStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmootherStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmootherStep.js?')},"./node_modules/phaser/src/actions/Spread.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the\r\n * calculated spread value.\r\n * \r\n * The spread value is derived from the given `min` and `max` values and the total number of items in the array.\r\n * \r\n * For example, to cause an array of Sprites to change in alpha from 0 to 1 you could call:\r\n * \r\n * ```javascript\r\n * Phaser.Actions.Spread(itemsArray, 'alpha', 0, 1);\r\n * ```\r\n *\r\n * @function Phaser.Actions.Spread\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to spread.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that were passed to this Action.\r\n */\r\nvar Spread = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += i * step + min;\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = i * step + min;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Spread;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Spread.js?")},"./node_modules/phaser/src/actions/ToggleVisible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and toggles the visibility of each one.\r\n * Those previously `visible = false` will become `visible = true`, and vice versa.\r\n *\r\n * @function Phaser.Actions.ToggleVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar ToggleVisible = function (items)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].visible = !items[i].visible;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = ToggleVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ToggleVisible.js?")},"./node_modules/phaser/src/actions/WrapInRectangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author samme \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * Wrap each item's coordinates within a rectangle's area.\r\n *\r\n * @function Phaser.Actions.WrapInRectangle\r\n * @since 3.0.0\r\n * @see Phaser.Math.Wrap\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n * @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar WrapInRectangle = function (items, rect, padding)\r\n{\r\n if (padding === undefined)\r\n {\r\n padding = 0;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n item.x = Wrap(item.x, rect.left - padding, rect.right + padding);\r\n item.y = Wrap(item.y, rect.top - padding, rect.bottom + padding);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = WrapInRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/WrapInRectangle.js?")},"./node_modules/phaser/src/actions/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Actions\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Angle: __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/actions/Angle.js"),\r\n Call: __webpack_require__(/*! ./Call */ "./node_modules/phaser/src/actions/Call.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/actions/GetFirst.js"),\r\n GetLast: __webpack_require__(/*! ./GetLast */ "./node_modules/phaser/src/actions/GetLast.js"),\r\n GridAlign: __webpack_require__(/*! ./GridAlign */ "./node_modules/phaser/src/actions/GridAlign.js"),\r\n IncAlpha: __webpack_require__(/*! ./IncAlpha */ "./node_modules/phaser/src/actions/IncAlpha.js"),\r\n IncX: __webpack_require__(/*! ./IncX */ "./node_modules/phaser/src/actions/IncX.js"),\r\n IncXY: __webpack_require__(/*! ./IncXY */ "./node_modules/phaser/src/actions/IncXY.js"),\r\n IncY: __webpack_require__(/*! ./IncY */ "./node_modules/phaser/src/actions/IncY.js"),\r\n PlaceOnCircle: __webpack_require__(/*! ./PlaceOnCircle */ "./node_modules/phaser/src/actions/PlaceOnCircle.js"),\r\n PlaceOnEllipse: __webpack_require__(/*! ./PlaceOnEllipse */ "./node_modules/phaser/src/actions/PlaceOnEllipse.js"),\r\n PlaceOnLine: __webpack_require__(/*! ./PlaceOnLine */ "./node_modules/phaser/src/actions/PlaceOnLine.js"),\r\n PlaceOnRectangle: __webpack_require__(/*! ./PlaceOnRectangle */ "./node_modules/phaser/src/actions/PlaceOnRectangle.js"),\r\n PlaceOnTriangle: __webpack_require__(/*! ./PlaceOnTriangle */ "./node_modules/phaser/src/actions/PlaceOnTriangle.js"),\r\n PlayAnimation: __webpack_require__(/*! ./PlayAnimation */ "./node_modules/phaser/src/actions/PlayAnimation.js"),\r\n PropertyValueInc: __webpack_require__(/*! ./PropertyValueInc */ "./node_modules/phaser/src/actions/PropertyValueInc.js"),\r\n PropertyValueSet: __webpack_require__(/*! ./PropertyValueSet */ "./node_modules/phaser/src/actions/PropertyValueSet.js"),\r\n RandomCircle: __webpack_require__(/*! ./RandomCircle */ "./node_modules/phaser/src/actions/RandomCircle.js"),\r\n RandomEllipse: __webpack_require__(/*! ./RandomEllipse */ "./node_modules/phaser/src/actions/RandomEllipse.js"),\r\n RandomLine: __webpack_require__(/*! ./RandomLine */ "./node_modules/phaser/src/actions/RandomLine.js"),\r\n RandomRectangle: __webpack_require__(/*! ./RandomRectangle */ "./node_modules/phaser/src/actions/RandomRectangle.js"),\r\n RandomTriangle: __webpack_require__(/*! ./RandomTriangle */ "./node_modules/phaser/src/actions/RandomTriangle.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/actions/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/actions/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/actions/RotateAroundDistance.js"),\r\n ScaleX: __webpack_require__(/*! ./ScaleX */ "./node_modules/phaser/src/actions/ScaleX.js"),\r\n ScaleXY: __webpack_require__(/*! ./ScaleXY */ "./node_modules/phaser/src/actions/ScaleXY.js"),\r\n ScaleY: __webpack_require__(/*! ./ScaleY */ "./node_modules/phaser/src/actions/ScaleY.js"),\r\n SetAlpha: __webpack_require__(/*! ./SetAlpha */ "./node_modules/phaser/src/actions/SetAlpha.js"),\r\n SetBlendMode: __webpack_require__(/*! ./SetBlendMode */ "./node_modules/phaser/src/actions/SetBlendMode.js"),\r\n SetDepth: __webpack_require__(/*! ./SetDepth */ "./node_modules/phaser/src/actions/SetDepth.js"),\r\n SetHitArea: __webpack_require__(/*! ./SetHitArea */ "./node_modules/phaser/src/actions/SetHitArea.js"),\r\n SetOrigin: __webpack_require__(/*! ./SetOrigin */ "./node_modules/phaser/src/actions/SetOrigin.js"),\r\n SetRotation: __webpack_require__(/*! ./SetRotation */ "./node_modules/phaser/src/actions/SetRotation.js"),\r\n SetScale: __webpack_require__(/*! ./SetScale */ "./node_modules/phaser/src/actions/SetScale.js"),\r\n SetScaleX: __webpack_require__(/*! ./SetScaleX */ "./node_modules/phaser/src/actions/SetScaleX.js"),\r\n SetScaleY: __webpack_require__(/*! ./SetScaleY */ "./node_modules/phaser/src/actions/SetScaleY.js"),\r\n SetTint: __webpack_require__(/*! ./SetTint */ "./node_modules/phaser/src/actions/SetTint.js"),\r\n SetVisible: __webpack_require__(/*! ./SetVisible */ "./node_modules/phaser/src/actions/SetVisible.js"),\r\n SetX: __webpack_require__(/*! ./SetX */ "./node_modules/phaser/src/actions/SetX.js"),\r\n SetXY: __webpack_require__(/*! ./SetXY */ "./node_modules/phaser/src/actions/SetXY.js"),\r\n SetY: __webpack_require__(/*! ./SetY */ "./node_modules/phaser/src/actions/SetY.js"),\r\n ShiftPosition: __webpack_require__(/*! ./ShiftPosition */ "./node_modules/phaser/src/actions/ShiftPosition.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/actions/Shuffle.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/actions/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/actions/SmoothStep.js"),\r\n Spread: __webpack_require__(/*! ./Spread */ "./node_modules/phaser/src/actions/Spread.js"),\r\n ToggleVisible: __webpack_require__(/*! ./ToggleVisible */ "./node_modules/phaser/src/actions/ToggleVisible.js"),\r\n WrapInRectangle: __webpack_require__(/*! ./WrapInRectangle */ "./node_modules/phaser/src/actions/WrapInRectangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/index.js?')},"./node_modules/phaser/src/animations/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar FindClosestInSorted = __webpack_require__(/*! ../utils/array/FindClosestInSorted */ \"./node_modules/phaser/src/utils/array/FindClosestInSorted.js\");\r\nvar Frame = __webpack_require__(/*! ./AnimationFrame */ \"./node_modules/phaser/src/animations/AnimationFrame.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame based Animation.\r\n *\r\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\r\n *\r\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\r\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\r\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.Animations\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\r\n * @param {string} key - The unique identifying string for this animation.\r\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\r\n */\r\nvar Animation = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Animation (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.Animations.Animation#manager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique identifying string for this animation.\r\n *\r\n * @name Phaser.Animations.Animation#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * A frame based animation (as opposed to a bone based animation)\r\n *\r\n * @name Phaser.Animations.Animation#type\r\n * @type {string}\r\n * @default frame\r\n * @since 3.0.0\r\n */\r\n this.type = 'frame';\r\n\r\n /**\r\n * Extract all the frame data into the frames array.\r\n *\r\n * @name Phaser.Animations.Animation#frames\r\n * @type {Phaser.Animations.AnimationFrame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = this.getFrames(\r\n manager.textureManager,\r\n GetValue(config, 'frames', []),\r\n GetValue(config, 'defaultTextureKey', null)\r\n );\r\n\r\n /**\r\n * The frame rate of playback in frames per second (default 24 if duration is null)\r\n *\r\n * @name Phaser.Animations.Animation#frameRate\r\n * @type {integer}\r\n * @default 24\r\n * @since 3.0.0\r\n */\r\n this.frameRate = GetValue(config, 'frameRate', null);\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.Animations.Animation#duration\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.duration = GetValue(config, 'duration', null);\r\n\r\n if (this.duration === null && this.frameRate === null)\r\n {\r\n // No duration or frameRate given, use default frameRate of 24fps\r\n this.frameRate = 24;\r\n this.duration = (this.frameRate / this.frames.length) * 1000;\r\n }\r\n else if (this.duration && this.frameRate === null)\r\n {\r\n // Duration given but no frameRate, so set the frameRate based on duration\r\n // I.e. 12 frames in the animation, duration = 4000 ms\r\n // So frameRate is 12 / (4000 / 1000) = 3 fps\r\n this.frameRate = this.frames.length / (this.duration / 1000);\r\n }\r\n else\r\n {\r\n // frameRate given, derive duration from it (even if duration also specified)\r\n // I.e. 15 frames in the animation, frameRate = 30 fps\r\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\r\n this.duration = (this.frames.length / this.frameRate) * 1000;\r\n }\r\n\r\n /**\r\n * How many ms per frame, not including frame specific modifiers.\r\n *\r\n * @name Phaser.Animations.Animation#msPerFrame\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 1000 / this.frameRate;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.Animations.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\r\n\r\n /**\r\n * The delay in ms before the playback will begin.\r\n *\r\n * @name Phaser.Animations.Animation#delay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = GetValue(config, 'delay', 0);\r\n\r\n /**\r\n * Number of times to repeat the animation. Set to -1 to repeat forever.\r\n *\r\n * @name Phaser.Animations.Animation#repeat\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeat = GetValue(config, 'repeat', 0);\r\n\r\n /**\r\n * The delay in ms before the a repeat play starts.\r\n *\r\n * @name Phaser.Animations.Animation#repeatDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\r\n\r\n /**\r\n * Should the animation yoyo (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.Animations.Animation#yoyo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.yoyo = GetValue(config, 'yoyo', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\r\n *\r\n * @name Phaser.Animations.Animation#showOnStart\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.showOnStart = GetValue(config, 'showOnStart', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\r\n *\r\n * @name Phaser.Animations.Animation#hideOnComplete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\r\n\r\n /**\r\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\r\n *\r\n * @name Phaser.Animations.Animation#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.on(Events.RESUME_ALL, this.resume, this);\r\n },\r\n\r\n /**\r\n * Add frames to the end of the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrame: function (config)\r\n {\r\n return this.addFrameAt(this.frames.length, config);\r\n },\r\n\r\n /**\r\n * Add frame/s into the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to insert the frame at within the animation.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrameAt: function (index, config)\r\n {\r\n var newFrames = this.getFrames(this.manager.textureManager, config);\r\n\r\n if (newFrames.length > 0)\r\n {\r\n if (index === 0)\r\n {\r\n this.frames = newFrames.concat(this.frames);\r\n }\r\n else if (index === this.frames.length)\r\n {\r\n this.frames = this.frames.concat(newFrames);\r\n }\r\n else\r\n {\r\n var pre = this.frames.slice(0, index);\r\n var post = this.frames.slice(index);\r\n\r\n this.frames = pre.concat(newFrames, post);\r\n }\r\n\r\n this.updateFrameSequence();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the given frame index is valid.\r\n *\r\n * @method Phaser.Animations.Animation#checkFrame\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to be checked.\r\n *\r\n * @return {boolean} `true` if the index is valid, otherwise `false`.\r\n */\r\n checkFrame: function (index)\r\n {\r\n return (index >= 0 && index < this.frames.length);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#completeAnimation\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n completeAnimation: function (component)\r\n {\r\n if (this.hideOnComplete)\r\n {\r\n component.parent.visible = false;\r\n }\r\n\r\n component.stop();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFirstTick\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n * @param {boolean} [includeDelay=true] - [description]\r\n */\r\n getFirstTick: function (component, includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = true; }\r\n\r\n // When is the first update due?\r\n component.accumulator = 0;\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n\r\n if (includeDelay)\r\n {\r\n component.nextTick += component._delay;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the AnimationFrame at the provided index\r\n *\r\n * @method Phaser.Animations.Animation#getFrameAt\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\r\n */\r\n getFrameAt: function (index)\r\n {\r\n return this.frames[index];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFrames\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - [description]\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description]\r\n * @param {string} [defaultTextureKey] - [description]\r\n *\r\n * @return {Phaser.Animations.AnimationFrame[]} [description]\r\n */\r\n getFrames: function (textureManager, frames, defaultTextureKey)\r\n {\r\n var out = [];\r\n var prev;\r\n var animationFrame;\r\n var index = 1;\r\n var i;\r\n var textureKey;\r\n\r\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\r\n if (typeof frames === 'string')\r\n {\r\n textureKey = frames;\r\n\r\n var texture = textureManager.get(textureKey);\r\n var frameKeys = texture.getFrameNames();\r\n\r\n frames = [];\r\n\r\n frameKeys.forEach(function (idx, value)\r\n {\r\n frames.push({ key: textureKey, frame: value });\r\n });\r\n }\r\n\r\n if (!Array.isArray(frames) || frames.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n var item = frames[i];\r\n\r\n var key = GetValue(item, 'key', defaultTextureKey);\r\n\r\n if (!key)\r\n {\r\n continue;\r\n }\r\n\r\n // Could be an integer or a string\r\n var frame = GetValue(item, 'frame', 0);\r\n\r\n // The actual texture frame\r\n var textureFrame = textureManager.getFrame(key, frame);\r\n\r\n animationFrame = new Frame(key, frame, index, textureFrame);\r\n\r\n animationFrame.duration = GetValue(item, 'duration', 0);\r\n\r\n animationFrame.isFirst = (!prev);\r\n\r\n // The previously created animationFrame\r\n if (prev)\r\n {\r\n prev.nextFrame = animationFrame;\r\n\r\n animationFrame.prevFrame = prev;\r\n }\r\n\r\n out.push(animationFrame);\r\n\r\n prev = animationFrame;\r\n\r\n index++;\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n animationFrame.isLast = true;\r\n\r\n // Link them end-to-end, so they loop\r\n animationFrame.nextFrame = out[0];\r\n\r\n out[0].prevFrame = animationFrame;\r\n\r\n // Generate the progress data\r\n\r\n var slice = 1 / (out.length - 1);\r\n\r\n for (i = 0; i < out.length; i++)\r\n {\r\n out[i].progress = i * slice;\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getNextTick\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n getNextTick: function (component)\r\n {\r\n // accumulator += delta * _timeScale\r\n // after a large delta surge (perf issue for example) we need to adjust for it here\r\n\r\n // When is the next update due?\r\n component.accumulator -= component.nextTick;\r\n\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n },\r\n\r\n /**\r\n * Loads the Animation values into the Animation Component.\r\n *\r\n * @method Phaser.Animations.Animation#load\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\r\n * @param {integer} startFrame - The start frame of the animation to load.\r\n */\r\n load: function (component, startFrame)\r\n {\r\n if (startFrame >= this.frames.length)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (component.currentAnim !== this)\r\n {\r\n component.currentAnim = this;\r\n\r\n component.frameRate = this.frameRate;\r\n component.duration = this.duration;\r\n component.msPerFrame = this.msPerFrame;\r\n component.skipMissedFrames = this.skipMissedFrames;\r\n\r\n component._delay = this.delay;\r\n component._repeat = this.repeat;\r\n component._repeatDelay = this.repeatDelay;\r\n component._yoyo = this.yoyo;\r\n }\r\n\r\n var frame = this.frames[startFrame];\r\n\r\n if (startFrame === 0 && !component.forward)\r\n {\r\n frame = this.getLastFrame();\r\n }\r\n\r\n component.updateFrame(frame);\r\n },\r\n\r\n /**\r\n * Returns the frame closest to the given progress value between 0 and 1.\r\n *\r\n * @method Phaser.Animations.Animation#getFrameByProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\r\n */\r\n getFrameByProgress: function (value)\r\n {\r\n value = Clamp(value, 0, 1);\r\n\r\n return FindClosestInSorted(value, this.frames, 'progress');\r\n },\r\n\r\n /**\r\n * Advance the animation frame.\r\n *\r\n * @method Phaser.Animations.Animation#nextFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n */\r\n nextFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isLast)\r\n {\r\n // We're at the end of the animation\r\n\r\n // Yoyo? (happens before repeat)\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, false);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n // Repeat (happens before complete)\r\n\r\n if (component._reverse && component.forward)\r\n {\r\n component.forward = false;\r\n }\r\n else\r\n {\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.nextFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\r\n *\r\n * @method Phaser.Animations.Animation#handleYoyoFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\r\n */\r\n handleYoyoFrame: function (component, isReverse)\r\n {\r\n if (!isReverse) { isReverse = false; }\r\n\r\n if (component._reverse === !isReverse && component.repeatCounter > 0)\r\n {\r\n component.forward = isReverse;\r\n\r\n this.repeatAnimation(component);\r\n\r\n return;\r\n }\r\n\r\n if (component._reverse !== isReverse && component.repeatCounter === 0)\r\n {\r\n this.completeAnimation(component);\r\n\r\n return;\r\n }\r\n \r\n component.forward = isReverse;\r\n\r\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\r\n\r\n this.updateAndGetNextTick(component, frame);\r\n },\r\n\r\n /**\r\n * Returns the animation last frame.\r\n *\r\n * @method Phaser.Animations.Animation#getLastFrame\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\r\n */\r\n getLastFrame: function ()\r\n {\r\n return this.frames[this.frames.length - 1];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#previousFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n previousFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isFirst)\r\n {\r\n // We're at the start of the animation\r\n\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, true);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n if (component._reverse && !component.forward)\r\n {\r\n component.currentFrame = this.getLastFrame();\r\n this.repeatAnimation(component);\r\n }\r\n else\r\n {\r\n // Repeat (happens before complete)\r\n component.forward = true;\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.prevFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Update Frame and Wait next tick.\r\n *\r\n * @method Phaser.Animations.Animation#updateAndGetNextTick\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\r\n */\r\n updateAndGetNextTick: function (component, frame)\r\n {\r\n component.updateFrame(frame);\r\n\r\n this.getNextTick(component);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#removeFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrame: function (frame)\r\n {\r\n var index = this.frames.indexOf(frame);\r\n\r\n if (index !== -1)\r\n {\r\n this.removeFrameAt(index);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a frame from the AnimationFrame array at the provided index\r\n * and updates the animation accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrameAt: function (index)\r\n {\r\n this.frames.splice(index, 1);\r\n\r\n this.updateFrameSequence();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#repeatAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n repeatAnimation: function (component)\r\n {\r\n if (component._pendingStop === 2)\r\n {\r\n return this.completeAnimation(component);\r\n }\r\n\r\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\r\n {\r\n component.pendingRepeat = true;\r\n component.accumulator -= component.nextTick;\r\n component.nextTick += component._repeatDelay;\r\n }\r\n else\r\n {\r\n component.repeatCounter--;\r\n\r\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\r\n\r\n if (component.isPlaying)\r\n {\r\n this.getNextTick(component);\r\n\r\n component.pendingRepeat = false;\r\n\r\n var frame = component.currentFrame;\r\n var parent = component.parent;\r\n\r\n this.emit(Events.ANIMATION_REPEAT, this, frame);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture frame the animation uses for rendering.\r\n *\r\n * @method Phaser.Animations.Animation#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n setFrame: function (component)\r\n {\r\n // Work out which frame should be set next on the child, and set it\r\n if (component.forward)\r\n {\r\n this.nextFrame(component);\r\n }\r\n else\r\n {\r\n this.previousFrame(component);\r\n }\r\n },\r\n\r\n /**\r\n * Converts the animation data to JSON.\r\n *\r\n * @method Phaser.Animations.Animation#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimation} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n key: this.key,\r\n type: this.type,\r\n frames: [],\r\n frameRate: this.frameRate,\r\n duration: this.duration,\r\n skipMissedFrames: this.skipMissedFrames,\r\n delay: this.delay,\r\n repeat: this.repeat,\r\n repeatDelay: this.repeatDelay,\r\n yoyo: this.yoyo,\r\n showOnStart: this.showOnStart,\r\n hideOnComplete: this.hideOnComplete\r\n };\r\n\r\n this.frames.forEach(function (frame)\r\n {\r\n output.frames.push(frame.toJSON());\r\n });\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#updateFrameSequence\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n updateFrameSequence: function ()\r\n {\r\n var len = this.frames.length;\r\n var slice = 1 / (len - 1);\r\n\r\n var frame;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n frame = this.frames[i];\r\n\r\n frame.index = i + 1;\r\n frame.isFirst = false;\r\n frame.isLast = false;\r\n frame.progress = i * slice;\r\n\r\n if (i === 0)\r\n {\r\n frame.isFirst = true;\r\n\r\n if (len === 1)\r\n {\r\n frame.isLast = true;\r\n frame.nextFrame = frame;\r\n frame.prevFrame = frame;\r\n }\r\n else\r\n {\r\n frame.isLast = false;\r\n frame.prevFrame = this.frames[len - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n else if (i === len - 1 && len > 1)\r\n {\r\n frame.isLast = true;\r\n frame.prevFrame = this.frames[len - 2];\r\n frame.nextFrame = this.frames[0];\r\n }\r\n else if (len > 1)\r\n {\r\n frame.prevFrame = this.frames[i - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n pause: function ()\r\n {\r\n this.paused = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n resume: function ()\r\n {\r\n this.paused = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.off(Events.RESUME_ALL, this.resume, this);\r\n\r\n this.manager.remove(this.key);\r\n\r\n for (var i = 0; i < this.frames.length; i++)\r\n {\r\n this.frames[i].destroy();\r\n }\r\n\r\n this.frames = [];\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/Animation.js?")},"./node_modules/phaser/src/animations/AnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single frame in an Animation sequence.\r\n *\r\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\r\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\r\n *\r\n * AnimationFrames are generated automatically by the Animation class.\r\n *\r\n * @class AnimationFrame\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\r\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\r\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\r\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n */\r\nvar AnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function AnimationFrame (textureKey, textureFrame, index, frame)\r\n {\r\n /**\r\n * The key of the Texture this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.textureKey = textureKey;\r\n\r\n /**\r\n * The key of the Frame within the Texture that this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.textureFrame = textureFrame;\r\n\r\n /**\r\n * The index of this AnimationFrame within the Animation sequence.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * Is this the first frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isFirst\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isFirst = false;\r\n\r\n /**\r\n * Is this the last frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isLast\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isLast = false;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#prevFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.prevFrame = null;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#nextFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.nextFrame = null;\r\n\r\n /**\r\n * Additional time (in ms) that this frame should appear for during playback.\r\n * The value is added onto the msPerFrame set by the animation.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * What % through the animation does this frame come?\r\n * This value is generated when the animation is created and cached here.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#progress\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n },\r\n\r\n /**\r\n * Generates a JavaScript object suitable for converting to JSON.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n key: this.textureKey,\r\n frame: this.textureFrame,\r\n duration: this.duration\r\n };\r\n },\r\n\r\n /**\r\n * Destroys this object by removing references to external resources and callbacks.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.frame = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationFrame.js?')},"./node_modules/phaser/src/animations/AnimationManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Animation = __webpack_require__(/*! ./Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ \"./node_modules/phaser/src/structs/Map.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Pad = __webpack_require__(/*! ../utils/string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Animation Manager.\r\n *\r\n * Animations are managed by the global Animation Manager. This is a singleton class that is\r\n * responsible for creating and delivering animations and their corresponding data to all Game Objects.\r\n * Unlike plugins it is owned by the Game instance, not the Scene.\r\n *\r\n * Sprites and other Game Objects get the data they need from the AnimationManager.\r\n *\r\n * @class AnimationManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar AnimationManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function AnimationManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Animations.AnimationManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.textureManager = null;\r\n\r\n /**\r\n * The global time scale of the Animation Manager.\r\n *\r\n * This scales the time delta between two frames, thus influencing the speed of time for the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#globalTimeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.globalTimeScale = 1;\r\n\r\n /**\r\n * The Animations registered in the Animation Manager.\r\n *\r\n * This map should be modified with the {@link #add} and {@link #create} methods of the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#anims\r\n * @type {Phaser.Structs.Map.}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.anims = new CustomMap();\r\n\r\n /**\r\n * Whether the Animation Manager is paused along with all of its Animations.\r\n *\r\n * @name Phaser.Animations.AnimationManager#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * The name of this Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'AnimationManager';\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * Registers event listeners after the Game boots.\r\n *\r\n * @method Phaser.Animations.AnimationManager#boot\r\n * @listens Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.textureManager = this.game.textures;\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Animation to the Animation Manager.\r\n *\r\n * @method Phaser.Animations.AnimationManager#add\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique.\r\n * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n add: function (key, animation)\r\n {\r\n if (this.anims.has(key))\r\n {\r\n console.warn('Animation key exists: ' + key);\r\n\r\n return;\r\n }\r\n\r\n animation.key = key;\r\n\r\n this.anims.set(key, animation);\r\n\r\n this.emit(Events.ADD_ANIMATION, key, animation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the given key is already in use within the Animation Manager or not.\r\n * \r\n * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific.\r\n *\r\n * @method Phaser.Animations.AnimationManager#exists\r\n * @since 3.16.0\r\n *\r\n * @param {string} key - The key of the Animation to check.\r\n *\r\n * @return {boolean} `true` if the Animation already exists in the Animation Manager, or `false` if the key is available.\r\n */\r\n exists: function (key)\r\n {\r\n return this.anims.has(key);\r\n },\r\n\r\n /**\r\n * Creates a new Animation and adds it to the Animation Manager.\r\n * \r\n * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific.\r\n * \r\n * If an invalid key is given this method will return `false`.\r\n * \r\n * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned.\r\n * \r\n * A brand new animation is only created if the key is valid and not already in use.\r\n * \r\n * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#create\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation.\r\n *\r\n * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use.\r\n */\r\n create: function (config)\r\n {\r\n var key = config.key;\r\n\r\n var anim = false;\r\n\r\n if (key)\r\n {\r\n anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n anim = new Animation(this, key, config);\r\n\r\n this.anims.set(key, anim);\r\n \r\n this.emit(Events.ADD_ANIMATION, key, anim);\r\n }\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Loads this Animation Manager's Animations and settings from a JSON object.\r\n *\r\n * @method Phaser.Animations.AnimationManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.JSONAnimations|Phaser.Types.Animations.JSONAnimation)} data - The JSON object to parse.\r\n * @param {boolean} [clearCurrentAnimations=false] - If set to `true`, the current animations will be removed (`anims.clear()`). If set to `false` (default), the animations in `data` will be added.\r\n *\r\n * @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.\r\n */\r\n fromJSON: function (data, clearCurrentAnimations)\r\n {\r\n if (clearCurrentAnimations === undefined) { clearCurrentAnimations = false; }\r\n\r\n if (clearCurrentAnimations)\r\n {\r\n this.anims.clear();\r\n }\r\n\r\n // Do we have a String (i.e. from JSON, or an Object?)\r\n if (typeof data === 'string')\r\n {\r\n data = JSON.parse(data);\r\n }\r\n\r\n var output = [];\r\n\r\n // Array of animations, or a single animation?\r\n if (data.hasOwnProperty('anims') && Array.isArray(data.anims))\r\n {\r\n for (var i = 0; i < data.anims.length; i++)\r\n {\r\n output.push(this.create(data.anims[i]));\r\n }\r\n\r\n if (data.hasOwnProperty('globalTimeScale'))\r\n {\r\n this.globalTimeScale = data.globalTimeScale;\r\n }\r\n }\r\n else if (data.hasOwnProperty('key') && data.type === 'frame')\r\n {\r\n output.push(this.create(data));\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNames} [config] - The configuration object for the animation frame names.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNames: function (key, config)\r\n {\r\n var prefix = GetValue(config, 'prefix', '');\r\n var start = GetValue(config, 'start', 0);\r\n var end = GetValue(config, 'end', 0);\r\n var suffix = GetValue(config, 'suffix', '');\r\n var zeroPad = GetValue(config, 'zeroPad', 0);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n var diff = (start < end) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n end += diff;\r\n\r\n var i;\r\n var frame;\r\n\r\n if (!config)\r\n {\r\n // Use every frame in the atlas?\r\n frames = texture.getFrameNames();\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n else if (Array.isArray(frames))\r\n {\r\n // Have they provided their own custom frame sequence array?\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = start; i !== end; i += diff)\r\n {\r\n frame = prefix + Pad(i, zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.\r\n *\r\n * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}.\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNumbers\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNumbers} config - The configuration object for the animation frames.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNumbers: function (key, config)\r\n {\r\n var startFrame = GetValue(config, 'start', 0);\r\n var endFrame = GetValue(config, 'end', -1);\r\n var firstFrame = GetValue(config, 'first', false);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n if (firstFrame && texture.has(firstFrame))\r\n {\r\n out.push({ key: key, frame: firstFrame });\r\n }\r\n\r\n var i;\r\n\r\n // Have they provided their own custom frame sequence array?\r\n if (Array.isArray(frames))\r\n {\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n if (texture.has(frames[i]))\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // No endFrame then see if we can get it\r\n if (endFrame === -1)\r\n {\r\n endFrame = texture.frameTotal;\r\n }\r\n\r\n var diff = (startFrame < endFrame) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n endFrame += diff;\r\n\r\n for (i = startFrame; i !== endFrame; i += diff)\r\n {\r\n if (texture.has(i))\r\n {\r\n out.push({ key: key, frame: i });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Get an Animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Animation to retrieve.\r\n *\r\n * @return {Phaser.Animations.Animation} The Animation.\r\n */\r\n get: function (key)\r\n {\r\n return this.anims.get(key);\r\n },\r\n\r\n /**\r\n * Load an Animation into a Game Object's Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#load\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into.\r\n * @param {string} key - The key of the animation to load.\r\n * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it.\r\n */\r\n load: function (child, key, startFrame)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n anim.load(child, startFrame);\r\n }\r\n else\r\n {\r\n console.warn('Missing animation: ' + key);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Pause all animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#pauseAll\r\n * @fires Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n if (!this.paused)\r\n {\r\n this.paused = true;\r\n\r\n this.emit(Events.PAUSE_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Play an animation on the given Game Objects that have an Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Object.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n play: function (key, child)\r\n {\r\n if (!Array.isArray(child))\r\n {\r\n child = [ child ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < child.length; i++)\r\n {\r\n child[i].anims.play(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove an animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#remove\r\n * @fires Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to remove.\r\n *\r\n * @return {Phaser.Animations.Animation} [description]\r\n */\r\n remove: function (key)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n this.emit(Events.REMOVE_ANIMATION, key, anim);\r\n\r\n this.anims.delete(key);\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Resume all paused animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#resumeAll\r\n * @fires Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.emit(Events.RESUME_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects that have an Animation Component and then\r\n * starts the given animation playing on them, each one offset by the\r\n * `stagger` amount given to this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#staggerPlay\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Objects.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.\r\n * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n staggerPlay: function (key, children, stagger)\r\n {\r\n if (stagger === undefined) { stagger = 0; }\r\n\r\n if (!Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].anims.delayedPlay(stagger * i, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided.\r\n *\r\n * @method Phaser.Animations.AnimationManager#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - [description]\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimations} [description]\r\n */\r\n toJSON: function (key)\r\n {\r\n if (key !== undefined && key !== '')\r\n {\r\n return this.anims.get(key).toJSON();\r\n }\r\n else\r\n {\r\n var output = {\r\n anims: [],\r\n globalTimeScale: this.globalTimeScale\r\n };\r\n\r\n this.anims.each(function (animationKey, animation)\r\n {\r\n output.anims.push(animation.toJSON());\r\n });\r\n\r\n return output;\r\n }\r\n },\r\n\r\n /**\r\n * Destroy this Animation Manager and clean up animation definitions and references to other objects.\r\n * This method should not be called directly. It will be called automatically as a response to a `destroy` event from the Phaser.Game instance.\r\n *\r\n * @method Phaser.Animations.AnimationManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.anims.clear();\r\n\r\n this.textureManager = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationManager.js?")},"./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Add Animation Event.\r\n * \r\n * This event is dispatched when a new animation is added to the global Animation Manager.\r\n * \r\n * This can happen either as a result of an animation instance being added to the Animation Manager,\r\n * or the Animation Manager creating a new animation directly.\r\n *\r\n * @event Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Complete Event.\r\n * \r\n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Repeat Event.\r\n * \r\n * This event is dispatched when a currently playing animation repeats.\r\n * \r\n * The event is dispatched directly from the Animation object itself. Which means that listeners\r\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Restart Event.\r\n * \r\n * This event is dispatched by an Animation instance when it restarts.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'restart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Start Event.\r\n * \r\n * This event is dispatched by an Animation instance when it starts playing.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager is told to pause.\r\n * \r\n * When this happens all current animations will stop updating, although it doesn't necessarily mean\r\n * that the game has paused as well.\r\n *\r\n * @event Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Animation Event.\r\n * \r\n * This event is dispatched when an animation is removed from the global Animation Manager.\r\n *\r\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\r\n * \r\n * When this happens all current animations will continue updating again.\r\n *\r\n * @event Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Start Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Update Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Start Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Update Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD_ANIMATION: __webpack_require__(/*! ./ADD_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js"),\r\n ANIMATION_COMPLETE: __webpack_require__(/*! ./ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js"),\r\n ANIMATION_REPEAT: __webpack_require__(/*! ./ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js"),\r\n ANIMATION_RESTART: __webpack_require__(/*! ./ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js"),\r\n ANIMATION_START: __webpack_require__(/*! ./ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js"),\r\n REMOVE_ANIMATION: __webpack_require__(/*! ./REMOVE_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js"),\r\n SPRITE_ANIMATION_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_START: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js"),\r\n SPRITE_ANIMATION_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_START: __webpack_require__(/*! ./SPRITE_ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js"),\r\n SPRITE_ANIMATION_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/index.js?')},"./node_modules/phaser/src/animations/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/animations/Animation.js"),\r\n AnimationFrame: __webpack_require__(/*! ./AnimationFrame */ "./node_modules/phaser/src/animations/AnimationFrame.js"),\r\n AnimationManager: __webpack_require__(/*! ./AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/animations/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/index.js?')},"./node_modules/phaser/src/cache/BaseCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ "./node_modules/phaser/src/structs/Map.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The BaseCache is a base Cache class that can be used for storing references to any kind of data.\r\n *\r\n * Data can be added, retrieved and removed based on the given keys.\r\n *\r\n * Keys are string-based.\r\n *\r\n * @class BaseCache\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar BaseCache = new Class({\r\n\r\n initialize:\r\n\r\n function BaseCache ()\r\n {\r\n /**\r\n * The Map in which the cache objects are stored.\r\n *\r\n * You can query the Map directly or use the BaseCache methods.\r\n *\r\n * @name Phaser.Cache.BaseCache#entries\r\n * @type {Phaser.Structs.Map.}\r\n * @since 3.0.0\r\n */\r\n this.entries = new CustomMap();\r\n\r\n /**\r\n * An instance of EventEmitter used by the cache to emit related events.\r\n *\r\n * @name Phaser.Cache.BaseCache#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n },\r\n\r\n /**\r\n * Adds an item to this cache. The item is referenced by a unique string, which you are responsible\r\n * for setting and keeping track of. The item can only be retrieved by using this string.\r\n *\r\n * @method Phaser.Cache.BaseCache#add\r\n * @fires Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key by which the data added to the cache will be referenced.\r\n * @param {*} data - The data to be stored in the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n add: function (key, data)\r\n {\r\n this.entries.set(key, data);\r\n\r\n this.events.emit(Events.ADD, this, key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.exists`.\r\n *\r\n * @method Phaser.Cache.BaseCache#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.has` and is called directly by the Loader.\r\n *\r\n * @method Phaser.Cache.BaseCache#exists\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n exists: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Gets an item from this cache based on the given key.\r\n *\r\n * @method Phaser.Cache.BaseCache#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be retrieved from this cache.\r\n *\r\n * @return {*} The item in the cache, or `null` if no item matching the given key was found.\r\n */\r\n get: function (key)\r\n {\r\n return this.entries.get(key);\r\n },\r\n\r\n /**\r\n * Removes and item from this cache based on the given key.\r\n *\r\n * If an entry matching the key is found it is removed from the cache and a `remove` event emitted.\r\n * No additional checks are done on the item removed. If other systems or parts of your game code\r\n * are relying on this item, it is up to you to sever those relationships prior to removing the item.\r\n *\r\n * @method Phaser.Cache.BaseCache#remove\r\n * @fires Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to remove from the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n remove: function (key)\r\n {\r\n var entry = this.get(key);\r\n\r\n if (entry)\r\n {\r\n this.entries.delete(key);\r\n\r\n this.events.emit(Events.REMOVE, this, key, entry.data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all keys in use in this cache.\r\n *\r\n * @method Phaser.Cache.BaseCache#getKeys\r\n * @since 3.17.0\r\n *\r\n * @return {string[]} Array containing all the keys.\r\n */\r\n getKeys: function ()\r\n {\r\n return this.entries.keys();\r\n },\r\n\r\n /**\r\n * Destroys this cache and all items within it.\r\n *\r\n * @method Phaser.Cache.BaseCache#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.entries.clear();\r\n this.events.removeAllListeners();\r\n\r\n this.entries = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/BaseCache.js?')},"./node_modules/phaser/src/cache/CacheManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCache = __webpack_require__(/*! ./BaseCache */ \"./node_modules/phaser/src/cache/BaseCache.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Cache Manager is the global cache owned and maintained by the Game instance.\r\n *\r\n * Various systems, such as the file Loader, rely on this cache in order to store the files\r\n * it has loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache\r\n * instances, one per type of file. You can also add your own custom caches.\r\n *\r\n * @class CacheManager\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this CacheManager.\r\n */\r\nvar CacheManager = new Class({\r\n\r\n initialize:\r\n\r\n function CacheManager (game)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance that owns this CacheManager.\r\n *\r\n * @name Phaser.Cache.CacheManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Cache storing all binary files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#binary\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.binary = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all bitmap font data files, typically added via the Loader.\r\n * Only the font data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#bitmapFont\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.bitmapFont = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all JSON data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.json = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all physics data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#physics\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.physics = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all shader source files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#shader\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.shader = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all non-streaming audio files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#audio\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.audio = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all text files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#text\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.text = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all html files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#html\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.12.0\r\n */\r\n this.html = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all WaveFront OBJ files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#obj\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.obj = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all tilemap data files, typically added via the Loader.\r\n * Only the data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#tilemap\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all xml data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#xml\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.xml = new BaseCache();\r\n\r\n /**\r\n * An object that contains your own custom BaseCache entries.\r\n * Add to this via the `addCustom` method.\r\n *\r\n * @name Phaser.Cache.CacheManager#custom\r\n * @type {Object.}\r\n * @since 3.0.0\r\n */\r\n this.custom = {};\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Add your own custom Cache for storing your own files.\r\n * The cache will be available under `Cache.custom.key`.\r\n * The cache will only be created if the key is not already in use.\r\n *\r\n * @method Phaser.Cache.CacheManager#addCustom\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of your custom cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} A reference to the BaseCache that was created. If the key was already in use, a reference to the existing cache is returned instead.\r\n */\r\n addCustom: function (key)\r\n {\r\n if (!this.custom.hasOwnProperty(key))\r\n {\r\n this.custom[key] = new BaseCache();\r\n }\r\n\r\n return this.custom[key];\r\n },\r\n\r\n /**\r\n * Removes all entries from all BaseCaches and destroys all custom caches.\r\n *\r\n * @method Phaser.Cache.CacheManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var keys = [\r\n 'binary',\r\n 'bitmapFont',\r\n 'json',\r\n 'physics',\r\n 'shader',\r\n 'audio',\r\n 'text',\r\n 'html',\r\n 'obj',\r\n 'tilemap',\r\n 'xml'\r\n ];\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n this[keys[i]].destroy();\r\n this[keys[i]] = null;\r\n }\r\n\r\n for (var key in this.custom)\r\n {\r\n this.custom[key].destroy();\r\n }\r\n\r\n this.custom = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CacheManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/CacheManager.js?")},"./node_modules/phaser/src/cache/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Add Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time a new object is added to it.\r\n *\r\n * @event Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache to which the object was added.\r\n * @param {string} key - The key of the object added to the cache.\r\n * @param {*} object - A reference to the object that was added to the cache.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/ADD_EVENT.js?")},"./node_modules/phaser/src/cache/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Remove Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time an object is removed from it.\r\n *\r\n * @event Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache from which the object was removed.\r\n * @param {string} key - The key of the object removed from the cache.\r\n * @param {*} object - A reference to the object that was removed from the cache.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/cache/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/cache/events/ADD_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/cache/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/index.js?')},"./node_modules/phaser/src/cache/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BaseCache: __webpack_require__(/*! ./BaseCache */ "./node_modules/phaser/src/cache/BaseCache.js"),\r\n CacheManager: __webpack_require__(/*! ./CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/index.js?')},"./node_modules/phaser/src/cameras/2d/BaseCamera.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Camera class.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n * \r\n * The Base Camera is extended by the Camera class, which adds in special effects including Fade,\r\n * Flash and Camera Shake, as well as the ability to follow Game Objects.\r\n * \r\n * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow\r\n * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate\r\n * to when they were added to the Camera class.\r\n *\r\n * @class BaseCamera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.12.0\r\n * \r\n * @extends Phaser.Events.EventEmitter\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar BaseCamera = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function BaseCamera (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene this camera belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Game Scene Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.12.0\r\n */\r\n this.sceneManager;\r\n\r\n /**\r\n * A reference to the Game Scale Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager to which this Camera belongs.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#cameraManager\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.17.0\r\n */\r\n this.cameraManager;\r\n\r\n /**\r\n * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion.\r\n * This value is a bitmask.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.id = 0;\r\n\r\n /**\r\n * The name of the Camera. This is left empty for your own use.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * This property is un-used in v3.16.\r\n * \r\n * The resolution of the Game, used in most Camera calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#resolution\r\n * @type {number}\r\n * @readonly\r\n * @deprecated\r\n * @since 3.12.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Should this camera round its pixel values to integers?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.roundPixels = false;\r\n\r\n /**\r\n * Is this Camera visible or not?\r\n *\r\n * A visible camera will render and perform input tests.\r\n * An invisible camera will not render anything and will skip input tests.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n\r\n /**\r\n * Is this Camera using a bounds to restrict scrolling movement?\r\n *\r\n * Set this property along with the bounds via `Camera.setBounds`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useBounds = false;\r\n\r\n /**\r\n * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at.\r\n * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step.\r\n * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly.\r\n * You can use it for culling or intersection checks.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#worldView\r\n * @type {Phaser.Geom.Rectangle}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.worldView = new Rectangle();\r\n\r\n /**\r\n * Is this Camera dirty?\r\n * \r\n * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame.\r\n * \r\n * This flag is cleared during the `postRenderCamera` method of the renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.11.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._x = x;\r\n\r\n /**\r\n * The y position of the Camera, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._y = y;\r\n\r\n /**\r\n * Internal Camera X value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cx\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cx = 0;\r\n\r\n /**\r\n * Internal Camera Y value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cy\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cy = 0;\r\n\r\n /**\r\n * Internal Camera Width value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cw\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cw = 0;\r\n\r\n /**\r\n * Internal Camera Height value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_ch\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._ch = 0;\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * The bounds the camera is restrained to during scrolling.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollY = 0;\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this._zoom = 1;\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._rotation = 0;\r\n\r\n /**\r\n * A local transform matrix used for internal calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#matrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.matrix = new TransformMatrix();\r\n\r\n /**\r\n * Does this Camera have a transparent background?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#transparent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.transparent = true;\r\n\r\n /**\r\n * The background color of this Camera. Only used if `transparent` is `false`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor\r\n * @type {Phaser.Display.Color}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor = ValueToColor('rgba(0,0,0,0)');\r\n\r\n /**\r\n * The Camera alpha value. Setting this property impacts every single object that this Camera\r\n * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out,\r\n * or via the chainable `setAlpha` method instead.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n\r\n /**\r\n * Should the camera cull Game Objects before checking them for input hit tests?\r\n * In some special cases it may be beneficial to disable this.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.disableCull = false;\r\n\r\n /**\r\n * A temporary array of culled objects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.culledObjects = [];\r\n\r\n /**\r\n * The mid-point of the Camera in 'world' coordinates.\r\n *\r\n * Use it to obtain exactly where in the world the center of the camera is currently looking.\r\n *\r\n * This value is updated in the preRender method, after the scroll values and follower\r\n * have been processed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.midPoint = new Vector2(width / 2, height / 2);\r\n\r\n /**\r\n * The horizontal origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originX = 0.5;\r\n\r\n /**\r\n * The vertical origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originY = 0.5;\r\n\r\n /**\r\n * Does this Camera have a custom viewport?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.12.0\r\n */\r\n this._customViewport = false;\r\n\r\n /**\r\n * The Mask this Camera is using during render.\r\n * Set the mask using the `setMask` method. Remove the mask using the `clearMask` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#mask\r\n * @type {?(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)}\r\n * @since 3.17.0\r\n */\r\n this.mask = null;\r\n\r\n /**\r\n * The Camera that this Camera uses for translation during masking.\r\n * \r\n * If the mask is fixed in position this will be a reference to\r\n * the CameraManager.default instance. Otherwise, it'll be a reference\r\n * to itself.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_maskCamera\r\n * @type {?Phaser.Cameras.Scene2D.BaseCamera}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._maskCamera = null;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha\r\n * @since 3.11.0\r\n *\r\n * @param {number} [value=1] - The Camera alpha value.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Sets the rotation origin of this Camera.\r\n *\r\n * The values are given in the range 0 to 1 and are only used when calculating Camera rotation.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin\r\n * @since 3.11.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates what the Camera.scrollX and scrollY values would need to be in order to move\r\n * the Camera so it is centered on the given x and y coordinates, without actually moving\r\n * the Camera there. The results are clamped based on the Camera bounds, if set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created.\r\n *\r\n * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties.\r\n */\r\n getScroll: function (x, y, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n out.x = x - originX;\r\n out.y = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n out.x = this.clampX(out.x);\r\n out.y = this.clampY(out.y);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Moves the Camera horizontally so that it is centered on the given x coordinate, bounds allowing.\r\n * Calling this does not change the scrollY value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnX\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnX: function (x)\r\n {\r\n var originX = this.width * 0.5;\r\n\r\n this.midPoint.x = x;\r\n\r\n this.scrollX = x - originX;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera vertically so that it is centered on the given y coordinate, bounds allowing.\r\n * Calling this does not change the scrollX value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnY\r\n * @since 3.16.0\r\n *\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnY: function (y)\r\n {\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.y = y;\r\n\r\n this.scrollY = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is centered on the given coordinates, bounds allowing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOn: function (x, y)\r\n {\r\n this.centerOnX(x);\r\n this.centerOnY(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToBounds: function ()\r\n {\r\n if (this.useBounds)\r\n {\r\n var bounds = this._bounds;\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.set(bounds.centerX, bounds.centerY);\r\n\r\n this.scrollX = bounds.centerX - originX;\r\n this.scrollY = bounds.centerY - originY;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is re-centered based on its viewport size.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToSize: function ()\r\n {\r\n this.scrollX = this.width * 0.5;\r\n this.scrollY = this.height * 0.5;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects and returns a new array featuring only those objects\r\n * visible by this camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#cull\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera.\r\n */\r\n cull: function (renderableObjects)\r\n {\r\n if (this.disableCull)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n\r\n /* First Invert Matrix */\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n var cameraW = this.width;\r\n var cameraH = this.height;\r\n var culledObjects = this.culledObjects;\r\n var length = renderableObjects.length;\r\n\r\n determinant = 1 / determinant;\r\n\r\n culledObjects.length = 0;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n var object = renderableObjects[index];\r\n\r\n if (!object.hasOwnProperty('width') || object.parentContainer)\r\n {\r\n culledObjects.push(object);\r\n continue;\r\n }\r\n\r\n var objectW = object.width;\r\n var objectH = object.height;\r\n var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX);\r\n var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY);\r\n var tx = (objectX * mva + objectY * mvc + mve);\r\n var ty = (objectX * mvb + objectY * mvd + mvf);\r\n var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve);\r\n var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf);\r\n var cullTop = this.y;\r\n var cullBottom = cullTop + cameraH;\r\n var cullLeft = this.x;\r\n var cullRight = cullLeft + cameraW;\r\n\r\n if ((tw > cullLeft && tx < cullRight) && (th > cullTop && ty < cullBottom))\r\n {\r\n culledObjects.push(object);\r\n }\r\n }\r\n\r\n return culledObjects;\r\n },\r\n\r\n /**\r\n * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform.\r\n * You can optionally provide a Vector2, or similar object, to store the results in.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {number} x - The x position to convert to world space.\r\n * @param {number} y - The y position to convert to world space.\r\n * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties.\r\n */\r\n getWorldPoint: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n // Invert Matrix\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n output.x = x;\r\n output.y = y;\r\n\r\n return output;\r\n }\r\n\r\n determinant = 1 / determinant;\r\n\r\n var ima = mvd * determinant;\r\n var imb = -mvb * determinant;\r\n var imc = -mvc * determinant;\r\n var imd = mva * determinant;\r\n var ime = (mvc * mvf - mvd * mve) * determinant;\r\n var imf = (mvb * mve - mva * mvf) * determinant;\r\n\r\n var c = Math.cos(this.rotation);\r\n var s = Math.sin(this.rotation);\r\n\r\n var zoom = this.zoom;\r\n var res = this.resolution;\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n\r\n // Works for zoom of 1 with any resolution, but resolution > 1 and zoom !== 1 breaks\r\n var sx = x + ((scrollX * c - scrollY * s) * zoom);\r\n var sy = y + ((scrollX * s + scrollY * c) * zoom);\r\n\r\n // Apply transform to point\r\n output.x = (sx * ima + sy * imc) * res + ime;\r\n output.y = (sx * imb + sy * imd) * res + imf;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings\r\n * so that they are ignored by this Camera. This means they will not be rendered by this Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#ignore\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n ignore: function (entries)\r\n {\r\n var id = this.id;\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n for (var i = 0; i < entries.length; i++)\r\n {\r\n var entry = entries[i];\r\n\r\n if (Array.isArray(entry))\r\n {\r\n this.ignore(entry);\r\n }\r\n else if (entry.isParent)\r\n {\r\n this.ignore(entry.getChildren());\r\n }\r\n else\r\n {\r\n entry.cameraFilter |= id;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it's looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n },\r\n\r\n /**\r\n * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampX\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The value to horizontally scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollX.\r\n */\r\n clampX: function (x)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dw = this.displayWidth;\r\n\r\n var bx = bounds.x + ((dw - this.width) / 2);\r\n var bw = Math.max(bx, bx + bounds.width - dw);\r\n\r\n if (x < bx)\r\n {\r\n x = bx;\r\n }\r\n else if (x > bw)\r\n {\r\n x = bw;\r\n }\r\n\r\n return x;\r\n },\r\n\r\n /**\r\n * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampY\r\n * @since 3.11.0\r\n *\r\n * @param {number} y - The value to vertically scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollY.\r\n */\r\n clampY: function (y)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dh = this.displayHeight;\r\n\r\n var by = bounds.y + ((dh - this.height) / 2);\r\n var bh = Math.max(by, by + bounds.height - dh);\r\n\r\n if (y < by)\r\n {\r\n y = by;\r\n }\r\n else if (y > bh)\r\n {\r\n y = bh;\r\n }\r\n\r\n return y;\r\n },\r\n\r\n /*\r\n var gap = this._zoomInversed;\r\n return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap);\r\n */\r\n\r\n /**\r\n * If this Camera has previously had movement bounds set on it, this will remove them.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n removeBounds: function ()\r\n {\r\n this.useBounds = false;\r\n\r\n this.dirty = true;\r\n\r\n this._bounds.setEmpty();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The cameras angle of rotation, given in degrees.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setAngle: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = DegToRad(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the background color for this Camera.\r\n *\r\n * By default a Camera has a transparent background but it can be given a solid color, with any level\r\n * of transparency, via this method.\r\n *\r\n * The color value can be specified using CSS color notation, hex or numbers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n if (color === undefined) { color = 'rgba(0,0,0,0)'; }\r\n\r\n this.backgroundColor = ValueToColor(color);\r\n\r\n this.transparent = (this.backgroundColor.alpha === 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the bounds of the Camera. The bounds are an axis-aligned rectangle.\r\n * \r\n * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the\r\n * edges and into blank space. It does not limit the placement of Game Objects, or where\r\n * the Camera viewport can be positioned.\r\n * \r\n * Temporarily disable the bounds by changing the boolean `Camera.useBounds`.\r\n * \r\n * Clear the bounds entirely by calling `Camera.removeBounds`.\r\n * \r\n * If you set bounds that are smaller than the viewport it will stop the Camera from being\r\n * able to scroll. The bounds can be positioned where-ever you wish. By default they are from\r\n * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of\r\n * the Camera bounds. However, you can position them anywhere. So if you wanted a game world\r\n * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y\r\n * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find\r\n * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The top-left x coordinate of the bounds.\r\n * @param {integer} y - The top-left y coordinate of the bounds.\r\n * @param {integer} width - The width of the bounds, in pixels.\r\n * @param {integer} height - The height of the bounds, in pixels.\r\n * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBounds: function (x, y, width, height, centerOn)\r\n {\r\n if (centerOn === undefined) { centerOn = false; }\r\n\r\n this._bounds.setTo(x, y, width, height);\r\n\r\n this.dirty = true;\r\n this.useBounds = true;\r\n\r\n if (centerOn)\r\n {\r\n this.centerToBounds();\r\n }\r\n else\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a rectangle containing the bounds of the Camera.\r\n * \r\n * If the Camera does not have any bounds the rectangle will be empty.\r\n * \r\n * The rectangle is a copy of the bounds, so is safe to modify.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getBounds\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - An optional Rectangle to store the bounds in. If not given, a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle containing the bounds of this Camera.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var source = this._bounds;\r\n\r\n out.setTo(source.x, source.y, source.width, source.height);\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Sets the name of this Camera.\r\n * This value is for your own use and isn't used internally.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} [value=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setName: function (value)\r\n {\r\n if (value === undefined) { value = ''; }\r\n\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the Camera viewport within the game.\r\n *\r\n * This does not change where the camera is 'looking'. See `setScroll` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} [y=x] - The top-left y coordinate of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The rotation of the Camera, in radians.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRotation: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Should the Camera round pixel values to whole integers when rendering Game Objects?\r\n * \r\n * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to round Camera pixels, `false` to not.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRoundPixels: function (value)\r\n {\r\n this.roundPixels = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Scene the Camera is bound to.\r\n * \r\n * Also populates the `resolution` property and updates the internal size values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene the camera is bound to.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScene: function (scene)\r\n {\r\n if (this.scene && this._customViewport)\r\n {\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this.scene = scene;\r\n\r\n var sys = scene.sys;\r\n\r\n this.sceneManager = sys.game.scene;\r\n this.scaleManager = sys.scale;\r\n this.cameraManager = sys.cameras;\r\n\r\n var res = this.scaleManager.resolution;\r\n\r\n this.resolution = res;\r\n\r\n this._cx = this._x * res;\r\n this._cy = this._y * res;\r\n this._cw = this._width * res;\r\n this._ch = this._height * res;\r\n\r\n this.updateSystem();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of where the Camera is looking within the game.\r\n * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.\r\n * Use this method, or the scroll properties, to move your camera around the game world.\r\n *\r\n * This does not change where the camera viewport is placed. See `setPosition` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the Camera in the game world.\r\n * @param {number} [y=x] - The y coordinate of the Camera in the game world.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScroll: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollX = x;\r\n this.scrollY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the size of the Camera viewport.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method sets the position and size of the Camera viewport in a single call.\r\n *\r\n * If you're trying to change where the Camera is looking at in your game, then see\r\n * the method `Camera.setScroll` instead. This method is for changing the viewport\r\n * itself, not what the camera can see.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} y - The top-left y coordinate of the Camera viewport.\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setViewport: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the zoom value of the Camera.\r\n *\r\n * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'.\r\n * Changing to a larger value, such as 2, will cause the camera to 'zoom in'.\r\n *\r\n * A value of 1 means 'no zoom' and is the default.\r\n *\r\n * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (value === 0)\r\n {\r\n value = 0.001;\r\n }\r\n\r\n this.zoom = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mask to be applied to this Camera during rendering.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * \r\n * Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Camera it will be immediately replaced.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n * \r\n * Note: You cannot mask a Camera that has `renderToTexture` set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setMask\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)} mask - The mask this Camera will use when rendering.\r\n * @param {boolean} [fixedPosition=true] - Should the mask translate along with the Camera, or be fixed in place and not impacted by the Cameras transform?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setMask: function (mask, fixedPosition)\r\n {\r\n if (fixedPosition === undefined) { fixedPosition = true; }\r\n\r\n this.mask = mask;\r\n\r\n this._maskCamera = (fixedPosition) ? this.cameraManager.default : this;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Camera was using.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clearMask\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Camera.\r\n *\r\n * An invisible Camera will skip rendering and input tests of everything it can see.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible\r\n * @since 3.10.0\r\n *\r\n * @param {boolean} value - The visible state of the Camera.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Cameras.Scene2D.JSONCamera} A well-formed object suitable for conversion to JSON.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n zoom: this.zoom,\r\n rotation: this.rotation,\r\n roundPixels: this.roundPixels,\r\n scrollX: this.scrollX,\r\n scrollY: this.scrollY,\r\n backgroundColor: this.backgroundColor.rgba\r\n };\r\n\r\n if (this.useBounds)\r\n {\r\n output['bounds'] = {\r\n x: this._bounds.x,\r\n y: this._bounds.y,\r\n width: this._bounds.width,\r\n height: this._bounds.height\r\n };\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Internal method called automatically when the viewport changes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateSystem: function ()\r\n {\r\n if (!this.scaleManager)\r\n {\r\n return;\r\n }\r\n\r\n var custom = (this._x !== 0 || this._y !== 0 || this.scaleManager.width !== this._width || this.scaleManager.height !== this._height);\r\n\r\n var sceneManager = this.sceneManager;\r\n\r\n if (custom && !this._customViewport)\r\n {\r\n // We need a custom viewport for this Camera\r\n sceneManager.customViewports++;\r\n }\r\n else if (!custom && this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n sceneManager.customViewports--;\r\n }\r\n\r\n this.dirty = true;\r\n this._customViewport = custom;\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance and its internal properties and references.\r\n * Once destroyed you cannot use this Camera again, even if re-added to a Camera Manager.\r\n * \r\n * This method is called automatically by `CameraManager.remove` if that methods `runDestroy` argument is `true`, which is the default.\r\n * \r\n * Unless you have a specific reason otherwise, always use `CameraManager.remove` and allow it to handle the camera destruction,\r\n * rather than calling this method directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.emit(Events.DESTROY, this);\r\n\r\n this.removeAllListeners();\r\n\r\n this.matrix.destroy();\r\n\r\n this.culledObjects = [];\r\n\r\n if (this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this._bounds = null;\r\n\r\n this.scene = null;\r\n this.scaleManager = null;\r\n this.sceneManager = null;\r\n this.cameraManager = null;\r\n },\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n this._cx = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n this._cy = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._width = value;\r\n this._cw = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._height = value;\r\n this._ch = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollX: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollX = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollY: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollY = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#zoom\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal position of the center of the Camera's viewport, relative to the left of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (0.5 * this.width);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical position of the center of the Camera's viewport, relative to the top of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (0.5 * this.height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed width of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width\r\n * would be 1600, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a width of 800 and zoom of 2 would have a display width\r\n * of 400 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.width / this.zoom;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height\r\n * would be 1200, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a height of 600 and zoom of 2 would have a display height\r\n * of 300 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.height / this.zoom;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/BaseCamera.js?")},"./node_modules/phaser/src/cameras/2d/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ./BaseCamera */ "./node_modules/phaser/src/cameras/2d/BaseCamera.js");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CenterOn = __webpack_require__(/*! ../../geom/rectangle/CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Effects = __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js");\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you\'d adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash and Camera Shake.\r\n *\r\n * @class Camera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Cameras.Scene2D.BaseCamera\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Tint\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar Camera = new Class({\r\n\r\n Extends: BaseCamera,\r\n\r\n Mixins: [\r\n Components.Flip,\r\n Components.Tint\r\n ],\r\n\r\n initialize:\r\n\r\n function Camera (x, y, width, height)\r\n {\r\n BaseCamera.call(this, x, y, width, height);\r\n\r\n /**\r\n * Does this Camera allow the Game Objects it renders to receive input events?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#inputEnabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inputEnabled = true;\r\n\r\n /**\r\n * The Camera Fade effect handler.\r\n * To fade this camera see the `Camera.fade` methods.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#fadeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Fade}\r\n * @since 3.5.0\r\n */\r\n this.fadeEffect = new Effects.Fade(this);\r\n\r\n /**\r\n * The Camera Flash effect handler.\r\n * To flash this camera see the `Camera.flash` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#flashEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Flash}\r\n * @since 3.5.0\r\n */\r\n this.flashEffect = new Effects.Flash(this);\r\n\r\n /**\r\n * The Camera Shake effect handler.\r\n * To shake this camera see the `Camera.shake` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#shakeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Shake}\r\n * @since 3.5.0\r\n */\r\n this.shakeEffect = new Effects.Shake(this);\r\n\r\n /**\r\n * The Camera Pan effect handler.\r\n * To pan this camera see the `Camera.pan` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#panEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Pan}\r\n * @since 3.11.0\r\n */\r\n this.panEffect = new Effects.Pan(this);\r\n\r\n /**\r\n * The Camera Zoom effect handler.\r\n * To zoom this camera see the `Camera.zoom` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#zoomEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Zoom}\r\n * @since 3.11.0\r\n */\r\n this.zoomEffect = new Effects.Zoom(this);\r\n\r\n /**\r\n * The linear interpolation value to use when following a target.\r\n *\r\n * Can also be set via `setLerp` or as part of the `startFollow` call.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#lerp\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.lerp = new Vector2(1, 1);\r\n\r\n /**\r\n * The values stored in this property are subtracted from the Camera targets position, allowing you to\r\n * offset the camera from the actual target x/y coordinates by this amount.\r\n * Can also be set via `setFollowOffset` or as part of the `startFollow` call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * The Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * You can directly set this property to be an instance of a Rectangle. Or, you can use the\r\n * `setDeadzone` method for a chainable approach.\r\n *\r\n * The rectangle you provide can have its dimensions adjusted dynamically, however, please\r\n * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point.\r\n *\r\n * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property\r\n * to `null`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#deadzone\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @since 3.11.0\r\n */\r\n this.deadzone = null;\r\n\r\n /**\r\n * Internal follow target reference.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#_follow\r\n * @type {?any}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this._follow = null;\r\n\r\n /**\r\n * Is this Camera rendering directly to the canvas or to a texture?\r\n *\r\n * Enable rendering to texture with the method `setRenderToTexture` (just enabling this boolean won\'t be enough)\r\n *\r\n * Once enabled you can toggle it by switching this property.\r\n *\r\n * To properly remove a render texture you should call the `clearRenderToTexture()` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#renderToTexture\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the HTML Canvas Element that the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.13.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the Rendering Context belonging to the Canvas element the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.13.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Texture belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.13.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Frame Buffer belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.13.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture and to use a custom pipeline,\r\n * then this holds a reference to the pipeline the Camera is drawing with.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#pipeline\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.pipeline = null;\r\n },\r\n\r\n /**\r\n * Sets the Camera to render to a texture instead of to the main canvas.\r\n *\r\n * The Camera will redirect all Game Objects it\'s asked to render to this texture.\r\n *\r\n * During the render sequence, the texture itself will then be rendered to the main canvas.\r\n *\r\n * Doing this gives you the ability to modify the texture before this happens,\r\n * allowing for special effects such as Camera specific shaders, or post-processing\r\n * on the texture.\r\n *\r\n * If running under Canvas the Camera will render to its `canvas` property.\r\n *\r\n * If running under WebGL the Camera will create a frame buffer, which is stored in its `framebuffer` and `glTexture` properties.\r\n *\r\n * If you set a camera to render to a texture then it will emit 2 events during the render loop:\r\n *\r\n * First, it will emit the event `prerender`. This happens right before any Game Object\'s are drawn to the Camera texture.\r\n *\r\n * Then, it will emit the event `postrender`. This happens after all Game Object\'s have been drawn, but right before the\r\n * Camera texture is rendered to the main game canvas. It\'s the final point at which you can manipulate the texture before\r\n * it appears in-game.\r\n *\r\n * You should not enable this unless you plan on actually using the texture it creates\r\n * somehow, otherwise you\'re just doubling the work required to render your game.\r\n *\r\n * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean.\r\n *\r\n * If you no longer require the Camera to render to a texture, call the `clearRenderToTexture` method,\r\n * which will delete the respective textures and free-up resources.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setRenderToTexture: function (pipeline)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl)\r\n {\r\n this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0);\r\n this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false);\r\n }\r\n else\r\n {\r\n this.canvas = CanvasPool.create2D(this, this.width, this.height);\r\n this.context = this.canvas.getContext(\'2d\');\r\n }\r\n\r\n this.renderToTexture = true;\r\n\r\n if (pipeline)\r\n {\r\n this.setPipeline(pipeline);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the WebGL pipeline this Camera is using when rendering to a texture.\r\n *\r\n * You can pass either the string-based name of the pipeline, or a reference to the pipeline itself.\r\n *\r\n * Call this method with no arguments to clear any previously set pipeline.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setPipeline\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setPipeline: function (pipeline)\r\n {\r\n if (typeof pipeline === \'string\')\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl && renderer.hasPipeline(pipeline))\r\n {\r\n this.pipeline = renderer.getPipeline(pipeline);\r\n }\r\n }\r\n else\r\n {\r\n this.pipeline = pipeline;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Camera was set to render to a texture, this will clear the resources it was using and\r\n * redirect it to render back to the primary Canvas again.\r\n *\r\n * If you only wish to temporarily disable rendering to a texture then you can toggle the\r\n * property `renderToTexture` instead.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n clearRenderToTexture: function ()\r\n {\r\n if (!this.scene)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return;\r\n }\r\n\r\n if (renderer.gl)\r\n {\r\n if (this.framebuffer)\r\n {\r\n renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n if (this.glTexture)\r\n {\r\n renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.pipeline = null;\r\n }\r\n else\r\n {\r\n CanvasPool.remove(this);\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n }\r\n\r\n this.renderToTexture = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point\r\n * of the camera. This allows you to use the object for additional game related checks, such as\r\n * testing if an object is within it or not via a Rectangle.contains call.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * Calling this method with no arguments will reset an active deadzone.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setDeadzone\r\n * @since 3.11.0\r\n *\r\n * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed.\r\n * @param {number} [height] - The height of the deadzone rectangle in pixels.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setDeadzone: function (width, height)\r\n {\r\n if (width === undefined)\r\n {\r\n this.deadzone = null;\r\n }\r\n else\r\n {\r\n if (this.deadzone)\r\n {\r\n this.deadzone.width = width;\r\n this.deadzone.height = height;\r\n }\r\n else\r\n {\r\n this.deadzone = new Rectangle(0, 0, width, height);\r\n }\r\n\r\n if (this._follow)\r\n {\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = this._follow.x - this.followOffset.x;\r\n var fy = this._follow.y - this.followOffset.y;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n }\r\n\r\n CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fades the Camera in from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeIn\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeIn: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera out to the given color over the duration specified.\r\n * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeOut\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeOut: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from the given color to transparent over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeFrom\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeFrom: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from transparent to the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fade\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fade: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#flash\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n flash: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.flashEffect.start(duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#shake\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n shake: function (duration, intensity, force, callback, context)\r\n {\r\n return this.shakeEffect.start(duration, intensity, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#pan\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n pan: function (x, y, duration, ease, force, callback, context)\r\n {\r\n return this.panEffect.start(x, y, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#zoomTo\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n zoomTo: function (zoom, duration, ease, force, callback, context)\r\n {\r\n return this.zoomEffect.start(zoom, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var follow = this._follow;\r\n var deadzone = this.deadzone;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (deadzone)\r\n {\r\n CenterOn(deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n if (follow && !this.panEffect.isRunning)\r\n {\r\n var fx = (follow.x - this.followOffset.x);\r\n var fy = (follow.y - this.followOffset.y);\r\n\r\n if (deadzone)\r\n {\r\n if (fx < deadzone.x)\r\n {\r\n sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x);\r\n }\r\n else if (fx > deadzone.right)\r\n {\r\n sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x);\r\n }\r\n\r\n if (fy < deadzone.y)\r\n {\r\n sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y);\r\n }\r\n else if (fy > deadzone.bottom)\r\n {\r\n sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y);\r\n }\r\n }\r\n else\r\n {\r\n sx = Linear(sx, fx - originX, this.lerp.x);\r\n sy = Linear(sy, fy - originY, this.lerp.y);\r\n }\r\n }\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it\'s looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n\r\n this.shakeEffect.preRender();\r\n },\r\n\r\n /**\r\n * Sets the linear interpolation value to use when following a target.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setLerp\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target.\r\n * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setLerp: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.lerp.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical offset of the camera from its follow target.\r\n * The values are subtracted from the targets position during the Cameras update step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [y=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setFollowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.followOffset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera to follow a Game Object.\r\n *\r\n * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object\r\n * in its center.\r\n *\r\n * You can set the linear interpolation value used in the follow code.\r\n * Use low lerp values (such as 0.1) to automatically smooth the camera motion.\r\n *\r\n * If you find you\'re getting a slight "jitter" effect when following an object it\'s probably to do with sub-pixel\r\n * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to\r\n * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom\r\n * value on the camera. So be sure to keep the camera zoom to integers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow.\r\n * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering?\r\n * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY)\r\n {\r\n if (roundPixels === undefined) { roundPixels = false; }\r\n if (lerpX === undefined) { lerpX = 1; }\r\n if (lerpY === undefined) { lerpY = lerpX; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = offsetX; }\r\n\r\n this._follow = target;\r\n\r\n this.roundPixels = roundPixels;\r\n\r\n lerpX = Clamp(lerpX, 0, 1);\r\n lerpY = Clamp(lerpY, 0, 1);\r\n\r\n this.lerp.set(lerpX, lerpY);\r\n\r\n this.followOffset.set(offsetX, offsetY);\r\n\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = target.x - offsetX;\r\n var fy = target.y - offsetY;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n stopFollow: function ()\r\n {\r\n this._follow = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to\r\n * remove the fade.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#resetFX\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n resetFX: function ()\r\n {\r\n this.panEffect.reset();\r\n this.shakeEffect.reset();\r\n this.flashEffect.reset();\r\n this.fadeEffect.reset();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.visible)\r\n {\r\n this.panEffect.update(time, delta);\r\n this.zoomEffect.update(time, delta);\r\n this.shakeEffect.update(time, delta);\r\n this.flashEffect.update(time, delta);\r\n this.fadeEffect.update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance. You rarely need to call this directly.\r\n *\r\n * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as\r\n * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clearRenderToTexture();\r\n\r\n this.resetFX();\r\n\r\n BaseCamera.prototype.destroy.call(this);\r\n\r\n this._follow = null;\r\n\r\n this.deadzone = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/Camera.js?')},"./node_modules/phaser/src/cameras/2d/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ \"./node_modules/phaser/src/cameras/2d/Camera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras.\r\n * \r\n * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed\r\n * in your game config.\r\n * \r\n * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add\r\n * the new Camera in using the `addExisting` method.\r\n * \r\n * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique \r\n * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of\r\n * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore\r\n * Game Objects, make sure it's one of the first 31 created.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash, Camera Shake, Pan and Zoom.\r\n *\r\n * @class CameraManager\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns the Camera Manager plugin.\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * The Scene that owns the Camera Manager plugin.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems handler for the Scene that owns the Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * All Cameras created by, or added to, this Camera Manager, will have their `roundPixels`\r\n * property set to match this value. By default it is set to match the value set in the\r\n * game configuration, but can be changed at any point. Equally, individual cameras can\r\n * also be changed as needed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#roundPixels\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.roundPixels = scene.sys.game.config.roundPixels;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n * The Cameras are updated and rendered in the same order in which they appear in this array.\r\n * Do not directly add or remove entries to this array. However, you can move the contents\r\n * around the array should you wish to adjust the display order.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Scene2D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n /**\r\n * A handy reference to the 'main' camera. By default this is the first Camera the\r\n * Camera Manager creates. You can also set it directly, or use the `makeMain` argument\r\n * in the `add` and `addExisting` methods. It allows you to access it from your game:\r\n * \r\n * ```javascript\r\n * var cam = this.cameras.main;\r\n * ```\r\n * \r\n * Also see the properties `camera1`, `camera2` and so on.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#main\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.main;\r\n\r\n /**\r\n * A default un-transformed Camera that doesn't exist on the camera list and doesn't\r\n * count towards the total number of cameras being managed. It exists for other\r\n * systems, as well as your own code, should they require a basic un-transformed\r\n * camera instance from which to calculate a view matrix.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#default\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.17.0\r\n */\r\n this.default;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#boot\r\n * @private\r\n * @listens Phaser.Scenes.Events#DESTROY\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n\r\n this.main = this.cameras[0];\r\n\r\n // Create a default camera\r\n this.default = new Camera(0, 0, sys.scale.width, sys.scale.height).setScene(this.scene);\r\n\r\n sys.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#start\r\n * @private\r\n * @listens Phaser.Scenes.Events#UPDATE\r\n * @listens Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.main)\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n \r\n this.main = this.cameras[0];\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras.\r\n * \r\n * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas.\r\n * \r\n * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the\r\n * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake,\r\n * pan and zoom.\r\n * \r\n * By default Cameras are transparent and will render anything that they can see based on their `scrollX`\r\n * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after creation if required.\r\n * \r\n * See the Camera class documentation for more details.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [x=0] - The horizontal position of the Camera viewport.\r\n * @param {integer} [y=0] - The vertical position of the Camera viewport.\r\n * @param {integer} [width] - The width of the Camera viewport. If not given it'll be the game config size.\r\n * @param {integer} [height] - The height of the Camera viewport. If not given it'll be the game config size.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n * @param {string} [name=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The newly created Camera.\r\n */\r\n add: function (x, y, width, height, makeMain, name)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (makeMain === undefined) { makeMain = false; }\r\n if (name === undefined) { name = ''; }\r\n\r\n var camera = new Camera(x, y, width, height);\r\n\r\n camera.setName(name);\r\n camera.setScene(this.scene);\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n camera.id = this.getNextID();\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * Adds an existing Camera into the Camera Manager.\r\n * \r\n * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after addition if required.\r\n * \r\n * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the\r\n * manager. As long as it doesn't already exist in the manager it will be added then returned.\r\n * \r\n * If this method returns `null` then the Camera already exists in this Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#addExisting\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to be added to the Camera Manager.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The Camera that was added to the Camera Manager, or `null` if it couldn't be added.\r\n */\r\n addExisting: function (camera, makeMain)\r\n {\r\n if (makeMain === undefined) { makeMain = false; }\r\n\r\n var index = this.cameras.indexOf(camera);\r\n\r\n if (index === -1)\r\n {\r\n camera.id = this.getNextID();\r\n\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n \r\n return camera;\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the next available Camera ID number.\r\n * \r\n * The Camera Manager supports up to 31 unique cameras, after which the ID returned will always be zero.\r\n * You can create additional cameras beyond 31, but they cannot be used for Game Object exclusion.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getNextID\r\n * @private\r\n * @since 3.11.0\r\n *\r\n * @return {number} The next available Camera ID, or 0 if they're all already in use.\r\n */\r\n getNextID: function ()\r\n {\r\n var cameras = this.cameras;\r\n\r\n var testID = 1;\r\n\r\n // Find the first free camera ID we can use\r\n\r\n for (var t = 0; t < 32; t++)\r\n {\r\n var found = false;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera && camera.id === testID)\r\n {\r\n found = true;\r\n continue;\r\n }\r\n }\r\n\r\n if (found)\r\n {\r\n testID = testID << 1;\r\n }\r\n else\r\n {\r\n return testID;\r\n }\r\n }\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * Gets the total number of Cameras in this Camera Manager.\r\n * \r\n * If the optional `isVisible` argument is set it will only count Cameras that are currently visible.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getTotal\r\n * @since 3.11.0\r\n * \r\n * @param {boolean} [isVisible=false] - Set the `true` to only include visible Cameras in the total.\r\n *\r\n * @return {integer} The total number of Cameras in this Camera Manager.\r\n */\r\n getTotal: function (isVisible)\r\n {\r\n if (isVisible === undefined) { isVisible = false; }\r\n\r\n var total = 0;\r\n\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (!isVisible || (isVisible && camera.visible))\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Populates this Camera Manager based on the given configuration object, or an array of config objects.\r\n * \r\n * See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var gameWidth = this.scene.sys.scale.width;\r\n var gameHeight = this.scene.sys.scale.height;\r\n\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var cameraConfig = config[i];\r\n\r\n var x = GetFastValue(cameraConfig, 'x', 0);\r\n var y = GetFastValue(cameraConfig, 'y', 0);\r\n var width = GetFastValue(cameraConfig, 'width', gameWidth);\r\n var height = GetFastValue(cameraConfig, 'height', gameHeight);\r\n\r\n var camera = this.add(x, y, width, height);\r\n\r\n // Direct properties\r\n camera.name = GetFastValue(cameraConfig, 'name', '');\r\n camera.zoom = GetFastValue(cameraConfig, 'zoom', 1);\r\n camera.rotation = GetFastValue(cameraConfig, 'rotation', 0);\r\n camera.scrollX = GetFastValue(cameraConfig, 'scrollX', 0);\r\n camera.scrollY = GetFastValue(cameraConfig, 'scrollY', 0);\r\n camera.roundPixels = GetFastValue(cameraConfig, 'roundPixels', false);\r\n camera.visible = GetFastValue(cameraConfig, 'visible', true);\r\n\r\n // Background Color\r\n\r\n var backgroundColor = GetFastValue(cameraConfig, 'backgroundColor', false);\r\n\r\n if (backgroundColor)\r\n {\r\n camera.setBackgroundColor(backgroundColor);\r\n }\r\n\r\n // Bounds\r\n\r\n var boundsConfig = GetFastValue(cameraConfig, 'bounds', null);\r\n\r\n if (boundsConfig)\r\n {\r\n var bx = GetFastValue(boundsConfig, 'x', 0);\r\n var by = GetFastValue(boundsConfig, 'y', 0);\r\n var bwidth = GetFastValue(boundsConfig, 'width', gameWidth);\r\n var bheight = GetFastValue(boundsConfig, 'height', gameHeight);\r\n\r\n camera.setBounds(bx, by, bwidth, bheight);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Camera based on its name.\r\n * \r\n * Camera names are optional and don't have to be set, so this method is only of any use if you\r\n * have given your Cameras unique names.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Camera.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The first Camera with a name matching the given string, otherwise `null`.\r\n */\r\n getCamera: function (name)\r\n {\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n if (cameras[i].name === name)\r\n {\r\n return cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns an array of all cameras below the given Pointer.\r\n * \r\n * The first camera in the array is the top-most camera in the camera list.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamerasBelowPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera[]} An array of cameras below the Pointer.\r\n */\r\n getCamerasBelowPointer: function (pointer)\r\n {\r\n var cameras = this.cameras;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.inputEnabled && RectangleContains(camera, x, y))\r\n {\r\n // So the top-most camera is at the top of the search array\r\n output.unshift(camera);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Removes the given Camera, or an array of Cameras, from this Camera Manager.\r\n * \r\n * If found in the Camera Manager it will be immediately removed from the local cameras array.\r\n * If also currently the 'main' camera, 'main' will be reset to be camera 0.\r\n * \r\n * The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default.\r\n * If you wish to re-use the cameras then set this to `false`, but know that they will retain their references\r\n * and internal data until destroyed or re-added to a Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Scene2D.Camera|Phaser.Cameras.Scene2D.Camera[])} camera - The Camera, or an array of Cameras, to be removed from this Camera Manager.\r\n * @param {boolean} [runDestroy=true] - Automatically call `Camera.destroy` on each Camera removed from this Camera Manager.\r\n * \r\n * @return {integer} The total number of Cameras removed.\r\n */\r\n remove: function (camera, runDestroy)\r\n {\r\n if (runDestroy === undefined) { runDestroy = true; }\r\n\r\n if (!Array.isArray(camera))\r\n {\r\n camera = [ camera ];\r\n }\r\n\r\n var total = 0;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < camera.length; i++)\r\n {\r\n var index = cameras.indexOf(camera[i]);\r\n\r\n if (index !== -1)\r\n {\r\n if (runDestroy)\r\n {\r\n cameras[index].destroy();\r\n }\r\n\r\n cameras.splice(index, 1);\r\n\r\n total++;\r\n }\r\n }\r\n\r\n if (!this.main && cameras[0])\r\n {\r\n this.main = cameras[0];\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * The internal render method. This is called automatically by the Scene and should not be invoked directly.\r\n * \r\n * It will iterate through all local cameras and render them in turn, as long as they're visible and have\r\n * an alpha level > 0.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#render\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera.\r\n * @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.\r\n * @param {number} interpolation - Interpolation value. Reserved for future use.\r\n */\r\n render: function (renderer, children, interpolation)\r\n {\r\n var scene = this.scene;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.alpha > 0)\r\n {\r\n // Hard-coded to 1 for now\r\n camera.preRender(1);\r\n\r\n renderer.render(scene, children, interpolation, camera);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets this Camera Manager.\r\n * \r\n * This will iterate through all current Cameras, destroying them all, then it will reset the\r\n * cameras array, reset the ID counter and create 1 new single camera using the default values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resetAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The freshly created main Camera.\r\n */\r\n resetAll: function ()\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n this.main = this.add();\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * The main update loop. Called automatically when the Scene steps.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#onResize\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution, previousWidth, previousHeight)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var cam = this.cameras[i];\r\n\r\n // if camera is at 0x0 and was the size of the previous game size, then we can safely assume it\r\n // should be updated to match the new game size too\r\n\r\n if (cam._x === 0 && cam._y === 0 && cam._width === previousWidth && cam._height === previousHeight)\r\n {\r\n cam.setSize(baseSize.width, baseSize.height);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resizes all cameras to the given dimensions.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resize\r\n * @since 3.2.0\r\n *\r\n * @param {number} width - The new width of the camera.\r\n * @param {number} height - The new height of the camera.\r\n */\r\n resize: function (width, height)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].setSize(width, height);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.main = undefined;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.default.destroy();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager', CameraManager, 'cameras');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/CameraManager.js?")},"./node_modules/phaser/src/cameras/2d/effects/Fade.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Fade effect.\r\n *\r\n * This effect will fade the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is faded. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Fade\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Fade = new Class({\r\n\r\n initialize:\r\n\r\n function Fade (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * Has this effect finished running?\r\n *\r\n * This is different from `isRunning` because it remains set to `true` when the effect is over,\r\n * until the effect is either reset or started again.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isComplete\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isComplete = false;\r\n\r\n /**\r\n * The direction of the fade.\r\n * `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#direction\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.direction = true;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFadeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Fades the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.5.0\r\n *\r\n * @param {boolean} [direction=true] - The direction of the fade. `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFadeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (direction, duration, red, green, blue, force, callback, context)\r\n {\r\n if (direction === undefined) { direction = true; }\r\n if (duration === undefined) { duration = 1000; }\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.isComplete = false;\r\n this.duration = duration;\r\n this.direction = direction;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = (direction) ? Number.MIN_VALUE : 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n var eventName = (direction) ? Events.FADE_OUT_START : Events.FADE_IN_START;\r\n\r\n this.camera.emit(eventName, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = (this.direction) ? this.progress : 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.alpha = (this.direction) ? 1 : 0;\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n this.isComplete = true;\r\n\r\n var eventName = (this.direction) ? Events.FADE_OUT_COMPLETE : Events.FADE_IN_COMPLETE;\r\n\r\n this.camera.emit(eventName, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n this.isComplete = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Fade;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Fade.js?")},"./node_modules/phaser/src/cameras/2d/effects/Flash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Flash effect.\r\n *\r\n * This effect will flash the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is flashed. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Flash\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Flash = new Class({\r\n\r\n initialize:\r\n\r\n function Flash (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFlashCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Flashes the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFlashCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, red, green, blue, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 250; }\r\n if (red === undefined) { red = 255; }\r\n if (green === undefined) { green = 255; }\r\n if (blue === undefined) { blue = 255; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.FLASH_START, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.FLASH_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Flash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Flash.js?")},"./node_modules/phaser/src/cameras/2d/effects/Pan.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Pan effect.\r\n *\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * Only the camera scroll is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Pan\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Pan = new Class({\r\n\r\n initialize:\r\n\r\n function Pan (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting scroll coordinates to pan the camera from.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#source\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.source = new Vector2();\r\n\r\n /**\r\n * The constantly updated value based on zoom.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#current\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.current = new Vector2();\r\n\r\n /**\r\n * The destination scroll coordinates to pan the camera to.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#destination\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.destination = new Vector2();\r\n\r\n /**\r\n * The ease function to use during the pan.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraPanCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#start\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (x, y, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source.set(cam.scrollX, cam.scrollY);\r\n\r\n // Destination\r\n this.destination.set(x, y);\r\n\r\n // Zoom factored version\r\n cam.getScroll(x, y, this.current);\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.PAN_START, this.camera, this, duration, x, y);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n var progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n this.progress = progress;\r\n\r\n var cam = this.camera;\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var v = this.ease(progress);\r\n\r\n cam.getScroll(this.destination.x, this.destination.y, this.current);\r\n\r\n var x = this.source.x + ((this.current.x - this.source.x) * v);\r\n var y = this.source.y + ((this.current.y - this.source.y) * v);\r\n\r\n cam.setScroll(x, y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, x, y);\r\n }\r\n }\r\n else\r\n {\r\n cam.centerOn(this.destination.x, this.destination.y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, cam.scrollX, cam.scrollY);\r\n }\r\n \r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.PAN_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.source = null;\r\n this.destination = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Pan.js?')},"./node_modules/phaser/src/cameras/2d/effects/Shake.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Shake effect.\r\n *\r\n * This effect will shake the camera viewport by a random amount, bounded by the specified intensity, each frame.\r\n *\r\n * Only the camera viewport is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Shake\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Shake = new Class({\r\n\r\n initialize:\r\n\r\n function Shake (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The intensity of the effect. Use small float values. The default when the effect starts is 0.05.\r\n * This is a Vector2 object, allowing you to control the shake intensity independently across x and y.\r\n * You can modify this value while the effect is active to create more varied shake effects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#intensity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.5.0\r\n */\r\n this.intensity = new Vector2();\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * How much to offset the camera by horizontally.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetX = 0;\r\n\r\n /**\r\n * How much to offset the camera by vertically.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetY = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraShakeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#start\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraShakeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, intensity, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 100; }\r\n if (intensity === undefined) { intensity = 0.05; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n if (typeof intensity === \'number\')\r\n {\r\n this.intensity.set(intensity);\r\n }\r\n else\r\n {\r\n this.intensity.set(intensity.x, intensity.y);\r\n }\r\n\r\n this._elapsed = 0;\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.SHAKE_START, this.camera, this, duration, intensity);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The pre-render step for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#preRender\r\n * @since 3.5.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.isRunning)\r\n {\r\n this.camera.matrix.translate(this._offsetX, this._offsetY);\r\n }\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var intensity = this.intensity;\r\n var width = this.camera._cw;\r\n var height = this.camera._ch;\r\n var zoom = this.camera.zoom;\r\n\r\n this._offsetX = (Math.random() * intensity.x * width * 2 - intensity.x * width) * zoom;\r\n this._offsetY = (Math.random() * intensity.y * height * 2 - intensity.y * height) * zoom;\r\n\r\n if (this.camera.roundPixels)\r\n {\r\n this._offsetX = Math.round(this._offsetX);\r\n this._offsetY = Math.round(this._offsetY);\r\n }\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.SHAKE_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.intensity = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shake;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Shake.js?')},"./node_modules/phaser/src/cameras/2d/effects/Zoom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Zoom effect.\r\n *\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Zoom\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Zoom = new Class({\r\n\r\n initialize:\r\n\r\n function Zoom (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting zoom value;\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#source\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.source = 1;\r\n\r\n /**\r\n * The destination zoom value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#destination\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.destination = 1;\r\n\r\n /**\r\n * The ease function to use during the zoom.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraZoomCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#start\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the zoom effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraZoomCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * and the current camera zoom value.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (zoom, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source = cam.zoom;\r\n\r\n // Zooming to\r\n this.destination = zoom;\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.ZOOM_START, this.camera, this, duration, zoom);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.camera.zoom = this.source + ((this.destination - this.source) * this.ease(this.progress));\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.camera.zoom);\r\n }\r\n }\r\n else\r\n {\r\n this.camera.zoom = this.destination;\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.destination);\r\n }\r\n\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.ZOOM_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zoom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Zoom.js?')},"./node_modules/phaser/src/cameras/2d/effects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Effects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Fade: __webpack_require__(/*! ./Fade */ "./node_modules/phaser/src/cameras/2d/effects/Fade.js"),\r\n Flash: __webpack_require__(/*! ./Flash */ "./node_modules/phaser/src/cameras/2d/effects/Flash.js"),\r\n Pan: __webpack_require__(/*! ./Pan */ "./node_modules/phaser/src/cameras/2d/effects/Pan.js"),\r\n Shake: __webpack_require__(/*! ./Shake */ "./node_modules/phaser/src/cameras/2d/effects/Shake.js"),\r\n Zoom: __webpack_require__(/*! ./Zoom */ "./node_modules/phaser/src/cameras/2d/effects/Zoom.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/index.js?')},"./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Destroy Camera Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is destroyed by the Camera Manager.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed.\r\n */\r\nmodule.exports = 'cameradestroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeincomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeincomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeinstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeinstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutcomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeoutcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeoutstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'cameraflashcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'cameraflashstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerapancomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} x - The destination scroll x coordinate.\r\n * @param {number} y - The destination scroll y coordinate.\r\n */\r\nmodule.exports = 'camerapanstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Post-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance after is has finished rendering.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('postrender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that has finished rendering to a texture.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pre-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is about to render.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('prerender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that is about to render to a texture.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerashakecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} intensity - The intensity of the effect.\r\n */\r\nmodule.exports = 'camerashakestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerazoomcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} zoom - The destination zoom value.\r\n */\r\nmodule.exports = 'camerazoomstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js"),\r\n FADE_IN_COMPLETE: __webpack_require__(/*! ./FADE_IN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js"),\r\n FADE_IN_START: __webpack_require__(/*! ./FADE_IN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js"),\r\n FADE_OUT_COMPLETE: __webpack_require__(/*! ./FADE_OUT_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js"),\r\n FADE_OUT_START: __webpack_require__(/*! ./FADE_OUT_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js"),\r\n FLASH_COMPLETE: __webpack_require__(/*! ./FLASH_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js"),\r\n FLASH_START: __webpack_require__(/*! ./FLASH_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js"),\r\n PAN_COMPLETE: __webpack_require__(/*! ./PAN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js"),\r\n PAN_START: __webpack_require__(/*! ./PAN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js"),\r\n SHAKE_COMPLETE: __webpack_require__(/*! ./SHAKE_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js"),\r\n SHAKE_START: __webpack_require__(/*! ./SHAKE_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js"),\r\n ZOOM_COMPLETE: __webpack_require__(/*! ./ZOOM_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js"),\r\n ZOOM_START: __webpack_require__(/*! ./ZOOM_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/index.js?')},"./node_modules/phaser/src/cameras/2d/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/src/cameras/2d/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/src/cameras/2d/CameraManager.js"),\r\n Effects: __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cameras/2d/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/index.js?')},"./node_modules/phaser/src/cameras/controls/FixedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Fixed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n *\r\n * ```javascript\r\n * var camControl = new FixedKeyControl({\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * speed: float OR { x: 0, y: 0 }\r\n * });\r\n * ```\r\n *\r\n * Movement is precise and has no 'smoothing' applied to it.\r\n *\r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class FixedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.FixedKeyControlConfig} config - The Fixed Key Control configuration object.\r\n */\r\nvar FixedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function FixedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedX = 0;\r\n\r\n /**\r\n * The vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedY = 0;\r\n\r\n var speed = GetValue(config, 'speed', null);\r\n\r\n if (typeof speed === 'number')\r\n {\r\n this.speedX = speed;\r\n this.speedY = speed;\r\n }\r\n else\r\n {\r\n this.speedX = GetValue(config, 'speed.x', 0);\r\n this.speedY = GetValue(config, 'speed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the current zoom level.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n cam.scrollY -= ((this.speedY * delta) | 0);\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n cam.scrollY += ((this.speedY * delta) | 0);\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n cam.scrollX -= ((this.speedX * delta) | 0);\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n cam.scrollX += ((this.speedX * delta) | 0);\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n cam.zoom -= this.zoomSpeed;\r\n\r\n if (cam.zoom < 0.1)\r\n {\r\n cam.zoom = 0.1;\r\n }\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n cam.zoom += this.zoomSpeed;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FixedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/FixedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Smoothed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n * Unlike the Fixed Camera Control you can also provide physics values for acceleration, drag and maxSpeed for smoothing effects.\r\n *\r\n * ```javascript\r\n * var controlConfig = {\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * up: cursors.up,\r\n * down: cursors.down,\r\n * zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q),\r\n * zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E),\r\n * zoomSpeed: 0.02,\r\n * acceleration: 0.06,\r\n * drag: 0.0005,\r\n * maxSpeed: 1.0\r\n * };\r\n * ```\r\n * \r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class SmoothedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.SmoothedKeyControlConfig} config - The Smoothed Key Control configuration object.\r\n */\r\nvar SmoothedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function SmoothedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelX = 0;\r\n\r\n /**\r\n * The vertical acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelY = 0;\r\n\r\n var accel = GetValue(config, 'acceleration', null);\r\n\r\n if (typeof accel === 'number')\r\n {\r\n this.accelX = accel;\r\n this.accelY = accel;\r\n }\r\n else\r\n {\r\n this.accelX = GetValue(config, 'acceleration.x', 0);\r\n this.accelY = GetValue(config, 'acceleration.y', 0);\r\n }\r\n\r\n /**\r\n * The horizontal drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragX = 0;\r\n\r\n /**\r\n * The vertical drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragY = 0;\r\n\r\n var drag = GetValue(config, 'drag', null);\r\n\r\n if (typeof drag === 'number')\r\n {\r\n this.dragX = drag;\r\n this.dragY = drag;\r\n }\r\n else\r\n {\r\n this.dragX = GetValue(config, 'drag.x', 0);\r\n this.dragY = GetValue(config, 'drag.y', 0);\r\n }\r\n\r\n /**\r\n * The maximum horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedX = 0;\r\n\r\n /**\r\n * The maximum vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedY = 0;\r\n\r\n var maxSpeed = GetValue(config, 'maxSpeed', null);\r\n\r\n if (typeof maxSpeed === 'number')\r\n {\r\n this.maxSpeedX = maxSpeed;\r\n this.maxSpeedY = maxSpeed;\r\n }\r\n else\r\n {\r\n this.maxSpeedX = GetValue(config, 'maxSpeed.x', 0);\r\n this.maxSpeedY = GetValue(config, 'maxSpeed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedX = 0;\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedY = 0;\r\n\r\n /**\r\n * Internal property to track the zoom of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n // Apply Deceleration\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX -= this.dragX * delta;\r\n\r\n if (this._speedX < 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n else if (this._speedX < 0)\r\n {\r\n this._speedX += this.dragX * delta;\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY -= this.dragY * delta;\r\n\r\n if (this._speedY < 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n else if (this._speedY < 0)\r\n {\r\n this._speedY += this.dragY * delta;\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n\r\n // Check for keys\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n this._speedY += this.accelY;\r\n\r\n if (this._speedY > this.maxSpeedY)\r\n {\r\n this._speedY = this.maxSpeedY;\r\n }\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n this._speedY -= this.accelY;\r\n\r\n if (this._speedY < -this.maxSpeedY)\r\n {\r\n this._speedY = -this.maxSpeedY;\r\n }\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n this._speedX += this.accelX;\r\n\r\n if (this._speedX > this.maxSpeedX)\r\n {\r\n this._speedX = this.maxSpeedX;\r\n }\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n this._speedX -= this.accelX;\r\n\r\n if (this._speedX < -this.maxSpeedX)\r\n {\r\n this._speedX = -this.maxSpeedX;\r\n }\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n this._zoom = -this.zoomSpeed;\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n this._zoom = this.zoomSpeed;\r\n }\r\n else\r\n {\r\n this._zoom = 0;\r\n }\r\n\r\n // Apply to Camera\r\n\r\n if (this._speedX !== 0)\r\n {\r\n cam.scrollX -= ((this._speedX * delta) | 0);\r\n }\r\n\r\n if (this._speedY !== 0)\r\n {\r\n cam.scrollY -= ((this._speedY * delta) | 0);\r\n }\r\n\r\n if (this._zoom !== 0)\r\n {\r\n cam.zoom += this._zoom;\r\n\r\n if (cam.zoom < 0.001)\r\n {\r\n cam.zoom = 0.001;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SmoothedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Controls\r\n */\r\n\r\nmodule.exports = {\r\n\r\n FixedKeyControl: __webpack_require__(/*! ./FixedKeyControl */ "./node_modules/phaser/src/cameras/controls/FixedKeyControl.js"),\r\n SmoothedKeyControl: __webpack_require__(/*! ./SmoothedKeyControl */ "./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/index.js?')},"./node_modules/phaser/src/cameras/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Cameras\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Controls: __webpack_require__(/*! ./controls */ "./node_modules/phaser/src/cameras/controls/index.js"),\r\n Scene2D: __webpack_require__(/*! ./2d */ "./node_modules/phaser/src/cameras/2d/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/index.js?')},"./node_modules/phaser/src/const.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n * \r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.19.0',\r\n\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\"),\r\n\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\"),\r\n\r\n /**\r\n * AUTO Detect Renderer.\r\n * \r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Canvas Renderer.\r\n * \r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * WebGL Renderer.\r\n * \r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * Headless Renderer.\r\n * \r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n * \r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.NONE\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.UP\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/const.js?")},"./node_modules/phaser/src/core/Config.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Device = __webpack_require__(/*! ../device */ \"./node_modules/phaser/src/device/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PhaserMath = __webpack_require__(/*! ../math/ */ \"./node_modules/phaser/src/math/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The active game configuration settings, parsed from a {@link Phaser.Types.Core.GameConfig} object.\r\n *\r\n * @class Config\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n *\r\n * @see Phaser.Game#config\r\n */\r\nvar Config = new Class({\r\n\r\n initialize:\r\n\r\n function Config (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var defaultBannerColor = [\r\n '#ff0000',\r\n '#ffff00',\r\n '#00ff00',\r\n '#00ffff',\r\n '#000000'\r\n ];\r\n\r\n var defaultBannerTextColor = '#ffffff';\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#width - The width of the underlying canvas, in pixels.\r\n */\r\n this.width = GetValue(config, 'width', 1024);\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#height - The height of the underlying canvas, in pixels.\r\n */\r\n this.height = GetValue(config, 'height', 768);\r\n\r\n /**\r\n * @const {(Phaser.Scale.ZoomType|integer)} Phaser.Core.Config#zoom - The zoom factor, as used by the Scale Manager.\r\n */\r\n this.zoom = GetValue(config, 'zoom', 1);\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#resolution - The canvas device pixel resolution. Currently un-used.\r\n */\r\n this.resolution = GetValue(config, 'resolution', 1);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected.\r\n */\r\n this.parent = GetValue(config, 'parent', undefined);\r\n\r\n /**\r\n * @const {Phaser.Scale.ScaleModeType} Phaser.Core.Config#scaleMode - The scale mode as used by the Scale Manager. The default is zero, which is no scaling.\r\n */\r\n this.scaleMode = GetValue(config, 'scaleMode', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#expandParent - Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?\r\n */\r\n this.expandParent = GetValue(config, 'expandParent', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#autoRound - Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.\r\n */\r\n this.autoRound = GetValue(config, 'autoRound', false);\r\n\r\n /**\r\n * @const {Phaser.Scale.CenterType} Phaser.Core.Config#autoCenter - Automatically center the canvas within the parent?\r\n */\r\n this.autoCenter = GetValue(config, 'autoCenter', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#resizeInterval - How many ms should elapse before checking if the browser size has changed?\r\n */\r\n this.resizeInterval = GetValue(config, 'resizeInterval', 500);\r\n\r\n /**\r\n * @const {?(HTMLElement|string)} Phaser.Core.Config#fullscreenTarget - The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.\r\n */\r\n this.fullscreenTarget = GetValue(config, 'fullscreenTarget', null);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minWidth - The minimum width, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minWidth = GetValue(config, 'minWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxWidth - The maximum width, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxWidth = GetValue(config, 'maxWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minHeight - The minimum height, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minHeight = GetValue(config, 'minHeight', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxHeight - The maximum height, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxHeight = GetValue(config, 'maxHeight', 0);\r\n\r\n // Scale Manager - Anything set in here over-rides anything set above\r\n\r\n var scaleConfig = GetValue(config, 'scale', null);\r\n\r\n if (scaleConfig)\r\n {\r\n this.width = GetValue(scaleConfig, 'width', this.width);\r\n this.height = GetValue(scaleConfig, 'height', this.height);\r\n this.zoom = GetValue(scaleConfig, 'zoom', this.zoom);\r\n this.resolution = GetValue(scaleConfig, 'resolution', this.resolution);\r\n this.parent = GetValue(scaleConfig, 'parent', this.parent);\r\n this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode);\r\n this.expandParent = GetValue(scaleConfig, 'expandParent', this.expandParent);\r\n this.autoRound = GetValue(scaleConfig, 'autoRound', this.autoRound);\r\n this.autoCenter = GetValue(scaleConfig, 'autoCenter', this.autoCenter);\r\n this.resizeInterval = GetValue(scaleConfig, 'resizeInterval', this.resizeInterval);\r\n this.fullscreenTarget = GetValue(scaleConfig, 'fullscreenTarget', this.fullscreenTarget);\r\n this.minWidth = GetValue(scaleConfig, 'min.width', this.minWidth);\r\n this.maxWidth = GetValue(scaleConfig, 'max.width', this.maxWidth);\r\n this.minHeight = GetValue(scaleConfig, 'min.height', this.minHeight);\r\n this.maxHeight = GetValue(scaleConfig, 'max.height', this.maxHeight);\r\n }\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#renderType - Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)\r\n */\r\n this.renderType = GetValue(config, 'type', CONST.AUTO);\r\n\r\n /**\r\n * @const {?HTMLCanvasElement} Phaser.Core.Config#canvas - Force Phaser to use your own Canvas element instead of creating one.\r\n */\r\n this.canvas = GetValue(config, 'canvas', null);\r\n\r\n /**\r\n * @const {?(CanvasRenderingContext2D|WebGLRenderingContext)} Phaser.Core.Config#context - Force Phaser to use your own Canvas context instead of creating one.\r\n */\r\n this.context = GetValue(config, 'context', null);\r\n\r\n /**\r\n * @const {?string} Phaser.Core.Config#canvasStyle - Optional CSS attributes to be set on the canvas object created by the renderer.\r\n */\r\n this.canvasStyle = GetValue(config, 'canvasStyle', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#customEnvironment - Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.\r\n */\r\n this.customEnvironment = GetValue(config, 'customEnvironment', false);\r\n\r\n /**\r\n * @const {?object} Phaser.Core.Config#sceneConfig - The default Scene configuration object.\r\n */\r\n this.sceneConfig = GetValue(config, 'scene', null);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#seed - A seed which the Random Data Generator will use. If not given, a dynamic seed based on the time is used.\r\n */\r\n this.seed = GetValue(config, 'seed', [ (Date.now() * Math.random()).toString() ]);\r\n\r\n PhaserMath.RND = new PhaserMath.RandomDataGenerator(this.seed);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameTitle - The title of the game.\r\n */\r\n this.gameTitle = GetValue(config, 'title', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameURL - The URL of the game.\r\n */\r\n this.gameURL = GetValue(config, 'url', 'https://phaser.io');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameVersion - The version of the game.\r\n */\r\n this.gameVersion = GetValue(config, 'version', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#autoFocus - If `true` the window will automatically be given focus immediately and on any future mousedown event.\r\n */\r\n this.autoFocus = GetValue(config, 'autoFocus', true);\r\n\r\n // DOM Element Container\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domCreateContainer - Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.\r\n */\r\n this.domCreateContainer = GetValue(config, 'dom.createContainer', false);\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domBehindCanvas - Should the DOM Container that is created (if `dom.createContainer` is true) be positioned behind (true) or over the top (false, the default) of the game canvas?\r\n */\r\n this.domBehindCanvas = GetValue(config, 'dom.behindCanvas', false);\r\n\r\n // Input\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputKeyboard - Enable the Keyboard Plugin. This can be disabled in games that don't need keyboard input.\r\n */\r\n this.inputKeyboard = GetValue(config, 'input.keyboard', true);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputKeyboardEventTarget - The DOM Target to listen for keyboard events on. Defaults to `window` if not specified.\r\n */\r\n this.inputKeyboardEventTarget = GetValue(config, 'input.keyboard.target', window);\r\n\r\n /**\r\n * @const {?integer[]} Phaser.Core.Config#inputKeyboardCapture - `preventDefault` will be called on every non-modified key which has a key code in this array. By default, it is empty.\r\n */\r\n this.inputKeyboardCapture = GetValue(config, 'input.keyboard.capture', []);\r\n\r\n /**\r\n * @const {(boolean|object)} Phaser.Core.Config#inputMouse - Enable the Mouse Plugin. This can be disabled in games that don't need mouse input.\r\n */\r\n this.inputMouse = GetValue(config, 'input.mouse', true);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputMouseEventTarget - The DOM Target to listen for mouse events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputMouseEventTarget = GetValue(config, 'input.mouse.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputMouseCapture - Should mouse events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputMouseCapture = GetValue(config, 'input.mouse.capture', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouch - Enable the Touch Plugin. This can be disabled in games that don't need touch input.\r\n */\r\n this.inputTouch = GetValue(config, 'input.touch', Device.input.touch);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputTouchEventTarget - The DOM Target to listen for touch events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputTouchEventTarget = GetValue(config, 'input.touch.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouchCapture - Should touch events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputTouchCapture = GetValue(config, 'input.touch.capture', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputActivePointers - The number of Pointer objects created by default. In a mouse-only, or non-multi touch game, you can leave this as 1.\r\n */\r\n this.inputActivePointers = GetValue(config, 'input.activePointers', 1);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputSmoothFactor - The smoothing factor to apply during Pointer movement. See {@link Phaser.Input.Pointer#smoothFactor}.\r\n */\r\n this.inputSmoothFactor = GetValue(config, 'input.smoothFactor', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputWindowEvents - Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.\r\n */\r\n this.inputWindowEvents = GetValue(config, 'input.windowEvents', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputGamepad - Enable the Gamepad Plugin. This can be disabled in games that don't need gamepad input.\r\n */\r\n this.inputGamepad = GetValue(config, 'input.gamepad', false);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputGamepadEventTarget - The DOM Target to listen for gamepad events on. Defaults to `window` if not specified.\r\n */\r\n this.inputGamepadEventTarget = GetValue(config, 'input.gamepad.target', window);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#disableContextMenu - Set to `true` to disable the right-click context menu.\r\n */\r\n this.disableContextMenu = GetValue(config, 'disableContextMenu', false);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.AudioConfig} Phaser.Core.Config#audio - The Audio Configuration object.\r\n */\r\n this.audio = GetValue(config, 'audio');\r\n\r\n // If you do: { banner: false } it won't display any banner at all\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hideBanner - Don't write the banner line to the console.log.\r\n */\r\n this.hideBanner = (GetValue(config, 'banner', null) === false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hidePhaser - Omit Phaser's name and version from the banner.\r\n */\r\n this.hidePhaser = GetValue(config, 'banner.hidePhaser', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#bannerTextColor - The color of the banner text.\r\n */\r\n this.bannerTextColor = GetValue(config, 'banner.text', defaultBannerTextColor);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#bannerBackgroundColor - The background colors of the banner.\r\n */\r\n this.bannerBackgroundColor = GetValue(config, 'banner.background', defaultBannerColor);\r\n\r\n if (this.gameTitle === '' && this.hidePhaser)\r\n {\r\n this.hideBanner = true;\r\n }\r\n\r\n /**\r\n * @const {?Phaser.Types.Core.FPSConfig} Phaser.Core.Config#fps - The Frame Rate Configuration object, as parsed by the Timestep class.\r\n */\r\n this.fps = GetValue(config, 'fps', null);\r\n\r\n // Renderer Settings\r\n // These can either be in a `render` object within the Config, or specified on their own\r\n\r\n var renderConfig = GetValue(config, 'render', config);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#antialias - When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.\r\n */\r\n this.antialias = GetValue(renderConfig, 'antialias', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#desynchronized - When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.\r\n */\r\n this.desynchronized = GetValue(renderConfig, 'desynchronized', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#roundPixels - Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.\r\n */\r\n this.roundPixels = GetValue(renderConfig, 'roundPixels', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#pixelArt - Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a linear filter mode).\r\n */\r\n this.pixelArt = GetValue(renderConfig, 'pixelArt', this.zoom !== 1);\r\n\r\n if (this.pixelArt)\r\n {\r\n this.antialias = false;\r\n this.roundPixels = true;\r\n }\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#transparent - Whether the game canvas will have a transparent background.\r\n */\r\n this.transparent = GetValue(renderConfig, 'transparent', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#clearBeforeRender - Whether the game canvas will be cleared between each rendering frame. You can disable this if you have a full-screen background image or game object.\r\n */\r\n this.clearBeforeRender = GetValue(renderConfig, 'clearBeforeRender', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#premultipliedAlpha - In WebGL mode, sets the drawing buffer to contain colors with pre-multiplied alpha.\r\n */\r\n this.premultipliedAlpha = GetValue(renderConfig, 'premultipliedAlpha', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#failIfMajorPerformanceCaveat - Let the browser abort creating a WebGL context if it judges performance would be unacceptable.\r\n */\r\n this.failIfMajorPerformanceCaveat = GetValue(renderConfig, 'failIfMajorPerformanceCaveat', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#powerPreference - \"high-performance\", \"low-power\" or \"default\". A hint to the browser on how much device power the game might use.\r\n */\r\n this.powerPreference = GetValue(renderConfig, 'powerPreference', 'default');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#batchSize - The default WebGL Batch size.\r\n */\r\n this.batchSize = GetValue(renderConfig, 'batchSize', 2000);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxLights - The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.\r\n */\r\n this.maxLights = GetValue(renderConfig, 'maxLights', 10);\r\n\r\n var bgc = GetValue(config, 'backgroundColor', 0);\r\n\r\n /**\r\n * @const {Phaser.Display.Color} Phaser.Core.Config#backgroundColor - The background color of the game canvas. The default is black. This value is ignored if `transparent` is set to `true`.\r\n */\r\n this.backgroundColor = ValueToColor(bgc);\r\n\r\n if (bgc === 0 && this.transparent)\r\n {\r\n this.backgroundColor.alpha = 0;\r\n }\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#preBoot - Called before Phaser boots. Useful for initializing anything not related to Phaser that Phaser may require while booting.\r\n */\r\n this.preBoot = GetValue(config, 'callbacks.preBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#postBoot - A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.\r\n */\r\n this.postBoot = GetValue(config, 'callbacks.postBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.PhysicsConfig} Phaser.Core.Config#physics - The Physics Configuration object.\r\n */\r\n this.physics = GetValue(config, 'physics', {});\r\n\r\n /**\r\n * @const {(boolean|string)} Phaser.Core.Config#defaultPhysicsSystem - The default physics system. It will be started for each scene. Either 'arcade', 'impact' or 'matter'.\r\n */\r\n this.defaultPhysicsSystem = GetValue(this.physics, 'default', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderBaseURL - A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.\r\n */\r\n this.loaderBaseURL = GetValue(config, 'loader.baseURL', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPath - A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.\r\n */\r\n this.loaderPath = GetValue(config, 'loader.path', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderMaxParallelDownloads - Maximum parallel downloads allowed for resources (Default to 32).\r\n */\r\n this.loaderMaxParallelDownloads = GetValue(config, 'loader.maxParallelDownloads', 32);\r\n\r\n /**\r\n * @const {(string|undefined)} Phaser.Core.Config#loaderCrossOrigin - 'anonymous', 'use-credentials', or `undefined`. If you're not making cross-origin requests, leave this as `undefined`. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes}.\r\n */\r\n this.loaderCrossOrigin = GetValue(config, 'loader.crossOrigin', undefined);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderResponseType - The response type of the XHR request, e.g. `blob`, `text`, etc.\r\n */\r\n this.loaderResponseType = GetValue(config, 'loader.responseType', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#loaderAsync - Should the XHR request use async or not?\r\n */\r\n this.loaderAsync = GetValue(config, 'loader.async', true);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderUser - Optional username for all XHR requests.\r\n */\r\n this.loaderUser = GetValue(config, 'loader.user', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPassword - Optional password for all XHR requests.\r\n */\r\n this.loaderPassword = GetValue(config, 'loader.password', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderTimeout - Optional XHR timeout value, in ms.\r\n */\r\n this.loaderTimeout = GetValue(config, 'loader.timeout', 0);\r\n\r\n /*\r\n * Allows `plugins` property to either be an array, in which case it just replaces\r\n * the default plugins like previously, or a config object.\r\n *\r\n * plugins: {\r\n * global: [\r\n * { key: 'TestPlugin', plugin: TestPlugin, start: true, data: { msg: 'The plugin is alive' } },\r\n * ],\r\n * scene: [\r\n * { key: 'WireFramePlugin', plugin: WireFramePlugin, systemKey: 'wireFramePlugin', sceneKey: 'wireframe' }\r\n * ],\r\n * default: [], OR\r\n * defaultMerge: [\r\n * 'ModPlayer'\r\n * ]\r\n * }\r\n */\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installGlobalPlugins - An array of global plugins to be installed.\r\n */\r\n this.installGlobalPlugins = [];\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installScenePlugins - An array of Scene level plugins to be installed.\r\n */\r\n this.installScenePlugins = [];\r\n\r\n var plugins = GetValue(config, 'plugins', null);\r\n var defaultPlugins = DefaultPlugins.DefaultScene;\r\n\r\n if (plugins)\r\n {\r\n // Old 3.7 array format?\r\n if (Array.isArray(plugins))\r\n {\r\n this.defaultPlugins = plugins;\r\n }\r\n else if (IsPlainObject(plugins))\r\n {\r\n this.installGlobalPlugins = GetFastValue(plugins, 'global', []);\r\n this.installScenePlugins = GetFastValue(plugins, 'scene', []);\r\n\r\n if (Array.isArray(plugins.default))\r\n {\r\n defaultPlugins = plugins.default;\r\n }\r\n else if (Array.isArray(plugins.defaultMerge))\r\n {\r\n defaultPlugins = defaultPlugins.concat(plugins.defaultMerge);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#defaultPlugins - The plugins installed into every Scene (in addition to CoreScene and Global).\r\n */\r\n this.defaultPlugins = defaultPlugins;\r\n\r\n // Default / Missing Images\r\n var pngPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg';\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#defaultImage - A base64 encoded PNG that will be used as the default blank texture.\r\n */\r\n this.defaultImage = GetValue(config, 'images.default', pngPrefix + 'AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg==');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#missingImage - A base64 encoded PNG that will be used as the default texture when a texture is assigned that is missing or not loaded.\r\n */\r\n this.missingImage = GetValue(config, 'images.missing', pngPrefix + 'CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==');\r\n\r\n if (window)\r\n {\r\n if (window.FORCE_WEBGL)\r\n {\r\n this.renderType = CONST.WEBGL;\r\n }\r\n else if (window.FORCE_CANVAS)\r\n {\r\n this.renderType = CONST.CANVAS;\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Config;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Config.js?")},"./node_modules/phaser/src/core/CreateRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasInterpolation = __webpack_require__(/*! ../display/canvas/CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar Features = __webpack_require__(/*! ../device/Features */ "./node_modules/phaser/src/device/Features.js");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the renderer it will use.\r\n *\r\n * Relies upon two webpack global flags to be defined: `WEBGL_RENDERER` and `CANVAS_RENDERER` during build time, but not at run-time.\r\n *\r\n * @function Phaser.Core.CreateRenderer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance on which the renderer will be set.\r\n */\r\nvar CreateRenderer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if ((config.customEnvironment || config.canvas) && config.renderType === CONST.AUTO)\r\n {\r\n throw new Error(\'Must set explicit renderType in custom environment\');\r\n }\r\n\r\n // Not a custom environment, didn\'t provide their own canvas and not headless, so determine the renderer:\r\n if (!config.customEnvironment && !config.canvas && config.renderType !== CONST.HEADLESS)\r\n {\r\n if (config.renderType === CONST.CANVAS || (config.renderType !== CONST.CANVAS && !Features.webGL))\r\n {\r\n if (Features.canvas)\r\n {\r\n // They requested Canvas and their browser supports it\r\n config.renderType = CONST.CANVAS;\r\n }\r\n else\r\n {\r\n throw new Error(\'Cannot create Canvas or WebGL context, aborting.\');\r\n }\r\n }\r\n else\r\n {\r\n // Game requested WebGL and browser says it supports it\r\n config.renderType = CONST.WEBGL;\r\n }\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasPool.disableSmoothing();\r\n }\r\n\r\n var baseSize = game.scale.baseSize;\r\n\r\n var width = baseSize.width;\r\n var height = baseSize.height;\r\n\r\n // Does the game config provide its own canvas element to use?\r\n if (config.canvas)\r\n {\r\n game.canvas = config.canvas;\r\n\r\n game.canvas.width = width;\r\n game.canvas.height = height;\r\n }\r\n else\r\n {\r\n game.canvas = CanvasPool.create(game, width, height, config.renderType);\r\n }\r\n\r\n // Does the game config provide some canvas css styles to use?\r\n if (config.canvasStyle)\r\n {\r\n game.canvas.style = config.canvasStyle;\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasInterpolation.setCrisp(game.canvas);\r\n }\r\n\r\n if (config.renderType === CONST.HEADLESS)\r\n {\r\n // Nothing more to do here\r\n return;\r\n }\r\n\r\n var CanvasRenderer;\r\n var WebGLRenderer;\r\n\r\n if (typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Let the config pick the renderer type, as both are included\r\n if (config.renderType === CONST.WEBGL)\r\n {\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n else\r\n {\r\n game.renderer = new CanvasRenderer(game);\r\n game.context = game.renderer.gameContext;\r\n }\r\n }\r\n\r\n if (typeof WEBGL_RENDERER && !typeof CANVAS_RENDERER)\r\n {\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Force the type to WebGL, regardless what was requested\r\n config.renderType = CONST.WEBGL;\r\n\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n\r\n if (!typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n\r\n // Force the type to Canvas, regardless what was requested\r\n config.renderType = CONST.CANVAS;\r\n\r\n game.renderer = new CanvasRenderer(game);\r\n\r\n game.context = game.renderer.gameContext;\r\n }\r\n};\r\n\r\nmodule.exports = CreateRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/CreateRenderer.js?')},"./node_modules/phaser/src/core/DebugHeader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the console.log debug header.\r\n *\r\n * You can customize or disable the header via the Game Config object.\r\n *\r\n * @function Phaser.Core.DebugHeader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance which will output this debug header.\r\n */\r\nvar DebugHeader = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (config.hideBanner)\r\n {\r\n return;\r\n }\r\n\r\n var renderType = 'WebGL';\r\n\r\n if (config.renderType === CONST.CANVAS)\r\n {\r\n renderType = 'Canvas';\r\n }\r\n else if (config.renderType === CONST.HEADLESS)\r\n {\r\n renderType = 'Headless';\r\n }\r\n\r\n var audioConfig = config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n var audioType;\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n audioType = 'Web Audio';\r\n }\r\n else if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n audioType = 'No Audio';\r\n }\r\n else\r\n {\r\n audioType = 'HTML5 Audio';\r\n }\r\n\r\n if (!game.device.browser.ie)\r\n {\r\n var c = '';\r\n var args = [ c ];\r\n\r\n if (Array.isArray(config.bannerBackgroundColor))\r\n {\r\n var lastColor;\r\n\r\n config.bannerBackgroundColor.forEach(function (color)\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('background: ' + color);\r\n\r\n lastColor = color;\r\n\r\n });\r\n\r\n // inject the text color\r\n args[args.length - 1] = 'color: ' + config.bannerTextColor + '; background: ' + lastColor;\r\n }\r\n else\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('color: ' + config.bannerTextColor + '; background: ' + config.bannerBackgroundColor);\r\n }\r\n\r\n // URL link background color (always white)\r\n args.push('background: #fff');\r\n\r\n if (config.gameTitle)\r\n {\r\n c = c.concat(config.gameTitle);\r\n\r\n if (config.gameVersion)\r\n {\r\n c = c.concat(' v' + config.gameVersion);\r\n }\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat(' / ');\r\n }\r\n }\r\n\r\n var fb = (typeof PLUGIN_FBINSTANT) ? '-FB' : '';\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat('Phaser v' + CONST.VERSION + fb + ' (' + renderType + ' | ' + audioType + ')');\r\n }\r\n\r\n c = c.concat(' %c ' + config.gameURL);\r\n\r\n // Inject the new string back into the args array\r\n args[0] = c;\r\n\r\n console.log.apply(console, args);\r\n }\r\n else if (window['console'])\r\n {\r\n console.log('Phaser v' + CONST.VERSION + ' / https://phaser.io');\r\n }\r\n};\r\n\r\nmodule.exports = DebugHeader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/DebugHeader.js?")},"./node_modules/phaser/src/core/Game.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js");\r\nvar AnimationManager = __webpack_require__(/*! ../animations/AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js");\r\nvar CacheManager = __webpack_require__(/*! ../cache/CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Config = __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js");\r\nvar CreateDOMContainer = __webpack_require__(/*! ../dom/CreateDOMContainer */ "./node_modules/phaser/src/dom/CreateDOMContainer.js");\r\nvar CreateRenderer = __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar DebugHeader = __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js");\r\nvar Device = __webpack_require__(/*! ../device */ "./node_modules/phaser/src/device/index.js");\r\nvar DOMContentLoaded = __webpack_require__(/*! ../dom/DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar InputManager = __webpack_require__(/*! ../input/InputManager */ "./node_modules/phaser/src/input/InputManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar PluginManager = __webpack_require__(/*! ../plugins/PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js");\r\nvar ScaleManager = __webpack_require__(/*! ../scale/ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js");\r\nvar SceneManager = __webpack_require__(/*! ../scene/SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js");\r\nvar TextureEvents = __webpack_require__(/*! ../textures/events */ "./node_modules/phaser/src/textures/events/index.js");\r\nvar TextureManager = __webpack_require__(/*! ../textures/TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js");\r\nvar TimeStep = __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js");\r\nvar VisibilityHandler = __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js");\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n var SoundManagerCreator = __webpack_require__(/*! ../sound/SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n var FacebookInstantGamesPlugin = __webpack_require__(/*! ../../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n/**\r\n * @classdesc\r\n * The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible\r\n * for handling the boot process, parsing the configuration values, creating the renderer,\r\n * and setting-up all of the global Phaser systems, such as sound and input.\r\n * Once that is complete it will start the Scene Manager and then begin the main game loop.\r\n *\r\n * You should generally avoid accessing any of the systems created by Game, and instead use those\r\n * made available to you via the Phaser.Scene Systems class instead.\r\n *\r\n * @class Game\r\n * @memberof Phaser\r\n * @constructor\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n */\r\nvar Game = new Class({\r\n\r\n initialize:\r\n\r\n function Game (config)\r\n {\r\n /**\r\n * The parsed Game Configuration object.\r\n *\r\n * The values stored within this object are read-only and should not be changed at run-time.\r\n *\r\n * @name Phaser.Game#config\r\n * @type {Phaser.Core.Config}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.config = new Config(config);\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Game#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = null;\r\n\r\n /**\r\n * A reference to an HTML Div Element used as the DOM Element Container.\r\n * \r\n * Only set if `createDOMContainer` is `true` in the game config (by default it is `false`) and\r\n * if you provide a parent element to insert the Phaser Game inside.\r\n *\r\n * See the DOM Element Game Object for more details.\r\n *\r\n * @name Phaser.Game#domContainer\r\n * @type {HTMLDivElement}\r\n * @since 3.17.0\r\n */\r\n this.domContainer = null;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n * This is created automatically by Phaser unless you provide a `canvas` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this game is rendering to.\r\n * If the game is running under Canvas it will be a 2d Canvas Rendering Context.\r\n * If the game is running under WebGL it will be a WebGL Rendering Context.\r\n * This context is created automatically by Phaser unless you provide a `context` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#context\r\n * @type {(CanvasRenderingContext2D|WebGLRenderingContext)}\r\n * @since 3.0.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * A flag indicating when this Game instance has finished its boot process.\r\n *\r\n * @name Phaser.Game#isBooted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * A flag indicating if this Game is currently running its game step or not.\r\n *\r\n * @name Phaser.Game#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * An Event Emitter which is used to broadcast game-level events from the global systems.\r\n *\r\n * @name Phaser.Game#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * An instance of the Animation Manager.\r\n *\r\n * The Animation Manager is a global system responsible for managing all animations used within your game.\r\n *\r\n * @name Phaser.Game#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims = new AnimationManager(this);\r\n\r\n /**\r\n * An instance of the Texture Manager.\r\n *\r\n * The Texture Manager is a global system responsible for managing all textures being used by your game.\r\n *\r\n * @name Phaser.Game#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures = new TextureManager(this);\r\n\r\n /**\r\n * An instance of the Cache Manager.\r\n *\r\n * The Cache Manager is a global system responsible for caching, accessing and releasing external game assets.\r\n *\r\n * @name Phaser.Game#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache = new CacheManager(this);\r\n\r\n /**\r\n * An instance of the Data Manager\r\n *\r\n * @name Phaser.Game#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry = new DataManager(this);\r\n\r\n /**\r\n * An instance of the Input Manager.\r\n *\r\n * The Input Manager is a global system responsible for the capture of browser-level input events.\r\n *\r\n * @name Phaser.Game#input\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.input = new InputManager(this, this.config);\r\n\r\n /**\r\n * An instance of the Scene Manager.\r\n *\r\n * The Scene Manager is a global system responsible for creating, modifying and updating the Scenes in your game.\r\n *\r\n * @name Phaser.Game#scene\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.scene = new SceneManager(this, this.config.sceneConfig);\r\n\r\n /**\r\n * A reference to the Device inspector.\r\n *\r\n * Contains information about the device running this game, such as OS, browser vendor and feature support.\r\n * Used by various systems to determine capabilities and code paths.\r\n *\r\n * @name Phaser.Game#device\r\n * @type {Phaser.DeviceConf}\r\n * @since 3.0.0\r\n */\r\n this.device = Device;\r\n\r\n /**\r\n * An instance of the Scale Manager.\r\n *\r\n * The Scale Manager is a global system responsible for handling scaling of the game canvas.\r\n *\r\n * @name Phaser.Game#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scale = new ScaleManager(this, this.config);\r\n\r\n /**\r\n * An instance of the base Sound Manager.\r\n *\r\n * The Sound Manager is a global system responsible for the playback and updating of all audio in your game.\r\n * \r\n * You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag.\r\n *\r\n * @name Phaser.Game#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound = null;\r\n\r\n if (typeof FEATURE_SOUND)\r\n {\r\n this.sound = SoundManagerCreator.create(this);\r\n }\r\n\r\n /**\r\n * An instance of the Time Step.\r\n *\r\n * The Time Step is a global system responsible for setting-up and responding to the browser frame events, processing\r\n * them and calculating delta values. It then automatically calls the game step.\r\n *\r\n * @name Phaser.Game#loop\r\n * @type {Phaser.Core.TimeStep}\r\n * @since 3.0.0\r\n */\r\n this.loop = new TimeStep(this, this.config.fps);\r\n\r\n /**\r\n * An instance of the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Game#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins = new PluginManager(this, this.config);\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * An instance of the Facebook Instant Games Plugin.\r\n * \r\n * This will only be available if the plugin has been built into Phaser,\r\n * or you\'re using the special Facebook Instant Games custom build.\r\n *\r\n * @name Phaser.Game#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.facebook = new FacebookInstantGamesPlugin(this);\r\n }\r\n\r\n /**\r\n * Is this Game pending destruction at the start of the next frame?\r\n *\r\n * @name Phaser.Game#pendingDestroy\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.pendingDestroy = false;\r\n\r\n /**\r\n * Remove the Canvas once the destroy is over?\r\n *\r\n * @name Phaser.Game#removeCanvas\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.removeCanvas = false;\r\n\r\n /**\r\n * Remove everything when the game is destroyed.\r\n * You cannot create a new Phaser instance on the same web page after doing this.\r\n *\r\n * @name Phaser.Game#noReturn\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.noReturn = false;\r\n\r\n /**\r\n * Does the window the game is running in currently have focus or not?\r\n * This is modified by the VisibilityHandler.\r\n *\r\n * @name Phaser.Game#hasFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.9.0\r\n */\r\n this.hasFocus = false;\r\n\r\n // Wait for the DOM Ready event, then call boot.\r\n DOMContentLoaded(this.boot.bind(this));\r\n },\r\n\r\n /**\r\n * This method is called automatically when the DOM is ready. It is responsible for creating the renderer,\r\n * displaying the Debug Header, adding the game canvas to the DOM and emitting the \'boot\' event.\r\n * It listens for a \'ready\' event from the base systems and once received it will call `Game.start`.\r\n *\r\n * @method Phaser.Game#boot\r\n * @protected\r\n * @fires Phaser.Core.Events#BOOT\r\n * @listens Phaser.Textures.Events#READY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n if (!PluginCache.hasCore(\'EventEmitter\'))\r\n {\r\n console.warn(\'Aborting. Core Plugins missing.\');\r\n return;\r\n }\r\n\r\n this.isBooted = true;\r\n\r\n this.config.preBoot(this);\r\n\r\n this.scale.preBoot();\r\n\r\n CreateRenderer(this);\r\n\r\n CreateDOMContainer(this);\r\n\r\n DebugHeader(this);\r\n\r\n AddToDOM(this.canvas, this.config.parent);\r\n\r\n // The Texture Manager has to wait on a couple of non-blocking events before it\'s fully ready.\r\n // So it will emit this internal event when done:\r\n this.textures.once(TextureEvents.READY, this.texturesReady, this);\r\n\r\n this.events.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * Called automatically when the Texture Manager has finished setting up and preparing the\r\n * default textures.\r\n *\r\n * @method Phaser.Game#texturesReady\r\n * @private\r\n * @fires Phaser.Game#ready\r\n * @since 3.12.0\r\n */\r\n texturesReady: function ()\r\n {\r\n // Start all the other systems\r\n this.events.emit(Events.READY);\r\n\r\n this.start();\r\n },\r\n\r\n /**\r\n * Called automatically by Game.boot once all of the global systems have finished setting themselves up.\r\n * By this point the Game is now ready to start the main loop running.\r\n * It will also enable the Visibility Handler.\r\n *\r\n * @method Phaser.Game#start\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n this.isRunning = true;\r\n\r\n this.config.postBoot(this);\r\n\r\n if (this.renderer)\r\n {\r\n this.loop.start(this.step.bind(this));\r\n }\r\n else\r\n {\r\n this.loop.start(this.headlessStep.bind(this));\r\n }\r\n\r\n VisibilityHandler(this);\r\n\r\n var eventEmitter = this.events;\r\n\r\n eventEmitter.on(Events.HIDDEN, this.onHidden, this);\r\n eventEmitter.on(Events.VISIBLE, this.onVisible, this);\r\n eventEmitter.on(Events.BLUR, this.onBlur, this);\r\n eventEmitter.on(Events.FOCUS, this.onFocus, this);\r\n },\r\n\r\n /**\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events.\r\n *\r\n * @method Phaser.Game#step\r\n * @fires Phaser.Core.Events#PRE_STEP_EVENT\r\n * @fires Phaser.Core.Events#STEP_EVENT\r\n * @fires Phaser.Core.Events#POST_STEP_EVENT\r\n * @fires Phaser.Core.Events#PRE_RENDER_EVENT\r\n * @fires Phaser.Core.Events#POST_RENDER_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (this.pendingDestroy)\r\n {\r\n return this.runDestroy();\r\n }\r\n\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers like Input and Sound update in the prestep\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n // This is mostly meant for user-land code and plugins\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Update the Scene Manager and all active Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n // Our final event before rendering starts\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n var renderer = this.renderer;\r\n\r\n // Run the Pre-render (clearing the canvas, setting background colors, etc)\r\n\r\n renderer.preRender();\r\n\r\n eventEmitter.emit(Events.PRE_RENDER, renderer, time, delta);\r\n\r\n // The main render loop. Iterates all Scenes and all Cameras in those scenes, rendering to the renderer instance.\r\n\r\n this.scene.render(renderer);\r\n\r\n // The Post-Render call. Tidies up loose end, takes snapshots, etc.\r\n\r\n renderer.postRender();\r\n\r\n // The final event before the step repeats. Your last chance to do anything to the canvas before it all starts again.\r\n\r\n eventEmitter.emit(Events.POST_RENDER, renderer, time, delta);\r\n },\r\n\r\n /**\r\n * A special version of the Game Step for the HEADLESS renderer only.\r\n *\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * This process emits `prerender` and `postrender` events, even though nothing actually displays.\r\n *\r\n * @method Phaser.Game#headlessStep\r\n * @fires Phaser.Game#prerenderEvent\r\n * @fires Phaser.Game#postrenderEvent\r\n * @since 3.2.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n headlessStep: function (time, delta)\r\n {\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n // Render\r\n\r\n eventEmitter.emit(Events.PRE_RENDER);\r\n\r\n eventEmitter.emit(Events.POST_RENDER);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will pause the main loop and then emit a pause event.\r\n *\r\n * @method Phaser.Game#onHidden\r\n * @protected\r\n * @fires Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\n onHidden: function ()\r\n {\r\n this.loop.pause();\r\n\r\n this.events.emit(Events.PAUSE);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will resume the main loop and then emit a resume event.\r\n *\r\n * @method Phaser.Game#onVisible\r\n * @protected\r\n * @fires Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\n onVisible: function ()\r\n {\r\n this.loop.resume();\r\n\r\n this.events.emit(Events.RESUME);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'blurred\' state, which pauses it.\r\n *\r\n * @method Phaser.Game#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.hasFocus = false;\r\n\r\n this.loop.blur();\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'focused\' state, which resumes it.\r\n *\r\n * @method Phaser.Game#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.hasFocus = true;\r\n\r\n this.loop.focus();\r\n },\r\n\r\n /**\r\n * Returns the current game frame.\r\n * \r\n * When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.\r\n *\r\n * @method Phaser.Game#getFrame\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game frame.\r\n */\r\n getFrame: function ()\r\n {\r\n return this.loop.frame;\r\n },\r\n\r\n /**\r\n * Returns the time that the current game step started at, as based on `performance.now`.\r\n *\r\n * @method Phaser.Game#getTime\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game timestamp.\r\n */\r\n getTime: function ()\r\n {\r\n return this.loop.now;\r\n },\r\n\r\n /**\r\n * Flags this Game instance as needing to be destroyed on the _next frame_, making this an asynchronous operation.\r\n * \r\n * It will wait until the current frame has completed and then call `runDestroy` internally.\r\n * \r\n * If you need to react to the games eventual destruction, listen for the `DESTROY` event.\r\n * \r\n * If you **do not** need to run Phaser again on the same web page you can set the `noReturn` argument to `true` and it will free-up\r\n * memory being held by the core Phaser plugins. If you do need to create another game instance on the same page, leave this as `false`.\r\n *\r\n * @method Phaser.Game#destroy\r\n * @fires Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} removeCanvas - Set to `true` if you would like the parent canvas element removed from the DOM, or `false` to leave it in place.\r\n * @param {boolean} [noReturn=false] - If `true` all the core Phaser plugins are destroyed. You cannot create another instance of Phaser on the same web page if you do this.\r\n */\r\n destroy: function (removeCanvas, noReturn)\r\n {\r\n if (noReturn === undefined) { noReturn = false; }\r\n \r\n this.pendingDestroy = true;\r\n\r\n this.removeCanvas = removeCanvas;\r\n this.noReturn = noReturn;\r\n },\r\n\r\n /**\r\n * Destroys this Phaser.Game instance, all global systems, all sub-systems and all Scenes.\r\n *\r\n * @method Phaser.Game#runDestroy\r\n * @private\r\n * @since 3.5.0\r\n */\r\n runDestroy: function ()\r\n {\r\n this.events.emit(Events.DESTROY);\r\n\r\n this.events.removeAllListeners();\r\n\r\n this.scene.destroy();\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.destroy();\r\n }\r\n\r\n if (this.removeCanvas && this.canvas)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.canvas.parentNode)\r\n {\r\n this.canvas.parentNode.removeChild(this.canvas);\r\n }\r\n }\r\n\r\n if (this.domContainer)\r\n {\r\n this.domContainer.parentNode.removeChild(this.domContainer);\r\n }\r\n\r\n this.loop.destroy();\r\n \r\n this.pendingDestroy = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Game;\r\n\r\n/**\r\n * "Computers are good at following instructions, but not at reading your mind." - Donald Knuth\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Game.js?')},"./node_modules/phaser/src/core/TimeStep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar RequestAnimationFrame = __webpack_require__(/*! ../dom/RequestAnimationFrame */ \"./node_modules/phaser/src/dom/RequestAnimationFrame.js\");\r\n\r\n// Frame Rate config\r\n// fps: {\r\n// min: 10,\r\n// target: 60,\r\n// forceSetTimeOut: false,\r\n// deltaHistory: 10,\r\n// panicMax: 120\r\n// }\r\n\r\n// http://www.testufo.com/#test=animation-time-graph\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class TimeStep\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this Time Step.\r\n * @param {Phaser.Types.Core.FPSConfig} config\r\n */\r\nvar TimeStep = new Class({\r\n\r\n initialize:\r\n\r\n function TimeStep (game, config)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#raf\r\n * @type {Phaser.DOM.RequestAnimationFrame}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.raf = new RequestAnimationFrame();\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n *\r\n * @name Phaser.Core.TimeStep#started\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.started = false;\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n * The difference between this value and `started` is that `running` is toggled when\r\n * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if\r\n * the TimeStep is actually stopped, not just paused.\r\n *\r\n * @name Phaser.Core.TimeStep#running\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.running = false;\r\n\r\n /**\r\n * The minimum fps rate you want the Time Step to run at.\r\n *\r\n * @name Phaser.Core.TimeStep#minFps\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.minFps = GetValue(config, 'min', 5);\r\n\r\n /**\r\n * The target fps rate for the Time Step to run at.\r\n *\r\n * Setting this value will not actually change the speed at which the browser runs, that is beyond\r\n * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step\r\n * is spiraling out of control.\r\n *\r\n * @name Phaser.Core.TimeStep#targetFps\r\n * @type {integer}\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.targetFps = GetValue(config, 'target', 60);\r\n\r\n /**\r\n * The minFps value in ms.\r\n * Defaults to 200ms between frames (i.e. super slow!)\r\n *\r\n * @name Phaser.Core.TimeStep#_min\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._min = 1000 / this.minFps;\r\n\r\n /**\r\n * The targetFps value in ms.\r\n * Defaults to 16.66ms between frames (i.e. normal)\r\n *\r\n * @name Phaser.Core.TimeStep#_target\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._target = 1000 / this.targetFps;\r\n\r\n /**\r\n * An exponential moving average of the frames per second.\r\n *\r\n * @name Phaser.Core.TimeStep#actualFps\r\n * @type {integer}\r\n * @readonly\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.actualFps = this.targetFps;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#nextFpsUpdate\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextFpsUpdate = 0;\r\n\r\n /**\r\n * The number of frames processed this second.\r\n *\r\n * @name Phaser.Core.TimeStep#framesThisSecond\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.framesThisSecond = 0;\r\n\r\n /**\r\n * A callback to be invoked each time the Time Step steps.\r\n *\r\n * @name Phaser.Core.TimeStep#callback\r\n * @type {Phaser.Types.Core.TimeStepCallback}\r\n * @default NOOP\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting\r\n * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time.\r\n *\r\n * @name Phaser.Core.TimeStep#forceSetTimeOut\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceSetTimeOut = GetValue(config, 'forceSetTimeOut', false);\r\n\r\n /**\r\n * The time, calculated at the start of the current step, as smoothed by the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#time\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * The time at which the game started running. This value is adjusted if the game is then\r\n * paused and resumes.\r\n *\r\n * @name Phaser.Core.TimeStep#startTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` of the previous step.\r\n *\r\n * @name Phaser.Core.TimeStep#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n /**\r\n * The current frame the game is on. This counter is incremented once every game step, regardless of how much\r\n * time has passed and is unaffected by delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#frame\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frame = 0;\r\n\r\n /**\r\n * Is the browser currently considered in focus by the Page Visibility API?\r\n * This value is set in the `blur` method, which is called automatically by the Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#inFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inFocus = true;\r\n\r\n /**\r\n * The timestamp at which the game became paused, as determined by the Page Visibility API.\r\n *\r\n * @name Phaser.Core.TimeStep#_pauseTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pauseTime = 0;\r\n\r\n /**\r\n * An internal counter to allow for the browser 'cooling down' after coming back into focus.\r\n *\r\n * @name Phaser.Core.TimeStep#_coolDown\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._coolDown = 0;\r\n\r\n /**\r\n * The delta time, in ms, since the last game step. This is a clamped and smoothed average value.\r\n *\r\n * @name Phaser.Core.TimeStep#delta\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * Internal index of the delta history position.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaIndex\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.deltaIndex = 0;\r\n\r\n /**\r\n * Internal array holding the previous delta values, used for delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaHistory\r\n * @type {integer[]}\r\n * @since 3.0.0\r\n */\r\n this.deltaHistory = [];\r\n\r\n /**\r\n * The maximum number of delta values that are retained in order to calculate a smoothed moving average.\r\n * \r\n * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaSmoothingMax\r\n * @type {integer}\r\n * @default 10\r\n * @since 3.0.0\r\n */\r\n this.deltaSmoothingMax = GetValue(config, 'deltaHistory', 10);\r\n\r\n /**\r\n * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually\r\n * as a result of switching tabs and regaining focus.\r\n * \r\n * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120.\r\n *\r\n * @name Phaser.Core.TimeStep#panicMax\r\n * @type {integer}\r\n * @default 120\r\n * @since 3.0.0\r\n */\r\n this.panicMax = GetValue(config, 'panicMax', 120);\r\n\r\n /**\r\n * The actual elapsed time in ms between one update and the next.\r\n * \r\n * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value.\r\n * So please be careful when using this value in math calculations.\r\n *\r\n * @name Phaser.Core.TimeStep#rawDelta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rawDelta = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` at the very start of the current step.\r\n * This can differ from the `time` value in that it isn't calculated based on the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#now\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.now = 0;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onBlur event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#blur\r\n * @since 3.0.0\r\n */\r\n blur: function ()\r\n {\r\n this.inFocus = false;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onFocus event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#focus\r\n * @since 3.0.0\r\n */\r\n focus: function ()\r\n {\r\n this.inFocus = true;\r\n\r\n this.resetDelta();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#pause\r\n * @since 3.0.0\r\n */\r\n pause: function ()\r\n {\r\n this._pauseTime = window.performance.now();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#resume\r\n * @since 3.0.0\r\n */\r\n resume: function ()\r\n {\r\n this.resetDelta();\r\n\r\n this.startTime += this.time - this._pauseTime;\r\n },\r\n\r\n /**\r\n * Resets the time, lastTime, fps averages and delta history.\r\n * Called automatically when a browser sleeps them resumes.\r\n *\r\n * @method Phaser.Core.TimeStep#resetDelta\r\n * @since 3.0.0\r\n */\r\n resetDelta: function ()\r\n {\r\n var now = window.performance.now();\r\n\r\n this.time = now;\r\n this.lastTime = now;\r\n this.nextFpsUpdate = now + 1000;\r\n this.framesThisSecond = 0;\r\n\r\n // Pre-populate smoothing array\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = Math.min(this._target, this.deltaHistory[i]);\r\n }\r\n\r\n this.delta = 0;\r\n this.deltaIndex = 0;\r\n\r\n this._coolDown = this.panicMax;\r\n },\r\n\r\n /**\r\n * Starts the Time Step running, if it is not already doing so.\r\n * Called automatically by the Game Boot process.\r\n *\r\n * @method Phaser.Core.TimeStep#start\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.TimeStepCallback} callback - The callback to be invoked each time the Time Step steps.\r\n */\r\n start: function (callback)\r\n {\r\n if (this.started)\r\n {\r\n return this;\r\n }\r\n\r\n this.started = true;\r\n this.running = true;\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = this._target;\r\n }\r\n\r\n this.resetDelta();\r\n\r\n this.startTime = window.performance.now();\r\n\r\n this.callback = callback;\r\n\r\n this.raf.start(this.step.bind(this), this.forceSetTimeOut);\r\n },\r\n\r\n /**\r\n * The main step method. This is called each time the browser updates, either by Request Animation Frame,\r\n * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more.\r\n * You generally should never call this method directly.\r\n *\r\n * @method Phaser.Core.TimeStep#step\r\n * @since 3.0.0\r\n */\r\n step: function ()\r\n {\r\n // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in,\r\n // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a\r\n // more accurate one:\r\n\r\n var time = window.performance.now();\r\n\r\n this.now = time;\r\n\r\n var before = time - this.lastTime;\r\n\r\n if (before < 0)\r\n {\r\n // Because, Chrome.\r\n before = 0;\r\n }\r\n\r\n this.rawDelta = before;\r\n\r\n var idx = this.deltaIndex;\r\n var history = this.deltaHistory;\r\n var max = this.deltaSmoothingMax;\r\n\r\n // delta time (time is in ms)\r\n var dt = before;\r\n\r\n // When a browser switches tab, then comes back again, it takes around 10 frames before\r\n // the delta time settles down so we employ a 'cooling down' period before we start\r\n // trusting the delta values again, to avoid spikes flooding through our delta average\r\n\r\n if (this._coolDown > 0 || !this.inFocus)\r\n {\r\n this._coolDown--;\r\n\r\n dt = Math.min(dt, this._target);\r\n }\r\n\r\n if (dt > this._min)\r\n {\r\n // Probably super bad start time or browser tab context loss,\r\n // so use the last 'sane' dt value\r\n\r\n dt = history[idx];\r\n\r\n // Clamp delta to min (in case history has become corrupted somehow)\r\n dt = Math.min(dt, this._min);\r\n }\r\n\r\n // Smooth out the delta over the previous X frames\r\n\r\n // add the delta to the smoothing array\r\n history[idx] = dt;\r\n\r\n // adjusts the delta history array index based on the smoothing count\r\n // this stops the array growing beyond the size of deltaSmoothingMax\r\n this.deltaIndex++;\r\n\r\n if (this.deltaIndex > max)\r\n {\r\n this.deltaIndex = 0;\r\n }\r\n\r\n // Delta Average\r\n var avg = 0;\r\n\r\n // Loop the history array, adding the delta values together\r\n\r\n for (var i = 0; i < max; i++)\r\n {\r\n avg += history[i];\r\n }\r\n\r\n // Then divide by the array length to get the average delta\r\n avg /= max;\r\n\r\n // Set as the world delta value\r\n this.delta = avg;\r\n\r\n // Real-world timer advance\r\n this.time += this.rawDelta;\r\n\r\n // Update the estimate of the frame rate, `fps`. Every second, the number\r\n // of frames that occurred in that second are included in an exponential\r\n // moving average of all frames per second, with an alpha of 0.25. This\r\n // means that more recent seconds affect the estimated frame rate more than\r\n // older seconds.\r\n //\r\n // When a browser window is NOT minimized, but is covered up (i.e. you're using\r\n // another app which has spawned a window over the top of the browser), then it\r\n // will start to throttle the raf callback time. It waits for a while, and then\r\n // starts to drop the frame rate at 1 frame per second until it's down to just over 1fps.\r\n // So if the game was running at 60fps, and the player opens a new window, then\r\n // after 60 seconds (+ the 'buffer time') it'll be down to 1fps, so rafin'g at 1Hz.\r\n //\r\n // When they make the game visible again, the frame rate is increased at a rate of\r\n // approx. 8fps, back up to 60fps (or the max it can obtain)\r\n //\r\n // There is no easy way to determine if this drop in frame rate is because the\r\n // browser is throttling raf, or because the game is struggling with performance\r\n // because you're asking it to do too much on the device.\r\n\r\n if (time > this.nextFpsUpdate)\r\n {\r\n // Compute the new exponential moving average with an alpha of 0.25.\r\n this.actualFps = 0.25 * this.framesThisSecond + 0.75 * this.actualFps;\r\n this.nextFpsUpdate = time + 1000;\r\n this.framesThisSecond = 0;\r\n }\r\n\r\n this.framesThisSecond++;\r\n\r\n // Interpolation - how far between what is expected and where we are?\r\n var interpolation = avg / this._target;\r\n\r\n this.callback(time, avg, interpolation);\r\n\r\n // Shift time value over\r\n this.lastTime = time;\r\n\r\n this.frame++;\r\n },\r\n\r\n /**\r\n * Manually calls `TimeStep.step`.\r\n *\r\n * @method Phaser.Core.TimeStep#tick\r\n * @since 3.0.0\r\n */\r\n tick: function ()\r\n {\r\n this.step();\r\n },\r\n\r\n /**\r\n * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false.\r\n *\r\n * @method Phaser.Core.TimeStep#sleep\r\n * @since 3.0.0\r\n */\r\n sleep: function ()\r\n {\r\n if (this.running)\r\n {\r\n this.raf.stop();\r\n\r\n this.running = false;\r\n }\r\n },\r\n\r\n /**\r\n * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true.\r\n * The `seamless` argument controls if the wake-up should adjust the start time or not.\r\n *\r\n * @method Phaser.Core.TimeStep#wake\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [seamless=false] - Adjust the startTime based on the lastTime values.\r\n */\r\n wake: function (seamless)\r\n {\r\n if (this.running)\r\n {\r\n this.sleep();\r\n }\r\n else if (seamless)\r\n {\r\n this.startTime += -this.lastTime + (this.lastTime + window.performance.now());\r\n }\r\n\r\n this.raf.start(this.step.bind(this), this.useRAF);\r\n\r\n this.running = true;\r\n\r\n this.step();\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in seconds.\r\n *\r\n * @method Phaser.Core.TimeStep#getDuration\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in seconds.\r\n */\r\n getDuration: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime) / 1000;\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in ms.\r\n *\r\n * @method Phaser.Core.TimeStep#getDurationMS\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in ms.\r\n */\r\n getDurationMS: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime);\r\n },\r\n\r\n /**\r\n * Stops the TimeStep running.\r\n *\r\n * @method Phaser.Core.TimeStep#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Core.TimeStep} The TimeStep object.\r\n */\r\n stop: function ()\r\n {\r\n this.running = false;\r\n this.started = false;\r\n\r\n this.raf.stop();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null\r\n * any objects.\r\n *\r\n * @method Phaser.Core.TimeStep#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n\r\n this.raf = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimeStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/TimeStep.js?")},"./node_modules/phaser/src/core/VisibilityHandler.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * The Visibility Handler is responsible for listening out for document level visibility change events.\r\n * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses\r\n * the provided Event Emitter and fires the related events.\r\n *\r\n * @function Phaser.Core.VisibilityHandler\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance this Visibility Handler is working on.\r\n */\r\nvar VisibilityHandler = function (game)\r\n{\r\n var hiddenVar;\r\n var eventEmitter = game.events;\r\n\r\n if (document.hidden !== undefined)\r\n {\r\n hiddenVar = 'visibilitychange';\r\n }\r\n else\r\n {\r\n var vendors = [ 'webkit', 'moz', 'ms' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n if (document[prefix + 'Hidden'] !== undefined)\r\n {\r\n document.hidden = function ()\r\n {\r\n return document[prefix + 'Hidden'];\r\n };\r\n\r\n hiddenVar = prefix + 'visibilitychange';\r\n }\r\n\r\n });\r\n }\r\n\r\n var onChange = function (event)\r\n {\r\n if (document.hidden || event.type === 'pause')\r\n {\r\n eventEmitter.emit(Events.HIDDEN);\r\n }\r\n else\r\n {\r\n eventEmitter.emit(Events.VISIBLE);\r\n }\r\n };\r\n\r\n if (hiddenVar)\r\n {\r\n document.addEventListener(hiddenVar, onChange, false);\r\n }\r\n\r\n window.onblur = function ()\r\n {\r\n eventEmitter.emit(Events.BLUR);\r\n };\r\n\r\n window.onfocus = function ()\r\n {\r\n eventEmitter.emit(Events.FOCUS);\r\n };\r\n\r\n // Automatically give the window focus unless config says otherwise\r\n if (window.focus && game.config.autoFocus)\r\n {\r\n window.focus();\r\n }\r\n};\r\n\r\nmodule.exports = VisibilityHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/VisibilityHandler.js?")},"./node_modules/phaser/src/core/events/BLUR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BLUR_EVENT.js?")},"./node_modules/phaser/src/core/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js?")},"./node_modules/phaser/src/core/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/core/events/FOCUS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/FOCUS_EVENT.js?")},"./node_modules/phaser/src/core/events/HIDDEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/HIDDEN_EVENT.js?")},"./node_modules/phaser/src/core/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/READY_EVENT.js?")},"./node_modules/phaser/src/core/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/core/events/STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/VISIBLE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/VISIBLE_EVENT.js?")},"./node_modules/phaser/src/core/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: __webpack_require__(/*! ./BLUR_EVENT */ "./node_modules/phaser/src/core/events/BLUR_EVENT.js"),\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/core/events/BOOT_EVENT.js"),\r\n CONTEXT_LOST: __webpack_require__(/*! ./CONTEXT_LOST_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js"),\r\n CONTEXT_RESTORED: __webpack_require__(/*! ./CONTEXT_RESTORED_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/core/events/DESTROY_EVENT.js"),\r\n FOCUS: __webpack_require__(/*! ./FOCUS_EVENT */ "./node_modules/phaser/src/core/events/FOCUS_EVENT.js"),\r\n HIDDEN: __webpack_require__(/*! ./HIDDEN_EVENT */ "./node_modules/phaser/src/core/events/HIDDEN_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/core/events/PAUSE_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js"),\r\n POST_STEP: __webpack_require__(/*! ./POST_STEP_EVENT */ "./node_modules/phaser/src/core/events/POST_STEP_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js"),\r\n PRE_STEP: __webpack_require__(/*! ./PRE_STEP_EVENT */ "./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/core/events/READY_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/core/events/RESUME_EVENT.js"),\r\n STEP: __webpack_require__(/*! ./STEP_EVENT */ "./node_modules/phaser/src/core/events/STEP_EVENT.js"),\r\n VISIBLE: __webpack_require__(/*! ./VISIBLE_EVENT */ "./node_modules/phaser/src/core/events/VISIBLE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/index.js?')},"./node_modules/phaser/src/core/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Config: __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js"),\r\n CreateRenderer: __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js"),\r\n DebugHeader: __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js"),\r\n TimeStep: __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js"),\r\n VisibilityHandler: __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/index.js?')},"./node_modules/phaser/src/create/GenerateTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arne16 = __webpack_require__(/*! ./palettes/Arne16 */ \"./node_modules/phaser/src/create/palettes/Arne16.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Create.GenerateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description]\r\n *\r\n * @return {HTMLCanvasElement} [description]\r\n */\r\nvar GenerateTexture = function (config)\r\n{\r\n var data = GetValue(config, 'data', []);\r\n var canvas = GetValue(config, 'canvas', null);\r\n var palette = GetValue(config, 'palette', Arne16);\r\n var pixelWidth = GetValue(config, 'pixelWidth', 1);\r\n var pixelHeight = GetValue(config, 'pixelHeight', pixelWidth);\r\n var resizeCanvas = GetValue(config, 'resizeCanvas', true);\r\n var clearCanvas = GetValue(config, 'clearCanvas', true);\r\n var preRender = GetValue(config, 'preRender', null);\r\n var postRender = GetValue(config, 'postRender', null);\r\n\r\n var width = Math.floor(Math.abs(data[0].length * pixelWidth));\r\n var height = Math.floor(Math.abs(data.length * pixelHeight));\r\n\r\n if (!canvas)\r\n {\r\n canvas = CanvasPool.create2D(this, width, height);\r\n resizeCanvas = false;\r\n clearCanvas = false;\r\n }\r\n\r\n if (resizeCanvas)\r\n {\r\n canvas.width = width;\r\n canvas.height = height;\r\n }\r\n\r\n var ctx = canvas.getContext('2d');\r\n\r\n if (clearCanvas)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n // preRender Callback?\r\n if (preRender)\r\n {\r\n preRender(canvas, ctx);\r\n }\r\n\r\n // Draw it\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var d = row[x];\r\n\r\n if (d !== '.' && d !== ' ')\r\n {\r\n ctx.fillStyle = palette[d];\r\n ctx.fillRect(x * pixelWidth, y * pixelHeight, pixelWidth, pixelHeight);\r\n }\r\n }\r\n }\r\n\r\n // postRender Callback?\r\n if (postRender)\r\n {\r\n postRender(canvas, ctx);\r\n }\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = GenerateTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/GenerateTexture.js?")},"./node_modules/phaser/src/create/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create\r\n */\r\n\r\nmodule.exports = {\r\n \r\n GenerateTexture: __webpack_require__(/*! ./GenerateTexture */ "./node_modules/phaser/src/create/GenerateTexture.js"),\r\n Palettes: __webpack_require__(/*! ./palettes */ "./node_modules/phaser/src/create/palettes/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/index.js?')},"./node_modules/phaser/src/create/palettes/Arne16.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.ARNE16\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#9D9D9D',\r\n 2: '#FFF',\r\n 3: '#BE2633',\r\n 4: '#E06F8B',\r\n 5: '#493C2B',\r\n 6: '#A46422',\r\n 7: '#EB8931',\r\n 8: '#F7E26B',\r\n 9: '#2F484E',\r\n A: '#44891A',\r\n B: '#A3CE27',\r\n C: '#1B2632',\r\n D: '#005784',\r\n E: '#31A2F2',\r\n F: '#B2DCEF'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/Arne16.js?")},"./node_modules/phaser/src/create/palettes/C64.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by the Commodore 64.\r\n *\r\n * @name Phaser.Create.Palettes.C64\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#fff',\r\n 2: '#8b4131',\r\n 3: '#7bbdc5',\r\n 4: '#8b41ac',\r\n 5: '#6aac41',\r\n 6: '#3931a4',\r\n 7: '#d5de73',\r\n 8: '#945a20',\r\n 9: '#5a4100',\r\n A: '#bd736a',\r\n B: '#525252',\r\n C: '#838383',\r\n D: '#acee8b',\r\n E: '#7b73de',\r\n F: '#acacac'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/C64.js?")},"./node_modules/phaser/src/create/palettes/CGA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color CGA inspired palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.CGA\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#2234d1',\r\n 2: '#0c7e45',\r\n 3: '#44aacc',\r\n 4: '#8a3622',\r\n 5: '#5c2e78',\r\n 6: '#aa5c3d',\r\n 7: '#b5b5b5',\r\n 8: '#5e606e',\r\n 9: '#4c81fb',\r\n A: '#6cd947',\r\n B: '#7be2f9',\r\n C: '#eb8a60',\r\n D: '#e23d69',\r\n E: '#ffd93f',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/CGA.js?")},"./node_modules/phaser/src/create/palettes/JMP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color JMP palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.JMP\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#f5f4eb'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/JMP.js?")},"./node_modules/phaser/src/create/palettes/MSX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by Japanese computers like the MSX.\r\n *\r\n * @name Phaser.Create.Palettes.MSX\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/MSX.js?")},"./node_modules/phaser/src/create/palettes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create.Palettes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARNE16: __webpack_require__(/*! ./Arne16 */ "./node_modules/phaser/src/create/palettes/Arne16.js"),\r\n C64: __webpack_require__(/*! ./C64 */ "./node_modules/phaser/src/create/palettes/C64.js"),\r\n CGA: __webpack_require__(/*! ./CGA */ "./node_modules/phaser/src/create/palettes/CGA.js"),\r\n JMP: __webpack_require__(/*! ./JMP */ "./node_modules/phaser/src/create/palettes/JMP.js"),\r\n MSX: __webpack_require__(/*! ./MSX */ "./node_modules/phaser/src/create/palettes/MSX.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/index.js?')},"./node_modules/phaser/src/curves/CubicBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CubicBezier = __webpack_require__(/*! ../math/interpolation/CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A higher-order Bézier curve constructed of four points.\r\n *\r\n * @class CubicBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector2[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n * @param {Phaser.Math.Vector2} p3 - End Point.\r\n */\r\nvar CubicBezierCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function CubicBezierCurve (p0, p1, p2, p3)\r\n {\r\n Curve.call(this, \'CubicBezierCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p3 = new Vector2(p0[6], p0[7]);\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The start point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The first control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * The second control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p2 = p2;\r\n\r\n /**\r\n * The end point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p3\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p3 = p3;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Returns the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - The amount of divisions used by this curve.\r\n *\r\n * @return {number} The resolution of the curve.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n var p3 = this.p3;\r\n\r\n return out.set(CubicBezier(t, p0.x, p1.x, p2.x, p3.x), CubicBezier(t, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * Draws this curve to the specified graphics object.\r\n *\r\n * @method Phaser.Curves.CubicBezier#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The graphics object this curve should be drawn to.\r\n * @param {integer} [pointsTotal=32] - The number of intermediary points that make up this curve. A higher number of points will result in a smoother curve.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The graphics object this curve was drawn to. Useful for method chaining.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Returns a JSON object that describes this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y,\r\n this.p3.x, this.p3.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Generates a curve from a JSON object.\r\n *\r\n * @function Phaser.Curves.CubicBezier.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.CubicBezier} The curve generated from the JSON object.\r\n */\r\nCubicBezierCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n var p3 = new Vector2(points[6], points[7]);\r\n\r\n return new CubicBezierCurve(p0, p1, p2, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/CubicBezierCurve.js?')},"./node_modules/phaser/src/curves/Curve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ \"./node_modules/phaser/src/geom/rectangle/FromPoints.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Curve class, which all other curve types extend.\r\n *\r\n * Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n *\r\n * @class Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - [description]\r\n */\r\nvar Curve = new Class({\r\n\r\n initialize:\r\n\r\n function Curve (type)\r\n {\r\n /**\r\n * String based identifier for the type of curve.\r\n *\r\n * @name Phaser.Curves.Curve#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The default number of divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#defaultDivisions\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.defaultDivisions = 5;\r\n\r\n /**\r\n * The quantity of arc length divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#arcLengthDivisions\r\n * @type {integer}\r\n * @default 100\r\n * @since 3.0.0\r\n */\r\n this.arcLengthDivisions = 100;\r\n\r\n /**\r\n * An array of cached arc length values.\r\n *\r\n * @name Phaser.Curves.Curve#cacheArcLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheArcLengths = [];\r\n\r\n /**\r\n * Does the data of this curve need updating?\r\n *\r\n * @name Phaser.Curves.Curve#needsUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.needsUpdate = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Curve#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n },\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Curve#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n * @param {integer} [pointsTotal=32] - The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n // So you can chain graphics calls\r\n return graphics.strokePoints(this.getPoints(pointsTotal));\r\n },\r\n \r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * You can control the accuracy of the bounds. The value given is used to work out how many points\r\n * to plot across the curve. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @method Phaser.Curves.Curve#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in. If falsey a new object will be created.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (!out) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n var len = this.getLength();\r\n\r\n if (accuracy > len)\r\n {\r\n accuracy = len / 2;\r\n }\r\n\r\n // The length of the curve in pixels\r\n // So we'll have 1 spaced point per 'accuracy' pixels\r\n\r\n var spaced = Math.max(1, Math.round(len / accuracy));\r\n\r\n return FromPoints(this.getSpacedPoints(spaced), out);\r\n },\r\n\r\n /**\r\n * Returns an array of points, spaced out X distance pixels apart.\r\n * The smaller the distance, the larger the array will be.\r\n *\r\n * @method Phaser.Curves.Curve#getDistancePoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - The distance, in pixels, between each point along the curve.\r\n *\r\n * @return {Phaser.Geom.Point[]} An Array of Point objects.\r\n */\r\n getDistancePoints: function (distance)\r\n {\r\n var len = this.getLength();\r\n\r\n var spaced = Math.max(1, len / distance);\r\n\r\n return this.getSpacedPoints(spaced);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - Optional Vector object to store the result in.\r\n *\r\n * @return {Phaser.Math.Vector2} Vector2 containing the coordinates of the curves end point.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(1, out);\r\n },\r\n\r\n /**\r\n * Get total curve arc length\r\n *\r\n * @method Phaser.Curves.Curve#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getLength: function ()\r\n {\r\n var lengths = this.getLengths();\r\n\r\n return lengths[lengths.length - 1];\r\n },\r\n\r\n\r\n /**\r\n * Get list of cumulative segment lengths\r\n *\r\n * @method Phaser.Curves.Curve#getLengths\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number[]} [description]\r\n */\r\n getLengths: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.arcLengthDivisions; }\r\n\r\n if ((this.cacheArcLengths.length === divisions + 1) && !this.needsUpdate)\r\n {\r\n return this.cacheArcLengths;\r\n }\r\n\r\n this.needsUpdate = false;\r\n\r\n var cache = [];\r\n var current;\r\n var last = this.getPoint(0, this._tmpVec2A);\r\n var sum = 0;\r\n\r\n cache.push(0);\r\n\r\n for (var p = 1; p <= divisions; p++)\r\n {\r\n current = this.getPoint(p / divisions, this._tmpVec2B);\r\n\r\n sum += current.distance(last);\r\n\r\n cache.push(sum);\r\n\r\n last.copy(current);\r\n }\r\n\r\n this.cacheArcLengths = cache;\r\n\r\n return cache; // { sums: cache, sum:sum }; Sum is in the last element.\r\n },\r\n\r\n // Get point at relative position in curve according to arc length\r\n\r\n // - u [0 .. 1]\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getPoint(t, out);\r\n },\r\n\r\n // Get sequence of points using getPoint( t )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n points.push(this.getPoint(d / divisions));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n // Get sequence of points using getPointAt( u )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n var t = this.getUtoTmapping(d / divisions, null, divisions);\r\n\r\n points.push(this.getPoint(t));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(0, out);\r\n },\r\n\r\n /**\r\n * Returns a unit vector tangent at t\r\n * In case any sub curve does not implement its tangent derivation,\r\n * 2 points a small delta apart will be used to find its gradient\r\n * which seems to give a reasonable approximation\r\n *\r\n * @method Phaser.Curves.Curve#getTangent\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001)\r\n */\r\n getTangent: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var delta = 0.0001;\r\n var t1 = t - delta;\r\n var t2 = t + delta;\r\n\r\n // Capping in case of danger\r\n\r\n if (t1 < 0)\r\n {\r\n t1 = 0;\r\n }\r\n\r\n if (t2 > 1)\r\n {\r\n t2 = 1;\r\n }\r\n\r\n this.getPoint(t1, this._tmpVec2A);\r\n this.getPoint(t2, out);\r\n\r\n return out.subtract(this._tmpVec2A).normalize();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTangentAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getTangentAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getTangent(t, out);\r\n },\r\n\r\n // Given a distance in pixels, get a t to find p.\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTFromDistance\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getTFromDistance: function (distance, divisions)\r\n {\r\n if (distance <= 0)\r\n {\r\n return 0;\r\n }\r\n\r\n return this.getUtoTmapping(0, distance, divisions);\r\n },\r\n\r\n // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getUtoTmapping\r\n * @since 3.0.0\r\n *\r\n * @param {number} u - [description]\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getUtoTmapping: function (u, distance, divisions)\r\n {\r\n var arcLengths = this.getLengths(divisions);\r\n\r\n var i = 0;\r\n var il = arcLengths.length;\r\n\r\n var targetArcLength; // The targeted u distance value to get\r\n\r\n if (distance)\r\n {\r\n // Cannot overshoot the curve\r\n targetArcLength = Math.min(distance, arcLengths[il - 1]);\r\n }\r\n else\r\n {\r\n targetArcLength = u * arcLengths[il - 1];\r\n }\r\n\r\n // binary search for the index with largest value smaller than target u distance\r\n\r\n var low = 0;\r\n var high = il - 1;\r\n var comparison;\r\n\r\n while (low <= high)\r\n {\r\n i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\r\n\r\n comparison = arcLengths[i] - targetArcLength;\r\n\r\n if (comparison < 0)\r\n {\r\n low = i + 1;\r\n }\r\n else if (comparison > 0)\r\n {\r\n high = i - 1;\r\n }\r\n else\r\n {\r\n high = i;\r\n break;\r\n }\r\n }\r\n\r\n i = high;\r\n\r\n if (arcLengths[i] === targetArcLength)\r\n {\r\n return i / (il - 1);\r\n }\r\n\r\n // we could get finer grain at lengths, or use simple interpolation between two points\r\n\r\n var lengthBefore = arcLengths[i];\r\n var lengthAfter = arcLengths[i + 1];\r\n\r\n var segmentLength = lengthAfter - lengthBefore;\r\n\r\n // determine where we are between the 'before' and 'after' points\r\n\r\n var segmentFraction = (targetArcLength - lengthBefore) / segmentLength;\r\n\r\n // add that fractional amount to t\r\n\r\n return (i + segmentFraction) / (il - 1);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.needsUpdate = true;\r\n\r\n this.getLengths();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/Curve.js?")},"./node_modules/phaser/src/curves/EllipseCurve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Curve = __webpack_require__(/*! ./Curve */ \"./node_modules/phaser/src/curves/Curve.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Elliptical Curve derived from the Base Curve class.\r\n * \r\n * See https://en.wikipedia.org/wiki/Elliptic_curve for more details.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.Curves.EllipseCurveConfig)} [x=0] - The x coordinate of the ellipse, or an Ellipse Curve configuration object.\r\n * @param {number} [y=0] - The y coordinate of the ellipse.\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {integer} [rotation=0] - The rotation of the ellipse, in degrees.\r\n */\r\nvar EllipseCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function EllipseCurve (x, y, xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetValue(config, 'x', 0);\r\n y = GetValue(config, 'y', 0);\r\n xRadius = GetValue(config, 'xRadius', 0);\r\n yRadius = GetValue(config, 'yRadius', xRadius);\r\n startAngle = GetValue(config, 'startAngle', 0);\r\n endAngle = GetValue(config, 'endAngle', 360);\r\n clockwise = GetValue(config, 'clockwise', false);\r\n rotation = GetValue(config, 'rotation', 0);\r\n }\r\n else\r\n {\r\n if (yRadius === undefined) { yRadius = xRadius; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (clockwise === undefined) { clockwise = false; }\r\n if (rotation === undefined) { rotation = 0; }\r\n }\r\n\r\n Curve.call(this, 'EllipseCurve');\r\n\r\n // Center point\r\n\r\n /**\r\n * The center point of the ellipse. Used for calculating rotation.\r\n *\r\n * @name Phaser.Curves.Ellipse#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_xRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._xRadius = xRadius;\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_yRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._yRadius = yRadius;\r\n\r\n // Radians\r\n\r\n /**\r\n * The starting angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_startAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._startAngle = DegToRad(startAngle);\r\n\r\n /**\r\n * The end angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_endAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._endAngle = DegToRad(endAngle);\r\n\r\n /**\r\n * Anti-clockwise direction.\r\n *\r\n * @name Phaser.Curves.Ellipse#_clockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._clockwise = clockwise;\r\n\r\n /**\r\n * The rotation of the arc.\r\n *\r\n * @name Phaser.Curves.Ellipse#_rotation\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._rotation = DegToRad(rotation);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(0, out);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Ellipse#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * 2;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var twoPi = Math.PI * 2;\r\n var deltaAngle = this._endAngle - this._startAngle;\r\n var samePoints = Math.abs(deltaAngle) < Number.EPSILON;\r\n\r\n // ensures that deltaAngle is 0 .. 2 PI\r\n while (deltaAngle < 0)\r\n {\r\n deltaAngle += twoPi;\r\n }\r\n\r\n while (deltaAngle > twoPi)\r\n {\r\n deltaAngle -= twoPi;\r\n }\r\n\r\n if (deltaAngle < Number.EPSILON)\r\n {\r\n if (samePoints)\r\n {\r\n deltaAngle = 0;\r\n }\r\n else\r\n {\r\n deltaAngle = twoPi;\r\n }\r\n }\r\n\r\n if (this._clockwise && !samePoints)\r\n {\r\n if (deltaAngle === twoPi)\r\n {\r\n deltaAngle = - twoPi;\r\n }\r\n else\r\n {\r\n deltaAngle = deltaAngle - twoPi;\r\n }\r\n }\r\n\r\n var angle = this._startAngle + t * deltaAngle;\r\n var x = this.p0.x + this._xRadius * Math.cos(angle);\r\n var y = this.p0.y + this._yRadius * Math.sin(angle);\r\n\r\n if (this._rotation !== 0)\r\n {\r\n var cos = Math.cos(this._rotation);\r\n var sin = Math.sin(this._rotation);\r\n\r\n var tx = x - this.p0.x;\r\n var ty = y - this.p0.y;\r\n\r\n // Rotate the point about the center of the ellipse.\r\n x = tx * cos - ty * sin + this.p0.x;\r\n y = tx * sin + ty * cos + this.p0.y;\r\n }\r\n\r\n return out.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the horizontal radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setXRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setXRadius: function (value)\r\n {\r\n this.xRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setYRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setYRadius: function (value)\r\n {\r\n this.yRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The width of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setWidth: function (value)\r\n {\r\n this.xRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the height of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setHeight\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The height of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setHeight: function (value)\r\n {\r\n this.yRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setStartAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The start angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setStartAngle: function (value)\r\n {\r\n this.startAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the end angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setEndAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The end angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setEndAngle: function (value)\r\n {\r\n this.endAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this curve extends clockwise or anti-clockwise.\r\n *\r\n * @method Phaser.Curves.Ellipse#setClockwise\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The clockwise state of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setClockwise: function (value)\r\n {\r\n this.clockwise = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The rotation of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setRotation: function (value)\r\n {\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#xRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n xRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._xRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._xRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#yRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n yRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._yRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._yRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#startAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._startAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#endAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._endAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * `true` if the ellipse rotation is clockwise or `false` if anti-clockwise.\r\n *\r\n * @name Phaser.Curves.Ellipse#clockwise\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n clockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._clockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._clockwise = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#angle\r\n * @type {number}\r\n * @since 3.14.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._rotation);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * JSON serialization of the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONEllipseCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n x: this.p0.x,\r\n y: this.p0.y,\r\n xRadius: this._xRadius,\r\n yRadius: this._yRadius,\r\n startAngle: RadToDeg(this._startAngle),\r\n endAngle: RadToDeg(this._endAngle),\r\n clockwise: this._clockwise,\r\n rotation: RadToDeg(this._rotation)\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from the provided Ellipse Curve Configuration object.\r\n *\r\n * @function Phaser.Curves.Ellipse.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONEllipseCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Ellipse} The ellipse curve constructed from the configuration object.\r\n */\r\nEllipseCurve.fromJSON = function (data)\r\n{\r\n return new EllipseCurve(data);\r\n};\r\n\r\nmodule.exports = EllipseCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/EllipseCurve.js?")},"./node_modules/phaser/src/curves/LineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\nvar tmpVec2 = new Vector2();\r\n\r\n/**\r\n * @classdesc\r\n * A LineCurve is a "curve" comprising exactly two points (a line segment).\r\n *\r\n * @class Line\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - The first endpoint.\r\n * @param {Phaser.Math.Vector2} [p1] - The second endpoint.\r\n */\r\nvar LineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n // vec2s or array\r\n function LineCurve (p0, p1)\r\n {\r\n Curve.call(this, \'LineCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The first endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The second endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * @method Phaser.Curves.Line#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n return FromPoints([ this.p0, this.p1 ], out);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Line#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Gets the resolution of the line.\r\n *\r\n * @method Phaser.Curves.Line#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} [divisions=1] - The number of divisions to consider.\r\n *\r\n * @return {number} The resolution. Equal to the number of divisions.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 1; }\r\n\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (t === 1)\r\n {\r\n return out.copy(this.p1);\r\n }\r\n\r\n out.copy(this.p1).subtract(this.p0).scale(t).add(this.p0);\r\n\r\n return out;\r\n },\r\n\r\n // Line curve is linear, so we can overwrite default getPointAt\r\n\r\n /**\r\n * Gets a point at a given position on the line.\r\n *\r\n * @method Phaser.Curves.Line#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the slope of the line as a unit vector.\r\n *\r\n * @method Phaser.Curves.Line#getTangent\r\n * @since 3.0.0\r\n * \r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @return {Phaser.Math.Vector2} The tangent vector.\r\n */\r\n getTangent: function ()\r\n {\r\n var tangent = tmpVec2.copy(this.p1).subtract(this.p0);\r\n\r\n return tangent.normalize();\r\n },\r\n\r\n // Override default Curve.draw because this is better than calling getPoints on a line!\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.lineBetween` so will be drawn at whatever the present Graphics line color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Line#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics)\r\n {\r\n graphics.lineBetween(this.p0.x, this.p0.y, this.p1.x, this.p1.y);\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Gets a JSON representation of the line.\r\n *\r\n * @method Phaser.Curves.Line#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Configures this line from a JSON representation.\r\n *\r\n * @function Phaser.Curves.Line.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Line} A new LineCurve object.\r\n */\r\nLineCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n\r\n return new LineCurve(p0, p1);\r\n};\r\n\r\nmodule.exports = LineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/LineCurve.js?')},"./node_modules/phaser/src/curves/QuadraticBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar QuadraticBezierInterpolation = __webpack_require__(/*! ../math/interpolation/QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class QuadraticBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n */\r\nvar QuadraticBezier = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function QuadraticBezier (p0, p1, p2)\r\n {\r\n Curve.call(this, \'QuadraticBezier\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p2 = p2;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getStartPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getResolution\r\n * @since 3.2.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n\r\n return out.set(\r\n QuadraticBezierInterpolation(t, p0.x, p1.x, p2.x),\r\n QuadraticBezierInterpolation(t, p0.y, p1.y, p2.y)\r\n );\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#draw\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - `Graphics` object to draw onto.\r\n * @param {integer} [pointsTotal=32] - Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} `Graphics` object that was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Converts the curve into a JSON compatible object.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#toJSON\r\n * @since 3.2.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from a JSON object, e. g. created by `toJSON`.\r\n *\r\n * @function Phaser.Curves.QuadraticBezier.fromJSON\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.QuadraticBezier} The created curve instance.\r\n */\r\nQuadraticBezier.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n\r\n return new QuadraticBezier(p0, p1, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezier;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/QuadraticBezierCurve.js?')},"./node_modules/phaser/src/curves/SplineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../math/CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Spline\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} [points] - [description]\r\n */\r\nvar SplineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function SplineCurve (points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n Curve.call(this, \'SplineCurve\');\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Spline#points\r\n * @type {Phaser.Math.Vector2[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n this.addPoints(points);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description]\r\n *\r\n * @return {Phaser.Curves.Spline} This curve object.\r\n */\r\n addPoints: function (points)\r\n {\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var p = new Vector2();\r\n\r\n if (typeof points[i] === \'number\')\r\n {\r\n p.x = points[i];\r\n p.y = points[i + 1];\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n addPoint: function (x, y)\r\n {\r\n var vec = new Vector2(x, y);\r\n\r\n this.points.push(vec);\r\n\r\n return vec;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Spline#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.points[0]);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * this.points.length;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Spline#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var points = this.points;\r\n\r\n var point = (points.length - 1) * t;\r\n\r\n var intPoint = Math.floor(point);\r\n\r\n var weight = point - intPoint;\r\n\r\n var p0 = points[(intPoint === 0) ? intPoint : intPoint - 1];\r\n var p1 = points[intPoint];\r\n var p2 = points[(intPoint > points.length - 2) ? points.length - 1 : intPoint + 1];\r\n var p3 = points[(intPoint > points.length - 3) ? points.length - 1 : intPoint + 2];\r\n\r\n return out.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n var points = [];\r\n\r\n for (var i = 0; i < this.points.length; i++)\r\n {\r\n points.push(this.points[i].x);\r\n points.push(this.points[i].y);\r\n }\r\n\r\n return {\r\n type: this.type,\r\n points: points\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Curves.Spline.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Spline} [description]\r\n */\r\nSplineCurve.fromJSON = function (data)\r\n{\r\n return new SplineCurve(data.points);\r\n};\r\n\r\nmodule.exports = SplineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/SplineCurve.js?')},"./node_modules/phaser/src/curves/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Curves\r\n */\r\n\r\nmodule.exports = {\r\n Path: __webpack_require__(/*! ./path/Path */ "./node_modules/phaser/src/curves/path/Path.js"),\r\n\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierCurve */ "./node_modules/phaser/src/curves/CubicBezierCurve.js"),\r\n Curve: __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./EllipseCurve */ "./node_modules/phaser/src/curves/EllipseCurve.js"),\r\n Line: __webpack_require__(/*! ./LineCurve */ "./node_modules/phaser/src/curves/LineCurve.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierCurve */ "./node_modules/phaser/src/curves/QuadraticBezierCurve.js"),\r\n Spline: __webpack_require__(/*! ./SplineCurve */ "./node_modules/phaser/src/curves/SplineCurve.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/index.js?')},"./node_modules/phaser/src/curves/path/MoveTo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path.\r\n *\r\n * @class MoveTo\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - `x` pixel coordinate.\r\n * @param {number} [y] - `y` pixel coordinate.\r\n */\r\nvar MoveTo = new Class({\r\n\r\n initialize:\r\n\r\n function MoveTo (x, y)\r\n {\r\n // Skip length calcs in paths\r\n\r\n /**\r\n * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors.\r\n *\r\n * @name Phaser.Curves.MoveTo#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The lone point which this curve consists of.\r\n *\r\n * @name Phaser.Curves.MoveTo#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Retrieves the point at given position in the curve. This will always return this curve's only point.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used.\r\n * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getResolution\r\n * @since 3.0.0\r\n *\r\n * @return {number} The resolution of this curve. For a MoveTo the value is always 1.\r\n */\r\n getResolution: function ()\r\n {\r\n return 1;\r\n },\r\n\r\n /**\r\n * Gets the length of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this curve. For a MoveTo the value is always 0.\r\n */\r\n getLength: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Converts this curve into a JSON-serializable object.\r\n *\r\n * @method Phaser.Curves.MoveTo#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: 'MoveTo',\r\n points: [\r\n this.p0.x, this.p0.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/MoveTo.js?")},"./node_modules/phaser/src/curves/path/Path.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CubicBezierCurve = __webpack_require__(/*! ../CubicBezierCurve */ \"./node_modules/phaser/src/curves/CubicBezierCurve.js\");\r\nvar EllipseCurve = __webpack_require__(/*! ../EllipseCurve */ \"./node_modules/phaser/src/curves/EllipseCurve.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar LineCurve = __webpack_require__(/*! ../LineCurve */ \"./node_modules/phaser/src/curves/LineCurve.js\");\r\nvar MovePathTo = __webpack_require__(/*! ./MoveTo */ \"./node_modules/phaser/src/curves/path/MoveTo.js\");\r\nvar QuadraticBezierCurve = __webpack_require__(/*! ../QuadraticBezierCurve */ \"./node_modules/phaser/src/curves/QuadraticBezierCurve.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar SplineCurve = __webpack_require__(/*! ../SplineCurve */ \"./node_modules/phaser/src/curves/SplineCurve.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Path combines multiple Curves into one continuous compound curve.\r\n * It does not matter how many Curves are in the Path or what type they are.\r\n *\r\n * A Curve in a Path does not have to start where the previous Curve ends - that is to say, a Path does not\r\n * have to be an uninterrupted curve. Only the order of the Curves influences the actual points on the Path.\r\n *\r\n * @class Path\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the Path's starting point or a {@link Phaser.Types.Curves.JSONPath}.\r\n * @param {number} [y=0] - The Y coordinate of the Path's starting point.\r\n */\r\nvar Path = new Class({\r\n\r\n initialize:\r\n\r\n function Path (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n /**\r\n * The name of this Path.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.Curves.Path#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The list of Curves which make up this Path.\r\n *\r\n * @name Phaser.Curves.Path#curves\r\n * @type {Phaser.Curves.Curve[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.curves = [];\r\n\r\n /**\r\n * The cached length of each Curve in the Path.\r\n *\r\n * Used internally by {@link #getCurveLengths}.\r\n *\r\n * @name Phaser.Curves.Path#cacheLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheLengths = [];\r\n\r\n /**\r\n * Automatically closes the path.\r\n *\r\n * @name Phaser.Curves.Path#autoClose\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.autoClose = false;\r\n\r\n /**\r\n * The starting point of the Path.\r\n *\r\n * This is not necessarily equivalent to the starting point of the first Curve in the Path. In an empty Path, it's also treated as the ending point.\r\n *\r\n * @name Phaser.Curves.Path#startPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.startPoint = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.fromJSON(x);\r\n }\r\n else\r\n {\r\n this.startPoint.set(x, y);\r\n }\r\n },\r\n\r\n /**\r\n * Appends a Curve to the end of the Path.\r\n *\r\n * The Curve does not have to start where the Path ends or, for an empty Path, at its defined starting point.\r\n *\r\n * @method Phaser.Curves.Path#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Curve} curve - The Curve to append.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n add: function (curve)\r\n {\r\n this.curves.push(curve);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a circular Ellipse Curve positioned at the end of the Path.\r\n *\r\n * @method Phaser.Curves.Path#circleTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the circle.\r\n * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle.\r\n * @param {number} [rotation=0] - The rotation of the circle in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n circleTo: function (radius, clockwise, rotation)\r\n {\r\n if (clockwise === undefined) { clockwise = false; }\r\n\r\n return this.ellipseTo(radius, radius, 0, 360, clockwise, rotation);\r\n },\r\n\r\n /**\r\n * Ensures that the Path is closed.\r\n *\r\n * A closed Path starts and ends at the same point. If the Path is not closed, a straight Line Curve will be created from the ending point directly to the starting point. During the check, the actual starting point of the Path, i.e. the starting point of the first Curve, will be used as opposed to the Path's defined {@link startPoint}, which could differ.\r\n *\r\n * Calling this method on an empty Path will result in an error.\r\n *\r\n * @method Phaser.Curves.Path#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n closePath: function ()\r\n {\r\n // Add a line curve if start and end of lines are not connected\r\n var startPoint = this.curves[0].getPoint(0);\r\n var endPoint = this.curves[this.curves.length - 1].getPoint(1);\r\n\r\n if (!startPoint.equals(endPoint))\r\n {\r\n // This will copy a reference to the vectors, which probably isn't sensible\r\n this.curves.push(new LineCurve(endPoint, startPoint));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points.\r\n *\r\n * @method Phaser.Curves.Path#cubicBezierTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value.\r\n * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value.\r\n * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value.\r\n * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n var p3;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n p3 = control1X;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(control1X, control1Y);\r\n p2 = new Vector2(control2X, control2Y);\r\n p3 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new CubicBezierCurve(p0, p1, p2, p3));\r\n },\r\n\r\n // Creates a quadratic bezier curve starting at the previous end point and ending at p2, using p1 as a control point\r\n\r\n /**\r\n * Creates a Quadratic Bezier Curve starting at the ending point of the Path.\r\n *\r\n * @method Phaser.Curves.Path#quadraticBezierTo\r\n * @since 3.2.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2[])} x - The X coordinate of the second control point or, if it's a `Vector2`, the first control point.\r\n * @param {number} [y] - The Y coordinate of the second control point or, if `x` is a `Vector2`, the second control point.\r\n * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point.\r\n * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n quadraticBezierTo: function (x, y, controlX, controlY)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(controlX, controlY);\r\n p2 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new QuadraticBezierCurve(p0, p1, p2));\r\n },\r\n\r\n /**\r\n * Draws all Curves in the Path to a Graphics Game Object.\r\n *\r\n * @method Phaser.Curves.Path#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [out,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics Game Object to draw to.\r\n * @param {integer} [pointsTotal=32] - The number of points to draw for each Curve. Higher numbers result in a smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object which was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.draw(graphics, pointsTotal);\r\n }\r\n\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Creates an ellipse curve positioned at the previous end point, using the given parameters.\r\n *\r\n * @method Phaser.Curves.Path#ellipseTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {number} [rotation=0] - The rotation of the ellipse, in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n var ellipse = new EllipseCurve(0, 0, xRadius, yRadius, startAngle, endAngle, clockwise, rotation);\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n // Calculate where to center the ellipse\r\n var start = ellipse.getStartPoint(this._tmpVec2B);\r\n\r\n end.subtract(start);\r\n\r\n ellipse.x = end.x;\r\n ellipse.y = end.y;\r\n\r\n return this.add(ellipse);\r\n },\r\n\r\n /**\r\n * Creates a Path from a Path Configuration object.\r\n *\r\n * The provided object should be a {@link Phaser.Types.Curves.JSONPath}, as returned by {@link #toJSON}. Providing a malformed object may cause errors.\r\n *\r\n * @method Phaser.Curves.Path#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n fromJSON: function (data)\r\n {\r\n // data should be an object matching the Path.toJSON object structure.\r\n\r\n this.curves = [];\r\n this.cacheLengths = [];\r\n\r\n this.startPoint.set(data.x, data.y);\r\n\r\n this.autoClose = data.autoClose;\r\n\r\n for (var i = 0; i < data.curves.length; i++)\r\n {\r\n var curve = data.curves[i];\r\n\r\n switch (curve.type)\r\n {\r\n case 'LineCurve':\r\n this.add(LineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'EllipseCurve':\r\n this.add(EllipseCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'SplineCurve':\r\n this.add(SplineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'CubicBezierCurve':\r\n this.add(CubicBezierCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'QuadraticBezierCurve':\r\n this.add(QuadraticBezierCurve.fromJSON(curve));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle with a position and size matching the bounds of this Path.\r\n *\r\n * @method Phaser.Curves.Path#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n out.x = Number.MAX_VALUE;\r\n out.y = Number.MAX_VALUE;\r\n\r\n var bounds = new Rectangle();\r\n var maxRight = Number.MIN_SAFE_INTEGER;\r\n var maxBottom = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.getBounds(bounds, accuracy);\r\n\r\n out.x = Math.min(out.x, bounds.x);\r\n out.y = Math.min(out.y, bounds.y);\r\n\r\n maxRight = Math.max(maxRight, bounds.right);\r\n maxBottom = Math.max(maxBottom, bounds.bottom);\r\n }\r\n\r\n out.right = maxRight;\r\n out.bottom = maxBottom;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing the length of the Path at the end of each Curve.\r\n *\r\n * The result of this method will be cached to avoid recalculating it in subsequent calls. The cache is only invalidated when the {@link #curves} array changes in length, leading to potential inaccuracies if a Curve in the Path is changed, or if a Curve is removed and another is added in its place.\r\n *\r\n * @method Phaser.Curves.Path#getCurveLengths\r\n * @since 3.0.0\r\n *\r\n * @return {number[]} An array containing the length of the Path at the end of each one of its Curves.\r\n */\r\n getCurveLengths: function ()\r\n {\r\n // We use cache values if curves and cache array are same length\r\n\r\n if (this.cacheLengths.length === this.curves.length)\r\n {\r\n return this.cacheLengths;\r\n }\r\n\r\n // Get length of sub-curve\r\n // Push sums into cached array\r\n\r\n var lengths = [];\r\n var sums = 0;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n sums += this.curves[i].getLength();\r\n\r\n lengths.push(sums);\r\n }\r\n\r\n this.cacheLengths = lengths;\r\n\r\n return lengths;\r\n },\r\n\r\n /**\r\n * Returns the ending point of the Path.\r\n *\r\n * A Path's ending point is equivalent to the ending point of the last Curve in the Path. For an empty Path, the ending point is at the Path's defined {@link #startPoint}.\r\n *\r\n * @method Phaser.Curves.Path#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - The object to store the point in.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` object, or a new Vector2 if none was provided.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (this.curves.length > 0)\r\n {\r\n this.curves[this.curves.length - 1].getPoint(1, out);\r\n }\r\n else\r\n {\r\n out.copy(this.startPoint);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the total length of the Path.\r\n *\r\n * @see {@link #getCurveLengths}\r\n *\r\n * @method Phaser.Curves.Path#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The total length of the Path.\r\n */\r\n getLength: function ()\r\n {\r\n var lens = this.getCurveLengths();\r\n\r\n return lens[lens.length - 1];\r\n },\r\n\r\n // To get accurate point with reference to\r\n // entire path distance at time t,\r\n // following has to be done:\r\n\r\n // 1. Length of each sub path have to be known\r\n // 2. Locate and identify type of curve\r\n // 3. Get t for the curve\r\n // 4. Return curve.getPointAt(t')\r\n\r\n /**\r\n * Calculates the coordinates of the point at the given normalized location (between 0 and 1) on the Path.\r\n *\r\n * The location is relative to the entire Path, not to an individual Curve. A location of 0.5 is always in the middle of the Path and is thus an equal distance away from both its starting and ending points. In a Path with one Curve, it would be in the middle of the Curve; in a Path with two Curves, it could be anywhere on either one of them depending on their lengths.\r\n *\r\n * @method Phaser.Curves.Path#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The location of the point to return, between 0 and 1.\r\n * @param {Phaser.Math.Vector2} [out] - The object in which to store the calculated point.\r\n *\r\n * @return {?Phaser.Math.Vector2} The modified `out` object, or a new `Vector2` if none was provided.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var d = t * this.getLength();\r\n var curveLengths = this.getCurveLengths();\r\n var i = 0;\r\n\r\n while (i < curveLengths.length)\r\n {\r\n if (curveLengths[i] >= d)\r\n {\r\n var diff = curveLengths[i] - d;\r\n var curve = this.curves[i];\r\n\r\n var segmentLength = curve.getLength();\r\n var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength;\r\n\r\n return curve.getPointAt(u, out);\r\n }\r\n\r\n i++;\r\n }\r\n\r\n // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0]))\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n /**\r\n * Creates a straight Line Curve from the ending point of the Path to the given coordinates.\r\n *\r\n * @method Phaser.Curves.Path#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions=40] - The X coordinate of the line's ending point, or the line's ending point as a `Vector2`.\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 40; }\r\n\r\n var points = [];\r\n\r\n for (var i = 0; i <= divisions; i++)\r\n {\r\n points.push(this.getPoint(i / divisions));\r\n }\r\n\r\n if (this.autoClose)\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.startPoint);\r\n },\r\n\r\n /**\r\n * Creates a line curve from the previous end point to x/y\r\n *\r\n * @method Phaser.Curves.Path#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n lineTo: function (x, y)\r\n {\r\n if (x instanceof Vector2)\r\n {\r\n this._tmpVec2B.copy(x);\r\n }\r\n else\r\n {\r\n this._tmpVec2B.set(x, y);\r\n }\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n return this.add(new LineCurve([ end.x, end.y, this._tmpVec2B.x, this._tmpVec2B.y ]));\r\n },\r\n\r\n // Creates a spline curve starting at the previous end point, using the given parameters\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#splineTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} points - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n splineTo: function (points)\r\n {\r\n points.unshift(this.getEndPoint());\r\n\r\n return this.add(new SplineCurve(points));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n moveTo: function (x, y)\r\n {\r\n return this.add(new MovePathTo(x, y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONPath} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var out = [];\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n out.push(this.curves[i].toJSON());\r\n }\r\n\r\n return {\r\n type: 'Path',\r\n x: this.startPoint.x,\r\n y: this.startPoint.y,\r\n autoClose: this.autoClose,\r\n curves: out\r\n };\r\n },\r\n\r\n /**\r\n * cacheLengths must be recalculated.\r\n *\r\n * @method Phaser.Curves.Path#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.cacheLengths = [];\r\n\r\n this.getCurveLengths();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.curves.length = 0;\r\n this.cacheLengths.length = 0;\r\n this.startPoint = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a new Path Object.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#path\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Path.\r\n * @param {number} y - The vertical position of this Path.\r\n *\r\n * @return {Phaser.Curves.Path} The Path Object that was created.\r\n */\r\nGameObjectFactory.register('path', function (x, y)\r\n{\r\n return new Path(x, y);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\nmodule.exports = Path;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/Path.js?")},"./node_modules/phaser/src/data/DataManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/data/events/index.js\");\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManager.js?")},"./node_modules/phaser/src/data/DataManagerPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DataManager = __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManagerPlugin\r\n * @extends Phaser.Data.DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this DataManager belongs to.\r\n */\r\nvar DataManagerPlugin = new Class({\r\n\r\n Extends: DataManager,\r\n\r\n initialize:\r\n\r\n function DataManagerPlugin (scene)\r\n {\r\n DataManager.call(this, scene, scene.sys.events);\r\n\r\n /**\r\n * A reference to the Scene that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s Systems.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.events = this.systems.events;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#shutdown\r\n * @private\r\n * @since 3.5.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n DataManager.prototype.destroy.call(this);\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DataManagerPlugin\', DataManagerPlugin, \'data\');\r\n\r\nmodule.exports = DataManagerPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManagerPlugin.js?')},"./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js?")},"./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/SET_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/SET_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: __webpack_require__(/*! ./CHANGE_DATA_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js"),\r\n CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js"),\r\n REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js"),\r\n SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "./node_modules/phaser/src/data/events/SET_DATA_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/index.js?')},"./node_modules/phaser/src/data/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DataManager: __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js"),\r\n DataManagerPlugin: __webpack_require__(/*! ./DataManagerPlugin */ "./node_modules/phaser/src/data/DataManagerPlugin.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/data/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/index.js?')},"./node_modules/phaser/src/device/Audio.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.ogg = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"opus\"').replace(/^no$/, '') || audioElement.canPlayType('audio/opus;').replace(/^no$/, ''))\r\n {\r\n Audio.opus = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mpeg;').replace(/^no$/, ''))\r\n {\r\n Audio.mp3 = true;\r\n }\r\n\r\n // Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n // bit.ly/iphoneoscodecs\r\n if (audioElement.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, ''))\r\n {\r\n Audio.wav = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/x-m4a;') || audioElement.canPlayType('audio/aac;').replace(/^no$/, ''))\r\n {\r\n Audio.m4a = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/webm; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.webm = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mp4;codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Audio.js?")},"./node_modules/phaser/src/device/Browser.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Edge\\/\\d+/.test(ua))\r\n {\r\n Browser.edge = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Opera/).test(ua))\r\n {\r\n Browser.opera = true;\r\n }\r\n else if ((/Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Browser.js?")},"./node_modules/phaser/src/device/CanvasFeatures.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create(yellow, 6, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create(this, 2, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n // Compare and return\r\n return (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/CanvasFeatures.js?")},"./node_modules/phaser/src/device/Features.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n * \r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d');\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Features.js?")},"./node_modules/phaser/src/device/Fullscreen.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n* \r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Fullscreen.js?")},"./node_modules/phaser/src/device/Input.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n * \r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n \r\n};\r\n\r\nfunction init ()\r\n{\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Input.js?")},"./node_modules/phaser/src/device/OS.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Windows/.test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if (/Mac OS/.test(ua) && !(/like Mac OS/.test(ua)))\r\n {\r\n OS.macOS = true;\r\n }\r\n else if (/Android/.test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if (/Linux/.test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if (/iP[ao]d|iPhone/i.test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if (/Kindle/.test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if (/CrOS/.test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if (/Windows Phone/i.test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/OS.js?")},"./node_modules/phaser/src/device/Video.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} h264Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} hlsVideo - Can this device play hls video files?\r\n * @property {boolean} mp4Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} oggVideo - Can this device play ogg video files?\r\n * @property {boolean} vp9Video - Can this device play vp9 video files?\r\n * @property {boolean} webmVideo - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264Video: false,\r\n hlsVideo: false,\r\n mp4Video: false,\r\n oggVideo: false,\r\n vp9Video: false,\r\n webmVideo: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(/^no$/, ''))\r\n {\r\n Video.oggVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264Video = true;\r\n Video.mp4Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/, ''))\r\n {\r\n Video.webmVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(/^no$/, ''))\r\n {\r\n Video.vp9Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n Video.hlsVideo = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Video.js?")},"./node_modules/phaser/src/device/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: __webpack_require__(/*! ./OS */ "./node_modules/phaser/src/device/OS.js"),\r\n browser: __webpack_require__(/*! ./Browser */ "./node_modules/phaser/src/device/Browser.js"),\r\n features: __webpack_require__(/*! ./Features */ "./node_modules/phaser/src/device/Features.js"),\r\n input: __webpack_require__(/*! ./Input */ "./node_modules/phaser/src/device/Input.js"),\r\n audio: __webpack_require__(/*! ./Audio */ "./node_modules/phaser/src/device/Audio.js"),\r\n video: __webpack_require__(/*! ./Video */ "./node_modules/phaser/src/device/Video.js"),\r\n fullscreen: __webpack_require__(/*! ./Fullscreen */ "./node_modules/phaser/src/device/Fullscreen.js"),\r\n canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "./node_modules/phaser/src/device/CanvasFeatures.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/index.js?')},"./node_modules/phaser/src/display/align/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = {\r\n\r\n /**\r\n * A constant representing a top-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_LEFT: 0,\r\n\r\n /**\r\n * A constant representing a top-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_CENTER: 1,\r\n\r\n /**\r\n * A constant representing a top-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_RIGHT: 2,\r\n\r\n /**\r\n * A constant representing a left-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_TOP: 3,\r\n\r\n /**\r\n * A constant representing a left-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_CENTER: 4,\r\n\r\n /**\r\n * A constant representing a left-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_BOTTOM: 5,\r\n\r\n /**\r\n * A constant representing a center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n CENTER: 6,\r\n\r\n /**\r\n * A constant representing a right-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_TOP: 7,\r\n\r\n /**\r\n * A constant representing a right-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_CENTER: 8,\r\n\r\n /**\r\n * A constant representing a right-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_BOTTOM: 9,\r\n\r\n /**\r\n * A constant representing a bottom-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_LEFT: 10,\r\n\r\n /**\r\n * A constant representing a bottom-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_CENTER: 11,\r\n\r\n /**\r\n * A constant representing a bottom-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_RIGHT: 12\r\n\r\n};\r\n\r\nmodule.exports = ALIGN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/const.js?")},"./node_modules/phaser/src/display/align/in/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomCenter.js?')},"./node_modules/phaser/src/display/align/in/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomLeft.js?')},"./node_modules/phaser/src/display/align/in/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomRight.js?')},"./node_modules/phaser/src/display/align/in/Center.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ../../bounds/CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.Center\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar Center = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n CenterOn(gameObject, GetCenterX(alignIn) + offsetX, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = Center;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/Center.js?')},"./node_modules/phaser/src/display/align/in/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the left center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/LeftCenter.js?')},"./node_modules/phaser/src/display/align/in/QuickSet.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/display/align/const.js");\r\n\r\nvar AlignInMap = [];\r\n\r\nAlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js");\r\nAlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js");\r\nAlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js");\r\nAlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js");\r\nAlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned relative to the other.\r\n * The alignment used is based on the `position` argument, which is an `ALIGN_CONST` value, such as `LEFT_CENTER` or `TOP_RIGHT`.\r\n *\r\n * @function Phaser.Display.Align.In.QuickSet\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [child,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `ALIGN_CONST.LEFT_CENTER`.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar QuickSet = function (child, alignIn, position, offsetX, offsetY)\r\n{\r\n return AlignInMap[position](child, alignIn, offsetX, offsetY);\r\n};\r\n\r\nmodule.exports = QuickSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/QuickSet.js?')},"./node_modules/phaser/src/display/align/in/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the right center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/RightCenter.js?')},"./node_modules/phaser/src/display/align/in/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopCenter.js?')},"./node_modules/phaser/src/display/align/in/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopLeft.js?')},"./node_modules/phaser/src/display/align/in/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopRight.js?')},"./node_modules/phaser/src/display/align/in/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.In\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js"),\r\n Center: __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js"),\r\n QuickSet: __webpack_require__(/*! ./QuickSet */ "./node_modules/phaser/src/display/align/in/QuickSet.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/index.js?')},"./node_modules/phaser/src/display/align/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/display/align/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Align\r\n */\r\n\r\nvar Align = {\r\n\r\n In: __webpack_require__(/*! ./in */ "./node_modules/phaser/src/display/align/in/index.js"),\r\n To: __webpack_require__(/*! ./to */ "./node_modules/phaser/src/display/align/to/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nAlign = Extend(false, Align, CONST);\r\n\r\nmodule.exports = Align;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/index.js?')},"./node_modules/phaser/src/display/align/to/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomCenter.js?')},"./node_modules/phaser/src/display/align/to/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomLeft.js?')},"./node_modules/phaser/src/display/align/to/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomRight.js?')},"./node_modules/phaser/src/display/align/to/LeftBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftBottom.js?')},"./node_modules/phaser/src/display/align/to/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftCenter.js?')},"./node_modules/phaser/src/display/align/to/LeftTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftTop.js?')},"./node_modules/phaser/src/display/align/to/RightBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightBottom.js?')},"./node_modules/phaser/src/display/align/to/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightCenter.js?')},"./node_modules/phaser/src/display/align/to/RightTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightTop.js?')},"./node_modules/phaser/src/display/align/to/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopCenter.js?')},"./node_modules/phaser/src/display/align/to/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopLeft.js?')},"./node_modules/phaser/src/display/align/to/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopRight.js?')},"./node_modules/phaser/src/display/align/to/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.To\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/to/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/to/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/to/BottomRight.js"),\r\n LeftBottom: __webpack_require__(/*! ./LeftBottom */ "./node_modules/phaser/src/display/align/to/LeftBottom.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/to/LeftCenter.js"),\r\n LeftTop: __webpack_require__(/*! ./LeftTop */ "./node_modules/phaser/src/display/align/to/LeftTop.js"),\r\n RightBottom: __webpack_require__(/*! ./RightBottom */ "./node_modules/phaser/src/display/align/to/RightBottom.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/to/RightCenter.js"),\r\n RightTop: __webpack_require__(/*! ./RightTop */ "./node_modules/phaser/src/display/align/to/RightTop.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/to/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/to/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/to/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/index.js?')},"./node_modules/phaser/src/display/bounds/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetCenterX = __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetCenterY = __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\n\r\n/**\r\n * Positions the Game Object so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Display.Bounds.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The horizontal coordinate to position the Game Object on.\r\n * @param {number} y - The vertical coordinate to position the Game Object on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar CenterOn = function (gameObject, x, y)\r\n{\r\n SetCenterX(gameObject, x);\r\n\r\n return SetCenterY(gameObject, y);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/CenterOn.js?')},"./node_modules/phaser/src/display/bounds/GetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the bottom coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The bottom coordinate of the bounds of the Game Object.\r\n */\r\nvar GetBottom = function (gameObject)\r\n{\r\n return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetBottom.js?")},"./node_modules/phaser/src/display/bounds/GetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center x coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center x coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterX = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterX.js?")},"./node_modules/phaser/src/display/bounds/GetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center y coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center y coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterY = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterY.js?")},"./node_modules/phaser/src/display/bounds/GetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the left coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The left coordinate of the bounds of the Game Object.\r\n */\r\nvar GetLeft = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetLeft.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its x coordinate.\r\n * This is the same as `width * origin.x`.\r\n * This value will only be > 0 if `origin.x` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The horizontal offset of the Game Object.\r\n */\r\nvar GetOffsetX = function (gameObject)\r\n{\r\n return gameObject.width * gameObject.originX;\r\n};\r\n\r\nmodule.exports = GetOffsetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetX.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its y coordinate.\r\n * This is the same as `width * origin.y`.\r\n * This value will only be > 0 if `origin.y` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The vertical offset of the Game Object.\r\n */\r\nvar GetOffsetY = function (gameObject)\r\n{\r\n return gameObject.height * gameObject.originY;\r\n};\r\n\r\nmodule.exports = GetOffsetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetY.js?")},"./node_modules/phaser/src/display/bounds/GetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the right coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The right coordinate of the bounds of the Game Object.\r\n */\r\nvar GetRight = function (gameObject)\r\n{\r\n return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetRight.js?")},"./node_modules/phaser/src/display/bounds/GetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the top coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The top coordinate of the bounds of the Game Object.\r\n */\r\nvar GetTop = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetTop.js?")},"./node_modules/phaser/src/display/bounds/SetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetBottom = function (gameObject, value)\r\n{\r\n gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetBottom.js?")},"./node_modules/phaser/src/display/bounds/SetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterX = function (gameObject, x)\r\n{\r\n var offsetX = gameObject.width * gameObject.originX;\r\n\r\n gameObject.x = (x + offsetX) - (gameObject.width * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterX.js?")},"./node_modules/phaser/src/display/bounds/SetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} y - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterY = function (gameObject, y)\r\n{\r\n var offsetY = gameObject.height * gameObject.originY;\r\n\r\n gameObject.y = (y + offsetY) - (gameObject.height * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterY.js?")},"./node_modules/phaser/src/display/bounds/SetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetLeft = function (gameObject, value)\r\n{\r\n gameObject.x = value + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetLeft.js?")},"./node_modules/phaser/src/display/bounds/SetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetRight = function (gameObject, value)\r\n{\r\n gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetRight.js?")},"./node_modules/phaser/src/display/bounds/SetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetTop = function (gameObject, value)\r\n{\r\n gameObject.y = value + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetTop.js?")},"./node_modules/phaser/src/display/bounds/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Bounds\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CenterOn: __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js"),\r\n GetBottom: __webpack_require__(/*! ./GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js"),\r\n GetCenterX: __webpack_require__(/*! ./GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js"),\r\n GetCenterY: __webpack_require__(/*! ./GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js"),\r\n GetLeft: __webpack_require__(/*! ./GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js"),\r\n GetOffsetX: __webpack_require__(/*! ./GetOffsetX */ "./node_modules/phaser/src/display/bounds/GetOffsetX.js"),\r\n GetOffsetY: __webpack_require__(/*! ./GetOffsetY */ "./node_modules/phaser/src/display/bounds/GetOffsetY.js"),\r\n GetRight: __webpack_require__(/*! ./GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js"),\r\n GetTop: __webpack_require__(/*! ./GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js"),\r\n SetBottom: __webpack_require__(/*! ./SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js"),\r\n SetCenterX: __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js"),\r\n SetCenterY: __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js"),\r\n SetLeft: __webpack_require__(/*! ./SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js"),\r\n SetRight: __webpack_require__(/*! ./SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js"),\r\n SetTop: __webpack_require__(/*! ./SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/index.js?')},"./node_modules/phaser/src/display/canvas/CanvasInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.CanvasInterpolation\r\n * @since 3.0.0\r\n */\r\nvar CanvasInterpolation = {\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit).\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setCrisp\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setCrisp: function (canvas)\r\n {\r\n var types = [ 'optimizeSpeed', 'crisp-edges', '-moz-crisp-edges', '-webkit-optimize-contrast', 'optimize-contrast', 'pixelated' ];\r\n\r\n types.forEach(function (type)\r\n {\r\n canvas.style['image-rendering'] = type;\r\n });\r\n\r\n canvas.style.msInterpolationMode = 'nearest-neighbor';\r\n\r\n return canvas;\r\n },\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setBicubic\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setBicubic: function (canvas)\r\n {\r\n canvas.style['image-rendering'] = 'auto';\r\n canvas.style.msInterpolationMode = 'bicubic';\r\n\r\n return canvas;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CanvasInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasInterpolation.js?")},"./node_modules/phaser/src/display/canvas/CanvasPool.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Smoothing = __webpack_require__(/*! ./Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, \r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d'));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasPool.js?")},"./node_modules/phaser/src/display/canvas/Smoothing.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/Smoothing.js?")},"./node_modules/phaser/src/display/canvas/TouchAction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.\r\n *\r\n * @function Phaser.Display.Canvas.TouchAction\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch action value to set on the canvas. Set to `none` to disable touch actions.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar TouchAction = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n canvas.style['msTouchAction'] = value;\r\n canvas.style['ms-touch-action'] = value;\r\n canvas.style['touch-action'] = value;\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = TouchAction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/TouchAction.js?")},"./node_modules/phaser/src/display/canvas/UserSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.\r\n *\r\n * @function Phaser.Display.Canvas.UserSelect\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch callout value to set on the canvas. Set to `none` to disable touch callouts.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar UserSelect = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n var vendors = [\r\n '-webkit-',\r\n '-khtml-',\r\n '-moz-',\r\n '-ms-',\r\n ''\r\n ];\r\n\r\n vendors.forEach(function (vendor)\r\n {\r\n canvas.style[vendor + 'user-select'] = value;\r\n });\r\n\r\n canvas.style['-webkit-touch-callout'] = value;\r\n canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)';\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = UserSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/UserSelect.js?")},"./node_modules/phaser/src/display/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasInterpolation: __webpack_require__(/*! ./CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js"),\r\n CanvasPool: __webpack_require__(/*! ./CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js"),\r\n Smoothing: __webpack_require__(/*! ./Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js"),\r\n TouchAction: __webpack_require__(/*! ./TouchAction */ "./node_modules/phaser/src/display/canvas/TouchAction.js"),\r\n UserSelect: __webpack_require__(/*! ./UserSelect */ "./node_modules/phaser/src/display/canvas/UserSelect.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/index.js?')},"./node_modules/phaser/src/display/color/Color.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ \"./node_modules/phaser/src/display/color/GetColor.js\");\r\nvar GetColor32 = __webpack_require__(/*! ./GetColor32 */ \"./node_modules/phaser/src/display/color/GetColor32.js\");\r\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ \"./node_modules/phaser/src/display/color/HSVToRGB.js\");\r\nvar RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ \"./node_modules/phaser/src/display/color/RGBToHSV.js\");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Color class holds a single color value and allows for easy modification and reading of it.\r\n *\r\n * @class Color\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [red=0] - The red color value. A number between 0 and 255.\r\n * @param {integer} [green=0] - The green color value. A number between 0 and 255.\r\n * @param {integer} [blue=0] - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n */\r\nvar Color = new Class({\r\n\r\n initialize:\r\n\r\n function Color (red, green, blue, alpha)\r\n {\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n /**\r\n * The internal red color value.\r\n *\r\n * @name Phaser.Display.Color#r\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.r = 0;\r\n\r\n /**\r\n * The internal green color value.\r\n *\r\n * @name Phaser.Display.Color#g\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.g = 0;\r\n\r\n /**\r\n * The internal blue color value.\r\n *\r\n * @name Phaser.Display.Color#b\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.b = 0;\r\n\r\n /**\r\n * The internal alpha color value.\r\n *\r\n * @name Phaser.Display.Color#a\r\n * @type {number}\r\n * @private\r\n * @default 255\r\n * @since 3.0.0\r\n */\r\n this.a = 255;\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#_h\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._h = 0;\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#_s\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._s = 0;\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#_v\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._v = 0;\r\n\r\n /**\r\n * Is this color update locked?\r\n *\r\n * @name Phaser.Display.Color#_locked\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._locked = false;\r\n\r\n /**\r\n * An array containing the calculated color values for WebGL use.\r\n *\r\n * @name Phaser.Display.Color#gl\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.gl = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * Pre-calculated internal color value.\r\n *\r\n * @name Phaser.Display.Color#_color\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color = 0;\r\n\r\n /**\r\n * Pre-calculated internal color32 value.\r\n *\r\n * @name Phaser.Display.Color#_color32\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color32 = 0;\r\n\r\n /**\r\n * Pre-calculated internal color rgb string value.\r\n *\r\n * @name Phaser.Display.Color#_rgba\r\n * @type {string}\r\n * @private\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this._rgba = '';\r\n\r\n this.setTo(red, green, blue, alpha);\r\n },\r\n\r\n /**\r\n * Sets this color to be transparent. Sets all values to zero.\r\n *\r\n * @method Phaser.Display.Color#transparent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n transparent: function ()\r\n {\r\n this._locked = true;\r\n\r\n this.red = 0;\r\n this.green = 0;\r\n this.blue = 0;\r\n this.alpha = 0;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * @param {boolean} [updateHSV=true] - Update the HSV values after setting the RGB values?\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setTo: function (red, green, blue, alpha, updateHSV)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n if (updateHSV === undefined) { updateHSV = true; }\r\n\r\n this._locked = true;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(updateHSV);\r\n },\r\n\r\n /**\r\n * Sets the red, green, blue and alpha GL values of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setGLTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} red - The red color value. A number between 0 and 1.\r\n * @param {number} green - The green color value. A number between 0 and 1.\r\n * @param {number} blue - The blue color value. A number between 0 and 1.\r\n * @param {number} [alpha=1] - The alpha value. A number between 0 and 1.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setGLTo: function (red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this._locked = true;\r\n\r\n this.redGL = red;\r\n this.greenGL = green;\r\n this.blueGL = blue;\r\n this.alphaGL = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the color object given.\r\n *\r\n * @method Phaser.Display.Color#setFromRGB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromRGB: function (color)\r\n {\r\n this._locked = true;\r\n\r\n this.red = color.r;\r\n this.green = color.g;\r\n this.blue = color.b;\r\n\r\n if (color.hasOwnProperty('a'))\r\n {\r\n this.alpha = color.a;\r\n }\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the hue, saturation and lightness values given.\r\n *\r\n * @method Phaser.Display.Color#setFromHSV\r\n * @since 3.13.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromHSV: function (h, s, v)\r\n {\r\n return HSVToRGB(h, s, v, this);\r\n },\r\n\r\n /**\r\n * Updates the internal cache values.\r\n *\r\n * @method Phaser.Display.Color#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n update: function (updateHSV)\r\n {\r\n if (updateHSV === undefined) { updateHSV = false; }\r\n\r\n if (this._locked)\r\n {\r\n return this;\r\n }\r\n\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n var a = this.a;\r\n\r\n this._color = GetColor(r, g, b);\r\n this._color32 = GetColor32(r, g, b, a);\r\n this._rgba = 'rgba(' + r + ',' + g + ',' + b + ',' + (a / 255) + ')';\r\n\r\n if (updateHSV)\r\n {\r\n RGBToHSV(r, g, b, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal hsv cache values.\r\n *\r\n * @method Phaser.Display.Color#updateHSV\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n updateHSV: function ()\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n RGBToHSV(r, g, b, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a new Color component using the values from this one.\r\n *\r\n * @method Phaser.Display.Color#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} A new Color object.\r\n */\r\n clone: function ()\r\n {\r\n return new Color(this.r, this.g, this.b, this.a);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be grayscaled based on the shade value given.\r\n *\r\n * @method Phaser.Display.Color#gray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} shade - A value between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n gray: function (shade)\r\n {\r\n return this.setTo(shade, shade, shade);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#random\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n random: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var r = Math.floor(min + Math.random() * (max - min));\r\n var g = Math.floor(min + Math.random() * (max - min));\r\n var b = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random grayscale color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#randomGray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n randomGray: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var s = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(s, s, s);\r\n },\r\n\r\n /**\r\n * Increase the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#saturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n saturate: function (amount)\r\n {\r\n this.s += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#desaturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n desaturate: function (amount)\r\n {\r\n this.s -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#lighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n lighten: function (amount)\r\n {\r\n this.v += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#darken\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n darken: function (amount)\r\n {\r\n this.v -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brighten this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#brighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n brighten: function (amount)\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n r = Math.max(0, Math.min(255, r - Math.round(255 * - (amount / 100))));\r\n g = Math.max(0, Math.min(255, g - Math.round(255 * - (amount / 100))));\r\n b = Math.max(0, Math.min(255, b - Math.round(255 * - (amount / 100))));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * The color of this Color component, not including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n return this._color;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component, including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color32\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color32: {\r\n\r\n get: function ()\r\n {\r\n return this._color32;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component as a string which can be used in CSS color values.\r\n *\r\n * @name Phaser.Display.Color#rgba\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n rgba: {\r\n\r\n get: function ()\r\n {\r\n return this._rgba;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#redGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n redGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[0] = Math.min(Math.abs(value), 1);\r\n\r\n this.r = Math.floor(this.gl[0] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#greenGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n greenGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[1] = Math.min(Math.abs(value), 1);\r\n\r\n this.g = Math.floor(this.gl[1] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#blueGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blueGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[2] = Math.min(Math.abs(value), 1);\r\n\r\n this.b = Math.floor(this.gl[2] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#alphaGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alphaGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[3] = Math.min(Math.abs(value), 1);\r\n\r\n this.a = Math.floor(this.gl[3] * 255);\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#red\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.r = Math.min(value, 255);\r\n\r\n this.gl[0] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#green\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.g = Math.min(value, 255);\r\n\r\n this.gl[1] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#blue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.b = Math.min(value, 255);\r\n\r\n this.gl[2] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.a = Math.min(value, 255);\r\n\r\n this.gl[3] = value / 255;\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#h\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n h: {\r\n\r\n get: function ()\r\n {\r\n return this._h;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._h = value;\r\n\r\n HSVToRGB(value, this._s, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#s\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n s: {\r\n\r\n get: function ()\r\n {\r\n return this._s;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._s = value;\r\n\r\n HSVToRGB(this._h, value, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#v\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n v: {\r\n\r\n get: function ()\r\n {\r\n return this._v;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._v = value;\r\n\r\n HSVToRGB(this._h, this._s, value, this);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Color.js?")},"./node_modules/phaser/src/display/color/ColorToRGBA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts the given color value into an Object containing r,g,b and a properties.\r\n *\r\n * @function Phaser.Display.Color.ColorToRGBA\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - A color value, optionally including the alpha value.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the parsed color values.\r\n */\r\nvar ColorToRGBA = function (color)\r\n{\r\n var output = {\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF,\r\n a: 255\r\n };\r\n\r\n if (color > 16777215)\r\n {\r\n output.a = color >>> 24;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ColorToRGBA;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ColorToRGBA.js?")},"./node_modules/phaser/src/display/color/ComponentToHex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a string containing a hex representation of the given color component.\r\n *\r\n * @function Phaser.Display.Color.ComponentToHex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} color - The color channel to get the hex value for, must be a value between 0 and 255.\r\n *\r\n * @return {string} A string of length 2 characters, i.e. 255 = ff, 100 = 64.\r\n */\r\nvar ComponentToHex = function (color)\r\n{\r\n var hex = color.toString(16);\r\n\r\n return (hex.length === 1) ? '0' + hex : hex;\r\n};\r\n\r\nmodule.exports = ComponentToHex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ComponentToHex.js?")},"./node_modules/phaser/src/display/color/GetColor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given 3 separate color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor = function (red, green, blue)\r\n{\r\n return red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor.js?")},"./node_modules/phaser/src/display/color/GetColor32.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given an alpha and 3 color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor32\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} alpha - The alpha color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor32 = function (red, green, blue, alpha)\r\n{\r\n return alpha << 24 | red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor32;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor32.js?")},"./node_modules/phaser/src/display/color/HSLToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\n\n/**\n * Converts HSL (hue, saturation and lightness) values to a Phaser Color object.\n *\n * @function Phaser.Display.Color.HSLToColor\n * @since 3.0.0\n *\n * @param {number} h - The hue value in the range 0 to 1.\n * @param {number} s - The saturation value in the range 0 to 1.\n * @param {number} l - The lightness value in the range 0 to 1.\n *\n * @return {Phaser.Display.Color} A Color object created from the results of the h, s and l values.\n */\nvar HSLToColor = function (h, s, l)\n{\n // achromatic by default\n var r = l;\n var g = l;\n var b = l;\n\n if (s !== 0)\n {\n var q = (l < 0.5) ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n\n r = HueToComponent(p, q, h + 1 / 3);\n g = HueToComponent(p, q, h);\n b = HueToComponent(p, q, h - 1 / 3);\n }\n\n var color = new Color();\n\n return color.setGLTo(r, g, b, 1);\n};\n\nmodule.exports = HSLToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSLToColor.js?')},"./node_modules/phaser/src/display/color/HSVColorWheel.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\n\n/**\n * Get HSV color wheel values in an array which will be 360 elements in size.\n *\n * @function Phaser.Display.Color.HSVColorWheel\n * @since 3.0.0\n *\n * @param {number} [s=1] - The saturation, in the range 0 - 1.\n * @param {number} [v=1] - The value, in the range 0 - 1.\n *\n * @return {Phaser.Types.Display.ColorObject[]} An array containing 360 elements, where each contains a single numeric value corresponding to the color at that point in the HSV color wheel.\n */\nvar HSVColorWheel = function (s, v)\n{\n if (s === undefined) { s = 1; }\n if (v === undefined) { v = 1; }\n\n var colors = [];\n\n for (var c = 0; c <= 359; c++)\n {\n colors.push(HSVToRGB(c / 359, s, v));\n }\n\n return colors;\n};\n\nmodule.exports = HSVColorWheel;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVColorWheel.js?')},"./node_modules/phaser/src/display/color/HSVToRGB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\n\r\n/**\r\n * Converts an HSV (hue, saturation and value) color value to RGB.\r\n * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes HSV values are contained in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HSVToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n * @param {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} [out] - A Color object to store the results in. If not given a new ColorObject will be created.\r\n *\r\n * @return {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar HSVToRGB = function (h, s, v, out)\r\n{\r\n if (s === undefined) { s = 1; }\r\n if (v === undefined) { v = 1; }\r\n\r\n var i = Math.floor(h * 6);\r\n var f = h * 6 - i;\r\n\r\n var p = Math.floor((v * (1 - s)) * 255);\r\n var q = Math.floor((v * (1 - f * s)) * 255);\r\n var t = Math.floor((v * (1 - (1 - f) * s)) * 255);\r\n\r\n v = Math.floor(v *= 255);\r\n\r\n var r = v;\r\n var g = v;\r\n var b = v;\r\n\r\n var c = i % 6;\r\n\r\n if (c === 0)\r\n {\r\n g = t;\r\n b = p;\r\n }\r\n else if (c === 1)\r\n {\r\n r = q;\r\n b = p;\r\n }\r\n else if (c === 2)\r\n {\r\n r = p;\r\n b = t;\r\n }\r\n else if (c === 3)\r\n {\r\n r = p;\r\n g = q;\r\n }\r\n else if (c === 4)\r\n {\r\n r = t;\r\n g = p;\r\n }\r\n else if (c === 5)\r\n {\r\n g = p;\r\n b = q;\r\n }\r\n\r\n if (!out)\r\n {\r\n return { r: r, g: g, b: b, color: GetColor(r, g, b) };\r\n }\r\n else if (out.setTo)\r\n {\r\n return out.setTo(r, g, b, out.alpha, false);\r\n }\r\n else\r\n {\r\n out.r = r;\r\n out.g = g;\r\n out.b = b;\r\n out.color = GetColor(r, g, b);\r\n\r\n return out;\r\n }\r\n};\r\n\r\nmodule.exports = HSVToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVToRGB.js?')},"./node_modules/phaser/src/display/color/HexStringToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts a hex string into a Phaser Color object.\r\n * \r\n * The hex string can supplied as `\'#0033ff\'` or the short-hand format of `\'#03f\'`; it can begin with an optional "#" or "0x", or be unprefixed.\r\n *\r\n * An alpha channel is _not_ supported.\r\n *\r\n * @function Phaser.Display.Color.HexStringToColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} hex - The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`.\r\n *\r\n * @return {Phaser.Display.Color} A Color object populated by the values of the given string.\r\n */\r\nvar HexStringToColor = function (hex)\r\n{\r\n var color = new Color();\r\n\r\n // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")\r\n hex = hex.replace(/^(?:#|0x)?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b)\r\n {\r\n return r + r + g + g + b + b;\r\n });\r\n\r\n var result = (/^(?:#|0x)?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i).exec(hex);\r\n\r\n if (result)\r\n {\r\n var r = parseInt(result[1], 16);\r\n var g = parseInt(result[2], 16);\r\n var b = parseInt(result[3], 16);\r\n\r\n color.setTo(r, g, b);\r\n }\r\n\r\n return color;\r\n};\r\n\r\nmodule.exports = HexStringToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HexStringToColor.js?')},"./node_modules/phaser/src/display/color/HueToComponent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts a hue to an RGB color.\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HueToComponent\r\n * @since 3.0.0\r\n *\r\n * @param {number} p\r\n * @param {number} q\r\n * @param {number} t\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar HueToComponent = function (p, q, t)\r\n{\r\n if (t < 0)\r\n {\r\n t += 1;\r\n }\r\n\r\n if (t > 1)\r\n {\r\n t -= 1;\r\n }\r\n\r\n if (t < 1 / 6)\r\n {\r\n return p + (q - p) * 6 * t;\r\n }\r\n\r\n if (t < 1 / 2)\r\n {\r\n return q;\r\n }\r\n\r\n if (t < 2 / 3)\r\n {\r\n return p + (q - p) * (2 / 3 - t) * 6;\r\n }\r\n\r\n return p;\r\n};\r\n\r\nmodule.exports = HueToComponent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HueToComponent.js?")},"./node_modules/phaser/src/display/color/IntegerToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\n\n/**\n * Converts the given color value into an instance of a Color object.\n *\n * @function Phaser.Display.Color.IntegerToColor\n * @since 3.0.0\n *\n * @param {integer} input - The color value to convert into a Color object.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar IntegerToColor = function (input)\n{\n var rgb = IntegerToRGB(input);\n\n return new Color(rgb.r, rgb.g, rgb.b, rgb.a);\n};\n\nmodule.exports = IntegerToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToColor.js?')},"./node_modules/phaser/src/display/color/IntegerToRGB.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Return the component parts of a color as an Object with the properties alpha, red, green, blue.\r\n *\r\n * Alpha will only be set if it exists in the given color (0xAARRGGBB)\r\n *\r\n * @function Phaser.Display.Color.IntegerToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {integer} input - The color value to convert into a Color object.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar IntegerToRGB = function (color)\r\n{\r\n if (color > 16777215)\r\n {\r\n // The color value has an alpha component\r\n return {\r\n a: color >>> 24,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n else\r\n {\r\n return {\r\n a: 255,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n};\r\n\r\nmodule.exports = IntegerToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToRGB.js?")},"./node_modules/phaser/src/display/color/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color.Interpolate\r\n * @memberof Phaser.Display.Color\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Interpolates between the two given color ranges over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.RGBWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {number} r1 - Red value.\r\n * @param {number} g1 - Blue value.\r\n * @param {number} b1 - Green value.\r\n * @param {number} r2 - Red value.\r\n * @param {number} g2 - Blue value.\r\n * @param {number} b2 - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar RGBWithRGB = function (r1, g1, b1, r2, g2, b2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n var t = index / length;\r\n\r\n return {\r\n r: Linear(r1, r2, t),\r\n g: Linear(g1, g2, t),\r\n b: Linear(b1, b2, t)\r\n };\r\n};\r\n\r\n/**\r\n * Interpolates between the two given color objects over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithColor\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {Phaser.Display.Color} color2 - The second Color object.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithColor = function (color1, color2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color1.r, color1.g, color1.b, color2.r, color2.g, color2.b, length, index);\r\n};\r\n\r\n/**\r\n * Interpolates between the Color object and color values over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {number} r - Red value.\r\n * @param {number} g - Blue value.\r\n * @param {number} b - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithRGB = function (color, r, g, b, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color.r, color.g, color.b, r, g, b, length, index);\r\n};\r\n\r\nmodule.exports = {\r\n\r\n RGBWithRGB: RGBWithRGB,\r\n ColorWithRGB: ColorWithRGB,\r\n ColorWithColor: ColorWithColor\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Interpolate.js?')},"./node_modules/phaser/src/display/color/ObjectToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance.\r\n *\r\n * @function Phaser.Display.Color.ObjectToColor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} input - An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ObjectToColor = function (input)\r\n{\r\n return new Color(input.r, input.g, input.b, input.a);\r\n};\r\n\r\nmodule.exports = ObjectToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ObjectToColor.js?')},"./node_modules/phaser/src/display/color/RGBStringToColor.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ \"./node_modules/phaser/src/display/color/Color.js\");\n\n/**\n * Converts a CSS 'web' string into a Phaser Color object.\n * \n * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].\n *\n * @function Phaser.Display.Color.RGBStringToColor\n * @since 3.0.0\n *\n * @param {string} rgb - The CSS format color string, using the `rgb` or `rgba` format.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RGBStringToColor = function (rgb)\n{\n var color = new Color();\n\n var result = (/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d+(?:\\.\\d+)?))?\\s*\\)$/).exec(rgb.toLowerCase());\n\n if (result)\n {\n var r = parseInt(result[1], 10);\n var g = parseInt(result[2], 10);\n var b = parseInt(result[3], 10);\n var a = (result[4] !== undefined) ? parseFloat(result[4]) : 1;\n\n color.setTo(r, g, b, a * 255);\n }\n\n return color;\n};\n\nmodule.exports = RGBStringToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBStringToColor.js?")},"./node_modules/phaser/src/display/color/RGBToHSV.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts an RGB color value to HSV (hue, saturation and value).\r\n * Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.RGBToHSV\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} [out] - An object to store the color values in. If not given an HSV Color Object will be created.\r\n *\r\n * @return {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} An object with the properties `h`, `s` and `v` set.\r\n */\r\nvar RGBToHSV = function (r, g, b, out)\r\n{\r\n if (out === undefined) { out = { h: 0, s: 0, v: 0 }; }\r\n\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n var min = Math.min(r, g, b);\r\n var max = Math.max(r, g, b);\r\n var d = max - min;\r\n\r\n // achromatic by default\r\n var h = 0;\r\n var s = (max === 0) ? 0 : d / max;\r\n var v = max;\r\n\r\n if (max !== min)\r\n {\r\n if (max === r)\r\n {\r\n h = (g - b) / d + ((g < b) ? 6 : 0);\r\n }\r\n else if (max === g)\r\n {\r\n h = (b - r) / d + 2;\r\n }\r\n else if (max === b)\r\n {\r\n h = (r - g) / d + 4;\r\n }\r\n\r\n h /= 6;\r\n }\r\n\r\n if (out.hasOwnProperty('_h'))\r\n {\r\n out._h = h;\r\n out._s = s;\r\n out._v = v;\r\n }\r\n else\r\n {\r\n out.h = h;\r\n out.s = s;\r\n out.v = v;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RGBToHSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToHSV.js?")},"./node_modules/phaser/src/display/color/RGBToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ \"./node_modules/phaser/src/display/color/ComponentToHex.js\");\r\n\r\n/**\r\n * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`.\r\n *\r\n * @function Phaser.Display.Color.RGBToString\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {integer} [a=255] - The alpha value. A number between 0 and 255.\r\n * @param {string} [prefix=#] - The prefix of the string. Either `#` or `0x`.\r\n *\r\n * @return {string} A string-based representation of the color values.\r\n */\r\nvar RGBToString = function (r, g, b, a, prefix)\r\n{\r\n if (a === undefined) { a = 255; }\r\n if (prefix === undefined) { prefix = '#'; }\r\n\r\n if (prefix === '#')\r\n {\r\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\r\n }\r\n else\r\n {\r\n return '0x' + ComponentToHex(a) + ComponentToHex(r) + ComponentToHex(g) + ComponentToHex(b);\r\n }\r\n};\r\n\r\nmodule.exports = RGBToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToString.js?")},"./node_modules/phaser/src/display/color/RandomRGB.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\n\n/**\n * Creates a new Color object where the r, g, and b values have been set to random values\n * based on the given min max values.\n *\n * @function Phaser.Display.Color.RandomRGB\n * @since 3.0.0\n *\n * @param {integer} [min=0] - The minimum value to set the random range from (between 0 and 255)\n * @param {integer} [max=255] - The maximum value to set the random range from (between 0 and 255)\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RandomRGB = function (min, max)\n{\n if (min === undefined) { min = 0; }\n if (max === undefined) { max = 255; }\n\n return new Color(Between(min, max), Between(min, max), Between(min, max));\n};\n\nmodule.exports = RandomRGB;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RandomRGB.js?')},"./node_modules/phaser/src/display/color/ValueToColor.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ \"./node_modules/phaser/src/display/color/HexStringToColor.js\");\r\nvar IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ \"./node_modules/phaser/src/display/color/IntegerToColor.js\");\r\nvar ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ \"./node_modules/phaser/src/display/color/ObjectToColor.js\");\r\nvar RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ \"./node_modules/phaser/src/display/color/RGBStringToColor.js\");\r\n\r\n/**\r\n * Converts the given source color value into an instance of a Color class.\r\n * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object.\r\n *\r\n * @function Phaser.Display.Color.ValueToColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} input - The source color value to convert.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ValueToColor = function (input)\r\n{\r\n var t = typeof input;\r\n\r\n switch (t)\r\n {\r\n case 'string':\r\n\r\n if (input.substr(0, 3).toLowerCase() === 'rgb')\r\n {\r\n return RGBStringToColor(input);\r\n }\r\n else\r\n {\r\n return HexStringToColor(input);\r\n }\r\n\r\n case 'number':\r\n\r\n return IntegerToColor(input);\r\n\r\n case 'object':\r\n\r\n return ObjectToColor(input);\r\n }\r\n};\r\n\r\nmodule.exports = ValueToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ValueToColor.js?")},"./node_modules/phaser/src/display/color/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\nColor.ColorToRGBA = __webpack_require__(/*! ./ColorToRGBA */ "./node_modules/phaser/src/display/color/ColorToRGBA.js");\r\nColor.ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ "./node_modules/phaser/src/display/color/ComponentToHex.js");\r\nColor.GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\nColor.GetColor32 = __webpack_require__(/*! ./GetColor32 */ "./node_modules/phaser/src/display/color/GetColor32.js");\r\nColor.HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ "./node_modules/phaser/src/display/color/HexStringToColor.js");\r\nColor.HSLToColor = __webpack_require__(/*! ./HSLToColor */ "./node_modules/phaser/src/display/color/HSLToColor.js");\r\nColor.HSVColorWheel = __webpack_require__(/*! ./HSVColorWheel */ "./node_modules/phaser/src/display/color/HSVColorWheel.js");\r\nColor.HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\r\nColor.HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\r\nColor.IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ "./node_modules/phaser/src/display/color/IntegerToColor.js");\r\nColor.IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\r\nColor.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/display/color/Interpolate.js");\r\nColor.ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ "./node_modules/phaser/src/display/color/ObjectToColor.js");\r\nColor.RandomRGB = __webpack_require__(/*! ./RandomRGB */ "./node_modules/phaser/src/display/color/RandomRGB.js");\r\nColor.RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ "./node_modules/phaser/src/display/color/RGBStringToColor.js");\r\nColor.RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ "./node_modules/phaser/src/display/color/RGBToHSV.js");\r\nColor.RGBToString = __webpack_require__(/*! ./RGBToString */ "./node_modules/phaser/src/display/color/RGBToString.js");\r\nColor.ValueToColor = __webpack_require__(/*! ./ValueToColor */ "./node_modules/phaser/src/display/color/ValueToColor.js");\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/index.js?')},"./node_modules/phaser/src/display/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Align: __webpack_require__(/*! ./align */ "./node_modules/phaser/src/display/align/index.js"),\r\n BaseShader: __webpack_require__(/*! ./shader/BaseShader */ "./node_modules/phaser/src/display/shader/BaseShader.js"),\r\n Bounds: __webpack_require__(/*! ./bounds */ "./node_modules/phaser/src/display/bounds/index.js"),\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/display/canvas/index.js"),\r\n Color: __webpack_require__(/*! ./color */ "./node_modules/phaser/src/display/color/index.js"),\r\n Masks: __webpack_require__(/*! ./mask */ "./node_modules/phaser/src/display/mask/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/index.js?')},"./node_modules/phaser/src/display/mask/BitmapMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n * \r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/BitmapMask.js?")},"./node_modules/phaser/src/display/mask/GeometryMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/GeometryMask.js?")},"./node_modules/phaser/src/display/mask/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Masks\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMask: __webpack_require__(/*! ./BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js"),\r\n GeometryMask: __webpack_require__(/*! ./GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/index.js?')},"./node_modules/phaser/src/display/shader/BaseShader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created.\r\n * \r\n * It contains the raw source code to the fragment and vertex shader, as well as an object that defines\r\n * the uniforms the shader requires, if any.\r\n * \r\n * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced\r\n * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`.\r\n * \r\n * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource.\r\n * They can also be created at runtime, allowing you to use dynamically generated shader source code.\r\n * \r\n * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader,\r\n * suitable for debug rendering.\r\n *\r\n * @class BaseShader\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key of this shader. Must be unique within the shader cache.\r\n * @param {string} [fragmentSrc] - The fragment source for the shader.\r\n * @param {string} [vertexSrc] - The vertex source for the shader.\r\n * @param {any} [uniforms] - Optional object defining the uniforms the shader uses.\r\n */\r\nvar BaseShader = new Class({\r\n\r\n initialize:\r\n\r\n function BaseShader (key, fragmentSrc, vertexSrc, uniforms)\r\n {\r\n if (!fragmentSrc || fragmentSrc === '')\r\n {\r\n fragmentSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform vec2 resolution;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n ' vec2 uv = fragCoord / resolution.xy;',\r\n ' gl_FragColor = vec4(uv.xyx, 1.0);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (!vertexSrc || vertexSrc === '')\r\n {\r\n vertexSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform mat4 uProjectionMatrix;',\r\n 'uniform mat4 uViewMatrix;',\r\n 'uniform vec2 uResolution;',\r\n\r\n 'attribute vec2 inPosition;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n 'gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);',\r\n 'fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (uniforms === undefined) { uniforms = null; }\r\n\r\n /**\r\n * The key of this shader, unique within the shader cache of this Phaser game instance.\r\n *\r\n * @name Phaser.Display.BaseShader#key\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The source code, as a string, of the fragment shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#fragmentSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.fragmentSrc = fragmentSrc;\r\n\r\n /**\r\n * The source code, as a string, of the vertex shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#vertexSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.vertexSrc = vertexSrc;\r\n\r\n /**\r\n * The default uniforms for this shader.\r\n *\r\n * @name Phaser.Display.BaseShader#uniforms\r\n * @type {?any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = uniforms;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseShader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/shader/BaseShader.js?")},"./node_modules/phaser/src/dom/AddToDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it.\r\n * If no parent was given it falls back to using `document.body`.\r\n *\r\n * @function Phaser.DOM.AddToDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The element to be added to the DOM. Usually a Canvas object.\r\n * @param {(string|HTMLElement)} [parent] - The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.\r\n *\r\n * @return {HTMLElement} The element that was added to the DOM.\r\n */\r\nvar AddToDOM = function (element, parent)\r\n{\r\n var target;\r\n\r\n if (parent)\r\n {\r\n if (typeof parent === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(parent);\r\n }\r\n else if (typeof parent === 'object' && parent.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = parent;\r\n }\r\n }\r\n else if (element.parentElement)\r\n {\r\n return element;\r\n }\r\n\r\n // Fallback, covers an invalid ID and a non HTMLElement object\r\n if (!target)\r\n {\r\n target = document.body;\r\n }\r\n\r\n target.appendChild(element);\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = AddToDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/AddToDOM.js?")},"./node_modules/phaser/src/dom/CreateDOMContainer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\n\r\nvar CreateDOMContainer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (!config.parent || !config.domCreateContainer)\r\n {\r\n return;\r\n }\r\n\r\n // DOM Element Container\r\n var div = document.createElement('div');\r\n\r\n div.style.cssText = [\r\n 'display: block;',\r\n 'width: ' + game.scale.width + 'px;',\r\n 'height: ' + game.scale.height + 'px;',\r\n 'padding: 0; margin: 0;',\r\n 'position: absolute;',\r\n 'overflow: hidden;',\r\n 'pointer-events: none;',\r\n 'transform: scale(1);',\r\n 'transform-origin: left top;'\r\n ].join(' ');\r\n\r\n game.domContainer = div;\r\n\r\n AddToDOM(div, config.parent);\r\n};\r\n\r\nmodule.exports = CreateDOMContainer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/CreateDOMContainer.js?")},"./node_modules/phaser/src/dom/DOMContentLoaded.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ../device/OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * @callback ContentLoadedCallback\r\n */\r\n\r\n/**\r\n * Inspects the readyState of the document. If the document is already complete then it invokes the given callback.\r\n * If not complete it sets up several event listeners such as `deviceready`, and once those fire, it invokes the callback.\r\n * Called automatically by the Phaser.Game instance. Should not usually be accessed directly.\r\n *\r\n * @function Phaser.DOM.DOMContentLoaded\r\n * @since 3.0.0\r\n *\r\n * @param {ContentLoadedCallback} callback - The callback to be invoked when the device is ready and the DOM content is loaded.\r\n */\r\nvar DOMContentLoaded = function (callback)\r\n{\r\n if (document.readyState === 'complete' || document.readyState === 'interactive')\r\n {\r\n callback();\r\n\r\n return;\r\n }\r\n\r\n var check = function ()\r\n {\r\n document.removeEventListener('deviceready', check, true);\r\n document.removeEventListener('DOMContentLoaded', check, true);\r\n window.removeEventListener('load', check, true);\r\n\r\n callback();\r\n };\r\n\r\n if (!document.body)\r\n {\r\n window.setTimeout(check, 20);\r\n }\r\n else if (OS.cordova)\r\n {\r\n // Ref. http://docs.phonegap.com/en/3.5.0/cordova_events_events.md.html#deviceready\r\n document.addEventListener('deviceready', check, false);\r\n }\r\n else\r\n {\r\n document.addEventListener('DOMContentLoaded', check, true);\r\n window.addEventListener('load', check, true);\r\n }\r\n};\r\n\r\nmodule.exports = DOMContentLoaded;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/DOMContentLoaded.js?")},"./node_modules/phaser/src/dom/GetInnerHeight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to determine the document inner height across iOS and standard devices.\r\n * Based on code by @tylerjpeterson\r\n *\r\n * @function Phaser.DOM.GetInnerHeight\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} iOS - Is this running on iOS?\r\n *\r\n * @return {number} The inner height value.\r\n */\r\nvar GetInnerHeight = function (iOS)\r\n{\r\n\r\n if (!iOS)\r\n {\r\n return window.innerHeight;\r\n }\r\n\r\n var axis = Math.abs(window.orientation);\r\n\r\n var size = { w: 0, h: 0 };\r\n \r\n var ruler = document.createElement('div');\r\n\r\n ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0');\r\n\r\n document.documentElement.appendChild(ruler);\r\n\r\n size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth;\r\n size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight;\r\n\r\n document.documentElement.removeChild(ruler);\r\n\r\n ruler = null;\r\n\r\n if (Math.abs(window.orientation) !== 90)\r\n {\r\n return size.h;\r\n }\r\n else\r\n {\r\n return size.w;\r\n }\r\n};\r\n\r\nmodule.exports = GetInnerHeight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetInnerHeight.js?")},"./node_modules/phaser/src/dom/GetScreenOrientation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../scale/const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\n\r\n/**\r\n * Attempts to determine the screen orientation using the Orientation API.\r\n *\r\n * @function Phaser.DOM.GetScreenOrientation\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The width of the viewport.\r\n * @param {number} height - The height of the viewport.\r\n *\r\n * @return {string} The orientation.\r\n */\r\nvar GetScreenOrientation = function (width, height)\r\n{\r\n var screen = window.screen;\r\n var orientation = (screen) ? screen.orientation || screen.mozOrientation || screen.msOrientation : false;\r\n\r\n if (orientation && typeof orientation.type === 'string')\r\n {\r\n // Screen Orientation API specification\r\n return orientation.type;\r\n }\r\n else if (typeof orientation === 'string')\r\n {\r\n // moz / ms-orientation are strings\r\n return orientation;\r\n }\r\n\r\n if (screen)\r\n {\r\n return (screen.height > screen.width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (typeof window.orientation === 'number')\r\n {\r\n // This may change by device based on \"natural\" orientation.\r\n return (window.orientation === 0 || window.orientation === 180) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (window.matchMedia)\r\n {\r\n if (window.matchMedia('(orientation: portrait)').matches)\r\n {\r\n return CONST.PORTRAIT;\r\n }\r\n else if (window.matchMedia('(orientation: landscape)').matches)\r\n {\r\n return CONST.LANDSCAPE;\r\n }\r\n }\r\n \r\n return (height > width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n};\r\n\r\nmodule.exports = GetScreenOrientation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetScreenOrientation.js?")},"./node_modules/phaser/src/dom/GetTarget.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to get the target DOM element based on the given value, which can be either\r\n * a string, in which case it will be looked-up by ID, or an element node. If nothing\r\n * can be found it will return a reference to the document.body.\r\n *\r\n * @function Phaser.DOM.GetTarget\r\n * @since 3.16.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to look-up.\r\n */\r\nvar GetTarget = function (element)\r\n{\r\n var target;\r\n\r\n if (element !== '')\r\n {\r\n if (typeof element === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(element);\r\n }\r\n else if (element && element.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = element;\r\n }\r\n }\r\n\r\n // Fallback to the document body. Covers an invalid ID and a non HTMLElement object.\r\n if (!target)\r\n {\r\n // Use the full window\r\n target = document.body;\r\n }\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = GetTarget;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetTarget.js?")},"./node_modules/phaser/src/dom/ParseXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given data string and parses it as XML.\r\n * First tries to use the window.DOMParser and reverts to the Microsoft.XMLDOM if that fails.\r\n * The parsed XML object is returned, or `null` if there was an error while parsing the data.\r\n *\r\n * @function Phaser.DOM.ParseXML\r\n * @since 3.0.0\r\n *\r\n * @param {string} data - The XML source stored in a string.\r\n *\r\n * @return {?(DOMParser|ActiveXObject)} The parsed XML data, or `null` if the data could not be parsed.\r\n */\r\nvar ParseXML = function (data)\r\n{\r\n var xml = '';\r\n\r\n try\r\n {\r\n if (window['DOMParser'])\r\n {\r\n var domparser = new DOMParser();\r\n xml = domparser.parseFromString(data, 'text/xml');\r\n }\r\n else\r\n {\r\n xml = new ActiveXObject('Microsoft.XMLDOM');\r\n xml.loadXML(data);\r\n }\r\n }\r\n catch (e)\r\n {\r\n xml = null;\r\n }\r\n\r\n if (!xml || !xml.documentElement || xml.getElementsByTagName('parsererror').length)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n return xml;\r\n }\r\n};\r\n\r\nmodule.exports = ParseXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/ParseXML.js?")},"./node_modules/phaser/src/dom/RemoveFromDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to remove the element from its parentNode in the DOM.\r\n *\r\n * @function Phaser.DOM.RemoveFromDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to remove from its parent node.\r\n */\r\nvar RemoveFromDOM = function (element)\r\n{\r\n if (element.parentNode)\r\n {\r\n element.parentNode.removeChild(element);\r\n }\r\n};\r\n\r\nmodule.exports = RemoveFromDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RemoveFromDOM.js?")},"./node_modules/phaser/src/dom/RequestAnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * Abstracts away the use of RAF or setTimeOut for the core game update loop.\r\n * This is invoked automatically by the Phaser.Game instance.\r\n *\r\n * @class RequestAnimationFrame\r\n * @memberof Phaser.DOM\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar RequestAnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function RequestAnimationFrame ()\r\n {\r\n /**\r\n * True if RequestAnimationFrame is running, otherwise false.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isRunning\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The callback to be invoked each step.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#callback\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * The most recent timestamp. Either a DOMHighResTimeStamp under RAF or `Date.now` under SetTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#tick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.tick = 0;\r\n\r\n /**\r\n * True if the step is using setTimeout instead of RAF.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isSetTimeOut\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isSetTimeOut = false;\r\n\r\n /**\r\n * The setTimeout or RAF callback ID used when canceling them.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#timeOutID\r\n * @type {?number}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.timeOutID = null;\r\n\r\n /**\r\n * The previous time the step was called.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n var _this = this;\r\n\r\n /**\r\n * The RAF step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to requestAnimationFrame.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#step\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.step = function step ()\r\n {\r\n // Because we cannot trust the time passed to this callback from the browser and need it kept in sync with event times\r\n var timestamp = window.performance.now();\r\n\r\n // DOMHighResTimeStamp\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = timestamp;\r\n\r\n _this.callback(timestamp);\r\n\r\n _this.timeOutID = window.requestAnimationFrame(step);\r\n };\r\n\r\n /**\r\n * The SetTimeout step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to setTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#stepTimeout\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.stepTimeout = function stepTimeout ()\r\n {\r\n var d = Date.now();\r\n\r\n var delay = Math.max(16 + _this.lastTime - d, 0);\r\n\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = d;\r\n\r\n _this.callback(d);\r\n\r\n _this.timeOutID = window.setTimeout(stepTimeout, delay);\r\n };\r\n },\r\n\r\n /**\r\n * Starts the requestAnimationFrame or setTimeout process running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#start\r\n * @since 3.0.0\r\n *\r\n * @param {FrameRequestCallback} callback - The callback to invoke each step.\r\n * @param {boolean} forceSetTimeOut - Should it use SetTimeout, even if RAF is available?\r\n */\r\n start: function (callback, forceSetTimeOut)\r\n {\r\n if (this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this.callback = callback;\r\n\r\n this.isSetTimeOut = forceSetTimeOut;\r\n\r\n this.isRunning = true;\r\n\r\n this.timeOutID = (forceSetTimeOut) ? window.setTimeout(this.stepTimeout, 0) : window.requestAnimationFrame(this.step);\r\n },\r\n\r\n /**\r\n * Stops the requestAnimationFrame or setTimeout from running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n if (this.isSetTimeOut)\r\n {\r\n clearTimeout(this.timeOutID);\r\n }\r\n else\r\n {\r\n window.cancelAnimationFrame(this.timeOutID);\r\n }\r\n },\r\n\r\n /**\r\n * Stops the step from running and clears the callback reference.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RequestAnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RequestAnimationFrame.js?')},"./node_modules/phaser/src/dom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.DOM\r\n */\r\n\r\nvar Dom = {\r\n\r\n AddToDOM: __webpack_require__(/*! ./AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js"),\r\n DOMContentLoaded: __webpack_require__(/*! ./DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js"),\r\n GetScreenOrientation: __webpack_require__(/*! ./GetScreenOrientation */ "./node_modules/phaser/src/dom/GetScreenOrientation.js"),\r\n GetTarget: __webpack_require__(/*! ./GetTarget */ "./node_modules/phaser/src/dom/GetTarget.js"),\r\n ParseXML: __webpack_require__(/*! ./ParseXML */ "./node_modules/phaser/src/dom/ParseXML.js"),\r\n RemoveFromDOM: __webpack_require__(/*! ./RemoveFromDOM */ "./node_modules/phaser/src/dom/RemoveFromDOM.js"),\r\n RequestAnimationFrame: __webpack_require__(/*! ./RequestAnimationFrame */ "./node_modules/phaser/src/dom/RequestAnimationFrame.js")\r\n\r\n};\r\n\r\nmodule.exports = Dom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/index.js?')},"./node_modules/phaser/src/events/EventEmitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EE = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\n\r\n/**\r\n * @classdesc\r\n * EventEmitter is a Scene Systems plugin compatible version of eventemitter3.\r\n *\r\n * @class EventEmitter\r\n * @memberof Phaser.Events\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar EventEmitter = new Class({\r\n\r\n Extends: EE,\r\n\r\n initialize:\r\n\r\n function EventEmitter ()\r\n {\r\n EE.call(this);\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Return an array listing the events for which the emitter has registered listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#eventNames\r\n * @since 3.0.0\r\n *\r\n * @return {array}\r\n */\r\n\r\n/**\r\n * Return the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {array} The registered listeners.\r\n */\r\n\r\n/**\r\n * Return the number of listeners listening to a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listenerCount\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {number} The number of listeners.\r\n */\r\n\r\n/**\r\n * Calls each of the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#emit\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {...*} [args] - Additional arguments that will be passed to the event handler.\r\n *\r\n * @return {boolean} `true` if the event had listeners, else `false`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#on\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#addListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a one-time listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#once\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#off\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove all listeners, or those of the specified event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeAllListeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} [event] - The event name.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\nPluginCache.register(\'EventEmitter\', EventEmitter, \'events\');\r\n\r\nmodule.exports = EventEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/EventEmitter.js?')},"./node_modules/phaser/src/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Events\r\n */\r\n\r\nmodule.exports = { EventEmitter: __webpack_require__(/*! ./EventEmitter */ "./node_modules/phaser/src/events/EventEmitter.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/index.js?')},"./node_modules/phaser/src/gameobjects/BuildGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // ScaleMode\r\n\r\n gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT);\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObject.js?")},"./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Adds an Animation component to a Sprite and populates it based on the given config.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObjectAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The sprite to add an Animation component to.\r\n * @param {object} config - The animation config.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The updated Sprite.\r\n */\r\nvar BuildGameObjectAnimation = function (sprite, config)\r\n{\r\n var animConfig = GetAdvancedValue(config, 'anims', null);\r\n\r\n if (animConfig === null)\r\n {\r\n return sprite;\r\n }\r\n\r\n if (typeof animConfig === 'string')\r\n {\r\n // { anims: 'key' }\r\n sprite.anims.play(animConfig);\r\n }\r\n else if (typeof animConfig === 'object')\r\n {\r\n // { anims: {\r\n // key: string\r\n // startFrame: [string|integer]\r\n // delay: [float]\r\n // repeat: [integer]\r\n // repeatDelay: [float]\r\n // yoyo: [boolean]\r\n // play: [boolean]\r\n // delayedPlay: [boolean]\r\n // }\r\n // }\r\n\r\n var anims = sprite.anims;\r\n\r\n var key = GetAdvancedValue(animConfig, 'key', undefined);\r\n var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined);\r\n\r\n var delay = GetAdvancedValue(animConfig, 'delay', 0);\r\n var repeat = GetAdvancedValue(animConfig, 'repeat', 0);\r\n var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0);\r\n var yoyo = GetAdvancedValue(animConfig, 'yoyo', false);\r\n\r\n var play = GetAdvancedValue(animConfig, 'play', false);\r\n var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0);\r\n\r\n anims.setDelay(delay);\r\n anims.setRepeat(repeat);\r\n anims.setRepeatDelay(repeatDelay);\r\n anims.setYoyo(yoyo);\r\n\r\n if (play)\r\n {\r\n anims.play(key, startFrame);\r\n }\r\n else if (delayedPlay > 0)\r\n {\r\n anims.delayedPlay(delayedPlay, key, startFrame);\r\n }\r\n else\r\n {\r\n anims.load(key);\r\n }\r\n }\r\n\r\n return sprite;\r\n};\r\n\r\nmodule.exports = BuildGameObjectAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js?")},"./node_modules/phaser/src/gameobjects/DisplayList.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar List = __webpack_require__(/*! ../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Display List plugin.\r\n *\r\n * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame.\r\n *\r\n * Some of these Game Objects may also be part of the Scene\'s [Update List]{@link Phaser.GameObjects.UpdateList}, for updating.\r\n *\r\n * @class DisplayList\r\n * @extends Phaser.Structs.List.\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Display List belongs to.\r\n */\r\nvar DisplayList = new Class({\r\n\r\n Extends: List,\r\n\r\n initialize:\r\n\r\n function DisplayList (scene)\r\n {\r\n List.call(this, scene);\r\n\r\n /**\r\n * The flag the determines whether Game Objects should be sorted when `depthSort()` is called.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#sortChildrenFlag\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.sortChildrenFlag = false;\r\n\r\n /**\r\n * The Scene that this Display List belongs to.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene\'s Systems.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next call to depthSort.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.sortChildrenFlag = true;\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n if (this.sortChildrenFlag)\r\n {\r\n StableSort.inplace(this.list, this.sortByDepth);\r\n\r\n this.sortChildrenFlag = false;\r\n }\r\n },\r\n\r\n /**\r\n * Compare the depth of two Game Objects.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#sortByDepth\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object.\r\n *\r\n * @return {integer} The difference between the depths of each Game Object.\r\n */\r\n sortByDepth: function (childA, childB)\r\n {\r\n return childA._depth - childB._depth;\r\n },\r\n\r\n /**\r\n * Returns an array which contains all objects currently on the Display List.\r\n * This is a reference to the main list array, not a copy of it, so be careful not to modify it.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#getChildren\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.list;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.list[i].destroy(true);\r\n }\r\n\r\n this.list.length = 0;\r\n\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DisplayList\', DisplayList, \'displayList\');\r\n\r\nmodule.exports = DisplayList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/DisplayList.js?')},"./node_modules/phaser/src/gameobjects/GameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ComponentsToJSON = __webpack_require__(/*! ./components/ToJSON */ \"./node_modules/phaser/src/gameobjects/components/ToJSON.js\");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Game Object belongs.\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n * \r\n * Phaser itself will never modify this value, although plugins may do so.\r\n * \r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could move from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(integer|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {integer}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n * \r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n * \r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(integer|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (shape, callback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, shape, callback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n if (this.input)\r\n {\r\n this.input.enabled = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n * \r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {integer[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n // indexes.unshift([parent.getIndex(child), parent.name]);\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\r\n */\r\n destroy: function (fromScene)\r\n {\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n\r\n var sys = this.scene.sys;\r\n\r\n if (!fromScene)\r\n {\r\n sys.displayList.remove(this);\r\n sys.updateList.remove(this);\r\n }\r\n\r\n if (this.input)\r\n {\r\n sys.input.clear(this);\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n this.body = undefined;\r\n }\r\n\r\n // Tell the Scene to re-sort the children\r\n if (!fromScene)\r\n {\r\n sys.queueDepthSort();\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n\r\n this.parentContainer = undefined;\r\n\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {integer} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObject.js?")},"./node_modules/phaser/src/gameobjects/GameObjectCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Creator is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically\r\n * added to the Scene.\r\n *\r\n * Game Objects directly register themselves with the Creator and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectCreator\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectCreator = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectCreator (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Creator belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object creator functions\r\n\r\nGameObjectCreator.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectCreator.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectCreator.remove = function (factoryType)\r\n{\r\n if (GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectCreator.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectCreator\', GameObjectCreator, \'make\');\r\n\r\nmodule.exports = GameObjectCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectCreator.js?')},"./node_modules/phaser/src/gameobjects/GameObjectFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n * \r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object factory functions\r\n\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectFactory\', GameObjectFactory, \'add\');\r\n\r\nmodule.exports = GameObjectFactory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectFactory.js?')},"./node_modules/phaser/src/gameobjects/UpdateList.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Update List plugin.\r\n *\r\n * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame.\r\n *\r\n * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering.\r\n *\r\n * @class UpdateList\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that the Update List belongs to.\r\n */\r\nvar UpdateList = new Class({\r\n\r\n initialize:\r\n\r\n function UpdateList (scene)\r\n {\r\n /**\r\n * The Scene that the Update List belongs to.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene's Systems.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The list of Game Objects.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_list\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Game Objects that are pending insertion into the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingInsertion\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Game Objects that are pending removal from the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingRemoval\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Add a Game Object to the Update List.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The added Game Object.\r\n */\r\n add: function (child)\r\n {\r\n // Is child already in this list?\r\n\r\n if (this._list.indexOf(child) === -1 && this._pendingInsertion.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The pre-update step.\r\n *\r\n * Handles Game Objects that are pending insertion to and removal from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var gameObject;\r\n\r\n // Delete old gameObjects\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n gameObject = this._pendingRemoval[i];\r\n\r\n var index = this._list.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._list.splice(index, 1);\r\n }\r\n }\r\n\r\n // Move pending to active\r\n this._list = this._list.concat(this._pendingInsertion.splice(0));\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * The update step.\r\n *\r\n * Pre-updates every active Game Object in the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n var list = this._list;\r\n var length = list.length;\r\n\r\n for (var i = 0; i < length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n if (gameObject.active)\r\n {\r\n gameObject.preUpdate.call(gameObject, time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Remove a Game Object from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove from the list.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The removed Game Object.\r\n */\r\n remove: function (child)\r\n {\r\n if (this._list.indexOf(child) !== -1 && this._pendingRemoval.indexOf(child) === -1)\r\n {\r\n this._pendingRemoval.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Remove all Game Objects from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.UpdateList} This UpdateList.\r\n */\r\n removeAll: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this._list[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this._list[i].destroy(true);\r\n }\r\n\r\n i = this._pendingRemoval.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingRemoval[i].destroy(true);\r\n }\r\n\r\n i = this._pendingInsertion.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingInsertion[i].destroy(true);\r\n }\r\n\r\n this._list.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n },\r\n\r\n /**\r\n * The length of the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this._list.length;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('UpdateList', UpdateList, 'updateList');\r\n\r\nmodule.exports = UpdateList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/UpdateList.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the position, width and height of a BitmapText Game Object.\r\n *\r\n * Returns a BitmapTextSize object that contains global and local variants of the Game Objects x and y coordinates and\r\n * its width and height.\r\n *\r\n * The global position and size take into account the Game Object's position and scale.\r\n *\r\n * The local position and size just takes into account the font data.\r\n *\r\n * @function GetBitmapTextSize\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - The BitmapText to calculate the position, width and height of.\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n * @param {object} [out] - Optional object to store the results in, to save constant object creation.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} The calculated position, width and height of the BitmapText.\r\n */\r\nvar GetBitmapTextSize = function (src, round, out)\r\n{\r\n if (out === undefined)\r\n {\r\n out = {\r\n local: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n global: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n lines: {\r\n shortest: 0,\r\n longest: 0,\r\n lengths: null\r\n }\r\n };\r\n }\r\n\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var bx = Number.MAX_VALUE;\r\n var by = Number.MAX_VALUE;\r\n var bw = 0;\r\n var bh = 0;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src.letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var scale = (src.fontSize / src.fontData.size);\r\n var sx = scale * src.scaleX;\r\n var sy = scale * src.scaleY;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n var lineWidths = [];\r\n var shortestLine = Number.MAX_VALUE;\r\n var longestLine = 0;\r\n var currentLine = 0;\r\n var currentLineWidth = 0;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n currentLine++;\r\n currentLineWidth = 0;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n x = xAdvance;\r\n y = yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (bx > x)\r\n {\r\n bx = x;\r\n }\r\n\r\n if (by > y)\r\n {\r\n by = y;\r\n }\r\n\r\n var gw = x + glyph.xAdvance;\r\n var gh = y + lineHeight;\r\n\r\n if (bw < gw)\r\n {\r\n bw = gw;\r\n }\r\n\r\n if (bh < gh)\r\n {\r\n bh = gh;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n currentLineWidth = gw * scale;\r\n }\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n var local = out.local;\r\n var global = out.global;\r\n var lines = out.lines;\r\n\r\n local.x = bx * scale;\r\n local.y = by * scale;\r\n local.width = bw * scale;\r\n local.height = bh * scale;\r\n\r\n global.x = (src.x - src.displayOriginX) + (bx * sx);\r\n global.y = (src.y - src.displayOriginY) + (by * sy);\r\n global.width = bw * sx;\r\n global.height = bh * sy;\r\n\r\n lines.shortest = shortestLine;\r\n lines.longest = longestLine;\r\n lines.lengths = lineWidths;\r\n\r\n if (round)\r\n {\r\n local.x = Math.round(local.x);\r\n local.y = Math.round(local.y);\r\n local.width = Math.round(local.width);\r\n local.height = Math.round(local.height);\r\n\r\n global.x = Math.round(global.x);\r\n global.y = Math.round(global.y);\r\n global.width = Math.round(global.width);\r\n global.height = Math.round(global.height);\r\n\r\n lines.shortest = Math.round(shortestLine);\r\n lines.longest = Math.round(longestLine);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBitmapTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ./ParseXMLBitmapFont */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @function ParseFromAtlas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont's texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture's frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} xSpacing - The x-axis spacing to add between each letter.\r\n * @param {integer} ySpacing - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nvar ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing)\r\n{\r\n var frame = scene.sys.textures.getFrame(textureKey, frameKey);\r\n var xml = scene.sys.cache.xml.get(xmlKey);\r\n\r\n if (frame && xml)\r\n {\r\n var data = ParseXMLBitmapFont(xml, xSpacing, ySpacing, frame);\r\n\r\n scene.sys.cache.bitmapFont.add(fontName, { data: data, texture: textureKey, frame: frameKey });\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = ParseFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor\r\n * and create a BitmapText object using a fixed-width retro font.\r\n *\r\n * @function Phaser.GameObjects.RetroFont.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Phaser Scene.\r\n * @param {Phaser.Types.GameObjects.BitmapText.RetroFontConfig} config - The font configuration object.\r\n *\r\n * @return {object} A parsed Bitmap Font data entry for the Bitmap Font cache.\r\n */\r\nvar ParseRetroFont = function (scene, config)\r\n{\r\n var w = config.width;\r\n var h = config.height;\r\n var cx = Math.floor(w / 2);\r\n var cy = Math.floor(h / 2);\r\n var letters = GetValue(config, 'chars', '');\r\n\r\n if (letters === '')\r\n {\r\n return;\r\n }\r\n\r\n var key = GetValue(config, 'image', '');\r\n var offsetX = GetValue(config, 'offset.x', 0);\r\n var offsetY = GetValue(config, 'offset.y', 0);\r\n var spacingX = GetValue(config, 'spacing.x', 0);\r\n var spacingY = GetValue(config, 'spacing.y', 0);\r\n var lineSpacing = GetValue(config, 'lineSpacing', 0);\r\n\r\n var charsPerRow = GetValue(config, 'charsPerRow', null);\r\n\r\n if (charsPerRow === null)\r\n {\r\n charsPerRow = scene.sys.textures.getFrame(key).width / w;\r\n\r\n if (charsPerRow > letters.length)\r\n {\r\n charsPerRow = letters.length;\r\n }\r\n }\r\n\r\n var x = offsetX;\r\n var y = offsetY;\r\n\r\n var data = {\r\n retroFont: true,\r\n font: key,\r\n size: w,\r\n lineHeight: h + lineSpacing,\r\n chars: {}\r\n };\r\n\r\n var r = 0;\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n // var node = letters[i];\r\n\r\n var charCode = letters.charCodeAt(i);\r\n\r\n data.chars[charCode] =\r\n {\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h,\r\n centerX: cx,\r\n centerY: cy,\r\n xOffset: 0,\r\n yOffset: 0,\r\n xAdvance: w,\r\n data: {},\r\n kerning: {}\r\n };\r\n\r\n r++;\r\n\r\n if (r === charsPerRow)\r\n {\r\n r = 0;\r\n x = offsetX;\r\n y += h + spacingY;\r\n }\r\n else\r\n {\r\n x += w + spacingX;\r\n }\r\n }\r\n\r\n var entry = {\r\n data: data,\r\n frame: null,\r\n texture: key\r\n };\r\n\r\n return entry;\r\n};\r\n\r\nmodule.exports = ParseRetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Read an integer value from an XML Node.\r\n *\r\n * @function getValue\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Node} node - The XML Node.\r\n * @param {string} attribute - The attribute to read.\r\n *\r\n * @return {integer} The parsed value.\r\n */\r\nfunction getValue (node, attribute)\r\n{\r\n return parseInt(node.getAttribute(attribute), 10);\r\n}\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @function ParseXMLBitmapFont\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nvar ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)\r\n{\r\n if (xSpacing === undefined) { xSpacing = 0; }\r\n if (ySpacing === undefined) { ySpacing = 0; }\r\n\r\n var data = {};\r\n var info = xml.getElementsByTagName('info')[0];\r\n var common = xml.getElementsByTagName('common')[0];\r\n\r\n data.font = info.getAttribute('face');\r\n data.size = getValue(info, 'size');\r\n data.lineHeight = getValue(common, 'lineHeight') + ySpacing;\r\n data.chars = {};\r\n\r\n var letters = xml.getElementsByTagName('char');\r\n\r\n var adjustForTrim = (frame !== undefined && frame.trimmed);\r\n\r\n if (adjustForTrim)\r\n {\r\n var top = frame.height;\r\n var left = frame.width;\r\n }\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n var node = letters[i];\r\n\r\n var charCode = getValue(node, 'id');\r\n var gx = getValue(node, 'x');\r\n var gy = getValue(node, 'y');\r\n var gw = getValue(node, 'width');\r\n var gh = getValue(node, 'height');\r\n\r\n // Handle frame trim issues\r\n\r\n if (adjustForTrim)\r\n {\r\n if (gx < left)\r\n {\r\n left = gx;\r\n }\r\n\r\n if (gy < top)\r\n {\r\n top = gy;\r\n }\r\n }\r\n\r\n data.chars[charCode] =\r\n {\r\n x: gx,\r\n y: gy,\r\n width: gw,\r\n height: gh,\r\n centerX: Math.floor(gw / 2),\r\n centerY: Math.floor(gh / 2),\r\n xOffset: getValue(node, 'xoffset'),\r\n yOffset: getValue(node, 'yoffset'),\r\n xAdvance: getValue(node, 'xadvance') + xSpacing,\r\n data: {},\r\n kerning: {}\r\n };\r\n }\r\n\r\n if (adjustForTrim && top !== 0 && left !== 0)\r\n {\r\n // console.log('top and left', top, left, frame.x, frame.y);\r\n\r\n // Now we know the top and left coordinates of the glyphs in the original data\r\n // so we can work out how much to adjust the glyphs by\r\n\r\n for (var code in data.chars)\r\n {\r\n var glyph = data.chars[code];\r\n\r\n glyph.x -= frame.x;\r\n glyph.y -= frame.y;\r\n }\r\n }\r\n\r\n var kernings = xml.getElementsByTagName('kerning');\r\n\r\n for (i = 0; i < kernings.length; i++)\r\n {\r\n var kern = kernings[i];\r\n\r\n var first = getValue(kern, 'first');\r\n var second = getValue(kern, 'second');\r\n var amount = getValue(kern, 'amount');\r\n\r\n data.chars[second].kerning[first] = amount;\r\n }\r\n\r\n return data;\r\n};\r\n\r\nmodule.exports = ParseXMLBitmapFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/gameobjects/bitmaptext/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.RetroFont\r\n * @since 3.6.0\r\n */\r\n\r\nvar RetroFont = { Parse: __webpack_require__(/*! ./ParseRetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js") };\r\n\r\n// Merge in the consts\r\nRetroFont = Extend(false, RetroFont, RETRO_FONT_CONST);\r\n\r\nmodule.exports = RetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = {\r\n\r\n /**\r\n * Text Set 1 = !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET1\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET1: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',\r\n\r\n /**\r\n * Text Set 2 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET2\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET2: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET3\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET3: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ',\r\n\r\n /**\r\n * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET4\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET4: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789',\r\n\r\n /**\r\n * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET5\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET5: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \\'!?-*:0123456789',\r\n\r\n /**\r\n * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET6\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET6: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.\\' ',\r\n\r\n /**\r\n * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET7\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET7: 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-\\'39',\r\n\r\n /**\r\n * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET8\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET8: '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET9\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET9: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\\'\"?!',\r\n\r\n /**\r\n * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET10\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET10: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET11\r\n * @since 3.6.0\r\n * @type {string}\r\n */\r\n TEXT_SET11: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()\\':;0123456789'\r\n\r\n};\r\n\r\nmodule.exports = RETRO_FONT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/const.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ../static/BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Render = __webpack_require__(/*! ./DynamicBitmapTextRender */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * @class DynamicBitmapText\r\n * @extends Phaser.GameObjects.BitmapText\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar DynamicBitmapText = new Class({\r\n\r\n Extends: BitmapText,\r\n\r\n Mixins: [\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicBitmapText (scene, x, y, font, text, size, align)\r\n {\r\n BitmapText.call(this, scene, x, y, font, text, size, align);\r\n\r\n this.type = 'DynamicBitmapText';\r\n\r\n /**\r\n * The horizontal scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollY = 0;\r\n\r\n /**\r\n * The crop width of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropWidth = 0;\r\n\r\n /**\r\n * The crop height of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropHeight = 0;\r\n\r\n /**\r\n * A callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#displayCallback\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallback}\r\n * @since 3.0.0\r\n */\r\n this.displayCallback;\r\n\r\n /**\r\n * The data object that is populated during rendering, then passed to the displayCallback.\r\n * You should modify this object then return it back from the callback. It's updated values\r\n * will be used to render the specific glyph.\r\n * \r\n * Please note that if you need a reference to this object locally in your game code then you\r\n * should shallow copy it, as it's updated and re-used for every glyph in the text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#callbackData\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig}\r\n * @since 3.11.0\r\n */\r\n this.callbackData = {\r\n parent: this,\r\n color: 0,\r\n tint: {\r\n topLeft: 0,\r\n topRight: 0,\r\n bottomLeft: 0,\r\n bottomRight: 0\r\n },\r\n index: 0,\r\n charCode: 0,\r\n x: 0,\r\n y: 0,\r\n scale: 0,\r\n rotation: 0,\r\n data: 0\r\n };\r\n },\r\n\r\n /**\r\n * Set the crop size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the crop.\r\n * @param {number} height - The height of the crop.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.cropWidth = width;\r\n this.cropHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * The callback receives a {@link Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig} object that contains information about the character that's\r\n * about to be rendered.\r\n *\r\n * It should return an object with `x`, `y`, `scale` and `rotation` properties that will be used instead of the\r\n * usual values when rendering.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setDisplayCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setDisplayCallback: function (callback)\r\n {\r\n this.displayCallback = callback;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the horizontal scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollX: function (value)\r\n {\r\n this.scrollX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the vertical scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollY: function (value)\r\n {\r\n this.scrollY = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicBitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var indexCount = 0;\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var rotation = 0;\r\n var scale = (src.fontSize / src.fontData.size);\r\n\r\n if (src.cropWidth > 0 && src.cropHeight > 0)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(0, 0, src.cropWidth, src.cropHeight);\r\n ctx.clip();\r\n }\r\n\r\n for (var index = 0; index < textLength; ++index)\r\n {\r\n // Reset the scale (in case the callback changed it)\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n charCode = text.charCodeAt(index);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n indexCount = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = (indexCount + glyph.xOffset + xAdvance) - src.scrollX;\r\n y = (glyph.yOffset + yAdvance) - src.scrollY;\r\n\r\n // This could be optimized so that it doesn\'t even bother drawing it if the x/y is out of range\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.index = index;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= cameraScrollX;\r\n y -= cameraScrollY;\r\n\r\n if (camera.roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.rotate(rotation);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n \r\n xAdvance += glyph.xAdvance;\r\n indexCount += 1;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#dynamicBitmapText\r\n * @since 3.0.0\r\n *²\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('dynamicBitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetAdvancedValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DynamicBitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dynamicBitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size)\r\n{\r\n return this.displayList.add(new DynamicBitmapText(this.scene, x, y, font, text, size));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicBitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicBitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var crop = (src.cropWidth > 0 || src.cropHeight > 0);\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.pushScissor(\r\n src.x,\r\n src.y,\r\n src.cropWidth * src.scaleX,\r\n src.cropHeight * src.scaleY\r\n );\r\n }\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n var fontMatrix = pipeline._tempMatrix4;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src.letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n var scrollX = src.scrollX;\r\n var scrollY = src.scrollY;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src.fontSize / fontData.size);\r\n var rotation = 0;\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = (glyph.xOffset + xAdvance) - scrollX;\r\n var y = (glyph.yOffset + yAdvance) - scrollY;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.color = 0;\r\n callbackData.tint.topLeft = tintTL;\r\n callbackData.tint.topRight = tintTR;\r\n callbackData.tint.bottomLeft = tintBL;\r\n callbackData.tint.bottomRight = tintBR;\r\n callbackData.index = i;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n\r\n if (output.color)\r\n {\r\n tintTL = output.color;\r\n tintTR = output.color;\r\n tintBL = output.color;\r\n tintBR = output.color;\r\n }\r\n else\r\n {\r\n tintTL = output.tint.topLeft;\r\n tintTR = output.tint.topRight;\r\n tintBL = output.tint.bottomLeft;\r\n tintBR = output.tint.bottomRight;\r\n }\r\n\r\n tintTL = Utils.getTintAppendFloatAlpha(tintTL, camera.alpha * src._alphaTL);\r\n tintTR = Utils.getTintAppendFloatAlpha(tintTR, camera.alpha * src._alphaTR);\r\n tintBL = Utils.getTintAppendFloatAlpha(tintBL, camera.alpha * src._alphaBL);\r\n tintBR = Utils.getTintAppendFloatAlpha(tintBR, camera.alpha * src._alphaBR);\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n fontMatrix.applyITRS(x, y, rotation, scale, scale);\r\n\r\n calcMatrix.multiply(fontMatrix, spriteMatrix);\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = glyphW;\r\n var yh = glyphH;\r\n\r\n var tx0 = spriteMatrix.e;\r\n var ty0 = spriteMatrix.f;\r\n\r\n var tx1 = yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty1 = yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx2 = xw * spriteMatrix.a + yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty2 = xw * spriteMatrix.b + yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx3 = xw * spriteMatrix.a + spriteMatrix.e;\r\n var ty3 = xw * spriteMatrix.b + spriteMatrix.f;\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.popScissor();\r\n }\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetBitmapTextSize = __webpack_require__(/*! ../GetBitmapTextSize */ "./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js");\r\nvar ParseFromAtlas = __webpack_require__(/*! ../ParseFromAtlas */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../ParseXMLBitmapFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js");\r\nvar Render = __webpack_require__(/*! ./BitmapTextRender */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}\r\n * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}\r\n * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}\r\n *\r\n * @class BitmapText\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar BitmapText = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function BitmapText (scene, x, y, font, text, size, align)\r\n {\r\n if (text === undefined) { text = \'\'; }\r\n if (align === undefined) { align = 0; }\r\n\r\n GameObject.call(this, scene, \'BitmapText\');\r\n\r\n /**\r\n * The key of the Bitmap Font used by this Bitmap Text.\r\n * To change the font after creation please use `setFont`.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#font\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.font = font;\r\n\r\n var entry = this.scene.sys.cache.bitmapFont.get(font);\r\n\r\n /**\r\n * The data of the Bitmap Font used by this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontData\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapFontData}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.fontData = entry.data;\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._text = \'\';\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_fontSize\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._fontSize = size || this.fontData.size;\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_letterSpacing\r\n * @type {number}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._letterSpacing = 0;\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_align\r\n * @type {integer}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._align = align;\r\n\r\n /**\r\n * An object that describes the size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_bounds\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapTextSize}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = GetBitmapTextSize(this, false, this._bounds);\r\n\r\n /**\r\n * An internal dirty flag for bounds calculation.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._dirty = false;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n this.setText(text);\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be left-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLeftAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLeftAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_LEFT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be center-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setCenterAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setCenterAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_CENTER;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be right-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setRightAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setRightAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_RIGHT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the font size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size to set.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n this._fontSize = size;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the letter spacing between each character of this Bitmap Text.\r\n * Can be a positive value to increase the space, or negative to reduce it.\r\n * Spacing is applied after the kerning values have been set.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLetterSpacing\r\n * @since 3.4.0\r\n *\r\n * @param {number} [spacing=0] - The amount of horizontal space to add between each character.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLetterSpacing: function (spacing)\r\n {\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n this._letterSpacing = spacing;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the textual content of this BitmapText.\r\n *\r\n * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = \'\';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join(\'\\n\');\r\n }\r\n\r\n if (value !== this.text)\r\n {\r\n this._text = value.toString();\r\n\r\n this._dirty = true;\r\n\r\n this.updateDisplayOrigin();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the bounds of this Bitmap Text.\r\n *\r\n * An object is returned that contains the position, width and height of the Bitmap Text in local and global\r\n * contexts.\r\n *\r\n * Local size is based on just the font size and a [0, 0] position.\r\n *\r\n * Global size takes into account the Game Object\'s scale, world position and display origin.\r\n *\r\n * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#getTextBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} An object that describes the size of this Bitmap Text.\r\n */\r\n getTextBounds: function (round)\r\n {\r\n // local = The BitmapText based on fontSize and 0x0 coords\r\n // global = The BitmapText, taking into account scale and world position\r\n // lines = The BitmapText line data\r\n\r\n if (this._dirty)\r\n {\r\n GetBitmapTextSize(this, round, this._bounds);\r\n }\r\n\r\n return this._bounds;\r\n },\r\n\r\n /**\r\n * Changes the font this BitmapText is using to render.\r\n *\r\n * The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved,\r\n * unless overridden via the arguments.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFont\r\n * @since 3.11.0\r\n *\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {number} [size] - The font size of this Bitmap Text. If not specified the current size will be used.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFont: function (key, size, align)\r\n {\r\n if (size === undefined) { size = this._fontSize; }\r\n if (align === undefined) { align = this._align; }\r\n\r\n if (key !== this.font)\r\n {\r\n var entry = this.scene.sys.cache.bitmapFont.get(key);\r\n\r\n if (entry)\r\n {\r\n this.font = key;\r\n this.fontData = entry.data;\r\n this._fontSize = size;\r\n this._align = align;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n\r\n GetBitmapTextSize(this, false, this._bounds);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n *\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#align\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\n align: {\r\n\r\n set: function (value)\r\n {\r\n this._align = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._align;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * You can also use the method `setText` if you want a chainable way to change the text content.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * You can also use the method `setFontSize` if you want a chainable way to change the font size.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontSize\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n fontSize: {\r\n\r\n set: function (value)\r\n {\r\n this._fontSize = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._fontSize;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#letterSpacing\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n letterSpacing: {\r\n\r\n set: function (value)\r\n {\r\n this._letterSpacing = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._letterSpacing;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this bitmap text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.JSONBitmapText} A JSON representation of this Bitmap Text.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra data is added here\r\n\r\n var data = {\r\n font: this.font,\r\n text: this.text,\r\n fontSize: this.fontSize,\r\n letterSpacing: this.letterSpacing,\r\n align: this.align\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Left align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_LEFT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_LEFT = 0;\r\n\r\n/**\r\n * Center align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_CENTER\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_CENTER = 1;\r\n\r\n/**\r\n * Right align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_RIGHT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_RIGHT = 2;\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseFromAtlas\r\n * @type {function}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont\'s texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture\'s frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} [xSpacing] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing] - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nBitmapText.ParseFromAtlas = ParseFromAtlas;\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont\r\n * @type {function}\r\n * @since 3.17.0\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nBitmapText.ParseXMLBitmapFont = ParseXMLBitmapFont;\r\n\r\nmodule.exports = BitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src._letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var scale = (src._fontSize / src.fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n ctx.translate(-src.displayOriginX, -src.displayOriginY);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = glyph.xOffset + xAdvance;\r\n y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x += lineOffsetX;\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n * \r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('bitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n var align = GetValue(config, 'align', 0);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size, align);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n *\r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('bitmapText', function (x, y, font, text, size, align)\r\n{\r\n return this.displayList.add(new BitmapText(this.scene, x, y, font, text, size, align));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n \r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src._letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src._fontSize / fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n \r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n \r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = glyph.xOffset + xAdvance;\r\n var y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = x + (glyphW * scale);\r\n var yh = y + (glyphH * scale);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n};\r\n\r\nmodule.exports = BitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Blitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlitterRender = __webpack_require__(/*! ./BlitterRender */ "./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js");\r\nvar Bob = __webpack_require__(/*! ./Bob */ "./node_modules/phaser/src/gameobjects/blitter/Bob.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar List = __webpack_require__(/*! ../../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\n\r\n/**\r\n * @callback CreateCallback\r\n *\r\n * @param {Phaser.GameObjects.Bob} bob - The Bob that was created by the Blitter.\r\n * @param {integer} index - The position of the Bob within the Blitter display list.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Blitter Game Object.\r\n *\r\n * The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects.\r\n * Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture,\r\n * a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed\r\n * during rendering.\r\n *\r\n * A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this\r\n * Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows\r\n * them their speed.\r\n *\r\n * If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth\r\n * investigating. They are especially useful for using as a base for your own special effects systems.\r\n *\r\n * @class Blitter\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} [x=0] - The x coordinate of this Game Object in world space.\r\n * @param {number} [y=0] - The y coordinate of this Game Object in world space.\r\n * @param {string} [texture=\'__DEFAULT\'] - The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager.\r\n * @param {(string|integer)} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.\r\n */\r\nvar Blitter = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n BlitterRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Blitter (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Blitter\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The children of this Blitter.\r\n * This List contains all of the Bob objects created by the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Blitter#children\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.children = new List();\r\n\r\n /**\r\n * A transient array that holds all of the Bobs that will be rendered this frame.\r\n * The array is re-populated whenever the dirty flag is set.\r\n *\r\n * @name Phaser.GameObjects.Blitter#renderList\r\n * @type {Phaser.GameObjects.Bob[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderList = [];\r\n\r\n /**\r\n * Is the Blitter considered dirty?\r\n * A \'dirty\' Blitter has had its child count changed since the last frame.\r\n *\r\n * @name Phaser.GameObjects.Blitter#dirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Creates a new Bob in this Blitter.\r\n *\r\n * The Bob is created at the given coordinates, relative to the Blitter and uses the given frame.\r\n * A Bob can use any frame belonging to the texture bound to the Blitter.\r\n *\r\n * @method Phaser.GameObjects.Blitter#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n * @param {integer} [index] - The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list.\r\n *\r\n * @return {Phaser.GameObjects.Bob} The newly created Bob object.\r\n */\r\n create: function (x, y, frame, visible, index)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n if (index === undefined) { index = this.children.length; }\r\n\r\n if (frame === undefined)\r\n {\r\n frame = this.frame;\r\n }\r\n else if (!(frame instanceof Frame))\r\n {\r\n frame = this.texture.get(frame);\r\n }\r\n\r\n var bob = new Bob(this, x, y, frame, visible);\r\n\r\n this.children.addAt(bob, index, false);\r\n\r\n this.dirty = true;\r\n\r\n return bob;\r\n },\r\n\r\n /**\r\n * Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createFromCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CreateCallback} callback - The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob.\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createFromCallback: function (callback, quantity, frame, visible)\r\n {\r\n var bobs = this.createMultiple(quantity, frame, visible);\r\n\r\n for (var i = 0; i < bobs.length; i++)\r\n {\r\n var bob = bobs[i];\r\n\r\n callback.call(this, bob, i);\r\n }\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Creates multiple Bobs in one call.\r\n *\r\n * The amount created is controlled by a combination of the `quantity` argument and the number of frames provided.\r\n *\r\n * If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first\r\n * frame and 10 with the second.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createMultiple: function (quantity, frame, visible)\r\n {\r\n if (frame === undefined) { frame = this.frame.name; }\r\n if (visible === undefined) { visible = true; }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n\r\n var bobs = [];\r\n var _this = this;\r\n\r\n frame.forEach(function (singleFrame)\r\n {\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n bobs.push(_this.create(0, 0, singleFrame, visible));\r\n }\r\n });\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Checks if the given child can render or not, by checking its `visible` and `alpha` values.\r\n *\r\n * @method Phaser.GameObjects.Blitter#childCanRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Bob} child - The Bob to check for rendering.\r\n *\r\n * @return {boolean} Returns `true` if the given child can render, otherwise `false`.\r\n */\r\n childCanRender: function (child)\r\n {\r\n return (child.visible && child.alpha > 0);\r\n },\r\n\r\n /**\r\n * Returns an array of Bobs to be rendered.\r\n * If the Blitter is dirty then a new list is generated and stored in `renderList`.\r\n *\r\n * @method Phaser.GameObjects.Blitter#getRenderList\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that will be rendered this frame.\r\n */\r\n getRenderList: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n this.renderList = this.children.list.filter(this.childCanRender, this);\r\n this.dirty = false;\r\n }\r\n\r\n return this.renderList;\r\n },\r\n\r\n /**\r\n * Removes all Bobs from the children List and clears the dirty flag.\r\n *\r\n * @method Phaser.GameObjects.Blitter#clear\r\n * @since 3.0.0\r\n */\r\n clear: function ()\r\n {\r\n this.children.removeAll();\r\n this.dirty = true;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Blitter#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.children.destroy();\r\n\r\n this.renderList = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Blitter.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n parentMatrix.copyToContext(ctx);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n // Render bobs\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var bob = list[i];\r\n var flip = (bob.flipX || bob.flipY);\r\n var frame = bob.frame;\r\n var cd = frame.canvasData;\r\n var dx = frame.x;\r\n var dy = frame.y;\r\n var fx = 1;\r\n var fy = 1;\r\n\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n ctx.globalAlpha = bobAlpha;\r\n \r\n if (!flip)\r\n {\r\n if (roundPixels)\r\n {\r\n dx = Math.round(dx);\r\n dy = Math.round(dy);\r\n }\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n dx + bob.x + cameraScrollX,\r\n dy + bob.y + cameraScrollY,\r\n cd.width,\r\n cd.height\r\n );\r\n }\r\n else\r\n {\r\n if (bob.flipX)\r\n {\r\n fx = -1;\r\n dx -= cd.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n fy = -1;\r\n dy -= cd.height;\r\n }\r\n\r\n ctx.save();\r\n ctx.translate(bob.x + cameraScrollX, bob.y + cameraScrollY);\r\n ctx.scale(fx, fy);\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, dx, dy, cd.width, cd.height);\r\n ctx.restore();\r\n }\r\n }\r\n \r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BlitterCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('blitter', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var blitter = new Blitter(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, blitter, config);\r\n\r\n return blitter;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} key - The key of the Texture the Blitter object will use.\r\n * @param {(string|integer)} [frame] - The default Frame children of the Blitter will use.\r\n * \r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('blitter', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Blitter(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BlitterWebGLRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BlitterCanvasRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var calcMatrix = pipeline._tempMatrix1;\r\n\r\n calcMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n calcMatrix.multiplyWithOffset(parentMatrix, -cameraScrollX, -cameraScrollY);\r\n\r\n cameraScrollX = 0;\r\n cameraScrollY = 0;\r\n }\r\n\r\n var blitterX = src.x - cameraScrollX;\r\n var blitterY = src.y - cameraScrollY;\r\n var prevTextureSourceIndex = -1;\r\n var tintEffect = false;\r\n var alpha = camera.alpha * src.alpha;\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var index = 0; index < list.length; index++)\r\n {\r\n var bob = list[index];\r\n var frame = bob.frame;\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var width = frame.width;\r\n var height = frame.height;\r\n\r\n var x = blitterX + bob.x + frame.x;\r\n var y = blitterY + bob.y + frame.y;\r\n\r\n if (bob.flipX)\r\n {\r\n width *= -1;\r\n x += frame.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n height *= -1;\r\n y += frame.height;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(xw, yh);\r\n var ty1 = calcMatrix.getY(xw, yh);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, bobAlpha);\r\n\r\n // Bind texture only if the Texture Source is different from before\r\n if (frame.sourceIndex !== prevTextureSourceIndex)\r\n {\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n\r\n prevTextureSourceIndex = frame.sourceIndex;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n }\r\n\r\n // TL x/y, BL x/y, BR x/y, TR x/y\r\n if (pipeline.batchQuad(tx0, ty0, tx0, ty1, tx1, ty1, tx1, ty0, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, frame.glTexture, 0))\r\n {\r\n prevTextureSourceIndex = -1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = BlitterWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Bob.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Bob Game Object.\r\n *\r\n * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object.\r\n *\r\n * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle\r\n * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it\r\n * must be a Frame within the Texture used by the parent Blitter.\r\n *\r\n * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will\r\n * have their positions impacted by this change as well.\r\n *\r\n * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be\r\n * handled via the Blitter parent.\r\n *\r\n * @class Bob\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob.\r\n * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.\r\n * @param {boolean} visible - Should the Bob render visible or not to start with?\r\n */\r\nvar Bob = new Class({\r\n\r\n initialize:\r\n\r\n function Bob (blitter, x, y, frame, visible)\r\n {\r\n /**\r\n * The Blitter object that this Bob belongs to.\r\n *\r\n * @name Phaser.GameObjects.Bob#parent\r\n * @type {Phaser.GameObjects.Blitter}\r\n * @since 3.0.0\r\n */\r\n this.parent = blitter;\r\n\r\n /**\r\n * The x position of this Bob, relative to the x position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of this Bob, relative to the y position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The frame that the Bob uses to render with.\r\n * To change the frame use the `Bob.setFrame` method.\r\n *\r\n * @name Phaser.GameObjects.Bob#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * A blank object which can be used to store data related to this Bob in.\r\n *\r\n * @name Phaser.GameObjects.Bob#data\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.data = {};\r\n\r\n /**\r\n * The visible state of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_visible\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = visible;\r\n\r\n /**\r\n * The alpha value of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._alpha = 1;\r\n\r\n /**\r\n * The horizontally flipped state of the Bob.\r\n * A Bob that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipX\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipX = false;\r\n\r\n /**\r\n * The vertically flipped state of the Bob.\r\n * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipY\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipY = false;\r\n },\r\n\r\n /**\r\n * Changes the Texture Frame being used by this Bob.\r\n * The frame must be part of the Texture the parent Blitter is using.\r\n * If no value is given it will use the default frame of the Blitter parent.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFrame: function (frame)\r\n {\r\n if (frame === undefined)\r\n {\r\n this.frame = this.parent.frame;\r\n }\r\n else if (frame instanceof Frame && frame.texture === this.parent.texture)\r\n {\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.parent.texture.get(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Bob#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Bob.\r\n *\r\n * Changes the position to the values given, and optionally changes the frame.\r\n *\r\n * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true.\r\n *\r\n * @method Phaser.GameObjects.Bob#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n reset: function (x, y, frame)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n this._alpha = 1;\r\n this._visible = true;\r\n\r\n this.parent.dirty = true;\r\n\r\n if (frame)\r\n {\r\n this.setFrame(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Bob. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The alpha value used for this Bob. Between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Bob instance.\r\n * Removes itself from the Blitter and clears the parent, frame and data properties.\r\n *\r\n * @method Phaser.GameObjects.Bob#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent.dirty = true;\r\n\r\n this.parent.children.remove(this);\r\n\r\n this.parent = undefined;\r\n this.frame = undefined;\r\n this.data = undefined;\r\n },\r\n\r\n /**\r\n * The visible state of the Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value of the Bob, between 0 and 1.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._alpha = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bob;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Bob.js?')},"./node_modules/phaser/src/gameobjects/components/Alpha.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it\'s applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Alpha.js?')},"./node_modules/phaser/src/gameobjects/components/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseAnimation = __webpack_require__(/*! ../../animations/Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../../animations/events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Game Object Animation Controller.\r\n *\r\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\r\n */\r\nvar Animation = new Class({\r\n\r\n initialize:\r\n\r\n function Animation (parent)\r\n {\r\n /**\r\n * The Game Object to which this animation controller belongs.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#parent\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#animationManager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.animationManager = parent.scene.sys.anims;\r\n\r\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n /**\r\n * Is an animation currently playing or not?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * The current Animation loaded into this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentAnim\r\n * @type {?Phaser.Animations.Animation}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentAnim = null;\r\n\r\n /**\r\n * The current AnimationFrame being displayed by this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFrame = null;\r\n\r\n /**\r\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnim\r\n * @type {?string}\r\n * @default null\r\n * @since 3.16.0\r\n */\r\n this.nextAnim = null;\r\n\r\n /**\r\n * Time scale factor.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_timeScale\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._timeScale = 1;\r\n\r\n /**\r\n * The frame rate of playback in frames per second.\r\n * The default is 24 if the `duration` property is `null`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#frameRate\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameRate = 0;\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 0;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = true;\r\n\r\n /**\r\n * A delay before starting playback, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_delay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._delay = 0;\r\n\r\n /**\r\n * Number of times to repeat the animation (-1 for infinity)\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeat\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeat = 0;\r\n\r\n /**\r\n * Delay before the repeat starts, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeatDelay = 0;\r\n\r\n /**\r\n * Should the animation yoyo? (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_yoyo\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._yoyo = false;\r\n\r\n /**\r\n * Will the playhead move forwards (`true`) or in reverse (`false`).\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#forward\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.forward = true;\r\n\r\n /**\r\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\r\n * needed because forward can be changed by yoyo feature.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_reverse\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._reverse = false;\r\n\r\n /**\r\n * Internal time overflow accumulator.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#accumulator\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accumulator = 0;\r\n\r\n /**\r\n * The time point at which the next animation frame will change.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextTick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextTick = 0;\r\n\r\n /**\r\n * An internal counter keeping track of how many repeats are left to play.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCounter = 0;\r\n\r\n /**\r\n * An internal flag keeping track of pending repeats.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRepeat = false;\r\n\r\n /**\r\n * Is the Animation paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_paused\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._paused = false;\r\n\r\n /**\r\n * Was the animation previously playing before being paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._wasPlaying = false;\r\n\r\n /**\r\n * Internal property tracking if this Animation is waiting to stop.\r\n *\r\n * 0 = No\r\n * 1 = Waiting for ms to pass\r\n * 2 = Waiting for repeat\r\n * 3 = Waiting for specific frame\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\r\n * @type {integer}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStop = 0;\r\n\r\n /**\r\n * Internal property used by _pendingStop.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\r\n * @type {any}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStopValue;\r\n },\r\n\r\n /**\r\n * Sets an animation to be played immediately after the current one completes.\r\n * \r\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\r\n * \r\n * An animation set to repeat forever will never enter a completed state.\r\n * \r\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\r\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\r\n * \r\n * Call this method with no arguments to reset the chained animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#chain\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n chain: function (key)\r\n {\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n this.nextAnim = key;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setDelay\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setDelay: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this._delay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getDelay\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\r\n */\r\n getDelay: function ()\r\n {\r\n return this._delay;\r\n },\r\n\r\n /**\r\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\r\n * @since 3.0.0\r\n *\r\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\r\n * @param {string} key - The key of the animation to play.\r\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n delayedPlay: function (delay, key, startFrame)\r\n {\r\n this.play(key, true, startFrame);\r\n\r\n this.nextTick += delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns the key of the animation currently loaded into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\r\n * @since 3.0.0\r\n *\r\n * @return {string} The key of the Animation loaded into this component.\r\n */\r\n getCurrentKey: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n return this.currentAnim.key;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used to load an animation into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#load\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to load.\r\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n load: function (key, startFrame)\r\n {\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stop();\r\n }\r\n\r\n // Load the new animation in\r\n this.animationManager.load(this, key, startFrame);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Pause the current animation and set the `isPlaying` property to `false`.\r\n * You can optionally pause it at a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n pause: function (atFrame)\r\n {\r\n if (!this._paused)\r\n {\r\n this._paused = true;\r\n this._wasPlaying = this.isPlaying;\r\n this.isPlaying = false;\r\n }\r\n\r\n if (atFrame !== undefined)\r\n {\r\n this.updateFrame(atFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\r\n * You can optionally tell it to start playback from a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n resume: function (fromFrame)\r\n {\r\n if (this._paused)\r\n {\r\n this._paused = false;\r\n this.isPlaying = this._wasPlaying;\r\n }\r\n\r\n if (fromFrame !== undefined)\r\n {\r\n this.updateFrame(fromFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * `true` if the current animation is paused, otherwise `false`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPaused\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.4.0\r\n */\r\n isPaused: {\r\n\r\n get: function ()\r\n {\r\n return this._paused;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\r\n * \r\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#play\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = true;\r\n this._reverse = false;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#playReverse\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n playReverse: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = false;\r\n this._reverse = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\r\n * @fires Phaser.Animations.Events#START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n _startAnimation: function (key, startFrame)\r\n {\r\n this.load(key, startFrame);\r\n\r\n var anim = this.currentAnim;\r\n var gameObject = this.parent;\r\n\r\n if (!anim)\r\n {\r\n return gameObject;\r\n }\r\n\r\n // Should give us 9,007,199,254,740,991 safe repeats\r\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\r\n\r\n anim.getFirstTick(this);\r\n\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n\r\n if (anim.showOnStart)\r\n {\r\n gameObject.visible = true;\r\n }\r\n\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Reverse the Animation that is already playing on the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#reverse\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n reverse: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n this._reverse = !this._reverse;\r\n\r\n this.forward = !this.forward;\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\r\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\r\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getProgress\r\n * @since 3.4.0\r\n *\r\n * @return {number} The progress of the current animation, between 0 and 1.\r\n */\r\n getProgress: function ()\r\n {\r\n var p = this.currentFrame.progress;\r\n\r\n if (!this.forward)\r\n {\r\n p = 1 - p;\r\n }\r\n\r\n return p;\r\n },\r\n\r\n /**\r\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\r\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=0] - The progress value, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setProgress: function (value)\r\n {\r\n if (!this.forward)\r\n {\r\n value = 1 - value;\r\n }\r\n\r\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Handle the removal of an animation from the Animation Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#remove\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key of the removed Animation.\r\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\r\n */\r\n remove: function (key, animation)\r\n {\r\n if (animation === undefined) { animation = this.currentAnim; }\r\n\r\n if (this.isPlaying && animation.key === this.currentAnim.key)\r\n {\r\n this.stop();\r\n\r\n this.setCurrentFrame(this.currentAnim.frames[0]);\r\n }\r\n },\r\n\r\n /**\r\n * Gets the number of times that the animation will repeat\r\n * after its first iteration. For example, if returns 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * A value of -1 means the animation will repeat indefinitely.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeat\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The number of times that the animation will repeat.\r\n */\r\n getRepeat: function ()\r\n {\r\n return this._repeat;\r\n },\r\n\r\n /**\r\n * Sets the number of times that the animation should repeat\r\n * after its first iteration. For example, if repeat is 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * To repeat indefinitely, use -1. repeat should always be an integer.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeat\r\n * @since 3.4.0\r\n *\r\n * @param {integer} value - The number of times that the animation should repeat.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeat: function (value)\r\n {\r\n this._repeat = value;\r\n\r\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of delay between repeats, if any.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delay between repeats.\r\n */\r\n getRepeatDelay: function ()\r\n {\r\n return this._repeatDelay;\r\n },\r\n\r\n /**\r\n * Sets the amount of time in seconds between repeats.\r\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\r\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\r\n * before doing its final repeat.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The delay to wait between repeats, in seconds.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeatDelay: function (value)\r\n {\r\n this._repeatDelay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Restarts the current animation from its beginning, optionally including its delay value.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#restart\r\n * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n restart: function (includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = false; }\r\n\r\n var anim = this.currentAnim;\r\n\r\n anim.getFirstTick(this, includeDelay);\r\n\r\n this.forward = true;\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n this._paused = false;\r\n\r\n // Set frame\r\n this.updateFrame(anim.frames[0]);\r\n\r\n var gameObject = this.parent;\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\r\n * \r\n * If no animation is set, no event will be dispatched.\r\n * \r\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stop\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stop: function ()\r\n {\r\n this._pendingStop = 0;\r\n\r\n this.isPlaying = false;\r\n\r\n var gameObject = this.parent;\r\n var anim = this.currentAnim;\r\n var frame = this.currentFrame;\r\n\r\n if (anim)\r\n {\r\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\r\n \r\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\r\n }\r\n\r\n if (this.nextAnim)\r\n {\r\n var key = this.nextAnim;\r\n\r\n this.nextAnim = null;\r\n\r\n this.play(key);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopAfterDelay: function (delay)\r\n {\r\n this._pendingStop = 1;\r\n this._pendingStopValue = delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next repeats.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnRepeat: function ()\r\n {\r\n this._pendingStop = 2;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next sets the given frame.\r\n * If this frame doesn't exist within the animation it will not stop it from playing.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnFrame: function (frame)\r\n {\r\n this._pendingStop = 3;\r\n this._pendingStopValue = frame;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\r\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this._timeScale = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the Time Scale factor.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\r\n * @since 3.4.0\r\n *\r\n * @return {number} The Time Scale value.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this._timeScale;\r\n },\r\n\r\n /**\r\n * Returns the total number of frames in this animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The total number of frames in this animation.\r\n */\r\n getTotalFrames: function ()\r\n {\r\n return this.currentAnim.frames.length;\r\n },\r\n\r\n /**\r\n * The internal update loop for the Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\r\n {\r\n return;\r\n }\r\n\r\n this.accumulator += delta * this._timeScale;\r\n\r\n if (this._pendingStop === 1)\r\n {\r\n this._pendingStopValue -= delta;\r\n\r\n if (this._pendingStopValue <= 0)\r\n {\r\n return this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n\r\n if (this.accumulator >= this.nextTick)\r\n {\r\n this.currentAnim.setFrame(this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the given Animation Frame as being the current frame\r\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setCurrentFrame: function (animationFrame)\r\n {\r\n var gameObject = this.parent;\r\n\r\n this.currentFrame = animationFrame;\r\n\r\n gameObject.texture = animationFrame.frame.texture;\r\n gameObject.frame = animationFrame.frame;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\r\n }\r\n\r\n gameObject.setSizeToFrame();\r\n\r\n if (animationFrame.frame.customPivot)\r\n {\r\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\r\n }\r\n else\r\n {\r\n gameObject.updateDisplayOrigin();\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Internal frame change handler.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#updateFrame\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\r\n */\r\n updateFrame: function (animationFrame)\r\n {\r\n var gameObject = this.setCurrentFrame(animationFrame);\r\n\r\n if (this.isPlaying)\r\n {\r\n if (animationFrame.setAlpha)\r\n {\r\n gameObject.alpha = animationFrame.alpha;\r\n }\r\n\r\n var anim = this.currentAnim;\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\r\n\r\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\r\n {\r\n this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Advances the animation to the next frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in reverse, calling this method doesn't then change the direction to forwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#nextFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n nextFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.nextFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Advances the animation to the previous frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in forwards, calling this method doesn't then change the direction to backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#previousFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n previousFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.previousFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setYoyo\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setYoyo: function (value)\r\n {\r\n if (value === undefined) { value = false; }\r\n\r\n this._yoyo = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getYoyo\r\n * @since 3.4.0\r\n *\r\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\r\n */\r\n getYoyo: function ()\r\n {\r\n return this._yoyo;\r\n },\r\n\r\n /**\r\n * Destroy this Animation component.\r\n *\r\n * Unregisters event listeners and cleans up its references.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n this.animationManager = null;\r\n this.parent = null;\r\n\r\n this.currentAnim = null;\r\n this.currentFrame = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Animation.js?")},"./node_modules/phaser/src/gameobjects/components/BlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/BlendMode.js?")},"./node_modules/phaser/src/gameobjects/components/ComputedSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ComputedSize.js?")},"./node_modules/phaser/src/gameobjects/components/Crop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Crop.js?")},"./node_modules/phaser/src/gameobjects/components/Depth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Depth.js?")},"./node_modules/phaser/src/gameobjects/components/Flip.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Flip.js?")},"./node_modules/phaser/src/gameobjects/components/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RotateAround = __webpack_require__(/*! ../../math/RotateAround */ "./node_modules/phaser/src/math/RotateAround.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/GetBounds.js?')},"./node_modules/phaser/src/gameobjects/components/Mask.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = __webpack_require__(/*! ../../display/mask/BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js");\r\nvar GeometryMask = __webpack_require__(/*! ../../display/mask/GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js");\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === \'Graphics\')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Mask.js?')},"./node_modules/phaser/src/gameobjects/components/Origin.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Origin.js?")},"./node_modules/phaser/src/gameobjects/components/PathFollower.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetBoolean = __webpack_require__(/*! ../../tweens/builders/GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ../../tweens/tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n\r\n if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n var pathVector = this.pathVector;\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/PathFollower.js?")},"./node_modules/phaser/src/gameobjects/components/Pipeline.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipelineName)\r\n {\r\n if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.defaultPipeline = renderer.getPipeline(pipelineName);\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the active WebGL Pipeline of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipelineName)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.pipeline = renderer.getPipeline(pipelineName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n resetPipeline: function ()\r\n {\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Pipeline.js?")},"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ScrollFactor.js?")},"./node_modules/phaser/src/gameobjects/components/Size.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.frame.realWidth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.frame.realHeight;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Size.js?")},"./node_modules/phaser/src/gameobjects/components/Texture.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Texture.js?")},"./node_modules/phaser/src/gameobjects/components/TextureCrop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TextureCrop.js?")},"./node_modules/phaser/src/gameobjects/components/Tint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @function GetColor\r\n * @since 3.0.0\r\n * @private\r\n */\r\nvar GetColor = function (value)\r\n{\r\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\r\n};\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * Private internal value. Holds the top-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the top-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds if the Game Object is tinted or not.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_isTinted\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n _isTinted: false,\r\n\r\n /**\r\n * Fill or additive?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n * \r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n this._isTinted = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n * \r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this._tintTL = GetColor(topLeft);\r\n this._tintTR = GetColor(topRight);\r\n this._tintBL = GetColor(bottomLeft);\r\n this._tintBR = GetColor(bottomRight);\r\n\r\n this._isTinted = true;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n * \r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied to it or not?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n return this._isTinted;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Tint.js?")},"./node_modules/phaser/src/gameobjects/components/ToJSON.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n scaleMode: gameObject.scaleMode,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ToJSON.js?")},"./node_modules/phaser/src/gameobjects/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar TransformMatrix = __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n * Note: Do not use this value to set the z-index, instead see the `depth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n * \r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn\'t the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n * \r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n * \r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Transform.js?')},"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TransformMatrix.js?")},"./node_modules/phaser/src/gameobjects/components/Visible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Visible.js?")},"./node_modules/phaser/src/gameobjects/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: __webpack_require__(/*! ./Alpha */ "./node_modules/phaser/src/gameobjects/components/Alpha.js"),\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js"),\r\n BlendMode: __webpack_require__(/*! ./BlendMode */ "./node_modules/phaser/src/gameobjects/components/BlendMode.js"),\r\n ComputedSize: __webpack_require__(/*! ./ComputedSize */ "./node_modules/phaser/src/gameobjects/components/ComputedSize.js"),\r\n Crop: __webpack_require__(/*! ./Crop */ "./node_modules/phaser/src/gameobjects/components/Crop.js"),\r\n Depth: __webpack_require__(/*! ./Depth */ "./node_modules/phaser/src/gameobjects/components/Depth.js"),\r\n Flip: __webpack_require__(/*! ./Flip */ "./node_modules/phaser/src/gameobjects/components/Flip.js"),\r\n GetBounds: __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/gameobjects/components/GetBounds.js"),\r\n Mask: __webpack_require__(/*! ./Mask */ "./node_modules/phaser/src/gameobjects/components/Mask.js"),\r\n Origin: __webpack_require__(/*! ./Origin */ "./node_modules/phaser/src/gameobjects/components/Origin.js"),\r\n PathFollower: __webpack_require__(/*! ./PathFollower */ "./node_modules/phaser/src/gameobjects/components/PathFollower.js"),\r\n Pipeline: __webpack_require__(/*! ./Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js"),\r\n ScrollFactor: __webpack_require__(/*! ./ScrollFactor */ "./node_modules/phaser/src/gameobjects/components/ScrollFactor.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/gameobjects/components/Size.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/gameobjects/components/Texture.js"),\r\n TextureCrop: __webpack_require__(/*! ./TextureCrop */ "./node_modules/phaser/src/gameobjects/components/TextureCrop.js"),\r\n Tint: __webpack_require__(/*! ./Tint */ "./node_modules/phaser/src/gameobjects/components/Tint.js"),\r\n ToJSON: __webpack_require__(/*! ./ToJSON */ "./node_modules/phaser/src/gameobjects/components/ToJSON.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/gameobjects/components/Transform.js"),\r\n TransformMatrix: __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js"),\r\n Visible: __webpack_require__(/*! ./Visible */ "./node_modules/phaser/src/gameobjects/components/Visible.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/index.js?')},"./node_modules/phaser/src/gameobjects/container/Container.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Render = __webpack_require__(/*! ./ContainerRender */ \"./node_modules/phaser/src/gameobjects/container/ContainerRender.js\");\r\nvar Union = __webpack_require__(/*! ../../geom/rectangle/Union */ \"./node_modules/phaser/src/geom/rectangle/Union.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {integer}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.Container#_displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._displayList = scene.sys.displayList;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n this._displayList.remove(gameObject);\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n return this.parentContainer.pointToContainer(source, output);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n * \r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {integer} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/Container.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childBlendMode = child._blendMode;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n if (containerHasBlendMode)\r\n {\r\n child.setBlendMode(container._blendMode);\r\n }\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n child.setBlendMode(childBlendMode);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#container\r\n * @since 3.4.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'container\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, \'x\', 0);\r\n var y = GetAdvancedValue(config, \'y\', 0);\r\n\r\n var container = new Container(this.scene, x, y);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n \r\n return container;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCreator.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#container\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'container\', function (x, y, children)\r\n{\r\n return this.displayList.add(new Container(this.scene, x, y, children));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerFactory.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ContainerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ContainerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerRender.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderWebGL(renderer, camera);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes to CSS Blend Modes Map.\r\n * \r\n * @name Phaser.CSSBlendModes\r\n * @enum {string}\r\n * @memberof Phaser\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n\r\nmodule.exports = [\r\n 'normal',\r\n 'multiply',\r\n 'multiply',\r\n 'screen',\r\n 'overlay',\r\n 'darken',\r\n 'lighten',\r\n 'color-dodge',\r\n 'color-burn',\r\n 'hard-light',\r\n 'soft-light',\r\n 'difference',\r\n 'exclusion',\r\n 'hue',\r\n 'saturation',\r\n 'color',\r\n 'luminosity'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DOMElementRender = __webpack_require__(/*! ./DOMElementRender */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar Vector4 = __webpack_require__(/*! ../../math/Vector4 */ \"./node_modules/phaser/src/math/Vector4.js\");\r\n\r\n/**\r\n * @classdesc\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * @class DOMElement\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this DOM Element in the world.\r\n * @param {number} [y=0] - The vertical position of this DOM Element in the world.\r\n * @param {(Element|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n */\r\nvar DOMElement = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n DOMElementRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DOMElement (scene, x, y, element, style, innerText)\r\n {\r\n GameObject.call(this, scene, 'DOMElement');\r\n\r\n /**\r\n * A reference to the parent DOM Container that the Game instance created when it started.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#parent\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.parent = scene.sys.game.domContainer;\r\n\r\n /**\r\n * A reference to the HTML Cache.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.17.0\r\n */\r\n this.cache = scene.sys.cache.html;\r\n\r\n /**\r\n * The actual DOM Element that this Game Object is bound to. For example, if you've created a `
`\r\n * then this property is a direct reference to that element within the dom.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#node\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.node;\r\n\r\n /**\r\n * By default a DOM Element will have its transform, display, opacity, zIndex and blend mode properties\r\n * updated when its rendered. If, for some reason, you don't want any of these changed other than the\r\n * CSS transform, then set this flag to `true`. When `true` only the CSS Transform is applied and it's\r\n * up to you to keep track of and set the other properties as required.\r\n * \r\n * This can be handy if, for example, you've a nested DOM Element and you don't want the opacity to be\r\n * picked-up by any of its children.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#transformOnly\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.transformOnly = false;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewX\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewX = 0;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewY\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewY = 0;\r\n\r\n /**\r\n * A Vector4 that contains the 3D rotation of this DOM Element around a fixed axis in 3D space.\r\n * \r\n * All values in the Vector4 are treated as degrees, unless the `rotate3dAngle` property is changed.\r\n * \r\n * For more details see the following MDN page:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3d\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.17.0\r\n */\r\n this.rotate3d = new Vector4();\r\n\r\n /**\r\n * The unit that represents the 3D rotation values. By default this is `deg` for degrees, but can\r\n * be changed to any supported unit. See this page for further details:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3dAngle\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.rotate3dAngle = 'deg';\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayWidth` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayHeight` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The computed display width of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `width` holds the un-scaled width of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayWidth = 0;\r\n\r\n /**\r\n * The computed display height of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `height` holds the un-scaled height of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayHeight = 0;\r\n\r\n /**\r\n * Internal native event handler.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#handler\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.handler = this.dispatchNativeEvent.bind(this);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n this.setElement(element.substr(1), style, innerText);\r\n }\r\n else\r\n {\r\n this.createElement(element, style, innerText);\r\n }\r\n }\r\n else if (element)\r\n {\r\n this.setElement(element, style, innerText);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical skew values of this DOM Element.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setSkew\r\n * @since 3.17.0\r\n *\r\n * @param {number} [x=0] - The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * @param {number} [y=x] - The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setSkew: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.skewX = x;\r\n this.skewY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the perspective CSS property of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setPerspective\r\n * @since 3.17.0\r\n *\r\n * @param {number} value - The perspective value, in pixels, that determines the distance between the z plane and the user.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setPerspective: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The perspective CSS property value of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n * \r\n * @name Phaser.GameObjects.DOMElement#perspective\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n perspective: {\r\n\r\n get: function ()\r\n {\r\n return parseFloat(this.parent.style.perspective);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds one or more native DOM event listeners onto the underlying Element of this Game Object.\r\n * The event is then dispatched via this Game Objects standard event emitter.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var div = this.add.dom(x, y, element);\r\n * \r\n * div.addListener('click');\r\n * \r\n * div.on('click', handler);\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#addListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to listen for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n addListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.addEventListener(events[i], this.handler, false);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes one or more native DOM event listeners from the underlying Element of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to stop listening for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.removeEventListener(events[i], this.handler);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal event proxy to dispatch native DOM Events via this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#dispatchNativeEvent\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {any} event - The native DOM event.\r\n */\r\n dispatchNativeEvent: function (event)\r\n {\r\n this.emit(event.type, event);\r\n },\r\n\r\n /**\r\n * Creates a native DOM Element, adds it to the parent DOM Container and then binds it to this Game Object,\r\n * so you can control it. The `tagName` should be a string and is passed to `document.createElement`:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div');\r\n * ```\r\n * \r\n * For more details on acceptable tag names see: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().createElement('div', style, 'Phaser');\r\n * ```\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createElement\r\n * @since 3.17.0\r\n *\r\n * @param {string} tagName - A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like \"html:a\") with this method.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createElement: function (tagName, style, innerText)\r\n {\r\n return this.setElement(document.createElement(tagName), style, innerText);\r\n },\r\n\r\n /**\r\n * Binds a new DOM Element to this Game Object. If this Game Object already has an Element it is removed from the DOM\r\n * entirely first. Any event listeners you may have previously created will need to be re-created on the new element.\r\n * \r\n * The `element` argument you pass to this method can be either a string tagName:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * this.add.dom().setElement('heading');\r\n * ```\r\n * \r\n * Or a reference to an Element instance:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * var h1 = document.getElementById('heading');\r\n * \r\n * this.add.dom().setElement(h1);\r\n * ```\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().setElement(h1, 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().setElement(h1, style, 'Phaser');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setElement\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Element)} element - If a string it is passed to `getElementById()`, or it should be a reference to an existing Element.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setElement: function (element, style, innerText)\r\n {\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var target;\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n element = element.substr(1);\r\n }\r\n\r\n target = document.getElementById(element);\r\n }\r\n else if (typeof element === 'object' && element.nodeType === 1)\r\n {\r\n target = element;\r\n }\r\n\r\n if (!target)\r\n {\r\n return this;\r\n }\r\n\r\n this.node = target;\r\n\r\n // style can be empty, a string or a plain object\r\n if (style && IsPlainObject(style))\r\n {\r\n for (var key in style)\r\n {\r\n target.style[key] = style[key];\r\n }\r\n }\r\n else if (typeof style === 'string')\r\n {\r\n target.style = style;\r\n }\r\n\r\n // Add / Override the values we need\r\n\r\n target.style.zIndex = '0';\r\n target.style.display = 'inline';\r\n target.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n target.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(target);\r\n }\r\n\r\n // InnerText\r\n\r\n if (innerText)\r\n {\r\n target.innerText = innerText;\r\n }\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Takes a block of html from the HTML Cache, that has previously been preloaded into the game, and then\r\n * creates a DOM Element from it. The loaded HTML is set as the `innerHTML` property of the created\r\n * element.\r\n * \r\n * Assume the following html is stored in a file called `loginform.html`:\r\n * \r\n * ```html\r\n * \r\n * \r\n * ```\r\n * \r\n * Which is loaded into your game using the cache key 'login':\r\n * \r\n * ```javascript\r\n * this.load.html('login', 'assets/loginform.html');\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the cache key:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromCache('login');\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the container that is created, into which the loaded html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromCache\r\n * @since 3.17.0\r\n * \r\n * @param {string} The key of the html cache entry to use for this DOM Element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the loaded html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromCache: function (key, tagName)\r\n {\r\n var html = this.cache.get(key);\r\n\r\n if (html)\r\n {\r\n this.createFromHTML(html, tagName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a string of html and then creates a DOM Element from it. The HTML is set as the `innerHTML`\r\n * property of the created element.\r\n * \r\n * ```javascript\r\n * let form = `\r\n * \r\n * \r\n * `;\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the string:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromHTML(form);\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the type of container that is created, into which the html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} A string of html to be set as the `innerHTML` property of the created element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromHTML: function (html, tagName)\r\n {\r\n if (tagName === undefined) { tagName = 'div'; }\r\n\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var element = document.createElement(tagName);\r\n\r\n this.node = element;\r\n\r\n element.style.zIndex = '0';\r\n element.style.display = 'inline';\r\n element.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n element.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(element);\r\n }\r\n\r\n element.innerHTML = html;\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Removes the current DOM Element bound to this Game Object from the DOM entirely and resets the\r\n * `node` property of this Game Object to be `null`.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeElement\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeElement: function ()\r\n {\r\n if (this.node)\r\n {\r\n RemoveFromDOM(this.node);\r\n\r\n this.node = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that calls `getBoundingClientRect` on the `node` and then sets the bounds width\r\n * and height into the `displayWidth` and `displayHeight` properties, and the `clientWidth` and `clientHeight`\r\n * values into the `width` and `height` properties respectively.\r\n * \r\n * This is called automatically whenever a new element is created or set.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#updateSize\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n updateSize: function ()\r\n {\r\n var node = this.node;\r\n\r\n var nodeBounds = node.getBoundingClientRect();\r\n\r\n this.width = node.clientWidth;\r\n this.height = node.clientHeight;\r\n\r\n this.displayWidth = nodeBounds.width || 0;\r\n this.displayHeight = nodeBounds.height || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a property matching the given key and value. It then returns this child\r\n * if found, or `null` if not.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByProperty\r\n * @since 3.17.0\r\n * \r\n * @param {string} property - The property to search the children for.\r\n * @param {string} value - The value the property must strictly equal.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByProperty: function (property, value)\r\n {\r\n if (this.node)\r\n {\r\n var children = this.node.querySelectorAll('*');\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i][property] === value)\r\n {\r\n return children[i];\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching id. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByID\r\n * @since 3.17.0\r\n * \r\n * @param {string} id - The id to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByID: function (id)\r\n {\r\n return this.getChildByProperty('id', id);\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching name. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByName\r\n * @since 3.17.0\r\n * \r\n * @param {string} name - The name to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByName: function (name)\r\n {\r\n return this.getChildByProperty('name', name);\r\n },\r\n\r\n /**\r\n * Sets the `className` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setClassName\r\n * @since 3.17.0\r\n * \r\n * @param {string} className - A string representing the class or space-separated classes of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setClassName: function (className)\r\n {\r\n if (this.node)\r\n {\r\n this.node.className = className;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerText` property of the DOM Element node and updates the internal sizes.\r\n * \r\n * Note that only certain types of Elements can have `innerText` set on them.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setText\r\n * @since 3.17.0\r\n * \r\n * @param {string} text - A DOMString representing the rendered text content of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setText: function (text)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerText = text;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerHTML` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} html - A DOMString of html to be set as the `innerHTML` property of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setHTML: function (html)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerHTML = html;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs internal update tasks.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preUpdate\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var parent = this.parentContainer;\r\n var node = this.node;\r\n\r\n if (node && parent && !parent.willRender())\r\n {\r\n node.style.display = 'none';\r\n }\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * \r\n * DOMElements always return `true` as they need to still set values during the render pass, even if not visible.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#willRender\r\n * @since 3.17.0\r\n *\r\n * @return {boolean} `true` if the Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the DOM Element, which removes the underlying node from the DOM.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preDestroy\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeElement();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DOMElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElement.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CSSBlendModes = __webpack_require__(/*! ./CSSBlendModes */ \"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active renderer.\r\n * @param {Phaser.GameObjects.DOMElement} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var node = src.node;\r\n var style = node.style;\r\n\r\n if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender()))\r\n {\r\n if (node)\r\n {\r\n style.display = 'none';\r\n }\r\n \r\n return;\r\n }\r\n\r\n var parent = src.parentContainer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (parent)\r\n {\r\n alpha *= parent.alpha;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var srcMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n var dx = 0;\r\n var dy = 0;\r\n\r\n var tx = '0%';\r\n var ty = '0%';\r\n\r\n if (parentMatrix)\r\n {\r\n dx = (src.width * src.scaleX) * src.originX;\r\n dy = (src.height * src.scaleY) * src.originY;\r\n\r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n srcMatrix.e = src.x - dx;\r\n srcMatrix.f = src.y - dy;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n dx = (src.width) * src.originX;\r\n dy = (src.height) * src.originY;\r\n \r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n tx = (100 * src.originX) + '%';\r\n ty = (100 * src.originY) + '%';\r\n\r\n srcMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n srcMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n\r\n if (!src.transformOnly)\r\n {\r\n style.display = 'block';\r\n style.opacity = alpha;\r\n style.zIndex = src._depth;\r\n style.pointerEvents = 'auto';\r\n style.mixBlendMode = CSSBlendModes[src._blendMode];\r\n }\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n\r\n style.transform =\r\n calcMatrix.getCSSMatrix() +\r\n ' skew(' + src.skewX + 'rad, ' + src.skewY + 'rad)' +\r\n ' rotate3d(' + src.rotate3d.x + ',' + src.rotate3d.y + ',' + src.rotate3d.z + ',' + src.rotate3d.w + src.rotate3dAngle + ')';\r\n\r\n style.transformOrigin = tx + ' ' + ty;\r\n};\r\n\r\nmodule.exports = DOMElementCSSRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DOMElement = __webpack_require__(/*! ./DOMElement */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * Note: This method will only be available if the DOM Element Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dom\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The horizontal position of this DOM Element in the world.\r\n * @param {number} y - The vertical position of this DOM Element in the world.\r\n * @param {(HTMLElement|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n *\r\n * @return {Phaser.GameObjects.DOMElement} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dom', function (x, y, element, style, innerText)\r\n{\r\n var gameObject = new DOMElement(this.scene, x, y, element, style, innerText);\r\n\r\n this.displayList.add(gameObject);\r\n this.updateList.add(gameObject);\r\n\r\n return gameObject;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js?')},"./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/gameobjects/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = { DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/index.js?')},"./node_modules/phaser/src/gameobjects/extern/Extern.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ExternRender = __webpack_require__(/*! ./ExternRender */ "./node_modules/phaser/src/gameobjects/extern/ExternRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Extern Game Object is a special type of Game Object that allows you to pass\r\n * rendering off to a 3rd party.\r\n * \r\n * When you create an Extern and place it in the display list of a Scene, the renderer will\r\n * process the list as usual. When it finds an Extern it will flush the current batch,\r\n * clear down the pipeline and prepare a transform matrix which your render function can\r\n * take advantage of, if required.\r\n * \r\n * The WebGL context is then left is a \'clean\' state, ready for you to bind your own shaders,\r\n * or draw to it, whatever you wish to do. Once you\'ve finished, you should free-up any\r\n * of your resources. The Extern will then rebind the Phaser pipeline and carry on \r\n * rendering the display list.\r\n * \r\n * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of\r\n * them are used during rendering unless you take advantage of them in your own render code.\r\n *\r\n * @class Extern\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n */\r\nvar Extern = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ExternRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Extern (scene)\r\n {\r\n GameObject.call(this, scene, \'Extern\');\r\n },\r\n\r\n preUpdate: function ()\r\n {\r\n // override this!\r\n // Arguments: time, delta\r\n },\r\n\r\n render: function ()\r\n {\r\n // override this!\r\n // Arguments: renderer, camera, calcMatrix\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Extern;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/Extern.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js":function(module,exports){eval("\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extern = __webpack_require__(/*! ./Extern */ \"./node_modules/phaser/src/gameobjects/extern/Extern.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Extern Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Extern Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#extern\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Extern} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('extern', function ()\r\n{\r\n var extern = new Extern(this.scene);\r\n\r\n this.displayList.add(extern);\r\n this.updateList.add(extern);\r\n\r\n return extern;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternFactory.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ExternWebGLRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ExternCanvasRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternRender.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Extern#renderWebGL\r\n * @since 3.16.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Extern} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n // Callback\r\n src.render.call(src, renderer, camera, calcMatrix);\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ExternWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/Commands.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARC: 0,\r\n BEGIN_PATH: 1,\r\n CLOSE_PATH: 2,\r\n FILL_RECT: 3,\r\n LINE_TO: 4,\r\n MOVE_TO: 5,\r\n LINE_STYLE: 6,\r\n FILL_STYLE: 7,\r\n FILL_PATH: 8,\r\n STROKE_PATH: 9,\r\n FILL_TRIANGLE: 10,\r\n STROKE_TRIANGLE: 11,\r\n SAVE: 14,\r\n RESTORE: 15,\r\n TRANSLATE: 16,\r\n SCALE: 17,\r\n ROTATE: 18,\r\n SET_TEXTURE: 19,\r\n CLEAR_TEXTURE: 20,\r\n GRADIENT_FILL_STYLE: 21,\r\n GRADIENT_LINE_STYLE: 22\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Commands.js?")},"./node_modules/phaser/src/gameobjects/graphics/Graphics.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera.js */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar ComponentsAlpha = __webpack_require__(/*! ../components/Alpha */ \"./node_modules/phaser/src/gameobjects/components/Alpha.js\");\r\nvar ComponentsBlendMode = __webpack_require__(/*! ../components/BlendMode */ \"./node_modules/phaser/src/gameobjects/components/BlendMode.js\");\r\nvar ComponentsDepth = __webpack_require__(/*! ../components/Depth */ \"./node_modules/phaser/src/gameobjects/components/Depth.js\");\r\nvar ComponentsMask = __webpack_require__(/*! ../components/Mask */ \"./node_modules/phaser/src/gameobjects/components/Mask.js\");\r\nvar ComponentsPipeline = __webpack_require__(/*! ../components/Pipeline */ \"./node_modules/phaser/src/gameobjects/components/Pipeline.js\");\r\nvar ComponentsTransform = __webpack_require__(/*! ../components/Transform */ \"./node_modules/phaser/src/gameobjects/components/Transform.js\");\r\nvar ComponentsVisible = __webpack_require__(/*! ../components/Visible */ \"./node_modules/phaser/src/gameobjects/components/Visible.js\");\r\nvar ComponentsScrollFactor = __webpack_require__(/*! ../components/ScrollFactor */ \"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js\");\r\n\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\nvar Ellipse = __webpack_require__(/*! ../../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Render = __webpack_require__(/*! ./GraphicsRender */ \"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as\r\n * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics\r\n * object it will be empty.\r\n *\r\n * To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally\r\n * fill or stroke them. For example:\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.beginPath();\r\n * graphics.moveTo(100, 100);\r\n * graphics.lineTo(200, 200);\r\n * graphics.closePath();\r\n * graphics.strokePath();\r\n * ```\r\n *\r\n * There are also many helpful methods that draw and fill/stroke common shapes for you.\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.fillStyle(0xFFFFFF, 1.0);\r\n * graphics.fillRect(50, 50, 400, 200);\r\n * graphics.strokeRect(50, 50, 400, 200);\r\n * ```\r\n *\r\n * When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL.\r\n * Under Canvas it will use the HTML Canvas context drawing operations to draw the path.\r\n * Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with\r\n * complex shapes.\r\n *\r\n * If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help\r\n * performance by calling {@link Phaser.GameObjects.Graphics#generateTexture}. This will 'bake' the Graphics object into\r\n * a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object\r\n * updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume\r\n * memory.\r\n *\r\n * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful\r\n * in their complexity and quantity of them in your game.\r\n *\r\n * @class Graphics\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Graphics object belongs.\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [options] - Options that set the position and default style of this Graphics object.\r\n */\r\nvar Graphics = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsAlpha,\r\n ComponentsBlendMode,\r\n ComponentsDepth,\r\n ComponentsMask,\r\n ComponentsPipeline,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n ComponentsScrollFactor,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Graphics (scene, options)\r\n {\r\n var x = GetValue(options, 'x', 0);\r\n var y = GetValue(options, 'y', 0);\r\n\r\n GameObject.call(this, scene, 'Graphics');\r\n\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The horizontal display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The vertical display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * The array of commands used to render the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#commandBuffer\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.commandBuffer = [];\r\n\r\n /**\r\n * The default fill color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillColor = -1;\r\n\r\n /**\r\n * The default fill alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillAlpha = 1;\r\n\r\n /**\r\n * The default stroke width for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeWidth\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeWidth = 1;\r\n\r\n /**\r\n * The default stroke color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeColor = -1;\r\n\r\n /**\r\n * The default stroke alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeAlpha = 1;\r\n\r\n /**\r\n * Internal property that keeps track of the line width style setting.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_lineWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._lineWidth = 1.0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n this.setDefaultStyles(options);\r\n },\r\n\r\n /**\r\n * Set the default style settings for this Graphics object.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setDefaultStyles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n setDefaultStyles: function (options)\r\n {\r\n if (GetValue(options, 'lineStyle', null))\r\n {\r\n this.defaultStrokeWidth = GetValue(options, 'lineStyle.width', 1);\r\n this.defaultStrokeColor = GetValue(options, 'lineStyle.color', 0xffffff);\r\n this.defaultStrokeAlpha = GetValue(options, 'lineStyle.alpha', 1);\r\n\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n if (GetValue(options, 'fillStyle', null))\r\n {\r\n this.defaultFillColor = GetValue(options, 'fillStyle.color', 0xffffff);\r\n this.defaultFillAlpha = GetValue(options, 'fillStyle.alpha', 1);\r\n\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current line style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {number} color - The stroke color.\r\n * @param {number} [alpha=1] - The stroke alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.LINE_STYLE,\r\n lineWidth, color, alpha\r\n );\r\n\r\n this._lineWidth = lineWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current fill style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - The fill color.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_STYLE,\r\n color, alpha\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient fill style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all filled shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `fillStyle` and provide a new single fill color.\r\n *\r\n * When filling a triangle only the first 3 color values provided are used for the 3 points of a triangle.\r\n *\r\n * This feature is best used only on rectangles and triangles. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient fill a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_FILL_STYLE,\r\n alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient line style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all stroked shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `lineStyle` and provide a new single line color.\r\n *\r\n * This feature is best used only on single lines. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient stroke a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_LINE_STYLE,\r\n lineWidth, alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture frame this Graphics Object will use when drawing all shapes defined after calling this.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * Once set, all shapes will use this texture. Call this method with no arguments to clear it.\r\n *\r\n * The textures are not tiled. They are stretched to the dimensions of the shapes being rendered. For this reason,\r\n * it works best with seamless / tileable textures.\r\n *\r\n * The mode argument controls how the textures are combined with the fill colors. The default value (0) will\r\n * multiply the texture by the fill color. A value of 1 will use just the fill color, but the alpha data from the texture,\r\n * and a value of 2 will use just the texture and no fill color at all.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setTexture\r\n * @since 3.12.0\r\n * @webglOnly\r\n *\r\n * @param {string} [key] - The key of the texture to be used, as stored in the Texture Manager. Leave blank to clear a previously set texture.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [mode=0] - The texture tint mode. 0 is multiply, 1 is alpha only and 2 is texture only.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setTexture: function (key, frame, mode)\r\n {\r\n if (mode === undefined) { mode = 0; }\r\n\r\n if (key === undefined)\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLEAR_TEXTURE\r\n );\r\n }\r\n else\r\n {\r\n var textureFrame = this.scene.sys.textures.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n if (mode === 2)\r\n {\r\n mode = 3;\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.SET_TEXTURE,\r\n textureFrame,\r\n mode\r\n );\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Start a new shape path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#beginPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n beginPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.BEGIN_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Close the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n closePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLOSE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n * \r\n * This is an alias for `Graphics.fillPath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fill\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fill: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n * \r\n * This is an alias for `Graphics.strokePath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#stroke\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n stroke: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircleShape: function (circle)\r\n {\r\n return this.fillCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Stroke the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircleShape: function (circle)\r\n {\r\n return this.strokeCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Fill a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRectShape: function (rect)\r\n {\r\n return this.fillRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Stroke the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRectShape: function (rect)\r\n {\r\n return this.strokeRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Fill a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRect: function (x, y, width, height)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, width, height\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRect: function (x, y, width, height)\r\n {\r\n var lineWidthHalf = this._lineWidth / 2;\r\n var minx = x - lineWidthHalf;\r\n var maxx = x + lineWidthHalf;\r\n\r\n this.beginPath();\r\n this.moveTo(x, y);\r\n this.lineTo(x, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(x + width, y);\r\n this.lineTo(x + width, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y);\r\n this.lineTo(maxx + width, y);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y + height);\r\n this.lineTo(maxx + width, y + height);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given point.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPointShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPointShape: function (point, size)\r\n {\r\n return this.fillPoint(point.x, point.y, size);\r\n },\r\n\r\n /**\r\n * Fill a point at the given position.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point.\r\n * @param {number} y - The y coordinate of the point.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoint: function (x, y, size)\r\n {\r\n if (!size || size < 1)\r\n {\r\n size = 1;\r\n }\r\n else\r\n {\r\n x -= (size / 2);\r\n y -= (size / 2);\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, size, size\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangleShape: function (triangle)\r\n {\r\n return this.fillTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Stroke the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangleShape: function (triangle)\r\n {\r\n return this.strokeTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Fill a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw the given line.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeLineShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeLineShape: function (line)\r\n {\r\n return this.lineBetween(line.x1, line.y1, line.x2, line.y2);\r\n },\r\n\r\n /**\r\n * Draw a line between the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the start point of the line.\r\n * @param {number} y1 - The y coordinate of the start point of the line.\r\n * @param {number} x2 - The x coordinate of the end point of the line.\r\n * @param {number} y2 - The y coordinate of the end point of the line.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineBetween: function (x1, y1, x2, y2)\r\n {\r\n this.beginPath();\r\n this.moveTo(x1, y1);\r\n this.lineTo(x2, y2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw a line from the current drawing position to the given position.\r\n *\r\n * Moves the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to draw the line to.\r\n * @param {number} y - The y coordinate to draw the line to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.LINE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Move the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to move to.\r\n * @param {number} y - The y coordinate to move to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n moveTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.MOVE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is stroked.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to stroke.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is filled.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to fill.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Stroke an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Draw an arc.\r\n *\r\n * This method can be used to create circles, or parts of circles.\r\n * \r\n * Make sure you call `beginPath` before starting the arc unless you wish for the arc to automatically\r\n * close when filled or stroked.\r\n *\r\n * Use the optional `overshoot` argument increase the number of iterations that take place when\r\n * the arc is rendered in WebGL. This is useful if you're drawing an arc with an especially thick line,\r\n * as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01.\r\n *\r\n * Call {@link Phaser.GameObjects.Graphics#fillPath} or {@link Phaser.GameObjects.Graphics#strokePath} after calling\r\n * this method to draw the arc.\r\n *\r\n * @method Phaser.GameObjects.Graphics#arc\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {number} startAngle - The starting angle, in radians.\r\n * @param {number} endAngle - The ending angle, in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(\r\n Commands.ARC,\r\n x, y, radius, startAngle, endAngle, anticlockwise, overshoot\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a pie-chart slice shape centered at `x`, `y` with the given radius.\r\n * You must define the start and end angle of the slice.\r\n *\r\n * Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.\r\n * Setting it to `false` creates a shape like a slice of pie.\r\n *\r\n * This method will begin a new path and close the path at the end of it.\r\n * To display the actual slice you need to call either `strokePath` or `fillPath` after it.\r\n *\r\n * @method Phaser.GameObjects.Graphics#slice\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal center of the slice.\r\n * @param {number} y - The vertical center of the slice.\r\n * @param {number} radius - The radius of the slice.\r\n * @param {number} startAngle - The start angle of the slice, given in radians.\r\n * @param {number} endAngle - The end angle of the slice, given in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(Commands.BEGIN_PATH);\r\n\r\n this.commandBuffer.push(Commands.MOVE_TO, x, y);\r\n\r\n this.commandBuffer.push(Commands.ARC, x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\r\n\r\n this.commandBuffer.push(Commands.CLOSE_PATH);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Saves the state of the Graphics by pushing the current state onto a stack.\r\n *\r\n * The most recently saved state can then be restored with {@link Phaser.GameObjects.Graphics#restore}.\r\n *\r\n * @method Phaser.GameObjects.Graphics#save\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n save: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.SAVE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restores the most recently saved state of the Graphics by popping from the state stack.\r\n *\r\n * Use {@link Phaser.GameObjects.Graphics#save} to save the current state, and call this afterwards to restore that state.\r\n *\r\n * If there is no saved state, this command does nothing.\r\n *\r\n * @method Phaser.GameObjects.Graphics#restore\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n restore: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.RESTORE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a translation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be translated\r\n * by the given amount.\r\n * \r\n * This does not change the position of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#translateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation to apply.\r\n * @param {number} y - The vertical translation to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n translateCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.TRANSLATE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a scale command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be scaled\r\n * by the given amount.\r\n * \r\n * This does not change the scale of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#scaleCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale to apply.\r\n * @param {number} y - The vertical scale to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n scaleCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.SCALE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a rotation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be rotated\r\n * by the given amount.\r\n * \r\n * This does not change the rotation of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#rotateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The rotation angle, in radians.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n rotateCanvas: function (radians)\r\n {\r\n this.commandBuffer.push(\r\n Commands.ROTATE,\r\n radians\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clear the command buffer and reset the fill style and line style to their defaults.\r\n *\r\n * @method Phaser.GameObjects.Graphics#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n clear: function ()\r\n {\r\n this.commandBuffer.length = 0;\r\n\r\n if (this.defaultFillColor > -1)\r\n {\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n if (this.defaultStrokeColor > -1)\r\n {\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a texture from this Graphics object.\r\n *\r\n * If `key` is a string it'll generate a new texture using it and add it into the\r\n * Texture Manager (assuming no key conflict happens).\r\n *\r\n * If `key` is a Canvas it will draw the texture to that canvas context. Note that it will NOT\r\n * automatically upload it to the GPU in WebGL mode.\r\n *\r\n * @method Phaser.GameObjects.Graphics#generateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|HTMLCanvasElement)} key - The key to store the texture with in the Texture Manager, or a Canvas to draw to.\r\n * @param {integer} [width] - The width of the graphics to generate.\r\n * @param {integer} [height] - The height of the graphics to generate.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n generateTexture: function (key, width, height)\r\n {\r\n var sys = this.scene.sys;\r\n var renderer = sys.game.renderer;\r\n\r\n if (width === undefined) { width = sys.scale.width; }\r\n if (height === undefined) { height = sys.scale.height; }\r\n\r\n Graphics.TargetCamera.setScene(this.scene);\r\n Graphics.TargetCamera.setViewport(0, 0, width, height);\r\n Graphics.TargetCamera.scrollX = this.x;\r\n Graphics.TargetCamera.scrollY = this.y;\r\n\r\n var texture;\r\n var ctx;\r\n\r\n if (typeof key === 'string')\r\n {\r\n if (sys.textures.exists(key))\r\n {\r\n // Key is a string, it DOES exist in the Texture Manager AND is a canvas, so draw to it\r\n\r\n texture = sys.textures.get(key);\r\n\r\n var src = texture.getSourceImage();\r\n\r\n if (src instanceof HTMLCanvasElement)\r\n {\r\n ctx = src.getContext('2d');\r\n }\r\n }\r\n else\r\n {\r\n // Key is a string and doesn't exist in the Texture Manager, so generate and save it\r\n\r\n texture = sys.textures.createCanvas(key, width, height);\r\n\r\n ctx = texture.getSourceImage().getContext('2d');\r\n }\r\n }\r\n else if (key instanceof HTMLCanvasElement)\r\n {\r\n // Key is a Canvas, so draw to it\r\n\r\n ctx = key.getContext('2d');\r\n }\r\n\r\n if (ctx)\r\n {\r\n // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false);\r\n\r\n if (texture)\r\n {\r\n texture.refresh();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Graphics#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.commandBuffer = [];\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Camera used specifically by the Graphics system for rendering to textures.\r\n *\r\n * @name Phaser.GameObjects.Graphics.TargetCamera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.1.0\r\n */\r\nGraphics.TargetCamera = new BaseCamera();\r\n\r\nmodule.exports = Graphics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Graphics.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar SetTransform = __webpack_require__(/*! ../../renderer/canvas/utils/SetTransform */ \"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js\");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {CanvasRenderingContext2D} [renderTargetCtx] - The target rendering context.\r\n * @param {boolean} allowClip - If `true` then path operations will be used instead of fill operations.\r\n */\r\nvar GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n{\r\n var commandBuffer = src.commandBuffer;\r\n var commandBufferLength = commandBuffer.length;\r\n\r\n var ctx = renderTargetCtx || renderer.currentContext;\r\n\r\n if (commandBufferLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n\r\n var lineAlpha = 1;\r\n var fillAlpha = 1;\r\n var lineColor = 0;\r\n var fillColor = 0;\r\n var lineWidth = 1;\r\n var red = 0;\r\n var green = 0;\r\n var blue = 0;\r\n\r\n // Reset any currently active paths\r\n ctx.beginPath();\r\n\r\n for (var index = 0; index < commandBufferLength; ++index)\r\n {\r\n var commandID = commandBuffer[index];\r\n\r\n switch (commandID)\r\n {\r\n case Commands.ARC:\r\n ctx.arc(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4],\r\n commandBuffer[index + 5],\r\n commandBuffer[index + 6]\r\n );\r\n\r\n // +7 because overshoot is the 7th value, not used in Canvas\r\n index += 7;\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commandBuffer[index + 1];\r\n lineColor = commandBuffer[index + 2];\r\n lineAlpha = commandBuffer[index + 3];\r\n red = ((lineColor & 0xFF0000) >>> 16);\r\n green = ((lineColor & 0xFF00) >>> 8);\r\n blue = (lineColor & 0xFF);\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + lineAlpha + ')';\r\n ctx.lineWidth = lineWidth;\r\n index += 3;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n fillColor = commandBuffer[index + 1];\r\n fillAlpha = commandBuffer[index + 2];\r\n red = ((fillColor & 0xFF0000) >>> 16);\r\n green = ((fillColor & 0xFF00) >>> 8);\r\n blue = (fillColor & 0xFF);\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n index += 2;\r\n break;\r\n\r\n case Commands.BEGIN_PATH:\r\n ctx.beginPath();\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n ctx.closePath();\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n if (!allowClip)\r\n {\r\n ctx.fillRect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n else\r\n {\r\n ctx.rect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n index += 4;\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.LINE_FX_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.MOVE_FX_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.SAVE:\r\n ctx.save();\r\n break;\r\n\r\n case Commands.RESTORE:\r\n ctx.restore();\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n ctx.translate(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.SCALE:\r\n ctx.scale(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.ROTATE:\r\n ctx.rotate(\r\n commandBuffer[index + 1]\r\n );\r\n index += 1;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n index += 5;\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n index += 6;\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n index += 2;\r\n break;\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = GraphicsCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('graphics', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var graphics = new Graphics(this.scene, config);\r\n\r\n if (config.add)\r\n {\r\n this.scene.sys.displayList.add(graphics);\r\n }\r\n \r\n return graphics;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [config] - The Graphics configuration.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('graphics', function (config)\r\n{\r\n return this.displayList.add(new Graphics(this.scene, config));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GraphicsWebGLRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js");\r\n\r\n // Needed for Graphics.generateTexture\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js?')},"./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ "./node_modules/phaser/src/gameobjects/graphics/Commands.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n// TODO: Remove the use of this\r\nvar Point = function (x, y, width)\r\n{\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n};\r\n\r\n// TODO: Remove the use of this\r\nvar Path = function (x, y, width)\r\n{\r\n this.points = [];\r\n this.pointsLength = 1;\r\n this.points[0] = new Point(x, y, width);\r\n};\r\n\r\nvar matrixStack = [];\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (src.commandBuffer.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = src._tempMatrix1;\r\n var graphicsMatrix = src._tempMatrix2;\r\n var currentMatrix = src._tempMatrix3;\r\n\r\n currentMatrix.loadIdentity();\r\n\r\n graphicsMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n graphicsMatrix.e = src.x;\r\n graphicsMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n else\r\n {\r\n graphicsMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n graphicsMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n\r\n var commands = src.commandBuffer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n var lineWidth = 1;\r\n var fillTint = pipeline.fillTint;\r\n var strokeTint = pipeline.strokeTint;\r\n\r\n var tx = 0;\r\n var ty = 0;\r\n var ta = 0;\r\n var iterStep = 0.01;\r\n var PI2 = Math.PI * 2;\r\n\r\n var cmd;\r\n\r\n var path = [];\r\n var pathIndex = 0;\r\n var pathOpen = false;\r\n var lastPath = null;\r\n\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n var currentTexture = renderer.blankTexture.glTexture;\r\n\r\n for (var cmdIndex = 0; cmdIndex < commands.length; cmdIndex++)\r\n {\r\n cmd = commands[cmdIndex];\r\n\r\n switch (cmd)\r\n {\r\n case Commands.BEGIN_PATH:\r\n\r\n path.length = 0;\r\n lastPath = null;\r\n pathOpen = true;\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n\r\n pathOpen = false;\r\n\r\n if (lastPath && lastPath.points.length)\r\n {\r\n lastPath.points.push(lastPath.points[0]);\r\n }\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchFillPath(\r\n path[pathIndex].points,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchStrokePath(\r\n path[pathIndex].points,\r\n lineWidth,\r\n pathOpen,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var strokeColor = commands[++cmdIndex];\r\n var strokeAlpha = commands[++cmdIndex] * alpha;\r\n var strokeTintColor = getTint(strokeColor, strokeAlpha);\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n var fillColor = commands[++cmdIndex];\r\n var fillAlpha = commands[++cmdIndex] * alpha;\r\n var fillTintColor = getTint(fillColor, fillAlpha);\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n var gradientFillAlpha = commands[++cmdIndex] * alpha;\r\n fillTint.TL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.TR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var gradientLineAlpha = commands[++cmdIndex] * alpha;\r\n strokeTint.TL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.TR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n break;\r\n\r\n case Commands.ARC:\r\n var iteration = 0;\r\n var x = commands[++cmdIndex];\r\n var y = commands[++cmdIndex];\r\n var radius = commands[++cmdIndex];\r\n var startAngle = commands[++cmdIndex];\r\n var endAngle = commands[++cmdIndex];\r\n var anticlockwise = commands[++cmdIndex];\r\n var overshoot = commands[++cmdIndex];\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -PI2)\r\n {\r\n endAngle = -PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -PI2 + endAngle % PI2;\r\n }\r\n }\r\n else if (endAngle > PI2)\r\n {\r\n endAngle = PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = PI2 + endAngle % PI2;\r\n }\r\n\r\n if (lastPath === null)\r\n {\r\n lastPath = new Path(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius, lineWidth);\r\n path.push(lastPath);\r\n iteration += iterStep;\r\n }\r\n\r\n while (iteration < 1 + overshoot)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n iteration += iterStep;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillRect(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchStrokeTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n lineWidth,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n if (lastPath !== null)\r\n {\r\n lastPath.points.push(new Point(commands[++cmdIndex], commands[++cmdIndex], lineWidth));\r\n }\r\n else\r\n {\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n }\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n break;\r\n\r\n case Commands.SAVE:\r\n matrixStack.push(currentMatrix.copyToArray());\r\n break;\r\n\r\n case Commands.RESTORE:\r\n currentMatrix.copyFromArray(matrixStack.pop());\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.translate(x, y);\r\n break;\r\n\r\n case Commands.SCALE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.scale(x, y);\r\n break;\r\n\r\n case Commands.ROTATE:\r\n currentMatrix.rotate(commands[++cmdIndex]);\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n var frame = commands[++cmdIndex];\r\n var mode = commands[++cmdIndex];\r\n\r\n pipeline.currentFrame = frame;\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n pipeline.tintEffect = mode;\r\n\r\n currentTexture = frame.glTexture;\r\n\r\n break;\r\n\r\n case Commands.CLEAR_TEXTURE:\r\n pipeline.currentFrame = renderer.blankTexture;\r\n pipeline.tintEffect = 2;\r\n currentTexture = renderer.blankTexture.glTexture;\r\n break;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GraphicsWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/group/Group.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Actions = __webpack_require__(/*! ../../actions/ */ \"./node_modules/phaser/src/actions/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Range = __webpack_require__(/*! ../../utils/array/Range */ \"./node_modules/phaser/src/utils/array/Range.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Group is a way for you to create, manipulate, or recycle similar Game Objects.\r\n *\r\n * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none.\r\n *\r\n * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden.\r\n *\r\n * @class Group\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings.\r\n *\r\n * @see Phaser.Physics.Arcade.Group\r\n * @see Phaser.Physics.Arcade.StaticGroup\r\n */\r\nvar Group = new Class({\r\n\r\n initialize:\r\n\r\n function Group (scene, children, config)\r\n {\r\n // They can pass in any of the following as the first argument:\r\n\r\n // 1) A single child\r\n // 2) An array of children\r\n // 3) A config object\r\n // 4) An array of config objects\r\n\r\n // Or they can pass in a child, or array of children AND a config object\r\n\r\n if (config)\r\n {\r\n // config has been set, are the children an array?\r\n\r\n if (children && !Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n }\r\n else if (Array.isArray(children))\r\n {\r\n // No config, so let's check the children argument\r\n\r\n if (IsPlainObject(children[0]))\r\n {\r\n // It's an array of plain config objects\r\n config = children;\r\n children = null;\r\n }\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // Children isn't an array. Is it a config object though?\r\n config = children;\r\n children = null;\r\n }\r\n\r\n /**\r\n * This scene this group belongs to.\r\n *\r\n * @name Phaser.GameObjects.Group#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Members of this group.\r\n *\r\n * @name Phaser.GameObjects.Group#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set(children);\r\n\r\n /**\r\n * A flag identifying this object as a group.\r\n *\r\n * @name Phaser.GameObjects.Group#isParent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isParent = true;\r\n\r\n /**\r\n * The class to create new group members from.\r\n *\r\n * @name Phaser.GameObjects.Group#classType\r\n * @type {Function}\r\n * @since 3.0.0\r\n * @default Phaser.GameObjects.Sprite\r\n */\r\n this.classType = GetFastValue(config, 'classType', Sprite);\r\n\r\n /**\r\n * The name of this group.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Group#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.18.0\r\n */\r\n this.name = GetFastValue(config, 'name', '');\r\n\r\n /**\r\n * Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method\r\n * (which may update any members).\r\n *\r\n * @name Phaser.GameObjects.Group#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = GetFastValue(config, 'active', true);\r\n\r\n /**\r\n * The maximum size of this group, if used as a pool. -1 is no limit.\r\n *\r\n * @name Phaser.GameObjects.Group#maxSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @default -1\r\n */\r\n this.maxSize = GetFastValue(config, 'maxSize', -1);\r\n\r\n /**\r\n * A default texture key to use when creating new group members.\r\n *\r\n * This is used in {@link Phaser.GameObjects.Group#create}\r\n * but not in {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.defaultKey = GetFastValue(config, 'defaultKey', null);\r\n\r\n /**\r\n * A default texture frame to use when creating new group members.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = GetFastValue(config, 'defaultFrame', null);\r\n\r\n /**\r\n * Whether to call the update method of any members.\r\n *\r\n * @name Phaser.GameObjects.Group#runChildUpdate\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Group#preUpdate\r\n */\r\n this.runChildUpdate = GetFastValue(config, 'runChildUpdate', false);\r\n\r\n /**\r\n * A function to be called when adding or creating group members.\r\n *\r\n * @name Phaser.GameObjects.Group#createCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.createCallback = GetFastValue(config, 'createCallback', null);\r\n\r\n /**\r\n * A function to be called when removing group members.\r\n *\r\n * @name Phaser.GameObjects.Group#removeCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.removeCallback = GetFastValue(config, 'removeCallback', null);\r\n\r\n /**\r\n * A function to be called when creating several group members at once.\r\n *\r\n * @name Phaser.GameObjects.Group#createMultipleCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupMultipleCreateCallback}\r\n * @since 3.0.0\r\n */\r\n this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null);\r\n\r\n if (config)\r\n {\r\n this.createMultiple(config);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Game Object and adds it to this group, unless the group {@link Phaser.GameObjects.Group#isFull is full}.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the new Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of the new Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key of the new Game Object.\r\n * @param {(string|integer)} [frame=defaultFrame] - The texture frame of the new Game Object.\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object.\r\n * @param {boolean} [active=true] - The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object.\r\n *\r\n * @return {any} The new Game Object (usually a Sprite, etc.).\r\n */\r\n create: function (x, y, key, frame, visible, active)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (key === undefined) { key = this.defaultKey; }\r\n if (frame === undefined) { frame = this.defaultFrame; }\r\n if (visible === undefined) { visible = true; }\r\n if (active === undefined) { active = true; }\r\n\r\n // Pool?\r\n if (this.isFull())\r\n {\r\n return null;\r\n }\r\n\r\n var child = new this.classType(this.scene, x, y, key, frame);\r\n\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n\r\n child.visible = visible;\r\n child.setActive(active);\r\n\r\n this.add(child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Creates several Game Objects and adds them to this group.\r\n *\r\n * If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig[]} config - Creation settings. This can be a single configuration object or an array of such objects, which will be applied in turn.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createMultiple: function (config)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var output = [];\r\n\r\n if (config[0].key)\r\n {\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var entries = this.createFromConfig(config[i]);\r\n \r\n output = output.concat(entries);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * A helper for {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @method Phaser.GameObjects.Group#createFromConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig} options - Creation settings.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createFromConfig: function (options)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n this.classType = GetFastValue(options, 'classType', this.classType);\r\n\r\n var key = GetFastValue(options, 'key', undefined);\r\n var frame = GetFastValue(options, 'frame', null);\r\n var visible = GetFastValue(options, 'visible', true);\r\n var active = GetFastValue(options, 'active', true);\r\n\r\n var entries = [];\r\n\r\n // Can't do anything without at least a key\r\n if (key === undefined)\r\n {\r\n return entries;\r\n }\r\n else\r\n {\r\n if (!Array.isArray(key))\r\n {\r\n key = [ key ];\r\n }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n }\r\n\r\n // Build an array of key frame pairs to loop through\r\n\r\n var repeat = GetFastValue(options, 'repeat', 0);\r\n var randomKey = GetFastValue(options, 'randomKey', false);\r\n var randomFrame = GetFastValue(options, 'randomFrame', false);\r\n var yoyo = GetFastValue(options, 'yoyo', false);\r\n var quantity = GetFastValue(options, 'quantity', false);\r\n var frameQuantity = GetFastValue(options, 'frameQuantity', 1);\r\n var max = GetFastValue(options, 'max', 0);\r\n\r\n // If a quantity value is set we use that to override the frameQuantity\r\n\r\n var range = Range(key, frame, {\r\n max: max,\r\n qty: (quantity) ? quantity : frameQuantity,\r\n random: randomKey,\r\n randomB: randomFrame,\r\n repeat: repeat,\r\n yoyo: yoyo\r\n });\r\n\r\n if (options.createCallback)\r\n {\r\n this.createCallback = options.createCallback;\r\n }\r\n\r\n if (options.removeCallback)\r\n {\r\n this.removeCallback = options.removeCallback;\r\n }\r\n\r\n for (var c = 0; c < range.length; c++)\r\n {\r\n var created = this.create(0, 0, range[c].a, range[c].b, visible, active);\r\n\r\n if (!created)\r\n {\r\n break;\r\n }\r\n\r\n entries.push(created);\r\n }\r\n\r\n // Post-creation options (applied only to those items created in this call):\r\n\r\n var x = GetValue(options, 'setXY.x', 0);\r\n var y = GetValue(options, 'setXY.y', 0);\r\n var stepX = GetValue(options, 'setXY.stepX', 0);\r\n var stepY = GetValue(options, 'setXY.stepY', 0);\r\n\r\n Actions.SetXY(entries, x, y, stepX, stepY);\r\n\r\n var rotation = GetValue(options, 'setRotation.value', 0);\r\n var stepRotation = GetValue(options, 'setRotation.step', 0);\r\n\r\n Actions.SetRotation(entries, rotation, stepRotation);\r\n\r\n var scaleX = GetValue(options, 'setScale.x', 1);\r\n var scaleY = GetValue(options, 'setScale.y', scaleX);\r\n var stepScaleX = GetValue(options, 'setScale.stepX', 0);\r\n var stepScaleY = GetValue(options, 'setScale.stepY', 0);\r\n\r\n Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY);\r\n\r\n var alpha = GetValue(options, 'setAlpha.value', 1);\r\n var stepAlpha = GetValue(options, 'setAlpha.step', 0);\r\n\r\n Actions.SetAlpha(entries, alpha, stepAlpha);\r\n\r\n var hitArea = GetFastValue(options, 'hitArea', null);\r\n var hitAreaCallback = GetFastValue(options, 'hitAreaCallback', null);\r\n\r\n if (hitArea)\r\n {\r\n Actions.SetHitArea(entries, hitArea, hitAreaCallback);\r\n }\r\n\r\n var grid = GetFastValue(options, 'gridAlign', false);\r\n\r\n if (grid)\r\n {\r\n Actions.GridAlign(entries, grid);\r\n }\r\n\r\n if (this.createMultipleCallback)\r\n {\r\n this.createMultipleCallback.call(this, entries);\r\n }\r\n\r\n return entries;\r\n },\r\n\r\n /**\r\n * Updates any group members, if {@link Phaser.GameObjects.Group#runChildUpdate} is enabled.\r\n *\r\n * @method Phaser.GameObjects.Group#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n if (!this.runChildUpdate || this.children.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Because a Group child may mess with the length of the Group during its update\r\n var temp = this.children.entries.slice();\r\n\r\n for (var i = 0; i < temp.length; i++)\r\n {\r\n var item = temp[i];\r\n\r\n if (item.active)\r\n {\r\n item.update(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Game Object to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Object to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n add: function (child, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (this.isFull())\r\n {\r\n return this;\r\n }\r\n\r\n this.children.set(child);\r\n\r\n if (this.createCallback)\r\n {\r\n this.createCallback.call(this, child);\r\n }\r\n\r\n if (addToScene)\r\n {\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n }\r\n\r\n child.on(Events.DESTROY, this.remove, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds several Game Objects to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#addMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n addMultiple: function (children, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (Array.isArray(children))\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.add(children[i], addToScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a member of this Group and optionally removes it from the Scene and / or destroys it.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n remove: function (child, removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n if (!this.children.contains(child))\r\n {\r\n return this;\r\n }\r\n\r\n this.children.delete(child);\r\n\r\n if (this.removeCallback)\r\n {\r\n this.removeCallback.call(this, child);\r\n }\r\n\r\n child.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n child.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n child.scene.sys.displayList.remove(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n child.scene.sys.updateList.remove(child);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all members of this Group and optionally removes them from the Scene and / or destroys them.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#clear\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n clear: function (removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n var children = this.children;\r\n\r\n for (var i = 0; i < children.size; i++)\r\n {\r\n var gameObject = children.entries[i];\r\n\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n gameObject.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n gameObject.scene.sys.displayList.remove(gameObject);\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n gameObject.scene.sys.updateList.remove(gameObject);\r\n }\r\n }\r\n }\r\n\r\n this.children.clear();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Tests if a Game Object is a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - A Game Object.\r\n *\r\n * @return {boolean} True if the Game Object is a member of this group.\r\n */\r\n contains: function (child)\r\n {\r\n return this.children.contains(child);\r\n },\r\n\r\n /**\r\n * All members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * The number of members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {integer}\r\n */\r\n getLength: function ()\r\n {\r\n return this.children.size;\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirst\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirst: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirstNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLast\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLast: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLastNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLastNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getHandler\r\n * @private\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} forwards - Search front to back or back to front?\r\n * @param {integer} nth - Stop matching after nth successful matches.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getHandler: function (forwards, nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n if (state === undefined) { state = false; }\r\n if (createIfNull === undefined) { createIfNull = false; }\r\n\r\n var gameObject;\r\n\r\n var i;\r\n var total = 0;\r\n var children = this.children.entries;\r\n\r\n if (forwards)\r\n {\r\n for (i = 0; i < children.length; i++)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = children.length - 1; i >= 0; i--)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n\r\n if (gameObject)\r\n {\r\n if (typeof(x) === 'number')\r\n {\r\n gameObject.x = x;\r\n }\r\n\r\n if (typeof(y) === 'number')\r\n {\r\n gameObject.y = y;\r\n }\r\n\r\n return gameObject;\r\n }\r\n\r\n // Got this far? We need to create or bail\r\n if (createIfNull)\r\n {\r\n return this.create(x, y, key, frame, visible);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have its active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#get\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first inactive group member, or a newly created member, or null.\r\n */\r\n get: function (x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, true, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `true`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstAlive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first active group member, or a newly created member, or null.\r\n */\r\n getFirstAlive: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(true, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have an active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstDead\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first inactive group member, or a newly created member, or null.\r\n */\r\n getFirstDead: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Components.Animation#play Plays} an animation for all members of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#playAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n playAnimation: function (key, startFrame)\r\n {\r\n Actions.PlayAnimation(this.children.entries, key, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Whether this group's size at its {@link Phaser.GameObjects.Group#maxSize maximum}.\r\n *\r\n * @method Phaser.GameObjects.Group#isFull\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the number of members equals {@link Phaser.GameObjects.Group#maxSize}.\r\n */\r\n isFull: function ()\r\n {\r\n if (this.maxSize === -1)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return (this.children.size >= this.maxSize);\r\n }\r\n },\r\n\r\n /**\r\n * Counts the number of active (or inactive) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#countActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Count active (true) or inactive (false) group members.\r\n *\r\n * @return {integer} The number of group members with an active state matching the `active` argument.\r\n */\r\n countActive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n var total = 0;\r\n\r\n for (var i = 0; i < this.children.size; i++)\r\n {\r\n if (this.children.entries[i].active === value)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Counts the number of in-use (active) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalUsed\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of group members with an active state of true.\r\n */\r\n getTotalUsed: function ()\r\n {\r\n return this.countActive();\r\n },\r\n\r\n /**\r\n * The difference of {@link Phaser.GameObjects.Group#maxSize} and the number of active group members.\r\n *\r\n * This represents the number of group members that could be created or reactivated before reaching the size limit.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalFree\r\n * @since 3.0.0\r\n *\r\n * @return {integer} maxSize minus the number of active group numbers; or a large number (if maxSize is -1).\r\n */\r\n getTotalFree: function ()\r\n {\r\n var used = this.getTotalUsed();\r\n var capacity = (this.maxSize === -1) ? 999999999999 : this.maxSize;\r\n\r\n return (capacity - used);\r\n },\r\n\r\n /**\r\n * Sets the depth of each group member.\r\n *\r\n * @method Phaser.GameObjects.Group#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} step - This is added to the `value` amount, multiplied by the iteration counter.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n setDepth: function (value, step)\r\n {\r\n Actions.SetDepth(this.children.entries, value, step);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#kill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n kill: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n }\r\n },\r\n\r\n /**\r\n * Deactivates and hides a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#killAndHide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n killAndHide: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n gameObject.setVisible(false);\r\n }\r\n },\r\n\r\n /**\r\n * Toggles (flips) the visible state of each member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#toggleVisible\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n toggleVisible: function ()\r\n {\r\n Actions.ToggleVisible(this.children.entries);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Empties this group and removes it from the Scene.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#destroy\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [destroyChildren=false] - Also {@link Phaser.GameObjects.GameObject#destroy} each group member.\r\n */\r\n destroy: function (destroyChildren)\r\n {\r\n if (destroyChildren === undefined) { destroyChildren = false; }\r\n\r\n // This Game Object had already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n this.clear(false, destroyChildren);\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Group;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/Group.js?")},"./node_modules/phaser/src/gameobjects/group/GroupCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Group = __webpack_require__(/*! ./Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\n\r\n/**\r\n * Creates a new Group Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#group\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('group', function (config)\r\n{\r\n return new Group(this.scene, null, config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupCreator.js?")},"./node_modules/phaser/src/gameobjects/group/GroupFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Group = __webpack_require__(/*! ./Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Group Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#group\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupConfig[])} [children] - Game Objects to add to this Group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - A Group Configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'group\', function (children, config)\r\n{\r\n return this.updateList.add(new Group(this.scene, children, config));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupFactory.js?')},"./node_modules/phaser/src/gameobjects/image/Image.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ImageRender = __webpack_require__(/*! ./ImageRender */ "./node_modules/phaser/src/gameobjects/image/ImageRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Game Object.\r\n *\r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Image = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ImageRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Image (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Image\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Image#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/Image.js?')},"./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/image/ImageCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#image\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('image', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var image = new Image(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, image, config);\r\n\r\n return image;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCreator.js?")},"./node_modules/phaser/src/gameobjects/image/ImageFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('image', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Image(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageFactory.js?")},"./node_modules/phaser/src/gameobjects/image/ImageRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ImageWebGLRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ImageCanvasRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageRender.js?')},"./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects\r\n */\r\n\r\nvar GameObjects = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/gameobjects/events/index.js"),\r\n\r\n DisplayList: __webpack_require__(/*! ./DisplayList */ "./node_modules/phaser/src/gameobjects/DisplayList.js"),\r\n GameObjectCreator: __webpack_require__(/*! ./GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js"),\r\n GameObjectFactory: __webpack_require__(/*! ./GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js"),\r\n UpdateList: __webpack_require__(/*! ./UpdateList */ "./node_modules/phaser/src/gameobjects/UpdateList.js"),\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/gameobjects/components/index.js"),\r\n\r\n BuildGameObject: __webpack_require__(/*! ./BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js"),\r\n BuildGameObjectAnimation: __webpack_require__(/*! ./BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js"),\r\n GameObject: __webpack_require__(/*! ./GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js"),\r\n BitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js"),\r\n Blitter: __webpack_require__(/*! ./blitter/Blitter */ "./node_modules/phaser/src/gameobjects/blitter/Blitter.js"),\r\n Container: __webpack_require__(/*! ./container/Container */ "./node_modules/phaser/src/gameobjects/container/Container.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElement */ "./node_modules/phaser/src/gameobjects/domelement/DOMElement.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js"),\r\n Extern: __webpack_require__(/*! ./extern/Extern.js */ "./node_modules/phaser/src/gameobjects/extern/Extern.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/Graphics.js */ "./node_modules/phaser/src/gameobjects/graphics/Graphics.js"),\r\n Group: __webpack_require__(/*! ./group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js"),\r\n Image: __webpack_require__(/*! ./image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js"),\r\n Particles: __webpack_require__(/*! ./particles */ "./node_modules/phaser/src/gameobjects/particles/index.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollower */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTexture */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js"),\r\n RetroFont: __webpack_require__(/*! ./bitmaptext/RetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js"),\r\n Text: __webpack_require__(/*! ./text/static/Text */ "./node_modules/phaser/src/gameobjects/text/static/Text.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSprite */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js"),\r\n Zone: __webpack_require__(/*! ./zone/Zone */ "./node_modules/phaser/src/gameobjects/zone/Zone.js"),\r\n\r\n // Shapes\r\n\r\n Shape: __webpack_require__(/*! ./shape/Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js"),\r\n Arc: __webpack_require__(/*! ./shape/arc/Arc */ "./node_modules/phaser/src/gameobjects/shape/arc/Arc.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBox */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangle */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js"),\r\n Line: __webpack_require__(/*! ./shape/line/Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js"),\r\n Star: __webpack_require__(/*! ./shape/star/Star */ "./node_modules/phaser/src/gameobjects/shape/star/Star.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js"),\r\n\r\n // Game Object Factories\r\n\r\n Factories: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterFactory */ "./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerFactory */ "./node_modules/phaser/src/gameobjects/container/ContainerFactory.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElementFactory */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js"),\r\n Extern: __webpack_require__(/*! ./extern/ExternFactory */ "./node_modules/phaser/src/gameobjects/extern/ExternFactory.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsFactory */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js"),\r\n Group: __webpack_require__(/*! ./group/GroupFactory */ "./node_modules/phaser/src/gameobjects/group/GroupFactory.js"),\r\n Image: __webpack_require__(/*! ./image/ImageFactory */ "./node_modules/phaser/src/gameobjects/image/ImageFactory.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerFactory */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollowerFactory */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureFactory */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteFactory */ "./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextFactory */ "./node_modules/phaser/src/gameobjects/text/static/TextFactory.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteFactory */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneFactory */ "./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js"),\r\n\r\n // Shapes\r\n Arc: __webpack_require__(/*! ./shape/arc/ArcFactory */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/CurveFactory */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/EllipseFactory */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/GridFactory */ "./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBoxFactory */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js"),\r\n Line: __webpack_require__(/*! ./shape/line/LineFactory */ "./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/PolygonFactory */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/RectangleFactory */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js"),\r\n Star: __webpack_require__(/*! ./shape/star/StarFactory */ "./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/TriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js")\r\n },\r\n\r\n Creators: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterCreator */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerCreator */ "./node_modules/phaser/src/gameobjects/container/ContainerCreator.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsCreator */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js"),\r\n Group: __webpack_require__(/*! ./group/GroupCreator */ "./node_modules/phaser/src/gameobjects/group/GroupCreator.js"),\r\n Image: __webpack_require__(/*! ./image/ImageCreator */ "./node_modules/phaser/src/gameobjects/image/ImageCreator.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerCreator */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureCreator */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteCreator */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextCreator */ "./node_modules/phaser/src/gameobjects/text/static/TextCreator.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteCreator */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneCreator */ "./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js")\r\n }\r\n\r\n};\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n // WebGL only Game Objects\r\n GameObjects.Mesh = __webpack_require__(/*! ./mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n GameObjects.Quad = __webpack_require__(/*! ./quad/Quad */ "./node_modules/phaser/src/gameobjects/quad/Quad.js");\r\n GameObjects.Shader = __webpack_require__(/*! ./shader/Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\n\r\n GameObjects.Factories.Mesh = __webpack_require__(/*! ./mesh/MeshFactory */ "./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js");\r\n GameObjects.Factories.Quad = __webpack_require__(/*! ./quad/QuadFactory */ "./node_modules/phaser/src/gameobjects/quad/QuadFactory.js");\r\n GameObjects.Factories.Shader = __webpack_require__(/*! ./shader/ShaderFactory */ "./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js");\r\n\r\n GameObjects.Creators.Mesh = __webpack_require__(/*! ./mesh/MeshCreator */ "./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js");\r\n GameObjects.Creators.Quad = __webpack_require__(/*! ./quad/QuadCreator */ "./node_modules/phaser/src/gameobjects/quad/QuadCreator.js");\r\n GameObjects.Creators.Shader = __webpack_require__(/*! ./shader/ShaderCreator */ "./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js");\r\n\r\n GameObjects.Light = __webpack_require__(/*! ./lights/Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\n\r\n __webpack_require__(/*! ./lights/LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\n __webpack_require__(/*! ./lights/LightsPlugin */ "./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js");\r\n}\r\n\r\nmodule.exports = GameObjects;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/index.js?')},"./node_modules/phaser/src/gameobjects/lights/Light.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @classdesc\r\n * A 2D point light.\r\n *\r\n * These are typically created by a {@link Phaser.GameObjects.LightsManager}, available from within a scene via `this.lights`.\r\n *\r\n * Any Game Objects using the Light2D pipeline will then be affected by these Lights.\r\n *\r\n * They can also simply be used to represent a point light for your own purposes.\r\n *\r\n * @class Light\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color of the light. A value between 0 and 1.\r\n * @param {number} g - The green color of the light. A value between 0 and 1.\r\n * @param {number} b - The blue color of the light. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n */\r\nvar Light = new Class({\r\n\r\n initialize:\r\n\r\n function Light (x, y, radius, r, g, b, intensity)\r\n {\r\n /**\r\n * The horizontal position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The red color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#r\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.r = r;\r\n\r\n /**\r\n * The green color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#g\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.g = g;\r\n\r\n /**\r\n * The blue color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#b\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.b = b;\r\n\r\n /**\r\n * The intensity of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#intensity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.intensity = intensity;\r\n\r\n /**\r\n * The horizontal scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1.0;\r\n\r\n /**\r\n * The vertical scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1.0;\r\n },\r\n\r\n /**\r\n * Set the properties of the light.\r\n *\r\n * Sets both horizontal and vertical scroll factor to 1. Use {@link Phaser.GameObjects.Light#setScrollFactor} to set\r\n * the scroll factor.\r\n *\r\n * @method Phaser.GameObjects.Light#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color. A value between 0 and 1.\r\n * @param {number} g - The green color. A value between 0 and 1.\r\n * @param {number} b - The blue color. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n set: function (x, y, radius, r, g, b, intensity)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.radius = radius;\r\n\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n\r\n this.intensity = intensity;\r\n\r\n this.scrollFactorX = 1;\r\n this.scrollFactorY = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scroll factor of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of the light.\r\n * @param {number} y - The vertical scroll factor of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the color of the light from a single integer RGB value.\r\n *\r\n * @method Phaser.GameObjects.Light#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.r = color[0];\r\n this.g = color[1];\r\n this.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the intensity of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setIntensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setIntensity: function (intensity)\r\n {\r\n this.intensity = intensity;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the radius of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setRadius: function (radius)\r\n {\r\n this.radius = radius;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Light;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/Light.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Light = __webpack_require__(/*! ./Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @callback LightForEach\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Manages Lights for a Scene.\r\n *\r\n * Affects the rendering of Game Objects using the `Light2D` pipeline.\r\n *\r\n * @class LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar LightsManager = new Class({\r\n\r\n initialize:\r\n\r\n function LightsManager ()\r\n {\r\n /**\r\n * The pool of Lights.\r\n *\r\n * Used to recycle removed Lights for a more efficient use of memory.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lightPool\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lightPool = [];\r\n\r\n /**\r\n * The Lights in the Scene.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lights = [];\r\n\r\n /**\r\n * Lights that have been culled from a Camera\'s viewport.\r\n *\r\n * Lights in this list will not be rendered.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#culledLights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.culledLights = [];\r\n\r\n /**\r\n * The ambient color.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#ambientColor\r\n * @type {{ r: number, g: number, b: number }}\r\n * @since 3.0.0\r\n */\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n\r\n /**\r\n * Whether the Lights Manager is enabled.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The maximum number of lights that a single Camera and the lights shader can process.\r\n * Change this via the `maxLights` property in your game config, as it cannot be changed at runtime.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#maxLights\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.maxLights = -1;\r\n },\r\n\r\n /**\r\n * Enable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#enable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n enable: function ()\r\n {\r\n if (this.maxLights === -1)\r\n {\r\n this.maxLights = this.scene.sys.game.renderer.config.maxLights;\r\n }\r\n\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#disable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n disable: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Cull any Lights that aren\'t visible to the given Camera.\r\n *\r\n * Culling Lights improves performance by ensuring that only Lights within a Camera\'s viewport are rendered.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to cull Lights for.\r\n *\r\n * @return {Phaser.GameObjects.Light[]} The culled Lights.\r\n */\r\n cull: function (camera)\r\n {\r\n var lights = this.lights;\r\n var culledLights = this.culledLights;\r\n var length = lights.length;\r\n var cameraCenterX = camera.x + camera.width / 2.0;\r\n var cameraCenterY = camera.y + camera.height / 2.0;\r\n var cameraRadius = (camera.width + camera.height) / 2.0;\r\n var point = { x: 0, y: 0 };\r\n var cameraMatrix = camera.matrix;\r\n var viewportHeight = this.systems.game.config.height;\r\n\r\n culledLights.length = 0;\r\n\r\n for (var index = 0; index < length && culledLights.length < this.maxLights; index++)\r\n {\r\n var light = lights[index];\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n // We\'ll just use bounding spheres to test if lights should be rendered\r\n var dx = cameraCenterX - (point.x - (camera.scrollX * light.scrollFactorX * camera.zoom));\r\n var dy = cameraCenterY - (viewportHeight - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n var distance = Math.sqrt(dx * dx + dy * dy);\r\n\r\n if (distance < light.radius + cameraRadius)\r\n {\r\n culledLights.push(lights[index]);\r\n }\r\n }\r\n\r\n return culledLights;\r\n },\r\n\r\n /**\r\n * Iterate over each Light with a callback.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#forEachLight\r\n * @since 3.0.0\r\n *\r\n * @param {LightForEach} callback - The callback that is called with each Light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n forEachLight: function (callback)\r\n {\r\n if (!callback)\r\n {\r\n return;\r\n }\r\n\r\n var lights = this.lights;\r\n var length = lights.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n callback(lights[index]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the ambient light color.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#setAmbientColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the ambient light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n setAmbientColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.ambientColor.r = color[0];\r\n this.ambientColor.g = color[1];\r\n this.ambientColor.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of Lights allowed to appear at once.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getMaxVisibleLights\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The maximum number of Lights allowed to appear at once.\r\n */\r\n getMaxVisibleLights: function ()\r\n {\r\n return 10;\r\n },\r\n\r\n /**\r\n * Get the number of Lights managed by this Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getLightCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of Lights managed by this Lights Manager.\r\n */\r\n getLightCount: function ()\r\n {\r\n return this.lights.length;\r\n },\r\n\r\n /**\r\n * Add a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#addLight\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the Light.\r\n * @param {number} [y=0] - The vertical position of the Light.\r\n * @param {number} [radius=100] - The radius of the Light.\r\n * @param {number} [rgb=0xffffff] - The integer RGB color of the light.\r\n * @param {number} [intensity=1] - The intensity of the Light.\r\n *\r\n * @return {Phaser.GameObjects.Light} The Light that was added.\r\n */\r\n addLight: function (x, y, radius, rgb, intensity)\r\n {\r\n var color = null;\r\n var light = null;\r\n\r\n x = (x === undefined) ? 0.0 : x;\r\n y = (y === undefined) ? 0.0 : y;\r\n rgb = (rgb === undefined) ? 0xffffff : rgb;\r\n radius = (radius === undefined) ? 100.0 : radius;\r\n intensity = (intensity === undefined) ? 1.0 : intensity;\r\n\r\n color = Utils.getFloatsFromUintRGB(rgb);\r\n light = null;\r\n\r\n if (this.lightPool.length > 0)\r\n {\r\n light = this.lightPool.pop();\r\n light.set(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n else\r\n {\r\n light = new Light(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n\r\n this.lights.push(light);\r\n\r\n return light;\r\n },\r\n\r\n /**\r\n * Remove a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#removeLight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light to remove.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n removeLight: function (light)\r\n {\r\n var index = this.lights.indexOf(light);\r\n\r\n if (index >= 0)\r\n {\r\n this.lightPool.push(light);\r\n this.lights.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shut down the Lights Manager.\r\n *\r\n * Recycles all active Lights into the Light pool, resets ambient light color and clears the lists of Lights and\r\n * culled Lights.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n while (this.lights.length > 0)\r\n {\r\n this.lightPool.push(this.lights.pop());\r\n }\r\n\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n this.culledLights.length = 0;\r\n this.lights.length = 0;\r\n },\r\n\r\n /**\r\n * Destroy the Lights Manager.\r\n *\r\n * Cleans up all references by calling {@link Phaser.GameObjects.LightsManager#shutdown}.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LightsManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsManager.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar LightsManager = __webpack_require__(/*! ./LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene plugin that provides a {@link Phaser.GameObjects.LightsManager} for the Light2D pipeline.\r\n *\r\n * Available from within a Scene via `this.lights`.\r\n *\r\n * Add Lights using the {@link Phaser.GameObjects.LightsManager#addLight} method:\r\n *\r\n * ```javascript\r\n * // Enable the Lights Manager because it is disabled by default\r\n * this.lights.enable();\r\n *\r\n * // Create a Light at [400, 300] with a radius of 200\r\n * this.lights.addLight(400, 300, 200);\r\n * ```\r\n *\r\n * For Game Objects to be affected by the Lights when rendered, you will need to set them to use the `Light2D` pipeline like so:\r\n *\r\n * ```javascript\r\n * sprite.setPipeline(\'Light2D\');\r\n * ```\r\n *\r\n * @class LightsPlugin\r\n * @extends Phaser.GameObjects.LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Lights Plugin belongs to.\r\n */\r\nvar LightsPlugin = new Class({\r\n\r\n Extends: LightsManager,\r\n\r\n initialize:\r\n\r\n function LightsPlugin (scene)\r\n {\r\n /**\r\n * A reference to the Scene that this Lights Plugin belongs to.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s systems.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n if (!scene.sys.settings.isBooted)\r\n {\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n }\r\n\r\n LightsManager.call(this);\r\n },\r\n\r\n /**\r\n * Boot the Lights Plugin.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#boot\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.on(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Destroy the Lights Plugin.\r\n *\r\n * Cleans up all references.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = undefined;\r\n this.systems = undefined;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'LightsPlugin\', LightsPlugin, \'lights\');\r\n\r\nmodule.exports = LightsPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js?')},"./node_modules/phaser/src/gameobjects/mesh/Mesh.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar MeshRender = __webpack_require__(/*! ./MeshRender */ "./node_modules/phaser/src/gameobjects/mesh/MeshRender.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Mesh Game Object.\r\n *\r\n * @class Mesh\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Mesh = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n MeshRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Mesh (scene, x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Mesh\');\r\n\r\n if (vertices.length !== uv.length)\r\n {\r\n throw new Error(\'Mesh Vertex count must match UV count\');\r\n }\r\n\r\n var verticesUB = (vertices.length / 2) | 0;\r\n\r\n if (colors.length > 0 && colors.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Color count must match Vertex count\');\r\n }\r\n\r\n if (alphas.length > 0 && alphas.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Alpha count must match Vertex count\');\r\n }\r\n\r\n var i;\r\n\r\n if (colors.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n colors[i] = 0xFFFFFF;\r\n }\r\n }\r\n\r\n if (alphas.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n alphas[i] = 1.0;\r\n }\r\n }\r\n\r\n /**\r\n * An array containing the vertices data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#vertices\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertices = new Float32Array(vertices);\r\n\r\n /**\r\n * An array containing the uv data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#uv\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.uv = new Float32Array(uv);\r\n\r\n /**\r\n * An array containing the color data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#colors\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.colors = new Uint32Array(colors);\r\n\r\n /**\r\n * An array containing the alpha data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#alphas\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.alphas = new Float32Array(alphas);\r\n\r\n /**\r\n * Fill or additive mode used when blending the color values?\r\n * \r\n * @name Phaser.GameObjects.Mesh#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.tintFill = false;\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * This method is left intentionally empty and does not do anything.\r\n * It is retained to allow a Mesh or Quad to be added to a Container.\r\n * \r\n * @method Phaser.GameObjects.Mesh#setAlpha\r\n * @since 3.17.0\r\n */\r\n setAlpha: NOOP\r\n\r\n});\r\n\r\nmodule.exports = Mesh;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/Mesh.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Mesh.Render. There is no Canvas renderer for Mesh objects.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar MeshCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = MeshCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('mesh', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var vertices = GetValue(config, 'vertices', []);\r\n var colors = GetValue(config, 'colors', []);\r\n var alphas = GetValue(config, 'alphas', []);\r\n var uv = GetValue(config, 'uv', []);\r\n\r\n var mesh = new Mesh(this.scene, 0, 0, vertices, uv, colors, alphas, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, mesh, config);\r\n\r\n return mesh;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#mesh\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./MeshWebGLRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./MeshCanvasRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshRender.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n\r\n var vertices = src.vertices;\r\n var uvs = src.uv;\r\n var colors = src.colors;\r\n var alphas = src.alphas;\r\n\r\n var meshVerticesLength = vertices.length;\r\n var vertexCount = Math.floor(meshVerticesLength * 0.5);\r\n\r\n if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)\r\n {\r\n pipeline.flush();\r\n }\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var vertexViewF32 = pipeline.vertexViewF32;\r\n var vertexViewU32 = pipeline.vertexViewU32;\r\n\r\n var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1;\r\n\r\n var colorIndex = 0;\r\n var tintEffect = src.tintFill;\r\n\r\n for (var i = 0; i < meshVerticesLength; i += 2)\r\n {\r\n var x = vertices[i + 0];\r\n var y = vertices[i + 1];\r\n\r\n var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e;\r\n var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f;\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx = Math.round(tx);\r\n ty = Math.round(ty);\r\n }\r\n\r\n vertexViewF32[++vertexOffset] = tx;\r\n vertexViewF32[++vertexOffset] = ty;\r\n vertexViewF32[++vertexOffset] = uvs[i + 0];\r\n vertexViewF32[++vertexOffset] = uvs[i + 1];\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * alphas[colorIndex]);\r\n\r\n colorIndex++;\r\n }\r\n\r\n pipeline.vertexCount += vertexCount;\r\n};\r\n\r\nmodule.exports = MeshWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FloatBetween = __webpack_require__(/*! ../../math/FloatBetween */ \"./node_modules/phaser/src/math/FloatBetween.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ../../tweens/builders/GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter property.\r\n *\r\n * Facilitates changing Particle properties as they are emitted and throughout their lifetime.\r\n *\r\n * @class EmitterOp\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property.\r\n * @param {string} key - The name of the property.\r\n * @param {number} defaultValue - The default value of the property.\r\n * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted.\r\n */\r\nvar EmitterOp = new Class({\r\n\r\n initialize:\r\n\r\n function EmitterOp (config, key, defaultValue, emitOnly)\r\n {\r\n if (emitOnly === undefined)\r\n {\r\n emitOnly = false;\r\n }\r\n\r\n /**\r\n * The name of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.propertyKey = key;\r\n\r\n /**\r\n * The value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.propertyValue = defaultValue;\r\n\r\n /**\r\n * The default value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.defaultValue = defaultValue;\r\n\r\n /**\r\n * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#steps\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.steps = 0;\r\n\r\n /**\r\n * The step counter for stepped easing, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#counter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.counter = 0;\r\n\r\n /**\r\n * The start value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#start\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.start = 0;\r\n\r\n /**\r\n * The end value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#end\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.end = 0;\r\n\r\n /**\r\n * The easing function to use for updating this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#ease\r\n * @type {?function}\r\n * @since 3.0.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * Whether this property can only be modified when a Particle is emitted.\r\n *\r\n * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and\r\n * affect this property.\r\n *\r\n * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.emitOnly = emitOnly;\r\n\r\n /**\r\n * The callback to run for Particles when they are emitted from the Particle Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onEmit\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback}\r\n * @since 3.0.0\r\n */\r\n this.onEmit = this.defaultEmit;\r\n\r\n /**\r\n * The callback to run for Particles when they are updated.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.onUpdate = this.defaultUpdate;\r\n\r\n this.loadConfig(config);\r\n },\r\n\r\n /**\r\n * Load the property from a Particle Emitter configuration object.\r\n *\r\n * Optionally accepts a new property key to use, replacing the current one.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property.\r\n * @param {string} [newKey] - The new key to use for this property, if any.\r\n */\r\n loadConfig: function (config, newKey)\r\n {\r\n if (config === undefined)\r\n {\r\n config = {};\r\n }\r\n\r\n if (newKey)\r\n {\r\n this.propertyKey = newKey;\r\n }\r\n\r\n this.propertyValue = GetFastValue(\r\n config,\r\n this.propertyKey,\r\n this.defaultValue\r\n );\r\n\r\n this.setMethods();\r\n\r\n if (this.emitOnly)\r\n {\r\n // Reset it back again\r\n this.onUpdate = this.defaultUpdate;\r\n }\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Particle Emitter property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Particle Emitter property.\r\n */\r\n toJSON: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * Change the current value of the property and update its callback methods.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#onChange\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the property.\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n onChange: function (value)\r\n {\r\n this.propertyValue = value;\r\n\r\n return this.setMethods();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#setMethods\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n setMethods: function ()\r\n {\r\n var value = this.propertyValue;\r\n\r\n var t = typeof value;\r\n\r\n if (t === 'number')\r\n {\r\n // Explicit static value:\r\n // x: 400\r\n\r\n this.onEmit = this.staticValueEmit;\r\n this.onUpdate = this.staticValueUpdate; // How?\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n // Picks a random element from the array:\r\n // x: [ 100, 200, 300, 400 ]\r\n\r\n this.onEmit = this.randomStaticValueEmit;\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one)\r\n // Custom callback, must return a value:\r\n\r\n /*\r\n x: function (particle, key, t, value)\r\n {\r\n return value + 50;\r\n }\r\n */\r\n\r\n if (this.emitOnly)\r\n {\r\n this.onEmit = value;\r\n }\r\n else\r\n {\r\n this.onUpdate = value;\r\n }\r\n }\r\n else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max')))\r\n {\r\n this.start = this.has(value, 'start') ? value.start : value.min;\r\n this.end = this.has(value, 'end') ? value.end : value.max;\r\n\r\n var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random);\r\n\r\n // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value)\r\n\r\n // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] }\r\n\r\n if (isRandom)\r\n {\r\n var rnd = value.random;\r\n\r\n // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true }\r\n if (Array.isArray(rnd))\r\n {\r\n this.start = rnd[0];\r\n this.end = rnd[1];\r\n }\r\n\r\n this.onEmit = this.randomRangedValueEmit;\r\n }\r\n\r\n if (this.has(value, 'steps'))\r\n {\r\n // A stepped (per emit) range\r\n\r\n // x: { start: 100, end: 400, steps: 64 }\r\n\r\n // Increments a value stored in the emitter\r\n\r\n this.steps = value.steps;\r\n this.counter = this.start;\r\n\r\n this.onEmit = this.steppedEmit;\r\n }\r\n else\r\n {\r\n // An eased range (defaults to Linear if not specified)\r\n\r\n // x: { start: 100, end: 400, [ ease: 'Linear' ] }\r\n\r\n var easeType = this.has(value, 'ease') ? value.ease : 'Linear';\r\n\r\n this.ease = GetEaseFunction(easeType);\r\n\r\n if (!isRandom)\r\n {\r\n this.onEmit = this.easedValueEmit;\r\n }\r\n\r\n // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given.\r\n // Probably this branch should exclude isRandom entirely.\r\n\r\n this.onUpdate = this.easeValueUpdate;\r\n }\r\n }\r\n else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate'))\r\n {\r\n // Custom onEmit and onUpdate callbacks\r\n\r\n /*\r\n x: {\r\n // Called at the start of the particles life, when it is being created\r\n onEmit: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n // Called during the particles life on each update\r\n onUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (this.has(value, 'onEmit'))\r\n {\r\n this.onEmit = value.onEmit;\r\n }\r\n\r\n if (this.has(value, 'onUpdate'))\r\n {\r\n this.onUpdate = value.onUpdate;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether an object has the given property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#has\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key - The key of the property to look for in the object.\r\n *\r\n * @return {boolean} `true` if the property exists in the object, `false` otherwise.\r\n */\r\n has: function (object, key)\r\n {\r\n return object.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Check whether an object has both of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if both properties exist in the object, `false` otherwise.\r\n */\r\n hasBoth: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) && object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * Check whether an object has at least one of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasEither\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist.\r\n */\r\n hasEither: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) || object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * The returned value sets what the property will be at the START of the particles life, on emit.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} [value] - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultEmit: function (particle, key, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * The returned value updates the property for the duration of the particles life.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n * @param {number} value - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueEmit: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueUpdate: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a random value from the current value array.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomStaticValueEmit: function ()\r\n {\r\n var randomIndex = Math.floor(Math.random() * this.propertyValue.length);\r\n\r\n return this.propertyValue[randomIndex];\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The key of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomRangedValueEmit: function (particle, key)\r\n {\r\n var value = FloatBetween(this.start, this.end);\r\n\r\n if (particle && particle.data[key])\r\n {\r\n particle.data[key].min = value;\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a stepped value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n steppedEmit: function ()\r\n {\r\n var current = this.counter;\r\n\r\n var next = this.counter + (this.end - this.start) / this.steps;\r\n\r\n this.counter = Wrap(next, this.start, this.end);\r\n\r\n return current;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback for an eased property.\r\n *\r\n * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n *\r\n * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property.\r\n */\r\n easedValueEmit: function (particle, key)\r\n {\r\n if (particle && particle.data[key])\r\n {\r\n var data = particle.data[key];\r\n\r\n data.min = this.start;\r\n data.max = this.end;\r\n }\r\n\r\n return this.start;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns an eased value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n easeValueUpdate: function (particle, key, t)\r\n {\r\n var data = particle.data[key];\r\n\r\n return (data.max - data.min) * this.ease(t) + data.min;\r\n }\r\n});\r\n\r\nmodule.exports = EmitterOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/EmitterOp.js?")},"./node_modules/phaser/src/gameobjects/particles/GravityWell.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point.\r\n * \r\n * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity.\r\n * \r\n * This simulates the effect of gravity over large distances (as between planets, for example).\r\n *\r\n * @class GravityWell\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.GravityWellConfig)} [x=0] - The x coordinate of the Gravity Well, in world space.\r\n * @param {number} [y=0] - The y coordinate of the Gravity Well, in world space.\r\n * @param {number} [power=0] - The strength of the gravity force - larger numbers produce a stronger force.\r\n * @param {number} [epsilon=100] - The minimum distance for which the gravity force is calculated.\r\n * @param {number} [gravity=50] - The gravitational force of this Gravity Well.\r\n */\r\nvar GravityWell = new Class({\r\n\r\n initialize:\r\n\r\n function GravityWell (x, y, power, epsilon, gravity)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetFastValue(config, 'x', 0);\r\n y = GetFastValue(config, 'y', 0);\r\n power = GetFastValue(config, 'power', 0);\r\n epsilon = GetFastValue(config, 'epsilon', 100);\r\n gravity = GetFastValue(config, 'gravity', 50);\r\n }\r\n else\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (power === undefined) { power = 0; }\r\n if (epsilon === undefined) { epsilon = 100; }\r\n if (gravity === undefined) { gravity = 50; }\r\n }\r\n\r\n /**\r\n * The x coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Internal gravity value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_gravity\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._gravity = gravity;\r\n\r\n /**\r\n * Internal power value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_power\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._power = 0;\r\n\r\n /**\r\n * Internal epsilon value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_epsilon\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._epsilon = 0;\r\n\r\n /**\r\n * The strength of the gravity force - larger numbers produce a stronger force.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#power\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The minimum distance for which the gravity force is calculated.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#epsilon\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.epsilon = epsilon;\r\n },\r\n\r\n /**\r\n * Takes a Particle and updates it based on the properties of this Gravity Well.\r\n *\r\n * @method Phaser.GameObjects.Particles.GravityWell#update\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n */\r\n update: function (particle, delta)\r\n {\r\n var x = this.x - particle.x;\r\n var y = this.y - particle.y;\r\n var dSq = x * x + y * y;\r\n\r\n if (dSq === 0)\r\n {\r\n return;\r\n }\r\n\r\n var d = Math.sqrt(dSq);\r\n\r\n if (dSq < this._epsilon)\r\n {\r\n dSq = this._epsilon;\r\n }\r\n\r\n var factor = ((this._power * delta) / (dSq * d)) * 100;\r\n\r\n particle.velocityX += x * factor;\r\n particle.velocityY += y * factor;\r\n },\r\n\r\n epsilon: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt(this._epsilon);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._epsilon = value * value;\r\n }\r\n\r\n },\r\n\r\n power: {\r\n\r\n get: function ()\r\n {\r\n return this._power / this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._power = value * this._gravity;\r\n }\r\n\r\n },\r\n\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var pwr = this.power;\r\n this._gravity = value;\r\n this.power = pwr;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GravityWell;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/GravityWell.js?")},"./node_modules/phaser/src/gameobjects/particles/Particle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager.\r\n * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones.\r\n *\r\n * @class Particle\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to which this Particle belongs.\r\n */\r\nvar Particle = new Class({\r\n\r\n initialize:\r\n\r\n function Particle (emitter)\r\n {\r\n /**\r\n * The Emitter to which this Particle belongs.\r\n *\r\n * A Particle can only belong to a single Emitter and is created, updated and destroyed via it.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#emitter\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitter}\r\n * @since 3.0.0\r\n */\r\n this.emitter = emitter;\r\n\r\n /**\r\n * The texture frame used to render this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * The x coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The x velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityX = 0;\r\n\r\n /**\r\n * The y velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityY = 0;\r\n\r\n /**\r\n * The x acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = 0;\r\n\r\n /**\r\n * The y acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = 0;\r\n\r\n /**\r\n * The maximum horizontal velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityX\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = 10000;\r\n\r\n /**\r\n * The maximum vertical velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityY\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = 10000;\r\n\r\n /**\r\n * The bounciness, or restitution, of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#bounce\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = 0;\r\n\r\n /**\r\n * The horizontal scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleX = 1;\r\n\r\n /**\r\n * The vertical scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleY = 1;\r\n\r\n /**\r\n * The alpha value of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * The angle of this Particle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The angle of this Particle in radians.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#rotation\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * The tint applied to this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * The lifespan of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#life\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.life = 1000;\r\n\r\n /**\r\n * The current life of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeCurrent\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.lifeCurrent = 1000;\r\n\r\n /**\r\n * The delay applied to this Particle upon emission, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#delayCurrent\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delayCurrent = 0;\r\n\r\n /**\r\n * The normalized lifespan T value, where 0 is the start and 1 is the end.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeT\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lifeT = 0;\r\n\r\n /**\r\n * The data used by the ease equation.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#data\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff },\r\n alpha: { min: 1, max: 1 },\r\n rotate: { min: 0, max: 0 },\r\n scaleX: { min: 1, max: 1 },\r\n scaleY: { min: 1, max: 1 }\r\n };\r\n },\r\n\r\n /**\r\n * Checks to see if this Particle is alive and updating.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#isAlive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Particle is alive and updating, otherwise `false`.\r\n */\r\n isAlive: function ()\r\n {\r\n return (this.lifeCurrent > 0);\r\n },\r\n\r\n /**\r\n * Resets the position of this particle back to zero.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#resetPosition\r\n * @since 3.16.0\r\n */\r\n resetPosition: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n },\r\n\r\n /**\r\n * Starts this Particle from the given coordinates.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#fire\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to launch this Particle from.\r\n * @param {number} y - The y coordinate to launch this Particle from.\r\n */\r\n fire: function (x, y)\r\n {\r\n var emitter = this.emitter;\r\n\r\n this.frame = emitter.getFrame();\r\n\r\n if (emitter.emitZone)\r\n {\r\n // Updates particle.x and particle.y during this call\r\n emitter.emitZone.getPoint(this);\r\n }\r\n\r\n if (x === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.x += emitter.follow.x + emitter.followOffset.x;\r\n }\r\n\r\n this.x += emitter.x.onEmit(this, 'x');\r\n }\r\n else\r\n {\r\n this.x += x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.y += emitter.follow.y + emitter.followOffset.y;\r\n }\r\n\r\n this.y += emitter.y.onEmit(this, 'y');\r\n }\r\n else\r\n {\r\n this.y += y;\r\n }\r\n\r\n this.life = emitter.lifespan.onEmit(this, 'lifespan');\r\n this.lifeCurrent = this.life;\r\n this.lifeT = 0;\r\n\r\n var sx = emitter.speedX.onEmit(this, 'speedX');\r\n var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx;\r\n\r\n if (emitter.radial)\r\n {\r\n var rad = DegToRad(emitter.angle.onEmit(this, 'angle'));\r\n\r\n this.velocityX = Math.cos(rad) * Math.abs(sx);\r\n this.velocityY = Math.sin(rad) * Math.abs(sy);\r\n }\r\n else if (emitter.moveTo)\r\n {\r\n var mx = emitter.moveToX.onEmit(this, 'moveToX');\r\n var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx;\r\n\r\n var angle = Math.atan2(my - this.y, mx - this.x);\r\n\r\n var speed = DistanceBetween(this.x, this.y, mx, my) / (this.life / 1000);\r\n\r\n // We know how many pixels we need to move, but how fast?\r\n // var speed = this.distanceToXY(displayObject, x, y) / (maxTime / 1000);\r\n\r\n this.velocityX = Math.cos(angle) * speed;\r\n this.velocityY = Math.sin(angle) * speed;\r\n }\r\n else\r\n {\r\n this.velocityX = sx;\r\n this.velocityY = sy;\r\n }\r\n\r\n if (emitter.acceleration)\r\n {\r\n this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX');\r\n this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY');\r\n }\r\n\r\n this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX');\r\n this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY');\r\n\r\n this.delayCurrent = emitter.delay.onEmit(this, 'delay');\r\n\r\n this.scaleX = emitter.scaleX.onEmit(this, 'scaleX');\r\n this.scaleY = (emitter.scaleY) ? emitter.scaleY.onEmit(this, 'scaleY') : this.scaleX;\r\n\r\n this.angle = emitter.rotate.onEmit(this, 'rotate');\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.bounce = emitter.bounce.onEmit(this, 'bounce');\r\n\r\n this.alpha = emitter.alpha.onEmit(this, 'alpha');\r\n\r\n this.tint = emitter.tint.onEmit(this, 'tint');\r\n },\r\n\r\n /**\r\n * An internal method that calculates the velocity of the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - Particle processors (gravity wells).\r\n */\r\n computeVelocity: function (emitter, delta, step, processors)\r\n {\r\n var vx = this.velocityX;\r\n var vy = this.velocityY;\r\n\r\n var ax = this.accelerationX;\r\n var ay = this.accelerationY;\r\n\r\n var mx = this.maxVelocityX;\r\n var my = this.maxVelocityY;\r\n\r\n vx += (emitter.gravityX * step);\r\n vy += (emitter.gravityY * step);\r\n\r\n if (ax)\r\n {\r\n vx += (ax * step);\r\n }\r\n\r\n if (ay)\r\n {\r\n vy += (ay * step);\r\n }\r\n\r\n if (vx > mx)\r\n {\r\n vx = mx;\r\n }\r\n else if (vx < -mx)\r\n {\r\n vx = -mx;\r\n }\r\n\r\n if (vy > my)\r\n {\r\n vy = my;\r\n }\r\n else if (vy < -my)\r\n {\r\n vy = -my;\r\n }\r\n\r\n this.velocityX = vx;\r\n this.velocityY = vy;\r\n\r\n // Apply any additional processors\r\n for (var i = 0; i < processors.length; i++)\r\n {\r\n processors[i].update(this, delta, step);\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this Particle is still within the bounds defined by the given Emitter.\r\n *\r\n * If not, and depending on the Emitter collision flags, the Particle may either stop or rebound.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#checkBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to check the bounds against.\r\n */\r\n checkBounds: function (emitter)\r\n {\r\n var bounds = emitter.bounds;\r\n var bounce = -this.bounce;\r\n\r\n if (this.x < bounds.x && emitter.collideLeft)\r\n {\r\n this.x = bounds.x;\r\n this.velocityX *= bounce;\r\n }\r\n else if (this.x > bounds.right && emitter.collideRight)\r\n {\r\n this.x = bounds.right;\r\n this.velocityX *= bounce;\r\n }\r\n\r\n if (this.y < bounds.y && emitter.collideTop)\r\n {\r\n this.y = bounds.y;\r\n this.velocityY *= bounce;\r\n }\r\n else if (this.y > bounds.bottom && emitter.collideBottom)\r\n {\r\n this.y = bounds.bottom;\r\n this.velocityY *= bounce;\r\n }\r\n },\r\n\r\n /**\r\n * The main update method for this Particle.\r\n *\r\n * Updates its life values, computes the velocity and repositions the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - An optional array of update processors.\r\n *\r\n * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active.\r\n */\r\n update: function (delta, step, processors)\r\n {\r\n if (this.delayCurrent > 0)\r\n {\r\n this.delayCurrent -= delta;\r\n\r\n return false;\r\n }\r\n\r\n var emitter = this.emitter;\r\n\r\n // How far along in life is this particle? (t = 0 to 1)\r\n var t = 1 - (this.lifeCurrent / this.life);\r\n\r\n this.lifeT = t;\r\n\r\n this.computeVelocity(emitter, delta, step, processors);\r\n\r\n this.x += this.velocityX * step;\r\n this.y += this.velocityY * step;\r\n\r\n if (emitter.bounds)\r\n {\r\n this.checkBounds(emitter);\r\n }\r\n\r\n if (emitter.deathZone && emitter.deathZone.willKill(this))\r\n {\r\n this.lifeCurrent = 0;\r\n\r\n // No need to go any further, particle has been killed\r\n return true;\r\n }\r\n\r\n this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX);\r\n\r\n if (emitter.scaleY)\r\n {\r\n this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY);\r\n }\r\n else\r\n {\r\n this.scaleY = this.scaleX;\r\n }\r\n\r\n this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle);\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha);\r\n\r\n this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint);\r\n\r\n this.lifeCurrent -= delta;\r\n\r\n return (this.lifeCurrent <= 0);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Particle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/Particle.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DeathZone = __webpack_require__(/*! ./zones/DeathZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js\");\r\nvar EdgeZone = __webpack_require__(/*! ./zones/EdgeZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js\");\r\nvar EmitterOp = __webpack_require__(/*! ./EmitterOp */ \"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ \"./node_modules/phaser/src/utils/array/GetRandom.js\");\r\nvar HasAny = __webpack_require__(/*! ../../utils/object/HasAny */ \"./node_modules/phaser/src/utils/object/HasAny.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Particle = __webpack_require__(/*! ./Particle */ \"./node_modules/phaser/src/gameobjects/particles/Particle.js\");\r\nvar RandomZone = __webpack_require__(/*! ./zones/RandomZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar StableSort = __webpack_require__(/*! ../../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A particle emitter represents a single particle stream.\r\n * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}.\r\n *\r\n * @class ParticleEmitter\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n */\r\nvar ParticleEmitter = new Class({\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Mask,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function ParticleEmitter (manager, config)\r\n {\r\n /**\r\n * The Emitter Manager this Emitter belongs to.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#manager\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitterManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The texture assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = manager.texture;\r\n\r\n /**\r\n * The texture frames assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frames\r\n * @type {Phaser.Textures.Frame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = [ manager.defaultFrame ];\r\n\r\n /**\r\n * The default texture frame assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = manager.defaultFrame;\r\n\r\n /**\r\n * Names of simple configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configFastMap = [\r\n 'active',\r\n 'blendMode',\r\n 'collideBottom',\r\n 'collideLeft',\r\n 'collideRight',\r\n 'collideTop',\r\n 'deathCallback',\r\n 'deathCallbackScope',\r\n 'emitCallback',\r\n 'emitCallbackScope',\r\n 'follow',\r\n 'frequency',\r\n 'gravityX',\r\n 'gravityY',\r\n 'maxParticles',\r\n 'name',\r\n 'on',\r\n 'particleBringToTop',\r\n 'particleClass',\r\n 'radial',\r\n 'timeScale',\r\n 'trackVisible',\r\n 'visible'\r\n ];\r\n\r\n /**\r\n * Names of complex configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configOpMap = [\r\n 'accelerationX',\r\n 'accelerationY',\r\n 'angle',\r\n 'alpha',\r\n 'bounce',\r\n 'delay',\r\n 'lifespan',\r\n 'maxVelocityX',\r\n 'maxVelocityY',\r\n 'moveToX',\r\n 'moveToY',\r\n 'quantity',\r\n 'rotate',\r\n 'scaleX',\r\n 'scaleY',\r\n 'speedX',\r\n 'speedY',\r\n 'tint',\r\n 'x',\r\n 'y'\r\n ];\r\n\r\n /**\r\n * The name of this Particle Emitter.\r\n *\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The Particle Class which will be emitted by this Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass\r\n * @type {Phaser.GameObjects.Particles.Particle}\r\n * @default Phaser.GameObjects.Particles.Particle\r\n * @since 3.0.0\r\n */\r\n this.particleClass = Particle;\r\n\r\n /**\r\n * The x-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#x\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.x = new EmitterOp(config, 'x', 0, true);\r\n\r\n /**\r\n * The y-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#y\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.y = new EmitterOp(config, 'y', 0, true);\r\n\r\n /**\r\n * A radial emitter will emit particles in all directions between angle min and max,\r\n * using {@link Phaser.GameObjects.Particles.ParticleEmitter#speed} as the value. If set to false then this acts as a point Emitter.\r\n * A point emitter will emit particles only in the direction derived from the speedX and speedY values.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#radial\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n */\r\n this.radial = true;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityX = 0;\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityY = 0;\r\n\r\n /**\r\n * Whether accelerationX and accelerationY are non-zero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#acceleration\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.acceleration = false;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true);\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true);\r\n\r\n /**\r\n * The maximum horizontal velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true);\r\n\r\n /**\r\n * The maximum vertical velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true);\r\n\r\n /**\r\n * The initial horizontal speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n */\r\n this.speedX = new EmitterOp(config, 'speedX', 0, true);\r\n\r\n /**\r\n * The initial vertical speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n */\r\n this.speedY = new EmitterOp(config, 'speedY', 0, true);\r\n\r\n /**\r\n * Whether moveToX and moveToY are nonzero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveTo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.moveTo = false;\r\n\r\n /**\r\n * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToX = new EmitterOp(config, 'moveToX', 0, true);\r\n\r\n /**\r\n * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToY = new EmitterOp(config, 'moveToY', 0, true);\r\n\r\n /**\r\n * Whether particles will rebound when they meet the emitter bounds.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = new EmitterOp(config, 'bounce', 0, true);\r\n\r\n /**\r\n * The horizontal scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n */\r\n this.scaleX = new EmitterOp(config, 'scaleX', 1);\r\n\r\n /**\r\n * The vertical scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n */\r\n this.scaleY = new EmitterOp(config, 'scaleY', 1);\r\n\r\n /**\r\n * Color tint applied to emitted particles. Any alpha component (0xAA000000) is ignored.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#tint\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0xffffffff\r\n * @since 3.0.0\r\n */\r\n this.tint = new EmitterOp(config, 'tint', 0xffffffff);\r\n\r\n /**\r\n * The alpha (transparency) of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n */\r\n this.alpha = new EmitterOp(config, 'alpha', 1);\r\n\r\n /**\r\n * The lifespan of emitted particles, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1000\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n */\r\n this.lifespan = new EmitterOp(config, 'lifespan', 1000, true);\r\n\r\n /**\r\n * The angle of the initial velocity of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#angle\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default { min: 0, max: 360 }\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n */\r\n this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true);\r\n\r\n /**\r\n * The rotation of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotate = new EmitterOp(config, 'rotate', 0);\r\n\r\n /**\r\n * A function to call when a particle is emitted.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleEmitterCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallbackScope = null;\r\n\r\n /**\r\n * A function to call when a particle dies.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleDeathCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallbackScope = null;\r\n\r\n /**\r\n * Set to hard limit the amount of particle objects this emitter is allowed to create.\r\n * 0 means unlimited.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxParticles = 0;\r\n\r\n /**\r\n * How many particles are emitted each time particles are emitted (one explosion or one flow cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n */\r\n this.quantity = new EmitterOp(config, 'quantity', 1, true);\r\n\r\n /**\r\n * How many ms to wait after emission before the particles start updating.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#delay\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = new EmitterOp(config, 'delay', 0, true);\r\n\r\n /**\r\n * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms.\r\n * A value of 0 means there is one particle flow cycle for each logic update (the maximum flow frequency). This is the default setting.\r\n * For an exploding emitter, this value will be -1.\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} also puts the emitter in flow mode (frequency >= 0).\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} also puts the emitter in explode mode (frequency = -1).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frequency\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n */\r\n this.frequency = 0;\r\n\r\n /**\r\n * Controls if the emitter is currently emitting a particle flow (when frequency >= 0).\r\n * Already alive particles will continue to update until they expire.\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#on\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.on = true;\r\n\r\n /**\r\n * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive.\r\n * Set to false to send them to the back.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.particleBringToTop = true;\r\n\r\n /**\r\n * The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An object describing a shape to emit particles from.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n */\r\n this.emitZone = null;\r\n\r\n /**\r\n * An object describing a shape that deactivates particles when they interact with it.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.DeathZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n */\r\n this.deathZone = null;\r\n\r\n /**\r\n * A rectangular boundary constraining particle movement.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * Whether particles interact with the left edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = true;\r\n\r\n /**\r\n * Whether particles interact with the right edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideRight = true;\r\n\r\n /**\r\n * Whether particles interact with the top edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideTop = true;\r\n\r\n /**\r\n * Whether particles interact with the bottom edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideBottom\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideBottom = true;\r\n\r\n /**\r\n * Whether this emitter updates itself and its particles.\r\n *\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Set this to false to hide any active particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible\r\n */\r\n this.visible = true;\r\n\r\n /**\r\n * The blend mode of this emitter's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n /**\r\n * A Game Object whose position is used as the particle origin.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#follow\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n */\r\n this.follow = null;\r\n\r\n /**\r\n * The offset of the particle origin from the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * Whether the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#visible} state will track\r\n * the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target's visibility state.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#trackVisible\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.trackVisible = false;\r\n\r\n /**\r\n * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.currentFrame = 0;\r\n\r\n /**\r\n * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#randomFrame\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.randomFrame = true;\r\n\r\n /**\r\n * The number of consecutive particles that receive a single texture frame (per frame cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.frameQuantity = 1;\r\n\r\n /**\r\n * Inactive particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#dead\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dead = [];\r\n\r\n /**\r\n * Active particles\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alive\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.alive = [];\r\n\r\n /**\r\n * The time until the next flow cycle.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._counter = 0;\r\n\r\n /**\r\n * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._frameCounter = 0;\r\n\r\n if (config)\r\n {\r\n this.fromJSON(config);\r\n }\r\n },\r\n\r\n /**\r\n * Merges configuration settings into the emitter's current settings.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n // Only update properties from their current state if they exist in the given config\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key] = GetFastValue(config, key);\r\n }\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key].loadConfig(config);\r\n }\r\n }\r\n\r\n this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0);\r\n\r\n this.moveTo = (this.moveToX.propertyValue !== 0 || this.moveToY.propertyValue !== 0);\r\n\r\n // Special 'speed' override\r\n\r\n if (HasValue(config, 'speed'))\r\n {\r\n this.speedX.loadConfig(config, 'speed');\r\n this.speedY = null;\r\n }\r\n\r\n // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter\r\n if (HasAny(config, [ 'speedX', 'speedY' ]) || this.moveTo)\r\n {\r\n this.radial = false;\r\n }\r\n\r\n // Special 'scale' override\r\n\r\n if (HasValue(config, 'scale'))\r\n {\r\n this.scaleX.loadConfig(config, 'scale');\r\n this.scaleY = null;\r\n }\r\n\r\n if (HasValue(config, 'callbackScope'))\r\n {\r\n var callbackScope = GetFastValue(config, 'callbackScope', null);\r\n\r\n this.emitCallbackScope = callbackScope;\r\n this.deathCallbackScope = callbackScope;\r\n }\r\n\r\n if (HasValue(config, 'emitZone'))\r\n {\r\n this.setEmitZone(config.emitZone);\r\n }\r\n\r\n if (HasValue(config, 'deathZone'))\r\n {\r\n this.setDeathZone(config.deathZone);\r\n }\r\n\r\n if (HasValue(config, 'bounds'))\r\n {\r\n this.setBounds(config.bounds);\r\n }\r\n\r\n if (HasValue(config, 'followOffset'))\r\n {\r\n this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0));\r\n }\r\n\r\n if (HasValue(config, 'frame'))\r\n {\r\n this.setFrame(config.frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a description of this emitter suitable for JSON serialization.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {object} [output] - An object to copy output into.\r\n *\r\n * @return {object} - The output object.\r\n */\r\n toJSON: function (output)\r\n {\r\n if (output === undefined) { output = {}; }\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n output[key] = this[key];\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (this[key])\r\n {\r\n output[key] = this[key].toJSON();\r\n }\r\n }\r\n\r\n // special handlers\r\n if (!this.speedY)\r\n {\r\n delete output.speedX;\r\n output.speed = this.speedX.toJSON();\r\n }\r\n\r\n if (!this.scaleY)\r\n {\r\n delete output.scaleX;\r\n output.scale = this.scaleX.toJSON();\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Continuously moves the particle origin to follow a Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} target - The Game Object to follow.\r\n * @param {number} [offsetX=0] - Horizontal offset of the particle origin from the Game Object.\r\n * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object.\r\n * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n startFollow: function (target, offsetX, offsetY, trackVisible)\r\n {\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n if (trackVisible === undefined) { trackVisible = false; }\r\n\r\n this.follow = target;\r\n this.followOffset.set(offsetX, offsetY);\r\n this.trackVisible = trackVisible;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops following a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stopFollow: function ()\r\n {\r\n this.follow = null;\r\n this.followOffset.set(0, 0);\r\n this.trackVisible = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Chooses a texture frame from {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getFrame\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} The texture frame.\r\n */\r\n getFrame: function ()\r\n {\r\n if (this.frames.length === 1)\r\n {\r\n return this.defaultFrame;\r\n }\r\n else if (this.randomFrame)\r\n {\r\n return GetRandom(this.frames);\r\n }\r\n else\r\n {\r\n var frame = this.frames[this.currentFrame];\r\n\r\n this._frameCounter++;\r\n\r\n if (this._frameCounter === this.frameQuantity)\r\n {\r\n this._frameCounter = 0;\r\n this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength);\r\n }\r\n\r\n return frame;\r\n }\r\n },\r\n\r\n // frame: 0\r\n // frame: 'red'\r\n // frame: [ 0, 1, 2, 3 ]\r\n // frame: [ 'red', 'green', 'blue', 'pink', 'white' ]\r\n // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] }\r\n\r\n /**\r\n * Sets a pattern for assigning texture frames to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(array|string|integer|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object.\r\n * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`.\r\n * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrame: function (frames, pickRandom, quantity)\r\n {\r\n if (pickRandom === undefined) { pickRandom = true; }\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n this.randomFrame = pickRandom;\r\n this.frameQuantity = quantity;\r\n this.currentFrame = 0;\r\n this._frameCounter = 0;\r\n\r\n var t = typeof (frames);\r\n\r\n if (Array.isArray(frames) || t === 'string' || t === 'number')\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n else if (t === 'object')\r\n {\r\n var frameConfig = frames;\r\n\r\n frames = GetFastValue(frameConfig, 'frames', null);\r\n\r\n if (frames)\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n\r\n var isCycle = GetFastValue(frameConfig, 'cycle', false);\r\n\r\n this.randomFrame = (isCycle) ? false : true;\r\n\r\n this.frameQuantity = GetFastValue(frameConfig, 'quantity', quantity);\r\n }\r\n\r\n this._frameLength = this.frames.length;\r\n\r\n if (this._frameLength === 1)\r\n {\r\n this.frameQuantity = 1;\r\n this.randomFrame = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Radial mode (true) or point mode (true).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setRadial: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.radial = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of the emitter's particle origin.\r\n * New particles will be emitted here.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x.onChange(x);\r\n this.y.onChange(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or modifies a rectangular boundary constraining the particles.\r\n *\r\n * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle.\r\n * @param {number} y - The y-coordinate of the top edge of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setBounds: function (x, y, width, height)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var obj = x;\r\n\r\n x = obj.x;\r\n y = obj.y;\r\n width = (HasValue(obj, 'w')) ? obj.w : obj.width;\r\n height = (HasValue(obj, 'h')) ? obj.h : obj.height;\r\n }\r\n\r\n if (this.bounds)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.bounds = new Rectangle(x, y, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial horizontal speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedX: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial vertical speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedY: function (value)\r\n {\r\n if (this.speedY)\r\n {\r\n this.speedY.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial radial speed of emitted particles.\r\n * Changes the emitter to radial mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeed: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n this.speedY = null;\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleX: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleY: function (value)\r\n {\r\n this.scaleY.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScale: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n this.scaleY = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravityX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravityY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared.\r\n * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravityX = x;\r\n this.gravityY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the opacity of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitterAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the lifespan of newly emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setLifespan: function (value)\r\n {\r\n this.lifespan.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of particles released at each flow cycle or explosion.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setQuantity: function (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrequency: function (frequency, quantity)\r\n {\r\n this.frequency = frequency;\r\n\r\n this._counter = 0;\r\n\r\n if (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}.\r\n *\r\n * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method.\r\n *\r\n * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.emitZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle, or a Path or Curve\r\n // emitZone: { type: 'random', source: X }\r\n // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'random');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n switch (type)\r\n {\r\n case 'random':\r\n\r\n this.emitZone = new RandomZone(source);\r\n\r\n break;\r\n\r\n case 'edge':\r\n\r\n var quantity = GetFastValue(zoneConfig, 'quantity', 1);\r\n var stepRate = GetFastValue(zoneConfig, 'stepRate', 0);\r\n var yoyo = GetFastValue(zoneConfig, 'yoyo', false);\r\n var seamless = GetFastValue(zoneConfig, 'seamless', true);\r\n\r\n this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setDeathZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.deathZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle or Rect that supports a 'contains' function\r\n // deathZone: { type: 'onEnter', source: X }\r\n // deathZone: { type: 'onLeave', source: X }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'onEnter');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n if (source && typeof source.contains === 'function')\r\n {\r\n var killOnEnter = (type === 'onEnter') ? true : false;\r\n\r\n this.deathZone = new DeathZone(source, killOnEnter);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates inactive particles and adds them to this emitter's pool.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve\r\n * @since 3.0.0\r\n *\r\n * @param {integer} particleCount - The number of particles to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n reserve: function (particleCount)\r\n {\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n dead.push(new this.particleClass(this));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the number of active (in-use) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getAliveParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=true`.\r\n */\r\n getAliveParticleCount: function ()\r\n {\r\n return this.alive.length;\r\n },\r\n\r\n /**\r\n * Gets the number of inactive (available) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeadParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=false`.\r\n */\r\n getDeadParticleCount: function ()\r\n {\r\n return this.dead.length;\r\n },\r\n\r\n /**\r\n * Gets the total number of particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles, including both alive and dead.\r\n */\r\n getParticleCount: function ()\r\n {\r\n return this.getAliveParticleCount() + this.getDeadParticleCount();\r\n },\r\n\r\n /**\r\n * Whether this emitter is at its limit (if set).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#atLimit\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Emitter is at its limit, or `false` if no limit, or below the `maxParticles` level.\r\n */\r\n atLimit: function ()\r\n {\r\n return (this.maxParticles > 0 && this.getParticleCount() === this.maxParticles);\r\n },\r\n\r\n /**\r\n * Sets a function to call for each newly emitted particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} [context] - The calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleEmit: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.emitCallback = null;\r\n this.emitCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.emitCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.emitCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a function to call for each particle death.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleDeath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function.\r\n * @param {*} [context] - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleDeath: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.deathCallback = null;\r\n this.deathCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.deathCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.deathCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates every particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n killAll: function ()\r\n {\r\n var dead = this.dead;\r\n var alive = this.alive;\r\n\r\n while (alive.length > 0)\r\n {\r\n dead.push(alive.pop());\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each active particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachAlive: function (callback, context)\r\n {\r\n var alive = this.alive;\r\n var length = alive.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, alive[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each inactive particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachDead\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachDead: function (callback, context)\r\n {\r\n var dead = this.dead;\r\n var length = dead.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, dead[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on} the emitter and resets the flow counter.\r\n *\r\n * If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart).\r\n *\r\n * If this emitter is in explode mode (frequency = -1), nothing will happen.\r\n * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n start: function ()\r\n {\r\n this.on = true;\r\n\r\n this._counter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stop\r\n * @since 3.11.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stop: function ()\r\n {\r\n this.on = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Activates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n depthSort: function ()\r\n {\r\n StableSort.inplace(this.alive, this.depthSortCallback);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow.\r\n *\r\n * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#flow\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n flow: function (frequency, count)\r\n {\r\n if (count === undefined) { count = 1; }\r\n\r\n this.frequency = frequency;\r\n\r\n this.quantity.onChange(count);\r\n\r\n return this.start();\r\n },\r\n\r\n /**\r\n * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#explode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} count - The amount of Particles to emit.\r\n * @param {number} x - The x coordinate to emit the Particles from.\r\n * @param {number} y - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n explode: function (count, x, y)\r\n {\r\n this.frequency = -1;\r\n\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n *\r\n * @see Phaser.GameObjects.Particles.Particle#fire\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n if (this.atLimit())\r\n {\r\n return;\r\n }\r\n\r\n if (count === undefined)\r\n {\r\n count = this.quantity.onEmit();\r\n }\r\n\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < count; i++)\r\n {\r\n var particle = dead.pop();\r\n\r\n if (!particle)\r\n {\r\n particle = new this.particleClass(this);\r\n }\r\n\r\n particle.fire(x, y);\r\n\r\n if (this.particleBringToTop)\r\n {\r\n this.alive.push(particle);\r\n }\r\n else\r\n {\r\n this.alive.unshift(particle);\r\n }\r\n\r\n if (this.emitCallback)\r\n {\r\n this.emitCallback.call(this.emitCallbackScope, particle, this);\r\n }\r\n\r\n if (this.atLimit())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return particle;\r\n },\r\n\r\n /**\r\n * Updates this emitter and its particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var step = (delta / 1000);\r\n\r\n if (this.trackVisible)\r\n {\r\n this.visible = this.follow.visible;\r\n }\r\n\r\n // Any particle processors?\r\n var processors = this.manager.getProcessors();\r\n\r\n var particles = this.alive;\r\n var dead = this.dead;\r\n\r\n var i = 0;\r\n var rip = [];\r\n var length = particles.length;\r\n\r\n for (i = 0; i < length; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n // update returns `true` if the particle is now dead (lifeCurrent <= 0)\r\n if (particle.update(delta, step, processors))\r\n {\r\n rip.push({ index: i, particle: particle });\r\n }\r\n }\r\n\r\n // Move dead particles to the dead array\r\n length = rip.length;\r\n\r\n if (length > 0)\r\n {\r\n var deathCallback = this.deathCallback;\r\n var deathCallbackScope = this.deathCallbackScope;\r\n\r\n for (i = length - 1; i >= 0; i--)\r\n {\r\n var entry = rip[i];\r\n\r\n // Remove from particles array\r\n particles.splice(entry.index, 1);\r\n\r\n // Add to dead array\r\n dead.push(entry.particle);\r\n\r\n // Callback\r\n if (deathCallback)\r\n {\r\n deathCallback.call(deathCallbackScope, entry.particle);\r\n }\r\n\r\n entry.particle.resetPosition();\r\n }\r\n }\r\n\r\n if (!this.on)\r\n {\r\n return;\r\n }\r\n\r\n if (this.frequency === 0)\r\n {\r\n this.emitParticle();\r\n }\r\n else if (this.frequency > 0)\r\n {\r\n this._counter -= delta;\r\n\r\n if (this._counter <= 0)\r\n {\r\n this.emitParticle();\r\n\r\n // counter = frequency - remained from previous delta\r\n this._counter = (this.frequency - Math.abs(this._counter));\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the difference of two particles, for sorting them by depth.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback\r\n * @since 3.0.0\r\n *\r\n * @param {object} a - The first particle.\r\n * @param {object} b - The second particle.\r\n *\r\n * @return {integer} The difference of a and b's y coordinates.\r\n */\r\n depthSortCallback: function (a, b)\r\n {\r\n return a.y - b.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GravityWell = __webpack_require__(/*! ./GravityWell */ \"./node_modules/phaser/src/gameobjects/particles/GravityWell.js\");\r\nvar List = __webpack_require__(/*! ../../structs/List */ \"./node_modules/phaser/src/structs/List.js\");\r\nvar ParticleEmitter = __webpack_require__(/*! ./ParticleEmitter */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js\");\r\nvar Render = __webpack_require__(/*! ./ParticleManagerRender */ \"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}.\r\n *\r\n * @class ParticleEmitterManager\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs.\r\n * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n */\r\nvar ParticleEmitterManager = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n function ParticleEmitterManager (scene, texture, frame, emitters)\r\n {\r\n GameObject.call(this, scene, 'ParticleEmitterManager');\r\n\r\n /**\r\n * The blend mode applied to all emitters and particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode\r\n * @type {integer}\r\n * @default -1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement.\r\n * Values larger than 1 are faster than normal.\r\n * This is multiplied with any timeScale set on each individual emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The texture used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The texture frame used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Names of this Emitter Manager's texture frames.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames\r\n * @type {string[]}\r\n * @since 3.0.0\r\n */\r\n this.frameNames = [];\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n if (frame !== null && (typeof frame === 'object' || Array.isArray(frame)))\r\n {\r\n emitters = frame;\r\n frame = null;\r\n }\r\n\r\n this.setTexture(texture, frame);\r\n\r\n this.initPipeline();\r\n\r\n /**\r\n * A list of Emitters being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.emitters = new List(this);\r\n\r\n /**\r\n * A list of Gravity Wells being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.wells = new List(this);\r\n\r\n if (emitters)\r\n {\r\n // An array of emitter configs?\r\n if (!Array.isArray(emitters))\r\n {\r\n emitters = [ emitters ];\r\n }\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n this.createEmitter(emitters[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Emitter Manager will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Emitter Manager will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex);\r\n\r\n var names = [];\r\n\r\n frames.forEach(function (sourceFrame)\r\n {\r\n names.push(sourceFrame.name);\r\n });\r\n\r\n this.frameNames = names;\r\n\r\n this.defaultFrame = this.frame;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns texture frames to an emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setEmitterFrames: function (frames, emitter)\r\n {\r\n if (!Array.isArray(frames))\r\n {\r\n frames = [ frames ];\r\n }\r\n\r\n var out = emitter.frames;\r\n\r\n out.length = 0;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i];\r\n\r\n if (this.frameNames.indexOf(frame) !== -1)\r\n {\r\n out.push(this.texture.get(frame));\r\n }\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n emitter.defaultFrame = out[0];\r\n }\r\n else\r\n {\r\n emitter.defaultFrame = this.defaultFrame;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an existing Particle Emitter to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager.\r\n */\r\n addEmitter: function (emitter)\r\n {\r\n return this.emitters.add(emitter);\r\n },\r\n\r\n /**\r\n * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created.\r\n */\r\n createEmitter: function (config)\r\n {\r\n return this.addEmitter(new ParticleEmitter(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Gravity Well object to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager.\r\n */\r\n addGravityWell: function (well)\r\n {\r\n return this.wells.add(well);\r\n },\r\n\r\n /**\r\n * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created.\r\n */\r\n createGravityWell: function (config)\r\n {\r\n return this.addGravityWell(new GravityWell(config));\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.emitParticle(count, x, y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Pauses this Emitter Manager.\r\n *\r\n * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control.\r\n *\r\n * The particles will still render, but they will not have any of their logic updated.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes this Emitter Manager, should it have been previously paused.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all active particle processors (gravity wells).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells.\r\n */\r\n getProcessors: function ()\r\n {\r\n return this.wells.getAll('active', true);\r\n },\r\n\r\n /**\r\n * Updates all active emitters.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.preUpdate(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setScrollFactor: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode\r\n * @private\r\n * @since 3.15.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitterManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = renderer._tempMatrix2;\r\n var particleMatrix = renderer._tempMatrix3;\r\n var managerMatrix = renderer._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n ctx.save();\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode];\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n var cd = frame.canvasData;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n ctx.globalAlpha = alpha;\r\n \r\n ctx.save();\r\n\r\n calcMatrix.copyToContext(ctx);\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n\r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = ParticleManagerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#particles\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('particles', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var emitters = GetFastValue(config, 'emitters', null);\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var add = GetFastValue(config, 'add', false);\r\n\r\n if (add)\r\n {\r\n this.displayList.add(manager);\r\n }\r\n\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#particles\r\n * @since 3.0.0\r\n *\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer|object)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('particles', function (key, frame, emitters)\r\n{\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n this.displayList.add(manager);\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ParticleManagerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ParticleManagerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js?')},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = pipeline._tempMatrix2;\r\n var particleMatrix = pipeline._tempMatrix3;\r\n var managerMatrix = pipeline._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n var roundPixels = camera.roundPixels;\r\n var texture = emitterManager.defaultFrame.glTexture;\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n if (renderer.setBlendMode(emitter.blendMode))\r\n {\r\n // Rebind the texture if we\'ve flushed\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.preRenderWebGL(renderer, emitter, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n \r\n var tintEffect = 0;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n \r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n \r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n \r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n \r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n \r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n \r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var tint = getTint(particle.tint, alpha);\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.postRenderWebGL(renderer, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ParticleManagerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GravityWell: __webpack_require__(/*! ./GravityWell */ "./node_modules/phaser/src/gameobjects/particles/GravityWell.js"),\r\n Particle: __webpack_require__(/*! ./Particle */ "./node_modules/phaser/src/gameobjects/particles/Particle.js"),\r\n ParticleEmitter: __webpack_require__(/*! ./ParticleEmitter */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js"),\r\n ParticleEmitterManager: __webpack_require__(/*! ./ParticleEmitterManager */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js"),\r\n Zones: __webpack_require__(/*! ./zones */ "./node_modules/phaser/src/gameobjects/particles/zones/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/index.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Death Zone.\r\n *\r\n * A Death Zone is a special type of zone that will kill a Particle as soon as it either enters, or leaves, the zone.\r\n *\r\n * The zone consists of a `source` which could be a Geometric shape, such as a Rectangle or Ellipse, or your own\r\n * object as long as it includes a `contains` method for which the Particles can be tested against.\r\n *\r\n * @class DeathZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.DeathZoneSource} source - An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * @param {boolean} killOnEnter - Should the Particle be killed when it enters the zone? `true` or leaves it? `false`\r\n */\r\nvar DeathZone = new Class({\r\n\r\n initialize:\r\n\r\n function DeathZone (source, killOnEnter)\r\n {\r\n /**\r\n * An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * This could be a Geometry shape, such as `Phaser.Geom.Circle`, or your own custom object.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.DeathZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Set to `true` if the Particle should be killed if it enters this zone.\r\n * Set to `false` to kill the Particle if it leaves this zone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#killOnEnter\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.killOnEnter = killOnEnter;\r\n },\r\n\r\n /**\r\n * Checks if the given Particle will be killed or not by this zone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone.\r\n *\r\n * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`.\r\n */\r\n willKill: function (particle)\r\n {\r\n var withinZone = this.source.contains(particle.x, particle.y);\r\n\r\n return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DeathZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles on a shape's edges.\r\n *\r\n * @class EdgeZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n * @param {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start.\r\n * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other.\r\n */\r\nvar EdgeZone = new Class({\r\n\r\n initialize:\r\n\r\n function EdgeZone (source, quantity, stepRate, yoyo, seamless)\r\n {\r\n if (yoyo === undefined) { yoyo = false; }\r\n if (seamless === undefined) { seamless = true; }\r\n\r\n /**\r\n * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.EdgeZoneSource|Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The points placed on the source edge.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n /**\r\n * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#quantity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.quantity = quantity;\r\n\r\n /**\r\n * The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#stepRate\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.stepRate = stepRate;\r\n\r\n /**\r\n * Whether particles are placed from start to end and then end to start.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#yoyo\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.yoyo = yoyo;\r\n\r\n /**\r\n * The counter used for iterating the EdgeZone's points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#counter\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.counter = -1;\r\n\r\n /**\r\n * Whether one endpoint will be removed if it's identical to the other.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#seamless\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.seamless = seamless;\r\n\r\n /**\r\n * An internal count of the points belonging to this EdgeZone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_length\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._length = 0;\r\n\r\n /**\r\n * An internal value used to keep track of the current iteration direction for the EdgeZone's points.\r\n *\r\n * 0 = forwards, 1 = backwards\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_direction\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._direction = 0;\r\n\r\n this.updateSource();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's\r\n * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.\r\n *\r\n * Also updates internal properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n updateSource: function ()\r\n {\r\n this.points = this.source.getPoints(this.quantity, this.stepRate);\r\n\r\n // Remove ends?\r\n if (this.seamless)\r\n {\r\n var a = this.points[0];\r\n var b = this.points[this.points.length - 1];\r\n\r\n if (a.x === b.x && a.y === b.y)\r\n {\r\n this.points.pop();\r\n }\r\n }\r\n\r\n var oldLength = this._length;\r\n\r\n this._length = this.points.length;\r\n\r\n // Adjust counter if we now have less points than before\r\n if (this._length < oldLength && this.counter > this._length)\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Change the source of the EdgeZone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#changeSource\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n changeSource: function (source)\r\n {\r\n this.source = source;\r\n\r\n return this.updateSource();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n if (this._direction === 0)\r\n {\r\n this.counter++;\r\n\r\n if (this.counter >= this._length)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 1;\r\n this.counter = this._length - 1;\r\n }\r\n else\r\n {\r\n this.counter = 0;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.counter--;\r\n\r\n if (this.counter === -1)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 0;\r\n this.counter = 0;\r\n }\r\n else\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n }\r\n }\r\n\r\n var point = this.points[this.counter];\r\n\r\n if (point)\r\n {\r\n particle.x = point.x;\r\n particle.y = point.y;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = EdgeZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js?")},"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles randomly within a shape\'s area.\r\n *\r\n * @class RandomZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.RandomZoneSource} source - An object instance with a `getRandomPoint(point)` method.\r\n */\r\nvar RandomZone = new Class({\r\n\r\n initialize:\r\n\r\n function RandomZone (source)\r\n {\r\n /**\r\n * An object instance with a `getRandomPoint(point)` method.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Internal calculation vector.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#_tempVec\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec = new Vector2();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.RandomZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n var vec = this._tempVec;\r\n\r\n this.source.getRandomPoint(vec);\r\n\r\n particle.x = vec.x;\r\n particle.y = vec.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles.Zones\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DeathZone: __webpack_require__(/*! ./DeathZone */ "./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js"),\r\n EdgeZone: __webpack_require__(/*! ./EdgeZone */ "./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js"),\r\n RandomZone: __webpack_require__(/*! ./RandomZone */ "./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/index.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * A PathFollower Game Object.\r\n *\r\n * A PathFollower is a Sprite Game Object with some extra helpers to allow it to follow a Path automatically.\r\n *\r\n * Anything you can do with a standard Sprite can be done with this PathFollower, such as animate it, tint it,\r\n * scale it and so on.\r\n *\r\n * PathFollowers are bound to a single Path at any one time and can traverse the length of the Path, from start\r\n * to finish, forwards or backwards, or from any given point on the Path to its end. They can optionally rotate\r\n * to face the direction of the path, be offset from the path coordinates or rotate independently of the Path.\r\n *\r\n * @class PathFollower\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @extends Phaser.GameObjects.Components.PathFollower\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this PathFollower belongs.\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar PathFollower = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.PathFollower\r\n ],\r\n\r\n initialize:\r\n\r\n function PathFollower (scene, path, x, y, texture, frame)\r\n {\r\n Sprite.call(this, scene, x, y, texture, frame);\r\n\r\n this.path = path;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.PathFollower#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n this.pathUpdate(time);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar PathFollower = __webpack_require__(/*! ./PathFollower */ \"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js\");\r\n\r\n/**\r\n * Creates a new PathFollower Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the PathFollower Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#follower\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is connected to.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('follower', function (path, x, y, key, frame)\r\n{\r\n var sprite = new PathFollower(this.scene, path, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js?")},"./node_modules/phaser/src/gameobjects/quad/Quad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Mesh = __webpack_require__(/*! ../mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Quad Game Object.\r\n *\r\n * A Quad is a Mesh Game Object pre-configured with two triangles arranged into a rectangle, with a single\r\n * texture spread across them.\r\n *\r\n * You can manipulate the corner points of the quad via the getters and setters such as `topLeftX`, and also\r\n * change their alpha and color values. The quad itself can be moved by adjusting the `x` and `y` properties.\r\n *\r\n * @class Quad\r\n * @extends Phaser.GameObjects.Mesh\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Quad belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Quad = new Class({\r\n\r\n Extends: Mesh,\r\n\r\n initialize:\r\n\r\n function Quad (scene, x, y, texture, frame)\r\n {\r\n // 0----3\r\n // |\\ B|\r\n // | \\ |\r\n // | \\ |\r\n // | A \\|\r\n // | \\\r\n // 1----2\r\n\r\n var vertices = [\r\n 0, 0, // tl\r\n 0, 0, // bl\r\n 0, 0, // br\r\n 0, 0, // tl\r\n 0, 0, // br\r\n 0, 0 // tr\r\n ];\r\n\r\n var uv = [\r\n 0, 0, // tl\r\n 0, 1, // bl\r\n 1, 1, // br\r\n 0, 0, // tl\r\n 1, 1, // br\r\n 1, 0 // tr\r\n ];\r\n\r\n var colors = [\r\n 0xffffff, // tl\r\n 0xffffff, // bl\r\n 0xffffff, // br\r\n 0xffffff, // tl\r\n 0xffffff, // br\r\n 0xffffff // tr\r\n ];\r\n\r\n var alphas = [\r\n 1, // tl\r\n 1, // bl\r\n 1, // br\r\n 1, // tl\r\n 1, // br\r\n 1 // tr\r\n ];\r\n\r\n Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame);\r\n\r\n this.resetPosition();\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Quad#setFrame\r\n * @since 3.11.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~8;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 8;\r\n }\r\n\r\n frame = this.frame;\r\n\r\n // TL\r\n this.uv[0] = frame.u0;\r\n this.uv[1] = frame.v0;\r\n\r\n // BL\r\n this.uv[2] = frame.u0;\r\n this.uv[3] = frame.v1;\r\n\r\n // BR\r\n this.uv[4] = frame.u1;\r\n this.uv[5] = frame.v1;\r\n\r\n // TL\r\n this.uv[6] = frame.u0;\r\n this.uv[7] = frame.v0;\r\n\r\n // BR\r\n this.uv[8] = frame.u1;\r\n this.uv[9] = frame.v1;\r\n\r\n // TR\r\n this.uv[10] = frame.u1;\r\n this.uv[11] = frame.v0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The top-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[0] = value - this.x;\r\n this.vertices[6] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[1] = value - this.y;\r\n this.vertices[7] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[10];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[10] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[11];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[11] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[2] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[3] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[4] = value - this.x;\r\n this.vertices[8] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[5] = value - this.y;\r\n this.vertices[9] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[0] = value;\r\n this.alphas[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[2] = value;\r\n this.alphas[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[0] = value;\r\n this.colors[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[2] = value;\r\n this.colors[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the top-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopLeft: function (x, y)\r\n {\r\n this.topLeftX = x;\r\n this.topLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the top-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopRight: function (x, y)\r\n {\r\n this.topRightX = x;\r\n this.topRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomLeft: function (x, y)\r\n {\r\n this.bottomLeftX = x;\r\n this.bottomLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomRight: function (x, y)\r\n {\r\n this.bottomRightX = x;\r\n this.bottomRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the positions of the four corner vertices of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetPosition\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetPosition: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var halfWidth = Math.floor(this.width / 2);\r\n var halfHeight = Math.floor(this.height / 2);\r\n\r\n this.setTopLeft(x - halfWidth, y - halfHeight);\r\n this.setTopRight(x + halfWidth, y - halfHeight);\r\n this.setBottomLeft(x - halfWidth, y + halfHeight);\r\n this.setBottomRight(x + halfWidth, y + halfHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the alpha values used by this Quad back to 1.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetAlpha: function ()\r\n {\r\n var alphas = this.alphas;\r\n\r\n alphas[0] = 1;\r\n alphas[1] = 1;\r\n alphas[2] = 1;\r\n alphas[3] = 1;\r\n alphas[4] = 1;\r\n alphas[5] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the color values used by this Quad back to 0xffffff.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetColors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetColors: function ()\r\n {\r\n var colors = this.colors;\r\n\r\n colors[0] = 0xffffff;\r\n colors[1] = 0xffffff;\r\n colors[2] = 0xffffff;\r\n colors[3] = 0xffffff;\r\n colors[4] = 0xffffff;\r\n colors[5] = 0xffffff;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, alpha and color values used by this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n reset: function ()\r\n {\r\n this.resetPosition();\r\n\r\n this.resetAlpha();\r\n\r\n return this.resetColors();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/Quad.js?')},"./node_modules/phaser/src/gameobjects/quad/QuadCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#quad\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('quad', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var quad = new Quad(this.scene, x, y, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, quad, config);\r\n\r\n return quad;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadCreator.js?")},"./node_modules/phaser/src/gameobjects/quad/QuadFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#quad\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * \r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('quad', function (x, y, key, frame)\r\n {\r\n return this.displayList.add(new Quad(this.scene, x, y, key, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Camera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Render = __webpack_require__(/*! ./RenderTextureRender */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar UUID = __webpack_require__(/*! ../../utils/string/UUID */ \"./node_modules/phaser/src/utils/string/UUID.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Render Texture.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n * \r\n * Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means\r\n * that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this\r\n * is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that\r\n * to the Render Texture.\r\n *\r\n * @class RenderTexture\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n */\r\nvar RenderTexture = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function RenderTexture (scene, x, y, width, height, key, frame)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 32; }\r\n if (height === undefined) { height = 32; }\r\n\r\n GameObject.call(this, scene, 'RenderTexture');\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that the Game instance is using.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.2.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.12.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * The tint of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalTint\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.2.0\r\n */\r\n this.globalTint = 0xffffff;\r\n\r\n /**\r\n * The alpha of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.2.0\r\n */\r\n this.globalAlpha = 1;\r\n\r\n /**\r\n * The HTML Canvas Element that the Render Texture is drawing to when using the Canvas Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.2.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Render Texture is drawing to.\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.2.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#dirty\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.12.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The Frame corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.12.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Internal saved texture flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_saved\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._saved = false;\r\n\r\n if (key === undefined)\r\n {\r\n this.canvas = CanvasPool.create2D(this, width, height);\r\n\r\n // Create a new Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(UUID(), this.canvas);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get();\r\n }\r\n else\r\n {\r\n this.texture = scene.sys.textures.get(key);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get(frame);\r\n\r\n this.canvas = this.frame.source.image;\r\n this._saved = true;\r\n\r\n this.dirty = true;\r\n\r\n this.width = this.frame.cutWidth;\r\n this.height = this.frame.cutHeight;\r\n }\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.2.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * Internal erase mode flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_eraseMode\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._eraseMode = false;\r\n\r\n /**\r\n * An internal Camera that can be used to move around the Render Texture.\r\n * Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what\r\n * is drawn to the Render Texture. You can scroll, zoom and rotate this Camera.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#camera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.camera = new Camera(0, 0, width, height);\r\n\r\n /**\r\n * A reference to the WebGL Rendering Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture that is being rendered to in a WebGL Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#glTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer.type === CONST.WEBGL)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.gl = gl;\r\n this.glTexture = this.frame.source.glTexture;\r\n this.drawGameObject = this.batchGameObjectWebGL;\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n }\r\n else if (renderer.type === CONST.CANVAS)\r\n {\r\n this.drawGameObject = this.batchGameObjectCanvas;\r\n }\r\n\r\n this.camera.setScene(scene);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key === undefined)\r\n {\r\n this.setSize(width, height);\r\n }\r\n\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.RenderTexture#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n return this.resize(width, height);\r\n },\r\n\r\n /**\r\n * Resizes the Render Texture to the new dimensions given.\r\n * \r\n * If Render Texture was created from specific frame, only the size of the frame will be changed. The size of the source\r\n * texture will not change.\r\n *\r\n * If Render Texture was not created from specific frame, the following will happen:\r\n * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.\r\n * In Canvas it will resize the underlying canvas element.\r\n * Both approaches will erase everything currently drawn to the Render Texture.\r\n *\r\n * If the dimensions given are the same as those already being used, calling this method will do nothing.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#resize\r\n * @since 3.10.0\r\n *\r\n * @param {number} width - The new width of the Render Texture.\r\n * @param {number} [height=width] - The new height of the Render Texture. If not specified, will be set the same as the `width`.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n resize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n if (this.frame.name === '__BASE')\r\n {\r\n // Resize the texture\r\n\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n if (this.gl)\r\n {\r\n var gl = this.gl;\r\n\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n var glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);\r\n\r\n this.framebuffer = this.renderer.createFramebuffer(width, height, glTexture, false);\r\n\r\n this.frame.source.isRenderTexture = true;\r\n\r\n this.frame.glTexture = glTexture;\r\n this.glTexture = glTexture;\r\n }\r\n\r\n this.frame.source.width = width;\r\n this.frame.source.height = height;\r\n\r\n this.camera.setSize(width, height);\r\n\r\n this.frame.setSize(width, height);\r\n\r\n this.width = width;\r\n this.height = height;\r\n }\r\n }\r\n else\r\n {\r\n // Resize the frame\r\n\r\n var baseFrame = this.texture.getSourceImage();\r\n\r\n if (this.frame.cutX + width > baseFrame.width)\r\n {\r\n width = baseFrame.width - this.frame.cutX;\r\n }\r\n\r\n if (this.frame.cutY + height > baseFrame.height)\r\n {\r\n height = baseFrame.height - this.frame.cutY;\r\n }\r\n\r\n this.frame.setSize(width, height, this.frame.cutX, this.frame.cutY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the tint to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalTint\r\n * @since 3.2.0\r\n *\r\n * @param {integer} tint - The tint value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalTint: function (tint)\r\n {\r\n this.globalTint = tint;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the alpha to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalAlpha\r\n * @since 3.2.0\r\n *\r\n * @param {number} alpha - The alpha value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalAlpha: function (alpha)\r\n {\r\n this.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stores a copy of this Render Texture in the Texture Manager using the given key.\r\n * \r\n * After doing this, any texture based Game Object, such as a Sprite, can use the contents of this\r\n * Render Texture by using the texture key:\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 128, 128);\r\n * \r\n * // Draw something to the Render Texture\r\n * \r\n * rt.saveTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Updating the contents of this Render Texture will automatically update _any_ Game Object\r\n * that is using it as a texture. Calling `saveTexture` again will not save another copy\r\n * of the same texture, it will just rename the key of the existing copy.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#saveTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique key to store the texture as within the global Texture Manager.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was saved.\r\n */\r\n saveTexture: function (key)\r\n {\r\n this.textureManager.renameTexture(this.texture.key, key);\r\n \r\n this._saved = true;\r\n\r\n return this.texture;\r\n },\r\n\r\n /**\r\n * Fills the Render Texture with the given color.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#fill\r\n * @since 3.2.0\r\n *\r\n * @param {number} rgb - The color to fill the Render Texture with.\r\n * @param {number} [alpha=1] - The alpha value used by the fill.\r\n * @param {number} [x=0] - The left coordinate of the fill rectangle.\r\n * @param {number} [y=0] - The top coordinate of the fill rectangle.\r\n * @param {number} [width=this.frame.cutWidth] - The width of the fill rectangle.\r\n * @param {number} [height=this.frame.cutHeight] - The height of the fill rectangle.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n fill: function (rgb, alpha, x, y, width, height)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.frame.cutWidth; }\r\n if (height === undefined) { height = this.frame.cutHeight; }\r\n\r\n var r = ((rgb >> 16) | 0) & 0xff;\r\n var g = ((rgb >> 8) | 0) & 0xff;\r\n var b = (rgb | 0) & 0xff;\r\n\r\n var gl = this.gl;\r\n var frame = this.frame;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n \r\n var bounds = this.getBounds();\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n this.pipeline.drawFillRect(\r\n bounds.x, bounds.y, bounds.right, bounds.bottom,\r\n Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1),\r\n alpha\r\n );\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(0, 0, frame.source.width, frame.source.height);\r\n }\r\n \r\n this.renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')';\r\n this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#clear\r\n * @since 3.2.0\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n var gl = this.gl;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n \r\n if (this.frame.cutWidth !== this.canvas.width || this.frame.cutHeight !== this.canvas.height)\r\n {\r\n gl.scissor(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n }\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n\r\n ctx.save();\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.clearRect(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n ctx.restore();\r\n }\r\n\r\n this.dirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE.\r\n * This has the effect of erasing any filled pixels in the objects from this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot erase a Render Texture from itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#erase\r\n * @since 3.16.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n erase: function (entries, x, y)\r\n {\r\n this._eraseMode = true;\r\n\r\n var blendMode = this.renderer.currentBlendMode;\r\n\r\n this.renderer.setBlendMode(BlendModes.ERASE);\r\n\r\n this.draw(entries, x, y, 1, 16777215);\r\n\r\n this.renderer.setBlendMode(blendMode);\r\n\r\n this._eraseMode = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot draw a Render Texture to itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame. If you need to specify\r\n * exactly which frame to draw then use the method `drawFrame` instead.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * The `alpha` and `tint` values are only used by Texture Frames.\r\n * Game Objects use their own alpha and tint values when being drawn.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#draw\r\n * @since 3.2.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value.\r\n * @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n draw: function (entries, x, y, alpha, tint)\r\n {\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n\r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n\r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n\r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n pipeline.flush();\r\n\r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n\r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.renderer.setContext(this.context);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n this.renderer.setContext();\r\n }\r\n\r\n this.dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the Texture Frame to the Render Texture at the given position.\r\n * \r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 800, 600);\r\n * rt.drawFrame(key, frame);\r\n * ```\r\n * \r\n * You can optionally provide a position, alpha and tint value to apply to the frame\r\n * before it is drawn.\r\n * \r\n * Calling this method will cause a batch flush, so if you've got a stack of things to draw\r\n * in a tight loop, try using the `draw` method instead.\r\n * \r\n * If you need to draw a Sprite to this Render Texture, use the `draw` method instead.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#drawFrame\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to draw the frame at.\r\n * @param {number} [y=0] - The y position to draw the frame at.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n drawFrame: function (key, frame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n var gl = this.gl;\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n \r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n \r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n \r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n \r\n pipeline.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, tint, alpha, this.camera.matrix, null);\r\n \r\n pipeline.flush();\r\n \r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n \r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, alpha, tint);\r\n }\r\n\r\n this.dirty = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchList\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x] - The x position to offset the Game Object by.\r\n * @param {number} [y] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchList: function (children, x, y, alpha, tint)\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (!entry || entry === this)\r\n {\r\n continue;\r\n }\r\n\r\n if (entry.renderWebGL || entry.renderCanvas)\r\n {\r\n // Game Objects\r\n this.drawGameObject(entry, x, y);\r\n }\r\n else if (entry.isParent || entry.list)\r\n {\r\n // Groups / Display Lists\r\n this.batchGroup(entry.getChildren(), x, y);\r\n }\r\n else if (typeof entry === 'string')\r\n {\r\n // Texture key\r\n this.batchTextureFrameKey(entry, null, x, y, alpha, tint);\r\n }\r\n else if (entry instanceof Frame)\r\n {\r\n // Texture Frame instance\r\n this.batchTextureFrame(entry, x, y, alpha, tint);\r\n }\r\n else if (Array.isArray(entry))\r\n {\r\n // Another Array\r\n this.batchList(entry, x, y, alpha, tint);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing a Phaser Group contents.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGroup\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n */\r\n batchGroup: function (children, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.willRender())\r\n {\r\n var tx = entry.x + x;\r\n var ty = entry.y + y;\r\n\r\n this.drawGameObject(entry, tx, ty);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectWebGL\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectWebGL: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (!this._eraseMode)\r\n {\r\n this.renderer.setBlendMode(gameObject.blendMode);\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n \r\n gameObject.renderWebGL(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectCanvas\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectCanvas: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (this._eraseMode)\r\n {\r\n var blendMode = gameObject.blendMode;\r\n\r\n gameObject.blendMode = BlendModes.ERASE;\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n\r\n gameObject.renderCanvas(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n\r\n if (this._eraseMode)\r\n {\r\n gameObject.blendMode = blendMode;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrameKey\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchTextureFrameKey: function (key, frame, x, y, alpha, tint)\r\n {\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.batchTextureFrame(textureFrame, x, y, alpha, tint);\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of a Texture Frame to this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} textureFrame - The Texture Frame to draw.\r\n * @param {number} [x=0] - The x position to draw the Frame at.\r\n * @param {number} [y=0] - The y position to draw the Frame at.\r\n * @param {number} [tint] - A tint color to be applied to the frame drawn to the Render Texture.\r\n */\r\n batchTextureFrame: function (textureFrame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n if (this.gl)\r\n {\r\n this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n var cd = textureFrame.canvasData;\r\n var source = textureFrame.source.image;\r\n \r\n var matrix = this.camera.matrix;\r\n \r\n ctx.globalAlpha = this.globalAlpha;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n ctx.drawImage(source, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotArea\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the whole of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshot\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given pixel from this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`.\r\n * \r\n * Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory, than the other snapshot methods.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotPixel\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, true, x, y);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, true, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (!this._saved)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.gl)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n this.texture.destroy();\r\n this.camera.destroy();\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n this.framebuffer = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RenderTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderCanvas\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = RenderTextureCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('renderTexture', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 32);\r\n var height = GetAdvancedValue(config, 'height', 32);\r\n var key = GetAdvancedValue(config, 'key', undefined);\r\n var frame = GetAdvancedValue(config, 'frame', undefined);\r\n\r\n var renderTexture = new RenderTexture(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, renderTexture, config);\r\n\r\n return renderTexture;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n * \r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('renderTexture', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new RenderTexture(this.scene, x, y, width, height, key, frame));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RenderTextureWebGLRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RenderTextureCanvasRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js?')},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderWebGL\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width, height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, !src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don\'t try and use it\r\n renderer.setBlankTexture(true);\r\n};\r\n\r\nmodule.exports = RenderTextureWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shader/Shader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar SetValue = __webpack_require__(/*! ../../utils/object/SetValue */ \"./node_modules/phaser/src/utils/object/SetValue.js\");\r\nvar ShaderRender = __webpack_require__(/*! ./ShaderRender */ \"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Shader Game Object.\r\n * \r\n * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it\r\n * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders\r\n * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other\r\n * Game Object. They can also be made interactive and used for input events.\r\n * \r\n * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can\r\n * be created dynamically at runtime, or loaded in via the GLSL File Loader:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('fire', 'shaders/fire.glsl.js');\r\n * }\r\n * \r\n * function create ()\r\n * {\r\n * this.add.shader('fire', 400, 300, 512, 512);\r\n * }\r\n * ```\r\n * \r\n * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically.\r\n * \r\n * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should\r\n * be handled via exposed uniforms in the shader code itself.\r\n * \r\n * By default a Shader will be created with a standard set of uniforms. These were added to match those\r\n * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need,\r\n * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms\r\n * in the Base Shader.\r\n * \r\n * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the\r\n * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored.\r\n * \r\n * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should\r\n * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using\r\n * a custom pipeline instead. However, for background or special masking effects, they are extremely effective.\r\n * \r\n * @class Shader\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n */\r\nvar Shader = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n ShaderRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Shader (scene, key, x, y, width, height, textures)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n GameObject.call(this, scene, 'Shader');\r\n\r\n /**\r\n * This Game Object cannot have a blend mode, so skip all checks.\r\n * \r\n * @name Phaser.GameObjects.Shader#blendMode\r\n * @type {integer}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The underlying shader object being used.\r\n * Empty by default and set during a call to the `setShader` method.\r\n * \r\n * @name Phaser.GameObjects.Shader#shader\r\n * @type {Phaser.Display.BaseShader}\r\n * @since 3.17.0\r\n */\r\n this.shader;\r\n\r\n var renderer = scene.sys.renderer;\r\n\r\n /**\r\n * A reference to the current renderer.\r\n * Shaders only work with the WebGL Renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The WebGL context belonging to the renderer.\r\n *\r\n * @name Phaser.GameObjects.Shader#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.17.0\r\n */\r\n this.gl = renderer.gl;\r\n\r\n /**\r\n * Raw byte buffer of vertices this Shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexData = new ArrayBuffer(6 * (Float32Array.BYTES_PER_ELEMENT * 2));\r\n\r\n /**\r\n * The WebGL vertex buffer object this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexBuffer = renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The WebGL shader program this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#program\r\n * @type {WebGLProgram}\r\n * @since 3.17.0\r\n */\r\n this.program = null;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU.\r\n *\r\n * @name Phaser.GameObjects.Shader#bytes\r\n * @type {Uint8Array}\r\n * @since 3.17.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * Float32 view of the array buffer containing the shaders vertices.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.17.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * The view matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#viewMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.viewMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The projection matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#projectionMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.projectionMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when\r\n * creating this shader game object. The uniforms are updated automatically during the render step.\r\n * \r\n * The defaults are:\r\n * \r\n * `resolution` (2f) - Set to the size of this shader.\r\n * `time` (1f) - The elapsed game time, in seconds.\r\n * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame.\r\n * `date` (4fv) - A vec4 containing the year, month, day and time in seconds.\r\n * `sampleRate` (1f) - Sound sample rate. 44100 by default.\r\n * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default.\r\n * \r\n * @name Phaser.GameObjects.Shader#uniforms\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = {};\r\n\r\n /**\r\n * The pointer bound to this shader, if any.\r\n * Set via the chainable `setPointer` method, or by modifying this property directly.\r\n * \r\n * @name Phaser.GameObjects.Shader#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.17.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * The cached width of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererWidth = renderer.width;\r\n\r\n /**\r\n * The cached height of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererHeight\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererHeight = renderer.height;\r\n\r\n /**\r\n * Internal texture count tracker.\r\n * \r\n * @name Phaser.GameObjects.Shader#_textureCount\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._textureCount = 0;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Shader is drawing to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.19.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture this Shader is rendering to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * A flag that indicates if this Shader has been set to render to a texture instead of the display list.\r\n * \r\n * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`.\r\n * \r\n * A Shader that is rendering to a texture _does not_ appear on the display list.\r\n *\r\n * @name Phaser.GameObjects.Shader#renderToTexture\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader.\r\n * \r\n * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`.\r\n *\r\n * @name Phaser.GameObjects.Shader#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.19.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * Internal saved texture key.\r\n *\r\n * @name Phaser.GameObjects.Shader#_savedKey\r\n * @type {boolean}\r\n * @private\r\n * @since 3.19.0\r\n */\r\n this._savedKey = '';\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setOrigin(0.5, 0.5);\r\n this.setShader(key, textures);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.Shader#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n if (this.renderToTexture)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n }\r\n },\r\n\r\n /**\r\n * Changes this Shader so instead of rendering to the display list it renders to a\r\n * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output\r\n * of this shader as an input for another shader, by mapping a sampler2D uniform\r\n * to it.\r\n * \r\n * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties\r\n * are populated.\r\n * \r\n * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture\r\n * from this Shader and save it into the Texture Manager, allowing you to then use it for\r\n * any texture-based Game Object, such as a Sprite or Image:\r\n * \r\n * ```javascript\r\n * var shader = this.add.shader('myShader', x, y, width, height);\r\n * \r\n * shader.setRenderToTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Note that it stores an active reference to this Shader. That means as this shader updates,\r\n * so does the texture and any object using it to render with. Also, if you destroy this\r\n * shader, be sure to clear any objects that may have been using it as a texture too.\r\n * \r\n * You can access the Phaser Texture that is created via the `Shader.texture` property.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.Shader#setRenderToTexture\r\n * @since 3.19.0\r\n *\r\n * @param {string} [key] - The unique key to store the texture as within the global Texture Manager.\r\n * @param {boolean} [flipY=false] - Does this texture need vertically flipping before rendering? This should usually be set to `true` if being fed from a buffer.\r\n *\r\n * @return {this} This Shader instance.\r\n */\r\n setRenderToTexture: function (key, flipY)\r\n {\r\n if (flipY === undefined) { flipY = false; }\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n\r\n this.glTexture = renderer.createTextureFromSource(null, width, height, 0);\r\n\r\n this.glTexture.flipY = flipY;\r\n\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n\r\n this._rendererWidth = width;\r\n this._rendererHeight = height;\r\n\r\n this.renderToTexture = true;\r\n\r\n this.projOrtho(0, this.width, this.height, 0);\r\n\r\n if (key)\r\n {\r\n this._savedKey = key;\r\n\r\n this.texture = this.scene.sys.textures.addGLTexture(key, this.glTexture, width, height);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fragment and, optionally, the vertex shader source code that this Shader will use.\r\n * This will immediately delete the active shader program, if set, and then create a new one\r\n * with the given source. Finally, the shader uniforms are initialized.\r\n *\r\n * @method Phaser.GameObjects.Shader#setShader\r\n * @since 3.17.0\r\n * \r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setShader: function (key, textures)\r\n {\r\n if (textures === undefined) { textures = []; }\r\n\r\n if (typeof key === 'string')\r\n {\r\n var cache = this.scene.sys.cache.shader;\r\n\r\n if (!cache.has(key))\r\n {\r\n console.warn('Shader missing: ' + key);\r\n return this;\r\n }\r\n \r\n this.shader = cache.get(key);\r\n }\r\n else\r\n {\r\n this.shader = key;\r\n }\r\n\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n if (this.program)\r\n {\r\n gl.deleteProgram(this.program);\r\n }\r\n\r\n var program = renderer.createProgram(this.shader.vertexSrc, this.shader.fragmentSrc);\r\n\r\n // The default uniforms available within the vertex shader\r\n renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n this.program = program;\r\n\r\n var d = new Date();\r\n\r\n // The default uniforms available within the fragment shader\r\n var defaultUniforms = {\r\n resolution: { type: '2f', value: { x: this.width, y: this.height } },\r\n time: { type: '1f', value: 0 },\r\n mouse: { type: '2f', value: { x: this.width / 2, y: this.height / 2 } },\r\n date: { type: '4fv', value: [ d.getFullYear(), d.getMonth(), d.getDate(), d.getHours() * 60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] },\r\n sampleRate: { type: '1f', value: 44100.0 },\r\n iChannel0: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel1: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }\r\n };\r\n \r\n if (this.shader.uniforms)\r\n {\r\n this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms);\r\n }\r\n else\r\n {\r\n this.uniforms = defaultUniforms;\r\n }\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (textures[i])\r\n {\r\n this.setSampler2D('iChannel' + i, textures[i], i);\r\n }\r\n }\r\n\r\n this.initUniforms();\r\n\r\n this.projOrtho(0, this._rendererWidth, this._rendererHeight, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a Phaser Pointer object to this Shader.\r\n * \r\n * The screen position of the pointer will be set in to the shaders `mouse` uniform\r\n * automatically every frame. Call this method with no arguments to unbind the pointer.\r\n *\r\n * @method Phaser.GameObjects.Shader#setPointer\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setPointer: function (pointer)\r\n {\r\n this.pointer = pointer;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this shader to use an orthographic projection matrix.\r\n * This matrix is stored locally in the `projectionMatrix` property,\r\n * as well as being bound to the `uProjectionMatrix` uniform.\r\n * \r\n * @method Phaser.GameObjects.Shader#projOrtho\r\n * @since 3.17.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n */\r\n projOrtho: function (left, right, bottom, top)\r\n {\r\n var near = -1000;\r\n var far = 1000;\r\n\r\n var leftRight = 1 / (left - right);\r\n var bottomTop = 1 / (bottom - top);\r\n var nearFar = 1 / (near - far);\r\n\r\n var pm = this.projectionMatrix;\r\n\r\n pm[0] = -2 * leftRight;\r\n pm[5] = -2 * bottomTop;\r\n pm[10] = 2 * nearFar;\r\n pm[12] = (left + right) * leftRight;\r\n pm[13] = (top + bottom) * bottomTop;\r\n pm[14] = (far + near) * nearFar;\r\n\r\n var program = this.program;\r\n\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n\r\n this._rendererWidth = right;\r\n this._rendererHeight = bottom;\r\n },\r\n\r\n // Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/\r\n // http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf\r\n\r\n /**\r\n * Initializes all of the uniforms this shader uses.\r\n * \r\n * @method Phaser.GameObjects.Shader#initUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n initUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n var map = this.renderer.glFuncMap;\r\n var program = this.program;\r\n\r\n this._textureCount = 0;\r\n\r\n for (var key in this.uniforms)\r\n {\r\n var uniform = this.uniforms[key];\r\n\r\n var type = uniform.type;\r\n var data = map[type];\r\n\r\n uniform.uniformLocation = gl.getUniformLocation(program, key);\r\n\r\n if (type !== 'sampler2D')\r\n {\r\n uniform.glMatrix = data.matrix;\r\n uniform.glValueLength = data.length;\r\n uniform.glFunc = data.func;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture.\r\n * \r\n * This allows you to feed the output from one Shader into another:\r\n * \r\n * ```javascript\r\n * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture();\r\n * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output');\r\n * \r\n * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512);\r\n * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512);\r\n * ```\r\n * \r\n * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform.\r\n * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop.\r\n * \r\n * If you wish to use an image from the Texture Manager as a sampler2D input for this shader,\r\n * see the `Shader.setSampler2D` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2DBuffer\r\n * @since 3.19.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {WebGLTexture} texture - A WebGLTexture reference.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n if (textureData === undefined) { textureData = {}; }\r\n\r\n var uniform = this.uniforms[uniformKey];\r\n\r\n uniform.value = texture;\r\n\r\n textureData.width = width;\r\n textureData.height = height;\r\n\r\n uniform.textureData = textureData;\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2D\r\n * @since 3.17.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2D: function (uniformKey, textureKey, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n\r\n var textureManager = this.scene.sys.textures;\r\n\r\n if (textureManager.exists(textureKey))\r\n {\r\n var frame = textureManager.getFrame(textureKey);\r\n var uniform = this.uniforms[uniformKey];\r\n var source = frame.source;\r\n\r\n uniform.textureKey = textureKey;\r\n uniform.source = source.image;\r\n uniform.value = frame.glTexture;\r\n\r\n if (source.isGLTexture)\r\n {\r\n if (!textureData)\r\n {\r\n textureData = {};\r\n }\r\n\r\n textureData.width = source.width;\r\n textureData.height = source.height;\r\n }\r\n\r\n if (textureData)\r\n {\r\n uniform.textureData = textureData;\r\n }\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a property of a uniform already present on this shader.\r\n * \r\n * To modify the value of a uniform such as a 1f or 1i use the `value` property directly:\r\n * \r\n * ```javascript\r\n * shader.setUniform('size.value', 16);\r\n * ```\r\n * \r\n * You can use dot notation to access deeper values, for example:\r\n * \r\n * ```javascript\r\n * shader.setUniform('resolution.value.x', 512);\r\n * ```\r\n * \r\n * The change to the uniform will take effect the next time the shader is rendered.\r\n * \r\n * @method Phaser.GameObjects.Shader#setUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`.\r\n * @param {any} value - The value to set into the uniform.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setUniform: function (key, value)\r\n {\r\n SetValue(this.uniforms, key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the uniform object for the given key, or `null` if the uniform couldn't be found.\r\n * \r\n * @method Phaser.GameObjects.Shader#getUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to return the value for.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n getUniform: function (key)\r\n {\r\n return GetFastValue(this.uniforms, key, null);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel0\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel0: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel0', textureKey, 0, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel1\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel1: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel1', textureKey, 1, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel2\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel2: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel2', textureKey, 2, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel3\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel3: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel3', textureKey, 3, textureData);\r\n },\r\n\r\n /**\r\n * Internal method that takes a sampler2D uniform and prepares it for use by setting the\r\n * gl texture parameters.\r\n * \r\n * @method Phaser.GameObjects.Shader#initSampler2D\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {any} uniform - The sampler2D uniform to process.\r\n */\r\n initSampler2D: function (uniform)\r\n {\r\n if (!uniform.value)\r\n {\r\n return;\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n gl.activeTexture(gl.TEXTURE0 + this._textureCount);\r\n gl.bindTexture(gl.TEXTURE_2D, uniform.value);\r\n \r\n // Extended texture data\r\n\r\n var data = uniform.textureData;\r\n\r\n if (data)\r\n {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D\r\n \r\n // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST\r\n // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT\r\n // format can be: gl.LUMINANCE or gl.RGBA\r\n \r\n var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()];\r\n var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()];\r\n var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()];\r\n var wrapT = gl[GetFastValue(data, 'wrapT', 'repeat').toUpperCase()];\r\n var format = gl[GetFastValue(data, 'format', 'rgba').toUpperCase()];\r\n\r\n if (data.repeat)\r\n {\r\n wrapS = gl.REPEAT;\r\n wrapT = gl.REPEAT;\r\n }\r\n\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, !!data.flipY);\r\n\r\n if (data.width)\r\n {\r\n var width = GetFastValue(data, 'width', 512);\r\n var height = GetFastValue(data, 'height', 2);\r\n var border = GetFastValue(data, 'border', 0);\r\n \r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source);\r\n }\r\n \r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n }\r\n\r\n this.renderer.setProgram(this.program);\r\n \r\n gl.uniform1i(uniform.uniformLocation, this._textureCount);\r\n \r\n this._textureCount++;\r\n },\r\n\r\n /**\r\n * Synchronizes all of the uniforms this shader uses.\r\n * Each uniforms gl function is called in turn.\r\n * \r\n * @method Phaser.GameObjects.Shader#syncUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n syncUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n var uniforms = this.uniforms;\r\n var uniform;\r\n var length;\r\n var glFunc;\r\n var location;\r\n var value;\r\n var textureCount = 0;\r\n \r\n for (var key in uniforms)\r\n {\r\n uniform = uniforms[key];\r\n\r\n glFunc = uniform.glFunc;\r\n length = uniform.glValueLength;\r\n location = uniform.uniformLocation;\r\n value = uniform.value;\r\n\r\n if (value === null)\r\n {\r\n continue;\r\n }\r\n\r\n if (length === 1)\r\n {\r\n if (uniform.glMatrix)\r\n {\r\n glFunc.call(gl, location, uniform.transpose, value);\r\n }\r\n else\r\n {\r\n glFunc.call(gl, location, value);\r\n }\r\n }\r\n else if (length === 2)\r\n {\r\n glFunc.call(gl, location, value.x, value.y);\r\n }\r\n else if (length === 3)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z);\r\n }\r\n else if (length === 4)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z, value.w);\r\n }\r\n else if (uniform.type === 'sampler2D')\r\n {\r\n gl.activeTexture(gl['TEXTURE' + textureCount]);\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, value);\r\n\r\n gl.uniform1i(location, textureCount);\r\n\r\n textureCount++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform.\r\n * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready\r\n * for flush to be called.\r\n * \r\n * @method Phaser.GameObjects.Shader#load\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering.\r\n */\r\n load: function (matrix2D)\r\n {\r\n // ITRS\r\n\r\n var gl = this.gl;\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var vm = this.viewMatrix;\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var x = -this._displayOriginX;\r\n var y = -this._displayOriginY;\r\n \r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[12] = vm[0] * x + vm[4] * y;\r\n vm[13] = vm[1] * x + vm[5] * y;\r\n }\r\n\r\n // Update vertex shader uniforms\r\n\r\n gl.useProgram(program);\r\n\r\n gl.uniformMatrix4fv(gl.getUniformLocation(program, 'uViewMatrix'), false, vm);\r\n gl.uniform2f(gl.getUniformLocation(program, 'uResolution'), this.width, this.height);\r\n\r\n // Update fragment shader uniforms\r\n\r\n var uniforms = this.uniforms;\r\n var res = uniforms.resolution;\r\n\r\n res.value.x = width;\r\n res.value.y = height;\r\n\r\n uniforms.time.value = renderer.game.loop.getDuration();\r\n\r\n var pointer = this.pointer;\r\n\r\n if (pointer)\r\n {\r\n var mouse = uniforms.mouse;\r\n\r\n var px = pointer.x / width;\r\n var py = 1 - pointer.y / height;\r\n \r\n mouse.value.x = px.toFixed(2);\r\n mouse.value.y = py.toFixed(2);\r\n }\r\n\r\n this.syncUniforms();\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * Sets the active shader, loads the vertex buffer and then draws.\r\n * \r\n * @method Phaser.GameObjects.Shader#flush\r\n * @since 3.17.0\r\n */\r\n flush: function ()\r\n {\r\n // Bind\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n var program = this.program;\r\n\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var renderer = this.renderer;\r\n var vertexSize = Float32Array.BYTES_PER_ELEMENT * 2;\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(this.framebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n }\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n var location = gl.getAttribLocation(program, 'inPosition');\r\n\r\n if (location !== -1)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n\r\n gl.vertexAttribPointer(location, 2, gl.FLOAT, false, vertexSize, 0);\r\n }\r\n\r\n // Draw\r\n\r\n var vf = this.vertexViewF32;\r\n\r\n vf[3] = height;\r\n vf[4] = width;\r\n vf[5] = height;\r\n vf[8] = width;\r\n vf[9] = height;\r\n vf[10] = width;\r\n\r\n // Flush\r\n\r\n var vertexCount = 6;\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n gl.drawArrays(gl.TRIANGLES, 0, vertexCount);\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(null, false);\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setAlpha\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setBlendMode\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shader#preDestroy\r\n * @protected\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n if (this.renderToTexture)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n this.texture.destroy();\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.texture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/Shader.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Shader.Render. There is no Canvas renderer for Shader objects.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderCanvas\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar ShaderCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = ShaderCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Shader = __webpack_require__(/*! ./Shader */ \"./node_modules/phaser/src/gameobjects/shader/Shader.js\");\r\n\r\n/**\r\n * Creates a new Shader Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shader\r\n * @since 3.17.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('shader', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 128);\r\n var height = GetAdvancedValue(config, 'height', 128);\r\n\r\n var shader = new Shader(this.scene, key, x, y, width, height);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, shader, config);\r\n\r\n return shader;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Shader = __webpack_require__(/*! ./Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Shader Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shader\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register(\'shader\', function (key, x, y, width, height, textures)\r\n {\r\n return this.displayList.add(new Shader(this.scene, key, x, y, width, height, textures));\r\n });\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ShaderWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ShaderCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderRender.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (!src.shader)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n if (src.renderToTexture)\r\n {\r\n src.load();\r\n src.flush();\r\n }\r\n else\r\n {\r\n var camMatrix = src._tempMatrix1;\r\n var shapeMatrix = src._tempMatrix2;\r\n var calcMatrix = src._tempMatrix3;\r\n \r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n \r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n \r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n \r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n \r\n // Renderer size changed?\r\n if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight)\r\n {\r\n src.projOrtho(0, renderer.width, renderer.height, 0);\r\n }\r\n \r\n src.load(calcMatrix.matrix);\r\n src.flush();\r\n }\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ShaderWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a filled path for the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillPathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} calcMatrix - The transform matrix used to get the position values.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar FillPathWebGL = function (pipeline, calcMatrix, src, alpha, dx, dy)\r\n{\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n var path = src.pathData;\r\n var pathIndexes = src.pathIndexes;\r\n\r\n for (var i = 0; i < pathIndexes.length; i += 3)\r\n {\r\n var p0 = pathIndexes[i] * 2;\r\n var p1 = pathIndexes[i + 1] * 2;\r\n var p2 = pathIndexes[i + 2] * 2;\r\n\r\n var x0 = path[p0 + 0] - dx;\r\n var y0 = path[p0 + 1] - dy;\r\n var x1 = path[p1 + 0] - dx;\r\n var y1 = path[p1 + 1] - dy;\r\n var x2 = path[p2 + 0] - dx;\r\n var y2 = path[p2 + 1] - dy;\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n \r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, 0, 0, 1, 1, fillTintColor, fillTintColor, fillTintColor, pipeline.tintEffect);\r\n }\r\n};\r\n\r\nmodule.exports = FillPathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the fillStyle on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the fill style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the fill style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar FillStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var fillColor = (altColor) ? altColor : src.fillColor;\r\n var fillAlpha = (altAlpha) ? altAlpha : src.fillAlpha;\r\n\r\n var red = ((fillColor & 0xFF0000) >>> 16);\r\n var green = ((fillColor & 0xFF00) >>> 8);\r\n var blue = (fillColor & 0xFF);\r\n\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n};\r\n\r\nmodule.exports = FillStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the strokeStyle and lineWidth on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#LineStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the stroke style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the stroke style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar LineStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var strokeColor = (altColor) ? altColor : src.strokeColor;\r\n var strokeAlpha = (altAlpha) ? altAlpha : src.strokeAlpha;\r\n\r\n var red = ((strokeColor & 0xFF0000) >>> 16);\r\n var green = ((strokeColor & 0xFF00) >>> 8);\r\n var blue = (strokeColor & 0xFF);\r\n\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + strokeAlpha + ')';\r\n ctx.lineWidth = src.lineWidth;\r\n};\r\n\r\nmodule.exports = LineStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/Shape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Line = __webpack_require__(/*! ../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon.\r\n * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes.\r\n *\r\n * @class Shape\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {string} [type] - The internal type of the Shape.\r\n * @param {any} [data] - The data of the source shape geometry, if any.\r\n */\r\nvar Shape = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Shape (scene, type, data)\r\n {\r\n if (type === undefined) { type = \'Shape\'; }\r\n\r\n GameObject.call(this, scene, type);\r\n\r\n /**\r\n * The source Shape data. Typically a geometry object.\r\n * You should not manipulate this directly.\r\n *\r\n * @name Phaser.GameObjects.Shape#data\r\n * @type {any}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.geom = data;\r\n\r\n /**\r\n * Holds the polygon path data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathData\r\n * @type {number[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathData = [];\r\n\r\n /**\r\n * Holds the earcut polygon path index data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathIndexes\r\n * @type {integer[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathIndexes = [];\r\n\r\n /**\r\n * The fill color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillColor = 0xffffff;\r\n\r\n /**\r\n * The fill alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillAlpha = 1;\r\n\r\n /**\r\n * The stroke color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeColor = 0xffffff;\r\n\r\n /**\r\n * The stroke alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeAlpha = 1;\r\n\r\n /**\r\n * The stroke line width used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Controls if this Shape is filled or not.\r\n * Note that some Shapes do not support being filled (such as Line shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isFilled\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isFilled = false;\r\n\r\n /**\r\n * Controls if this Shape is stroked or not.\r\n * Note that some Shapes do not support being stroked (such as Iso Box shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isStroked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isStroked = false;\r\n\r\n /**\r\n * Controls if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#closePath\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.closePath = true;\r\n\r\n /**\r\n * Private internal value.\r\n * A Line used when parsing internal path data to avoid constant object re-creation.\r\n *\r\n * @name Phaser.GameObjects.Curve#_tempLine\r\n * @type {Phaser.Geom.Line}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._tempLine = new Line();\r\n\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`.\r\n * \r\n * Note that some Shapes do not support fill colors, such as the Line shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled.\r\n * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (color === undefined)\r\n {\r\n this.isFilled = false;\r\n }\r\n else\r\n {\r\n this.fillColor = color;\r\n this.fillAlpha = alpha;\r\n this.isFilled = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the stroke color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`.\r\n * \r\n * Note that some Shapes do not support being stroked, such as the Iso Box shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setStrokeStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked.\r\n * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked.\r\n * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStrokeStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (lineWidth === undefined)\r\n {\r\n this.isStroked = false;\r\n }\r\n else\r\n {\r\n this.lineWidth = lineWidth;\r\n this.strokeColor = color;\r\n this.strokeAlpha = alpha;\r\n this.isStroked = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setClosePath\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setClosePath: function (value)\r\n {\r\n this.closePath = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shape#preDestroy\r\n * @protected\r\n * @since 3.13.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.geom = null;\r\n this._tempLine = null;\r\n this.pathData = [];\r\n this.pathIndexes = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/Shape.js?')},"./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a stroke outline around the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#StrokePathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar StrokePathWebGL = function (pipeline, src, alpha, dx, dy)\r\n{\r\n var strokeTint = pipeline.strokeTint;\r\n var strokeTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n var lineWidth = src.lineWidth;\r\n var halfLineWidth = lineWidth / 2;\r\n\r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n\r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n px1,\r\n py1,\r\n px2,\r\n py2,\r\n halfLineWidth,\r\n halfLineWidth,\r\n lineWidth,\r\n i - 2,\r\n (src.closePath) ? (i === pathLength - 1) : false\r\n );\r\n\r\n px1 = px2;\r\n py1 = py2;\r\n }\r\n};\r\n\r\nmodule.exports = StrokePathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcRender = __webpack_require__(/*! ./ArcRender */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GeomCircle = __webpack_require__(/*! ../../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n * \r\n * Arcs also have an `iterations` property and corresponding `setIterations` method. This allows\r\n * you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction.\r\n *\r\n * @class Arc\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Arc = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n ArcRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Arc (scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 128; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n\r\n Shape.call(this, scene, \'Arc\', new GeomCircle(0, 0, radius));\r\n\r\n /**\r\n * Private internal value. Holds the start angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_startAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startAngle = startAngle;\r\n\r\n /**\r\n * Private internal value. Holds the end angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_endAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endAngle = endAngle;\r\n\r\n /**\r\n * Private internal value. Holds the winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#_anticlockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._anticlockwise = anticlockwise;\r\n\r\n /**\r\n * Private internal value. Holds the number of iterations used when drawing the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#_iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._iterations = 0.01;\r\n\r\n this.setPosition(x, y);\r\n\r\n var diameter = this.geom.radius * 2;\r\n this.setSize(diameter, diameter);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n *\r\n * @name Phaser.GameObjects.Arc#iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.13.0\r\n */\r\n iterations: {\r\n\r\n get: function ()\r\n {\r\n return this._iterations;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._iterations = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#radius\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.geom.radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.geom.radius = value;\r\n\r\n var diameter = value * 2;\r\n this.setSize(diameter, diameter);\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#startAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._startAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#endAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._endAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#anticlockwise\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n anticlockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._anticlockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._anticlockwise = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the radius of the arc.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRadius: function (value)\r\n {\r\n this.radius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setIterations\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the iterations to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setIterations: function (value)\r\n {\r\n if (value === undefined) { value = 0.01; }\r\n\r\n this.iterations = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the starting angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setStartAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the starting angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStartAngle: function (angle, anticlockwise)\r\n {\r\n this._startAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the ending angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setEndAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the ending angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setEndAngle: function (angle, anticlockwise)\r\n {\r\n this._endAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Arc#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var step = this._iterations;\r\n var iteration = step;\r\n\r\n var radius = this.geom.radius;\r\n var startAngle = DegToRad(this._startAngle);\r\n var endAngle = DegToRad(this._endAngle);\r\n var anticlockwise = this._anticlockwise;\r\n\r\n var x = radius;\r\n var y = radius;\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -MATH_CONST.PI2)\r\n {\r\n endAngle = -MATH_CONST.PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n }\r\n else if (endAngle > MATH_CONST.PI2)\r\n {\r\n endAngle = MATH_CONST.PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n\r\n var path = [ x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius ];\r\n\r\n var ta;\r\n\r\n while (iteration < 1)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n iteration += step;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n path.push(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Arc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/Arc.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var radius = src.radius;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.arc(\r\n (radius) - src.originX * (radius * 2),\r\n (radius) - src.originY * (radius * 2),\r\n radius,\r\n DegToRad(src._startAngle),\r\n DegToRad(src._endAngle),\r\n src.anticlockwise\r\n );\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = ArcCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arc = __webpack_require__(/*! ./Arc */ \"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Arc Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n * \r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#arc\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('arc', function (x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha));\r\n});\r\n\r\n/**\r\n * Creates a new Circle Shape Game Object and adds it to the Scene.\r\n * \r\n * A Circle is an Arc with no defined start and end angle, making it render as a complete circle.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#circle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the circle.\r\n * @param {number} [fillColor] - The color the circle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, 0, 360, false, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ArcWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ArcCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = ArcWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/Curve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CurveRender = __webpack_require__(/*! ./CurveRender */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Rectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Curve\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Curve = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n CurveRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Curve (scene, x, y, curve, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Curve\', curve);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Curve#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 32;\r\n\r\n /**\r\n * Private internal value.\r\n * The Curve bounds rectangle.\r\n *\r\n * @name Phaser.GameObjects.Curve#_curveBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._curveBounds = new Rectangle();\r\n\r\n this.closePath = false;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Curve#smoothness\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Curve#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Curve#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var bounds = this._curveBounds;\r\n var smoothness = this._smoothness;\r\n\r\n // Update the bounds in case the underlying data has changed\r\n this.geom.getBounds(bounds, smoothness);\r\n\r\n this.setSize(bounds.width, bounds.height);\r\n this.updateDisplayOrigin();\r\n\r\n var path = [];\r\n var points = this.geom.getPoints(smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/Curve.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n \r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = CurveCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js");\r\n\r\n/**\r\n * Creates a new Curve Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Curve Game Object has been built into Phaser.\r\n * \r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#curve\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Curve} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'curve\', function (x, y, curve, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Curve(this.scene, x, y, curve, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./CurveWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./CurveCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = CurveWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar EllipseRender = __webpack_require__(/*! ./EllipseRender */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js");\r\nvar GeomEllipse = __webpack_require__(/*! ../../../geom/ellipse/Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n EllipseRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Ellipse (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Ellipse\', new GeomEllipse(width / 2, height / 2, width, height));\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 64;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#smoothness\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSize\r\n * @since 3.13.0\r\n * \r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.geom.setSize(width, height);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.getPoints(this._smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = EllipseCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Ellipse Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Ellipse Game Object has been built into Phaser.\r\n * \r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#ellipse\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Ellipse} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'ellipse\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Ellipse(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./EllipseWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./EllipseCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = EllipseWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/Grid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GridRender = __webpack_require__(/*! ./GridRender */ "./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @class Grid\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells. See the `setOutline` method.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n */\r\nvar Grid = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n GridRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Grid (scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n if (cellWidth === undefined) { cellWidth = 32; }\r\n if (cellHeight === undefined) { cellHeight = 32; }\r\n\r\n Shape.call(this, scene, \'Grid\', null);\r\n\r\n /**\r\n * The width of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellWidth = cellWidth;\r\n\r\n /**\r\n * The height of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellHeight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellHeight = cellHeight;\r\n\r\n /**\r\n * Will the grid render its cells in the `fillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showCells = true;\r\n\r\n /**\r\n * The color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillColor = 0;\r\n\r\n /**\r\n * The alpha value for the color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillAlpha = 0;\r\n\r\n /**\r\n * Will the grid display the lines between each cell when it renders?\r\n *\r\n * @name Phaser.GameObjects.Grid#showOutline\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showOutline = true;\r\n\r\n /**\r\n * Will the grid render the alternating cells in the `altFillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showAltCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showAltCells = false;\r\n\r\n /**\r\n * The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillColor;\r\n\r\n /**\r\n * The alpha the alternating grid cells will be filled with.\r\n * You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillAlpha;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n if (outlineFillColor !== undefined)\r\n {\r\n this.setOutlineStyle(outlineFillColor, outlineFillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level the grid cells will use when rendering.\r\n * \r\n * If this method is called with no values then the grid cells will not be rendered, \r\n * however the grid lines and alternating cells may still be.\r\n * \r\n * Also see the `setOutlineStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showCells = false;\r\n }\r\n else\r\n {\r\n this.fillColor = fillColor;\r\n this.fillAlpha = fillAlpha;\r\n this.showCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the alternating grid cells will use.\r\n * \r\n * If this method is called with no values then alternating grid cells will not be rendered in a different color.\r\n * \r\n * Also see the `setOutlineStyle` and `setFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setAltFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAltFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showAltCells = false;\r\n }\r\n else\r\n {\r\n this.altFillColor = fillColor;\r\n this.altFillAlpha = fillAlpha;\r\n this.showAltCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the lines between each grid cell will use.\r\n * \r\n * If this method is called with no values then the grid lines will not be rendered at all, however\r\n * the cells themselves may still be if they have colors set.\r\n * \r\n * Also see the `setFillStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setOutlineStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOutlineStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showOutline = false;\r\n }\r\n else\r\n {\r\n this.outlineFillColor = fillColor;\r\n this.outlineFillAlpha = fillAlpha;\r\n this.showOutline = true;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Grid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/Grid.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = -src._displayOriginX;\r\n var dy = -src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src, src.altFillColor, src.altFillAlpha * alpha);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n LineStyleCanvas(ctx, src, src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1 + dx, dy);\r\n ctx.lineTo(x1 + dx, height + dy);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(dx, y1 + dy);\r\n ctx.lineTo(dx + width, y1 + dy);\r\n\r\n ctx.stroke();\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = GridCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Grid = __webpack_require__(/*! ./Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js");\r\n\r\n/**\r\n * Creates a new Grid Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Grid Game Object has been built into Phaser.\r\n * \r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#grid\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n *\r\n * @return {Phaser.GameObjects.Grid} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'grid\', function (x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n{\r\n return this.displayList.add(new Grid(this.scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GridWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GridCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n calcMatrix.translate(-src._displayOriginX, -src._displayOriginY);\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var fillTint;\r\n var fillTintColor;\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.altFillColor, src.altFillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(x1, 0, x1, height, 1, 1, 1, 0, false);\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(0, y1, width, y1, 1, 1, 1, 0, false);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GridWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsoBoxRender = __webpack_require__(/*! ./IsoBoxRender */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @class IsoBox\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n */\r\nvar IsoBox = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoBoxRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoBox (scene, x, y, size, height, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoBox', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso box will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso box.\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso box.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso box.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso box.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoBox;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, -1);\r\n ctx.lineTo(0, sizeB - 1);\r\n ctx.lineTo(-sizeA, -1);\r\n ctx.lineTo(-sizeA, -height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n \r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(-sizeA, -height);\r\n ctx.lineTo(-sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoBox = __webpack_require__(/*! ./IsoBox */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js\");\r\n\r\n/**\r\n * Creates a new IsoBox Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoBox Game Object has been built into Phaser.\r\n * \r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isobox\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n *\r\n * @return {Phaser.GameObjects.IsoBox} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoBox(this.scene, x, y, size, height, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoBoxWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoBoxCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n x3 = calcMatrix.getX(0, sizeB - height);\r\n y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(-sizeA, -height);\r\n y3 = calcMatrix.getY(-sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(sizeA, -height);\r\n y3 = calcMatrix.getY(sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar IsoTriangleRender = __webpack_require__(/*! ./IsoTriangleRender */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @class IsoTriangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n */\r\nvar IsoTriangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoTriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoTriangle (scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (reversed === undefined) { reversed = false; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoTriangle', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso triangle. This is only used if the triangle is reversed.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#isReversed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.isReversed = reversed;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setReversed\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} reversed - Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setReversed: function (reversed)\r\n {\r\n this.isReversed = reversed;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso triangle will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso triangle (only if `reversed` is true)\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso triangle.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso triangle.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso triangle.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso triangle.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB - height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoTriangle = __webpack_require__(/*! ./IsoTriangle */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js\");\r\n\r\n/**\r\n * Creates a new IsoTriangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser.\r\n * \r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isotriangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n *\r\n * @return {Phaser.GameObjects.IsoTriangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isotriangle', function (x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoTriangle(this.scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoTriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoTriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n var x3 = calcMatrix.getX(0, sizeB - height);\r\n var y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(sizeA, -height);\r\n y0 = calcMatrix.getY(sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomLine = __webpack_require__(/*! ../../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar LineRender = __webpack_require__(/*! ./LineRender */ "./node_modules/phaser/src/gameobjects/shape/line/LineRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * Be aware that as with all Game Objects the default origin is 0.5. If you need to draw a Line\r\n * between two points and want the x1/y1 values to match the x/y values, then set the origin to 0.\r\n *\r\n * @class Line\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Line = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n LineRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Line (scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 128; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n Shape.call(this, scene, \'Line\', new GeomLine(x1, y1, x2, y2));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n /**\r\n * The width (or thickness) of the line.\r\n * See the setLineWidth method for extra details on changing this on WebGL.\r\n *\r\n * @name Phaser.GameObjects.Line#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the start width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_startWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the end width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_endWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endWidth = 1;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (strokeColor !== undefined)\r\n {\r\n this.setStrokeStyle(1, strokeColor, strokeAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the width of the line.\r\n * \r\n * When using the WebGL renderer you can have different start and end widths.\r\n * When using the Canvas renderer only the `startWidth` value is used. The `endWidth` is ignored.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Line#setLineWidth\r\n * @since 3.13.0\r\n * \r\n * @param {number} startWidth - The start width of the line.\r\n * @param {number} [endWidth] - The end width of the line. Only used in WebGL.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setLineWidth: function (startWidth, endWidth)\r\n {\r\n if (endWidth === undefined) { endWidth = startWidth; }\r\n\r\n this._startWidth = startWidth;\r\n this._endWidth = endWidth;\r\n\r\n this.lineWidth = startWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start and end coordinates of this Line.\r\n *\r\n * @method Phaser.GameObjects.Line#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=0] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/Line.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(src.geom.x1 - dx, src.geom.y1 - dy);\r\n ctx.lineTo(src.geom.x2 - dx, src.geom.y2 - dy);\r\n \r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = LineCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js");\r\n\r\n/**\r\n * Creates a new Line Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Line Game Object has been built into Phaser.\r\n * \r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#line\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Line} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'line\', function (x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n{\r\n return this.displayList.add(new Line(this.scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./LineWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./LineCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineRender.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isStroked)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n var startWidth = src._startWidth;\r\n var endWidth = src._endWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n src.geom.x1 - dx,\r\n src.geom.y1 - dy,\r\n src.geom.x2 - dx,\r\n src.geom.y2 - dy,\r\n startWidth,\r\n endWidth,\r\n 1,\r\n 0,\r\n false,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n};\r\n\r\nmodule.exports = LineWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PolygonRender = __webpack_require__(/*! ./PolygonRender */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GetAABB = __webpack_require__(/*! ../../../geom/polygon/GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nvar GeomPolygon = __webpack_require__(/*! ../../../geom/polygon/Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar Smooth = __webpack_require__(/*! ../../../geom/polygon/Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `\'40 0 40 20 100 20 100 80 40 80 40 100 0 50\'`\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @class Polygon\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Polygon = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n PolygonRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Polygon (scene, x, y, points, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Polygon\', new GeomPolygon(points));\r\n\r\n var bounds = GetAABB(this.geom);\r\n\r\n this.setPosition(x, y);\r\n this.setSize(bounds.width, bounds.height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Smooths the polygon over the number of iterations specified.\r\n * The base polygon data will be updated and replaced with the smoothed values.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Polygon#smooth\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [iterations=1] - The number of times to apply the polygon smoothing.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n smooth: function (iterations)\r\n {\r\n if (iterations === undefined) { iterations = 1; }\r\n\r\n for (var i = 0; i < iterations; i++)\r\n {\r\n Smooth(this.geom);\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Polygon#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.points;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = PolygonCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js");\r\n\r\n/**\r\n * Creates a new Polygon Shape Game Object and adds it to the Scene.\r\n * \r\n * Note: This method will only be available if the Polygon Game Object has been built into Phaser.\r\n * \r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#polygon\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Polygon} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'polygon\', function (x, y, points, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Polygon(this.scene, x, y, points, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./PolygonWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./PolygonCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = PolygonWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GeomRectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar RectangleRender = __webpack_require__(/*! ./RectangleRender */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @class Rectangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n RectangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Rectangle (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Rectangle\', new GeomRectangle(0, 0, width, height));\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var rect = this.geom;\r\n var line = this._tempLine;\r\n\r\n rect.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n rect.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineD(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n \r\n ctx.fillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.rect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = RectangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Rectangle Game Object has been built into Phaser.\r\n * \r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#rectangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Rectangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'rectangle\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Rectangle(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RectangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RectangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = RectangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/Star.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StarRender = __webpack_require__(/*! ./StarRender */ "./node_modules/phaser/src/gameobjects/shape/star/StarRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you\'ll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how \'long\' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @class Star\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Star = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n StarRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Star (scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (points === undefined) { points = 5; }\r\n if (innerRadius === undefined) { innerRadius = 32; }\r\n if (outerRadius === undefined) { outerRadius = 64; }\r\n\r\n Shape.call(this, scene, \'Star\', null);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points in the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_points\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._points = points;\r\n\r\n /**\r\n * Private internal value.\r\n * The inner radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_innerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._innerRadius = innerRadius;\r\n\r\n /**\r\n * Private internal value.\r\n * The outer radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_outerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._outerRadius = outerRadius;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(outerRadius * 2, outerRadius * 2);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the number of points that make up the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setPoints\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The amount of points the Star will have.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPoints: function (value)\r\n {\r\n this._points = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the inner radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setInnerRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the inner radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setInnerRadius: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the outer radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setOuterRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the outer radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOuterRadius: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * The number of points that make up the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#points\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.13.0\r\n */\r\n points: {\r\n\r\n get: function ()\r\n {\r\n return this._points;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._points = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The inner radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#innerRadius\r\n * @type {number}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n innerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._innerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The outer radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#outerRadius\r\n * @type {number}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n outerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._outerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Star#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n\r\n var points = this._points;\r\n var innerRadius = this._innerRadius;\r\n var outerRadius = this._outerRadius;\r\n\r\n var rot = Math.PI / 2 * 3;\r\n var step = Math.PI / points;\r\n\r\n // So origin 0.5 = the center of the star\r\n var x = outerRadius;\r\n var y = outerRadius;\r\n \r\n path.push(x, y + -outerRadius);\r\n\r\n for (var i = 0; i < points; i++)\r\n {\r\n path.push(x + Math.cos(rot) * outerRadius, y + Math.sin(rot) * outerRadius);\r\n\r\n rot += step;\r\n\r\n path.push(x + Math.cos(rot) * innerRadius, y + Math.sin(rot) * innerRadius);\r\n \r\n rot += step;\r\n }\r\n\r\n path.push(x, y + -outerRadius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Star;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/Star.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = StarCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Star = __webpack_require__(/*! ./Star */ \"./node_modules/phaser/src/gameobjects/shape/star/Star.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Star Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Star Game Object has been built into Phaser.\r\n * \r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how 'long' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#star\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Star} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('star', function (x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Star(this.scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/star/StarRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StarWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StarCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarRender.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = StarWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomTriangle = __webpack_require__(/*! ../../../geom/triangle/Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\nvar TriangleRender = __webpack_require__(/*! ./TriangleRender */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @class Triangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Triangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n TriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Triangle (scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 128; }\r\n if (x2 === undefined) { x2 = 64; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 128; }\r\n if (y3 === undefined) { y3 = 128; }\r\n\r\n Shape.call(this, scene, \'Triangle\', new GeomTriangle(x1, y1, x2, y2, x3, y3));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the data for the lines that make up this Triangle shape.\r\n *\r\n * @method Phaser.GameObjects.Triangle#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=0] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=0] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=0] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=0] - The vertical position of the third point in the triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Triangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var tri = this.geom;\r\n var line = this._tempLine;\r\n\r\n tri.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n tri.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n tri.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x3, y3);\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = TriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js");\r\n\r\n/**\r\n * Creates a new Triangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Triangle Game Object has been built into Phaser.\r\n * \r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#triangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Triangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'triangle\', function (x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Triangle(this.scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillTriangle(\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n x3,\r\n y3,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = TriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/sprite/Sprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar SpriteRender = __webpack_require__(/*! ./SpriteRender */ "./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n SpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Sprite (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Sprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Animation Controller of this Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite#anims\r\n * @type {Phaser.GameObjects.Components.Animation}\r\n * @since 3.0.0\r\n */\r\n this.anims = new Components.Animation(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Update this Sprite\'s animations.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n },\r\n\r\n /**\r\n * Start playing the given animation.\r\n *\r\n * @method Phaser.GameObjects.Sprite#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} This Game Object.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n this.anims.play(key, ignoreIfPlaying, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Sprite.\r\n *\r\n * @method Phaser.GameObjects.Sprite#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n var data = Components.ToJSON(this);\r\n\r\n // Extra Sprite data is added here\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the Sprite, which removes the Animation component.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preDestroy\r\n * @private\r\n * @since 3.14.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.anims.destroy();\r\n\r\n this.anims = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/Sprite.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite', function (x, y, key, frame)\r\n{\r\n var sprite = new Sprite(this.scene, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./SpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./SpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/GetTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns an object containing dimensions of the Text object.\r\n *\r\n * @function Phaser.GameObjects.Text.GetTextSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from.\r\n * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size.\r\n * @param {array} lines - The lines of text to calculate the size from.\r\n *\r\n * @return {object} An object containing dimensions of the Text object.\r\n */\r\nvar GetTextSize = function (text, size, lines)\r\n{\r\n var canvas = text.canvas;\r\n var context = text.context;\r\n var style = text.style;\r\n\r\n var lineWidths = [];\r\n var maxLineWidth = 0;\r\n var drawnLines = lines.length;\r\n\r\n if (style.maxLines > 0 && style.maxLines < lines.length)\r\n {\r\n drawnLines = style.maxLines;\r\n }\r\n\r\n style.syncFont(canvas, context);\r\n\r\n // Text Width\r\n\r\n for (var i = 0; i < drawnLines; i++)\r\n {\r\n var lineWidth = style.strokeThickness;\r\n\r\n lineWidth += context.measureText(lines[i]).width;\r\n\r\n // Adjust for wrapped text\r\n if (style.wordWrap)\r\n {\r\n lineWidth -= context.measureText(' ').width;\r\n }\r\n\r\n lineWidths[i] = Math.ceil(lineWidth);\r\n maxLineWidth = Math.max(maxLineWidth, lineWidths[i]);\r\n }\r\n\r\n // Text Height\r\n\r\n var lineHeight = size.fontSize + style.strokeThickness;\r\n var height = lineHeight * drawnLines;\r\n var lineSpacing = text.lineSpacing;\r\n\r\n // Adjust for line spacing\r\n if (drawnLines > 1)\r\n {\r\n height += lineSpacing * (drawnLines - 1);\r\n }\r\n\r\n return {\r\n width: maxLineWidth,\r\n height: height,\r\n lines: drawnLines,\r\n lineWidths: lineWidths,\r\n lineSpacing: lineSpacing,\r\n lineHeight: lineHeight\r\n };\r\n};\r\n\r\nmodule.exports = GetTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/GetTextSize.js?")},"./node_modules/phaser/src/gameobjects/text/MeasureText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Calculates the ascent, descent and fontSize of a given font style.\r\n *\r\n * @function Phaser.GameObjects.Text.MeasureText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure.\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle.\r\n */\r\nvar MeasureText = function (textStyle)\r\n{\r\n // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered.\r\n var canvas = CanvasPool.create(this);\r\n\r\n // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to.\r\n var context = canvas.getContext('2d');\r\n\r\n textStyle.syncFont(canvas, context);\r\n\r\n var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX);\r\n var baseline = width;\r\n var height = 2 * baseline;\r\n\r\n baseline = baseline * textStyle.baselineY | 0;\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n context.fillStyle = '#f00';\r\n context.fillRect(0, 0, width, height);\r\n\r\n context.font = textStyle._font;\r\n\r\n context.textBaseline = 'alphabetic';\r\n context.fillStyle = '#000';\r\n context.fillText(textStyle.testString, 0, baseline);\r\n\r\n var output = {\r\n ascent: 0,\r\n descent: 0,\r\n fontSize: 0\r\n };\r\n\r\n if (!context.getImageData(0, 0, width, height))\r\n {\r\n output.ascent = baseline;\r\n output.descent = baseline + 6;\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n }\r\n\r\n var imagedata = context.getImageData(0, 0, width, height).data;\r\n var pixels = imagedata.length;\r\n var line = width * 4;\r\n var i;\r\n var j;\r\n var idx = 0;\r\n var stop = false;\r\n\r\n // ascent. scan from top to bottom until we find a non red pixel\r\n for (i = 0; i < baseline; i++)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx += line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.ascent = baseline - i;\r\n\r\n idx = pixels - line;\r\n stop = false;\r\n\r\n // descent. scan from bottom to top until we find a non red pixel\r\n for (i = height; i > baseline; i--)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx -= line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.descent = (i - baseline);\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MeasureText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/MeasureText.js?")},"./node_modules/phaser/src/gameobjects/text/TextStyle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MeasureText = __webpack_require__(/*! ./MeasureText */ \"./node_modules/phaser/src/gameobjects/text/MeasureText.js\");\r\n\r\n// Key: [ Object Key, Default Value ]\r\n\r\nvar propertyMap = {\r\n fontFamily: [ 'fontFamily', 'Courier' ],\r\n fontSize: [ 'fontSize', '16px' ],\r\n fontStyle: [ 'fontStyle', '' ],\r\n backgroundColor: [ 'backgroundColor', null ],\r\n color: [ 'color', '#fff' ],\r\n stroke: [ 'stroke', '#fff' ],\r\n strokeThickness: [ 'strokeThickness', 0 ],\r\n shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n shadowColor: [ 'shadow.color', '#000' ],\r\n shadowBlur: [ 'shadow.blur', 0 ],\r\n shadowStroke: [ 'shadow.stroke', false ],\r\n shadowFill: [ 'shadow.fill', false ],\r\n align: [ 'align', 'left' ],\r\n maxLines: [ 'maxLines', 0 ],\r\n fixedWidth: [ 'fixedWidth', 0 ],\r\n fixedHeight: [ 'fixedHeight', 0 ],\r\n resolution: [ 'resolution', 0 ],\r\n rtl: [ 'rtl', false ],\r\n testString: [ 'testString', '|MÉqgy' ],\r\n baselineX: [ 'baselineX', 1.2 ],\r\n baselineY: [ 'baselineY', 1.4 ],\r\n wordWrapWidth: [ 'wordWrap.width', null ],\r\n wordWrapCallback: [ 'wordWrap.callback', null ],\r\n wordWrapCallbackScope: [ 'wordWrap.callbackScope', null ],\r\n wordWrapUseAdvanced: [ 'wordWrap.useAdvancedWrap', false ]\r\n};\r\n\r\n/**\r\n * @classdesc\r\n * A TextStyle class manages all of the style settings for a Text object.\r\n * \r\n * Text Game Objects create a TextStyle instance automatically, which is\r\n * accessed via the `Text.style` property. You do not normally need to\r\n * instantiate one yourself.\r\n *\r\n * @class TextStyle\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n */\r\nvar TextStyle = new Class({\r\n\r\n initialize:\r\n\r\n function TextStyle (text, style)\r\n {\r\n /**\r\n * The Text object that this TextStyle is styling.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#parent\r\n * @type {Phaser.GameObjects.Text}\r\n * @since 3.0.0\r\n */\r\n this.parent = text;\r\n\r\n /**\r\n * The font family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontFamily\r\n * @type {string}\r\n * @default 'Courier'\r\n * @since 3.0.0\r\n */\r\n this.fontFamily;\r\n\r\n /**\r\n * The font size.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontSize\r\n * @type {string}\r\n * @default '16px'\r\n * @since 3.0.0\r\n */\r\n this.fontSize;\r\n\r\n /**\r\n * The font style.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontStyle\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.fontStyle;\r\n\r\n /**\r\n * The background color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#backgroundColor\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor;\r\n\r\n /**\r\n * The text fill color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#color\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.color;\r\n\r\n /**\r\n * The text stroke color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#stroke\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.stroke;\r\n\r\n /**\r\n * The text stroke thickness.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#strokeThickness\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.strokeThickness;\r\n\r\n /**\r\n * The horizontal shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetX;\r\n\r\n /**\r\n * The vertical shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetY;\r\n\r\n /**\r\n * The shadow color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowColor\r\n * @type {string}\r\n * @default '#000'\r\n * @since 3.0.0\r\n */\r\n this.shadowColor;\r\n\r\n /**\r\n * The shadow blur radius.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowBlur\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowBlur;\r\n\r\n /**\r\n * Whether shadow stroke is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowStroke\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowStroke;\r\n\r\n /**\r\n * Whether shadow fill is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowFill;\r\n\r\n /**\r\n * The text alignment.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#align\r\n * @type {string}\r\n * @default 'left'\r\n * @since 3.0.0\r\n */\r\n this.align;\r\n\r\n /**\r\n * The maximum number of lines to draw.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#maxLines\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxLines;\r\n\r\n /**\r\n * The fixed width of the text.\r\n *\r\n * `0` means no fixed with.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedWidth;\r\n\r\n /**\r\n * The fixed height of the text.\r\n *\r\n * `0` means no fixed height.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedHeight;\r\n\r\n /**\r\n * The resolution the text is rendered to its internal canvas at.\r\n * The default is 0, which means it will use the resolution set in the Game Config.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#resolution\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.resolution;\r\n\r\n /**\r\n * Whether the text should render right to left.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#rtl\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rtl;\r\n\r\n /**\r\n * The test string to use when measuring the font.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#testString\r\n * @type {string}\r\n * @default '|MÉqgy'\r\n * @since 3.0.0\r\n */\r\n this.testString;\r\n\r\n /**\r\n * The amount of horizontal padding added to the width of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineX\r\n * @type {number}\r\n * @default 1.2\r\n * @since 3.3.0\r\n */\r\n this.baselineX;\r\n\r\n /**\r\n * The amount of vertical padding added to the height of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineY\r\n * @type {number}\r\n * @default 1.4\r\n * @since 3.3.0\r\n */\r\n this.baselineY;\r\n\r\n /**\r\n * The font style, size and family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#_font\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._font;\r\n\r\n // Set to defaults + user style\r\n this.setStyle(style, false, true);\r\n\r\n var metrics = GetValue(style, 'metrics', false);\r\n\r\n // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning\r\n // Doing this is reset if you then change the font of this TextStyle after creation\r\n if (metrics)\r\n {\r\n this.metrics = {\r\n ascent: GetValue(metrics, 'ascent', 0),\r\n descent: GetValue(metrics, 'descent', 0),\r\n fontSize: GetValue(metrics, 'fontSize', 0)\r\n };\r\n }\r\n else\r\n {\r\n this.metrics = MeasureText(this);\r\n }\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStyle: function (style, updateText, setDefaults)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n if (setDefaults === undefined) { setDefaults = false; }\r\n\r\n // Avoid type mutation\r\n if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number')\r\n {\r\n style.fontSize = style.fontSize.toString() + 'px';\r\n }\r\n\r\n for (var key in propertyMap)\r\n {\r\n var value = (setDefaults) ? propertyMap[key][1] : this[key];\r\n\r\n if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope')\r\n {\r\n // Callback & scope should be set without processing the values\r\n this[key] = GetValue(style, propertyMap[key][0], value);\r\n }\r\n else\r\n {\r\n this[key] = GetAdvancedValue(style, propertyMap[key][0], value);\r\n }\r\n }\r\n\r\n // Allow for 'font' override\r\n var font = GetValue(style, 'font', null);\r\n\r\n if (font !== null)\r\n {\r\n this.setFont(font, false);\r\n }\r\n\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n // Allow for 'fill' to be used in place of 'color'\r\n var fill = GetValue(style, 'fill', null);\r\n\r\n if (fill !== null)\r\n {\r\n this.color = fill;\r\n }\r\n\r\n if (updateText)\r\n {\r\n return this.update(true);\r\n }\r\n else\r\n {\r\n return this.parent;\r\n }\r\n },\r\n\r\n /**\r\n * Synchronize the font settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncFont\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncFont: function (canvas, context)\r\n {\r\n context.font = this._font;\r\n },\r\n\r\n /**\r\n * Synchronize the text style settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncStyle\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncStyle: function (canvas, context)\r\n {\r\n context.textBaseline = 'alphabetic';\r\n\r\n context.fillStyle = this.color;\r\n context.strokeStyle = this.stroke;\r\n\r\n context.lineWidth = this.strokeThickness;\r\n context.lineCap = 'round';\r\n context.lineJoin = 'round';\r\n },\r\n\r\n /**\r\n * Synchronize the shadow settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncShadow\r\n * @since 3.0.0\r\n *\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {boolean} enabled - Whether shadows are enabled or not.\r\n */\r\n syncShadow: function (context, enabled)\r\n {\r\n if (enabled)\r\n {\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n }\r\n else\r\n {\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n context.shadowColor = 0;\r\n context.shadowBlur = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Update the style settings for the parent Text object.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#update\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n update: function (recalculateMetrics)\r\n {\r\n if (recalculateMetrics)\r\n {\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n this.metrics = MeasureText(this);\r\n }\r\n\r\n return this.parent.updateText();\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} font - The font family or font settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFont: function (font, updateText)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n\r\n var fontFamily = font;\r\n var fontSize = '';\r\n var fontStyle = '';\r\n\r\n if (typeof font !== 'string')\r\n {\r\n fontFamily = GetValue(font, 'fontFamily', 'Courier');\r\n fontSize = GetValue(font, 'fontSize', '16px');\r\n fontStyle = GetValue(font, 'fontStyle', '');\r\n }\r\n else\r\n {\r\n var fontSplit = font.split(' ');\r\n\r\n var i = 0;\r\n\r\n fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : '';\r\n fontSize = fontSplit[i++] || '16px';\r\n fontFamily = fontSplit[i++] || 'Courier';\r\n }\r\n\r\n if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle)\r\n {\r\n this.fontFamily = fontFamily;\r\n this.fontSize = fontSize;\r\n this.fontStyle = fontStyle;\r\n\r\n if (updateText)\r\n {\r\n this.update(true);\r\n }\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n if (this.fontFamily !== family)\r\n {\r\n this.fontFamily = family;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n if (this.fontStyle !== style)\r\n {\r\n this.fontStyle = style;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {(number|string)} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n if (typeof size === 'number')\r\n {\r\n size = size.toString() + 'px';\r\n }\r\n\r\n if (this.fontSize !== size)\r\n {\r\n this.fontSize = size;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the test string to use when measuring the font.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setTestString\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The test string to use when measuring the font.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setTestString: function (string)\r\n {\r\n this.testString = string;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set.\r\n * @param {number} height - The fixed height to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n this.fixedWidth = width;\r\n this.fixedHeight = height;\r\n\r\n if (width)\r\n {\r\n this.parent.width = width;\r\n }\r\n\r\n if (height)\r\n {\r\n this.parent.height = height;\r\n }\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n this.backgroundColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFill: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the resolution used by the Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method. It allows for much clearer text on High DPI devices,\r\n * at the cost of memory because it uses larger internal Canvas textures for the Text.\r\n * \r\n * Please use with caution, as the more high res Text you have, the more memory it uses up.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n this.resolution = value;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n if (thickness === undefined) { thickness = this.strokeThickness; }\r\n\r\n if (color === undefined && this.strokeThickness !== 0)\r\n {\r\n // Reset the stroke to zero (disabling it)\r\n this.strokeThickness = 0;\r\n\r\n this.update(true);\r\n }\r\n else if (this.stroke !== color || this.strokeThickness !== thickness)\r\n {\r\n this.stroke = color;\r\n this.strokeThickness = thickness;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n * \r\n * Calling this method always re-measures the parent Text object,\r\n * so only call it when you actually change the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (color === undefined) { color = '#000'; }\r\n if (blur === undefined) { blur = 0; }\r\n if (shadowStroke === undefined) { shadowStroke = false; }\r\n if (shadowFill === undefined) { shadowFill = true; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n this.shadowColor = color;\r\n this.shadowBlur = blur;\r\n this.shadowStroke = shadowStroke;\r\n this.shadowFill = shadowFill;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} [color='#000'] - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n if (color === undefined) { color = '#000'; }\r\n\r\n this.shadowColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n if (blur === undefined) { blur = 0; }\r\n\r\n this.shadowBlur = blur;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n this.shadowStroke = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n this.shadowFill = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n if (useAdvancedWrap === undefined) { useAdvancedWrap = false; }\r\n\r\n this.wordWrapWidth = width;\r\n this.wordWrapUseAdvanced = useAdvancedWrap;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n if (scope === undefined) { scope = null; }\r\n\r\n this.wordWrapCallback = callback;\r\n this.wordWrapCallbackScope = scope;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n if (align === undefined) { align = 'left'; }\r\n\r\n this.align = align;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n if (max === undefined) { max = 0; }\r\n\r\n this.maxLines = max;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n var metrics = this.metrics;\r\n\r\n return {\r\n ascent: metrics.ascent,\r\n descent: metrics.descent,\r\n fontSize: metrics.fontSize\r\n };\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Text Style.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {};\r\n\r\n for (var key in propertyMap)\r\n {\r\n output[key] = this[key];\r\n }\r\n\r\n output.metrics = this.getTextMetrics();\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Destroy this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextStyle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/TextStyle.js?")},"./node_modules/phaser/src/gameobjects/text/static/Text.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../../../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetTextSize = __webpack_require__(/*! ../GetTextSize */ \"./node_modules/phaser/src/gameobjects/text/GetTextSize.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar TextRender = __webpack_require__(/*! ./TextRender */ \"./node_modules/phaser/src/gameobjects/text/static/TextRender.js\");\r\nvar TextStyle = __webpack_require__(/*! ../TextStyle */ \"./node_modules/phaser/src/gameobjects/text/TextStyle.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either\r\n * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: '\"Roboto Condensed\"' });\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, \"Times New Roman\", Tahoma, serif' });\r\n * ```\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * @class Text\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object.\r\n */\r\nvar Text = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TextRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Text (scene, x, y, text, style)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n GameObject.call(this, scene, 'Text');\r\n\r\n /**\r\n * The renderer in use by this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.12.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n /**\r\n * The canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = CanvasPool.create(this);\r\n\r\n /**\r\n * The context of the canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * The Text Style object.\r\n *\r\n * Manages the style of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#style\r\n * @type {Phaser.GameObjects.TextStyle}\r\n * @since 3.0.0\r\n */\r\n this.style = new TextStyle(this, style);\r\n\r\n /**\r\n * Whether to automatically round line positions.\r\n *\r\n * @name Phaser.GameObjects.Text#autoRound\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.autoRound = true;\r\n\r\n /**\r\n * The Regular Expression that is used to split the text up into lines, in\r\n * multi-line text. By default this is `/(?:\\r\\n|\\r|\\n)/`.\r\n * You can change this RegExp to be anything else that you may need.\r\n *\r\n * @name Phaser.GameObjects.Text#splitRegExp\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.splitRegExp = /(?:\\r\\n|\\r|\\n)/;\r\n\r\n /**\r\n * The text to display.\r\n *\r\n * @name Phaser.GameObjects.Text#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._text = undefined;\r\n\r\n /**\r\n * Specify a padding value which is added to the line width and height when calculating the Text size.\r\n * Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions.\r\n *\r\n * @name Phaser.GameObjects.Text#padding\r\n * @type {{left:number,right:number,top:number,bottom:number}}\r\n * @since 3.0.0\r\n */\r\n this.padding = { left: 0, right: 0, top: 0, bottom: 0 };\r\n\r\n /**\r\n * The width of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#width\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.width = 1;\r\n\r\n /**\r\n * The height of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#height\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.height = 1;\r\n\r\n /**\r\n * The line spacing value.\r\n * This value is added to the font height to calculate the overall line height.\r\n * Only has an effect if this Text object contains multiple lines of text.\r\n * \r\n * If you update this property directly, instead of using the `setLineSpacing` method, then\r\n * be sure to call `updateText` after, or you won't see the change reflected in the Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#lineSpacing\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineSpacing = 0;\r\n\r\n /**\r\n * Whether the text or its settings have changed and need updating.\r\n *\r\n * @name Phaser.GameObjects.Text#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n // If resolution wasn't set, then we get it from the game config\r\n if (this.style.resolution === 0)\r\n {\r\n this.style.resolution = scene.sys.game.config.resolution;\r\n }\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Text#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n // Create a Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n // Get the frame\r\n this.frame = this.texture.get();\r\n\r\n // Set the resolution\r\n this.frame.source.resolution = this.style.resolution;\r\n\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n // Clear the default 1x1 glTexture, as we override it later\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n\r\n this.frame.source.glTexture = null;\r\n }\r\n\r\n this.initRTL();\r\n\r\n this.setText(text);\r\n\r\n if (style && style.padding)\r\n {\r\n this.setPadding(style.padding);\r\n }\r\n\r\n if (style && style.lineSpacing)\r\n {\r\n this.lineSpacing = style.lineSpacing;\r\n }\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.dirty = true;\r\n }, this);\r\n },\r\n\r\n /**\r\n * Initialize right to left text.\r\n *\r\n * @method Phaser.GameObjects.Text#initRTL\r\n * @since 3.0.0\r\n */\r\n initRTL: function ()\r\n {\r\n if (!this.style.rtl)\r\n {\r\n return;\r\n }\r\n\r\n // Here is where the crazy starts.\r\n //\r\n // Due to browser implementation issues, you cannot fillText BiDi text to a canvas\r\n // that is not part of the DOM. It just completely ignores the direction property.\r\n\r\n this.canvas.dir = 'rtl';\r\n\r\n // Experimental atm, but one day ...\r\n this.context.direction = 'rtl';\r\n\r\n // Add it to the DOM, but hidden within the parent canvas.\r\n this.canvas.style.display = 'none';\r\n\r\n AddToDOM(this.canvas, this.scene.sys.canvas);\r\n\r\n // And finally we set the x origin\r\n this.originX = 1;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds.\r\n *\r\n * @method Phaser.GameObjects.Text#runWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n *\r\n * @return {string} The text after wrapping has been applied.\r\n */\r\n runWordWrap: function (text)\r\n {\r\n var style = this.style;\r\n\r\n if (style.wordWrapCallback)\r\n {\r\n var wrappedLines = style.wordWrapCallback.call(style.wordWrapCallbackScope, text, this);\r\n\r\n if (Array.isArray(wrappedLines))\r\n {\r\n wrappedLines = wrappedLines.join('\\n');\r\n }\r\n\r\n return wrappedLines;\r\n }\r\n else if (style.wordWrapWidth)\r\n {\r\n if (style.wordWrapUseAdvanced)\r\n {\r\n return this.advancedWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n else\r\n {\r\n return this.basicWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n }\r\n else\r\n {\r\n return text;\r\n }\r\n },\r\n\r\n /**\r\n * Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be\r\n * trimmed of white space before processing. Throws an error if wordWrapWidth is less than a\r\n * single character.\r\n *\r\n * @method Phaser.GameObjects.Text#advancedWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n advancedWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var output = '';\r\n\r\n // Condense consecutive spaces and split into lines\r\n var lines = text\r\n .replace(/ +/gi, ' ')\r\n .split(this.splitRegExp);\r\n\r\n var linesCount = lines.length;\r\n\r\n for (var i = 0; i < linesCount; i++)\r\n {\r\n var line = lines[i];\r\n var out = '';\r\n\r\n // Trim whitespace\r\n line = line.replace(/^ *|\\s*$/gi, '');\r\n\r\n // If entire line is less than wordWrapWidth append the entire line and exit early\r\n var lineWidth = context.measureText(line).width;\r\n\r\n if (lineWidth < wordWrapWidth)\r\n {\r\n output += line + '\\n';\r\n continue;\r\n }\r\n\r\n // Otherwise, calculate new lines\r\n var currentLineWidth = wordWrapWidth;\r\n\r\n // Split into words\r\n var words = line.split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var word = words[j];\r\n var wordWithSpace = word + ' ';\r\n var wordWidth = context.measureText(wordWithSpace).width;\r\n\r\n if (wordWidth > currentLineWidth)\r\n {\r\n // Break word\r\n if (j === 0)\r\n {\r\n // Shave off letters from word until it's small enough\r\n var newWord = wordWithSpace;\r\n\r\n while (newWord.length)\r\n {\r\n newWord = newWord.slice(0, -1);\r\n wordWidth = context.measureText(newWord).width;\r\n\r\n if (wordWidth <= currentLineWidth)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n // If wordWrapWidth is too small for even a single letter, shame user\r\n // failure with a fatal error\r\n if (!newWord.length)\r\n {\r\n throw new Error('This text\\'s wordWrapWidth setting is less than a single character!');\r\n }\r\n\r\n // Replace current word in array with remainder\r\n var secondPart = word.substr(newWord.length);\r\n\r\n words[j] = secondPart;\r\n\r\n // Append first piece to output\r\n out += newWord;\r\n }\r\n\r\n // If existing word length is 0, don't include it\r\n var offset = (words[j].length) ? j : j + 1;\r\n\r\n // Collapse rest of sentence and remove any trailing white space\r\n var remainder = words.slice(offset).join(' ')\r\n .replace(/[ \\n]*$/gi, '');\r\n\r\n // Prepend remainder to next line\r\n lines[i + 1] = remainder + ' ' + (lines[i + 1] || '');\r\n linesCount = lines.length;\r\n\r\n break; // Processing on this line\r\n\r\n // Append word with space to output\r\n }\r\n else\r\n {\r\n out += wordWithSpace;\r\n currentLineWidth -= wordWidth;\r\n }\r\n }\r\n\r\n // Append processed line to output\r\n output += out.replace(/[ \\n]*$/gi, '') + '\\n';\r\n }\r\n\r\n // Trim the end of the string\r\n output = output.replace(/[\\s|\\n]*$/gi, '');\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Spaces are not collapsed and whitespace is not trimmed.\r\n *\r\n * @method Phaser.GameObjects.Text#basicWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n basicWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var result = '';\r\n var lines = text.split(this.splitRegExp);\r\n\r\n for (var i = 0; i < lines.length; i++)\r\n {\r\n var spaceLeft = wordWrapWidth;\r\n var words = lines[i].split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var wordWidth = context.measureText(words[j]).width;\r\n var wordWidthWithSpace = wordWidth + context.measureText(' ').width;\r\n\r\n if (wordWidthWithSpace > spaceLeft)\r\n {\r\n // Skip printing the newline if it's the first word of the line that is greater\r\n // than the word wrap width.\r\n if (j > 0)\r\n {\r\n result += '\\n';\r\n }\r\n\r\n result += words[j] + ' ';\r\n spaceLeft = wordWrapWidth - wordWidthWithSpace;\r\n }\r\n else\r\n {\r\n spaceLeft -= wordWidthWithSpace;\r\n result += words[j];\r\n\r\n if (j < (words.length - 1))\r\n {\r\n result += ' ';\r\n }\r\n }\r\n }\r\n\r\n if (i < lines.length - 1)\r\n {\r\n result += '\\n';\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Runs the given text through this Text objects word wrapping and returns the results as an\r\n * array, where each element of the array corresponds to a wrapped line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#getWrappedText\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used.\r\n *\r\n * @return {string[]} An array of strings with the pieces of wrapped text.\r\n */\r\n getWrappedText: function (text)\r\n {\r\n if (text === undefined) { text = this._text; }\r\n\r\n this.style.syncFont(this.canvas, this.context);\r\n\r\n var wrappedLines = this.runWordWrap(text);\r\n\r\n return wrappedLines.split(this.splitRegExp);\r\n },\r\n\r\n /**\r\n * Set the text to display.\r\n *\r\n * An array of strings will be joined with `\\n` line breaks.\r\n *\r\n * @method Phaser.GameObjects.Text#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = '';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join('\\n');\r\n }\r\n\r\n if (value !== this._text)\r\n {\r\n this._text = value.toString();\r\n\r\n this.updateText();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.Text#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {object} style - The style settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStyle: function (style)\r\n {\r\n return this.style.setStyle(style);\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {string} font - The font family or font settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFont: function (font)\r\n {\r\n return this.style.setFont(font);\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n return this.style.setFontFamily(family);\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n return this.style.setFontSize(size);\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n return this.style.setFontStyle(style);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.Text#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set. `0` disables fixed width.\r\n * @param {number} height - The fixed height to set. `0` disables fixed height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n return this.style.setFixedSize(width, height);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.Text#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n return this.style.setBackgroundColor(color);\r\n },\r\n\r\n /**\r\n * Set the fill style to be used by the Text object.\r\n *\r\n * This can be any valid CanvasRenderingContext2D fillStyle value, such as\r\n * a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.\r\n *\r\n * See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.\r\n *\r\n * @method Phaser.GameObjects.Text#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFill: function (fillStyle)\r\n {\r\n return this.style.setFill(fillStyle);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.Text#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n return this.style.setColor(color);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n return this.style.setStroke(color, thickness);\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n return this.style.setShadow(x, y, color, blur, shadowStroke, shadowFill);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal shadow offset.\r\n * @param {number} y - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n return this.style.setShadowOffset(x, y);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n return this.style.setShadowColor(color);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} blur - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n return this.style.setShadowBlur(blur);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n return this.style.setShadowStroke(enabled);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n return this.style.setShadowFill(enabled);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines. Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {?number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n return this.style.setWordWrapWidth(width, useAdvancedWrap);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines. Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n return this.style.setWordWrapCallback(callback, scope);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n return this.style.setAlign(align);\r\n },\r\n\r\n /**\r\n * Set the resolution used by this Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method, or by specifying it in the Text style configuration object.\r\n * \r\n * It allows for much clearer text on High DPI devices, at the cost of memory because it uses larger\r\n * internal Canvas textures for the Text.\r\n * \r\n * Therefore, please use with caution, as the more high res Text you have, the more memory it uses.\r\n *\r\n * @method Phaser.GameObjects.Text#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n return this.style.setResolution(value);\r\n },\r\n\r\n /**\r\n * Sets the line spacing value.\r\n *\r\n * This value is _added_ to the height of the font when calculating the overall line height.\r\n * This only has an effect if this Text object consists of multiple lines of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setLineSpacing\r\n * @since 3.13.0\r\n *\r\n * @param {number} value - The amount to add to the font height to achieve the overall line height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setLineSpacing: function (value)\r\n {\r\n this.lineSpacing = value;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the text padding.\r\n *\r\n * 'left' can be an object.\r\n *\r\n * If only 'left' and 'top' are given they are treated as 'x' and 'y'.\r\n *\r\n * @method Phaser.GameObjects.Text#setPadding\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object.\r\n * @param {number} top - The top padding value.\r\n * @param {number} right - The right padding value.\r\n * @param {number} bottom - The bottom padding value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setPadding: function (left, top, right, bottom)\r\n {\r\n if (typeof left === 'object')\r\n {\r\n var config = left;\r\n\r\n // If they specify x and/or y this applies to all\r\n var x = GetValue(config, 'x', null);\r\n\r\n if (x !== null)\r\n {\r\n left = x;\r\n right = x;\r\n }\r\n else\r\n {\r\n left = GetValue(config, 'left', 0);\r\n right = GetValue(config, 'right', left);\r\n }\r\n\r\n var y = GetValue(config, 'y', null);\r\n\r\n if (y !== null)\r\n {\r\n top = y;\r\n bottom = y;\r\n }\r\n else\r\n {\r\n top = GetValue(config, 'top', 0);\r\n bottom = GetValue(config, 'bottom', top);\r\n }\r\n }\r\n else\r\n {\r\n if (left === undefined) { left = 0; }\r\n if (top === undefined) { top = left; }\r\n if (right === undefined) { right = left; }\r\n if (bottom === undefined) { bottom = top; }\r\n }\r\n\r\n this.padding.left = left;\r\n this.padding.top = top;\r\n this.padding.right = right;\r\n this.padding.bottom = bottom;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.Text#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n return this.style.setMaxLines(max);\r\n },\r\n\r\n /**\r\n * Update the displayed text.\r\n *\r\n * @method Phaser.GameObjects.Text#updateText\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n updateText: function ()\r\n {\r\n var canvas = this.canvas;\r\n var context = this.context;\r\n var style = this.style;\r\n var resolution = style.resolution;\r\n var size = style.metrics;\r\n\r\n style.syncFont(canvas, context);\r\n\r\n var outputText = this._text;\r\n\r\n if (style.wordWrapWidth || style.wordWrapCallback)\r\n {\r\n outputText = this.runWordWrap(this._text);\r\n }\r\n\r\n // Split text into lines\r\n var lines = outputText.split(this.splitRegExp);\r\n\r\n var textSize = GetTextSize(this, size, lines);\r\n\r\n var padding = this.padding;\r\n\r\n var textWidth;\r\n\r\n if (style.fixedWidth === 0)\r\n {\r\n this.width = textSize.width + padding.left + padding.right;\r\n\r\n textWidth = textSize.width;\r\n }\r\n else\r\n {\r\n this.width = style.fixedWidth;\r\n\r\n textWidth = this.width - padding.left - padding.right;\r\n\r\n if (textWidth < textSize.width)\r\n {\r\n textWidth = textSize.width;\r\n }\r\n }\r\n\r\n if (style.fixedHeight === 0)\r\n {\r\n this.height = textSize.height + padding.top + padding.bottom;\r\n }\r\n else\r\n {\r\n this.height = style.fixedHeight;\r\n }\r\n\r\n var w = this.width;\r\n var h = this.height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n w *= resolution;\r\n h *= resolution;\r\n\r\n w = Math.max(w, 1);\r\n h = Math.max(h, 1);\r\n\r\n if (canvas.width !== w || canvas.height !== h)\r\n {\r\n canvas.width = w;\r\n canvas.height = h;\r\n\r\n this.frame.setSize(w, h);\r\n\r\n // Because resizing the canvas resets the context\r\n style.syncFont(canvas, context);\r\n }\r\n else\r\n {\r\n context.clearRect(0, 0, w, h);\r\n }\r\n\r\n context.save();\r\n\r\n context.scale(resolution, resolution);\r\n\r\n if (style.backgroundColor)\r\n {\r\n context.fillStyle = style.backgroundColor;\r\n context.fillRect(0, 0, w, h);\r\n }\r\n\r\n style.syncStyle(canvas, context);\r\n\r\n context.textBaseline = 'alphabetic';\r\n\r\n // Apply padding\r\n context.translate(padding.left, padding.top);\r\n\r\n var linePositionX;\r\n var linePositionY;\r\n\r\n // Draw text line by line\r\n for (var i = 0; i < textSize.lines; i++)\r\n {\r\n linePositionX = style.strokeThickness / 2;\r\n linePositionY = (style.strokeThickness / 2 + i * textSize.lineHeight) + size.ascent;\r\n\r\n if (i > 0)\r\n {\r\n linePositionY += (textSize.lineSpacing * i);\r\n }\r\n\r\n if (style.rtl)\r\n {\r\n linePositionX = w - linePositionX;\r\n }\r\n else if (style.align === 'right')\r\n {\r\n linePositionX += textWidth - textSize.lineWidths[i];\r\n }\r\n else if (style.align === 'center')\r\n {\r\n linePositionX += (textWidth - textSize.lineWidths[i]) / 2;\r\n }\r\n else if (style.align === 'justify')\r\n {\r\n // To justify text line its width must be no less than 85% of defined width\r\n var minimumLengthToApplyJustification = 0.85;\r\n\r\n if (textSize.lineWidths[i] / textSize.width >= minimumLengthToApplyJustification)\r\n {\r\n var extraSpace = textSize.width - textSize.lineWidths[i];\r\n var spaceSize = context.measureText(' ').width;\r\n var trimmedLine = lines[i].trim();\r\n var array = trimmedLine.split(' ');\r\n \r\n extraSpace += (lines[i].length - trimmedLine.length) * spaceSize;\r\n \r\n var extraSpaceCharacters = Math.floor(extraSpace / spaceSize);\r\n var idx = 0;\r\n\r\n while (extraSpaceCharacters > 0)\r\n {\r\n array[idx] += ' ';\r\n idx = (idx + 1) % (array.length - 1 || 1);\r\n --extraSpaceCharacters;\r\n }\r\n \r\n lines[i] = array.join(' ');\r\n }\r\n }\r\n\r\n if (this.autoRound)\r\n {\r\n linePositionX = Math.round(linePositionX);\r\n linePositionY = Math.round(linePositionY);\r\n }\r\n\r\n if (style.strokeThickness)\r\n {\r\n this.style.syncShadow(context, style.shadowStroke);\r\n\r\n context.strokeText(lines[i], linePositionX, linePositionY);\r\n }\r\n\r\n if (style.color)\r\n {\r\n this.style.syncShadow(context, style.shadowFill);\r\n\r\n context.fillText(lines[i], linePositionX, linePositionY);\r\n }\r\n }\r\n\r\n context.restore();\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true);\r\n\r\n this.frame.glTexture = this.frame.source.glTexture;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.Text#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {object} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n return this.style.getTextMetrics();\r\n },\r\n\r\n /**\r\n * The text string being rendered by this Text Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of the Text object.\r\n *\r\n * @method Phaser.GameObjects.Text#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Text object.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra Text data is added here\r\n\r\n var data = {\r\n autoRound: this.autoRound,\r\n text: this._text,\r\n style: this.style.toJSON(),\r\n padding: {\r\n left: this.padding.left,\r\n right: this.padding.right,\r\n top: this.padding.top,\r\n bottom: this.padding.bottom\r\n }\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Text#preDestroy\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.style.rtl)\r\n {\r\n RemoveFromDOM(this.canvas);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n\r\n this.texture.destroy();\r\n }\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n});\r\n\r\nmodule.exports = Text;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/Text.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#text\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('text', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n // style Object = {\r\n // font: [ 'font', '16px Courier' ],\r\n // backgroundColor: [ 'backgroundColor', null ],\r\n // fill: [ 'fill', '#fff' ],\r\n // stroke: [ 'stroke', '#fff' ],\r\n // strokeThickness: [ 'strokeThickness', 0 ],\r\n // shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n // shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n // shadowColor: [ 'shadow.color', '#000' ],\r\n // shadowBlur: [ 'shadow.blur', 0 ],\r\n // shadowStroke: [ 'shadow.stroke', false ],\r\n // shadowFill: [ 'shadow.fill', false ],\r\n // align: [ 'align', 'left' ],\r\n // maxLines: [ 'maxLines', 0 ],\r\n // fixedWidth: [ 'fixedWidth', false ],\r\n // fixedHeight: [ 'fixedHeight', false ],\r\n // rtl: [ 'rtl', false ]\r\n // }\r\n\r\n var content = GetAdvancedValue(config, 'text', '');\r\n var style = GetAdvancedValue(config, 'style', null);\r\n\r\n // Padding\r\n // { padding: 2 }\r\n // { padding: { x: , y: }}\r\n // { padding: { left: , top: }}\r\n // { padding: { left: , right: , top: , bottom: }}\r\n\r\n var padding = GetAdvancedValue(config, 'padding', null);\r\n\r\n if (padding !== null)\r\n {\r\n style.padding = padding;\r\n }\r\n\r\n var text = new Text(this.scene, 0, 0, content, style);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, text, config);\r\n\r\n // Text specific config options:\r\n\r\n text.autoRound = GetAdvancedValue(config, 'autoRound', true);\r\n text.resolution = GetAdvancedValue(config, 'resolution', 1);\r\n\r\n return text;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCreator.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and adds it to the Scene.\r\n * \r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#text\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {object} [style] - The Text style configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('text', function (x, y, text, style)\r\n{\r\n return this.displayList.add(new Text(this.scene, x, y, text, style));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextFactory.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextRender.js?')},"./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width / src.style.resolution, height / src.style.resolution,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetPowerOfTwo = __webpack_require__(/*! ../../math/pow2/GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js");\r\nvar TileSpriteRender = __webpack_require__(/*! ./TileSpriteRender */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * @classdesc\r\n * A TileSprite is a Sprite that has a repeating texture.\r\n *\r\n * The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and\r\n * are designed so that you can create game backdrops using seamless textures as a source.\r\n *\r\n * You shouldn\'t ever create a TileSprite any larger than your actual canvas size. If you want to create a large repeating background\r\n * that scrolls across the whole map of your game, then you create a TileSprite that fits the canvas size and then use the `tilePosition`\r\n * property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will \r\n * consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to\r\n * adjust the scale of the texture - don\'t resize the sprite itself or make it larger than it needs.\r\n * \r\n * An important note about Tile Sprites and NPOT textures: Internally, TileSprite textures use GL_REPEAT to provide\r\n * seamless repeating of the textures. This, combined with the way in which the textures are handled in WebGL, means\r\n * they need to be POT (power-of-two) sizes in order to wrap. If you provide a NPOT (non power-of-two) texture to a\r\n * TileSprite it will generate a POT sized canvas and draw your texture to it, scaled up to the POT size. It\'s then\r\n * scaled back down again during rendering to the original dimensions. While this works, in that it allows you to use\r\n * any size texture for a Tile Sprite, it does mean that NPOT textures are going to appear anti-aliased when rendered,\r\n * due to the interpolation that took place when it was resized into a POT texture. This is especially visible in\r\n * pixel art graphics. If you notice it and it becomes an issue, the only way to avoid it is to ensure that you\r\n * provide POT textures for Tile Sprites.\r\n *\r\n * @class TileSprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} textureKey - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frameKey] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar TileSprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TileSpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function TileSprite (scene, x, y, width, height, textureKey, frameKey)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n GameObject.call(this, scene, \'TileSprite\');\r\n\r\n var displayTexture = scene.sys.textures.get(textureKey);\r\n var displayFrame = displayTexture.get(frameKey);\r\n\r\n if (!width || !height)\r\n {\r\n width = displayFrame.width;\r\n height = displayFrame.height;\r\n }\r\n else\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n /**\r\n * Internal tile position vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tilePosition\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tilePosition = new Vector2();\r\n\r\n /**\r\n * Internal tile scale vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tileScale\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tileScale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether the Tile Sprite has changed in some way, requiring an re-render of its tile texture.\r\n *\r\n * Such changes include the texture frame and scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The renderer in use by this Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#canvas\r\n * @type {?HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.canvas = CanvasPool.create(this, width, height);\r\n\r\n /**\r\n * The Context of the Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The Texture the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayTexture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayTexture = displayTexture;\r\n\r\n /**\r\n * The Frame the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayFrame = displayFrame;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = this.texture.get();\r\n\r\n /**\r\n * The next power of two value from the width of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potWidth = GetPowerOfTwo(displayFrame.width);\r\n\r\n /**\r\n * The next power of two value from the height of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potHeight = GetPowerOfTwo(displayFrame.height);\r\n\r\n /**\r\n * The Canvas that the TileSprites texture is rendered to.\r\n * This is used to create a WebGL texture from.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.fillCanvas = CanvasPool.create2D(this, this.potWidth, this.potHeight);\r\n\r\n /**\r\n * The Canvas Context used to render the TileSprites texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.fillContext = this.fillCanvas.getContext(\'2d\');\r\n\r\n /**\r\n * The texture that the Tile Sprite is rendered to, which is then rendered to a Scene.\r\n * In WebGL this is a WebGLTexture. In Canvas it\'s a Canvas Fill Pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillPattern\r\n * @type {?(WebGLTexture|CanvasPattern)}\r\n * @since 3.12.0\r\n */\r\n this.fillPattern = null;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setFrame(frameKey);\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.dirty = true;\r\n this.fillPattern = null;\r\n this.fillPattern = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.fillCanvas, this.potWidth, this.potHeight);\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.displayTexture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.displayFrame = this.displayTexture.get(frame);\r\n\r\n if (!this.displayFrame.cutWidth || !this.displayFrame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n this.updateTileTexture();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTilePosition\r\n * @since 3.3.0\r\n *\r\n * @param {number} [x] - The x position of this sprite\'s tiling texture.\r\n * @param {number} [y] - The y position of this sprite\'s tiling texture.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTilePosition: function (x, y)\r\n {\r\n if (x !== undefined)\r\n {\r\n this.tilePositionX = x;\r\n }\r\n\r\n if (y !== undefined)\r\n {\r\n this.tilePositionY = y;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tileScaleX} and {@link Phaser.GameObjects.TileSprite#tileScaleY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTileScale\r\n * @since 3.12.0\r\n *\r\n * @param {number} [x] - The horizontal scale of the tiling texture. If not given it will use the current `tileScaleX` value.\r\n * @param {number} [y=x] - The vertical scale of the tiling texture. If not given it will use the `x` value.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTileScale: function (x, y)\r\n {\r\n if (x === undefined) { x = this.tileScaleX; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.tileScaleX = x;\r\n this.tileScaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Render the tile texture if it is dirty, or if the frame has changed.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateTileTexture\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateTileTexture: function ()\r\n {\r\n if (!this.dirty || !this.renderer)\r\n {\r\n return;\r\n }\r\n\r\n // Draw the displayTexture to our fillCanvas\r\n\r\n var frame = this.displayFrame;\r\n\r\n var ctx = this.fillContext;\r\n var canvas = this.fillCanvas;\r\n\r\n var fw = this.potWidth;\r\n var fh = this.potHeight;\r\n\r\n if (!this.renderer.gl)\r\n {\r\n fw = frame.cutWidth;\r\n fh = frame.cutHeight;\r\n }\r\n\r\n ctx.clearRect(0, 0, fw, fh);\r\n\r\n canvas.width = fw;\r\n canvas.height = fh;\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n frame.cutX, frame.cutY,\r\n frame.cutWidth, frame.cutHeight,\r\n 0, 0,\r\n fw, fh\r\n );\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);\r\n }\r\n else\r\n {\r\n this.fillPattern = ctx.createPattern(canvas, \'repeat\');\r\n }\r\n\r\n this.updateCanvas();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Draw the fill pattern to the internal canvas.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateCanvas\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateCanvas: function ()\r\n {\r\n var canvas = this.canvas;\r\n\r\n if (canvas.width !== this.width || canvas.height !== this.height)\r\n {\r\n canvas.width = this.width;\r\n canvas.height = this.height;\r\n\r\n this.frame.setSize(this.width, this.height);\r\n this.updateDisplayOrigin();\r\n\r\n this.dirty = true;\r\n }\r\n\r\n if (!this.dirty || this.renderer && this.renderer.gl)\r\n {\r\n this.dirty = false;\r\n return;\r\n }\r\n\r\n var ctx = this.context;\r\n\r\n if (!this.scene.sys.game.config.antialias)\r\n {\r\n Smoothing.disable(ctx);\r\n }\r\n\r\n var scaleX = this._tileScale.x;\r\n var scaleY = this._tileScale.y;\r\n\r\n var positionX = this._tilePosition.x;\r\n var positionY = this._tilePosition.y;\r\n\r\n ctx.clearRect(0, 0, this.width, this.height);\r\n\r\n ctx.save();\r\n\r\n ctx.scale(scaleX, scaleY);\r\n\r\n ctx.translate(-positionX, -positionY);\r\n\r\n ctx.fillStyle = this.fillPattern;\r\n\r\n ctx.fillRect(positionX, positionY, this.width / scaleX, this.height / scaleY);\r\n\r\n ctx.restore();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n this.renderer.deleteTexture(this.fillPattern);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n CanvasPool.remove(this.fillCanvas);\r\n\r\n this.fillPattern = null;\r\n this.fillContext = null;\r\n this.fillCanvas = null;\r\n\r\n this.displayTexture = null;\r\n this.displayFrame = null;\r\n\r\n this.texture.destroy();\r\n\r\n this.renderer = null;\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionX: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionY: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TileSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TileSpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.TileSprite.TileSpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('tileSprite', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 512);\r\n var height = GetAdvancedValue(config, 'height', 512);\r\n var key = GetAdvancedValue(config, 'key', '');\r\n var frame = GetAdvancedValue(config, 'frame', '');\r\n\r\n var tile = new TileSprite(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, tile, config);\r\n\r\n return tile;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TileSpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TileSpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n src.fillPattern,\r\n src.displayFrame.width * src.tileScaleX, src.displayFrame.height * src.tileScaleY,\r\n src.x, src.y,\r\n src.width, src.height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.originX * src.width, src.originY * src.height,\r\n 0, 0, src.width, src.height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n (src.tilePositionX % src.displayFrame.width) / src.displayFrame.width,\r\n (src.tilePositionY % src.displayFrame.height) / src.displayFrame.height,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TileSpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/zone/Zone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js");\r\nvar Circle = __webpack_require__(/*! ../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Zone Game Object.\r\n *\r\n * A Zone is a non-rendering rectangular Game Object that has a position and size.\r\n * It has no texture and never displays, but does live on the display list and\r\n * can be moved, scaled and rotated like any other Game Object.\r\n *\r\n * Its primary use is for creating Drop Zones and Input Hit Areas and it has a couple of helper methods\r\n * specifically for this. It is also useful for object overlap checks, or as a base for your own\r\n * non-displaying Game Objects.\r\n\r\n * The default origin is 0.5, the center of the Zone, the same as with Game Objects.\r\n *\r\n * @class Zone\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=1] - The width of the Game Object.\r\n * @param {number} [height=1] - The height of the Game Object.\r\n */\r\nvar Zone = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Transform,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Zone (scene, x, y, width, height)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = width; }\r\n\r\n GameObject.call(this, scene, \'Zone\');\r\n\r\n this.setPosition(x, y);\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The Blend Mode of the Game Object.\r\n * Although a Zone never renders, it still has a blend mode to allow it to fit seamlessly into\r\n * display lists without causing a batch flush.\r\n *\r\n * @name Phaser.GameObjects.Zone#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Zone#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setSize: function (width, height, resizeInput)\r\n {\r\n if (resizeInput === undefined) { resizeInput = true; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n var input = this.input;\r\n\r\n if (resizeInput && input && !input.customHitArea)\r\n {\r\n input.hitArea.width = width;\r\n input.hitArea.height = height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Circular Drop Zone.\r\n * The circle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setCircleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Circle that will form the Drop Zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setCircleDropZone: function (radius)\r\n {\r\n return this.setDropZone(new Circle(0, 0, radius), CircleContains);\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Rectangle Drop Zone.\r\n * The rectangle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setRectangleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the rectangle drop zone.\r\n * @param {number} height - The height of the rectangle drop zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setRectangleDropZone: function (width, height)\r\n {\r\n return this.setDropZone(new Rectangle(0, 0, width, height), RectangleContains);\r\n },\r\n\r\n /**\r\n * Allows you to define your own Geometry shape to be used as a Drop Zone.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape.\r\n * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDropZone: function (shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n this.setRectangleDropZone(this.width, this.height);\r\n }\r\n else if (!this.input)\r\n {\r\n this.setInteractive(shape, callback, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Zone to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setAlpha\r\n * @private\r\n * @since 3.11.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Zone to a Container in Canvas.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setBlendMode\r\n * @private\r\n * @since 3.16.2\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderCanvas\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderCanvas: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderWebGL\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderWebGL: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/Zone.js?')},"./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#zone\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('zone', function (config)\r\n{\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 1);\r\n var height = GetAdvancedValue(config, 'height', width);\r\n\r\n return new Zone(this.scene, x, y, width, height);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js?")},"./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#zone\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} width - The width of the Game Object.\r\n * @param {number} height - The height of the Game Object.\r\n * \r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('zone', function (x, y, width, height)\r\n{\r\n return this.displayList.add(new Zone(this.scene, x, y, width, height));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js?")},"./node_modules/phaser/src/geom/circle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the circle.\r\n *\r\n * @function Phaser.Geom.Circle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the area of.\r\n *\r\n * @return {number} The area of the Circle.\r\n */\r\nvar Area = function (circle)\r\n{\r\n return (circle.radius > 0) ? Math.PI * circle.radius * circle.radius : 0;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Area.js?")},"./node_modules/phaser/src/geom/circle/Circle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Circle object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Circle you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Circle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n */\r\nvar Circle = new Class({\r\n\r\n initialize:\r\n\r\n function Circle (x, y, radius)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.CIRCLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Circle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.CIRCLE;\r\n\r\n /**\r\n * The x position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The internal radius of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_radius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._radius = radius;\r\n\r\n /**\r\n * The internal diameter of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_diameter\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._diameter = radius * 2;\r\n },\r\n\r\n /**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Circle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Circle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Circle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the Circle.\r\n *\r\n * @method Phaser.Geom.Circle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y and radius of this circle.\r\n *\r\n * @method Phaser.Geom.Circle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setTo: function (x, y, radius)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this._radius = radius;\r\n this._diameter = radius * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Circle to be empty with a radius of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Circle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this._radius = 0;\r\n this._diameter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Circle.\r\n *\r\n * @method Phaser.Geom.Circle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Circle is empty: has a radius of zero.\r\n *\r\n * @method Phaser.Geom.Circle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Circle is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this._radius <= 0);\r\n },\r\n\r\n /**\r\n * The radius of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._radius = value;\r\n this._diameter = value * 2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The diameter of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#diameter\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n diameter: {\r\n\r\n get: function ()\r\n {\r\n return this._diameter;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._diameter = value;\r\n this._radius = value * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - this._radius;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circle.js?')},"./node_modules/phaser/src/geom/circle/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference of.\r\n *\r\n * @return {number} The circumference of the Circle.\r\n */\r\nvar Circumference = function (circle)\r\n{\r\n return 2 * (Math.PI * circle.radius);\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circumference.js?")},"./node_modules/phaser/src/geom/circle/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.\r\n *\r\n * @function Phaser.Geom.Circle.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Circle to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (circle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = circle.x + (circle.radius * Math.cos(angle));\r\n out.y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/circle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n/**\r\n * Creates a new Circle instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Circle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|object)} source - The Circle to be cloned. Can be an instance of a Circle or a circle-like object, with x, y and radius properties.\r\n *\r\n * @return {Phaser.Geom.Circle} A clone of the source Circle.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Circle(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Clone.js?')},"./node_modules/phaser/src/geom/circle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Circle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\nvar Contains = function (circle, x, y)\r\n{\r\n // Check if x/y are within the bounds first\r\n if (circle.radius > 0 && x >= circle.left && x <= circle.right && y >= circle.top && y <= circle.bottom)\r\n {\r\n var dx = (circle.x - x) * (circle.x - x);\r\n var dy = (circle.y - y) * (circle.y - y);\r\n\r\n return (dx + dy) <= (circle.radius * circle.radius);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Contains.js?")},"./node_modules/phaser/src/geom/circle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (circle, point)\r\n{\r\n return Contains(circle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/circle/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsRect = function (circle, rect)\r\n{\r\n return (\r\n Contains(circle, rect.x, rect.y) &&\r\n Contains(circle, rect.right, rect.y) &&\r\n Contains(circle, rect.x, rect.bottom) &&\r\n Contains(circle, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsRect.js?')},"./node_modules/phaser/src/geom/circle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y` and `radius` properties from the `source` Circle\r\n * into the given `dest` Circle, then returns the `dest` Circle.\r\n *\r\n * @function Phaser.Geom.Circle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} source - The source Circle to copy the values from.\r\n * @param {Phaser.Geom.Circle} dest - The destination Circle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Circle} The destination Circle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CopyFrom.js?")},"./node_modules/phaser/src/geom/circle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y` and `radius` properties of the two given Circles.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Circle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The first Circle to compare.\r\n * @param {Phaser.Geom.Circle} toCompare - The second Circle to compare.\r\n *\r\n * @return {boolean} `true` if the two Circles equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (circle, toCompare)\r\n{\r\n return (\r\n circle.x === toCompare.x &&\r\n circle.y === toCompare.y &&\r\n circle.radius === toCompare.radius\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Equals.js?")},"./node_modules/phaser/src/geom/circle/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Circle object.\r\n *\r\n * @function Phaser.Geom.Circle.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the circle bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Circles bounds.\r\n */\r\nvar GetBounds = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = circle.left;\r\n out.y = circle.top;\r\n out.width = circle.diameter;\r\n out.height = circle.diameter;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetBounds.js?')},"./node_modules/phaser/src/geom/circle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\nvar GetPoint = function (circle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(circle, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoint.js?')},"./node_modules/phaser/src/geom/circle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\nvar GetPoints = function (circle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(circle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(circle, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoints.js?')},"./node_modules/phaser/src/geom/circle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given.\r\n *\r\n * @function Phaser.Geom.Circle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Circle by.\r\n * @param {number} y - The amount to vertically offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar Offset = function (circle, x, y)\r\n{\r\n circle.x += x;\r\n circle.y += y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Offset.js?")},"./node_modules/phaser/src/geom/circle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Circle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar OffsetPoint = function (circle, point)\r\n{\r\n circle.x += point.x;\r\n circle.y += point.y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/circle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = 2 * Math.PI * Math.random();\r\n var u = Math.random() + Math.random();\r\n var r = (u > 1) ? 2 - u : u;\r\n var x = r * Math.cos(t);\r\n var y = r * Math.sin(t);\r\n\r\n out.x = circle.x + (x * circle.radius);\r\n out.y = circle.y + (y * circle.radius);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Random.js?')},"./node_modules/phaser/src/geom/circle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\nCircle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/circle/Area.js");\r\nCircle.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nCircle.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nCircle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/circle/Clone.js");\r\nCircle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nCircle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/circle/ContainsPoint.js");\r\nCircle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/circle/ContainsRect.js");\r\nCircle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/circle/CopyFrom.js");\r\nCircle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/circle/Equals.js");\r\nCircle.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/circle/GetBounds.js");\r\nCircle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nCircle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nCircle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/circle/Offset.js");\r\nCircle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/circle/OffsetPoint.js");\r\nCircle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/index.js?')},"./node_modules/phaser/src/geom/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/const.js?")},"./node_modules/phaser/src/geom/ellipse/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the area of.\r\n *\r\n * @return {number} The area of the Ellipse.\r\n */\r\nvar Area = function (ellipse)\r\n{\r\n if (ellipse.isEmpty())\r\n {\r\n return 0;\r\n }\r\n\r\n // units squared\r\n return (ellipse.getMajorRadius() * ellipse.getMinorRadius() * Math.PI);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Area.js?")},"./node_modules/phaser/src/geom/ellipse/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference of.\r\n *\r\n * @return {number} The circumference of th Ellipse.\r\n */\r\nvar Circumference = function (ellipse)\r\n{\r\n var rx = ellipse.width / 2;\r\n var ry = ellipse.height / 2;\r\n var h = Math.pow((rx - ry), 2) / Math.pow((rx + ry), 2);\r\n\r\n return (Math.PI * (rx + ry)) * (1 + ((3 * h) / (10 + Math.sqrt(4 - (3 * h)))));\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Circumference.js?")},"./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.\r\n *\r\n * @function Phaser.Geom.Ellipse.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Ellipse to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (ellipse, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var halfWidth = ellipse.width / 2;\r\n var halfHeight = ellipse.height / 2;\r\n\r\n out.x = ellipse.x + halfWidth * Math.cos(angle);\r\n out.y = ellipse.y + halfHeight * Math.sin(angle);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/ellipse/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\n/**\r\n * Creates a new Ellipse instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Ellipse.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The Ellipse to be cloned. Can be an instance of an Ellipse or a ellipse-like object, with x, y, width and height properties.\r\n *\r\n * @return {Phaser.Geom.Ellipse} A clone of the source Ellipse.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Ellipse(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Clone.js?')},"./node_modules/phaser/src/geom/ellipse/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Ellipse.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\nvar Contains = function (ellipse, x, y)\r\n{\r\n if (ellipse.width <= 0 || ellipse.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the coords to an ellipse with center 0,0 and a radius of 0.5\r\n var normx = ((x - ellipse.x) / ellipse.width);\r\n var normy = ((y - ellipse.y) / ellipse.height);\r\n\r\n normx *= normx;\r\n normy *= normy;\r\n\r\n return (normx + normy < 0.25);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Contains.js?")},"./node_modules/phaser/src/geom/ellipse/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (ellipse, point)\r\n{\r\n return Contains(ellipse, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsPoint.js?')},"./node_modules/phaser/src/geom/ellipse/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Ellipse or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the ellipse, otherwise false.\r\n */\r\nvar ContainsRect = function (ellipse, rect)\r\n{\r\n return (\r\n Contains(ellipse, rect.x, rect.y) &&\r\n Contains(ellipse, rect.right, rect.y) &&\r\n Contains(ellipse, rect.x, rect.bottom) &&\r\n Contains(ellipse, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsRect.js?')},"./node_modules/phaser/src/geom/ellipse/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse\r\n * into the given `dest` Ellipse, then returns the `dest` Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The source Ellipse to copy the values from.\r\n * @param {Phaser.Geom.Ellipse} dest - The destination Ellipse to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The destination Ellipse.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CopyFrom.js?")},"./node_modules/phaser/src/geom/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Ellipse object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render an Ellipse you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Ellipse\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the ellipse.\r\n * @param {number} [y=0] - The y position of the center of the ellipse.\r\n * @param {number} [width=0] - The width of the ellipse.\r\n * @param {number} [height=0] - The height of the ellipse.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n initialize:\r\n\r\n function Ellipse (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.ELLIPSE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Ellipse#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.ELLIPSE;\r\n\r\n /**\r\n * The x position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Ellipse#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y, width and height of this ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Ellipse to be empty with a width and height of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this.width = 0;\r\n this.height = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Ellipse.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} [height=width] - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Ellipse is empty: has a width or height equal to zero.\r\n *\r\n * @method Phaser.Geom.Ellipse#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Ellipse is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns the minor radius of the ellipse. Also known as the Semi Minor Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMinorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The minor radius.\r\n */\r\n getMinorRadius: function ()\r\n {\r\n return Math.min(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * Returns the major radius of the ellipse. Also known as the Semi Major Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMajorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The major radius.\r\n */\r\n getMajorRadius: function ()\r\n {\r\n return Math.max(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * The left position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + (this.height / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Ellipse.js?')},"./node_modules/phaser/src/geom/ellipse/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Ellipse.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The first Ellipse to compare.\r\n * @param {Phaser.Geom.Ellipse} toCompare - The second Ellipse to compare.\r\n *\r\n * @return {boolean} `true` if the two Ellipse equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (ellipse, toCompare)\r\n{\r\n return (\r\n ellipse.x === toCompare.x &&\r\n ellipse.y === toCompare.y &&\r\n ellipse.width === toCompare.width &&\r\n ellipse.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Equals.js?")},"./node_modules/phaser/src/geom/ellipse/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Ellipse object.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the ellipse bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Ellipse bounds.\r\n */\r\nvar GetBounds = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = ellipse.left;\r\n out.y = ellipse.top;\r\n out.width = ellipse.width;\r\n out.height = ellipse.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetBounds.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\nvar GetPoint = function (ellipse, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(ellipse, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoint.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\nvar GetPoints = function (ellipse, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(ellipse) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(ellipse, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoints.js?')},"./node_modules/phaser/src/geom/ellipse/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given.\r\n *\r\n * @function Phaser.Geom.Ellipse.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Ellipse by.\r\n * @param {number} y - The amount to vertically offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar Offset = function (ellipse, x, y)\r\n{\r\n ellipse.x += x;\r\n ellipse.y += y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Offset.js?")},"./node_modules/phaser/src/geom/ellipse/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar OffsetPoint = function (ellipse, point)\r\n{\r\n ellipse.x += point.x;\r\n ellipse.y += point.y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/OffsetPoint.js?")},"./node_modules/phaser/src/geom/ellipse/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var p = Math.random() * Math.PI * 2;\r\n var s = Math.sqrt(Math.random());\r\n\r\n out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2);\r\n out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Random.js?')},"./node_modules/phaser/src/geom/ellipse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\nEllipse.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/ellipse/Area.js");\r\nEllipse.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nEllipse.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nEllipse.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/ellipse/Clone.js");\r\nEllipse.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nEllipse.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/ellipse/ContainsPoint.js");\r\nEllipse.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/ellipse/ContainsRect.js");\r\nEllipse.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/ellipse/CopyFrom.js");\r\nEllipse.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/ellipse/Equals.js");\r\nEllipse.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/ellipse/GetBounds.js");\r\nEllipse.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nEllipse.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nEllipse.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/ellipse/Offset.js");\r\nEllipse.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/ellipse/OffsetPoint.js");\r\nEllipse.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/index.js?')},"./node_modules/phaser/src/geom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Geom\r\n */\r\n\r\nvar Geom = {\r\n \r\n Circle: __webpack_require__(/*! ./circle */ "./node_modules/phaser/src/geom/circle/index.js"),\r\n Ellipse: __webpack_require__(/*! ./ellipse */ "./node_modules/phaser/src/geom/ellipse/index.js"),\r\n Intersects: __webpack_require__(/*! ./intersects */ "./node_modules/phaser/src/geom/intersects/index.js"),\r\n Line: __webpack_require__(/*! ./line */ "./node_modules/phaser/src/geom/line/index.js"),\r\n Point: __webpack_require__(/*! ./point */ "./node_modules/phaser/src/geom/point/index.js"),\r\n Polygon: __webpack_require__(/*! ./polygon */ "./node_modules/phaser/src/geom/polygon/index.js"),\r\n Rectangle: __webpack_require__(/*! ./rectangle */ "./node_modules/phaser/src/geom/rectangle/index.js"),\r\n Triangle: __webpack_require__(/*! ./triangle */ "./node_modules/phaser/src/geom/triangle/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nGeom = Extend(false, Geom, CONST);\r\n\r\nmodule.exports = Geom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/index.js?')},"./node_modules/phaser/src/geom/intersects/CircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Checks if two Circles intersect.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Circles intersect, otherwise `false`.\r\n */\r\nvar CircleToCircle = function (circleA, circleB)\r\n{\r\n return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));\r\n};\r\n\r\nmodule.exports = CircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/CircleToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar CircleToRectangle = function (circle, rect)\r\n{\r\n var halfWidth = rect.width / 2;\r\n var halfHeight = rect.height / 2;\r\n\r\n var cx = Math.abs(circle.x - rect.x - halfWidth);\r\n var cy = Math.abs(circle.y - rect.y - halfHeight);\r\n var xDist = halfWidth + circle.radius;\r\n var yDist = halfHeight + circle.radius;\r\n\r\n if (cx > xDist || cy > yDist)\r\n {\r\n return false;\r\n }\r\n else if (cx <= halfWidth || cy <= halfHeight)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n var xCornerDist = cx - halfWidth;\r\n var yCornerDist = cy - halfHeight;\r\n var xCornerDistSq = xCornerDist * xCornerDist;\r\n var yCornerDistSq = yCornerDist * yCornerDist;\r\n var maxCornerDistSq = circle.radius * circle.radius;\r\n\r\n return (xCornerDistSq + yCornerDistSq <= maxCornerDistSq);\r\n }\r\n};\r\n\r\nmodule.exports = CircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar CircleToCircle = __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js");\r\n\r\n/**\r\n * Checks if two Circles intersect and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToCircle = function (circleA, circleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToCircle(circleA, circleB))\r\n {\r\n var x0 = circleA.x;\r\n var y0 = circleA.y;\r\n var r0 = circleA.radius;\r\n\r\n var x1 = circleB.x;\r\n var y1 = circleB.y;\r\n var r1 = circleB.radius;\r\n\r\n var coefficientA, coefficientB, coefficientC, lambda, x;\r\n\r\n if (y0 === y1)\r\n {\r\n x = ((r1 * r1) - (r0 * r0) - (x1 * x1) + (x0 * x0)) / (2 * (x0 - x1));\r\n\r\n coefficientA = 1;\r\n coefficientB = -2 * y1;\r\n coefficientC = (x1 * x1) + (x * x) - (2 * x1 * x) + (y1 * y1) - (r1 * r1);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n out.push(new Point(x, (-coefficientB / (2 * coefficientA))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n out.push(new Point(x, (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA)));\r\n out.push(new Point(x, (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA)));\r\n }\r\n }\r\n else\r\n {\r\n var v1 = (x0 - x1) / (y0 - y1);\r\n var n = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\r\n\r\n coefficientA = (v1 * v1) + 1;\r\n coefficientB = (2 * y0 * v1) - (2 * n * v1) - (2 * x0);\r\n coefficientC = (x0 * x0) + (y0 * y0) + (n * n) - (r0 * r0) - (2 * y0 * n);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n x = (-coefficientB / (2 * coefficientA));\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n x = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n x = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar CircleToRectangle = __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToRectangle = function (circle, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToRectangle(circle, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n GetLineToCircle(lineD, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToCircle = function (line, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToCircle(line, circle))\r\n {\r\n var lx1 = line.x1;\r\n var ly1 = line.y1;\r\n\r\n var lx2 = line.x2;\r\n var ly2 = line.y2;\r\n\r\n var cx = circle.x;\r\n var cy = circle.y;\r\n var cr = circle.radius;\r\n\r\n var lDirX = lx2 - lx1;\r\n var lDirY = ly2 - ly1;\r\n var oDirX = lx1 - cx;\r\n var oDirY = ly1 - cy;\r\n\r\n var coefficientA = lDirX * lDirX + lDirY * lDirY;\r\n var coefficientB = 2 * (lDirX * oDirX + lDirY * oDirY);\r\n var coefficientC = oDirX * oDirX + oDirY * oDirY - cr * cr;\r\n\r\n var lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n var x, y;\r\n\r\n if (lambda === 0)\r\n {\r\n var root = -coefficientB / (2 * coefficientA);\r\n x = lx1 + root * lDirX;\r\n y = ly1 + root * lDirY;\r\n if (root >= 0 && root <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n else if (lambda > 0)\r\n {\r\n var root1 = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root1 * lDirX;\r\n y = ly1 + root1 * lDirY;\r\n if (root1 >= 0 && root1 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n\r\n var root2 = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root2 * lDirX;\r\n y = ly1 + root2 * lDirY;\r\n if (root2 >= 0 && root2 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar LineToRectangle = __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToRectangle = function (line, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToRectangle(line, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n var output = [ new Point(), new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2]),\r\n LineToLine(lineD, line, output[3])\r\n ];\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.\r\n * \r\n * If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).\r\n * \r\n * If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersetion, it will be returned without any change.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleIntersection\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle object with intersection data.\r\n */\r\nvar GetRectangleIntersection = function (rectA, rectB, output)\r\n{\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n output.x = Math.max(rectA.x, rectB.x);\r\n output.y = Math.max(rectA.y, rectB.y);\r\n output.width = Math.min(rectA.right, rectB.right) - output.x;\r\n output.height = Math.min(rectA.bottom, rectB.bottom) - output.y;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetRectangleIntersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangles intersect and returns the intersection points as a Point object array.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToRectangle = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n var lineA = rectA.getLineA();\r\n var lineB = rectA.getLineB();\r\n var lineC = rectA.getLineC();\r\n var lineD = rectA.getLineD();\r\n\r\n GetLineToRectangle(lineA, rectB, out);\r\n GetLineToRectangle(lineB, rectB, out);\r\n GetLineToRectangle(lineC, rectB, out);\r\n GetLineToRectangle(lineD, rectB, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RectangleToTriangle = __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js");\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToTriangle = function (rect, triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToTriangle(rect, triangle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToRectangle(lineA, rect, out);\r\n GetLineToRectangle(lineB, rect, out);\r\n GetLineToRectangle(lineC, rect, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar TriangleToCircle = __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToCircle = function (triangle, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToCircle(triangle, circle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar TriangleToLine = __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.\r\n *\r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToLine = function (triangle, line, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToLine(triangle, line))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n var output = [ new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2])\r\n ];\r\n\r\n for (var i = 0; i < 3; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TriangleToTriangle = __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js");\r\nvar GetTriangleToLine = __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToTriangle = function (triangleA, triangleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToTriangle(triangleA, triangleB))\r\n {\r\n var lineA = triangleB.getLineA();\r\n var lineB = triangleB.getLineB();\r\n var lineC = triangleB.getLineC();\r\n\r\n GetTriangleToLine(triangleA, lineA, out);\r\n GetTriangleToLine(triangleA, lineB, out);\r\n GetTriangleToLine(triangleA, lineC, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/LineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nvar tmp = new Point();\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle.\r\n *\r\n * Based on code by [Matt DesLauriers](https://github.com/mattdesl/line-circle-collision/blob/master/LICENSE.md).\r\n *\r\n * @function Phaser.Geom.Intersects.LineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {(Phaser.Geom.Point|any)} [nearest] - An optional Point-like object. If given the closest point on the Line where the circle intersects will be stored in this object.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar LineToCircle = function (line, circle, nearest)\r\n{\r\n if (nearest === undefined) { nearest = tmp; }\r\n\r\n if (Contains(circle, line.x1, line.y1))\r\n {\r\n nearest.x = line.x1;\r\n nearest.y = line.y1;\r\n\r\n return true;\r\n }\r\n\r\n if (Contains(circle, line.x2, line.y2))\r\n {\r\n nearest.x = line.x2;\r\n nearest.y = line.y2;\r\n\r\n return true;\r\n }\r\n\r\n var dx = line.x2 - line.x1;\r\n var dy = line.y2 - line.y1;\r\n\r\n var lcx = circle.x - line.x1;\r\n var lcy = circle.y - line.y1;\r\n\r\n // project lc onto d, resulting in vector p\r\n var dLen2 = (dx * dx) + (dy * dy);\r\n var px = dx;\r\n var py = dy;\r\n\r\n if (dLen2 > 0)\r\n {\r\n var dp = ((lcx * dx) + (lcy * dy)) / dLen2;\r\n\r\n px *= dp;\r\n py *= dp;\r\n }\r\n\r\n nearest.x = line.x1 + px;\r\n nearest.y = line.y1 + py;\r\n \r\n // len2 of p\r\n var pLen2 = (px * px) + (py * py);\r\n \r\n return (\r\n pLen2 <= dLen2 &&\r\n ((px * dx) + (py * dy)) >= 0 &&\r\n Contains(circle, nearest.x, nearest.y)\r\n );\r\n};\r\n\r\nmodule.exports = LineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/LineToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// This is based off an explanation and expanded math presented by Paul Bourke:\r\n// See http:\'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/\r\n\r\n/**\r\n * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line1 - The first Line to check.\r\n * @param {Phaser.Geom.Line} line2 - The second Line to check.\r\n * @param {Phaser.Geom.Point} [out] - A Point in which to optionally store the point of intersection.\r\n *\r\n * @return {boolean} `true` if the two Lines intersect, and the `out` object will be populated, if given. Otherwise, `false`.\r\n */\r\nvar LineToLine = function (line1, line2, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line1.x1;\r\n var y1 = line1.y1;\r\n var x2 = line1.x2;\r\n var y2 = line1.y2;\r\n\r\n var x3 = line2.x1;\r\n var y3 = line2.y1;\r\n var x4 = line2.x2;\r\n var y4 = line2.y2;\r\n\r\n var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);\r\n var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);\r\n var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\r\n\r\n // Make sure there is not a division by zero - this also indicates that the lines are parallel.\r\n // If numA and numB were both equal to zero the lines would be on top of each other (coincidental).\r\n // This check is not done because it is not necessary for this implementation (the parallel check accounts for this).\r\n\r\n if (deNom === 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Calculate the intermediate fractional point that the lines potentially intersect.\r\n\r\n var uA = numA / deNom;\r\n var uB = numB / deNom;\r\n\r\n // The fractional point will be between 0 and 1 inclusive if the lines intersect.\r\n // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect.\r\n\r\n if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)\r\n {\r\n out.x = x1 + (uA * (x2 - x1));\r\n out.y = y1 + (uA * (y2 - y1));\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToLine.js?')},"./node_modules/phaser/src/geom/intersects/LineToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape, or a rectangle-like\r\n * object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.\r\n *\r\n * An intersection is considered valid if:\r\n *\r\n * The line starts within, or ends within, the Rectangle.\r\n * The line segment intersects one of the 4 rectangle edges.\r\n *\r\n * The for the purposes of this function rectangles are considered 'solid'.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Line and the Rectangle intersect, `false` otherwise.\r\n */\r\nvar LineToRectangle = function (line, rect)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var bx1 = rect.x;\r\n var by1 = rect.y;\r\n var bx2 = rect.right;\r\n var by2 = rect.bottom;\r\n\r\n var t = 0;\r\n\r\n // If the start or end of the line is inside the rect then we assume\r\n // collision, as rects are solid for our use-case.\r\n\r\n if ((x1 >= bx1 && x1 <= bx2 && y1 >= by1 && y1 <= by2) ||\r\n (x2 >= bx1 && x2 <= bx2 && y2 >= by1 && y2 <= by2))\r\n {\r\n return true;\r\n }\r\n\r\n if (x1 < bx1 && x2 >= bx1)\r\n {\r\n // Left edge\r\n t = y1 + (y2 - y1) * (bx1 - x1) / (x2 - x1);\r\n\r\n if (t > by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (x1 > bx2 && x2 <= bx2)\r\n {\r\n // Right edge\r\n t = y1 + (y2 - y1) * (bx2 - x1) / (x2 - x1);\r\n\r\n if (t >= by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n if (y1 < by1 && y2 >= by1)\r\n {\r\n // Top edge\r\n t = x1 + (x2 - x1) * (by1 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (y1 > by2 && y2 <= by2)\r\n {\r\n // Bottom edge\r\n t = x1 + (x2 - x1) * (by2 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/PointToLine.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the a Point falls between the two end-points of a Line, based on the given line thickness.\r\n * \r\n * Assumes that the line end points are circular, not square.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLine\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|any)} point - The point, or point-like object to check.\r\n * @param {Phaser.Geom.Line} line - The line segment to test for intersection on.\r\n * @param {number} [lineThickness=1] - The line thickness. Assumes that the line end points are circular.\r\n *\r\n * @return {boolean} `true` if the Point falls on the Line, otherwise `false`.\r\n */\r\nvar PointToLine = function (point, line, lineThickness)\r\n{\r\n if (lineThickness === undefined) { lineThickness = 1; }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var px = point.x;\r\n var py = point.y;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var r = (((px - x1) * (x2 - x1)) + ((py - y1) * (y2 - y1))) / L2;\r\n\r\n // Assume line thickness is circular\r\n if (r < 0)\r\n {\r\n // Outside line1\r\n return (Math.sqrt(((x1 - px) * (x1 - px)) + ((y1 - py) * (y1 - py))) <= lineThickness);\r\n }\r\n else if ((r >= 0) && (r <= 1))\r\n {\r\n // On the line segment\r\n var s = (((y1 - py) * (x2 - x1)) - ((x1 - px) * (y2 - y1))) / L2;\r\n\r\n return (Math.abs(s) * Math.sqrt(L2) <= lineThickness);\r\n }\r\n else\r\n {\r\n // Outside line2\r\n return (Math.sqrt(((x2 - px) * (x2 - px)) + ((y2 - py) * (y2 - py))) <= lineThickness);\r\n }\r\n};\r\n\r\nmodule.exports = PointToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLine.js?")},"./node_modules/phaser/src/geom/intersects/PointToLineSegment.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PointToLine = __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js");\r\n\r\n/**\r\n * Checks if a Point is located on the given line segment.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLineSegment\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to check for intersection.\r\n * @param {Phaser.Geom.Line} line - The line segment to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Point is on the given line segment, otherwise `false`.\r\n */\r\nvar PointToLineSegment = function (point, line)\r\n{\r\n if (!PointToLine(point, line))\r\n {\r\n return false;\r\n }\r\n\r\n var xMin = Math.min(line.x1, line.x2);\r\n var xMax = Math.max(line.x1, line.x2);\r\n var yMin = Math.min(line.y1, line.y2);\r\n var yMax = Math.max(line.y1, line.y2);\r\n\r\n return ((point.x >= xMin && point.x <= xMax) && (point.y >= yMin && point.y <= yMax));\r\n};\r\n\r\nmodule.exports = PointToLineSegment;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLineSegment.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles intersect.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Rectangles intersect, otherwise `false`.\r\n */\r\nvar RectangleToRectangle = function (rectA, rectB)\r\n{\r\n if (rectA.width <= 0 || rectA.height <= 0 || rectB.width <= 0 || rectB.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return !(rectA.right < rectB.x || rectA.bottom < rectB.y || rectA.x > rectB.right || rectA.y > rectB.bottom);\r\n};\r\n\r\nmodule.exports = RectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar Contains = __webpack_require__(/*! ../rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../rectangle/Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n *\r\n * @return {boolean} A value of `true` if objects intersect; otherwise `false`.\r\n */\r\nvar RectangleToTriangle = function (rect, triangle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > rect.right ||\r\n triangle.right < rect.left ||\r\n triangle.top > rect.bottom ||\r\n triangle.bottom < rect.top)\r\n {\r\n return false;\r\n }\r\n\r\n var triA = triangle.getLineA();\r\n var triB = triangle.getLineB();\r\n var triC = triangle.getLineC();\r\n\r\n // Are any of the triangle points within the rectangle?\r\n\r\n if (Contains(rect, triA.x1, triA.y1) || Contains(rect, triA.x2, triA.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triB.x1, triB.y1) || Contains(rect, triB.x2, triB.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triC.x1, triC.y1) || Contains(rect, triC.x2, triC.y2))\r\n {\r\n return true;\r\n }\r\n\r\n // Cheap tests over, now to see if any of the lines intersect ...\r\n\r\n var rectA = rect.getLineA();\r\n var rectB = rect.getLineB();\r\n var rectC = rect.getLineC();\r\n var rectD = rect.getLineD();\r\n\r\n if (LineToLine(triA, rectA) || LineToLine(triA, rectB) || LineToLine(triA, rectC) || LineToLine(triA, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triB, rectA) || LineToLine(triB, rectB) || LineToLine(triB, rectC) || LineToLine(triB, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triC, rectA) || LineToLine(triC, rectB) || LineToLine(triC, rectC) || LineToLine(triC, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n // None of the lines intersect, so are any rectangle points within the triangle?\r\n\r\n var points = Decompose(rect);\r\n var within = ContainsArray(triangle, points, true);\r\n\r\n return (within.length > 0);\r\n};\r\n\r\nmodule.exports = RectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToValues.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if rectangle intersects with values.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToValues\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle object\r\n * @param {number} left - The x coordinate of the left of the Rectangle.\r\n * @param {number} right - The x coordinate of the right of the Rectangle.\r\n * @param {number} top - The y coordinate of the top of the Rectangle.\r\n * @param {number} bottom - The y coordinate of the bottom of the Rectangle.\r\n * @param {number} [tolerance=0] - Tolerance allowed in the calculation, expressed in pixels.\r\n *\r\n * @return {boolean} Returns true if there is an intersection.\r\n */\r\nvar RectangleToValues = function (rect, left, right, top, bottom, tolerance)\r\n{\r\n if (tolerance === undefined) { tolerance = 0; }\r\n\r\n return !(\r\n left > rect.right + tolerance ||\r\n right < rect.left - tolerance ||\r\n top > rect.bottom + tolerance ||\r\n bottom < rect.top - tolerance\r\n );\r\n};\r\n\r\nmodule.exports = RectangleToValues;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToValues.js?")},"./node_modules/phaser/src/geom/intersects/TriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangle and the `Circle` intersect, otherwise `false`.\r\n */\r\nvar TriangleToCircle = function (triangle, circle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > circle.right ||\r\n triangle.right < circle.left ||\r\n triangle.top > circle.bottom ||\r\n triangle.bottom < circle.top)\r\n {\r\n return false;\r\n }\r\n\r\n if (Contains(triangle, circle.x, circle.y))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineA(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineB(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineC(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect.\r\n * \r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n *\r\n * @return {boolean} `true` if the Triangle and the Line intersect, otherwise `false`.\r\n */\r\nvar TriangleToLine = function (triangle, line)\r\n{\r\n // If the Triangle contains either the start or end point of the line, it intersects\r\n if (Contains(triangle, line.getPointA()) || Contains(triangle, line.getPointB()))\r\n {\r\n return true;\r\n }\r\n\r\n // Now check the line against each line of the Triangle\r\n if (LineToLine(triangle.getLineA(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineB(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineC(), line))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../triangle/Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangles intersect, otherwise `false`.\r\n */\r\nvar TriangleToTriangle = function (triangleA, triangleB)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangleA.left > triangleB.right ||\r\n triangleA.right < triangleB.left ||\r\n triangleA.top > triangleB.bottom ||\r\n triangleA.bottom < triangleB.top)\r\n {\r\n return false;\r\n }\r\n\r\n var lineAA = triangleA.getLineA();\r\n var lineAB = triangleA.getLineB();\r\n var lineAC = triangleA.getLineC();\r\n\r\n var lineBA = triangleB.getLineA();\r\n var lineBB = triangleB.getLineB();\r\n var lineBC = triangleB.getLineC();\r\n\r\n // Now check the lines against each line of TriangleB\r\n if (LineToLine(lineAA, lineBA) || LineToLine(lineAA, lineBB) || LineToLine(lineAA, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAB, lineBA) || LineToLine(lineAB, lineBB) || LineToLine(lineAB, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAC, lineBA) || LineToLine(lineAC, lineBB) || LineToLine(lineAC, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n // Nope, so check to see if any of the points of triangleA are within triangleB\r\n\r\n var points = Decompose(triangleA);\r\n var within = ContainsArray(triangleB, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n // Finally check to see if any of the points of triangleB are within triangleA\r\n\r\n points = Decompose(triangleB);\r\n within = ContainsArray(triangleA, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Geom.Intersects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CircleToCircle: __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js"),\r\n CircleToRectangle: __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js"),\r\n GetCircleToCircle: __webpack_require__(/*! ./GetCircleToCircle */ "./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js"),\r\n GetCircleToRectangle: __webpack_require__(/*! ./GetCircleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js"),\r\n GetLineToCircle: __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js"),\r\n GetLineToRectangle: __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js"),\r\n GetRectangleIntersection: __webpack_require__(/*! ./GetRectangleIntersection */ "./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js"),\r\n GetRectangleToRectangle: __webpack_require__(/*! ./GetRectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js"),\r\n GetRectangleToTriangle: __webpack_require__(/*! ./GetRectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js"),\r\n GetTriangleToCircle: __webpack_require__(/*! ./GetTriangleToCircle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js"),\r\n GetTriangleToLine: __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js"),\r\n GetTriangleToTriangle: __webpack_require__(/*! ./GetTriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js"),\r\n LineToCircle: __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js"),\r\n LineToLine: __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js"),\r\n LineToRectangle: __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js"),\r\n PointToLine: __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js"),\r\n PointToLineSegment: __webpack_require__(/*! ./PointToLineSegment */ "./node_modules/phaser/src/geom/intersects/PointToLineSegment.js"),\r\n RectangleToRectangle: __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js"),\r\n RectangleToTriangle: __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js"),\r\n RectangleToValues: __webpack_require__(/*! ./RectangleToValues */ "./node_modules/phaser/src/geom/intersects/RectangleToValues.js"),\r\n TriangleToCircle: __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js"),\r\n TriangleToLine: __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js"),\r\n TriangleToTriangle: __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/index.js?')},"./node_modules/phaser/src/geom/line/Angle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the angle of the line in radians.\r\n *\r\n * @function Phaser.Geom.Line.Angle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of.\r\n *\r\n * @return {number} The angle of the line, in radians.\r\n */\r\nvar Angle = function (line)\r\n{\r\n return Math.atan2(line.y2 - line.y1, line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Angle.js?")},"./node_modules/phaser/src/geom/line/BresenhamPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Using Bresenham's line algorithm this will return an array of all coordinates on this line.\r\n *\r\n * The `start` and `end` points are rounded before this runs as the algorithm works on integers.\r\n *\r\n * @function Phaser.Geom.Line.BresenhamPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} [stepRate=1] - The optional step rate for the points on the line.\r\n * @param {array} [results] - An optional array to push the resulting coordinates into.\r\n *\r\n * @return {object[]} The array of coordinates on the line.\r\n */\r\nvar BresenhamPoints = function (line, stepRate, results)\r\n{\r\n if (stepRate === undefined) { stepRate = 1; }\r\n if (results === undefined) { results = []; }\r\n\r\n var x1 = Math.round(line.x1);\r\n var y1 = Math.round(line.y1);\r\n var x2 = Math.round(line.x2);\r\n var y2 = Math.round(line.y2);\r\n\r\n var dx = Math.abs(x2 - x1);\r\n var dy = Math.abs(y2 - y1);\r\n var sx = (x1 < x2) ? 1 : -1;\r\n var sy = (y1 < y2) ? 1 : -1;\r\n var err = dx - dy;\r\n\r\n results.push({ x: x1, y: y1 });\r\n\r\n var i = 1;\r\n\r\n while (!((x1 === x2) && (y1 === y2)))\r\n {\r\n var e2 = err << 1;\r\n\r\n if (e2 > -dy)\r\n {\r\n err -= dy;\r\n x1 += sx;\r\n }\r\n\r\n if (e2 < dx)\r\n {\r\n err += dx;\r\n y1 += sy;\r\n }\r\n\r\n if (i % stepRate === 0)\r\n {\r\n results.push({ x: x1, y: y1 });\r\n }\r\n\r\n i++;\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = BresenhamPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/BresenhamPoints.js?")},"./node_modules/phaser/src/geom/line/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n\r\n/**\r\n * Center a line on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Line.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to center.\r\n * @param {number} x - The horizontal coordinate to center the line on.\r\n * @param {number} y - The vertical coordinate to center the line on.\r\n *\r\n * @return {Phaser.Geom.Line} The centered line.\r\n */\r\nvar CenterOn = function (line, x, y)\r\n{\r\n var tx = x - ((line.x1 + line.x2) / 2);\r\n var ty = y - ((line.y1 + line.y2) / 2);\r\n\r\n line.x1 += tx;\r\n line.y1 += ty;\r\n\r\n line.x2 += tx;\r\n line.y2 += ty;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CenterOn.js?")},"./node_modules/phaser/src/geom/line/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Clone the given line.\r\n *\r\n * @function Phaser.Geom.Line.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to clone.\r\n *\r\n * @return {Phaser.Geom.Line} The cloned line.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Line(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Clone.js?')},"./node_modules/phaser/src/geom/line/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one line to a destination line.\r\n *\r\n * @function Phaser.Geom.Line.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to copy the values from.\r\n * @param {Phaser.Geom.Line} dest - The destination line to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Line} The destination line.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CopyFrom.js?")},"./node_modules/phaser/src/geom/line/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compare two lines for strict equality.\r\n *\r\n * @function Phaser.Geom.Line.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The first line to compare.\r\n * @param {Phaser.Geom.Line} toCompare - The second line to compare.\r\n *\r\n * @return {boolean} Whether the two lines are equal.\r\n */\r\nvar Equals = function (line, toCompare)\r\n{\r\n return (\r\n line.x1 === toCompare.x1 &&\r\n line.y1 === toCompare.y1 &&\r\n line.x2 === toCompare.x2 &&\r\n line.y2 === toCompare.y2\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Equals.js?")},"./node_modules/phaser/src/geom/line/Extend.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Extends the start and end points of a Line by the given amounts.\r\n *\r\n * The amounts can be positive or negative. Positive points will increase the length of the line,\r\n * while negative ones will decrease it.\r\n *\r\n * If no `right` value is provided it will extend the length of the line equally in both directions.\r\n *\r\n * Pass a value of zero to leave the start or end point unchanged.\r\n *\r\n * @function Phaser.Geom.Line.Extend\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line instance to extend.\r\n * @param {number} left - The amount to extend the start of the line by.\r\n * @param {number} [right] - The amount to extend the end of the line by. If not given it will be set to the `left` value.\r\n *\r\n * @return {Phaser.Geom.Line} The modified Line instance.\r\n */\r\nvar Extend = function (line, left, right)\r\n{\r\n if (right === undefined) { right = left; }\r\n\r\n var length = Length(line);\r\n\r\n var slopX = line.x2 - line.x1;\r\n var slopY = line.y2 - line.y1;\r\n\r\n if (left)\r\n {\r\n line.x1 = line.x1 - slopX / length * left;\r\n line.y1 = line.y1 - slopY / length * left;\r\n }\r\n\r\n if (right)\r\n {\r\n line.x2 = line.x2 + slopX / length * right;\r\n line.y2 = line.y2 + slopY / length * right;\r\n }\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Extend.js?')},"./node_modules/phaser/src/geom/line/GetMidPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the midpoint of the given line.\r\n *\r\n * @function Phaser.Geom.Line.GetMidPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the midpoint of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the midpoint in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The midpoint of the Line.\r\n */\r\nvar GetMidPoint = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (line.x1 + line.x2) / 2;\r\n out.y = (line.y1 + line.y2) / 2;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetMidPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetMidPoint.js?')},"./node_modules/phaser/src/geom/line/GetNearestPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the nearest point on a line perpendicular to the given point.\r\n *\r\n * @function Phaser.Geom.Line.GetNearestPoint\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the nearest point on.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the nearest point to.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the nearest point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The nearest point on the line.\r\n */\r\nvar GetNearestPoint = function (line, point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var r = (((point.x - x1) * (x2 - x1)) + ((point.y - y1) * (y2 - y1))) / L2;\r\n\r\n out.x = x1 + (r * (x2 - x1));\r\n out.y = y1 + (r * (y2 - y1));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNearestPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNearestPoint.js?')},"./node_modules/phaser/src/geom/line/GetNormal.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculate the normal of the given line.\r\n *\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.GetNormal\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the normal in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The normal of the Line.\r\n */\r\nvar GetNormal = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var a = Angle(line) - MATH_CONST.TAU;\r\n\r\n out.x = Math.cos(a);\r\n out.y = Math.sin(a);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNormal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNormal.js?')},"./node_modules/phaser/src/geom/line/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoint.js?')},"./node_modules/phaser/src/geom/line/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoints.js?')},"./node_modules/phaser/src/geom/line/GetShortestDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Get the shortest distance from a Line to the given Point.\r\n *\r\n * @function Phaser.Geom.Line.GetShortestDistance\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the distance from.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to.\r\n *\r\n * @return {number} The shortest distance from the line to the point.\r\n */\r\nvar GetShortestDistance = function (line, point)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var s = (((y1 - point.y) * (x2 - x1)) - ((x1 - point.x) * (y2 - y1))) / L2;\r\n\r\n return Math.abs(s) * Math.sqrt(L2);\r\n};\r\n\r\nmodule.exports = GetShortestDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetShortestDistance.js?")},"./node_modules/phaser/src/geom/line/Height.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the height of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Height\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the height of.\r\n *\r\n * @return {number} The height of the line.\r\n */\r\nvar Height = function (line)\r\n{\r\n return Math.abs(line.y1 - line.y2);\r\n};\r\n\r\nmodule.exports = Height;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Height.js?")},"./node_modules/phaser/src/geom/line/Length.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Length.js?")},"./node_modules/phaser/src/geom/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {Phaser.Geom.Line} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Line.js?')},"./node_modules/phaser/src/geom/line/NormalAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * Get the angle of the normal of the given line in radians.\r\n *\r\n * @function Phaser.Geom.Line.NormalAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of the normal of.\r\n *\r\n * @return {number} The angle of the normal of the line in radians.\r\n */\r\nvar NormalAngle = function (line)\r\n{\r\n var angle = Angle(line) - MATH_CONST.TAU;\r\n\r\n return Wrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = NormalAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalAngle.js?')},"./node_modules/phaser/src/geom/line/NormalX.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Line.NormalX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line object to get the normal value from.\r\n *\r\n * @return {number} [description]\r\n */\r\nvar NormalX = function (line)\r\n{\r\n return Math.cos(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalX.js?')},"./node_modules/phaser/src/geom/line/NormalY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * The Y value of the normal of the given line.\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.NormalY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n *\r\n * @return {number} The Y value of the normal of the Line.\r\n */\r\nvar NormalY = function (line)\r\n{\r\n return Math.sin(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalY.js?')},"./node_modules/phaser/src/geom/line/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offset a line by the given amount.\r\n *\r\n * @function Phaser.Geom.Line.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to offset.\r\n * @param {number} x - The horizontal offset to add to the line.\r\n * @param {number} y - The vertical offset to add to the line.\r\n *\r\n * @return {Phaser.Geom.Line} The offset line.\r\n */\r\nvar Offset = function (line, x, y)\r\n{\r\n line.x1 += x;\r\n line.y1 += y;\r\n\r\n line.x2 += x;\r\n line.y2 += y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Offset.js?")},"./node_modules/phaser/src/geom/line/PerpSlope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the perpendicular slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.PerpSlope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the perpendicular slope of.\r\n *\r\n * @return {number} The perpendicular slope of the line.\r\n */\r\nvar PerpSlope = function (line)\r\n{\r\n return -((line.x2 - line.x1) / (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = PerpSlope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/PerpSlope.js?")},"./node_modules/phaser/src/geom/line/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Random.js?')},"./node_modules/phaser/src/geom/line/ReflectAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\n\r\n/**\r\n * Calculate the reflected angle between two lines.\r\n *\r\n * This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.\r\n *\r\n * @function Phaser.Geom.Line.ReflectAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} lineA - The first line.\r\n * @param {Phaser.Geom.Line} lineB - The second line.\r\n *\r\n * @return {number} The reflected angle between each line.\r\n */\r\nvar ReflectAngle = function (lineA, lineB)\r\n{\r\n return (2 * NormalAngle(lineB) - Math.PI - Angle(lineA));\r\n};\r\n\r\nmodule.exports = ReflectAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/ReflectAngle.js?')},"./node_modules/phaser/src/geom/line/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around its midpoint by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar Rotate = function (line, angle)\r\n{\r\n var x = (line.x1 + line.x2) / 2;\r\n var y = (line.y1 + line.y2) / 2;\r\n\r\n return RotateAroundXY(line, x, y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Rotate.js?')},"./node_modules/phaser/src/geom/line/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around a point by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundPoint = function (line, point, angle)\r\n{\r\n return RotateAroundXY(line, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/line/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a line around the given coordinates by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} x - The horizontal coordinate to rotate the line around.\r\n * @param {number} y - The vertical coordinate to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundXY = function (line, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = line.x1 - x;\r\n var ty = line.y1 - y;\r\n\r\n line.x1 = tx * c - ty * s + x;\r\n line.y1 = tx * s + ty * c + y;\r\n\r\n tx = line.x2 - x;\r\n ty = line.y2 - y;\r\n\r\n line.x2 = tx * c - ty * s + x;\r\n line.y2 = tx * s + ty * c + y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/line/SetToAngle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set a line to a given position, angle and length.\r\n *\r\n * @function Phaser.Geom.Line.SetToAngle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to set.\r\n * @param {number} x - The horizontal start position of the line.\r\n * @param {number} y - The vertical start position of the line.\r\n * @param {number} angle - The angle of the line in radians.\r\n * @param {number} length - The length of the line.\r\n *\r\n * @return {Phaser.Geom.Line} The updated line.\r\n */\r\nvar SetToAngle = function (line, x, y, angle, length)\r\n{\r\n line.x1 = x;\r\n line.y1 = y;\r\n\r\n line.x2 = x + (Math.cos(angle) * length);\r\n line.y2 = y + (Math.sin(angle) * length);\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = SetToAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/SetToAngle.js?")},"./node_modules/phaser/src/geom/line/Slope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Slope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the slope of.\r\n *\r\n * @return {number} The slope of the line.\r\n */\r\nvar Slope = function (line)\r\n{\r\n return (line.y2 - line.y1) / (line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Slope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Slope.js?")},"./node_modules/phaser/src/geom/line/Width.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the width of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Width\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the width of.\r\n *\r\n * @return {number} The width of the line.\r\n */\r\nvar Width = function (line)\r\n{\r\n return Math.abs(line.x1 - line.x2);\r\n};\r\n\r\nmodule.exports = Width;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Width.js?")},"./node_modules/phaser/src/geom/line/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\nLine.Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nLine.BresenhamPoints = __webpack_require__(/*! ./BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\nLine.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/line/CenterOn.js");\r\nLine.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/line/Clone.js");\r\nLine.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/line/CopyFrom.js");\r\nLine.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/line/Equals.js");\r\nLine.Extend = __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/geom/line/Extend.js");\r\nLine.GetMidPoint = __webpack_require__(/*! ./GetMidPoint */ "./node_modules/phaser/src/geom/line/GetMidPoint.js");\r\nLine.GetNearestPoint = __webpack_require__(/*! ./GetNearestPoint */ "./node_modules/phaser/src/geom/line/GetNearestPoint.js");\r\nLine.GetNormal = __webpack_require__(/*! ./GetNormal */ "./node_modules/phaser/src/geom/line/GetNormal.js");\r\nLine.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nLine.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nLine.GetShortestDistance = __webpack_require__(/*! ./GetShortestDistance */ "./node_modules/phaser/src/geom/line/GetShortestDistance.js");\r\nLine.Height = __webpack_require__(/*! ./Height */ "./node_modules/phaser/src/geom/line/Height.js");\r\nLine.Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nLine.NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\nLine.NormalX = __webpack_require__(/*! ./NormalX */ "./node_modules/phaser/src/geom/line/NormalX.js");\r\nLine.NormalY = __webpack_require__(/*! ./NormalY */ "./node_modules/phaser/src/geom/line/NormalY.js");\r\nLine.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/line/Offset.js");\r\nLine.PerpSlope = __webpack_require__(/*! ./PerpSlope */ "./node_modules/phaser/src/geom/line/PerpSlope.js");\r\nLine.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nLine.ReflectAngle = __webpack_require__(/*! ./ReflectAngle */ "./node_modules/phaser/src/geom/line/ReflectAngle.js");\r\nLine.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/line/Rotate.js");\r\nLine.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/line/RotateAroundPoint.js");\r\nLine.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\nLine.SetToAngle = __webpack_require__(/*! ./SetToAngle */ "./node_modules/phaser/src/geom/line/SetToAngle.js");\r\nLine.Slope = __webpack_require__(/*! ./Slope */ "./node_modules/phaser/src/geom/line/Slope.js");\r\nLine.Width = __webpack_require__(/*! ./Width */ "./node_modules/phaser/src/geom/line/Width.js");\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/index.js?')},"./node_modules/phaser/src/geom/point/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to ceil.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.ceil()` applied to its coordinates.\r\n */\r\nvar Ceil = function (point)\r\n{\r\n return point.setTo(Math.ceil(point.x), Math.ceil(point.y));\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Ceil.js?")},"./node_modules/phaser/src/geom/point/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Clone the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to clone.\r\n *\r\n * @return {Phaser.Geom.Point} The cloned Point.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Point(source.x, source.y);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Clone.js?')},"./node_modules/phaser/src/geom/point/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Point to a destination Point.\r\n *\r\n * @function Phaser.Geom.Point.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to copy the values from.\r\n * @param {Phaser.Geom.Point} dest - The destination Point to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Point} The destination Point.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/CopyFrom.js?")},"./node_modules/phaser/src/geom/point/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A comparison of two `Point` objects to see if they are equal.\r\n *\r\n * @function Phaser.Geom.Point.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The original `Point` to compare against.\r\n * @param {Phaser.Geom.Point} toCompare - The second `Point` to compare.\r\n *\r\n * @return {boolean} Returns true if the both `Point` objects are equal.\r\n */\r\nvar Equals = function (point, toCompare)\r\n{\r\n return (point.x === toCompare.x && point.y === toCompare.y);\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Equals.js?")},"./node_modules/phaser/src/geom/point/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to floor.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.floor()` applied to its coordinates.\r\n */\r\nvar Floor = function (point)\r\n{\r\n return point.setTo(Math.floor(point.x), Math.floor(point.y));\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Floor.js?")},"./node_modules/phaser/src/geom/point/GetCentroid.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ \"./node_modules/phaser/src/geom/point/Point.js\");\r\n\r\n/**\r\n * Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).\r\n * Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.\r\n *\r\n * @function Phaser.Geom.Point.GetCentroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetCentroid = function (points, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n throw new Error('GetCentroid points argument must be an array');\r\n }\r\n\r\n var len = points.length;\r\n\r\n if (len < 1)\r\n {\r\n throw new Error('GetCentroid points array must not be empty');\r\n }\r\n else if (len === 1)\r\n {\r\n out.x = points[0].x;\r\n out.y = points[0].y;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < len; i++)\r\n {\r\n out.x += points[i].x;\r\n out.y += points[i].y;\r\n }\r\n\r\n out.x /= len;\r\n out.y /= len;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCentroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetCentroid.js?")},"./node_modules/phaser/src/geom/point/GetMagnitude.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the magnitude of the point, which equivalent to the length of the line from the origin to this point.\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The point to calculate the magnitude for\r\n *\r\n * @return {number} The resulting magnitude\r\n */\r\nvar GetMagnitude = function (point)\r\n{\r\n return Math.sqrt((point.x * point.x) + (point.y * point.y));\r\n};\r\n\r\nmodule.exports = GetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitude.js?")},"./node_modules/phaser/src/geom/point/GetMagnitudeSq.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the square of magnitude of given point.(Can be used for fast magnitude calculation of point)\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitudeSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - Returns square of the magnitude/length of given point.\r\n *\r\n * @return {number} Returns square of the magnitude of given point.\r\n */\r\nvar GetMagnitudeSq = function (point)\r\n{\r\n return (point.x * point.x) + (point.y * point.y);\r\n};\r\n\r\nmodule.exports = GetMagnitudeSq;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitudeSq.js?")},"./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.\r\n *\r\n * @function Phaser.Geom.Point.GetRectangleFromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Rectangle} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Rectangle} [description]\r\n */\r\nvar GetRectangleFromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var xMax = Number.NEGATIVE_INFINITY;\r\n var xMin = Number.POSITIVE_INFINITY;\r\n var yMax = Number.NEGATIVE_INFINITY;\r\n var yMin = Number.POSITIVE_INFINITY;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var point = points[i];\r\n\r\n if (point.x > xMax)\r\n {\r\n xMax = point.x;\r\n }\r\n\r\n if (point.x < xMin)\r\n {\r\n xMin = point.x;\r\n }\r\n\r\n if (point.y > yMax)\r\n {\r\n yMax = point.y;\r\n }\r\n\r\n if (point.y < yMin)\r\n {\r\n yMin = point.y;\r\n }\r\n }\r\n\r\n out.x = xMin;\r\n out.y = yMin;\r\n out.width = xMax - xMin;\r\n out.height = yMax - yMin;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleFromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js?')},"./node_modules/phaser/src/geom/point/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Interpolate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - The starting `Point` for the interpolation.\r\n * @param {Phaser.Geom.Point} pointB - The target `Point` for the interpolation.\r\n * @param {number} [t=0] - The amount to interpolate between the two points. Generally, a value between 0 (returns the starting `Point`) and 1 (returns the target `Point`). If omitted, 0 is used.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional `Point` object whose `x` and `y` values will be set to the result of the interpolation (can also be any object with `x` and `y` properties). If omitted, a new `Point` created and returned.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Either the object from the `out` argument with the properties `x` and `y` set to the result of the interpolation or a newly created `Point` object.\r\n */\r\nvar Interpolate = function (pointA, pointB, t, out)\r\n{\r\n if (t === undefined) { t = 0; }\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = pointA.x + ((pointB.x - pointA.x) * t);\r\n out.y = pointA.y + ((pointB.y - pointA.y) * t);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Interpolate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Interpolate.js?')},"./node_modules/phaser/src/geom/point/Invert.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the X and the Y coordinate of a point.\r\n *\r\n * @function Phaser.Geom.Point.Invert\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to modify.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `point`.\r\n */\r\nvar Invert = function (point)\r\n{\r\n return point.setTo(point.y, point.x);\r\n};\r\n\r\nmodule.exports = Invert;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Invert.js?")},"./node_modules/phaser/src/geom/point/Negative.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Inverts a Point\'s coordinates.\r\n *\r\n * @function Phaser.Geom.Point.Negative\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to invert.\r\n * @param {Phaser.Geom.Point} [out] - The Point to return the inverted coordinates in.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` Point, or a new Point if none was provided.\r\n */\r\nvar Negative = function (point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n return out.setTo(-point.x, -point.y);\r\n};\r\n\r\nmodule.exports = Negative;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Negative.js?')},"./node_modules/phaser/src/geom/point/Point.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {Phaser.Geom.Point} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Point.js?')},"./node_modules/phaser/src/geom/point/Project.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Project\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Project = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var dot = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n var amt = dot / GetMagnitudeSq(pointB);\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Project;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Project.js?')},"./node_modules/phaser/src/geom/point/ProjectUnit.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.ProjectUnit\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar ProjectUnit = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var amt = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ProjectUnit;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/ProjectUnit.js?')},"./node_modules/phaser/src/geom/point/SetMagnitude.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\n\r\n/**\r\n * Changes the magnitude (length) of a two-dimensional vector without changing its direction.\r\n *\r\n * @function Phaser.Geom.Point.SetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to treat as the end point of the vector.\r\n * @param {number} magnitude - The new magnitude of the vector.\r\n *\r\n * @return {Phaser.Geom.Point} The modified Point.\r\n */\r\nvar SetMagnitude = function (point, magnitude)\r\n{\r\n if (point.x !== 0 || point.y !== 0)\r\n {\r\n var m = GetMagnitude(point);\r\n\r\n point.x /= m;\r\n point.y /= m;\r\n }\r\n\r\n point.x *= magnitude;\r\n point.y *= magnitude;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = SetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/SetMagnitude.js?')},"./node_modules/phaser/src/geom/point/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nPoint.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/point/Ceil.js");\r\nPoint.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/point/Clone.js");\r\nPoint.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/point/CopyFrom.js");\r\nPoint.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/point/Equals.js");\r\nPoint.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/point/Floor.js");\r\nPoint.GetCentroid = __webpack_require__(/*! ./GetCentroid */ "./node_modules/phaser/src/geom/point/GetCentroid.js");\r\nPoint.GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\nPoint.GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\nPoint.GetRectangleFromPoints = __webpack_require__(/*! ./GetRectangleFromPoints */ "./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js");\r\nPoint.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/geom/point/Interpolate.js");\r\nPoint.Invert = __webpack_require__(/*! ./Invert */ "./node_modules/phaser/src/geom/point/Invert.js");\r\nPoint.Negative = __webpack_require__(/*! ./Negative */ "./node_modules/phaser/src/geom/point/Negative.js");\r\nPoint.Project = __webpack_require__(/*! ./Project */ "./node_modules/phaser/src/geom/point/Project.js");\r\nPoint.ProjectUnit = __webpack_require__(/*! ./ProjectUnit */ "./node_modules/phaser/src/geom/point/ProjectUnit.js");\r\nPoint.SetMagnitude = __webpack_require__(/*! ./SetMagnitude */ "./node_modules/phaser/src/geom/point/SetMagnitude.js");\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/index.js?')},"./node_modules/phaser/src/geom/polygon/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\n/**\r\n * Create a new polygon which is a copy of the specified polygon\r\n *\r\n * @function Phaser.Geom.Polygon.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to create a clone of\r\n *\r\n * @return {Phaser.Geom.Polygon} A new separate Polygon cloned from the specified polygon, based on the same points.\r\n */\r\nvar Clone = function (polygon)\r\n{\r\n return new Polygon(polygon.points);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Clone.js?')},"./node_modules/phaser/src/geom/polygon/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Checks whether the x and y coordinates are contained within this polygon.\r\n// Adapted from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html by Jonas Raoni Soares Silva\r\n\r\n/**\r\n * Checks if a point is within the bounds of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to check against.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the bounds of the Polygon, otherwise `false`.\r\n */\r\nvar Contains = function (polygon, x, y)\r\n{\r\n var inside = false;\r\n\r\n for (var i = -1, j = polygon.points.length - 1; ++i < polygon.points.length; j = i)\r\n {\r\n var ix = polygon.points[i].x;\r\n var iy = polygon.points[i].y;\r\n\r\n var jx = polygon.points[j].x;\r\n var jy = polygon.points[j].y;\r\n\r\n if (((iy <= y && y < jy) || (jy <= y && y < iy)) && (x < (jx - ix) * (y - iy) / (jy - iy) + ix))\r\n {\r\n inside = !inside;\r\n }\r\n }\r\n\r\n return inside;\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Contains.js?")},"./node_modules/phaser/src/geom/polygon/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Polygon.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - [description]\r\n * @param {Phaser.Geom.Point} point - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\nvar ContainsPoint = function (polygon, point)\r\n{\r\n return Contains(polygon, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/ContainsPoint.js?')},"./node_modules/phaser/src/geom/polygon/Earcut.js":function(module,exports,__webpack_require__){"use strict";eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Earcut 2.1.4 (December 4th 2018)\r\n\r\n/*\r\n * ISC License\r\n * \r\n * Copyright (c) 2016, Mapbox\r\n * \r\n * Permission to use, copy, modify, and/or distribute this software for any purpose\r\n * with or without fee is hereby granted, provided that the above copyright notice\r\n * and this permission notice appear in all copies.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r\n * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\r\n * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\r\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r\n * THIS SOFTWARE.\r\n */\r\n\r\n\r\n\r\nmodule.exports = earcut;\r\n\r\nfunction earcut(data, holeIndices, dim) {\r\n\r\n dim = dim || 2;\r\n\r\n var hasHoles = holeIndices && holeIndices.length,\r\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\r\n outerNode = linkedList(data, 0, outerLen, dim, true),\r\n triangles = [];\r\n\r\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\r\n\r\n var minX, minY, maxX, maxY, x, y, invSize;\r\n\r\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\r\n\r\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\r\n if (data.length > 80 * dim) {\r\n minX = maxX = data[0];\r\n minY = maxY = data[1];\r\n\r\n for (var i = dim; i < outerLen; i += dim) {\r\n x = data[i];\r\n y = data[i + 1];\r\n if (x < minX) minX = x;\r\n if (y < minY) minY = y;\r\n if (x > maxX) maxX = x;\r\n if (y > maxY) maxY = y;\r\n }\r\n\r\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\r\n invSize = Math.max(maxX - minX, maxY - minY);\r\n invSize = invSize !== 0 ? 1 / invSize : 0;\r\n }\r\n\r\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\r\n\r\n return triangles;\r\n}\r\n\r\n// create a circular doubly linked list from polygon points in the specified winding order\r\nfunction linkedList(data, start, end, dim, clockwise) {\r\n var i, last;\r\n\r\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\r\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\r\n } else {\r\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\r\n }\r\n\r\n if (last && equals(last, last.next)) {\r\n removeNode(last);\r\n last = last.next;\r\n }\r\n\r\n return last;\r\n}\r\n\r\n// eliminate colinear or duplicate points\r\nfunction filterPoints(start, end) {\r\n if (!start) return start;\r\n if (!end) end = start;\r\n\r\n var p = start,\r\n again;\r\n do {\r\n again = false;\r\n\r\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\r\n removeNode(p);\r\n p = end = p.prev;\r\n if (p === p.next) break;\r\n again = true;\r\n\r\n } else {\r\n p = p.next;\r\n }\r\n } while (again || p !== end);\r\n\r\n return end;\r\n}\r\n\r\n// main ear slicing loop which triangulates a polygon (given as a linked list)\r\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\r\n if (!ear) return;\r\n\r\n // interlink polygon nodes in z-order\r\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\r\n\r\n var stop = ear,\r\n prev, next;\r\n\r\n // iterate through ears, slicing them one by one\r\n while (ear.prev !== ear.next) {\r\n prev = ear.prev;\r\n next = ear.next;\r\n\r\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\r\n // cut off the triangle\r\n triangles.push(prev.i / dim);\r\n triangles.push(ear.i / dim);\r\n triangles.push(next.i / dim);\r\n\r\n removeNode(ear);\r\n\r\n // skipping the next vertex leads to less sliver triangles\r\n ear = next.next;\r\n stop = next.next;\r\n\r\n continue;\r\n }\r\n\r\n ear = next;\r\n\r\n // if we looped through the whole remaining polygon and can't find any more ears\r\n if (ear === stop) {\r\n // try filtering points and slicing again\r\n if (!pass) {\r\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\r\n\r\n // if this didn't work, try curing all small self-intersections locally\r\n } else if (pass === 1) {\r\n ear = cureLocalIntersections(ear, triangles, dim);\r\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\r\n\r\n // as a last resort, try splitting the remaining polygon into two\r\n } else if (pass === 2) {\r\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n}\r\n\r\n// check whether a polygon node forms a valid ear with adjacent nodes\r\nfunction isEar(ear) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // now make sure we don't have other points inside the potential ear\r\n var p = ear.next.next;\r\n\r\n while (p !== ear.prev) {\r\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.next;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nfunction isEarHashed(ear, minX, minY, invSize) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // triangle bbox; min & max are calculated like this for speed\r\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\r\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\r\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\r\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\r\n\r\n // z-order range for the current triangle bbox;\r\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\r\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\r\n\r\n var p = ear.prevZ,\r\n n = ear.nextZ;\r\n\r\n // look for points inside the triangle in both directions\r\n while (p && p.z >= minZ && n && n.z <= maxZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n // look for remaining points in decreasing z-order\r\n while (p && p.z >= minZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n }\r\n\r\n // look for remaining points in increasing z-order\r\n while (n && n.z <= maxZ) {\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n return true;\r\n}\r\n\r\n// go through all polygon nodes and cure small local self-intersections\r\nfunction cureLocalIntersections(start, triangles, dim) {\r\n var p = start;\r\n do {\r\n var a = p.prev,\r\n b = p.next.next;\r\n\r\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\r\n\r\n triangles.push(a.i / dim);\r\n triangles.push(p.i / dim);\r\n triangles.push(b.i / dim);\r\n\r\n // remove two nodes involved\r\n removeNode(p);\r\n removeNode(p.next);\r\n\r\n p = start = b;\r\n }\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return p;\r\n}\r\n\r\n// try splitting polygon into two and triangulate them independently\r\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\r\n // look for a valid diagonal that divides the polygon into two\r\n var a = start;\r\n do {\r\n var b = a.next.next;\r\n while (b !== a.prev) {\r\n if (a.i !== b.i && isValidDiagonal(a, b)) {\r\n // split the polygon in two by the diagonal\r\n var c = splitPolygon(a, b);\r\n\r\n // filter colinear points around the cuts\r\n a = filterPoints(a, a.next);\r\n c = filterPoints(c, c.next);\r\n\r\n // run earcut on each half\r\n earcutLinked(a, triangles, dim, minX, minY, invSize);\r\n earcutLinked(c, triangles, dim, minX, minY, invSize);\r\n return;\r\n }\r\n b = b.next;\r\n }\r\n a = a.next;\r\n } while (a !== start);\r\n}\r\n\r\n// link every hole into the outer loop, producing a single-ring polygon without holes\r\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\r\n var queue = [],\r\n i, len, start, end, list;\r\n\r\n for (i = 0, len = holeIndices.length; i < len; i++) {\r\n start = holeIndices[i] * dim;\r\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n list = linkedList(data, start, end, dim, false);\r\n if (list === list.next) list.steiner = true;\r\n queue.push(getLeftmost(list));\r\n }\r\n\r\n queue.sort(compareX);\r\n\r\n // process holes from left to right\r\n for (i = 0; i < queue.length; i++) {\r\n eliminateHole(queue[i], outerNode);\r\n outerNode = filterPoints(outerNode, outerNode.next);\r\n }\r\n\r\n return outerNode;\r\n}\r\n\r\nfunction compareX(a, b) {\r\n return a.x - b.x;\r\n}\r\n\r\n// find a bridge between vertices that connects hole with an outer ring and and link it\r\nfunction eliminateHole(hole, outerNode) {\r\n outerNode = findHoleBridge(hole, outerNode);\r\n if (outerNode) {\r\n var b = splitPolygon(outerNode, hole);\r\n filterPoints(b, b.next);\r\n }\r\n}\r\n\r\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\r\nfunction findHoleBridge(hole, outerNode) {\r\n var p = outerNode,\r\n hx = hole.x,\r\n hy = hole.y,\r\n qx = -Infinity,\r\n m;\r\n\r\n // find a segment intersected by a ray from the hole's leftmost point to the left;\r\n // segment's endpoint with lesser x will be potential connection point\r\n do {\r\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\r\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\r\n if (x <= hx && x > qx) {\r\n qx = x;\r\n if (x === hx) {\r\n if (hy === p.y) return p;\r\n if (hy === p.next.y) return p.next;\r\n }\r\n m = p.x < p.next.x ? p : p.next;\r\n }\r\n }\r\n p = p.next;\r\n } while (p !== outerNode);\r\n\r\n if (!m) return null;\r\n\r\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\r\n\r\n // look for points inside the triangle of hole point, segment intersection and endpoint;\r\n // if there are no points found, we have a valid connection;\r\n // otherwise choose the point of the minimum angle with the ray as connection point\r\n\r\n var stop = m,\r\n mx = m.x,\r\n my = m.y,\r\n tanMin = Infinity,\r\n tan;\r\n\r\n p = m.next;\r\n\r\n while (p !== stop) {\r\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\r\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\r\n\r\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\r\n\r\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\r\n m = p;\r\n tanMin = tan;\r\n }\r\n }\r\n\r\n p = p.next;\r\n }\r\n\r\n return m;\r\n}\r\n\r\n// interlink polygon nodes in z-order\r\nfunction indexCurve(start, minX, minY, invSize) {\r\n var p = start;\r\n do {\r\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\r\n p.prevZ = p.prev;\r\n p.nextZ = p.next;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n p.prevZ.nextZ = null;\r\n p.prevZ = null;\r\n\r\n sortLinked(p);\r\n}\r\n\r\n// Simon Tatham's linked list merge sort algorithm\r\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\r\nfunction sortLinked(list) {\r\n var i, p, q, e, tail, numMerges, pSize, qSize,\r\n inSize = 1;\r\n\r\n do {\r\n p = list;\r\n list = null;\r\n tail = null;\r\n numMerges = 0;\r\n\r\n while (p) {\r\n numMerges++;\r\n q = p;\r\n pSize = 0;\r\n for (i = 0; i < inSize; i++) {\r\n pSize++;\r\n q = q.nextZ;\r\n if (!q) break;\r\n }\r\n qSize = inSize;\r\n\r\n while (pSize > 0 || (qSize > 0 && q)) {\r\n\r\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\r\n e = p;\r\n p = p.nextZ;\r\n pSize--;\r\n } else {\r\n e = q;\r\n q = q.nextZ;\r\n qSize--;\r\n }\r\n\r\n if (tail) tail.nextZ = e;\r\n else list = e;\r\n\r\n e.prevZ = tail;\r\n tail = e;\r\n }\r\n\r\n p = q;\r\n }\r\n\r\n tail.nextZ = null;\r\n inSize *= 2;\r\n\r\n } while (numMerges > 1);\r\n\r\n return list;\r\n}\r\n\r\n// z-order of a point given coords and inverse of the longer side of data bbox\r\nfunction zOrder(x, y, minX, minY, invSize) {\r\n // coords are transformed into non-negative 15-bit integer range\r\n x = 32767 * (x - minX) * invSize;\r\n y = 32767 * (y - minY) * invSize;\r\n\r\n x = (x | (x << 8)) & 0x00FF00FF;\r\n x = (x | (x << 4)) & 0x0F0F0F0F;\r\n x = (x | (x << 2)) & 0x33333333;\r\n x = (x | (x << 1)) & 0x55555555;\r\n\r\n y = (y | (y << 8)) & 0x00FF00FF;\r\n y = (y | (y << 4)) & 0x0F0F0F0F;\r\n y = (y | (y << 2)) & 0x33333333;\r\n y = (y | (y << 1)) & 0x55555555;\r\n\r\n return x | (y << 1);\r\n}\r\n\r\n// find the leftmost node of a polygon ring\r\nfunction getLeftmost(start) {\r\n var p = start,\r\n leftmost = start;\r\n do {\r\n if (p.x < leftmost.x) leftmost = p;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return leftmost;\r\n}\r\n\r\n// check if a point lies within a convex triangle\r\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\r\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\r\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\r\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\r\n}\r\n\r\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\r\nfunction isValidDiagonal(a, b) {\r\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\r\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\r\n}\r\n\r\n// signed area of a triangle\r\nfunction area(p, q, r) {\r\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\r\n}\r\n\r\n// check if two points are equal\r\nfunction equals(p1, p2) {\r\n return p1.x === p2.x && p1.y === p2.y;\r\n}\r\n\r\n// check if two segments intersect\r\nfunction intersects(p1, q1, p2, q2) {\r\n if ((equals(p1, q1) && equals(p2, q2)) ||\r\n (equals(p1, q2) && equals(p2, q1))) return true;\r\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\r\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\r\n}\r\n\r\n// check if a polygon diagonal intersects any polygon segments\r\nfunction intersectsPolygon(a, b) {\r\n var p = a;\r\n do {\r\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\r\n intersects(p, p.next, a, b)) return true;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return false;\r\n}\r\n\r\n// check if a polygon diagonal is locally inside the polygon\r\nfunction locallyInside(a, b) {\r\n return area(a.prev, a, a.next) < 0 ?\r\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\r\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\r\n}\r\n\r\n// check if the middle point of a polygon diagonal is inside the polygon\r\nfunction middleInside(a, b) {\r\n var p = a,\r\n inside = false,\r\n px = (a.x + b.x) / 2,\r\n py = (a.y + b.y) / 2;\r\n do {\r\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\r\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\r\n inside = !inside;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return inside;\r\n}\r\n\r\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\r\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\r\nfunction splitPolygon(a, b) {\r\n var a2 = new Node(a.i, a.x, a.y),\r\n b2 = new Node(b.i, b.x, b.y),\r\n an = a.next,\r\n bp = b.prev;\r\n\r\n a.next = b;\r\n b.prev = a;\r\n\r\n a2.next = an;\r\n an.prev = a2;\r\n\r\n b2.next = a2;\r\n a2.prev = b2;\r\n\r\n bp.next = b2;\r\n b2.prev = bp;\r\n\r\n return b2;\r\n}\r\n\r\n// create a node and optionally link it with previous one (in a circular doubly linked list)\r\nfunction insertNode(i, x, y, last) {\r\n var p = new Node(i, x, y);\r\n\r\n if (!last) {\r\n p.prev = p;\r\n p.next = p;\r\n\r\n } else {\r\n p.next = last.next;\r\n p.prev = last;\r\n last.next.prev = p;\r\n last.next = p;\r\n }\r\n return p;\r\n}\r\n\r\nfunction removeNode(p) {\r\n p.next.prev = p.prev;\r\n p.prev.next = p.next;\r\n\r\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\r\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\r\n}\r\n\r\nfunction Node(i, x, y) {\r\n // vertex index in coordinates array\r\n this.i = i;\r\n\r\n // vertex coordinates\r\n this.x = x;\r\n this.y = y;\r\n\r\n // previous and next vertex nodes in a polygon ring\r\n this.prev = null;\r\n this.next = null;\r\n\r\n // z-order curve value\r\n this.z = null;\r\n\r\n // previous and next nodes in z-order\r\n this.prevZ = null;\r\n this.nextZ = null;\r\n\r\n // indicates whether this is a steiner point\r\n this.steiner = false;\r\n}\r\n\r\n// return a percentage difference between the polygon area and its triangulation area;\r\n// used to verify correctness of triangulation\r\nearcut.deviation = function (data, holeIndices, dim, triangles) {\r\n var hasHoles = holeIndices && holeIndices.length;\r\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\r\n\r\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\r\n if (hasHoles) {\r\n for (var i = 0, len = holeIndices.length; i < len; i++) {\r\n var start = holeIndices[i] * dim;\r\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\r\n }\r\n }\r\n\r\n var trianglesArea = 0;\r\n for (i = 0; i < triangles.length; i += 3) {\r\n var a = triangles[i] * dim;\r\n var b = triangles[i + 1] * dim;\r\n var c = triangles[i + 2] * dim;\r\n trianglesArea += Math.abs(\r\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\r\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\r\n }\r\n\r\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\r\n Math.abs((trianglesArea - polygonArea) / polygonArea);\r\n};\r\n\r\nfunction signedArea(data, start, end, dim) {\r\n var sum = 0;\r\n for (var i = start, j = end - dim; i < end; i += dim) {\r\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\r\n j = i;\r\n }\r\n return sum;\r\n}\r\n\r\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\r\nearcut.flatten = function (data) {\r\n var dim = data[0][0].length,\r\n result = {vertices: [], holes: [], dimensions: dim},\r\n holeIndex = 0;\r\n\r\n for (var i = 0; i < data.length; i++) {\r\n for (var j = 0; j < data[i].length; j++) {\r\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\r\n }\r\n if (i > 0) {\r\n holeIndex += data[i - 1].length;\r\n result.holes.push(holeIndex);\r\n }\r\n }\r\n return result;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Earcut.js?")},"./node_modules/phaser/src/geom/polygon/GetAABB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the bounding AABB rectangle of a polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.GetAABB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon that should be calculated.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - The rectangle or object that has x, y, width, and height properties to store the result. Optional.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The resulting rectangle or object that is passed in with position and dimensions of the polygon\'s AABB.\r\n */\r\nvar GetAABB = function (polygon, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var minX = Infinity;\r\n var minY = Infinity;\r\n var maxX = -minX;\r\n var maxY = -minY;\r\n var p;\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n p = polygon.points[i];\r\n\r\n minX = Math.min(minX, p.x);\r\n minY = Math.min(minY, p.y);\r\n maxX = Math.max(maxX, p.x);\r\n maxY = Math.max(maxY, p.y);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetAABB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetAABB.js?')},"./node_modules/phaser/src/geom/polygon/GetNumberArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]\r\n\r\n/**\r\n * Stores all of the points of a Polygon into a flat array of numbers following the sequence [ x,y, x,y, x,y ],\r\n * i.e. each point of the Polygon, in the order it's defined, corresponds to two elements of the resultant\r\n * array for the point's X and Y coordinate.\r\n *\r\n * @function Phaser.Geom.Polygon.GetNumberArray\r\n * @since 3.0.0\r\n *\r\n * @generic {number[]} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon whose points to export.\r\n * @param {(array|number[])} [output] - An array to which the points' coordinates should be appended.\r\n *\r\n * @return {(array|number[])} The modified `output` array, or a new array if none was given.\r\n */\r\nvar GetNumberArray = function (polygon, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n output.push(polygon.points[i].x);\r\n output.push(polygon.points[i].y);\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetNumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetNumberArray.js?")},"./node_modules/phaser/src/geom/polygon/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Polygon.GetPoints\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\nvar GetPoints = function (polygon, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var points = polygon.points;\r\n var perimeter = Perimeter(polygon);\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = perimeter * (i / quantity);\r\n var accumulatedPerimeter = 0;\r\n\r\n for (var j = 0; j < points.length; j++)\r\n {\r\n var pointA = points[j];\r\n var pointB = points[(j + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n var length = Length(line);\r\n\r\n if (position < accumulatedPerimeter || position > accumulatedPerimeter + length)\r\n {\r\n accumulatedPerimeter += length;\r\n continue;\r\n }\r\n\r\n var point = line.getPoint((position - accumulatedPerimeter) / length);\r\n out.push(point);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetPoints.js?')},"./node_modules/phaser/src/geom/polygon/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Returns the perimeter of the given Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Perimeter\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the perimeter of.\r\n *\r\n * @return {number} The perimeter of the Polygon.\r\n */\r\nvar Perimeter = function (polygon)\r\n{\r\n var points = polygon.points;\r\n var perimeter = 0;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var pointA = points[i];\r\n var pointB = points[(i + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n\r\n perimeter += Length(line);\r\n }\r\n\r\n return perimeter;\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Perimeter.js?')},"./node_modules/phaser/src/geom/polygon/Polygon.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Contains = __webpack_require__(/*! ./Contains */ \"./node_modules/phaser/src/geom/polygon/Contains.js\");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ \"./node_modules/phaser/src/geom/polygon/GetPoints.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/geom/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Polygon object\r\n *\r\n\r\n * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.\r\n * Several formats are supported to define the list of points, check the setTo method for details. \r\n * This is a geometry object allowing you to define and inspect the shape.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Polygon you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Polygon\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported: \r\n * - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n */\r\nvar Polygon = new Class({\r\n\r\n initialize:\r\n\r\n function Polygon (points)\r\n {\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POLYGON`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Polygon#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POLYGON;\r\n\r\n /**\r\n * The area of this Polygon.\r\n *\r\n * @name Phaser.Geom.Polygon#area\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.area = 0;\r\n\r\n /**\r\n * An array of number pair objects that make up this polygon. I.e. [ {x,y}, {x,y}, {x,y} ]\r\n *\r\n * @name Phaser.Geom.Polygon#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n if (points)\r\n {\r\n this.setTo(points);\r\n }\r\n },\r\n\r\n /**\r\n * Check to see if the Polygon contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Polygon#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the polygon.\r\n * @param {number} y - The y coordinate to check within the polygon.\r\n *\r\n * @return {boolean} `true` if the coordinates are within the polygon, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Sets this Polygon to the given points.\r\n *\r\n * The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n *\r\n * `setTo` may also be called without any arguments to remove all points.\r\n *\r\n * @method Phaser.Geom.Polygon#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.\r\n *\r\n * @return {Phaser.Geom.Polygon} This Polygon object.\r\n */\r\n setTo: function (points)\r\n {\r\n this.area = 0;\r\n this.points = [];\r\n\r\n if (typeof points === 'string')\r\n {\r\n points = points.split(' ');\r\n }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n return this;\r\n }\r\n\r\n var p;\r\n var y0 = Number.MAX_VALUE;\r\n\r\n // The points argument is an array, so iterate through it\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = { x: 0, y: 0 };\r\n\r\n if (typeof points[i] === 'number' || typeof points[i] === 'string')\r\n {\r\n p.x = parseFloat(points[i]);\r\n p.y = parseFloat(points[i + 1]);\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n\r\n // Lowest boundary\r\n if (p.y < y0)\r\n {\r\n y0 = p.y;\r\n }\r\n }\r\n\r\n this.calculateArea(y0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates the area of the Polygon. This is available in the property Polygon.area\r\n *\r\n * @method Phaser.Geom.Polygon#calculateArea\r\n * @since 3.0.0\r\n *\r\n * @return {number} The area of the polygon.\r\n */\r\n calculateArea: function ()\r\n {\r\n if (this.points.length < 3)\r\n {\r\n this.area = 0;\r\n\r\n return this.area;\r\n }\r\n\r\n var sum = 0;\r\n var p1;\r\n var p2;\r\n\r\n for (var i = 0; i < this.points.length - 1; i++)\r\n {\r\n p1 = this.points[i];\r\n p2 = this.points[i + 1];\r\n\r\n sum += (p2.x - p1.x) * (p1.y + p2.y);\r\n }\r\n\r\n p1 = this.points[0];\r\n p2 = this.points[this.points.length - 1];\r\n\r\n sum += (p1.x - p2.x) * (p2.y + p1.y);\r\n\r\n this.area = -sum * 0.5;\r\n\r\n return this.area;\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Polygon#getPoints\r\n * @since 3.12.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\n getPoints: function (quantity, step, output)\r\n {\r\n return GetPoints(this, quantity, step, output);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Polygon.js?")},"./node_modules/phaser/src/geom/polygon/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the order of the points of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Reverse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to modify.\r\n *\r\n * @return {Phaser.Geom.Polygon} The modified Polygon.\r\n */\r\nvar Reverse = function (polygon)\r\n{\r\n polygon.points.reverse();\r\n\r\n return polygon;\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Reverse.js?")},"./node_modules/phaser/src/geom/polygon/Smooth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Igor Ognichenko \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar copy = function (out, a)\r\n{\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n \r\n return out;\r\n};\r\n\r\n/**\r\n * Takes a Polygon object and applies Chaikin's smoothing algorithm on its points.\r\n *\r\n * @function Phaser.Geom.Polygon.Smooth\r\n * @since 3.13.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to be smoothed. The polygon will be modified in-place and returned.\r\n *\r\n * @return {Phaser.Geom.Polygon} The input polygon.\r\n */\r\nvar Smooth = function (polygon)\r\n{\r\n var i;\r\n var points = [];\r\n var data = polygon.points;\r\n\r\n for (i = 0; i < data.length; i++)\r\n {\r\n points.push([ data[i].x, data[i].y ]);\r\n }\r\n\r\n var output = [];\r\n \r\n if (points.length > 0)\r\n {\r\n output.push(copy([ 0, 0 ], points[0]));\r\n }\r\n \r\n for (i = 0; i < points.length - 1; i++)\r\n {\r\n var p0 = points[i];\r\n var p1 = points[i + 1];\r\n var p0x = p0[0];\r\n var p0y = p0[1];\r\n var p1x = p1[0];\r\n var p1y = p1[1];\r\n\r\n output.push([ 0.85 * p0x + 0.15 * p1x, 0.85 * p0y + 0.15 * p1y ]);\r\n output.push([ 0.15 * p0x + 0.85 * p1x, 0.15 * p0y + 0.85 * p1y ]);\r\n }\r\n \r\n if (points.length > 1)\r\n {\r\n output.push(copy([ 0, 0 ], points[points.length - 1]));\r\n }\r\n \r\n return polygon.setTo(output);\r\n};\r\n\r\nmodule.exports = Smooth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Smooth.js?")},"./node_modules/phaser/src/geom/polygon/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\nPolygon.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/polygon/Clone.js");\r\nPolygon.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\nPolygon.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/polygon/ContainsPoint.js");\r\nPolygon.GetAABB = __webpack_require__(/*! ./GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nPolygon.GetNumberArray = __webpack_require__(/*! ./GetNumberArray */ "./node_modules/phaser/src/geom/polygon/GetNumberArray.js");\r\nPolygon.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/polygon/GetPoints.js");\r\nPolygon.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\nPolygon.Reverse = __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/geom/polygon/Reverse.js");\r\nPolygon.Smooth = __webpack_require__(/*! ./Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/index.js?')},"./node_modules/phaser/src/geom/rectangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to calculate the area of.\r\n *\r\n * @return {number} The area of the Rectangle object.\r\n */\r\nvar Area = function (rect)\r\n{\r\n return rect.width * rect.height;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Area.js?")},"./node_modules/phaser/src/geom/rectangle/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position up to the smallest integer greater than or equal to each current coordinate.\r\n *\r\n * @function Phaser.Geom.Rectangle.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Ceil = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Ceil.js?")},"./node_modules/phaser/src/geom/rectangle/CeilAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size up to the smallest integer greater than or equal to each respective value.\r\n *\r\n * @function Phaser.Geom.Rectangle.CeilAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to modify.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar CeilAll = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n rect.width = Math.ceil(rect.width);\r\n rect.height = Math.ceil(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CeilAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CeilAll.js?")},"./node_modules/phaser/src/geom/rectangle/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Centers this Rectangle so that the center coordinates match the given x and y values.\r\n\r\n/**\r\n * Moves the top-left corner of a Rectangle so that its center is at the given coordinates.\r\n *\r\n * @function Phaser.Geom.Rectangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to be centered.\r\n * @param {number} x - The X coordinate of the Rectangle's center.\r\n * @param {number} y - The Y coordinate of the Rectangle's center.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The centered rectangle.\r\n */\r\nvar CenterOn = function (rect, x, y)\r\n{\r\n rect.x = x - (rect.width / 2);\r\n rect.y = y - (rect.height / 2);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CenterOn.js?")},"./node_modules/phaser/src/geom/rectangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle which is identical to the given one.\r\n *\r\n * @function Phaser.Geom.Rectangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The Rectangle to clone.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The newly created Rectangle, which is separate from the given one.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Rectangle(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Clone.js?')},"./node_modules/phaser/src/geom/rectangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Contains.js?")},"./node_modules/phaser/src/geom/rectangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object.\r\n * @param {Phaser.Geom.Point} point - The point object to be checked. Can be a Phaser Point object or any object with x and y values.\r\n *\r\n * @return {boolean} A value of true if the Rectangle object contains the specified point, otherwise false.\r\n */\r\nvar ContainsPoint = function (rect, point)\r\n{\r\n return Contains(rect, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/rectangle/ContainsRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if one rectangle fully contains another.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first rectangle.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second rectangle.\r\n *\r\n * @return {boolean} True only if rectA fully contains rectB.\r\n */\r\nvar ContainsRect = function (rectA, rectB)\r\n{\r\n // Volume check (if rectB volume > rectA then rectA cannot contain it)\r\n if ((rectB.width * rectB.height) > (rectA.width * rectA.height))\r\n {\r\n return false;\r\n }\r\n\r\n return (\r\n (rectB.x > rectA.x && rectB.x < rectA.right) &&\r\n (rectB.right > rectA.x && rectB.right < rectA.right) &&\r\n (rectB.y > rectA.y && rectB.y < rectA.bottom) &&\r\n (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsRect.js?")},"./node_modules/phaser/src/geom/rectangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Rectangle to a destination Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The source Rectangle to copy the values from.\r\n * @param {Phaser.Geom.Rectangle} dest - The destination Rectangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The destination Rectangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/rectangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array of points for each corner of a Rectangle\r\n * If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.\r\n *\r\n * @function Phaser.Geom.Rectangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object to be decomposed.\r\n * @param {array} [out] - If provided, each point will be added to this array.\r\n *\r\n * @return {array} Will return the array you specified or a new array containing the points of the Rectangle.\r\n */\r\nvar Decompose = function (rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: rect.x, y: rect.y });\r\n out.push({ x: rect.right, y: rect.y });\r\n out.push({ x: rect.right, y: rect.bottom });\r\n out.push({ x: rect.x, y: rect.bottom });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Decompose.js?")},"./node_modules/phaser/src/geom/rectangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of two rectangles.\r\n *\r\n * @function Phaser.Geom.Rectangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle A\r\n * @param {Phaser.Geom.Rectangle} toCompare - Rectangle B\r\n *\r\n * @return {boolean} `true` if the rectangles' properties are an exact match, otherwise `false`.\r\n */\r\nvar Equals = function (rect, toCompare)\r\n{\r\n return (\r\n rect.x === toCompare.x &&\r\n rect.y === toCompare.y &&\r\n rect.width === toCompare.width &&\r\n rect.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Equals.js?")},"./node_modules/phaser/src/geom/rectangle/FitInside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fits inside the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitOutside` function, there may be some space inside the source area not covered.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitInside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envelop the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitInside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio < GetAspectRatio(source))\r\n {\r\n // Taller than Wide\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Wider than Tall\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - (target.width / 2),\r\n source.centerY - (target.height / 2)\r\n );\r\n};\r\n\r\nmodule.exports = FitInside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitInside.js?')},"./node_modules/phaser/src/geom/rectangle/FitOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fully covers the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitInside` function, the target rectangle may extend further out than the source.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitOutside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitOutside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio > GetAspectRatio(source))\r\n {\r\n // Wider than Tall\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Taller than Wide\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - target.width / 2,\r\n source.centerY - target.height / 2\r\n );\r\n};\r\n\r\nmodule.exports = FitOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds down (floors) the top left X and Y co-ordinates of the given Rectangle to the largest integer less than or equal to them\r\n *\r\n * @function Phaser.Geom.Rectangle.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to floor the top left X and Y co-ordinates of\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle that was passed to this function with its co-ordinates floored.\r\n */\r\nvar Floor = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Floor.js?")},"./node_modules/phaser/src/geom/rectangle/FloorAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size down to the largest integer less than or equal to each current coordinate or dimension.\r\n *\r\n * @function Phaser.Geom.Rectangle.FloorAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar FloorAll = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n rect.width = Math.floor(rect.width);\r\n rect.height = Math.floor(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = FloorAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FloorAll.js?")},"./node_modules/phaser/src/geom/rectangle/FromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n// points is an array of Point-like objects,\r\n// either 2 dimensional arrays, or objects with public x/y properties:\r\n// var points = [\r\n// [100, 200],\r\n// [200, 400],\r\n// { x: 30, y: 60 }\r\n// ]\r\n\r\n/**\r\n * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.FromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {array} points - An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public `x` and `y` properties) which should be surrounded by the Rectangle.\r\n * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar FromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (points.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var minX = Number.MAX_VALUE;\r\n var minY = Number.MAX_VALUE;\r\n\r\n var maxX = Number.MIN_SAFE_INTEGER;\r\n var maxY = Number.MIN_SAFE_INTEGER;\r\n\r\n var p;\r\n var px;\r\n var py;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = points[i];\r\n\r\n if (Array.isArray(p))\r\n {\r\n px = p[0];\r\n py = p[1];\r\n }\r\n else\r\n {\r\n px = p.x;\r\n py = p.y;\r\n }\r\n\r\n minX = Math.min(minX, px);\r\n minY = Math.min(minY, py);\r\n\r\n maxX = Math.max(maxX, px);\r\n maxY = Math.max(maxY, py);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = FromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FromPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the width/height ratio of a rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetAspectRatio\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n *\r\n * @return {number} The width/height ratio of the rectangle.\r\n */\r\nvar GetAspectRatio = function (rect)\r\n{\r\n return (rect.height === 0) ? NaN : rect.width / rect.height;\r\n};\r\n\r\nmodule.exports = GetAspectRatio;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js?")},"./node_modules/phaser/src/geom/rectangle/GetCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns the center of a Rectangle as a Point.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the center of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - Optional point-like object to update with the center coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar GetCenter = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.centerX;\r\n out.y = rect.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetCenter.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {number} position - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoint.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsy. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsy, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetSize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * The size of the Rectangle object, expressed as a Point object\r\n * with the values of the width and height properties.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetSize\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {(Phaser.Geom.Point|object)} [description]\r\n */\r\nvar GetSize = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.width;\r\n out.y = rect.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetSize.js?')},"./node_modules/phaser/src/geom/rectangle/Inflate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\n\r\n\r\n/**\r\n * Increases the size of a Rectangle by a specified amount.\r\n *\r\n * The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.\r\n *\r\n * @function Phaser.Geom.Rectangle.Inflate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to inflate.\r\n * @param {number} x - How many pixels the left and the right side should be moved by horizontally.\r\n * @param {number} y - How many pixels the top and the bottom side should be moved by vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The inflated Rectangle.\r\n */\r\nvar Inflate = function (rect, x, y)\r\n{\r\n var cx = rect.centerX;\r\n var cy = rect.centerY;\r\n\r\n rect.setSize(rect.width + (x * 2), rect.height + (y * 2));\r\n\r\n return CenterOn(rect, cx, cy);\r\n};\r\n\r\nmodule.exports = Inflate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Inflate.js?')},"./node_modules/phaser/src/geom/rectangle/Intersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Intersects = __webpack_require__(/*! ../intersects/RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Takes two Rectangles and first checks to see if they intersect.\r\n * If they intersect it will return the area of intersection in the `out` Rectangle.\r\n * If they do not intersect, the `out` Rectangle will have a width and height of zero.\r\n *\r\n * @function Phaser.Geom.Rectangle.Intersection\r\n * @since 3.11.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle to store the intersection results in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The intersection result. If the width and height are zero, no intersection occurred.\r\n */\r\nvar Intersection = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (Intersects(rectA, rectB))\r\n {\r\n out.x = Math.max(rectA.x, rectB.x);\r\n out.y = Math.max(rectA.y, rectB.y);\r\n out.width = Math.min(rectA.right, rectB.right) - out.x;\r\n out.height = Math.min(rectA.bottom, rectB.bottom) - out.y;\r\n }\r\n else\r\n {\r\n out.setEmpty();\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Intersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Intersection.js?')},"./node_modules/phaser/src/geom/rectangle/MarchingAnts.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle\r\n * each spaced out based on the quantity or step required\r\n *\r\n * @function Phaser.Geom.Rectangle.MarchingAnts\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {number} step - [description]\r\n * @param {integer} quantity - [description]\r\n * @param {(array|Phaser.Geom.Point[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} [description]\r\n */\r\nvar MarchingAnts = function (rect, step, quantity, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (!step && !quantity)\r\n {\r\n // Bail out\r\n return out;\r\n }\r\n\r\n // If step is a falsey value (false, null, 0, undefined, etc) then we calculate\r\n // it based on the quantity instead, otherwise we always use the step value\r\n if (!step)\r\n {\r\n step = Perimeter(rect) / quantity;\r\n }\r\n else\r\n {\r\n quantity = Math.round(Perimeter(rect) / step);\r\n }\r\n\r\n var x = rect.x;\r\n var y = rect.y;\r\n var face = 0;\r\n\r\n // Loop across each face of the rectangle\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n out.push(new Point(x, y));\r\n\r\n switch (face)\r\n {\r\n\r\n // Top face\r\n case 0:\r\n x += step;\r\n\r\n if (x >= rect.right)\r\n {\r\n face = 1;\r\n y += (x - rect.right);\r\n x = rect.right;\r\n }\r\n break;\r\n\r\n // Right face\r\n case 1:\r\n y += step;\r\n\r\n if (y >= rect.bottom)\r\n {\r\n face = 2;\r\n x -= (y - rect.bottom);\r\n y = rect.bottom;\r\n }\r\n break;\r\n\r\n // Bottom face\r\n case 2:\r\n x -= step;\r\n\r\n if (x <= rect.left)\r\n {\r\n face = 3;\r\n y -= (rect.left - x);\r\n x = rect.left;\r\n }\r\n break;\r\n\r\n // Left face\r\n case 3:\r\n y -= step;\r\n\r\n if (y <= rect.top)\r\n {\r\n face = 0;\r\n y = rect.top;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = MarchingAnts;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MarchingAnts.js?')},"./node_modules/phaser/src/geom/rectangle/MergePoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergePoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged.\r\n * @param {Phaser.Geom.Point[]} points - An array of Points (or any object with public `x` and `y` properties) which should be merged with the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar MergePoints = function (target, points)\r\n{\r\n var minX = target.x;\r\n var maxX = target.right;\r\n var minY = target.y;\r\n var maxY = target.bottom;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n minX = Math.min(minX, points[i].x);\r\n maxX = Math.max(maxX, points[i].x);\r\n minY = Math.min(minY, points[i].y);\r\n maxY = Math.max(maxY, points[i].y);\r\n }\r\n\r\n target.x = minX;\r\n target.y = minY;\r\n target.width = maxX - minX;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergePoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergePoints.js?")},"./node_modules/phaser/src/geom/rectangle/MergeRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Merges source rectangle into target rectangle and returns target\r\n// Neither rect should have negative widths or heights\r\n\r\n/**\r\n * Merges the source rectangle into the target rectangle and returns the target.\r\n * Neither rectangle should have a negative width or height.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeRect\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - Target rectangle. Will be modified to include source rectangle.\r\n * @param {Phaser.Geom.Rectangle} source - Rectangle that will be merged into target rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} Modified target rectangle that contains source rectangle.\r\n */\r\nvar MergeRect = function (target, source)\r\n{\r\n var minX = Math.min(target.x, source.x);\r\n var maxX = Math.max(target.right, source.right);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, source.y);\r\n var maxY = Math.max(target.bottom, source.bottom);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeRect.js?")},"./node_modules/phaser/src/geom/rectangle/MergeXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged and modified.\r\n * @param {number} x - The X coordinate of the point which should be merged.\r\n * @param {number} y - The Y coordinate of the point which should be merged.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `target` Rectangle.\r\n */\r\nvar MergeXY = function (target, x, y)\r\n{\r\n var minX = Math.min(target.x, x);\r\n var maxX = Math.max(target.right, x);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, y);\r\n var maxY = Math.max(target.bottom, y);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeXY.js?")},"./node_modules/phaser/src/geom/rectangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top left corner of a Rectangle by a given offset.\r\n *\r\n * @function Phaser.Geom.Rectangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {number} x - The distance to move the Rectangle horizontally.\r\n * @param {number} y - The distance to move the Rectangle vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Offset = function (rect, x, y)\r\n{\r\n rect.x += x;\r\n rect.y += y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Offset.js?")},"./node_modules/phaser/src/geom/rectangle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top-left corner of a Rectangle by the coordinates of a point (translation vector).\r\n *\r\n * @function Phaser.Geom.Rectangle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2)} point - The point whose coordinates should be used as an offset.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar OffsetPoint = function (rect, point)\r\n{\r\n rect.x += point.x;\r\n rect.y += point.y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/rectangle/Overlaps.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".\r\n *\r\n * @function Phaser.Geom.Rectangle.Overlaps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check.\r\n *\r\n * @return {boolean} `true` if the two Rectangles overlap, `false` otherwise.\r\n */\r\nvar Overlaps = function (rectA, rectB)\r\n{\r\n return (\r\n rectA.x < rectB.right &&\r\n rectA.right > rectB.x &&\r\n rectA.y < rectB.bottom &&\r\n rectA.bottom > rectB.y\r\n );\r\n};\r\n\r\nmodule.exports = Overlaps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Overlaps.js?')},"./node_modules/phaser/src/geom/rectangle/Perimeter.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Perimeter.js?")},"./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Rectangle.PerimeterPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {integer} angle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar PerimeterPoint = function (rectangle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n angle = DegToRad(angle);\r\n\r\n var s = Math.sin(angle);\r\n var c = Math.cos(angle);\r\n\r\n var dx = (c > 0) ? rectangle.width / 2 : rectangle.width / -2;\r\n var dy = (s > 0) ? rectangle.height / 2 : rectangle.height / -2;\r\n\r\n if (Math.abs(dx * s) < Math.abs(dy * c))\r\n {\r\n dy = (dx * s) / c;\r\n }\r\n else\r\n {\r\n dx = (dy * c) / s;\r\n }\r\n\r\n out.x = dx + rectangle.centerX;\r\n out.y = dy + rectangle.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = PerimeterPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js?')},"./node_modules/phaser/src/geom/rectangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point\'s coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Random.js?')},"./node_modules/phaser/src/geom/rectangle/RandomOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\r\nvar ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.\r\n * The inner Rectangle must be fully contained within the outer rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.RandomOutside\r\n * @since 3.10.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} outer - The outer Rectangle to get the random point within.\r\n * @param {Phaser.Geom.Rectangle} inner - The inner Rectangle to exclude from the returned point.\r\n * @param {Phaser.Geom.Point} [out] - A Point, or Point-like object to store the result in. If not specified, a new Point will be created.\r\n *\r\n * @return {Phaser.Geom.Point} A Point object containing the random values in its `x` and `y` properties.\r\n */\r\nvar RandomOutside = function (outer, inner, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (ContainsRect(outer, inner))\r\n {\r\n // Pick a random quadrant\r\n //\r\n // The quadrants don\'t extend the full widths / heights of the outer rect to give\r\n // us a better uniformed distribution, otherwise you get clumping in the corners where\r\n // the 4 quads would overlap\r\n\r\n switch (Between(0, 3))\r\n {\r\n case 0: // Top\r\n out.x = outer.x + (Math.random() * (inner.right - outer.x));\r\n out.y = outer.y + (Math.random() * (inner.top - outer.y));\r\n break;\r\n\r\n case 1: // Bottom\r\n out.x = inner.x + (Math.random() * (outer.right - inner.x));\r\n out.y = inner.bottom + (Math.random() * (outer.bottom - inner.bottom));\r\n break;\r\n\r\n case 2: // Left\r\n out.x = outer.x + (Math.random() * (inner.x - outer.x));\r\n out.y = inner.y + (Math.random() * (outer.bottom - inner.y));\r\n break;\r\n\r\n case 3: // Right\r\n out.x = inner.right + (Math.random() * (outer.right - inner.right));\r\n out.y = outer.y + (Math.random() * (inner.bottom - outer.y));\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RandomOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/RandomOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle\'s bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle\'s perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle\'s perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Rectangle.js?')},"./node_modules/phaser/src/geom/rectangle/SameDimensions.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.\r\n *\r\n * @function Phaser.Geom.Rectangle.SameDimensions\r\n * @since 3.15.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} toCompare - The second Rectangle object.\r\n *\r\n * @return {boolean} `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.\r\n */\r\nvar SameDimensions = function (rect, toCompare)\r\n{\r\n return (rect.width === toCompare.width && rect.height === toCompare.height);\r\n};\r\n\r\nmodule.exports = SameDimensions;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/SameDimensions.js?")},"./node_modules/phaser/src/geom/rectangle/Scale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Scales the width and height of this Rectangle by the given amounts.\r\n\r\n/**\r\n * Scales the width and height of this Rectangle by the given amounts.\r\n *\r\n * @function Phaser.Geom.Rectangle.Scale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The `Rectangle` object that will be scaled by the specified amount(s).\r\n * @param {number} x - The factor by which to scale the rectangle horizontally.\r\n * @param {number} y - The amount by which to scale the rectangle vertically. If this is not specified, the rectangle will be scaled by the factor `x` in both directions.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle object with updated `width` and `height` properties as calculated from the scaling factor(s).\r\n */\r\nvar Scale = function (rect, x, y)\r\n{\r\n if (y === undefined) { y = x; }\r\n\r\n rect.width *= x;\r\n rect.height *= y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Scale.js?")},"./node_modules/phaser/src/geom/rectangle/Union.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Union.js?')},"./node_modules/phaser/src/geom/rectangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\nRectangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/rectangle/Area.js");\r\nRectangle.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/rectangle/Ceil.js");\r\nRectangle.CeilAll = __webpack_require__(/*! ./CeilAll */ "./node_modules/phaser/src/geom/rectangle/CeilAll.js");\r\nRectangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nRectangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/rectangle/Clone.js");\r\nRectangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nRectangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/rectangle/ContainsPoint.js");\r\nRectangle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nRectangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/rectangle/CopyFrom.js");\r\nRectangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\nRectangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/rectangle/Equals.js");\r\nRectangle.FitInside = __webpack_require__(/*! ./FitInside */ "./node_modules/phaser/src/geom/rectangle/FitInside.js");\r\nRectangle.FitOutside = __webpack_require__(/*! ./FitOutside */ "./node_modules/phaser/src/geom/rectangle/FitOutside.js");\r\nRectangle.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/rectangle/Floor.js");\r\nRectangle.FloorAll = __webpack_require__(/*! ./FloorAll */ "./node_modules/phaser/src/geom/rectangle/FloorAll.js");\r\nRectangle.FromPoints = __webpack_require__(/*! ./FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nRectangle.GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\nRectangle.GetCenter = __webpack_require__(/*! ./GetCenter */ "./node_modules/phaser/src/geom/rectangle/GetCenter.js");\r\nRectangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nRectangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nRectangle.GetSize = __webpack_require__(/*! ./GetSize */ "./node_modules/phaser/src/geom/rectangle/GetSize.js");\r\nRectangle.Inflate = __webpack_require__(/*! ./Inflate */ "./node_modules/phaser/src/geom/rectangle/Inflate.js");\r\nRectangle.Intersection = __webpack_require__(/*! ./Intersection */ "./node_modules/phaser/src/geom/rectangle/Intersection.js");\r\nRectangle.MarchingAnts = __webpack_require__(/*! ./MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nRectangle.MergePoints = __webpack_require__(/*! ./MergePoints */ "./node_modules/phaser/src/geom/rectangle/MergePoints.js");\r\nRectangle.MergeRect = __webpack_require__(/*! ./MergeRect */ "./node_modules/phaser/src/geom/rectangle/MergeRect.js");\r\nRectangle.MergeXY = __webpack_require__(/*! ./MergeXY */ "./node_modules/phaser/src/geom/rectangle/MergeXY.js");\r\nRectangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/rectangle/Offset.js");\r\nRectangle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/rectangle/OffsetPoint.js");\r\nRectangle.Overlaps = __webpack_require__(/*! ./Overlaps */ "./node_modules/phaser/src/geom/rectangle/Overlaps.js");\r\nRectangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nRectangle.PerimeterPoint = __webpack_require__(/*! ./PerimeterPoint */ "./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js");\r\nRectangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\nRectangle.RandomOutside = __webpack_require__(/*! ./RandomOutside */ "./node_modules/phaser/src/geom/rectangle/RandomOutside.js");\r\nRectangle.SameDimensions = __webpack_require__(/*! ./SameDimensions */ "./node_modules/phaser/src/geom/rectangle/SameDimensions.js");\r\nRectangle.Scale = __webpack_require__(/*! ./Scale */ "./node_modules/phaser/src/geom/rectangle/Scale.js");\r\nRectangle.Union = __webpack_require__(/*! ./Union */ "./node_modules/phaser/src/geom/rectangle/Union.js");\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/index.js?')},"./node_modules/phaser/src/geom/triangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Returns the area of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n *\r\n * @return {number} The area of the Triangle, always non-negative.\r\n */\r\nvar Area = function (triangle)\r\n{\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n return Math.abs(((x3 - x1) * (y2 - y1) - (x2 - x1) * (y3 - y1)) / 2);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Area.js?")},"./node_modules/phaser/src/geom/triangle/BuildEquilateral.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).\r\n * The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildEquilateral\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - x coordinate of the top point of the triangle.\r\n * @param {number} y - y coordinate of the top point of the triangle.\r\n * @param {number} length - Length of each side of the triangle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle object of the given size.\r\n */\r\nvar BuildEquilateral = function (x, y, length)\r\n{\r\n var height = length * (Math.sqrt(3) / 2);\r\n\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x + (length / 2);\r\n var y2 = y + height;\r\n\r\n var x3 = x - (length / 2);\r\n var y3 = y + height;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildEquilateral;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildEquilateral.js?')},"./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EarCut = __webpack_require__(/*! ../polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.BuildFromPolygon\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle[]} O - [out,$return]\r\n *\r\n * @param {array} data - A flat array of vertice coordinates like [x0,y0, x1,y1, x2,y2, ...]\r\n * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 5–7 and another with 8–11).\r\n * @param {number} [scaleX=1] - [description]\r\n * @param {number} [scaleY=1] - [description]\r\n * @param {(array|Phaser.Geom.Triangle[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Triangle[])} [description]\r\n */\r\nvar BuildFromPolygon = function (data, holes, scaleX, scaleY, out)\r\n{\r\n if (holes === undefined) { holes = null; }\r\n if (scaleX === undefined) { scaleX = 1; }\r\n if (scaleY === undefined) { scaleY = 1; }\r\n if (out === undefined) { out = []; }\r\n\r\n var tris = EarCut(data, holes);\r\n\r\n var a;\r\n var b;\r\n var c;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n for (var i = 0; i < tris.length; i += 3)\r\n {\r\n a = tris[i];\r\n b = tris[i + 1];\r\n c = tris[i + 2];\r\n\r\n x1 = data[a * 2] * scaleX;\r\n y1 = data[(a * 2) + 1] * scaleY;\r\n\r\n x2 = data[b * 2] * scaleX;\r\n y2 = data[(b * 2) + 1] * scaleY;\r\n\r\n x3 = data[c * 2] * scaleX;\r\n y3 = data[(c * 2) + 1] * scaleY;\r\n\r\n out.push(new Triangle(x1, y1, x2, y2, x3, y3));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = BuildFromPolygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js?')},"./node_modules/phaser/src/geom/triangle/BuildRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n// Builds a right triangle, with one 90 degree angle and two acute angles\r\n// The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle)\r\n// w/h can be positive or negative and represent the length of each side\r\n\r\n/**\r\n * Builds a right triangle, i.e. one which has a 90-degree angle and two acute angles.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the right angle, which will also be the first X coordinate of the constructed Triangle.\r\n * @param {number} y - The Y coordinate of the right angle, which will also be the first Y coordinate of the constructed Triangle.\r\n * @param {number} width - The length of the side which is to the left or to the right of the right angle.\r\n * @param {number} height - The length of the side which is above or below the right angle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The constructed right Triangle.\r\n */\r\nvar BuildRight = function (x, y, width, height)\r\n{\r\n if (height === undefined) { height = width; }\r\n\r\n // 90 degree angle\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x;\r\n var y2 = y - height;\r\n\r\n var x3 = x + width;\r\n var y3 = y;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildRight.js?')},"./node_modules/phaser/src/geom/triangle/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nvar Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\n\r\n/**\r\n * @callback CenterFunction\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to return the center coordinates of.\r\n *\r\n * @return {Phaser.Math.Vector2} The center point of the Triangle according to the function.\r\n */\r\n\r\n/**\r\n * Positions the Triangle so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to be positioned.\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {CenterFunction} [centerFunc] - The function used to center the triangle. Defaults to Centroid centering.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle that was centered.\r\n */\r\nvar CenterOn = function (triangle, x, y, centerFunc)\r\n{\r\n if (centerFunc === undefined) { centerFunc = Centroid; }\r\n\r\n // Get the center of the triangle\r\n var center = centerFunc(triangle);\r\n\r\n // Difference\r\n var diffX = x - center.x;\r\n var diffY = y - center.y;\r\n\r\n return Offset(triangle, diffX, diffY);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CenterOn.js?')},"./node_modules/phaser/src/geom/triangle/Centroid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three medians (the lines drawn from the vertices to the bisectors of the opposite sides)\r\n// meet in the centroid or center of mass (center of gravity).\r\n// The centroid divides each median in a ratio of 2:1\r\n\r\n/**\r\n * Calculates the position of a Triangle\'s centroid, which is also its center of mass (center of gravity).\r\n *\r\n * The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.\r\n *\r\n * @function Phaser.Geom.Triangle.Centroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the coordinates in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The `out` object with modified `x` and `y` properties, or a new Point if none was provided.\r\n */\r\nvar Centroid = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (triangle.x1 + triangle.x2 + triangle.x3) / 3;\r\n out.y = (triangle.y1 + triangle.y2 + triangle.y3) / 3;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Centroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Centroid.js?')},"./node_modules/phaser/src/geom/triangle/CircumCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html\r\n\r\n/**\r\n * Computes the determinant of a 2x2 matrix. Uses standard double-precision arithmetic, so is susceptible to round-off error.\r\n *\r\n * @function det\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} m00 - The [0,0] entry of the matrix.\r\n * @param {number} m01 - The [0,1] entry of the matrix.\r\n * @param {number} m10 - The [1,0] entry of the matrix.\r\n * @param {number} m11 - The [1,1] entry of the matrix.\r\n *\r\n * @return {number} the determinant.\r\n */\r\nfunction det (m00, m01, m10, m11)\r\n{\r\n return (m00 * m11) - (m01 * m10);\r\n}\r\n\r\n/**\r\n * Computes the circumcentre of a triangle. The circumcentre is the centre of\r\n * the circumcircle, the smallest circle which encloses the triangle. It is also\r\n * the common intersection point of the perpendicular bisectors of the sides of\r\n * the triangle, and is the only point which has equal distance to all three\r\n * vertices of the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\nvar CircumCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var cx = triangle.x3;\r\n var cy = triangle.y3;\r\n\r\n var ax = triangle.x1 - cx;\r\n var ay = triangle.y1 - cy;\r\n\r\n var bx = triangle.x2 - cx;\r\n var by = triangle.y2 - cy;\r\n\r\n var denom = 2 * det(ax, ay, bx, by);\r\n var numx = det(ay, ax * ax + ay * ay, by, bx * bx + by * by);\r\n var numy = det(ax, ax * ax + ay * ay, bx, bx * bx + by * by);\r\n\r\n out.x = cx - numx / denom;\r\n out.y = cy + numy / denom;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCenter.js?')},"./node_modules/phaser/src/geom/triangle/CircumCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n// Adapted from https://gist.github.com/mutoo/5617691\r\n\r\n/**\r\n * Finds the circumscribed circle (circumcircle) of a Triangle object. The circumcircle is the circle which touches all of the triangle\'s vertices.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use as input.\r\n * @param {Phaser.Geom.Circle} [out] - An optional Circle to store the result in.\r\n *\r\n * @return {Phaser.Geom.Circle} The updated `out` Circle, or a new Circle if none was provided.\r\n */\r\nvar CircumCircle = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Circle(); }\r\n\r\n // A\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n // B\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n // C\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var A = x2 - x1;\r\n var B = y2 - y1;\r\n var C = x3 - x1;\r\n var D = y3 - y1;\r\n var E = A * (x1 + x2) + B * (y1 + y2);\r\n var F = C * (x1 + x3) + D * (y1 + y3);\r\n var G = 2 * (A * (y3 - y2) - B * (x3 - x2));\r\n\r\n var dx;\r\n var dy;\r\n\r\n // If the points of the triangle are collinear, then just find the\r\n // extremes and use the midpoint as the center of the circumcircle.\r\n\r\n if (Math.abs(G) < 0.000001)\r\n {\r\n var minX = Math.min(x1, x2, x3);\r\n var minY = Math.min(y1, y2, y3);\r\n dx = (Math.max(x1, x2, x3) - minX) * 0.5;\r\n dy = (Math.max(y1, y2, y3) - minY) * 0.5;\r\n\r\n out.x = minX + dx;\r\n out.y = minY + dy;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n else\r\n {\r\n out.x = (D * E - B * F) / G;\r\n out.y = (A * F - C * E) / G;\r\n dx = out.x - x1;\r\n dy = out.y - y1;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCircle.js?')},"./node_modules/phaser/src/geom/triangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Clones a Triangle object.\r\n *\r\n * @function Phaser.Geom.Triangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The Triangle to clone.\r\n *\r\n * @return {Phaser.Geom.Triangle} A new Triangle identical to the given one but separate from it.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Triangle(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Clone.js?')},"./node_modules/phaser/src/geom/triangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n/**\r\n * Checks if a point (as a pair of coordinates) is inside a Triangle's bounds.\r\n *\r\n * @function Phaser.Geom.Triangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is inside the Triangle, otherwise `false`.\r\n */\r\nvar Contains = function (triangle, x, y)\r\n{\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var v2x = x - triangle.x1;\r\n var v2y = y - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot02 = (v0x * v2x) + (v0y * v2y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n var dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n var u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n var v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n\r\n return (u >= 0 && v >= 0 && (u + v < 1));\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Contains.js?")},"./node_modules/phaser/src/geom/triangle/ContainsArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n// points is an array of Point-like objects with public x/y properties\r\n// returns an array containing all points that are within the triangle, or an empty array if none\r\n// if 'returnFirst' is true it will return after the first point within the triangle is found\r\n\r\n/**\r\n * Filters an array of point-like objects to only those contained within a triangle.\r\n * If `returnFirst` is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsArray\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle that the points are being checked in.\r\n * @param {Phaser.Geom.Point[]} points - An array of point-like objects (objects that have an `x` and `y` property)\r\n * @param {boolean} [returnFirst=false] - If `true`, return an array containing only the first point found that is within the triangle.\r\n * @param {array} [out] - If provided, the points that are within the triangle will be appended to this array instead of being added to a new array. If `returnFirst` is true, only the first point found within the triangle will be appended. This array will also be returned by this function.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array containing all the points from `points` that are within the triangle, if an array was provided as `out`, points will be appended to that array and it will also be returned here.\r\n */\r\nvar ContainsArray = function (triangle, points, returnFirst, out)\r\n{\r\n if (returnFirst === undefined) { returnFirst = false; }\r\n if (out === undefined) { out = []; }\r\n\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n\r\n var u;\r\n var v;\r\n var v2x;\r\n var v2y;\r\n var dot02;\r\n var dot12;\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n v2x = points[i].x - x1;\r\n v2y = points[i].y - y1;\r\n\r\n dot02 = (v0x * v2x) + (v0y * v2y);\r\n dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n \r\n if (u >= 0 && v >= 0 && (u + v < 1))\r\n {\r\n out.push({ x: points[i].x, y: points[i].y });\r\n\r\n if (returnFirst)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ContainsArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsArray.js?")},"./node_modules/phaser/src/geom/triangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Tests if a triangle contains a point.\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|any)} point - The point to test, or any point-like object with public `x` and `y` properties.\r\n *\r\n * @return {boolean} `true` if the point is within the triangle, otherwise `false`.\r\n */\r\nvar ContainsPoint = function (triangle, point)\r\n{\r\n return Contains(triangle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/triangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Triangle to a destination Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The source Triangle to copy the values from.\r\n * @param {Phaser.Geom.Triangle} dest - The destination Triangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Triangle} The destination Triangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/triangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decomposes a Triangle into an array of its points.\r\n *\r\n * @function Phaser.Geom.Triangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to decompose.\r\n * @param {array} [out] - An array to store the points into.\r\n *\r\n * @return {array} The provided `out` array, or a new array if none was provided, with three objects with `x` and `y` properties representing each point of the Triangle appended to it.\r\n */\r\nvar Decompose = function (triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: triangle.x1, y: triangle.y1 });\r\n out.push({ x: triangle.x2, y: triangle.y2 });\r\n out.push({ x: triangle.x3, y: triangle.y3 });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Decompose.js?")},"./node_modules/phaser/src/geom/triangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns true if two triangles have the same coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The first triangle to check.\r\n * @param {Phaser.Geom.Triangle} toCompare - The second triangle to check.\r\n *\r\n * @return {boolean} `true` if the two given triangles have the exact same coordinates, otherwise `false`.\r\n */\r\nvar Equals = function (triangle, toCompare)\r\n{\r\n return (\r\n triangle.x1 === toCompare.x1 &&\r\n triangle.y1 === toCompare.y1 &&\r\n triangle.x2 === toCompare.x2 &&\r\n triangle.y2 === toCompare.y2 &&\r\n triangle.x3 === toCompare.x3 &&\r\n triangle.y3 === toCompare.y3\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Equals.js?")},"./node_modules/phaser/src/geom/triangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Returns a Point from around the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the point on its perimeter from.\r\n * @param {number} position - The position along the perimeter of the triangle. A value between 0 and 1.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An option Point, or Point-like object to store the value in. If not given a new Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object containing the given position from the perimeter of the triangle.\r\n */\r\nvar GetPoint = function (triangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = line1.x1;\r\n out.y = line1.y1;\r\n\r\n return out;\r\n }\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n var p = perimeter * position;\r\n var localPosition = 0;\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n out.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n out.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n out.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n out.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n out.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n out.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoint.js?')},"./node_modules/phaser/src/geom/triangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns an array of evenly spaced points on the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the points from.\r\n * @param {integer} quantity - The number of evenly spaced points to return. Set to 0 to return an arbitrary number of points based on the `stepRate`.\r\n * @param {number} stepRate - If `quantity` is 0, the distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to which the points should be appended.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `out` array, or a new array if none was provided.\r\n */\r\nvar GetPoints = function (triangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var p = perimeter * (i / quantity);\r\n var localPosition = 0;\r\n\r\n var point = new Point();\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n point.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n point.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n point.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n point.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n point.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n point.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n out.push(point);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoints.js?')},"./node_modules/phaser/src/geom/triangle/InCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three angle bisectors of a triangle meet in one point called the incenter.\r\n// It is the center of the incircle, the circle inscribed in the triangle.\r\n\r\nfunction getLength (x1, y1, x2, y2)\r\n{\r\n var x = x1 - x2;\r\n var y = y1 - y2;\r\n var magnitude = (x * x) + (y * y);\r\n\r\n return Math.sqrt(magnitude);\r\n}\r\n\r\n/**\r\n * Calculates the position of the incenter of a Triangle object. This is the point where its three angle bisectors meet and it\'s also the center of the incircle, which is the circle inscribed in the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.InCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to find the incenter of.\r\n * @param {Phaser.Geom.Point} [out] - An optional Point in which to store the coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} Point (x, y) of the center pixel of the triangle.\r\n */\r\nvar InCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var d1 = getLength(x3, y3, x2, y2);\r\n var d2 = getLength(x1, y1, x3, y3);\r\n var d3 = getLength(x2, y2, x1, y1);\r\n\r\n var p = d1 + d2 + d3;\r\n\r\n out.x = (x1 * d1 + x2 * d2 + x3 * d3) / p;\r\n out.y = (y1 * d1 + y2 * d2 + y3 * d3) / p;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = InCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/InCenter.js?')},"./node_modules/phaser/src/geom/triangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.\r\n *\r\n * @function Phaser.Geom.Triangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to move.\r\n * @param {number} x - The horizontal offset (distance) by which to move each point. Can be positive or negative.\r\n * @param {number} y - The vertical offset (distance) by which to move each point. Can be positive or negative.\r\n *\r\n * @return {Phaser.Geom.Triangle} The modified Triangle.\r\n */\r\nvar Offset = function (triangle, x, y)\r\n{\r\n triangle.x1 += x;\r\n triangle.y1 += y;\r\n\r\n triangle.x2 += x;\r\n triangle.y2 += y;\r\n\r\n triangle.x3 += x;\r\n triangle.y3 += y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Offset.js?")},"./node_modules/phaser/src/geom/triangle/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Gets the length of the perimeter of the given triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Perimeter = function (triangle)\r\n{\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n return (Length(line1) + Length(line2) + Length(line3));\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Perimeter.js?')},"./node_modules/phaser/src/geom/triangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Random = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n // Basis vectors\r\n var ux = triangle.x2 - triangle.x1;\r\n var uy = triangle.y2 - triangle.y1;\r\n\r\n var vx = triangle.x3 - triangle.x1;\r\n var vy = triangle.y3 - triangle.y1;\r\n\r\n // Random point within the unit square\r\n var r = Math.random();\r\n var s = Math.random();\r\n\r\n // Point outside the triangle? Remap it.\r\n if (r + s >= 1)\r\n {\r\n r = 1 - r;\r\n s = 1 - s;\r\n }\r\n\r\n out.x = triangle.x1 + ((ux * r) + (vx * s));\r\n out.y = triangle.y1 + ((uy * r) + (vy * s));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Random.js?')},"./node_modules/phaser/src/geom/triangle/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\nvar InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\n\r\n/**\r\n * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet.\r\n *\r\n * @function Phaser.Geom.Triangle.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar Rotate = function (triangle, angle)\r\n{\r\n var point = InCenter(triangle);\r\n\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Rotate.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {Phaser.Geom.Point} point - The Point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundPoint = function (triangle, point, angle)\r\n{\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotates an entire Triangle at a given angle about a specific point.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} x - The X coordinate of the point to rotate the Triangle about.\r\n * @param {number} y - The Y coordinate of the point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundXY = function (triangle, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = triangle.x1 - x;\r\n var ty = triangle.y1 - y;\r\n\r\n triangle.x1 = tx * c - ty * s + x;\r\n triangle.y1 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x2 - x;\r\n ty = triangle.y2 - y;\r\n\r\n triangle.x2 = tx * c - ty * s + x;\r\n triangle.y2 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x3 - x;\r\n ty = triangle.y3 - y;\r\n\r\n triangle.x3 = tx * c - ty * s + x;\r\n triangle.y3 = tx * s + ty * c + y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A triangle is a plane created by connecting three points.\r\n * The first two arguments specify the first point, the middle two arguments\r\n * specify the second point, and the last two arguments specify the third point.\r\n *\r\n * @class Triangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n */\r\nvar Triangle = new Class({\r\n\r\n initialize:\r\n\r\n function Triangle (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.TRIANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Triangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.TRIANGLE;\r\n\r\n /**\r\n * `x` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#x1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * `y` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#y1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * `x` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#x2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * `y` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#y2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n\r\n /**\r\n * `x` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#x3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x3 = x3;\r\n\r\n /**\r\n * `y` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#y3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y3 = y3;\r\n },\r\n\r\n /**\r\n * Checks whether a given points lies within the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to check.\r\n * @param {number} y - The y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the coordinate pair is within the triangle, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a specific point on the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - Position as float within `0` and `1`. `0` equals the first point.\r\n * @param {(Phaser.Geom.Point|object)} [output] - Optional Point, or point-like object, that the calculated point will be written to.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Calculated `Point` that represents the requested position. It is the same as `output` when this parameter has been given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Calculates a list of evenly distributed points on the triangle. It is either possible to pass an amount of points to be generated (`quantity`) or the distance between two points (`stepRate`).\r\n *\r\n * @method Phaser.Geom.Triangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - Number of points to be generated. Can be falsey when `stepRate` should be used. All points have the same distance along the triangle.\r\n * @param {number} [stepRate] - Distance between two points. Will only be used when `quantity` is falsey.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - Optional Array for writing the calculated points into. Otherwise a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} Returns a list of calculated `Point` instances or the filled array passed as parameter `output`.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point along the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - Optional `Point` that should be modified. Otherwise a new one will be created.\r\n *\r\n * @return {Phaser.Geom.Point} Random `Point`. When parameter `point` has been provided it will be returned.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets all three points of the triangle. Leaving out any coordinate sets it to be `0`.\r\n *\r\n * @method Phaser.Geom.Triangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n *\r\n * @return {Phaser.Geom.Triangle} This Triangle object.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n this.x3 = x3;\r\n this.y3 = y3;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line A of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line A of this Triangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x1, this.y1, this.x2, this.y2);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line B of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line B of this Triangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x2, this.y2, this.x3, this.y3);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line C of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line C of this Triangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x3, this.y3, this.x1, this.y1);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Left most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 <= this.x2 && this.x1 <= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 <= this.x1 && this.x2 <= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Right most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 >= this.x2 && this.x1 >= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 >= this.x1 && this.x2 >= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Top most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 <= this.y2 && this.y1 <= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 <= this.y1 && this.y2 <= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Bottom most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 >= this.y2 && this.y1 >= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 >= this.y1 && this.y2 >= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Triangle.js?')},"./node_modules/phaser/src/geom/triangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\nTriangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/triangle/Area.js");\r\nTriangle.BuildEquilateral = __webpack_require__(/*! ./BuildEquilateral */ "./node_modules/phaser/src/geom/triangle/BuildEquilateral.js");\r\nTriangle.BuildFromPolygon = __webpack_require__(/*! ./BuildFromPolygon */ "./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js");\r\nTriangle.BuildRight = __webpack_require__(/*! ./BuildRight */ "./node_modules/phaser/src/geom/triangle/BuildRight.js");\r\nTriangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/triangle/CenterOn.js");\r\nTriangle.Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nTriangle.CircumCenter = __webpack_require__(/*! ./CircumCenter */ "./node_modules/phaser/src/geom/triangle/CircumCenter.js");\r\nTriangle.CircumCircle = __webpack_require__(/*! ./CircumCircle */ "./node_modules/phaser/src/geom/triangle/CircumCircle.js");\r\nTriangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/triangle/Clone.js");\r\nTriangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nTriangle.ContainsArray = __webpack_require__(/*! ./ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nTriangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/triangle/ContainsPoint.js");\r\nTriangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/triangle/CopyFrom.js");\r\nTriangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nTriangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/triangle/Equals.js");\r\nTriangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nTriangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nTriangle.InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\nTriangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/triangle/Perimeter.js");\r\nTriangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\nTriangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\nTriangle.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/triangle/Rotate.js");\r\nTriangle.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js");\r\nTriangle.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/index.js?')},"./node_modules/phaser/src/input/CreateInteractiveObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Interactive Object.\r\n * \r\n * This is called automatically by the Input Manager when you enable a Game Object for input.\r\n *\r\n * The resulting Interactive Object is mapped to the Game Object's `input` property.\r\n *\r\n * @function Phaser.Input.CreateInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to which this Interactive Object is bound.\r\n * @param {any} hitArea - The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.\r\n *\r\n * @return {Phaser.Types.Input.InteractiveObject} The new Interactive Object.\r\n */\r\nvar CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)\r\n{\r\n return {\r\n\r\n gameObject: gameObject,\r\n\r\n enabled: true,\r\n draggable: false,\r\n dropZone: false,\r\n cursor: false,\r\n\r\n target: null,\r\n\r\n camera: null,\r\n\r\n hitArea: hitArea,\r\n hitAreaCallback: hitAreaCallback,\r\n hitAreaDebug: null,\r\n\r\n // Has the dev specified their own shape, or is this bound to the texture size?\r\n customHitArea: false,\r\n\r\n localX: 0,\r\n localY: 0,\r\n\r\n // 0 = Not being dragged\r\n // 1 = Being checked for dragging\r\n // 2 = Being dragged\r\n dragState: 0,\r\n\r\n dragStartX: 0,\r\n dragStartY: 0,\r\n dragStartXGlobal: 0,\r\n dragStartYGlobal: 0,\r\n\r\n dragX: 0,\r\n dragY: 0\r\n\r\n };\r\n};\r\n\r\nmodule.exports = CreateInteractiveObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreateInteractiveObject.js?")},"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Pixel Perfect Handler function.\r\n *\r\n * Access via `InputPlugin.makePixelPerfect` rather than calling it directly.\r\n *\r\n * @function Phaser.Input.CreatePixelPerfectHandler\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager.\r\n * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} The new Pixel Perfect Handler function.\r\n */\r\nvar CreatePixelPerfectHandler = function (textureManager, alphaTolerance)\r\n{\r\n return function (hitArea, x, y, gameObject)\r\n {\r\n var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name);\r\n\r\n return (alpha && alpha >= alphaTolerance);\r\n };\r\n};\r\n\r\nmodule.exports = CreatePixelPerfectHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreatePixelPerfectHandler.js?")},"./node_modules/phaser/src/input/InputManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar Keyboard = __webpack_require__(/*! ./keyboard/KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js");\r\nvar Mouse = __webpack_require__(/*! ./mouse/MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js");\r\nvar Pointer = __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js");\r\nvar Touch = __webpack_require__(/*! ./touch/TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js");\r\nvar TransformMatrix = __webpack_require__(/*! ../gameobjects/components/TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar TransformXY = __webpack_require__(/*! ../math/TransformXY */ "./node_modules/phaser/src/math/TransformXY.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance.\r\n *\r\n * Based on the Game Config it will create handlers for mouse and touch support.\r\n *\r\n * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class.\r\n *\r\n * It then manages the events, pointer creation and general hit test related operations.\r\n *\r\n * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods\r\n * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible\r\n * for dealing with all input events for a Scene.\r\n *\r\n * @class InputManager\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance that owns the Input Manager.\r\n * @param {object} config - The Input Configuration object, as set in the Game Config.\r\n */\r\nvar InputManager = new Class({\r\n\r\n initialize:\r\n\r\n function InputManager (game, config)\r\n {\r\n /**\r\n * The Game instance that owns the Input Manager.\r\n * A Game only maintains on instance of the Input Manager at any time.\r\n *\r\n * @name Phaser.Input.InputManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the global Game Scale Manager.\r\n * Used for all bounds checks and pointer scaling.\r\n *\r\n * @name Phaser.Input.InputManager#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * The Canvas that is used for all DOM event input listeners.\r\n *\r\n * @name Phaser.Input.InputManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The Game Configuration object, as set during the game boot.\r\n *\r\n * @name Phaser.Input.InputManager#config\r\n * @type {Phaser.Core.Config}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * If set, the Input Manager will run its update loop every frame.\r\n *\r\n * @name Phaser.Input.InputManager#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Event Emitter instance that the Input Manager uses to emit events from.\r\n *\r\n * @name Phaser.Input.InputManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n * This is updated automatically by the canvas over and out handlers.\r\n *\r\n * @name Phaser.Input.InputManager#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.isOver = true;\r\n\r\n /**\r\n * The default CSS cursor to be used when interacting with your game.\r\n *\r\n * See the `setDefaultCursor` method for more details.\r\n *\r\n * @name Phaser.Input.InputManager#defaultCursor\r\n * @type {string}\r\n * @since 3.10.0\r\n */\r\n this.defaultCursor = \'\';\r\n\r\n /**\r\n * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardManager}\r\n * @since 3.16.0\r\n */\r\n this.keyboard = (config.inputKeyboard) ? new Keyboard(this) : null;\r\n\r\n /**\r\n * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = (config.inputMouse) ? new Mouse(this) : null;\r\n\r\n /**\r\n * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#touch\r\n * @type {Phaser.Input.Touch.TouchManager}\r\n * @since 3.0.0\r\n */\r\n this.touch = (config.inputTouch) ? new Touch(this) : null;\r\n\r\n /**\r\n * An array of Pointers that have been added to the game.\r\n * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers.\r\n *\r\n * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them,\r\n * or set the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointers\r\n * @type {Phaser.Input.Pointer[]}\r\n * @since 3.10.0\r\n */\r\n this.pointers = [];\r\n\r\n /**\r\n * The number of touch objects activated and being processed each update.\r\n *\r\n * You can change this by either calling `addPointer` at run-time, or by\r\n * setting the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointersTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n this.pointersTotal = config.inputActivePointers;\r\n\r\n if (config.inputTouch && this.pointersTotal === 1)\r\n {\r\n this.pointersTotal = 2;\r\n }\r\n\r\n for (var i = 0; i <= this.pointersTotal; i++)\r\n {\r\n var pointer = new Pointer(this, i);\r\n\r\n pointer.smoothFactor = config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n }\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointer\r\n * @type {?Phaser.Input.Pointer}\r\n * @since 3.10.0\r\n */\r\n this.mousePointer = (config.inputMouse) ? this.pointers[0] : null;\r\n\r\n /**\r\n * The most recently active Pointer object.\r\n *\r\n * If you\'ve only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse.\r\n *\r\n * If your game doesn\'t need to support multi-touch then you can safely use this property in all of your game\r\n * code and it will adapt to be either the mouse or the touch, based on device.\r\n *\r\n * @name Phaser.Input.InputManager#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.0.0\r\n */\r\n this.activePointer = this.pointers[0];\r\n\r\n /**\r\n * If the top-most Scene in the Scene List receives an input it will stop input from\r\n * propagating any lower down the scene list, i.e. if you have a UI Scene at the top\r\n * and click something on it, that click will not then be passed down to any other\r\n * Scene below. Disable this to have input events passed through all Scenes, all the time.\r\n *\r\n * @name Phaser.Input.InputManager#globalTopOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.globalTopOnly = true;\r\n\r\n /**\r\n * The time this Input Manager was last updated.\r\n * This value is populated by the Game Step each frame.\r\n *\r\n * @name Phaser.Input.InputManager#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.2\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * A re-cycled point-like object to store hit test values in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempPoint\r\n * @type {{x:number, y:number}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempPoint = { x: 0, y: 0 };\r\n\r\n /**\r\n * A re-cycled array to store hit results in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempHitTest\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempHitTest = [];\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * An internal private var that records Scenes aborting event processing.\r\n *\r\n * @name Phaser.Input.InputManager#_tempSkip\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._tempSkip = false;\r\n\r\n /**\r\n * An internal private array that avoids needing to create a new array on every DOM mouse event.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointerContainer\r\n * @type {Phaser.Input.Pointer[]}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this.mousePointerContainer = [ this.mousePointer ];\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now.\r\n *\r\n * @method Phaser.Input.InputManager#boot\r\n * @protected\r\n * @fires Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.canvas = this.game.canvas;\r\n\r\n this.scaleManager = this.game.scale;\r\n\r\n this.events.emit(Events.MANAGER_BOOT);\r\n\r\n this.game.events.on(GameEvents.PRE_RENDER, this.preRender, this);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOver: function (event)\r\n {\r\n this.isOver = true;\r\n\r\n this.events.emit(Events.GAME_OVER, event);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOut: function (event)\r\n {\r\n this.isOver = false;\r\n\r\n this.events.emit(Events.GAME_OUT, event);\r\n },\r\n\r\n /**\r\n * Internal update, called automatically by the Game Step right at the start.\r\n *\r\n * @method Phaser.Input.InputManager#preRender\r\n * @private\r\n * @since 3.18.0\r\n */\r\n preRender: function ()\r\n {\r\n var time = this.game.loop.now;\r\n var delta = this.game.loop.delta;\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this.time = time;\r\n\r\n this.events.emit(Events.MANAGER_UPDATE);\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input && scene.sys.input.updatePoll(time, delta) && this.globalTopOnly)\r\n {\r\n // If the Scene returns true, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor(\'url(assets/cursors/sword.cur), pointer\');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It\'s up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputManager#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.defaultCursor = cursor;\r\n\r\n if (this.canvas.style.cursor !== cursor)\r\n {\r\n this.canvas.style.cursor = cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to set a custom cursor during its postUpdate step.\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n *\r\n * @method Phaser.Input.InputManager#setCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n setCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor)\r\n {\r\n this.canvas.style.cursor = interactiveObject.cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to clear the hand cursor, if set, during its postUpdate step.\r\n *\r\n * @method Phaser.Input.InputManager#resetCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n resetCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor && this.canvas)\r\n {\r\n this.canvas.style.cursor = this.defaultCursor;\r\n }\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputManager#addPointer\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n var output = [];\r\n\r\n if (this.pointersTotal + quantity > 10)\r\n {\r\n quantity = 10 - this.pointersTotal;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var id = this.pointers.length;\r\n\r\n var pointer = new Pointer(this, id);\r\n\r\n pointer.smoothFactor = this.config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n\r\n this.pointersTotal++;\r\n\r\n output.push(pointer);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method that gets a list of all the active Input Plugins in the game\r\n * and updates each of them in turn, in reverse order (top to bottom), to allow\r\n * for DOM top-level event handling simulation.\r\n *\r\n * @method Phaser.Input.InputManager#updateInputPlugins\r\n * @since 3.16.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n */\r\n updateInputPlugins: function (type, pointers)\r\n {\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this._tempSkip = false;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input)\r\n {\r\n var capture = scene.sys.input.update(type, pointers);\r\n\r\n if ((capture && this.globalTopOnly) || this._tempSkip)\r\n {\r\n // If the Scene returns true, or called stopPropagation, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n }\r\n },\r\n\r\n // event.targetTouches = list of all touches on the TARGET ELEMENT (i.e. game dom element)\r\n // event.touches = list of all touches on the ENTIRE DOCUMENT, not just the target element\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch start event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchStart\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchStart: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (!pointer.active)\r\n {\r\n pointer.touchstart(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_START, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch move event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchMove: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchmove(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_MOVE, changed);\r\n },\r\n\r\n // For touch end its a list of the touch points that have been removed from the surface\r\n // https://developer.mozilla.org/en-US/docs/DOM/TouchList\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch end event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchEnd\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchEnd: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchend(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_END, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch cancel event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchCancel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchCancel: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchcancel(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_CANCEL, changed);\r\n },\r\n\r\n /**\r\n * Processes a mouse down event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseDown\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseDown: function (event)\r\n {\r\n this.mousePointer.down(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_DOWN, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse move event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseMove: function (event)\r\n {\r\n this.mousePointer.move(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_MOVE, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse up event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseUp\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseUp: function (event)\r\n {\r\n this.mousePointer.up(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_UP, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse wheel event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseWheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The native DOM Wheel event.\r\n */\r\n onMouseWheel: function (event)\r\n {\r\n this.mousePointer.wheel(event);\r\n\r\n this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a pointer lock change event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onPointerLockChange\r\n * @fires Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onPointerLockChange: function (event)\r\n {\r\n var isLocked = this.mouse.locked;\r\n\r\n this.mousePointer.locked = isLocked;\r\n\r\n this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked);\r\n },\r\n\r\n /**\r\n * Checks if the given Game Object should be considered as a candidate for input or not.\r\n *\r\n * Checks if the Game Object has an input component that is enabled, that it will render,\r\n * and finally, if it has a parent, that the parent parent, or any ancestor, is visible or not.\r\n *\r\n * @method Phaser.Input.InputManager#inputCandidate\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to test.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {boolean} `true` if the Game Object should be considered for input, otherwise `false`.\r\n */\r\n inputCandidate: function (gameObject, camera)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.enabled || !gameObject.willRender(camera))\r\n {\r\n return false;\r\n }\r\n\r\n var visible = true;\r\n var parent = gameObject.parentContainer;\r\n\r\n if (parent)\r\n {\r\n do\r\n {\r\n if (!parent.willRender(camera))\r\n {\r\n visible = false;\r\n break;\r\n }\r\n\r\n parent = parent.parentContainer;\r\n\r\n } while (parent);\r\n }\r\n\r\n return visible;\r\n },\r\n\r\n /**\r\n * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects.\r\n *\r\n * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space\r\n * and used to determine if they fall within the remaining Game Objects hit areas or not.\r\n *\r\n * If nothing is matched an empty array is returned.\r\n *\r\n * This method is called automatically by InputPlugin.hitTestPointer and doesn\'t usually need to be invoked directly.\r\n *\r\n * @method Phaser.Input.InputManager#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to test against.\r\n * @param {array} gameObjects - An array of interactive Game Objects to check.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n * @param {array} [output] - An array to store the results in. If not given, a new empty array is created.\r\n *\r\n * @return {array} An array of the Game Objects that were hit during this hit test.\r\n */\r\n hitTest: function (pointer, gameObjects, camera, output)\r\n {\r\n if (output === undefined) { output = this._tempHitTest; }\r\n\r\n var tempPoint = this._tempPoint;\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n output.length = 0;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n camera.getWorldPoint(x, y, tempPoint);\r\n\r\n pointer.worldX = tempPoint.x;\r\n pointer.worldY = tempPoint.y;\r\n\r\n var point = { x: 0, y: 0 };\r\n\r\n var matrix = this._tempMatrix;\r\n var parentMatrix = this._tempMatrix2;\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n // Checks if the Game Object can receive input (isn\'t being ignored by the camera, invisible, etc)\r\n // and also checks all of its parents, if any\r\n if (!this.inputCandidate(gameObject, camera))\r\n {\r\n continue;\r\n }\r\n\r\n var px = tempPoint.x + (csx * gameObject.scrollFactorX) - csx;\r\n var py = tempPoint.y + (csy * gameObject.scrollFactorY) - csy;\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.getWorldTransformMatrix(matrix, parentMatrix);\r\n\r\n matrix.applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, gameObject.x, gameObject.y, gameObject.rotation, gameObject.scaleX, gameObject.scaleY, point);\r\n }\r\n \r\n if (this.pointWithinHitArea(gameObject, point.x, point.y))\r\n {\r\n output.push(gameObject);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Game Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Game Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinHitArea: function (gameObject, x, y)\r\n {\r\n // Normalize the origin\r\n x += gameObject.displayOriginX;\r\n y += gameObject.displayOriginY;\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaCallback(input.hitArea, x, y, gameObject))\r\n {\r\n input.localX = x;\r\n input.localY = y;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Interactive Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Interactive Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Input.InteractiveObject} object - The Interactive Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinInteractiveObject: function (object, x, y)\r\n {\r\n if (!object.hitArea)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the origin\r\n x += object.gameObject.displayOriginX;\r\n y += object.gameObject.displayOriginY;\r\n\r\n object.localX = x;\r\n object.localY = y;\r\n\r\n return object.hitAreaCallback(object.hitArea, x, y, object);\r\n },\r\n\r\n /**\r\n * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager.\r\n *\r\n * @method Phaser.Input.InputManager#transformPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to transform the values for.\r\n * @param {number} pageX - The Page X value.\r\n * @param {number} pageY - The Page Y value.\r\n * @param {boolean} wasMove - Are we transforming the Pointer from a move event, or an up / down event?\r\n */\r\n transformPointer: function (pointer, pageX, pageY, wasMove)\r\n {\r\n var p0 = pointer.position;\r\n var p1 = pointer.prevPosition;\r\n\r\n // Store previous position\r\n p1.x = p0.x;\r\n p1.y = p0.y;\r\n\r\n // Translate coordinates\r\n var x = this.scaleManager.transformX(pageX);\r\n var y = this.scaleManager.transformY(pageY);\r\n\r\n var a = pointer.smoothFactor;\r\n\r\n if (!wasMove || a === 0)\r\n {\r\n // Set immediately\r\n p0.x = x;\r\n p0.y = y;\r\n }\r\n else\r\n {\r\n // Apply smoothing\r\n p0.x = x * a + p1.x * (1 - a);\r\n p0.y = y * a + p1.y * (1 - a);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Input Manager and all of its systems.\r\n *\r\n * There is no way to recover from doing this.\r\n *\r\n * @method Phaser.Input.InputManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.events.removeAllListeners();\r\n\r\n this.game.events.off(GameEvents.PRE_RENDER);\r\n\r\n if (this.keyboard)\r\n {\r\n this.keyboard.destroy();\r\n }\r\n\r\n if (this.mouse)\r\n {\r\n this.mouse.destroy();\r\n }\r\n\r\n if (this.touch)\r\n {\r\n this.touch.destroy();\r\n }\r\n\r\n for (var i = 0; i < this.pointers.length; i++)\r\n {\r\n this.pointers[i].destroy();\r\n }\r\n\r\n this.pointers = [];\r\n this._tempHitTest = [];\r\n this._tempMatrix.destroy();\r\n this.canvas = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = InputManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputManager.js?')},"./node_modules/phaser/src/input/InputPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../geom/circle/Circle */ \"./node_modules/phaser/src/geom/circle/Circle.js\");\r\nvar CircleContains = __webpack_require__(/*! ../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/input/const.js\");\r\nvar CreateInteractiveObject = __webpack_require__(/*! ./CreateInteractiveObject */ \"./node_modules/phaser/src/input/CreateInteractiveObject.js\");\r\nvar CreatePixelPerfectHandler = __webpack_require__(/*! ./CreatePixelPerfectHandler */ \"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar Ellipse = __webpack_require__(/*! ../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar EllipseContains = __webpack_require__(/*! ../geom/ellipse/Contains */ \"./node_modules/phaser/src/geom/ellipse/Contains.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../geom/const */ \"./node_modules/phaser/src/geom/const.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ./InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar Triangle = __webpack_require__(/*! ../geom/triangle/Triangle */ \"./node_modules/phaser/src/geom/triangle/Triangle.js\");\r\nvar TriangleContains = __webpack_require__(/*! ../geom/triangle/Contains */ \"./node_modules/phaser/src/geom/triangle/Contains.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Plugin belongs to a Scene and handles all input related events and operations for it.\r\n *\r\n * You can access it from within a Scene using `this.input`.\r\n *\r\n * It emits events directly. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.on('pointerdown', callback, context);\r\n * ```\r\n *\r\n * To listen for a pointer down event anywhere on the game canvas.\r\n *\r\n * Game Objects can be enabled for input by calling their `setInteractive` method. After which they\r\n * will directly emit input events:\r\n *\r\n * ```javascript\r\n * var sprite = this.add.sprite(x, y, texture);\r\n * sprite.setInteractive();\r\n * sprite.on('pointerdown', callback, context);\r\n * ```\r\n * \r\n * There are lots of game configuration options available relating to input.\r\n * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser\r\n * listening for input events outside of the canvas, how to set a default number of pointers, input\r\n * capture settings and more.\r\n *\r\n * Please also see the Input examples and tutorials for further information.\r\n *\r\n * @class InputPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Input Plugin is responsible for.\r\n */\r\nvar InputPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function InputPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.InputPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems class.\r\n *\r\n * @name Phaser.Input.InputPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.InputPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.5.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Game Input Manager.\r\n *\r\n * @name Phaser.Input.InputPlugin#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.input;\r\n\r\n /**\r\n * Internal event queue used for plugins only.\r\n *\r\n * @name Phaser.Input.InputPlugin#pluginEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.pluginEvents = new EventEmitter();\r\n\r\n /**\r\n * If `true` this Input Plugin will process DOM input events.\r\n *\r\n * @name Phaser.Input.InputPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.5.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * A reference to the Scene Display List. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Cameras Manager. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n // Inject the available input plugins into this class\r\n InputPluginCache.install(this);\r\n\r\n /**\r\n * A reference to the Mouse Manager.\r\n * \r\n * This property is only set if Mouse support has been enabled in your Game Configuration file.\r\n * \r\n * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead.\r\n *\r\n * @name Phaser.Input.InputPlugin#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = this.manager.mouse;\r\n\r\n /**\r\n * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @name Phaser.Input.InputPlugin#topOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.topOnly = true;\r\n\r\n /**\r\n * How often should the Pointers be checked?\r\n * \r\n * The value is a time, given in ms, and is the time that must have elapsed between game steps before\r\n * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game\r\n * Objects are currently below it, or being interacted with it.\r\n * \r\n * Pointers will *always* be checked if they have been moved by the user, or press or released.\r\n * \r\n * This property only controls how often they will be polled if they have not been updated.\r\n * You should set this if you want to have Game Objects constantly check against the pointers, even\r\n * if the pointer didn't itself move.\r\n * \r\n * Set to 0 to poll constantly. Set to -1 to only poll on user movement.\r\n *\r\n * @name Phaser.Input.InputPlugin#pollRate\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.pollRate = -1;\r\n\r\n /**\r\n * Internal poll timer value.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pollTimer\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pollTimer = 0;\r\n\r\n var _eventData = { cancelled: false };\r\n\r\n /**\r\n * Internal event propagation callback container.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventContainer\r\n * @type {Phaser.Types.Input.EventData}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventContainer = {\r\n stopPropagation: function ()\r\n {\r\n _eventData.cancelled = true;\r\n }\r\n };\r\n\r\n /**\r\n * Internal event propagation data object.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventData\r\n * @type {object}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventData = _eventData;\r\n\r\n /**\r\n * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragDistanceThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragDistanceThreshold = 0;\r\n\r\n /**\r\n * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragTimeThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragTimeThreshold = 0;\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test\r\n *\r\n * @name Phaser.Input.InputPlugin#_temp\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._temp = [];\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test dropZones\r\n *\r\n * @name Phaser.Input.InputPlugin#_tempZones\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempZones = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been set to be interactive in the Scene this Input Plugin is managing.\r\n *\r\n * @name Phaser.Input.InputPlugin#_list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Objects waiting to be inserted to the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingInsertion\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Objects waiting to be removed from the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingRemoval\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been enabled for dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#_draggable\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._draggable = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'draggable' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_drag\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._drag = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A array containing the dragStates, for this Scene, index by the Pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_dragState\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._dragState = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'over' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_over\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._over = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A list of valid DOM event types.\r\n *\r\n * @name Phaser.Input.InputPlugin#_validTypes\r\n * @type {string[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._validTypes = [ 'onDown', 'onUp', 'onOver', 'onOut', 'onMove', 'onDragStart', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragLeave', 'onDragOver', 'onDrop' ];\r\n\r\n /**\r\n * Internal property that tracks frame event state.\r\n *\r\n * @name Phaser.Input.InputPlugin#_updatedThisFrame\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._updatedThisFrame = false;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#boot\r\n * @fires Phaser.Input.Events#BOOT\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.cameras = this.systems.cameras;\r\n\r\n this.displayList = this.systems.displayList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#start\r\n * @fires Phaser.Input.Events#START\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.manager.events.on(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.on(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n this.enabled = true;\r\n\r\n // Populate the pointer drag states\r\n this._dragState = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.START);\r\n },\r\n\r\n /**\r\n * Game Over handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOver: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OVER, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * Game Out handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOut: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OUT, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * The pre-update handler is responsible for checking the pending removal and insertion lists and\r\n * deleting old Game Objects.\r\n *\r\n * @method Phaser.Input.InputPlugin#preUpdate\r\n * @private\r\n * @fires Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.PRE_UPDATE);\r\n\r\n var removeList = this._pendingRemoval;\r\n var insertList = this._pendingInsertion;\r\n\r\n var toRemove = removeList.length;\r\n var toInsert = insertList.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var current = this._list;\r\n\r\n // Delete old gameObjects\r\n for (var i = 0; i < toRemove; i++)\r\n {\r\n var gameObject = removeList[i];\r\n\r\n var index = current.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n current.splice(index, 1);\r\n\r\n this.clear(gameObject, true);\r\n }\r\n }\r\n\r\n // Clear the removal list\r\n removeList.length = 0;\r\n this._pendingRemoval.length = 0;\r\n\r\n // Move pendingInsertion to list (also clears pendingInsertion at the same time)\r\n this._list = current.concat(insertList.splice(0));\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.InputPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * This is called automatically by the Input Manager.\r\n * It emits events for plugins to listen to and also handles polling updates, if enabled.\r\n *\r\n * @method Phaser.Input.InputPlugin#updatePoll\r\n * @since 3.18.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n updatePoll: function (time, delta)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n // The plugins should update every frame, regardless if there has been\r\n // any DOM input events or not (such as the Gamepad and Keyboard)\r\n this.pluginEvents.emit(Events.UPDATE, time, delta);\r\n\r\n // We can leave now if we've already updated once this frame via the immediate DOM event handlers\r\n if (this._updatedThisFrame)\r\n {\r\n this._updatedThisFrame = false;\r\n\r\n return false;\r\n }\r\n\r\n var i;\r\n var manager = this.manager;\r\n\r\n var pointers = manager.pointers;\r\n var pointersTotal = manager.pointersTotal;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n pointers[i].updateMotion();\r\n }\r\n\r\n // No point going any further if there aren't any interactive objects\r\n if (this._list.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var rate = this.pollRate;\r\n\r\n if (rate === -1)\r\n {\r\n return false;\r\n }\r\n else if (rate > 0)\r\n {\r\n this._pollTimer -= delta;\r\n\r\n if (this._pollTimer < 0)\r\n {\r\n // Discard timer diff, we're ready to poll again\r\n this._pollTimer = this.pollRate;\r\n }\r\n else\r\n {\r\n // Not enough time has elapsed since the last poll, so abort now\r\n return false;\r\n }\r\n }\r\n\r\n // We got this far? Then we should poll for movement\r\n var captured = false;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n total += this.processOverOutEvents(pointer);\r\n\r\n this.processDragThresholdEvent(pointer);\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * This method is called when a DOM Event is received by the Input Manager. It handles dispatching the events\r\n * to relevant input enabled Game Objects in this scene.\r\n *\r\n * @method Phaser.Input.InputPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n * \r\n * @return {boolean} `true` if this Scene has captured the input events from all other Scenes, otherwise `false`.\r\n */\r\n update: function (type, pointers)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n var pointersTotal = pointers.length;\r\n var captured = false;\r\n\r\n for (var i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n switch (type)\r\n {\r\n case CONST.MOUSE_DOWN:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_UP:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_START:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_END:\r\n case CONST.TOUCH_CANCEL:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_MOVE:\r\n case CONST.TOUCH_MOVE:\r\n total += this.processDragMoveEvent(pointer);\r\n total += this.processMoveEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_WHEEL:\r\n total += this.processWheelEvent(pointer);\r\n break;\r\n }\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n this._updatedThisFrame = true;\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * Clears a Game Object so it no longer has an Interactive Object associated with it.\r\n * The Game Object is then queued for removal from the Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#clear\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have its Interactive Object removed.\r\n * @param {boolean} [skipQueue=false] - Skip adding this Game Object into the removal queue?\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had its Interactive Object removed.\r\n */\r\n clear: function (gameObject, skipQueue)\r\n {\r\n if (skipQueue === undefined) { skipQueue = false; }\r\n\r\n var input = gameObject.input;\r\n\r\n // If GameObject.input already cleared from higher class\r\n if (!input)\r\n {\r\n return;\r\n }\r\n\r\n if (!skipQueue)\r\n {\r\n this.queueForRemoval(gameObject);\r\n }\r\n\r\n input.gameObject = undefined;\r\n input.target = undefined;\r\n input.hitArea = undefined;\r\n input.hitAreaCallback = undefined;\r\n input.callbackContext = undefined;\r\n\r\n this.manager.resetCursor(input);\r\n\r\n gameObject.input = null;\r\n\r\n // Clear from _draggable, _drag and _over\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n\r\n index = this._drag[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._drag[0].splice(index, 1);\r\n }\r\n\r\n index = this._over[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._over[0].splice(index, 1);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Disables Input on a single Game Object.\r\n *\r\n * An input disabled Game Object still retains its Interactive Object component and can be re-enabled\r\n * at any time, by passing it to `InputPlugin.enable`.\r\n *\r\n * @method Phaser.Input.InputPlugin#disable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to have its input system disabled.\r\n */\r\n disable: function (gameObject)\r\n {\r\n gameObject.input.enabled = false;\r\n },\r\n\r\n /**\r\n * Enable a Game Object for interaction.\r\n *\r\n * If the Game Object already has an Interactive Object component, it is enabled and returned.\r\n *\r\n * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#enable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to be enabled for input.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not?\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enable: function (gameObject, shape, callback, dropZone)\r\n {\r\n if (dropZone === undefined) { dropZone = false; }\r\n\r\n if (gameObject.input)\r\n {\r\n // If it is already has an InteractiveObject then just enable it and return\r\n gameObject.input.enabled = true;\r\n }\r\n else\r\n {\r\n // Create an InteractiveObject and enable it\r\n this.setHitArea(gameObject, shape, callback);\r\n }\r\n\r\n if (gameObject.input && dropZone && !gameObject.input.dropZone)\r\n {\r\n gameObject.input.dropZone = dropZone;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects\r\n * it is currently above.\r\n *\r\n * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple\r\n * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.\r\n *\r\n * @method Phaser.Input.InputPlugin#hitTestPointer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against the Game Objects.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of all the interactive Game Objects the Pointer was above.\r\n */\r\n hitTestPointer: function (pointer)\r\n {\r\n var cameras = this.cameras.getCamerasBelowPointer(pointer);\r\n\r\n for (var c = 0; c < cameras.length; c++)\r\n {\r\n var camera = cameras[c];\r\n\r\n // Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'over' array.\r\n // All objects in this array are input enabled, as checked by the hitTest method, so we don't need to check later on as well.\r\n var over = this.manager.hitTest(pointer, this._list, camera);\r\n\r\n // Filter out the drop zones\r\n for (var i = 0; i < over.length; i++)\r\n {\r\n var obj = over[i];\r\n\r\n if (obj.input.dropZone)\r\n {\r\n this._tempZones.push(obj);\r\n }\r\n }\r\n\r\n if (over.length > 0)\r\n {\r\n pointer.camera = camera;\r\n\r\n return over;\r\n }\r\n }\r\n\r\n // If we got this far then there were no Game Objects below the pointer, but it was still over\r\n // a camera, so set that the top-most one into the pointer\r\n\r\n pointer.camera = cameras[0];\r\n\r\n return [];\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer down event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDownEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer being tested.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processDownEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_DOWN, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_DOWN, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.downElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_DOWN, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_DOWN_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Returns the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state will be one of the following:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#getDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to get the drag state for.\r\n *\r\n * @return {integer} The drag state of the given Pointer.\r\n */\r\n getDragState: function (pointer)\r\n {\r\n return this._dragState[pointer.id];\r\n },\r\n\r\n /**\r\n * Sets the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state must be one of the following values:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#setDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to set the drag state for.\r\n * @param {integer} state - The drag state value. An integer between 0 and 5.\r\n */\r\n setDragState: function (pointer, state)\r\n {\r\n this._dragState[pointer.id] = state;\r\n },\r\n\r\n /**\r\n * Checks to see if a Pointer is ready to drag the objects below it, based on either a distance\r\n * or time threshold.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragThresholdEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check the drag thresholds on.\r\n * @param {number} time - The current time.\r\n */\r\n processDragThresholdEvent: function (pointer, time)\r\n {\r\n var passed = false;\r\n var timeThreshold = this.dragTimeThreshold;\r\n var distanceThreshold = this.dragDistanceThreshold;\r\n\r\n if (distanceThreshold > 0 && DistanceBetween(pointer.x, pointer.y, pointer.downX, pointer.downY) >= distanceThreshold)\r\n {\r\n // It has moved far enough to be considered a drag\r\n passed = true;\r\n }\r\n else if (timeThreshold > 0 && (time >= pointer.downTime + timeThreshold))\r\n {\r\n // It has been held down long enough to be considered a drag\r\n passed = true;\r\n }\r\n\r\n if (passed)\r\n {\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the drag list for the given pointer and dispatches the start events for each object on it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragStartList\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_START\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that DRAG_START was called on.\r\n */\r\n processDragStartList: function (pointer)\r\n {\r\n // 3 = Pointer meets criteria and is freshly down, notify the draglist\r\n if (this.getDragState(pointer) !== 3)\r\n {\r\n return 0;\r\n }\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n input.dragState = 2;\r\n\r\n input.dragStartX = gameObject.x;\r\n input.dragStartY = gameObject.y;\r\n\r\n input.dragStartXGlobal = pointer.x;\r\n input.dragStartYGlobal = pointer.y;\r\n\r\n input.dragX = input.dragStartXGlobal - input.dragStartX;\r\n input.dragY = input.dragStartYGlobal - input.dragStartY;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_START, pointer, input.dragX, input.dragY);\r\n\r\n this.emit(Events.DRAG_START, pointer, gameObject);\r\n }\r\n\r\n this.setDragState(pointer, 4);\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragDownEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were collected on the drag list.\r\n */\r\n processDragDownEvent: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n if (this._draggable.length === 0 || currentlyOver.length === 0 || !pointer.primaryDown || this.getDragState(pointer) !== 0)\r\n {\r\n // There are no draggable items, no over items or the pointer isn't down, so let's not even bother going further\r\n return 0;\r\n }\r\n\r\n // 1 = Primary button down and objects below, so collect a draglist\r\n this.setDragState(pointer, 1);\r\n\r\n // Get draggable objects, sort them, pick the top (or all) and store them somewhere\r\n var draglist = [];\r\n\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (gameObject.input.draggable && (gameObject.input.dragState === 0))\r\n {\r\n draglist.push(gameObject);\r\n }\r\n }\r\n\r\n if (draglist.length === 0)\r\n {\r\n this.setDragState(pointer, 0);\r\n\r\n return 0;\r\n }\r\n else if (draglist.length > 1)\r\n {\r\n this.sortGameObjects(draglist);\r\n\r\n if (this.topOnly)\r\n {\r\n draglist.splice(1);\r\n }\r\n }\r\n\r\n // draglist now contains all potential candidates for dragging\r\n this._drag[pointer.id] = draglist;\r\n\r\n if (this.dragDistanceThreshold === 0 || this.dragTimeThreshold === 0)\r\n {\r\n // No drag criteria, so snap immediately to mode 3\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n else\r\n {\r\n // Check the distance / time on the next event\r\n this.setDragState(pointer, 2);\r\n\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Processes a 'drag move' event for the given pointer. \r\n *\r\n * @method Phaser.Input.InputPlugin#processDragMoveEvent\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_ENTER\r\n * @fires Phaser.Input.Events#DRAG\r\n * @fires Phaser.Input.Events#DRAG_LEAVE\r\n * @fires Phaser.Input.Events#DRAG_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragMoveEvent: function (pointer)\r\n {\r\n if (this.getDragState(pointer) !== 4)\r\n {\r\n return 0;\r\n }\r\n\r\n // 4 = Pointer actively dragging the draglist and has moved\r\n var dropZones = this._tempZones;\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n var target = input.target;\r\n\r\n // If this GO has a target then let's check it\r\n if (target)\r\n {\r\n var index = dropZones.indexOf(target);\r\n\r\n // Got a target, are we still over it?\r\n if (index === 0)\r\n {\r\n // We're still over it, and it's still the top of the display list, phew ...\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_OVER, pointer, target);\r\n\r\n this.emit(Events.DRAG_OVER, pointer, gameObject, target);\r\n }\r\n else if (index > 0)\r\n {\r\n // Still over it but it's no longer top of the display list (targets must always be at the top)\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope, we've moved on (or the target has!), leave the old target\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n // Anything new to replace it?\r\n // Yup!\r\n if (dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope\r\n input.target = null;\r\n }\r\n }\r\n }\r\n else if (!target && dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n\r\n var dragX;\r\n var dragY;\r\n\r\n if (!gameObject.parentContainer)\r\n {\r\n dragX = pointer.x - input.dragX;\r\n dragY = pointer.y - input.dragY;\r\n }\r\n else\r\n {\r\n var dx = pointer.x - input.dragStartXGlobal;\r\n var dy = pointer.y - input.dragStartYGlobal;\r\n\r\n var rotation = gameObject.getParentRotation();\r\n \r\n var dxRotated = dx * Math.cos(rotation) + dy * Math.sin(rotation);\r\n var dyRotated = dy * Math.cos(rotation) - dx * Math.sin(rotation);\r\n\r\n dragX = dxRotated + input.dragStartX;\r\n dragY = dyRotated + input.dragStartY;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG, pointer, dragX, dragY);\r\n\r\n this.emit(Events.DRAG, pointer, gameObject, dragX, dragY);\r\n }\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragUpEvent\r\n * @fires Phaser.Input.Events#DRAG_END\r\n * @fires Phaser.Input.Events#DROP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragUpEvent: function (pointer)\r\n {\r\n // 5 = Pointer was actively dragging but has been released, notify draglist\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.dragState === 2)\r\n {\r\n input.dragState = 0;\r\n\r\n input.dragX = input.localX - gameObject.displayOriginX;\r\n input.dragY = input.localY - gameObject.displayOriginY;\r\n\r\n var dropped = false;\r\n\r\n var target = input.target;\r\n\r\n if (target)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DROP, pointer, target);\r\n\r\n this.emit(Events.DROP, pointer, gameObject, target);\r\n\r\n input.target = null;\r\n\r\n dropped = true;\r\n }\r\n\r\n // And finally the dragend event\r\n\r\n if (gameObject.input)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_END, pointer, input.dragX, input.dragY, dropped);\r\n\r\n this.emit(Events.DRAG_END, pointer, gameObject, dropped);\r\n }\r\n }\r\n }\r\n\r\n this.setDragState(pointer, 0);\r\n\r\n list.splice(0);\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer movement event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processMoveEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @fires Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processMoveEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_MOVE, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_MOVE, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n if (this.topOnly)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_MOVE, pointer, currentlyOver);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles a mouse wheel event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processWheelEvent\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @fires Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @fires Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processWheelEvent: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n var dx = pointer.deltaX;\r\n var dy = pointer.deltaY;\r\n var dz = pointer.deltaZ;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_WHEEL, pointer, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_WHEEL, pointer, gameObject, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_WHEEL, pointer, currentlyOver, dx, dy, dz);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over events.\r\n * This is called when a touch input hits the canvas, having previously been off of it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = currentlyOver.length;\r\n\r\n var justOver = [];\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n \r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n justOver.push(gameObject);\r\n\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = justOver;\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer out events.\r\n * This is called when a touch input leaves the canvas, as it can never be 'over' in this case.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOutEvents: function (pointer)\r\n {\r\n var previouslyOver = this._over[pointer.id];\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = previouslyOver.length;\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n this.sortGameObjects(previouslyOver);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = previouslyOver[i];\r\n \r\n // Call onOut for everything in the previouslyOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n \r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n \r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n \r\n totalInteracted++;\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n \r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n \r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, previouslyOver);\r\n }\r\n }\r\n\r\n this._over[pointer.id] = [];\r\n }\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over and out events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverOutEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var i;\r\n var gameObject;\r\n var justOut = [];\r\n var justOver = [];\r\n var stillOver = [];\r\n var previouslyOver = this._over[pointer.id];\r\n var currentlyDragging = this._drag[pointer.id];\r\n\r\n var manager = this.manager;\r\n\r\n // Go through all objects the pointer was previously over, and see if it still is.\r\n // Splits the previouslyOver array into two parts: justOut and stillOver\r\n\r\n for (i = 0; i < previouslyOver.length; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n\r\n if (currentlyOver.indexOf(gameObject) === -1 && currentlyDragging.indexOf(gameObject) === -1)\r\n {\r\n // Not in the currentlyOver array, so must be outside of this object now\r\n justOut.push(gameObject);\r\n }\r\n else\r\n {\r\n // In the currentlyOver array\r\n stillOver.push(gameObject);\r\n }\r\n }\r\n\r\n // Go through all objects the pointer is currently over (the hit test results)\r\n // and if not in the previouslyOver array we know it's a new entry, so add to justOver\r\n for (i = 0; i < currentlyOver.length; i++)\r\n {\r\n gameObject = currentlyOver[i];\r\n\r\n // Is this newly over?\r\n\r\n if (previouslyOver.indexOf(gameObject) === -1)\r\n {\r\n justOver.push(gameObject);\r\n }\r\n }\r\n\r\n // By this point the arrays are filled, so now we can process what happened...\r\n\r\n // Process the Just Out objects\r\n var total = justOut.length;\r\n\r\n var totalInteracted = 0;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOut);\r\n\r\n // Call onOut for everything in the justOut array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOut[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Reset cursor before we emit the event, in case they want to change it during the event\r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, justOut);\r\n }\r\n }\r\n\r\n // Process the Just Over objects\r\n total = justOver.length;\r\n\r\n _eventData.cancelled = false;\r\n\r\n aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOver);\r\n\r\n // Call onOver for everything in the justOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Set cursor before we emit the event, in case they want to change it during the event\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Add the contents of justOver to the previously over array\r\n previouslyOver = stillOver.concat(justOver);\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = this.sortGameObjects(previouslyOver);\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer up events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processUpEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_UP\r\n * @fires Phaser.Input.Events#POINTER_UP\r\n * @fires Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processUpEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_UP, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.upElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_UP, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_UP_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return currentlyOver.length;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for insertion into this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForInsertion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForInsertion: function (child)\r\n {\r\n if (this._pendingInsertion.indexOf(child) === -1 && this._list.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for removal from this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForRemoval\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForRemoval: function (child)\r\n {\r\n this._pendingRemoval.push(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the draggable state of the given array of Game Objects.\r\n *\r\n * They can either be set to be draggable, or can have their draggable state removed by passing `false`.\r\n *\r\n * A Game Object will not fire drag events unless it has been specifically enabled for drag.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDraggable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on.\r\n * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setDraggable: function (gameObjects, value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n gameObject.input.draggable = value;\r\n\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (value && index === -1)\r\n {\r\n this._draggable.push(gameObject);\r\n }\r\n else if (!value && index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle\r\n * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them.\r\n *\r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect());\r\n * ```\r\n * \r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150));\r\n * ```\r\n *\r\n * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up,\r\n * dragstart, drag, etc.\r\n *\r\n * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from\r\n * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on\r\n * Game Objects that really need it.\r\n * \r\n * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText,\r\n * Render Textures, Text, Tilemaps, Containers or Particles.\r\n *\r\n * @method Phaser.Input.InputPlugin#makePixelPerfect\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [alphaTolerance=1] - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} A Pixel Perfect Handler for use as a hitArea shape callback.\r\n */\r\n makePixelPerfect: function (alphaTolerance)\r\n {\r\n if (alphaTolerance === undefined) { alphaTolerance = 1; }\r\n\r\n var textureManager = this.systems.textures;\r\n\r\n return CreatePixelPerfectHandler(textureManager, alphaTolerance);\r\n },\r\n\r\n /**\r\n * Sets the hit area for the given array of Game Objects.\r\n *\r\n * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle`\r\n * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback.\r\n *\r\n * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible\r\n * to calculate.\r\n *\r\n * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if\r\n * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this,\r\n * such as `Phaser.Geom.Rectangle.Contains`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set the hit area on.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitArea: function (gameObjects, shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n return this.setHitAreaFromTexture(gameObjects);\r\n }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n var draggable = false;\r\n var dropZone = false;\r\n var cursor = false;\r\n var useHandCursor = false;\r\n var pixelPerfect = false;\r\n var customHitArea = true;\r\n\r\n // Config object?\r\n if (IsPlainObject(shape))\r\n {\r\n var config = shape;\r\n\r\n shape = GetFastValue(config, 'hitArea', null);\r\n callback = GetFastValue(config, 'hitAreaCallback', null);\r\n draggable = GetFastValue(config, 'draggable', false);\r\n dropZone = GetFastValue(config, 'dropZone', false);\r\n cursor = GetFastValue(config, 'cursor', false);\r\n useHandCursor = GetFastValue(config, 'useHandCursor', false);\r\n\r\n pixelPerfect = GetFastValue(config, 'pixelPerfect', false);\r\n var alphaTolerance = GetFastValue(config, 'alphaTolerance', 1);\r\n\r\n if (pixelPerfect)\r\n {\r\n shape = {};\r\n callback = this.makePixelPerfect(alphaTolerance);\r\n }\r\n\r\n // Still no hitArea or callback?\r\n if (!shape || !callback)\r\n {\r\n this.setHitAreaFromTexture(gameObjects);\r\n customHitArea = false;\r\n }\r\n }\r\n else if (typeof shape === 'function' && !callback)\r\n {\r\n callback = shape;\r\n shape = {};\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n if (pixelPerfect && gameObject.type === 'Container')\r\n {\r\n console.warn('Cannot pixelPerfect test a Container. Use a custom callback.');\r\n continue;\r\n }\r\n\r\n var io = (!gameObject.input) ? CreateInteractiveObject(gameObject, shape, callback) : gameObject.input;\r\n\r\n io.customHitArea = customHitArea;\r\n io.dropZone = dropZone;\r\n io.cursor = (useHandCursor) ? 'pointer' : cursor;\r\n\r\n gameObject.input = io;\r\n\r\n if (draggable)\r\n {\r\n this.setDraggable(gameObject);\r\n }\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using\r\n * the given coordinates and radius to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaCircle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a circle hit area.\r\n * @param {number} x - The center of the circle.\r\n * @param {number} y - The center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaCircle: function (gameObjects, x, y, radius, callback)\r\n {\r\n if (callback === undefined) { callback = CircleContains; }\r\n\r\n var shape = new Circle(x, y, radius);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {number} x - The center of the ellipse.\r\n * @param {number} y - The center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaEllipse: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = EllipseContains; }\r\n\r\n var shape = new Ellipse(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the Game Objects texture frame to define the position and size of the hit area.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaFromTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaFromTexture: function (gameObjects, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n var frame = gameObject.frame;\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n if (gameObject.width)\r\n {\r\n width = gameObject.width;\r\n height = gameObject.height;\r\n }\r\n else if (frame)\r\n {\r\n width = frame.realWidth;\r\n height = frame.realHeight;\r\n }\r\n\r\n if (gameObject.type === 'Container' && (width === 0 || height === 0))\r\n {\r\n console.warn('Container.setInteractive must specify a Shape or call setSize() first');\r\n continue;\r\n }\r\n\r\n if (width !== 0 && height !== 0)\r\n {\r\n gameObject.input = CreateInteractiveObject(gameObject, new Rectangle(0, 0, width, height), callback);\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a rectangular hit area.\r\n * @param {number} x - The top-left of the rectangle.\r\n * @param {number} y - The top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaRectangle: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n var shape = new Rectangle(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using\r\n * the given coordinates to control the position of its points.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a triangular hit area.\r\n * @param {number} x1 - The x coordinate of the first point of the triangle.\r\n * @param {number} y1 - The y coordinate of the first point of the triangle.\r\n * @param {number} x2 - The x coordinate of the second point of the triangle.\r\n * @param {number} y2 - The y coordinate of the second point of the triangle.\r\n * @param {number} x3 - The x coordinate of the third point of the triangle.\r\n * @param {number} y3 - The y coordinate of the third point of the triangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback)\r\n {\r\n if (callback === undefined) { callback = TriangleContains; }\r\n\r\n var shape = new Triangle(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Creates an Input Debug Shape for the given Game Object.\r\n * \r\n * The Game Object must have _already_ been enabled for input prior to calling this method.\r\n * \r\n * This is intended to assist you during development and debugging.\r\n * \r\n * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,\r\n * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.\r\n * \r\n * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.\r\n * \r\n * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object\r\n * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via\r\n * the Game Object property: `GameObject.input.hitAreaDebug`.\r\n * \r\n * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,\r\n * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the\r\n * method `InputPlugin.removeDebug`.\r\n * \r\n * Note that the debug shape will only show the outline of the input area. If the input test is using a\r\n * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that\r\n * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not\r\n * work.\r\n *\r\n * @method Phaser.Input.InputPlugin#enableDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for.\r\n * @param {number} [color=0x00ff00] - The outline color of the debug shape.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enableDebug: function (gameObject, color)\r\n {\r\n if (color === undefined) { color = 0x00ff00; }\r\n\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.hitArea)\r\n {\r\n return this;\r\n }\r\n\r\n var shape = input.hitArea;\r\n var shapeType = shape.type;\r\n var debug = input.hitAreaDebug;\r\n var factory = this.systems.add;\r\n var updateList = this.systems.updateList;\r\n\r\n if (debug)\r\n {\r\n updateList.remove(debug);\r\n\r\n debug.destroy();\r\n\r\n debug = null;\r\n }\r\n\r\n switch (shapeType)\r\n {\r\n case GEOM_CONST.CIRCLE:\r\n debug = factory.arc(0, 0, shape.radius);\r\n break;\r\n\r\n case GEOM_CONST.ELLIPSE:\r\n debug = factory.ellipse(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.LINE:\r\n debug = factory.line(0, 0, shape.x1, shape.y1, shape.x2, shape.y2);\r\n break;\r\n\r\n case GEOM_CONST.POLYGON:\r\n debug = factory.polygon(0, 0, shape.points);\r\n break;\r\n\r\n case GEOM_CONST.RECTANGLE:\r\n debug = factory.rectangle(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.TRIANGLE:\r\n debug = factory.triangle(0, 0, shape.x1, shape.y1, shape.x2, shape.y2, shape.x3, shape.y3);\r\n break;\r\n }\r\n\r\n if (debug)\r\n {\r\n debug.isFilled = false;\r\n\r\n debug.preUpdate = function ()\r\n {\r\n debug.setStrokeStyle(1 / gameObject.scale, color);\r\n \r\n debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY);\r\n debug.setRotation(gameObject.rotation);\r\n debug.setScale(gameObject.scaleX, gameObject.scaleY);\r\n debug.setPosition(gameObject.x, gameObject.y);\r\n debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY);\r\n };\r\n \r\n updateList.add(debug);\r\n \r\n input.hitAreaDebug = debug;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an Input Debug Shape from the given Game Object.\r\n * \r\n * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.\r\n *\r\n * @method Phaser.Input.InputPlugin#removeDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n removeDebug: function (gameObject)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaDebug)\r\n {\r\n var debug = input.hitAreaDebug;\r\n\r\n this.systems.updateList.remove(debug);\r\n \r\n debug.destroy();\r\n\r\n input.hitAreaDebug = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Pointers to always poll.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it, regardless if the Pointer has actually moved or not.\r\n *\r\n * You should enable this if you want objects in your game to fire over / out events, and the objects\r\n * are constantly moving, but the pointer may not have. Polling every frame has additional computation\r\n * costs, especially if there are a large number of interactive objects in your game.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollAlways\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollAlways: function ()\r\n {\r\n return this.setPollRate(0);\r\n },\r\n\r\n /**\r\n * Sets the Pointers to only poll when they are moved or updated.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollOnMove\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollOnMove: function ()\r\n {\r\n return this.setPollRate(-1);\r\n },\r\n\r\n /**\r\n * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer\r\n * will be polled again. See the `setPollAlways` and `setPollOnMove` methods.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollRate\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollRate: function (value)\r\n {\r\n this.pollRate = value;\r\n this._pollTimer = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from\r\n * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event\r\n * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setGlobalTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setGlobalTopOnly: function (value)\r\n {\r\n this.manager.globalTopOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @method Phaser.Input.InputPlugin#setTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setTopOnly: function (value)\r\n {\r\n this.topOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order\r\n * with the lowest at the bottom.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortGameObjects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} gameObjects - An array of Game Objects to be sorted.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The sorted array of Game Objects.\r\n */\r\n sortGameObjects: function (gameObjects)\r\n {\r\n if (gameObjects.length < 2)\r\n {\r\n return gameObjects;\r\n }\r\n\r\n this.scene.sys.depthSort();\r\n\r\n return gameObjects.sort(this.sortHandlerGO.bind(this));\r\n },\r\n\r\n /**\r\n * Return the child lowest down the display list (with the smallest index)\r\n * Will iterate through all parent containers, if present.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortHandlerGO\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object to compare.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object to compare.\r\n *\r\n * @return {integer} Returns either a negative or positive integer, or zero if they match.\r\n */\r\n sortHandlerGO: function (childA, childB)\r\n {\r\n if (!childA.parentContainer && !childB.parentContainer)\r\n {\r\n // Quick bail out when neither child has a container\r\n return this.displayList.getIndex(childB) - this.displayList.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB.parentContainer)\r\n {\r\n // Quick bail out when both children have the same container\r\n return childB.parentContainer.getIndex(childB) - childA.parentContainer.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return -1;\r\n }\r\n else if (childB.parentContainer === childA)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return 1;\r\n }\r\n else\r\n {\r\n // Container index check\r\n var listA = childA.getIndexList();\r\n var listB = childB.getIndexList();\r\n var len = Math.min(listA.length, listB.length);\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n var indexA = listA[i];\r\n var indexB = listB[i];\r\n\r\n if (indexA === indexB)\r\n {\r\n // Go to the next level down\r\n continue;\r\n }\r\n else\r\n {\r\n // Non-matching parents, so return\r\n return indexB - indexA;\r\n }\r\n }\r\n }\r\n\r\n // Technically this shouldn't happen, but ...\r\n return 0;\r\n },\r\n\r\n /**\r\n * This method should be called from within an input event handler, such as `pointerdown`.\r\n * \r\n * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene\r\n * not yet handled in the scene list.\r\n *\r\n * @method Phaser.Input.InputPlugin#stopPropagation\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n stopPropagation: function ()\r\n {\r\n this.manager._tempSkip = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#addPointer\r\n * @since 3.10.0\r\n * \r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n return this.manager.addPointer(quantity);\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input instance.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.manager.setDefaultCursor(cursor);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionIn\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionIn: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin has finished transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionComplete\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n if (!this.settings.transitionAllowInput)\r\n {\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning out.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionOut\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionOut: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Input.InputPlugin#shutdown\r\n * @fires Phaser.Input.Events#SHUTDOWN\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.SHUTDOWN);\r\n\r\n this._temp.length = 0;\r\n this._list.length = 0;\r\n this._draggable.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n this._dragState.length = 0;\r\n\r\n for (var i = 0; i < 10; i++)\r\n {\r\n this._drag[i] = [];\r\n this._over[i] = [];\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n\r\n this.manager.events.off(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.off(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed. \r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Input.InputPlugin#destroy\r\n * @fires Phaser.Input.Events#DESTROY\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.DESTROY);\r\n\r\n this.pluginEvents.removeAllListeners();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.cameras = null;\r\n this.manager = null;\r\n this.events = null;\r\n this.mouse = null;\r\n },\r\n\r\n /**\r\n * The x coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#x\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#y\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n *\r\n * @name Phaser.Input.InputPlugin#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isOver: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.isOver;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#mousePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n mousePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.mousePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The current active input Pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n activePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer1\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer1: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[1];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer2\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer2: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[2];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer3\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer3: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[3];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer4\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer4: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[4];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer5\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer5: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[5];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer6\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer6: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[6];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer7\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer7: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[7];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer8\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer8: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[8];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer9\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer9: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[9];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer10\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer10: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[10];\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('InputPlugin', InputPlugin, 'input');\r\n\r\nmodule.exports = InputPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPlugin.js?")},"./node_modules/phaser/src/input/InputPluginCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar inputPlugins = {};\r\n\r\n/**\r\n * @namespace Phaser.Input.InputPluginCache\r\n */\r\n\r\nvar InputPluginCache = {};\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @name Phaser.Input.InputPluginCache.register\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used.\r\n * @param {string} settingsKey - The key in the Scene Settings to check to see if this plugin should install or not.\r\n * @param {string} configKey - The key in the Game Config to check to see if this plugin should install or not.\r\n */\r\nInputPluginCache.register = function (key, plugin, mapping, settingsKey, configKey)\r\n{\r\n inputPlugins[key] = { plugin: plugin, mapping: mapping, settingsKey: settingsKey, configKey: configKey };\r\n};\r\n\r\n/**\r\n * Returns the input plugin object from the cache based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.getCore\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to get.\r\n *\r\n * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object.\r\n */\r\nInputPluginCache.getPlugin = function (key)\r\n{\r\n return inputPlugins[key];\r\n};\r\n\r\n/**\r\n * Installs all of the registered Input Plugins into the given target.\r\n *\r\n * @name Phaser.Input.InputPluginCache.install\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into.\r\n */\r\nInputPluginCache.install = function (target)\r\n{\r\n var sys = target.scene.sys;\r\n var settings = sys.settings.input;\r\n var config = sys.game.config;\r\n\r\n for (var key in inputPlugins)\r\n {\r\n var source = inputPlugins[key].plugin;\r\n var mapping = inputPlugins[key].mapping;\r\n var settingsKey = inputPlugins[key].settingsKey;\r\n var configKey = inputPlugins[key].configKey;\r\n\r\n if (GetValue(settings, settingsKey, config[configKey]))\r\n {\r\n target[mapping] = new source(target);\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes an input plugin based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.remove\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to remove.\r\n */\r\nInputPluginCache.remove = function (key)\r\n{\r\n if (inputPlugins.hasOwnProperty(key))\r\n {\r\n delete inputPlugins[key];\r\n }\r\n};\r\n\r\nmodule.exports = InputPluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPluginCache.js?')},"./node_modules/phaser/src/input/Pointer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ../math/angle/Between */ \"./node_modules/phaser/src/math/angle/Between.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Distance = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar SmoothStepInterpolation = __webpack_require__(/*! ../math/interpolation/SmoothStepInterpolation */ \"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer object encapsulates both mouse and touch input within Phaser.\r\n *\r\n * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch\r\n * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly,\r\n * otherwise it won't be managed by the input system.\r\n *\r\n * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties\r\n * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game.\r\n *\r\n * The properties of this object are set by the Input Plugin during processing. This object is then sent in all\r\n * input related events that the Input Plugin emits, so you can reference properties from it directly in your\r\n * callbacks.\r\n *\r\n * @class Pointer\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} manager - A reference to the Input Manager.\r\n * @param {integer} id - The internal ID of this Pointer.\r\n */\r\nvar Pointer = new Class({\r\n\r\n initialize:\r\n\r\n function Pointer (manager, id)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Pointer#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The internal ID of this Pointer.\r\n *\r\n * @name Phaser.Input.Pointer#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.id = id;\r\n\r\n /**\r\n * The most recent native DOM Event this Pointer has processed.\r\n *\r\n * @name Phaser.Input.Pointer#event\r\n * @type {(TouchEvent|MouseEvent)}\r\n * @since 3.0.0\r\n */\r\n this.event;\r\n\r\n /**\r\n * The DOM element the Pointer was pressed down on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#downElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.downElement;\r\n\r\n /**\r\n * The DOM element the Pointer was released on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#upElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.upElement;\r\n\r\n /**\r\n * The camera the Pointer interacted with during its last update.\r\n * \r\n * A Pointer can only ever interact with one camera at once, which will be the top-most camera\r\n * in the list should multiple cameras be positioned on-top of each other.\r\n *\r\n * @name Phaser.Input.Pointer#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A read-only property that indicates which button was pressed, or released, on the pointer\r\n * during the most recent event. It is only set during `up` and `down` events.\r\n * \r\n * On Touch devices the value is always 0.\r\n * \r\n * Users may change the configuration of buttons on their pointing device so that if an event's button property\r\n * is zero, it may not have been caused by the button that is physically left–most on the pointing device;\r\n * however, it should behave as if the left button was clicked in the standard button layout.\r\n *\r\n * @name Phaser.Input.Pointer#button\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.button = 0;\r\n\r\n /**\r\n * 0: No button or un-initialized\r\n * 1: Left button\r\n * 2: Right button\r\n * 4: Wheel button or middle button\r\n * 8: 4th button (typically the \"Browser Back\" button)\r\n * 16: 5th button (typically the \"Browser Forward\" button)\r\n * \r\n * For a mouse configured for left-handed use, the button actions are reversed.\r\n * In this case, the values are read from right to left.\r\n *\r\n * @name Phaser.Input.Pointer#buttons\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.buttons = 0;\r\n\r\n /**\r\n * The position of the Pointer in screen space.\r\n *\r\n * @name Phaser.Input.Pointer#position\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The previous position of the Pointer in screen space.\r\n * \r\n * The old x and y values are stored in here during the InputManager.transformPointer call.\r\n * \r\n * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition.\r\n *\r\n * @name Phaser.Input.Pointer#prevPosition\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.prevPosition = new Vector2();\r\n\r\n /**\r\n * An internal vector used for calculations of the pointer speed and angle.\r\n *\r\n * @name Phaser.Input.Pointer#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.midPoint = new Vector2(-1, -1);\r\n\r\n /**\r\n * The current velocity of the Pointer, based on its current and previous positions.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The current angle the Pointer is moving, in radians, based on its previous and current position.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#angle\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The distance the Pointer has moved, based on its previous and current position.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n * \r\n * If you need the total distance travelled since the primary buttons was pressed down,\r\n * then use the `Pointer.getDistance` method.\r\n *\r\n * @name Phaser.Input.Pointer#distance\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.distance = 0;\r\n\r\n /**\r\n * The smoothing factor to apply to the Pointer position.\r\n * \r\n * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions\r\n * then you can set this value to apply an automatic smoothing to the positions as they are recorded.\r\n * \r\n * The default value of zero means 'no smoothing'.\r\n * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this\r\n * value directly, or by setting the `input.smoothFactor` property in the Game Config.\r\n * \r\n * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position\r\n * is always precise, and not smoothed.\r\n *\r\n * @name Phaser.Input.Pointer#smoothFactor\r\n * @type {number}\r\n * @default 0\r\n * @since 3.16.0\r\n */\r\n this.smoothFactor = 0;\r\n\r\n /**\r\n * The factor applied to the motion smoothing each frame.\r\n * \r\n * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity,\r\n * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current\r\n * position of the Pointer. 0.2 provides a good average but can be increased if you need a\r\n * quicker update and are working in a high performance environment. Never set this value to\r\n * zero.\r\n *\r\n * @name Phaser.Input.Pointer#motionFactor\r\n * @type {number}\r\n * @default 0.2\r\n * @since 3.16.0\r\n */\r\n this.motionFactor = 0.2;\r\n\r\n /**\r\n * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldX = 0;\r\n\r\n /**\r\n * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldY = 0;\r\n\r\n /**\r\n * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any)\r\n *\r\n * @name Phaser.Input.Pointer#moveTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upTime = 0;\r\n\r\n /**\r\n * Is the primary button down? (usually button 0, the left mouse button)\r\n *\r\n * @name Phaser.Input.Pointer#primaryDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.primaryDown = false;\r\n\r\n /**\r\n * Is _any_ button on this pointer considered as being down?\r\n *\r\n * @name Phaser.Input.Pointer#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * Did the previous input event come from a Touch input (true) or Mouse? (false)\r\n *\r\n * @name Phaser.Input.Pointer#wasTouch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.wasTouch = false;\r\n\r\n /**\r\n * Did this Pointer get canceled by a touchcancel event?\r\n * \r\n * Note: \"canceled\" is the American-English spelling of \"cancelled\". Please don't submit PRs correcting it!\r\n *\r\n * @name Phaser.Input.Pointer#wasCanceled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.15.0\r\n */\r\n this.wasCanceled = false;\r\n\r\n /**\r\n * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementX = 0;\r\n\r\n /**\r\n * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementY = 0;\r\n\r\n /**\r\n * The identifier property of the Pointer as set by the DOM event when this Pointer is started.\r\n *\r\n * @name Phaser.Input.Pointer#identifier\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.identifier = 0;\r\n\r\n /**\r\n * The pointerId property of the Pointer as set by the DOM event when this Pointer is started.\r\n * The browser can and will recycle this value.\r\n *\r\n * @name Phaser.Input.Pointer#pointerId\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.pointerId = null;\r\n\r\n /**\r\n * An active Pointer is one that is currently pressed down on the display.\r\n * A Mouse is always considered as active.\r\n *\r\n * @name Phaser.Input.Pointer#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = (id === 0) ? true : false;\r\n\r\n /**\r\n * Is this pointer Pointer Locked?\r\n * \r\n * Only a mouse pointer can be locked and it only becomes locked when requested via\r\n * the browsers Pointer Lock API.\r\n * \r\n * You can request this by calling the `this.input.mouse.requestPointerLock()` method from\r\n * a `pointerdown` or `pointerup` event handler.\r\n *\r\n * @name Phaser.Input.Pointer#locked\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaX = 0;\r\n\r\n /**\r\n * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n *\r\n * @name Phaser.Input.Pointer#deltaY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaY = 0;\r\n\r\n /**\r\n * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaZ\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaZ = 0;\r\n },\r\n\r\n /**\r\n * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are\r\n * the result of a translation through the given Camera.\r\n * \r\n * Note that the values will be automatically replaced the moment the Pointer is\r\n * updated by an input event, such as a mouse move, so should be used immediately.\r\n *\r\n * @method Phaser.Input.Pointer#updateWorldPoint\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {this} This Pointer object.\r\n */\r\n updateWorldPoint: function (camera)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n var temp = camera.getWorldPoint(x, y);\r\n\r\n this.worldX = temp.x;\r\n this.worldY = temp.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Camera and returns a Vector2 containing the translated position of this Pointer\r\n * within that Camera. This can be used to convert this Pointers position into camera space.\r\n *\r\n * @method Phaser.Input.Pointer#positionToCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the translation.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - A Vector2-like object in which to store the translated position.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} A Vector2 containing the translated coordinates of this Pointer, based on the given camera.\r\n */\r\n positionToCamera: function (camera, output)\r\n {\r\n return camera.getWorldPoint(this.x, this.y, output);\r\n },\r\n\r\n /**\r\n * Calculates the motion of this Pointer, including its velocity and angle of movement.\r\n * This method is called automatically each frame by the Input Manager.\r\n *\r\n * @method Phaser.Input.Pointer#updateMotion\r\n * @private\r\n * @since 3.16.0\r\n */\r\n updateMotion: function ()\r\n {\r\n var cx = this.position.x;\r\n var cy = this.position.y;\r\n\r\n var mx = this.midPoint.x;\r\n var my = this.midPoint.y;\r\n\r\n if (cx === mx && cy === my)\r\n {\r\n // Nothing to do here\r\n return;\r\n }\r\n\r\n // Moving towards our goal ...\r\n var vx = SmoothStepInterpolation(this.motionFactor, mx, cx);\r\n var vy = SmoothStepInterpolation(this.motionFactor, my, cy);\r\n\r\n if (FuzzyEqual(vx, cx, 0.1))\r\n {\r\n vx = cx;\r\n }\r\n\r\n if (FuzzyEqual(vy, cy, 0.1))\r\n {\r\n vy = cy;\r\n }\r\n\r\n this.midPoint.set(vx, vy);\r\n\r\n var dx = cx - vx;\r\n var dy = cy - vy;\r\n\r\n this.velocity.set(dx, dy);\r\n\r\n this.angle = Angle(vx, vy, cx, cy);\r\n\r\n this.distance = Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Up Event.\r\n *\r\n * @method Phaser.Input.Pointer#up\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n up: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.upElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Down Event.\r\n *\r\n * @method Phaser.Input.Pointer#down\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n down: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.downElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#move\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n move: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, true);\r\n\r\n if (this.locked)\r\n {\r\n // Multiple DOM events may occur within one frame, but only one Phaser event will fire\r\n this.movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;\r\n this.movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;\r\n }\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Wheel Event.\r\n *\r\n * @method Phaser.Input.Pointer#wheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The Wheel Event to process.\r\n */\r\n wheel: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n this.deltaX = event.deltaX;\r\n this.deltaY = event.deltaY;\r\n this.deltaZ = event.deltaZ;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Start Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchstart\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchstart: function (touch, event)\r\n {\r\n if (touch['pointerId'])\r\n {\r\n this.pointerId = touch.pointerId;\r\n }\r\n\r\n this.identifier = touch.identifier;\r\n this.target = touch.target;\r\n this.active = true;\r\n\r\n this.buttons = 1;\r\n\r\n this.event = event;\r\n\r\n this.downElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchmove\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchmove: function (touch, event)\r\n {\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, true);\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = true;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch End Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchend\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchend: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n \r\n this.active = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Cancel Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchcancel\r\n * @private\r\n * @since 3.15.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchcancel: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = true;\r\n \r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Checks to see if any buttons are being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#noButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if no buttons are being held down.\r\n */\r\n noButtonDown: function ()\r\n {\r\n return (this.buttons === 0);\r\n },\r\n\r\n /**\r\n * Checks to see if the left button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the left button is being held down.\r\n */\r\n leftButtonDown: function ()\r\n {\r\n return (this.buttons & 1) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the right button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the right button is being held down.\r\n */\r\n rightButtonDown: function ()\r\n {\r\n return (this.buttons & 2) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the middle button is being held down.\r\n */\r\n middleButtonDown: function ()\r\n {\r\n return (this.buttons & 4) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the back button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the back button is being held down.\r\n */\r\n backButtonDown: function ()\r\n {\r\n return (this.buttons & 8) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the forward button is being held down.\r\n */\r\n forwardButtonDown: function ()\r\n {\r\n return (this.buttons & 16) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the left button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the left button was just released.\r\n */\r\n leftButtonReleased: function ()\r\n {\r\n return (this.button === 0 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the right button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the right button was just released.\r\n */\r\n rightButtonReleased: function ()\r\n {\r\n return (this.button === 2 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the middle button was just released.\r\n */\r\n middleButtonReleased: function ()\r\n {\r\n return (this.button === 1 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the back button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the back button was just released.\r\n */\r\n backButtonReleased: function ()\r\n {\r\n return (this.button === 3 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the forward button was just released.\r\n */\r\n forwardButtonReleased: function ()\r\n {\r\n return (this.button === 4 && !this.isDown);\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded distance, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * If you wish to get the distance being travelled currently, based on the velocity of the Pointer,\r\n * then see the `Pointer.distance` property.\r\n *\r\n * @method Phaser.Input.Pointer#getDistance\r\n * @since 3.13.0\r\n *\r\n * @return {number} The distance the Pointer moved.\r\n */\r\n getDistance: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Distance(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Distance(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * horizontal distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded horizontal distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceX\r\n * @since 3.16.0\r\n *\r\n * @return {number} The horizontal distance the Pointer moved.\r\n */\r\n getDistanceX: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downX - this.x);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downX - this.upX);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * vertical distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded vertical distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceY\r\n * @since 3.16.0\r\n *\r\n * @return {number} The vertical distance the Pointer moved.\r\n */\r\n getDistanceY: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downY - this.y);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downY - this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * duration since the button was pressed down.\r\n * \r\n * If no button is held down, it will return the last recorded duration, based on the time\r\n * the Pointer button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDuration\r\n * @since 3.16.0\r\n *\r\n * @return {number} The duration the Pointer was held down for in milliseconds.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.manager.time - this.downTime);\r\n }\r\n else\r\n {\r\n return (this.upTime - this.downTime);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * angle between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded angle, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * If you wish to get the current angle, based on the velocity of the Pointer, then\r\n * see the `Pointer.angle` property.\r\n *\r\n * @method Phaser.Input.Pointer#getAngle\r\n * @since 3.16.0\r\n *\r\n * @return {number} The angle between the Pointer's coordinates in radians.\r\n */\r\n getAngle: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Angle(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Angle(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * Takes the previous and current Pointer positions and then generates an array of interpolated values between\r\n * the two. The array will be populated up to the size of the `steps` argument.\r\n * \r\n * ```javaScript\r\n * var points = pointer.getInterpolatedPosition(4);\r\n * \r\n * // points[0] = { x: 0, y: 0 }\r\n * // points[1] = { x: 2, y: 1 }\r\n * // points[2] = { x: 3, y: 2 }\r\n * // points[3] = { x: 6, y: 3 }\r\n * ```\r\n * \r\n * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer\r\n * events can often fire faster than the main browser loop, and this will help you avoid janky movement\r\n * especially if you have an object following a Pointer.\r\n * \r\n * Note that if you provide an output array it will only be populated up to the number of steps provided.\r\n * It will not clear any previous data that may have existed beyond the range of the steps count.\r\n * \r\n * Internally it uses the Smooth Step interpolation calculation.\r\n *\r\n * @method Phaser.Input.Pointer#getInterpolatedPosition\r\n * @since 3.11.0\r\n * \r\n * @param {integer} [steps=10] - The number of interpolation steps to use.\r\n * @param {array} [out] - An array to store the results in. If not provided a new one will be created.\r\n * \r\n * @return {array} An array of interpolated values.\r\n */\r\n getInterpolatedPosition: function (steps, out)\r\n {\r\n if (steps === undefined) { steps = 10; }\r\n if (out === undefined) { out = []; }\r\n\r\n var prevX = this.prevPosition.x;\r\n var prevY = this.prevPosition.y;\r\n\r\n var curX = this.position.x;\r\n var curY = this.position.y;\r\n\r\n for (var i = 0; i < steps; i++)\r\n {\r\n var t = (1 / steps) * i;\r\n\r\n out[i] = { x: SmoothStepInterpolation(t, prevX, curX), y: SmoothStepInterpolation(t, prevY, curY) };\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Destroys this Pointer instance and resets its external references.\r\n *\r\n * @method Phaser.Input.Pointer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n this.manager = null;\r\n this.position = null;\r\n },\r\n\r\n /**\r\n * The x position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldX` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldY` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Time when this Pointer was most recently updated by a DOM Event.\r\n * This comes directly from the `event.timeStamp` property.\r\n * If no event has yet taken place, it will return zero.\r\n *\r\n * @name Phaser.Input.Pointer#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return (this.event) ? this.event.timeStamp : 0;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pointer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/Pointer.js?")},"./node_modules/phaser/src/input/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar INPUT_CONST = {\r\n\r\n /**\r\n * The mouse pointer is being held down.\r\n * \r\n * @name Phaser.Input.MOUSE_DOWN\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_DOWN: 0,\r\n\r\n /**\r\n * The mouse pointer is being moved.\r\n * \r\n * @name Phaser.Input.MOUSE_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_MOVE: 1,\r\n\r\n /**\r\n * The mouse pointer is released.\r\n * \r\n * @name Phaser.Input.MOUSE_UP\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_UP: 2,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_START\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_START: 3,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_MOVE: 4,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_END\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_END: 5,\r\n\r\n /**\r\n * The pointer lock has changed.\r\n * \r\n * @name Phaser.Input.POINTER_LOCK_CHANGE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n POINTER_LOCK_CHANGE: 6,\r\n\r\n /**\r\n * A touch pointer has been been cancelled by the browser.\r\n * \r\n * @name Phaser.Input.TOUCH_CANCEL\r\n * @type {integer}\r\n * @since 3.15.0\r\n */\r\n TOUCH_CANCEL: 7,\r\n\r\n /**\r\n * The mouse wheel changes.\r\n * \r\n * @name Phaser.Input.MOUSE_WHEEL\r\n * @type {integer}\r\n * @since 3.18.0\r\n */\r\n MOUSE_WHEEL: 8\r\n\r\n};\r\n\r\nmodule.exports = INPUT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/const.js?")},"./node_modules/phaser/src/input/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves.\r\n *\r\n * @event Phaser.Input.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Destroy Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it is destroyed, signalling to all of its systems to destroy themselves.\r\n *\r\n * @event Phaser.Input.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag End Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer stops dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragend', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_END]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_END} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer stopped dragging.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Enter Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object into a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragenter', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_ENTER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_ENTER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves while dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drag', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Leave Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object out of a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragleave', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_LEAVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_LEAVE} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object over a Drag Target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragover', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_OVER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Start Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer starts to drag any Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragstart', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_START]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_START} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drop Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drops a Game Object on a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drop', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DROP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DROP} event instead.\r\n *\r\n * @event Phaser.Input.Events#DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer was dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down on _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectdown', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was pressed down on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag End Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer stops dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragend', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive](Phaser.GameObjects.GameObject#setInteractive) for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Enter Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it into a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragenter', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves while dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drag', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Leave Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it out of a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragleave', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it over a drag target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Start Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer starts to drag it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragstart', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * There are lots of useful drag related properties that are set within the Game Object when dragging occurs.\r\n * For example, `gameObject.input.dragStartX`, `dragStartY` and so on.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drop Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drops it on a Drag Target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drop', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved across _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectmove', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was moved on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectmove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectout', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved out of.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectover', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved over.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Down Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is pressed down on it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerdown', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Move Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointermove', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Out Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves out of it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerout', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Up Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is released while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerup', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Wheel Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer has its wheel moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('wheel', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectup', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when released.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel moved while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectwheel', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when the wheel changed.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectwheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Out Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer leaves the game canvas and is now\r\n * outside of it, elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameout', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OUT\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas out.\r\n */\r\nmodule.exports = 'gameout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Over Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer enters the game canvas and is now\r\n * over of it, having previously been elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameover', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OVER\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas over.\r\n */\r\nmodule.exports = 'gameover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when it boots.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Process Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when not using the legacy queue system,\r\n * and it wants the Input Plugins to update themselves.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'process';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Update Event.\r\n * \r\n * This internal event is dispatched by the Input Manager as part of its update step.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Pointer Lock Change Event.\r\n * \r\n * This event is dispatched by the Input Manager when it is processing a native Pointer Lock Change DOM Event.\r\n *\r\n * @event Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @since 3.0.0\r\n * \r\n * @param {Event} event - The native DOM Event.\r\n * @param {boolean} locked - The locked state of the Mouse Pointer.\r\n */\r\nmodule.exports = 'pointerlockchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdown', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdownoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerdownoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointermove', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOut - An array containing all interactive Game Objects that the pointer moved out of when the event was created.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerover', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOver - An array containing all interactive Game Objects that the pointer moved over when the event was created.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerupoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerupoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel updated.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('wheel', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Pre-Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `preUpdate` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Shutdown Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it shuts down, signalling to all of its systems to shut themselves down.\r\n *\r\n * @event Phaser.Input.Events#SHUTDOWN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Start Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it has finished setting-up,\r\n * signalling to all of its internal systems to start.\r\n *\r\n * @event Phaser.Input.Events#START\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/START_EVENT.js?")},"./node_modules/phaser/src/input/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `update` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/input/events/BOOT_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/input/events/DESTROY_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/DRAG_END_EVENT.js"),\r\n DRAG_ENTER: __webpack_require__(/*! ./DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/input/events/DRAG_EVENT.js"),\r\n DRAG_LEAVE: __webpack_require__(/*! ./DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js"),\r\n DRAG_OVER: __webpack_require__(/*! ./DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/DRAG_START_EVENT.js"),\r\n DROP: __webpack_require__(/*! ./DROP_EVENT */ "./node_modules/phaser/src/input/events/DROP_EVENT.js"),\r\n GAME_OUT: __webpack_require__(/*! ./GAME_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js"),\r\n GAME_OVER: __webpack_require__(/*! ./GAME_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js"),\r\n GAMEOBJECT_DOWN: __webpack_require__(/*! ./GAMEOBJECT_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js"),\r\n GAMEOBJECT_DRAG_END: __webpack_require__(/*! ./GAMEOBJECT_DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js"),\r\n GAMEOBJECT_DRAG_ENTER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js"),\r\n GAMEOBJECT_DRAG: __webpack_require__(/*! ./GAMEOBJECT_DRAG_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js"),\r\n GAMEOBJECT_DRAG_LEAVE: __webpack_require__(/*! ./GAMEOBJECT_DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js"),\r\n GAMEOBJECT_DRAG_OVER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js"),\r\n GAMEOBJECT_DRAG_START: __webpack_require__(/*! ./GAMEOBJECT_DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js"),\r\n GAMEOBJECT_DROP: __webpack_require__(/*! ./GAMEOBJECT_DROP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js"),\r\n GAMEOBJECT_MOVE: __webpack_require__(/*! ./GAMEOBJECT_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js"),\r\n GAMEOBJECT_OUT: __webpack_require__(/*! ./GAMEOBJECT_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js"),\r\n GAMEOBJECT_OVER: __webpack_require__(/*! ./GAMEOBJECT_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_DOWN: __webpack_require__(/*! ./GAMEOBJECT_POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js"),\r\n GAMEOBJECT_POINTER_MOVE: __webpack_require__(/*! ./GAMEOBJECT_POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js"),\r\n GAMEOBJECT_POINTER_OUT: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js"),\r\n GAMEOBJECT_POINTER_OVER: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_UP: __webpack_require__(/*! ./GAMEOBJECT_POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js"),\r\n GAMEOBJECT_POINTER_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js"),\r\n GAMEOBJECT_UP: __webpack_require__(/*! ./GAMEOBJECT_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js"),\r\n GAMEOBJECT_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js"),\r\n MANAGER_BOOT: __webpack_require__(/*! ./MANAGER_BOOT_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js"),\r\n MANAGER_PROCESS: __webpack_require__(/*! ./MANAGER_PROCESS_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js"),\r\n MANAGER_UPDATE: __webpack_require__(/*! ./MANAGER_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js"),\r\n POINTER_DOWN: __webpack_require__(/*! ./POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js"),\r\n POINTER_DOWN_OUTSIDE: __webpack_require__(/*! ./POINTER_DOWN_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js"),\r\n POINTER_MOVE: __webpack_require__(/*! ./POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js"),\r\n POINTER_OUT: __webpack_require__(/*! ./POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js"),\r\n POINTER_OVER: __webpack_require__(/*! ./POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js"),\r\n POINTER_UP: __webpack_require__(/*! ./POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js"),\r\n POINTER_UP_OUTSIDE: __webpack_require__(/*! ./POINTER_UP_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js"),\r\n POINTER_WHEEL: __webpack_require__(/*! ./POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js"),\r\n POINTERLOCK_CHANGE: __webpack_require__(/*! ./POINTERLOCK_CHANGE_EVENT */ "./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/input/events/START_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/input/events/UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/index.js?')},"./node_modules/phaser/src/input/gamepad/Axis.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific Gamepad Axis.\r\n * Axis objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Axis\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Axis belongs to.\r\n * @param {integer} index - The index of this Axis.\r\n */\r\nvar Axis = new Class({\r\n\r\n initialize:\r\n\r\n function Axis (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Axis belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the axis events.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.events;\r\n\r\n /**\r\n * The index of this Axis.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The raw axis value, between -1 and 1 with 0 being dead center.\r\n * Use the method `getValue` to get a normalized value with the threshold applied.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Movement tolerance threshold below which axis values are ignored in `getValue`.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#threshold\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 0.1;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Axis.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the axis movement.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n },\r\n\r\n /**\r\n * Applies the `threshold` value to the axis and returns it.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The axis value, adjusted for the movement threshold.\r\n */\r\n getValue: function ()\r\n {\r\n return (Math.abs(this.value) < this.threshold) ? 0 : this.value;\r\n },\r\n\r\n /**\r\n * Destroys this Axis instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Axis;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Axis.js?')},"./node_modules/phaser/src/input/gamepad/Button.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific button on a Gamepad.\r\n * Button objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Button\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Button belongs to.\r\n * @param {integer} index - The index of this Button.\r\n */\r\nvar Button = new Class({\r\n\r\n initialize:\r\n\r\n function Button (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Button belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the button events.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.manager;\r\n\r\n /**\r\n * The index of this Button.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * Between 0 and 1.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Can be set for analogue buttons to enable a 'pressure' threshold,\r\n * before a button is considered as being 'pressed'.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#threshold\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 1;\r\n\r\n /**\r\n * Is the Button being pressed down or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pressed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pressed = false;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Button.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#update\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the button. Between 0 and 1.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n\r\n var pad = this.pad;\r\n var index = this.index;\r\n\r\n if (value >= this.threshold)\r\n {\r\n if (!this.pressed)\r\n {\r\n this.pressed = true;\r\n this.events.emit(Events.BUTTON_DOWN, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_DOWN, index, value, this);\r\n }\r\n }\r\n else if (this.pressed)\r\n {\r\n this.pressed = false;\r\n this.events.emit(Events.BUTTON_UP, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_UP, index, value, this);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Button instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Button;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Button.js?")},"./node_modules/phaser/src/input/gamepad/Gamepad.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Axis = __webpack_require__(/*! ./Axis */ \"./node_modules/phaser/src/input/gamepad/Axis.js\");\r\nvar Button = __webpack_require__(/*! ./Button */ \"./node_modules/phaser/src/input/gamepad/Button.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Gamepad.\r\n *\r\n * These are created, updated and managed by the Gamepad Plugin.\r\n *\r\n * @class Gamepad\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.GamepadPlugin} manager - A reference to the Gamepad Plugin.\r\n * @param {Phaser.Types.Input.Gamepad.Pad} pad - The Gamepad object, as extracted from GamepadEvent.\r\n */\r\nvar Gamepad = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Gamepad (manager, pad)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Gamepad Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#manager\r\n * @type {Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A reference to the native Gamepad object that is connected to the browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#pad\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * A string containing some information about the controller.\r\n *\r\n * This is not strictly specified, but in Firefox it will contain three pieces of information\r\n * separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and\r\n * product id of the controller, and the name of the controller as provided by the driver.\r\n * In Chrome it will contain the name of the controller as provided by the driver,\r\n * followed by vendor and product 4-digit hexadecimal strings.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#id\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.id = pad.id;\r\n\r\n /**\r\n * An integer that is unique for each Gamepad currently connected to the system.\r\n * This can be used to distinguish multiple controllers.\r\n * Note that disconnecting a device and then connecting a new device may reuse the previous index.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#index\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.index = pad.index;\r\n\r\n var buttons = [];\r\n\r\n for (var i = 0; i < pad.buttons.length; i++)\r\n {\r\n buttons.push(new Button(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Button objects, corresponding to the different buttons available on the Gamepad.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#buttons\r\n * @type {Phaser.Input.Gamepad.Button[]}\r\n * @since 3.0.0\r\n */\r\n this.buttons = buttons;\r\n\r\n var axes = [];\r\n\r\n for (i = 0; i < pad.axes.length; i++)\r\n {\r\n axes.push(new Axis(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Axis objects, corresponding to the different axes available on the Gamepad, if any.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#axes\r\n * @type {Phaser.Input.Gamepad.Axis[]}\r\n * @since 3.0.0\r\n */\r\n this.axes = axes;\r\n\r\n /**\r\n * The Gamepad's Haptic Actuator (Vibration / Rumble support).\r\n * This is highly experimental and only set if both present on the device,\r\n * and exposed by both the hardware and browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#vibration\r\n * @type {GamepadHapticActuator}\r\n * @since 3.10.0\r\n */\r\n this.vibration = pad.vibrationActuator;\r\n\r\n // https://w3c.github.io/gamepad/#remapping\r\n\r\n var _noButton = { value: 0, pressed: false };\r\n\r\n /**\r\n * A reference to the Left Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCLeft = (buttons[14]) ? buttons[14] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCRight = (buttons[15]) ? buttons[15] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCTop = (buttons[12]) ? buttons[12] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;\r\n\r\n /**\r\n * A reference to the Left Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCRight = (buttons[1]) ? buttons[1] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCTop = (buttons[3]) ? buttons[3] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Left Front Button (L1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Left Front Button (L2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Right Front Button (R1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Right Front Button (R2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;\r\n\r\n var _noAxis = { value: 0 };\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisLeft = (axes[0]) ? axes[0] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisLeft = (axes[1]) ? axes[1] : _noAxis;\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisRight = (axes[2]) ? axes[2] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisRight = (axes[3]) ? axes[3] : _noAxis;\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's left axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a left axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#leftStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.leftStick = new Vector2();\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's right axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a right axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#rightStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.rightStick = new Vector2();\r\n },\r\n\r\n /**\r\n * Gets the total number of axis this Gamepad claims to support.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of axes this Gamepad claims to support.\r\n */\r\n getAxisTotal: function ()\r\n {\r\n return this.axes.length;\r\n },\r\n\r\n /**\r\n * Gets the value of an axis based on the given index.\r\n * The index must be valid within the range of axes supported by this Gamepad.\r\n * The return value will be a float between 0 and 1.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the axes to get the value for.\r\n *\r\n * @return {number} The value of the axis, between 0 and 1.\r\n */\r\n getAxisValue: function (index)\r\n {\r\n return this.axes[index].getValue();\r\n },\r\n\r\n /**\r\n * Sets the threshold value of all axis on this Gamepad.\r\n * The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#setAxisThreshold\r\n * @since 3.10.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n */\r\n setAxisThreshold: function (value)\r\n {\r\n for (var i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].threshold = value;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the total number of buttons this Gamepad claims to have.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of buttons this Gamepad claims to have.\r\n */\r\n getButtonTotal: function ()\r\n {\r\n return this.buttons.length;\r\n },\r\n\r\n /**\r\n * Gets the value of a button based on the given index.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1\r\n * for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {number} The value of the button, between 0 and 1.\r\n */\r\n getButtonValue: function (index)\r\n {\r\n return this.buttons[index].value;\r\n },\r\n\r\n /**\r\n * Returns if the button is pressed down or not.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#isButtonDown\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {boolean} `true` if the button is considered as being pressed down, otherwise `false`.\r\n */\r\n isButtonDown: function (index)\r\n {\r\n return this.buttons[index].pressed;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Gamepad.\r\n * Called automatically by the Gamepad Manager as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#update\r\n * @private\r\n * @since 3.0.0\r\n */\r\n update: function (pad)\r\n {\r\n var i;\r\n\r\n // Sync the button values\r\n\r\n var localButtons = this.buttons;\r\n var gamepadButtons = pad.buttons;\r\n\r\n var len = localButtons.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localButtons[i].update(gamepadButtons[i].value);\r\n }\r\n\r\n // Sync the axis values\r\n\r\n var localAxes = this.axes;\r\n var gamepadAxes = pad.axes;\r\n\r\n len = localAxes.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localAxes[i].update(gamepadAxes[i]);\r\n }\r\n\r\n if (len >= 2)\r\n {\r\n this.leftStick.set(localAxes[0].getValue(), localAxes[1].getValue());\r\n\r\n if (len >= 4)\r\n {\r\n this.rightStick.set(localAxes[2].getValue(), localAxes[3].getValue());\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad instance, its buttons and axes, and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager = null;\r\n this.pad = null;\r\n\r\n var i;\r\n\r\n for (i = 0; i < this.buttons.length; i++)\r\n {\r\n this.buttons[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].destroy();\r\n }\r\n\r\n this.buttons = [];\r\n this.axes = [];\r\n },\r\n\r\n /**\r\n * Is this Gamepad currently connected or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#connected\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n connected: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.connected;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A timestamp containing the most recent time this Gamepad was updated.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#timestamp\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n timestamp: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.timestamp;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Left button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad left button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#left\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this._LCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Right button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad right button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#right\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this._LCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Up button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad up button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#up\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n up: {\r\n\r\n get: function ()\r\n {\r\n return this._LCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Down button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad down button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#down\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n down: {\r\n\r\n get: function ()\r\n {\r\n return this._LCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's bottom button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the X button.\r\n * On an XBox controller it's the A button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#A\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n A: {\r\n\r\n get: function ()\r\n {\r\n return this._RCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's top button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Triangle button.\r\n * On an XBox controller it's the Y button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#Y\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n Y: {\r\n\r\n get: function ()\r\n {\r\n return this._RCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's left button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Square button.\r\n * On an XBox controller it's the X button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#X\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n X: {\r\n\r\n get: function ()\r\n {\r\n return this._RCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's right button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Circle button.\r\n * On an XBox controller it's the B button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#B\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n B: {\r\n\r\n get: function ()\r\n {\r\n return this._RCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L1 button.\r\n * On an XBox controller it's the LB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L2 button.\r\n * On an XBox controller it's the LT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftBottom.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R1 button.\r\n * On an XBox controller it's the RB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R2 button.\r\n * On an XBox controller it's the RT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightBottom.value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gamepad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Gamepad.js?")},"./node_modules/phaser/src/input/gamepad/GamepadPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\nvar Gamepad = __webpack_require__(/*! ./Gamepad */ \"./node_modules/phaser/src/input/gamepad/Gamepad.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Gamepad Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n *\r\n * Its role is to listen for native DOM Gamepad Events and then process them.\r\n *\r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n *\r\n * You can access it from within a Scene using `this.input.gamepad`.\r\n *\r\n * To listen for a gamepad being connected:\r\n *\r\n * ```javascript\r\n * this.input.gamepad.once('connected', function (pad) {\r\n * // 'pad' is a reference to the gamepad that was just connected\r\n * });\r\n * ```\r\n *\r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * Once you have received the connected event, or polled the gamepads and found them enabled, you can access\r\n * them via the built-in properties `GamepadPlugin.pad1` to `pad4`, for up to 4 game pads. With a reference\r\n * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on\r\n * the `Gamepad` class for more details.\r\n *\r\n * For more information about Gamepad support in browsers see the following resources:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API\r\n * https://www.smashingmagazine.com/2015/11/gamepad-api-in-web-games/\r\n * http://html5gamepad.com/\r\n *\r\n * @class GamepadPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar GamepadPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GamepadPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A boolean that controls if the Gamepad Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Gamepad Event target, as defined in the Game Config.\r\n * Typically the browser window, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#target\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * An array of the connected Gamepads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#gamepads\r\n * @type {Phaser.Input.Gamepad.Gamepad[]}\r\n * @default []\r\n * @since 3.10.0\r\n */\r\n this.gamepads = [];\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#queue\r\n * @type {GamepadEvent[]}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * Internal event handler.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#onGamepadHandler\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.onGamepadHandler;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad1;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad2;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad3;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad4;\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.scene.sys.game;\r\n var settings = this.settings.input;\r\n var config = game.config;\r\n\r\n this.enabled = GetValue(settings, 'gamepad', config.inputGamepad) && game.device.input.gamepads;\r\n this.target = GetValue(settings, 'gamepad.target', config.inputGamepadEventTarget);\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.enabled)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * Starts the Gamepad Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#startListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var target = this.target;\r\n\r\n var handler = function (event)\r\n {\r\n // console.log(event);\r\n\r\n if (event.defaultPrevented || !_this.isActive())\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.refreshPads();\r\n\r\n _this.queue.push(event);\r\n };\r\n\r\n this.onGamepadHandler = handler;\r\n\r\n target.addEventListener('gamepadconnected', handler, false);\r\n target.addEventListener('gamepaddisconnected', handler, false);\r\n\r\n // FF also supports gamepadbuttondown, gamepadbuttonup and gamepadaxismove but\r\n // nothing else does, and we can get those values via the gamepads anyway, so we will\r\n // until more browsers support this\r\n\r\n // Finally, listen for an update event from the Input Plugin\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n },\r\n\r\n /**\r\n * Stops the Gamepad Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#stopListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n stopListeners: function ()\r\n {\r\n this.target.removeEventListener('gamepadconnected', this.onGamepadHandler);\r\n this.target.removeEventListener('gamepaddisconnected', this.onGamepadHandler);\r\n\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update);\r\n },\r\n\r\n /**\r\n * Disconnects all current Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#disconnectAll\r\n * @since 3.10.0\r\n */\r\n disconnectAll: function ()\r\n {\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n this.gamepads.connected = false;\r\n }\r\n },\r\n\r\n /**\r\n * Refreshes the list of connected Gamepads.\r\n *\r\n * This is called automatically when a gamepad is connected or disconnected,\r\n * and during the update loop.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#refreshPads\r\n * @private\r\n * @since 3.10.0\r\n */\r\n refreshPads: function ()\r\n {\r\n var connectedPads = navigator.getGamepads();\r\n\r\n if (!connectedPads)\r\n {\r\n this.disconnectAll();\r\n }\r\n else\r\n {\r\n var currentPads = this.gamepads;\r\n\r\n for (var i = 0; i < connectedPads.length; i++)\r\n {\r\n var livePad = connectedPads[i];\r\n\r\n // Because sometimes they're null (yes, really)\r\n if (!livePad)\r\n {\r\n continue;\r\n }\r\n\r\n var id = livePad.id;\r\n var index = livePad.index;\r\n var currentPad = currentPads[index];\r\n\r\n if (!currentPad)\r\n {\r\n // A new Gamepad, not currently stored locally\r\n var newPad = new Gamepad(this, livePad);\r\n\r\n currentPads[index] = newPad;\r\n\r\n if (!this._pad1)\r\n {\r\n this._pad1 = newPad;\r\n }\r\n else if (!this._pad2)\r\n {\r\n this._pad2 = newPad;\r\n }\r\n else if (!this._pad3)\r\n {\r\n this._pad3 = newPad;\r\n }\r\n else if (!this._pad4)\r\n {\r\n this._pad4 = newPad;\r\n }\r\n }\r\n else if (currentPad.id !== id)\r\n {\r\n // A new Gamepad with a different vendor string, but it has got the same index as an old one\r\n currentPad.destroy();\r\n\r\n currentPads[index] = new Gamepad(this, livePad);\r\n }\r\n else\r\n {\r\n // If neither of these, it's a pad we've already got, so update it\r\n currentPad.update(livePad);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all currently connected Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getAll\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad[]} An array of all currently connected Gamepads.\r\n */\r\n getAll: function ()\r\n {\r\n var out = [];\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i])\r\n {\r\n out.push(pads[i]);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Looks-up a single Gamepad based on the given index value.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getPad\r\n * @since 3.10.0\r\n *\r\n * @param {number} index - The index of the Gamepad to get.\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad} The Gamepad matching the given index, or undefined if none were found.\r\n */\r\n getPad: function (index)\r\n {\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i] && pads[i].index === index)\r\n {\r\n return pads[i];\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The internal update loop. Refreshes all connected gamepads and processes their events.\r\n *\r\n * Called automatically by the Input Manager, invoked from the Game step.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Gamepad.Events#CONNECTED\r\n * @fires Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.refreshPads();\r\n\r\n var len = this.queue.length;\r\n\r\n if (len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var queue = this.queue.splice(0, len);\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var pad = this.getPad(event.gamepad.index);\r\n\r\n if (event.type === 'gamepadconnected')\r\n {\r\n this.emit(Events.CONNECTED, pad, event);\r\n }\r\n else if (event.type === 'gamepaddisconnected')\r\n {\r\n this.emit(Events.DISCONNECTED, pad, event);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Shuts the Gamepad Plugin down.\r\n * All this does is remove any listeners bound to it.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.disconnectAll();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad Plugin, disconnecting all Gamepads and releasing internal references.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n if (this.gamepads[i])\r\n {\r\n this.gamepads[i].destroy();\r\n }\r\n }\r\n\r\n this.gamepads = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.target = null;\r\n },\r\n\r\n /**\r\n * The total number of connected game pads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#total\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n total: {\r\n\r\n get: function ()\r\n {\r\n return this.gamepads.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the first connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad1: {\r\n\r\n get: function ()\r\n {\r\n return this._pad1;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the second connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad2: {\r\n\r\n get: function ()\r\n {\r\n return this._pad2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the third connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad3: {\r\n\r\n get: function ()\r\n {\r\n return this._pad3;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the fourth connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad4: {\r\n\r\n get: function ()\r\n {\r\n return this._pad4;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property.\r\n * Use this to create access Gamepads connected to the browser and respond to gamepad buttons.\r\n *\r\n * @name Phaser.Input.InputPlugin#gamepad\r\n * @type {?Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('GamepadPlugin', GamepadPlugin, 'gamepad', 'gamepad', 'inputGamepad');\r\n\r\nmodule.exports = GamepadPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/GamepadPlugin.js?")},"./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tatar SNES USB Controller Gamepad Configuration.\r\n * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011)\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.SNES_USB\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SELECT: 8,\r\n START: 9,\r\n\r\n B: 0,\r\n A: 1,\r\n Y: 2,\r\n X: 3,\r\n\r\n LEFT_SHOULDER: 4,\r\n RIGHT_SHOULDER: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * PlayStation DualShock 4 Gamepad Configuration.\r\n * Sony PlayStation DualShock 4 (v2) wireless controller\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.DUALSHOCK_4\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SHARE: 8,\r\n OPTIONS: 9,\r\n PS: 16,\r\n TOUCHBAR: 17,\r\n\r\n X: 0,\r\n CIRCLE: 1,\r\n SQUARE: 2,\r\n TRIANGLE: 3,\r\n\r\n L1: 4,\r\n R1: 5,\r\n L2: 6,\r\n R2: 7,\r\n L3: 10,\r\n R3: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js?")},"./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * XBox 360 Gamepad Configuration.\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.XBOX_360\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n MENU: 16,\r\n\r\n A: 0,\r\n B: 1,\r\n X: 2,\r\n Y: 3,\r\n\r\n LB: 4,\r\n RB: 5,\r\n\r\n LT: 6,\r\n RT: 7,\r\n\r\n BACK: 8,\r\n START: 9,\r\n\r\n LS: 10,\r\n RS: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Configs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DUALSHOCK_4: __webpack_require__(/*! ./Sony_PlayStation_DualShock_4 */ "./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js"),\r\n SNES_USB: __webpack_require__(/*! ./SNES_USB_Controller */ "./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js"),\r\n XBOX_360: __webpack_require__(/*! ./XBox360_Controller */ "./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/index.js?')},"./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`.\r\n * \r\n * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was pressed.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`.\r\n * \r\n * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was released.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Connected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`.\r\n * \r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#CONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was connected.\r\n * @param {Event} event - The native DOM Event that triggered the connection.\r\n */\r\nmodule.exports = 'connected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Disconnected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was disconnected.\r\n * @param {Event} event - The native DOM Event that triggered the disconnection.\r\n */\r\nmodule.exports = 'disconnected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been pressed on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('down', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been released on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('up', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BUTTON_DOWN: __webpack_require__(/*! ./BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js"),\r\n BUTTON_UP: __webpack_require__(/*! ./BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js"),\r\n CONNECTED: __webpack_require__(/*! ./CONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js"),\r\n DISCONNECTED: __webpack_require__(/*! ./DISCONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js"),\r\n GAMEPAD_BUTTON_DOWN: __webpack_require__(/*! ./GAMEPAD_BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js"),\r\n GAMEPAD_BUTTON_UP: __webpack_require__(/*! ./GAMEPAD_BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/index.js?')},"./node_modules/phaser/src/input/gamepad/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Axis: __webpack_require__(/*! ./Axis */ "./node_modules/phaser/src/input/gamepad/Axis.js"),\r\n Button: __webpack_require__(/*! ./Button */ "./node_modules/phaser/src/input/gamepad/Button.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/gamepad/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./Gamepad */ "./node_modules/phaser/src/input/gamepad/Gamepad.js"),\r\n GamepadPlugin: __webpack_require__(/*! ./GamepadPlugin */ "./node_modules/phaser/src/input/gamepad/GamepadPlugin.js"),\r\n \r\n Configs: __webpack_require__(/*! ./configs/ */ "./node_modules/phaser/src/input/gamepad/configs/index.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/index.js?')},"./node_modules/phaser/src/input/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Input\r\n */\r\n\r\nvar Input = {\r\n\r\n CreateInteractiveObject: __webpack_require__(/*! ./CreateInteractiveObject */ "./node_modules/phaser/src/input/CreateInteractiveObject.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./gamepad */ "./node_modules/phaser/src/input/gamepad/index.js"),\r\n InputManager: __webpack_require__(/*! ./InputManager */ "./node_modules/phaser/src/input/InputManager.js"),\r\n InputPlugin: __webpack_require__(/*! ./InputPlugin */ "./node_modules/phaser/src/input/InputPlugin.js"),\r\n InputPluginCache: __webpack_require__(/*! ./InputPluginCache */ "./node_modules/phaser/src/input/InputPluginCache.js"),\r\n Keyboard: __webpack_require__(/*! ./keyboard */ "./node_modules/phaser/src/input/keyboard/index.js"),\r\n Mouse: __webpack_require__(/*! ./mouse */ "./node_modules/phaser/src/input/mouse/index.js"),\r\n Pointer: __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js"),\r\n Touch: __webpack_require__(/*! ./touch */ "./node_modules/phaser/src/input/touch/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nInput = Extend(false, Input, CONST);\r\n\r\nmodule.exports = Input;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/index.js?')},"./node_modules/phaser/src/input/keyboard/KeyboardManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar KeyCodes = __webpack_require__(/*! ../../input/keyboard/keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Manager is a helper class that belongs to the global Input Manager.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then store them for further processing by the Keyboard Plugin.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically if keyboard\r\n * input has been enabled in the Game Config.\r\n *\r\n * @class KeyboardManager\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar KeyboardManager = new Class({\r\n\r\n initialize:\r\n\r\n function KeyboardManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.16.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#queue\r\n * @type {KeyboardEvent[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * A flag that controls if the non-modified keys, matching those stored in the `captures` array,\r\n * have `preventDefault` called on them or not.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle this property at run-time.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#preventDefault\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.preventDefault = true;\r\n\r\n /**\r\n * An array of Key Code values that will automatically have `preventDefault` called on them,\r\n * as long as the `KeyboardManager.preventDefault` boolean is set to `true`.\r\n * \r\n * By default the array is empty.\r\n * \r\n * The key must be non-modified when pressed in order to be captured.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle the `KeyboardManager.preventDefault` boolean at run-time.\r\n * \r\n * If you need more specific control, you can create Key objects and set the flag on each of those instead.\r\n * \r\n * This array can be populated via the Game Config by setting the `input.keyboard.capture` array, or you\r\n * can call the `addCapture` method. See also `removeCapture` and `clearCaptures`.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#captures\r\n * @type {integer[]}\r\n * @since 3.16.0\r\n */\r\n this.captures = [];\r\n\r\n /**\r\n * A boolean that controls if the Keyboard Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Keyboard Event target, as defined in the Game Config.\r\n * Typically the window in which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#target\r\n * @type {any}\r\n * @since 3.16.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Key Down Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyDown\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyDown = NOOP;\r\n\r\n /**\r\n * The Key Up Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyUp\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyUp = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Keyboard Manager boot process.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#boot\r\n * @private\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputKeyboard;\r\n this.target = config.inputKeyboardEventTarget;\r\n\r\n this.addCapture(config.inputKeyboardCapture);\r\n\r\n if (!this.target && window)\r\n {\r\n this.target = window;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.manager.game.events.on(GameEvents.POST_STEP, this.postUpdate, this);\r\n },\r\n\r\n /**\r\n * Starts the Keyboard Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n\r\n this.onKeyDown = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n this.onKeyUp = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (target)\r\n {\r\n target.addEventListener('keydown', this.onKeyDown, false);\r\n target.addEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Key Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('keydown', this.onKeyDown, false);\r\n target.removeEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Clears the event queue.\r\n * Called automatically by the Input Manager.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#postUpdate\r\n * @private\r\n * @since 3.16.0\r\n */\r\n postUpdate: function ()\r\n {\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser\r\n * and cause the default browser behavior.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are active captures after calling this method, the `preventDefault` property is set to `true`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable capture for, preventing them reaching the browser.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.trim().toUpperCase()];\r\n }\r\n\r\n if (captures.indexOf(code) === -1)\r\n {\r\n captures.push(code);\r\n }\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are no captures left after calling this method, the `preventDefault` property is set to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable capture for, allowing them reaching the browser again.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.toUpperCase()];\r\n }\r\n\r\n ArrayRemove(captures, code);\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures and sets the `preventDefault` property to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#clearCaptures\r\n * @since 3.16.0\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.captures = [];\r\n\r\n this.preventDefault = false;\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Manager instance.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.clearCaptures();\r\n\r\n this.queue = [];\r\n\r\n this.manager.game.events.off(GameEvents.POST_RENDER, this.postUpdate, this);\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyboardManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardManager.js?")},"./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar Key = __webpack_require__(/*! ./keys/Key */ \"./node_modules/phaser/src/input/keyboard/keys/Key.js\");\r\nvar KeyCodes = __webpack_require__(/*! ./keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar KeyCombo = __webpack_require__(/*! ./combo/KeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js\");\r\nvar KeyMap = __webpack_require__(/*! ./keys/KeyMap */ \"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then process them.\r\n * \r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n * \r\n * You can access it from within a Scene using `this.input.keyboard`. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.on('keydown', callback, context);\r\n * ```\r\n *\r\n * Or, to listen for a specific key:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.on('keydown-A', callback, context);\r\n * ```\r\n *\r\n * You can also create Key objects, which you can then poll in your game loop:\r\n *\r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * ```\r\n * \r\n * If you have multiple parallel Scenes, each trying to get keyboard input, be sure to disable capture on them to stop them from\r\n * stealing input from another Scene in the list. You can do this with `this.input.keyboard.enabled = false` within the\r\n * Scene to stop all input, or `this.input.keyboard.preventDefault = false` to stop a Scene halting input on another Scene.\r\n *\r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.\r\n *\r\n * Also please be aware that certain browser extensions can disable or override Phaser keyboard handling.\r\n * For example the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * And there are others. So, please check your extensions before opening Phaser issues about keys that don't work.\r\n *\r\n * @class KeyboardPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar KeyboardPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function KeyboardPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the core game, so we can listen for visibility events.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#game\r\n * @type {Phaser.Game}\r\n * @since 3.16.0\r\n */\r\n this.game = sceneInputPlugin.systems.game;\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A reference to the global Keyboard Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#manager\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.16.0\r\n */\r\n this.manager = sceneInputPlugin.manager.keyboard;\r\n\r\n /**\r\n * A boolean that controls if this Keyboard Plugin is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of Key objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#keys\r\n * @type {Phaser.Input.Keyboard.Key[]}\r\n * @since 3.10.0\r\n */\r\n this.keys = [];\r\n\r\n /**\r\n * An array of KeyCombo objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#combos\r\n * @type {Phaser.Input.Keyboard.KeyCombo[]}\r\n * @since 3.10.0\r\n */\r\n this.combos = [];\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var settings = this.settings.input;\r\n\r\n this.enabled = GetValue(settings, 'keyboard', true);\r\n\r\n var captures = GetValue(settings, 'keyboard.capture', null);\r\n\r\n if (captures)\r\n {\r\n this.addCaptures(captures);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.on(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.game.events.on(GameEvents.BLUR, this.resetKeys, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard events for specific keys, so they don't bubble up the browser\r\n * and cause the default behaviors.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n this.manager.addCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n this.manager.removeCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns an array that contains all of the keyboard captures currently enabled.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#getCaptures\r\n * @since 3.16.0\r\n * \r\n * @return {integer[]} An array of all the currently capturing key codes.\r\n */\r\n getCaptures: function ()\r\n {\r\n return this.manager.captures;\r\n },\r\n\r\n /**\r\n * Allows Phaser to prevent any key captures you may have defined from bubbling up the browser.\r\n * You can use this to re-enable event capturing if you had paused it via `disableGlobalCapture`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n enableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disables Phaser from preventing any key captures you may have defined, without actually removing them.\r\n * You can use this to temporarily disable event capturing if, for example, you swap to a DOM element.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n disableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures.\r\n * \r\n * Note that this is a global change. It will clear all event captures across your game, not just for this specific Scene.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.manager.clearCaptures();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also Space Bar and shift.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCursorKeys\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Types.Input.Keyboard.CursorKeys} An object containing the properties: `up`, `down`, `left`, `right`, `space` and `shift`.\r\n */\r\n createCursorKeys: function ()\r\n {\r\n return this.addKeys({\r\n up: KeyCodes.UP,\r\n down: KeyCodes.DOWN,\r\n left: KeyCodes.LEFT,\r\n right: KeyCodes.RIGHT,\r\n space: KeyCodes.SPACE,\r\n shift: KeyCodes.SHIFT\r\n });\r\n },\r\n\r\n /**\r\n * A practical way to create an object containing user selected hotkeys.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S });\r\n * ```\r\n * \r\n * would return an object containing the properties (`up` and `down`) mapped to W and S {@link Phaser.Input.Keyboard.Key} objects.\r\n *\r\n * You can also pass in a comma-separated string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addKeys('W,S,A,D');\r\n * ```\r\n *\r\n * Which will return an object with the properties W, S, A and D mapped to the relevant Key objects.\r\n *\r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKeys\r\n * @since 3.10.0\r\n *\r\n * @param {(object|string)} keys - An object containing Key Codes, or a comma-separated string.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {object} An object containing Key objects mapped to the input properties.\r\n */\r\n addKeys: function (keys, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var output = {};\r\n\r\n if (typeof keys === 'string')\r\n {\r\n keys = keys.split(',');\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var currentKey = keys[i].trim();\r\n\r\n if (currentKey)\r\n {\r\n output[currentKey] = this.addKey(currentKey, enableCapture, emitOnRepeat);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (var key in keys)\r\n {\r\n output[key] = this.addKey(keys[key], enableCapture, emitOnRepeat);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Adds a Key object to this Keyboard Plugin.\r\n *\r\n * The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {Phaser.Input.Keyboard.Key} The newly created Key object, or a reference to it if it already existed in the keys array.\r\n */\r\n addKey: function (key, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var keys = this.keys;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n keys[idx] = key;\r\n }\r\n else\r\n {\r\n keys[key.keyCode] = key;\r\n }\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key.keyCode);\r\n }\r\n\r\n key.setEmitOnRepeat(emitOnRepeat);\r\n\r\n return key;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (!keys[key])\r\n {\r\n keys[key] = new Key(this, key);\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key);\r\n }\r\n\r\n keys[key].setEmitOnRepeat(emitOnRepeat);\r\n }\r\n\r\n return keys[key];\r\n },\r\n\r\n /**\r\n * Removes a Key object from this Keyboard Plugin.\r\n *\r\n * The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object?\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeKey: function (key, destroy)\r\n {\r\n if (destroy === undefined) { destroy = false; }\r\n\r\n var keys = this.keys;\r\n var ref;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n ref = this.keys[idx];\r\n\r\n this.keys[idx] = undefined;\r\n }\r\n }\r\n else if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (keys[key])\r\n {\r\n ref = keys[key];\r\n\r\n keys[key] = undefined;\r\n }\r\n\r\n if (ref)\r\n {\r\n ref.plugin = null;\r\n\r\n if (destroy)\r\n {\r\n ref.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new KeyCombo.\r\n * \r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from this Keyboard Plugin.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCombo\r\n * @since 3.10.0\r\n *\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The new KeyCombo object.\r\n */\r\n createCombo: function (keys, config)\r\n {\r\n return new KeyCombo(this, keys, config);\r\n },\r\n\r\n /**\r\n * Checks if the given Key object is currently being held down.\r\n * \r\n * The difference between this method and checking the `Key.isDown` property directly is that you can provide\r\n * a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted\r\n * it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it\r\n * will only return `true` every 100ms.\r\n * \r\n * If the Keyboard Plugin has been disabled, this method will always return `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#checkDown\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - A Key object.\r\n * @param {number} [duration=0] - The duration which must have elapsed before this Key is considered as being down.\r\n * \r\n * @return {boolean} `true` if the Key is down within the duration specified, otherwise `false`.\r\n */\r\n checkDown: function (key, duration)\r\n {\r\n if (this.enabled && key.isDown)\r\n {\r\n var t = SnapFloor(this.time - key.timeDown, duration);\r\n\r\n if (t > key._tick)\r\n {\r\n key._tick = t;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler called by the Input Plugin, which is in turn invoked by the Game step.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#update\r\n * @private\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n var queue = this.manager.queue;\r\n var len = queue.length;\r\n\r\n if (!this.isActive() || len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var keys = this.keys;\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var code = event.keyCode;\r\n var key = keys[code];\r\n var repeat = false;\r\n\r\n // Override the default functions (it's too late for the browser to use them anyway, so we may as well)\r\n if (event.cancelled === undefined)\r\n {\r\n // Event allowed to flow across all handlers in this Scene, and any other Scene in the Scene list\r\n event.cancelled = 0;\r\n\r\n // Won't reach any more local (Scene level) handlers\r\n event.stopImmediatePropagation = function ()\r\n {\r\n event.cancelled = 1;\r\n };\r\n \r\n // Won't reach any more handlers in any Scene further down the Scene list\r\n event.stopPropagation = function ()\r\n {\r\n event.cancelled = -1;\r\n };\r\n }\r\n\r\n if (event.cancelled === -1)\r\n {\r\n // This event has been stopped from broadcasting to any other Scene, so abort.\r\n continue;\r\n }\r\n\r\n if (event.type === 'keydown')\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n repeat = key.isDown;\r\n\r\n key.onDown(event);\r\n }\r\n\r\n if (!event.cancelled && (!key || !repeat))\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_DOWN + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keydown_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_DOWN, event);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n key.onUp(event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_UP + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keyup_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_UP, event);\r\n }\r\n }\r\n }\r\n\r\n // Reset the cancel state for other Scenes to use\r\n if (event.cancelled === 1)\r\n {\r\n event.cancelled = 0;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets all Key objects created by _this_ Keyboard Plugin back to their default un-pressed states.\r\n * This can only reset keys created via the `addKey`, `addKeys` or `createCursorKeys` methods.\r\n * If you have created a Key object directly you'll need to reset it yourself.\r\n * \r\n * This method is called automatically when the Keyboard Plugin shuts down, but can be\r\n * invoked directly at any time you require.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys\r\n * @since 3.15.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n resetKeys: function ()\r\n {\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].reset();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuts this Keyboard Plugin down. This performs the following tasks:\r\n * \r\n * 1 - Resets all keys created by this Keyboard plugin.\r\n * 2 - Stops and removes the keyboard event listeners.\r\n * 3 - Clears out any pending requests in the queue, without processing them.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.resetKeys();\r\n\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.off(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.game.events.off(GameEvents.BLUR, this.resetKeys);\r\n\r\n this.removeAllListeners();\r\n\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Plugin instance and all references it holds, plus clears out local arrays.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].destroy();\r\n }\r\n }\r\n\r\n this.keys = [];\r\n this.combos = [];\r\n this.queue = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.manager = null;\r\n },\r\n\r\n /**\r\n * Internal time value.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#time\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return this.sceneInputPlugin.manager.time;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property.\r\n * Use this to create Key objects and listen for keyboard specific events.\r\n *\r\n * @name Phaser.Input.InputPlugin#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('KeyboardPlugin', KeyboardPlugin, 'keyboard', 'keyboard', 'inputKeyboard');\r\n\r\nmodule.exports = KeyboardPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js?")},"./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n * Return `true` if it reached the end of the combo, `false` if not.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.AdvanceKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to advance.\r\n *\r\n * @return {boolean} `true` if it reached the end of the combo, `false` if not.\r\n */\r\nvar AdvanceKeyCombo = function (event, combo)\r\n{\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.index++;\r\n\r\n if (combo.index === combo.size)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n combo.current = combo.keyCodes[combo.index];\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = AdvanceKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ProcessKeyCombo = __webpack_require__(/*! ./ProcessKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js\");\r\nvar ResetKeyCombo = __webpack_require__(/*! ./ResetKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from the Keyboard Manager.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @class KeyCombo\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @listens Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} keyboardPlugin - A reference to the Keyboard Plugin.\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n */\r\nvar KeyCombo = new Class({\r\n\r\n initialize:\r\n\r\n function KeyCombo (keyboardPlugin, keys, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n // Can't have a zero or single length combo (string or array based)\r\n if (keys.length < 2)\r\n {\r\n return false;\r\n }\r\n\r\n /**\r\n * A reference to the Keyboard Manager\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#manager\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = keyboardPlugin;\r\n\r\n /**\r\n * A flag that controls if this Key Combo is actively processing keys or not.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of the keycodes that comprise this combo.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#keyCodes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.keyCodes = [];\r\n\r\n // if 'keys' is a string we need to get the keycode of each character in it\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var char = keys[i];\r\n\r\n if (typeof char === 'string')\r\n {\r\n this.keyCodes.push(char.toUpperCase().charCodeAt(0));\r\n }\r\n else if (typeof char === 'number')\r\n {\r\n this.keyCodes.push(char);\r\n }\r\n else if (char.hasOwnProperty('keyCode'))\r\n {\r\n this.keyCodes.push(char.keyCode);\r\n }\r\n }\r\n\r\n /**\r\n * The current keyCode the combo is waiting for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#current\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.current = this.keyCodes[0];\r\n\r\n /**\r\n * The current index of the key being waited for in the 'keys' string.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#index\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.index = 0;\r\n\r\n /**\r\n * The length of this combo (in keycodes)\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#size\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.size = this.keyCodes.length;\r\n\r\n /**\r\n * The time the previous key in the combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeLastMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeLastMatched = 0;\r\n\r\n /**\r\n * Has this Key Combo been matched yet?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#matched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.matched = false;\r\n\r\n /**\r\n * The time the entire combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeMatched = 0;\r\n\r\n /**\r\n * If they press the wrong key do we reset the combo?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnWrongKey\r\n * @type {boolean}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.resetOnWrongKey = GetFastValue(config, 'resetOnWrongKey', true);\r\n\r\n /**\r\n * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#maxKeyDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxKeyDelay = GetFastValue(config, 'maxKeyDelay', 0);\r\n\r\n /**\r\n * If previously matched and they press the first key of the combo again, will it reset?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.resetOnMatch = GetFastValue(config, 'resetOnMatch', false);\r\n\r\n /**\r\n * If the combo matches, will it delete itself?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#deleteOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.deleteOnMatch = GetFastValue(config, 'deleteOnMatch', false);\r\n\r\n var _this = this;\r\n\r\n var onKeyDownHandler = function (event)\r\n {\r\n if (_this.matched || !_this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n var matched = ProcessKeyCombo(event, _this);\r\n\r\n if (matched)\r\n {\r\n _this.manager.emit(Events.COMBO_MATCH, _this, event);\r\n\r\n if (_this.resetOnMatch)\r\n {\r\n ResetKeyCombo(_this);\r\n }\r\n else if (_this.deleteOnMatch)\r\n {\r\n _this.destroy();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * The internal Key Down handler.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#onKeyDown\r\n * @private\r\n * @type {KeyboardKeydownCallback}\r\n * @fires Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n */\r\n this.onKeyDown = onKeyDownHandler;\r\n\r\n this.manager.on(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n },\r\n\r\n /**\r\n * How far complete is this combo? A value between 0 and 1.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#progress\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n progress: {\r\n\r\n get: function ()\r\n {\r\n return this.index / this.size;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Destroys this Key Combo and all of its references.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyCombo#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enabled = false;\r\n this.keyCodes = [];\r\n\r\n this.manager.off(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AdvanceKeyCombo = __webpack_require__(/*! ./AdvanceKeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js");\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ProcessKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to be processed.\r\n *\r\n * @return {boolean} `true` if the combo was matched, otherwise `false`.\r\n */\r\nvar ProcessKeyCombo = function (event, combo)\r\n{\r\n if (combo.matched)\r\n {\r\n return true;\r\n }\r\n\r\n var comboMatched = false;\r\n var keyMatched = false;\r\n\r\n if (event.keyCode === combo.current)\r\n {\r\n // Key was correct\r\n\r\n if (combo.index > 0 && combo.maxKeyDelay > 0)\r\n {\r\n // We have to check to see if the delay between\r\n // the new key and the old one was too long (if enabled)\r\n\r\n var timeLimit = combo.timeLastMatched + combo.maxKeyDelay;\r\n\r\n // Check if they pressed it in time or not\r\n if (event.timeStamp <= timeLimit)\r\n {\r\n keyMatched = true;\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n else\r\n {\r\n keyMatched = true;\r\n\r\n // We don\'t check the time for the first key pressed, so just advance it\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n\r\n if (!keyMatched && combo.resetOnWrongKey)\r\n {\r\n // Wrong key was pressed\r\n combo.index = 0;\r\n combo.current = combo.keyCodes[0];\r\n }\r\n\r\n if (comboMatched)\r\n {\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.matched = true;\r\n combo.timeMatched = event.timeStamp;\r\n }\r\n\r\n return comboMatched;\r\n};\r\n\r\nmodule.exports = ProcessKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js?')},"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ResetKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo to reset.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The KeyCombo.\r\n */\r\nvar ResetKeyCombo = function (combo)\r\n{\r\n combo.current = combo.keyCodes[0];\r\n combo.index = 0;\r\n combo.timeLastMatched = 0;\r\n combo.matched = false;\r\n combo.timeMatched = 0;\r\n\r\n return combo;\r\n};\r\n\r\nmodule.exports = ResetKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`.\r\n * \r\n * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`.\r\n * \r\n * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Combo Match Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched.\r\n * \r\n * Listen for this event from the Key Plugin after a combo has been created:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * @event Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.KeyCombo} keycombo - The Key Combo object that was matched.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event of the final key in the combo. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'keycombomatch';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('down', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was pressed.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed\r\n * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keydown-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released\r\n * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keyup-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('up', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was released.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ANY_KEY_DOWN: __webpack_require__(/*! ./ANY_KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js"),\r\n ANY_KEY_UP: __webpack_require__(/*! ./ANY_KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js"),\r\n COMBO_MATCH: __webpack_require__(/*! ./COMBO_MATCH_EVENT */ "./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js"),\r\n DOWN: __webpack_require__(/*! ./DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js"),\r\n KEY_DOWN: __webpack_require__(/*! ./KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js"),\r\n KEY_UP: __webpack_require__(/*! ./KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js"),\r\n UP: __webpack_require__(/*! ./UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/index.js?')},"./node_modules/phaser/src/input/keyboard/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/keyboard/events/index.js"),\r\n\r\n KeyboardManager: __webpack_require__(/*! ./KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js"),\r\n KeyboardPlugin: __webpack_require__(/*! ./KeyboardPlugin */ "./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js"),\r\n\r\n Key: __webpack_require__(/*! ./keys/Key */ "./node_modules/phaser/src/input/keyboard/keys/Key.js"),\r\n KeyCodes: __webpack_require__(/*! ./keys/KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js"),\r\n\r\n KeyCombo: __webpack_require__(/*! ./combo/KeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js"),\r\n\r\n JustDown: __webpack_require__(/*! ./keys/JustDown */ "./node_modules/phaser/src/input/keyboard/keys/JustDown.js"),\r\n JustUp: __webpack_require__(/*! ./keys/JustUp */ "./node_modules/phaser/src/input/keyboard/keys/JustUp.js"),\r\n DownDuration: __webpack_require__(/*! ./keys/DownDuration */ "./node_modules/phaser/src/input/keyboard/keys/DownDuration.js"),\r\n UpDuration: __webpack_require__(/*! ./keys/UpDuration */ "./node_modules/phaser/src/input/keyboard/keys/UpDuration.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/index.js?')},"./node_modules/phaser/src/input/keyboard/keys/DownDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was pressed down within the `duration` value given, based on the current\r\n * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.DownDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been pressed down.\r\n *\r\n * @return {boolean} `true` if the Key was pressed down within `duration` ms ago, otherwise `false`.\r\n */\r\nvar DownDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeDown;\r\n\r\n return (key.isDown && current < duration);\r\n};\r\n\r\nmodule.exports = DownDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/DownDuration.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justDown value allows you to test if this Key has just been pressed down or not.\r\n * \r\n * When you check this value it will return `true` if the Key is down, otherwise `false`.\r\n * \r\n * You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.\r\n * This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustDown\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just down or not.\r\n *\r\n * @return {boolean} `true` if the Key was just pressed, otherwise `false`.\r\n */\r\nvar JustDown = function (key)\r\n{\r\n if (key._justDown)\r\n {\r\n key._justDown = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustDown.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justUp value allows you to test if this Key has just been released or not.\r\n * \r\n * When you check this value it will return `true` if the Key is up, otherwise `false`.\r\n * \r\n * You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again.\r\n * This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustUp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just up or not.\r\n *\r\n * @return {boolean} `true` if the Key was just released, otherwise `false`.\r\n */\r\nvar JustUp = function (key)\r\n{\r\n if (key._justUp)\r\n {\r\n key._justUp = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustUp.js?")},"./node_modules/phaser/src/input/keyboard/keys/Key.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/input/keyboard/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A generic Key object which can be passed to the Process functions (and so on)\r\n * keycode must be an integer\r\n *\r\n * @class Key\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} plugin - The Keyboard Plugin instance that owns this Key object.\r\n * @param {integer} keyCode - The keycode of this key.\r\n */\r\nvar Key = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Key (plugin, keyCode)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Keyboard Plugin instance that owns this Key object.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#plugin\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.17.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The keycode of this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#keyCode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.keyCode = keyCode;\r\n\r\n /**\r\n * The original DOM event.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#originalEvent\r\n * @type {KeyboardEvent}\r\n * @since 3.0.0\r\n */\r\n this.originalEvent = undefined;\r\n\r\n /**\r\n * Can this Key be processed?\r\n *\r\n * @name Phaser.Input.Keyboard.Key#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isUp\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isUp = true;\r\n\r\n /**\r\n * The down state of the ALT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#altKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.altKey = false;\r\n\r\n /**\r\n * The down state of the CTRL key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#ctrlKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.ctrlKey = false;\r\n\r\n /**\r\n * The down state of the SHIFT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#shiftKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shiftKey = false;\r\n\r\n /**\r\n * The down state of the Meta key, if pressed at the same time as this key.\r\n * On a Mac the Meta Key is the Command key. On Windows keyboards, it\'s the Windows key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#metaKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.metaKey = false;\r\n\r\n /**\r\n * The location of the modifier key. 0 for standard (or unknown), 1 for left, 2 for right, 3 for numpad.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#location\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.location = 0;\r\n\r\n /**\r\n * The timestamp when the key was last pressed down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeDown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeDown = 0;\r\n\r\n /**\r\n * The number of milliseconds this key was held down for in the previous down - up sequence.\r\n * This value isn\'t updated every game step, only when the Key changes state.\r\n * To get the current duration use the `getDuration` method.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The timestamp when the key was last released.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeUp\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeUp = 0;\r\n\r\n /**\r\n * When a key is held down should it continuously fire the `down` event each time it repeats?\r\n * \r\n * By default it will emit the `down` event just once, but if you wish to receive the event\r\n * for each repeat as well, enable this property.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#emitOnRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.emitOnRepeat = false;\r\n\r\n /**\r\n * If a key is held down this holds down the number of times the key has \'repeated\'.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#repeats\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeats = 0;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justDown\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justDown = false;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justUp\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justUp = false;\r\n\r\n /**\r\n * Internal tick counter.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_tick\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._tick = -1;\r\n },\r\n\r\n /**\r\n * Controls if this Key will continuously emit a `down` event while being held down (true),\r\n * or emit the event just once, on first press, and then skip future events (false).\r\n *\r\n * @method Phaser.Input.Keyboard.Key#setEmitOnRepeat\r\n * @since 3.16.0\r\n * \r\n * @param {boolean} value - Emit `down` events on repeated key down actions, or just once?\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n setEmitOnRepeat: function (value)\r\n {\r\n this.emitOnRepeat = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Processes the Key Down action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onDown\r\n * @fires Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onDown: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.altKey = event.altKey;\r\n this.ctrlKey = event.ctrlKey;\r\n this.shiftKey = event.shiftKey;\r\n this.metaKey = event.metaKey;\r\n this.location = event.location;\r\n \r\n this.repeats++;\r\n\r\n if (!this.isDown)\r\n {\r\n this.isDown = true;\r\n this.isUp = false;\r\n this.timeDown = event.timeStamp;\r\n this.duration = 0;\r\n this._justDown = true;\r\n this._justUp = false;\r\n\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n else if (this.emitOnRepeat)\r\n {\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the Key Up action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onUp\r\n * @fires Phaser.Input.Keyboard.Events#UP\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onUp: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n \r\n this.isDown = false;\r\n this.isUp = true;\r\n this.timeUp = event.timeStamp;\r\n this.duration = this.timeUp - this.timeDown;\r\n this.repeats = 0;\r\n \r\n this._justDown = false;\r\n this._justUp = true;\r\n this._tick = -1;\r\n \r\n this.emit(Events.UP, this, event);\r\n },\r\n\r\n /**\r\n * Resets this Key object back to its default un-pressed state.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#reset\r\n * @since 3.6.0\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n reset: function ()\r\n {\r\n this.preventDefault = true;\r\n this.enabled = true;\r\n this.isDown = false;\r\n this.isUp = true;\r\n this.altKey = false;\r\n this.ctrlKey = false;\r\n this.shiftKey = false;\r\n this.metaKey = false;\r\n this.timeDown = 0;\r\n this.duration = 0;\r\n this.timeUp = 0;\r\n this.repeats = 0;\r\n this._justDown = false;\r\n this._justUp = false;\r\n this._tick = -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the duration, in ms, that the Key has been held down for.\r\n * \r\n * If the key is not currently down it will return zero.\r\n * \r\n * The get the duration the Key was held down for in the previous up-down cycle,\r\n * use the `Key.duration` property value instead.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#getDuration\r\n * @since 3.17.0\r\n * \r\n * @return {number} The duration, in ms, that the Key has been held down for if currently down.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.plugin.game.loop.time - this.timeDown);\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Removes any bound event handlers and removes local references.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.originalEvent = null;\r\n\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Key;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/Key.js?')},"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Keyboard Codes.\r\n *\r\n * @namespace Phaser.Input.Keyboard.KeyCodes\r\n * @memberof Phaser.Input.Keyboard\r\n * @since 3.0.0\r\n */\r\n\r\nvar KeyCodes = {\r\n\r\n /**\r\n * The BACKSPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKSPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKSPACE: 8,\r\n\r\n /**\r\n * The TAB key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TAB\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TAB: 9,\r\n\r\n /**\r\n * The ENTER key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ENTER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ENTER: 13,\r\n\r\n /**\r\n * The SHIFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SHIFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHIFT: 16,\r\n\r\n /**\r\n * The CTRL key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CTRL\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CTRL: 17,\r\n\r\n /**\r\n * The ALT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ALT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ALT: 18,\r\n\r\n /**\r\n * The PAUSE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAUSE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSE: 19,\r\n\r\n /**\r\n * The CAPS_LOCK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CAPS_LOCK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CAPS_LOCK: 20,\r\n\r\n /**\r\n * The ESC key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ESC\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ESC: 27,\r\n\r\n /**\r\n * The SPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SPACE: 32,\r\n\r\n /**\r\n * The PAGE_UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_UP: 33,\r\n\r\n /**\r\n * The PAGE_DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_DOWN: 34,\r\n\r\n /**\r\n * The END key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.END\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n END: 35,\r\n\r\n /**\r\n * The HOME key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.HOME\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOME: 36,\r\n\r\n /**\r\n * The LEFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.LEFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 37,\r\n\r\n /**\r\n * The UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 38,\r\n\r\n /**\r\n * The RIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.RIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 39,\r\n\r\n /**\r\n * The DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 40,\r\n\r\n /**\r\n * The PRINT_SCREEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PRINT_SCREEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PRINT_SCREEN: 42,\r\n\r\n /**\r\n * The INSERT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.INSERT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INSERT: 45,\r\n\r\n /**\r\n * The DELETE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DELETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELETE: 46,\r\n\r\n /**\r\n * The ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ZERO: 48,\r\n\r\n /**\r\n * The ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ONE: 49,\r\n\r\n /**\r\n * The TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TWO: 50,\r\n\r\n /**\r\n * The THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n THREE: 51,\r\n\r\n /**\r\n * The FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOUR: 52,\r\n\r\n /**\r\n * The FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FIVE: 53,\r\n\r\n /**\r\n * The SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SIX: 54,\r\n\r\n /**\r\n * The SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEVEN: 55,\r\n\r\n /**\r\n * The EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n EIGHT: 56,\r\n\r\n /**\r\n * The NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NINE: 57,\r\n\r\n /**\r\n * The NUMPAD_ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ZERO: 96,\r\n\r\n /**\r\n * The NUMPAD_ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ONE: 97,\r\n\r\n /**\r\n * The NUMPAD_TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_TWO: 98,\r\n\r\n /**\r\n * The NUMPAD_THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_THREE: 99,\r\n\r\n /**\r\n * The NUMPAD_FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FOUR: 100,\r\n\r\n /**\r\n * The NUMPAD_FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FIVE: 101,\r\n\r\n /**\r\n * The NUMPAD_SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SIX: 102,\r\n\r\n /**\r\n * The NUMPAD_SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SEVEN: 103,\r\n\r\n /**\r\n * The NUMPAD_EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_EIGHT: 104,\r\n\r\n /**\r\n * The NUMPAD_NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_NINE: 105,\r\n\r\n /**\r\n * The A key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.A\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n A: 65,\r\n\r\n /**\r\n * The B key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.B\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n B: 66,\r\n\r\n /**\r\n * The C key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.C\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n C: 67,\r\n\r\n /**\r\n * The D key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.D\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n D: 68,\r\n\r\n /**\r\n * The E key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.E\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n E: 69,\r\n\r\n /**\r\n * The F key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F: 70,\r\n\r\n /**\r\n * The G key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.G\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n G: 71,\r\n\r\n /**\r\n * The H key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.H\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n H: 72,\r\n\r\n /**\r\n * The I key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.I\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n I: 73,\r\n\r\n /**\r\n * The J key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.J\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n J: 74,\r\n\r\n /**\r\n * The K key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.K\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n K: 75,\r\n\r\n /**\r\n * The L key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.L\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n L: 76,\r\n\r\n /**\r\n * The M key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.M\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n M: 77,\r\n\r\n /**\r\n * The N key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.N\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n N: 78,\r\n\r\n /**\r\n * The O key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.O\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n O: 79,\r\n\r\n /**\r\n * The P key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.P\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n P: 80,\r\n\r\n /**\r\n * The Q key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Q\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Q: 81,\r\n\r\n /**\r\n * The R key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.R\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n R: 82,\r\n\r\n /**\r\n * The S key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.S\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n S: 83,\r\n\r\n /**\r\n * The T key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.T\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n T: 84,\r\n\r\n /**\r\n * The U key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.U\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n U: 85,\r\n\r\n /**\r\n * The V key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.V\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n V: 86,\r\n\r\n /**\r\n * The W key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.W\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n W: 87,\r\n\r\n /**\r\n * The X key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.X\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n X: 88,\r\n\r\n /**\r\n * The Y key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Y: 89,\r\n\r\n /**\r\n * The Z key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Z\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Z: 90,\r\n\r\n /**\r\n * The F1 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F1\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F1: 112,\r\n\r\n /**\r\n * The F2 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F2\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F2: 113,\r\n\r\n /**\r\n * The F3 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F3\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F3: 114,\r\n\r\n /**\r\n * The F4 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F4\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F4: 115,\r\n\r\n /**\r\n * The F5 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F5\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F5: 116,\r\n\r\n /**\r\n * The F6 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F6\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F6: 117,\r\n\r\n /**\r\n * The F7 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F7\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F7: 118,\r\n\r\n /**\r\n * The F8 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F8\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F8: 119,\r\n\r\n /**\r\n * The F9 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F9\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F9: 120,\r\n\r\n /**\r\n * The F10 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F10\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F10: 121,\r\n\r\n /**\r\n * The F11 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F11\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F11: 122,\r\n\r\n /**\r\n * The F12 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F12\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F12: 123,\r\n\r\n /**\r\n * The SEMICOLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON: 186,\r\n\r\n /**\r\n * The PLUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PLUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLUS: 187,\r\n\r\n /**\r\n * The COMMA key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA: 188,\r\n\r\n /**\r\n * The MINUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.MINUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n MINUS: 189,\r\n\r\n /**\r\n * The PERIOD key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PERIOD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PERIOD: 190,\r\n\r\n /**\r\n * The FORWARD_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FORWARD_SLASH: 191,\r\n\r\n /**\r\n * The BACK_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACK_SLASH: 220,\r\n\r\n /**\r\n * The QUOTES key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.QUOTES\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n QUOTES: 222,\r\n\r\n /**\r\n * The BACKTICK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKTICK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKTICK: 192,\r\n\r\n /**\r\n * The OPEN_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.OPEN_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OPEN_BRACKET: 219,\r\n\r\n /**\r\n * The CLOSED_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CLOSED_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CLOSED_BRACKET: 221,\r\n\r\n /**\r\n * The SEMICOLON_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON_FIREFOX: 59,\r\n\r\n /**\r\n * The COLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COLON: 58,\r\n\r\n /**\r\n * The COMMA_FIREFOX_WINDOWS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX_WINDOWS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX_WINDOWS: 60,\r\n\r\n /**\r\n * The COMMA_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX: 62,\r\n\r\n /**\r\n * The BRACKET_RIGHT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_RIGHT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_RIGHT_FIREFOX: 174,\r\n\r\n /**\r\n * The BRACKET_LEFT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_LEFT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_LEFT_FIREFOX: 175\r\n};\r\n\r\nmodule.exports = KeyCodes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js?")},"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar KeyCodes = __webpack_require__(/*! ./KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js");\r\n\r\nvar KeyMap = {};\r\n\r\nfor (var key in KeyCodes)\r\n{\r\n KeyMap[KeyCodes[key]] = key;\r\n}\r\n\r\nmodule.exports = KeyMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyMap.js?')},"./node_modules/phaser/src/input/keyboard/keys/UpDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was released within the `duration` value given, based on the current\r\n * game clock time. Or returns `false` if it either isn't up, or was released longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.UpDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been released.\r\n *\r\n * @return {boolean} `true` if the Key was released within `duration` ms ago, otherwise `false`.\r\n */\r\nvar UpDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeUp;\r\n\r\n return (key.isUp && current < duration);\r\n};\r\n\r\nmodule.exports = UpDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/UpDuration.js?")},"./node_modules/phaser/src/input/mouse/MouseManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Features = __webpack_require__(/*! ../../device/Features */ \"./node_modules/phaser/src/device/Features.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\r\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n\r\n/**\r\n * @classdesc\r\n * The Mouse Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class MouseManager\r\n * @memberof Phaser.Input.Mouse\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar MouseManager = new Class({\r\n\r\n initialize:\r\n\r\n function MouseManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Mouse Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * If the mouse has been pointer locked successfully this will be set to true.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#locked\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The Mouse Move Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseMove\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseMove = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDown\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseDown = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUp\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseUp = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDownWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseDownWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUpWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseUpWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Over Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOver = NOOP;\r\n\r\n /**\r\n * The Mouse Out Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOut = NOOP;\r\n\r\n /**\r\n * The Mouse Wheel Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseWheel\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onMouseWheel = NOOP;\r\n\r\n /**\r\n * Internal pointerLockChange handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#pointerLockChange\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.pointerLockChange = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputMouse;\r\n this.target = config.inputMouseEventTarget;\r\n this.capture = config.inputMouseCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (config.disableContextMenu)\r\n {\r\n this.disableContextMenu();\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to disable the context menu from appearing if you right-click on the browser.\r\n * \r\n * Works by listening for the `contextmenu` event and prevent defaulting it.\r\n * \r\n * Use this if you need to enable right-button mouse support in your game, and the browser\r\n * menu keeps getting in the way.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#disableContextMenu\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance.\r\n */\r\n disableContextMenu: function ()\r\n {\r\n document.body.addEventListener('contextmenu', function (event)\r\n {\r\n event.preventDefault();\r\n return false;\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If the browser supports it, you can request that the pointer be locked to the browser window.\r\n *\r\n * This is classically known as 'FPS controls', where the pointer can't leave the browser until\r\n * the user presses an exit key.\r\n *\r\n * If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched,\r\n * from the games Input Manager, with an `isPointerLocked` property.\r\n *\r\n * It is important to note that pointer lock can only be enabled after an 'engagement gesture',\r\n * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#requestPointerLock\r\n * @since 3.0.0\r\n */\r\n requestPointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n var element = this.target;\r\n\r\n element.requestPointerLock = element.requestPointerLock || element.mozRequestPointerLock || element.webkitRequestPointerLock;\r\n\r\n element.requestPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * If the browser supports pointer lock, this will request that the pointer lock is released. If\r\n * the browser successfully enters a locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be\r\n * dispatched - from the game's input manager - with an `isPointerLocked` property.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#releasePointerLock\r\n * @since 3.0.0\r\n */\r\n releasePointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\r\n document.exitPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Mouse Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onMouseMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDown = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseDown(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDownWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseDown(event);\r\n }\r\n };\r\n\r\n this.onMouseUp = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseUp(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseUpWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseUp(event);\r\n }\r\n };\r\n\r\n this.onMouseOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onMouseOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n this.onMouseWheel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseWheel(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('mousemove', this.onMouseMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mousedown', this.onMouseDown, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseup', this.onMouseUp, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseover', this.onMouseOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseout', this.onMouseOut, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('wheel', this.onMouseWheel, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive);\r\n window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n this.pointerLockChange = function (event)\r\n {\r\n var element = _this.target;\r\n\r\n _this.locked = (document.pointerLockElement === element || document.mozPointerLockElement === element || document.webkitPointerLockElement === element) ? true : false;\r\n\r\n _this.manager.onPointerLockChange(event);\r\n };\r\n\r\n document.addEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Mouse Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('mousemove', this.onMouseMove);\r\n target.removeEventListener('mousedown', this.onMouseDown);\r\n target.removeEventListener('mouseup', this.onMouseUp);\r\n target.removeEventListener('mouseover', this.onMouseOver);\r\n target.removeEventListener('mouseout', this.onMouseOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('mousedown', this.onMouseDownWindow);\r\n window.removeEventListener('mouseup', this.onMouseUpWindow);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n document.removeEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Mouse Manager instance.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MouseManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/MouseManager.js?")},"./node_modules/phaser/src/input/mouse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Mouse\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n MouseManager: __webpack_require__(/*! ./MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/index.js?')},"./node_modules/phaser/src/input/touch/TouchManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Touch_events\r\n// https://patrickhlauke.github.io/touch/tests/results/\r\n// https://www.html5rocks.com/en/mobile/touch/\r\n\r\n/**\r\n * @classdesc\r\n * The Touch Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Touch Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class TouchManager\r\n * @memberof Phaser.Input.Touch\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar TouchManager = new Class({\r\n\r\n initialize:\r\n\r\n function TouchManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Touch Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Touch Start event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStart\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchStart = NOOP;\r\n\r\n /**\r\n * The Touch Start event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStartWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchStartWindow = NOOP;\r\n\r\n /**\r\n * The Touch Move event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchMove\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchMove = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEnd\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchEnd = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEndWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchEndWindow = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancel\r\n * @type {function}\r\n * @since 3.15.0\r\n */\r\n this.onTouchCancel = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancelWindow\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onTouchCancelWindow = NOOP;\r\n\r\n /**\r\n * The Touch Over event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOver = NOOP;\r\n\r\n /**\r\n * The Touch Out event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOut = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputTouch;\r\n this.target = config.inputTouchEventTarget;\r\n this.capture = config.inputTouchCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Touch Event listeners running as long as an input target is set.\r\n * \r\n * This method is called automatically if Touch Input is enabled in the game config,\r\n * which it is by default. However, you can call it manually should you need to\r\n * delay input capturing until later in the game.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onTouchStart = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchStart(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchStartWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchStart(event);\r\n }\r\n };\r\n\r\n this.onTouchMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEnd = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchEnd(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEndWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchEnd(event);\r\n }\r\n };\r\n\r\n this.onTouchCancel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchCancelWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n }\r\n };\r\n\r\n this.onTouchOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onTouchOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('touchstart', this.onTouchStart, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchmove', this.onTouchMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchend', this.onTouchEnd, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchcancel', this.onTouchCancel, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchover', this.onTouchOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchout', this.onTouchOut, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('touchstart', this.onTouchStartWindow, nonPassive);\r\n window.addEventListener('touchend', this.onTouchEndWindow, nonPassive);\r\n window.addEventListener('touchcancel', this.onTouchCancelWindow, nonPassive);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Touch Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('touchstart', this.onTouchStart);\r\n target.removeEventListener('touchmove', this.onTouchMove);\r\n target.removeEventListener('touchend', this.onTouchEnd);\r\n target.removeEventListener('touchcancel', this.onTouchCancel);\r\n target.removeEventListener('touchover', this.onTouchOver);\r\n target.removeEventListener('touchout', this.onTouchOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('touchstart', this.onTouchStartWindow);\r\n window.removeEventListener('touchend', this.onTouchEndWindow);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Touch Manager instance.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TouchManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/TouchManager.js?")},"./node_modules/phaser/src/input/touch/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Touch\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n TouchManager: __webpack_require__(/*! ./TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/index.js?')},"./node_modules/phaser/src/loader/File.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ./GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\nvar XHRLoader = __webpack_require__(/*! ./XHRLoader */ \"./node_modules/phaser/src/loader/XHRLoader.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.type || !this.key)\r\n {\r\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n * Automatically has Loader.path prepended to it.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.url = GetFastValue(fileConfig, 'url');\r\n\r\n if (this.url === undefined)\r\n {\r\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof(this.url) !== 'function')\r\n {\r\n this.url = loader.path + this.url;\r\n }\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n // \r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/File.js?")},"./node_modules/phaser/src/loader/FileTypesManager.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/FileTypesManager.js?")},"./node_modules/phaser/src/loader/GetURL.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/GetURL.js?")},"./node_modules/phaser/src/loader/LoaderPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar CustomSet = __webpack_require__(/*! ../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ./FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\r\n * You typically interact with it via `this.load` in your Scene. Scenes can have a `preload` method, which is always\r\n * called before the Scenes `create` method, allowing you to preload assets that the Scene may need.\r\n *\r\n * If you call any `this.load` methods from outside of `Scene.preload` then you need to start the Loader going\r\n * yourself by calling `Loader.start()`. It's only automatically started during the Scene preload.\r\n *\r\n * The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events.\r\n * Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration.\r\n *\r\n * Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader\r\n * event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished\r\n * simply adding a new file to it, while running, will ensure it's added into the current queue.\r\n *\r\n * Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However,\r\n * assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that\r\n * file inside `Game.cache.xml`, which is accessible from every Scene in your game, no matter who was responsible\r\n * for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes\r\n * in your game.\r\n *\r\n * The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader\r\n * when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes.\r\n * See those files for more details.\r\n *\r\n * @class LoaderPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Loader instance.\r\n */\r\nvar LoaderPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function LoaderPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n var gameConfig = scene.sys.game.config;\r\n var sceneConfig = scene.sys.settings.loader;\r\n\r\n /**\r\n * The Scene which owns this Loader instance.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the global Cache Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#cacheManager\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.7.0\r\n */\r\n this.cacheManager = scene.sys.cache;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.7.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * A reference to the global Scene Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @protected\r\n * @since 3.16.0\r\n */\r\n this.sceneManager = scene.sys.game.scene;\r\n\r\n // Inject the available filetypes into the Loader\r\n FileTypesManager.install(this);\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader\r\n * from that point on. It does _not_ change any file already in the load queue.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#prefix\r\n * @type {string}\r\n * @default ''\r\n * @since 3.7.0\r\n */\r\n this.prefix = '';\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.path = \"images/sprites/\";\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n *\r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setPath()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#path\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.path = '';\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setBaseURL()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#baseURL\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.baseURL = '';\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n /**\r\n * The number of concurrent / parallel resources to try and fetch at once.\r\n *\r\n * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all.\r\n *\r\n * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#maxParallelDownloads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxParallelDownloads = GetFastValue(sceneConfig, 'maxParallelDownloads', gameConfig.loaderMaxParallelDownloads);\r\n\r\n /**\r\n * xhr specific global settings (can be overridden on a per-file basis)\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#xhr\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhr = XHRSettings(\r\n GetFastValue(sceneConfig, 'responseType', gameConfig.loaderResponseType),\r\n GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync),\r\n GetFastValue(sceneConfig, 'user', gameConfig.loaderUser),\r\n GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword),\r\n GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout)\r\n );\r\n\r\n /**\r\n * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#crossOrigin\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = GetFastValue(sceneConfig, 'crossOrigin', gameConfig.loaderCrossOrigin);\r\n\r\n /**\r\n * The total number of files to load. It may not always be accurate because you may add to the Loader during the process\r\n * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalToLoad\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalToLoad = 0;\r\n\r\n /**\r\n * The progress of the current load queue, as a float value between 0 and 1.\r\n * This is updated automatically as files complete loading.\r\n * Note that it is possible for this value to go down again if you add content to the current load queue during a load.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Files are placed in this Set when they're added to the Loader via `addFile`.\r\n * \r\n * They are moved to the `inflight` Set when they start loading, and assuming a successful\r\n * load, to the `queue` Set for further processing.\r\n *\r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#list\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.list = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're in the process of being loaded.\r\n * \r\n * Upon a successful load they are moved to the `queue` Set.\r\n * \r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#inflight\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.inflight = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're being processed.\r\n * \r\n * If the process is successful they are moved to their final destination, which could be\r\n * a Cache or the Texture Manager.\r\n * \r\n * At the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#queue\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.queue = new CustomSet();\r\n\r\n /**\r\n * A temporary Set in which files are stored after processing,\r\n * awaiting destruction at the end of the load process.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#_deleteQueue\r\n * @type {Phaser.Structs.Set.}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._deleteQueue = new CustomSet();\r\n\r\n /**\r\n * The total number of files that failed to load during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalFailed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalFailed = 0;\r\n\r\n /**\r\n * The total number of files that successfully loaded during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalComplete\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalComplete = 0;\r\n\r\n /**\r\n * The current state of the Loader.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#state\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.state = CONST.LOADER_IDLE;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pluginStart\r\n * @private\r\n * @since 3.5.1\r\n */\r\n pluginStart: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any\r\n * file _already_ being loaded. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setBaseURL\r\n * @since 3.0.0\r\n *\r\n * @param {string} [url] - The URL to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setBaseURL: function (url)\r\n {\r\n if (url === undefined) { url = ''; }\r\n\r\n if (url !== '' && url.substr(-1) !== '/')\r\n {\r\n url = url.concat('/');\r\n }\r\n\r\n this.baseURL = url;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.setPath(\"images/sprites/\");\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n * \r\n * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} [path] - The path to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPath: function (path)\r\n {\r\n if (path === undefined) { path = ''; }\r\n\r\n if (path !== '' && path.substr(-1) !== '/')\r\n {\r\n path = path.concat('/');\r\n }\r\n\r\n this.path = path;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * \r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * \r\n * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPrefix\r\n * @since 3.7.0\r\n *\r\n * @param {string} [prefix] - The prefix to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPrefix: function (prefix)\r\n {\r\n if (prefix === undefined) { prefix = ''; }\r\n\r\n this.prefix = prefix;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Cross Origin Resource Sharing value used when loading files.\r\n * \r\n * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config.\r\n * \r\n * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have\r\n * their own CORs setting. To reset it, call this method with no arguments.\r\n *\r\n * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setCORS\r\n * @since 3.0.0\r\n *\r\n * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setCORS: function (crossOrigin)\r\n {\r\n this.crossOrigin = crossOrigin;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a file, or array of files, into the load queue.\r\n *\r\n * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key\r\n * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.\r\n * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already\r\n * started, ready for the next batch of files to be pulled from the list to the inflight queue.\r\n *\r\n * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`,\r\n * however you can call this as long as the file given to it is well formed.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addFile\r\n * @fires Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Loader.File|Phaser.Loader.File[])} file - The file, or array of files, to be added to the load queue.\r\n */\r\n addFile: function (file)\r\n {\r\n if (!Array.isArray(file))\r\n {\r\n file = [ file ];\r\n }\r\n\r\n for (var i = 0; i < file.length; i++)\r\n {\r\n var item = file[i];\r\n\r\n // Does the file already exist in the cache or texture manager?\r\n // Or will it conflict with a file already in the queue or inflight?\r\n if (!this.keyExists(item))\r\n {\r\n this.list.set(item);\r\n\r\n this.emit(Events.ADD, item.key, item.type, this, item);\r\n\r\n if (this.isLoading())\r\n {\r\n this.totalToLoad++;\r\n this.updateProgress();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Checks the key and type of the given file to see if it will conflict with anything already\r\n * in a Cache, the Texture Manager, or the list or inflight queues.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#keyExists\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file to check the key of.\r\n *\r\n * @return {boolean} `true` if adding this file will cause a cache or queue conflict, otherwise `false`.\r\n */\r\n keyExists: function (file)\r\n {\r\n var keyConflict = file.hasCacheConflict();\r\n\r\n if (!keyConflict)\r\n {\r\n this.list.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n if (!keyConflict && this.isLoading())\r\n {\r\n this.inflight.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n\r\n this.queue.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n return keyConflict;\r\n },\r\n\r\n /**\r\n * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call\r\n * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the\r\n * pack data. However, if you've got the data prepared you can pass it to this method.\r\n *\r\n * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into\r\n * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format\r\n * see the `LoaderPlugin.pack` method.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addPack\r\n * @since 3.7.0\r\n *\r\n * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue.\r\n * @param {string} [packKey] - An optional key to use from the pack file data.\r\n *\r\n * @return {boolean} `true` if any files were added to the queue, otherwise `false`.\r\n */\r\n addPack: function (pack, packKey)\r\n {\r\n // if no packKey provided we'll add everything to the queue\r\n if (packKey && pack.hasOwnProperty(packKey))\r\n {\r\n pack = { packKey: pack[packKey] };\r\n }\r\n\r\n var total = 0;\r\n\r\n // Store the loader settings in case this pack replaces them\r\n var currentBaseURL = this.baseURL;\r\n var currentPath = this.path;\r\n var currentPrefix = this.prefix;\r\n\r\n // Here we go ...\r\n for (var key in pack)\r\n {\r\n var config = pack[key];\r\n\r\n // Any meta data to process?\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var files = GetFastValue(config, 'files', null);\r\n var defaultType = GetFastValue(config, 'defaultType', 'void');\r\n\r\n if (Array.isArray(files))\r\n {\r\n this.setBaseURL(baseURL);\r\n this.setPath(path);\r\n this.setPrefix(prefix);\r\n\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n var file = files[i];\r\n var type = (file.hasOwnProperty('type')) ? file.type : defaultType;\r\n\r\n if (this[type])\r\n {\r\n this[type](file);\r\n total++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n this.setBaseURL(currentBaseURL);\r\n this.setPath(currentPath);\r\n this.setPrefix(currentPrefix);\r\n\r\n return (total > 0);\r\n },\r\n\r\n /**\r\n * Is the Loader actively loading, or processing loaded files?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isLoading\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is busy loading or processing, otherwise `false`.\r\n */\r\n isLoading: function ()\r\n {\r\n return (this.state === CONST.LOADER_LOADING || this.state === CONST.LOADER_PROCESSING);\r\n },\r\n\r\n /**\r\n * Is the Loader ready to start a new load?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isReady\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is ready to start a new load, otherwise `false`.\r\n */\r\n isReady: function ()\r\n {\r\n return (this.state === CONST.LOADER_IDLE || this.state === CONST.LOADER_COMPLETE);\r\n },\r\n\r\n /**\r\n * Starts the Loader running. This will reset the progress and totals and then emit a `start` event.\r\n * If there is nothing in the queue the Loader will immediately complete, otherwise it will start\r\n * loading the first batch of files.\r\n *\r\n * The Loader is started automatically if the queue is populated within your Scenes `preload` method.\r\n *\r\n * However, outside of this, you need to call this method to start it.\r\n *\r\n * If the Loader is already running this method will simply return.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#start\r\n * @fires Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.isReady())\r\n {\r\n return;\r\n }\r\n\r\n this.progress = 0;\r\n\r\n this.totalFailed = 0;\r\n this.totalComplete = 0;\r\n this.totalToLoad = this.list.size;\r\n\r\n this.emit(Events.START, this);\r\n\r\n if (this.list.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n else\r\n {\r\n this.state = CONST.LOADER_LOADING;\r\n\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.updateProgress();\r\n\r\n this.checkLoadQueue();\r\n\r\n this.systems.events.on(SceneEvents.UPDATE, this.update, this);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n * It updates the `progress` value and then emits a progress event, which you can use to\r\n * display a loading bar in your game.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#updateProgress\r\n * @fires Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n */\r\n updateProgress: function ()\r\n {\r\n this.progress = 1 - ((this.list.size + this.inflight.size) / this.totalToLoad);\r\n\r\n this.emit(Events.PROGRESS, this.progress);\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#update\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (this.state === CONST.LOADER_LOADING && this.list.size > 0 && this.inflight.size < this.maxParallelDownloads)\r\n {\r\n this.checkLoadQueue();\r\n }\r\n },\r\n\r\n /**\r\n * An internal method called by the Loader.\r\n * \r\n * It will check to see if there are any more files in the pending list that need loading, and if so it will move\r\n * them from the list Set into the inflight Set, set their CORs flag and start them loading.\r\n * \r\n * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#checkLoadQueue\r\n * @private\r\n * @since 3.7.0\r\n */\r\n checkLoadQueue: function ()\r\n {\r\n this.list.each(function (file)\r\n {\r\n if (file.state === CONST.FILE_POPULATED || (file.state === CONST.FILE_PENDING && this.inflight.size < this.maxParallelDownloads))\r\n {\r\n this.inflight.set(file);\r\n\r\n this.list.delete(file);\r\n\r\n // If the file doesn't have its own crossOrigin set, we'll use the Loaders (which is undefined by default)\r\n if (!file.crossOrigin)\r\n {\r\n file.crossOrigin = this.crossOrigin;\r\n }\r\n\r\n file.load();\r\n }\r\n\r\n if (this.inflight.size === this.maxParallelDownloads)\r\n {\r\n // Tells the Set iterator to abort\r\n return false;\r\n }\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * An internal method called automatically by the XHRLoader belong to a File.\r\n * \r\n * This method will remove the given file from the inflight Set and update the load progress.\r\n * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#nextFile\r\n * @fires Phaser.Loader.Events#FILE_LOAD\r\n * @fires Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that just finished loading, or errored during load.\r\n * @param {boolean} success - `true` if the file loaded successfully, otherwise `false`.\r\n */\r\n nextFile: function (file, success)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.inflight)\r\n {\r\n return;\r\n }\r\n\r\n this.inflight.delete(file);\r\n\r\n this.updateProgress();\r\n\r\n if (success)\r\n {\r\n this.totalComplete++;\r\n\r\n this.queue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD, file);\r\n\r\n file.onProcess();\r\n }\r\n else\r\n {\r\n this.totalFailed++;\r\n\r\n this._deleteQueue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD_ERROR, file);\r\n\r\n this.fileProcessComplete(file);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that is called automatically by the File when it has finished processing.\r\n *\r\n * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called.\r\n *\r\n * It this then removed from the queue. If there are no more files to load `loadComplete` is called.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#fileProcessComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file that has finished processing.\r\n */\r\n fileProcessComplete: function (file)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.scene || !this.systems || !this.systems.game || this.systems.game.pendingDestroy)\r\n {\r\n return;\r\n }\r\n\r\n // This file has failed, so move it to the failed Set\r\n if (file.state === CONST.FILE_ERRORED)\r\n {\r\n if (file.multiFile)\r\n {\r\n file.multiFile.onFileFailed(file);\r\n }\r\n }\r\n else if (file.state === CONST.FILE_COMPLETE)\r\n {\r\n if (file.multiFile)\r\n {\r\n if (file.multiFile.isReadyToProcess())\r\n {\r\n // If we got here then all files the link file needs are ready to add to the cache\r\n file.multiFile.addToCache();\r\n }\r\n }\r\n else\r\n {\r\n // If we got here, then the file processed, so let it add itself to its cache\r\n file.addToCache();\r\n }\r\n }\r\n\r\n // Remove it from the queue\r\n this.queue.delete(file);\r\n\r\n // Nothing left to do?\r\n\r\n if (this.list.size === 0 && this.inflight.size === 0 && this.queue.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called at the end when the load queue is exhausted and all files have either loaded or errored.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Also clears down the Sets, puts progress to 1 and clears the deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#loadComplete\r\n * @fires Phaser.Loader.Events#COMPLETE\r\n * @fires Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.7.0\r\n */\r\n loadComplete: function ()\r\n {\r\n this.emit(Events.POST_PROCESS, this);\r\n\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.progress = 1;\r\n\r\n this.state = CONST.LOADER_COMPLETE;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n\r\n // Call 'destroy' on each file ready for deletion\r\n this._deleteQueue.iterateLocal('destroy');\r\n\r\n this._deleteQueue.clear();\r\n\r\n this.emit(Events.COMPLETE, this, this.totalComplete, this.totalFailed);\r\n },\r\n\r\n /**\r\n * Adds a File into the pending-deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#flagForRemoval\r\n * @since 3.7.0\r\n * \r\n * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes.\r\n */\r\n flagForRemoval: function (file)\r\n {\r\n this._deleteQueue.set(file);\r\n },\r\n\r\n /**\r\n * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally.\r\n *\r\n * The data must be well formed JSON and ready-parsed, not a JavaScript object.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#saveJSON\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The JSON data, ready parsed.\r\n * @param {string} [filename=file.json] - The name to save the JSON file as.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n saveJSON: function (data, filename)\r\n {\r\n return this.save(JSON.stringify(data), filename);\r\n },\r\n\r\n /**\r\n * Causes the browser to save the given data as a file to its default Downloads folder.\r\n * \r\n * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href\r\n * to be an ObjectURL based on the given data, and then invokes a click event.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#save\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The data to be saved. Will be passed through URL.createObjectURL.\r\n * @param {string} [filename=file.json] - The filename to save the file as.\r\n * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n save: function (data, filename, filetype)\r\n {\r\n if (filename === undefined) { filename = 'file.json'; }\r\n if (filetype === undefined) { filetype = 'application/json'; }\r\n\r\n var blob = new Blob([ data ], { type: filetype });\r\n\r\n var url = URL.createObjectURL(blob);\r\n\r\n var a = document.createElement('a');\r\n\r\n a.download = filename;\r\n a.textContent = 'Download ' + filename;\r\n a.href = url;\r\n a.click();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the Loader.\r\n *\r\n * This will clear all lists and reset the base URL, path and prefix.\r\n *\r\n * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#reset\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n var gameConfig = this.systems.game.config;\r\n var sceneConfig = this.systems.settings.loader;\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n this.state = CONST.LOADER_IDLE;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.reset();\r\n\r\n this.state = CONST.LOADER_SHUTDOWN;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.state = CONST.LOADER_DESTROYED;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.START, this.pluginStart, this);\r\n\r\n this.list = null;\r\n this.inflight = null;\r\n this.queue = null;\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.textureManager = null;\r\n this.cacheManager = null;\r\n this.sceneManager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Loader', LoaderPlugin, 'load');\r\n\r\nmodule.exports = LoaderPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/LoaderPlugin.js?")},"./node_modules/phaser/src/loader/MergeXHRSettings.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js");\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MergeXHRSettings.js?')},"./node_modules/phaser/src/loader/MultiFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn\'t create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MultiFile.js?')},"./node_modules/phaser/src/loader/XHRLoader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRLoader.js?")},"./node_modules/phaser/src/loader/XHRSettings.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRSettings.js?")},"./node_modules/phaser/src/loader/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/const.js?")},"./node_modules/phaser/src/loader/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/ADD_EVENT.js?")},"./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/START_EVENT.js?")},"./node_modules/phaser/src/loader/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/loader/events/ADD_EVENT.js"),\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js"),\r\n FILE_COMPLETE: __webpack_require__(/*! ./FILE_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js"),\r\n FILE_KEY_COMPLETE: __webpack_require__(/*! ./FILE_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js"),\r\n FILE_LOAD_ERROR: __webpack_require__(/*! ./FILE_LOAD_ERROR_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js"),\r\n FILE_LOAD: __webpack_require__(/*! ./FILE_LOAD_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js"),\r\n FILE_PROGRESS: __webpack_require__(/*! ./FILE_PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js"),\r\n POST_PROCESS: __webpack_require__(/*! ./POST_PROCESS_EVENT */ "./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js"),\r\n PROGRESS: __webpack_require__(/*! ./PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/loader/events/START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/index.js?')},"./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\nvar LoaderEvents = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/loader/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single Animation JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation.\r\n *\r\n * @class AnimationJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar AnimationJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function AnimationJSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'animationJSON\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n // We need to hook into this event:\r\n this.loader.once(LoaderEvents.POST_PROCESS, this.onLoadComplete, this);\r\n\r\n // But the rest is the same as a normal JSON file\r\n JSONFile.prototype.onProcess.call(this);\r\n },\r\n\r\n /**\r\n * Called at the end of the load process, after the Loader has finished all files in its queue.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onLoadComplete\r\n * @since 3.7.0\r\n */\r\n onLoadComplete: function ()\r\n {\r\n this.loader.systems.anims.fromJSON(this.data);\r\n\r\n this.pendingDestroy();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.animation({\r\n * key: \'baddieAnims\',\r\n * url: \'files/BaddieAnims.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be passed to the global Animation Managers `fromJSON` method.\r\n * This will parse all of the JSON data and create animation data from it. This process happens at the very end\r\n * of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load\r\n * both animation data and the images it relies upon in the same load call.\r\n *\r\n * Once the animation data has been parsed you will be able to play animations using that data.\r\n * Please see the Animation Manager `fromJSON` method for more details about the format and playback.\r\n * \r\n * You can also access the raw animation data from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get(\'baddieAnims\');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#animation\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'animation\', function (key, url, dataKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new AnimationJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new AnimationJSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AnimationJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js?')},"./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas.\r\n * \r\n * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm\r\n *\r\n * @class AtlasJSONFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasJSONFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasJSONFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var json = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlas(image.key, image.data, json.data, normalMap);\r\n\r\n json.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.\r\n * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate.\r\n * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader\r\n * instead of this one.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasJSONFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasJSONFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML.\r\n *\r\n * @class AtlasXMLFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasXMLFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasXMLFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasXMLFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlasXML(image.key, image.data, xml.data, normalMap);\r\n\r\n xml.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in an XML file format.\r\n * These files are created by software such as Shoebox and Adobe Flash / Animate.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlasXML\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasXMLFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasXMLFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasXMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HTML5AudioFile = __webpack_require__(/*! ./HTML5AudioFile */ \"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {any} [urlConfig] - The absolute or relative URL to load this file from in a config object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {AudioContext} [audioContext] - The AudioContext this file will use to process itself.\r\n */\r\nvar AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // URL is an object created by AudioFile.findAudioURL\r\n function AudioFile (loader, key, urlConfig, xhrSettings, audioContext)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n audioContext = GetFastValue(config, 'context', audioContext);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: urlConfig.url,\r\n xhrSettings: xhrSettings,\r\n config: { context: audioContext }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioFile#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var _this = this;\r\n\r\n // interesting read https://github.com/WebAudio/web-audio-api/issues/1305\r\n this.config.context.decodeAudioData(this.xhrLoader.response,\r\n function (audioBuffer)\r\n {\r\n _this.data = audioBuffer;\r\n\r\n _this.onProcessComplete();\r\n },\r\n function (e)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + this.key + ' - ', e ? e.message : null);\r\n\r\n _this.onProcessError();\r\n }\r\n );\r\n\r\n this.config.context = null;\r\n }\r\n\r\n});\r\n\r\nAudioFile.create = function (loader, key, urls, config, xhrSettings)\r\n{\r\n var game = loader.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n // url may be inside key, which may be an object\r\n if (IsPlainObject(key))\r\n {\r\n urls = GetFastValue(key, 'url', []);\r\n config = GetFastValue(key, 'config', {});\r\n }\r\n\r\n var urlConfig = AudioFile.getAudioURL(game, urls);\r\n\r\n if (!urlConfig)\r\n {\r\n return null;\r\n }\r\n\r\n // https://developers.google.com/web/updates/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs\r\n // var stream = GetFastValue(config, 'stream', false);\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new AudioFile(loader, key, urlConfig, xhrSettings, game.sound.context);\r\n }\r\n else\r\n {\r\n return new HTML5AudioFile(loader, key, urlConfig, config);\r\n }\r\n};\r\n\r\nAudioFile.getAudioURL = function (game, urls)\r\n{\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0)\r\n {\r\n return url;\r\n }\r\n\r\n var audioType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n\r\n audioType = GetFastValue(urls[i], 'type', (audioType) ? audioType[1] : '').toLowerCase();\r\n\r\n if (game.device.audio[audioType])\r\n {\r\n return {\r\n url: url,\r\n type: audioType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/**\r\n * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audio({\r\n * key: 'title',\r\n * url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioFileConfig` for more details.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audio\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|string[])} [urls] - The absolute or relative URL to load the audio files from.\r\n * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('audio', function (key, urls, config, xhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var audioFile;\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n audioFile = AudioFile.create(this, key[i]);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n audioFile = AudioFile.create(this, key, urls, config, xhrSettings);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AudioFile = __webpack_require__(/*! ./AudioFile.js */ \"./node_modules/phaser/src/loader/filetypes/AudioFile.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Audio Sprite File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite.\r\n *\r\n * @class AudioSpriteFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {{(string|string[])}} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AudioSpriteFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AudioSpriteFile (loader, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n jsonURL = GetFastValue(config, 'jsonURL');\r\n audioURL = GetFastValue(config, 'audioURL');\r\n audioConfig = GetFastValue(config, 'audioConfig');\r\n audioXhrSettings = GetFastValue(config, 'audioXhrSettings');\r\n jsonXhrSettings = GetFastValue(config, 'jsonXhrSettings');\r\n }\r\n\r\n var data;\r\n\r\n // No url? then we're going to do a json load and parse it from that\r\n if (!audioURL)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n \r\n MultiFile.call(this, loader, 'audiosprite', key, [ data ]);\r\n\r\n this.config.resourceLoad = true;\r\n this.config.audioConfig = audioConfig;\r\n this.config.audioXhrSettings = audioXhrSettings;\r\n }\r\n else\r\n {\r\n var audio = AudioFile.create(loader, key, audioURL, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'audiosprite', key, [ audio, data ]);\r\n\r\n this.config.resourceLoad = false;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (this.config.resourceLoad && file.type === 'json' && file.data.hasOwnProperty('resources'))\r\n {\r\n // Inspect the data for the files to now load\r\n var urls = file.data.resources;\r\n\r\n var audioConfig = GetFastValue(this.config, 'audioConfig');\r\n var audioXhrSettings = GetFastValue(this.config, 'audioXhrSettings');\r\n\r\n var audio = AudioFile.create(this.loader, file.key, urls, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n this.addToMultiFile(audio);\r\n\r\n this.loader.addFile(audio);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileA = this.files[0];\r\n var fileB = this.files[1];\r\n\r\n fileA.addToCache();\r\n fileB.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json', [\r\n * 'kyobi.ogg',\r\n * 'kyobi.mp3',\r\n * 'kyobi.m4a'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio\r\n * files automatically based on its content. To do this exclude the audio URLs from the load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite({\r\n * key: 'kyobi',\r\n * jsonURL: 'audio/Kyobi.json',\r\n * audioURL: [\r\n * 'audio/Kyobi.ogg',\r\n * 'audio/Kyobi.mp3',\r\n * 'audio/Kyobi.m4a'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * // and later in your game ...\r\n * var music = this.sound.addAudioSprite('kyobi');\r\n * music.play('title');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audioSprite\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {(string|string[])} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader.\r\n */\r\nFileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var gameAudioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((gameAudioConfig && gameAudioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AudioSpriteFile(this, key[i]);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AudioSpriteFile(this, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js?")},"./node_modules/phaser/src/loader/filetypes/BinaryFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Binary File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary.\r\n *\r\n * @class BinaryFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n */\r\nvar BinaryFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function BinaryFile (loader, key, url, xhrSettings, dataType)\r\n {\r\n var extension = 'bin';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataType = GetFastValue(config, 'dataType', dataType);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'binary',\r\n cache: loader.cacheManager.binary,\r\n extension: extension,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: { dataType: dataType }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.BinaryFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var ctor = this.config.dataType;\r\n\r\n this.data = (ctor) ? new ctor(this.xhrLoader.response) : this.xhrLoader.response;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Binary file, or array of Binary files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Binary Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Binary Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.binary({\r\n * key: 'doom',\r\n * url: 'files/Doom.wad',\r\n * dataType: Uint8Array\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * // and later in your game ...\r\n * var data = this.cache.binary.get('doom');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and\r\n * this is what you would use to retrieve the text from the Binary Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"doom\"\r\n * and no URL is given then the Loader will set the URL to be \"doom.bin\". It will always add `.bin` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#binary\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('binary', function (key, url, dataType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new BinaryFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new BinaryFile(this, key, url, xhrSettings, dataType));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BinaryFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BinaryFile.js?")},"./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../../gameobjects/bitmaptext/ParseXMLBitmapFont.js */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Bitmap Font based File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont.\r\n *\r\n * @class BitmapFontFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar BitmapFontFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function BitmapFontFile (loader, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'fontDataURL'),\r\n extension: GetFastValue(config, 'fontDataExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'fontDataXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, fontDataURL, fontDataXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.BitmapFontFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n\r\n image.addToCache();\r\n xml.addToCache();\r\n\r\n this.loader.cacheManager.bitmapFont.add(image.key, { data: ParseXMLBitmapFont(xml.data), texture: image.key, frame: null });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Bitmap Font, or array of fonts, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the font data to be provided in an XML file format.\r\n * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/),\r\n * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner)\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * // and later in your game ...\r\n * this.add.bitmapText(x, y, 'goldenFont', 'Hello World');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use when creating a Bitmap Text object.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * normalMap: 'images/GoldFont-n.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#bitmapFont\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new BitmapFontFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new BitmapFontFile(this, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BitmapFontFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js?")},"./node_modules/phaser/src/loader/filetypes/CSSFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single CSS File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css.\r\n *\r\n * @class CSSFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar CSSFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function CSSFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'css';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.CSSFile#onProcess\r\n * @since 3.17.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('style');\r\n this.data.defer = false;\r\n this.data.innerHTML = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSS file, or array of CSS files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.css('headers', 'styles/headers.css');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.css({\r\n * key: 'headers',\r\n * url: 'styles/headers.css'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.CSSFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a style DOM element\r\n * via `document.createElement('style')`. It will have its `defer` property set to false and then the\r\n * resulting element will be appended to `document.head`. The CSS styles are then applied to the current document.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.css\". It will always add `.css` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#css\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was \"alien\" then the URL will be \"alien.css\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('css', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new CSSFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new CSSFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = CSSFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/CSSFile.js?")},"./node_modules/phaser/src/loader/filetypes/GLSLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Shader = __webpack_require__(/*! ../../display/shader/BaseShader */ \"./node_modules/phaser/src/display/shader/BaseShader.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single GLSL File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl.\r\n *\r\n * @class GLSLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar GLSLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function GLSLFile (loader, key, url, shaderType, xhrSettings)\r\n {\r\n var extension = 'glsl';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n shaderType = GetFastValue(config, 'shaderType', 'fragment');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n else if (shaderType === undefined)\r\n {\r\n shaderType = 'fragment';\r\n }\r\n\r\n var fileConfig = {\r\n type: 'glsl',\r\n cache: loader.cacheManager.shader,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n config: {\r\n shaderType: shaderType\r\n },\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n var data = this.data.split('\\n');\r\n\r\n // Check to see if this is a shader bundle, or raw glsl file.\r\n var block = this.extractBlock(data, 0);\r\n\r\n if (block)\r\n {\r\n while (block)\r\n {\r\n var key = this.getShaderName(block.header);\r\n var shaderType = this.getShaderType(block.header);\r\n var uniforms = this.getShaderUniforms(block.header);\r\n var shaderSrc = block.shader;\r\n\r\n if (this.cache.has(key))\r\n {\r\n var shader = this.cache.get(key);\r\n\r\n if (shaderType === 'fragment')\r\n {\r\n shader.fragmentSrc = shaderSrc;\r\n }\r\n else\r\n {\r\n shader.vertexSrc = shaderSrc;\r\n }\r\n\r\n if (!shader.uniforms)\r\n {\r\n shader.uniforms = uniforms;\r\n }\r\n }\r\n else if (shaderType === 'fragment')\r\n {\r\n this.cache.add(key, new Shader(key, shaderSrc, '', uniforms));\r\n }\r\n else\r\n {\r\n this.cache.add(key, new Shader(key, '', shaderSrc, uniforms));\r\n }\r\n\r\n block = this.extractBlock(data, block.offset);\r\n }\r\n }\r\n else if (this.config.shaderType === 'fragment')\r\n {\r\n // Single shader\r\n this.cache.add(this.key, new Shader(this.key, this.data));\r\n }\r\n else\r\n {\r\n this.cache.add(this.key, new Shader(this.key, '', this.data));\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Returns the name of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader name.\r\n */\r\n getShaderName: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'name:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.key;\r\n },\r\n\r\n /**\r\n * Returns the type of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader type. Either 'fragment' or 'vertex'.\r\n */\r\n getShaderType: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'type:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.config.shaderType;\r\n },\r\n\r\n /**\r\n * Returns the shader uniforms from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {any} The shader uniforms object.\r\n */\r\n getShaderUniforms: function (headerSource)\r\n {\r\n var uniforms = {};\r\n\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 8) === 'uniform.')\r\n {\r\n var pos = line.indexOf(':');\r\n\r\n if (pos)\r\n {\r\n var key = line.substring(8, pos);\r\n\r\n try\r\n {\r\n uniforms[key] = JSON.parse(line.substring(pos + 1));\r\n }\r\n catch (e)\r\n {\r\n console.warn('Invalid uniform JSON: ' + key);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return uniforms;\r\n },\r\n\r\n /**\r\n * Processes the shader file and extracts the relevant data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} data - The array of shader data to process.\r\n * @param {integer} offset - The offset to start processing from.\r\n * \r\n * @return {any} The processed shader block, or null.\r\n */\r\n extractBlock: function (data, offset)\r\n {\r\n var headerStart = -1;\r\n var headerEnd = -1;\r\n var blockEnd = -1;\r\n var headerOpen = false;\r\n var captureSource = false;\r\n var headerSource = [];\r\n var shaderSource = [];\r\n\r\n for (var i = offset; i < data.length; i++)\r\n {\r\n var line = data[i].trim();\r\n\r\n if (line === '---')\r\n {\r\n if (headerStart === -1)\r\n {\r\n headerStart = i;\r\n headerOpen = true;\r\n }\r\n else if (headerOpen)\r\n {\r\n headerEnd = i;\r\n headerOpen = false;\r\n captureSource = true;\r\n }\r\n else\r\n {\r\n // We've hit another --- delimeter, break out\r\n captureSource = false;\r\n break;\r\n }\r\n }\r\n else if (headerOpen)\r\n {\r\n headerSource.push(line);\r\n }\r\n else if (captureSource)\r\n {\r\n shaderSource.push(line);\r\n blockEnd = i;\r\n }\r\n }\r\n\r\n if (!headerOpen && headerEnd !== -1)\r\n {\r\n return { header: headerSource, shader: shaderSource.join('\\n'), offset: blockEnd };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a GLSL file, or array of GLSL files, to the current load queue.\r\n * In Phaser 3 GLSL files are just plain Text files at the current moment in time.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Shader Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Shader Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.glsl({\r\n * key: 'plasma',\r\n * shaderType: 'fragment',\r\n * url: 'shaders/Plasma.glsl'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * // and later in your game ...\r\n * var data = this.cache.shader.get('plasma');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and\r\n * this is what you would use to retrieve the text from the Shader Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"plasma\"\r\n * and no URL is given then the Loader will set the URL to be \"plasma.glsl\". It will always add `.glsl` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#glsl\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.glsl`, i.e. if `key` was \"alien\" then the URL will be \"alien.glsl\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new GLSLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new GLSLFile(this, key, url, shaderType, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = GLSLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/GLSLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ../GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class HTML5AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [urlConfig] - The absolute or relative URL to load this file from.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTML5AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTML5AudioFile (loader, key, urlConfig, audioConfig)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n audioConfig = GetFastValue(config, 'config', audioConfig);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n key: key,\r\n url: urlConfig.url,\r\n config: audioConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // New properties specific to this class\r\n this.locked = 'ontouchstart' in window;\r\n this.loaded = false;\r\n this.filesLoaded = 0;\r\n this.filesTotal = 0;\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onLoad\r\n * @since 3.0.0\r\n */\r\n onLoad: function ()\r\n {\r\n if (this.loaded)\r\n {\r\n return;\r\n }\r\n\r\n this.loaded = true;\r\n\r\n this.loader.nextFile(this, true);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onError\r\n * @since 3.0.0\r\n */\r\n onError: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n var audio = this.data[i];\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n }\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n */\r\n onProgress: function (event)\r\n {\r\n var audio = event.target;\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n\r\n this.filesLoaded++;\r\n\r\n this.percentComplete = Math.min((this.filesLoaded / this.filesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n\r\n if (this.filesLoaded === this.filesTotal)\r\n {\r\n this.onLoad();\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n this.data = [];\r\n\r\n var instances = (this.config && this.config.instances) || 1;\r\n\r\n this.filesTotal = instances;\r\n this.filesLoaded = 0;\r\n this.percentComplete = 0;\r\n\r\n for (var i = 0; i < instances; i++)\r\n {\r\n var audio = new Audio();\r\n audio.dataset = {};\r\n audio.dataset.name = this.key + ('0' + i).slice(-2);\r\n audio.dataset.used = 'false';\r\n\r\n if (this.locked)\r\n {\r\n audio.dataset.locked = 'true';\r\n }\r\n else\r\n {\r\n audio.dataset.locked = 'false';\r\n\r\n audio.preload = 'auto';\r\n audio.oncanplaythrough = this.onProgress.bind(this);\r\n audio.onerror = this.onError.bind(this);\r\n }\r\n\r\n this.data.push(audio);\r\n }\r\n\r\n for (i = 0; i < this.data.length; i++)\r\n {\r\n audio = this.data[i];\r\n audio.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (!this.locked)\r\n {\r\n audio.load();\r\n }\r\n }\r\n\r\n if (this.locked)\r\n {\r\n // This is super-dangerous but works. Race condition potential high.\r\n // Is there another way?\r\n setTimeout(this.onLoad.bind(this));\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html.\r\n *\r\n * @class HTMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.html,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML file, or array of HTML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.html('story', 'files/LoginForm.html');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the HTML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the HTML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.html({\r\n * key: 'login',\r\n * url: 'files/LoginForm.html'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.html('login', 'files/LoginForm.html');\r\n * // and later in your game ...\r\n * var data = this.cache.html.get('login');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the html from the HTML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#html\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('html', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture.\r\n *\r\n * @class HTMLTextureFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {integer} [width] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLTextureFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLTextureFile (loader, key, url, width, height, xhrSettings)\r\n {\r\n if (width === undefined) { width = 512; }\r\n if (height === undefined) { height = 512; }\r\n\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n width = GetFastValue(config, 'width', width);\r\n height = GetFastValue(config, 'height', height);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'html',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: width,\r\n height: height\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var w = this.config.width;\r\n var h = this.config.height;\r\n\r\n var data = [];\r\n\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n data.push(this.xhrLoader.responseText);\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n\r\n var svg = [ data.join('\\n') ];\r\n var _this = this;\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n _this.state = CONST.FILE_ERRORED;\r\n\r\n _this.onProcessComplete();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they\r\n * will be rendered to textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture({\r\n * key: 'instructions',\r\n * url: 'content/intro.html',\r\n * width: 256,\r\n * height: 512\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'instructions');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these\r\n * automatically, so you will need to provide them, either as arguments or in the file config object.\r\n * When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.\r\n * The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG,\r\n * and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered\r\n * HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are\r\n * limitations on what HTML can be inside an SVG. You can find out more details in this\r\n * [Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas).\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#htmlTexture\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {integer} [width=512] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height=512] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLTextureFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLTextureFile(this, key, url, width, height, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLTextureFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js?")},"./node_modules/phaser/src/loader/filetypes/ImageFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ImageFile.js?")},"./node_modules/phaser/src/loader/filetypes/JSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n if (IsPlainObject(url))\r\n {\r\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/JSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Multi Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas.\r\n *\r\n * @class MultiAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from.\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas json file.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture files.\r\n */\r\nvar MultiAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiAtlasFile (loader, key, atlasURL, path, baseURL, atlasXhrSettings, textureXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n atlasURL = GetFastValue(config, 'url');\r\n atlasXhrSettings = GetFastValue(config, 'xhrSettings');\r\n path = GetFastValue(config, 'path');\r\n baseURL = GetFastValue(config, 'baseURL');\r\n textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n }\r\n\r\n var data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'multiatlas', key, [ data ]);\r\n\r\n this.config.path = path;\r\n this.config.baseURL = baseURL;\r\n this.config.textureXhrSettings = textureXhrSettings;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'json' && file.data.hasOwnProperty('textures'))\r\n {\r\n // Inspect the data for the files to now load\r\n var textures = file.data.textures;\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n // \"image\": \"texture-packer-multi-atlas-0.png\",\r\n var textureURL = textures[i].image;\r\n\r\n var key = '_MA_' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n\r\n // \"normalMap\": \"texture-packer-multi-atlas-0_n.png\",\r\n if (textures[i].normalMap)\r\n {\r\n var normalMap = new ImageFile(loader, key, textures[i].normalMap, textureXhrSettings);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n image.setLink(normalMap);\r\n\r\n this.addToMultiFile(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var data = [];\r\n var images = [];\r\n var normalMaps = [];\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'normalMap')\r\n {\r\n continue;\r\n }\r\n\r\n var key = file.key.substr(4);\r\n var image = file.data;\r\n\r\n // Now we need to find out which json entry this mapped to\r\n for (var t = 0; t < fileJSON.data.textures.length; t++)\r\n {\r\n var item = fileJSON.data.textures[t];\r\n\r\n if (item.image === key)\r\n {\r\n images.push(image);\r\n \r\n data.push(item);\r\n\r\n if (file.linkFile)\r\n {\r\n normalMaps.push(file.linkFile.data);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (normalMaps.length === 0)\r\n {\r\n normalMaps = undefined;\r\n }\r\n\r\n this.loader.textureManager.addAtlasJSONArray(this.key, images, data, normalMaps);\r\n\r\n this.complete = true;\r\n\r\n for (i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,\r\n * version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.\r\n *\r\n * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and\r\n * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,\r\n * Phaser will load those as well.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas({\r\n * key: 'level1',\r\n * atlasURL: 'images/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'level1', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#multiatlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiAtlasFile(this, key, atlasURL, path, baseURL, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ScriptFile = __webpack_require__(/*! ./ScriptFile.js */ \"./node_modules/phaser/src/loader/filetypes/ScriptFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Multi Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts.\r\n *\r\n * @class MultiScriptFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar MultiScriptFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n var files = [];\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n if (!Array.isArray(url))\r\n {\r\n url = [ url ];\r\n }\r\n\r\n for (var i = 0; i < url.length; i++)\r\n {\r\n var scriptFile = new ScriptFile(loader, {\r\n key: key + '_' + i.toString(),\r\n url: url[i],\r\n extension: extension,\r\n xhrSettings: xhrSettings\r\n });\r\n\r\n // Override the default onProcess function\r\n scriptFile.onProcess = function ()\r\n {\r\n this.onProcessComplete();\r\n };\r\n\r\n files.push(scriptFile);\r\n }\r\n\r\n MultiFile.call(this, loader, 'scripts', key, files);\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiScriptFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n file.data = document.createElement('script');\r\n file.data.language = 'javascript';\r\n file.data.type = 'text/javascript';\r\n file.data.defer = false;\r\n file.data.text = file.xhrLoader.responseText;\r\n \r\n document.head.appendChild(file.data);\r\n }\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an array of Script files to the current load queue.\r\n * \r\n * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method,\r\n * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that\r\n * may have dependancies on each other without worrying about the async nature of traditional script loading.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scripts('PostProcess', [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact\r\n * order given in the array.\r\n *\r\n * The files are **not** loaded right away. They are added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the files are queued\r\n * it means you cannot use the files immediately after calling this method, but must wait for the files to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scripts({\r\n * key: 'PostProcess',\r\n * url: [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiScriptFileConfig` for more details.\r\n *\r\n * Once all the files have finished loading they will automatically be converted into a script element\r\n * via `document.createElement('script')`. They will have their language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. This is done in the exact order the files are specified in the url array.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scripts\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {string} [extension='js'] - The default file extension to use if no url is provided.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scripts', function (key, url, xhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiScriptFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiScriptFile(this, key, url, xhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/PackFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/loader/const.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON Pack File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack.\r\n *\r\n * @class PackFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar PackFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function PackFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'packfile\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PackFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n\r\n // Let\'s pass the pack file data over to the Loader ...\r\n this.loader.addPack(this.data, this.config);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON File Pack, or array of packs, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.pack(\'level1\', \'data/Level1Files.json\');\r\n * }\r\n * ```\r\n *\r\n * A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.\r\n * Here is a small example:\r\n *\r\n * ```json\r\n * { \r\n * "test1": {\r\n * "files": [\r\n * {\r\n * "type": "image",\r\n * "key": "taikodrummaster",\r\n * "url": "assets/pics/taikodrummaster.jpg"\r\n * },\r\n * {\r\n * "type": "image",\r\n * "key": "sukasuka-chtholly",\r\n * "url": "assets/pics/sukasuka-chtholly.png"\r\n * }\r\n * ]\r\n * },\r\n * "meta": {\r\n * "generated": "1401380327373",\r\n * "app": "Phaser 3 Asset Packer",\r\n * "url": "https://phaser.io",\r\n * "version": "1.0",\r\n * "copyright": "Photon Storm Ltd. 2018"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The pack can be split into sections. In the example above you\'ll see a section called `test1. You can tell\r\n * the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,\r\n * so you can pass it to the Loader to process additional sections as needed in your game, or you can just load\r\n * them all at once without specifying anything.\r\n *\r\n * The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly\r\n * match that of the file type configs, and all properties available within the file type configs can be used\r\n * in the pack file too.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.pack({\r\n * key: \'level1\',\r\n * url: \'data/Level1Files.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PackFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pack\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'pack\', function (key, url, packKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new PackFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PackFile(this, key, url, xhrSettings, packKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PackFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PackFile.js?')},"./node_modules/phaser/src/loader/filetypes/PluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin.\r\n *\r\n * @class PluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {boolean} [start=false] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar PluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function PluginFile (loader, key, url, start, mapping, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n start = GetFastValue(config, 'start');\r\n mapping = GetFastValue(config, 'mapping');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'plugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n start: start,\r\n mapping: mapping\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PluginFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var start = GetFastValue(config, 'start', false);\r\n var mapping = GetFastValue(config, 'mapping', null);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.install(this.key, this.data, start, mapping);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n var plugin = pluginManager.install(this.key, window[this.key], start, mapping);\r\n\r\n if (start || mapping)\r\n {\r\n // Install into the current Scene Systems and Scene\r\n this.loader.systems[mapping] = plugin;\r\n this.loader.scene[mapping] = plugin;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.plugin('modplayer', 'plugins/ModPlayer.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.plugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#plugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, a plugin function.\r\n * @param {boolean} [start] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new PluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PluginFile(this, key, url, start, mapping, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/SVGFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single SVG File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg.\r\n *\r\n * @class SVGFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SVGFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SVGFile (loader, key, url, svgConfig, xhrSettings)\r\n {\r\n var extension = 'svg';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n svgConfig = GetFastValue(config, 'svgConfig', {});\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'svg',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: GetFastValue(svgConfig, 'width'),\r\n height: GetFastValue(svgConfig, 'height'),\r\n scale: GetFastValue(svgConfig, 'scale')\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var text = this.xhrLoader.responseText;\r\n var svg = [ text ];\r\n var width = this.config.width;\r\n var height = this.config.height;\r\n var scale = this.config.scale;\r\n\r\n resize: if (width && height || scale)\r\n {\r\n var xml = null;\r\n var parser = new DOMParser();\r\n xml = parser.parseFromString(text, 'text/xml');\r\n var svgXML = xml.getElementsByTagName('svg')[0];\r\n\r\n var hasViewBox = svgXML.hasAttribute('viewBox');\r\n var svgWidth = parseFloat(svgXML.getAttribute('width'));\r\n var svgHeight = parseFloat(svgXML.getAttribute('height'));\r\n\r\n if (!hasViewBox && svgWidth && svgHeight)\r\n {\r\n // If there's no viewBox attribute, set one\r\n svgXML.setAttribute('viewBox', '0 0 ' + svgWidth + ' ' + svgHeight);\r\n }\r\n else if (hasViewBox && !svgWidth && !svgHeight)\r\n {\r\n // Get the w/h from the viewbox\r\n var viewBox = svgXML.getAttribute('viewBox').split(/\\s+|,/);\r\n\r\n svgWidth = viewBox[2];\r\n svgHeight = viewBox[3];\r\n }\r\n\r\n if (scale)\r\n {\r\n if (svgWidth && svgHeight)\r\n {\r\n width = svgWidth * scale;\r\n height = svgHeight * scale;\r\n }\r\n else\r\n {\r\n break resize;\r\n }\r\n }\r\n\r\n svgXML.setAttribute('width', width.toString() + 'px');\r\n svgXML.setAttribute('height', height.toString() + 'px');\r\n\r\n svg = [ (new XMLSerializer()).serializeToString(svgXML) ];\r\n }\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n var retry = false;\r\n\r\n this.data.onload = function ()\r\n {\r\n if (!retry)\r\n {\r\n File.revokeObjectURL(_this.data);\r\n }\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n // Safari 8 re-try\r\n if (!retry)\r\n {\r\n retry = true;\r\n\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.data.src = 'data:image/svg+xml,' + encodeURIComponent(svg.join(''));\r\n }\r\n else\r\n {\r\n _this.onProcessError();\r\n }\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they\r\n * will be rendered to bitmap textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'morty');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n * \r\n * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture\r\n * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down\r\n * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize\r\n * the SVG to:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * width: 300,\r\n * height: 600\r\n * }\r\n * });\r\n * ```\r\n * \r\n * Alternatively, you can just provide a scale factor instead:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * scale: 2.5\r\n * }\r\n * });\r\n * ```\r\n * \r\n * If scale, width and height values are all given, the scale has priority and the width and height values are ignored.\r\n *\r\n * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#svg\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SVGFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SVGFile(this, key, url, svgConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SVGFile;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SVGFile.js?")},"./node_modules/phaser/src/loader/filetypes/SceneFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An external Scene JavaScript File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile.\r\n *\r\n * @class SceneFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SceneFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SceneFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#onProcess\r\n * @since 3.16.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#addToCache\r\n * @since 3.16.0\r\n */\r\n addToCache: function ()\r\n {\r\n var code = this.data.concat('(function(){\\n' + 'return new ' + this.key + '();\\n' + '}).call(this);');\r\n\r\n this.loader.sceneManager.add(this.key, eval(code));\r\n\r\n this.complete = true;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an external Scene file, or array of Scene files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.\r\n * \r\n * For a Scene File it's vitally important that the key matches the class name in the JavaScript file.\r\n * \r\n * For example here is the source file:\r\n * \r\n * ```javascript\r\n * class ExternalScene extends Phaser.Scene {\r\n * \r\n * constructor ()\r\n * {\r\n * super('myScene');\r\n * }\r\n * \r\n * }\r\n * ```\r\n * \r\n * Because the class is called `ExternalScene` that is the exact same key you must use when loading it:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('ExternalScene', 'src/yourScene.js');\r\n * }\r\n * ```\r\n * \r\n * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene\r\n * constructor, as we've done in the example above, where the Scene key was changed to `myScene`.\r\n * \r\n * The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Scene Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.sceneFile({\r\n * key: 'Level1',\r\n * url: 'src/Level1.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SceneFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will be added to the Scene Manager.\r\n *\r\n * ```javascript\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * // and later in your game ...\r\n * this.scene.start('Level1');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `WORLD1.` and the key was `Story` the final key will be `WORLD1.Story` and\r\n * this is what you would use to retrieve the text from the Scene Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#sceneFile\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('sceneFile', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SceneFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SceneFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SceneFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SceneFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Scene Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin.\r\n *\r\n * @class ScenePluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScenePluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScenePluginFile (loader, key, url, systemKey, sceneKey, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n systemKey = GetFastValue(config, 'systemKey');\r\n sceneKey = GetFastValue(config, 'sceneKey');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'scenePlugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n systemKey: systemKey,\r\n sceneKey: sceneKey\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScenePluginFile#onProcess\r\n * @since 3.8.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var key = this.key;\r\n var systemKey = GetFastValue(config, 'systemKey', key);\r\n var sceneKey = GetFastValue(config, 'sceneKey', key);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.installScenePlugin(systemKey, this.data, sceneKey, this.loader.scene, true);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n pluginManager.installScenePlugin(systemKey, window[this.key], sceneKey, this.loader.scene, true);\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scenePlugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScenePluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scenePlugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.8.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, set to a plugin function.\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScenePluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScenePluginFile(this, key, url, systemKey, sceneKey, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScenePluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script.\r\n *\r\n * @class ScriptFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScriptFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScriptFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Script file, or array of Script files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.script('aliens', 'lib/aliens.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.script({\r\n * key: 'aliens',\r\n * url: 'lib/aliens.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScriptFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#script\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('script', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScriptFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScriptFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Sprite Sheet Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet.\r\n *\r\n * @class SpriteSheetFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SpriteSheetFile = new Class({\r\n\r\n Extends: ImageFile,\r\n\r\n initialize:\r\n\r\n function SpriteSheetFile (loader, key, url, frameConfig, xhrSettings)\r\n {\r\n ImageFile.call(this, loader, key, url, xhrSettings, frameConfig);\r\n\r\n this.type = 'spritesheet';\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpriteSheetFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addSpriteSheet(this.key, this.data, this.config);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.\r\n *\r\n * The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,\r\n * and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where\r\n * the frames are packed in a way where they take up the least amount of space, and are referenced by their names,\r\n * not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of\r\n * what sort of file you're actually trying to load.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'bot',\r\n * url: 'images/robot.png',\r\n * frameConfig: {\r\n * frameWidth: 32,\r\n * frameHeight: 38,\r\n * startFrame: 0,\r\n * endFrame: 8\r\n * }\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'bot', 0);\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png',\r\n * frameConfig: {\r\n * frameWidth: 256,\r\n * frameHeight: 80\r\n * }\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spritesheet\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SpriteSheetFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SpriteSheetFile(this, key, url, frameConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SpriteSheetFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js?")},"./node_modules/phaser/src/loader/filetypes/TextFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TextFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tilemap CSV File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV.\r\n *\r\n * @class TilemapCSVFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapCSVFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TilemapCSVFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'csv';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'tilemapCSV',\r\n cache: loader.cacheManager.tilemap,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n this.tilemapFormat = TILEMAP_FORMATS.CSV;\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: this.tilemapFormat, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSV Tilemap file, or array of CSV files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * }\r\n * ```\r\n *\r\n * Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV({\r\n * key: 'level1',\r\n * url: 'maps/Level1.csv'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.csv\". It will always add `.csv` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapCSV\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapCSV', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapCSVFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapCSVFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapCSVFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Impact.js Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact.\r\n *\r\n * @class TilemapImpactFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapImpactFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapImpactFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapImpactFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.WELTMEISTER, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Impact.js Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * Impact Tilemap data is created the Impact.js Map Editor called Weltmeister.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapImpact\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapImpact', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapImpactFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapImpactFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapImpactFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tiled Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON.\r\n *\r\n * @class TilemapJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapJSONFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.TILED_JSON, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapJSONFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar TextFile = __webpack_require__(/*! ./TextFile.js */ \"./node_modules/phaser/src/loader/filetypes/TextFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single text file based Unity Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas.\r\n *\r\n * @class UnityAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar UnityAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function UnityAtlasFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new TextFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'txt'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new TextFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.UnityAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var text = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addUnityAtlas(image.key, image.data, text.data, normalMap);\r\n\r\n text.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#unityAtlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new UnityAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new UnityAtlasFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = UnityAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/XMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar ParseXML = __webpack_require__(/*! ../../dom/ParseXML */ \"./node_modules/phaser/src/dom/ParseXML.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml.\r\n *\r\n * @class XMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar XMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function XMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'xml';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'xml',\r\n cache: loader.cacheManager.xml,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.XMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = ParseXML(this.xhrLoader.responseText);\r\n\r\n if (this.data)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n console.warn('Invalid XMLFile: ' + this.key);\r\n \r\n this.onProcessError();\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML file, or array of XML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the XML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the XML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.xml({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * // and later in your game ...\r\n * var data = this.cache.xml.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the XML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.xml\". It will always add `.xml` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#xml\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('xml', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new XMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new XMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = XMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/XMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AnimationJSONFile: __webpack_require__(/*! ./AnimationJSONFile */ "./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js"),\r\n AtlasJSONFile: __webpack_require__(/*! ./AtlasJSONFile */ "./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js"),\r\n AtlasXMLFile: __webpack_require__(/*! ./AtlasXMLFile */ "./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js"),\r\n AudioFile: __webpack_require__(/*! ./AudioFile */ "./node_modules/phaser/src/loader/filetypes/AudioFile.js"),\r\n AudioSpriteFile: __webpack_require__(/*! ./AudioSpriteFile */ "./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js"),\r\n BinaryFile: __webpack_require__(/*! ./BinaryFile */ "./node_modules/phaser/src/loader/filetypes/BinaryFile.js"),\r\n BitmapFontFile: __webpack_require__(/*! ./BitmapFontFile */ "./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js"),\r\n CSSFile: __webpack_require__(/*! ./CSSFile */ "./node_modules/phaser/src/loader/filetypes/CSSFile.js"),\r\n GLSLFile: __webpack_require__(/*! ./GLSLFile */ "./node_modules/phaser/src/loader/filetypes/GLSLFile.js"),\r\n HTML5AudioFile: __webpack_require__(/*! ./HTML5AudioFile */ "./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js"),\r\n HTMLFile: __webpack_require__(/*! ./HTMLFile */ "./node_modules/phaser/src/loader/filetypes/HTMLFile.js"),\r\n HTMLTextureFile: __webpack_require__(/*! ./HTMLTextureFile */ "./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js"),\r\n ImageFile: __webpack_require__(/*! ./ImageFile */ "./node_modules/phaser/src/loader/filetypes/ImageFile.js"),\r\n JSONFile: __webpack_require__(/*! ./JSONFile */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js"),\r\n MultiAtlasFile: __webpack_require__(/*! ./MultiAtlasFile */ "./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js"),\r\n MultiScriptFile: __webpack_require__(/*! ./MultiScriptFile */ "./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js"),\r\n PackFile: __webpack_require__(/*! ./PackFile */ "./node_modules/phaser/src/loader/filetypes/PackFile.js"),\r\n PluginFile: __webpack_require__(/*! ./PluginFile */ "./node_modules/phaser/src/loader/filetypes/PluginFile.js"),\r\n SceneFile: __webpack_require__(/*! ./SceneFile */ "./node_modules/phaser/src/loader/filetypes/SceneFile.js"),\r\n ScenePluginFile: __webpack_require__(/*! ./ScenePluginFile */ "./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js"),\r\n ScriptFile: __webpack_require__(/*! ./ScriptFile */ "./node_modules/phaser/src/loader/filetypes/ScriptFile.js"),\r\n SpriteSheetFile: __webpack_require__(/*! ./SpriteSheetFile */ "./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js"),\r\n SVGFile: __webpack_require__(/*! ./SVGFile */ "./node_modules/phaser/src/loader/filetypes/SVGFile.js"),\r\n TextFile: __webpack_require__(/*! ./TextFile */ "./node_modules/phaser/src/loader/filetypes/TextFile.js"),\r\n TilemapCSVFile: __webpack_require__(/*! ./TilemapCSVFile */ "./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js"),\r\n TilemapImpactFile: __webpack_require__(/*! ./TilemapImpactFile */ "./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js"),\r\n TilemapJSONFile: __webpack_require__(/*! ./TilemapJSONFile */ "./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js"),\r\n UnityAtlasFile: __webpack_require__(/*! ./UnityAtlasFile */ "./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js"),\r\n XMLFile: __webpack_require__(/*! ./XMLFile */ "./node_modules/phaser/src/loader/filetypes/XMLFile.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/index.js?')},"./node_modules/phaser/src/loader/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/loader/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Loader\r\n */\r\n\r\nvar Loader = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/loader/events/index.js"),\r\n\r\n FileTypes: __webpack_require__(/*! ./filetypes */ "./node_modules/phaser/src/loader/filetypes/index.js"),\r\n\r\n File: __webpack_require__(/*! ./File */ "./node_modules/phaser/src/loader/File.js"),\r\n FileTypesManager: __webpack_require__(/*! ./FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js"),\r\n GetURL: __webpack_require__(/*! ./GetURL */ "./node_modules/phaser/src/loader/GetURL.js"),\r\n LoaderPlugin: __webpack_require__(/*! ./LoaderPlugin */ "./node_modules/phaser/src/loader/LoaderPlugin.js"),\r\n MergeXHRSettings: __webpack_require__(/*! ./MergeXHRSettings */ "./node_modules/phaser/src/loader/MergeXHRSettings.js"),\r\n MultiFile: __webpack_require__(/*! ./MultiFile */ "./node_modules/phaser/src/loader/MultiFile.js"),\r\n XHRLoader: __webpack_require__(/*! ./XHRLoader */ "./node_modules/phaser/src/loader/XHRLoader.js"),\r\n XHRSettings: __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nLoader = Extend(false, Loader, CONST);\r\n\r\nmodule.exports = Loader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/index.js?')},"./node_modules/phaser/src/math/Average.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Average.js?")},"./node_modules/phaser/src/math/Bernstein.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - [description]\r\n * @param {number} i - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Bernstein.js?')},"./node_modules/phaser/src/math/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Between.js?")},"./node_modules/phaser/src/math/CatmullRom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - [description]\r\n * @param {number} p0 - [description]\r\n * @param {number} p1 - [description]\r\n * @param {number} p2 - [description]\r\n * @param {number} p3 - [description]\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CatmullRom.js?")},"./node_modules/phaser/src/math/CeilTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CeilTo.js?")},"./node_modules/phaser/src/math/Clamp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Clamp.js?")},"./node_modules/phaser/src/math/DegToRad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/DegToRad.js?')},"./node_modules/phaser/src/math/Difference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Difference.js?")},"./node_modules/phaser/src/math/Factorial.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Factorial.js?")},"./node_modules/phaser/src/math/FloatBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloatBetween.js?")},"./node_modules/phaser/src/math/FloorTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloorTo.js?")},"./node_modules/phaser/src/math/FromPercent.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FromPercent.js?')},"./node_modules/phaser/src/math/GetSpeed.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the speed required to cover a distance in the time given.\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance to travel in pixels.\r\n * @param {integer} time - The time, in ms, to cover the distance in.\r\n *\r\n * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given.\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/GetSpeed.js?")},"./node_modules/phaser/src/math/IsEven.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for "is number" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEven.js?')},"./node_modules/phaser/src/math/IsEvenStrict.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for "is number" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEvenStrict.js?')},"./node_modules/phaser/src/math/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Linear.js?")},"./node_modules/phaser/src/math/Matrix3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - [description]\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix3.js?')},"./node_modules/phaser/src/math/Matrix4.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - [description]\r\n * @param {number} pitch - [description]\r\n * @param {number} roll - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix4.js?')},"./node_modules/phaser/src/math/MaxAdd.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MaxAdd.js?")},"./node_modules/phaser/src/math/MinSub.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MinSub.js?")},"./node_modules/phaser/src/math/Percent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Percent.js?")},"./node_modules/phaser/src/math/Quaternion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix3 = __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared \'private\' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - [description]\r\n * @param {Phaser.Math.Vector3} b - [description]\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // "from" and "to" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake\'s article in 1987 SIGGRAPH course notes\r\n // article "Quaternion Calculus and Fast Animation".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn\'t quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Quaternion.js?')},"./node_modules/phaser/src/math/RadToDeg.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RadToDeg.js?')},"./node_modules/phaser/src/math/RandomXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXY.js?")},"./node_modules/phaser/src/math/RandomXYZ.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZ.js?")},"./node_modules/phaser/src/math/RandomXYZW.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZW.js?")},"./node_modules/phaser/src/math/Rotate.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Rotate.js?")},"./node_modules/phaser/src/math/RotateAround.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle`.\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAround.js?")},"./node_modules/phaser/src/math/RotateAroundDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Geom.Point} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAroundDistance.js?")},"./node_modules/phaser/src/math/RotateVec3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = __webpack_require__(/*! ../math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix4 = __webpack_require__(/*! ../math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar Quaternion = __webpack_require__(/*! ../math/Quaternion */ "./node_modules/phaser/src/math/Quaternion.js");\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateVec3.js?')},"./node_modules/phaser/src/math/RoundAwayFromZero.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // "Opposite" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundAwayFromZero.js?')},"./node_modules/phaser/src/math/RoundTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundTo.js?")},"./node_modules/phaser/src/math/SinCosTableGenerator.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SinCosTableGenerator.js?")},"./node_modules/phaser/src/math/SmoothStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmoothStep.js?")},"./node_modules/phaser/src/math/SmootherStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmootherStep.js?")},"./node_modules/phaser/src/math/ToXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vec2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/ToXY.js?')},"./node_modules/phaser/src/math/TransformXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/TransformXY.js?')},"./node_modules/phaser/src/math/Vector2.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Right-hand normalize (make unit length) this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector2.js?")},"./node_modules/phaser/src/math/Vector3.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector3.js?")},"./node_modules/phaser/src/math/Vector4.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector4.js?")},"./node_modules/phaser/src/math/Within.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Within.js?")},"./node_modules/phaser/src/math/Wrap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Wrap.js?")},"./node_modules/phaser/src/math/angle/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Between.js?")},"./node_modules/phaser/src/math/angle/BetweenPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPoints.js?")},"./node_modules/phaser/src/math/angle/BetweenPointsY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPointsY.js?")},"./node_modules/phaser/src/math/angle/BetweenY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenY.js?")},"./node_modules/phaser/src/math/angle/CounterClockwise.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/CounterClockwise.js?')},"./node_modules/phaser/src/math/angle/Normalize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Normalize.js?")},"./node_modules/phaser/src/math/angle/Reverse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js");\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Reverse.js?')},"./node_modules/phaser/src/math/angle/RotateTo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/RotateTo.js?')},"./node_modules/phaser/src/math/angle/ShortestBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/ShortestBetween.js?")},"./node_modules/phaser/src/math/angle/Wrap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Wrap.js?')},"./node_modules/phaser/src/math/angle/WrapDegrees.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/WrapDegrees.js?')},"./node_modules/phaser/src/math/angle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/angle/Between.js"),\r\n BetweenPoints: __webpack_require__(/*! ./BetweenPoints */ "./node_modules/phaser/src/math/angle/BetweenPoints.js"),\r\n BetweenPointsY: __webpack_require__(/*! ./BetweenPointsY */ "./node_modules/phaser/src/math/angle/BetweenPointsY.js"),\r\n BetweenY: __webpack_require__(/*! ./BetweenY */ "./node_modules/phaser/src/math/angle/BetweenY.js"),\r\n CounterClockwise: __webpack_require__(/*! ./CounterClockwise */ "./node_modules/phaser/src/math/angle/CounterClockwise.js"),\r\n Normalize: __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/math/angle/Reverse.js"),\r\n RotateTo: __webpack_require__(/*! ./RotateTo */ "./node_modules/phaser/src/math/angle/RotateTo.js"),\r\n ShortestBetween: __webpack_require__(/*! ./ShortestBetween */ "./node_modules/phaser/src/math/angle/ShortestBetween.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js"),\r\n WrapDegrees: __webpack_require__(/*! ./WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/index.js?')},"./node_modules/phaser/src/math/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/const.js?")},"./node_modules/phaser/src/math/distance/DistanceBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceBetween.js?")},"./node_modules/phaser/src/math/distance/DistancePower.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistancePower.js?")},"./node_modules/phaser/src/math/distance/DistanceSquared.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceSquared.js?")},"./node_modules/phaser/src/math/distance/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js"),\r\n Power: __webpack_require__(/*! ./DistancePower */ "./node_modules/phaser/src/math/distance/DistancePower.js"),\r\n Squared: __webpack_require__(/*! ./DistanceSquared */ "./node_modules/phaser/src/math/distance/DistanceSquared.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/index.js?')},"./node_modules/phaser/src/math/easing/EaseMap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Back = __webpack_require__(/*! ./back */ \"./node_modules/phaser/src/math/easing/back/index.js\");\r\nvar Bounce = __webpack_require__(/*! ./bounce */ \"./node_modules/phaser/src/math/easing/bounce/index.js\");\r\nvar Circular = __webpack_require__(/*! ./circular */ \"./node_modules/phaser/src/math/easing/circular/index.js\");\r\nvar Cubic = __webpack_require__(/*! ./cubic */ \"./node_modules/phaser/src/math/easing/cubic/index.js\");\r\nvar Elastic = __webpack_require__(/*! ./elastic */ \"./node_modules/phaser/src/math/easing/elastic/index.js\");\r\nvar Expo = __webpack_require__(/*! ./expo */ \"./node_modules/phaser/src/math/easing/expo/index.js\");\r\nvar Linear = __webpack_require__(/*! ./linear */ \"./node_modules/phaser/src/math/easing/linear/index.js\");\r\nvar Quadratic = __webpack_require__(/*! ./quadratic */ \"./node_modules/phaser/src/math/easing/quadratic/index.js\");\r\nvar Quartic = __webpack_require__(/*! ./quartic */ \"./node_modules/phaser/src/math/easing/quartic/index.js\");\r\nvar Quintic = __webpack_require__(/*! ./quintic */ \"./node_modules/phaser/src/math/easing/quintic/index.js\");\r\nvar Sine = __webpack_require__(/*! ./sine */ \"./node_modules/phaser/src/math/easing/sine/index.js\");\r\nvar Stepped = __webpack_require__(/*! ./stepped */ \"./node_modules/phaser/src/math/easing/stepped/index.js\");\r\n\r\n// EaseMap\r\nmodule.exports = {\r\n\r\n Power0: Linear,\r\n Power1: Quadratic.Out,\r\n Power2: Cubic.Out,\r\n Power3: Quartic.Out,\r\n Power4: Quintic.Out,\r\n\r\n Linear: Linear,\r\n Quad: Quadratic.Out,\r\n Cubic: Cubic.Out,\r\n Quart: Quartic.Out,\r\n Quint: Quintic.Out,\r\n Sine: Sine.Out,\r\n Expo: Expo.Out,\r\n Circ: Circular.Out,\r\n Elastic: Elastic.Out,\r\n Back: Back.Out,\r\n Bounce: Bounce.Out,\r\n Stepped: Stepped,\r\n\r\n 'Quad.easeIn': Quadratic.In,\r\n 'Cubic.easeIn': Cubic.In,\r\n 'Quart.easeIn': Quartic.In,\r\n 'Quint.easeIn': Quintic.In,\r\n 'Sine.easeIn': Sine.In,\r\n 'Expo.easeIn': Expo.In,\r\n 'Circ.easeIn': Circular.In,\r\n 'Elastic.easeIn': Elastic.In,\r\n 'Back.easeIn': Back.In,\r\n 'Bounce.easeIn': Bounce.In,\r\n\r\n 'Quad.easeOut': Quadratic.Out,\r\n 'Cubic.easeOut': Cubic.Out,\r\n 'Quart.easeOut': Quartic.Out,\r\n 'Quint.easeOut': Quintic.Out,\r\n 'Sine.easeOut': Sine.Out,\r\n 'Expo.easeOut': Expo.Out,\r\n 'Circ.easeOut': Circular.Out,\r\n 'Elastic.easeOut': Elastic.Out,\r\n 'Back.easeOut': Back.Out,\r\n 'Bounce.easeOut': Bounce.Out,\r\n\r\n 'Quad.easeInOut': Quadratic.InOut,\r\n 'Cubic.easeInOut': Cubic.InOut,\r\n 'Quart.easeInOut': Quartic.InOut,\r\n 'Quint.easeInOut': Quintic.InOut,\r\n 'Sine.easeInOut': Sine.InOut,\r\n 'Expo.easeInOut': Expo.InOut,\r\n 'Circ.easeInOut': Circular.InOut,\r\n 'Elastic.easeInOut': Elastic.InOut,\r\n 'Back.easeInOut': Back.InOut,\r\n 'Bounce.easeInOut': Bounce.InOut\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/EaseMap.js?")},"./node_modules/phaser/src/math/easing/back/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/In.js?")},"./node_modules/phaser/src/math/easing/back/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/InOut.js?")},"./node_modules/phaser/src/math/easing/back/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/Out.js?")},"./node_modules/phaser/src/math/easing/back/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/back/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/back/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/back/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/index.js?')},"./node_modules/phaser/src/math/easing/bounce/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/In.js?")},"./node_modules/phaser/src/math/easing/bounce/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/InOut.js?")},"./node_modules/phaser/src/math/easing/bounce/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/Out.js?")},"./node_modules/phaser/src/math/easing/bounce/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/bounce/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/bounce/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/bounce/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/index.js?')},"./node_modules/phaser/src/math/easing/circular/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/In.js?")},"./node_modules/phaser/src/math/easing/circular/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/InOut.js?")},"./node_modules/phaser/src/math/easing/circular/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/Out.js?")},"./node_modules/phaser/src/math/easing/circular/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/circular/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/circular/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/circular/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/index.js?')},"./node_modules/phaser/src/math/easing/cubic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/In.js?")},"./node_modules/phaser/src/math/easing/cubic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/InOut.js?")},"./node_modules/phaser/src/math/easing/cubic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/Out.js?")},"./node_modules/phaser/src/math/easing/cubic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/cubic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/cubic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/cubic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/index.js?')},"./node_modules/phaser/src/math/easing/elastic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/In.js?")},"./node_modules/phaser/src/math/easing/elastic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/InOut.js?")},"./node_modules/phaser/src/math/easing/elastic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/Out.js?")},"./node_modules/phaser/src/math/easing/elastic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/elastic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/elastic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/elastic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/index.js?')},"./node_modules/phaser/src/math/easing/expo/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/In.js?")},"./node_modules/phaser/src/math/easing/expo/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/InOut.js?")},"./node_modules/phaser/src/math/easing/expo/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/Out.js?")},"./node_modules/phaser/src/math/easing/expo/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/expo/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/expo/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/expo/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/index.js?')},"./node_modules/phaser/src/math/easing/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: __webpack_require__(/*! ./back */ "./node_modules/phaser/src/math/easing/back/index.js"),\r\n Bounce: __webpack_require__(/*! ./bounce */ "./node_modules/phaser/src/math/easing/bounce/index.js"),\r\n Circular: __webpack_require__(/*! ./circular */ "./node_modules/phaser/src/math/easing/circular/index.js"),\r\n Cubic: __webpack_require__(/*! ./cubic */ "./node_modules/phaser/src/math/easing/cubic/index.js"),\r\n Elastic: __webpack_require__(/*! ./elastic */ "./node_modules/phaser/src/math/easing/elastic/index.js"),\r\n Expo: __webpack_require__(/*! ./expo */ "./node_modules/phaser/src/math/easing/expo/index.js"),\r\n Linear: __webpack_require__(/*! ./linear */ "./node_modules/phaser/src/math/easing/linear/index.js"),\r\n Quadratic: __webpack_require__(/*! ./quadratic */ "./node_modules/phaser/src/math/easing/quadratic/index.js"),\r\n Quartic: __webpack_require__(/*! ./quartic */ "./node_modules/phaser/src/math/easing/quartic/index.js"),\r\n Quintic: __webpack_require__(/*! ./quintic */ "./node_modules/phaser/src/math/easing/quintic/index.js"),\r\n Sine: __webpack_require__(/*! ./sine */ "./node_modules/phaser/src/math/easing/sine/index.js"),\r\n Stepped: __webpack_require__(/*! ./stepped */ "./node_modules/phaser/src/math/easing/stepped/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/index.js?')},"./node_modules/phaser/src/math/easing/linear/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/Linear.js?")},"./node_modules/phaser/src/math/easing/linear/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Linear\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/easing/linear/Linear.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/index.js?')},"./node_modules/phaser/src/math/easing/quadratic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/In.js?")},"./node_modules/phaser/src/math/easing/quadratic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/InOut.js?")},"./node_modules/phaser/src/math/easing/quadratic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/Out.js?")},"./node_modules/phaser/src/math/easing/quadratic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quadratic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quadratic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quadratic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/index.js?')},"./node_modules/phaser/src/math/easing/quartic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/In.js?")},"./node_modules/phaser/src/math/easing/quartic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/InOut.js?")},"./node_modules/phaser/src/math/easing/quartic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/Out.js?")},"./node_modules/phaser/src/math/easing/quartic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quartic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quartic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quartic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/index.js?')},"./node_modules/phaser/src/math/easing/quintic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/In.js?")},"./node_modules/phaser/src/math/easing/quintic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/InOut.js?")},"./node_modules/phaser/src/math/easing/quintic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/Out.js?")},"./node_modules/phaser/src/math/easing/quintic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quintic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quintic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quintic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/index.js?')},"./node_modules/phaser/src/math/easing/sine/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/In.js?")},"./node_modules/phaser/src/math/easing/sine/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/InOut.js?")},"./node_modules/phaser/src/math/easing/sine/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/Out.js?")},"./node_modules/phaser/src/math/easing/sine/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/sine/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/sine/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/sine/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/index.js?')},"./node_modules/phaser/src/math/easing/stepped/Stepped.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/Stepped.js?")},"./node_modules/phaser/src/math/easing/stepped/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Stepped */ "./node_modules/phaser/src/math/easing/stepped/Stepped.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/index.js?')},"./node_modules/phaser/src/math/fuzzy/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Ceil.js?")},"./node_modules/phaser/src/math/fuzzy/Equal.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Equal.js?")},"./node_modules/phaser/src/math/fuzzy/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Floor.js?")},"./node_modules/phaser/src/math/fuzzy/GreaterThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/GreaterThan.js?")},"./node_modules/phaser/src/math/fuzzy/LessThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/LessThan.js?")},"./node_modules/phaser/src/math/fuzzy/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/math/fuzzy/Ceil.js"),\r\n Equal: __webpack_require__(/*! ./Equal */ "./node_modules/phaser/src/math/fuzzy/Equal.js"),\r\n Floor: __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/math/fuzzy/Floor.js"),\r\n GreaterThan: __webpack_require__(/*! ./GreaterThan */ "./node_modules/phaser/src/math/fuzzy/GreaterThan.js"),\r\n LessThan: __webpack_require__(/*! ./LessThan */ "./node_modules/phaser/src/math/fuzzy/LessThan.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/index.js?')},"./node_modules/phaser/src/math/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: __webpack_require__(/*! ./angle/ */ "./node_modules/phaser/src/math/angle/index.js"),\r\n Distance: __webpack_require__(/*! ./distance/ */ "./node_modules/phaser/src/math/distance/index.js"),\r\n Easing: __webpack_require__(/*! ./easing/ */ "./node_modules/phaser/src/math/easing/index.js"),\r\n Fuzzy: __webpack_require__(/*! ./fuzzy/ */ "./node_modules/phaser/src/math/fuzzy/index.js"),\r\n Interpolation: __webpack_require__(/*! ./interpolation/ */ "./node_modules/phaser/src/math/interpolation/index.js"),\r\n Pow2: __webpack_require__(/*! ./pow2/ */ "./node_modules/phaser/src/math/pow2/index.js"),\r\n Snap: __webpack_require__(/*! ./snap/ */ "./node_modules/phaser/src/math/snap/index.js"),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: __webpack_require__(/*! ./random-data-generator/RandomDataGenerator */ "./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js"),\r\n\r\n // Single functions\r\n Average: __webpack_require__(/*! ./Average */ "./node_modules/phaser/src/math/Average.js"),\r\n Bernstein: __webpack_require__(/*! ./Bernstein */ "./node_modules/phaser/src/math/Bernstein.js"),\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/Between.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js"),\r\n CeilTo: __webpack_require__(/*! ./CeilTo */ "./node_modules/phaser/src/math/CeilTo.js"),\r\n Clamp: __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js"),\r\n DegToRad: __webpack_require__(/*! ./DegToRad */ "./node_modules/phaser/src/math/DegToRad.js"),\r\n Difference: __webpack_require__(/*! ./Difference */ "./node_modules/phaser/src/math/Difference.js"),\r\n Factorial: __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js"),\r\n FloatBetween: __webpack_require__(/*! ./FloatBetween */ "./node_modules/phaser/src/math/FloatBetween.js"),\r\n FloorTo: __webpack_require__(/*! ./FloorTo */ "./node_modules/phaser/src/math/FloorTo.js"),\r\n FromPercent: __webpack_require__(/*! ./FromPercent */ "./node_modules/phaser/src/math/FromPercent.js"),\r\n GetSpeed: __webpack_require__(/*! ./GetSpeed */ "./node_modules/phaser/src/math/GetSpeed.js"),\r\n IsEven: __webpack_require__(/*! ./IsEven */ "./node_modules/phaser/src/math/IsEven.js"),\r\n IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "./node_modules/phaser/src/math/IsEvenStrict.js"),\r\n Linear: __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/Linear.js"),\r\n MaxAdd: __webpack_require__(/*! ./MaxAdd */ "./node_modules/phaser/src/math/MaxAdd.js"),\r\n MinSub: __webpack_require__(/*! ./MinSub */ "./node_modules/phaser/src/math/MinSub.js"),\r\n Percent: __webpack_require__(/*! ./Percent */ "./node_modules/phaser/src/math/Percent.js"),\r\n RadToDeg: __webpack_require__(/*! ./RadToDeg */ "./node_modules/phaser/src/math/RadToDeg.js"),\r\n RandomXY: __webpack_require__(/*! ./RandomXY */ "./node_modules/phaser/src/math/RandomXY.js"),\r\n RandomXYZ: __webpack_require__(/*! ./RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js"),\r\n RandomXYZW: __webpack_require__(/*! ./RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/math/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/math/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js"),\r\n RoundAwayFromZero: __webpack_require__(/*! ./RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js"),\r\n RoundTo: __webpack_require__(/*! ./RoundTo */ "./node_modules/phaser/src/math/RoundTo.js"),\r\n SinCosTableGenerator: __webpack_require__(/*! ./SinCosTableGenerator */ "./node_modules/phaser/src/math/SinCosTableGenerator.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js"),\r\n ToXY: __webpack_require__(/*! ./ToXY */ "./node_modules/phaser/src/math/ToXY.js"),\r\n TransformXY: __webpack_require__(/*! ./TransformXY */ "./node_modules/phaser/src/math/TransformXY.js"),\r\n Within: __webpack_require__(/*! ./Within */ "./node_modules/phaser/src/math/Within.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/Wrap.js"),\r\n\r\n // Vector classes\r\n Vector2: __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js"),\r\n Vector3: __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js"),\r\n Vector4: __webpack_require__(/*! ./Vector4 */ "./node_modules/phaser/src/math/Vector4.js"),\r\n Matrix3: __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js"),\r\n Matrix4: __webpack_require__(/*! ./Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js"),\r\n Quaternion: __webpack_require__(/*! ./Quaternion */ "./node_modules/phaser/src/math/Quaternion.js"),\r\n RotateVec3: __webpack_require__(/*! ./RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/index.js?')},"./node_modules/phaser/src/math/interpolation/BezierInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = __webpack_require__(/*! ../Bernstein */ "./node_modules/phaser/src/math/Bernstein.js");\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/BezierInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/LinearInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/LinearInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = __webpack_require__(/*! ../SmoothStep */ \"./node_modules/phaser/src/math/SmoothStep.js\");\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = __webpack_require__(/*! ../SmootherStep */ \"./node_modules/phaser/src/math/SmootherStep.js\");\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: __webpack_require__(/*! ./BezierInterpolation */ "./node_modules/phaser/src/math/interpolation/BezierInterpolation.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRomInterpolation */ "./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js"),\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js"),\r\n Linear: __webpack_require__(/*! ./LinearInterpolation */ "./node_modules/phaser/src/math/interpolation/LinearInterpolation.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/index.js?')},"./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetPowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSizePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValuePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: __webpack_require__(/*! ./GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js"),\r\n IsSize: __webpack_require__(/*! ./IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js"),\r\n IsValue: __webpack_require__(/*! ./IsValuePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/index.js?')},"./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @param {array} [array] - The array to be shuffled.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js?")},"./node_modules/phaser/src/math/snap/SnapCeil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapCeil.js?")},"./node_modules/phaser/src/math/snap/SnapFloor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapFloor.js?")},"./node_modules/phaser/src/math/snap/SnapTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapTo.js?")},"./node_modules/phaser/src/math/snap/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js"),\r\n Floor: __webpack_require__(/*! ./SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js"),\r\n To: __webpack_require__(/*! ./SnapTo */ "./node_modules/phaser/src/math/snap/SnapTo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/index.js?')},"./node_modules/phaser/src/phaser.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n__webpack_require__(/*! ./polyfills */ "./node_modules/phaser/src/polyfills/index.js");\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/const.js");\r\nvar Extend = __webpack_require__(/*! ./utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser\r\n */\r\n\r\nvar Phaser = {\r\n\r\n Actions: __webpack_require__(/*! ./actions */ "./node_modules/phaser/src/actions/index.js"),\r\n Animations: __webpack_require__(/*! ./animations */ "./node_modules/phaser/src/animations/index.js"),\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js"),\r\n Cache: __webpack_require__(/*! ./cache */ "./node_modules/phaser/src/cache/index.js"),\r\n Cameras: __webpack_require__(/*! ./cameras */ "./node_modules/phaser/src/cameras/index.js"),\r\n Core: __webpack_require__(/*! ./core */ "./node_modules/phaser/src/core/index.js"),\r\n Class: __webpack_require__(/*! ./utils/Class */ "./node_modules/phaser/src/utils/Class.js"),\r\n Create: __webpack_require__(/*! ./create */ "./node_modules/phaser/src/create/index.js"),\r\n Curves: __webpack_require__(/*! ./curves */ "./node_modules/phaser/src/curves/index.js"),\r\n Data: __webpack_require__(/*! ./data */ "./node_modules/phaser/src/data/index.js"),\r\n Display: __webpack_require__(/*! ./display */ "./node_modules/phaser/src/display/index.js"),\r\n DOM: __webpack_require__(/*! ./dom */ "./node_modules/phaser/src/dom/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/events/index.js"),\r\n Game: __webpack_require__(/*! ./core/Game */ "./node_modules/phaser/src/core/Game.js"),\r\n GameObjects: __webpack_require__(/*! ./gameobjects */ "./node_modules/phaser/src/gameobjects/index.js"),\r\n Geom: __webpack_require__(/*! ./geom */ "./node_modules/phaser/src/geom/index.js"),\r\n Input: __webpack_require__(/*! ./input */ "./node_modules/phaser/src/input/index.js"),\r\n Loader: __webpack_require__(/*! ./loader */ "./node_modules/phaser/src/loader/index.js"),\r\n Math: __webpack_require__(/*! ./math */ "./node_modules/phaser/src/math/index.js"),\r\n Physics: __webpack_require__(/*! ./physics */ "./node_modules/phaser/src/physics/index.js"),\r\n Plugins: __webpack_require__(/*! ./plugins */ "./node_modules/phaser/src/plugins/index.js"),\r\n Renderer: __webpack_require__(/*! ./renderer */ "./node_modules/phaser/src/renderer/index.js"),\r\n Scale: __webpack_require__(/*! ./scale */ "./node_modules/phaser/src/scale/index.js"),\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js"),\r\n Scene: __webpack_require__(/*! ./scene/Scene */ "./node_modules/phaser/src/scene/Scene.js"),\r\n Scenes: __webpack_require__(/*! ./scene */ "./node_modules/phaser/src/scene/index.js"),\r\n Structs: __webpack_require__(/*! ./structs */ "./node_modules/phaser/src/structs/index.js"),\r\n Textures: __webpack_require__(/*! ./textures */ "./node_modules/phaser/src/textures/index.js"),\r\n Tilemaps: __webpack_require__(/*! ./tilemaps */ "./node_modules/phaser/src/tilemaps/index.js"),\r\n Time: __webpack_require__(/*! ./time */ "./node_modules/phaser/src/time/index.js"),\r\n Tweens: __webpack_require__(/*! ./tweens */ "./node_modules/phaser/src/tweens/index.js"),\r\n Utils: __webpack_require__(/*! ./utils */ "./node_modules/phaser/src/utils/index.js")\r\n\r\n};\r\n\r\n// Merge in the optional plugins\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n Phaser.Sound = __webpack_require__(/*! ./sound */ "./node_modules/phaser/src/sound/index.js");\r\n}\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n Phaser.Cameras.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src */ "./node_modules/phaser/plugins/camera3d/src/index.js");\r\n Phaser.GameObjects.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n Phaser.GameObjects.Factories.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DFactory */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js");\r\n Phaser.GameObjects.Creators.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DCreator */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n Phaser.FacebookInstantGamesPlugin = __webpack_require__(/*! ../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n// Merge in the consts\r\n\r\nPhaser = Extend(false, Phaser, CONST);\r\n\r\n/**\r\n * The root types namespace.\r\n * \r\n * @namespace Phaser.Types\r\n * @since 3.17.0\r\n */\r\n\r\n// Export it\r\n\r\nmodule.exports = Phaser;\r\n\r\nglobal.Phaser = Phaser;\r\n\r\n/*\r\n * "Documentation is like pizza: when it is good, it is very, very good;\r\n * and when it is bad, it is better than nothing."\r\n * -- Dick Brandon\r\n */\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/phaser.js?')},"./node_modules/phaser/src/physics/arcade/ArcadeImage.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\n\n/**\n * @classdesc\n * An Arcade Physics Image is an Image with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Image and an Arcade Sprite is that you cannot animate an Arcade Image.\n *\n * @class Image\n * @extends Phaser.GameObjects.Image\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeImage = new Class({\n\n Extends: Image,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeImage (scene, x, y, texture, frame)\n {\n Image.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Image#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeImage;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeImage.js?')},"./node_modules/phaser/src/physics/arcade/ArcadePhysics.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\nvar DistanceSquared = __webpack_require__(/*! ../../math/distance/DistanceSquared */ \"./node_modules/phaser/src/math/distance/DistanceSquared.js\");\nvar Factory = __webpack_require__(/*! ./Factory */ \"./node_modules/phaser/src/physics/arcade/Factory.js\");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\nvar OverlapRect = __webpack_require__(/*! ./components/OverlapRect */ \"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js\");\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\nvar World = __webpack_require__(/*! ./World */ \"./node_modules/phaser/src/physics/arcade/World.js\");\n\n/**\n * @classdesc\n * The Arcade Physics Plugin belongs to a Scene and sets up and manages the Scene's physics simulation.\n * It also holds some useful methods for moving and rotating Arcade Physics Bodies.\n *\n * You can access it from within a Scene using `this.physics`.\n * \n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @class ArcadePhysics\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene that this Plugin belongs to.\n */\nvar ArcadePhysics = new Class({\n\n initialize:\n\n function ArcadePhysics (scene)\n {\n /**\n * The Scene that this Plugin belongs to.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * The Scene's Systems.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#systems\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#config\n * @type {object}\n * @since 3.0.0\n */\n this.config = this.getConfig();\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world;\n\n /**\n * An object holding the Arcade Physics factory methods.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#add\n * @type {Phaser.Physics.Arcade.Factory}\n * @since 3.0.0\n */\n this.add;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n scene.sys.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n if (!this.world)\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Creates the physics configuration for the current Scene.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig\n * @since 3.0.0\n *\n * @return {object} The physics configuration.\n */\n getConfig: function ()\n {\n var gameConfig = this.systems.game.config.physics;\n var sceneConfig = this.systems.settings.physics;\n\n var config = Merge(\n GetFastValue(sceneConfig, 'arcade', {}),\n GetFastValue(gameConfig, 'arcade', {})\n );\n\n return config;\n },\n\n /**\n * Tests if Game Objects overlap. See {@link Phaser.Physics.Arcade.World#overlap}\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlap\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if at least one Game Object overlaps another.\n *\n * @see Phaser.Physics.Arcade.World#overlap\n */\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\n {\n if (overlapCallback === undefined) { overlapCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\n\n return this.world.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\n },\n\n /**\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\n *\n * If you don't require separation then use {@link #overlap} instead.\n *\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\n *\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\n * \n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\n *\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\n * objects are passed to it.\n *\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collide\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any overlapping Game Objects were separated, otherwise false.\n *\n * @see Phaser.Physics.Arcade.World#collide\n */\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n if (collideCallback === undefined) { collideCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = collideCallback; }\n\n return this.world.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\n },\n\n /**\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n * \n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\n * dynamic maps, this method can prove very useful.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collideTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.collideTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.overlapTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Pauses the simulation.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#pause\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n pause: function ()\n {\n return this.world.pause();\n },\n\n /**\n * Resumes the simulation (if paused).\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#resume\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n resume: function ()\n {\n return this.world.resume();\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to accelerate towards.\n * @param {number} y - The y coordinate to accelerate towards.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateTo: function (gameObject, x, y, speed, xSpeedMax, ySpeedMax)\n {\n if (speed === undefined) { speed = 60; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n gameObject.body.acceleration.setToPolar(angle, speed);\n\n if (xSpeedMax !== undefined && ySpeedMax !== undefined)\n {\n gameObject.body.maxVelocity.set(xSpeedMax, ySpeedMax);\n }\n\n return angle;\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {Phaser.GameObjects.GameObject} destination - The Game Object to move towards. Can be any object but must have visible x/y properties.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateToObject: function (gameObject, destination, speed, xSpeedMax, ySpeedMax)\n {\n return this.accelerateTo(gameObject, destination.x, destination.y, speed, xSpeedMax, ySpeedMax);\n },\n\n /**\n * Finds the Dynamic Body closest to a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#closest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The closest Dynamic Body to the given source point.\n */\n closest: function (source)\n {\n var bodies = this.world.bodies;\n\n var min = Number.MAX_VALUE;\n var closest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance < min)\n {\n closest = target;\n min = distance;\n }\n\n });\n\n return closest;\n },\n\n /**\n * Finds the Dynamic Body farthest from a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#furthest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The Dynamic Body furthest away from the given source point.\n */\n furthest: function (source)\n {\n var bodies = this.world.bodies;\n\n var max = -1;\n var farthest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance > max)\n {\n farthest = target;\n max = distance;\n }\n\n });\n\n return farthest;\n },\n\n /**\n * Move the given display object towards the x/y coordinates at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to move towards.\n * @param {number} y - The y coordinate to move towards.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveTo: function (gameObject, x, y, speed, maxTime)\n {\n if (speed === undefined) { speed = 60; }\n if (maxTime === undefined) { maxTime = 0; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n if (maxTime > 0)\n {\n // We know how many pixels we need to move, but how fast?\n speed = DistanceBetween(gameObject.x, gameObject.y, x, y) / (maxTime / 1000);\n }\n\n gameObject.body.velocity.setToPolar(angle, speed);\n\n return angle;\n },\n\n /**\n * Move the given display object towards the destination object at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {object} destination - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveToObject: function (gameObject, destination, speed, maxTime)\n {\n return this.moveTo(gameObject, destination.x, destination.y, speed, maxTime);\n },\n\n /**\n * Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromAngle\n * @since 3.0.0\n *\n * @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared.\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromAngle: function (angle, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(DegToRad(angle), speed);\n },\n\n /**\n * Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromRotation\n * @since 3.0.0\n *\n * @param {number} rotation - The angle in radians.\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromRotation: function (rotation, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(rotation, speed);\n },\n\n /**\n * This method will search the given rectangular area and return an array of all physics bodies that\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\n * \n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\n * contained within it.\n * \n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\n * otherwise the search is O(N) for Dynamic Bodies.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapRect\n * @since 3.17.0\n *\n * @param {number} x - The top-left x coordinate of the area to search within.\n * @param {number} y - The top-left y coordinate of the area to search within.\n * @param {number} width - The width of the area to search within.\n * @param {number} height - The height of the area to search within.\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\n *\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\n */\n overlapRect: function (x, y, width, height, includeDynamic, includeStatic)\n {\n return OverlapRect(this.world, x, y, width, height, includeDynamic, includeStatic);\n },\n \n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#shutdown\n * @since 3.0.0\n */\n shutdown: function ()\n {\n if (!this.world)\n {\n // Already destroyed\n return;\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n\n this.add.destroy();\n this.world.destroy();\n\n this.add = null;\n this.world = null;\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nPluginCache.register('ArcadePhysics', ArcadePhysics, 'arcadePhysics');\n\nmodule.exports = ArcadePhysics;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadePhysics.js?")},"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\n\n/**\n * @classdesc\n * An Arcade Physics Sprite is a Sprite with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Sprite and an Arcade Image is that you cannot animate an Arcade Image.\n * If you do not require animation then you can safely use Arcade Images instead of Arcade Sprites.\n *\n * @class Sprite\n * @extends Phaser.GameObjects.Sprite\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeSprite = new Class({\n\n Extends: Sprite,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeSprite (scene, x, y, texture, frame)\n {\n Sprite.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Sprite#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeSprite;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeSprite.js?')},"./node_modules/phaser/src/physics/arcade/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Arcade Body.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticBody}.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Body belongs to.\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Transformations applied to this Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#transform\r\n * @type {object}\r\n * @since 3.4.0\r\n */\r\n this.transform = {\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n rotation: gameObject.angle,\r\n scaleX: gameObject.scaleX,\r\n scaleY: gameObject.scaleY,\r\n displayOriginX: gameObject.displayOriginX,\r\n displayOriginY: gameObject.displayOriginY\r\n };\r\n\r\n /**\r\n * Whether the Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * Whether the Body's velocity is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * The color of this Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * Whether this Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Body's boundary is circular (true) or rectangular (false).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Body is circular, this is the unscaled radius of the Body's boundary, as set by setCircle(), in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Body's position from its Game Object's position, in source pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setOffset\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * The position of this Body during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#prev\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.prev = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * Whether this Body's `rotation` is affected by its angular acceleration and angular velocity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowRotation\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowRotation = true;\r\n\r\n /**\r\n * This body's rotation, in degrees, based on its angular acceleration and angular velocity.\r\n * The Body's rotation controls the `angle` of its Game Object.\r\n * It doesn't rotate the Body's boundary, which is always an axis-aligned rectangle or a circle.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = gameObject.angle;\r\n\r\n /**\r\n * The Body's rotation, in degrees, during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#preRotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.preRotation = gameObject.angle;\r\n\r\n /**\r\n * The width of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#width\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#height\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The unscaled width of the Body, in source pixels, as set by setSize().\r\n * The default is the width of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceWidth = width;\r\n\r\n /**\r\n * The unscaled height of the Body, in source pixels, as set by setSize().\r\n * The default is the height of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceHeight = height;\r\n\r\n if (gameObject.frame)\r\n {\r\n this.sourceWidth = gameObject.frame.realWidth;\r\n this.sourceHeight = gameObject.frame.realHeight;\r\n }\r\n\r\n /**\r\n * Half the Body's width, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(width / 2);\r\n\r\n /**\r\n * Half the Body's height, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(height / 2);\r\n\r\n /**\r\n * The center of the Body's boundary.\r\n * The midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * The Body's velocity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The Body's calculated velocity, in pixels per second, at the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#newVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.newVelocity = new Vector2();\r\n\r\n /**\r\n * The Body's absolute maximum change in position, in pixels per step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#deltaMax\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.deltaMax = new Vector2();\r\n\r\n /**\r\n * The Body's change in velocity, in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#acceleration\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.acceleration = new Vector2();\r\n\r\n /**\r\n * Whether this Body's velocity is affected by its `drag`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowDrag\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowDrag = true;\r\n\r\n /**\r\n * Absolute loss of velocity due to movement, in pixels per second squared.\r\n * The x and y components are applied separately.\r\n *\r\n * When `useDamping` is true, this is 1 minus the damping factor.\r\n * A value of 1 means the Body loses no velocity.\r\n * A value of 0.95 means the Body loses 5% of its velocity per step.\r\n * A value of 0.5 means the Body loses 50% of its velocity per step.\r\n *\r\n * Drag is applied only when `acceleration` is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#drag\r\n * @type {(Phaser.Math.Vector2|number)}\r\n * @since 3.0.0\r\n */\r\n this.drag = new Vector2();\r\n\r\n /**\r\n * Whether this Body's position is affected by gravity (local or world).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowGravity\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#gravity\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.allowGravity = true;\r\n\r\n /**\r\n * Acceleration due to gravity (specific to this Body), in pixels per second squared.\r\n * Total gravity is the sum of this vector and the simulation's `gravity`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.gravity = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision, relative to 1.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.bounce = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision with the world boundary, relative to 1.\r\n * If null, `bounce` is used instead.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#worldBounce\r\n * @type {?Phaser.Math.Vector2}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.worldBounce = null;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary (and `collideWorldBounds` is also true).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#worldboundsEvent\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this Body collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collideEvent\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this Body overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#overlapEvent\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The Body's absolute maximum velocity, in pixels per second.\r\n * The horizontal and vertical components are applied separately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.maxVelocity = new Vector2(10000, 10000);\r\n\r\n /**\r\n * The maximum speed this Body is allowed to reach.\r\n * \r\n * If not negative it limits the scalar value of speed.\r\n * \r\n * Any negative value means no maximum is being applied.\r\n * \r\n * @name Phaser.Physics.Arcade.Body#maxSpeed\r\n * @type {number}\r\n * @since 3.16.0 \r\n */\r\n this.maxSpeed = -1;\r\n\r\n /**\r\n * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1.\r\n * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all.\r\n * The horizontal component (x) is applied only when two colliding Bodies are separated vertically.\r\n * The vertical component (y) is applied only when two colliding Bodies are separated horizontally.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#friction\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.friction = new Vector2(1, 0);\r\n\r\n /**\r\n * If this Body is using `drag` for deceleration this property controls how the drag is applied.\r\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\r\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\r\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\r\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\r\n *\r\n * If you enable this property then you should use far smaller `drag` values than with linear, as\r\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\r\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#useDamping\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.10.0\r\n */\r\n this.useDamping = false;\r\n\r\n /**\r\n * The rate of change of this Body's `rotation`, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularVelocity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularVelocity = 0;\r\n\r\n /**\r\n * The Body's angular acceleration (change in angular velocity), in degrees per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularAcceleration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularAcceleration = 0;\r\n\r\n /**\r\n * Loss of angular velocity due to angular movement, in degrees per second.\r\n *\r\n * Angular drag is applied only when angular acceleration is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularDrag\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularDrag = 0;\r\n\r\n /**\r\n * The Body's maximum angular velocity, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxAngular\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.maxAngular = 1000;\r\n\r\n /**\r\n * The Body's inertia, relative to a default unit (1).\r\n * With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * The calculated angle of this Body's velocity vector, in radians, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The calculated magnitude of the Body's velocity, in pixels per second, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#speed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speed = 0;\r\n\r\n /**\r\n * The direction of the Body's velocity, as calculated during the last step.\r\n * If the Body is moving on both axes (diagonally), this describes motion on the vertical axis only.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#facing\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.facing = CONST.FACING_NONE;\r\n\r\n /**\r\n * Whether this Body can be moved by collisions with another Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#immovable\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.immovable = false;\r\n\r\n /**\r\n * Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#moves\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.moves = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this Body is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this Body is overlapped with another and both are not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this Body interacts with the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#collideWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this Body is checked for collisions and for which directions.\r\n * You can set `checkCollision.none = true` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this Body is colliding with another and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body was colliding with another during the last step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body is colliding with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#syncBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Components.GetBounds#getBounds\r\n */\r\n this.syncBounds = false;\r\n\r\n /**\r\n * The Body's physics type (dynamic or static).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#physicsType\r\n * @type {integer}\r\n * @readonly\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Whether the Body's position needs updating from its Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_reset\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this._reset = true;\r\n\r\n /**\r\n * Cached horizontal scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sx\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sx = gameObject.scaleX;\r\n\r\n /**\r\n * Cached vertical scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sy\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sy = gameObject.scaleY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dy = 0;\r\n\r\n /**\r\n * Stores the Game Object's bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n },\r\n\r\n /**\r\n * Updates the Body's `transform`, `width`, `height`, and `center` from its Game Object.\r\n * The Body's `position` isn't changed.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateBounds\r\n * @since 3.0.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var sprite = this.gameObject;\r\n\r\n // Container?\r\n\r\n var transform = this.transform;\r\n\r\n if (sprite.parentContainer)\r\n {\r\n var matrix = sprite.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2);\r\n\r\n transform.x = matrix.tx;\r\n transform.y = matrix.ty;\r\n transform.rotation = RadToDeg(matrix.rotation);\r\n transform.scaleX = matrix.scaleX;\r\n transform.scaleY = matrix.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n else\r\n {\r\n transform.x = sprite.x;\r\n transform.y = sprite.y;\r\n transform.rotation = sprite.angle;\r\n transform.scaleX = sprite.scaleX;\r\n transform.scaleY = sprite.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n\r\n var recalc = false;\r\n\r\n if (this.syncBounds)\r\n {\r\n var b = sprite.getBounds(this._bounds);\r\n\r\n this.width = b.width;\r\n this.height = b.height;\r\n recalc = true;\r\n }\r\n else\r\n {\r\n var asx = Math.abs(transform.scaleX);\r\n var asy = Math.abs(transform.scaleY);\r\n\r\n if (this._sx !== asx || this._sy !== asy)\r\n {\r\n this.width = this.sourceWidth * asx;\r\n this.height = this.sourceHeight * asy;\r\n this._sx = asx;\r\n this._sy = asy;\r\n recalc = true;\r\n }\r\n }\r\n\r\n if (recalc)\r\n {\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n this.updateCenter();\r\n }\r\n },\r\n\r\n /**\r\n * Updates the Body's `center` from its `position`, `width`, and `height`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.\r\n * \r\n * This method is only called if the physics world is going to run a step this frame.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#resetFlags\r\n * @since 3.18.0\r\n */\r\n resetFlags: function ()\r\n {\r\n // Store and reset collision flags\r\n this.wasTouching.none = this.touching.none;\r\n this.wasTouching.up = this.touching.up;\r\n this.wasTouching.down = this.touching.down;\r\n this.wasTouching.left = this.touching.left;\r\n this.wasTouching.right = this.touching.right;\r\n\r\n this.touching.none = true;\r\n this.touching.up = false;\r\n this.touching.down = false;\r\n this.touching.left = false;\r\n this.touching.right = false;\r\n\r\n this.blocked.none = true;\r\n this.blocked.up = false;\r\n this.blocked.down = false;\r\n this.blocked.left = false;\r\n this.blocked.right = false;\r\n\r\n this.overlapR = 0;\r\n this.overlapX = 0;\r\n this.overlapY = 0;\r\n\r\n this.embedded = false;\r\n },\r\n\r\n /**\r\n * Syncs the position body position with the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#preUpdate\r\n * @since 3.17.0\r\n * \r\n * @param {boolean} willStep - Will this Body run an update as well?\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n preUpdate: function (willStep, delta)\r\n {\r\n if (willStep)\r\n {\r\n this.resetFlags();\r\n }\r\n\r\n this.updateBounds();\r\n\r\n var sprite = this.transform;\r\n\r\n this.position.x = sprite.x + sprite.scaleX * (this.offset.x - sprite.displayOriginX);\r\n this.position.y = sprite.y + sprite.scaleY * (this.offset.y - sprite.displayOriginY);\r\n\r\n this.updateCenter();\r\n\r\n this.rotation = sprite.rotation;\r\n\r\n this.preRotation = this.rotation;\r\n\r\n if (this._reset)\r\n {\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n }\r\n\r\n if (willStep)\r\n {\r\n this.update(delta);\r\n }\r\n },\r\n\r\n /**\r\n * Performs a single physics step and updates the body velocity, angle, speed and other properties.\r\n * \r\n * This method can be called multiple times per game frame, depending on the physics step rate.\r\n * \r\n * The results are synced back to the Game Object in `postUpdate`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#update\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_BOUNDS\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n update: function (delta)\r\n {\r\n if (this.moves)\r\n {\r\n this.world.updateMotion(this, delta);\r\n\r\n var vx = this.velocity.x;\r\n var vy = this.velocity.y;\r\n\r\n this.newVelocity.set(vx * delta, vy * delta);\r\n\r\n this.position.add(this.newVelocity);\r\n\r\n this.updateCenter();\r\n\r\n this.angle = Math.atan2(vy, vx);\r\n this.speed = Math.sqrt(vx * vx + vy * vy);\r\n\r\n // Now the update will throw collision checks at the Body\r\n // And finally we'll integrate the new position back to the Sprite in postUpdate\r\n\r\n if (this.collideWorldBounds && this.checkWorldBounds() && this.onWorldBounds)\r\n {\r\n this.world.emit(Events.WORLD_BOUNDS, this, this.blocked.up, this.blocked.down, this.blocked.left, this.blocked.right);\r\n }\r\n }\r\n\r\n this._dx = this.position.x - this.prev.x;\r\n this._dy = this.position.y - this.prev.y;\r\n },\r\n\r\n /**\r\n * Feeds the Body results back into the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var dx = this.position.x - this.prev.x;\r\n var dy = this.position.y - this.prev.y;\r\n\r\n if (this.moves)\r\n {\r\n var mx = this.deltaMax.x;\r\n var my = this.deltaMax.y;\r\n\r\n if (mx !== 0 && dx !== 0)\r\n {\r\n if (dx < 0 && dx < -mx)\r\n {\r\n dx = -mx;\r\n }\r\n else if (dx > 0 && dx > mx)\r\n {\r\n dx = mx;\r\n }\r\n }\r\n\r\n if (my !== 0 && dy !== 0)\r\n {\r\n if (dy < 0 && dy < -my)\r\n {\r\n dy = -my;\r\n }\r\n else if (dy > 0 && dy > my)\r\n {\r\n dy = my;\r\n }\r\n }\r\n\r\n this.gameObject.x += dx;\r\n this.gameObject.y += dy;\r\n\r\n this._reset = true;\r\n }\r\n\r\n if (dx < 0)\r\n {\r\n this.facing = CONST.FACING_LEFT;\r\n }\r\n else if (dx > 0)\r\n {\r\n this.facing = CONST.FACING_RIGHT;\r\n }\r\n\r\n if (dy < 0)\r\n {\r\n this.facing = CONST.FACING_UP;\r\n }\r\n else if (dy > 0)\r\n {\r\n this.facing = CONST.FACING_DOWN;\r\n }\r\n\r\n this._dx = dx;\r\n this._dy = dy;\r\n\r\n if (this.allowRotation)\r\n {\r\n this.gameObject.angle += this.deltaZ();\r\n }\r\n\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n },\r\n\r\n /**\r\n * Checks for collisions between this Body and the world boundary and separates them.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#checkWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if this Body is colliding with the world boundary.\r\n */\r\n checkWorldBounds: function ()\r\n {\r\n var pos = this.position;\r\n var bounds = this.world.bounds;\r\n var check = this.world.checkCollision;\r\n\r\n var bx = (this.worldBounce) ? -this.worldBounce.x : -this.bounce.x;\r\n var by = (this.worldBounce) ? -this.worldBounce.y : -this.bounce.y;\r\n\r\n if (pos.x < bounds.x && check.left)\r\n {\r\n pos.x = bounds.x;\r\n this.velocity.x *= bx;\r\n this.blocked.left = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.right > bounds.right && check.right)\r\n {\r\n pos.x = bounds.right - this.width;\r\n this.velocity.x *= bx;\r\n this.blocked.right = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n if (pos.y < bounds.y && check.up)\r\n {\r\n pos.y = bounds.y;\r\n this.velocity.y *= by;\r\n this.blocked.up = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.bottom > bounds.bottom && check.down)\r\n {\r\n pos.y = bounds.bottom - this.height;\r\n this.velocity.y *= by;\r\n this.blocked.down = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n return !this.blocked.none;\r\n },\r\n\r\n /**\r\n * Sets the offset of the Body's position from its Game Object's position.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal offset, in source pixels.\r\n * @param {number} [y=x] - The vertical offset, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.offset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a rectangle.\r\n * Modifies the Body `offset` if `center` is true (the default).\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.sourceWidth = width;\r\n this.sourceHeight = height;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.updateCenter();\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n }\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a circle.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Body, in source pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the Body from its Game Object, in source pixels.\r\n * @param {number} [offsetY] - The vertical offset of the Body from its Game Object, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.isCircle = true;\r\n this.radius = radius;\r\n\r\n this.sourceWidth = radius * 2;\r\n this.sourceHeight = radius * 2;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * If the Body had any velocity or acceleration it is lost as a result of calling this.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position to place the Game Object and Body.\r\n * @param {number} y - The vertical position to place the Game Object and Body.\r\n */\r\n reset: function (x, y)\r\n {\r\n this.stop();\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n if (gameObject.getTopLeft)\r\n {\r\n gameObject.getTopLeft(this.position);\r\n }\r\n else\r\n {\r\n this.position.set(x, y);\r\n }\r\n\r\n this.prev.copy(this.position);\r\n\r\n this.rotation = gameObject.angle;\r\n this.preRotation = gameObject.angle;\r\n\r\n this.updateBounds();\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Sets acceleration, velocity, and speed to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n stop: function ()\r\n {\r\n this.velocity.set(0);\r\n this.acceleration.set(0);\r\n this.speed = 0;\r\n this.angularVelocity = 0;\r\n this.angularAcceleration = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the coordinates of this Body's edges into an object.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - An object to copy the values into.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} - An object with {x, y, right, bottom}.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Tests if the coordinates are within this Body's boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate.\r\n * @param {number} y - The vertical coordinate.\r\n *\r\n * @return {boolean} True if (x, y) is within this Body.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving down.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onFloor\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onFloor: function ()\r\n {\r\n return this.blocked.down;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving up.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onCeiling\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onCeiling: function ()\r\n {\r\n return this.blocked.up;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving left or right.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onWall\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onWall: function ()\r\n {\r\n return (this.blocked.left || this.blocked.right);\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's horizontal position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return (this._dx > 0) ? this._dx : -this._dx;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's vertical position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return (this._dy > 0) ? this._dy : -this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's horizontal position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaX: function ()\r\n {\r\n return this._dx;\r\n },\r\n\r\n /**\r\n * The change in this Body's vertical position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaY: function ()\r\n {\r\n return this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's rotation from the previous step, in degrees.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaZ: function ()\r\n {\r\n return this.rotation - this.preRotation;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for deletion by the simulation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n if (this.world)\r\n {\r\n this.world.pendingDestroy.set(this);\r\n }\r\n },\r\n\r\n /**\r\n * Draws this Body's boundary and velocity, if enabled.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to draw on.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n // Only draw the sides where checkCollision is true, similar to debugger in layer\r\n if (this.checkCollision.up)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x + this.width, pos.y);\r\n }\r\n\r\n if (this.checkCollision.right)\r\n {\r\n graphic.lineBetween(pos.x + this.width, pos.y, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.down)\r\n {\r\n graphic.lineBetween(pos.x, pos.y + this.height, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.left)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x, pos.y + this.height);\r\n }\r\n }\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.velocity.x / 2, y + this.velocity.y / 2);\r\n }\r\n },\r\n\r\n /**\r\n * Whether this Body will be drawn to the debug display.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if either `debugShowBody` or `debugShowVelocity` are enabled.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * Sets whether this Body collides with the world boundary.\r\n * \r\n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\r\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\r\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCollideWorldBounds: function (value, bounceX, bounceY)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.collideWorldBounds = value;\r\n\r\n var setBounceX = (bounceX !== undefined);\r\n var setBounceY = (bounceY !== undefined);\r\n\r\n if (setBounceX || setBounceY)\r\n {\r\n if (!this.worldBounce)\r\n {\r\n this.worldBounce = new Vector2();\r\n }\r\n\r\n if (setBounceX)\r\n {\r\n this.worldBounce.x = bounceX;\r\n }\r\n\r\n if (setBounceY)\r\n {\r\n this.worldBounce.y = bounceY;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this.velocity.set(x, y);\r\n\r\n x = this.velocity.x;\r\n y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityX: function (value)\r\n {\r\n this.velocity.x = value;\r\n\r\n var x = value;\r\n var y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityY: function (value)\r\n {\r\n this.velocity.y = value;\r\n\r\n var x = this.velocity.x;\r\n var y = value;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's maximum velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n this.maxVelocity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum speed the Body can move.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxSpeed\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The maximum speed value, in pixels per second. Set to a negative value to disable.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxSpeed: function (value)\r\n {\r\n this.maxSpeed = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal bounce, relative to 1.\r\n * @param {number} y - The vertical bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounce: function (x, y)\r\n {\r\n this.bounce.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceX: function (value)\r\n {\r\n this.bounce.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceY: function (value)\r\n {\r\n this.bounce.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.acceleration.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationX: function (value)\r\n {\r\n this.acceleration.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationY: function (value)\r\n {\r\n this.acceleration.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowDrag\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowDrag\r\n *\r\n * @param {boolean} [value=true] - `true` to allow drag on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowDrag: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables gravity's effect on this Body.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowGravity\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowGravity\r\n *\r\n * @param {boolean} [value=true] - `true` to allow gravity on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowGravity: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowGravity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables rotation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowRotation\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowRotation\r\n *\r\n * @param {boolean} [value=true] - `true` to allow rotation on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowRotation: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowRotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDrag: function (x, y)\r\n {\r\n this.drag.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragX: function (value)\r\n {\r\n this.drag.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragY: function (value)\r\n {\r\n this.drag.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravity.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravity.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, relative to 1.\r\n * @param {number} y - The vertical component, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionX: function (value)\r\n {\r\n this.friction.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionY: function (value)\r\n {\r\n this.friction.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in degrees per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n this.angularVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularAcceleration: function (value)\r\n {\r\n this.angularAcceleration = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularDrag: function (value)\r\n {\r\n this.angularDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's mass.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The mass value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `immovable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setImmovable\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `immovable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setImmovable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.immovable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `enable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setEnable\r\n * @since 3.15.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `enable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setEnable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.enable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Body's horizontal position (left edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Body's vertical position (top edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left edge of the Body's boundary. Identical to x.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right edge of the Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top edge of the Body's boundary. Identical to y.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom edge of this Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Body.js?")},"./node_modules/phaser/src/physics/arcade/Collider.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\n\n/**\n * @classdesc\n * An Arcade Physics Collider will automatically check for collision, or overlaps, between two objects\n * every step. If a collision, or overlap, occurs it will invoke the given callbacks.\n *\n * @class Collider\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade physics World that will manage the collisions.\n * @param {boolean} overlapOnly - Whether to check for collisions or overlap.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {any} callbackContext - The scope in which to call the callbacks.\n */\nvar Collider = new Class({\n\n initialize:\n\n function Collider (world, overlapOnly, object1, object2, collideCallback, processCallback, callbackContext)\n {\n /**\n * The world in which the bodies will collide.\n *\n * @name Phaser.Physics.Arcade.Collider#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The name of the collider (unused by Phaser).\n *\n * @name Phaser.Physics.Arcade.Collider#name\n * @type {string}\n * @since 3.1.0\n */\n this.name = '';\n\n /**\n * Whether the collider is active.\n *\n * @name Phaser.Physics.Arcade.Collider#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * Whether to check for collisions or overlaps.\n *\n * @name Phaser.Physics.Arcade.Collider#overlapOnly\n * @type {boolean}\n * @since 3.0.0\n */\n this.overlapOnly = overlapOnly;\n\n /**\n * The first object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object1\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object1 = object1;\n\n /**\n * The second object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object2\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object2 = object2;\n\n /**\n * The callback to invoke when the two objects collide.\n *\n * @name Phaser.Physics.Arcade.Collider#collideCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.collideCallback = collideCallback;\n\n /**\n * If a processCallback exists it must return true or collision checking will be skipped.\n *\n * @name Phaser.Physics.Arcade.Collider#processCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.processCallback = processCallback;\n\n /**\n * The context the collideCallback and processCallback will run in.\n *\n * @name Phaser.Physics.Arcade.Collider#callbackContext\n * @type {object}\n * @since 3.0.0\n */\n this.callbackContext = callbackContext;\n },\n\n /**\n * A name for the Collider.\n * \n * Phaser does not use this value, it's for your own reference.\n *\n * @method Phaser.Physics.Arcade.Collider#setName\n * @since 3.1.0\n *\n * @param {string} name - The name to assign to the Collider.\n *\n * @return {Phaser.Physics.Arcade.Collider} This Collider instance.\n */\n setName: function (name)\n {\n this.name = name;\n\n return this;\n },\n\n /**\n * Called by World as part of its step processing, initial operation of collision checking.\n *\n * @method Phaser.Physics.Arcade.Collider#update\n * @since 3.0.0\n */\n update: function ()\n {\n this.world.collideObjects(\n this.object1,\n this.object2,\n this.collideCallback,\n this.processCallback,\n this.callbackContext,\n this.overlapOnly\n );\n },\n\n /**\n * Removes Collider from World and disposes of its resources.\n *\n * @method Phaser.Physics.Arcade.Collider#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.world.removeCollider(this);\n\n this.active = false;\n\n this.world = null;\n\n this.object1 = null;\n this.object2 = null;\n\n this.collideCallback = null;\n this.processCallback = null;\n this.callbackContext = null;\n }\n\n});\n\nmodule.exports = Collider;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Collider.js?")},"./node_modules/phaser/src/physics/arcade/Factory.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeImage = __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js");\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar PhysicsGroup = __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js");\nvar StaticPhysicsGroup = __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js");\n\n/**\n * @classdesc\n * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects.\n * Objects that are created by this Factory are automatically added to the physics world.\n *\n * @class Factory\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics World instance.\n */\nvar Factory = new Class({\n\n initialize:\n\n function Factory (world)\n {\n /**\n * A reference to the Arcade Physics World.\n *\n * @name Phaser.Physics.Arcade.Factory#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * A reference to the Scene this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = world.scene;\n\n /**\n * A reference to the Scene.Systems this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#sys\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.sys = world.scene.sys;\n },\n\n /**\n * Creates a new Arcade Physics Collider object.\n *\n * @method Phaser.Physics.Arcade.Factory#collider\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n collider: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addCollider(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Creates a new Arcade Physics Collider Overlap object.\n *\n * @method Phaser.Physics.Arcade.Factory#overlap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for overlap.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for overlap.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n overlap: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addOverlap(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Adds an Arcade Physics Body to the given Game Object.\n *\n * @method Phaser.Physics.Arcade.Factory#existing\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - A Game Object.\n * @param {boolean} [isStatic=false] - Create a Static body (true) or Dynamic body (false).\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object.\n */\n existing: function (gameObject, isStatic)\n {\n var type = (isStatic) ? CONST.STATIC_BODY : CONST.DYNAMIC_BODY;\n\n this.world.enableBody(gameObject, type);\n\n return gameObject;\n },\n\n /**\n * Creates a new Arcade Image object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticImage\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n staticImage: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.STATIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Image object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#image\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n image: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.DYNAMIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticSprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n staticSprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.STATIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#sprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n sprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.DYNAMIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a Static Physics Group object.\n * All Game Objects created by this Group will automatically be static Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#staticGroup\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} The Static Group object that was created.\n */\n staticGroup: function (children, config)\n {\n return this.sys.updateList.add(new StaticPhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Creates a Physics Group object.\n * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#group\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.Group} The Group object that was created.\n */\n group: function (children, config)\n {\n return this.sys.updateList.add(new PhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Destroys this Factory.\n *\n * @method Phaser.Physics.Arcade.Factory#destroy\n * @since 3.5.0\n */\n destroy: function ()\n {\n this.world = null;\n this.scene = null;\n this.sys = null;\n }\n\n});\n\nmodule.exports = Factory;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Factory.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias;\n\n if (body1._dx === 0 && body2._dx === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dx > body2._dx)\n {\n // Body1 is moving right and / or Body2 is moving left\n overlap = body1.right - body2.x;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.right = true;\n\n body2.touching.none = false;\n body2.touching.left = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.right = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.left = true;\n }\n }\n }\n else if (body1._dx < body2._dx)\n {\n // Body1 is moving left and/or Body2 is moving right\n overlap = body1.x - body2.width - body2.x;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.left = true;\n\n body2.touching.none = false;\n body2.touching.right = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.left = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.right = true;\n }\n }\n }\n\n // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapX = overlap;\n body2.overlapX = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapX.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias;\n\n if (body1._dy === 0 && body2._dy === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dy > body2._dy)\n {\n // Body1 is moving down and/or Body2 is moving up\n overlap = body1.bottom - body2.y;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.down = true;\n\n body2.touching.none = false;\n body2.touching.up = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.down = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.up = true;\n }\n }\n }\n else if (body1._dy < body2._dy)\n {\n // Body1 is moving up and/or Body2 is moving down\n overlap = body1.y - body2.bottom;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.up = true;\n\n body2.touching.none = false;\n body2.touching.down = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.up = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.down = true;\n }\n }\n }\n\n // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapY = overlap;\n body2.overlapY = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapY.js?')},"./node_modules/phaser/src/physics/arcade/PhysicsGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ \"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Arcade Physics Group object.\r\n *\r\n * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}.\r\n *\r\n * @class Group\r\n * @extends Phaser.GameObjects.Group\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\r\n */\r\nvar PhysicsGroup = new Class({\r\n\r\n Extends: Group,\r\n\r\n initialize:\r\n\r\n function PhysicsGroup (world, scene, children, config)\r\n {\r\n if (!children && !config)\r\n {\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // children is a plain object, so swizzle them:\r\n config = children;\r\n children = null;\r\n\r\n config.createCallback = this.createCallbackHandler;\r\n config.removeCallback = this.removeCallbackHandler;\r\n }\r\n else if (Array.isArray(children) && IsPlainObject(children[0]))\r\n {\r\n // children is an array of plain objects\r\n config = children[0];\r\n\r\n var _this = this;\r\n\r\n children.forEach(function (singleConfig)\r\n {\r\n singleConfig.createCallback = _this.createCallbackHandler;\r\n singleConfig.removeCallback = _this.removeCallbackHandler;\r\n });\r\n }\r\n else\r\n {\r\n // config is not defined and children is not a plain object nor an array of plain objects\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n\r\n /**\r\n * The physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The class to create new Group members from.\r\n * \r\n * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#classType\r\n * @type {Function}\r\n * @default ArcadeSprite\r\n * @since 3.0.0\r\n */\r\n config.classType = GetFastValue(config, 'classType', ArcadeSprite);\r\n\r\n /**\r\n * The physics type of the Group's members.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Default physics properties applied to Game Objects added to the Group or created by the Group. Derived from the `config` argument.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#defaults\r\n * @type {Phaser.Types.Physics.Arcade.PhysicsGroupDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n setCollideWorldBounds: GetFastValue(config, 'collideWorldBounds', false),\r\n setAccelerationX: GetFastValue(config, 'accelerationX', 0),\r\n setAccelerationY: GetFastValue(config, 'accelerationY', 0),\r\n setAllowDrag: GetFastValue(config, 'allowDrag', true),\r\n setAllowGravity: GetFastValue(config, 'allowGravity', true),\r\n setAllowRotation: GetFastValue(config, 'allowRotation', true),\r\n setBounceX: GetFastValue(config, 'bounceX', 0),\r\n setBounceY: GetFastValue(config, 'bounceY', 0),\r\n setDragX: GetFastValue(config, 'dragX', 0),\r\n setDragY: GetFastValue(config, 'dragY', 0),\r\n setEnable: GetFastValue(config, 'enable', true),\r\n setGravityX: GetFastValue(config, 'gravityX', 0),\r\n setGravityY: GetFastValue(config, 'gravityY', 0),\r\n setFrictionX: GetFastValue(config, 'frictionX', 0),\r\n setFrictionY: GetFastValue(config, 'frictionY', 0),\r\n setVelocityX: GetFastValue(config, 'velocityX', 0),\r\n setVelocityY: GetFastValue(config, 'velocityY', 0),\r\n setAngularVelocity: GetFastValue(config, 'angularVelocity', 0),\r\n setAngularAcceleration: GetFastValue(config, 'angularAcceleration', 0),\r\n setAngularDrag: GetFastValue(config, 'angularDrag', 0),\r\n setMass: GetFastValue(config, 'mass', 1),\r\n setImmovable: GetFastValue(config, 'immovable', false)\r\n };\r\n\r\n if (Array.isArray(children))\r\n {\r\n config = null;\r\n }\r\n\r\n Group.call(this, scene, children, config);\r\n },\r\n\r\n /**\r\n * Enables a Game Object's Body and assigns `defaults`. Called when a Group member is added or created.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#createCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being added.\r\n */\r\n createCallbackHandler: function (child)\r\n {\r\n if (!child.body)\r\n {\r\n this.world.enableBody(child, CONST.DYNAMIC_BODY);\r\n }\r\n\r\n var body = child.body;\r\n\r\n for (var key in this.defaults)\r\n {\r\n body[key](this.defaults[key]);\r\n }\r\n },\r\n\r\n /**\r\n * Disables a Game Object's Body. Called when a Group member is removed.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#removeCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being removed.\r\n */\r\n removeCallbackHandler: function (child)\r\n {\r\n if (child.body)\r\n {\r\n this.world.disableBody(child);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity.\r\n * @param {number} y - The vertical velocity.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x, y), the second (x + step, y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocity: function (x, y, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.set(x + (i * step), y + (i * step));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x), the second (x + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityX: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.x = value + (i * step);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (y), the second (y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityY: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.y = value + (i * step);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PhysicsGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/PhysicsGroup.js?")},"./node_modules/phaser/src/physics/arcade/SeparateX.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\n\n/**\n * Separates two overlapping bodies on the X-axis (horizontally).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`.\n */\nvar SeparateX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapX(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.x;\n var v2 = body2.velocity.x;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.x -= overlap;\n body2.x += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.x = avg + nv1 * body1.bounce.x;\n body2.velocity.x = avg + nv2 * body2.bounce.x;\n }\n else if (!body1.immovable)\n {\n body1.x -= overlap;\n body1.velocity.x = v2 - v1 * body1.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body2.moves)\n {\n body1.y += (body2.y - body2.prev.y) * body2.friction.y;\n }\n }\n else\n {\n body2.x += overlap;\n body2.velocity.x = v1 - v2 * body2.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body1.moves)\n {\n body2.y += (body1.y - body1.prev.y) * body1.friction.y;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateX.js?")},"./node_modules/phaser/src/physics/arcade/SeparateY.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\n\n/**\n * Separates two overlapping bodies on the Y-axis (vertically).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`.\n */\nvar SeparateY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapY(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.y;\n var v2 = body2.velocity.y;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.y -= overlap;\n body2.y += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.y = avg + nv1 * body1.bounce.y;\n body2.velocity.y = avg + nv2 * body2.bounce.y;\n }\n else if (!body1.immovable)\n {\n body1.y -= overlap;\n body1.velocity.y = v2 - v1 * body1.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body2.moves)\n {\n body1.x += (body2.x - body2.prev.x) * body2.friction.x;\n }\n }\n else\n {\n body2.y += overlap;\n body2.velocity.y = v1 - v2 * body2.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body1.moves)\n {\n body2.x += (body1.x - body1.prev.x) * body1.friction.x;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateY.js?")},"./node_modules/phaser/src/physics/arcade/StaticBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Arcade Physics Body.\r\n *\r\n * A Static Body never moves, and isn't automatically synchronized with its parent Game Object.\r\n * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually.\r\n *\r\n * A Static Body can collide with other Bodies, but is never moved by collisions.\r\n *\r\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Body}.\r\n *\r\n * @class StaticBody\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Static Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Static Body belongs to.\r\n */\r\nvar StaticBody = new Class({\r\n\r\n initialize:\r\n\r\n function StaticBody (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Whether the Static Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowStaticBody;\r\n\r\n /**\r\n * The color of this Static Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.staticBodyDebugColor;\r\n\r\n /**\r\n * Whether this Static Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Static Body's boundary is circular (`true`) or rectangular (`false`).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Static Body's actual position from any updated position.\r\n *\r\n * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Static Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x - gameObject.displayOriginX, gameObject.y - gameObject.displayOriginY);\r\n\r\n /**\r\n * The width of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * Half the Static Body's width, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(this.width / 2);\r\n\r\n /**\r\n * Half the Static Body's height, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n /**\r\n * The center of the Static Body's boundary.\r\n * This is the midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * A constant zero velocity used by the Arcade Physics simulation for calculations.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.velocity = Vector2.ZERO;\r\n\r\n /**\r\n * A constant `false` value expected by the Arcade Physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#allowGravity\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.allowGravity = false;\r\n\r\n /**\r\n * Gravitational force applied specifically to this Body. Values are in pixels per second squared. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.gravity = Vector2.ZERO;\r\n\r\n /**\r\n * Rebound, or restitution, following a collision, relative to 1. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.bounce = Vector2.ZERO;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this StaticBody collides with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary and never trigger a `worldbounds` event.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this StaticBody collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this StaticBody overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The StaticBody's inertia, relative to a default unit (1). With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * Whether this object can be moved by collisions with another body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#immovable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.immovable = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this StaticBody is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this StaticBody has ever overlapped with another while both were not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this StaticBody interacts with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#collideWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this StaticBody is checked for collisions and for which directions. You can set `checkCollision.none = false` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with another body and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody was colliding with another body during the last step or any previous step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * The StaticBody's physics type (static by default).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.STATIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.STATIC_BODY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dy = 0;\r\n },\r\n\r\n /**\r\n * Changes the Game Object this Body is bound to.\r\n * First it removes its reference from the old Game Object, then sets the new one.\r\n * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setGameObject\r\n * @since 3.1.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body.\r\n * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object?\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n *\r\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n */\r\n setGameObject: function (gameObject, update)\r\n {\r\n if (gameObject && gameObject !== this.gameObject)\r\n {\r\n // Remove this body from the old game object\r\n this.gameObject.body = null;\r\n\r\n gameObject.body = this;\r\n\r\n // Update our reference\r\n this.gameObject = gameObject;\r\n }\r\n\r\n if (update)\r\n {\r\n this.updateFromGameObject();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates this Static Body so that its position and dimensions are updated\r\n * based on the current Game Object it is bound to.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n * @since 3.1.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n updateFromGameObject: function ()\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.width = gameObject.displayWidth;\r\n this.height = gameObject.displayHeight;\r\n\r\n this.halfWidth = Math.abs(this.width / 2);\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of the body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setOffset\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal offset of the Body from the Game Object's center.\r\n * @param {number} y - The vertical offset of the Body from the Game Object's center.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(x, y);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the body.\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width / 2);\r\n this.halfHeight = Math.floor(height / 2);\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n }\r\n\r\n this.updateCenter();\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Static Body to have a circular body and sets its sizes and position.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the StaticBody, in pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the StaticBody from its Game Object, in pixels.\r\n * @param {number} [offsetY] - The vertical offset of the StaticBody from its Game Object, in pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.isCircle = true;\r\n\r\n this.radius = radius;\r\n\r\n this.width = radius * 2;\r\n this.height = radius * 2;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the StaticBody's `center` from its `position` and dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n * @param {number} [y] - The y coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n */\r\n reset: function (x, y)\r\n {\r\n var gameObject = this.gameObject;\r\n\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n },\r\n\r\n /**\r\n * NOOP function. A Static Body cannot be stopped.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n stop: function ()\r\n {\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the x and y coordinates of the top left and bottom right points of the StaticBody.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - The object which will hold the coordinates of the bounds.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} The same object that was passed with `x`, `y`, `right` and `bottom` values matching the respective values of the StaticBody.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Checks to see if a given x,y coordinate is colliding with this Static Body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check against this body.\r\n * @param {number} y - The y coordinate to check against this body.\r\n *\r\n * @return {boolean} `true` if the given coordinate lies within this body, otherwise `false`.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * NOOP\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#postUpdate\r\n * @since 3.12.0\r\n */\r\n postUpdate: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's rotation from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's rotation from the previous step. Always zero.\r\n */\r\n deltaZ: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for destruction during the next step.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n this.world.pendingDestroy.set(this);\r\n },\r\n\r\n /**\r\n * Draws a graphical representation of the StaticBody for visual debugging purposes.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to use for the debug drawing of the StaticBody.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor, 1);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n graphic.strokeRect(pos.x, pos.y, this.width, this.height);\r\n }\r\n\r\n }\r\n },\r\n\r\n /**\r\n * Indicates whether the StaticBody is going to be showing a debug visualization during postUpdate.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether or not the StaticBody is going to show the debug visualization during postUpdate.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return this.debugShowBody;\r\n },\r\n\r\n /**\r\n * Sets the Mass of the StaticBody. Will set the Mass to 0.1 if the value passed is less than or equal to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to set the Mass to. Values of zero or less are changed to 0.1.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n if (value <= 0)\r\n {\r\n // Causes havoc otherwise\r\n value = 0.1;\r\n }\r\n\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.y = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the left-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The highest y coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lowest y coordinate of the area of the StaticBody. (y + height)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticBody.js?")},"./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js");\n\n/**\n * @classdesc\n * An Arcade Physics Static Group object.\n *\n * All Game Objects created by this Group will automatically be given static Arcade Physics bodies.\n *\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}.\n *\n * @class StaticGroup\n * @extends Phaser.GameObjects.Group\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\n * @param {Phaser.Scene} scene - The scene this group belongs to.\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n */\nvar StaticPhysicsGroup = new Class({\n\n Extends: Group,\n\n initialize:\n\n function StaticPhysicsGroup (world, scene, children, config)\n {\n if (!children && !config)\n {\n config = {\n createCallback: this.createCallbackHandler,\n removeCallback: this.removeCallbackHandler,\n createMultipleCallback: this.createMultipleCallbackHandler,\n classType: ArcadeSprite\n };\n }\n else if (IsPlainObject(children))\n {\n // children is a plain object, so swizzle them:\n config = children;\n children = null;\n\n config.createCallback = this.createCallbackHandler;\n config.removeCallback = this.removeCallbackHandler;\n config.createMultipleCallback = this.createMultipleCallbackHandler;\n config.classType = GetFastValue(config, \'classType\', ArcadeSprite);\n }\n else if (Array.isArray(children) && IsPlainObject(children[0]))\n {\n // children is an array of plain objects\n config = children;\n children = null;\n\n config.forEach(function (singleConfig)\n {\n singleConfig.createCallback = this.createCallbackHandler;\n singleConfig.removeCallback = this.removeCallbackHandler;\n singleConfig.createMultipleCallback = this.createMultipleCallbackHandler;\n singleConfig.classType = GetFastValue(singleConfig, \'classType\', ArcadeSprite);\n });\n }\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The scene this group belongs to.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#physicsType\n * @type {integer}\n * @default Phaser.Physics.Arcade.STATIC_BODY\n * @since 3.0.0\n */\n this.physicsType = CONST.STATIC_BODY;\n\n Group.call(this, scene, children, config);\n },\n\n /**\n * Adds a static physics body to the new group member (if it lacks one) and adds it to the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The new group member.\n *\n * @see Phaser.Physics.Arcade.World#enableBody\n */\n createCallbackHandler: function (child)\n {\n if (!child.body)\n {\n this.world.enableBody(child, CONST.STATIC_BODY);\n }\n },\n\n /**\n * Disables the group member\'s physics body, removing it from the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#removeCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The group member being removed.\n *\n * @see Phaser.Physics.Arcade.World#disableBody\n */\n removeCallbackHandler: function (child)\n {\n if (child.body)\n {\n this.world.disableBody(child);\n }\n },\n\n /**\n * Refreshes the group.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject[]} entries - The newly created group members.\n *\n * @see Phaser.Physics.Arcade.StaticGroup#refresh\n */\n createMultipleCallbackHandler: function ()\n {\n this.refresh();\n },\n\n /**\n * Resets each Body to the position of its parent Game Object.\n * Body sizes aren\'t changed (use {@link Phaser.Physics.Arcade.Components.Enable#refreshBody} for that).\n *\n * @method Phaser.Physics.Arcade.StaticGroup#refresh\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} This group.\n *\n * @see Phaser.Physics.Arcade.StaticBody#reset\n */\n refresh: function ()\n {\n var children = this.children.entries;\n\n for (var i = 0; i < children.length; i++)\n {\n children[i].body.reset();\n }\n\n return this;\n }\n\n});\n\nmodule.exports = StaticPhysicsGroup;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js?')},"./node_modules/phaser/src/physics/arcade/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/arcade/Body.js\");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Collider = __webpack_require__(/*! ./Collider */ \"./node_modules/phaser/src/physics/arcade/Collider.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar FuzzyGreaterThan = __webpack_require__(/*! ../../math/fuzzy/GreaterThan */ \"./node_modules/phaser/src/math/fuzzy/GreaterThan.js\");\r\nvar FuzzyLessThan = __webpack_require__(/*! ../../math/fuzzy/LessThan */ \"./node_modules/phaser/src/math/fuzzy/LessThan.js\");\r\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\r\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar ProcessQueue = __webpack_require__(/*! ../../structs/ProcessQueue */ \"./node_modules/phaser/src/structs/ProcessQueue.js\");\r\nvar ProcessTileCallbacks = __webpack_require__(/*! ./tilemap/ProcessTileCallbacks */ \"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RTree = __webpack_require__(/*! ../../structs/RTree */ \"./node_modules/phaser/src/structs/RTree.js\");\r\nvar SeparateTile = __webpack_require__(/*! ./tilemap/SeparateTile */ \"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/arcade/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/arcade/SeparateY.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar StaticBody = __webpack_require__(/*! ./StaticBody */ \"./node_modules/phaser/src/physics/arcade/StaticBody.js\");\r\nvar TileIntersectsBody = __webpack_require__(/*! ./tilemap/TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Arcade Physics World.\r\n *\r\n * The World is responsible for creating, managing, colliding and updating all of the bodies within it.\r\n *\r\n * An instance of the World belongs to a Phaser.Scene and is accessed via the property `physics.world`.\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this World instance belongs.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} config - An Arcade Physics Configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene this simulation belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Dynamic Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * Static Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticBodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.staticBodies = new Set();\r\n\r\n /**\r\n * Static Bodies marked for deletion.\r\n *\r\n * @name Phaser.Physics.Arcade.World#pendingDestroy\r\n * @type {Phaser.Structs.Set.<(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)>}\r\n * @since 3.1.0\r\n */\r\n this.pendingDestroy = new Set();\r\n\r\n /**\r\n * This simulation's collision processors.\r\n *\r\n * @name Phaser.Physics.Arcade.World#colliders\r\n * @type {Phaser.Structs.ProcessQueue.}\r\n * @since 3.0.0\r\n */\r\n this.colliders = new ProcessQueue();\r\n\r\n /**\r\n * Acceleration of Bodies due to gravity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.World#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.gravity = new Vector2(GetValue(config, 'gravity.x', 0), GetValue(config, 'gravity.y', 0));\r\n\r\n /**\r\n * A boundary constraining Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.0.0\r\n */\r\n this.bounds = new Rectangle(\r\n GetValue(config, 'x', 0),\r\n GetValue(config, 'y', 0),\r\n GetValue(config, 'width', scene.sys.scale.width),\r\n GetValue(config, 'height', scene.sys.scale.height)\r\n );\r\n\r\n /**\r\n * The boundary edges that Bodies can collide with.\r\n *\r\n * @name Phaser.Physics.Arcade.World#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.CheckCollisionObject}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = {\r\n up: GetValue(config, 'checkCollision.up', true),\r\n down: GetValue(config, 'checkCollision.down', true),\r\n left: GetValue(config, 'checkCollision.left', true),\r\n right: GetValue(config, 'checkCollision.right', true)\r\n };\r\n\r\n /**\r\n * The number of physics steps to be taken per second.\r\n *\r\n * This property is read-only. Use the `setFPS` method to modify it at run-time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#fps\r\n * @readonly\r\n * @type {number}\r\n * @default 60\r\n * @since 3.10.0\r\n */\r\n this.fps = GetValue(config, 'fps', 60);\r\n\r\n /**\r\n * The amount of elapsed ms since the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_elapsed\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Internal frame time value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTime\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTime = 1 / this.fps;\r\n\r\n /**\r\n * Internal frame time ms value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTimeMS\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n /**\r\n * The number of steps that took place in the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#stepsLastFrame\r\n * @readonly\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.stepsLastFrame = 0;\r\n\r\n /**\r\n * Scaling factor applied to the frame rate.\r\n *\r\n * - 1.0 = normal speed\r\n * - 2.0 = half speed\r\n * - 0.5 = double speed\r\n *\r\n * @name Phaser.Physics.Arcade.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.10.0\r\n */\r\n this.timeScale = GetValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * The maximum absolute difference of a Body's per-step velocity and its overlap with another Body that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#OVERLAP_BIAS\r\n * @type {number}\r\n * @default 4\r\n * @since 3.0.0\r\n */\r\n this.OVERLAP_BIAS = GetValue(config, 'overlapBias', 4);\r\n\r\n /**\r\n * The maximum absolute value of a Body's overlap with a tile that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n * The optimum value may be similar to the tile size.\r\n *\r\n * @name Phaser.Physics.Arcade.World#TILE_BIAS\r\n * @type {number}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.TILE_BIAS = GetValue(config, 'tileBias', 16);\r\n\r\n /**\r\n * Always separate overlapping Bodies horizontally before vertically.\r\n * False (the default) means Bodies are first separated on the axis of greater gravity, or the vertical axis if neither is greater.\r\n *\r\n * @name Phaser.Physics.Arcade.World#forceX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceX = GetValue(config, 'forceX', false);\r\n\r\n /**\r\n * Whether the simulation advances with the game loop.\r\n *\r\n * @name Phaser.Physics.Arcade.World#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPaused = GetValue(config, 'isPaused', false);\r\n\r\n /**\r\n * Temporary total of colliding Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_total\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._total = 0;\r\n\r\n /**\r\n * Enables the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * The graphics object drawing the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * Default debug display settings for new Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#defaults\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetValue(config, 'debugBodyColor', 0xff00ff),\r\n staticBodyDebugColor: GetValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetValue(config, 'debugVelocityColor', 0x00ff00)\r\n };\r\n\r\n /**\r\n * The maximum number of items per node on the RTree.\r\n *\r\n * This is ignored if `useTree` is `false`. If you have a large number of bodies in\r\n * your world then you may find search performance improves by increasing this value,\r\n * to allow more items per node and less node division.\r\n *\r\n * @name Phaser.Physics.Arcade.World#maxEntries\r\n * @type {integer}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.maxEntries = GetValue(config, 'maxEntries', 16);\r\n\r\n /**\r\n * Should this Arcade Physics World use an RTree for Dynamic and Static Physics bodies?\r\n *\r\n * An RTree is a fast way of spatially sorting of all the bodies in the world.\r\n * However, at certain limits, the cost of clearing and inserting the bodies into the\r\n * tree every frame becomes more expensive than the search speed gains it provides.\r\n *\r\n * If you have a large number of dynamic bodies in your world then it may be best to\r\n * disable the use of the RTree by setting this property to `false` in the physics config.\r\n * \r\n * The number it can cope with depends on browser and device, but a conservative estimate\r\n * of around 5,000 bodies should be considered the max before disabling it.\r\n *\r\n * This only applies to dynamic bodies. Static bodies are always kept in an RTree,\r\n * because they don't have to be cleared every frame, so you benefit from the\r\n * massive search speeds all the time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#useTree\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.useTree = GetValue(config, 'useTree', true);\r\n\r\n /**\r\n * The spatial index of Dynamic Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#tree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.tree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * The spatial index of Static Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticTree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.staticTree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * Recycled input for tree searches.\r\n *\r\n * @name Phaser.Physics.Arcade.World#treeMinMax\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldTreeMinMax}\r\n * @since 3.0.0\r\n */\r\n this.treeMinMax = { minX: 0, minY: 0, maxX: 0, maxY: 0 };\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `enableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to create the bodies.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n */\r\n enable: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.enable(child, bodyType);\r\n }\r\n else\r\n {\r\n this.enableBody(child, bodyType);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.enableBody(entry, bodyType);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Creates an Arcade Physics Body on a single Game Object.\r\n *\r\n * If the Game Object already has a body, this method will simply add it back into the simulation.\r\n *\r\n * You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enableBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} object - The Game Object on which to create the body.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object on which the body was created.\r\n */\r\n enableBody: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!object.body)\r\n {\r\n if (bodyType === CONST.DYNAMIC_BODY)\r\n {\r\n object.body = new Body(this, object);\r\n }\r\n else if (bodyType === CONST.STATIC_BODY)\r\n {\r\n object.body = new StaticBody(this, object);\r\n }\r\n }\r\n\r\n this.add(object.body);\r\n\r\n return object;\r\n },\r\n\r\n /**\r\n * Adds an existing Arcade Physics Body or StaticBody to the simulation.\r\n *\r\n * The body is enabled and added to the local search trees.\r\n *\r\n * @method Phaser.Physics.Arcade.World#add\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be added to the simulation.\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} The Body that was added to the simulation.\r\n */\r\n add: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.bodies.set(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.set(body);\r\n\r\n this.staticTree.insert(body);\r\n }\r\n\r\n body.enable = true;\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `disableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to disable the bodies.\r\n */\r\n disable: function (object)\r\n {\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.disable(child);\r\n }\r\n else\r\n {\r\n this.disableBody(child.body);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.disableBody(entry.body);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disableBody\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be disabled.\r\n */\r\n disableBody: function (body)\r\n {\r\n this.remove(body);\r\n\r\n body.enable = false;\r\n },\r\n\r\n /**\r\n * Removes an existing Arcade Physics Body or StaticBody from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enabled` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `enable` or `add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The body to be removed from the simulation.\r\n */\r\n remove: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.tree.remove(body);\r\n this.bodies.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.delete(body);\r\n this.staticTree.remove(body);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object that the world will use to render the debug display to.\r\n *\r\n * This is called automatically when the World is instantiated if the `debug` config property\r\n * was set to `true`. However, you can call it at any point should you need to display the\r\n * debug Graphic from a fixed point.\r\n *\r\n * You can control which objects are drawn to the Graphics object, and the colors they use,\r\n * by setting the debug properties in the physics config.\r\n *\r\n * You should not typically use this in a production game. Use it to aid during debugging.\r\n *\r\n * @method Phaser.Physics.Arcade.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object that was created for use by the World.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the position, size and properties of the World boundary.\r\n *\r\n * The World boundary is an invisible rectangle that defines the edges of the World.\r\n * If a Body is set to collide with the world bounds then it will automatically stop\r\n * when it reaches any of the edges. You can optionally set which edges of the boundary\r\n * should be checked against.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the boundary.\r\n * @param {number} y - The top-left y coordinate of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n * @param {boolean} [checkLeft] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [checkRight] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [checkUp] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [checkDown] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, checkLeft, checkRight, checkUp, checkDown)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n\r\n if (checkLeft !== undefined)\r\n {\r\n this.setBoundsCollision(checkLeft, checkRight, checkUp, checkDown);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables collisions on each edge of the World boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBoundsCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [left=true] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [right=true] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [up=true] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [down=true] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBoundsCollision: function (left, right, up, down)\r\n {\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (up === undefined) { up = true; }\r\n if (down === undefined) { down = true; }\r\n\r\n this.checkCollision.left = left;\r\n this.checkCollision.right = right;\r\n this.checkCollision.up = up;\r\n this.checkCollision.down = down;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses the simulation.\r\n *\r\n * A paused simulation does not update any existing bodies, or run any Colliders.\r\n *\r\n * However, you can still enable and disable bodies within it, or manually run collide or overlap\r\n * checks.\r\n *\r\n * @method Phaser.Physics.Arcade.World#pause\r\n * @fires Phaser.Physics.Arcade.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.isPaused = true;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the simulation, if paused.\r\n *\r\n * @method Phaser.Physics.Arcade.World#resume\r\n * @fires Phaser.Physics.Arcade.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.isPaused = false;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform collision checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.collide` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addCollider\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collide\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addCollider: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, false, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Creates a new Overlap Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform overlap checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.overlap` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addOverlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for overlap.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for overlap.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects overlap. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addOverlap: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, true, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Removes a Collider from the simulation so it is no longer processed.\r\n *\r\n * This method does not destroy the Collider. If you wish to add it back at a later stage you can call\r\n * `World.colliders.add(Collider)`.\r\n *\r\n * If you no longer need the Collider you can call the `Collider.destroy` method instead, which will\r\n * automatically clear all of its references and then remove it from the World. If you call destroy on\r\n * a Collider you _don't_ need to pass it to this method too.\r\n *\r\n * @method Phaser.Physics.Arcade.World#removeCollider\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Collider} collider - The Collider to remove from the simulation.\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n removeCollider: function (collider)\r\n {\r\n this.colliders.remove(collider);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the frame rate to run the simulation at.\r\n *\r\n * The frame rate value is used to simulate a fixed update time step. This fixed\r\n * time step allows for a straightforward implementation of a deterministic game state.\r\n *\r\n * This frame rate is independent of the frequency at which the game is rendering. The\r\n * higher you set the fps, the more physics simulation steps will occur per game step.\r\n * Conversely, the lower you set it, the less will take place.\r\n *\r\n * You can optionally advance the simulation directly yourself by calling the `step` method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setFPS\r\n * @since 3.10.0\r\n *\r\n * @param {integer} framerate - The frame rate to advance the simulation at.\r\n *\r\n * @return {this} This World object.\r\n */\r\n setFPS: function (framerate)\r\n {\r\n this.fps = framerate;\r\n this._frameTime = 1 / this.fps;\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Advances the simulation based on the elapsed time and fps rate.\r\n *\r\n * This is called automatically by your Scene and does not need to be invoked directly.\r\n *\r\n * @method Phaser.Physics.Arcade.World#update\r\n * @protected\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.isPaused || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var fixedDelta = this._frameTime;\r\n var msPerFrame = this._frameTimeMS * this.timeScale;\r\n\r\n this._elapsed += delta;\r\n\r\n // Update all active bodies\r\n var body;\r\n var bodies = this.bodies.entries;\r\n\r\n // Will a step happen this frame?\r\n var willStep = (this._elapsed >= msPerFrame);\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.preUpdate(willStep, fixedDelta);\r\n }\r\n }\r\n\r\n // We know that a step will happen this frame, so let's bundle it all together to save branching and iteration costs\r\n if (willStep)\r\n {\r\n this._elapsed -= msPerFrame;\r\n this.stepsLastFrame = 1;\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n }\r\n\r\n // Process any additional steps this frame\r\n while (this._elapsed >= msPerFrame)\r\n {\r\n this._elapsed -= msPerFrame;\r\n\r\n this.step(fixedDelta);\r\n }\r\n },\r\n\r\n /**\r\n * Advances the simulation by a time increment.\r\n *\r\n * @method Phaser.Physics.Arcade.World#step\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.10.0\r\n *\r\n * @param {number} delta - The delta time amount, in seconds, by which to advance the simulation.\r\n */\r\n step: function (delta)\r\n {\r\n // Update all active bodies\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.update(delta);\r\n }\r\n }\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n\r\n this.stepsLastFrame++;\r\n },\r\n\r\n /**\r\n * Updates bodies, draws the debug display, and handles pending queue operations.\r\n *\r\n * @method Phaser.Physics.Arcade.World#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n var dynamic = this.bodies;\r\n var staticBodies = this.staticBodies;\r\n\r\n // We don't need to postUpdate if there wasn't a step this frame\r\n if (this.stepsLastFrame)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n \r\n if (body.enable)\r\n {\r\n body.postUpdate();\r\n }\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n\r\n bodies = staticBodies.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n\r\n var pending = this.pendingDestroy;\r\n\r\n if (pending.size > 0)\r\n {\r\n var dynamicTree = this.tree;\r\n var staticTree = this.staticTree;\r\n\r\n bodies = pending.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n dynamicTree.remove(body);\r\n dynamic.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n staticTree.remove(body);\r\n staticBodies.delete(body);\r\n }\r\n\r\n body.world = undefined;\r\n body.gameObject = undefined;\r\n }\r\n\r\n pending.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Calculates a Body's velocity and updates its position.\r\n *\r\n * @method Phaser.Physics.Arcade.World#updateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to be updated.\r\n * @param {number} delta - The delta value to be used in the motion calculations, in seconds.\r\n */\r\n updateMotion: function (body, delta)\r\n {\r\n if (body.allowRotation)\r\n {\r\n this.computeAngularVelocity(body, delta);\r\n }\r\n\r\n this.computeVelocity(body, delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeAngularVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeAngularVelocity: function (body, delta)\r\n {\r\n var velocity = body.angularVelocity;\r\n var acceleration = body.angularAcceleration;\r\n var drag = body.angularDrag;\r\n var max = body.maxAngular;\r\n\r\n if (acceleration)\r\n {\r\n velocity += acceleration * delta;\r\n }\r\n else if (body.allowDrag && drag)\r\n {\r\n drag *= delta;\r\n\r\n if (FuzzyGreaterThan(velocity - drag, 0, 0.1))\r\n {\r\n velocity -= drag;\r\n }\r\n else if (FuzzyLessThan(velocity + drag, 0, 0.1))\r\n {\r\n velocity += drag;\r\n }\r\n else\r\n {\r\n velocity = 0;\r\n }\r\n }\r\n\r\n velocity = Clamp(velocity, -max, max);\r\n\r\n var velocityDelta = velocity - body.angularVelocity;\r\n\r\n body.angularVelocity += velocityDelta;\r\n body.rotation += (body.angularVelocity * delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's per-axis velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeVelocity: function (body, delta)\r\n {\r\n var velocityX = body.velocity.x;\r\n var accelerationX = body.acceleration.x;\r\n var dragX = body.drag.x;\r\n var maxX = body.maxVelocity.x;\r\n\r\n var velocityY = body.velocity.y;\r\n var accelerationY = body.acceleration.y;\r\n var dragY = body.drag.y;\r\n var maxY = body.maxVelocity.y;\r\n\r\n var speed = body.speed;\r\n var maxSpeed = body.maxSpeed;\r\n var allowDrag = body.allowDrag;\r\n var useDamping = body.useDamping;\r\n\r\n if (body.allowGravity)\r\n {\r\n velocityX += (this.gravity.x + body.gravity.x) * delta;\r\n velocityY += (this.gravity.y + body.gravity.y) * delta;\r\n }\r\n\r\n if (accelerationX)\r\n {\r\n velocityX += accelerationX * delta;\r\n }\r\n else if (allowDrag && dragX)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n\r\n velocityX *= dragX;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragX *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityX - dragX, 0, 0.01))\r\n {\r\n velocityX -= dragX;\r\n }\r\n else if (FuzzyLessThan(velocityX + dragX, 0, 0.01))\r\n {\r\n velocityX += dragX;\r\n }\r\n else\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n }\r\n\r\n if (accelerationY)\r\n {\r\n velocityY += accelerationY * delta;\r\n }\r\n else if (allowDrag && dragY)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n velocityY *= dragY;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragY *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityY - dragY, 0, 0.01))\r\n {\r\n velocityY -= dragY;\r\n }\r\n else if (FuzzyLessThan(velocityY + dragY, 0, 0.01))\r\n {\r\n velocityY += dragY;\r\n }\r\n else\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n }\r\n\r\n velocityX = Clamp(velocityX, -maxX, maxX);\r\n velocityY = Clamp(velocityY, -maxY, maxY);\r\n\r\n body.velocity.set(velocityX, velocityY);\r\n\r\n if (maxSpeed > -1 && speed > maxSpeed)\r\n {\r\n body.velocity.normalize().scale(maxSpeed);\r\n speed = maxSpeed;\r\n }\r\n\r\n body.speed = speed;\r\n },\r\n\r\n /**\r\n * Separates two Bodies.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separate\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The process callback.\r\n * @param {*} [callbackContext] - The context in which to invoke the callback.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separate: function (body1, body2, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (\r\n !body1.enable ||\r\n !body2.enable ||\r\n body1.checkCollision.none ||\r\n body2.checkCollision.none ||\r\n !this.intersects(body1, body2))\r\n {\r\n return false;\r\n }\r\n\r\n // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort.\r\n if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false)\r\n {\r\n return false;\r\n }\r\n\r\n // Circle vs. Circle quick bail out\r\n if (body1.isCircle && body2.isCircle)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n\r\n // We define the behavior of bodies in a collision circle and rectangle\r\n // If a collision occurs in the corner points of the rectangle, the body behave like circles\r\n\r\n // Either body1 or body2 is a circle\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var bodyRect = (body1.isCircle) ? body2 : body1;\r\n var bodyCircle = (body1.isCircle) ? body1 : body2;\r\n\r\n var rect = {\r\n x: bodyRect.x,\r\n y: bodyRect.y,\r\n right: bodyRect.right,\r\n bottom: bodyRect.bottom\r\n };\r\n\r\n var circle = bodyCircle.center;\r\n\r\n if (circle.y < rect.y || circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x || circle.x > rect.right)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n var resultX = false;\r\n var resultY = false;\r\n\r\n // Do we separate on x or y first?\r\n if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n else\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n\r\n var result = (resultX || resultY);\r\n\r\n if (result)\r\n {\r\n if (overlapOnly)\r\n {\r\n if (body1.onOverlap || body2.onOverlap)\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n else if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Separates two Bodies, when both are circular.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separateCircle\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n * @param {number} [bias] - A small value added to the calculations.\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separateCircle: function (body1, body2, overlapOnly, bias)\r\n {\r\n // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here)\r\n GetOverlapX(body1, body2, false, bias);\r\n GetOverlapY(body1, body2, false, bias);\r\n\r\n var overlap = 0;\r\n\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var rect = {\r\n x: (body2.isCircle) ? body1.position.x : body2.position.x,\r\n y: (body2.isCircle) ? body1.position.y : body2.position.y,\r\n right: (body2.isCircle) ? body1.right : body2.right,\r\n bottom: (body2.isCircle) ? body1.bottom : body2.bottom\r\n };\r\n\r\n var circle = {\r\n x: (body1.isCircle) ? body1.center.x : body2.center.x,\r\n y: (body1.isCircle) ? body1.center.y : body2.center.y,\r\n radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth\r\n };\r\n\r\n if (circle.y < rect.y)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius;\r\n }\r\n }\r\n else if (circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius;\r\n }\r\n }\r\n\r\n overlap *= -1;\r\n }\r\n else\r\n {\r\n overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y);\r\n }\r\n\r\n // Can't separate two immovable bodies, or a body with its own custom separation logic\r\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\r\n {\r\n if (overlap !== 0 && (body1.onOverlap || body2.onOverlap))\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n // return true if there was some overlap, otherwise false\r\n return (overlap !== 0);\r\n }\r\n\r\n var dx = body1.position.x - body2.position.x;\r\n var dy = body1.position.y - body2.position.y;\r\n var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\r\n var nx = ((body2.position.x - body1.position.x) / d) || 0;\r\n var ny = ((body2.position.y - body1.position.y) / d) || 0;\r\n var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass);\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.velocity.x = (body1.velocity.x - p * body1.mass * nx) * body1.bounce.x;\r\n body1.velocity.y = (body1.velocity.y - p * body1.mass * ny) * body1.bounce.y;\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.velocity.x = (body2.velocity.x + p * body2.mass * nx) * body2.bounce.x;\r\n body2.velocity.y = (body2.velocity.y + p * body2.mass * ny) * body2.bounce.y;\r\n }\r\n\r\n var dvx = body2.velocity.x - body1.velocity.x;\r\n var dvy = body2.velocity.y - body1.velocity.y;\r\n var angleCollision = Math.atan2(dvy, dvx);\r\n\r\n var delta = this._frameTime;\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.x += (body1.velocity.x * delta) - overlap * Math.cos(angleCollision);\r\n body1.y += (body1.velocity.y * delta) - overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.x += (body2.velocity.x * delta) + overlap * Math.cos(angleCollision);\r\n body2.y += (body2.velocity.y * delta) + overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if two Bodies intersect at all.\r\n *\r\n * @method Phaser.Physics.Arcade.World#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first body to check.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second body to check.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n intersects: function (body1, body2)\r\n {\r\n if (body1 === body2)\r\n {\r\n return false;\r\n }\r\n\r\n if (!body1.isCircle && !body2.isCircle)\r\n {\r\n // Rect vs. Rect\r\n return !(\r\n body1.right <= body2.position.x ||\r\n body1.bottom <= body2.position.y ||\r\n body1.position.x >= body2.right ||\r\n body1.position.y >= body2.bottom\r\n );\r\n }\r\n else if (body1.isCircle)\r\n {\r\n if (body2.isCircle)\r\n {\r\n // Circle vs. Circle\r\n return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth);\r\n }\r\n else\r\n {\r\n // Circle vs. Rect\r\n return this.circleBodyIntersects(body1, body2);\r\n }\r\n }\r\n else\r\n {\r\n // Rect vs. Circle\r\n return this.circleBodyIntersects(body2, body1);\r\n }\r\n },\r\n\r\n /**\r\n * Tests if a circular Body intersects with another Body.\r\n *\r\n * @method Phaser.Physics.Arcade.World#circleBodyIntersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} circle - The circular body to test.\r\n * @param {Phaser.Physics.Arcade.Body} body - The rectangular body to test.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n circleBodyIntersects: function (circle, body)\r\n {\r\n var x = Clamp(circle.center.x, body.left, body.right);\r\n var y = Clamp(circle.center.y, body.top, body.bottom);\r\n\r\n var dx = (circle.center.x - x) * (circle.center.x - x);\r\n var dy = (circle.center.y - y) * (circle.center.y - y);\r\n\r\n return (dx + dy) <= (circle.halfWidth * circle.halfWidth);\r\n },\r\n\r\n /**\r\n * Tests if Game Objects overlap.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.\r\n * @param {*} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if at least one Game Object overlaps another.\r\n */\r\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\r\n {\r\n if (overlapCallback === undefined) { overlapCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\r\n\r\n return this.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\r\n },\r\n\r\n /**\r\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\r\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\r\n *\r\n * If you don't require separation then use {@link #overlap} instead.\r\n *\r\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\r\n *\r\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\r\n * \r\n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\r\n *\r\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\r\n * objects are passed to it.\r\n *\r\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\r\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\r\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\r\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} `true` if any overlapping Game Objects were separated, otherwise `false`.\r\n */\r\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n return this.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideObjects\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideObjects: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var i;\r\n var j;\r\n\r\n if (object1.isParent && object1.physicsType === undefined)\r\n {\r\n object1 = object1.children.entries;\r\n }\r\n\r\n if (object2 && object2.isParent && object2.physicsType === undefined)\r\n {\r\n object2 = object2.children.entries;\r\n }\r\n\r\n var object1isArray = Array.isArray(object1);\r\n var object2isArray = Array.isArray(object2);\r\n\r\n this._total = 0;\r\n\r\n if (!object1isArray && !object2isArray)\r\n {\r\n // Neither of them are arrays - do this first as it's the most common use-case\r\n this.collideHandler(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (!object1isArray && object2isArray)\r\n {\r\n // Object 2 is an Array\r\n for (i = 0; i < object2.length; i++)\r\n {\r\n this.collideHandler(object1, object2[i], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n else if (object1isArray && !object2isArray)\r\n {\r\n // Object 1 is an Array\r\n if (!object2)\r\n {\r\n // Special case for array vs. self\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n var child = object1[i];\r\n\r\n for (j = i + 1; j < object1.length; j++)\r\n {\r\n if (i === j)\r\n {\r\n continue;\r\n }\r\n\r\n this.collideHandler(child, object1[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n this.collideHandler(object1[i], object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // They're both arrays\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n for (j = 0; j < object2.length; j++)\r\n {\r\n this.collideHandler(object1[i], object2[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n return (this._total > 0);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideHandler\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} collideCallback - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} callbackContext - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideHandler: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n // Collide Group with Self\r\n // Only collide valid objects\r\n if (object2 === undefined && object1.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n\r\n // If neither of the objects are set then bail out\r\n if (!object1 || !object2)\r\n {\r\n return false;\r\n }\r\n\r\n // A Body\r\n if (object1.body)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // GROUPS\r\n else if (object1.isParent)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // TILEMAP LAYERS\r\n else if (object1.isTilemap)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Sprite collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsSprite\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.GameObject} sprite2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (!sprite1.body || !sprite2.body)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.separate(sprite1.body, sprite2.body, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite1, sprite2);\r\n }\r\n\r\n this._total++;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} `true` if the Sprite collided with the given Group, otherwise `false`.\r\n */\r\n collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var bodyA = sprite.body;\r\n\r\n if (group.length === 0 || !bodyA || !bodyA.enable)\r\n {\r\n return;\r\n }\r\n\r\n // Does sprite collide with anything?\r\n\r\n var i;\r\n var len;\r\n var bodyB;\r\n\r\n if (this.useTree)\r\n {\r\n var minMax = this.treeMinMax;\r\n\r\n minMax.minX = bodyA.left;\r\n minMax.minY = bodyA.top;\r\n minMax.maxX = bodyA.right;\r\n minMax.maxY = bodyA.bottom;\r\n\r\n var results = (group.physicsType === CONST.DYNAMIC_BODY) ? this.tree.search(minMax) : this.staticTree.search(minMax);\r\n\r\n len = results.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = results[i];\r\n\r\n if (bodyA === bodyB || !group.contains(bodyB.gameObject))\r\n {\r\n // Skip if comparing against itself, or if bodyB isn't actually part of the Group\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var children = group.getChildren();\r\n var skipIndex = group.children.entries.indexOf(sprite);\r\n\r\n len = children.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = children[i].body;\r\n\r\n if (!bodyB || i === skipIndex || !bodyB.enable)\r\n {\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Group vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsTilemapLayer\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var children = group.getChildren();\r\n\r\n if (children.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var didCollide = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i].body)\r\n {\r\n if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly))\r\n {\r\n didCollide = true;\r\n }\r\n }\r\n }\r\n\r\n return didCollide;\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\r\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n * \r\n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\r\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\r\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\r\n * dynamic maps, this method can prove very useful.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, false, false);\r\n }\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\r\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlapTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, true, false);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilemapLayer\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var body = sprite.body;\r\n\r\n if (!body.enable)\r\n {\r\n return false;\r\n }\r\n\r\n var x = body.position.x;\r\n var y = body.position.y;\r\n var w = body.width;\r\n var h = body.height;\r\n\r\n // TODO: this logic should be encapsulated within the Tilemap API at some point.\r\n // If the maps base tile size differs from the layer's tile size, we need to adjust the\r\n // selection area by the difference between the two.\r\n var layerData = tilemapLayer.layer;\r\n\r\n if (layerData.tileWidth > layerData.baseTileWidth)\r\n {\r\n // The x origin of a tile is the left side, so x and width need to be adjusted.\r\n var xDiff = (layerData.tileWidth - layerData.baseTileWidth) * tilemapLayer.scaleX;\r\n x -= xDiff;\r\n w += xDiff;\r\n }\r\n\r\n if (layerData.tileHeight > layerData.baseTileHeight)\r\n {\r\n // The y origin of a tile is the bottom side, so just the height needs to be adjusted.\r\n var yDiff = (layerData.tileHeight - layerData.baseTileHeight) * tilemapLayer.scaleY;\r\n h += yDiff;\r\n }\r\n\r\n var mapData = tilemapLayer.getTilesWithinWorldXY(x, y, w, h);\r\n\r\n if (mapData.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, mapData, collideCallback, processCallback, callbackContext, overlapOnly, true);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilesHandler\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n * @param {boolean} [isLayer] - Is this check coming from a TilemapLayer or an array of tiles?\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilesHandler: function (sprite, tiles, collideCallback, processCallback, callbackContext, overlapOnly, isLayer)\r\n {\r\n var body = sprite.body;\r\n\r\n var tile;\r\n var tileWorldRect = { left: 0, right: 0, top: 0, bottom: 0 };\r\n var tilemapLayer;\r\n var collision = false;\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tile = tiles[i];\r\n\r\n tilemapLayer = tile.tilemapLayer;\r\n\r\n tileWorldRect.left = tilemapLayer.tileToWorldX(tile.x);\r\n tileWorldRect.top = tilemapLayer.tileToWorldY(tile.y);\r\n\r\n // If the map's base tile size differs from the layer's tile size, only the top of the rect\r\n // needs to be adjusted since its origin is (0, 1).\r\n if (tile.baseHeight !== tile.height)\r\n {\r\n tileWorldRect.top -= (tile.height - tile.baseHeight) * tilemapLayer.scaleY;\r\n }\r\n\r\n tileWorldRect.right = tileWorldRect.left + tile.width * tilemapLayer.scaleX;\r\n tileWorldRect.bottom = tileWorldRect.top + tile.height * tilemapLayer.scaleY;\r\n\r\n if (TileIntersectsBody(tileWorldRect, body)\r\n && (!processCallback || processCallback.call(callbackContext, sprite, tile))\r\n && ProcessTileCallbacks(tile, sprite)\r\n && (overlapOnly || SeparateTile(i, body, tile, tileWorldRect, tilemapLayer, this.TILE_BIAS, isLayer)))\r\n {\r\n this._total++;\r\n\r\n collision = true;\r\n\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite, tile);\r\n }\r\n\r\n if (overlapOnly && body.onOverlap)\r\n {\r\n this.emit(Events.TILE_OVERLAP, sprite, tile, body);\r\n }\r\n else if (body.onCollide)\r\n {\r\n this.emit(Events.TILE_COLLIDE, sprite, tile, body);\r\n }\r\n }\r\n }\r\n\r\n return collision;\r\n },\r\n\r\n /**\r\n * Internal helper for Group vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (group1.length === 0 || group2.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var children = group1.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.collideSpriteVsGroup(children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates (or several objects' coordinates) within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrap\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.\r\n * @param {number} [padding=0] - An amount added to each boundary edge during the operation.\r\n */\r\n wrap: function (object, padding)\r\n {\r\n if (object.body)\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n else if (object.getChildren)\r\n {\r\n this.wrapArray(object.getChildren(), padding);\r\n }\r\n else if (Array.isArray(object))\r\n {\r\n this.wrapArray(object, padding);\r\n }\r\n else\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap each object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapArray\r\n * @since 3.3.0\r\n *\r\n * @param {Array.<*>} objects - An array of objects to be wrapped.\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapArray: function (objects, padding)\r\n {\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n this.wrapObject(objects[i], padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapObject\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Physics Body, or any object with `x` and `y` coordinates\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapObject: function (object, padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n object.x = Wrap(object.x, this.bounds.left - padding, this.bounds.right + padding);\r\n object.y = Wrap(object.y, this.bounds.top - padding, this.bounds.bottom + padding);\r\n },\r\n\r\n /**\r\n * Shuts down the simulation, clearing physics data and removing listeners.\r\n *\r\n * @method Phaser.Physics.Arcade.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.tree.clear();\r\n this.staticTree.clear();\r\n this.bodies.clear();\r\n this.staticBodies.clear();\r\n this.colliders.destroy();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Shuts down the simulation and disconnects it from the current scene.\r\n *\r\n * @method Phaser.Physics.Arcade.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/World.js?")},"./node_modules/phaser/src/physics/arcade/components/Acceleration.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Acceleration\n * @since 3.0.0\n */\nvar Acceleration = {\n\n /**\n * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAcceleration\n * @since 3.0.0\n *\n * @param {number} x - The horizontal acceleration\n * @param {number} [y=x] - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAcceleration: function (x, y)\n {\n this.body.acceleration.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationX\n * @since 3.0.0\n *\n * @param {number} value - The horizontal acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationX: function (value)\n {\n this.body.acceleration.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationY\n * @since 3.0.0\n *\n * @param {number} value - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationY: function (value)\n {\n this.body.acceleration.y = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Acceleration;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Acceleration.js?")},"./node_modules/phaser/src/physics/arcade/components/Angular.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Angular\n * @since 3.0.0\n */\nvar Angular = {\n\n /**\n * Sets the angular velocity of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularVelocity\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular velocity.\n *\n * @return {this} This Game Object.\n */\n setAngularVelocity: function (value)\n {\n this.body.angularVelocity = value;\n\n return this;\n },\n\n /**\n * Sets the angular acceleration of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularAcceleration\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular acceleration.\n *\n * @return {this} This Game Object.\n */\n setAngularAcceleration: function (value)\n {\n this.body.angularAcceleration = value;\n\n return this;\n },\n\n /**\n * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularDrag\n * @since 3.0.0\n *\n * @param {number} value - The amount of drag.\n *\n * @return {this} This Game Object.\n */\n setAngularDrag: function (value)\n {\n this.body.angularDrag = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Angular;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Angular.js?")},"./node_modules/phaser/src/physics/arcade/components/Bounce.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the bounce properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Bounce\n * @since 3.0.0\n */\nvar Bounce = {\n\n /**\n * Sets the bounce values of this body.\n * \n * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.\n * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounce\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n * @param {number} [y=x] - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounce: function (x, y)\n {\n this.body.bounce.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceX: function (value)\n {\n this.body.bounce.x = value;\n\n return this;\n },\n\n /**\n * Sets the vertical bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceY: function (value)\n {\n this.body.bounce.y = value;\n\n return this;\n },\n\n /**\n * Sets whether this Body collides with the world boundary.\n * \n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\n *\n * @return {this} This Game Object.\n */\n setCollideWorldBounds: function (value, bounceX, bounceY)\n {\n this.body.setCollideWorldBounds(value, bounceX, bounceY);\n\n return this;\n }\n\n};\n\nmodule.exports = Bounce;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Bounce.js?")},"./node_modules/phaser/src/physics/arcade/components/Debug.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the debug properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Debug\n * @since 3.0.0\n */\nvar Debug = {\n\n /**\n * Sets the debug values of this body.\n * \n * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.\n * Note that there is a performance cost in drawing debug displays. It should never be used in production.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebug\n * @since 3.0.0\n *\n * @param {boolean} showBody - Set to `true` to have this body render its outline to the debug display.\n * @param {boolean} showVelocity - Set to `true` to have this body render a velocity marker to the debug display.\n * @param {number} bodyColor - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebug: function (showBody, showVelocity, bodyColor)\n {\n this.debugShowBody = showBody;\n this.debugShowVelocity = showVelocity;\n this.debugBodyColor = bodyColor;\n\n return this;\n },\n\n /**\n * Sets the color of the body outline when it renders to the debug display.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebugBodyColor\n * @since 3.0.0\n *\n * @param {number} value - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebugBodyColor: function (value)\n {\n this.body.debugBodyColor = value;\n\n return this;\n },\n\n /**\n * Set to `true` to have this body render its outline to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowBody\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowBody: {\n\n get: function ()\n {\n return this.body.debugShowBody;\n },\n\n set: function (value)\n {\n this.body.debugShowBody = value;\n }\n\n },\n\n /**\n * Set to `true` to have this body render a velocity marker to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowVelocity\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowVelocity: {\n\n get: function ()\n {\n return this.body.debugShowVelocity;\n },\n\n set: function (value)\n {\n this.body.debugShowVelocity = value;\n }\n\n },\n\n /**\n * The color of the body outline when it renders to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugBodyColor\n * @type {number}\n * @since 3.0.0\n */\n debugBodyColor: {\n\n get: function ()\n {\n return this.body.debugBodyColor;\n },\n\n set: function (value)\n {\n this.body.debugBodyColor = value;\n }\n\n }\n\n};\n\nmodule.exports = Debug;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Debug.js?")},"./node_modules/phaser/src/physics/arcade/components/Drag.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the drag properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Drag\n * @since 3.0.0\n */\nvar Drag = {\n\n /**\n * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDrag\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal drag to apply.\n * @param {number} [y=x] - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDrag: function (x, y)\n {\n this.body.drag.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragX: function (value)\n {\n this.body.drag.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragY: function (value)\n {\n this.body.drag.y = value;\n\n return this;\n },\n\n /**\n * If this Body is using `drag` for deceleration this function controls how the drag is applied.\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\n *\n * If you enable this property then you should use far smaller `drag` values than with linear, as\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDamping\n * @since 3.10.0\n *\n * @param {boolean} value - `true` to use damping for deceleration, or `false` to use linear deceleration.\n *\n * @return {this} This Game Object.\n */\n setDamping: function (value)\n {\n this.body.useDamping = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Drag;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Drag.js?")},"./node_modules/phaser/src/physics/arcade/components/Enable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the enable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Enable\n * @since 3.0.0\n */\nvar Enable = {\n\n /**\n * Enables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#enableBody\n * @since 3.0.0\n *\n * @param {boolean} reset - Also reset the Body and place it at (x, y).\n * @param {number} x - The horizontal position to place the Game Object and Body.\n * @param {number} y - The horizontal position to place the Game Object and Body.\n * @param {boolean} enableGameObject - Also activate this Game Object.\n * @param {boolean} showGameObject - Also show this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.Physics.Arcade.Body#reset\n * @see Phaser.Physics.Arcade.StaticBody#reset\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n enableBody: function (reset, x, y, enableGameObject, showGameObject)\n {\n if (reset)\n {\n this.body.reset(x, y);\n }\n\n if (enableGameObject)\n {\n this.body.gameObject.active = true;\n }\n\n if (showGameObject)\n {\n this.body.gameObject.visible = true;\n }\n\n this.body.enable = true;\n\n return this;\n },\n\n /**\n * Stops and disables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#disableBody\n * @since 3.0.0\n *\n * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object.\n * @param {boolean} [hideGameObject=false] - Also hide this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n disableBody: function (disableGameObject, hideGameObject)\n {\n if (disableGameObject === undefined) { disableGameObject = false; }\n if (hideGameObject === undefined) { hideGameObject = false; }\n\n this.body.stop();\n\n this.body.enable = false;\n\n if (disableGameObject)\n {\n this.body.gameObject.active = false;\n }\n\n if (hideGameObject)\n {\n this.body.gameObject.visible = false;\n }\n\n return this;\n },\n\n /**\n * Syncs the Body's position and size with its parent Game Object.\n * You don't need to call this for Dynamic Bodies, as it happens automatically.\n * But for Static bodies it's a useful way of modifying the position of a Static Body\n * in the Physics World, based on its Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#refreshBody\n * @since 3.1.0\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\n */\n refreshBody: function ()\n {\n this.body.updateFromGameObject();\n\n return this;\n }\n\n};\n\nmodule.exports = Enable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Enable.js?")},"./node_modules/phaser/src/physics/arcade/components/Friction.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @namespace Phaser.Physics.Arcade.Components.Friction\n * @since 3.0.0\n */\nvar Friction = {\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFriction\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal friction to apply.\n * @param {number} [y=x] - The amount of vertical friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFriction: function (x, y)\n {\n this.body.friction.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionX: function (x)\n {\n this.body.friction.x = x;\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionY: function (y)\n {\n this.body.friction.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Friction;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Friction.js?")},"./node_modules/phaser/src/physics/arcade/components/Gravity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the gravity properties of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Gravity\n * @since 3.0.0\n */\nvar Gravity = {\n\n /**\n * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect.\n * \n * If only one value is provided, this value will be used for both the X and Y axis.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravity\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n * @param {number} [y=x] - The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used.\n *\n * @return {this} This Game Object.\n */\n setGravity: function (x, y)\n {\n this.body.gravity.set(x, y);\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityX\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityX: function (x)\n {\n this.body.gravity.x = x;\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityY\n * @since 3.0.0\n *\n * @param {number} y - The gravitational force to be applied to the Y-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityY: function (y)\n {\n this.body.gravity.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Gravity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Gravity.js?")},"./node_modules/phaser/src/physics/arcade/components/Immovable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the immovable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Immovable\n * @since 3.0.0\n */\nvar Immovable = {\n\n /**\n * Sets Whether this Body can be moved by collisions with another Body.\n *\n * @method Phaser.Physics.Arcade.Components.Immovable#setImmovable\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - Sets if this body can be moved by collisions with another Body.\n *\n * @return {this} This Game Object.\n */\n setImmovable: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.body.immovable = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Immovable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Immovable.js?")},"./node_modules/phaser/src/physics/arcade/components/Mass.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the mass properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Mass\n * @since 3.0.0\n */\nvar Mass = {\n\n /**\n * Sets the mass of the physics body\n *\n * @method Phaser.Physics.Arcade.Components.Mass#setMass\n * @since 3.0.0\n *\n * @param {number} value - New value for the mass of the body.\n *\n * @return {this} This Game Object.\n */\n setMass: function (value)\n {\n this.body.mass = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Mass;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Mass.js?")},"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js":function(module,exports){eval("/**\r\n * This method will search the given rectangular area and return an array of all physics bodies that\r\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\r\n * \r\n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\r\n * contained within it.\r\n * \r\n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\r\n * otherwise the search is O(N) for Dynamic Bodies.\r\n *\r\n * @function Phaser.Physics.Arcade.Components.OverlapRect\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the area to search within.\r\n * @param {number} y - The top-left y coordinate of the area to search within.\r\n * @param {number} width - The width of the area to search within.\r\n * @param {number} height - The height of the area to search within.\r\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\r\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\r\n */\r\nvar OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic)\r\n{\r\n if (includeDynamic === undefined) { includeDynamic = true; }\r\n if (includeStatic === undefined) { includeStatic = false; }\r\n\r\n var dynamicBodies = [];\r\n var staticBodies = [];\r\n\r\n var minMax = world.treeMinMax;\r\n\r\n minMax.minX = x;\r\n minMax.minY = y;\r\n minMax.maxX = x + width;\r\n minMax.maxY = y + height;\r\n\r\n if (includeStatic)\r\n {\r\n staticBodies = world.staticTree.search(minMax);\r\n }\r\n\r\n if (includeDynamic && world.useTree)\r\n {\r\n dynamicBodies = world.tree.search(minMax);\r\n }\r\n else if (includeDynamic)\r\n {\r\n var bodies = world.bodies;\r\n\r\n var fakeBody =\r\n {\r\n position: {\r\n x: x,\r\n y: y\r\n },\r\n left: x,\r\n top: y,\r\n right: x + width,\r\n bottom: y + height,\r\n isCircle: false\r\n };\r\n\r\n var intersects = world.intersects;\r\n\r\n bodies.iterate(function (target)\r\n {\r\n if (intersects(target, fakeBody))\r\n {\r\n dynamicBodies.push(target);\r\n }\r\n\r\n });\r\n }\r\n\r\n return staticBodies.concat(dynamicBodies);\r\n};\r\n\r\nmodule.exports = OverlapRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/OverlapRect.js?")},"./node_modules/phaser/src/physics/arcade/components/Size.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the size of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Size\n * @since 3.0.0\n */\nvar Size = {\n\n /**\n * Sets the body offset. This allows you to adjust the difference between the center of the body\n * and the x and y coordinates of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setOffset\n * @since 3.0.0\n *\n * @param {number} x - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [y=x] - The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (x, y)\n {\n this.body.setOffset(x, y);\n\n return this;\n },\n\n /**\n * Sets the size of this physics body. Setting the size does not adjust the dimensions\n * of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The new width of the physics body, in pixels.\n * @param {number} height - The new height of the physics body, in pixels.\n * @param {boolean} [center=true] - Should the body be re-positioned so its center aligns with the parent Game Object?\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, center)\n {\n this.body.setSize(width, height, center);\n\n return this;\n },\n\n /**\n * Sets this physics body to use a circle for collision instead of a rectangle.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setCircle\n * @since 3.0.0\n *\n * @param {number} radius - The radius of the physics body, in pixels.\n * @param {number} [offsetX] - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [offsetY] - The amount to offset the body from the parent Game Object along the y-axis.\n *\n * @return {this} This Game Object.\n */\n setCircle: function (radius, offsetX, offsetY)\n {\n this.body.setCircle(radius, offsetX, offsetY);\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Size.js?")},"./node_modules/phaser/src/physics/arcade/components/Velocity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for modifying the velocity of an Arcade Physics body.\n *\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Velocity\n * @since 3.0.0\n */\nvar Velocity = {\n\n /**\n * Sets the velocity of the Body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocity\n * @since 3.0.0\n *\n * @param {number} x - The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left.\n * @param {number} [y=x] - The vertical velocity of the body. Positive values move the body down, while negative values move it up.\n *\n * @return {this} This Game Object.\n */\n setVelocity: function (x, y)\n {\n this.body.setVelocity(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal component of the body's velocity.\n *\n * Positive values move the body to the right, while negative values move it to the left.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityX\n * @since 3.0.0\n *\n * @param {number} x - The new horizontal velocity.\n *\n * @return {this} This Game Object.\n */\n setVelocityX: function (x)\n {\n this.body.setVelocityX(x);\n\n return this;\n },\n\n /**\n * Sets the vertical component of the body's velocity.\n *\n * Positive values move the body down, while negative values move it up.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityY\n * @since 3.0.0\n *\n * @param {number} y - The new vertical velocity of the body.\n *\n * @return {this} This Game Object.\n */\n setVelocityY: function (y)\n {\n this.body.setVelocityY(y);\n\n return this;\n },\n\n /**\n * Sets the maximum velocity of the body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setMaxVelocity\n * @since 3.0.0\n *\n * @param {number} x - The new maximum horizontal velocity.\n * @param {number} [y=x] - The new maximum vertical velocity.\n *\n * @return {this} This Game Object.\n */\n setMaxVelocity: function (x, y)\n {\n this.body.maxVelocity.set(x, y);\n\n return this;\n }\n\n};\n\nmodule.exports = Velocity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Velocity.js?")},"./node_modules/phaser/src/physics/arcade/components/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Components\n */\n\nmodule.exports = {\n\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/arcade/components/Acceleration.js"),\n Angular: __webpack_require__(/*! ./Angular */ "./node_modules/phaser/src/physics/arcade/components/Angular.js"),\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/arcade/components/Bounce.js"),\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/arcade/components/Debug.js"),\n Drag: __webpack_require__(/*! ./Drag */ "./node_modules/phaser/src/physics/arcade/components/Drag.js"),\n Enable: __webpack_require__(/*! ./Enable */ "./node_modules/phaser/src/physics/arcade/components/Enable.js"),\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/arcade/components/Friction.js"),\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/arcade/components/Gravity.js"),\n Immovable: __webpack_require__(/*! ./Immovable */ "./node_modules/phaser/src/physics/arcade/components/Immovable.js"),\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/arcade/components/Mass.js"),\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/physics/arcade/components/Size.js"),\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/arcade/components/Velocity.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/index.js?')},"./node_modules/phaser/src/physics/arcade/const.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Arcade Physics consts.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Dynamic Body.\n *\n * @name Phaser.Physics.Arcade.DYNAMIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.Group#physicsType\n */\n DYNAMIC_BODY: 0,\n\n /**\n * Static Body.\n *\n * @name Phaser.Physics.Arcade.STATIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.StaticBody#physicsType\n */\n STATIC_BODY: 1,\n\n /**\n * Arcade Physics Group containing Dynamic Bodies.\n *\n * @name Phaser.Physics.Arcade.GROUP\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n GROUP: 2,\n\n /**\n * A Tilemap Layer.\n *\n * @name Phaser.Physics.Arcade.TILEMAPLAYER\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n TILEMAPLAYER: 3,\n\n /**\n * Facing no direction (initial value).\n *\n * @name Phaser.Physics.Arcade.FACING_NONE\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_NONE: 10,\n\n /**\n * Facing up.\n *\n * @name Phaser.Physics.Arcade.FACING_UP\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_UP: 11,\n\n /**\n * Facing down.\n *\n * @name Phaser.Physics.Arcade.FACING_DOWN\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_DOWN: 12,\n\n /**\n * Facing left.\n *\n * @name Phaser.Physics.Arcade.FACING_LEFT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_LEFT: 13,\n\n /**\n * Facing right.\n *\n * @name Phaser.Physics.Arcade.FACING_RIGHT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_RIGHT: 14\n\n};\n\nmodule.exports = CONST;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/const.js?")},"./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least\n * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#COLLIDE\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the collision. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the collision. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the collision.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the collision.\n */\nmodule.exports = 'collide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least\n * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#OVERLAP\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the overlap. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the overlap. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the overlap.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the overlap.\n */\nmodule.exports = 'overlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Pause Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it is paused.\n * \n * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Resume Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state.\n * \n * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_\n * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the collision. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body collided with.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the collision.\n */\nmodule.exports = 'tilecollide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_\n * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the overlap. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body overlapped.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the overlap.\n */\nmodule.exports = 'tileoverlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Bounds Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_\n * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_BOUNDS\n * @since 3.0.0\n * \n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body that hit the world bounds.\n * @param {boolean} up - Is the Body blocked up? I.e. collided with the top of the world bounds.\n * @param {boolean} down - Is the Body blocked down? I.e. collided with the bottom of the world bounds.\n * @param {boolean} left - Is the Body blocked left? I.e. collided with the left of the world bounds.\n * @param {boolean} right - Is the Body blocked right? I.e. collided with the right of the world bounds.\n */\nmodule.exports = 'worldbounds';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Step Event.\n * \n * This event is dispatched by an Arcade Physics World instance whenever a physics step is run.\n * It is emitted _after_ the bodies and colliders have been updated.\n * \n * In high framerate settings this can be multiple times per game frame.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_STEP\n * @since 3.18.0\n */\nmodule.exports = 'worldstep';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Events\n */\n\nmodule.exports = {\n\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js"),\n OVERLAP: __webpack_require__(/*! ./OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js"),\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js"),\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js"),\n TILE_COLLIDE: __webpack_require__(/*! ./TILE_COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js"),\n TILE_OVERLAP: __webpack_require__(/*! ./TILE_OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js"),\n WORLD_BOUNDS: __webpack_require__(/*! ./WORLD_BOUNDS_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js"),\n WORLD_STEP: __webpack_require__(/*! ./WORLD_STEP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/index.js?')},"./node_modules/phaser/src/physics/arcade/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\n\n/**\n * @callback ArcadePhysicsCallback\n *\n * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate.\n * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate.\n */\n\n/**\n * @namespace Phaser.Physics.Arcade\n */\n\nvar Arcade = {\n\n ArcadePhysics: __webpack_require__(/*! ./ArcadePhysics */ "./node_modules/phaser/src/physics/arcade/ArcadePhysics.js"),\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/arcade/Body.js"),\n Collider: __webpack_require__(/*! ./Collider */ "./node_modules/phaser/src/physics/arcade/Collider.js"),\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js"),\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/arcade/events/index.js"),\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/arcade/Factory.js"),\n Group: __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js"),\n Image: __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js"),\n Sprite: __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js"),\n StaticBody: __webpack_require__(/*! ./StaticBody */ "./node_modules/phaser/src/physics/arcade/StaticBody.js"),\n StaticGroup: __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js"),\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/arcade/World.js")\n\n};\n\n// Merge in the consts\nArcade = Extend(false, Arcade, CONST);\n\nmodule.exports = Arcade;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/index.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks\n * @since 3.0.0\n *\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to process.\n * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile.\n *\n * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair.\n */\nvar ProcessTileCallbacks = function (tile, sprite)\n{\n // Tile callbacks take priority over layer level callbacks\n if (tile.collisionCallback)\n {\n return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile);\n }\n else if (tile.layer.callbacks[tile.index])\n {\n return !tile.layer.callbacks[tile.index].callback.call(\n tile.layer.callbacks[tile.index].callbackContext, sprite, tile\n );\n }\n\n return true;\n};\n\nmodule.exports = ProcessTileCallbacks;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} x - The x separation amount.\n */\nvar ProcessTileSeparationX = function (body, x)\n{\n if (x < 0)\n {\n body.blocked.none = false;\n body.blocked.left = true;\n }\n else if (x > 0)\n {\n body.blocked.none = false;\n body.blocked.right = true;\n }\n\n body.position.x -= x;\n\n if (body.bounce.x === 0)\n {\n body.velocity.x = 0;\n }\n else\n {\n body.velocity.x = -body.velocity.x * body.bounce.x;\n }\n};\n\nmodule.exports = ProcessTileSeparationX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} y - The y separation amount.\n */\nvar ProcessTileSeparationY = function (body, y)\n{\n if (y < 0)\n {\n body.blocked.none = false;\n body.blocked.up = true;\n }\n else if (y > 0)\n {\n body.blocked.none = false;\n body.blocked.down = true;\n }\n\n body.position.y -= y;\n\n if (body.bounce.y === 0)\n {\n body.velocity.y = 0;\n }\n else\n {\n body.velocity.y = -body.velocity.y * body.bounce.y;\n }\n};\n\nmodule.exports = ProcessTileSeparationY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TileCheckX = __webpack_require__(/*! ./TileCheckX */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js\");\nvar TileCheckY = __webpack_require__(/*! ./TileCheckY */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js\");\nvar TileIntersectsBody = __webpack_require__(/*! ./TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\n\n/**\n * The core separation function to separate a physics body and a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.SeparateTile\n * @since 3.0.0\n *\n * @param {number} i - The index of the tile within the map data.\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against.\n * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile.\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {boolean} `true` if the body was separated, otherwise `false`.\n */\nvar SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer)\n{\n var tileLeft = tileWorldRect.left;\n var tileTop = tileWorldRect.top;\n var tileRight = tileWorldRect.right;\n var tileBottom = tileWorldRect.bottom;\n var faceHorizontal = tile.faceLeft || tile.faceRight;\n var faceVertical = tile.faceTop || tile.faceBottom;\n\n if (!isLayer)\n {\n faceHorizontal = true;\n faceVertical = true;\n }\n\n // We don't need to go any further if this tile doesn't actually have any colliding faces. This\n // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't\n // needed for separation.\n if (!faceHorizontal && !faceVertical)\n {\n return false;\n }\n\n var ox = 0;\n var oy = 0;\n var minX = 0;\n var minY = 1;\n\n if (body.deltaAbsX() > body.deltaAbsY())\n {\n // Moving faster horizontally, check X axis first\n minX = -1;\n }\n else if (body.deltaAbsX() < body.deltaAbsY())\n {\n // Moving faster vertically, check Y axis first\n minY = -1;\n }\n\n if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical)\n {\n // We only need do this if both axes have colliding faces AND we're moving in both\n // directions\n minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft));\n minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop));\n }\n\n if (minX < minY)\n {\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n\n // That's horizontal done, check if we still intersects? If not then we can return now\n if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n }\n }\n else\n {\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n\n // That's vertical done, check if we still intersects? If not then we can return now\n if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n }\n }\n\n return (ox !== 0 || oy !== 0);\n};\n\nmodule.exports = SeparateTile;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationX = __webpack_require__(/*! ./ProcessTileSeparationX */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js");\n\n/**\n * Check the body against the given tile on the X axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileLeft - The left position of the tile within the tile world.\n * @param {number} tileRight - The right position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer)\n{\n var ox = 0;\n\n var faceLeft = tile.faceLeft;\n var faceRight = tile.faceRight;\n var collideLeft = tile.collideLeft;\n var collideRight = tile.collideRight;\n\n if (!isLayer)\n {\n faceLeft = true;\n faceRight = true;\n collideLeft = true;\n collideRight = true;\n }\n\n if (body.deltaX() < 0 && !body.blocked.left && collideRight && body.checkCollision.left)\n {\n // Body is moving LEFT\n if (faceRight && body.x < tileRight)\n {\n ox = body.x - tileRight;\n\n if (ox < -tileBias)\n {\n ox = 0;\n }\n }\n }\n else if (body.deltaX() > 0 && !body.blocked.right && collideLeft && body.checkCollision.right)\n {\n // Body is moving RIGHT\n if (faceLeft && body.right > tileLeft)\n {\n ox = body.right - tileLeft;\n\n if (ox > tileBias)\n {\n ox = 0;\n }\n }\n }\n\n if (ox !== 0)\n {\n if (body.customSeparateX)\n {\n body.overlapX = ox;\n }\n else\n {\n ProcessTileSeparationX(body, ox);\n }\n }\n\n return ox;\n};\n\nmodule.exports = TileCheckX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationY = __webpack_require__(/*! ./ProcessTileSeparationY */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js");\n\n/**\n * Check the body against the given tile on the Y axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileTop - The top position of the tile within the tile world.\n * @param {number} tileBottom - The bottom position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer)\n{\n var oy = 0;\n\n var faceTop = tile.faceTop;\n var faceBottom = tile.faceBottom;\n var collideUp = tile.collideUp;\n var collideDown = tile.collideDown;\n\n if (!isLayer)\n {\n faceTop = true;\n faceBottom = true;\n collideUp = true;\n collideDown = true;\n }\n\n if (body.deltaY() < 0 && !body.blocked.up && collideDown && body.checkCollision.up)\n {\n // Body is moving UP\n if (faceBottom && body.y < tileBottom)\n {\n oy = body.y - tileBottom;\n\n if (oy < -tileBias)\n {\n oy = 0;\n }\n }\n }\n else if (body.deltaY() > 0 && !body.blocked.down && collideUp && body.checkCollision.down)\n {\n // Body is moving DOWN\n if (faceTop && body.bottom > tileTop)\n {\n oy = body.bottom - tileTop;\n\n if (oy > tileBias)\n {\n oy = 0;\n }\n }\n }\n\n if (oy !== 0)\n {\n if (body.customSeparateY)\n {\n body.overlapY = oy;\n }\n else\n {\n ProcessTileSeparationY(body, oy);\n }\n }\n\n return oy;\n};\n\nmodule.exports = TileCheckY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody\n * @since 3.0.0\n *\n * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world.\n * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against.\n *\n * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`.\n */\nvar TileIntersectsBody = function (tileWorldRect, body)\n{\n // Currently, all bodies are treated as rectangles when colliding with a Tile.\n\n return !(\n body.right <= tileWorldRect.left ||\n body.bottom <= tileWorldRect.top ||\n body.position.x >= tileWorldRect.right ||\n body.position.y >= tileWorldRect.bottom\n );\n};\n\nmodule.exports = TileIntersectsBody;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js?")},"./node_modules/phaser/src/physics/impact/Body.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\nvar GetVelocity = __webpack_require__(/*! ./GetVelocity */ "./node_modules/phaser/src/physics/impact/GetVelocity.js");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\nvar UpdateMotion = __webpack_require__(/*! ./UpdateMotion */ "./node_modules/phaser/src/physics/impact/UpdateMotion.js");\r\n\r\n/**\r\n * @callback Phaser.Types.Physics.Impact.BodyUpdateCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * An Impact.js compatible physics body.\r\n * This re-creates the properties you\'d get on an Entity and the math needed to update them.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [sx=16] - [description]\r\n * @param {number} [sy=16] - [description]\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, x, y, sx, sy)\r\n {\r\n if (sx === undefined) { sx = 16; }\r\n if (sy === undefined) { sy = sx; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gameObject = null;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any.\r\n *\r\n * @name Phaser.Physics.Impact.Body#parent\r\n * @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)}\r\n * @since 3.0.0\r\n */\r\n this.parent;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#id\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.id = world.getNextID();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#size\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.size = { x: sx, y: sy };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#offset\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.offset = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#pos\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.pos = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#last\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.last = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#vel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.vel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.accel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#friction\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.friction = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#maxVel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = { x: world.defaults.maxVelocityX, y: world.defaults.maxVelocityY };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#standing\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.standing = false;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gravityFactor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.gravityFactor = world.defaults.gravityFactor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#bounciness\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.bounciness = world.defaults.bounciness;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#minBounceVelocity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.minBounceVelocity = world.defaults.minBounceVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelGround\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelGround = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelAir\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelAir = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#jumpSpeed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.jumpSpeed = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#type\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.type = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#checkAgainst\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.checkAgainst = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#collides\r\n * @type {Phaser.Physics.Impact.COLLIDES}\r\n * @since 3.0.0\r\n */\r\n this.collides = COLLIDES.NEVER;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#updateCallback\r\n * @type {?Phaser.Types.Physics.Impact.BodyUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.updateCallback;\r\n\r\n /**\r\n * min 44 deg, max 136 deg\r\n *\r\n * @name Phaser.Physics.Impact.Body#slopeStanding\r\n * @type {{ min: number, max: number }}\r\n * @since 3.0.0\r\n */\r\n this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 };\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n */\r\n reset: function (x, y)\r\n {\r\n this.pos = { x: x, y: y };\r\n this.last = { x: x, y: y };\r\n this.vel = { x: 0, y: 0 };\r\n this.accel = { x: 0, y: 0 };\r\n this.friction = { x: 0, y: 0 };\r\n this.maxVel = { x: 100, y: 100 };\r\n\r\n this.standing = false;\r\n\r\n this.gravityFactor = 1;\r\n this.bounciness = 0;\r\n this.minBounceVelocity = 40;\r\n\r\n this.accelGround = 0;\r\n this.accelAir = 0;\r\n this.jumpSpeed = 0;\r\n\r\n this.type = TYPE.NONE;\r\n this.checkAgainst = TYPE.NONE;\r\n this.collides = COLLIDES.NEVER;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n var pos = this.pos;\r\n\r\n this.last.x = pos.x;\r\n this.last.y = pos.y;\r\n\r\n this.vel.y += this.world.gravity * delta * this.gravityFactor;\r\n\r\n this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x);\r\n this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y);\r\n\r\n var mx = this.vel.x * delta;\r\n var my = this.vel.y * delta;\r\n\r\n var res = this.world.collisionMap.trace(pos.x, pos.y, mx, my, this.size.x, this.size.y);\r\n\r\n if (this.handleMovementTrace(res))\r\n {\r\n UpdateMotion(this, res);\r\n }\r\n\r\n var go = this.gameObject;\r\n\r\n if (go)\r\n {\r\n go.x = (pos.x - this.offset.x) + go.displayOriginX * go.scaleX;\r\n go.y = (pos.y - this.offset.y) + go.displayOriginY * go.scaleY;\r\n }\r\n\r\n if (this.updateCallback)\r\n {\r\n this.updateCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - [description]\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.pos;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(1, this.debugBodyColor, 1);\r\n graphic.strokeRect(pos.x, pos.y, this.size.x, this.size.y);\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n var x = pos.x + this.size.x / 2;\r\n var y = pos.y + this.size.y / 2;\r\n\r\n graphic.lineStyle(1, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#skipHash\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n skipHash: function ()\r\n {\r\n return (!this.enabled || (this.type === 0 && this.checkAgainst === 0 && this.collides === 0));\r\n },\r\n\r\n /**\r\n * Determines whether the body collides with the `other` one or not.\r\n *\r\n * @method Phaser.Physics.Impact.Body#touches\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n touches: function (other)\r\n {\r\n return !(\r\n this.pos.x >= other.pos.x + other.size.x ||\r\n this.pos.x + this.size.x <= other.pos.x ||\r\n this.pos.y >= other.pos.y + other.size.y ||\r\n this.pos.y + this.size.y <= other.pos.y\r\n );\r\n },\r\n\r\n /**\r\n * Reset the size and position of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Body#resetSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to position the body.\r\n * @param {number} y - The y coordinate to position the body.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.Body} This Body object.\r\n */\r\n resetSize: function (x, y, width, height)\r\n {\r\n this.pos.x = x;\r\n this.pos.y = y;\r\n this.size.x = width;\r\n this.size.y = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Export this body object to JSON.\r\n *\r\n * @method Phaser.Physics.Impact.Body#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Physics.Impact.JSONImpactBody} JSON representation of this body object.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n size: { x: this.size.x, y: this.size.y },\r\n pos: { x: this.pos.x, y: this.pos.y },\r\n vel: { x: this.vel.x, y: this.vel.y },\r\n accel: { x: this.accel.x, y: this.accel.y },\r\n friction: { x: this.friction.x, y: this.friction.y },\r\n maxVel: { x: this.maxVel.x, y: this.maxVel.y },\r\n gravityFactor: this.gravityFactor,\r\n bounciness: this.bounciness,\r\n minBounceVelocity: this.minBounceVelocity,\r\n type: this.type,\r\n checkAgainst: this.checkAgainst,\r\n collides: this.collides\r\n };\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#fromJSON\r\n * @todo Code it!\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n */\r\n fromJSON: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#check\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n */\r\n check: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#collideWith\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n collideWith: function (other, axis)\r\n {\r\n if (this.parent && this.parent._collideCallback)\r\n {\r\n this.parent._collideCallback.call(this.parent._callbackScope, this, other, axis);\r\n }\r\n },\r\n\r\n /**\r\n * Can be overridden by user code but must return a boolean.\r\n *\r\n * @method Phaser.Physics.Impact.Body#handleMovementTrace\r\n * @since 3.0.0\r\n *\r\n * @param {number} res - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n handleMovementTrace: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.remove(this);\r\n\r\n this.enabled = false;\r\n\r\n this.world = null;\r\n\r\n this.gameObject = null;\r\n\r\n this.parent = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Body.js?')},"./node_modules/phaser/src/physics/impact/COLLIDES.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.COLLIDES\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Never collides.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.NEVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEVER: 0,\r\n\r\n /**\r\n * Lite collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.LITE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LITE: 1,\r\n\r\n /**\r\n * Passive collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.PASSIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PASSIVE: 2,\r\n\r\n /**\r\n * Active collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.ACTIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 4,\r\n\r\n /**\r\n * Fixed collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.FIXED\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n FIXED: 8\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/COLLIDES.js?')},"./node_modules/phaser/src/physics/impact/CollisionMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DefaultDefs = __webpack_require__(/*! ./DefaultDefs */ "./node_modules/phaser/src/physics/impact/DefaultDefs.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CollisionMap\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tilesize=32] - [description]\r\n * @param {array} [data] - [description]\r\n */\r\nvar CollisionMap = new Class({\r\n\r\n initialize:\r\n\r\n function CollisionMap (tilesize, data)\r\n {\r\n if (tilesize === undefined) { tilesize = 32; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tilesize\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.0.0\r\n */\r\n this.tilesize = tilesize;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#data\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.data = (Array.isArray(data)) ? data : [];\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = (Array.isArray(data)) ? data[0].length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = (Array.isArray(data)) ? data.length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#lastSlope\r\n * @type {integer}\r\n * @default 55\r\n * @since 3.0.0\r\n */\r\n this.lastSlope = 55;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tiledef\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tiledef = DefaultDefs;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#trace\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} objectWidth - [description]\r\n * @param {number} objectHeight - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n trace: function (x, y, vx, vy, objectWidth, objectHeight)\r\n {\r\n // Set up the trace-result\r\n var res = {\r\n collision: { x: false, y: false, slope: false },\r\n pos: { x: x + vx, y: y + vy },\r\n tile: { x: 0, y: 0 }\r\n };\r\n\r\n if (!this.data)\r\n {\r\n return res;\r\n }\r\n \r\n var steps = Math.ceil(Math.max(Math.abs(vx), Math.abs(vy)) / this.tilesize);\r\n\r\n if (steps > 1)\r\n {\r\n var sx = vx / steps;\r\n var sy = vy / steps;\r\n \r\n for (var i = 0; i < steps && (sx || sy); i++)\r\n {\r\n this.step(res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i);\r\n \r\n x = res.pos.x;\r\n y = res.pos.y;\r\n\r\n if (res.collision.x)\r\n {\r\n sx = 0;\r\n vx = 0;\r\n }\r\n\r\n if (res.collision.y)\r\n {\r\n sy = 0;\r\n vy = 0;\r\n }\r\n\r\n if (res.collision.slope)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.step(res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0);\r\n }\r\n \r\n return res;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#step\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} rvx - [description]\r\n * @param {number} rvy - [description]\r\n * @param {number} step - [description]\r\n */\r\n step: function (res, x, y, vx, vy, width, height, rvx, rvy, step)\r\n {\r\n var t = 0;\r\n var tileX;\r\n var tileY;\r\n var tilesize = this.tilesize;\r\n var mapWidth = this.width;\r\n var mapHeight = this.height;\r\n \r\n // Horizontal\r\n if (vx)\r\n {\r\n var pxOffsetX = (vx > 0 ? width : 0);\r\n var tileOffsetX = (vx < 0 ? tilesize : 0);\r\n \r\n var firstTileY = Math.max(Math.floor(y / tilesize), 0);\r\n var lastTileY = Math.min(Math.ceil((y + height) / tilesize), mapHeight);\r\n \r\n tileX = Math.floor((res.pos.x + pxOffsetX) / tilesize);\r\n\r\n var prevTileX = Math.floor((x + pxOffsetX) / tilesize);\r\n\r\n if (step > 0 || tileX === prevTileX || prevTileX < 0 || prevTileX >= mapWidth)\r\n {\r\n prevTileX = -1;\r\n }\r\n \r\n if (tileX >= 0 && tileX < mapWidth)\r\n {\r\n for (tileY = firstTileY; tileY < lastTileY; tileY++)\r\n {\r\n if (prevTileX !== -1)\r\n {\r\n t = this.data[tileY][prevTileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.x = true;\r\n res.tile.x = t;\r\n res.pos.x = (tileX * tilesize) - pxOffsetX + tileOffsetX;\r\n x = res.pos.x;\r\n rvx = 0;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Vertical\r\n if (vy)\r\n {\r\n var pxOffsetY = (vy > 0 ? height : 0);\r\n var tileOffsetY = (vy < 0 ? tilesize : 0);\r\n \r\n var firstTileX = Math.max(Math.floor(res.pos.x / tilesize), 0);\r\n var lastTileX = Math.min(Math.ceil((res.pos.x + width) / tilesize), mapWidth);\r\n \r\n tileY = Math.floor((res.pos.y + pxOffsetY) / tilesize);\r\n \r\n var prevTileY = Math.floor((y + pxOffsetY) / tilesize);\r\n\r\n if (step > 0 || tileY === prevTileY || prevTileY < 0 || prevTileY >= mapHeight)\r\n {\r\n prevTileY = -1;\r\n }\r\n \r\n if (tileY >= 0 && tileY < mapHeight)\r\n {\r\n for (tileX = firstTileX; tileX < lastTileX; tileX++)\r\n {\r\n if (prevTileY !== -1)\r\n {\r\n t = this.data[prevTileY][tileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.y = true;\r\n res.tile.y = t;\r\n res.pos.y = tileY * tilesize - pxOffsetY + tileOffsetY;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#checkDef\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} t - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} tileX - [description]\r\n * @param {number} tileY - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n checkDef: function (res, t, x, y, vx, vy, width, height, tileX, tileY)\r\n {\r\n var def = this.tiledef[t];\r\n\r\n if (!def)\r\n {\r\n return false;\r\n }\r\n\r\n var tilesize = this.tilesize;\r\n \r\n var lx = (tileX + def[0]) * tilesize;\r\n var ly = (tileY + def[1]) * tilesize;\r\n var lvx = (def[2] - def[0]) * tilesize;\r\n var lvy = (def[3] - def[1]) * tilesize;\r\n var solid = def[4];\r\n \r\n var tx = x + vx + (lvy < 0 ? width : 0) - lx;\r\n var ty = y + vy + (lvx > 0 ? height : 0) - ly;\r\n \r\n if (lvx * ty - lvy * tx > 0)\r\n {\r\n if (vx * -lvy + vy * lvx < 0)\r\n {\r\n return solid;\r\n }\r\n \r\n var length = Math.sqrt(lvx * lvx + lvy * lvy);\r\n var nx = lvy / length;\r\n var ny = -lvx / length;\r\n \r\n var proj = tx * nx + ty * ny;\r\n var px = nx * proj;\r\n var py = ny * proj;\r\n \r\n if (px * px + py * py >= vx * vx + vy * vy)\r\n {\r\n return solid || (lvx * (ty - vy) - lvy * (tx - vx) < 0.5);\r\n }\r\n \r\n res.pos.x = x + vx - px;\r\n res.pos.y = y + vy - py;\r\n res.collision.slope = { x: lvx, y: lvy, nx: nx, ny: ny };\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CollisionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/CollisionMap.js?')},"./node_modules/phaser/src/physics/impact/DefaultDefs.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar H = 0.5;\r\nvar N = 1 / 3;\r\nvar M = 2 / 3;\r\n\r\n// Tile ID to Slope defs.\r\n// First 4 elements = line data, final = solid or non-solid behind the line\r\n \r\nmodule.exports = {\r\n\r\n 2: [ 0, 1, 1, 0, true ],\r\n 3: [ 0, 1, 1, H, true ],\r\n 4: [ 0, H, 1, 0, true ],\r\n 5: [ 0, 1, 1, M, true ],\r\n 6: [ 0, M, 1, N, true ],\r\n 7: [ 0, N, 1, 0, true ],\r\n 8: [ H, 1, 0, 0, true ],\r\n 9: [ 1, 0, H, 1, true ],\r\n 10: [ H, 1, 1, 0, true ],\r\n 11: [ 0, 0, H, 1, true ],\r\n 12: [ 0, 0, 1, 0, false ],\r\n 13: [ 1, 1, 0, 0, true ],\r\n 14: [ 1, H, 0, 0, true ],\r\n 15: [ 1, 1, 0, H, true ],\r\n 16: [ 1, N, 0, 0, true ],\r\n 17: [ 1, M, 0, N, true ],\r\n 18: [ 1, 1, 0, M, true ],\r\n 19: [ 1, 1, H, 0, true ],\r\n 20: [ H, 0, 0, 1, true ],\r\n 21: [ 0, 1, H, 0, true ],\r\n 22: [ H, 0, 1, 1, true ],\r\n 23: [ 1, 1, 0, 1, false ],\r\n 24: [ 0, 0, 1, 1, true ],\r\n 25: [ 0, 0, 1, H, true ],\r\n 26: [ 0, H, 1, 1, true ],\r\n 27: [ 0, 0, 1, N, true ],\r\n 28: [ 0, N, 1, M, true ],\r\n 29: [ 0, M, 1, 1, true ],\r\n 30: [ N, 1, 0, 0, true ],\r\n 31: [ 1, 0, M, 1, true ],\r\n 32: [ M, 1, 1, 0, true ],\r\n 33: [ 0, 0, N, 1, true ],\r\n 34: [ 1, 0, 1, 1, false ],\r\n 35: [ 1, 0, 0, 1, true ],\r\n 36: [ 1, H, 0, 1, true ],\r\n 37: [ 1, 0, 0, H, true ],\r\n 38: [ 1, M, 0, 1, true ],\r\n 39: [ 1, N, 0, M, true ],\r\n 40: [ 1, 0, 0, N, true ],\r\n 41: [ M, 1, N, 0, true ],\r\n 42: [ M, 0, N, 1, true ],\r\n 43: [ N, 1, M, 0, true ],\r\n 44: [ N, 0, M, 1, true ],\r\n 45: [ 0, 1, 0, 0, false ],\r\n 52: [ 1, 1, M, 0, true ],\r\n 53: [ N, 0, 0, 1, true ],\r\n 54: [ 0, 1, N, 0, true ],\r\n 55: [ M, 0, 1, 1, true ]\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/DefaultDefs.js?")},"./node_modules/phaser/src/physics/impact/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar ImpactBody = __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js");\r\nvar ImpactImage = __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js");\r\nvar ImpactSprite = __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects.\r\n * Objects that are created by this Factory are automatically added to the physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - A reference to the Impact Physics world.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * A reference to the Impact Physics world.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Impact Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactBody object and adds it to the physics simulation.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#body\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the physics world.\r\n * @param {number} y - The vertical position of the body in the physics world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactBody} The ImpactBody object that was created.\r\n */\r\n body: function (x, y, width, height)\r\n {\r\n return new ImpactBody(this.world, x, y, width, height);\r\n },\r\n\r\n /**\r\n * Adds an Impact Physics Body to the given Game Object.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to receive the physics body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object.\r\n */\r\n existing: function (gameObject)\r\n {\r\n var x = gameObject.x - gameObject.frame.centerX;\r\n var y = gameObject.y - gameObject.frame.centerY;\r\n var w = gameObject.width;\r\n var h = gameObject.height;\r\n\r\n gameObject.body = this.world.create(x, y, w, h);\r\n\r\n gameObject.body.parent = gameObject;\r\n gameObject.body.gameObject = gameObject;\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactImage object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created.\r\n */\r\n image: function (x, y, key, frame)\r\n {\r\n var image = new ImpactImage(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactSprite object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created.\r\n */\r\n sprite: function (x, y, key, frame)\r\n {\r\n var sprite = new ImpactSprite(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Factory.js?')},"./node_modules/phaser/src/physics/impact/GetVelocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Impact.GetVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n * @param {number} vel - [description]\r\n * @param {number} accel - [description]\r\n * @param {number} friction - [description]\r\n * @param {number} max - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar GetVelocity = function (delta, vel, accel, friction, max)\r\n{\r\n if (accel)\r\n {\r\n return Clamp(vel + accel * delta, -max, max);\r\n }\r\n else if (friction)\r\n {\r\n var frictionDelta = friction * delta;\r\n \r\n if (vel - frictionDelta > 0)\r\n {\r\n return vel - frictionDelta;\r\n }\r\n else if (vel + frictionDelta < 0)\r\n {\r\n return vel + frictionDelta;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n return Clamp(vel, -max, max);\r\n};\r\n\r\nmodule.exports = GetVelocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/GetVelocity.js?')},"./node_modules/phaser/src/physics/impact/ImpactBody.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactBody\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - x - The horizontal position of this physics body in the world.\r\n * @param {number} y - y - The vertical position of this physics body in the world.\r\n * @param {number} width - The width of the physics body in the world.\r\n * @param {number} height - [description]\r\n */\r\nvar ImpactBody = new Class({\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactBody (world, x, y, width, height)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x, y, width, height);\r\n\r\n this.body.parent = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactBody.js?')},"./node_modules/phaser/src/physics/impact/ImpactImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class ImpactImage\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The physics world of the Impact physics system.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactImage (world, x, y, texture, frame)\r\n {\r\n Image.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * The Physics Body linked to an ImpactImage.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * The size of the physics Body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * The X and Y offset of the Body from the left and top of the Image.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * The velocity, or rate of change the Body\'s position. Measured in pixels per second.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * The acceleration is the rate of change of the velocity. Measured in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * Friction between colliding bodies.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * The maximum velocity of the body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactImage.js?')},"./node_modules/phaser/src/physics/impact/ImpactPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactPhysics\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar ImpactPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function ImpactPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#add\r\n * @type {Phaser.Physics.Impact.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'impact\', {}),\r\n GetFastValue(gameConfig, \'impact\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'ImpactPhysics\', ImpactPhysics, \'impactPhysics\');\r\n\r\nmodule.exports = ImpactPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactPhysics.js?')},"./node_modules/phaser/src/physics/impact/ImpactSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class ImpactSprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactSprite (world, x, y, texture, frame)\r\n {\r\n Sprite.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactSprite.js?')},"./node_modules/phaser/src/physics/impact/SeparateX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} left - [description]\n * @param {Phaser.Physics.Impact.Body} right - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateX = function (world, left, right, weak)\n{\n var nudge = left.pos.x + left.size.x - right.pos.x;\n \n // We have a weak entity, so just move this one\n if (weak)\n {\n var strong = (left === weak) ? right : left;\n\n weak.vel.x = -weak.vel.x * weak.bounciness + strong.vel.x;\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, weak === left ? -nudge : nudge, 0, weak.size.x, weak.size.y);\n\n weak.pos.x = resWeak.pos.x;\n }\n else\n {\n var v2 = (left.vel.x - right.vel.x) / 2;\n\n left.vel.x = -v2;\n right.vel.x = v2;\n \n var resLeft = world.collisionMap.trace(left.pos.x, left.pos.y, -nudge / 2, 0, left.size.x, left.size.y);\n\n left.pos.x = Math.floor(resLeft.pos.x);\n \n var resRight = world.collisionMap.trace(right.pos.x, right.pos.y, nudge / 2, 0, right.size.x, right.size.y);\n\n right.pos.x = Math.ceil(resRight.pos.x);\n }\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateX.js?")},"./node_modules/phaser/src/physics/impact/SeparateY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} top - [description]\n * @param {Phaser.Physics.Impact.Body} bottom - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateY = function (world, top, bottom, weak)\n{\n var nudge = (top.pos.y + top.size.y - bottom.pos.y);\n var nudgeX;\n var resTop;\n \n if (weak)\n {\n var strong = (top === weak) ? bottom : top;\n\n weak.vel.y = -weak.vel.y * weak.bounciness + strong.vel.y;\n \n // Riding on a platform?\n nudgeX = 0;\n\n if (weak === top && Math.abs(weak.vel.y - strong.vel.y) < weak.minBounceVelocity)\n {\n weak.standing = true;\n nudgeX = strong.vel.x * world.delta;\n }\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, nudgeX, weak === top ? -nudge : nudge, weak.size.x, weak.size.y);\n\n weak.pos.y = resWeak.pos.y;\n weak.pos.x = resWeak.pos.x;\n }\n else if (world.gravity && (bottom.standing || top.vel.y > 0))\n {\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, 0, -(top.pos.y + top.size.y - bottom.pos.y), top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n if (top.bounciness > 0 && top.vel.y > top.minBounceVelocity)\n {\n top.vel.y *= -top.bounciness;\n }\n else\n {\n top.standing = true;\n top.vel.y = 0;\n }\n }\n else\n {\n var v2 = (top.vel.y - bottom.vel.y) / 2;\n\n top.vel.y = -v2;\n bottom.vel.y = v2;\n \n nudgeX = bottom.vel.x * world.delta;\n\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, nudgeX, -nudge / 2, top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n var resBottom = world.collisionMap.trace(bottom.pos.x, bottom.pos.y, 0, nudge / 2, bottom.size.x, bottom.size.y);\n\n bottom.pos.y = resBottom.pos.y;\n }\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateY.js?")},"./node_modules/phaser/src/physics/impact/Solver.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/impact/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/impact/SeparateY.js\");\r\n\r\n/**\r\n * Impact Physics Solver\r\n *\r\n * @function Phaser.Physics.Impact.Solver\r\n * @fires Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The Impact simulation to run the solver in.\r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body in the collision.\r\n */\r\nvar Solver = function (world, bodyA, bodyB)\r\n{\r\n var weak = null;\r\n\r\n if (bodyA.collides === COLLIDES.LITE || bodyB.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyA;\r\n }\r\n else if (bodyB.collides === COLLIDES.LITE || bodyA.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyB;\r\n }\r\n\r\n if (bodyA.last.x + bodyA.size.x > bodyB.last.x && bodyA.last.x < bodyB.last.x + bodyB.size.x)\r\n {\r\n if (bodyA.last.y < bodyB.last.y)\r\n {\r\n SeparateY(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateY(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'y');\r\n bodyB.collideWith(bodyA, 'y');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'y');\r\n }\r\n else if (bodyA.last.y + bodyA.size.y > bodyB.last.y && bodyA.last.y < bodyB.last.y + bodyB.size.y)\r\n {\r\n if (bodyA.last.x < bodyB.last.x)\r\n {\r\n SeparateX(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateX(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'x');\r\n bodyB.collideWith(bodyA, 'x');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'x');\r\n }\r\n};\r\n\r\nmodule.exports = Solver;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Solver.js?")},"./node_modules/phaser/src/physics/impact/TYPE.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.TYPE\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Collides with nothing.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * Type A. Collides with Type B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.A\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n A: 1,\r\n\r\n /**\r\n * Type B. Collides with Type A.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.B\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n B: 2,\r\n\r\n /**\r\n * Collides with both types A and B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n BOTH: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/TYPE.js?')},"./node_modules/phaser/src/physics/impact/UpdateMotion.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set up the trace-result\r\n * var res = {\r\n * collision: {x: false, y: false, slope: false},\r\n * pos: {x: x, y: y},\r\n * tile: {x: 0, y: 0}\r\n * };\r\n *\r\n * @function Phaser.Physics.Impact.UpdateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} res - [description]\r\n */\r\nvar UpdateMotion = function (body, res)\r\n{\r\n body.standing = false;\r\n\r\n // Y\r\n if (res.collision.y)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.y) > body.minBounceVelocity)\r\n {\r\n body.vel.y *= -body.bounciness;\r\n }\r\n else\r\n {\r\n if (body.vel.y > 0)\r\n {\r\n body.standing = true;\r\n }\r\n\r\n body.vel.y = 0;\r\n }\r\n }\r\n\r\n // X\r\n if (res.collision.x)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.x) > body.minBounceVelocity)\r\n {\r\n body.vel.x *= -body.bounciness;\r\n }\r\n else\r\n {\r\n body.vel.x = 0;\r\n }\r\n }\r\n\r\n // SLOPE\r\n if (res.collision.slope)\r\n {\r\n var s = res.collision.slope;\r\n \r\n if (body.bounciness > 0)\r\n {\r\n var proj = body.vel.x * s.nx + body.vel.y * s.ny;\r\n\r\n body.vel.x = (body.vel.x - s.nx * proj * 2) * body.bounciness;\r\n body.vel.y = (body.vel.y - s.ny * proj * 2) * body.bounciness;\r\n }\r\n else\r\n {\r\n var lengthSquared = s.x * s.x + s.y * s.y;\r\n var dot = (body.vel.x * s.x + body.vel.y * s.y) / lengthSquared;\r\n \r\n body.vel.x = s.x * dot;\r\n body.vel.y = s.y * dot;\r\n \r\n var angle = Math.atan2(s.x, s.y);\r\n\r\n if (angle > body.slopeStanding.min && angle < body.slopeStanding.max)\r\n {\r\n body.standing = true;\r\n }\r\n }\r\n }\r\n\r\n body.pos.x = res.pos.x;\r\n body.pos.y = res.pos.y;\r\n};\r\n\r\nmodule.exports = UpdateMotion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/UpdateMotion.js?")},"./node_modules/phaser/src/physics/impact/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/impact/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar CollisionMap = __webpack_require__(/*! ./CollisionMap */ \"./node_modules/phaser/src/physics/impact/CollisionMap.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Solver = __webpack_require__(/*! ./Solver */ \"./node_modules/phaser/src/physics/impact/Solver.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ \"./node_modules/phaser/src/physics/impact/TYPE.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Impact World instance belongs.\r\n * @param {Phaser.Types.Physics.Impact.WorldConfig} config - [description]\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#gravity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.gravity = GetFastValue(config, 'gravity', 0);\r\n\r\n /**\r\n * Spatial hash cell dimensions\r\n *\r\n * @name Phaser.Physics.Impact.World#cellSize\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.cellSize = GetFastValue(config, 'cellSize', 64);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#collisionMap\r\n * @type {Phaser.Physics.Impact.CollisionMap}\r\n * @since 3.0.0\r\n */\r\n this.collisionMap = new CollisionMap();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * Impacts maximum time step is 20 fps.\r\n *\r\n * @name Phaser.Physics.Impact.World#maxStep\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.maxStep = GetFastValue(config, 'maxStep', 0.05);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#drawDebug\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetFastValue(config, 'debug', false);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n var _maxVelocity = GetFastValue(config, 'maxVelocity', 100);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#defaults\r\n * @type {Phaser.Types.Physics.Impact.WorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n maxVelocityX: GetFastValue(config, 'maxVelocityX', _maxVelocity),\r\n maxVelocityY: GetFastValue(config, 'maxVelocityY', _maxVelocity),\r\n minBounceVelocity: GetFastValue(config, 'minBounceVelocity', 40),\r\n gravityFactor: GetFastValue(config, 'gravityFactor', 1),\r\n bounciness: GetFastValue(config, 'bounciness', 0)\r\n };\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Impact.World#walls\r\n * @type {Phaser.Types.Physics.Impact.WorldWalls}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#delta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#_lastId\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._lastId = 0;\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from\r\n * a 2D array. If loading from a Weltmeister level, the map must have a layer called \"collision\".\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMap\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer[][])} key - Either a string key that corresponds to a Weltmeister level\r\n * in the cache, or a 2D array of collision IDs.\r\n * @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister\r\n * level in the cache.\r\n *\r\n * @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to\r\n * create the CollisionMap.\r\n */\r\n setCollisionMap: function (key, tileSize)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n var tilemapData = this.scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData || tilemapData.format !== TILEMAP_FORMATS.WELTMEISTER)\r\n {\r\n console.warn('The specified key does not correspond to a Weltmeister tilemap: ' + key);\r\n return null;\r\n }\r\n\r\n var layers = tilemapData.data.layer;\r\n var collisionLayer;\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].name === 'collision')\r\n {\r\n collisionLayer = layers[i];\r\n break;\r\n }\r\n }\r\n\r\n if (tileSize === undefined) { tileSize = collisionLayer.tilesize; }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionLayer.data);\r\n }\r\n else if (Array.isArray(key))\r\n {\r\n this.collisionMap = new CollisionMap(tileSize, key);\r\n }\r\n else\r\n {\r\n console.warn('Invalid Weltmeister collision map data: ' + key);\r\n }\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as\r\n * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of\r\n * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can\r\n * manually create a slopeMap that stores the mapping between tile indices and slope IDs.\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use.\r\n * @param {Phaser.Types.Physics.Impact.CollisionOptions} [options] - Options for controlling the mapping from tiles to slope IDs.\r\n *\r\n * @return {Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap.\r\n */\r\n setCollisionMapFromTilemapLayer: function (tilemapLayer, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n var slopeProperty = GetFastValue(options, 'slopeProperty', null);\r\n var slopeMap = GetFastValue(options, 'slopeMap', null);\r\n var collidingSlope = GetFastValue(options, 'defaultCollidingSlope', null);\r\n var nonCollidingSlope = GetFastValue(options, 'defaultNonCollidingSlope', 0);\r\n\r\n var layerData = tilemapLayer.layer;\r\n var tileSize = layerData.baseTileWidth;\r\n var collisionData = [];\r\n\r\n for (var ty = 0; ty < layerData.height; ty++)\r\n {\r\n collisionData[ty] = [];\r\n\r\n for (var tx = 0; tx < layerData.width; tx++)\r\n {\r\n var tile = layerData.data[ty][tx];\r\n\r\n if (tile && tile.collides)\r\n {\r\n if (slopeProperty !== null && HasValue(tile.properties, slopeProperty))\r\n {\r\n collisionData[ty][tx] = parseInt(tile.properties[slopeProperty], 10);\r\n }\r\n else if (slopeMap !== null && HasValue(slopeMap, tile.index))\r\n {\r\n collisionData[ty][tx] = slopeMap[tile.index];\r\n }\r\n else if (collidingSlope !== null)\r\n {\r\n collisionData[ty][tx] = collidingSlope;\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = tile.index;\r\n }\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = nonCollidingSlope;\r\n }\r\n }\r\n }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionData);\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Impact.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=64] - [description]\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 64; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y, thickness, height);\r\n this.updateWall(right, 'right', x + width, y, thickness, height);\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * position = 'left', 'right', 'top' or 'bottom'\r\n *\r\n * @method Phaser.Physics.Impact.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n wall.resetSize(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.walls[position] = this.create(x, y, width, height);\r\n this.walls[position].name = position;\r\n this.walls[position].gravityFactor = 0;\r\n this.walls[position].collides = COLLIDES.FIXED;\r\n }\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n this.bodies.remove(wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object used for debug display and enables the world for debug drawing.\r\n *\r\n * @method Phaser.Physics.Impact.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object created that will have the debug visuals drawn to it.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#getNextID\r\n * @since 3.0.0\r\n *\r\n * @return {integer} [description]\r\n */\r\n getNextID: function ()\r\n {\r\n return this._lastId++;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} sizeX - [description]\r\n * @param {number} sizeY - [description]\r\n *\r\n * @return {Phaser.Physics.Impact.Body} The Body that was added to this World.\r\n */\r\n create: function (x, y, sizeX, sizeY)\r\n {\r\n var body = new Body(this, x, y, sizeX, sizeY);\r\n\r\n this.bodies.set(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} object - The Body to remove from this World.\r\n */\r\n remove: function (object)\r\n {\r\n this.bodies.delete(object);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#pause\r\n * @fires Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#resume\r\n * @fires Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.enabled || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum\r\n\r\n var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale;\r\n\r\n this.delta = clampedDelta;\r\n\r\n // Update all active bodies\r\n\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n var hash = {};\r\n var size = this.cellSize;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enabled)\r\n {\r\n body.update(clampedDelta);\r\n }\r\n }\r\n\r\n // Run collision against them all now they're in the new positions from the update\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && !body.skipHash())\r\n {\r\n this.checkHash(body, hash, size);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Check the body against the spatial hash.\r\n *\r\n * @method Phaser.Physics.Impact.World#checkHash\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} hash - [description]\r\n * @param {number} size - [description]\r\n */\r\n checkHash: function (body, hash, size)\r\n {\r\n var checked = {};\r\n\r\n var xmin = Math.floor(body.pos.x / size);\r\n var ymin = Math.floor(body.pos.y / size);\r\n var xmax = Math.floor((body.pos.x + body.size.x) / size) + 1;\r\n var ymax = Math.floor((body.pos.y + body.size.y) / size) + 1;\r\n\r\n for (var x = xmin; x < xmax; x++)\r\n {\r\n for (var y = ymin; y < ymax; y++)\r\n {\r\n if (!hash[x])\r\n {\r\n hash[x] = {};\r\n hash[x][y] = [ body ];\r\n }\r\n else if (!hash[x][y])\r\n {\r\n hash[x][y] = [ body ];\r\n }\r\n else\r\n {\r\n var cell = hash[x][y];\r\n\r\n for (var c = 0; c < cell.length; c++)\r\n {\r\n if (body.touches(cell[c]) && !checked[cell[c].id])\r\n {\r\n checked[cell[c].id] = true;\r\n\r\n this.checkBodies(body, cell[c]);\r\n }\r\n }\r\n\r\n cell.push(body);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#checkBodies\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} bodyA - [description]\r\n * @param {Phaser.Physics.Impact.Body} bodyB - [description]\r\n */\r\n checkBodies: function (bodyA, bodyB)\r\n {\r\n // 2 fixed bodies won't do anything\r\n if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED)\r\n {\r\n return;\r\n }\r\n\r\n // bitwise checks\r\n if (bodyA.checkAgainst & bodyB.type)\r\n {\r\n bodyA.check(bodyB);\r\n }\r\n\r\n if (bodyB.checkAgainst & bodyA.type)\r\n {\r\n bodyB.check(bodyA);\r\n }\r\n\r\n if (bodyA.collides && bodyB.collides && bodyA.collides + bodyB.collides > COLLIDES.ACTIVE)\r\n {\r\n Solver(this, bodyA, bodyB);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCollidesNever: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.NEVER;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setLite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setLite: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.LITE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setPassive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setPassive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.PASSIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setActive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.ACTIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setFixed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setFixed: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.FIXED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setAvsB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBvsA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.scene = null;\r\n\r\n this.bodies.clear();\r\n\r\n this.bodies = null;\r\n\r\n this.collisionMap = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/World.js?")},"./node_modules/phaser/src/physics/impact/components/Acceleration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Acceleration component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Acceleration\r\n * @since 3.0.0\r\n */\r\nvar Acceleration = {\r\n\r\n /**\r\n * Sets the horizontal acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationX: function (x)\r\n {\r\n this.accel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationY: function (y)\r\n {\r\n this.accel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of horizontal acceleration to apply.\r\n * @param {number} y - The amount of vertical acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.accel.x = x;\r\n this.accel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Acceleration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Acceleration.js?")},"./node_modules/phaser/src/physics/impact/components/BodyScale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Body Scale component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyScale\r\n * @since 3.0.0\r\n */\r\nvar BodyScale = {\r\n\r\n /**\r\n * Sets the size of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the body in pixels.\r\n * @param {number} [height=width] - The height of the body in pixels.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodySize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.body.size.x = Math.round(width);\r\n this.body.size.y = Math.round(height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scaleX - The horizontal scale of the body.\r\n * @param {number} [scaleY] - The vertical scale of the body. If not given, will use the horizontal scale value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodyScale: function (scaleX, scaleY)\r\n {\r\n if (scaleY === undefined) { scaleY = scaleX; }\r\n\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n gameObject.setScale(scaleX, scaleY);\r\n\r\n return this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n else\r\n {\r\n return this.setBodySize(this.body.size.x * scaleX, this.body.size.y * scaleY);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyScale.js?")},"./node_modules/phaser/src/physics/impact/components/BodyType.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Body Type component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyType\r\n * @since 3.0.0\r\n */\r\nvar BodyType = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#getBodyType\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getBodyType: function ()\r\n {\r\n return this.body.type;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeNone: function ()\r\n {\r\n this.body.type = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeA: function ()\r\n {\r\n this.body.type = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeB: function ()\r\n {\r\n this.body.type = TYPE.B;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyType;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyType.js?')},"./node_modules/phaser/src/physics/impact/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Bounce component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the impact physics bounce, or restitution, value.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.bounciness = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the minimum velocity the body is allowed to be moving to be considered for rebound.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The minimum allowed velocity.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMinBounceVelocity: function (value)\r\n {\r\n this.body.minBounceVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The bounce, or restitution, value of this body.\r\n * A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @name Phaser.Physics.Impact.Components.Bounce#bounce\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bounce: {\r\n\r\n get: function ()\r\n {\r\n return this.body.bounciness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.bounciness = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Bounce.js?")},"./node_modules/phaser/src/physics/impact/components/CheckAgainst.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Check Against component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.CheckAgainst\r\n * @since 3.0.0\r\n */\r\nvar CheckAgainst = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAvsB: function ()\r\n {\r\n this.setTypeA();\r\n\r\n return this.setCheckAgainstB();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBvsA: function ()\r\n {\r\n this.setTypeB();\r\n\r\n return this.setCheckAgainstA();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstNone: function ()\r\n {\r\n this.body.checkAgainst = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstA: function ()\r\n {\r\n this.body.checkAgainst = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstB: function ()\r\n {\r\n this.body.checkAgainst = TYPE.B;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n checkAgainst: {\r\n\r\n get: function ()\r\n {\r\n return this.body.checkAgainst;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.checkAgainst = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CheckAgainst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/CheckAgainst.js?')},"./node_modules/phaser/src/physics/impact/components/Collides.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ../COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\n\r\n/**\r\n * @callback CollideCallback\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n\r\n/**\r\n * The Impact Collides component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Collides\r\n * @since 3.0.0\r\n */\r\nvar Collides = {\r\n\r\n _collideCallback: null,\r\n _callbackScope: null,\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CollideCallback} callback - [description]\r\n * @param {*} scope - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollideCallback: function (callback, scope)\r\n {\r\n this._collideCallback = callback;\r\n\r\n if (scope)\r\n {\r\n this._callbackScope = scope;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesNever: function ()\r\n {\r\n this.body.collides = COLLIDES.NEVER;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setLiteCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.LITE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPassiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.PASSIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setActiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.ACTIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFixedCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.FIXED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Collides#collides\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n\r\n get: function ()\r\n {\r\n return this.body.collides;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.collides = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collides;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Collides.js?')},"./node_modules/phaser/src/physics/impact/components/Debug.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Debug component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Debug\r\n * @since 3.0.0\r\n */\r\nvar Debug = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebug\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} showBody - [description]\r\n * @param {boolean} showVelocity - [description]\r\n * @param {number} bodyColor - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebug: function (showBody, showVelocity, bodyColor)\r\n {\r\n this.debugShowBody = showBody;\r\n this.debugShowVelocity = showVelocity;\r\n this.debugBodyColor = bodyColor;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebugBodyColor: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowBody: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowBody;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowBody = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowVelocity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowVelocity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowVelocity = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n debugBodyColor: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugBodyColor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Debug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Debug.js?")},"./node_modules/phaser/src/physics/impact/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Friction component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionX: function (x)\r\n {\r\n this.friction.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionY: function (y)\r\n {\r\n this.friction.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.x = x;\r\n this.friction.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Friction.js?")},"./node_modules/phaser/src/physics/impact/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Gravity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Gravity#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGravity: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Gravity#gravity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.gravityFactor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Gravity.js?")},"./node_modules/phaser/src/physics/impact/components/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Offset component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Offset\r\n * @since 3.0.0\r\n */\r\nvar Offset = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Offset#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setOffset: function (x, y, width, height)\r\n {\r\n this.body.offset.x = x;\r\n this.body.offset.y = y;\r\n\r\n if (width)\r\n {\r\n this.setBodySize(width, height);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Offset.js?")},"./node_modules/phaser/src/physics/impact/components/SetGameObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Set Game Object component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.SetGameObject\r\n * @since 3.0.0\r\n */\r\nvar SetGameObject = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - [description]\r\n * @param {boolean} [sync=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGameObject: function (gameObject, sync)\r\n {\r\n if (sync === undefined) { sync = true; }\r\n\r\n if (gameObject)\r\n {\r\n this.body.gameObject = gameObject;\r\n\r\n if (sync)\r\n {\r\n this.syncGameObject();\r\n }\r\n }\r\n else\r\n {\r\n this.body.gameObject = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n syncGameObject: function ()\r\n {\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/SetGameObject.js?")},"./node_modules/phaser/src/physics/impact/components/Velocity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Velocity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this.vel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical velocities of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.vel.x = x;\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum velocity this body can travel at.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The maximum allowed horizontal velocity.\r\n * @param {number} [y=x] - The maximum allowed vertical velocity. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.maxVel.x = x;\r\n this.maxVel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Velocity.js?")},"./node_modules/phaser/src/physics/impact/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/impact/components/Acceleration.js"),\r\n BodyScale: __webpack_require__(/*! ./BodyScale */ "./node_modules/phaser/src/physics/impact/components/BodyScale.js"),\r\n BodyType: __webpack_require__(/*! ./BodyType */ "./node_modules/phaser/src/physics/impact/components/BodyType.js"),\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/impact/components/Bounce.js"),\r\n CheckAgainst: __webpack_require__(/*! ./CheckAgainst */ "./node_modules/phaser/src/physics/impact/components/CheckAgainst.js"),\r\n Collides: __webpack_require__(/*! ./Collides */ "./node_modules/phaser/src/physics/impact/components/Collides.js"),\r\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/impact/components/Debug.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/impact/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/impact/components/Gravity.js"),\r\n Offset: __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/physics/impact/components/Offset.js"),\r\n SetGameObject: __webpack_require__(/*! ./SetGameObject */ "./node_modules/phaser/src/physics/impact/components/SetGameObject.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/impact/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/index.js?')},"./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Collide Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance if two bodies collide.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body involved in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body involved in the collision.\r\n * @param {string} axis - The collision axis. Either `x` or `y`.\r\n */\r\nmodule.exports = 'collide';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/index.js?')},"./node_modules/phaser/src/physics/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * An Impact.js compatible physics world, body and solver, for those who are used\r\n * to the Impact way of defining and controlling physics bodies. Also works with\r\n * the new Loader support for Weltmeister map data.\r\n *\r\n * World updated to run off the Phaser main loop.\r\n * Body extended to support additional setter functions.\r\n *\r\n * To create the map data you\'ll need Weltmeister, which comes with Impact\r\n * and can be purchased from http://impactjs.com\r\n *\r\n * My thanks to Dominic Szablewski for his permission to support Impact in Phaser.\r\n *\r\n * @namespace Phaser.Physics.Impact\r\n */\r\nmodule.exports = {\r\n\r\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/impact/Body.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/impact/events/index.js"),\r\n COLLIDES: __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js"),\r\n CollisionMap: __webpack_require__(/*! ./CollisionMap */ "./node_modules/phaser/src/physics/impact/CollisionMap.js"),\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js"),\r\n Image: __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js"),\r\n ImpactBody: __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js"),\r\n ImpactPhysics: __webpack_require__(/*! ./ImpactPhysics */ "./node_modules/phaser/src/physics/impact/ImpactPhysics.js"),\r\n Sprite: __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js"),\r\n TYPE: __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/index.js?')},"./node_modules/phaser/src/physics/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Physics\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Arcade: __webpack_require__(/*! ./arcade */ "./node_modules/phaser/src/physics/arcade/index.js"),\r\n Impact: __webpack_require__(/*! ./impact */ "./node_modules/phaser/src/physics/impact/index.js"),\r\n Matter: __webpack_require__(/*! ./matter-js */ "./node_modules/phaser/src/physics/matter-js/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/index.js?')},"./node_modules/phaser/src/physics/matter-js/CustomMain.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Matter\r\n */\r\n\r\nvar Matter = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\n\r\nMatter.Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nMatter.Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nMatter.World = __webpack_require__(/*! ./lib/body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\n\r\nMatter.Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nMatter.Grid = __webpack_require__(/*! ./lib/collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nMatter.Pairs = __webpack_require__(/*! ./lib/collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nMatter.Pair = __webpack_require__(/*! ./lib/collision/Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nMatter.Query = __webpack_require__(/*! ./lib/collision/Query */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js");\r\nMatter.Resolver = __webpack_require__(/*! ./lib/collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nMatter.SAT = __webpack_require__(/*! ./lib/collision/SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\n\r\nMatter.Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\n\r\nMatter.Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nMatter.Engine = __webpack_require__(/*! ./lib/core/Engine */ "./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js");\r\nMatter.Events = __webpack_require__(/*! ./lib/core/Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nMatter.Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nMatter.Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\n\r\nMatter.Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nMatter.Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\n\r\nMatter.Axes = __webpack_require__(/*! ./lib/geometry/Axes */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js");\r\nMatter.Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nMatter.Svg = __webpack_require__(/*! ./lib/geometry/Svg */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js");\r\nMatter.Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nMatter.Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n// aliases\r\n\r\nMatter.World.add = Matter.Composite.add;\r\nMatter.World.remove = Matter.Composite.remove;\r\nMatter.World.addComposite = Matter.Composite.addComposite;\r\nMatter.World.addBody = Matter.Composite.addBody;\r\nMatter.World.addConstraint = Matter.Composite.addConstraint;\r\nMatter.World.clear = Matter.Composite.clear;\r\n\r\nmodule.exports = Matter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/CustomMain.js?')},"./node_modules/phaser/src/physics/matter-js/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar MatterGameObject = __webpack_require__(/*! ./MatterGameObject */ "./node_modules/phaser/src/physics/matter-js/MatterGameObject.js");\r\nvar MatterImage = __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js");\r\nvar MatterSprite = __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js");\r\nvar PointerConstraint = __webpack_require__(/*! ./PointerConstraint */ "./node_modules/phaser/src/physics/matter-js/PointerConstraint.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Matter Factory can create different types of bodies and them to a physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * The Matter World which this Factory adds to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Scene which this Factory\'s Matter World belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = world.scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Matter Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new rigid rectangular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#rectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the Body.\r\n * @param {number} height - The height of the Body.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n rectangle: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid trapezoidal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#trapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the trapezoid of the Body.\r\n * @param {number} height - The height of the trapezoid of the Body.\r\n * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n trapezoid: function (x, y, width, height, slope, options)\r\n {\r\n var body = Bodies.trapezoid(x, y, width, height, slope, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid circular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#circle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n circle: function (x, y, radius, options, maxSides)\r\n {\r\n var body = Bodies.circle(x, y, radius, options, maxSides);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid polygonal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#polygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} sides - The number of sides the polygon will have.\r\n * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n polygon: function (x, y, sides, radius, options)\r\n {\r\n var body = Bodies.polygon(x, y, sides, radius, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.\r\n * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#fromVertices\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {(string|array)} vertexSets - [description]\r\n * @param {object} [options] - [description]\r\n * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges)\r\n * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance).\r\n * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea)\r\n {\r\n if (typeof vertexSets === \'string\')\r\n {\r\n vertexSets = Vertices.fromPath(vertexSets);\r\n }\r\n\r\n var body = Bodies.fromVertices(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Create a new composite containing Matter Image objects created in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#imageStack\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} [columnGap=0] - The distance between each column.\r\n * @param {number} [rowGap=0] - The distance between each row.\r\n * @param {object} [options] - [description]\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite Stack.\r\n */\r\n imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options)\r\n {\r\n if (columnGap === undefined) { columnGap = 0; }\r\n if (rowGap === undefined) { rowGap = 0; }\r\n if (options === undefined) { options = {}; }\r\n\r\n var world = this.world;\r\n var displayList = this.sys.displayList;\r\n\r\n options.addToWorld = false;\r\n\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, function (x, y)\r\n {\r\n var image = new MatterImage(world, x, y, key, frame, options);\r\n\r\n displayList.add(image);\r\n\r\n return image.body;\r\n });\r\n\r\n world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#stack\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback that creates the stack.\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects created in the callback.\r\n */\r\n stack: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pyramid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the pyramid.\r\n * @param {number} rows - The number of rows in the pyramid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback function to be invoked.\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite pyramid.\r\n */\r\n pyramid: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.pyramid(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#chain\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} xOffsetA - [description]\r\n * @param {number} yOffsetA - [description]\r\n * @param {number} xOffsetB - [description]\r\n * @param {number} yOffsetB - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects chained together with constraints.\r\n */\r\n chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options)\r\n {\r\n return Composites.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options);\r\n },\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} columns - [description]\r\n * @param {number} rows - [description]\r\n * @param {boolean} crossBrace - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} The composite containing objects meshed together with constraints.\r\n */\r\n mesh: function (composite, columns, rows, crossBrace, options)\r\n {\r\n return Composites.mesh(composite, columns, rows, crossBrace, options);\r\n },\r\n\r\n /**\r\n * Creates a composite with a Newton\'s Cradle setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#newtonsCradle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} number - [description]\r\n * @param {number} size - [description]\r\n * @param {number} length - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite newtonsCradle body.\r\n */\r\n newtonsCradle: function (x, y, number, size, length)\r\n {\r\n var composite = Composites.newtonsCradle(x, y, number, size, length);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#car\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} wheelSize - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite car body.\r\n */\r\n car: function (x, y, width, height, wheelSize)\r\n {\r\n var composite = Composites.car(x, y, width, height, wheelSize);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#softBody\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the Composite.\r\n * @param {number} rows - The number of rows in the Composite.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {boolean} crossBrace - [description]\r\n * @param {number} particleRadius - The radius of this circlular composite.\r\n * @param {object} particleOptions - [description]\r\n * @param {object} constraintOptions - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite simple soft body.\r\n */\r\n softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions)\r\n {\r\n var composite = Composites.softBody(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#joint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n joint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#spring\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n spring: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#constraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n constraint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyA = (bodyA.type === \'body\') ? bodyA : bodyA.body;\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#worldConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n worldConstraint: function (bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mouseSpring\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n mouseSpring: function (options)\r\n {\r\n return this.pointerConstraint(options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pointerConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n pointerConstraint: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n if (!options.hasOwnProperty(\'render\'))\r\n {\r\n options.render = { visible: false };\r\n }\r\n\r\n var pointerConstraint = new PointerConstraint(this.scene, this.world, options);\r\n\r\n this.world.add(pointerConstraint.constraint);\r\n\r\n return pointerConstraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Image} [description]\r\n */\r\n image: function (x, y, key, frame, options)\r\n {\r\n var image = new MatterImage(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#tileBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} [description]\r\n */\r\n tileBody: function (tile, options)\r\n {\r\n var tileBody = new MatterTileBody(this.world, tile, options);\r\n\r\n return tileBody;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Sprite} [description]\r\n */\r\n sprite: function (x, y, key, frame, options)\r\n {\r\n var sprite = new MatterSprite(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#gameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it.\r\n */\r\n gameObject: function (gameObject, options)\r\n {\r\n return MatterGameObject(this.world, gameObject, options);\r\n },\r\n\r\n /**\r\n * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#velocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n velocity: function (body, velocity)\r\n {\r\n Body.setVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#angularVelocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {number} velocity - The angular velocity to set.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n angularVelocity: function (body, velocity)\r\n {\r\n Body.setAngularVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#force\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the force on.\r\n * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components.\r\n * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n force: function (body, position, force)\r\n {\r\n Body.applyForce(body, position, force);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.scene = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/Factory.js?')},"./node_modules/phaser/src/physics/matter-js/MatterGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Internal function to check if the object has a getter or setter.\r\n *\r\n * @function hasGetterOrSetter\r\n * @private\r\n *\r\n * @param {object} def - The object to check.\r\n *\r\n * @return {boolean} True if it has a getter or setter, otherwise false.\r\n */\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Matter.MatterGameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body.\r\n */\r\nvar MatterGameObject = function (world, gameObject, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var x = gameObject.x;\r\n var y = gameObject.y;\r\n\r\n // Temp body pos to avoid body null checks\r\n gameObject.body = {\r\n temp: true,\r\n position: {\r\n x: x,\r\n y: y\r\n }\r\n };\r\n\r\n var mixins = [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity\r\n ];\r\n\r\n // First let's inject all of the components into the Game Object\r\n mixins.forEach(function (mixin)\r\n {\r\n for (var key in mixin)\r\n {\r\n if (hasGetterOrSetter(mixin[key]))\r\n {\r\n Object.defineProperty(gameObject, key, {\r\n get: mixin[key].get,\r\n set: mixin[key].set\r\n });\r\n }\r\n else\r\n {\r\n Object.defineProperty(gameObject, key, {value: mixin[key]});\r\n }\r\n }\r\n\r\n });\r\n\r\n gameObject.world = world;\r\n\r\n gameObject._tempVec2 = new Vector2(x, y);\r\n\r\n if (options.hasOwnProperty('type') && options.type === 'body')\r\n {\r\n gameObject.setExistingBody(options, true);\r\n }\r\n else\r\n {\r\n var shape = GetFastValue(options, 'shape', null);\r\n\r\n if (!shape)\r\n {\r\n shape = 'rectangle';\r\n }\r\n \r\n gameObject.setBody(shape, options);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = MatterGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterGameObject.js?")},"./node_modules/phaser/src/physics/matter-js/MatterImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterImage (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Image\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterImage.js?')},"./node_modules/phaser/src/physics/matter-js/MatterPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar MatterAttractors = __webpack_require__(/*! ./lib/plugins/MatterAttractors */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js");\r\nvar MatterLib = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\nvar MatterWrap = __webpack_require__(/*! ./lib/plugins/MatterWrap */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class MatterPhysics\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar MatterPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function MatterPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#add\r\n * @type {Phaser.Physics.Matter.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#verts\r\n * @type {MatterJS.Vertices}\r\n * @since 3.14.0\r\n */\r\n this.verts = Vertices;\r\n\r\n /**\r\n * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#body\r\n * @type {MatterJS.Body}\r\n * @since 3.18.0\r\n */\r\n this.body = Body;\r\n\r\n /**\r\n * A reference to the `Matter.Bodies` module which contains methods for creating bodies.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#bodies\r\n * @type {MatterJS.Bodies}\r\n * @since 3.18.0\r\n */\r\n this.bodies = Bodies;\r\n\r\n // Matter plugins\r\n\r\n if (GetValue(this.config, \'plugins.attractors\', false))\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n }\r\n\r\n if (GetValue(this.config, \'plugins.wrap\', false))\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n }\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'matter\', {}),\r\n GetFastValue(gameConfig, \'matter\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableAttractorPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableAttractorPlugin: function ()\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableWrapPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableWrapPlugin: function ()\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set60Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update60Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set30Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update30Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n this.world.step(delta, correction);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'MatterPhysics\', MatterPhysics, \'matterPhysics\');\r\n\r\nmodule.exports = MatterPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterPhysics.js?')},"./node_modules/phaser/src/physics/matter-js/MatterSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AnimationComponent = __webpack_require__(/*! ../../gameobjects/components/Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterSprite (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Sprite\');\r\n\r\n this.anims = new AnimationComponent(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterSprite.js?')},"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A wrapper around a Tile that provides access to a corresponding Matter body. A tile can only\r\n * have one Matter body associated with it. You can either pass in an existing Matter body for\r\n * the tile or allow the constructor to create the corresponding body for you. If the Tile has a\r\n * collision group (defined in Tiled), those shapes will be used to create the body. If not, the\r\n * tile's rectangle bounding box will be used.\r\n *\r\n * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.\r\n *\r\n * Note: not all Tiled collision shapes are supported. See\r\n * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.\r\n *\r\n * @class TileBody\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body.\r\n * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body.\r\n */\r\nvar MatterTileBody = new Class({\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.Sleep,\r\n Components.Static\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterTileBody (world, tile, options)\r\n {\r\n /**\r\n * The tile object the body is associated with.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#tile\r\n * @type {Phaser.Tilemaps.Tile}\r\n * @since 3.0.0\r\n */\r\n this.tile = tile;\r\n\r\n /**\r\n * The Matter world the body exists within.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n // Install a reference to 'this' on the tile and ensure there can only be one matter body\r\n // associated with the tile\r\n if (tile.physics.matterBody)\r\n {\r\n tile.physics.matterBody.destroy();\r\n }\r\n\r\n tile.physics.matterBody = this;\r\n\r\n // Set the body either from an existing body (if provided), the shapes in the tileset\r\n // collision layer (if it exists) or a rectangle matching the tile.\r\n var body = GetFastValue(options, 'body', null);\r\n\r\n var addToWorld = GetFastValue(options, 'addToWorld', true);\r\n\r\n if (!body)\r\n {\r\n var collisionGroup = tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n if (collisionObjects.length > 0)\r\n {\r\n this.setFromTileCollision(options);\r\n }\r\n else\r\n {\r\n this.setFromTileRectangle(options);\r\n }\r\n }\r\n else\r\n {\r\n this.setBody(body, addToWorld);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current body to a rectangle that matches the bounds of the tile.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileRectangle: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var bounds = this.tile.getBounds();\r\n var cx = bounds.x + (bounds.width / 2);\r\n var cy = bounds.y + (bounds.height / 2);\r\n var body = Bodies.rectangle(cx, cy, bounds.width, bounds.height, options);\r\n\r\n this.setBody(body, options.addToWorld);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body from the collision group associated with the Tile. This is typically\r\n * set up in Tiled's collision editor.\r\n *\r\n * Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly\r\n * supported. Ellipses are converted into circle bodies. Polylines are treated as if they are\r\n * closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave\r\n * shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to\r\n * work for complex shapes (e.g. holes), so it's often best to manually decompose a concave\r\n * polygon into multiple convex polygons yourself.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileCollision\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileCollision: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var sx = this.tile.tilemapLayer.scaleX;\r\n var sy = this.tile.tilemapLayer.scaleY;\r\n var tileX = this.tile.getLeft();\r\n var tileY = this.tile.getTop();\r\n var collisionGroup = this.tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n var parts = [];\r\n\r\n for (var i = 0; i < collisionObjects.length; i++)\r\n {\r\n var object = collisionObjects[i];\r\n var ox = tileX + (object.x * sx);\r\n var oy = tileY + (object.y * sy);\r\n var ow = object.width * sx;\r\n var oh = object.height * sy;\r\n var body = null;\r\n\r\n if (object.rectangle)\r\n {\r\n body = Bodies.rectangle(ox + ow / 2, oy + oh / 2, ow, oh, options);\r\n }\r\n else if (object.ellipse)\r\n {\r\n body = Bodies.circle(ox + ow / 2, oy + oh / 2, ow / 2, options);\r\n }\r\n else if (object.polygon || object.polyline)\r\n {\r\n // Polygons and polylines are both treated as closed polygons\r\n var originalPoints = object.polygon ? object.polygon : object.polyline;\r\n\r\n var points = originalPoints.map(function (p)\r\n {\r\n return { x: p.x * sx, y: p.y * sy };\r\n });\r\n\r\n var vertices = Vertices.create(points);\r\n\r\n // Points are relative to the object's origin (first point placed in Tiled), but\r\n // matter expects points to be relative to the center of mass. This only applies to\r\n // convex shapes. When a concave shape is decomposed, multiple parts are created and\r\n // the individual parts are positioned relative to (ox, oy).\r\n //\r\n // Update: 8th January 2019 - the latest version of Matter needs the Vertices adjusted,\r\n // regardless if convex or concave.\r\n\r\n var center = Vertices.centre(vertices);\r\n\r\n ox += center.x;\r\n oy += center.y;\r\n\r\n body = Bodies.fromVertices(ox, oy, vertices, options);\r\n }\r\n\r\n if (body)\r\n {\r\n parts.push(body);\r\n }\r\n }\r\n\r\n if (parts.length === 1)\r\n {\r\n this.setBody(parts[0], options.addToWorld);\r\n }\r\n else if (parts.length > 1)\r\n {\r\n options.parts = parts;\r\n this.setBody(Body.create(options), options.addToWorld);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body to the given body. This will remove the previous body, if one already\r\n * exists.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - The new Matter body to use.\r\n * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined) { addToWorld = true; }\r\n\r\n if (this.body)\r\n {\r\n this.removeBody();\r\n }\r\n\r\n this.body = body;\r\n this.body.gameObject = this;\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(this.body);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the TileBody and from the Matter world\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#removeBody\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n removeBody: function ()\r\n {\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n this.body.gameObject = undefined;\r\n this.body = undefined;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the tile and the world.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n destroy: function ()\r\n {\r\n this.removeBody();\r\n this.tile.physics.matterBody = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterTileBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterTileBody.js?")},"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Joachim Grill \r\n * @copyright 2018 CodeAndWeb GmbH\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file\r\n * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor).\r\n *\r\n * @namespace Phaser.Physics.Matter.PhysicsEditorParser\r\n * @since 3.10.0\r\n */\r\nvar PhysicsEditorParser = {\r\n\r\n /**\r\n * Parses a body element exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - x position.\r\n * @param {number} y - y position.\r\n * @param {number} w - width.\r\n * @param {number} h - height.\r\n * @param {object} config - body configuration and fixture (child body) definitions.\r\n * \r\n * @return {object} A matter body, consisting of several parts (child bodies)\r\n */\r\n parseBody: function (x, y, w, h, config)\r\n {\r\n var fixtureConfigs = GetFastValue(config, \'fixtures\', []);\r\n var fixtures = [];\r\n\r\n for (var fc = 0; fc < fixtureConfigs.length; fc++)\r\n {\r\n var fixtureParts = this.parseFixture(fixtureConfigs[fc]);\r\n\r\n for (var i = 0; i < fixtureParts.length; i++)\r\n {\r\n fixtures.push(fixtureParts[i]);\r\n }\r\n }\r\n\r\n var matterConfig = Common.extend({}, false, config);\r\n\r\n delete matterConfig.fixtures;\r\n delete matterConfig.type;\r\n\r\n var body = Body.create(matterConfig);\r\n\r\n Body.setParts(body, fixtures);\r\n body.render.sprite.xOffset = body.position.x / w;\r\n body.render.sprite.yOffset = body.position.y / h;\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n },\r\n\r\n\r\n /**\r\n * Parses an element of the "fixtures" list exported by PhysicsEditor\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture\r\n * @since 3.10.0\r\n *\r\n * @param {object} fixtureConfig - the fixture object to parse\r\n * \r\n * @return {object[]} - A list of matter bodies\r\n */\r\n parseFixture: function (fixtureConfig)\r\n {\r\n var matterConfig = Common.extend({}, false, fixtureConfig);\r\n\r\n delete matterConfig.circle;\r\n delete matterConfig.vertices;\r\n\r\n var fixtures;\r\n\r\n if (fixtureConfig.circle)\r\n {\r\n var x = GetFastValue(fixtureConfig.circle, \'x\');\r\n var y = GetFastValue(fixtureConfig.circle, \'y\');\r\n var r = GetFastValue(fixtureConfig.circle, \'radius\');\r\n fixtures = [ Bodies.circle(x, y, r, matterConfig) ];\r\n }\r\n else if (fixtureConfig.vertices)\r\n {\r\n fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig);\r\n }\r\n\r\n return fixtures;\r\n },\r\n\r\n /**\r\n * Parses the "vertices" lists exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices\r\n * @since 3.10.0\r\n *\r\n * @param {object} vertexSets - The vertex lists to parse.\r\n * @param {object} options - Matter body options.\r\n * \r\n * @return {object[]} - A list of matter bodies.\r\n */\r\n parseVertices: function (vertexSets, options)\r\n {\r\n var i, j, k, v, z;\r\n var parts = [];\r\n\r\n options = options || {};\r\n\r\n for (v = 0; v < vertexSets.length; v += 1)\r\n {\r\n parts.push(Body.create(Common.extend({\r\n position: Vertices.centre(vertexSets[v]),\r\n vertices: vertexSets[v]\r\n }, options)));\r\n }\r\n\r\n // flag coincident part edges\r\n var coincidentMaxDist = 5;\r\n\r\n for (i = 0; i < parts.length; i++)\r\n {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++)\r\n {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds))\r\n {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++)\r\n {\r\n for (z = 0; z < partB.vertices.length; z++)\r\n {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincidentMaxDist && db < coincidentMaxDist)\r\n {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n return parts;\r\n }\r\n};\r\n\r\nmodule.exports = PhysicsEditorParser;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js?')},"./node_modules/phaser/src/physics/matter-js/PointerConstraint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/matter-js/events/index.js");\r\nvar InputEvents = __webpack_require__(/*! ../../input/events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer Constraint is a special type of constraint that allows you to click\r\n * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,\r\n * and when one is pressed down it checks to see if that hit any part of any active\r\n * body in the world. If it did, and the body has input enabled, it will begin to\r\n * drag it until either released, or you stop it via the `stopDrag` method.\r\n * \r\n * You can adjust the stiffness, length and other properties of the constraint via\r\n * the `options` object on creation.\r\n *\r\n * @class PointerConstraint\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene to which this Pointer Constraint belongs.\r\n * @param {Phaser.Physics.Matter.World} world - A reference to the Matter World instance to which this Constraint belongs.\r\n * @param {object} [options] - A Constraint configuration object.\r\n */\r\nvar PointerConstraint = new Class({\r\n\r\n initialize:\r\n\r\n function PointerConstraint (scene, world, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n // Defaults\r\n var defaults = {\r\n label: \'Pointer Constraint\',\r\n pointA: { x: 0, y: 0 },\r\n pointB: { x: 0, y: 0 },\r\n damping: 0,\r\n length: 0.01,\r\n stiffness: 0.1,\r\n angularStiffness: 1,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n }\r\n };\r\n\r\n /**\r\n * A reference to the Scene to which this Pointer Constraint belongs.\r\n * This is the same Scene as the Matter World instance.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Matter World instance to which this Constraint belongs.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Camera the Pointer was interacting with when the input\r\n * down event was processed.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A reference to the Input Pointer that activated this Constraint.\r\n * This is set in the `onDown` handler.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * Is this Constraint active or not?\r\n * \r\n * An active constraint will be processed each update. An inactive one will be skipped.\r\n * Use this to toggle a Pointer Constraint on and off.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The internal transformed position.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The body that is currently being dragged, if any.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#body\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * The part of the body that was clicked on to start the drag.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#part\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.part = null;\r\n\r\n /**\r\n * The native Matter Constraint that is used to attach to bodies.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#constraint\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.constraint = Constraint.create(Merge(options, defaults));\r\n\r\n this.world.on(Events.BEFORE_UPDATE, this.update, this);\r\n\r\n scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this);\r\n },\r\n\r\n /**\r\n * A Pointer has been pressed down onto the Scene.\r\n * \r\n * If this Constraint doesn\'t have an active Pointer then a hit test is\r\n * run against all active bodies in the world. If one is found it is bound\r\n * to this constraint and the drag begins.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#onDown\r\n * @fires Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed.\r\n */\r\n onDown: function (pointer)\r\n {\r\n if (!this.pointer)\r\n {\r\n if (this.getBody(pointer))\r\n {\r\n this.pointer = pointer;\r\n\r\n this.camera = pointer.camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Scans all active bodies in the current Matter World to see if any of them\r\n * are hit by the Pointer. The _first one_ found to hit is set as the active contraint\r\n * body.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#getBody\r\n * @since 3.16.2\r\n * \r\n * @return {boolean} `true` if a body was found and set, otherwise `false`.\r\n */\r\n getBody: function (pointer)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n\r\n pointer.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n\r\n var bodies = Composite.allBodies(this.world.localWorld);\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.ignorePointer &&\r\n Bounds.contains(body.bounds, pos) &&\r\n Detector.canCollide(body.collisionFilter, constraint.collisionFilter))\r\n {\r\n if (this.hitTestBody(body, pos))\r\n {\r\n this.world.emit(Events.DRAG_START, this.body, this.part, this);\r\n\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Scans the current body to determine if a part of it was clicked on.\r\n * If a part is found the body is set as the `constraint.bodyB` property,\r\n * as well as the `body` property of this class. The part is also set.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody\r\n * @since 3.16.2\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to check.\r\n * @param {Phaser.Math.Vector2} position - A translated hit test position.\r\n *\r\n * @return {boolean} `true` if a part of the body was hit, otherwise `false`.\r\n */\r\n hitTestBody: function (body, position)\r\n {\r\n var constraint = this.constraint;\r\n\r\n var start = (body.parts.length > 1) ? 1 : 0;\r\n\r\n for (var i = start; i < body.parts.length; i++)\r\n {\r\n var part = body.parts[i];\r\n\r\n if (Vertices.contains(part.vertices, position))\r\n {\r\n constraint.bodyB = body;\r\n\r\n constraint.pointA.x = position.x;\r\n constraint.pointA.y = position.y;\r\n\r\n constraint.pointB.x = position.x - body.position.x;\r\n constraint.pointB.y = position.y - body.position.y;\r\n\r\n constraint.angleB = body.angle;\r\n\r\n Sleeping.set(body, false);\r\n\r\n this.part = part;\r\n this.body = body;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler. Called in the Matter BEFORE_UPDATE step.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#update\r\n * @fires Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.0.0\r\n */\r\n update: function ()\r\n {\r\n var body = this.body;\r\n var pointer = this.pointer;\r\n\r\n if (!this.active || !pointer || !body)\r\n {\r\n return;\r\n }\r\n\r\n if (pointer.isDown)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n \r\n this.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n \r\n Sleeping.set(body, false);\r\n \r\n constraint.pointA.x = pos.x;\r\n constraint.pointA.y = pos.y;\r\n \r\n this.world.emit(Events.DRAG, body, this);\r\n }\r\n else\r\n {\r\n // Pointer has been released since the last world step\r\n this.stopDrag();\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Pointer Constraint from dragging the body any further.\r\n * \r\n * This is called automatically if the Pointer is released while actively\r\n * dragging a body. Or, you can call it manually to release a body from a\r\n * constraint without having to first release the pointer.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#stopDrag\r\n * @fires Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n */\r\n stopDrag: function ()\r\n {\r\n var body = this.body;\r\n var constraint = this.constraint;\r\n\r\n if (body)\r\n {\r\n this.world.emit(Events.DRAG_END, body, this);\r\n\r\n this.pointer = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n constraint.bodyB = null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Pointer Constraint instance and all of its references.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.removeConstraint(this.constraint);\r\n\r\n this.pointer = null;\r\n this.constraint = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n this.world.off(Events.BEFORE_UPDATE, this.update);\r\n\r\n this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PointerConstraint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PointerConstraint.js?')},"./node_modules/phaser/src/physics/matter-js/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Engine = __webpack_require__(/*! ./lib/core/Engine */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MatterBody = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar MatterEvents = __webpack_require__(/*! ./lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ \"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js\");\r\nvar MatterWorld = __webpack_require__(/*! ./lib/body/World */ \"./node_modules/phaser/src/physics/matter-js/lib/body/World.js\");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Matter World instance belongs.\r\n * @param {Phaser.Types.Physics.Matter.MatterWorldConfig} config - The Matter World configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Matter World instance belongs.\r\n *\r\n * @name Phaser.Physics.Matter.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * An instance of the MatterJS Engine.\r\n *\r\n * @name Phaser.Physics.Matter.World#engine\r\n * @type {MatterJS.Engine}\r\n * @since 3.0.0\r\n */\r\n this.engine = Engine.create(config);\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @name Phaser.Physics.Matter.World#localWorld\r\n * @type {MatterJS.World}\r\n * @since 3.0.0\r\n */\r\n this.localWorld = this.engine.world;\r\n\r\n var gravity = GetValue(config, 'gravity', null);\r\n\r\n if (gravity)\r\n {\r\n this.setGravity(gravity.x, gravity.y, gravity.scale);\r\n }\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Matter.World#walls\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n /**\r\n * A flag that toggles if the world is enabled or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = GetValue(config, 'enabled', true);\r\n\r\n /**\r\n * The correction argument is an optional Number that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where delta is changing between updates.\r\n * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step.\r\n * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * @name Phaser.Physics.Matter.World#correction\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.correction = GetValue(config, 'correction', 1);\r\n\r\n /**\r\n * This function is called every time the core game loop steps, which is bound to the\r\n * Request Animation Frame frequency unless otherwise modified.\r\n * \r\n * The function is passed two values: `time` and `delta`, both of which come from the game step values.\r\n * \r\n * It must return a number. This number is used as the delta value passed to Matter.Engine.update.\r\n * \r\n * You can override this function with your own to define your own timestep.\r\n * \r\n * If you need to update the Engine multiple times in a single game step then call\r\n * `World.update` as many times as required. Each call will trigger the `getDelta` function.\r\n * If you wish to have full control over when the Engine updates then see the property `autoUpdate`.\r\n *\r\n * You can also adjust the number of iterations that Engine.update performs.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @name Phaser.Physics.Matter.World#getDelta\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.getDelta = GetValue(config, 'getDelta', this.update60Hz);\r\n\r\n /**\r\n * Automatically call Engine.update every time the game steps.\r\n * If you disable this then you are responsible for calling `World.step` directly from your game.\r\n * If you call `set60Hz` or `set30Hz` then `autoUpdate` is reset to `true`.\r\n *\r\n * @name Phaser.Physics.Matter.World#autoUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.autoUpdate = GetValue(config, 'autoUpdate', true);\r\n\r\n /**\r\n * A flag that controls if the debug graphics will be drawn to or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * An instance of the Graphics object the debug bodies are drawn to, if enabled.\r\n *\r\n * @name Phaser.Physics.Matter.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * The default configuration values.\r\n *\r\n * @name Phaser.Physics.Matter.World#defaults\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetFastValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n bodyDebugFillColor: GetFastValue(config, 'debugBodyFillColor', 0xe3a7e3),\r\n staticBodyDebugColor: GetFastValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n debugShowJoint: GetFastValue(config, 'debugShowJoint', true),\r\n jointDebugColor: GetFastValue(config, 'debugJointColor', 0x000000),\r\n debugWireframes: GetFastValue(config, 'debugWireframes', true),\r\n debugShowInternalEdges: GetFastValue(config, 'debugShowInternalEdges', false),\r\n debugShowConvexHulls: GetFastValue(config, 'debugShowConvexHulls', false),\r\n debugConvexHullColor: GetFastValue(config, 'debugConvexHullColor', 0xaaaaaa),\r\n debugShowSleeping: GetFastValue(config, 'debugShowSleeping', false)\r\n };\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n\r\n this.setEventsProxy();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#setEventsProxy\r\n * @since 3.0.0\r\n */\r\n setEventsProxy: function ()\r\n {\r\n var _this = this;\r\n var engine = this.engine;\r\n\r\n MatterEvents.on(engine, 'beforeUpdate', function (event)\r\n {\r\n _this.emit(Events.BEFORE_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'afterUpdate', function (event)\r\n {\r\n _this.emit(Events.AFTER_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionStart', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_START, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionActive', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_ACTIVE, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionEnd', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_END, event, bodyA, bodyB);\r\n });\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Matter.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y=0] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=128] - The thickness of each wall, in pixels.\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 128; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(right, 'right', x + width, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n // position = 'left', 'right', 'top' or 'bottom'\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n // adjust center\r\n x += (width / 2);\r\n y += (height / 2);\r\n\r\n this.walls[position] = this.create(x, y, width, height, { isStatic: true, friction: 0, frictionStatic: 0 });\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} [description]\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity and gravity scale to 0.\r\n *\r\n * @method Phaser.Physics.Matter.World#disableGravity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n disableGravity: function ()\r\n {\r\n this.localWorld.gravity.x = 0;\r\n this.localWorld.gravity.y = 0;\r\n this.localWorld.gravity.scale = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity\r\n *\r\n * @method Phaser.Physics.Matter.World#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The world gravity x component.\r\n * @param {number} [y=1] - The world gravity y component.\r\n * @param {number} [scale] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setGravity: function (x, y, scale)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 1; }\r\n\r\n this.localWorld.gravity.x = x;\r\n this.localWorld.gravity.y = y;\r\n\r\n if (scale !== undefined)\r\n {\r\n this.localWorld.gravity.scale = scale;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a rectangle Matter body and adds it to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the world.\r\n * @param {number} y - The vertical position of the body in the world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n * @param {object} options - Optional Matter configuration object.\r\n *\r\n * @return {MatterJS.Body} The Matter.js body that was created.\r\n */\r\n create: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n MatterWorld.add(this.localWorld, body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Adds an object to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#add\r\n * @since 3.0.0\r\n *\r\n * @param {(object|object[])} object - Can be single or an array, and can be a body, composite or constraint\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n add: function (object)\r\n {\r\n MatterWorld.add(this.localWorld, object);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to be removed from the world.\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n remove: function (object, deep)\r\n {\r\n var body = (object.body) ? object.body : object;\r\n\r\n Composite.remove(this.localWorld, body, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#removeConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Constraint} constraint - [description]\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n removeConstraint: function (constraint, deep)\r\n {\r\n Composite.remove(this.localWorld, constraint, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set\r\n * the appropriate tiles in your layer to collide before calling this method!\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer -\r\n * An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTilemapLayer: function (tilemapLayer, options)\r\n {\r\n var layerData = tilemapLayer.layer;\r\n var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, { isColliding: true });\r\n\r\n this.convertTiles(tiles, options);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the\r\n * tiles are set to collide or not.\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTiles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTiles: function (tiles, options)\r\n {\r\n if (tiles.length === 0)\r\n {\r\n return this;\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n new MatterTileBody(this, tiles[i], options);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} isNonColliding - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n nextGroup: function (isNonColliding)\r\n {\r\n return MatterBody.nextGroup(isNonColliding);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextCategory\r\n * @since 3.0.0\r\n *\r\n * @return {number} Returns the next unique category bitfield.\r\n */\r\n nextCategory: function ()\r\n {\r\n return MatterBody.nextCategory();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#pause\r\n * @fires Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#resume\r\n * @fires Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.enabled && this.autoUpdate)\r\n {\r\n Engine.update(this.engine, this.getDelta(time, delta), this.correction);\r\n }\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.World#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n Engine.update(this.engine, delta, correction);\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 60Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update60Hz: function ()\r\n {\r\n return 1000 / 60;\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 30Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update30Hz: function ()\r\n {\r\n return 1000 / 30;\r\n },\r\n\r\n /**\r\n * Handles the rendering of bodies and debug information to the debug Graphics object, if enabled.\r\n *\r\n * @method Phaser.Physics.Matter.World#postUpdate\r\n * @private\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n if (!this.drawDebug)\r\n {\r\n return;\r\n }\r\n\r\n this.debugGraphic.clear();\r\n\r\n var bodies = Composite.allBodies(this.localWorld);\r\n\r\n if (this.defaults.debugWireframes)\r\n {\r\n if (this.defaults.debugShowConvexHulls)\r\n {\r\n this.renderConvexHulls(bodies);\r\n }\r\n\r\n this.renderWireframes(bodies);\r\n }\r\n else\r\n {\r\n this.renderBodies(bodies);\r\n }\r\n\r\n if (this.defaults.debugShowJoint)\r\n {\r\n this.renderJoints();\r\n }\r\n },\r\n\r\n /**\r\n * Renders the debug convex hulls from the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderConvexHulls\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderConvexHulls: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(1, this.defaults.debugConvexHullColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible || body.parts.length === 1)\r\n {\r\n continue;\r\n }\r\n\r\n graphics.moveTo(body.vertices[0].x, body.vertices[0].y);\r\n\r\n for (var j = 1; j < body.vertices.length; j++)\r\n {\r\n graphics.lineTo(body.vertices[j].x, body.vertices[j].y);\r\n }\r\n \r\n graphics.lineTo(body.vertices[0].x, body.vertices[0].y);\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the wireframes of the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderWireframes\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderWireframes: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n var showInternalEdges = this.defaults.debugShowInternalEdges;\r\n\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n for (var k = (body.parts.length > 1) ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n var part = body.parts[k];\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % vertLength].x, part.vertices[(j + 1) % vertLength].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n }\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderBodies\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderBodies: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n var showInternalEdges = this.defaults.debugShowInternalEdges || !this.defaults.debugWireframes;\r\n var showSleeping = this.defaults.debugShowSleeping;\r\n var wireframes = this.defaults.debugWireframes;\r\n\r\n var body;\r\n var part;\r\n var i;\r\n var k;\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n // Handle compound parts\r\n for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n part = body.parts[k];\r\n\r\n if (!part.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n if (showSleeping && body.isSleeping)\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n }\r\n else\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, part.render.opacity);\r\n }\r\n\r\n // Part polygon\r\n if (part.circleRadius)\r\n {\r\n graphics.beginPath();\r\n graphics.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI);\r\n }\r\n else\r\n {\r\n graphics.beginPath();\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n graphics.closePath();\r\n }\r\n\r\n if (!wireframes)\r\n {\r\n graphics.fillPath();\r\n }\r\n else\r\n {\r\n graphics.strokePath();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders world constraints.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderJoints\r\n * @private\r\n * @since 3.14.0\r\n */\r\n renderJoints: function ()\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(2, this.defaults.jointDebugColor);\r\n\r\n // Render constraints \r\n var constraints = Composite.allConstraints(this.localWorld);\r\n\r\n for (var i = 0; i < constraints.length; i++)\r\n {\r\n var constraint = constraints[i];\r\n\r\n if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\r\n {\r\n continue;\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.lineStyle(constraint.render.lineWidth, Common.colorToNumber(constraint.render.strokeStyle));\r\n }\r\n\r\n var bodyA = constraint.bodyA;\r\n var bodyB = constraint.bodyB;\r\n var start;\r\n var end;\r\n\r\n if (bodyA)\r\n {\r\n start = Vector.add(bodyA.position, constraint.pointA);\r\n }\r\n else\r\n {\r\n start = constraint.pointA;\r\n }\r\n\r\n if (constraint.render.type === 'pin')\r\n {\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 3, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n }\r\n else\r\n {\r\n if (bodyB)\r\n {\r\n end = Vector.add(bodyB.position, constraint.pointB);\r\n }\r\n else\r\n {\r\n end = constraint.pointB;\r\n }\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(start.x, start.y);\r\n\r\n if (constraint.render.type === 'spring')\r\n {\r\n var delta = Vector.sub(end, start);\r\n var normal = Vector.perp(Vector.normalise(delta));\r\n var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20));\r\n var offset;\r\n\r\n for (var j = 1; j < coils; j += 1)\r\n {\r\n offset = (j % 2 === 0) ? 1 : -1;\r\n\r\n graphics.lineTo(\r\n start.x + delta.x * (j / coils) + normal.x * offset * 4,\r\n start.y + delta.y * (j / coils) + normal.y * offset * 4\r\n );\r\n }\r\n }\r\n\r\n graphics.lineTo(end.x, end.y);\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.strokePath();\r\n }\r\n\r\n if (constraint.render.anchors)\r\n {\r\n graphics.fillStyle(Common.colorToNumber(constraint.render.strokeStyle));\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 6, 0, 2 * Math.PI);\r\n graphics.arc(end.x, end.y, 6, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n graphics.fillPath();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#fromPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} path - [description]\r\n * @param {array} points - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\n fromPath: function (path, points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n // var pathPattern = /L?\\s*([-\\d.e]+)[\\s,]*([-\\d.e]+)*/ig;\r\n\r\n // eslint-disable-next-line no-useless-escape\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig;\r\n\r\n path.replace(pathPattern, function (match, x, y)\r\n {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * Resets the internal collision IDs that Matter.JS uses for Body collision groups.\r\n * \r\n * You should call this before destroying your game if you need to restart the game\r\n * again on the same page, without first reloading the page. Or, if you wish to\r\n * consistently destroy a Scene that contains Matter.js and then run it again\r\n * later in the same game.\r\n *\r\n * @method Phaser.Physics.Matter.World#resetCollisionIDs\r\n * @since 3.17.0\r\n */\r\n resetCollisionIDs: function ()\r\n {\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * @method Phaser.Physics.Matter.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n MatterEvents.off(this.engine);\r\n\r\n this.removeAllListeners();\r\n\r\n MatterWorld.clear(this.localWorld, false);\r\n\r\n Engine.clear(this.engine);\r\n\r\n if (this.drawDebug)\r\n {\r\n this.debugGraphic.destroy();\r\n }\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * After destroying the world it cannot be re-used again.\r\n *\r\n * @method Phaser.Physics.Matter.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/World.js?")},"./node_modules/phaser/src/physics/matter-js/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to set restitution on objects.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the restitution on the physics object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.restitution = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Bounce.js?")},"./node_modules/phaser/src/physics/matter-js/components/Collision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Collision\r\n * @since 3.0.0\r\n */\r\nvar Collision = {\r\n\r\n /**\r\n * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}).\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique category bitfield.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionCategory: function (value)\r\n {\r\n this.body.collisionFilter.category = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique group index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionGroup: function (value)\r\n {\r\n this.body.collisionFilter.group = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollidesWith\r\n * @since 3.0.0\r\n *\r\n * @param {(number|number[])} categories - A unique category bitfield, or an array of them.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesWith: function (categories)\r\n {\r\n var flags = 0;\r\n\r\n if (!Array.isArray(categories))\r\n {\r\n flags = categories;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < categories.length; i++)\r\n {\r\n flags |= categories[i];\r\n }\r\n }\r\n\r\n this.body.collisionFilter.mask = flags;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Collision.js?")},"./node_modules/phaser/src/physics/matter-js/components/Force.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * A component to apply force to Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Force\r\n * @since 3.0.0\r\n */\r\nvar Force = {\r\n\r\n // force = vec2 / point\r\n\r\n /**\r\n * Applies a force to a body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForce\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForce: function (force)\r\n {\r\n this._tempVec2.set(this.body.position.x, this.body.position.y);\r\n\r\n Body.applyForce(this.body, this._tempVec2, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given position.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForceFrom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} position - The position in which the force comes from.\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForceFrom: function (position, force)\r\n {\r\n Body.applyForce(this.body, position, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the forward position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrust\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrust: function (speed)\r\n {\r\n var angle = this.body.angle;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the left position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustLeft: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the right position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustRight: function (speed)\r\n {\r\n var angle = this.body.angle + Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the back position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustBack\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustBack: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Force;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Force.js?')},"./node_modules/phaser/src/physics/matter-js/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * Sets new friction values for this Game Object's Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.\r\n * @param {number} [air] - If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.\r\n * @param {number} [fstatic] - If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never \"stick\" when it is nearly stationary.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (value, air, fstatic)\r\n {\r\n this.body.friction = value;\r\n\r\n if (air !== undefined)\r\n {\r\n this.body.frictionAir = air;\r\n }\r\n\r\n if (fstatic !== undefined)\r\n {\r\n this.body.frictionStatic = fstatic;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new air resistance for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionAir: function (value)\r\n {\r\n this.body.frictionAir = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never \"stick\" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new static friction for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionStatic: function (value)\r\n {\r\n this.body.frictionStatic = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Friction.js?")},"./node_modules/phaser/src/physics/matter-js/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to manipulate world gravity for Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * A togglable function for ignoring world gravity in real-time on the current body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Gravity#setIgnoreGravity\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to true to ignore the effect of world gravity, or false to not ignore it.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setIgnoreGravity: function (value)\r\n {\r\n this.body.ignoreGravity = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Gravity.js?")},"./node_modules/phaser/src/physics/matter-js/components/Mass.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Mass\r\n * @since 3.0.0\r\n */\r\nvar Mass = {\r\n\r\n /**\r\n * Sets the mass of the Game Object\'s Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new mass of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMass: function (value)\r\n {\r\n Body.setMass(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets density of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setDensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new density of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDensity: function (value)\r\n {\r\n Body.setDensity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The body\'s center of mass.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Mass#centerOfMass\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Math.Vector2} The center of mass.\r\n */\r\n centerOfMass: {\r\n\r\n get: function ()\r\n {\r\n return new Vector2(this.body.render.sprite.xOffset * this.width, this.body.render.sprite.yOffset * this.height);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mass;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Mass.js?')},"./node_modules/phaser/src/physics/matter-js/components/Sensor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sensor\r\n * @since 3.0.0\r\n */\r\nvar Sensor = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#setSensor\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSensor: function (value)\r\n {\r\n this.body.isSensor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#isSensor\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isSensor: function ()\r\n {\r\n return this.body.isSensor;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sensor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sensor.js?")},"./node_modules/phaser/src/physics/matter-js/components/SetBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ../lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PhysicsEditorParser = __webpack_require__(/*! ../PhysicsEditorParser */ \"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js\");\r\nvar Vertices = __webpack_require__(/*! ../lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.SetBody\r\n * @since 3.0.0\r\n */\r\nvar SetBody = {\r\n\r\n // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc\r\n\r\n /**\r\n * Set the body on a Game Object to a rectangle.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setRectangle: function (width, height, options)\r\n {\r\n return this.setBody({ type: 'rectangle', width: width, height: height }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCircle: function (radius, options)\r\n {\r\n return this.setBody({ type: 'circle', radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Set the body on the Game Object to a polygon shape.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setPolygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the polygon.\r\n * @param {number} sides - The amount of sides creating the polygon.\r\n * @param {object} options - A matterjs config object.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPolygon: function (radius, sides, options)\r\n {\r\n return this.setBody({ type: 'polygon', sides: sides, radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Creates a new matterjs trapezoid body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the trapezoid.\r\n * @param {number} height - The height of the trapezoid.\r\n * @param {number} slope - The angle of slope for the trapezoid.\r\n * @param {object} options - A matterjs config object for the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTrapezoid: function (width, height, slope, options)\r\n {\r\n return this.setBody({ type: 'trapezoid', width: width, height: height, slope: slope }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - [description]\r\n * @param {boolean} [addToWorld=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setExistingBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined)\r\n {\r\n addToWorld = true;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n }\r\n\r\n this.body = body;\r\n\r\n for (var i = 0; i < body.parts.length; i++)\r\n {\r\n body.parts[i].gameObject = this;\r\n }\r\n\r\n var _this = this;\r\n\r\n body.destroy = function destroy ()\r\n {\r\n _this.world.remove(_this.body);\r\n _this.body.gameObject = null;\r\n };\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(body);\r\n }\r\n\r\n if (this._originComponent)\r\n {\r\n this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBody: function (config, options)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n var body;\r\n\r\n // Allow them to do: shape: 'circle' instead of shape: { type: 'circle' }\r\n if (typeof config === 'string')\r\n {\r\n // Using defaults\r\n config = { type: config };\r\n }\r\n\r\n var shapeType = GetFastValue(config, 'type', 'rectangle');\r\n var bodyX = GetFastValue(config, 'x', this._tempVec2.x);\r\n var bodyY = GetFastValue(config, 'y', this._tempVec2.y);\r\n var bodyWidth = GetFastValue(config, 'width', this.width);\r\n var bodyHeight = GetFastValue(config, 'height', this.height);\r\n\r\n switch (shapeType)\r\n {\r\n case 'rectangle':\r\n body = Bodies.rectangle(bodyX, bodyY, bodyWidth, bodyHeight, options);\r\n break;\r\n\r\n case 'circle':\r\n var radius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n var maxSides = GetFastValue(config, 'maxSides', 25);\r\n body = Bodies.circle(bodyX, bodyY, radius, options, maxSides);\r\n break;\r\n\r\n case 'trapezoid':\r\n var slope = GetFastValue(config, 'slope', 0.5);\r\n body = Bodies.trapezoid(bodyX, bodyY, bodyWidth, bodyHeight, slope, options);\r\n break;\r\n\r\n case 'polygon':\r\n var sides = GetFastValue(config, 'sides', 5);\r\n var pRadius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n body = Bodies.polygon(bodyX, bodyY, sides, pRadius, options);\r\n break;\r\n\r\n case 'fromVertices':\r\n case 'fromVerts':\r\n\r\n var verts = GetFastValue(config, 'verts', null);\r\n\r\n if (verts)\r\n {\r\n // Has the verts array come from Vertices.fromPath, or is it raw?\r\n if (typeof verts === 'string')\r\n {\r\n verts = Vertices.fromPath(verts);\r\n }\r\n\r\n if (this.body && !this.body.hasOwnProperty('temp'))\r\n {\r\n Body.setVertices(this.body, verts);\r\n\r\n body = this.body;\r\n }\r\n else\r\n {\r\n var flagInternal = GetFastValue(config, 'flagInternal', false);\r\n var removeCollinear = GetFastValue(config, 'removeCollinear', 0.01);\r\n var minimumArea = GetFastValue(config, 'minimumArea', 10);\r\n \r\n body = Bodies.fromVertices(bodyX, bodyY, verts, options, flagInternal, removeCollinear, minimumArea);\r\n }\r\n }\r\n\r\n break;\r\n\r\n case 'fromPhysicsEditor':\r\n body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config);\r\n break;\r\n }\r\n\r\n if (body)\r\n {\r\n this.setExistingBody(body, config.addToWorld);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/SetBody.js?")},"./node_modules/phaser/src/physics/matter-js/components/Sleep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar MatterEvents = __webpack_require__(/*! ../lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sleep\r\n * @since 3.0.0\r\n */\r\nvar Sleep = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=60] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepThreshold: function (value)\r\n {\r\n if (value === undefined) { value = 60; }\r\n\r\n this.body.sleepThreshold = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} start - [description]\r\n * @param {boolean} end - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEvents: function (start, end)\r\n {\r\n this.setSleepStartEvent(start);\r\n this.setSleepEndEvent(end);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepStartEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepStart', function (event)\r\n {\r\n world.emit(Events.SLEEP_START, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepStart');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEndEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepEnd', function (event)\r\n {\r\n world.emit(Events.SLEEP_END, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepEnd');\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sleep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sleep.js?")},"./node_modules/phaser/src/physics/matter-js/components/Static.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Static\r\n * @since 3.0.0\r\n */\r\nvar Static = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#setStatic\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setStatic: function (value)\r\n {\r\n Body.setStatic(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#isStatic\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isStatic: function ()\r\n {\r\n return this.body.isStatic;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Static;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Static.js?')},"./node_modules/phaser/src/physics/matter-js/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n// Transform Component\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Transform\r\n * @since 3.0.0\r\n */\r\nvar Transform = {\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(value, this.y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(this.x, value);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n \r\n this._scaleX = value;\r\n\r\n if (this._scaleX === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n // Reset Matter scale back to 1 (sigh)\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, value, this._scaleY);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleY = value;\r\n\r\n if (this._scaleY === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, this._scaleX, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#angle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this.body.angle * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this.body.angle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n\r\n Body.setAngle(this.body, this._rotation);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the body.\r\n * @param {number} [y=x] - The vertical position of the body.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this._rotation = WrapAngle(radians);\r\n\r\n Body.setAngle(this.body, radians);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setFixedRotation: function ()\r\n {\r\n Body.setInertia(this.body, Infinity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n Body.setAngle(this.body, this.rotation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the x value.\r\n * @param {Phaser.Math.Vector2} [point] - The point (Vector2) from which scaling will occur.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setScale: function (x, y, point)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleX = x;\r\n this._scaleY = y;\r\n\r\n Body.scale(this.body, factorX, factorY, point);\r\n\r\n Body.scale(this.body, x, y, point);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Transform.js?')},"./node_modules/phaser/src/physics/matter-js/components/Velocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n Body.setAngularVelocity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this._tempVec2.set(x, this.body.velocity.y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this._tempVec2.set(this.body.velocity.x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets both the horizontal and vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Velocity.js?')},"./node_modules/phaser/src/physics/matter-js/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/matter-js/components/Bounce.js"),\r\n Collision: __webpack_require__(/*! ./Collision */ "./node_modules/phaser/src/physics/matter-js/components/Collision.js"),\r\n Force: __webpack_require__(/*! ./Force */ "./node_modules/phaser/src/physics/matter-js/components/Force.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/matter-js/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/matter-js/components/Gravity.js"),\r\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/matter-js/components/Mass.js"),\r\n Static: __webpack_require__(/*! ./Static */ "./node_modules/phaser/src/physics/matter-js/components/Static.js"),\r\n Sensor: __webpack_require__(/*! ./Sensor */ "./node_modules/phaser/src/physics/matter-js/components/Sensor.js"),\r\n SetBody: __webpack_require__(/*! ./SetBody */ "./node_modules/phaser/src/physics/matter-js/components/SetBody.js"),\r\n Sleep: __webpack_require__(/*! ./Sleep */ "./node_modules/phaser/src/physics/matter-js/components/Sleep.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/physics/matter-js/components/Transform.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/matter-js/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/index.js?')},"./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.AfterUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics After Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#AFTER_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.AfterUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'afterupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.BeforeUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Before Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#BEFORE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.BeforeUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'beforeupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionActiveEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Active Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that are colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_ACTIVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionactive';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionEndEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have finished colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have started to collide in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * stops dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * is actively dragging a body. It is emitted each time the pointer moves.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * starts dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {MatterJS.Body} part - The part of the body that was clicked on.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepEndEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body stop sleeping.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has stopped sleeping.\r\n */\r\nmodule.exports = 'sleepend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepStartEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body goes to sleep.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has gone to sleep.\r\n */\r\nmodule.exports = 'sleepstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AFTER_UPDATE: __webpack_require__(/*! ./AFTER_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js"),\r\n BEFORE_UPDATE: __webpack_require__(/*! ./BEFORE_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js"),\r\n COLLISION_ACTIVE: __webpack_require__(/*! ./COLLISION_ACTIVE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js"),\r\n COLLISION_END: __webpack_require__(/*! ./COLLISION_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js"),\r\n COLLISION_START: __webpack_require__(/*! ./COLLISION_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js"),\r\n SLEEP_END: __webpack_require__(/*! ./SLEEP_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js"),\r\n SLEEP_START: __webpack_require__(/*! ./SLEEP_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/index.js?')},"./node_modules/phaser/src/physics/matter-js/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js"),\r\n Image: __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js"),\r\n Matter: __webpack_require__(/*! ./CustomMain */ "./node_modules/phaser/src/physics/matter-js/CustomMain.js"),\r\n MatterPhysics: __webpack_require__(/*! ./MatterPhysics */ "./node_modules/phaser/src/physics/matter-js/MatterPhysics.js"),\r\n PolyDecomp: __webpack_require__(/*! ./poly-decomp */ "./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js"),\r\n Sprite: __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js"),\r\n TileBody: __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js"),\r\n PhysicsEditorParser: __webpack_require__(/*! ./PhysicsEditorParser */ "./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js")\r\n\r\n};\r\n\r\n/**\r\n * @namespace MatterJS\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Body` module contains methods for creating and manipulating body models.\r\n * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n *\r\n * @class MatterJS.Body\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n * with commonly used body configurations (such as rectangles, circles and other polygons).\r\n *\r\n * @class MatterJS.Bodies\r\n * @since 3.18.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n * It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n *\r\n * @class MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n * A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n * There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n *\r\n * @class MatterJS.World\r\n * @extends MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n * The stiffness of constraints can be modified to create springs or elastic.\r\n *\r\n * @class MatterJS.Constraint\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n * An engine is a controller that manages updating the simulation of the world.\r\n *\r\n * @class MatterJS.Engine\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @class MatterJS.Vertices\r\n * @since 3.0.0\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/index.js?')},"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Body` module contains methods for creating and manipulating body models.\r\n* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n\r\n* @class Body\r\n*/\r\n\r\nvar Body = {};\r\n\r\nmodule.exports = Body;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\n\r\n(function() {\r\n\r\n Body._inertiaScale = 4;\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n /**\r\n * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * Vertices must be specified in clockwise order.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {body} body\r\n */\r\n Body.create = function(options) {\r\n var defaults = {\r\n id: Common.nextId(),\r\n type: 'body',\r\n label: 'Body',\r\n gameObject: null,\r\n parts: [],\r\n plugin: {},\r\n angle: 0,\r\n vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),\r\n position: { x: 0, y: 0 },\r\n force: { x: 0, y: 0 },\r\n torque: 0,\r\n positionImpulse: { x: 0, y: 0 },\r\n previousPositionImpulse: { x: 0, y: 0 },\r\n constraintImpulse: { x: 0, y: 0, angle: 0 },\r\n totalContacts: 0,\r\n speed: 0,\r\n angularSpeed: 0,\r\n velocity: { x: 0, y: 0 },\r\n angularVelocity: 0,\r\n isSensor: false,\r\n isStatic: false,\r\n isSleeping: false,\r\n ignoreGravity: false,\r\n ignorePointer: false,\r\n motion: 0,\r\n sleepThreshold: 60,\r\n density: 0.001,\r\n restitution: 0,\r\n friction: 0.1,\r\n frictionStatic: 0.5,\r\n frictionAir: 0.01,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n },\r\n slop: 0.05,\r\n timeScale: 1,\r\n render: {\r\n visible: true,\r\n opacity: 1,\r\n sprite: {\r\n xScale: 1,\r\n yScale: 1,\r\n xOffset: 0,\r\n yOffset: 0\r\n },\r\n lineWidth: 0\r\n },\r\n\r\n events: null,\r\n bounds: null,\r\n chamfer: null,\r\n circleRadius: 0,\r\n positionPrev: null,\r\n anglePrev: 0,\r\n parent: null,\r\n\r\n axes: null,\r\n area: 0,\r\n mass: 0,\r\n inertia: 0,\r\n\r\n _original: null\r\n };\r\n\r\n var body = Common.extend(defaults, options);\r\n\r\n _initProperties(body, options);\r\n\r\n return body;\r\n };\r\n\r\n /**\r\n * Returns the next unique group index for which bodies will collide.\r\n * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.\r\n * See `body.collisionFilter` for more information.\r\n * @method nextGroup\r\n * @param {bool} [isNonColliding=false]\r\n * @return {Number} Unique group index\r\n */\r\n Body.nextGroup = function(isNonColliding) {\r\n if (isNonColliding)\r\n return Body._nextNonCollidingGroupId--;\r\n\r\n return Body._nextCollidingGroupId++;\r\n };\r\n\r\n /**\r\n * Returns the next unique category bitfield (starting after the initial default category `0x0001`).\r\n * There are 32 available. See `body.collisionFilter` for more information.\r\n * @method nextCategory\r\n * @return {Number} Unique category bitfield\r\n */\r\n Body.nextCategory = function() {\r\n Body._nextCategory = Body._nextCategory << 1;\r\n return Body._nextCategory;\r\n };\r\n\r\n /**\r\n * Initialises body properties.\r\n * @method _initProperties\r\n * @private\r\n * @param {body} body\r\n * @param {} [options]\r\n */\r\n var _initProperties = function(body, options) {\r\n options = options || {};\r\n\r\n // init required properties (order is important)\r\n Body.set(body, {\r\n bounds: body.bounds || Bounds.create(body.vertices),\r\n positionPrev: body.positionPrev || Vector.clone(body.position),\r\n anglePrev: body.anglePrev || body.angle,\r\n vertices: body.vertices,\r\n parts: body.parts || [body],\r\n isStatic: body.isStatic,\r\n isSleeping: body.isSleeping,\r\n parent: body.parent || body\r\n });\r\n\r\n Vertices.rotate(body.vertices, body.angle, body.position);\r\n Axes.rotate(body.axes, body.angle);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n\r\n // allow options to override the automatically calculated properties\r\n Body.set(body, {\r\n axes: options.axes || body.axes,\r\n area: options.area || body.area,\r\n mass: options.mass || body.mass,\r\n inertia: options.inertia || body.inertia\r\n });\r\n\r\n // render properties\r\n var defaultFillStyle = (body.isStatic ? '#2e2b44' : Common.choose(['#006BA6', '#0496FF', '#FFBC42', '#D81159', '#8F2D56'])),\r\n defaultStrokeStyle = '#000';\r\n body.render.fillStyle = body.render.fillStyle || defaultFillStyle;\r\n body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle;\r\n body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x);\r\n body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y);\r\n };\r\n\r\n /**\r\n * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist.\r\n * Prefer to use the actual setter functions in performance critical situations.\r\n * @method set\r\n * @param {body} body\r\n * @param {} settings A property name (or map of properties and values) to set on the body.\r\n * @param {} value The value to set if `settings` is a single property name.\r\n */\r\n Body.set = function(body, settings, value) {\r\n var property;\r\n\r\n if (typeof settings === 'string') {\r\n property = settings;\r\n settings = {};\r\n settings[property] = value;\r\n }\r\n\r\n for (property in settings) {\r\n\r\n if (!settings.hasOwnProperty(property))\r\n continue;\r\n\r\n value = settings[property];\r\n switch (property) {\r\n\r\n case 'isStatic':\r\n Body.setStatic(body, value);\r\n break;\r\n case 'isSleeping':\r\n Sleeping.set(body, value);\r\n break;\r\n case 'mass':\r\n Body.setMass(body, value);\r\n break;\r\n case 'density':\r\n Body.setDensity(body, value);\r\n break;\r\n case 'inertia':\r\n Body.setInertia(body, value);\r\n break;\r\n case 'vertices':\r\n Body.setVertices(body, value);\r\n break;\r\n case 'position':\r\n Body.setPosition(body, value);\r\n break;\r\n case 'angle':\r\n Body.setAngle(body, value);\r\n break;\r\n case 'velocity':\r\n Body.setVelocity(body, value);\r\n break;\r\n case 'angularVelocity':\r\n Body.setAngularVelocity(body, value);\r\n break;\r\n case 'parts':\r\n Body.setParts(body, value);\r\n break;\r\n default:\r\n body[property] = value;\r\n\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity.\r\n * @method setStatic\r\n * @param {body} body\r\n * @param {bool} isStatic\r\n */\r\n Body.setStatic = function(body, isStatic) {\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.isStatic = isStatic;\r\n\r\n if (isStatic) {\r\n part._original = {\r\n restitution: part.restitution,\r\n friction: part.friction,\r\n mass: part.mass,\r\n inertia: part.inertia,\r\n density: part.density,\r\n inverseMass: part.inverseMass,\r\n inverseInertia: part.inverseInertia\r\n };\r\n\r\n part.restitution = 0;\r\n part.friction = 1;\r\n part.mass = part.inertia = part.density = Infinity;\r\n part.inverseMass = part.inverseInertia = 0;\r\n\r\n part.positionPrev.x = part.position.x;\r\n part.positionPrev.y = part.position.y;\r\n part.anglePrev = part.angle;\r\n part.angularVelocity = 0;\r\n part.speed = 0;\r\n part.angularSpeed = 0;\r\n part.motion = 0;\r\n } else if (part._original) {\r\n part.restitution = part._original.restitution;\r\n part.friction = part._original.friction;\r\n part.mass = part._original.mass;\r\n part.inertia = part._original.inertia;\r\n part.density = part._original.density;\r\n part.inverseMass = part._original.inverseMass;\r\n part.inverseInertia = part._original.inverseInertia;\r\n\r\n part._original = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the mass of the body. Inverse mass, density and inertia are automatically updated to reflect the change.\r\n * @method setMass\r\n * @param {body} body\r\n * @param {number} mass\r\n */\r\n Body.setMass = function(body, mass) {\r\n var moment = body.inertia / (body.mass / 6);\r\n body.inertia = moment * (mass / 6);\r\n body.inverseInertia = 1 / body.inertia;\r\n\r\n body.mass = mass;\r\n body.inverseMass = 1 / body.mass;\r\n body.density = body.mass / body.area;\r\n };\r\n\r\n /**\r\n * Sets the density of the body. Mass and inertia are automatically updated to reflect the change.\r\n * @method setDensity\r\n * @param {body} body\r\n * @param {number} density\r\n */\r\n Body.setDensity = function(body, density) {\r\n Body.setMass(body, density * body.area);\r\n body.density = density;\r\n };\r\n\r\n /**\r\n * Sets the moment of inertia (i.e. second moment of area) of the body of the body. \r\n * Inverse inertia is automatically updated to reflect the change. Mass is not changed.\r\n * @method setInertia\r\n * @param {body} body\r\n * @param {number} inertia\r\n */\r\n Body.setInertia = function(body, inertia) {\r\n body.inertia = inertia;\r\n body.inverseInertia = 1 / body.inertia;\r\n };\r\n\r\n /**\r\n * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`).\r\n * Vertices will be automatically transformed to be orientated around their centre of mass as the origin.\r\n * They are then automatically translated to world space based on `body.position`.\r\n *\r\n * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array).\r\n * Vertices must form a convex hull, concave hulls are not supported.\r\n *\r\n * @method setVertices\r\n * @param {body} body\r\n * @param {vector[]} vertices\r\n */\r\n Body.setVertices = function(body, vertices) {\r\n // change vertices\r\n if (vertices[0].body === body) {\r\n body.vertices = vertices;\r\n } else {\r\n body.vertices = Vertices.create(vertices, body);\r\n }\r\n\r\n // update properties\r\n body.axes = Axes.fromVertices(body.vertices);\r\n body.area = Vertices.area(body.vertices);\r\n Body.setMass(body, body.density * body.area);\r\n\r\n // orient vertices around the centre of mass at origin (0, 0)\r\n var centre = Vertices.centre(body.vertices);\r\n Vertices.translate(body.vertices, centre, -1);\r\n\r\n // update inertia while vertices are at origin (0, 0)\r\n Body.setInertia(body, Body._inertiaScale * Vertices.inertia(body.vertices, body.mass));\r\n\r\n // update geometry\r\n Vertices.translate(body.vertices, body.position);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the parts of the `body` and updates mass, inertia and centroid.\r\n * Each part will have its parent set to `body`.\r\n * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.`\r\n * Note that this method will ensure that the first part in `body.parts` will always be the `body`.\r\n * @method setParts\r\n * @param {body} body\r\n * @param [body] parts\r\n * @param {bool} [autoHull=true]\r\n */\r\n Body.setParts = function(body, parts, autoHull) {\r\n var i;\r\n\r\n // add all the parts, ensuring that the first part is always the parent body\r\n parts = parts.slice(0);\r\n body.parts.length = 0;\r\n body.parts.push(body);\r\n body.parent = body;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var part = parts[i];\r\n if (part !== body) {\r\n part.parent = body;\r\n body.parts.push(part);\r\n }\r\n }\r\n\r\n if (body.parts.length === 1)\r\n return;\r\n\r\n autoHull = typeof autoHull !== 'undefined' ? autoHull : true;\r\n\r\n // find the convex hull of all parts to set on the parent body\r\n if (autoHull) {\r\n var vertices = [];\r\n for (i = 0; i < parts.length; i++) {\r\n vertices = vertices.concat(parts[i].vertices);\r\n }\r\n\r\n Vertices.clockwiseSort(vertices);\r\n\r\n var hull = Vertices.hull(vertices),\r\n hullCentre = Vertices.centre(hull);\r\n\r\n Body.setVertices(body, hull);\r\n Vertices.translate(body.vertices, hullCentre);\r\n }\r\n\r\n // sum the properties of all compound parts of the parent body\r\n var total = Body._totalProperties(body);\r\n\r\n body.area = total.area;\r\n body.parent = body;\r\n body.position.x = total.centre.x;\r\n body.position.y = total.centre.y;\r\n body.positionPrev.x = total.centre.x;\r\n body.positionPrev.y = total.centre.y;\r\n\r\n Body.setMass(body, total.mass);\r\n Body.setInertia(body, total.inertia);\r\n Body.setPosition(body, total.centre);\r\n };\r\n\r\n /**\r\n * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged.\r\n * @method setPosition\r\n * @param {body} body\r\n * @param {vector} position\r\n */\r\n Body.setPosition = function(body, position) {\r\n var delta = Vector.sub(position, body.position);\r\n body.positionPrev.x += delta.x;\r\n body.positionPrev.y += delta.y;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.position.x += delta.x;\r\n part.position.y += delta.y;\r\n Vertices.translate(part.vertices, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged.\r\n * @method setAngle\r\n * @param {body} body\r\n * @param {number} angle\r\n */\r\n Body.setAngle = function(body, angle) {\r\n var delta = angle - body.angle;\r\n body.anglePrev += delta;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.angle += delta;\r\n Vertices.rotate(part.vertices, delta, body.position);\r\n Axes.rotate(part.axes, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, delta, body.position, part.position);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setVelocity\r\n * @param {body} body\r\n * @param {vector} velocity\r\n */\r\n Body.setVelocity = function(body, velocity) {\r\n body.positionPrev.x = body.position.x - velocity.x;\r\n body.positionPrev.y = body.position.y - velocity.y;\r\n body.velocity.x = velocity.x;\r\n body.velocity.y = velocity.y;\r\n body.speed = Vector.magnitude(body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setAngularVelocity\r\n * @param {body} body\r\n * @param {number} velocity\r\n */\r\n Body.setAngularVelocity = function(body, velocity) {\r\n body.anglePrev = body.angle - velocity;\r\n body.angularVelocity = velocity;\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n };\r\n\r\n /**\r\n * Moves a body by a given vector relative to its current position, without imparting any velocity.\r\n * @method translate\r\n * @param {body} body\r\n * @param {vector} translation\r\n */\r\n Body.translate = function(body, translation) {\r\n Body.setPosition(body, Vector.add(body.position, translation));\r\n };\r\n\r\n /**\r\n * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {body} body\r\n * @param {number} rotation\r\n * @param {vector} [point]\r\n */\r\n Body.rotate = function(body, rotation, point) {\r\n if (!point) {\r\n Body.setAngle(body, body.angle + rotation);\r\n } else {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.setAngle(body, body.angle + rotation);\r\n }\r\n };\r\n\r\n /**\r\n * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre).\r\n * @method scale\r\n * @param {body} body\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} [point]\r\n */\r\n Body.scale = function(body, scaleX, scaleY, point) {\r\n var totalArea = 0,\r\n totalInertia = 0;\r\n\r\n point = point || body.position;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n // scale vertices\r\n Vertices.scale(part.vertices, scaleX, scaleY, point);\r\n\r\n // update properties\r\n part.axes = Axes.fromVertices(part.vertices);\r\n part.area = Vertices.area(part.vertices);\r\n Body.setMass(part, body.density * part.area);\r\n\r\n // update inertia (requires vertices to be at origin)\r\n Vertices.translate(part.vertices, { x: -part.position.x, y: -part.position.y });\r\n Body.setInertia(part, Body._inertiaScale * Vertices.inertia(part.vertices, part.mass));\r\n Vertices.translate(part.vertices, { x: part.position.x, y: part.position.y });\r\n\r\n if (i > 0) {\r\n totalArea += part.area;\r\n totalInertia += part.inertia;\r\n }\r\n\r\n // scale position\r\n part.position.x = point.x + (part.position.x - point.x) * scaleX;\r\n part.position.y = point.y + (part.position.y - point.y) * scaleY;\r\n\r\n // update bounds\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // handle parent body\r\n if (body.parts.length > 1) {\r\n body.area = totalArea;\r\n\r\n if (!body.isStatic) {\r\n Body.setMass(body, body.density * totalArea);\r\n Body.setInertia(body, totalInertia);\r\n }\r\n }\r\n\r\n // handle circles\r\n if (body.circleRadius) { \r\n if (scaleX === scaleY) {\r\n body.circleRadius *= scaleX;\r\n } else {\r\n // body is no longer a circle\r\n body.circleRadius = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration.\r\n * @method update\r\n * @param {body} body\r\n * @param {number} deltaTime\r\n * @param {number} timeScale\r\n * @param {number} correction\r\n */\r\n Body.update = function(body, deltaTime, timeScale, correction) {\r\n var deltaTimeSquared = Math.pow(deltaTime * timeScale * body.timeScale, 2);\r\n\r\n // from the previous step\r\n var frictionAir = 1 - body.frictionAir * timeScale * body.timeScale,\r\n velocityPrevX = body.position.x - body.positionPrev.x,\r\n velocityPrevY = body.position.y - body.positionPrev.y;\r\n\r\n // update velocity with Verlet integration\r\n body.velocity.x = (velocityPrevX * frictionAir * correction) + (body.force.x / body.mass) * deltaTimeSquared;\r\n body.velocity.y = (velocityPrevY * frictionAir * correction) + (body.force.y / body.mass) * deltaTimeSquared;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n body.position.x += body.velocity.x;\r\n body.position.y += body.velocity.y;\r\n\r\n // update angular velocity with Verlet integration\r\n body.angularVelocity = ((body.angle - body.anglePrev) * frictionAir * correction) + (body.torque / body.inertia) * deltaTimeSquared;\r\n body.anglePrev = body.angle;\r\n body.angle += body.angularVelocity;\r\n\r\n // track speed and acceleration\r\n body.speed = Vector.magnitude(body.velocity);\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n\r\n // transform the body geometry\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n Vertices.translate(part.vertices, body.velocity);\r\n \r\n if (i > 0) {\r\n part.position.x += body.velocity.x;\r\n part.position.y += body.velocity.y;\r\n }\r\n\r\n if (body.angularVelocity !== 0) {\r\n Vertices.rotate(part.vertices, body.angularVelocity, body.position);\r\n Axes.rotate(part.axes, body.angularVelocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, body.angularVelocity, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n * @method applyForce\r\n * @param {body} body\r\n * @param {vector} position\r\n * @param {vector} force\r\n */\r\n Body.applyForce = function(body, position, force) {\r\n body.force.x += force.x;\r\n body.force.y += force.y;\r\n var offset = { x: position.x - body.position.x, y: position.y - body.position.y };\r\n body.torque += offset.x * force.y - offset.y * force.x;\r\n };\r\n\r\n /**\r\n * Returns the sums of the properties of all compound parts of the parent body.\r\n * @method _totalProperties\r\n * @private\r\n * @param {body} body\r\n * @return {}\r\n */\r\n Body._totalProperties = function(body) {\r\n // from equations at:\r\n // https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory\r\n // http://output.to/sideway/default.asp?qno=121100087\r\n\r\n var properties = {\r\n mass: 0,\r\n area: 0,\r\n inertia: 0,\r\n centre: { x: 0, y: 0 }\r\n };\r\n\r\n // sum the properties of all compound parts of the parent body\r\n for (var i = body.parts.length === 1 ? 0 : 1; i < body.parts.length; i++) {\r\n var part = body.parts[i],\r\n mass = part.mass !== Infinity ? part.mass : 1;\r\n\r\n properties.mass += mass;\r\n properties.area += part.area;\r\n properties.inertia += part.inertia;\r\n properties.centre = Vector.add(properties.centre, Vector.mult(part.position, mass));\r\n }\r\n\r\n properties.centre = Vector.div(properties.centre, properties.mass);\r\n\r\n return properties;\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a body starts sleeping (where `this` is the body).\r\n *\r\n * @event sleepStart\r\n * @this {body} The body that has started sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a body ends sleeping (where `this` is the body).\r\n *\r\n * @event sleepEnd\r\n * @this {body} The body that has ended sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"body\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Body\"\r\n */\r\n\r\n /**\r\n * An array of bodies that make up this body. \r\n * The first body in the array must always be a self reference to the current body instance.\r\n * All bodies in the `parts` array together form a single rigid compound body.\r\n * Parts are allowed to overlap, have gaps or holes or even form concave bodies.\r\n * Parts themselves should never be added to a `World`, only the parent body should be.\r\n * Use `Body.setParts` when setting parts to ensure correct updates of all properties.\r\n *\r\n * @property parts\r\n * @type body[]\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n /**\r\n * A self reference if the body is _not_ a part of another body.\r\n * Otherwise this is a reference to the body that this is a part of.\r\n * See `body.parts`.\r\n *\r\n * @property parent\r\n * @type body\r\n */\r\n\r\n /**\r\n * A `Number` specifying the angle of the body, in radians.\r\n *\r\n * @property angle\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An array of `Vector` objects that specify the convex hull of the rigid body.\r\n * These should be provided about the origin `(0, 0)`. E.g.\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation).\r\n * The `Vector` objects are also augmented with additional properties required for efficient collision detection. \r\n *\r\n * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`).\r\n * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices.\r\n *\r\n * @property vertices\r\n * @type vector[]\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the current world-space position of the body.\r\n *\r\n * @property position\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`.\r\n *\r\n * @property force\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`.\r\n *\r\n * @property torque\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`).\r\n *\r\n * @readOnly\r\n * @property speed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`).\r\n *\r\n * @readOnly\r\n * @property angularSpeed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property velocity\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property angularVelocity\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.\r\n * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag.\r\n *\r\n * @property isStatic\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.\r\n *\r\n * @property isSensor\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken.\r\n * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag.\r\n *\r\n * @property isSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive.\r\n * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest.\r\n *\r\n * @readOnly\r\n * @property motion\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).\r\n *\r\n * @property sleepThreshold\r\n * @type number\r\n * @default 60\r\n */\r\n\r\n /**\r\n * A `Number` that defines the density of the body, that is its mass per unit area.\r\n * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object.\r\n * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood).\r\n *\r\n * @property density\r\n * @type number\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead.\r\n * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`).\r\n *\r\n * @property mass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse mass of the body (`1 / mass`).\r\n * If you modify this value, you must also modify the `body.mass` property.\r\n *\r\n * @property inverseMass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`.\r\n * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`).\r\n *\r\n * @property inertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`).\r\n * If you modify this value, you must also modify the `body.inertia` property.\r\n *\r\n * @property inverseInertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. \r\n * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy.\r\n * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula:\r\n *\r\n * Math.max(bodyA.restitution, bodyB.restitution)\r\n *\r\n * @property restitution\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means that the body may slide indefinitely.\r\n * A value of `1` means the body may come to a stop almost instantly after a force is applied.\r\n *\r\n * The effects of the value may be non-linear. \r\n * High values may be unstable depending on the body.\r\n * The engine uses a Coulomb friction model including static and kinetic friction.\r\n * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula:\r\n *\r\n * Math.min(bodyA.friction, bodyB.friction)\r\n *\r\n * @property friction\r\n * @type number\r\n * @default 0.1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the static friction of the body (in the Coulomb friction model). \r\n * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.\r\n * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.\r\n * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.\r\n *\r\n * @property frictionStatic\r\n * @type number\r\n * @default 0.5\r\n */\r\n\r\n /**\r\n * A `Number` that defines the air friction of the body (air resistance). \r\n * A value of `0` means the body will never slow as it moves through space.\r\n * The higher the value, the faster a body slows when moving through space.\r\n * The effects of the value are non-linear. \r\n *\r\n * @property frictionAir\r\n * @type number\r\n * @default 0.01\r\n */\r\n\r\n /**\r\n * An `Object` that specifies the collision filtering properties of this body.\r\n *\r\n * Collisions between two bodies will obey the following rules:\r\n * - If the two bodies have the same non-zero value of `collisionFilter.group`,\r\n * they will always collide if the value is positive, and they will never collide\r\n * if the value is negative.\r\n * - If the two bodies have different values of `collisionFilter.group` or if one\r\n * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:\r\n *\r\n * Each body belongs to a collision category, given by `collisionFilter.category`. This\r\n * value is used as a bit field and the category should have only one bit set, meaning that\r\n * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32\r\n * different collision categories available.\r\n *\r\n * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies\r\n * the categories it collides with (the value is the bitwise AND value of all these categories).\r\n *\r\n * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's\r\n * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`\r\n * are both true.\r\n *\r\n * @property collisionFilter\r\n * @type object\r\n */\r\n\r\n /**\r\n * An Integer `Number`, that specifies the collision group this body belongs to.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.group\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A bit field that specifies the collision category this body belongs to.\r\n * The category value should have only one bit set, for example `0x0001`.\r\n * This means there are up to 32 unique collision categories available.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.category\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A bit mask that specifies the collision categories this body may collide with.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.mask\r\n * @type object\r\n * @default -1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies.\r\n * Avoid changing this value unless you understand the purpose of `slop` in physics engines.\r\n * The default should generally suffice, although very large bodies may require larger values for stable stacking.\r\n *\r\n * @property slop\r\n * @type number\r\n * @default 0.05\r\n */\r\n\r\n /**\r\n * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.\r\n *\r\n * @property timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the body should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * Sets the opacity to use when rendering.\r\n *\r\n * @property render.opacity\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the sprite properties to use when rendering, if any.\r\n *\r\n * @property render.sprite\r\n * @type object\r\n */\r\n\r\n /**\r\n * An `String` that defines the path to the image to use as the sprite texture, if any.\r\n *\r\n * @property render.sprite.texture\r\n * @type string\r\n */\r\n \r\n /**\r\n * A `Number` that defines the scaling in the x-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.xScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the scaling in the y-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.yScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width).\r\n *\r\n * @property render.sprite.xOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the y-axis for the sprite (normalised by texture height).\r\n *\r\n * @property render.sprite.yOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined).\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.fillStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * An array of unique axis vectors (edge normals) used for collision detection.\r\n * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`.\r\n * They are constantly updated by `Body.update` during the simulation.\r\n *\r\n * @property axes\r\n * @type vector[]\r\n */\r\n \r\n /**\r\n * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`.\r\n *\r\n * @property area\r\n * @type string\r\n * @default \r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the AABB region for the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Body.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composite\r\n*/\r\n\r\nvar Composite = {};\r\n\r\nmodule.exports = Composite;\r\n\r\nvar Events = __webpack_require__(/*! ../core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properites section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} [options]\r\n * @return {composite} A new composite\r\n */\r\n Composite.create = function(options) {\r\n return Common.extend({ \r\n id: Common.nextId(),\r\n type: 'composite',\r\n parent: null,\r\n isModified: false,\r\n bodies: [], \r\n constraints: [], \r\n composites: [],\r\n label: 'Composite',\r\n plugin: {}\r\n }, options);\r\n };\r\n\r\n /**\r\n * Sets the composite's `isModified` flag. \r\n * If `updateParents` is true, all parents will be set (default: false).\r\n * If `updateChildren` is true, all children will be set (default: false).\r\n * @method setModified\r\n * @param {composite} composite\r\n * @param {boolean} isModified\r\n * @param {boolean} [updateParents=false]\r\n * @param {boolean} [updateChildren=false]\r\n */\r\n Composite.setModified = function(composite, isModified, updateParents, updateChildren) {\r\n composite.isModified = isModified;\r\n\r\n if (updateParents && composite.parent) {\r\n Composite.setModified(composite.parent, isModified, updateParents, updateChildren);\r\n }\r\n\r\n if (updateChildren) {\r\n for(var i = 0; i < composite.composites.length; i++) {\r\n var childComposite = composite.composites[i];\r\n Composite.setModified(childComposite, isModified, updateParents, updateChildren);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Triggers `beforeAdd` and `afterAdd` events on the `composite`.\r\n * @method add\r\n * @param {composite} composite\r\n * @param {} object\r\n * @return {composite} The original composite with the objects added\r\n */\r\n Composite.add = function(composite, object) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeAdd', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n // skip adding compound parts\r\n if (obj.parent !== obj) {\r\n Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)');\r\n break;\r\n }\r\n\r\n Composite.addBody(composite, obj);\r\n break;\r\n case 'constraint':\r\n Composite.addConstraint(composite, obj);\r\n break;\r\n case 'composite':\r\n Composite.addComposite(composite, obj);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.addConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterAdd', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Optionally searching its children recursively.\r\n * Triggers `beforeRemove` and `afterRemove` events on the `composite`.\r\n * @method remove\r\n * @param {composite} composite\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the objects removed\r\n */\r\n Composite.remove = function(composite, object, deep) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeRemove', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n Composite.removeBody(composite, obj, deep);\r\n break;\r\n case 'constraint':\r\n Composite.removeConstraint(composite, obj, deep);\r\n break;\r\n case 'composite':\r\n Composite.removeComposite(composite, obj, deep);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.removeConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterRemove', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a composite to the given composite.\r\n * @private\r\n * @method addComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @return {composite} The original compositeA with the objects from compositeB added\r\n */\r\n Composite.addComposite = function(compositeA, compositeB) {\r\n compositeA.composites.push(compositeB);\r\n compositeB.parent = compositeA;\r\n Composite.setModified(compositeA, true, true, false);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original compositeA with the composite removed\r\n */\r\n Composite.removeComposite = function(compositeA, compositeB, deep) {\r\n var position = compositeA.composites.indexOf(compositeB);\r\n if (position !== -1) {\r\n Composite.removeCompositeAt(compositeA, position);\r\n Composite.setModified(compositeA, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < compositeA.composites.length; i++){\r\n Composite.removeComposite(compositeA.composites[i], compositeB, true);\r\n }\r\n }\r\n\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite.\r\n * @private\r\n * @method removeCompositeAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the composite removed\r\n */\r\n Composite.removeCompositeAt = function(composite, position) {\r\n composite.composites.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a body to the given composite.\r\n * @private\r\n * @method addBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @return {composite} The original composite with the body added\r\n */\r\n Composite.addBody = function(composite, body) {\r\n composite.bodies.push(body);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBody = function(composite, body, deep) {\r\n var position = composite.bodies.indexOf(body);\r\n if (position !== -1) {\r\n Composite.removeBodyAt(composite, position);\r\n Composite.setModified(composite, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeBody(composite.composites[i], body, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeBodyAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBodyAt = function(composite, position) {\r\n composite.bodies.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a constraint to the given composite.\r\n * @private\r\n * @method addConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @return {composite} The original composite with the constraint added\r\n */\r\n Composite.addConstraint = function(composite, constraint) {\r\n composite.constraints.push(constraint);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a constraint from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraint = function(composite, constraint, deep) {\r\n var position = composite.constraints.indexOf(constraint);\r\n if (position !== -1) {\r\n Composite.removeConstraintAt(composite, position);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeConstraint(composite.composites[i], constraint, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeConstraintAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraintAt = function(composite, position) {\r\n composite.constraints.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes all bodies, constraints and composites from the given composite.\r\n * Optionally clearing its children recursively.\r\n * @method clear\r\n * @param {composite} composite\r\n * @param {boolean} keepStatic\r\n * @param {boolean} [deep=false]\r\n */\r\n Composite.clear = function(composite, keepStatic, deep) {\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.clear(composite.composites[i], keepStatic, true);\r\n }\r\n }\r\n \r\n if (keepStatic) {\r\n composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; });\r\n } else {\r\n composite.bodies.length = 0;\r\n }\r\n\r\n composite.constraints.length = 0;\r\n composite.composites.length = 0;\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns all bodies in the given composite, including all bodies in its children, recursively.\r\n * @method allBodies\r\n * @param {composite} composite\r\n * @return {body[]} All the bodies\r\n */\r\n Composite.allBodies = function(composite) {\r\n var bodies = [].concat(composite.bodies);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n bodies = bodies.concat(Composite.allBodies(composite.composites[i]));\r\n\r\n return bodies;\r\n };\r\n\r\n /**\r\n * Returns all constraints in the given composite, including all constraints in its children, recursively.\r\n * @method allConstraints\r\n * @param {composite} composite\r\n * @return {constraint[]} All the constraints\r\n */\r\n Composite.allConstraints = function(composite) {\r\n var constraints = [].concat(composite.constraints);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n constraints = constraints.concat(Composite.allConstraints(composite.composites[i]));\r\n\r\n return constraints;\r\n };\r\n\r\n /**\r\n * Returns all composites in the given composite, including all composites in its children, recursively.\r\n * @method allComposites\r\n * @param {composite} composite\r\n * @return {composite[]} All the composites\r\n */\r\n Composite.allComposites = function(composite) {\r\n var composites = [].concat(composite.composites);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n composites = composites.concat(Composite.allComposites(composite.composites[i]));\r\n\r\n return composites;\r\n };\r\n\r\n /**\r\n * Searches the composite recursively for an object matching the type and id supplied, null if not found.\r\n * @method get\r\n * @param {composite} composite\r\n * @param {number} id\r\n * @param {string} type\r\n * @return {object} The requested object, if found\r\n */\r\n Composite.get = function(composite, id, type) {\r\n var objects,\r\n object;\r\n\r\n switch (type) {\r\n case 'body':\r\n objects = Composite.allBodies(composite);\r\n break;\r\n case 'constraint':\r\n objects = Composite.allConstraints(composite);\r\n break;\r\n case 'composite':\r\n objects = Composite.allComposites(composite).concat(composite);\r\n break;\r\n }\r\n\r\n if (!objects)\r\n return null;\r\n\r\n object = objects.filter(function(object) { \r\n return object.id.toString() === id.toString(); \r\n });\r\n\r\n return object.length === 0 ? null : object[0];\r\n };\r\n\r\n /**\r\n * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add).\r\n * @method move\r\n * @param {compositeA} compositeA\r\n * @param {object[]} objects\r\n * @param {compositeB} compositeB\r\n * @return {composite} Returns compositeA\r\n */\r\n Composite.move = function(compositeA, objects, compositeB) {\r\n Composite.remove(compositeA, objects);\r\n Composite.add(compositeB, objects);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Assigns new ids for all objects in the composite, recursively.\r\n * @method rebase\r\n * @param {composite} composite\r\n * @return {composite} Returns composite\r\n */\r\n Composite.rebase = function(composite) {\r\n var objects = Composite.allBodies(composite)\r\n .concat(Composite.allConstraints(composite))\r\n .concat(Composite.allComposites(composite));\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n objects[i].id = Common.nextId();\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Translates all children in the composite by a given vector relative to their current positions, \r\n * without imparting any velocity.\r\n * @method translate\r\n * @param {composite} composite\r\n * @param {vector} translation\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.translate = function(composite, translation, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n Body.translate(bodies[i], translation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {composite} composite\r\n * @param {number} rotation\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.rotate = function(composite, rotation, point, recursive) {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.rotate(body, rotation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.\r\n * @method scale\r\n * @param {composite} composite\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.scale = function(composite, scaleX, scaleY, point, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + dx * scaleX,\r\n y: point.y + dy * scaleY\r\n });\r\n\r\n Body.scale(body, scaleX, scaleY);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies.\r\n * @method bounds\r\n * @param {composite} composite The composite.\r\n * @returns {bounds} The composite bounds.\r\n */\r\n Composite.bounds = function(composite) {\r\n var bodies = Composite.allBodies(composite),\r\n vertices = [];\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Bounds.create(vertices);\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, before objects have been added.\r\n *\r\n * @event beforeAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, after objects have been added.\r\n *\r\n * @event afterAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, before objects have been removed.\r\n *\r\n * @event beforeRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, after objects have been removed.\r\n *\r\n * @event afterRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"composite\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage composites.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Composite\"\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the composite has been modified during the current step.\r\n * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled.\r\n * If you need to change it manually, you should use the `Composite.setModified` method.\r\n *\r\n * @property isModified\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods.\r\n *\r\n * @property parent\r\n * @type composite\r\n * @default null\r\n */\r\n\r\n /**\r\n * An array of `Body` that are _direct_ children of this composite.\r\n * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method.\r\n *\r\n * @property bodies\r\n * @type body[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Constraint` that are _direct_ children of this composite.\r\n * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method.\r\n *\r\n * @property constraints\r\n * @type constraint[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Composite` that are _direct_ children of this composite.\r\n * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method.\r\n *\r\n * @property composites\r\n * @type composite[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/World.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n* A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n* There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class World\r\n* @extends Composite\r\n*/\r\n\r\nvar World = {};\r\n\r\nmodule.exports = World;\r\n\r\nvar Composite = __webpack_require__(/*! ./Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new world composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @constructor\r\n * @param {} options\r\n * @return {world} A new world\r\n */\r\n World.create = function(options) {\r\n var composite = Composite.create();\r\n\r\n var defaults = {\r\n label: \'World\',\r\n gravity: {\r\n x: 0,\r\n y: 1,\r\n scale: 0.001\r\n },\r\n bounds: { \r\n min: { x: -Infinity, y: -Infinity }, \r\n max: { x: Infinity, y: Infinity } \r\n }\r\n };\r\n \r\n return Common.extend(composite, defaults, options);\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * The gravity to apply on the world.\r\n *\r\n * @property gravity\r\n * @type object\r\n */\r\n\r\n /**\r\n * The gravity x component.\r\n *\r\n * @property gravity.x\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * The gravity y component.\r\n *\r\n * @property gravity.y\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * The gravity scale factor.\r\n *\r\n * @property gravity.scale\r\n * @type object\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the world bounds for collision detection.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n * @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }\r\n */\r\n\r\n // World is a Composite body\r\n // see src/module/Outro.js for these aliases:\r\n \r\n /**\r\n * An alias for Composite.add\r\n * @method add\r\n * @param {world} world\r\n * @param {} object\r\n * @return {composite} The original world with the objects added\r\n */\r\n\r\n /**\r\n * An alias for Composite.remove\r\n * @method remove\r\n * @param {world} world\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original world with the objects removed\r\n */\r\n\r\n /**\r\n * An alias for Composite.clear\r\n * @method clear\r\n * @param {world} world\r\n * @param {boolean} keepStatic\r\n */\r\n\r\n /**\r\n * An alias for Composite.addComposite\r\n * @method addComposite\r\n * @param {world} world\r\n * @param {composite} composite\r\n * @return {world} The original world with the objects from composite added\r\n */\r\n \r\n /**\r\n * An alias for Composite.addBody\r\n * @method addBody\r\n * @param {world} world\r\n * @param {body} body\r\n * @return {world} The original world with the body added\r\n */\r\n\r\n /**\r\n * An alias for Composite.addConstraint\r\n * @method addConstraint\r\n * @param {world} world\r\n * @param {constraint} constraint\r\n * @return {world} The original world with the constraint added\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/World.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs.\r\n*\r\n* @class Detector\r\n*/\r\n\r\n// TODO: speculative contacts\r\n\r\nvar Detector = {};\r\n\r\nmodule.exports = Detector;\r\n\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Finds all collisions given a list of pairs.\r\n * @method collisions\r\n * @param {pair[]} broadphasePairs\r\n * @param {engine} engine\r\n * @return {array} collisions\r\n */\r\n Detector.collisions = function(broadphasePairs, engine) {\r\n var collisions = [],\r\n pairsTable = engine.pairs.table;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n // @endif\r\n \r\n for (var i = 0; i < broadphasePairs.length; i++) {\r\n var bodyA = broadphasePairs[i][0], \r\n bodyB = broadphasePairs[i][1];\r\n\r\n if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping))\r\n continue;\r\n \r\n if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter))\r\n continue;\r\n\r\n // @if DEBUG\r\n metrics.midphaseTests += 1;\r\n // @endif\r\n\r\n // mid phase\r\n if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) {\r\n for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) {\r\n var partA = bodyA.parts[j];\r\n\r\n for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) {\r\n var partB = bodyB.parts[k];\r\n\r\n if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n // find a previous collision we could reuse\r\n var pairId = Pair.id(partA, partB),\r\n pair = pairsTable[pairId],\r\n previousCollision;\r\n\r\n if (pair && pair.isActive) {\r\n previousCollision = pair.collision;\r\n } else {\r\n previousCollision = null;\r\n }\r\n\r\n // narrow phase\r\n var collision = SAT.collides(partA, partB, previousCollision);\r\n\r\n // @if DEBUG\r\n metrics.narrowphaseTests += 1;\r\n if (collision.reused)\r\n metrics.narrowReuseCount += 1;\r\n // @endif\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n // @if DEBUG\r\n metrics.narrowDetections += 1;\r\n // @endif\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns `true` if both supplied collision filters will allow a collision to occur.\r\n * See `body.collisionFilter` for more information.\r\n * @method canCollide\r\n * @param {} filterA\r\n * @param {} filterB\r\n * @return {bool} `true` if collision can occur\r\n */\r\n Detector.canCollide = function(filterA, filterB) {\r\n if (filterA.group === filterB.group && filterA.group !== 0)\r\n return filterA.group > 0;\r\n\r\n return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures.\r\n*\r\n* @class Grid\r\n*/\r\n\r\nvar Grid = {};\r\n\r\nmodule.exports = Grid;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js\");\r\nvar Detector = __webpack_require__(/*! ./Detector */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new grid.\r\n * @method create\r\n * @param {} options\r\n * @return {grid} A new grid\r\n */\r\n Grid.create = function(options) {\r\n var defaults = {\r\n controller: Grid,\r\n detector: Detector.collisions,\r\n buckets: {},\r\n pairs: {},\r\n pairsList: [],\r\n bucketWidth: 48,\r\n bucketHeight: 48\r\n };\r\n\r\n return Common.extend(defaults, options);\r\n };\r\n\r\n /**\r\n * The width of a single grid bucket.\r\n *\r\n * @property bucketWidth\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * The height of a single grid bucket.\r\n *\r\n * @property bucketHeight\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * Updates the grid.\r\n * @method update\r\n * @param {grid} grid\r\n * @param {body[]} bodies\r\n * @param {engine} engine\r\n * @param {boolean} forceUpdate\r\n */\r\n Grid.update = function(grid, bodies, engine, forceUpdate) {\r\n var i, col, row,\r\n world = engine.world,\r\n buckets = grid.buckets,\r\n bucket,\r\n bucketId,\r\n gridChanged = false;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n metrics.broadphaseTests = 0;\r\n // @endif\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isSleeping && !forceUpdate)\r\n continue;\r\n\r\n // don't update out of world bodies\r\n if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x\r\n || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y)\r\n continue;\r\n\r\n var newRegion = Grid._getRegion(grid, body);\r\n\r\n // if the body has changed grid region\r\n if (!body.region || newRegion.id !== body.region.id || forceUpdate) {\r\n\r\n // @if DEBUG\r\n metrics.broadphaseTests += 1;\r\n // @endif\r\n\r\n if (!body.region || forceUpdate)\r\n body.region = newRegion;\r\n\r\n var union = Grid._regionUnion(newRegion, body.region);\r\n\r\n // update grid buckets affected by region change\r\n // iterate over the union of both regions\r\n for (col = union.startCol; col <= union.endCol; col++) {\r\n for (row = union.startRow; row <= union.endRow; row++) {\r\n bucketId = Grid._getBucketId(col, row);\r\n bucket = buckets[bucketId];\r\n\r\n var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol\r\n && row >= newRegion.startRow && row <= newRegion.endRow);\r\n\r\n var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol\r\n && row >= body.region.startRow && row <= body.region.endRow);\r\n\r\n // remove from old region buckets\r\n if (!isInsideNewRegion && isInsideOldRegion) {\r\n if (isInsideOldRegion) {\r\n if (bucket)\r\n Grid._bucketRemoveBody(grid, bucket, body);\r\n }\r\n }\r\n\r\n // add to new region buckets\r\n if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) {\r\n if (!bucket)\r\n bucket = Grid._createBucket(buckets, bucketId);\r\n Grid._bucketAddBody(grid, bucket, body);\r\n }\r\n }\r\n }\r\n\r\n // set the new region\r\n body.region = newRegion;\r\n\r\n // flag changes so we can update pairs\r\n gridChanged = true;\r\n }\r\n }\r\n\r\n // update pairs list only if pairs changed (i.e. a body changed region)\r\n if (gridChanged)\r\n grid.pairsList = Grid._createActivePairsList(grid);\r\n };\r\n\r\n /**\r\n * Clears the grid.\r\n * @method clear\r\n * @param {grid} grid\r\n */\r\n Grid.clear = function(grid) {\r\n grid.buckets = {};\r\n grid.pairs = {};\r\n grid.pairsList = [];\r\n };\r\n\r\n /**\r\n * Finds the union of two regions.\r\n * @method _regionUnion\r\n * @private\r\n * @param {} regionA\r\n * @param {} regionB\r\n * @return {} region\r\n */\r\n Grid._regionUnion = function(regionA, regionB) {\r\n var startCol = Math.min(regionA.startCol, regionB.startCol),\r\n endCol = Math.max(regionA.endCol, regionB.endCol),\r\n startRow = Math.min(regionA.startRow, regionB.startRow),\r\n endRow = Math.max(regionA.endRow, regionB.endRow);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Gets the region a given body falls in for a given grid.\r\n * @method _getRegion\r\n * @private\r\n * @param {} grid\r\n * @param {} body\r\n * @return {} region\r\n */\r\n Grid._getRegion = function(grid, body) {\r\n var bounds = body.bounds,\r\n startCol = Math.floor(bounds.min.x / grid.bucketWidth),\r\n endCol = Math.floor(bounds.max.x / grid.bucketWidth),\r\n startRow = Math.floor(bounds.min.y / grid.bucketHeight),\r\n endRow = Math.floor(bounds.max.y / grid.bucketHeight);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Creates a region.\r\n * @method _createRegion\r\n * @private\r\n * @param {} startCol\r\n * @param {} endCol\r\n * @param {} startRow\r\n * @param {} endRow\r\n * @return {} region\r\n */\r\n Grid._createRegion = function(startCol, endCol, startRow, endRow) {\r\n return { \r\n id: startCol + ',' + endCol + ',' + startRow + ',' + endRow,\r\n startCol: startCol, \r\n endCol: endCol, \r\n startRow: startRow, \r\n endRow: endRow \r\n };\r\n };\r\n\r\n /**\r\n * Gets the bucket id at the given position.\r\n * @method _getBucketId\r\n * @private\r\n * @param {} column\r\n * @param {} row\r\n * @return {string} bucket id\r\n */\r\n Grid._getBucketId = function(column, row) {\r\n return 'C' + column + 'R' + row;\r\n };\r\n\r\n /**\r\n * Creates a bucket.\r\n * @method _createBucket\r\n * @private\r\n * @param {} buckets\r\n * @param {} bucketId\r\n * @return {} bucket\r\n */\r\n Grid._createBucket = function(buckets, bucketId) {\r\n var bucket = buckets[bucketId] = [];\r\n return bucket;\r\n };\r\n\r\n /**\r\n * Adds a body to a bucket.\r\n * @method _bucketAddBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketAddBody = function(grid, bucket, body) {\r\n // add new pairs\r\n for (var i = 0; i < bucket.length; i++) {\r\n var bodyB = bucket[i];\r\n\r\n if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic))\r\n continue;\r\n\r\n // keep track of the number of buckets the pair exists in\r\n // important for Grid.update to work\r\n var pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair) {\r\n pair[2] += 1;\r\n } else {\r\n grid.pairs[pairId] = [body, bodyB, 1];\r\n }\r\n }\r\n\r\n // add to bodies (after pairs, otherwise pairs with self)\r\n bucket.push(body);\r\n };\r\n\r\n /**\r\n * Removes a body from a bucket.\r\n * @method _bucketRemoveBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketRemoveBody = function(grid, bucket, body) {\r\n // remove from bucket\r\n bucket.splice(Common.indexOf(bucket, body), 1);\r\n\r\n // update pair counts\r\n for (var i = 0; i < bucket.length; i++) {\r\n // keep track of the number of buckets the pair exists in\r\n // important for _createActivePairsList to work\r\n var bodyB = bucket[i],\r\n pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair)\r\n pair[2] -= 1;\r\n }\r\n };\r\n\r\n /**\r\n * Generates a list of the active pairs in the grid.\r\n * @method _createActivePairsList\r\n * @private\r\n * @param {} grid\r\n * @return [] pairs\r\n */\r\n Grid._createActivePairsList = function(grid) {\r\n var pairKeys,\r\n pair,\r\n pairs = [];\r\n\r\n // grid.pairs is used as a hashmap\r\n pairKeys = Common.keys(grid.pairs);\r\n\r\n // iterate over grid.pairs\r\n for (var k = 0; k < pairKeys.length; k++) {\r\n pair = grid.pairs[pairKeys[k]];\r\n\r\n // if pair exists in at least one bucket\r\n // it is a pair that needs further collision testing so push it\r\n if (pair[2] > 0) {\r\n pairs.push(pair);\r\n } else {\r\n delete grid.pairs[pairKeys[k]];\r\n }\r\n }\r\n\r\n return pairs;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js":function(module,exports){eval("/**\r\n* The `Matter.Pair` module contains methods for creating and manipulating collision pairs.\r\n*\r\n* @class Pair\r\n*/\r\n\r\nvar Pair = {};\r\n\r\nmodule.exports = Pair;\r\n\r\n(function() {\r\n \r\n /**\r\n * Creates a pair.\r\n * @method create\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n * @return {pair} A new pair\r\n */\r\n Pair.create = function(collision, timestamp) {\r\n var bodyA = collision.bodyA,\r\n bodyB = collision.bodyB;\r\n\r\n var pair = {\r\n id: Pair.id(bodyA, bodyB),\r\n bodyA: bodyA,\r\n bodyB: bodyB,\r\n activeContacts: [],\r\n separation: 0,\r\n isActive: true,\r\n confirmedActive: true,\r\n isSensor: bodyA.isSensor || bodyB.isSensor,\r\n timeCreated: timestamp,\r\n timeUpdated: timestamp,\r\n collision: null,\r\n inverseMass: 0,\r\n friction: 0,\r\n frictionStatic: 0,\r\n restitution: 0,\r\n slop: 0\r\n };\r\n\r\n Pair.update(pair, collision, timestamp);\r\n\r\n return pair;\r\n };\r\n\r\n /**\r\n * Updates a pair given a collision.\r\n * @method update\r\n * @param {pair} pair\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n */\r\n Pair.update = function(pair, collision, timestamp) {\r\n pair.collision = collision;\r\n\r\n if (collision.collided) {\r\n var supports = collision.supports,\r\n activeContacts = pair.activeContacts,\r\n parentA = collision.parentA,\r\n parentB = collision.parentB;\r\n\r\n pair.inverseMass = parentA.inverseMass + parentB.inverseMass;\r\n pair.friction = Math.min(parentA.friction, parentB.friction);\r\n pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic);\r\n pair.restitution = Math.max(parentA.restitution, parentB.restitution);\r\n pair.slop = Math.max(parentA.slop, parentB.slop);\r\n\r\n for (var i = 0; i < supports.length; i++) {\r\n activeContacts[i] = supports[i].contact;\r\n }\r\n\r\n // optimise array size\r\n var supportCount = supports.length;\r\n if (supportCount < activeContacts.length) {\r\n activeContacts.length = supportCount;\r\n }\r\n\r\n pair.separation = collision.depth;\r\n Pair.setActive(pair, true, timestamp);\r\n } else {\r\n if (pair.isActive === true)\r\n Pair.setActive(pair, false, timestamp);\r\n }\r\n };\r\n \r\n /**\r\n * Set a pair as active or inactive.\r\n * @method setActive\r\n * @param {pair} pair\r\n * @param {bool} isActive\r\n * @param {number} timestamp\r\n */\r\n Pair.setActive = function(pair, isActive, timestamp) {\r\n if (isActive) {\r\n pair.isActive = true;\r\n pair.timeUpdated = timestamp;\r\n } else {\r\n pair.isActive = false;\r\n pair.activeContacts.length = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Get the id for the given pair.\r\n * @method id\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @return {string} Unique pairId\r\n */\r\n Pair.id = function(bodyA, bodyB) {\r\n if (bodyA.id < bodyB.id) {\r\n return 'A' + bodyA.id + 'B' + bodyB.id;\r\n } else {\r\n return 'A' + bodyB.id + 'B' + bodyA.id;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.\r\n*\r\n* @class Pairs\r\n*/\r\n\r\nvar Pairs = {};\r\n\r\nmodule.exports = Pairs;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n \r\n Pairs._pairMaxIdleLife = 1000;\r\n\r\n /**\r\n * Creates a new pairs structure.\r\n * @method create\r\n * @param {object} options\r\n * @return {pairs} A new pairs structure\r\n */\r\n Pairs.create = function(options) {\r\n return Common.extend({ \r\n table: {},\r\n list: [],\r\n collisionStart: [],\r\n collisionActive: [],\r\n collisionEnd: []\r\n }, options);\r\n };\r\n\r\n /**\r\n * Updates pairs given a list of collisions.\r\n * @method update\r\n * @param {object} pairs\r\n * @param {collision[]} collisions\r\n * @param {number} timestamp\r\n */\r\n Pairs.update = function(pairs, collisions, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n collisionStart = pairs.collisionStart,\r\n collisionEnd = pairs.collisionEnd,\r\n collisionActive = pairs.collisionActive,\r\n collision,\r\n pairId,\r\n pair,\r\n i;\r\n\r\n // clear collision state arrays, but maintain old reference\r\n collisionStart.length = 0;\r\n collisionEnd.length = 0;\r\n collisionActive.length = 0;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pairsList[i].confirmedActive = false;\r\n }\r\n\r\n for (i = 0; i < collisions.length; i++) {\r\n collision = collisions[i];\r\n\r\n if (collision.collided) {\r\n pairId = Pair.id(collision.bodyA, collision.bodyB);\r\n\r\n pair = pairsTable[pairId];\r\n \r\n if (pair) {\r\n // pair already exists (but may or may not be active)\r\n if (pair.isActive) {\r\n // pair exists and is active\r\n collisionActive.push(pair);\r\n } else {\r\n // pair exists but was inactive, so a collision has just started again\r\n collisionStart.push(pair);\r\n }\r\n\r\n // update the pair\r\n Pair.update(pair, collision, timestamp);\r\n pair.confirmedActive = true;\r\n } else {\r\n // pair did not exist, create a new pair\r\n pair = Pair.create(collision, timestamp);\r\n pairsTable[pairId] = pair;\r\n\r\n // push the new pair\r\n collisionStart.push(pair);\r\n pairsList.push(pair);\r\n }\r\n }\r\n }\r\n\r\n // deactivate previously active pairs that are now inactive\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n if (pair.isActive && !pair.confirmedActive) {\r\n Pair.setActive(pair, false, timestamp);\r\n collisionEnd.push(pair);\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Finds and removes pairs that have been inactive for a set amount of time.\r\n * @method removeOld\r\n * @param {object} pairs\r\n * @param {number} timestamp\r\n */\r\n Pairs.removeOld = function(pairs, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n indexesToRemove = [],\r\n pair,\r\n collision,\r\n pairIndex,\r\n i;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n collision = pair.collision;\r\n \r\n // never remove sleeping pairs\r\n if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) {\r\n pair.timeUpdated = timestamp;\r\n continue;\r\n }\r\n\r\n // if pair is inactive for too long, mark it to be removed\r\n if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) {\r\n indexesToRemove.push(i);\r\n }\r\n }\r\n\r\n // remove marked pairs\r\n for (i = 0; i < indexesToRemove.length; i++) {\r\n pairIndex = indexesToRemove[i] - i;\r\n pair = pairsList[pairIndex];\r\n delete pairsTable[pair.id];\r\n pairsList.splice(pairIndex, 1);\r\n }\r\n };\r\n\r\n /**\r\n * Clears the given pairs structure.\r\n * @method clear\r\n * @param {pairs} pairs\r\n * @return {pairs} pairs\r\n */\r\n Pairs.clear = function(pairs) {\r\n pairs.table = {};\r\n pairs.list.length = 0;\r\n pairs.collisionStart.length = 0;\r\n pairs.collisionActive.length = 0;\r\n pairs.collisionEnd.length = 0;\r\n return pairs;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Query` module contains methods for performing collision queries.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Query\r\n*/\r\n\r\nvar Query = {};\r\n\r\nmodule.exports = Query;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Bodies = __webpack_require__(/*! ../factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Returns a list of collisions between `body` and `bodies`.\r\n * @method collides\r\n * @param {body} body\r\n * @param {body[]} bodies\r\n * @return {object[]} Collisions\r\n */\r\n Query.collides = function(body, bodies) {\r\n var collisions = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var bodyA = bodies[i];\r\n \r\n if (Bounds.overlaps(bodyA.bounds, body.bounds)) {\r\n for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) {\r\n var part = bodyA.parts[j];\r\n\r\n if (Bounds.overlaps(part.bounds, body.bounds)) {\r\n var collision = SAT.collides(part, body);\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.\r\n * @method ray\r\n * @param {body[]} bodies\r\n * @param {vector} startPoint\r\n * @param {vector} endPoint\r\n * @param {number} [rayWidth]\r\n * @return {object[]} Collisions\r\n */\r\n Query.ray = function(bodies, startPoint, endPoint, rayWidth) {\r\n rayWidth = rayWidth || 1e-100;\r\n\r\n var rayAngle = Vector.angle(startPoint, endPoint),\r\n rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),\r\n rayX = (endPoint.x + startPoint.x) * 0.5,\r\n rayY = (endPoint.y + startPoint.y) * 0.5,\r\n ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }),\r\n collisions = Query.collides(ray, bodies);\r\n\r\n for (var i = 0; i < collisions.length; i += 1) {\r\n var collision = collisions[i];\r\n collision.body = collision.bodyB = collision.bodyA; \r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.\r\n * @method region\r\n * @param {body[]} bodies\r\n * @param {bounds} bounds\r\n * @param {bool} [outside=false]\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.region = function(bodies, bounds, outside) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n overlaps = Bounds.overlaps(body.bounds, bounds);\r\n if ((overlaps && !outside) || (!overlaps && outside))\r\n result.push(body);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose vertices contain the given point, from the given set of bodies.\r\n * @method point\r\n * @param {body[]} bodies\r\n * @param {vector} point\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.point = function(bodies, point) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n \r\n if (Bounds.contains(body.bounds, point)) {\r\n for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n\r\n if (Bounds.contains(part.bounds, point)\r\n && Vertices.contains(part.vertices, point)) {\r\n result.push(body);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Resolver` module contains methods for resolving collision pairs.\r\n*\r\n* @class Resolver\r\n*/\r\n\r\nvar Resolver = {};\r\n\r\nmodule.exports = Resolver;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n Resolver._restingThresh = 4;\r\n Resolver._restingThreshTangent = 6;\r\n Resolver._positionDampen = 0.9;\r\n Resolver._positionWarming = 0.8;\r\n Resolver._frictionNormalMultiplier = 5;\r\n\r\n /**\r\n * Prepare pairs for position solving.\r\n * @method preSolvePosition\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolvePosition = function(pairs) {\r\n var i,\r\n pair,\r\n activeCount;\r\n\r\n // find total contacts on each body\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive)\r\n continue;\r\n \r\n activeCount = pair.activeContacts.length;\r\n pair.collision.parentA.totalContacts += activeCount;\r\n pair.collision.parentB.totalContacts += activeCount;\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair positions.\r\n * @method solvePosition\r\n * @param {pair[]} pairs\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Resolver.solvePosition = function(pairs, bodies, timeScale) {\r\n var i,\r\n normalX,\r\n normalY,\r\n pair,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n separation,\r\n penetration,\r\n positionImpulseA,\r\n positionImpulseB,\r\n contactShare,\r\n bodyBtoAX,\r\n bodyBtoAY,\r\n positionImpulse,\r\n impulseCoefficient = timeScale * Resolver._positionDampen;\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n body.previousPositionImpulse.x = body.positionImpulse.x;\r\n body.previousPositionImpulse.y = body.positionImpulse.y;\r\n }\r\n\r\n // find impulses required to resolve penetration\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n\r\n positionImpulseA = bodyA.previousPositionImpulse;\r\n positionImpulseB = bodyB.previousPositionImpulse;\r\n\r\n penetration = collision.penetration;\r\n\r\n bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x;\r\n bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y;\r\n\r\n normalX = normal.x;\r\n normalY = normal.y;\r\n\r\n separation = normalX * bodyBtoAX + normalY * bodyBtoAY;\r\n pair.separation = separation;\r\n\r\n positionImpulse = (separation - pair.slop) * impulseCoefficient;\r\n\r\n if (bodyA.isStatic || bodyB.isStatic)\r\n positionImpulse *= 2;\r\n \r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n contactShare = positionImpulse / bodyA.totalContacts;\r\n bodyA.positionImpulse.x += normalX * contactShare;\r\n bodyA.positionImpulse.y += normalY * contactShare;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n contactShare = positionImpulse / bodyB.totalContacts;\r\n bodyB.positionImpulse.x -= normalX * contactShare;\r\n bodyB.positionImpulse.y -= normalY * contactShare;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Apply position resolution.\r\n * @method postSolvePosition\r\n * @param {body[]} bodies\r\n */\r\n Resolver.postSolvePosition = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset contact count\r\n body.totalContacts = 0;\r\n\r\n if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) {\r\n // update body geometry\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n Vertices.translate(part.vertices, body.positionImpulse);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n part.position.x += body.positionImpulse.x;\r\n part.position.y += body.positionImpulse.y;\r\n }\r\n\r\n // move the body without changing velocity\r\n body.positionPrev.x += body.positionImpulse.x;\r\n body.positionPrev.y += body.positionImpulse.y;\r\n\r\n if (Vector.dot(body.positionImpulse, body.velocity) < 0) {\r\n // reset cached impulse if the body has velocity along it\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n } else {\r\n // warm the next iteration\r\n body.positionImpulse.x *= Resolver._positionWarming;\r\n body.positionImpulse.y *= Resolver._positionWarming;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Prepare pairs for velocity solving.\r\n * @method preSolveVelocity\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolveVelocity = function(pairs) {\r\n var i,\r\n j,\r\n pair,\r\n contacts,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n tangent,\r\n contact,\r\n contactVertex,\r\n normalImpulse,\r\n tangentImpulse,\r\n offset,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1];\r\n \r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n contacts = pair.activeContacts;\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n tangent = collision.tangent;\r\n\r\n // resolve each contact\r\n for (j = 0; j < contacts.length; j++) {\r\n contact = contacts[j];\r\n contactVertex = contact.vertex;\r\n normalImpulse = contact.normalImpulse;\r\n tangentImpulse = contact.tangentImpulse;\r\n\r\n if (normalImpulse !== 0 || tangentImpulse !== 0) {\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyA.position, tempA);\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyB.position, tempA);\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair velocities.\r\n * @method solveVelocity\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Resolver.solveVelocity = function(pairs, timeScale) {\r\n var timeScaleSquared = timeScale * timeScale,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1],\r\n tempB = Vector._temp[2],\r\n tempC = Vector._temp[3],\r\n tempD = Vector._temp[4],\r\n tempE = Vector._temp[5];\r\n \r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n var collision = pair.collision,\r\n bodyA = collision.parentA,\r\n bodyB = collision.parentB,\r\n normal = collision.normal,\r\n tangent = collision.tangent,\r\n contacts = pair.activeContacts,\r\n contactShare = 1 / contacts.length;\r\n\r\n // update body velocities\r\n bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x;\r\n bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y;\r\n bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x;\r\n bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y;\r\n bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev;\r\n bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev;\r\n\r\n // resolve each contact\r\n for (var j = 0; j < contacts.length; j++) {\r\n var contact = contacts[j],\r\n contactVertex = contact.vertex,\r\n offsetA = Vector.sub(contactVertex, bodyA.position, tempA),\r\n offsetB = Vector.sub(contactVertex, bodyB.position, tempB),\r\n velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC),\r\n velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), \r\n relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE),\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n\r\n var tangentVelocity = Vector.dot(tangent, relativeVelocity),\r\n tangentSpeed = Math.abs(tangentVelocity),\r\n tangentVelocityDirection = Common.sign(tangentVelocity);\r\n\r\n // raw impulses\r\n var normalImpulse = (1 + pair.restitution) * normalVelocity,\r\n normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier;\r\n\r\n // coulomb friction\r\n var tangentImpulse = tangentVelocity,\r\n maxFriction = Infinity;\r\n\r\n if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) {\r\n maxFriction = tangentSpeed;\r\n tangentImpulse = Common.clamp(\r\n pair.friction * tangentVelocityDirection * timeScaleSquared,\r\n -maxFriction, maxFriction\r\n );\r\n }\r\n\r\n // modify impulses accounting for mass, inertia and offset\r\n var oAcN = Vector.cross(offsetA, normal),\r\n oBcN = Vector.cross(offsetB, normal),\r\n share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN);\r\n\r\n normalImpulse *= share;\r\n tangentImpulse *= share;\r\n\r\n // handle high velocity and resting collisions separately\r\n if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) {\r\n // high normal velocity so clear cached contact normal impulse\r\n contact.normalImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // impulse constraint tends to 0\r\n var contactNormalImpulse = contact.normalImpulse;\r\n contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0);\r\n normalImpulse = contact.normalImpulse - contactNormalImpulse;\r\n }\r\n\r\n // handle high velocity and resting collisions separately\r\n if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) {\r\n // high tangent velocity so clear cached contact tangent impulse\r\n contact.tangentImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // tangent impulse tends to -tangentSpeed or +tangentSpeed\r\n var contactTangentImpulse = contact.tangentImpulse;\r\n contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction);\r\n tangentImpulse = contact.tangentImpulse - contactTangentImpulse;\r\n }\r\n\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.\r\n*\r\n* @class SAT\r\n*/\r\n\r\n// TODO: true circles and curves\r\n\r\nvar SAT = {};\r\n\r\nmodule.exports = SAT;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Detect collision between two bodies using the Separating Axis Theorem.\r\n * @method collides\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @param {collision} previousCollision\r\n * @return {collision} collision\r\n */\r\n SAT.collides = function(bodyA, bodyB, previousCollision) {\r\n var overlapAB,\r\n overlapBA, \r\n minOverlap,\r\n collision,\r\n canReusePrevCol = false;\r\n\r\n if (previousCollision) {\r\n // estimate total motion\r\n var parentA = bodyA.parent,\r\n parentB = bodyB.parent,\r\n motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed\r\n + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed;\r\n\r\n // we may be able to (partially) reuse collision result \r\n // but only safe if collision was resting\r\n canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2;\r\n\r\n // reuse collision object\r\n collision = previousCollision;\r\n } else {\r\n collision = { collided: false, bodyA: bodyA, bodyB: bodyB };\r\n }\r\n\r\n if (previousCollision && canReusePrevCol) {\r\n // if we can reuse the collision result\r\n // we only need to test the previously found axis\r\n var axisBodyA = collision.axisBody,\r\n axisBodyB = axisBodyA === bodyA ? bodyB : bodyA,\r\n axes = [axisBodyA.axes[previousCollision.axisNumber]];\r\n\r\n minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes);\r\n collision.reused = true;\r\n\r\n if (minOverlap.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n } else {\r\n // if we can\'t reuse a result, perform a full SAT test\r\n\r\n overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes);\r\n\r\n if (overlapAB.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes);\r\n\r\n if (overlapBA.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n if (overlapAB.overlap < overlapBA.overlap) {\r\n minOverlap = overlapAB;\r\n collision.axisBody = bodyA;\r\n } else {\r\n minOverlap = overlapBA;\r\n collision.axisBody = bodyB;\r\n }\r\n\r\n // important for reuse later\r\n collision.axisNumber = minOverlap.axisNumber;\r\n }\r\n\r\n collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB;\r\n collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA;\r\n collision.collided = true;\r\n collision.depth = minOverlap.overlap;\r\n collision.parentA = collision.bodyA.parent;\r\n collision.parentB = collision.bodyB.parent;\r\n \r\n bodyA = collision.bodyA;\r\n bodyB = collision.bodyB;\r\n\r\n // ensure normal is facing away from bodyA\r\n if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) {\r\n collision.normal = {\r\n x: minOverlap.axis.x,\r\n y: minOverlap.axis.y\r\n };\r\n } else {\r\n collision.normal = {\r\n x: -minOverlap.axis.x,\r\n y: -minOverlap.axis.y\r\n };\r\n }\r\n\r\n collision.tangent = Vector.perp(collision.normal);\r\n\r\n collision.penetration = collision.penetration || {};\r\n collision.penetration.x = collision.normal.x * collision.depth;\r\n collision.penetration.y = collision.normal.y * collision.depth; \r\n\r\n // find support points, there is always either exactly one or two\r\n var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal),\r\n supports = [];\r\n\r\n // find the supports from bodyB that are inside bodyA\r\n if (Vertices.contains(bodyA.vertices, verticesB[0]))\r\n supports.push(verticesB[0]);\r\n\r\n if (Vertices.contains(bodyA.vertices, verticesB[1]))\r\n supports.push(verticesB[1]);\r\n\r\n // find the supports from bodyA that are inside bodyB\r\n if (supports.length < 2) {\r\n var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal));\r\n \r\n if (Vertices.contains(bodyB.vertices, verticesA[0]))\r\n supports.push(verticesA[0]);\r\n\r\n if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1]))\r\n supports.push(verticesA[1]);\r\n }\r\n\r\n // account for the edge case of overlapping but no vertex containment\r\n if (supports.length < 1)\r\n supports = [verticesB[0]];\r\n \r\n collision.supports = supports;\r\n\r\n return collision;\r\n };\r\n\r\n /**\r\n * Find the overlap between two sets of vertices.\r\n * @method _overlapAxes\r\n * @private\r\n * @param {} verticesA\r\n * @param {} verticesB\r\n * @param {} axes\r\n * @return result\r\n */\r\n SAT._overlapAxes = function(verticesA, verticesB, axes) {\r\n var projectionA = Vector._temp[0], \r\n projectionB = Vector._temp[1],\r\n result = { overlap: Number.MAX_VALUE },\r\n overlap,\r\n axis;\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n axis = axes[i];\r\n\r\n SAT._projectToAxis(projectionA, verticesA, axis);\r\n SAT._projectToAxis(projectionB, verticesB, axis);\r\n\r\n overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min);\r\n\r\n if (overlap <= 0) {\r\n result.overlap = overlap;\r\n return result;\r\n }\r\n\r\n if (overlap < result.overlap) {\r\n result.overlap = overlap;\r\n result.axis = axis;\r\n result.axisNumber = i;\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Projects vertices on an axis and returns an interval.\r\n * @method _projectToAxis\r\n * @private\r\n * @param {} projection\r\n * @param {} vertices\r\n * @param {} axis\r\n */\r\n SAT._projectToAxis = function(projection, vertices, axis) {\r\n var min = Vector.dot(vertices[0], axis),\r\n max = min;\r\n\r\n for (var i = 1; i < vertices.length; i += 1) {\r\n var dot = Vector.dot(vertices[i], axis);\r\n\r\n if (dot > max) { \r\n max = dot; \r\n } else if (dot < min) { \r\n min = dot; \r\n }\r\n }\r\n\r\n projection.min = min;\r\n projection.max = max;\r\n };\r\n \r\n /**\r\n * Finds supporting vertices given two bodies along a given direction using hill-climbing.\r\n * @method _findSupports\r\n * @private\r\n * @param {} bodyA\r\n * @param {} bodyB\r\n * @param {} normal\r\n * @return [vector]\r\n */\r\n SAT._findSupports = function(bodyA, bodyB, normal) {\r\n var nearestDistance = Number.MAX_VALUE,\r\n vertexToBody = Vector._temp[0],\r\n vertices = bodyB.vertices,\r\n bodyAPosition = bodyA.position,\r\n distance,\r\n vertex,\r\n vertexA,\r\n vertexB;\r\n\r\n // find closest vertex on bodyB\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n\r\n if (distance < nearestDistance) {\r\n nearestDistance = distance;\r\n vertexA = vertex;\r\n }\r\n }\r\n\r\n // find next closest vertex using the two connected to it\r\n var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1;\r\n vertex = vertices[prevIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n nearestDistance = -Vector.dot(normal, vertexToBody);\r\n vertexB = vertex;\r\n\r\n var nextIndex = (vertexA.index + 1) % vertices.length;\r\n vertex = vertices[nextIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n if (distance < nearestDistance) {\r\n vertexB = vertex;\r\n }\r\n\r\n return [vertexA, vertexB];\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js?')},"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n* The stiffness of constraints can be modified to create springs or elastic.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Constraint\r\n*/\r\n\r\nvar Constraint = {};\r\n\r\nmodule.exports = Constraint;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Constraint._warming = 0.4;\r\n Constraint._torqueDampen = 1;\r\n Constraint._minLength = 0.000001;\r\n\r\n /**\r\n * Creates a new constraint.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above).\r\n * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`.\r\n * For compound bodies, constraints must be applied to the parent body (not one of its parts).\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {constraint} constraint\r\n */\r\n Constraint.create = function(options) {\r\n var constraint = options;\r\n\r\n // if bodies defined but no points, use body centre\r\n if (constraint.bodyA && !constraint.pointA)\r\n constraint.pointA = { x: 0, y: 0 };\r\n if (constraint.bodyB && !constraint.pointB)\r\n constraint.pointB = { x: 0, y: 0 };\r\n\r\n // calculate static length using initial world space points\r\n var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA,\r\n initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB,\r\n length = Vector.magnitude(Vector.sub(initialPointA, initialPointB));\r\n \r\n constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length;\r\n\r\n // option defaults\r\n constraint.id = constraint.id || Common.nextId();\r\n constraint.label = constraint.label || 'Constraint';\r\n constraint.type = 'constraint';\r\n constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7);\r\n constraint.damping = constraint.damping || 0;\r\n constraint.angularStiffness = constraint.angularStiffness || 0;\r\n constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA;\r\n constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB;\r\n constraint.plugin = {};\r\n\r\n // render\r\n var render = {\r\n visible: true,\r\n lineWidth: 2,\r\n strokeStyle: '#ffffff',\r\n type: 'line',\r\n anchors: true\r\n };\r\n\r\n if (constraint.length === 0 && constraint.stiffness > 0.1) {\r\n render.type = 'pin';\r\n render.anchors = false;\r\n } else if (constraint.stiffness < 0.9) {\r\n render.type = 'spring';\r\n }\r\n\r\n constraint.render = Common.extend(render, constraint.render);\r\n\r\n return constraint;\r\n };\r\n\r\n /**\r\n * Prepares for solving by constraint warming.\r\n * @private\r\n * @method preSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.preSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n body.position.x += impulse.x;\r\n body.position.y += impulse.y;\r\n body.angle += impulse.angle;\r\n }\r\n };\r\n\r\n /**\r\n * Solves all constraints in a list of collisions.\r\n * @private\r\n * @method solveAll\r\n * @param {constraint[]} constraints\r\n * @param {number} timeScale\r\n */\r\n Constraint.solveAll = function(constraints, timeScale) {\r\n // Solve fixed constraints first.\r\n for (var i = 0; i < constraints.length; i += 1) {\r\n var constraint = constraints[i],\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic),\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (fixedA || fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n\r\n // Solve free constraints last.\r\n for (i = 0; i < constraints.length; i += 1) {\r\n constraint = constraints[i];\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic);\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (!fixedA && !fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Solves a distance constraint with Gauss-Siedel method.\r\n * @private\r\n * @method solve\r\n * @param {constraint} constraint\r\n * @param {number} timeScale\r\n */\r\n Constraint.solve = function(constraint, timeScale) {\r\n var bodyA = constraint.bodyA,\r\n bodyB = constraint.bodyB,\r\n pointA = constraint.pointA,\r\n pointB = constraint.pointB;\r\n\r\n if (!bodyA && !bodyB)\r\n return;\r\n\r\n // update reference angle\r\n if (bodyA && !bodyA.isStatic) {\r\n Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA);\r\n constraint.angleA = bodyA.angle;\r\n }\r\n \r\n // update reference angle\r\n if (bodyB && !bodyB.isStatic) {\r\n Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB);\r\n constraint.angleB = bodyB.angle;\r\n }\r\n\r\n var pointAWorld = pointA,\r\n pointBWorld = pointB;\r\n\r\n if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA);\r\n if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB);\r\n\r\n if (!pointAWorld || !pointBWorld)\r\n return;\r\n\r\n var delta = Vector.sub(pointAWorld, pointBWorld),\r\n currentLength = Vector.magnitude(delta);\r\n\r\n // prevent singularity\r\n if (currentLength < Constraint._minLength) {\r\n currentLength = Constraint._minLength;\r\n }\r\n\r\n // solve distance constraint with Gauss-Siedel method\r\n var difference = (currentLength - constraint.length) / currentLength,\r\n stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness,\r\n force = Vector.mult(delta, difference * stiffness),\r\n massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0),\r\n inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0),\r\n resistanceTotal = massTotal + inertiaTotal,\r\n torque,\r\n share,\r\n normal,\r\n normalVelocity,\r\n relativeVelocity;\r\n\r\n if (constraint.damping) {\r\n var zero = Vector.create();\r\n normal = Vector.div(delta, currentLength);\r\n\r\n relativeVelocity = Vector.sub(\r\n bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero,\r\n bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero\r\n );\r\n\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n }\r\n\r\n if (bodyA && !bodyA.isStatic) {\r\n share = bodyA.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyA.constraintImpulse.x -= force.x * share;\r\n bodyA.constraintImpulse.y -= force.y * share;\r\n\r\n // apply forces\r\n bodyA.position.x -= force.x * share;\r\n bodyA.position.y -= force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share;\r\n bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyA.constraintImpulse.angle -= torque;\r\n bodyA.angle -= torque;\r\n }\r\n\r\n if (bodyB && !bodyB.isStatic) {\r\n share = bodyB.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyB.constraintImpulse.x += force.x * share;\r\n bodyB.constraintImpulse.y += force.y * share;\r\n \r\n // apply forces\r\n bodyB.position.x += force.x * share;\r\n bodyB.position.y += force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share;\r\n bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyB.constraintImpulse.angle += torque;\r\n bodyB.angle += torque;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Performs body updates required after solving constraints.\r\n * @private\r\n * @method postSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.postSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n Sleeping.set(body, false);\r\n\r\n // update geometry and reset\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n \r\n Vertices.translate(part.vertices, impulse);\r\n\r\n if (j > 0) {\r\n part.position.x += impulse.x;\r\n part.position.y += impulse.y;\r\n }\r\n\r\n if (impulse.angle !== 0) {\r\n Vertices.rotate(part.vertices, impulse.angle, body.position);\r\n Axes.rotate(part.axes, impulse.angle);\r\n if (j > 0) {\r\n Vector.rotateAbout(part.position, impulse.angle, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // dampen the cached impulse for warming next step\r\n impulse.angle *= Constraint._warming;\r\n impulse.x *= Constraint._warming;\r\n impulse.y *= Constraint._warming;\r\n }\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"constraint\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Constraint\"\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the constraint should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the constraint outline.\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the constraint outline.\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the constraint rendering type. \r\n * The possible values are 'line', 'pin', 'spring'.\r\n * An appropriate render type will be automatically chosen unless one is given in options.\r\n *\r\n * @property render.type\r\n * @type string\r\n * @default 'line'\r\n */\r\n\r\n /**\r\n * A `Boolean` that defines if the constraint's anchor points should be rendered.\r\n *\r\n * @property render.anchors\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * The first possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyA\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * The second possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyB\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\r\n *\r\n * @property pointA\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position.\r\n *\r\n * @property pointB\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`.\r\n * A value of `1` means the constraint should be very stiff.\r\n * A value of `0.2` means the constraint acts like a soft spring.\r\n *\r\n * @property stiffness\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the damping of the constraint, \r\n * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation.\r\n * Damping will only be apparent when the constraint also has a very low `stiffness`.\r\n * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation.\r\n * A value of `0` means the constraint will apply no damping.\r\n *\r\n * @property damping\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the target resting length of the constraint. \r\n * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n *\r\n * @property length\r\n * @type number\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {/**\r\n* The `Matter.Common` module contains utility functions that are common to all modules.\r\n*\r\n* @class Common\r\n*/\r\n\r\nvar Common = {};\r\n\r\nmodule.exports = Common;\r\n\r\n(function() {\r\n\r\n Common._nextId = 0;\r\n Common._seed = 0;\r\n Common._nowStartTime = +(new Date());\r\n\r\n /**\r\n * Extends the object in the first argument using the object in the second argument.\r\n * @method extend\r\n * @param {} obj\r\n * @param {boolean} deep\r\n * @return {} obj extended\r\n */\r\n Common.extend = function(obj, deep) {\r\n var argsStart,\r\n args,\r\n deepClone;\r\n\r\n if (typeof deep === 'boolean') {\r\n argsStart = 2;\r\n deepClone = deep;\r\n } else {\r\n argsStart = 1;\r\n deepClone = true;\r\n }\r\n\r\n for (var i = argsStart; i < arguments.length; i++) {\r\n var source = arguments[i];\r\n\r\n if (source) {\r\n for (var prop in source) {\r\n if (deepClone && source[prop] && source[prop].constructor === Object) {\r\n if (!obj[prop] || obj[prop].constructor === Object) {\r\n obj[prop] = obj[prop] || {};\r\n Common.extend(obj[prop], deepClone, source[prop]);\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n }\r\n }\r\n }\r\n \r\n return obj;\r\n };\r\n\r\n /**\r\n * Creates a new clone of the object, if deep is true references will also be cloned.\r\n * @method clone\r\n * @param {} obj\r\n * @param {bool} deep\r\n * @return {} obj cloned\r\n */\r\n Common.clone = function(obj, deep) {\r\n return Common.extend({}, deep, obj);\r\n };\r\n\r\n /**\r\n * Returns the list of keys for the given object.\r\n * @method keys\r\n * @param {} obj\r\n * @return {string[]} keys\r\n */\r\n Common.keys = function(obj) {\r\n if (Object.keys)\r\n return Object.keys(obj);\r\n\r\n // avoid hasOwnProperty for performance\r\n var keys = [];\r\n for (var key in obj)\r\n keys.push(key);\r\n return keys;\r\n };\r\n\r\n /**\r\n * Returns the list of values for the given object.\r\n * @method values\r\n * @param {} obj\r\n * @return {array} Array of the objects property values\r\n */\r\n Common.values = function(obj) {\r\n var values = [];\r\n \r\n if (Object.keys) {\r\n var keys = Object.keys(obj);\r\n for (var i = 0; i < keys.length; i++) {\r\n values.push(obj[keys[i]]);\r\n }\r\n return values;\r\n }\r\n \r\n // avoid hasOwnProperty for performance\r\n for (var key in obj)\r\n values.push(obj[key]);\r\n return values;\r\n };\r\n\r\n /**\r\n * Gets a value from `base` relative to the `path` string.\r\n * @method get\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} The object at the given path\r\n */\r\n Common.get = function(obj, path, begin, end) {\r\n path = path.split('.').slice(begin, end);\r\n\r\n for (var i = 0; i < path.length; i += 1) {\r\n obj = obj[path[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n /**\r\n * Sets a value on `base` relative to the given `path` string.\r\n * @method set\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {} val The value to set\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} Pass through `val` for chaining\r\n */\r\n Common.set = function(obj, path, val, begin, end) {\r\n var parts = path.split('.').slice(begin, end);\r\n Common.get(obj, path, 0, -1)[parts[parts.length - 1]] = val;\r\n return val;\r\n };\r\n\r\n /**\r\n * Shuffles the given array in-place.\r\n * The function uses a seeded random generator.\r\n * @method shuffle\r\n * @param {array} array\r\n * @return {array} array shuffled randomly\r\n */\r\n Common.shuffle = function(array) {\r\n for (var i = array.length - 1; i > 0; i--) {\r\n var j = Math.floor(Common.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n return array;\r\n };\r\n\r\n /**\r\n * Randomly chooses a value from a list with equal probability.\r\n * The function uses a seeded random generator.\r\n * @method choose\r\n * @param {array} choices\r\n * @return {object} A random choice object from the array\r\n */\r\n Common.choose = function(choices) {\r\n return choices[Math.floor(Common.random() * choices.length)];\r\n };\r\n\r\n /**\r\n * Returns true if the object is a HTMLElement, otherwise false.\r\n * @method isElement\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a HTMLElement, otherwise false\r\n */\r\n Common.isElement = function(obj) {\r\n if (typeof HTMLElement !== 'undefined') {\r\n return obj instanceof HTMLElement;\r\n }\r\n\r\n return !!(obj && obj.nodeType && obj.nodeName);\r\n };\r\n\r\n /**\r\n * Returns true if the object is an array.\r\n * @method isArray\r\n * @param {object} obj\r\n * @return {boolean} True if the object is an array, otherwise false\r\n */\r\n Common.isArray = function(obj) {\r\n return Object.prototype.toString.call(obj) === '[object Array]';\r\n };\r\n\r\n /**\r\n * Returns true if the object is a function.\r\n * @method isFunction\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a function, otherwise false\r\n */\r\n Common.isFunction = function(obj) {\r\n return typeof obj === \"function\";\r\n };\r\n\r\n /**\r\n * Returns true if the object is a plain object.\r\n * @method isPlainObject\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a plain object, otherwise false\r\n */\r\n Common.isPlainObject = function(obj) {\r\n return typeof obj === 'object' && obj.constructor === Object;\r\n };\r\n\r\n /**\r\n * Returns true if the object is a string.\r\n * @method isString\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a string, otherwise false\r\n */\r\n Common.isString = function(obj) {\r\n return toString.call(obj) === '[object String]';\r\n };\r\n \r\n /**\r\n * Returns the given value clamped between a minimum and maximum value.\r\n * @method clamp\r\n * @param {number} value\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} The value clamped between min and max inclusive\r\n */\r\n Common.clamp = function(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n \r\n /**\r\n * Returns the sign of the given value.\r\n * @method sign\r\n * @param {number} value\r\n * @return {number} -1 if negative, +1 if 0 or positive\r\n */\r\n Common.sign = function(value) {\r\n return value < 0 ? -1 : 1;\r\n };\r\n \r\n /**\r\n * Returns the current timestamp since the time origin (e.g. from page load).\r\n * The result will be high-resolution including decimal places if available.\r\n * @method now\r\n * @return {number} the current timestamp\r\n */\r\n Common.now = function() {\r\n if (window.performance) {\r\n if (window.performance.now) {\r\n return window.performance.now();\r\n } else if (window.performance.webkitNow) {\r\n return window.performance.webkitNow();\r\n }\r\n }\r\n\r\n return (new Date()) - Common._nowStartTime;\r\n };\r\n \r\n /**\r\n * Returns a random value between a minimum and a maximum value inclusive.\r\n * The function uses a seeded random generator.\r\n * @method random\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} A random number between min and max inclusive\r\n */\r\n Common.random = function(min, max) {\r\n min = (typeof min !== \"undefined\") ? min : 0;\r\n max = (typeof max !== \"undefined\") ? max : 1;\r\n return min + _seededRandom() * (max - min);\r\n };\r\n\r\n var _seededRandom = function() {\r\n // https://en.wikipedia.org/wiki/Linear_congruential_generator\r\n Common._seed = (Common._seed * 9301 + 49297) % 233280;\r\n return Common._seed / 233280;\r\n };\r\n\r\n /**\r\n * Converts a CSS hex colour string into an integer.\r\n * @method colorToNumber\r\n * @param {string} colorString\r\n * @return {number} An integer representing the CSS hex string\r\n */\r\n Common.colorToNumber = function(colorString) {\r\n colorString = colorString.replace('#','');\r\n\r\n if (colorString.length == 3) {\r\n colorString = colorString.charAt(0) + colorString.charAt(0)\r\n + colorString.charAt(1) + colorString.charAt(1)\r\n + colorString.charAt(2) + colorString.charAt(2);\r\n }\r\n\r\n return parseInt(colorString, 16);\r\n };\r\n\r\n /**\r\n * The console logging level to use, where each level includes all levels above and excludes the levels below.\r\n * The default level is 'debug' which shows all console messages. \r\n *\r\n * Possible level values are:\r\n * - 0 = None\r\n * - 1 = Debug\r\n * - 2 = Info\r\n * - 3 = Warn\r\n * - 4 = Error\r\n * @property Common.logLevel\r\n * @type {Number}\r\n * @default 1\r\n */\r\n Common.logLevel = 1;\r\n\r\n /**\r\n * Shows a `console.log` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method log\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.log = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.log.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.info` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method info\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.info = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 2) {\r\n console.info.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.warn` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method warn\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.warn = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.warn.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Returns the next unique sequential ID.\r\n * @method nextId\r\n * @return {Number} Unique sequential ID\r\n */\r\n Common.nextId = function() {\r\n return Common._nextId++;\r\n };\r\n\r\n /**\r\n * A cross browser compatible indexOf implementation.\r\n * @method indexOf\r\n * @param {array} haystack\r\n * @param {object} needle\r\n * @return {number} The position of needle in haystack, otherwise -1.\r\n */\r\n Common.indexOf = function(haystack, needle) {\r\n if (haystack.indexOf)\r\n return haystack.indexOf(needle);\r\n\r\n for (var i = 0; i < haystack.length; i++) {\r\n if (haystack[i] === needle)\r\n return i;\r\n }\r\n\r\n return -1;\r\n };\r\n\r\n /**\r\n * A cross browser compatible array map implementation.\r\n * @method map\r\n * @param {array} list\r\n * @param {function} func\r\n * @return {array} Values from list transformed by func.\r\n */\r\n Common.map = function(list, func) {\r\n if (list.map) {\r\n return list.map(func);\r\n }\r\n\r\n var mapped = [];\r\n\r\n for (var i = 0; i < list.length; i += 1) {\r\n mapped.push(func(list[i]));\r\n }\r\n\r\n return mapped;\r\n };\r\n\r\n /**\r\n * Takes a directed graph and returns the partially ordered set of vertices in topological order.\r\n * Circular dependencies are allowed.\r\n * @method topologicalSort\r\n * @param {object} graph\r\n * @return {array} Partially ordered set of vertices in topological order.\r\n */\r\n Common.topologicalSort = function(graph) {\r\n // https://github.com/mgechev/javascript-algorithms\r\n // Copyright (c) Minko Gechev (MIT license)\r\n // Modifications: tidy formatting and naming\r\n var result = [],\r\n visited = [],\r\n temp = [];\r\n\r\n for (var node in graph) {\r\n if (!visited[node] && !temp[node]) {\r\n Common._topologicalSort(node, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n Common._topologicalSort = function(node, visited, temp, graph, result) {\r\n var neighbors = graph[node] || [];\r\n temp[node] = true;\r\n\r\n for (var i = 0; i < neighbors.length; i += 1) {\r\n var neighbor = neighbors[i];\r\n\r\n if (temp[neighbor]) {\r\n // skip circular dependencies\r\n continue;\r\n }\r\n\r\n if (!visited[neighbor]) {\r\n Common._topologicalSort(neighbor, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n temp[node] = false;\r\n visited[node] = true;\r\n\r\n result.push(node);\r\n };\r\n\r\n /**\r\n * Takes _n_ functions as arguments and returns a new function that calls them in order.\r\n * The arguments applied when calling the new function will also be applied to every function passed.\r\n * The value of `this` refers to the last value returned in the chain that was not `undefined`.\r\n * Therefore if a passed function does not return a value, the previously returned value is maintained.\r\n * After all passed functions have been called the new function returns the last returned value (if any).\r\n * If any of the passed functions are a chain, then the chain will be flattened.\r\n * @method chain\r\n * @param ...funcs {function} The functions to chain.\r\n * @return {function} A new function that calls the passed functions in order.\r\n */\r\n Common.chain = function() {\r\n var funcs = [];\r\n\r\n for (var i = 0; i < arguments.length; i += 1) {\r\n var func = arguments[i];\r\n\r\n if (func._chained) {\r\n // flatten already chained functions\r\n funcs.push.apply(funcs, func._chained);\r\n } else {\r\n funcs.push(func);\r\n }\r\n }\r\n\r\n var chain = function() {\r\n // https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358\r\n var lastResult,\r\n args = new Array(arguments.length);\r\n\r\n for (var i = 0, l = arguments.length; i < l; i++) {\r\n args[i] = arguments[i];\r\n }\r\n\r\n for (i = 0; i < funcs.length; i += 1) {\r\n var result = funcs[i].apply(lastResult, args);\r\n\r\n if (typeof result !== 'undefined') {\r\n lastResult = result;\r\n }\r\n }\r\n\r\n return lastResult;\r\n };\r\n\r\n chain._chained = funcs;\r\n\r\n return chain;\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathBefore\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathBefore = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n func,\r\n Common.get(base, path)\r\n ));\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathAfter\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathAfter = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n Common.get(base, path),\r\n func\r\n ));\r\n };\r\n\r\n /**\r\n * Used to require external libraries outside of the bundle.\r\n * It first looks for the `globalName` on the environment's global namespace.\r\n * If the global is not found, it will fall back to using the standard `require` using the `moduleName`.\r\n * @private\r\n * @method _requireGlobal\r\n * @param {string} globalName The global module name\r\n * @param {string} moduleName The fallback CommonJS module name\r\n * @return {} The loaded module\r\n */\r\n Common._requireGlobal = function(globalName, moduleName) {\r\n var obj = (typeof window !== 'undefined' ? window[globalName] : typeof global !== 'undefined' ? global[globalName] : null);\r\n\r\n // Breaks webpack :(\r\n // return obj || require(moduleName);\r\n\r\n return obj;\r\n };\r\n})();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Common.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n* An engine is a controller that manages updating the simulation of the world.\r\n* See `Matter.Runner` for an optional game loop utility.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Engine\r\n*/\r\n\r\nvar Engine = {};\r\n\r\nmodule.exports = Engine;\r\n\r\nvar World = __webpack_require__(/*! ../body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\nvar Sleeping = __webpack_require__(/*! ./Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Resolver = __webpack_require__(/*! ../collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nvar Pairs = __webpack_require__(/*! ../collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nvar Metrics = __webpack_require__(/*! ./Metrics */ "./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js");\r\nvar Grid = __webpack_require__(/*! ../collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nvar Events = __webpack_require__(/*! ./Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Body = __webpack_require__(/*! ../body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {object} [options]\r\n * @return {engine} engine\r\n */\r\n Engine.create = function(element, options) {\r\n // options may be passed as the first (and only) argument\r\n options = Common.isElement(element) ? options : element;\r\n element = Common.isElement(element) ? element : null;\r\n options = options || {};\r\n\r\n if (element || options.render) {\r\n Common.warn(\'Engine.create: engine.render is deprecated (see docs)\');\r\n }\r\n\r\n var defaults = {\r\n positionIterations: 6,\r\n velocityIterations: 4,\r\n constraintIterations: 2,\r\n enableSleeping: false,\r\n events: [],\r\n plugin: {},\r\n timing: {\r\n timestamp: 0,\r\n timeScale: 1\r\n },\r\n broadphase: {\r\n controller: Grid\r\n }\r\n };\r\n\r\n var engine = Common.extend(defaults, options);\r\n\r\n // @deprecated\r\n if (element || engine.render) {\r\n var renderDefaults = {\r\n element: element,\r\n controller: Render\r\n };\r\n \r\n engine.render = Common.extend(renderDefaults, engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render && engine.render.controller) {\r\n engine.render = engine.render.controller.create(engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render) {\r\n engine.render.engine = engine;\r\n }\r\n\r\n engine.world = options.world || World.create(engine.world);\r\n engine.pairs = Pairs.create();\r\n engine.broadphase = engine.broadphase.controller.create(engine.broadphase);\r\n engine.metrics = engine.metrics || { extended: false };\r\n\r\n // @if DEBUG\r\n engine.metrics = Metrics.create(engine.metrics);\r\n // @endif\r\n\r\n return engine;\r\n };\r\n\r\n /**\r\n * Moves the simulation forward in time by `delta` ms.\r\n * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates.\r\n * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step.\r\n * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * Triggers `beforeUpdate` and `afterUpdate` events.\r\n * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.\r\n * @method update\r\n * @param {engine} engine\r\n * @param {number} [delta=16.666]\r\n * @param {number} [correction=1]\r\n */\r\n Engine.update = function(engine, delta, correction) {\r\n delta = delta || 1000 / 60;\r\n correction = correction || 1;\r\n\r\n var world = engine.world,\r\n timing = engine.timing,\r\n broadphase = engine.broadphase,\r\n broadphasePairs = [],\r\n i;\r\n\r\n // increment timestamp\r\n timing.timestamp += delta * timing.timeScale;\r\n\r\n // create an event object\r\n var event = {\r\n timestamp: timing.timestamp\r\n };\r\n\r\n Events.trigger(engine, \'beforeUpdate\', event);\r\n\r\n // get lists of all bodies and constraints, no matter what composites they are in\r\n var allBodies = Composite.allBodies(world),\r\n allConstraints = Composite.allConstraints(world);\r\n\r\n // @if DEBUG\r\n // reset metrics logging\r\n Metrics.reset(engine.metrics);\r\n // @endif\r\n\r\n // if sleeping enabled, call the sleeping controller\r\n if (engine.enableSleeping)\r\n Sleeping.update(allBodies, timing.timeScale);\r\n\r\n // applies gravity to all bodies\r\n Engine._bodiesApplyGravity(allBodies, world.gravity);\r\n\r\n // update all body position and rotation by integration\r\n Engine._bodiesUpdate(allBodies, delta, timing.timeScale, correction, world.bounds);\r\n\r\n // update all constraints (first pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // broadphase pass: find potential collision pairs\r\n if (broadphase.controller) {\r\n // if world is dirty, we must flush the whole grid\r\n if (world.isModified)\r\n broadphase.controller.clear(broadphase);\r\n\r\n // update the grid buckets based on current bodies\r\n broadphase.controller.update(broadphase, allBodies, engine, world.isModified);\r\n broadphasePairs = broadphase.pairsList;\r\n } else {\r\n // if no broadphase set, we just pass all bodies\r\n broadphasePairs = allBodies;\r\n }\r\n\r\n // clear all composite modified flags\r\n if (world.isModified) {\r\n Composite.setModified(world, false, false, true);\r\n }\r\n\r\n // narrowphase pass: find actual collisions, then create or update collision pairs\r\n var collisions = broadphase.detector(broadphasePairs, engine);\r\n\r\n // update collision pairs\r\n var pairs = engine.pairs,\r\n timestamp = timing.timestamp;\r\n Pairs.update(pairs, collisions, timestamp);\r\n Pairs.removeOld(pairs, timestamp);\r\n\r\n // wake up bodies involved in collisions\r\n if (engine.enableSleeping)\r\n Sleeping.afterCollisions(pairs.list, timing.timeScale);\r\n\r\n // trigger collision events\r\n if (pairs.collisionStart.length > 0)\r\n Events.trigger(engine, \'collisionStart\', { pairs: pairs.collisionStart });\r\n\r\n // iteratively resolve position between collisions\r\n Resolver.preSolvePosition(pairs.list);\r\n for (i = 0; i < engine.positionIterations; i++) {\r\n Resolver.solvePosition(pairs.list, allBodies, timing.timeScale);\r\n }\r\n Resolver.postSolvePosition(allBodies);\r\n\r\n // update all constraints (second pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // iteratively resolve velocity between collisions\r\n Resolver.preSolveVelocity(pairs.list);\r\n for (i = 0; i < engine.velocityIterations; i++) {\r\n Resolver.solveVelocity(pairs.list, timing.timeScale);\r\n }\r\n\r\n // trigger collision events\r\n if (pairs.collisionActive.length > 0)\r\n Events.trigger(engine, \'collisionActive\', { pairs: pairs.collisionActive });\r\n\r\n if (pairs.collisionEnd.length > 0)\r\n Events.trigger(engine, \'collisionEnd\', { pairs: pairs.collisionEnd });\r\n\r\n // @if DEBUG\r\n // update metrics log\r\n Metrics.update(engine.metrics, engine);\r\n // @endif\r\n\r\n // clear force buffers\r\n Engine._bodiesClearForces(allBodies);\r\n\r\n Events.trigger(engine, \'afterUpdate\', event);\r\n\r\n return engine;\r\n };\r\n \r\n /**\r\n * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`.\r\n * @method merge\r\n * @param {engine} engineA\r\n * @param {engine} engineB\r\n */\r\n Engine.merge = function(engineA, engineB) {\r\n Common.extend(engineA, engineB);\r\n \r\n if (engineB.world) {\r\n engineA.world = engineB.world;\r\n\r\n Engine.clear(engineA);\r\n\r\n var bodies = Composite.allBodies(engineA.world);\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n Sleeping.set(body, false);\r\n body.id = Common.nextId();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Clears the engine including the world, pairs and broadphase.\r\n * @method clear\r\n * @param {engine} engine\r\n */\r\n Engine.clear = function(engine) {\r\n var world = engine.world;\r\n \r\n Pairs.clear(engine.pairs);\r\n\r\n var broadphase = engine.broadphase;\r\n if (broadphase.controller) {\r\n var bodies = Composite.allBodies(world);\r\n broadphase.controller.clear(broadphase);\r\n broadphase.controller.update(broadphase, bodies, engine, true);\r\n }\r\n };\r\n\r\n /**\r\n * Zeroes the `body.force` and `body.torque` force buffers.\r\n * @method _bodiesClearForces\r\n * @private\r\n * @param {body[]} bodies\r\n */\r\n Engine._bodiesClearForces = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset force buffers\r\n body.force.x = 0;\r\n body.force.y = 0;\r\n body.torque = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Applys a mass dependant force to all given bodies.\r\n * @method _bodiesApplyGravity\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {vector} gravity\r\n */\r\n Engine._bodiesApplyGravity = function(bodies, gravity) {\r\n var gravityScale = typeof gravity.scale !== \'undefined\' ? gravity.scale : 0.001;\r\n\r\n if ((gravity.x === 0 && gravity.y === 0) || gravityScale === 0) {\r\n return;\r\n }\r\n \r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.ignoreGravity || body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n // apply gravity\r\n body.force.y += body.mass * gravity.y * gravityScale;\r\n body.force.x += body.mass * gravity.x * gravityScale;\r\n }\r\n };\r\n\r\n /**\r\n * Applys `Body.update` to all given `bodies`.\r\n * @method _bodiesUpdate\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {number} deltaTime \r\n * The amount of time elapsed between updates\r\n * @param {number} timeScale\r\n * @param {number} correction \r\n * The Verlet correction factor (deltaTime / lastDeltaTime)\r\n * @param {bounds} worldBounds\r\n */\r\n Engine._bodiesUpdate = function(bodies, deltaTime, timeScale, correction, worldBounds) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n Body.update(body, deltaTime, timeScale, correction);\r\n }\r\n };\r\n\r\n /**\r\n * An alias for `Runner.run`, see `Matter.Runner` for more information.\r\n * @method run\r\n * @param {engine} engine\r\n */\r\n\r\n /**\r\n * Fired just before an update\r\n *\r\n * @event beforeUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update and all collision events\r\n *\r\n * @event afterUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any)\r\n *\r\n * @event collisionStart\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any)\r\n *\r\n * @event collisionActive\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any)\r\n *\r\n * @event collisionEnd\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of position iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property positionIterations\r\n * @type number\r\n * @default 6\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of velocity iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property velocityIterations\r\n * @type number\r\n * @default 4\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of constraint iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n * The default value of `2` is usually very adequate.\r\n *\r\n * @property constraintIterations\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module.\r\n * Sleeping can improve stability and performance, but often at the expense of accuracy.\r\n *\r\n * @property enableSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * An `Object` containing properties regarding the timing systems of the engine. \r\n *\r\n * @property timing\r\n * @type object\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the global scaling factor of time for all bodies.\r\n * A value of `0` freezes the simulation.\r\n * A value of `0.1` gives a slow-motion effect.\r\n * A value of `1.2` gives a speed-up effect.\r\n *\r\n * @property timing.timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. \r\n * It is incremented on every `Engine.update` by the given `delta` argument. \r\n *\r\n * @property timing.timestamp\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`.\r\n * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`.\r\n *\r\n * A minimal custom renderer object must define at least three functions: `create`, `clear` and `world` (see `Matter.Render`).\r\n * It is also possible to instead pass the _module_ reference via `options.render.controller` and `Engine.create` will instantiate one for you.\r\n *\r\n * @property render\r\n * @type render\r\n * @deprecated see Demo.js for an example of creating a renderer\r\n * @default a Matter.Render instance\r\n */\r\n\r\n /**\r\n * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`.\r\n *\r\n * @property broadphase\r\n * @type grid\r\n * @default a Matter.Grid instance\r\n */\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @property world\r\n * @type world\r\n * @default a Matter.World instance\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Events` module contains methods to fire and listen to events on other objects.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Events\r\n*/\r\n\r\nvar Events = {};\r\n\r\nmodule.exports = Events;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Subscribes a callback function to the given object's `eventName`.\r\n * @method on\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.on = function(object, eventNames, callback) {\r\n var names = eventNames.split(' '),\r\n name;\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n object.events = object.events || {};\r\n object.events[name] = object.events[name] || [];\r\n object.events[name].push(callback);\r\n }\r\n\r\n return callback;\r\n };\r\n\r\n /**\r\n * Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all events.\r\n * @method off\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.off = function(object, eventNames, callback) {\r\n if (!eventNames) {\r\n object.events = {};\r\n return;\r\n }\r\n\r\n // handle Events.off(object, callback)\r\n if (typeof eventNames === 'function') {\r\n callback = eventNames;\r\n eventNames = Common.keys(object.events).join(' ');\r\n }\r\n\r\n var names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n var callbacks = object.events[names[i]],\r\n newCallbacks = [];\r\n\r\n if (callback && callbacks) {\r\n for (var j = 0; j < callbacks.length; j++) {\r\n if (callbacks[j] !== callback)\r\n newCallbacks.push(callbacks[j]);\r\n }\r\n }\r\n\r\n object.events[names[i]] = newCallbacks;\r\n }\r\n };\r\n\r\n /**\r\n * Fires all the callbacks subscribed to the given object's `eventName`, in the order they subscribed, if any.\r\n * @method trigger\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {} event\r\n */\r\n Events.trigger = function(object, eventNames, event) {\r\n var names,\r\n name,\r\n callbacks,\r\n eventClone;\r\n\r\n var events = object.events;\r\n \r\n if (events && Common.keys(events).length > 0) {\r\n if (!event)\r\n event = {};\r\n\r\n names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n callbacks = events[name];\r\n\r\n if (callbacks) {\r\n eventClone = Common.clone(event, false);\r\n eventClone.name = name;\r\n eventClone.source = object;\r\n\r\n for (var j = 0; j < callbacks.length; j++) {\r\n callbacks[j].apply(object, [eventClone]);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Events.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter` module is the top level namespace. It also includes a function for installing plugins on top of the library.\r\n*\r\n* @class Matter\r\n*/\r\n\r\nvar Matter = {};\r\n\r\nmodule.exports = Matter;\r\n\r\nvar Plugin = __webpack_require__(/*! ./Plugin */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js\");\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * The library name.\r\n * @property name\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.name = 'matter-js';\r\n\r\n /**\r\n * The library version.\r\n * @property version\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.version = '0.14.2';\r\n\r\n /**\r\n * A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.\r\n * Alternatively you may set `Matter.uses` manually and install them by calling `Plugin.use(Matter)`.\r\n * @property uses\r\n * @type {Array}\r\n */\r\n Matter.uses = [];\r\n\r\n /**\r\n * The plugins that have been installed through `Matter.Plugin.install`. Read only.\r\n * @property used\r\n * @readOnly\r\n * @type {Array}\r\n */\r\n Matter.used = [];\r\n\r\n /**\r\n * Installs the given plugins on the `Matter` namespace.\r\n * This is a short-hand for `Plugin.use`, see it for more information.\r\n * Call this function once at the start of your code, with all of the plugins you wish to install as arguments.\r\n * Avoid calling this function multiple times unless you intend to manually control installation order.\r\n * @method use\r\n * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument).\r\n */\r\n Matter.use = function() {\r\n Plugin.use(Matter, Array.prototype.slice.call(arguments));\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method before\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.before = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathBefore(Matter, path, func);\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method after\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.after = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathAfter(Matter, path, func);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js":function(module,exports,__webpack_require__){eval('// @if DEBUG\r\n/**\r\n* _Internal Class_, not generally used outside of the engine\'s internals.\r\n*\r\n*/\r\n\r\nvar Metrics = {};\r\n\r\nmodule.exports = Metrics;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new metrics.\r\n * @method create\r\n * @private\r\n * @return {metrics} A new metrics\r\n */\r\n Metrics.create = function(options) {\r\n var defaults = {\r\n extended: false,\r\n narrowDetections: 0,\r\n narrowphaseTests: 0,\r\n narrowReuse: 0,\r\n narrowReuseCount: 0,\r\n midphaseTests: 0,\r\n broadphaseTests: 0,\r\n narrowEff: 0.0001,\r\n midEff: 0.0001,\r\n broadEff: 0.0001,\r\n collisions: 0,\r\n buckets: 0,\r\n bodies: 0,\r\n pairs: 0\r\n };\r\n\r\n return Common.extend(defaults, false, options);\r\n };\r\n\r\n /**\r\n * Resets metrics.\r\n * @method reset\r\n * @private\r\n * @param {metrics} metrics\r\n */\r\n Metrics.reset = function(metrics) {\r\n if (metrics.extended) {\r\n metrics.narrowDetections = 0;\r\n metrics.narrowphaseTests = 0;\r\n metrics.narrowReuse = 0;\r\n metrics.narrowReuseCount = 0;\r\n metrics.midphaseTests = 0;\r\n metrics.broadphaseTests = 0;\r\n metrics.narrowEff = 0;\r\n metrics.midEff = 0;\r\n metrics.broadEff = 0;\r\n metrics.collisions = 0;\r\n metrics.buckets = 0;\r\n metrics.pairs = 0;\r\n metrics.bodies = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Updates metrics.\r\n * @method update\r\n * @private\r\n * @param {metrics} metrics\r\n * @param {engine} engine\r\n */\r\n Metrics.update = function(metrics, engine) {\r\n if (metrics.extended) {\r\n var world = engine.world,\r\n bodies = Composite.allBodies(world);\r\n\r\n metrics.collisions = metrics.narrowDetections;\r\n metrics.pairs = engine.pairs.list.length;\r\n metrics.bodies = bodies.length;\r\n metrics.midEff = (metrics.narrowDetections / (metrics.midphaseTests || 1)).toFixed(2);\r\n metrics.narrowEff = (metrics.narrowDetections / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n metrics.broadEff = (1 - (metrics.broadphaseTests / (bodies.length || 1))).toFixed(2);\r\n metrics.narrowReuse = (metrics.narrowReuseCount / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n //var broadphase = engine.broadphase[engine.broadphase.current];\r\n //if (broadphase.instance)\r\n // metrics.buckets = Common.keys(broadphase.instance.buckets).length;\r\n }\r\n };\r\n\r\n})();\r\n// @endif\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Plugin` module contains functions for registering and installing plugins on modules.\r\n*\r\n* @class Plugin\r\n*/\r\n\r\nvar Plugin = {};\r\n\r\nmodule.exports = Plugin;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Plugin._registry = {};\r\n\r\n /**\r\n * Registers a plugin object so it can be resolved later by name.\r\n * @method register\r\n * @param plugin {} The plugin to register.\r\n * @return {object} The plugin.\r\n */\r\n Plugin.register = function(plugin) {\r\n if (!Plugin.isPlugin(plugin)) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'does not implement all required fields.');\r\n }\r\n\r\n if (plugin.name in Plugin._registry) {\r\n var registered = Plugin._registry[plugin.name],\r\n pluginVersion = Plugin.versionParse(plugin.version).number,\r\n registeredVersion = Plugin.versionParse(registered.version).number;\r\n\r\n if (pluginVersion > registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'was upgraded to', Plugin.toString(plugin));\r\n Plugin._registry[plugin.name] = plugin;\r\n } else if (pluginVersion < registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'can not be downgraded to', Plugin.toString(plugin));\r\n } else if (plugin !== registered) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'is already registered to different plugin object');\r\n }\r\n } else {\r\n Plugin._registry[plugin.name] = plugin;\r\n }\r\n\r\n return plugin;\r\n };\r\n\r\n /**\r\n * Resolves a dependency to a plugin object from the registry if it exists. \r\n * The `dependency` may contain a version, but only the name matters when resolving.\r\n * @method resolve\r\n * @param dependency {string} The dependency.\r\n * @return {object} The plugin if resolved, otherwise `undefined`.\r\n */\r\n Plugin.resolve = function(dependency) {\r\n return Plugin._registry[Plugin.dependencyParse(dependency).name];\r\n };\r\n\r\n /**\r\n * Returns a pretty printed plugin name and version.\r\n * @method toString\r\n * @param plugin {} The plugin.\r\n * @return {string} Pretty printed plugin name and version.\r\n */\r\n Plugin.toString = function(plugin) {\r\n return typeof plugin === 'string' ? plugin : (plugin.name || 'anonymous') + '@' + (plugin.version || plugin.range || '0.0.0');\r\n };\r\n\r\n /**\r\n * Returns `true` if the object meets the minimum standard to be considered a plugin.\r\n * This means it must define the following properties:\r\n * - `name`\r\n * - `version`\r\n * - `install`\r\n * @method isPlugin\r\n * @param obj {} The obj to test.\r\n * @return {boolean} `true` if the object can be considered a plugin otherwise `false`.\r\n */\r\n Plugin.isPlugin = function(obj) {\r\n return obj && obj.name && obj.version && obj.install;\r\n };\r\n\r\n /**\r\n * Returns `true` if a plugin with the given `name` been installed on `module`.\r\n * @method isUsed\r\n * @param module {} The module.\r\n * @param name {string} The plugin name.\r\n * @return {boolean} `true` if a plugin with the given `name` been installed on `module`, otherwise `false`.\r\n */\r\n Plugin.isUsed = function(module, name) {\r\n return module.used.indexOf(name) > -1;\r\n };\r\n\r\n /**\r\n * Returns `true` if `plugin.for` is applicable to `module` by comparing against `module.name` and `module.version`.\r\n * If `plugin.for` is not specified then it is assumed to be applicable.\r\n * The value of `plugin.for` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * @method isFor\r\n * @param plugin {} The plugin.\r\n * @param module {} The module.\r\n * @return {boolean} `true` if `plugin.for` is applicable to `module`, otherwise `false`.\r\n */\r\n Plugin.isFor = function(plugin, module) {\r\n var parsed = plugin.for && Plugin.dependencyParse(plugin.for);\r\n return !plugin.for || (module.name === parsed.name && Plugin.versionSatisfies(module.version, parsed.range));\r\n };\r\n\r\n /**\r\n * Installs the plugins by calling `plugin.install` on each plugin specified in `plugins` if passed, otherwise `module.uses`.\r\n * For installing plugins on `Matter` see the convenience function `Matter.use`.\r\n * Plugins may be specified either by their name or a reference to the plugin object.\r\n * Plugins themselves may specify further dependencies, but each plugin is installed only once.\r\n * Order is important, a topological sort is performed to find the best resulting order of installation.\r\n * This sorting attempts to satisfy every dependency's requested ordering, but may not be exact in all cases.\r\n * This function logs the resulting status of each dependency in the console, along with any warnings.\r\n * - A green tick ✅ indicates a dependency was resolved and installed.\r\n * - An orange diamond 🔶 indicates a dependency was resolved but a warning was thrown for it or one if its dependencies.\r\n * - A red cross ❌ indicates a dependency could not be resolved.\r\n * Avoid calling this function multiple times on the same module unless you intend to manually control installation order.\r\n * @method use\r\n * @param module {} The module install plugins on.\r\n * @param [plugins=module.uses] {} The plugins to install on module (optional, defaults to `module.uses`).\r\n */\r\n Plugin.use = function(module, plugins) {\r\n module.uses = (module.uses || []).concat(plugins || []);\r\n\r\n if (module.uses.length === 0) {\r\n Common.warn('Plugin.use:', Plugin.toString(module), 'does not specify any dependencies to install.');\r\n return;\r\n }\r\n\r\n var dependencies = Plugin.dependencies(module),\r\n sortedDependencies = Common.topologicalSort(dependencies),\r\n status = [];\r\n\r\n for (var i = 0; i < sortedDependencies.length; i += 1) {\r\n if (sortedDependencies[i] === module.name) {\r\n continue;\r\n }\r\n\r\n var plugin = Plugin.resolve(sortedDependencies[i]);\r\n\r\n if (!plugin) {\r\n status.push('❌ ' + sortedDependencies[i]);\r\n continue;\r\n }\r\n\r\n if (Plugin.isUsed(module, plugin.name)) {\r\n continue;\r\n }\r\n\r\n if (!Plugin.isFor(plugin, module)) {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'is for', plugin.for, 'but installed on', Plugin.toString(module) + '.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin.install) {\r\n plugin.install(module);\r\n } else {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'does not specify an install function.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin._warned) {\r\n status.push('🔶 ' + Plugin.toString(plugin));\r\n delete plugin._warned;\r\n } else {\r\n status.push('✅ ' + Plugin.toString(plugin));\r\n }\r\n\r\n module.used.push(plugin.name);\r\n }\r\n\r\n if (status.length > 0 && !plugin.silent) {\r\n Common.info(status.join(' '));\r\n }\r\n };\r\n\r\n /**\r\n * Recursively finds all of a module's dependencies and returns a flat dependency graph.\r\n * @method dependencies\r\n * @param module {} The module.\r\n * @return {object} A dependency graph.\r\n */\r\n Plugin.dependencies = function(module, tracked) {\r\n var parsedBase = Plugin.dependencyParse(module),\r\n name = parsedBase.name;\r\n\r\n tracked = tracked || {};\r\n\r\n if (name in tracked) {\r\n return;\r\n }\r\n\r\n module = Plugin.resolve(module) || module;\r\n\r\n tracked[name] = Common.map(module.uses || [], function(dependency) {\r\n if (Plugin.isPlugin(dependency)) {\r\n Plugin.register(dependency);\r\n }\r\n\r\n var parsed = Plugin.dependencyParse(dependency),\r\n resolved = Plugin.resolve(dependency);\r\n\r\n if (resolved && !Plugin.versionSatisfies(resolved.version, parsed.range)) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(resolved), 'does not satisfy',\r\n Plugin.toString(parsed), 'used by', Plugin.toString(parsedBase) + '.'\r\n );\r\n\r\n resolved._warned = true;\r\n module._warned = true;\r\n } else if (!resolved) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(dependency), 'used by',\r\n Plugin.toString(parsedBase), 'could not be resolved.'\r\n );\r\n\r\n module._warned = true;\r\n }\r\n\r\n return parsed.name;\r\n });\r\n\r\n for (var i = 0; i < tracked[name].length; i += 1) {\r\n Plugin.dependencies(tracked[name][i], tracked);\r\n }\r\n\r\n return tracked;\r\n };\r\n\r\n /**\r\n * Parses a dependency string into its components.\r\n * The `dependency` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * This function can also handle dependencies that are already resolved (e.g. a module object).\r\n * @method dependencyParse\r\n * @param dependency {string} The dependency of the format `'module-name'` or `'module-name@version'`.\r\n * @return {object} The dependency parsed into its components.\r\n */\r\n Plugin.dependencyParse = function(dependency) {\r\n if (Common.isString(dependency)) {\r\n var pattern = /^[\\w-]+(@(\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?))?$/;\r\n\r\n if (!pattern.test(dependency)) {\r\n Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.');\r\n }\r\n\r\n return {\r\n name: dependency.split('@')[0],\r\n range: dependency.split('@')[1] || '*'\r\n };\r\n }\r\n\r\n return {\r\n name: dependency.name,\r\n range: dependency.range || dependency.version\r\n };\r\n };\r\n\r\n /**\r\n * Parses a version string into its components. \r\n * Versions are strictly of the format `x.y.z` (as in [semver](http://semver.org/)).\r\n * Versions may optionally have a prerelease tag in the format `x.y.z-alpha`.\r\n * Ranges are a strict subset of [npm ranges](https://docs.npmjs.com/misc/semver#advanced-range-syntax).\r\n * Only the following range types are supported:\r\n * - Tilde ranges e.g. `~1.2.3`\r\n * - Caret ranges e.g. `^1.2.3`\r\n * - Exact version e.g. `1.2.3`\r\n * - Any version `*`\r\n * @method versionParse\r\n * @param range {string} The version string.\r\n * @return {object} The version range parsed into its components.\r\n */\r\n Plugin.versionParse = function(range) {\r\n var pattern = /^\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?$/;\r\n\r\n if (!pattern.test(range)) {\r\n Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');\r\n }\r\n\r\n var identifiers = range.split('-');\r\n range = identifiers[0];\r\n\r\n var isRange = isNaN(Number(range[0])),\r\n version = isRange ? range.substr(1) : range,\r\n parts = Common.map(version.split('.'), function(part) {\r\n return Number(part);\r\n });\r\n\r\n return {\r\n isRange: isRange,\r\n version: version,\r\n range: range,\r\n operator: isRange ? range[0] : '',\r\n parts: parts,\r\n prerelease: identifiers[1],\r\n number: parts[0] * 1e8 + parts[1] * 1e4 + parts[2]\r\n };\r\n };\r\n\r\n /**\r\n * Returns `true` if `version` satisfies the given `range`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * If a version or range is not specified, then any version (`*`) is assumed to satisfy.\r\n * @method versionSatisfies\r\n * @param version {string} The version string.\r\n * @param range {string} The range string.\r\n * @return {boolean} `true` if `version` satisfies `range`, otherwise `false`.\r\n */\r\n Plugin.versionSatisfies = function(version, range) {\r\n range = range || '*';\r\n\r\n var rangeParsed = Plugin.versionParse(range),\r\n rangeParts = rangeParsed.parts,\r\n versionParsed = Plugin.versionParse(version),\r\n versionParts = versionParsed.parts;\r\n\r\n if (rangeParsed.isRange) {\r\n if (rangeParsed.operator === '*' || version === '*') {\r\n return true;\r\n }\r\n\r\n if (rangeParsed.operator === '~') {\r\n return versionParts[0] === rangeParts[0] && versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n if (rangeParsed.operator === '^') {\r\n if (rangeParts[0] > 0) {\r\n return versionParts[0] === rangeParts[0] && versionParsed.number >= rangeParsed.number;\r\n }\r\n\r\n if (rangeParts[1] > 0) {\r\n return versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n return versionParts[2] === rangeParts[2];\r\n }\r\n }\r\n\r\n return version === range || version === '*';\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies.\r\n*\r\n* @class Sleeping\r\n*/\r\n\r\nvar Sleeping = {};\r\n\r\nmodule.exports = Sleeping;\r\n\r\nvar Events = __webpack_require__(/*! ./Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n(function() {\r\n\r\n Sleeping._motionWakeThreshold = 0.18;\r\n Sleeping._motionSleepThreshold = 0.08;\r\n Sleeping._minBias = 0.9;\r\n\r\n /**\r\n * Puts bodies to sleep or wakes them up depending on their motion.\r\n * @method update\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Sleeping.update = function(bodies, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // update bodies sleeping status\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed;\r\n\r\n // wake up bodies if they have a force applied\r\n if (body.force.x !== 0 || body.force.y !== 0) {\r\n Sleeping.set(body, false);\r\n continue;\r\n }\r\n\r\n var minMotion = Math.min(body.motion, motion),\r\n maxMotion = Math.max(body.motion, motion);\r\n \r\n // biased average motion estimation between frames\r\n body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion;\r\n \r\n if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) {\r\n body.sleepCounter += 1;\r\n \r\n if (body.sleepCounter >= body.sleepThreshold)\r\n Sleeping.set(body, true);\r\n } else if (body.sleepCounter > 0) {\r\n body.sleepCounter -= 1;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Given a set of colliding pairs, wakes the sleeping bodies involved.\r\n * @method afterCollisions\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Sleeping.afterCollisions = function(pairs, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // wake up bodies involved in collisions\r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n // don't wake inactive pairs\r\n if (!pair.isActive)\r\n continue;\r\n\r\n var collision = pair.collision,\r\n bodyA = collision.bodyA.parent, \r\n bodyB = collision.bodyB.parent;\r\n \r\n // don't wake if at least one body is static\r\n if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic)\r\n continue;\r\n \r\n if (bodyA.isSleeping || bodyB.isSleeping) {\r\n var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB,\r\n movingBody = sleepingBody === bodyA ? bodyB : bodyA;\r\n\r\n if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) {\r\n Sleeping.set(sleepingBody, false);\r\n }\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Set a body as sleeping or awake.\r\n * @method set\r\n * @param {body} body\r\n * @param {boolean} isSleeping\r\n */\r\n Sleeping.set = function(body, isSleeping) {\r\n var wasSleeping = body.isSleeping;\r\n\r\n if (isSleeping) {\r\n body.isSleeping = true;\r\n body.sleepCounter = body.sleepThreshold;\r\n\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n\r\n body.anglePrev = body.angle;\r\n body.speed = 0;\r\n body.angularSpeed = 0;\r\n body.motion = 0;\r\n\r\n if (!wasSleeping) {\r\n Events.trigger(body, 'sleepStart');\r\n }\r\n } else {\r\n body.isSleeping = false;\r\n body.sleepCounter = 0;\r\n\r\n if (wasSleeping) {\r\n Events.trigger(body, 'sleepEnd');\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n* with commonly used body configurations (such as rectangles, circles and other polygons).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Bodies\r\n*/\r\n\r\n// TODO: true circle bodies\r\n\r\nvar Bodies = {};\r\n\r\nmodule.exports = Bodies;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar decomp = __webpack_require__(/*! ../../poly-decomp */ \"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new rigid body model with a rectangle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method rectangle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {object} [options]\r\n * @return {body} A new rectangle body\r\n */\r\n Bodies.rectangle = function(x, y, width, height, options) {\r\n options = options || {};\r\n\r\n var rectangle = { \r\n label: 'Rectangle Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, rectangle, options));\r\n };\r\n \r\n /**\r\n * Creates a new rigid body model with a trapezoid hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method trapezoid\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} slope\r\n * @param {object} [options]\r\n * @return {body} A new trapezoid body\r\n */\r\n Bodies.trapezoid = function(x, y, width, height, slope, options) {\r\n options = options || {};\r\n\r\n slope *= 0.5;\r\n var roof = (1 - (slope * 2)) * width;\r\n \r\n var x1 = width * slope,\r\n x2 = x1 + roof,\r\n x3 = x2 + x1,\r\n verticesPath;\r\n\r\n if (slope < 0.5) {\r\n verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n } else {\r\n verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n }\r\n\r\n var trapezoid = { \r\n label: 'Trapezoid Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(verticesPath)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, trapezoid, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a circle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method circle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @param {number} [maxSides]\r\n * @return {body} A new circle body\r\n */\r\n Bodies.circle = function(x, y, radius, options, maxSides) {\r\n options = options || {};\r\n\r\n var circle = {\r\n label: 'Circle Body',\r\n circleRadius: radius\r\n };\r\n \r\n // approximate circles with polygons until true circles implemented in SAT\r\n maxSides = maxSides || 25;\r\n var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius)));\r\n\r\n // optimisation: always use even number of sides (half the number of unique axes)\r\n if (sides % 2 === 1)\r\n sides += 1;\r\n\r\n return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a regular polygon hull with the given number of sides. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method polygon\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} sides\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @return {body} A new regular polygon body\r\n */\r\n Bodies.polygon = function(x, y, sides, radius, options) {\r\n options = options || {};\r\n\r\n if (sides < 3)\r\n return Bodies.circle(x, y, radius, options);\r\n\r\n var theta = 2 * Math.PI / sides,\r\n path = '',\r\n offset = theta * 0.5;\r\n\r\n for (var i = 0; i < sides; i += 1) {\r\n var angle = offset + (i * theta),\r\n xx = Math.cos(angle) * radius,\r\n yy = Math.sin(angle) * radius;\r\n\r\n path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' ';\r\n }\r\n\r\n var polygon = { \r\n label: 'Polygon Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(path)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, polygon, options));\r\n };\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices).\r\n * If the vertices are convex, they will pass through as supplied.\r\n * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available.\r\n * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail).\r\n * By default the decomposition will discard collinear edges (to improve performance).\r\n * It can also optionally discard any parts that have an area less than `minimumArea`.\r\n * If the vertices can not be decomposed, the result will fall back to using the convex hull.\r\n * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method fromVertices\r\n * @param {number} x\r\n * @param {number} y\r\n * @param [[vector]] vertexSets\r\n * @param {object} [options]\r\n * @param {bool} [flagInternal=false]\r\n * @param {number} [removeCollinear=0.01]\r\n * @param {number} [minimumArea=10]\r\n * @return {body}\r\n */\r\n Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) {\r\n var body,\r\n parts,\r\n isConvex,\r\n vertices,\r\n i,\r\n j,\r\n k,\r\n v,\r\n z;\r\n\r\n options = options || {};\r\n parts = [];\r\n\r\n flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;\r\n removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;\r\n minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;\r\n\r\n if (!decomp) {\r\n Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.');\r\n }\r\n\r\n // ensure vertexSets is an array of arrays\r\n if (!Common.isArray(vertexSets[0])) {\r\n vertexSets = [vertexSets];\r\n }\r\n\r\n for (v = 0; v < vertexSets.length; v += 1) {\r\n vertices = vertexSets[v];\r\n isConvex = Vertices.isConvex(vertices);\r\n\r\n if (isConvex || !decomp) {\r\n if (isConvex) {\r\n vertices = Vertices.clockwiseSort(vertices);\r\n } else {\r\n // fallback to convex hull when decomposition is not possible\r\n vertices = Vertices.hull(vertices);\r\n }\r\n\r\n parts.push({\r\n position: { x: x, y: y },\r\n vertices: vertices\r\n });\r\n } else {\r\n // initialise a decomposition\r\n var concave = vertices.map(function(vertex) {\r\n return [vertex.x, vertex.y];\r\n });\r\n\r\n // vertices are concave and simple, we can decompose into parts\r\n decomp.makeCCW(concave);\r\n if (removeCollinear !== false)\r\n decomp.removeCollinearPoints(concave, removeCollinear);\r\n\r\n // use the quick decomposition algorithm (Bayazit)\r\n var decomposed = decomp.quickDecomp(concave);\r\n\r\n // for each decomposed chunk\r\n for (i = 0; i < decomposed.length; i++) {\r\n var chunk = decomposed[i];\r\n\r\n // convert vertices into the correct structure\r\n var chunkVertices = chunk.map(function(vertices) {\r\n return {\r\n x: vertices[0],\r\n y: vertices[1]\r\n };\r\n });\r\n\r\n // skip small chunks\r\n if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea)\r\n continue;\r\n\r\n // create a compound part\r\n parts.push({\r\n position: Vertices.centre(chunkVertices),\r\n vertices: chunkVertices\r\n });\r\n }\r\n }\r\n }\r\n\r\n // create body parts\r\n for (i = 0; i < parts.length; i++) {\r\n parts[i] = Body.create(Common.extend(parts[i], options));\r\n }\r\n\r\n // flag internal edges (coincident part edges)\r\n if (flagInternal) {\r\n var coincident_max_dist = 5;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++) {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++) {\r\n for (z = 0; z < partB.vertices.length; z++) {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincident_max_dist && db < coincident_max_dist) {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (parts.length > 1) {\r\n // create the parent body to be returned, that contains generated compound parts\r\n body = Body.create(Common.extend({ parts: parts.slice(0) }, options));\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n } else {\r\n return parts[0];\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composites` module contains factory methods for creating composite bodies\r\n* with commonly used configurations (such as stacks and chains).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composites\r\n*/\r\n\r\nvar Composites = {};\r\n\r\nmodule.exports = Composites;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ \"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bodies = __webpack_require__(/*! ./Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method stack\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n var stack = Composite.create({ label: 'Stack' }),\r\n x = xx,\r\n y = yy,\r\n lastBody,\r\n i = 0;\r\n\r\n for (var row = 0; row < rows; row++) {\r\n var maxHeight = 0;\r\n \r\n for (var column = 0; column < columns; column++) {\r\n var body = callback(x, y, column, row, lastBody, i);\r\n \r\n if (body) {\r\n var bodyHeight = body.bounds.max.y - body.bounds.min.y,\r\n bodyWidth = body.bounds.max.x - body.bounds.min.x; \r\n\r\n if (bodyHeight > maxHeight)\r\n maxHeight = bodyHeight;\r\n \r\n Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 });\r\n\r\n x = body.bounds.max.x + columnGap;\r\n\r\n Composite.addBody(stack, body);\r\n \r\n lastBody = body;\r\n i += 1;\r\n } else {\r\n x += columnGap;\r\n }\r\n }\r\n \r\n y += maxHeight + rowGap;\r\n x = xx;\r\n }\r\n\r\n return stack;\r\n };\r\n \r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n * @method chain\r\n * @param {composite} composite\r\n * @param {number} xOffsetA\r\n * @param {number} yOffsetA\r\n * @param {number} xOffsetB\r\n * @param {number} yOffsetB\r\n * @param {object} options\r\n * @return {composite} A new composite containing objects chained together with constraints\r\n */\r\n Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) {\r\n var bodies = composite.bodies;\r\n \r\n for (var i = 1; i < bodies.length; i++) {\r\n var bodyA = bodies[i - 1],\r\n bodyB = bodies[i],\r\n bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y,\r\n bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, \r\n bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y,\r\n bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x;\r\n \r\n var defaults = {\r\n bodyA: bodyA,\r\n pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA },\r\n bodyB: bodyB,\r\n pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB }\r\n };\r\n \r\n var constraint = Common.extend(defaults, options);\r\n \r\n Composite.addConstraint(composite, Constraint.create(constraint));\r\n }\r\n\r\n composite.label += ' Chain';\r\n \r\n return composite;\r\n };\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n * @method mesh\r\n * @param {composite} composite\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {boolean} crossBrace\r\n * @param {object} options\r\n * @return {composite} The composite containing objects meshed together with constraints\r\n */\r\n Composites.mesh = function(composite, columns, rows, crossBrace, options) {\r\n var bodies = composite.bodies,\r\n row,\r\n col,\r\n bodyA,\r\n bodyB,\r\n bodyC;\r\n \r\n for (row = 0; row < rows; row++) {\r\n for (col = 1; col < columns; col++) {\r\n bodyA = bodies[(col - 1) + (row * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (row > 0) {\r\n for (col = 0; col < columns; col++) {\r\n bodyA = bodies[col + ((row - 1) * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n\r\n if (crossBrace && col > 0) {\r\n bodyC = bodies[(col - 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (crossBrace && col < columns - 1) {\r\n bodyC = bodies[(col + 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n }\r\n }\r\n }\r\n\r\n composite.label += ' Mesh';\r\n \r\n return composite;\r\n };\r\n \r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method pyramid\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) {\r\n var actualRows = Math.min(rows, Math.ceil(columns / 2)),\r\n lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0;\r\n \r\n if (row > actualRows)\r\n return;\r\n \r\n // reverse row order\r\n row = actualRows - row;\r\n \r\n var start = row,\r\n end = columns - 1 - row;\r\n\r\n if (column < start || column > end)\r\n return;\r\n \r\n // retroactively fix the first body's position, since width was unknown\r\n if (i === 1) {\r\n Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 });\r\n }\r\n\r\n var xOffset = lastBody ? column * lastBodyWidth : 0;\r\n \r\n return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i);\r\n });\r\n };\r\n\r\n /**\r\n * Creates a composite with a Newton's Cradle setup of bodies and constraints.\r\n * @method newtonsCradle\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} number\r\n * @param {number} size\r\n * @param {number} length\r\n * @return {composite} A new composite newtonsCradle body\r\n */\r\n Composites.newtonsCradle = function(xx, yy, number, size, length) {\r\n var newtonsCradle = Composite.create({ label: 'Newtons Cradle' });\r\n\r\n for (var i = 0; i < number; i++) {\r\n var separation = 1.9,\r\n circle = Bodies.circle(xx + i * (size * separation), yy + length, size, \r\n { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }),\r\n constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle });\r\n\r\n Composite.addBody(newtonsCradle, circle);\r\n Composite.addConstraint(newtonsCradle, constraint);\r\n }\r\n\r\n return newtonsCradle;\r\n };\r\n \r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n * @method car\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} wheelSize\r\n * @return {composite} A new composite car body\r\n */\r\n Composites.car = function(xx, yy, width, height, wheelSize) {\r\n var group = Body.nextGroup(true),\r\n wheelBase = 20,\r\n wheelAOffset = -width * 0.5 + wheelBase,\r\n wheelBOffset = width * 0.5 - wheelBase,\r\n wheelYOffset = 0;\r\n \r\n var car = Composite.create({ label: 'Car' }),\r\n body = Bodies.rectangle(xx, yy, width, height, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n chamfer: {\r\n radius: height * 0.5\r\n },\r\n density: 0.0002\r\n });\r\n \r\n var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var axelA = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelAOffset, y: wheelYOffset },\r\n bodyA: wheelA,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n var axelB = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelBOffset, y: wheelYOffset },\r\n bodyA: wheelB,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n Composite.addBody(car, body);\r\n Composite.addBody(car, wheelA);\r\n Composite.addBody(car, wheelB);\r\n Composite.addConstraint(car, axelA);\r\n Composite.addConstraint(car, axelB);\r\n\r\n return car;\r\n };\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n * @method softBody\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {boolean} crossBrace\r\n * @param {number} particleRadius\r\n * @param {} particleOptions\r\n * @param {} constraintOptions\r\n * @return {composite} A new composite softBody\r\n */\r\n Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) {\r\n particleOptions = Common.extend({ inertia: Infinity }, particleOptions);\r\n constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions);\r\n\r\n var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) {\r\n return Bodies.circle(x, y, particleRadius, particleOptions);\r\n });\r\n\r\n Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions);\r\n\r\n softBody.label = 'Soft Body';\r\n\r\n return softBody;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Axes` module contains methods for creating and manipulating sets of axes.\r\n*\r\n* @class Axes\r\n*/\r\n\r\nvar Axes = {};\r\n\r\nmodule.exports = Axes;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of axes from the given vertices.\r\n * @method fromVertices\r\n * @param {vertices} vertices\r\n * @return {axes} A new axes from the given vertices\r\n */\r\n Axes.fromVertices = function(vertices) {\r\n var axes = {};\r\n\r\n // find the unique axes, using edge normal gradients\r\n for (var i = 0; i < vertices.length; i++) {\r\n var j = (i + 1) % vertices.length, \r\n normal = Vector.normalise({ \r\n x: vertices[j].y - vertices[i].y, \r\n y: vertices[i].x - vertices[j].x\r\n }),\r\n gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y);\r\n \r\n // limit precision\r\n gradient = gradient.toFixed(3).toString();\r\n axes[gradient] = normal;\r\n }\r\n\r\n return Common.values(axes);\r\n };\r\n\r\n /**\r\n * Rotates a set of axes by the given angle.\r\n * @method rotate\r\n * @param {axes} axes\r\n * @param {number} angle\r\n */\r\n Axes.rotate = function(axes, angle) {\r\n if (angle === 0)\r\n return;\r\n \r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n var axis = axes[i],\r\n xx;\r\n xx = axis.x * cos - axis.y * sin;\r\n axis.y = axis.x * sin + axis.y * cos;\r\n axis.x = xx;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js?')},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js":function(module,exports){eval("/**\r\n* The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).\r\n*\r\n* @class Bounds\r\n*/\r\n\r\nvar Bounds = {};\r\n\r\nmodule.exports = Bounds;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new axis-aligned bounding box (AABB) for the given vertices.\r\n * @method create\r\n * @param {vertices} vertices\r\n * @return {bounds} A new bounds object\r\n */\r\n Bounds.create = function(vertices) {\r\n var bounds = { \r\n min: { x: 0, y: 0 }, \r\n max: { x: 0, y: 0 }\r\n };\r\n\r\n if (vertices)\r\n Bounds.update(bounds, vertices);\r\n \r\n return bounds;\r\n };\r\n\r\n /**\r\n * Updates bounds using the given vertices and extends the bounds given a velocity.\r\n * @method update\r\n * @param {bounds} bounds\r\n * @param {vertices} vertices\r\n * @param {vector} velocity\r\n */\r\n Bounds.update = function(bounds, vertices, velocity) {\r\n bounds.min.x = Infinity;\r\n bounds.max.x = -Infinity;\r\n bounds.min.y = Infinity;\r\n bounds.max.y = -Infinity;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertex = vertices[i];\r\n if (vertex.x > bounds.max.x) bounds.max.x = vertex.x;\r\n if (vertex.x < bounds.min.x) bounds.min.x = vertex.x;\r\n if (vertex.y > bounds.max.y) bounds.max.y = vertex.y;\r\n if (vertex.y < bounds.min.y) bounds.min.y = vertex.y;\r\n }\r\n \r\n if (velocity) {\r\n if (velocity.x > 0) {\r\n bounds.max.x += velocity.x;\r\n } else {\r\n bounds.min.x += velocity.x;\r\n }\r\n \r\n if (velocity.y > 0) {\r\n bounds.max.y += velocity.y;\r\n } else {\r\n bounds.min.y += velocity.y;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Returns true if the bounds contains the given point.\r\n * @method contains\r\n * @param {bounds} bounds\r\n * @param {vector} point\r\n * @return {boolean} True if the bounds contain the point, otherwise false\r\n */\r\n Bounds.contains = function(bounds, point) {\r\n return point.x >= bounds.min.x && point.x <= bounds.max.x \r\n && point.y >= bounds.min.y && point.y <= bounds.max.y;\r\n };\r\n\r\n /**\r\n * Returns true if the two bounds intersect.\r\n * @method overlaps\r\n * @param {bounds} boundsA\r\n * @param {bounds} boundsB\r\n * @return {boolean} True if the bounds overlap, otherwise false\r\n */\r\n Bounds.overlaps = function(boundsA, boundsB) {\r\n return (boundsA.min.x <= boundsB.max.x && boundsA.max.x >= boundsB.min.x\r\n && boundsA.max.y >= boundsB.min.y && boundsA.min.y <= boundsB.max.y);\r\n };\r\n\r\n /**\r\n * Translates the bounds by the given vector.\r\n * @method translate\r\n * @param {bounds} bounds\r\n * @param {vector} vector\r\n */\r\n Bounds.translate = function(bounds, vector) {\r\n bounds.min.x += vector.x;\r\n bounds.max.x += vector.x;\r\n bounds.min.y += vector.y;\r\n bounds.max.y += vector.y;\r\n };\r\n\r\n /**\r\n * Shifts the bounds to the given position.\r\n * @method shift\r\n * @param {bounds} bounds\r\n * @param {vector} position\r\n */\r\n Bounds.shift = function(bounds, position) {\r\n var deltaX = bounds.max.x - bounds.min.x,\r\n deltaY = bounds.max.y - bounds.min.y;\r\n \r\n bounds.min.x = position.x;\r\n bounds.max.x = position.x + deltaX;\r\n bounds.min.y = position.y;\r\n bounds.max.y = position.y + deltaY;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.\r\n*\r\n* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Svg\r\n*/\r\n\r\nvar Svg = {};\r\n\r\nmodule.exports = Svg;\r\n\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Converts an SVG path into an array of vector points.\r\n * If the input path forms a concave shape, you must decompose the result into convex parts before use.\r\n * See `Bodies.fromVertices` which provides support for this.\r\n * Note that this function is not guaranteed to support complex paths (such as those with holes).\r\n * You must load the `pathseg.js` polyfill on newer browsers.\r\n * @method pathToVertices\r\n * @param {SVGPathElement} path\r\n * @param {Number} [sampleLength=15]\r\n * @return {Vector[]} points\r\n */\r\n Svg.pathToVertices = function(path, sampleLength) {\r\n if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) {\r\n Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.');\r\n }\r\n\r\n // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js\r\n var i, il, total, point, segment, segments, \r\n segmentsQueue, lastSegment, \r\n lastPoint, segmentIndex, points = [],\r\n lx, ly, length = 0, x = 0, y = 0;\r\n\r\n sampleLength = sampleLength || 15;\r\n\r\n var addPoint = function(px, py, pathSegType) {\r\n // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1)\r\n var isRelative = pathSegType % 2 === 1 && pathSegType > 1;\r\n\r\n // when the last point doesn't equal the current point add the current point\r\n if (!lastPoint || px != lastPoint.x || py != lastPoint.y) {\r\n if (lastPoint && isRelative) {\r\n lx = lastPoint.x;\r\n ly = lastPoint.y;\r\n } else {\r\n lx = 0;\r\n ly = 0;\r\n }\r\n\r\n var point = {\r\n x: lx + px,\r\n y: ly + py\r\n };\r\n\r\n // set last point\r\n if (isRelative || !lastPoint) {\r\n lastPoint = point;\r\n }\r\n\r\n points.push(point);\r\n\r\n x = lx + px;\r\n y = ly + py;\r\n }\r\n };\r\n\r\n var addSegmentPoint = function(segment) {\r\n var segType = segment.pathSegTypeAsLetter.toUpperCase();\r\n\r\n // skip path ends\r\n if (segType === 'Z') \r\n return;\r\n\r\n // map segment to x and y\r\n switch (segType) {\r\n\r\n case 'M':\r\n case 'L':\r\n case 'T':\r\n case 'C':\r\n case 'S':\r\n case 'Q':\r\n x = segment.x;\r\n y = segment.y;\r\n break;\r\n case 'H':\r\n x = segment.x;\r\n break;\r\n case 'V':\r\n y = segment.y;\r\n break;\r\n }\r\n\r\n addPoint(x, y, segment.pathSegType);\r\n };\r\n\r\n // ensure path is absolute\r\n Svg._svgPathToAbsolute(path);\r\n\r\n // get total length\r\n total = path.getTotalLength();\r\n\r\n // queue segments\r\n segments = [];\r\n for (i = 0; i < path.pathSegList.numberOfItems; i += 1)\r\n segments.push(path.pathSegList.getItem(i));\r\n\r\n segmentsQueue = segments.concat();\r\n\r\n // sample through path\r\n while (length < total) {\r\n // get segment at position\r\n segmentIndex = path.getPathSegAtLength(length);\r\n segment = segments[segmentIndex];\r\n\r\n // new segment\r\n if (segment != lastSegment) {\r\n while (segmentsQueue.length && segmentsQueue[0] != segment)\r\n addSegmentPoint(segmentsQueue.shift());\r\n\r\n lastSegment = segment;\r\n }\r\n\r\n // add points in between when curving\r\n // TODO: adaptive sampling\r\n switch (segment.pathSegTypeAsLetter.toUpperCase()) {\r\n\r\n case 'C':\r\n case 'T':\r\n case 'S':\r\n case 'Q':\r\n case 'A':\r\n point = path.getPointAtLength(length);\r\n addPoint(point.x, point.y, 0);\r\n break;\r\n\r\n }\r\n\r\n // increment by sample value\r\n length += sampleLength;\r\n }\r\n\r\n // add remaining segments not passed by sampling\r\n for (i = 0, il = segmentsQueue.length; i < il; ++i)\r\n addSegmentPoint(segmentsQueue[i]);\r\n\r\n return points;\r\n };\r\n\r\n Svg._svgPathToAbsolute = function(path) {\r\n // http://phrogz.net/convert-svg-path-to-all-absolute-commands\r\n // Copyright (c) Gavin Kistner\r\n // http://phrogz.net/js/_ReuseLicense.txt\r\n // Modifications: tidy formatting and naming\r\n var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,\r\n x = 0, y = 0, len = segs.numberOfItems;\r\n\r\n for (var i = 0; i < len; ++i) {\r\n var seg = segs.getItem(i),\r\n segType = seg.pathSegTypeAsLetter;\r\n\r\n if (/[MLHVCSQTA]/.test(segType)) {\r\n if ('x' in seg) x = seg.x;\r\n if ('y' in seg) y = seg.y;\r\n } else {\r\n if ('x1' in seg) x1 = x + seg.x1;\r\n if ('x2' in seg) x2 = x + seg.x2;\r\n if ('y1' in seg) y1 = y + seg.y1;\r\n if ('y2' in seg) y2 = y + seg.y2;\r\n if ('x' in seg) x += seg.x;\r\n if ('y' in seg) y += seg.y;\r\n\r\n switch (segType) {\r\n\r\n case 'm':\r\n segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i);\r\n break;\r\n case 'l':\r\n segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i);\r\n break;\r\n case 'h':\r\n segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i);\r\n break;\r\n case 'v':\r\n segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i);\r\n break;\r\n case 'c':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i);\r\n break;\r\n case 's':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i);\r\n break;\r\n case 'q':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i);\r\n break;\r\n case 't':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i);\r\n break;\r\n case 'a':\r\n segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i);\r\n break;\r\n case 'z':\r\n case 'Z':\r\n x = x0;\r\n y = y0;\r\n break;\r\n\r\n }\r\n }\r\n\r\n if (segType == 'M' || segType == 'm') {\r\n x0 = x;\r\n y0 = y;\r\n }\r\n }\r\n };\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js":function(module,exports){eval("/**\r\n* The `Matter.Vector` module contains methods for creating and manipulating vectors.\r\n* Vectors are the basis of all the geometry related operations in the engine.\r\n* A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vector\r\n*/\r\n\r\n// TODO: consider params for reusing vector objects\r\n\r\nvar Vector = {};\r\n\r\nmodule.exports = Vector;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new vector.\r\n * @method create\r\n * @param {number} x\r\n * @param {number} y\r\n * @return {vector} A new vector\r\n */\r\n Vector.create = function(x, y) {\r\n return { x: x || 0, y: y || 0 };\r\n };\r\n\r\n /**\r\n * Returns a new vector with `x` and `y` copied from the given `vector`.\r\n * @method clone\r\n * @param {vector} vector\r\n * @return {vector} A new cloned vector\r\n */\r\n Vector.clone = function(vector) {\r\n return { x: vector.x, y: vector.y };\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector.\r\n * @method magnitude\r\n * @param {vector} vector\r\n * @return {number} The magnitude of the vector\r\n */\r\n Vector.magnitude = function(vector) {\r\n return Math.sqrt((vector.x * vector.x) + (vector.y * vector.y));\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation).\r\n * @method magnitudeSquared\r\n * @param {vector} vector\r\n * @return {number} The squared magnitude of the vector\r\n */\r\n Vector.magnitudeSquared = function(vector) {\r\n return (vector.x * vector.x) + (vector.y * vector.y);\r\n };\r\n\r\n /**\r\n * Rotates the vector about (0, 0) by specified angle.\r\n * @method rotate\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} [output]\r\n * @return {vector} The vector rotated about (0, 0)\r\n */\r\n Vector.rotate = function(vector, angle, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = vector.x * cos - vector.y * sin;\r\n output.y = vector.x * sin + vector.y * cos;\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Rotates the vector about a specified point by specified angle.\r\n * @method rotateAbout\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} point\r\n * @param {vector} [output]\r\n * @return {vector} A new vector rotated about the point\r\n */\r\n Vector.rotateAbout = function(vector, angle, point, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = point.x + ((vector.x - point.x) * cos - (vector.y - point.y) * sin);\r\n output.y = point.y + ((vector.x - point.x) * sin + (vector.y - point.y) * cos);\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Normalises a vector (such that its magnitude is `1`).\r\n * @method normalise\r\n * @param {vector} vector\r\n * @return {vector} A new vector normalised\r\n */\r\n Vector.normalise = function(vector) {\r\n var magnitude = Vector.magnitude(vector);\r\n if (magnitude === 0)\r\n return { x: 0, y: 0 };\r\n return { x: vector.x / magnitude, y: vector.y / magnitude };\r\n };\r\n\r\n /**\r\n * Returns the dot-product of two vectors.\r\n * @method dot\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The dot product of the two vectors\r\n */\r\n Vector.dot = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.x) + (vectorA.y * vectorB.y);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of two vectors.\r\n * @method cross\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The cross product of the two vectors\r\n */\r\n Vector.cross = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.y) - (vectorA.y * vectorB.x);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of three vectors.\r\n * @method cross3\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} vectorC\r\n * @return {number} The cross product of the three vectors\r\n */\r\n Vector.cross3 = function(vectorA, vectorB, vectorC) {\r\n return (vectorB.x - vectorA.x) * (vectorC.y - vectorA.y) - (vectorB.y - vectorA.y) * (vectorC.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Adds the two vectors.\r\n * @method add\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB added\r\n */\r\n Vector.add = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x + vectorB.x;\r\n output.y = vectorA.y + vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Subtracts the two vectors.\r\n * @method sub\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB subtracted\r\n */\r\n Vector.sub = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x - vectorB.x;\r\n output.y = vectorA.y - vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Multiplies a vector and a scalar.\r\n * @method mult\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector multiplied by scalar\r\n */\r\n Vector.mult = function(vector, scalar) {\r\n return { x: vector.x * scalar, y: vector.y * scalar };\r\n };\r\n\r\n /**\r\n * Divides a vector and a scalar.\r\n * @method div\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector divided by scalar\r\n */\r\n Vector.div = function(vector, scalar) {\r\n return { x: vector.x / scalar, y: vector.y / scalar };\r\n };\r\n\r\n /**\r\n * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction.\r\n * @method perp\r\n * @param {vector} vector\r\n * @param {bool} [negate=false]\r\n * @return {vector} The perpendicular vector\r\n */\r\n Vector.perp = function(vector, negate) {\r\n negate = negate === true ? -1 : 1;\r\n return { x: negate * -vector.y, y: negate * vector.x };\r\n };\r\n\r\n /**\r\n * Negates both components of a vector such that it points in the opposite direction.\r\n * @method neg\r\n * @param {vector} vector\r\n * @return {vector} The negated vector\r\n */\r\n Vector.neg = function(vector) {\r\n return { x: -vector.x, y: -vector.y };\r\n };\r\n\r\n /**\r\n * Returns the angle between the vector `vectorB - vectorA` and the x-axis in radians.\r\n * @method angle\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The angle in radians\r\n */\r\n Vector.angle = function(vectorA, vectorB) {\r\n return Math.atan2(vectorB.y - vectorA.y, vectorB.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Temporary vector pool (not thread-safe).\r\n * @property _temp\r\n * @type {vector[]}\r\n * @private\r\n */\r\n Vector._temp = [\r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create()\r\n ];\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n* A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n* A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vertices\r\n*/\r\n\r\nvar Vertices = {};\r\n\r\nmodule.exports = Vertices;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of `Matter.Body` compatible vertices.\r\n * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example:\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects,\r\n * but with some additional references required for efficient collision detection routines.\r\n *\r\n * Vertices must be specified in clockwise order.\r\n *\r\n * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided.\r\n *\r\n * @method create\r\n * @param {vector[]} points\r\n * @param {body} body\r\n */\r\n Vertices.create = function(points, body) {\r\n var vertices = [];\r\n\r\n for (var i = 0; i < points.length; i++) {\r\n var point = points[i],\r\n vertex = {\r\n x: point.x,\r\n y: point.y,\r\n index: i,\r\n body: body,\r\n isInternal: false,\r\n contact: null\r\n };\r\n\r\n vertex.contact = {\r\n vertex: vertex,\r\n normalImpulse: 0,\r\n tangentImpulse: 0\r\n };\r\n\r\n vertices.push(vertex);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), \r\n * into a `Matter.Vertices` object for the given `Matter.Body`.\r\n * For parsing SVG paths, see `Svg.pathToVertices`.\r\n * @method fromPath\r\n * @param {string} path\r\n * @param {body} body\r\n * @return {vertices} vertices\r\n */\r\n Vertices.fromPath = function(path, body) {\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig,\r\n points = [];\r\n\r\n path.replace(pathPattern, function(match, x, y) {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return Vertices.create(points, body);\r\n };\r\n\r\n /**\r\n * Returns the centre (centroid) of the set of vertices.\r\n * @method centre\r\n * @param {vertices} vertices\r\n * @return {vector} The centre point\r\n */\r\n Vertices.centre = function(vertices) {\r\n var area = Vertices.area(vertices, true),\r\n centre = { x: 0, y: 0 },\r\n cross,\r\n temp,\r\n j;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n j = (i + 1) % vertices.length;\r\n cross = Vector.cross(vertices[i], vertices[j]);\r\n temp = Vector.mult(Vector.add(vertices[i], vertices[j]), cross);\r\n centre = Vector.add(centre, temp);\r\n }\r\n\r\n return Vector.div(centre, 6 * area);\r\n };\r\n\r\n /**\r\n * Returns the average (mean) of the set of vertices.\r\n * @method mean\r\n * @param {vertices} vertices\r\n * @return {vector} The average point\r\n */\r\n Vertices.mean = function(vertices) {\r\n var average = { x: 0, y: 0 };\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n average.x += vertices[i].x;\r\n average.y += vertices[i].y;\r\n }\r\n\r\n return Vector.div(average, vertices.length);\r\n };\r\n\r\n /**\r\n * Returns the area of the set of vertices.\r\n * @method area\r\n * @param {vertices} vertices\r\n * @param {bool} signed\r\n * @return {number} The area\r\n */\r\n Vertices.area = function(vertices, signed) {\r\n var area = 0,\r\n j = vertices.length - 1;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n area += (vertices[j].x - vertices[i].x) * (vertices[j].y + vertices[i].y);\r\n j = i;\r\n }\r\n\r\n if (signed)\r\n return area / 2;\r\n\r\n return Math.abs(area) / 2;\r\n };\r\n\r\n /**\r\n * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass.\r\n * @method inertia\r\n * @param {vertices} vertices\r\n * @param {number} mass\r\n * @return {number} The polygon's moment of inertia\r\n */\r\n Vertices.inertia = function(vertices, mass) {\r\n var numerator = 0,\r\n denominator = 0,\r\n v = vertices,\r\n cross,\r\n j;\r\n\r\n // find the polygon's moment of inertia, using second moment of area\r\n // from equations at http://www.physicsforums.com/showthread.php?t=25293\r\n for (var n = 0; n < v.length; n++) {\r\n j = (n + 1) % v.length;\r\n cross = Math.abs(Vector.cross(v[j], v[n]));\r\n numerator += cross * (Vector.dot(v[j], v[j]) + Vector.dot(v[j], v[n]) + Vector.dot(v[n], v[n]));\r\n denominator += cross;\r\n }\r\n\r\n return (mass / 6) * (numerator / denominator);\r\n };\r\n\r\n /**\r\n * Translates the set of vertices in-place.\r\n * @method translate\r\n * @param {vertices} vertices\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n */\r\n Vertices.translate = function(vertices, vector, scalar) {\r\n var i;\r\n if (scalar) {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x * scalar;\r\n vertices[i].y += vector.y * scalar;\r\n }\r\n } else {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x;\r\n vertices[i].y += vector.y;\r\n }\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Rotates the set of vertices in-place.\r\n * @method rotate\r\n * @param {vertices} vertices\r\n * @param {number} angle\r\n * @param {vector} point\r\n */\r\n Vertices.rotate = function(vertices, angle, point) {\r\n if (angle === 0)\r\n return;\r\n\r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n dx = vertice.x - point.x,\r\n dy = vertice.y - point.y;\r\n \r\n vertice.x = point.x + (dx * cos - dy * sin);\r\n vertice.y = point.y + (dx * sin + dy * cos);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns `true` if the `point` is inside the set of `vertices`.\r\n * @method contains\r\n * @param {vertices} vertices\r\n * @param {vector} point\r\n * @return {boolean} True if the vertices contains point, otherwise false\r\n */\r\n Vertices.contains = function(vertices, point) {\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n nextVertice = vertices[(i + 1) % vertices.length];\r\n if ((point.x - vertice.x) * (nextVertice.y - vertice.y) + (point.y - vertice.y) * (vertice.x - nextVertice.x) > 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Scales the vertices from a point (default is centre) in-place.\r\n * @method scale\r\n * @param {vertices} vertices\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n */\r\n Vertices.scale = function(vertices, scaleX, scaleY, point) {\r\n if (scaleX === 1 && scaleY === 1)\r\n return vertices;\r\n\r\n point = point || Vertices.centre(vertices);\r\n\r\n var vertex,\r\n delta;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n delta = Vector.sub(vertex, point);\r\n vertices[i].x = point.x + delta.x * scaleX;\r\n vertices[i].y = point.y + delta.y * scaleY;\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices.\r\n * The radius parameter is a single number or an array to specify the radius for each vertex.\r\n * @method chamfer\r\n * @param {vertices} vertices\r\n * @param {number[]} radius\r\n * @param {number} quality\r\n * @param {number} qualityMin\r\n * @param {number} qualityMax\r\n */\r\n Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {\r\n if (typeof radius === 'number') {\r\n radius = [radius];\r\n } else {\r\n radius = radius || [8];\r\n }\r\n\r\n // quality defaults to -1, which is auto\r\n quality = (typeof quality !== 'undefined') ? quality : -1;\r\n qualityMin = qualityMin || 2;\r\n qualityMax = qualityMax || 14;\r\n\r\n var newVertices = [];\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var prevVertex = vertices[i - 1 >= 0 ? i - 1 : vertices.length - 1],\r\n vertex = vertices[i],\r\n nextVertex = vertices[(i + 1) % vertices.length],\r\n currentRadius = radius[i < radius.length ? i : radius.length - 1];\r\n\r\n if (currentRadius === 0) {\r\n newVertices.push(vertex);\r\n continue;\r\n }\r\n\r\n var prevNormal = Vector.normalise({ \r\n x: vertex.y - prevVertex.y, \r\n y: prevVertex.x - vertex.x\r\n });\r\n\r\n var nextNormal = Vector.normalise({ \r\n x: nextVertex.y - vertex.y, \r\n y: vertex.x - nextVertex.x\r\n });\r\n\r\n var diagonalRadius = Math.sqrt(2 * Math.pow(currentRadius, 2)),\r\n radiusVector = Vector.mult(Common.clone(prevNormal), currentRadius),\r\n midNormal = Vector.normalise(Vector.mult(Vector.add(prevNormal, nextNormal), 0.5)),\r\n scaledVertex = Vector.sub(vertex, Vector.mult(midNormal, diagonalRadius));\r\n\r\n var precision = quality;\r\n\r\n if (quality === -1) {\r\n // automatically decide precision\r\n precision = Math.pow(currentRadius, 0.32) * 1.75;\r\n }\r\n\r\n precision = Common.clamp(precision, qualityMin, qualityMax);\r\n\r\n // use an even value for precision, more likely to reduce axes by using symmetry\r\n if (precision % 2 === 1)\r\n precision += 1;\r\n\r\n var alpha = Math.acos(Vector.dot(prevNormal, nextNormal)),\r\n theta = alpha / precision;\r\n\r\n for (var j = 0; j < precision; j++) {\r\n newVertices.push(Vector.add(Vector.rotate(radiusVector, theta * j), scaledVertex));\r\n }\r\n }\r\n\r\n return newVertices;\r\n };\r\n\r\n /**\r\n * Sorts the input vertices into clockwise order in place.\r\n * @method clockwiseSort\r\n * @param {vertices} vertices\r\n * @return {vertices} vertices\r\n */\r\n Vertices.clockwiseSort = function(vertices) {\r\n var centre = Vertices.mean(vertices);\r\n\r\n vertices.sort(function(vertexA, vertexB) {\r\n return Vector.angle(centre, vertexA) - Vector.angle(centre, vertexB);\r\n });\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns true if the vertices form a convex shape (vertices must be in clockwise order).\r\n * @method isConvex\r\n * @param {vertices} vertices\r\n * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable).\r\n */\r\n Vertices.isConvex = function(vertices) {\r\n // http://paulbourke.net/geometry/polygonmesh/\r\n // Copyright (c) Paul Bourke (use permitted)\r\n\r\n var flag = 0,\r\n n = vertices.length,\r\n i,\r\n j,\r\n k,\r\n z;\r\n\r\n if (n < 3)\r\n return null;\r\n\r\n for (i = 0; i < n; i++) {\r\n j = (i + 1) % n;\r\n k = (i + 2) % n;\r\n z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y);\r\n z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x);\r\n\r\n if (z < 0) {\r\n flag |= 1;\r\n } else if (z > 0) {\r\n flag |= 2;\r\n }\r\n\r\n if (flag === 3) {\r\n return false;\r\n }\r\n }\r\n\r\n if (flag !== 0){\r\n return true;\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n /**\r\n * Returns the convex hull of the input vertices as a new array of points.\r\n * @method hull\r\n * @param {vertices} vertices\r\n * @return [vertex] vertices\r\n */\r\n Vertices.hull = function(vertices) {\r\n // http://geomalgorithms.com/a10-_hull-1.html\r\n\r\n var upper = [],\r\n lower = [], \r\n vertex,\r\n i;\r\n\r\n // sort vertices on x-axis (y-axis for ties)\r\n vertices = vertices.slice(0);\r\n vertices.sort(function(vertexA, vertexB) {\r\n var dx = vertexA.x - vertexB.x;\r\n return dx !== 0 ? dx : vertexA.y - vertexB.y;\r\n });\r\n\r\n // build lower hull\r\n for (i = 0; i < vertices.length; i += 1) {\r\n vertex = vertices[i];\r\n\r\n while (lower.length >= 2 \r\n && Vector.cross3(lower[lower.length - 2], lower[lower.length - 1], vertex) <= 0) {\r\n lower.pop();\r\n }\r\n\r\n lower.push(vertex);\r\n }\r\n\r\n // build upper hull\r\n for (i = vertices.length - 1; i >= 0; i -= 1) {\r\n vertex = vertices[i];\r\n\r\n while (upper.length >= 2 \r\n && Vector.cross3(upper[upper.length - 2], upper[upper.length - 1], vertex) <= 0) {\r\n upper.pop();\r\n }\r\n\r\n upper.push(vertex);\r\n }\r\n\r\n // concatenation of the lower and upper hulls gives the convex hull\r\n // omit last points because they are repeated at the beginning of the other list\r\n upper.pop();\r\n lower.pop();\r\n\r\n return upper.concat(lower);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * An attractors plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterAttractors\r\n */\r\nvar MatterAttractors = {\r\n // plugin meta\r\n name: 'matter-attractors', // PLUGIN_NAME\r\n version: '0.1.7', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Body.create', function() {\r\n MatterAttractors.Body.init(this);\r\n });\r\n\r\n base.before('Engine.update', function(engine) {\r\n MatterAttractors.Engine.update(engine);\r\n });\r\n },\r\n\r\n Body: {\r\n /**\r\n * Initialises the `body` to support attractors.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Body.init\r\n * @param {Matter.Body} body The body to init.\r\n * @returns {void} No return value.\r\n */\r\n init: function(body) {\r\n body.plugin.attractors = body.plugin.attractors || [];\r\n }\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Applies all attractors for all bodies in the `engine`.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var bodyA = bodies[i],\r\n attractors = bodyA.plugin.attractors;\r\n\r\n if (attractors && attractors.length > 0) {\r\n for (var j = i + 1; j < bodies.length; j += 1) {\r\n var bodyB = bodies[j];\r\n\r\n for (var k = 0; k < attractors.length; k += 1) {\r\n var attractor = attractors[k],\r\n forceVector = attractor;\r\n\r\n if (Matter.Common.isFunction(attractor)) {\r\n forceVector = attractor(bodyA, bodyB);\r\n }\r\n\r\n if (forceVector) {\r\n Matter.Body.applyForce(bodyB, bodyB.position, forceVector);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Defines some useful common attractor functions that can be used\r\n * by pushing them to your body's `body.plugin.attractors` array.\r\n * @namespace MatterAttractors.Attractors\r\n * @property {number} gravityConstant The gravitational constant used by the gravity attractor.\r\n */\r\n Attractors: {\r\n gravityConstant: 0.001,\r\n\r\n /**\r\n * An attractor function that applies Newton's law of gravitation.\r\n * Use this by pushing `MatterAttractors.Attractors.gravity` to your body's `body.plugin.attractors` array.\r\n * The gravitational constant defaults to `0.001` which you can change\r\n * at `MatterAttractors.Attractors.gravityConstant`.\r\n * @function MatterAttractors.Attractors.gravity\r\n * @param {Matter.Body} bodyA The first body.\r\n * @param {Matter.Body} bodyB The second body.\r\n * @returns {void} No return value.\r\n */\r\n gravity: function(bodyA, bodyB) {\r\n // use Newton's law of gravitation\r\n var bToA = Matter.Vector.sub(bodyB.position, bodyA.position),\r\n distanceSq = Matter.Vector.magnitudeSquared(bToA) || 0.0001,\r\n normal = Matter.Vector.normalise(bToA),\r\n magnitude = -MatterAttractors.Attractors.gravityConstant * (bodyA.mass * bodyB.mass / distanceSq),\r\n force = Matter.Vector.mult(normal, magnitude);\r\n\r\n // to apply forces to both bodies\r\n Matter.Body.applyForce(bodyA, bodyA.position, Matter.Vector.neg(force));\r\n Matter.Body.applyForce(bodyB, bodyB.position, force);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterAttractors;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.attractors` to instances of `Matter.Body`.\r\n * This is an array of callback functions that will be called automatically\r\n * for every pair of bodies, on every engine update.\r\n * @property {Function[]} body.plugin.attractors\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * An attractor function calculates the force to be applied\r\n * to `bodyB`, it should either:\r\n * - return the force vector to be applied to `bodyB`\r\n * - or apply the force to the body(s) itself\r\n * @callback AttractorFunction\r\n * @param {Matter.Body} bodyA\r\n * @param {Matter.Body} bodyB\r\n * @returns {(Vector|undefined)} a force vector (optional)\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * A coordinate wrapping plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterWrap\r\n */\r\nvar MatterWrap = {\r\n // plugin meta\r\n name: 'matter-wrap', // PLUGIN_NAME\r\n version: '0.1.4', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Engine.update', function() {\r\n MatterWrap.Engine.update(this);\r\n });\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Updates the engine by wrapping bodies and composites inside `engine.world`.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world),\r\n composites = Matter.Composite.allComposites(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n\r\n if (body.plugin.wrap) {\r\n MatterWrap.Body.wrap(body, body.plugin.wrap);\r\n }\r\n }\r\n\r\n for (i = 0; i < composites.length; i += 1) {\r\n var composite = composites[i];\r\n\r\n if (composite.plugin.wrap) {\r\n MatterWrap.Composite.wrap(composite, composite.plugin.wrap);\r\n }\r\n }\r\n }\r\n },\r\n\r\n Bounds: {\r\n /**\r\n * Returns a translation vector that wraps the `objectBounds` inside the `bounds`.\r\n * @function MatterWrap.Bounds.wrap\r\n * @param {Matter.Bounds} objectBounds The bounds of the object to wrap inside the bounds.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} A translation vector (only if wrapping is required).\r\n */\r\n wrap: function(objectBounds, bounds) {\r\n var x = null,\r\n y = null;\r\n\r\n if (typeof bounds.min.x !== 'undefined' && typeof bounds.max.x !== 'undefined') {\r\n if (objectBounds.min.x > bounds.max.x) {\r\n x = bounds.min.x - objectBounds.max.x;\r\n } else if (objectBounds.max.x < bounds.min.x) {\r\n x = bounds.max.x - objectBounds.min.x;\r\n }\r\n }\r\n\r\n if (typeof bounds.min.y !== 'undefined' && typeof bounds.max.y !== 'undefined') {\r\n if (objectBounds.min.y > bounds.max.y) {\r\n y = bounds.min.y - objectBounds.max.y;\r\n } else if (objectBounds.max.y < bounds.min.y) {\r\n y = bounds.max.y - objectBounds.min.y;\r\n }\r\n }\r\n\r\n if (x !== null || y !== null) {\r\n return {\r\n x: x || 0,\r\n y: y || 0\r\n };\r\n }\r\n }\r\n },\r\n\r\n Body: {\r\n /**\r\n * Wraps the `body` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the body will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Body.wrap\r\n * @param {Matter.Body} body The body to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(body, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(body.bounds, bounds);\r\n\r\n if (translation) {\r\n Matter.Body.translate(body, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n },\r\n\r\n Composite: {\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies\r\n * (not accounting for constraints).\r\n * @function MatterWrap.Composite.bounds\r\n * @param {Matter.Composite} composite The composite.\r\n * @returns {Matter.Bounds} The composite bounds.\r\n */\r\n bounds: function(composite) {\r\n var bodies = Matter.Composite.allBodies(composite),\r\n vertices = [];\r\n \r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Matter.Bounds.create(vertices);\r\n },\r\n\r\n /**\r\n * Wraps the `composite` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the composite will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Composite.wrap\r\n * @param {Matter.Composite} composite The composite to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the composite inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(composite, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(\r\n MatterWrap.Composite.bounds(composite), \r\n bounds\r\n );\r\n\r\n if (translation) {\r\n Matter.Composite.translate(composite, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterWrap;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.wrap` to instances of `Matter.Body`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} body.plugin.wrap\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `composite.plugin.wrap` to instances of `Matter.Composite`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} composite.plugin.wrap\r\n * @memberof Matter.Composite\r\n */\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js?")},"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js":function(module,exports){eval('/**\r\n * @author Stefan Hedman (http://steffe.se)\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// v0.3.0\r\n\r\nmodule.exports = {\r\n decomp: polygonDecomp,\r\n quickDecomp: polygonQuickDecomp,\r\n isSimple: polygonIsSimple,\r\n removeCollinearPoints: polygonRemoveCollinearPoints,\r\n removeDuplicatePoints: polygonRemoveDuplicatePoints,\r\n makeCCW: polygonMakeCCW\r\n};\r\n\r\n/**\r\n * Compute the intersection between two lines.\r\n * @static\r\n * @method lineInt\r\n * @param {Array} l1 Line vector 1\r\n * @param {Array} l2 Line vector 2\r\n * @param {Number} precision Precision to use when checking if the lines are parallel\r\n * @return {Array} The intersection point.\r\n */\r\nfunction lineInt(l1,l2,precision){\r\n precision = precision || 0;\r\n var i = [0,0]; // point\r\n var a1, b1, c1, a2, b2, c2, det; // scalars\r\n a1 = l1[1][1] - l1[0][1];\r\n b1 = l1[0][0] - l1[1][0];\r\n c1 = a1 * l1[0][0] + b1 * l1[0][1];\r\n a2 = l2[1][1] - l2[0][1];\r\n b2 = l2[0][0] - l2[1][0];\r\n c2 = a2 * l2[0][0] + b2 * l2[0][1];\r\n det = a1 * b2 - a2*b1;\r\n if (!scalar_eq(det, 0, precision)) { // lines are not parallel\r\n i[0] = (b2 * c1 - b1 * c2) / det;\r\n i[1] = (a1 * c2 - a2 * c1) / det;\r\n }\r\n return i;\r\n}\r\n\r\n/**\r\n * Checks if two line segments intersects.\r\n * @method segmentsIntersect\r\n * @param {Array} p1 The start vertex of the first line segment.\r\n * @param {Array} p2 The end vertex of the first line segment.\r\n * @param {Array} q1 The start vertex of the second line segment.\r\n * @param {Array} q2 The end vertex of the second line segment.\r\n * @return {Boolean} True if the two line segments intersect\r\n */\r\nfunction lineSegmentsIntersect(p1, p2, q1, q2){\r\n\tvar dx = p2[0] - p1[0];\r\n\tvar dy = p2[1] - p1[1];\r\n\tvar da = q2[0] - q1[0];\r\n\tvar db = q2[1] - q1[1];\r\n\r\n\t// segments are parallel\r\n\tif((da*dy - db*dx) === 0){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar s = (dx * (q1[1] - p1[1]) + dy * (p1[0] - q1[0])) / (da * dy - db * dx);\r\n\tvar t = (da * (p1[1] - q1[1]) + db * (q1[0] - p1[0])) / (db * dx - da * dy);\r\n\r\n\treturn (s>=0 && s<=1 && t>=0 && t<=1);\r\n}\r\n\r\n/**\r\n * Get the area of a triangle spanned by the three given points. Note that the area will be negative if the points are not given in counter-clockwise order.\r\n * @static\r\n * @method area\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @return {Number}\r\n */\r\nfunction triangleArea(a,b,c){\r\n return (((b[0] - a[0])*(c[1] - a[1]))-((c[0] - a[0])*(b[1] - a[1])));\r\n}\r\n\r\nfunction isLeft(a,b,c){\r\n return triangleArea(a,b,c) > 0;\r\n}\r\n\r\nfunction isLeftOn(a,b,c) {\r\n return triangleArea(a, b, c) >= 0;\r\n}\r\n\r\nfunction isRight(a,b,c) {\r\n return triangleArea(a, b, c) < 0;\r\n}\r\n\r\nfunction isRightOn(a,b,c) {\r\n return triangleArea(a, b, c) <= 0;\r\n}\r\n\r\nvar tmpPoint1 = [],\r\n tmpPoint2 = [];\r\n\r\n/**\r\n * Check if three points are collinear\r\n * @method collinear\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @param {Number} [thresholdAngle=0] Threshold angle to use when comparing the vectors. The function will return true if the angle between the resulting vectors is less than this value. Use zero for max precision.\r\n * @return {Boolean}\r\n */\r\nfunction collinear(a,b,c,thresholdAngle) {\r\n if(!thresholdAngle){\r\n return triangleArea(a, b, c) === 0;\r\n } else {\r\n var ab = tmpPoint1,\r\n bc = tmpPoint2;\r\n\r\n ab[0] = b[0]-a[0];\r\n ab[1] = b[1]-a[1];\r\n bc[0] = c[0]-b[0];\r\n bc[1] = c[1]-b[1];\r\n\r\n var dot = ab[0]*bc[0] + ab[1]*bc[1],\r\n magA = Math.sqrt(ab[0]*ab[0] + ab[1]*ab[1]),\r\n magB = Math.sqrt(bc[0]*bc[0] + bc[1]*bc[1]),\r\n angle = Math.acos(dot/(magA*magB));\r\n return angle < thresholdAngle;\r\n }\r\n}\r\n\r\nfunction sqdist(a,b){\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return dx * dx + dy * dy;\r\n}\r\n\r\n/**\r\n * Get a vertex at position i. It does not matter if i is out of bounds, this function will just cycle.\r\n * @method at\r\n * @param {Number} i\r\n * @return {Array}\r\n */\r\nfunction polygonAt(polygon, i){\r\n var s = polygon.length;\r\n return polygon[i < 0 ? i % s + s : i % s];\r\n}\r\n\r\n/**\r\n * Clear the polygon data\r\n * @method clear\r\n * @return {Array}\r\n */\r\nfunction polygonClear(polygon){\r\n polygon.length = 0;\r\n}\r\n\r\n/**\r\n * Append points "from" to "to"-1 from an other polygon "poly" onto this one.\r\n * @method append\r\n * @param {Polygon} poly The polygon to get points from.\r\n * @param {Number} from The vertex index in "poly".\r\n * @param {Number} to The end vertex index in "poly". Note that this vertex is NOT included when appending.\r\n * @return {Array}\r\n */\r\nfunction polygonAppend(polygon, poly, from, to){\r\n for(var i=from; i v[br][0])) {\r\n br = i;\r\n }\r\n }\r\n\r\n // reverse poly if clockwise\r\n if (!isLeft(polygonAt(polygon, br - 1), polygonAt(polygon, br), polygonAt(polygon, br + 1))) {\r\n polygonReverse(polygon);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Reverse the vertices in the polygon\r\n * @method reverse\r\n */\r\nfunction polygonReverse(polygon){\r\n var tmp = [];\r\n var N = polygon.length;\r\n for(var i=0; i!==N; i++){\r\n tmp.push(polygon.pop());\r\n }\r\n for(var i=0; i!==N; i++){\r\n\t\tpolygon[i] = tmp[i];\r\n }\r\n}\r\n\r\n/**\r\n * Check if a point in the polygon is a reflex point\r\n * @method isReflex\r\n * @param {Number} i\r\n * @return {Boolean}\r\n */\r\nfunction polygonIsReflex(polygon, i){\r\n return isRight(polygonAt(polygon, i - 1), polygonAt(polygon, i), polygonAt(polygon, i + 1));\r\n}\r\n\r\nvar tmpLine1=[],\r\n tmpLine2=[];\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee(polygon, a,b) {\r\n var p, dist, l1=tmpLine1, l2=tmpLine2;\r\n\r\n if (isLeftOn(polygonAt(polygon, a + 1), polygonAt(polygon, a), polygonAt(polygon, b)) && isRightOn(polygonAt(polygon, a - 1), polygonAt(polygon, a), polygonAt(polygon, b))) {\r\n return false;\r\n }\r\n dist = sqdist(polygonAt(polygon, a), polygonAt(polygon, b));\r\n for (var i = 0; i !== polygon.length; ++i) { // for each edge\r\n if ((i + 1) % polygon.length === a || i === a){ // ignore incident edges\r\n continue;\r\n }\r\n if (isLeftOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i + 1)) && isRightOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i))) { // if diag intersects an edge\r\n l1[0] = polygonAt(polygon, a);\r\n l1[1] = polygonAt(polygon, b);\r\n l2[0] = polygonAt(polygon, i);\r\n l2[1] = polygonAt(polygon, i + 1);\r\n p = lineInt(l1,l2);\r\n if (sqdist(polygonAt(polygon, a), p) < dist) { // if edge is blocking visibility to b\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee2\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee2(polygon, a,b) {\r\n // for each edge\r\n for (var i = 0; i !== polygon.length; ++i) {\r\n // ignore incident edges\r\n if (i === a || i === b || (i + 1) % polygon.length === a || (i + 1) % polygon.length === b){\r\n continue;\r\n }\r\n if( lineSegmentsIntersect(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i), polygonAt(polygon, i+1)) ){\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Copy the polygon from vertex i to vertex j.\r\n * @method copy\r\n * @param {Number} i\r\n * @param {Number} j\r\n * @param {Polygon} [targetPoly] Optional target polygon to save in.\r\n * @return {Polygon} The resulting copy.\r\n */\r\nfunction polygonCopy(polygon, i,j,targetPoly){\r\n var p = targetPoly || [];\r\n polygonClear(p);\r\n if (i < j) {\r\n // Insert all vertices from i to j\r\n for(var k=i; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n } else {\r\n\r\n // Insert vertices 0 to j\r\n for(var k=0; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n // Insert vertices i to end\r\n for(var k=i; k 0){\r\n return polygonSlice(polygon, edges);\r\n } else {\r\n return [polygon];\r\n }\r\n}\r\n\r\n/**\r\n * Slices the polygon given one or more cut edges. If given one, this function will return two polygons (false on failure). If many, an array of polygons.\r\n * @method slice\r\n * @param {Array} cutEdges A list of edges, as returned by .getCutEdges()\r\n * @return {Array}\r\n */\r\nfunction polygonSlice(polygon, cutEdges){\r\n if(cutEdges.length === 0){\r\n\t\treturn [polygon];\r\n }\r\n if(cutEdges instanceof Array && cutEdges.length && cutEdges[0] instanceof Array && cutEdges[0].length===2 && cutEdges[0][0] instanceof Array){\r\n\r\n var polys = [polygon];\r\n\r\n for(var i=0; i maxlevel){\r\n console.warn("quickDecomp: max level ("+maxlevel+") reached.");\r\n return result;\r\n }\r\n\r\n for (var i = 0; i < polygon.length; ++i) {\r\n if (polygonIsReflex(poly, i)) {\r\n reflexVertices.push(poly[i]);\r\n upperDist = lowerDist = Number.MAX_VALUE;\r\n\r\n\r\n for (var j = 0; j < polygon.length; ++j) {\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) && isRightOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j - 1))) { // if line intersects with an edge\r\n p = getIntersectionPoint(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j - 1)); // find the point of intersection\r\n if (isRight(polygonAt(poly, i + 1), polygonAt(poly, i), p)) { // make sure it\'s inside the poly\r\n d = sqdist(poly[i], p);\r\n if (d < lowerDist) { // keep only the closest intersection\r\n lowerDist = d;\r\n lowerInt = p;\r\n lowerIndex = j;\r\n }\r\n }\r\n }\r\n if (isLeft(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j + 1)) && isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))) {\r\n p = getIntersectionPoint(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j + 1));\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), p)) {\r\n d = sqdist(poly[i], p);\r\n if (d < upperDist) {\r\n upperDist = d;\r\n upperInt = p;\r\n upperIndex = j;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // if there are no vertices to connect to, choose a point in the middle\r\n if (lowerIndex === (upperIndex + 1) % polygon.length) {\r\n //console.log("Case 1: Vertex("+i+"), lowerIndex("+lowerIndex+"), upperIndex("+upperIndex+"), poly.size("+polygon.length+")");\r\n p[0] = (lowerInt[0] + upperInt[0]) / 2;\r\n p[1] = (lowerInt[1] + upperInt[1]) / 2;\r\n steinerPoints.push(p);\r\n\r\n if (i < upperIndex) {\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly, i, upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n if (lowerIndex !== 0){\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.end());\r\n polygonAppend(upperPoly, poly,lowerIndex,poly.length);\r\n }\r\n //upperPoly.insert(upperPoly.end(), poly.begin(), poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.end());\r\n polygonAppend(lowerPoly, poly,i,poly.length);\r\n }\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin(), poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly,0,upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,lowerIndex,i+1);\r\n }\r\n } else {\r\n // connect to the closest point within the triangle\r\n //console.log("Case 2: Vertex("+i+"), closestIndex("+closestIndex+"), poly.size("+polygon.length+")\\n");\r\n\r\n if (lowerIndex > upperIndex) {\r\n upperIndex += polygon.length;\r\n }\r\n closestDist = Number.MAX_VALUE;\r\n\r\n if(upperIndex < lowerIndex){\r\n return result;\r\n }\r\n\r\n for (var j = lowerIndex; j <= upperIndex; ++j) {\r\n if (\r\n isLeftOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) &&\r\n isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))\r\n ) {\r\n d = sqdist(polygonAt(poly, i), polygonAt(poly, j));\r\n if (d < closestDist && polygonCanSee2(poly, i, j)) {\r\n closestDist = d;\r\n closestIndex = j % polygon.length;\r\n }\r\n }\r\n }\r\n\r\n if (i < closestIndex) {\r\n polygonAppend(lowerPoly, poly,i,closestIndex+1);\r\n if (closestIndex !== 0){\r\n polygonAppend(upperPoly, poly,closestIndex,v.length);\r\n }\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n polygonAppend(lowerPoly, poly,i,v.length);\r\n }\r\n polygonAppend(lowerPoly, poly,0,closestIndex+1);\r\n polygonAppend(upperPoly, poly,closestIndex,i+1);\r\n }\r\n }\r\n\r\n // solve smallest poly first\r\n if (lowerPoly.length < upperPoly.length) {\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n } else {\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n result.push(polygon);\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Remove collinear points in the polygon.\r\n * @method removeCollinearPoints\r\n * @param {Number} [precision] The threshold angle to use when determining whether two edges are collinear. Use zero for finest precision.\r\n * @return {Number} The number of points removed\r\n */\r\nfunction polygonRemoveCollinearPoints(polygon, precision){\r\n var num = 0;\r\n for(var i=polygon.length-1; polygon.length>3 && i>=0; --i){\r\n if(collinear(polygonAt(polygon, i-1),polygonAt(polygon, i),polygonAt(polygon, i+1),precision)){\r\n // Remove the middle point\r\n polygon.splice(i%polygon.length,1);\r\n num++;\r\n }\r\n }\r\n return num;\r\n}\r\n\r\n/**\r\n * Remove duplicate points in the polygon.\r\n * @method removeDuplicatePoints\r\n * @param {Number} [precision] The threshold to use when determining whether two points are the same. Use zero for best precision.\r\n */\r\nfunction polygonRemoveDuplicatePoints(polygon, precision){\r\n for(var i=polygon.length-1; i>=1; --i){\r\n var pi = polygon[i];\r\n for(var j=i-1; j>=0; --j){\r\n if(points_eq(pi, polygon[j], precision)){\r\n polygon.splice(i,1);\r\n continue;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Check if two scalars are equal\r\n * @static\r\n * @method eq\r\n * @param {Number} a\r\n * @param {Number} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction scalar_eq(a,b,precision){\r\n precision = precision || 0;\r\n return Math.abs(a-b) <= precision;\r\n}\r\n\r\n/**\r\n * Check if two points are equal\r\n * @static\r\n * @method points_eq\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction points_eq(a,b,precision){\r\n return scalar_eq(a[0],b[0],precision) && scalar_eq(a[1],b[1],precision);\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js?')},"./node_modules/phaser/src/plugins/BasePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems;\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots.\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n // Here are the Scene events you can listen to.\r\n // At the very least you should offer a destroy handler for when the Scene closes down.\r\n\r\n // var eventEmitter = this.systems.events;\r\n\r\n // eventEmitter.once('destroy', this.sceneDestroy, this);\r\n // eventEmitter.on('start', this.sceneStart, this);\r\n // eventEmitter.on('preupdate', this.scenePreUpdate, this);\r\n // eventEmitter.on('update', this.sceneUpdate, this);\r\n // eventEmitter.on('postupdate', this.scenePostUpdate, this);\r\n // eventEmitter.on('pause', this.scenePause, this);\r\n // eventEmitter.on('resume', this.sceneResume, this);\r\n // eventEmitter.on('sleep', this.sceneSleep, this);\r\n // eventEmitter.on('wake', this.sceneWake, this);\r\n // eventEmitter.on('shutdown', this.sceneShutdown, this);\r\n // eventEmitter.on('destroy', this.sceneDestroy, this);\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/BasePlugin.js?")},"./node_modules/phaser/src/plugins/DefaultPlugins.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Plugins.DefaultPlugins\r\n * \r\n * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance.\r\n * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n */\r\n\r\nvar DefaultPlugins = {\r\n\r\n /**\r\n * These are the Global Managers that are created by the Phaser.Game instance.\r\n * They are referenced from Scene.Systems so that plugins can use them.\r\n * \r\n * @name Phaser.Plugins.Global\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n Global: [\r\n\r\n 'game',\r\n 'anims',\r\n 'cache',\r\n 'plugins',\r\n 'registry',\r\n 'scale',\r\n 'sound',\r\n 'textures'\r\n\r\n ],\r\n\r\n /**\r\n * These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are created in the order in which they appear in this array and EventEmitter is always first.\r\n * \r\n * @name Phaser.Plugins.CoreScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n CoreScene: [\r\n\r\n 'EventEmitter',\r\n\r\n 'CameraManager',\r\n 'GameObjectCreator',\r\n 'GameObjectFactory',\r\n 'ScenePlugin',\r\n 'DisplayList',\r\n 'UpdateList'\r\n\r\n ],\r\n\r\n /**\r\n * These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n * \r\n * You can elect not to have these plugins by either creating a DefaultPlugins object as part\r\n * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array\r\n * and building your own bundle.\r\n * \r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are always created in the order in which they appear in the array.\r\n * \r\n * @name Phaser.Plugins.DefaultScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n DefaultScene: [\r\n\r\n 'Clock',\r\n 'DataManagerPlugin',\r\n 'InputPlugin',\r\n 'Loader',\r\n 'TweenManager',\r\n 'LightsPlugin'\r\n\r\n ]\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n DefaultPlugins.DefaultScene.push('CameraManager3D');\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n DefaultPlugins.Global.push('facebook');\r\n}\r\n\r\nmodule.exports = DefaultPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/DefaultPlugins.js?")},"./node_modules/phaser/src/plugins/PluginCache.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n * \r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginCache.js?")},"./node_modules/phaser/src/plugins/PluginManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../loader/FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ./PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Remove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The PluginManager is responsible for installing and adding plugins to Phaser.\r\n *\r\n * It is a global system and therefore belongs to the Game instance, not a specific Scene.\r\n *\r\n * It works in conjunction with the PluginCache. Core internal plugins automatically register themselves \r\n * with the Cache, but it's the Plugin Manager that is responsible for injecting them into the Scenes.\r\n *\r\n * There are two types of plugin:\r\n *\r\n * 1. A Global Plugin\r\n * 2. A Scene Plugin\r\n *\r\n * A Global Plugin is a plugin that lives within the Plugin Manager rather than a Scene. You can get\r\n * access to it by calling `PluginManager.get` and providing a key. Any Scene that requests a plugin in\r\n * this way will all get access to the same plugin instance, allowing you to use a single plugin across\r\n * multiple Scenes.\r\n *\r\n * A Scene Plugin is a plugin dedicated to running within a Scene. These are different to Global Plugins\r\n * in that their instances do not live within the Plugin Manager, but within the Scene Systems class instead.\r\n * And that every Scene created is given its own unique instance of a Scene Plugin. Examples of core Scene\r\n * Plugins include the Input Plugin, the Tween Plugin and the physics Plugins.\r\n *\r\n * You can add a plugin to Phaser in three different ways:\r\n *\r\n * 1. Preload it\r\n * 2. Include it in your source code and install it via the Game Config\r\n * 3. Include it in your source code and install it within a Scene\r\n *\r\n * For examples of all of these approaches please see the Phaser 3 Examples Repo `plugins` folder.\r\n *\r\n * For information on creating your own plugin please see the Phaser 3 Plugin Template.\r\n *\r\n * @class PluginManager\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The game instance that owns this Plugin Manager.\r\n */\r\nvar PluginManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function PluginManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The game instance that owns this Plugin Manager.\r\n *\r\n * @name Phaser.Plugins.PluginManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The global plugins currently running and managed by this Plugin Manager.\r\n * A plugin must have been started at least once in order to appear in this list.\r\n *\r\n * @name Phaser.Plugins.PluginManager#plugins\r\n * @type {Phaser.Types.Plugins.GlobalPlugin[]}\r\n * @since 3.8.0\r\n */\r\n this.plugins = [];\r\n\r\n /**\r\n * A list of plugin keys that should be installed into Scenes as well as the Core Plugins.\r\n *\r\n * @name Phaser.Plugins.PluginManager#scenePlugins\r\n * @type {string[]}\r\n * @since 3.8.0\r\n */\r\n this.scenePlugins = [];\r\n\r\n /**\r\n * A temporary list of plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingGlobal\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingGlobal = [];\r\n\r\n /**\r\n * A temporary list of scene plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingScene\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingScene = [];\r\n\r\n if (game.isBooted)\r\n {\r\n this.boot();\r\n }\r\n else\r\n {\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n }\r\n },\r\n\r\n /**\r\n * Run once the game has booted and installs all of the plugins configured in the Game Config.\r\n *\r\n * @method Phaser.Plugins.PluginManager#boot\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var i;\r\n var entry;\r\n var key;\r\n var plugin;\r\n var start;\r\n var mapping;\r\n var data;\r\n var config = this.game.config;\r\n\r\n // Any plugins to install?\r\n var list = config.installGlobalPlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingGlobal);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'TestPlugin', plugin: TestPlugin, start: true, mapping: 'test', data: { msg: 'The plugin is alive' } }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n start = GetFastValue(entry, 'start', false);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n data = GetFastValue(entry, 'data', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.install(key, plugin, start, mapping, data);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n \r\n }\r\n }\r\n\r\n // Any scene plugins to install?\r\n list = config.installScenePlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingScene);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'moveSpritePlugin', plugin: MoveSpritePlugin, , mapping: 'move' }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.installScenePlugin(key, plugin, mapping);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n }\r\n }\r\n\r\n this._pendingGlobal = [];\r\n this._pendingScene = [];\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it.\r\n *\r\n * First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.)\r\n * Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager.\r\n * Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself.\r\n *\r\n * @method Phaser.Plugins.PluginManager#addToScene\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems class to install all the plugins in to.\r\n * @param {array} globalPlugins - An array of global plugins to install.\r\n * @param {array} scenePlugins - An array of scene plugins to install.\r\n */\r\n addToScene: function (sys, globalPlugins, scenePlugins)\r\n {\r\n var i;\r\n var pluginKey;\r\n var pluginList;\r\n var game = this.game;\r\n var scene = sys.scene;\r\n var map = sys.settings.map;\r\n var isBooted = sys.settings.isBooted;\r\n\r\n // Reference the GlobalPlugins from Game into Scene.Systems\r\n for (i = 0; i < globalPlugins.length; i++)\r\n {\r\n pluginKey = globalPlugins[i];\r\n\r\n if (game[pluginKey])\r\n {\r\n sys[pluginKey] = game[pluginKey];\r\n\r\n // Scene level injection\r\n if (map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = sys[pluginKey];\r\n }\r\n }\r\n else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = game;\r\n }\r\n }\r\n\r\n for (var s = 0; s < scenePlugins.length; s++)\r\n {\r\n pluginList = scenePlugins[s];\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n pluginKey = pluginList[i];\r\n\r\n if (!PluginCache.hasCore(pluginKey))\r\n {\r\n continue;\r\n }\r\n\r\n var source = PluginCache.getCore(pluginKey);\r\n\r\n var plugin = new source.plugin(scene, this);\r\n \r\n sys[source.mapping] = plugin;\r\n\r\n // Scene level injection\r\n if (source.custom)\r\n {\r\n scene[source.mapping] = plugin;\r\n }\r\n else if (map.hasOwnProperty(source.mapping))\r\n {\r\n scene[map[source.mapping]] = plugin;\r\n }\r\n\r\n // Scene is already booted, usually because this method is being called at run-time, so boot the plugin\r\n if (isBooted)\r\n {\r\n plugin.boot();\r\n }\r\n }\r\n }\r\n\r\n // And finally, inject any 'global scene plugins'\r\n pluginList = this.plugins;\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n var entry = pluginList[i];\r\n\r\n if (entry.mapping)\r\n {\r\n scene[entry.mapping] = entry.plugin;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Returns a list of plugins to be installed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getDefaultScenePlugins\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @return {string[]} A list keys of all the Scene Plugins to install.\r\n */\r\n getDefaultScenePlugins: function ()\r\n {\r\n var list = this.game.config.defaultPlugins;\r\n\r\n // Merge in custom Scene plugins\r\n list = list.concat(this.scenePlugins);\r\n\r\n return list;\r\n },\r\n\r\n /**\r\n * Installs a new Scene Plugin into the Plugin Manager and optionally adds it\r\n * to the given Scene as well. A Scene Plugin added to the manager in this way\r\n * will be automatically installed into all new Scenes using the key and mapping given.\r\n *\r\n * The `key` property is what the plugin is injected into Scene.Systems as.\r\n * The `mapping` property is optional, and if specified is what the plugin is installed into\r\n * the Scene as. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups');\r\n * \r\n * // and from within the scene:\r\n * this.sys.powerupsPlugin; // key value\r\n * this.powerups; // mapping value\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * @method Phaser.Plugins.PluginManager#installScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The property key that will be used to add this plugin to Scene.Systems.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {Phaser.Scene} [addToScene] - Optionally automatically add this plugin to the given Scene.\r\n * @param {boolean} [fromLoader=false] - Is this being called by the Loader?\r\n */\r\n installScenePlugin: function (key, plugin, mapping, addToScene, fromLoader)\r\n {\r\n if (fromLoader === undefined) { fromLoader = false; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Scene Plugin: ' + key);\r\n return;\r\n }\r\n\r\n if (!PluginCache.hasCore(key))\r\n {\r\n // Plugin is freshly loaded\r\n PluginCache.register(key, plugin, mapping, true);\r\n\r\n this.scenePlugins.push(key);\r\n }\r\n else if (!fromLoader && PluginCache.hasCore(key))\r\n {\r\n // Plugin wasn't from the loader but already exists\r\n console.warn('Scene Plugin key in use: ' + key);\r\n return;\r\n }\r\n\r\n if (addToScene)\r\n {\r\n var instance = new plugin(addToScene, this);\r\n\r\n addToScene.sys[key] = instance;\r\n\r\n if (mapping && mapping !== '')\r\n {\r\n addToScene[mapping] = instance;\r\n }\r\n\r\n instance.boot();\r\n }\r\n },\r\n\r\n /**\r\n * Installs a new Global Plugin into the Plugin Manager and optionally starts it running.\r\n * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed\r\n * and used by all Scenes in your game.\r\n *\r\n * The `key` property is what you use to access this plugin from the Plugin Manager.\r\n *\r\n * ```javascript\r\n * this.plugins.install('powerupsPlugin', pluginCode);\r\n * \r\n * // and from within the scene:\r\n * this.plugins.get('powerupsPlugin');\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * The same plugin can be installed multiple times into the Plugin Manager by simply giving each\r\n * instance its own unique key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#install\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The unique handle given to this plugin within the Plugin Manager.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {boolean} [start=false] - Automatically start the plugin running? This is always `true` if you provide a mapping value.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {any} [data] - A value passed to the plugin's `init` method.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if `start` was false, or game isn't yet booted.\r\n */\r\n install: function (key, plugin, start, mapping, data)\r\n {\r\n if (start === undefined) { start = false; }\r\n if (mapping === undefined) { mapping = null; }\r\n if (data === undefined) { data = null; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Plugin: ' + key);\r\n return null;\r\n }\r\n\r\n if (PluginCache.hasCustom(key))\r\n {\r\n console.warn('Plugin key in use: ' + key);\r\n return null;\r\n }\r\n\r\n if (mapping !== null)\r\n {\r\n start = true;\r\n }\r\n\r\n if (!this.game.isBooted)\r\n {\r\n this._pendingGlobal.push({ key: key, plugin: plugin, start: start, mapping: mapping, data: data });\r\n }\r\n else\r\n {\r\n // Add it to the plugin store\r\n PluginCache.registerCustom(key, plugin, mapping, data);\r\n\r\n if (start)\r\n {\r\n return this.start(key);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets an index of a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getIndex\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {integer} The index of the plugin within the plugins array.\r\n */\r\n getIndex: function (key)\r\n {\r\n var list = this.plugins;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var entry = list[i];\r\n\r\n if (entry.key === key)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Gets a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getEntry\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {Phaser.Types.Plugins.GlobalPlugin} The plugin entry.\r\n */\r\n getEntry: function (key)\r\n {\r\n var idx = this.getIndex(key);\r\n\r\n if (idx !== -1)\r\n {\r\n return this.plugins[idx];\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given global plugin, based on its key, is active or not.\r\n *\r\n * @method Phaser.Plugins.PluginManager#isActive\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {boolean} `true` if the plugin is active, otherwise `false`.\r\n */\r\n isActive: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n return (entry && entry.active);\r\n },\r\n\r\n /**\r\n * Starts a global plugin running.\r\n *\r\n * If the plugin was previously active then calling `start` will reset it to an active state and then\r\n * call its `start` method.\r\n *\r\n * If the plugin has never been run before a new instance of it will be created within the Plugin Manager,\r\n * its active state set and then both of its `init` and `start` methods called, in that order.\r\n *\r\n * If the plugin is already running under the given key then nothing happens.\r\n *\r\n * @method Phaser.Plugins.PluginManager#start\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to start.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given or plugin is already stopped.\r\n */\r\n start: function (key, runAs)\r\n {\r\n if (runAs === undefined) { runAs = key; }\r\n\r\n var entry = this.getEntry(runAs);\r\n\r\n // Plugin already running under this key?\r\n if (entry && !entry.active)\r\n {\r\n // It exists, we just need to start it up again\r\n entry.active = true;\r\n entry.plugin.start();\r\n }\r\n else if (!entry)\r\n {\r\n entry = this.createEntry(key, runAs);\r\n }\r\n\r\n return (entry) ? entry.plugin : null;\r\n },\r\n\r\n /**\r\n * Creates a new instance of a global plugin, adds an entry into the plugins array and returns it.\r\n *\r\n * @method Phaser.Plugins.PluginManager#createEntry\r\n * @private\r\n * @since 3.9.0\r\n *\r\n * @param {string} key - The key of the plugin to create an instance of.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given.\r\n */\r\n createEntry: function (key, runAs)\r\n {\r\n var entry = PluginCache.getCustom(key);\r\n\r\n if (entry)\r\n {\r\n var instance = new entry.plugin(this);\r\n\r\n entry = {\r\n key: runAs,\r\n plugin: instance,\r\n active: true,\r\n mapping: entry.mapping,\r\n data: entry.data\r\n };\r\n\r\n this.plugins.push(entry);\r\n\r\n instance.init(entry.data);\r\n instance.start();\r\n }\r\n\r\n return entry;\r\n },\r\n\r\n /**\r\n * Stops a global plugin from running.\r\n *\r\n * If the plugin is active then its active state will be set to false and the plugins `stop` method\r\n * will be called.\r\n *\r\n * If the plugin is not already running, nothing will happen.\r\n *\r\n * @method Phaser.Plugins.PluginManager#stop\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to stop.\r\n *\r\n * @return {Phaser.Plugins.PluginManager} The Plugin Manager.\r\n */\r\n stop: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry && entry.active)\r\n {\r\n entry.active = false;\r\n entry.plugin.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a global plugin from the Plugin Manager based on the given key and returns it.\r\n *\r\n * If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key,\r\n * then it will create a new instance of the cached plugin and return that.\r\n *\r\n * @method Phaser.Plugins.PluginManager#get\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n * @param {boolean} [autoStart=true] - Automatically start a new instance of the plugin if found in the cache, but not actively running.\r\n *\r\n * @return {?(Phaser.Plugins.BasePlugin|function)} The plugin, or `null` if no plugin was found matching the key.\r\n */\r\n get: function (key, autoStart)\r\n {\r\n if (autoStart === undefined) { autoStart = true; }\r\n\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n return entry.plugin;\r\n }\r\n else\r\n {\r\n var plugin = this.getClass(key);\r\n\r\n if (plugin && autoStart)\r\n {\r\n entry = this.createEntry(key, key);\r\n\r\n return (entry) ? entry.plugin : null;\r\n }\r\n else if (plugin)\r\n {\r\n return plugin;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns the plugin class from the cache.\r\n * Used internally by the Plugin Manager.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n *\r\n * @return {Phaser.Plugins.BasePlugin} A Plugin object\r\n */\r\n getClass: function (key)\r\n {\r\n return PluginCache.getCustomClass(key);\r\n },\r\n\r\n /**\r\n * Removes a global plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGlobalPlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeGlobalPlugin: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n Remove(this.plugins, entry);\r\n }\r\n\r\n PluginCache.removeCustom(key);\r\n },\r\n\r\n /**\r\n * Removes a scene plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * This will not remove the plugin from any active Scenes that are already using it.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeScenePlugin: function (key)\r\n {\r\n Remove(this.scenePlugins, key);\r\n\r\n PluginCache.remove(key);\r\n },\r\n\r\n /**\r\n * Registers a new type of Game Object with the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new Game Objects.\r\n *\r\n * The key is the property that will be injected into the factories and used to create the\r\n * Game Object. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback);\r\n * // later in your game code:\r\n * this.add.clown();\r\n * this.make.clown();\r\n * ```\r\n * \r\n * The callbacks are what are called when the factories try to create a Game Object\r\n * matching the given key. It's important to understand that the callbacks are invoked within\r\n * the context of the GameObjectFactory. In this context there are several properties available\r\n * to use:\r\n * \r\n * this.scene - A reference to the Scene that owns the GameObjectFactory.\r\n * this.displayList - A reference to the Display List the Scene owns.\r\n * this.updateList - A reference to the Update List the Scene owns.\r\n * \r\n * See the GameObjectFactory and GameObjectCreator classes for more details.\r\n * Any public property or method listed is available from your callbacks under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerGameObject\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} [factoryCallback] - The callback to invoke when the Game Object Factory is called.\r\n * @param {function} [creatorCallback] - The callback to invoke when the Game Object Creator is called.\r\n */\r\n registerGameObject: function (key, factoryCallback, creatorCallback)\r\n {\r\n if (factoryCallback)\r\n {\r\n GameObjectFactory.register(key, factoryCallback);\r\n }\r\n\r\n if (creatorCallback)\r\n {\r\n GameObjectCreator.register(key, creatorCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a previously registered Game Object from the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGameObject\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Game Object to be removed from the factories.\r\n * @param {boolean} [removeFromFactory=true] - Should the Game Object be removed from the Game Object Factory?\r\n * @param {boolean} [removeFromCreator=true] - Should the Game Object be removed from the Game Object Creator?\r\n */\r\n removeGameObject: function (key, removeFromFactory, removeFromCreator)\r\n {\r\n if (removeFromFactory === undefined) { removeFromFactory = true; }\r\n if (removeFromCreator === undefined) { removeFromCreator = true; }\r\n\r\n if (removeFromFactory)\r\n {\r\n GameObjectFactory.remove(key);\r\n }\r\n\r\n if (removeFromCreator)\r\n {\r\n GameObjectCreator.remove(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Registers a new file type with the global File Types Manager, making it available to all Loader\r\n * Plugins created after this.\r\n * \r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new loader file types.\r\n *\r\n * The key is the property that will be injected into the Loader Plugin and used to load the\r\n * files. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerFileType('wad', doomWadLoaderCallback);\r\n * // later in your preload code:\r\n * this.load.wad();\r\n * ```\r\n * \r\n * The callback is what is called when the loader tries to load a file matching the given key.\r\n * It's important to understand that the callback is invoked within\r\n * the context of the LoaderPlugin. In this context there are several properties / methods available\r\n * to use:\r\n * \r\n * this.addFile - A method to add the new file to the load queue.\r\n * this.scene - The Scene that owns the Loader Plugin instance.\r\n *\r\n * See the LoaderPlugin class for more details. Any public property or method listed is available from\r\n * your callback under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerFileType\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} callback - The callback to invoke when the Game Object Factory is called.\r\n * @param {Phaser.Scene} [addToScene] - Optionally add this file type into the Loader Plugin owned by the given Scene.\r\n */\r\n registerFileType: function (key, callback, addToScene)\r\n {\r\n FileTypesManager.register(key, callback);\r\n\r\n if (addToScene && addToScene.sys.load)\r\n {\r\n addToScene.sys.load[key] = callback;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Plugin Manager and all associated plugins.\r\n * It will iterate all plugins found and call their `destroy` methods.\r\n * \r\n * The PluginCache will remove all custom plugins.\r\n *\r\n * @method Phaser.Plugins.PluginManager#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.plugins.length; i++)\r\n {\r\n this.plugins[i].plugin.destroy();\r\n }\r\n\r\n PluginCache.destroyCustomPlugins();\r\n\r\n if (this.game.noReturn)\r\n {\r\n PluginCache.destroyCorePlugins();\r\n }\r\n\r\n this.game = null;\r\n this.plugins = [];\r\n this.scenePlugins = [];\r\n }\r\n\r\n});\r\n\r\n/*\r\n * \"Sometimes, the elegant implementation is just a function.\r\n * Not a method. Not a class. Not a framework. Just a function.\"\r\n * -- John Carmack\r\n */\r\n\r\nmodule.exports = PluginManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginManager.js?")},"./node_modules/phaser/src/plugins/ScenePlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n this.scene = scene;\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n * \r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * \r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n * \r\n * start\r\n * ready\r\n * preupdate\r\n * update\r\n * postupdate\r\n * resize\r\n * pause\r\n * resume\r\n * sleep\r\n * wake\r\n * transitioninit\r\n * transitionstart\r\n * transitioncomplete\r\n * transitionout\r\n * shutdown\r\n * destroy\r\n * \r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once(\'destroy\', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/ScenePlugin.js?')},"./node_modules/phaser/src/plugins/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Plugins\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BasePlugin: __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js"),\r\n DefaultPlugins: __webpack_require__(/*! ./DefaultPlugins */ "./node_modules/phaser/src/plugins/DefaultPlugins.js"),\r\n PluginCache: __webpack_require__(/*! ./PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js"),\r\n PluginManager: __webpack_require__(/*! ./PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/plugins/ScenePlugin.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/index.js?')},"./node_modules/phaser/src/polyfills/Array.forEach.js":function(module,exports){eval("/**\r\n* A polyfill for Array.forEach\r\n* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\r\n*/\r\nif (!Array.prototype.forEach)\r\n{\r\n Array.prototype.forEach = function (fun /*, thisArg */)\r\n {\r\n 'use strict';\r\n\r\n if (this === void 0 || this === null)\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var t = Object(this);\r\n var len = t.length >>> 0;\r\n\r\n if (typeof fun !== 'function')\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n if (i in t)\r\n {\r\n fun.call(thisArg, t[i], i, t);\r\n }\r\n }\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.forEach.js?")},"./node_modules/phaser/src/polyfills/Array.isArray.js":function(module,exports){eval("/**\r\n* A polyfill for Array.isArray\r\n*/\r\nif (!Array.isArray)\r\n{\r\n Array.isArray = function (arg)\r\n {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.isArray.js?")},"./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js":function(module,exports){eval("/* Copyright 2013 Chris Wilson\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n*/\r\n\r\n/*\r\n\r\nThis monkeypatch library is intended to be included in projects that are\r\nwritten to the proper AudioContext spec (instead of webkitAudioContext),\r\nand that use the new naming and proper bits of the Web Audio API (e.g.\r\nusing BufferSourceNode.start() instead of BufferSourceNode.noteOn()), but may\r\nhave to run on systems that only support the deprecated bits.\r\n\r\nThis library should be harmless to include if the browser supports\r\nunprefixed \"AudioContext\", and/or if it supports the new names.\r\n\r\nThe patches this library handles:\r\nif window.AudioContext is unsupported, it will be aliased to webkitAudioContext().\r\nif AudioBufferSourceNode.start() is unimplemented, it will be routed to noteOn() or\r\nnoteGrainOn(), depending on parameters.\r\n\r\nThe following aliases only take effect if the new names are not already in place:\r\n\r\nAudioBufferSourceNode.stop() is aliased to noteOff()\r\nAudioContext.createGain() is aliased to createGainNode()\r\nAudioContext.createDelay() is aliased to createDelayNode()\r\nAudioContext.createScriptProcessor() is aliased to createJavaScriptNode()\r\nAudioContext.createPeriodicWave() is aliased to createWaveTable()\r\nOscillatorNode.start() is aliased to noteOn()\r\nOscillatorNode.stop() is aliased to noteOff()\r\nOscillatorNode.setPeriodicWave() is aliased to setWaveTable()\r\nAudioParam.setTargetAtTime() is aliased to setTargetValueAtTime()\r\n\r\nThis library does NOT patch the enumerated type changes, as it is\r\nrecommended in the specification that implementations support both integer\r\nand string types for AudioPannerNode.panningModel, AudioPannerNode.distanceModel\r\nBiquadFilterNode.type and OscillatorNode.type.\r\n\r\n*/\r\n\r\n(function () {\r\n\r\n function fixSetTarget(param) {\r\n if (!param)\t// if NYI, just return\r\n return;\r\n if (!param.setTargetAtTime)\r\n param.setTargetAtTime = param.setTargetValueAtTime;\r\n }\r\n\r\n if (window.hasOwnProperty('webkitAudioContext') &&\r\n !window.hasOwnProperty('AudioContext')) {\r\n window.AudioContext = webkitAudioContext;\r\n\r\n if (!AudioContext.prototype.hasOwnProperty('createGain'))\r\n AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createDelay'))\r\n AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createScriptProcessor'))\r\n AudioContext.prototype.createScriptProcessor = AudioContext.prototype.createJavaScriptNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createPeriodicWave'))\r\n AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\r\n\r\n\r\n AudioContext.prototype.internal_createGain = AudioContext.prototype.createGain;\r\n AudioContext.prototype.createGain = function() {\r\n var node = this.internal_createGain();\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDelay = AudioContext.prototype.createDelay;\r\n AudioContext.prototype.createDelay = function(maxDelayTime) {\r\n var node = maxDelayTime ? this.internal_createDelay(maxDelayTime) : this.internal_createDelay();\r\n fixSetTarget(node.delayTime);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBufferSource = AudioContext.prototype.createBufferSource;\r\n AudioContext.prototype.createBufferSource = function() {\r\n var node = this.internal_createBufferSource();\r\n if (!node.start) {\r\n node.start = function ( when, offset, duration ) {\r\n if ( offset || duration )\r\n this.noteGrainOn( when || 0, offset, duration );\r\n else\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function( when, offset, duration ) {\r\n if( typeof duration !== 'undefined' )\r\n node.internal_start( when || 0, offset, duration );\r\n else\r\n node.internal_start( when || 0, offset || 0 );\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n fixSetTarget(node.playbackRate);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDynamicsCompressor = AudioContext.prototype.createDynamicsCompressor;\r\n AudioContext.prototype.createDynamicsCompressor = function() {\r\n var node = this.internal_createDynamicsCompressor();\r\n fixSetTarget(node.threshold);\r\n fixSetTarget(node.knee);\r\n fixSetTarget(node.ratio);\r\n fixSetTarget(node.reduction);\r\n fixSetTarget(node.attack);\r\n fixSetTarget(node.release);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBiquadFilter = AudioContext.prototype.createBiquadFilter;\r\n AudioContext.prototype.createBiquadFilter = function() {\r\n var node = this.internal_createBiquadFilter();\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n fixSetTarget(node.Q);\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n if (AudioContext.prototype.hasOwnProperty( 'createOscillator' )) {\r\n AudioContext.prototype.internal_createOscillator = AudioContext.prototype.createOscillator;\r\n AudioContext.prototype.createOscillator = function() {\r\n var node = this.internal_createOscillator();\r\n if (!node.start) {\r\n node.start = function ( when ) {\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function ( when ) {\r\n node.internal_start( when || 0);\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n if (!node.setPeriodicWave)\r\n node.setPeriodicWave = node.setWaveTable;\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n return node;\r\n };\r\n }\r\n }\r\n\r\n if (window.hasOwnProperty('webkitOfflineAudioContext') &&\r\n !window.hasOwnProperty('OfflineAudioContext')) {\r\n window.OfflineAudioContext = webkitOfflineAudioContext;\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js?")},"./node_modules/phaser/src/polyfills/Math.trunc.js":function(module,exports){eval("// ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc\r\nif (!Math.trunc) {\r\n Math.trunc = function trunc(x) {\r\n return x < 0 ? Math.ceil(x) : Math.floor(x);\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Math.trunc.js?")},"./node_modules/phaser/src/polyfills/Uint32Array.js":function(module,exports){eval("/**\r\n* Low-budget Float32Array knock-off, suitable for use with P2.js in IE9\r\n* Source: http://www.html5gamedevs.com/topic/5988-phaser-12-ie9/\r\n* Cameron Foale (http://www.kibibu.com)\r\n*/\r\nif (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'object')\r\n{\r\n var CheapArray = function (fakeType)\r\n {\r\n var proto = new Array(); // jshint ignore:line\r\n\r\n window[fakeType] = function(arg) {\r\n\r\n if (typeof(arg) === 'number')\r\n {\r\n Array.call(this, arg);\r\n\r\n this.length = arg;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = 0;\r\n }\r\n }\r\n else\r\n {\r\n Array.call(this, arg.length);\r\n\r\n this.length = arg.length;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = arg[i];\r\n }\r\n }\r\n };\r\n\r\n window[fakeType].prototype = proto;\r\n window[fakeType].constructor = window[fakeType];\r\n };\r\n\r\n CheapArray('Float32Array'); // jshint ignore:line\r\n CheapArray('Uint32Array'); // jshint ignore:line\r\n CheapArray('Uint16Array'); // jshint ignore:line\r\n CheapArray('Int16Array'); // jshint ignore:line\r\n CheapArray('ArrayBuffer'); // jshint ignore:line\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Uint32Array.js?")},"./node_modules/phaser/src/polyfills/console.js":function(module,exports){eval("/**\r\n * Also fix for the absent console in IE9\r\n */\r\nif (!window.console)\r\n{\r\n window.console = {};\r\n window.console.log = window.console.assert = function(){};\r\n window.console.warn = window.console.assert = function(){};\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/console.js?")},"./node_modules/phaser/src/polyfills/index.js":function(module,exports,__webpack_require__){eval('__webpack_require__(/*! ./Array.forEach */ "./node_modules/phaser/src/polyfills/Array.forEach.js");\r\n__webpack_require__(/*! ./Array.isArray */ "./node_modules/phaser/src/polyfills/Array.isArray.js");\r\n__webpack_require__(/*! ./AudioContextMonkeyPatch */ "./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js");\r\n__webpack_require__(/*! ./console */ "./node_modules/phaser/src/polyfills/console.js");\r\n__webpack_require__(/*! ./Math.trunc */ "./node_modules/phaser/src/polyfills/Math.trunc.js");\r\n__webpack_require__(/*! ./performance.now */ "./node_modules/phaser/src/polyfills/performance.now.js");\r\n__webpack_require__(/*! ./requestAnimationFrame */ "./node_modules/phaser/src/polyfills/requestAnimationFrame.js");\r\n__webpack_require__(/*! ./Uint32Array */ "./node_modules/phaser/src/polyfills/Uint32Array.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/index.js?')},"./node_modules/phaser/src/polyfills/performance.now.js":function(module,exports){eval("/**\r\n * performance.now\r\n */\r\n(function () {\r\n\r\n if ('performance' in window === false)\r\n {\r\n window.performance = {};\r\n }\r\n\r\n // Thanks IE8\r\n Date.now = (Date.now || function () {\r\n return new Date().getTime();\r\n });\r\n\r\n if ('now' in window.performance === false)\r\n {\r\n var nowOffset = Date.now();\r\n\r\n if (performance.timing && performance.timing.navigationStart)\r\n {\r\n nowOffset = performance.timing.navigationStart;\r\n }\r\n\r\n window.performance.now = function now ()\r\n {\r\n return Date.now() - nowOffset;\r\n }\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/performance.now.js?")},"./node_modules/phaser/src/polyfills/requestAnimationFrame.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {// References:\r\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n// https://gist.github.com/1579671\r\n// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\r\n// https://gist.github.com/timhall/4078614\r\n// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame\r\n\r\n// Expected to be used with Browserfiy\r\n// Browserify automatically detects the use of `global` and passes the\r\n// correct reference of `global`, `self`, and finally `window`\r\n\r\n// Date.now\r\nif (!(Date.now && Date.prototype.getTime)) {\r\n Date.now = function now() {\r\n return new Date().getTime();\r\n };\r\n}\r\n\r\n// performance.now\r\nif (!(global.performance && global.performance.now)) {\r\n var startTime = Date.now();\r\n if (!global.performance) {\r\n global.performance = {};\r\n }\r\n global.performance.now = function () {\r\n return Date.now() - startTime;\r\n };\r\n}\r\n\r\n// requestAnimationFrame\r\nvar lastTime = Date.now();\r\nvar vendors = ['ms', 'moz', 'webkit', 'o'];\r\n\r\nfor(var x = 0; x < vendors.length && !global.requestAnimationFrame; ++x) {\r\n global.requestAnimationFrame = global[vendors[x] + 'RequestAnimationFrame'];\r\n global.cancelAnimationFrame = global[vendors[x] + 'CancelAnimationFrame'] ||\r\n global[vendors[x] + 'CancelRequestAnimationFrame'];\r\n}\r\n\r\nif (!global.requestAnimationFrame) {\r\n global.requestAnimationFrame = function (callback) {\r\n if (typeof callback !== 'function') {\r\n throw new TypeError(callback + 'is not a function');\r\n }\r\n\r\n var currentTime = Date.now(),\r\n delay = 16 + lastTime - currentTime;\r\n\r\n if (delay < 0) {\r\n delay = 0;\r\n }\r\n\r\n lastTime = currentTime;\r\n\r\n return setTimeout(function () {\r\n lastTime = Date.now();\r\n callback(performance.now());\r\n }, delay);\r\n };\r\n}\r\n\r\nif (!global.cancelAnimationFrame) {\r\n global.cancelAnimationFrame = function(id) {\r\n clearTimeout(id);\r\n };\r\n}\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/requestAnimationFrame.js?")},"./node_modules/phaser/src/renderer/BlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/BlendModes.js?")},"./node_modules/phaser/src/renderer/ScaleModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n * \r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n * \r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/ScaleModes.js?")},"./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasSnapshot = __webpack_require__(/*! ../snapshot/CanvasSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GetBlendModes = __webpack_require__(/*! ./utils/GetBlendModes */ \"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Canvas Renderer is responsible for managing 2D canvas rendering contexts, including the one used by the Game's canvas. It tracks the internal state of a given context and can renderer textured Game Objects to it, taking into account alpha, blending, and scaling.\r\n *\r\n * @class CanvasRenderer\r\n * @memberof Phaser.Renderer.Canvas\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser Game instance that owns this renderer.\r\n */\r\nvar CanvasRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function CanvasRenderer (game)\r\n {\r\n /**\r\n * The Phaser Game instance that owns this renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.CANVAS;\r\n\r\n /**\r\n * The total number of Game Objects which were rendered in a frame.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#drawCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.drawCount = 0;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The local configuration settings of the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: game.config.clearBeforeRender,\r\n backgroundColor: game.config.backgroundColor,\r\n resolution: game.config.resolution,\r\n antialias: game.config.antialias,\r\n roundPixels: game.config.roundPixels\r\n };\r\n\r\n /**\r\n * The scale mode which should be used by the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#scaleMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = (game.config.antialias) ? ScaleModes.LINEAR : ScaleModes.NEAREST;\r\n\r\n /**\r\n * The canvas element which the Game uses.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.gameCanvas = game.canvas;\r\n\r\n var contextOptions = {\r\n alpha: game.config.transparent,\r\n desynchronized: game.config.desynchronized\r\n };\r\n\r\n /**\r\n * The canvas context used to render all Cameras in all Scenes during the game loop.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.gameContext = (this.game.config.context) ? this.game.config.context : this.gameCanvas.getContext('2d', contextOptions);\r\n\r\n /**\r\n * The canvas context currently used by the CanvasRenderer for all rendering operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.currentContext = this.gameContext;\r\n\r\n /**\r\n * The blend modes supported by the Canvas Renderer.\r\n *\r\n * This object maps the {@link Phaser.BlendModes} to canvas compositing operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#blendModes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.blendModes = GetBlendModes();\r\n\r\n // image-rendering: optimizeSpeed;\r\n // image-rendering: pixelated;\r\n\r\n /**\r\n * The scale mode currently in use by the Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentScaleMode\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.currentScaleMode = 0;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.16.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92\r\n };\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n this.init();\r\n },\r\n\r\n /**\r\n * Prepares the game canvas for rendering.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#init\r\n * @since 3.0.0\r\n */\r\n init: function ()\r\n {\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height)\r\n {\r\n this.resize(baseSize.width, baseSize.height);\r\n }\r\n },\r\n\r\n /**\r\n * Resize the main game canvas.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n */\r\n resize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n // Resizing a canvas will reset imageSmoothingEnabled (and probably other properties)\r\n if (this.scaleMode === ScaleModes.NEAREST)\r\n {\r\n Smoothing.disable(this.gameContext);\r\n }\r\n },\r\n\r\n /**\r\n * Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resetTransform\r\n * @since 3.0.0\r\n */\r\n resetTransform: function ()\r\n {\r\n this.currentContext.setTransform(1, 0, 0, 1, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the blend mode (compositing operation) of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {string} blendMode - The new blend mode which should be used.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setBlendMode: function (blendMode)\r\n {\r\n this.currentContext.globalCompositeOperation = blendMode;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Changes the Canvas Rendering Context that all draw operations are performed against.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setContext\r\n * @since 3.12.0\r\n *\r\n * @param {?CanvasRenderingContext2D} [ctx] - The new Canvas Rendering Context to draw everything to. Leave empty to reset to the Game Canvas.\r\n *\r\n * @return {this} The Canvas Renderer instance.\r\n */\r\n setContext: function (ctx)\r\n {\r\n this.currentContext = (ctx) ? ctx : this.gameContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the global alpha of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} alpha - The new alpha to use, where 0 is fully transparent and 1 is fully opaque.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setAlpha: function (alpha)\r\n {\r\n this.currentContext.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called at the start of the render loop.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n var config = this.config;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n ctx.globalAlpha = 1;\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\r\n if (config.clearBeforeRender)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n if (!config.transparent)\r\n {\r\n ctx.fillStyle = config.backgroundColor.rgba;\r\n ctx.fillRect(0, 0, width, height);\r\n }\r\n\r\n ctx.save();\r\n\r\n this.drawCount = 0;\r\n },\r\n\r\n /**\r\n * Renders the Scene to the given Camera.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.DisplayList} children - The Game Objects within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently unused.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n var list = children.list;\r\n var childCount = list.length;\r\n\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var ctx = (camera.renderToTexture) ? camera.context : scene.sys.context;\r\n\r\n // Save context pre-clip\r\n ctx.save();\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(cx, cy, cw, ch);\r\n ctx.clip();\r\n }\r\n\r\n this.currentContext = ctx;\r\n\r\n var mask = camera.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderCanvas(this, null, camera._maskCamera);\r\n }\r\n\r\n if (!camera.transparent)\r\n {\r\n ctx.fillStyle = camera.backgroundColor.rgba;\r\n ctx.fillRect(cx, cy, cw, ch);\r\n }\r\n\r\n ctx.globalAlpha = camera.alpha;\r\n\r\n ctx.globalCompositeOperation = 'source-over';\r\n\r\n this.drawCount += list.length;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n\r\n camera.matrix.copyToContext(ctx);\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderCanvas(this, child, camera);\r\n }\r\n\r\n child.renderCanvas(this, child, interpolationPercentage, camera);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderCanvas(this, child, camera);\r\n }\r\n }\r\n\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.globalAlpha = 1;\r\n\r\n camera.flashEffect.postRenderCanvas(ctx);\r\n camera.fadeEffect.postRenderCanvas(ctx);\r\n\r\n camera.dirty = false;\r\n\r\n if (mask)\r\n {\r\n mask.postRenderCanvas(this);\r\n }\r\n\r\n // Restore pre-clip context\r\n ctx.restore();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n scene.sys.context.drawImage(camera.canvas, cx, cy);\r\n }\r\n },\r\n\r\n /**\r\n * Restores the game context's global settings and takes a snapshot if one is scheduled.\r\n *\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n\r\n ctx.restore();\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n CanvasSnapshot(this.gameCanvas, state);\r\n\r\n state.callback = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given canvas.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas to grab from.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=canvas.width] - The width of the area to grab.\r\n * @param {integer} [height=canvas.height] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Canvas Renderer.\r\n */\r\n snapshotCanvas: function (canvas, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n CanvasSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gameCanvas.width, this.gameCanvas.height, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gameCanvas.width);\r\n state.height = Math.min(height, this.gameCanvas.height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and draws it to the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#batchSprite\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The texture based Game Object to draw.\r\n * @param {Phaser.Textures.Frame} frame - The frame to draw, doesn't have to be that owned by the Game Object.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, frame, camera, parentTransformMatrix)\r\n {\r\n var alpha = camera.alpha * sprite.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n \r\n var ctx = this.currentContext;\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var cd = frame.canvasData;\r\n\r\n var frameX = cd.x;\r\n var frameY = cd.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var res = frame.source.resolution;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frame.x;\r\n var y = -displayOriginY + frame.y;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n frameWidth = crop.cw;\r\n frameHeight = crop.ch;\r\n \r\n frameX = crop.cx;\r\n frameY = crop.cy;\r\n\r\n x = -displayOriginX + crop.x;\r\n y = -displayOriginY + crop.y;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (x >= 0)\r\n {\r\n x = -(x + frameWidth);\r\n }\r\n else if (x < 0)\r\n {\r\n x = (Math.abs(x) - frameWidth);\r\n }\r\n }\r\n \r\n if (sprite.flipY)\r\n {\r\n if (y >= 0)\r\n {\r\n y = -(y + frameHeight);\r\n }\r\n else if (y < 0)\r\n {\r\n y = (Math.abs(y) - frameHeight);\r\n }\r\n }\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY)\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n ctx.save();\r\n \r\n calcMatrix.setToContext(ctx);\r\n\r\n ctx.globalCompositeOperation = this.blendModes[sprite.blendMode];\r\n\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.drawImage(frame.source.image, frameX, frameY, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);\r\n\r\n ctx.restore();\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Canvas Renderer.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameCanvas = null;\r\n this.gameContext = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js?")},"./node_modules/phaser/src/renderer/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasRenderer: __webpack_require__(/*! ./CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js"),\r\n GetBlendModes: __webpack_require__(/*! ./utils/GetBlendModes */ "./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js"),\r\n SetTransform: __webpack_require__(/*! ./utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/index.js?')},"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar modes = __webpack_require__(/*! ../../BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar CanvasFeatures = __webpack_require__(/*! ../../../device/CanvasFeatures */ \"./node_modules/phaser/src/device/CanvasFeatures.js\");\r\n\r\n/**\r\n * Returns an array which maps the default blend modes to supported Canvas blend modes.\r\n *\r\n * If the browser doesn't support a blend mode, it will default to the normal `source-over` blend mode.\r\n *\r\n * @function Phaser.Renderer.Canvas.GetBlendModes\r\n * @since 3.0.0\r\n *\r\n * @return {array} Which Canvas blend mode corresponds to which default Phaser blend mode.\r\n */\r\nvar GetBlendModes = function ()\r\n{\r\n var output = [];\r\n var useNew = CanvasFeatures.supportNewBlendModes;\r\n var so = 'source-over';\r\n\r\n output[modes.NORMAL] = so;\r\n output[modes.ADD] = 'lighter';\r\n output[modes.MULTIPLY] = (useNew) ? 'multiply' : so;\r\n output[modes.SCREEN] = (useNew) ? 'screen' : so;\r\n output[modes.OVERLAY] = (useNew) ? 'overlay' : so;\r\n output[modes.DARKEN] = (useNew) ? 'darken' : so;\r\n output[modes.LIGHTEN] = (useNew) ? 'lighten' : so;\r\n output[modes.COLOR_DODGE] = (useNew) ? 'color-dodge' : so;\r\n output[modes.COLOR_BURN] = (useNew) ? 'color-burn' : so;\r\n output[modes.HARD_LIGHT] = (useNew) ? 'hard-light' : so;\r\n output[modes.SOFT_LIGHT] = (useNew) ? 'soft-light' : so;\r\n output[modes.DIFFERENCE] = (useNew) ? 'difference' : so;\r\n output[modes.EXCLUSION] = (useNew) ? 'exclusion' : so;\r\n output[modes.HUE] = (useNew) ? 'hue' : so;\r\n output[modes.SATURATION] = (useNew) ? 'saturation' : so;\r\n output[modes.COLOR] = (useNew) ? 'color' : so;\r\n output[modes.LUMINOSITY] = (useNew) ? 'luminosity' : so;\r\n output[modes.ERASE] = 'destination-out';\r\n output[modes.SOURCE_IN] = 'source-in';\r\n output[modes.SOURCE_OUT] = 'source-out';\r\n output[modes.SOURCE_ATOP] = 'source-atop';\r\n output[modes.DESTINATION_OVER] = 'destination-over';\r\n output[modes.DESTINATION_IN] = 'destination-in';\r\n output[modes.DESTINATION_OUT] = 'destination-out';\r\n output[modes.DESTINATION_ATOP] = 'destination-atop';\r\n output[modes.LIGHTER] = 'lighter';\r\n output[modes.COPY] = 'copy';\r\n output[modes.XOR] = 'xor';\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetBlendModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js?")},"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix\r\n * and then performs the following steps:\r\n * \r\n * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts.\r\n * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given.\r\n * 3. Sets the blend mode of the context to be that used by the Game Object.\r\n * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.\r\n * 5. Saves the context state.\r\n * 6. Sets the final matrix values into the context via setTransform.\r\n * \r\n * This function is only meant to be used internally. Most of the Canvas Renderer classes use it.\r\n *\r\n * @function Phaser.Renderer.Canvas.SetTransform\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on.\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering.\r\n * \r\n * @return {boolean} `true` if the Game Object context was set, otherwise `false`.\r\n */\r\nvar SetTransform = function (renderer, ctx, src, camera, parentMatrix)\r\n{\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n // Nothing to see, so don't waste time calculating stuff\r\n return false;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix);\r\n var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n gameObjectMatrix.e = src.x;\r\n gameObjectMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n // Alpha\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.save();\r\n\r\n calcMatrix.setToContext(ctx);\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = SetTransform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js?")},"./node_modules/phaser/src/renderer/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Renderer\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/renderer/canvas/index.js"),\r\n Snapshot: __webpack_require__(/*! ./snapshot */ "./node_modules/phaser/src/renderer/snapshot/index.js"),\r\n WebGL: __webpack_require__(/*! ./webgl */ "./node_modules/phaser/src/renderer/webgl/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/index.js?')},"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.Canvas\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar CanvasSnapshot = function (canvas, config)\r\n{\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = Math.abs(Math.round(GetFastValue(config, 'x', 0)));\r\n var y = Math.abs(Math.round(GetFastValue(config, 'y', 0)));\r\n var width = GetFastValue(config, 'width', canvas.width);\r\n var height = GetFastValue(config, 'height', canvas.height);\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n if (getPixel)\r\n {\r\n var context = canvas.getContext('2d');\r\n var imageData = context.getImageData(x, y, 1, 1);\r\n var data = imageData.data;\r\n\r\n callback.call(null, new Color(data[0], data[1], data[2], data[3] / 255));\r\n }\r\n else if (x !== 0 || y !== 0 || width !== canvas.width || height !== canvas.height)\r\n {\r\n // Area Grab\r\n var copyCanvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = copyCanvas.getContext('2d');\r\n\r\n ctx.drawImage(canvas, x, y, width, height, 0, 0, width, height);\r\n\r\n var image1 = new Image();\r\n \r\n image1.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.onload = function ()\r\n {\r\n callback.call(null, image1);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.src = copyCanvas.toDataURL(type, encoderOptions);\r\n }\r\n else\r\n {\r\n // Full Grab\r\n var image2 = new Image();\r\n \r\n image2.onerror = function ()\r\n {\r\n callback.call(null);\r\n };\r\n\r\n image2.onload = function ()\r\n {\r\n callback.call(null, image2);\r\n };\r\n\r\n image2.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = CanvasSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a WebGL canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.WebGL\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar WebGLSnapshot = function (sourceCanvas, config)\r\n{\r\n var gl = sourceCanvas.getContext('experimental-webgl');\r\n\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = GetFastValue(config, 'x', 0);\r\n var y = GetFastValue(config, 'y', 0);\r\n\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n var isFramebuffer = GetFastValue(config, 'isFramebuffer', false);\r\n\r\n var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth;\r\n var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight;\r\n\r\n if (getPixel)\r\n {\r\n var pixel = new Uint8Array(4);\r\n\r\n var destY = (isFramebuffer) ? y : bufferHeight - y;\r\n\r\n gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);\r\n\r\n callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255));\r\n }\r\n else\r\n {\r\n var width = GetFastValue(config, 'width', bufferWidth);\r\n var height = GetFastValue(config, 'height', bufferHeight);\r\n\r\n var total = width * height * 4;\r\n\r\n var pixels = new Uint8Array(total);\r\n\r\n gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\r\n \r\n var canvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n var imageData = ctx.getImageData(0, 0, width, height);\r\n \r\n var data = imageData.data;\r\n\r\n for (var py = 0; py < height; py++)\r\n {\r\n for (var px = 0; px < width; px++)\r\n {\r\n var sourceIndex = ((height - py) * width + px) * 4;\r\n var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4;\r\n\r\n data[destIndex + 0] = pixels[sourceIndex + 0];\r\n data[destIndex + 1] = pixels[sourceIndex + 1];\r\n data[destIndex + 2] = pixels[sourceIndex + 2];\r\n data[destIndex + 3] = pixels[sourceIndex + 3];\r\n }\r\n }\r\n\r\n ctx.putImageData(imageData, 0, 0);\r\n \r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n callback.call(null, image);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = WebGLSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Snapshot\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./CanvasSnapshot */ "./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js"),\r\n WebGL: __webpack_require__(/*! ./WebGLSnapshot */ "./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/index.js?')},"./node_modules/phaser/src/renderer/webgl/Utils.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Utils\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Packs four floats on a range from 0.0 to 1.0 into a single Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats\r\n * @since 3.0.0\r\n * \r\n * @param {number} r - Red component in a range from 0.0 to 1.0 \r\n * @param {number} g - Green component in a range from 0.0 to 1.0\r\n * @param {number} b - Blue component in a range from 0.0 to 1.0\r\n * @param {number} a - Alpha component in a range from 0.0 to 1.0\r\n * \r\n * @return {number} [description]\r\n */\r\n getTintFromFloats: function (r, g, b, a)\r\n {\r\n var ur = ((r * 255.0)|0) & 0xFF;\r\n var ug = ((g * 255.0)|0) & 0xFF;\r\n var ub = ((b * 255.0)|0) & 0xFF;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlpha: function (rgb, a)\r\n {\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n return ((ua << 24) | rgb) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a \r\n * swizzled Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlphaAndSwap: function (rgb, a)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0;\r\n },\r\n\r\n /**\r\n * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - RGB packed as a Uint24\r\n * \r\n * @return {array} Array of floats representing each component as a float \r\n */\r\n getFloatsFromUintRGB: function (rgb)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n\r\n return [ ur / 255.0, ug / 255.0, ub / 255.0 ];\r\n },\r\n\r\n /**\r\n * Counts how many attributes of 32 bits a vertex has\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getComponentCount\r\n * @since 3.0.0\r\n * \r\n * @param {array} attributes - Array of attributes \r\n * @param {WebGLRenderingContext} glContext - WebGLContext used for check types\r\n * \r\n * @return {number} Count of 32 bit attributes in vertex\r\n */\r\n getComponentCount: function (attributes, glContext)\r\n {\r\n var count = 0;\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n \r\n if (element.type === glContext.FLOAT)\r\n {\r\n count += element.size;\r\n }\r\n else\r\n {\r\n count += 1; // We'll force any other type to be 32 bit. for now\r\n }\r\n }\r\n\r\n return count;\r\n }\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/Utils.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * WebGLPipeline is a class that describes the way elements will be rendererd\r\n * in WebGL, specially focused on batching vertices (batching is not provided).\r\n * Pipelines are mostly used for describing 2D rendering passes but it's\r\n * flexible enough to be used for any type of rendering including 3D.\r\n * Internally WebGLPipeline will handle things like compiling shaders,\r\n * creating vertex buffers, assigning primitive topology and binding\r\n * vertex attributes.\r\n *\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - gl: Current WebGL context.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n * - vertices: An optional buffer of vertices\r\n * - attributes: An array describing the vertex attributes\r\n *\r\n * The vertex attributes properties are:\r\n * - name : String - Name of the attribute in the vertex shader\r\n * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1\r\n * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT)\r\n * - normalized : boolean - Is the attribute normalized\r\n * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C\r\n * Here you can find more information of how to describe an attribute:\r\n * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer\r\n *\r\n * @class WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for this WebGL Pipeline, as described above.\r\n */\r\nvar WebGLPipeline = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLPipeline (config)\r\n {\r\n /**\r\n * Name of the Pipeline. Used for identifying\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'WebGLPipeline';\r\n\r\n /**\r\n * The Game which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = config.game;\r\n\r\n /**\r\n * The canvas which this WebGL Pipeline renders to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#view\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.view = config.game.canvas;\r\n\r\n /**\r\n * Used to store the current game resolution\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Width of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * Height of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The WebGL context this WebGL Pipeline uses.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.0.0\r\n */\r\n this.gl = config.gl;\r\n\r\n /**\r\n * How many vertices have been fed to the current pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = 0;\r\n\r\n /**\r\n * The limit of vertices that the pipeline can hold\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexCapacity = config.vertexCapacity;\r\n\r\n /**\r\n * The WebGL Renderer which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer\r\n * @type {Phaser.Renderer.WebGL.WebGLRenderer}\r\n * @since 3.0.0\r\n */\r\n this.renderer = config.renderer;\r\n\r\n /**\r\n * Raw byte buffer of vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize));\r\n\r\n /**\r\n * The handle to a WebGL vertex buffer object.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The handle to a WebGL program\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#program\r\n * @type {WebGLProgram}\r\n * @since 3.0.0\r\n */\r\n this.program = this.renderer.createProgram(config.vertShader, config.fragShader);\r\n\r\n /**\r\n * Array of objects that describe the vertex attributes\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.attributes = config.attributes;\r\n\r\n /**\r\n * The size in bytes of the vertex\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexSize = config.vertexSize;\r\n\r\n /**\r\n * The primitive topology which the pipeline will use to submit draw calls\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#topology\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.topology = config.topology;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources\r\n * to the GPU.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes\r\n * @type {Uint8Array}\r\n * @since 3.0.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * This will store the amount of components of 32 bit length\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl);\r\n\r\n /**\r\n * Indicates if the current pipeline is flushing the contents to the GPU.\r\n * When the variable is set the flush function will be locked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked\r\n * @type {boolean}\r\n * @since 3.1.0\r\n */\r\n this.flushLocked = false;\r\n\r\n /**\r\n * Indicates if the current pipeline is active or not for this frame only.\r\n * Reset in the onRender method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n *\r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#boot\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Adds a description of vertex attribute to the pipeline\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - Name of the vertex attribute\r\n * @param {integer} size - Vertex component size\r\n * @param {integer} type - Type of the attribute\r\n * @param {boolean} normalized - Is the value normalized to a range\r\n * @param {integer} offset - Byte offset to the beginning of the first element in the vertex\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n addAttribute: function (name, size, type, normalized, offset)\r\n {\r\n this.attributes.push({\r\n name: name,\r\n size: size,\r\n type: this.renderer.glFormats[type],\r\n normalized: normalized,\r\n offset: offset\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the current batch of vertices is full.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the current batch should be flushed, otherwise `false`.\r\n */\r\n shouldFlush: function ()\r\n {\r\n return (this.vertexCount >= this.vertexCapacity);\r\n },\r\n\r\n /**\r\n * Resizes the properties used to describe the viewport\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width of this WebGL Pipeline.\r\n * @param {number} height - The new height of this WebGL Pipeline.\r\n * @param {number} resolution - The resolution this WebGL Pipeline should be resized to.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n this.width = width * resolution;\r\n this.height = height * resolution;\r\n this.resolution = resolution;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds the pipeline resources, including programs, vertex buffers and binds attributes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#bind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n bind: function ()\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var attributes = this.attributes;\r\n var program = this.program;\r\n var renderer = this.renderer;\r\n var vertexSize = this.vertexSize;\r\n\r\n renderer.setProgram(program);\r\n renderer.setVertexBuffer(vertexBuffer);\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n var location = gl.getAttribLocation(program, element.name);\r\n\r\n if (location >= 0)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset);\r\n }\r\n else if (location !== -1)\r\n {\r\n gl.disableVertexAttribArray(location);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whenever this WebGL Pipeline is bound to a WebGL Renderer.\r\n *\r\n * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n // This is for updating uniform data it's called on each bind attempt.\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before each frame is rendered, but after the canvas has been cleared.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPreRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before a Scene's Camera is rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function ()\r\n {\r\n // called for each camera\r\n return this;\r\n },\r\n\r\n /**\r\n * Called after each frame has been completely rendered and snapshots have been taken.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPostRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call\r\n * for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked) { return this; }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n\r\n if (vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n return;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n gl.drawArrays(topology, 0, vertexCount);\r\n\r\n this.vertexCount = 0;\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n destroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n delete this.program;\r\n delete this.vertexBuffer;\r\n delete this.gl;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new value of the `float` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1: function (name, x)\r\n {\r\n this.renderer.setFloat1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec2` uniform.\r\n * @param {number} y - The new Y component of the `vec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2: function (name, x, y)\r\n {\r\n this.renderer.setFloat2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec3` uniform.\r\n * @param {number} y - The new Y component of the `vec3` uniform.\r\n * @param {number} z - The new Z component of the `vec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3: function (name, x, y, z)\r\n {\r\n this.renderer.setFloat3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component of the uniform\r\n * @param {number} y - Y component of the uniform\r\n * @param {number} z - Z component of the uniform\r\n * @param {number} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setFloat4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1v: function (name, arr)\r\n {\r\n this.renderer.setFloat1v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2v: function (name, arr)\r\n {\r\n this.renderer.setFloat2v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3v: function (name, arr)\r\n {\r\n this.renderer.setFloat3v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4v: function (name, arr)\r\n {\r\n this.renderer.setFloat4v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new value of the `int` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt1: function (name, x)\r\n {\r\n this.renderer.setInt1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec2` uniform.\r\n * @param {integer} y - The new Y component of the `ivec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt2: function (name, x, y)\r\n {\r\n this.renderer.setInt2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec3` uniform.\r\n * @param {integer} y - The new Y component of the `ivec3` uniform.\r\n * @param {integer} z - The new Z component of the `ivec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt3: function (name, x, y, z)\r\n {\r\n this.renderer.setInt3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component of the uniform\r\n * @param {integer} y - Y component of the uniform\r\n * @param {integer} z - Z component of the uniform\r\n * @param {integer} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setInt4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix2: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix2(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix3: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix3(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Should the matrix be transpose\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix4: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix4(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../../math/pow2/IsSizePowerOfTwo */ \"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar TextureEvents = __webpack_require__(/*! ../../textures/events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLSnapshot = __webpack_require__(/*! ../snapshot/WebGLSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js\");\r\n\r\n// Default Pipelines\r\nvar BitmapMaskPipeline = __webpack_require__(/*! ./pipelines/BitmapMaskPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js\");\r\nvar ForwardDiffuseLightPipeline = __webpack_require__(/*! ./pipelines/ForwardDiffuseLightPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./pipelines/TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\n/**\r\n * @callback WebGLContextCallback\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer which owns the context.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * WebGLRenderer is a class that contains the needed functionality to keep the\r\n * WebGLRenderingContext state clean. The main idea of the WebGLRenderer is to keep track of\r\n * any context change that happens for WebGL rendering inside of Phaser. This means\r\n * if raw webgl functions are called outside the WebGLRenderer of the Phaser WebGL\r\n * rendering ecosystem they might pollute the current WebGLRenderingContext state producing\r\n * unexpected behavior. It's recommended that WebGL interaction is done through\r\n * WebGLRenderer and/or WebGLPipeline.\r\n *\r\n * @class WebGLRenderer\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance which owns this WebGL Renderer.\r\n */\r\nvar WebGLRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLRenderer (game)\r\n {\r\n var gameConfig = game.config;\r\n\r\n var contextCreationConfig = {\r\n alpha: gameConfig.transparent,\r\n desynchronized: gameConfig.desynchronized,\r\n depth: false,\r\n antialias: gameConfig.antialias,\r\n premultipliedAlpha: gameConfig.premultipliedAlpha,\r\n stencil: true,\r\n failIfMajorPerformanceCaveat: gameConfig.failIfMajorPerformanceCaveat,\r\n powerPreference: gameConfig.powerPreference\r\n };\r\n\r\n /**\r\n * The local configuration settings of this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: gameConfig.clearBeforeRender,\r\n antialias: gameConfig.antialias,\r\n backgroundColor: gameConfig.backgroundColor,\r\n contextCreation: contextCreationConfig,\r\n resolution: gameConfig.resolution,\r\n roundPixels: gameConfig.roundPixels,\r\n maxTextures: gameConfig.maxTextures,\r\n maxTextureSize: gameConfig.maxTextureSize,\r\n batchSize: gameConfig.batchSize,\r\n maxLights: gameConfig.maxLights\r\n };\r\n\r\n /**\r\n * The Game instance which owns this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.WEBGL;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The canvas which this WebGL Renderer draws to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = game.canvas;\r\n\r\n /**\r\n * An array of blend modes supported by the WebGL Renderer.\r\n * \r\n * This array includes the default blend modes as well as any custom blend modes added through {@link #addBlendMode}.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blendModes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.blendModes = [];\r\n\r\n /**\r\n * Keeps track of any WebGLTexture created with the current WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nativeTextures\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.nativeTextures = [];\r\n\r\n /**\r\n * This property is set to `true` if the WebGL context of the renderer is lost.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLost\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.contextLost = false;\r\n\r\n /**\r\n * This object will store all pipelines created through addPipeline\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pipelines = null;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.0.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92,\r\n isFramebuffer: false,\r\n bufferWidth: 0,\r\n bufferHeight: 0\r\n };\r\n\r\n // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc)\r\n\r\n /**\r\n * Cached value for the last texture unit that was used\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit\r\n * @type {integer}\r\n * @since 3.1.0\r\n */\r\n this.currentActiveTextureUnit = 0;\r\n\r\n /**\r\n * An array of the last texture handles that were bound to the WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentTextures\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.currentTextures = new Array(16);\r\n\r\n /**\r\n * Current framebuffer in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFramebuffer = null;\r\n\r\n /**\r\n * Current WebGLPipeline in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentPipeline = null;\r\n\r\n /**\r\n * Current WebGLProgram in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram\r\n * @type {WebGLProgram}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentProgram = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Vertex buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentVertexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentVertexBuffer = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Index buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentIndexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentIndexBuffer = null;\r\n\r\n /**\r\n * Current blend mode in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentBlendMode = Infinity;\r\n\r\n /**\r\n * Indicates if the the scissor state is enabled in WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissorEnabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.currentScissorEnabled = false;\r\n\r\n /**\r\n * Stores the current scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissor\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.currentScissor = null;\r\n\r\n /**\r\n * Stack of scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#scissorStack\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.scissorStack = [];\r\n\r\n /**\r\n * The handler to invoke when the context is lost.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLostHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextLostHandler = NOOP;\r\n\r\n /**\r\n * The handler to invoke when the context is restored.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextRestoredHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextRestoredHandler = NOOP;\r\n\r\n /**\r\n * The underlying WebGL context of the renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * Array of strings that indicate which WebGL extensions are supported by the browser\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.supportedExtensions = null;\r\n\r\n /**\r\n * Extensions loaded into the current context\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#extensions\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.extensions = {};\r\n\r\n /**\r\n * Stores the current WebGL component formats for further use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFormats\r\n * @type {array}\r\n * @default []\r\n * @since 3.2.0\r\n */\r\n this.glFormats = [];\r\n\r\n /**\r\n * Stores the supported WebGL texture compression formats.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#compression\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this.compression = {\r\n ETC1: false,\r\n PVRTC: false,\r\n S3TC: false\r\n };\r\n\r\n /**\r\n * Cached drawing buffer height to reduce gl calls.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#drawingBufferHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.drawingBufferHeight = 0;\r\n\r\n /**\r\n * A blank 32x32 transparent texture, as used by the Graphics system where needed.\r\n * This is set in the `boot` method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blankTexture\r\n * @type {WebGLTexture}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.blankTexture = null;\r\n\r\n /**\r\n * A default Camera used in calls when no other camera has been provided.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#defaultCamera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.defaultCamera = new BaseCamera(0, 0, 0, 0);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * The total number of masks currently stacked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskCount\r\n * @type {integer}\r\n * @since 3.17.0\r\n */\r\n this.maskCount = 0;\r\n\r\n /**\r\n * The mask stack.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskStack\r\n * @type {Phaser.Display.Masks.GeometryMask[]}\r\n * @since 3.17.0\r\n */\r\n this.maskStack = [];\r\n\r\n /**\r\n * Internal property that tracks the currently set mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal property that tracks the currently set camera mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentCameraMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentCameraMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal gl function mapping for uniform look-up.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/uniform\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFuncMap\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.glFuncMap = null;\r\n\r\n /**\r\n * The `type` of the Game Object being currently rendered.\r\n * This can be used by advanced render functions for batching look-ahead.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentType\r\n * @type {string}\r\n * @since 3.19.0\r\n */\r\n this.currentType = '';\r\n\r\n /**\r\n * Is the `type` of the Game Object being currently rendered different than the\r\n * type of the object before it in the display list? I.e. it's a 'new' type.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#newType\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.newType = false;\r\n\r\n /**\r\n * Does the `type` of the next Game Object in the display list match that\r\n * of the object being currently rendered?\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nextTypeMatch\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.nextTypeMatch = false;\r\n\r\n this.init(this.config);\r\n },\r\n\r\n /**\r\n * Creates a new WebGLRenderingContext and initializes all internal state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#init\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n init: function (config)\r\n {\r\n var gl;\r\n var game = this.game;\r\n var canvas = this.canvas;\r\n var clearColor = config.backgroundColor;\r\n\r\n // Did they provide their own context?\r\n if (game.config.context)\r\n {\r\n gl = game.config.context;\r\n }\r\n else\r\n {\r\n gl = canvas.getContext('webgl', config.contextCreation) || canvas.getContext('experimental-webgl', config.contextCreation);\r\n }\r\n\r\n if (!gl || gl.isContextLost())\r\n {\r\n this.contextLost = true;\r\n\r\n throw new Error('WebGL unsupported');\r\n }\r\n\r\n this.gl = gl;\r\n\r\n var _this = this;\r\n\r\n this.contextLostHandler = function (event)\r\n {\r\n _this.contextLost = true;\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_LOST, _this);\r\n\r\n event.preventDefault();\r\n };\r\n\r\n this.contextRestoredHandler = function ()\r\n {\r\n _this.contextLost = false;\r\n\r\n _this.init(_this.config);\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_RESTORED, _this);\r\n };\r\n\r\n canvas.addEventListener('webglcontextlost', this.contextLostHandler, false);\r\n canvas.addEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n // Set it back into the Game, so developers can access it from there too\r\n game.context = gl;\r\n\r\n for (var i = 0; i <= 27; i++)\r\n {\r\n this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD });\r\n }\r\n\r\n // ADD\r\n this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ];\r\n\r\n // MULTIPLY\r\n this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ];\r\n\r\n // SCREEN\r\n this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ];\r\n\r\n // ERASE\r\n this.blendModes[17] = { func: [ gl.ZERO, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_REVERSE_SUBTRACT };\r\n\r\n this.glFormats[0] = gl.BYTE;\r\n this.glFormats[1] = gl.SHORT;\r\n this.glFormats[2] = gl.UNSIGNED_BYTE;\r\n this.glFormats[3] = gl.UNSIGNED_SHORT;\r\n this.glFormats[4] = gl.FLOAT;\r\n\r\n // Set the gl function map\r\n this.glFuncMap = {\r\n\r\n mat2: { func: gl.uniformMatrix2fv, length: 1, matrix: true },\r\n mat3: { func: gl.uniformMatrix3fv, length: 1, matrix: true },\r\n mat4: { func: gl.uniformMatrix4fv, length: 1, matrix: true },\r\n\r\n '1f': { func: gl.uniform1f, length: 1 },\r\n '1fv': { func: gl.uniform1fv, length: 1 },\r\n '1i': { func: gl.uniform1i, length: 1 },\r\n '1iv': { func: gl.uniform1iv, length: 1 },\r\n\r\n '2f': { func: gl.uniform2f, length: 2 },\r\n '2fv': { func: gl.uniform2fv, length: 1 },\r\n '2i': { func: gl.uniform2i, length: 2 },\r\n '2iv': { func: gl.uniform2iv, length: 1 },\r\n\r\n '3f': { func: gl.uniform3f, length: 3 },\r\n '3fv': { func: gl.uniform3fv, length: 1 },\r\n '3i': { func: gl.uniform3i, length: 3 },\r\n '3iv': { func: gl.uniform3iv, length: 1 },\r\n\r\n '4f': { func: gl.uniform4f, length: 4 },\r\n '4fv': { func: gl.uniform4fv, length: 1 },\r\n '4i': { func: gl.uniform4i, length: 4 },\r\n '4iv': { func: gl.uniform4iv, length: 1 }\r\n\r\n };\r\n\r\n // Load supported extensions\r\n var exts = gl.getSupportedExtensions();\r\n\r\n if (!config.maxTextures)\r\n {\r\n config.maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\r\n }\r\n\r\n if (!config.maxTextureSize)\r\n {\r\n config.maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\r\n }\r\n\r\n var extString = 'WEBGL_compressed_texture_';\r\n var wkExtString = 'WEBKIT_' + extString;\r\n\r\n this.compression.ETC1 = gl.getExtension(extString + 'etc1') || gl.getExtension(wkExtString + 'etc1');\r\n this.compression.PVRTC = gl.getExtension(extString + 'pvrtc') || gl.getExtension(wkExtString + 'pvrtc');\r\n this.compression.S3TC = gl.getExtension(extString + 's3tc') || gl.getExtension(wkExtString + 's3tc');\r\n\r\n this.supportedExtensions = exts;\r\n\r\n // Setup initial WebGL state\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n gl.enable(gl.BLEND);\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n // Initialize all textures to null\r\n for (var index = 0; index < this.currentTextures.length; ++index)\r\n {\r\n this.currentTextures[index] = null;\r\n }\r\n\r\n // Clear previous pipelines and reload default ones\r\n this.pipelines = {};\r\n\r\n this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this }));\r\n this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this }));\r\n this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights }));\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n game.textures.once(TextureEvents.READY, this.boot, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal boot handler. Calls 'boot' on each pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#boot\r\n * @private\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n for (var pipelineName in this.pipelines)\r\n {\r\n this.pipelines[pipelineName].boot();\r\n }\r\n\r\n var blank = this.game.textures.getFrame('__DEFAULT');\r\n\r\n this.pipelines.TextureTintPipeline.currentFrame = blank;\r\n\r\n this.blankTexture = blank;\r\n\r\n var gl = this.gl;\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height, this.game.scale.resolution);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height || resolution !== this.resolution)\r\n {\r\n this.resize(baseSize.width, baseSize.height, resolution);\r\n }\r\n },\r\n\r\n /**\r\n * Resizes the drawing buffer to match that required by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n * @param {number} [resolution] - The new resolution of the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n this.width = width;\r\n this.height = height;\r\n this.resolution = resolution;\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n // Update all registered pipelines\r\n for (var pipelineName in pipelines)\r\n {\r\n pipelines[pipelineName].resize(width, height, resolution);\r\n }\r\n\r\n this.drawingBufferHeight = gl.drawingBufferHeight;\r\n\r\n gl.scissor(0, (gl.drawingBufferHeight - height), width, height);\r\n\r\n this.defaultCamera.setSize(width, height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a WebGL extension is supported\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - Name of the WebGL extension\r\n *\r\n * @return {boolean} `true` if the extension is supported, otherwise `false`.\r\n */\r\n hasExtension: function (extensionName)\r\n {\r\n return this.supportedExtensions ? this.supportedExtensions.indexOf(extensionName) : false;\r\n },\r\n\r\n /**\r\n * Loads a WebGL extension\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - The name of the extension to load.\r\n *\r\n * @return {object} WebGL extension if the extension is supported\r\n */\r\n getExtension: function (extensionName)\r\n {\r\n if (!this.hasExtension(extensionName)) { return null; }\r\n\r\n if (!(extensionName in this.extensions))\r\n {\r\n this.extensions[extensionName] = this.gl.getExtension(extensionName);\r\n }\r\n\r\n return this.extensions[extensionName];\r\n },\r\n\r\n /**\r\n * Flushes the current pipeline if the pipeline is bound\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#flush\r\n * @since 3.0.0\r\n */\r\n flush: function ()\r\n {\r\n if (this.currentPipeline)\r\n {\r\n this.currentPipeline.flush();\r\n }\r\n },\r\n\r\n /**\r\n * Checks if a pipeline is present in the current WebGLRenderer\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`.\r\n */\r\n hasPipeline: function (pipelineName)\r\n {\r\n return (pipelineName in this.pipelines);\r\n },\r\n\r\n /**\r\n * Returns the pipeline by name if the pipeline exists\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found.\r\n */\r\n getPipeline: function (pipelineName)\r\n {\r\n return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null;\r\n },\r\n\r\n /**\r\n * Removes a pipeline by name.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removePipeline: function (pipelineName)\r\n {\r\n delete this.pipelines[pipelineName];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a pipeline instance into the collection of pipelines\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - A unique string-based key for the pipeline.\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed.\r\n */\r\n addPipeline: function (pipelineName, pipelineInstance)\r\n {\r\n if (!this.hasPipeline(pipelineName))\r\n {\r\n this.pipelines[pipelineName] = pipelineInstance;\r\n }\r\n else\r\n {\r\n console.warn('Pipeline exists: ' + pipelineName);\r\n }\r\n\r\n pipelineInstance.name = pipelineName;\r\n\r\n this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution);\r\n\r\n return pipelineInstance;\r\n },\r\n\r\n /**\r\n * Pushes a new scissor state. This is used to set nested scissor states.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n *\r\n * @return {integer[]} An array containing the scissor values.\r\n */\r\n pushScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var scissorStack = this.scissorStack;\r\n\r\n var scissor = [ x, y, width, height ];\r\n\r\n scissorStack.push(scissor);\r\n\r\n this.setScissor(x, y, width, height, drawingBufferHeight);\r\n\r\n this.currentScissor = scissor;\r\n\r\n return scissor;\r\n },\r\n\r\n /**\r\n * Sets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor\r\n * @since 3.0.0\r\n * \r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n */\r\n setScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var gl = this.gl;\r\n\r\n var current = this.currentScissor;\r\n\r\n var setScissor = (width > 0 && height > 0);\r\n\r\n if (current && setScissor)\r\n {\r\n var cx = current[0];\r\n var cy = current[1];\r\n var cw = current[2];\r\n var ch = current[3];\r\n\r\n setScissor = (cx !== x || cy !== y || cw !== width || ch !== height);\r\n }\r\n\r\n if (setScissor)\r\n {\r\n this.flush();\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/scissor\r\n gl.scissor(x, (drawingBufferHeight - y - height), width, height);\r\n }\r\n },\r\n\r\n /**\r\n * Pops the last scissor state and sets it.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#popScissor\r\n * @since 3.0.0\r\n */\r\n popScissor: function ()\r\n {\r\n var scissorStack = this.scissorStack;\r\n\r\n // Remove the current scissor\r\n scissorStack.pop();\r\n\r\n // Reset the previous scissor\r\n var scissor = scissorStack[scissorStack.length - 1];\r\n\r\n if (scissor)\r\n {\r\n this.setScissor(scissor[0], scissor[1], scissor[2], scissor[3]);\r\n }\r\n\r\n this.currentScissor = scissor;\r\n },\r\n\r\n /**\r\n * Binds a WebGLPipeline and sets it as the current pipeline to be used.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated.\r\n */\r\n setPipeline: function (pipelineInstance, gameObject)\r\n {\r\n if (this.currentPipeline !== pipelineInstance ||\r\n this.currentPipeline.vertexBuffer !== this.currentVertexBuffer ||\r\n this.currentPipeline.program !== this.currentProgram)\r\n {\r\n this.flush();\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n }\r\n\r\n this.currentPipeline.onBind(gameObject);\r\n\r\n return this.currentPipeline;\r\n },\r\n\r\n /**\r\n * Is there an active stencil mask?\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasActiveStencilMask\r\n * @since 3.17.0\r\n * \r\n * @return {boolean} `true` if there is an active stencil mask, otherwise `false`.\r\n */\r\n hasActiveStencilMask: function ()\r\n {\r\n var mask = this.currentMask.mask;\r\n var camMask = this.currentCameraMask.mask;\r\n\r\n return ((mask && mask.isStencil) || (camMask && camMask.isStencil));\r\n },\r\n\r\n /**\r\n * Use this to reset the gl context to the state that Phaser requires to continue rendering.\r\n * Calling this will:\r\n * \r\n * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`.\r\n * * Clear the depth buffer and stencil buffers.\r\n * * Reset the viewport size.\r\n * * Reset the blend mode.\r\n * * Bind a blank texture as the active texture on texture unit zero.\r\n * * Rebinds the given pipeline instance.\r\n * \r\n * You should call this having previously called `clearPipeline` and then wishing to return\r\n * control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n */\r\n rebindPipeline: function (pipelineInstance)\r\n {\r\n var gl = this.gl;\r\n\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n if (this.hasActiveStencilMask())\r\n {\r\n gl.clear(gl.DEPTH_BUFFER_BIT);\r\n }\r\n else\r\n {\r\n // If there wasn't a stencil mask set before this call, we can disable it safely\r\n gl.disable(gl.STENCIL_TEST);\r\n gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.viewport(0, 0, this.width, this.height);\r\n\r\n this.setBlendMode(0, true);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture);\r\n\r\n this.currentActiveTextureUnit = 0;\r\n this.currentTextures[0] = this.blankTexture.glTexture;\r\n\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n this.currentPipeline.onBind();\r\n },\r\n\r\n /**\r\n * Flushes the current WebGLPipeline being used and then clears it, along with the\r\n * the current shader program and vertex buffer. Then resets the blend mode to NORMAL.\r\n * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when\r\n * you wish to return control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline\r\n * @since 3.16.0\r\n */\r\n clearPipeline: function ()\r\n {\r\n this.flush();\r\n\r\n this.currentPipeline = null;\r\n this.currentProgram = null;\r\n this.currentVertexBuffer = null;\r\n this.currentIndexBuffer = null;\r\n\r\n this.setBlendMode(0, true);\r\n },\r\n\r\n /**\r\n * Sets the blend mode to the value given.\r\n *\r\n * If the current blend mode is different from the one given, the pipeline is flushed and the new\r\n * blend mode is enabled.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} blendModeId - The blend mode to be set. Can be a `BlendModes` const or an integer value.\r\n * @param {boolean} [force=false] - Force the blend mode to be set, regardless of the currently set blend mode.\r\n *\r\n * @return {boolean} `true` if the blend mode was changed as a result of this call, forcing a flush, otherwise `false`.\r\n */\r\n setBlendMode: function (blendModeId, force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n var gl = this.gl;\r\n var blendMode = this.blendModes[blendModeId];\r\n\r\n if (force || (blendModeId !== CONST.BlendModes.SKIP_CHECK && this.currentBlendMode !== blendModeId))\r\n {\r\n this.flush();\r\n\r\n gl.enable(gl.BLEND);\r\n gl.blendEquation(blendMode.equation);\r\n\r\n if (blendMode.func.length > 2)\r\n {\r\n gl.blendFuncSeparate(blendMode.func[0], blendMode.func[1], blendMode.func[2], blendMode.func[3]);\r\n }\r\n else\r\n {\r\n gl.blendFunc(blendMode.func[0], blendMode.func[1]);\r\n }\r\n\r\n this.currentBlendMode = blendModeId;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Creates a new custom blend mode for the renderer.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {GLenum[]} func - An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.\r\n * @param {GLenum} equation - The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.\r\n *\r\n * @return {integer} The index of the new blend mode, used for referencing it in the future.\r\n */\r\n addBlendMode: function (func, equation)\r\n {\r\n var index = this.blendModes.push({ func: func, equation: equation });\r\n\r\n return index - 1;\r\n },\r\n\r\n /**\r\n * Updates the function bound to a given custom blend mode.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#updateBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode.\r\n * @param {function} func - The function to use for the blend mode.\r\n * @param {function} equation - The equation to use for the blend mode.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n updateBlendMode: function (index, func, equation)\r\n {\r\n if (this.blendModes[index])\r\n {\r\n this.blendModes[index].func = func;\r\n\r\n if (equation)\r\n {\r\n this.blendModes[index].equation = equation;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a custom blend mode from the renderer.\r\n * Any Game Objects still using this blend mode will error, so be sure to clear them first.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removeBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removeBlendMode: function (index)\r\n {\r\n if (index > 17 && this.blendModes[index])\r\n {\r\n this.blendModes.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current active texture for texture unit zero to be a blank texture.\r\n * This only happens if there isn't a texture already in use by texture unit zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlankTexture\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [force=false] - Force a blank texture set, regardless of what's already bound?\r\n */\r\n setBlankTexture: function (force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n if (force || this.currentActiveTextureUnit !== 0 || !this.currentTextures[0])\r\n {\r\n this.setTexture2D(this.blankTexture.glTexture, 0);\r\n }\r\n },\r\n\r\n /**\r\n * Binds a texture at a texture unit. If a texture is already\r\n * bound to that unit it will force a flush on the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL texture that needs to be bound.\r\n * @param {integer} textureUnit - The texture unit to which the texture will be bound.\r\n * @param {boolean} [flush=true] - Will the current pipeline be flushed if this is a new texture, or not?\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setTexture2D: function (texture, textureUnit, flush)\r\n {\r\n if (flush === undefined) { flush = true; }\r\n\r\n var gl = this.gl;\r\n\r\n if (texture !== this.currentTextures[textureUnit])\r\n {\r\n if (flush)\r\n {\r\n this.flush();\r\n }\r\n\r\n if (this.currentActiveTextureUnit !== textureUnit)\r\n {\r\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\r\n\r\n this.currentActiveTextureUnit = textureUnit;\r\n }\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n\r\n this.currentTextures[textureUnit] = texture;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a framebuffer. If there was another framebuffer already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer that needs to be bound.\r\n * @param {boolean} [updateScissor=false] - If a framebuffer is given, set the gl scissor to match the frame buffer size? Or, if `null` given, pop the scissor from the stack.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setFramebuffer: function (framebuffer, updateScissor)\r\n {\r\n if (updateScissor === undefined) { updateScissor = false; }\r\n\r\n var gl = this.gl;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n if (framebuffer !== this.currentFramebuffer)\r\n {\r\n if (framebuffer && framebuffer.renderTexture)\r\n {\r\n width = framebuffer.renderTexture.width;\r\n height = framebuffer.renderTexture.height;\r\n }\r\n else\r\n {\r\n this.flush();\r\n }\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n if (updateScissor)\r\n {\r\n if (framebuffer)\r\n {\r\n this.drawingBufferHeight = height;\r\n\r\n this.pushScissor(0, 0, width, height);\r\n }\r\n else\r\n {\r\n this.drawingBufferHeight = this.height;\r\n\r\n this.popScissor();\r\n }\r\n }\r\n\r\n this.currentFramebuffer = framebuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a program. If there was another program already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The program that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setProgram: function (program)\r\n {\r\n var gl = this.gl;\r\n\r\n if (program !== this.currentProgram)\r\n {\r\n this.flush();\r\n\r\n gl.useProgram(program);\r\n\r\n this.currentProgram = program;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a vertex buffer. If there is a vertex buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The buffer that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setVertexBuffer: function (vertexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (vertexBuffer !== this.currentVertexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n this.currentVertexBuffer = vertexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a index buffer. If there is a index buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} indexBuffer - The buffer the needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setIndexBuffer: function (indexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (indexBuffer !== this.currentIndexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n\r\n this.currentIndexBuffer = indexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a texture from an image source. If the source is not valid it creates an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTextureFromSource\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source of the texture.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} scaleMode - The scale mode to be used by the texture.\r\n *\r\n * @return {?WebGLTexture} The WebGL Texture that was created, or `null` if it couldn't be created.\r\n */\r\n createTextureFromSource: function (source, width, height, scaleMode)\r\n {\r\n var gl = this.gl;\r\n var filter = gl.NEAREST;\r\n var wrap = gl.CLAMP_TO_EDGE;\r\n var texture = null;\r\n\r\n width = source ? source.width : width;\r\n height = source ? source.height : height;\r\n\r\n if (IsSizePowerOfTwo(width, height))\r\n {\r\n wrap = gl.REPEAT;\r\n }\r\n\r\n if (scaleMode === CONST.ScaleModes.LINEAR && this.config.antialias)\r\n {\r\n filter = gl.LINEAR;\r\n }\r\n\r\n if (!source && typeof width === 'number' && typeof height === 'number')\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n }\r\n else\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, source);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * A wrapper for creating a WebGLTexture. If no pixel data is passed it will create an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {integer} mipLevel - Mip level of the texture.\r\n * @param {integer} minFilter - Filtering of the texture.\r\n * @param {integer} magFilter - Filtering of the texture.\r\n * @param {integer} wrapT - Wrapping mode of the texture.\r\n * @param {integer} wrapS - Wrapping mode of the texture.\r\n * @param {integer} format - Which format does the texture use.\r\n * @param {object} pixels - pixel data.\r\n * @param {integer} width - Width of the texture in pixels.\r\n * @param {integer} height - Height of the texture in pixels.\r\n * @param {boolean} pma - Does the texture have premultiplied alpha?\r\n *\r\n * @return {WebGLTexture} The WebGLTexture that was created.\r\n */\r\n createTexture2D: function (mipLevel, minFilter, magFilter, wrapT, wrapS, format, pixels, width, height, pma)\r\n {\r\n pma = (pma === undefined || pma === null) ? true : pma;\r\n\r\n var gl = this.gl;\r\n var texture = gl.createTexture();\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, pma);\r\n\r\n if (pixels === null || pixels === undefined)\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, width, height, 0, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, format, gl.UNSIGNED_BYTE, pixels);\r\n\r\n width = pixels.width;\r\n height = pixels.height;\r\n }\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n texture.isAlphaPremultiplied = pma;\r\n texture.isRenderTexture = false;\r\n texture.width = width;\r\n texture.height = height;\r\n\r\n this.nativeTextures.push(texture);\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Wrapper for creating WebGLFramebuffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - Width in pixels of the framebuffer\r\n * @param {integer} height - Height in pixels of the framebuffer\r\n * @param {WebGLTexture} renderTexture - The color texture to where the color pixels are written\r\n * @param {boolean} addDepthStencilBuffer - Indicates if the current framebuffer support depth and stencil buffers\r\n *\r\n * @return {WebGLFramebuffer} Raw WebGLFramebuffer\r\n */\r\n createFramebuffer: function (width, height, renderTexture, addDepthStencilBuffer)\r\n {\r\n var gl = this.gl;\r\n var framebuffer = gl.createFramebuffer();\r\n var complete = 0;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n if (addDepthStencilBuffer)\r\n {\r\n var depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n\r\n renderTexture.isRenderTexture = true;\r\n renderTexture.isAlphaPremultiplied = false;\r\n\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, renderTexture, 0);\r\n\r\n complete = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n\r\n if (complete !== gl.FRAMEBUFFER_COMPLETE)\r\n {\r\n var errors = {\r\n 36054: 'Incomplete Attachment',\r\n 36055: 'Missing Attachment',\r\n 36057: 'Incomplete Dimensions',\r\n 36061: 'Framebuffer Unsupported'\r\n };\r\n\r\n throw new Error('Framebuffer incomplete. Framebuffer status: ' + errors[complete]);\r\n }\r\n\r\n framebuffer.renderTexture = renderTexture;\r\n\r\n this.setFramebuffer(null);\r\n\r\n return framebuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createProgram\r\n * @since 3.0.0\r\n *\r\n * @param {string} vertexShader - Source to the vertex shader\r\n * @param {string} fragmentShader - Source to the fragment shader\r\n *\r\n * @return {WebGLProgram} Raw WebGLProgram\r\n */\r\n createProgram: function (vertexShader, fragmentShader)\r\n {\r\n var gl = this.gl;\r\n var program = gl.createProgram();\r\n var vs = gl.createShader(gl.VERTEX_SHADER);\r\n var fs = gl.createShader(gl.FRAGMENT_SHADER);\r\n\r\n gl.shaderSource(vs, vertexShader);\r\n gl.shaderSource(fs, fragmentShader);\r\n gl.compileShader(vs);\r\n gl.compileShader(fs);\r\n\r\n if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Vertex Shader:\\n' + gl.getShaderInfoLog(vs));\r\n }\r\n if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Fragment Shader:\\n' + gl.getShaderInfoLog(fs));\r\n }\r\n\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS))\r\n {\r\n throw new Error('Failed to link program:\\n' + gl.getProgramInfoLog(program));\r\n }\r\n\r\n return program;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - It's either ArrayBuffer or an integer indicating the size of the vbo\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\r\n *\r\n * @return {WebGLBuffer} Raw vertex buffer\r\n */\r\n createVertexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = gl.createBuffer();\r\n\r\n this.setVertexBuffer(vertexBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setVertexBuffer(null);\r\n\r\n return vertexBuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - Either ArrayBuffer or an integer indicating the size of the vbo.\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.\r\n *\r\n * @return {WebGLBuffer} Raw index buffer\r\n */\r\n createIndexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var indexBuffer = gl.createBuffer();\r\n\r\n this.setIndexBuffer(indexBuffer);\r\n\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setIndexBuffer(null);\r\n\r\n return indexBuffer;\r\n },\r\n\r\n /**\r\n * Removes the given texture from the nativeTextures array and then deletes it from the GPU.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteTexture\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL Texture to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteTexture: function (texture)\r\n {\r\n var index = this.nativeTextures.indexOf(texture);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(this.nativeTextures, index);\r\n }\r\n\r\n this.gl.deleteTexture(texture);\r\n\r\n if (this.currentTextures[0] === texture && !this.game.pendingDestroy)\r\n {\r\n // texture we just deleted is in use, so bind a blank texture\r\n this.setBlankTexture(true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLFramebuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The Framebuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteFramebuffer: function (framebuffer)\r\n {\r\n this.gl.deleteFramebuffer(framebuffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLProgram from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The shader program to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteProgram: function (program)\r\n {\r\n this.gl.deleteProgram(program);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLBuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The WebGLBuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteBuffer: function (buffer)\r\n {\r\n this.gl.deleteBuffer(buffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the pre-render operations for the given camera.\r\n * Handles any clipping needed by the camera and renders the background color if a color is visible.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to pre-render.\r\n */\r\n preRenderCamera: function (camera)\r\n {\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n var color = camera.backgroundColor;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n this.flush();\r\n\r\n this.pushScissor(cx, cy, cw, -ch);\r\n\r\n this.setFramebuffer(camera.framebuffer);\r\n\r\n var gl = this.gl;\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n TextureTintPipeline.projOrtho(cx, cw + cx, cy, ch + cy, -1000, 1000);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw + cx, ch + cy,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n \r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n else\r\n {\r\n this.pushScissor(cx, cy, cw, ch);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw , ch,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n }\r\n },\r\n\r\n getCurrentStencilMask: function ()\r\n {\r\n var prev = null;\r\n var stack = this.maskStack;\r\n var cameraMask = this.currentCameraMask;\r\n\r\n if (stack.length > 0)\r\n {\r\n prev = stack[stack.length - 1];\r\n }\r\n else if (cameraMask.mask && cameraMask.mask.isStencil)\r\n {\r\n prev = cameraMask;\r\n }\r\n\r\n return prev;\r\n },\r\n\r\n /**\r\n * Controls the post-render operations for the given camera.\r\n * Renders the foreground camera effects like flash and fading. It resets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to post-render.\r\n */\r\n postRenderCamera: function (camera)\r\n {\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n\r\n camera.dirty = false;\r\n\r\n this.popScissor();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n TextureTintPipeline.flush();\r\n\r\n this.setFramebuffer(null);\r\n\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0);\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline;\r\n\r\n pipeline.batchTexture(\r\n camera,\r\n camera.glTexture,\r\n camera.width, camera.height,\r\n camera.x, camera.y,\r\n camera.width, camera.height,\r\n camera.zoom, camera.zoom,\r\n camera.rotation,\r\n camera.flipX, !camera.flipY,\r\n 1, 1,\r\n 0, 0,\r\n 0, 0, camera.width, camera.height,\r\n getTint(camera._tintTL, camera._alphaTL),\r\n getTint(camera._tintTR, camera._alphaTR),\r\n getTint(camera._tintBL, camera._alphaBL),\r\n getTint(camera._tintBR, camera._alphaBR),\r\n (camera._isTinted && camera.tintFill),\r\n 0, 0,\r\n this.defaultCamera,\r\n null\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it\r\n this.setBlankTexture(true);\r\n }\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = null;\r\n\r\n camera.mask.postRenderWebGL(this, camera._maskCamera);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the current vertex buffer and updates pipelines.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n // Make sure we are bound to the main frame buffer\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n if (this.config.clearBeforeRender)\r\n {\r\n var clearColor = this.config.backgroundColor;\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPreRender();\r\n }\r\n\r\n // TODO - Find a way to stop needing to create these arrays every frame\r\n // and equally not need a huge array buffer created to hold them\r\n\r\n this.currentScissor = [ 0, 0, this.width, this.height ];\r\n this.scissorStack = [ this.currentScissor ];\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n gl.scissor(0, (this.drawingBufferHeight - this.height), this.width, this.height);\r\n }\r\n\r\n this.currentMask.mask = null;\r\n this.currentCameraMask.mask = null;\r\n this.maskStack.length = 0;\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n },\r\n\r\n /**\r\n * The core render step for a Scene Camera.\r\n * \r\n * Iterates through the given Game Object's array and renders them with the given Camera.\r\n * \r\n * This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked\r\n * by the Scene Systems.render method.\r\n * \r\n * This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.GameObject} children - The Game Object's within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently un-used.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var list = children.list;\r\n var childCount = list.length;\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onRender(scene, camera);\r\n }\r\n\r\n // Apply scissor for cam region + render background color, if not transparent\r\n this.preRenderCamera(camera);\r\n\r\n // Nothing to render, so bail out\r\n if (childCount === 0)\r\n {\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n\r\n return;\r\n }\r\n\r\n // Reset the current type\r\n this.currentType = '';\r\n \r\n var current = this.currentMask;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.blendMode !== this.currentBlendMode)\r\n {\r\n this.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask && current.mask !== mask)\r\n {\r\n // Render out the previously set mask\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n if (mask && current.mask !== mask)\r\n {\r\n mask.preRenderWebGL(this, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== this.currentType)\r\n {\r\n this.newType = true;\r\n this.currentType = type;\r\n }\r\n\r\n this.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === this.currentType) : false;\r\n\r\n child.renderWebGL(this, child, interpolationPercentage, camera);\r\n\r\n this.newType = false;\r\n }\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask)\r\n {\r\n // Render out the previously set mask, if it was the last item in the display list\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n },\r\n\r\n /**\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n this.flush();\r\n\r\n // Unbind custom framebuffer here\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n }\r\n\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPostRender();\r\n }\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gl.drawingBufferWidth);\r\n state.height = Math.min(height, this.gl.drawingBufferHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given frame buffer.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotFramebuffer\r\n * @since 3.19.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer to grab from.\r\n * @param {integer} bufferWidth - The width of the framebuffer.\r\n * @param {integer} bufferHeight - The height of the framebuffer.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=bufferWidth] - The width of the area to grab.\r\n * @param {integer} [height=bufferHeight] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotFramebuffer: function (framebuffer, bufferWidth, bufferHeight, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = bufferWidth; }\r\n if (height === undefined) { height = bufferHeight; }\r\n\r\n var currentFramebuffer = this.currentFramebuffer;\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n state.isFramebuffer = true;\r\n state.bufferWidth = bufferWidth;\r\n state.bufferHeight = bufferHeight;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n this.setFramebuffer(currentFramebuffer);\r\n\r\n state.callback = null;\r\n state.isFramebuffer = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture based on the given canvas element.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#canvasToTexture\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} srcCanvas - The Canvas element that will be used to populate the texture.\r\n * @param {WebGLTexture} [dstTexture] - Is this going to replace an existing texture? If so, pass it here.\r\n * @param {boolean} [noRepeat=false] - Should this canvas never be allowed to set REPEAT? (such as for Text objects)\r\n *\r\n * @return {WebGLTexture} The newly created WebGL Texture.\r\n */\r\n canvasToTexture: function (srcCanvas, dstTexture, noRepeat)\r\n {\r\n if (noRepeat === undefined) { noRepeat = false; }\r\n\r\n var gl = this.gl;\r\n\r\n if (!dstTexture)\r\n {\r\n var wrapping = gl.CLAMP_TO_EDGE;\r\n\r\n if (!noRepeat && IsSizePowerOfTwo(srcCanvas.width, srcCanvas.height))\r\n {\r\n wrapping = gl.REPEAT;\r\n }\r\n\r\n var filter = (this.config.antialias) ? gl.LINEAR : gl.NEAREST;\r\n\r\n dstTexture = this.createTexture2D(0, filter, filter, wrapping, wrapping, gl.RGBA, srcCanvas, srcCanvas.width, srcCanvas.height, true);\r\n }\r\n else\r\n {\r\n this.setTexture2D(dstTexture, 0);\r\n\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas);\r\n\r\n dstTexture.width = srcCanvas.width;\r\n dstTexture.height = srcCanvas.height;\r\n\r\n this.setTexture2D(null, 0);\r\n }\r\n\r\n return dstTexture;\r\n },\r\n\r\n /**\r\n * Sets the minification and magnification filter for a texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter\r\n * @since 3.0.0\r\n *\r\n * @param {integer} texture - The texture to set the filter for.\r\n * @param {integer} filter - The filter to set. 0 for linear filtering, 1 for nearest neighbor (blocky) filtering.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setTextureFilter: function (texture, filter)\r\n {\r\n var gl = this.gl;\r\n var glFilter = [ gl.LINEAR, gl.NEAREST ][filter];\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter);\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1f(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2f(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3f(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component\r\n * @param {number} y - Y component\r\n * @param {number} z - Z component\r\n * @param {number} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4f(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n\r\n setFloat4v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1i(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2i(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n * @param {integer} z - The new Z component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3i(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component\r\n * @param {integer} y - Y component\r\n * @param {integer} z - Z component\r\n * @param {integer} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4i(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.\r\n * @param {Float32Array} matrix - The new matrix value.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix2: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix2fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - [description]\r\n * @param {Float32Array} matrix - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix3: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix3fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Is the matrix transposed\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix4: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix4fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of texture units that can be used in a fragment shader.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextures\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum number of textures WebGL supports.\r\n */\r\n getMaxTextures: function ()\r\n {\r\n return this.config.maxTextures;\r\n },\r\n\r\n /**\r\n * Returns the largest texture size (either width or height) that can be created.\r\n * Note that VRAM may not allow a texture of any given size, it just expresses\r\n * hardware / driver support for a given size.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextureSize\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum supported texture size.\r\n */\r\n getMaxTextureSize: function ()\r\n {\r\n return this.config.maxTextureSize;\r\n },\r\n\r\n /**\r\n * Destroy this WebGLRenderer, cleaning up all related resources such as pipelines, native textures, etc.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n // Clear-up anything that should be cleared :)\r\n\r\n for (var i = 0; i < this.nativeTextures.length; i++)\r\n {\r\n this.gl.deleteTexture(this.nativeTextures[i]);\r\n }\r\n\r\n this.nativeTextures = [];\r\n\r\n for (var key in this.pipelines)\r\n {\r\n this.pipelines[key].destroy();\r\n\r\n delete this.pipelines[key];\r\n }\r\n\r\n this.defaultCamera.destroy();\r\n\r\n this.currentMask = null;\r\n this.currentCameraMask = null;\r\n\r\n this.canvas.removeEventListener('webglcontextlost', this.contextLostHandler, false);\r\n this.canvas.removeEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n this.game = null;\r\n this.gl = null;\r\n this.canvas = null;\r\n\r\n this.maskStack = [];\r\n\r\n this.contextLost = true;\r\n\r\n this.extensions = {};\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js?")},"./node_modules/phaser/src/renderer/webgl/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Utils: __webpack_require__(/*! ./Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js"),\r\n WebGLPipeline: __webpack_require__(/*! ./WebGLPipeline */ "./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js"),\r\n WebGLRenderer: __webpack_require__(/*! ./WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js"),\r\n Pipelines: __webpack_require__(/*! ./pipelines */ "./node_modules/phaser/src/renderer/webgl/pipelines/index.js"),\r\n\r\n // Constants\r\n BYTE: 0,\r\n SHORT: 1,\r\n UNSIGNED_BYTE: 2,\r\n UNSIGNED_SHORT: 3,\r\n FLOAT: 4\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/index.js?')},"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/BitmapMask-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/BitmapMask-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using \r\n * sampling two texture on the fragment shader and using the fragment's alpha to clip the region.\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class BitmapMaskPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline.\r\n */\r\nvar BitmapMaskPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n \r\n initialize:\r\n\r\n function BitmapMaskPipeline (config)\r\n {\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES),\r\n vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS),\r\n fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS),\r\n vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3),\r\n\r\n vertexSize: (config.vertexSize ? config.vertexSize :\r\n Float32Array.BYTES_PER_ELEMENT * 2),\r\n\r\n vertices: new Float32Array([\r\n -1, +1, -1, -7, +7, +1\r\n ]).buffer,\r\n\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = 1;\r\n\r\n /**\r\n * Dirty flag to check if resolution properties need to be updated on the \r\n * masking shader.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.resolutionDirty = true;\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n \r\n if (this.resolutionDirty)\r\n {\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n renderer.setInt1(program, 'uMainSampler', 0);\r\n renderer.setInt1(program, 'uMaskSampler', 1);\r\n this.resolutionDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} resolution - [description]\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n this.resolutionDirty = true;\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds necessary resources and renders the mask to a separated framebuffer.\r\n * The framebuffer for the masked object is also bound for further use.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - [description]\r\n */\r\n beginMask: function (mask, maskedObject, camera)\r\n {\r\n var renderer = this.renderer;\r\n var gl = this.gl;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n mask.prevFramebuffer = renderer.currentFramebuffer;\r\n\r\n renderer.setFramebuffer(mask.mainFramebuffer);\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n if (renderer.currentCameraMask.mask !== mask)\r\n {\r\n renderer.currentMask.mask = mask;\r\n renderer.currentMask.camera = camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The masked game objects framebuffer is unbound and its texture \r\n * is bound together with the mask texture and the mask shader and \r\n * a draw call with a single quad is processed. Here is where the\r\n * masking effect is applied. \r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as a mask.\r\n */\r\n endMask: function (mask, camera)\r\n {\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n // First we draw the mask to the mask fb\r\n renderer.setFramebuffer(mask.maskFramebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setBlendMode(0, true);\r\n\r\n bitmapMask.renderWebGL(renderer, bitmapMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n renderer.setFramebuffer(mask.prevFramebuffer);\r\n\r\n // Is there a stencil further up the stack?\r\n var prev = renderer.getCurrentStencilMask();\r\n\r\n if (prev)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, true);\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n\r\n // Bind bitmap mask pipeline and draw\r\n renderer.setPipeline(this);\r\n\r\n gl.activeTexture(gl.TEXTURE1);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.mainTexture);\r\n\r\n gl.uniform1i(gl.getUniformLocation(this.program, 'uInvertMaskAlpha'), mask.invertAlpha);\r\n\r\n // Finally, draw a triangle filling the whole screen\r\n gl.drawArrays(this.topology, 0, 3);\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMaskPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/ForwardDiffuse-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\nvar LIGHT_COUNT = 10;\r\n\r\n/**\r\n * @classdesc\r\n * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights.\r\n * This pipeline extends TextureTintPipeline so it implements all it's rendering functions\r\n * and batching system.\r\n *\r\n * @class ForwardDiffuseLightPipeline\r\n * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader.\r\n */\r\nvar ForwardDiffuseLightPipeline = new Class({\r\n\r\n Extends: TextureTintPipeline,\r\n\r\n initialize:\r\n\r\n function ForwardDiffuseLightPipeline (config)\r\n {\r\n LIGHT_COUNT = config.maxLights;\r\n\r\n config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString());\r\n\r\n TextureTintPipeline.call(this, config);\r\n\r\n /**\r\n * Default normal map texture to use.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap\r\n * @type {Phaser.Texture.Frame}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this.defaultNormalMap;\r\n\r\n /**\r\n * Inverse rotation matrix for normal map rotations.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.inverseRotationMatrix = new Float32Array([\r\n 1, 0, 0,\r\n 0, 1, 0,\r\n 0, 0, 1\r\n ]);\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n * \r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#boot\r\n * @override\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n this.defaultNormalMap = this.game.textures.getFrame('__DEFAULT');\r\n },\r\n\r\n /**\r\n * This function binds its base class resources and this lights 2D resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind\r\n * @override\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function (gameObject)\r\n {\r\n TextureTintPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n\r\n this.mvpUpdate();\r\n\r\n renderer.setInt1(program, 'uNormSampler', 1);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n if (gameObject)\r\n {\r\n this.setNormalMap(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function sets all the needed resources for each camera pass.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function (scene, camera)\r\n {\r\n this.active = false;\r\n\r\n var lightManager = scene.sys.lights;\r\n\r\n if (!lightManager || lightManager.lights.length <= 0 || !lightManager.active)\r\n {\r\n // Passthru\r\n return this;\r\n }\r\n\r\n var lights = lightManager.cull(camera);\r\n var lightCount = Math.min(lights.length, LIGHT_COUNT);\r\n\r\n if (lightCount === 0)\r\n {\r\n return this;\r\n }\r\n\r\n this.active = true;\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var cameraMatrix = camera.matrix;\r\n var point = {x: 0, y: 0};\r\n var height = renderer.height;\r\n var index;\r\n\r\n for (index = 0; index < LIGHT_COUNT; ++index)\r\n {\r\n // Reset lights\r\n renderer.setFloat1(program, 'uLights[' + index + '].radius', 0);\r\n }\r\n\r\n renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom);\r\n renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b);\r\n\r\n for (index = 0; index < lightCount; ++index)\r\n {\r\n var light = lights[index];\r\n var lightName = 'uLights[' + index + '].';\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n renderer.setFloat2(program, lightName + 'position', point.x - (camera.scrollX * light.scrollFactorX * camera.zoom), height - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n renderer.setFloat3(program, lightName + 'color', light.r, light.g, light.b);\r\n renderer.setFloat1(program, lightName + 'intensity', light.intensity);\r\n renderer.setFloat1(program, lightName + 'radius', light.radius);\r\n }\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad\r\n * @param {integer} textureWidth - Real texture width\r\n * @param {integer} textureHeight - Real texture height\r\n * @param {number} srcX - X coordinate of the quad\r\n * @param {number} srcY - Y coordinate of the quad\r\n * @param {number} srcWidth - Width of the quad\r\n * @param {number} srcHeight - Height of the quad\r\n * @param {number} scaleX - X component of scale\r\n * @param {number} scaleY - Y component of scale\r\n * @param {number} rotation - Rotation of the quad\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll\r\n * @param {number} displayOriginX - Horizontal origin in pixels\r\n * @param {number} displayOriginY - Vertical origin in pixels\r\n * @param {number} frameX - X coordinate of the texture frame\r\n * @param {number} frameY - Y coordinate of the texture frame\r\n * @param {number} frameWidth - Width of the texture frame\r\n * @param {number} frameHeight - Height of the texture frame\r\n * @param {integer} tintTL - Tint for top left\r\n * @param {integer} tintTR - Tint for top right\r\n * @param {integer} tintBL - Tint for bottom left\r\n * @param {integer} tintBR - Tint for bottom right\r\n * @param {number} tintEffect - The tint effect (0 for additive, 1 for replacement)\r\n * @param {number} uOffset - Horizontal offset on texture coordinate\r\n * @param {number} vOffset - Vertical offset on texture coordinate\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n this.renderer.setPipeline(this);\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.displayTexture)\r\n {\r\n normalTexture = gameObject.displayTexture.dataSource[gameObject.displayFrame.sourceIndex];\r\n }\r\n else if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n else if (gameObject.tileset)\r\n {\r\n normalTexture = gameObject.tileset.image.dataSource[0];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n console.warn('Normal map missing or invalid');\r\n return;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(rotation);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n // var x = -displayOriginX + frameX;\r\n // var y = -displayOriginY + frameY;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n // Do we need this? (doubt it)\r\n // if (camera.roundPixels)\r\n // {\r\n // x |= 0;\r\n // y |= 0;\r\n // }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Sets the Game Objects normal map as the active texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMap\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to update.\r\n */\r\n setNormalMap: function (gameObject)\r\n {\r\n if (!this.active || !gameObject)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n normalTexture = this.defaultNormalMap;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n\r\n this.renderer.setPipeline(gameObject.defaultPipeline);\r\n },\r\n\r\n /**\r\n * Rotates the normal map vectors inversely by the given angle.\r\n * Only works in 2D space.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation\r\n * @since 3.16.0\r\n * \r\n * @param {number} rotation - The angle of rotation in radians.\r\n */\r\n setNormalMapRotation: function (rotation)\r\n {\r\n var inverseRotationMatrix = this.inverseRotationMatrix;\r\n\r\n if (rotation)\r\n {\r\n var rot = -rotation;\r\n var c = Math.cos(rot);\r\n var s = Math.sin(rot);\r\n\r\n inverseRotationMatrix[1] = s;\r\n inverseRotationMatrix[3] = -s;\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = c;\r\n }\r\n else\r\n {\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = 1;\r\n inverseRotationMatrix[1] = inverseRotationMatrix[3] = 0;\r\n }\r\n\r\n this.renderer.setMatrix3(this.program, 'uInverseRotationMatrix', false, inverseRotationMatrix);\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The texture-based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture = sprite.texture.dataSource[sprite.frame.sourceIndex];\r\n\r\n if (normalTexture)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(sprite.rotation);\r\n\r\n TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix);\r\n }\r\n }\r\n\r\n});\r\n\r\nForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT;\r\n\r\nmodule.exports = ForwardDiffuseLightPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ \"./node_modules/phaser/src/geom/polygon/Earcut.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ModelViewProjection = __webpack_require__(/*! ./components/ModelViewProjection */ \"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/TextureTint-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/TextureTint-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * TextureTintPipeline implements the rendering infrastructure\r\n * for displaying textured objects\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class TextureTintPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above.\r\n */\r\nvar TextureTintPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n\r\n Mixins: [\r\n ModelViewProjection\r\n ],\r\n\r\n initialize:\r\n\r\n function TextureTintPipeline (config)\r\n {\r\n var rendererConfig = config.renderer.config;\r\n\r\n // Vertex Size = attribute size added together (2 + 2 + 1 + 4)\r\n\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES),\r\n vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS),\r\n fragShader: GetFastValue(config, 'fragShader', ShaderSourceFS),\r\n vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize),\r\n vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 5 + Uint8Array.BYTES_PER_ELEMENT * 4),\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n },\r\n {\r\n name: 'inTexCoord',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 2\r\n },\r\n {\r\n name: 'inTintEffect',\r\n size: 1,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 4\r\n },\r\n {\r\n name: 'inTint',\r\n size: 4,\r\n type: config.renderer.gl.UNSIGNED_BYTE,\r\n normalized: true,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 5\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Uint32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = new Uint32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = rendererConfig.batchSize;\r\n\r\n /**\r\n * Collection of batch information\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches\r\n * @type {array}\r\n * @since 3.1.0\r\n */\r\n this.batches = [];\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * Used internally to draw stroked triangles.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tempTriangle = [\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 }\r\n ];\r\n\r\n /**\r\n * The tint effect to be applied by the shader in the next geometry draw:\r\n * \r\n * 0 = texture multiplied by color\r\n * 1 = solid color + texture alpha\r\n * 2 = solid color, no texture\r\n * 3 = solid texture, no color\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tintEffect = 2;\r\n\r\n /**\r\n * Cached stroke tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Cached fill tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Internal texture frame reference.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 };\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.firstQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.prevQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Used internally for triangulating a polygon.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.polygonCache = [];\r\n\r\n this.mvpInit();\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n this.mvpUpdate();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resizes this pipeline and updates the projection.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width.\r\n * @param {number} height - The new height.\r\n * @param {number} resolution - The resolution.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n\r\n this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D\r\n * @since 3.1.0\r\n *\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This pipeline instance.\r\n */\r\n setTexture2D: function (texture, unit)\r\n {\r\n if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; }\r\n if (unit === undefined) { unit = 0; }\r\n\r\n if (this.requireTextureBatch(texture, unit))\r\n {\r\n this.pushBatch(texture, unit);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#requireTextureBatch\r\n * @since 3.16.0\r\n *\r\n * @param {WebGLTexture} texture - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {boolean} `true` if the pipeline needs to create a new batch, otherwise `false`.\r\n */\r\n requireTextureBatch: function (texture, unit)\r\n {\r\n var batches = this.batches;\r\n var batchLength = batches.length;\r\n\r\n if (batchLength > 0)\r\n {\r\n // If Texture Unit specified, we get the texture from the textures array, otherwise we use the texture property\r\n var currentTexture = (unit > 0) ? batches[batchLength - 1].textures[unit - 1] : batches[batchLength - 1].texture;\r\n\r\n return !(currentTexture === texture);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Creates a new batch object and pushes it to a batch array.\r\n * The batch object contains information relevant to the current \r\n * vertex batch like the offset in the vertex buffer, vertex count and \r\n * the textures used by that batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch\r\n * @since 3.1.0\r\n * \r\n * @param {WebGLTexture} texture - Optional WebGLTexture that will be assigned to the created batch.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n */\r\n pushBatch: function (texture, unit)\r\n {\r\n if (unit === 0)\r\n {\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: texture,\r\n textures: []\r\n });\r\n }\r\n else\r\n {\r\n var textures = [];\r\n\r\n textures[unit - 1] = texture;\r\n\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: null,\r\n textures: textures\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked)\r\n {\r\n return this;\r\n }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n var renderer = this.renderer;\r\n\r\n var batches = this.batches;\r\n var batchCount = batches.length;\r\n var batchVertexCount = 0;\r\n var batch = null;\r\n var batchNext;\r\n var textureIndex;\r\n var nTexture;\r\n\r\n if (batchCount === 0 || vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n\r\n return this;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n // Process the TEXTURE BATCHES\r\n\r\n for (var index = 0; index < batchCount - 1; index++)\r\n {\r\n batch = batches[index];\r\n batchNext = batches[index + 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = batchNext.first - batch.first;\r\n\r\n // Bail out if texture property is null (i.e. if a texture unit > 0)\r\n if (batch.texture === null || batchVertexCount <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n // Left over data\r\n batch = batches[batchCount - 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = vertexCount - batch.first;\r\n\r\n if (batch.texture && batchVertexCount > 0)\r\n {\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n this.vertexCount = 0;\r\n\r\n batches.length = 0;\r\n\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n // Will cause a flush if there are batchSize entries already\r\n this.renderer.setPipeline(this);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var frame = sprite.frame;\r\n var texture = frame.glTexture;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n var frameX = frame.x;\r\n var frameY = frame.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frameX;\r\n var y = -displayOriginY + frameY;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n u0 = crop.u0;\r\n v0 = crop.v0;\r\n u1 = crop.u1;\r\n v1 = crop.v1;\r\n\r\n frameWidth = crop.width;\r\n frameHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY))\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var xw = x + frameWidth;\r\n var yh = y + frameHeight;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n var tintEffect = (sprite._isTinted && sprite.tintFill);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 6 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0----3\r\n * |\\ B|\r\n * | \\ |\r\n * | \\ |\r\n * | A \\|\r\n * | \\\r\n * 1----2\r\n * ```\r\n * \r\n * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - The top-left x position.\r\n * @param {number} y0 - The top-left y position.\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {number} tintBR - The bottom-right tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 6 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n hasFlushed = true;\r\n\r\n this.setTexture2D(texture, unit);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n \r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n this.vertexCount += 6;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 3 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0\r\n * |\\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * 1-----2\r\n * ```\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri\r\n * @since 3.12.0\r\n *\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 3 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n this.setTexture2D(texture, unit);\r\n\r\n hasFlushed = true;\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n this.vertexCount += 3;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad using argument values instead of a Game Object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject.\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad.\r\n * @param {integer} textureWidth - Real texture width.\r\n * @param {integer} textureHeight - Real texture height.\r\n * @param {number} srcX - X coordinate of the quad.\r\n * @param {number} srcY - Y coordinate of the quad.\r\n * @param {number} srcWidth - Width of the quad.\r\n * @param {number} srcHeight - Height of the quad.\r\n * @param {number} scaleX - X component of scale.\r\n * @param {number} scaleY - Y component of scale.\r\n * @param {number} rotation - Rotation of the quad.\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped.\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped.\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll.\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll.\r\n * @param {number} displayOriginX - Horizontal origin in pixels.\r\n * @param {number} displayOriginY - Vertical origin in pixels.\r\n * @param {number} frameX - X coordinate of the texture frame.\r\n * @param {number} frameY - Y coordinate of the texture frame.\r\n * @param {number} frameWidth - Width of the texture frame.\r\n * @param {number} frameHeight - Height of the texture frame.\r\n * @param {integer} tintTL - Tint for top left.\r\n * @param {integer} tintTR - Tint for top right.\r\n * @param {integer} tintBL - Tint for bottom left.\r\n * @param {integer} tintBR - Tint for bottom right.\r\n * @param {number} tintEffect - The tint effect.\r\n * @param {number} uOffset - Horizontal offset on texture coordinate.\r\n * @param {number} vOffset - Vertical offset on texture coordinate.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container.\r\n * @param {boolean} [skipFlip=false] - Skip the renderTexture check.\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix,\r\n skipFlip)\r\n {\r\n this.renderer.setPipeline(this, gameObject);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds a Texture Frame into the batch for rendering.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered.\r\n * @param {number} x - The horizontal position to render the texture at.\r\n * @param {number} y - The vertical position to render the texture at.\r\n * @param {number} tint - The tint color.\r\n * @param {number} alpha - The alpha value.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix.\r\n */\r\n batchTextureFrame: function (\r\n frame,\r\n x, y,\r\n tint, alpha,\r\n transformMatrix,\r\n parentTransformMatrix\r\n )\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix);\r\n var calcMatrix = this._tempMatrix2;\r\n\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n if (parentTransformMatrix)\r\n {\r\n spriteMatrix.multiply(parentTransformMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n calcMatrix = spriteMatrix;\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n this.setTexture2D(frame.glTexture, 0);\r\n\r\n tint = Utils.getTintAppendFloatAlpha(tint, alpha);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, 0);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle has no transform values and isn't transformed into the local space.\r\n * Used for directly batching untransformed rectangles, such as Camera background colors.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {number} color - Color of the rectangle to draw.\r\n * @param {number} alpha - Alpha value of the rectangle to draw.\r\n */\r\n drawFillRect: function (x, y, width, height, color, alpha)\r\n {\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n this.setTexture2D();\r\n\r\n var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha);\r\n\r\n this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var x0 = calcMatrix.getX(x, y);\r\n var y0 = calcMatrix.getY(x, y);\r\n\r\n var x1 = calcMatrix.getX(x, yh);\r\n var y1 = calcMatrix.getY(x, yh);\r\n\r\n var x2 = calcMatrix.getX(xw, yh);\r\n var y2 = calcMatrix.getY(xw, yh);\r\n\r\n var x3 = calcMatrix.getX(xw, y);\r\n var y3 = calcMatrix.getY(xw, y);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.fillTint.BR, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a filled triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a stroked triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n * The triangle is created from 3 lines and drawn using the `batchStrokePath` method.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {number} lineWidth - The width of the line in pixels.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix)\r\n {\r\n var tempTriangle = this.tempTriangle;\r\n\r\n tempTriangle[0].x = x0;\r\n tempTriangle[0].y = y0;\r\n tempTriangle[0].width = lineWidth;\r\n\r\n tempTriangle[1].x = x1;\r\n tempTriangle[1].y = y1;\r\n tempTriangle[1].width = lineWidth;\r\n\r\n tempTriangle[2].x = x2;\r\n tempTriangle[2].y = y2;\r\n tempTriangle[2].width = lineWidth;\r\n\r\n tempTriangle[3].x = x0;\r\n tempTriangle[3].y = y0;\r\n tempTriangle[3].width = lineWidth;\r\n\r\n this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix);\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and then passing it through Earcut, which\r\n * creates a list of polygons. Each polygon is then added to the batch.\r\n * \r\n * The path is always automatically closed because it's filled.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillPath: function (path, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var length = path.length;\r\n var polygonCache = this.polygonCache;\r\n var polygonIndexArray;\r\n var point;\r\n\r\n var tintTL = this.fillTint.TL;\r\n var tintTR = this.fillTint.TR;\r\n var tintBL = this.fillTint.BL;\r\n var tintEffect = this.tintEffect;\r\n\r\n for (var pathIndex = 0; pathIndex < length; ++pathIndex)\r\n {\r\n point = path[pathIndex];\r\n polygonCache.push(point.x, point.y);\r\n }\r\n\r\n polygonIndexArray = Earcut(polygonCache);\r\n length = polygonIndexArray.length;\r\n\r\n var frame = this.currentFrame;\r\n\r\n for (var index = 0; index < length; index += 3)\r\n {\r\n var p0 = polygonIndexArray[index + 0] * 2;\r\n var p1 = polygonIndexArray[index + 1] * 2;\r\n var p2 = polygonIndexArray[index + 2] * 2;\r\n\r\n var x0 = polygonCache[p0 + 0];\r\n var y0 = polygonCache[p0 + 1];\r\n var x1 = polygonCache[p1 + 0];\r\n var y1 = polygonCache[p1 + 1];\r\n var x2 = polygonCache[p2 + 0];\r\n var y2 = polygonCache[p2 + 1];\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n \r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n \r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n \r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect);\r\n }\r\n\r\n polygonCache.length = 0;\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and calling `batchLine` for each section\r\n * of the path.\r\n * \r\n * The path is optionally closed at the end.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {number} lineWidth - The width of the line segments in pixels.\r\n * @param {boolean} pathOpen - Indicates if the path should be closed or left open.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n // Reset the closePath booleans\r\n this.prevQuad[4] = 0;\r\n this.firstQuad[4] = 0;\r\n\r\n var pathLength = path.length - 1;\r\n\r\n for (var pathIndex = 0; pathIndex < pathLength; pathIndex++)\r\n {\r\n var point0 = path[pathIndex];\r\n var point1 = path[pathIndex + 1];\r\n\r\n this.batchLine(\r\n point0.x,\r\n point0.y,\r\n point1.x,\r\n point1.y,\r\n point0.width / 2,\r\n point1.width / 2,\r\n lineWidth,\r\n pathIndex,\r\n !pathOpen && (pathIndex === pathLength - 1),\r\n currentMatrix,\r\n parentMatrix\r\n );\r\n }\r\n },\r\n\r\n /**\r\n * Creates a quad and adds it to the vertex batch based on the given line values.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine\r\n * @since 3.12.0\r\n *\r\n * @param {number} ax - X coordinate to the start of the line\r\n * @param {number} ay - Y coordinate to the start of the line\r\n * @param {number} bx - X coordinate to the end of the line\r\n * @param {number} by - Y coordinate to the end of the line\r\n * @param {number} aLineWidth - Width of the start of the line\r\n * @param {number} bLineWidth - Width of the end of the line\r\n * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers\r\n */\r\n batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var dx = bx - ax;\r\n var dy = by - ay;\r\n\r\n var len = Math.sqrt(dx * dx + dy * dy);\r\n var al0 = aLineWidth * (by - ay) / len;\r\n var al1 = aLineWidth * (ax - bx) / len;\r\n var bl0 = bLineWidth * (by - ay) / len;\r\n var bl1 = bLineWidth * (ax - bx) / len;\r\n\r\n var lx0 = bx - bl0;\r\n var ly0 = by - bl1;\r\n var lx1 = ax - al0;\r\n var ly1 = ay - al1;\r\n var lx2 = bx + bl0;\r\n var ly2 = by + bl1;\r\n var lx3 = ax + al0;\r\n var ly3 = ay + al1;\r\n\r\n // tx0 = bottom right\r\n var brX = calcMatrix.getX(lx0, ly0);\r\n var brY = calcMatrix.getY(lx0, ly0);\r\n\r\n // tx1 = bottom left\r\n var blX = calcMatrix.getX(lx1, ly1);\r\n var blY = calcMatrix.getY(lx1, ly1);\r\n\r\n // tx2 = top right\r\n var trX = calcMatrix.getX(lx2, ly2);\r\n var trY = calcMatrix.getY(lx2, ly2);\r\n\r\n // tx3 = top left\r\n var tlX = calcMatrix.getX(lx3, ly3);\r\n var tlY = calcMatrix.getY(lx3, ly3);\r\n\r\n var tint = this.strokeTint;\r\n var tintEffect = this.tintEffect;\r\n\r\n var tintTL = tint.TL;\r\n var tintTR = tint.TR;\r\n var tintBL = tint.BL;\r\n var tintBR = tint.BR;\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n // TL, BL, BR, TR\r\n this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n\r\n if (lineWidth <= 2)\r\n {\r\n // No point doing a linejoin if the line isn't thick enough\r\n return;\r\n }\r\n\r\n var prev = this.prevQuad;\r\n var first = this.firstQuad;\r\n\r\n if (index > 0 && prev[4])\r\n {\r\n this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n first[0] = tlX;\r\n first[1] = tlY;\r\n first[2] = blX;\r\n first[3] = blY;\r\n first[4] = 1;\r\n }\r\n\r\n if (closePath && first[4])\r\n {\r\n // Add a join for the final path segment\r\n this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n // Store it\r\n\r\n prev[0] = brX;\r\n prev[1] = brY;\r\n prev[2] = trX;\r\n prev[3] = trY;\r\n prev[4] = 1;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureTintPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Implements a model view projection matrices.\r\n * Pipelines can implement this for doing 2D and 3D rendering.\r\n *\r\n * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection\r\n * @since 3.0.0\r\n */\r\nvar ModelViewProjection = {\r\n\r\n /**\r\n * Dirty flag for checking if model matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n modelMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if view matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n viewMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if projection matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n projectionMatrixDirty: false,\r\n\r\n /**\r\n * Model matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n modelMatrix: null,\r\n\r\n /**\r\n * View matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n viewMatrix: null,\r\n\r\n /**\r\n * Projection matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n projectionMatrix: null,\r\n\r\n /**\r\n * Initializes MVP matrices with an identity matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit\r\n * @since 3.0.0\r\n */\r\n mvpInit: function ()\r\n {\r\n this.modelMatrixDirty = true;\r\n this.viewMatrixDirty = true;\r\n this.projectionMatrixDirty = true;\r\n \r\n this.modelMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.viewMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.projectionMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * If dirty flags are set then the matrices are uploaded to the GPU.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate\r\n * @since 3.0.0\r\n */\r\n mvpUpdate: function ()\r\n {\r\n var program = this.program;\r\n\r\n if (this.modelMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix);\r\n this.modelMatrixDirty = false;\r\n }\r\n \r\n if (this.viewMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n this.viewMatrixDirty = false;\r\n }\r\n\r\n if (this.projectionMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n this.projectionMatrixDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads an identity matrix to the model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity\r\n * @since 3.0.0\r\n */\r\n modelIdentity: function ()\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n \r\n modelMatrix[0] = 1;\r\n modelMatrix[1] = 0;\r\n modelMatrix[2] = 0;\r\n modelMatrix[3] = 0;\r\n modelMatrix[4] = 0;\r\n modelMatrix[5] = 1;\r\n modelMatrix[6] = 0;\r\n modelMatrix[7] = 0;\r\n modelMatrix[8] = 0;\r\n modelMatrix[9] = 0;\r\n modelMatrix[10] = 1;\r\n modelMatrix[11] = 0;\r\n modelMatrix[12] = 0;\r\n modelMatrix[13] = 0;\r\n modelMatrix[14] = 0;\r\n modelMatrix[15] = 1;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Scale model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelScale: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[0] = modelMatrix[0] * x;\r\n modelMatrix[1] = modelMatrix[1] * x;\r\n modelMatrix[2] = modelMatrix[2] * x;\r\n modelMatrix[3] = modelMatrix[3] * x;\r\n modelMatrix[4] = modelMatrix[4] * y;\r\n modelMatrix[5] = modelMatrix[5] * y;\r\n modelMatrix[6] = modelMatrix[6] * y;\r\n modelMatrix[7] = modelMatrix[7] * y;\r\n modelMatrix[8] = modelMatrix[8] * z;\r\n modelMatrix[9] = modelMatrix[9] * z;\r\n modelMatrix[10] = modelMatrix[10] * z;\r\n modelMatrix[11] = modelMatrix[11] * z;\r\n \r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelTranslate: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12];\r\n modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13];\r\n modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14];\r\n modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15];\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateX: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[4] = a10 * c + a20 * s;\r\n modelMatrix[5] = a11 * c + a21 * s;\r\n modelMatrix[6] = a12 * c + a22 * s;\r\n modelMatrix[7] = a13 * c + a23 * s;\r\n modelMatrix[8] = a20 * c - a10 * s;\r\n modelMatrix[9] = a21 * c - a11 * s;\r\n modelMatrix[10] = a22 * c - a12 * s;\r\n modelMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateY: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[0] = a00 * c - a20 * s;\r\n modelMatrix[1] = a01 * c - a21 * s;\r\n modelMatrix[2] = a02 * c - a22 * s;\r\n modelMatrix[3] = a03 * c - a23 * s;\r\n modelMatrix[8] = a00 * s + a20 * c;\r\n modelMatrix[9] = a01 * s + a21 * c;\r\n modelMatrix[10] = a02 * s + a22 * c;\r\n modelMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates the model matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateZ: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n\r\n modelMatrix[0] = a00 * c + a10 * s;\r\n modelMatrix[1] = a01 * c + a11 * s;\r\n modelMatrix[2] = a02 * c + a12 * s;\r\n modelMatrix[3] = a03 * c + a13 * s;\r\n modelMatrix[4] = a10 * c - a00 * s;\r\n modelMatrix[5] = a11 * c - a01 * s;\r\n modelMatrix[6] = a12 * c - a02 * s;\r\n modelMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads identity matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewIdentity: function ()\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n \r\n viewMatrix[0] = 1;\r\n viewMatrix[1] = 0;\r\n viewMatrix[2] = 0;\r\n viewMatrix[3] = 0;\r\n viewMatrix[4] = 0;\r\n viewMatrix[5] = 1;\r\n viewMatrix[6] = 0;\r\n viewMatrix[7] = 0;\r\n viewMatrix[8] = 0;\r\n viewMatrix[9] = 0;\r\n viewMatrix[10] = 1;\r\n viewMatrix[11] = 0;\r\n viewMatrix[12] = 0;\r\n viewMatrix[13] = 0;\r\n viewMatrix[14] = 0;\r\n viewMatrix[15] = 1;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Scales view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewScale: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[0] = viewMatrix[0] * x;\r\n viewMatrix[1] = viewMatrix[1] * x;\r\n viewMatrix[2] = viewMatrix[2] * x;\r\n viewMatrix[3] = viewMatrix[3] * x;\r\n viewMatrix[4] = viewMatrix[4] * y;\r\n viewMatrix[5] = viewMatrix[5] * y;\r\n viewMatrix[6] = viewMatrix[6] * y;\r\n viewMatrix[7] = viewMatrix[7] * y;\r\n viewMatrix[8] = viewMatrix[8] * z;\r\n viewMatrix[9] = viewMatrix[9] * z;\r\n viewMatrix[10] = viewMatrix[10] * z;\r\n viewMatrix[11] = viewMatrix[11] * z;\r\n \r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translates view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewTranslate: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12];\r\n viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13];\r\n viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14];\r\n viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateX: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[4] = a10 * c + a20 * s;\r\n viewMatrix[5] = a11 * c + a21 * s;\r\n viewMatrix[6] = a12 * c + a22 * s;\r\n viewMatrix[7] = a13 * c + a23 * s;\r\n viewMatrix[8] = a20 * c - a10 * s;\r\n viewMatrix[9] = a21 * c - a11 * s;\r\n viewMatrix[10] = a22 * c - a12 * s;\r\n viewMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateY: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[0] = a00 * c - a20 * s;\r\n viewMatrix[1] = a01 * c - a21 * s;\r\n viewMatrix[2] = a02 * c - a22 * s;\r\n viewMatrix[3] = a03 * c - a23 * s;\r\n viewMatrix[8] = a00 * s + a20 * c;\r\n viewMatrix[9] = a01 * s + a21 * c;\r\n viewMatrix[10] = a02 * s + a22 * c;\r\n viewMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateZ: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n\r\n viewMatrix[0] = a00 * c + a10 * s;\r\n viewMatrix[1] = a01 * c + a11 * s;\r\n viewMatrix[2] = a02 * c + a12 * s;\r\n viewMatrix[3] = a03 * c + a13 * s;\r\n viewMatrix[4] = a10 * c - a00 * s;\r\n viewMatrix[5] = a11 * c - a01 * s;\r\n viewMatrix[6] = a12 * c - a02 * s;\r\n viewMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix \r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix2D - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad2D: function (matrix2D)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[2] = 0.0;\r\n vm[3] = 0.0;\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[6] = 0.0;\r\n vm[7] = 0.0;\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[10] = 1.0;\r\n vm[11] = 0.0;\r\n vm[12] = 0.0;\r\n vm[13] = 0.0;\r\n vm[14] = 0.0;\r\n vm[15] = 1.0;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * Copies a 4x4 matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad: function (matrix)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix[0];\r\n vm[1] = matrix[1];\r\n vm[2] = matrix[2];\r\n vm[3] = matrix[3];\r\n vm[4] = matrix[4];\r\n vm[5] = matrix[5];\r\n vm[6] = matrix[6];\r\n vm[7] = matrix[7];\r\n vm[8] = matrix[8];\r\n vm[9] = matrix[9];\r\n vm[10] = matrix[10];\r\n vm[11] = matrix[11];\r\n vm[12] = matrix[12];\r\n vm[13] = matrix[13];\r\n vm[14] = matrix[14];\r\n vm[15] = matrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Loads identity matrix into the projection matrix.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projIdentity: function ()\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n \r\n projectionMatrix[0] = 1;\r\n projectionMatrix[1] = 0;\r\n projectionMatrix[2] = 0;\r\n projectionMatrix[3] = 0;\r\n projectionMatrix[4] = 0;\r\n projectionMatrix[5] = 1;\r\n projectionMatrix[6] = 0;\r\n projectionMatrix[7] = 0;\r\n projectionMatrix[8] = 0;\r\n projectionMatrix[9] = 0;\r\n projectionMatrix[10] = 1;\r\n projectionMatrix[11] = 0;\r\n projectionMatrix[12] = 0;\r\n projectionMatrix[13] = 0;\r\n projectionMatrix[14] = 0;\r\n projectionMatrix[15] = 1;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets up an orthographic projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projOrtho: function (left, right, bottom, top, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var leftRight = 1.0 / (left - right);\r\n var bottomTop = 1.0 / (bottom - top);\r\n var nearFar = 1.0 / (near - far);\r\n\r\n projectionMatrix[0] = -2.0 * leftRight;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = -2.0 * bottomTop;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = 2.0 * nearFar;\r\n projectionMatrix[11] = 0.0;\r\n projectionMatrix[12] = (left + right) * leftRight;\r\n projectionMatrix[13] = (top + bottom) * bottomTop;\r\n projectionMatrix[14] = (far + near) * nearFar;\r\n projectionMatrix[15] = 1.0;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Sets up a perspective projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovY - The fov value.\r\n * @param {number} aspectRatio - The aspectRatio value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projPersp: function (fovY, aspectRatio, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var fov = 1.0 / Math.tan(fovY / 2.0);\r\n var nearFar = 1.0 / (near - far);\r\n \r\n projectionMatrix[0] = fov / aspectRatio;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = fov;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = (far + near) * nearFar;\r\n projectionMatrix[11] = -1.0;\r\n projectionMatrix[12] = 0.0;\r\n projectionMatrix[13] = 0.0;\r\n projectionMatrix[14] = (2.0 * far * near) * nearFar;\r\n projectionMatrix[15] = 0.0;\r\n \r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = ModelViewProjection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Pipelines\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMaskPipeline: __webpack_require__(/*! ./BitmapMaskPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js"),\r\n ForwardDiffuseLightPipeline: __webpack_require__(/*! ./ForwardDiffuseLightPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js"),\r\n TextureTintPipeline: __webpack_require__(/*! ./TextureTintPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js"),\r\n ModelViewProjection: __webpack_require__(/*! ./components/ModelViewProjection */ "./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/index.js?')},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform vec2 uResolution;',\n 'uniform sampler2D uMainSampler;',\n 'uniform sampler2D uMaskSampler;',\n 'uniform bool uInvertMaskAlpha;',\n '',\n 'void main()',\n '{',\n ' vec2 uv = gl_FragCoord.xy / uResolution;',\n ' vec4 mainColor = texture2D(uMainSampler, uv);',\n ' vec4 maskColor = texture2D(uMaskSampler, uv);',\n ' float alpha = mainColor.a;',\n '',\n ' if (!uInvertMaskAlpha)',\n ' {',\n ' alpha *= (maskColor.a);',\n ' }',\n ' else',\n ' {',\n ' alpha *= (1.0 - maskColor.a);',\n ' }',\n '',\n ' gl_FragColor = vec4(mainColor.rgb * alpha, alpha);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_VS',\n '',\n 'precision mediump float;',\n '',\n 'attribute vec2 inPosition;',\n '',\n 'void main()',\n '{',\n ' gl_Position = vec4(inPosition, 0.0, 1.0);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js":function(module,exports){eval("module.exports = [\r\n '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS',\r\n '',\r\n 'precision mediump float;',\r\n '',\r\n 'struct Light',\r\n '{',\r\n ' vec2 position;',\r\n ' vec3 color;',\r\n ' float intensity;',\r\n ' float radius;',\r\n '};',\r\n '',\r\n 'const int kMaxLights = %LIGHT_COUNT%;',\r\n '',\r\n 'uniform vec4 uCamera; /* x, y, rotation, zoom */',\r\n 'uniform vec2 uResolution;',\r\n 'uniform sampler2D uMainSampler;',\r\n 'uniform sampler2D uNormSampler;',\r\n 'uniform vec3 uAmbientLightColor;',\r\n 'uniform Light uLights[kMaxLights];',\r\n 'uniform mat3 uInverseRotationMatrix;',\r\n '',\r\n 'varying vec2 outTexCoord;',\r\n 'varying vec4 outTint;',\r\n '',\r\n 'void 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(uInverseRotationMatrix * 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 ''\r\n].join('\\n');\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform sampler2D uMainSampler;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main()',\n '{',\n ' vec4 texture = texture2D(uMainSampler, outTexCoord);',\n ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);',\n ' vec4 color = texture;',\n '',\n ' if (outTintEffect == 0.0)',\n ' {',\n ' // Multiply texture tint',\n ' color = texture * texel;',\n ' }',\n ' else if (outTintEffect == 1.0)',\n ' {',\n ' // Solid color + texture alpha',\n ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);',\n ' color.a = texture.a * texel.a;',\n ' }',\n ' else if (outTintEffect == 2.0)',\n ' {',\n ' // Solid color, no texture',\n ' color = texel;',\n ' }',\n '',\n ' gl_FragColor = color;',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_VS',\n '',\n 'precision mediump float;',\n '',\n 'uniform mat4 uProjectionMatrix;',\n 'uniform mat4 uViewMatrix;',\n 'uniform mat4 uModelMatrix;',\n '',\n 'attribute vec2 inPosition;',\n 'attribute vec2 inTexCoord;',\n 'attribute float inTintEffect;',\n 'attribute vec4 inTint;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main ()',\n '{',\n ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);',\n '',\n ' outTexCoord = inTexCoord;',\n ' outTint = inTint;',\n ' outTintEffect = inTintEffect;',\n '}',\n '',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js?")},"./node_modules/phaser/src/scale/ScaleManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetInnerHeight = __webpack_require__(/*! ../dom/GetInnerHeight */ \"./node_modules/phaser/src/dom/GetInnerHeight.js\");\r\nvar GetTarget = __webpack_require__(/*! ../dom/GetTarget */ \"./node_modules/phaser/src/dom/GetTarget.js\");\r\nvar GetScreenOrientation = __webpack_require__(/*! ../dom/GetScreenOrientation */ \"./node_modules/phaser/src/dom/GetScreenOrientation.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Size = __webpack_require__(/*! ../structs/Size */ \"./node_modules/phaser/src/structs/Size.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scale Manager handles the scaling, resizing and alignment of the game canvas.\r\n * \r\n * The way scaling is handled is by setting the game canvas to a fixed size, which is defined in the\r\n * game configuration. You also define the parent container in the game config. If no parent is given,\r\n * it will default to using the document body. The Scale Manager will then look at the available space\r\n * within the _parent_ and scale the canvas accordingly. Scaling is handled by setting the canvas CSS\r\n * width and height properties, leaving the width and height of the canvas element itself untouched.\r\n * Scaling is therefore achieved by keeping the core canvas the same size and 'stretching'\r\n * it via its CSS properties. This gives the same result and speed as using the `transform-scale` CSS\r\n * property, without the need for browser prefix handling.\r\n * \r\n * The calculations for the scale are heavily influenced by the bounding parent size, which is the computed\r\n * dimensions of the canvas's parent. The CSS rules of the parent element play an important role in the\r\n * operation of the Scale Manager. For example, if the parent has no defined width or height, then actions\r\n * like auto-centering will fail to achieve the required result. The Scale Manager works in tandem with the\r\n * CSS you set-up on the page hosting your game, rather than taking control of it.\r\n * \r\n * #### Parent and Display canvas containment guidelines:\r\n *\r\n * - Style the Parent element (of the game canvas) to control the Parent size and thus the games size and layout.\r\n *\r\n * - The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.\r\n *\r\n * - The Parent element should _not_ apply a padding as this is not accounted for.\r\n * If a padding is required apply it to the Parent's parent or apply a margin to the Parent.\r\n * If you need to add a border, margin or any other CSS around your game container, then use a parent element and\r\n * apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.\r\n *\r\n * - The Display canvas layout CSS styles (i.e. margins, size) should not be altered / specified as\r\n * they may be updated by the Scale Manager.\r\n *\r\n * #### Scale Modes\r\n * \r\n * The way the scaling is handled is determined by the `scaleMode` property. The default is `NO_SCALE`,\r\n * which prevents Phaser from scaling or touching the canvas, or its parent, at all. In this mode, you are\r\n * responsible for all scaling. The other scaling modes afford you automatic scaling.\r\n * \r\n * If you wish to scale your game so that it always fits into the available space within the parent, you\r\n * should use the scale mode `FIT`. Look at the documentation for other scale modes to see what options are\r\n * available. Here is a basic config showing how to set this scale mode:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * mode: Phaser.Scale.FIT,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * Place the `scale` config object within your game config.\r\n * \r\n * If you wish for the canvas to be resized directly, so that the canvas itself fills the available space\r\n * (i.e. it isn't scaled, it's resized) then use the `RESIZE` scale mode. This will give you a 1:1 mapping\r\n * of canvas pixels to game size. In this mode CSS isn't used to scale the canvas, it's literally adjusted\r\n * to fill all available space within the parent. You should be extremely careful about the size of the\r\n * canvas you're creating when doing this, as the larger the area, the more work the GPU has to do and it's\r\n * very easy to hit fill-rate limits quickly.\r\n * \r\n * For complex, custom-scaling requirements, you should probably consider using the `RESIZE` scale mode,\r\n * with your own limitations in place re: canvas dimensions and managing the scaling with the game scenes\r\n * yourself. For the vast majority of games, however, the `FIT` mode is likely to be the most used.\r\n * \r\n * Please appreciate that the Scale Manager cannot perform miracles. All it does is scale your game canvas\r\n * as best it can, based on what it can infer from its surrounding area. There are all kinds of environments\r\n * where it's up to you to guide and help the canvas position itself, especially when built into rendering\r\n * frameworks like React and Vue. If your page requires meta tags to prevent user scaling gestures, or such\r\n * like, then it's up to you to ensure they are present in the html.\r\n * \r\n * #### Centering\r\n * \r\n * You can also have the game canvas automatically centered. Again, this relies heavily on the parent being\r\n * properly configured and styled, as the centering offsets are based entirely on the available space\r\n * within the parent element. Centering is disabled by default, or can be applied horizontally, vertically,\r\n * or both. Here's an example:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * autoCenter: Phaser.Scale.CENTER_BOTH,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * #### Fullscreen API\r\n * \r\n * If the browser supports it, you can send your game into fullscreen mode. In this mode, the game will fill\r\n * the entire display, removing all browser UI and anything else present on the screen. It will remain in this\r\n * mode until your game either disables it, or until the user tabs out or presses ESCape if on desktop. It's a\r\n * great way to achieve a desktop-game like experience from the browser, but it does require a modern browser\r\n * to handle it. Some mobile browsers also support this.\r\n *\r\n * @class ScaleManager\r\n * @memberof Phaser.Scale\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar ScaleManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function ScaleManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Scale.ScaleManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.16.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The DOM bounds of the canvas element.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvasBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.16.0\r\n */\r\n this.canvasBounds = new Rectangle();\r\n\r\n /**\r\n * The parent object of the Canvas. Often a div, or the browser window, or nothing in non-browser environments.\r\n * \r\n * This is set in the Game Config as the `parent` property. If undefined (or just not present), it will default\r\n * to use the document body. If specifically set to `null` Phaser will ignore all parent operations.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parent\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Is the parent element the browser window?\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentIsWindow\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.parentIsWindow = false;\r\n\r\n /**\r\n * The Parent Size component.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.parentSize = new Size();\r\n\r\n /**\r\n * The Game Size component.\r\n * \r\n * The un-modified game size, as requested in the game config (the raw width / height),\r\n * as used for world bounds, cameras, etc\r\n *\r\n * @name Phaser.Scale.ScaleManager#gameSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.gameSize = new Size();\r\n\r\n /**\r\n * The Base Size component.\r\n * \r\n * The modified game size, which is the gameSize * resolution, used to set the canvas width and height\r\n * (but not the CSS style)\r\n *\r\n * @name Phaser.Scale.ScaleManager#baseSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.baseSize = new Size();\r\n\r\n /**\r\n * The Display Size component.\r\n * \r\n * The size used for the canvas style, factoring in the scale mode, parent and other values.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displaySize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.displaySize = new Size();\r\n\r\n /**\r\n * The game scale mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#scaleMode\r\n * @type {Phaser.Scale.ScaleModeType}\r\n * @since 3.16.0\r\n */\r\n this.scaleMode = CONST.SCALE_MODE.NONE;\r\n\r\n /**\r\n * The canvas resolution.\r\n * \r\n * This is hard-coded to a value of 1 in the 3.16 release of Phaser and will be enabled at a later date.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resolution\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The game zoom factor.\r\n * \r\n * This value allows you to multiply your games base size by the given zoom factor.\r\n * This is then used when calculating the display size, even in `NO_SCALE` situations.\r\n * If you don't want Phaser to touch the canvas style at all, this value should be 1.\r\n * \r\n * Can also be set to `MAX_ZOOM` in which case the zoom value will be derived based\r\n * on the game size and available space within the parent.\r\n *\r\n * @name Phaser.Scale.ScaleManager#zoom\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.zoom = 1;\r\n\r\n /**\r\n * Internal flag set when the game zoom factor is modified.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_resetZoom\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this._resetZoom = false;\r\n\r\n /**\r\n * The scale factor between the baseSize and the canvasBounds.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displayScale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\n this.displayScale = new Vector2(1, 1);\r\n\r\n /**\r\n * If set, the canvas sizes will be automatically passed through Math.floor.\r\n * This results in rounded pixel display values, which is important for performance on legacy\r\n * and low powered devices, but at the cost of not achieving a 'perfect' fit in some browser windows.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoRound\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.autoRound = false;\r\n\r\n /**\r\n * Automatically center the canvas within the parent? The different centering modes are:\r\n * \r\n * 1. No centering.\r\n * 2. Center both horizontally and vertically.\r\n * 3. Center horizontally.\r\n * 4. Center vertically.\r\n * \r\n * Please be aware that in order to center the game canvas, you must have specified a parent\r\n * that has a size set, or the canvas parent is the document.body.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoCenter\r\n * @type {Phaser.Scale.CenterType}\r\n * @since 3.16.0\r\n */\r\n this.autoCenter = CONST.CENTER.NO_CENTER;\r\n\r\n /**\r\n * The current device orientation.\r\n * \r\n * Orientation events are dispatched via the Device Orientation API, typically only on mobile browsers.\r\n *\r\n * @name Phaser.Scale.ScaleManager#orientation\r\n * @type {Phaser.Scale.OrientationType}\r\n * @since 3.16.0\r\n */\r\n this.orientation = CONST.ORIENTATION.LANDSCAPE;\r\n\r\n /**\r\n * A reference to the Device.Fullscreen object.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreen\r\n * @type {Phaser.Device.Fullscreen}\r\n * @since 3.16.0\r\n */\r\n this.fullscreen;\r\n\r\n /**\r\n * The DOM Element which is sent into fullscreen mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreenTarget\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.fullscreenTarget = null;\r\n\r\n /**\r\n * Did Phaser create the fullscreen target div, or was it provided in the game config?\r\n *\r\n * @name Phaser.Scale.ScaleManager#_createdFullscreenTarget\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._createdFullscreenTarget = false;\r\n\r\n /**\r\n * Internal var that keeps track of the user, or the browser, requesting fullscreen changes.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.2\r\n */\r\n this._requestedFullscreenChange = false;\r\n\r\n /**\r\n * The dirty state of the Scale Manager.\r\n * Set if there is a change between the parent size and the current size.\r\n *\r\n * @name Phaser.Scale.ScaleManager#dirty\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * How many milliseconds should elapse before checking if the browser size has changed?\r\n * \r\n * Most modern browsers dispatch a 'resize' event, which the Scale Manager will listen for.\r\n * However, older browsers fail to do this, or do it consistently, so we fall back to a\r\n * more traditional 'size check' based on a time interval. You can control how often it is\r\n * checked here.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resizeInterval\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\n this.resizeInterval = 500;\r\n\r\n /**\r\n * Internal size interval tracker.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_lastCheck\r\n * @type {integer}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._lastCheck = 0;\r\n\r\n /**\r\n * Internal flag to check orientation state.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_checkOrientation\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._checkOrientation = false;\r\n\r\n /**\r\n * Internal object containing our defined event listeners.\r\n *\r\n * @name Phaser.Scale.ScaleManager#listeners\r\n * @type {object}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.listeners = {\r\n\r\n orientationChange: NOOP,\r\n windowResize: NOOP,\r\n fullScreenChange: NOOP,\r\n fullScreenError: NOOP\r\n\r\n };\r\n },\r\n\r\n /**\r\n * Called _before_ the canvas object is created and added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#preBoot\r\n * @protected\r\n * @listens Phaser.Core.Events#BOOT\r\n * @since 3.16.0\r\n */\r\n preBoot: function ()\r\n {\r\n // Parse the config to get the scaling values we need\r\n this.parseConfig(this.game.config);\r\n\r\n this.game.events.once('boot', this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now and the canvas has been added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#boot\r\n * @protected\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.game;\r\n\r\n this.canvas = game.canvas;\r\n\r\n this.fullscreen = game.device.fullscreen;\r\n\r\n if (this.scaleMode !== CONST.SCALE_MODE.RESIZE)\r\n {\r\n this.displaySize.setAspectMode(this.scaleMode);\r\n }\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n this.resize(this.width, this.height);\r\n }\r\n else\r\n {\r\n this.getParentBounds();\r\n\r\n // Only set the parent bounds if the parent has an actual size\r\n if (this.parentSize.width > 0 && this.parentSize.height > 0)\r\n {\r\n this.displaySize.setParent(this.parentSize);\r\n }\r\n\r\n this.refresh();\r\n }\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.step, this);\r\n\r\n this.startListeners();\r\n },\r\n\r\n /**\r\n * Parses the game configuration to set-up the scale defaults.\r\n *\r\n * @method Phaser.Scale.ScaleManager#parseConfig\r\n * @protected\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n parseConfig: function (config)\r\n {\r\n // Get the parent element, if any\r\n this.getParent(config);\r\n \r\n // Get the size of the parent element\r\n // This can often set a height of zero (especially for un-styled divs)\r\n this.getParentBounds();\r\n\r\n var width = config.width;\r\n var height = config.height;\r\n var scaleMode = config.scaleMode;\r\n var resolution = config.resolution;\r\n var zoom = config.zoom;\r\n var autoRound = config.autoRound;\r\n\r\n // If width = '100%', or similar value\r\n if (typeof width === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentWidth = this.parentSize.width;\r\n\r\n if (parentWidth === 0)\r\n {\r\n parentWidth = window.innerWidth;\r\n }\r\n\r\n var parentScaleX = parseInt(width, 10) / 100;\r\n\r\n width = Math.floor(parentWidth * parentScaleX);\r\n }\r\n\r\n // If height = '100%', or similar value\r\n if (typeof height === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentHeight = this.parentSize.height;\r\n\r\n if (parentHeight === 0)\r\n {\r\n parentHeight = window.innerHeight;\r\n }\r\n\r\n var parentScaleY = parseInt(height, 10) / 100;\r\n\r\n height = Math.floor(parentHeight * parentScaleY);\r\n }\r\n\r\n // This is fixed at 1 on purpose.\r\n // Changing it will break all user input.\r\n // Wait for another release to solve this issue.\r\n this.resolution = 1;\r\n\r\n this.scaleMode = scaleMode;\r\n\r\n this.autoRound = autoRound;\r\n\r\n this.autoCenter = config.autoCenter;\r\n\r\n this.resizeInterval = config.resizeInterval;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.setSize(width, height);\r\n\r\n if (zoom === CONST.ZOOM.MAX_ZOOM)\r\n {\r\n zoom = this.getMaxZoom();\r\n }\r\n\r\n this.zoom = zoom;\r\n\r\n if (zoom !== 1)\r\n {\r\n this._resetZoom = true;\r\n }\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.setSize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n if (config.minWidth > 0)\r\n {\r\n this.displaySize.setMin(config.minWidth * zoom, config.minHeight * zoom);\r\n }\r\n\r\n if (config.maxWidth > 0)\r\n {\r\n this.displaySize.setMax(config.maxWidth * zoom, config.maxHeight * zoom);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.orientation = GetScreenOrientation(width, height);\r\n },\r\n\r\n /**\r\n * Determines the parent element of the game canvas, if any, based on the game configuration.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParent\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n getParent: function (config)\r\n {\r\n var parent = config.parent;\r\n\r\n if (parent === null)\r\n {\r\n // User is responsible for managing the parent\r\n return;\r\n }\r\n\r\n this.parent = GetTarget(parent);\r\n this.parentIsWindow = (this.parent === document.body);\r\n\r\n if (config.expandParent && config.scaleMode !== CONST.SCALE_MODE.NONE)\r\n {\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow || DOMRect.height === 0)\r\n {\r\n document.documentElement.style.height = '100%';\r\n document.body.style.height = '100%';\r\n\r\n DOMRect = this.parent.getBoundingClientRect();\r\n\r\n // The parent STILL has no height, clearly no CSS\r\n // has been set on it even though we fixed the body :(\r\n if (!this.parentIsWindow && DOMRect.height === 0)\r\n {\r\n this.parent.style.overflow = 'hidden';\r\n this.parent.style.width = '100%';\r\n this.parent.style.height = '100%';\r\n }\r\n }\r\n }\r\n\r\n // And now get the fullscreenTarget\r\n if (config.fullscreenTarget && !this.fullscreenTarget)\r\n {\r\n this.fullscreenTarget = GetTarget(config.fullscreenTarget);\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the size of the parent bounds and updates the `parentSize` component, if the canvas has a dom parent.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParentBounds\r\n * @since 3.16.0\r\n * \r\n * @return {boolean} `true` if the parent bounds have changed size, otherwise `false`.\r\n */\r\n getParentBounds: function ()\r\n {\r\n if (!this.parent)\r\n {\r\n return false;\r\n }\r\n\r\n var parentSize = this.parentSize;\r\n\r\n // Ref. http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx for getBoundingClientRect\r\n\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow && this.game.device.os.iOS)\r\n {\r\n DOMRect.height = GetInnerHeight(true);\r\n }\r\n\r\n var resolution = this.resolution;\r\n var newWidth = DOMRect.width * resolution;\r\n var newHeight = DOMRect.height * resolution;\r\n\r\n if (parentSize.width !== newWidth || parentSize.height !== newHeight)\r\n {\r\n parentSize.setSize(newWidth, newHeight);\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to lock the orientation of the web browser using the Screen Orientation API.\r\n * \r\n * This API is only available on modern mobile browsers.\r\n * See https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation for details.\r\n *\r\n * @method Phaser.Scale.ScaleManager#lockOrientation\r\n * @since 3.16.0\r\n * \r\n * @param {string} orientation - The orientation you'd like to lock the browser in. Should be an API string such as 'landscape', 'landscape-primary', 'portrait', etc.\r\n * \r\n * @return {boolean} `true` if the orientation was successfully locked, otherwise `false`.\r\n */\r\n lockOrientation: function (orientation)\r\n {\r\n var lock = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;\r\n\r\n if (lock)\r\n {\r\n return lock(orientation);\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * This method will set the size of the Parent Size component, which is used in scaling\r\n * and centering calculations. You only need to call this method if you have explicitly\r\n * disabled the use of a parent in your game config, but still wish to take advantage of\r\n * other Scale Manager features.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setParentSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the parent.\r\n * @param {number} height - The new height of the parent.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setParentSize: function (width, height)\r\n {\r\n this.parentSize.setSize(width, height);\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * This method will set a new size for your game.\r\n * \r\n * It should only be used if you're looking to change the base size of your game and are using\r\n * one of the Scale Manager scaling modes, i.e. `FIT`. If you're using `NO_SCALE` and wish to\r\n * change the game and canvas size directly, then please use the `resize` method instead.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setGameSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setGameSize: function (width, height)\r\n {\r\n var autoRound = this.autoRound;\r\n var resolution = this.resolution;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Call this to modify the size of the Phaser canvas element directly.\r\n * You should only use this if you are using the `NO_SCALE` scale mode,\r\n * it will update all internal components completely.\r\n * \r\n * If all you want to do is change the size of the parent, see the `setParentSize` method.\r\n * \r\n * If all you want is to change the base size of the game, but still have the Scale Manager\r\n * manage all the scaling (i.e. you're **not** using `NO_SCALE`), then see the `setGameSize` method.\r\n * \r\n * This method will set the `gameSize`, `baseSize` and `displaySize` components to the given\r\n * dimensions. It will then resize the canvas width and height to the values given, by\r\n * directly setting the properties. Finally, if you have set the Scale Manager zoom value\r\n * to anything other than 1 (the default), it will set the canvas CSS width and height to\r\n * be the given size multiplied by the zoom factor (the canvas pixel size remains untouched).\r\n * \r\n * If you have enabled `autoCenter`, it is then passed to the `updateCenter` method and\r\n * the margins are set, allowing the canvas to be centered based on its parent element\r\n * alone. Finally, the `displayScale` is adjusted and the RESIZE event dispatched.\r\n *\r\n * @method Phaser.Scale.ScaleManager#resize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n var zoom = this.zoom;\r\n var resolution = this.resolution;\r\n var autoRound = this.autoRound;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n var style = this.canvas.style;\r\n\r\n var styleWidth = width * zoom;\r\n var styleHeight = height * zoom;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (styleWidth !== width || styleHeight !== height)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Sets the zoom value of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {integer} value - The new zoom value of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n this.zoom = value;\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Sets the zoom to be the maximum possible based on the _current_ parent size.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setMaxZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setMaxZoom: function ()\r\n {\r\n this.zoom = this.getMaxZoom();\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Refreshes the internal scale values, bounds sizes and orientation checks.\r\n * \r\n * Once finished, dispatches the resize event.\r\n * \r\n * This is called automatically by the Scale Manager when the browser window size changes,\r\n * as long as it is using a Scale Mode other than 'NONE'.\r\n *\r\n * @method Phaser.Scale.ScaleManager#refresh\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} [previousWidth] - The previous width of the game. Only set if the gameSize has changed.\r\n * @param {number} [previousHeight] - The previous height of the game. Only set if the gameSize has changed.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n refresh: function (previousWidth, previousHeight)\r\n {\r\n if (previousWidth === undefined) { previousWidth = this.width; }\r\n if (previousHeight === undefined) { previousHeight = this.height; }\r\n\r\n this.updateScale();\r\n this.updateBounds();\r\n this.updateOrientation();\r\n\r\n this.displayScale.set(this.baseSize.width / this.canvasBounds.width, this.baseSize.height / this.canvasBounds.height);\r\n\r\n var domContainer = this.game.domContainer;\r\n\r\n if (domContainer)\r\n {\r\n this.baseSize.setCSS(domContainer);\r\n\r\n var canvasStyle = this.canvas.style;\r\n var domStyle = domContainer.style;\r\n\r\n domStyle.transform = 'scale(' + this.displaySize.width / this.baseSize.width + ',' + this.displaySize.height / this.baseSize.height + ')';\r\n\r\n domStyle.marginLeft = canvasStyle.marginLeft;\r\n domStyle.marginTop = canvasStyle.marginTop;\r\n }\r\n\r\n this.emit(Events.RESIZE, this.gameSize, this.baseSize, this.displaySize, this.resolution, previousWidth, previousHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that checks the current screen orientation, only if the internal check flag is set.\r\n * \r\n * If the orientation has changed it updates the orientation property and then dispatches the orientation change event.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateOrientation\r\n * @fires Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.0\r\n */\r\n updateOrientation: function ()\r\n {\r\n if (this._checkOrientation)\r\n {\r\n this._checkOrientation = false;\r\n\r\n var newOrientation = GetScreenOrientation(this.width, this.height);\r\n\r\n if (newOrientation !== this.orientation)\r\n {\r\n this.orientation = newOrientation;\r\n \r\n this.emit(Events.ORIENTATION_CHANGE, newOrientation);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that manages updating the size components based on the scale mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateScale\r\n * @since 3.16.0\r\n */\r\n updateScale: function ()\r\n {\r\n var style = this.canvas.style;\r\n\r\n var width = this.gameSize.width;\r\n var height = this.gameSize.height;\r\n\r\n var styleWidth;\r\n var styleHeight;\r\n\r\n var zoom = this.zoom;\r\n var autoRound = this.autoRound;\r\n var resolution = 1;\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n // No scale\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (this._resetZoom)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n\r\n this._resetZoom = false;\r\n }\r\n }\r\n else if (this.scaleMode === CONST.SCALE_MODE.RESIZE)\r\n {\r\n // Resize to match parent\r\n\r\n // This will constrain using min/max\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n this.gameSize.setSize(this.displaySize.width, this.displaySize.height);\r\n\r\n this.baseSize.setSize(this.displaySize.width * resolution, this.displaySize.height * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n this.canvas.width = styleWidth;\r\n this.canvas.height = styleHeight;\r\n }\r\n else\r\n {\r\n // All other scale modes\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n // Update the parentSize incase the canvas / style change modified it\r\n this.getParentBounds();\r\n\r\n // Finally, update the centering\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Calculates and returns the largest possible zoom factor, based on the current\r\n * parent and game sizes. If the parent has no dimensions (i.e. an unstyled div),\r\n * or is smaller than the un-zoomed game, then this will return a value of 1 (no zoom)\r\n *\r\n * @method Phaser.Scale.ScaleManager#getMaxZoom\r\n * @since 3.16.0\r\n * \r\n * @return {integer} The maximum possible zoom factor. At a minimum this value is always at least 1.\r\n */\r\n getMaxZoom: function ()\r\n {\r\n var zoomH = SnapFloor(this.parentSize.width, this.gameSize.width, 0, true);\r\n var zoomV = SnapFloor(this.parentSize.height, this.gameSize.height, 0, true);\r\n \r\n return Math.max(Math.min(zoomH, zoomV), 1);\r\n },\r\n\r\n /**\r\n * Calculates and updates the canvas CSS style in order to center it within the\r\n * bounds of its parent. If you have explicitly set parent to be `null` in your\r\n * game config then this method will likely give incorrect results unless you have called the\r\n * `setParentSize` method first.\r\n * \r\n * It works by modifying the canvas CSS `marginLeft` and `marginTop` properties.\r\n * \r\n * If they have already been set by your own style sheet, or code, this will overwrite them.\r\n * \r\n * To prevent the Scale Manager from centering the canvas, either do not set the\r\n * `autoCenter` property in your game config, or make sure it is set to `NO_CENTER`.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateCenter\r\n * @since 3.16.0\r\n */\r\n updateCenter: function ()\r\n {\r\n var autoCenter = this.autoCenter;\r\n\r\n if (autoCenter === CONST.CENTER.NO_CENTER)\r\n {\r\n return;\r\n }\r\n\r\n var canvas = this.canvas;\r\n\r\n var style = canvas.style;\r\n\r\n var bounds = canvas.getBoundingClientRect();\r\n\r\n // var width = parseInt(canvas.style.width, 10) || canvas.width;\r\n // var height = parseInt(canvas.style.height, 10) || canvas.height;\r\n\r\n var width = bounds.width;\r\n var height = bounds.height;\r\n\r\n var offsetX = Math.floor((this.parentSize.width - width) / 2);\r\n var offsetY = Math.floor((this.parentSize.height - height) / 2);\r\n\r\n if (autoCenter === CONST.CENTER.CENTER_HORIZONTALLY)\r\n {\r\n offsetY = 0;\r\n }\r\n else if (autoCenter === CONST.CENTER.CENTER_VERTICALLY)\r\n {\r\n offsetX = 0;\r\n }\r\n\r\n style.marginLeft = offsetX + 'px';\r\n style.marginTop = offsetY + 'px';\r\n },\r\n\r\n /**\r\n * Updates the `canvasBounds` rectangle to match the bounding client rectangle of the\r\n * canvas element being used to track input events.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateBounds\r\n * @since 3.16.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var bounds = this.canvasBounds;\r\n var clientRect = this.canvas.getBoundingClientRect();\r\n\r\n bounds.x = clientRect.left + (window.pageXOffset || 0) - (document.documentElement.clientLeft || 0);\r\n bounds.y = clientRect.top + (window.pageYOffset || 0) - (document.documentElement.clientTop || 0);\r\n bounds.width = clientRect.width;\r\n bounds.height = clientRect.height;\r\n },\r\n\r\n /**\r\n * Transforms the pageX value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformX\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageX - The DOM pageX value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformX: function (pageX)\r\n {\r\n return (pageX - this.canvasBounds.left) * this.displayScale.x;\r\n },\r\n\r\n /**\r\n * Transforms the pageY value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformY\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageY - The DOM pageY value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformY: function (pageY)\r\n {\r\n return (pageY - this.canvasBounds.top) * this.displayScale.y;\r\n },\r\n\r\n /**\r\n * Sends a request to the browser to ask it to go in to full screen mode, using the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API Fullscreen API}.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerup`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n * \r\n * On touch devices, such as Android and iOS Safari, you should always use `pointerup` and NOT `pointerdown`,\r\n * otherwise the request will fail unless the document in which your game is embedded has already received\r\n * some form of touch input, which you cannot guarantee. Activating fullscreen via `pointerup` circumvents\r\n * this issue.\r\n * \r\n * Performing an action that navigates to another page, or opens another tab, will automatically cancel\r\n * fullscreen mode, as will the user pressing the ESC key. To cancel fullscreen mode directly from your game,\r\n * i.e. by clicking an icon, call the `stopFullscreen` method.\r\n * \r\n * A browser can only send one DOM element into fullscreen. You can control which element this is by\r\n * setting the `fullscreenTarget` property in your game config, or changing the property in the Scale Manager.\r\n * Note that the game canvas _must_ be a child of the target. If you do not give a target, Phaser will\r\n * automatically create a blank `
` element and move the canvas into it, before going fullscreen.\r\n * When it leaves fullscreen, the div will be removed.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n startFullscreen: function (fullscreenOptions)\r\n {\r\n if (fullscreenOptions === undefined) { fullscreenOptions = { navigationUI: 'hide' }; }\r\n\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return;\r\n }\r\n\r\n if (!fullscreen.active)\r\n {\r\n var fsTarget = this.getFullscreenTarget();\r\n\r\n this._requestedFullscreenChange = true;\r\n \r\n if (typeof Promise !== 'undefined')\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n }\r\n else\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT);\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions);\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this.fullscreenSuccessHandler();\r\n }\r\n else\r\n {\r\n this.fullscreenErrorHandler();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The browser has successfully entered fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenSuccessHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n */\r\n fullscreenSuccessHandler: function ()\r\n {\r\n this.getParentBounds();\r\n\r\n this.refresh();\r\n\r\n this.emit(Events.ENTER_FULLSCREEN);\r\n },\r\n\r\n /**\r\n * The browser failed to enter fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenErrorHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n * \r\n * @param {any} error - The DOM error event.\r\n */\r\n fullscreenErrorHandler: function (error)\r\n {\r\n this.removeFullscreenTarget();\r\n\r\n this.emit(Events.FULLSCREEN_FAILED, error);\r\n },\r\n\r\n /**\r\n * An internal method that gets the target element that is used when entering fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getFullscreenTarget\r\n * @since 3.16.0\r\n * \r\n * @return {object} The fullscreen target element.\r\n */\r\n getFullscreenTarget: function ()\r\n {\r\n if (!this.fullscreenTarget)\r\n {\r\n var fsTarget = document.createElement('div');\r\n\r\n fsTarget.style.margin = '0';\r\n fsTarget.style.padding = '0';\r\n fsTarget.style.width = '100%';\r\n fsTarget.style.height = '100%';\r\n\r\n this.fullscreenTarget = fsTarget;\r\n\r\n this._createdFullscreenTarget = true;\r\n }\r\n\r\n if (this._createdFullscreenTarget)\r\n {\r\n var canvasParent = this.canvas.parentNode;\r\n\r\n canvasParent.insertBefore(this.fullscreenTarget, this.canvas);\r\n\r\n this.fullscreenTarget.appendChild(this.canvas);\r\n }\r\n\r\n return this.fullscreenTarget;\r\n },\r\n\r\n /**\r\n * Removes the fullscreen target that was added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#removeFullscreenTarget\r\n * @since 3.17.0\r\n */\r\n removeFullscreenTarget: function ()\r\n {\r\n if (this._createdFullscreenTarget)\r\n {\r\n var fsTarget = this.fullscreenTarget;\r\n\r\n if (fsTarget && fsTarget.parentNode)\r\n {\r\n var parent = fsTarget.parentNode;\r\n\r\n parent.insertBefore(this.canvas, fsTarget);\r\n\r\n parent.removeChild(fsTarget);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calling this method will cancel fullscreen mode, if the browser has entered it.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopFullscreen\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.0\r\n */\r\n stopFullscreen: function ()\r\n {\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return false;\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this._requestedFullscreenChange = true;\r\n\r\n document[fullscreen.cancel]();\r\n }\r\n\r\n this.removeFullscreenTarget();\r\n\r\n // Get the parent size again as it will have changed\r\n this.getParentBounds();\r\n\r\n this.emit(Events.LEAVE_FULLSCREEN);\r\n\r\n this.refresh();\r\n },\r\n\r\n /**\r\n * Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it.\r\n * If not in fullscreen, this will request the browser to enter fullscreen mode.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerdown`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n *\r\n * @method Phaser.Scale.ScaleManager#toggleFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n toggleFullscreen: function (fullscreenOptions)\r\n {\r\n if (this.fullscreen.active)\r\n {\r\n this.stopFullscreen();\r\n }\r\n else\r\n {\r\n this.startFullscreen(fullscreenOptions);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that starts the different DOM event listeners running.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var listeners = this.listeners;\r\n\r\n listeners.orientationChange = function ()\r\n {\r\n _this._checkOrientation = true;\r\n _this.dirty = true;\r\n };\r\n\r\n listeners.windowResize = function ()\r\n {\r\n _this.dirty = true;\r\n };\r\n\r\n // Only dispatched on mobile devices\r\n window.addEventListener('orientationchange', listeners.orientationChange, false);\r\n\r\n window.addEventListener('resize', listeners.windowResize, false);\r\n\r\n if (this.fullscreen.available)\r\n {\r\n listeners.fullScreenChange = function (event)\r\n {\r\n return _this.onFullScreenChange(event);\r\n };\r\n\r\n listeners.fullScreenError = function (event)\r\n {\r\n return _this.onFullScreenError(event);\r\n };\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.addEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.addEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.addEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.addEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n }\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenchange event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenChange\r\n * @since 3.16.0\r\n */\r\n onFullScreenChange: function ()\r\n {\r\n // They pressed ESC while in fullscreen mode\r\n if (!this._requestedFullscreenChange)\r\n {\r\n this.stopFullscreen();\r\n }\r\n\r\n this._requestedFullscreenChange = false;\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenerror event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenError\r\n * @since 3.16.0\r\n */\r\n onFullScreenError: function ()\r\n {\r\n this.removeFullscreenTarget();\r\n },\r\n\r\n /**\r\n * Internal method, called automatically by the game step.\r\n * Monitors the elapsed time and resize interval to see if a parent bounds check needs to take place.\r\n *\r\n * @method Phaser.Scale.ScaleManager#step\r\n * @since 3.16.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (!this.parent)\r\n {\r\n return;\r\n }\r\n\r\n this._lastCheck += delta;\r\n\r\n if (this.dirty || this._lastCheck > this.resizeInterval)\r\n {\r\n // Returns true if the parent bounds have changed size\r\n if (this.getParentBounds())\r\n {\r\n this.refresh();\r\n }\r\n\r\n this.dirty = false;\r\n this._lastCheck = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Stops all DOM event listeners.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var listeners = this.listeners;\r\n\r\n window.removeEventListener('orientationchange', listeners.orientationChange, false);\r\n window.removeEventListener('resize', listeners.windowResize, false);\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.removeEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.removeEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.removeEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.removeEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n },\r\n\r\n /**\r\n * Destroys this Scale Manager, releasing all references to external resources.\r\n * Once destroyed, the Scale Manager cannot be used again.\r\n *\r\n * @method Phaser.Scale.ScaleManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.stopListeners();\r\n\r\n this.game = null;\r\n this.canvas = null;\r\n this.canvasBounds = null;\r\n this.parent = null;\r\n this.fullscreenTarget = null;\r\n\r\n this.parentSize.destroy();\r\n this.gameSize.destroy();\r\n this.baseSize.destroy();\r\n this.displaySize.destroy();\r\n },\r\n\r\n /**\r\n * Is the browser currently in fullscreen mode or not?\r\n *\r\n * @name Phaser.Scale.ScaleManager#isFullscreen\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isFullscreen: {\r\n\r\n get: function ()\r\n {\r\n return this.fullscreen.active;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game width.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.width;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game height.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.height;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a portrait orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isPortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isPortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.PORTRAIT);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a landscape orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.LANDSCAPE);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions portrait? (i.e. taller than they are wide)\r\n * \r\n * This is different to the device itself being in a portrait orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGamePortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGamePortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.height > this.width);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions landscape? (i.e. wider than they are tall)\r\n * \r\n * This is different to the device itself being in a landscape orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGameLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGameLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.width > this.height);\r\n }\r\n \r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScaleManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/ScaleManager.js?")},"./node_modules/phaser/src/scale/const/CENTER_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * @namespace Phaser.Scale.Center\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}.\r\n * \r\n * @typedef {Phaser.Scale.Center} Phaser.Scale.CenterType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas is not centered within the parent by Phaser.\r\n * You can still center it yourself via CSS.\r\n * \r\n * @name Phaser.Scale.Center.NO_CENTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_CENTER: 0,\r\n\r\n /**\r\n * The game canvas is centered both horizontally and vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_BOTH: 1,\r\n\r\n /**\r\n * The game canvas is centered horizontally within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_HORIZONTALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_HORIZONTALLY: 2,\r\n\r\n /**\r\n * The game canvas is centered both vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_VERTICALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_VERTICALLY: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/CENTER_CONST.js?")},"./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * @namespace Phaser.Scale.Orientation\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}.\r\n * \r\n * @typedef {Phaser.Scale.Orientation} Phaser.Scale.OrientationType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * A landscape orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.LANDSCAPE\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n LANDSCAPE: 'landscape-primary',\r\n\r\n /**\r\n * A portrait orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.PORTRAIT\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n PORTRAIT: 'portrait-primary'\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js?")},"./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * @namespace Phaser.Scale.ScaleModes\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}.\r\n * \r\n * @typedef {Phaser.Scale.ScaleModes} Phaser.Scale.ScaleModeType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it\r\n * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need\r\n * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.\r\n * \r\n * @name Phaser.Scale.ScaleModes.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n WIDTH_CONTROLS_HEIGHT: 1,\r\n\r\n /**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n HEIGHT_CONTROLS_WIDTH: 2,\r\n\r\n /**\r\n * The width and height are automatically adjusted to fit inside the given target area,\r\n * while keeping the aspect ratio. Depending on the aspect ratio there may be some space\r\n * inside the area which is not covered.\r\n * \r\n * @name Phaser.Scale.ScaleModes.FIT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n FIT: 3,\r\n\r\n /**\r\n * The width and height are automatically adjusted to make the size cover the entire target\r\n * area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Scale.ScaleModes.ENVELOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ENVELOP: 4,\r\n\r\n /**\r\n * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.\r\n * \r\n * @name Phaser.Scale.ScaleModes.RESIZE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n RESIZE: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js?")},"./node_modules/phaser/src/scale/const/ZOOM_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * @namespace Phaser.Scale.Zoom\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}.\r\n * \r\n * @typedef {Phaser.Scale.Zoom} Phaser.Scale.ZoomType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas will not be zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.NO_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_ZOOM: 1,\r\n\r\n /**\r\n * The game canvas will be 2x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_2X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_2X: 2,\r\n\r\n /**\r\n * The game canvas will be 4x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_4X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_4X: 4,\r\n\r\n /**\r\n * Calculate the zoom value based on the maximum multiplied game size that will\r\n * fit into the parent, or browser window if no parent is set.\r\n * \r\n * @name Phaser.Scale.Zoom.MAX_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n MAX_ZOOM: -1\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ZOOM_CONST.js?")},"./node_modules/phaser/src/scale/const/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = {\r\n\r\n CENTER: __webpack_require__(/*! ./CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n ORIENTATION: __webpack_require__(/*! ./ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n SCALE_MODE: __webpack_require__(/*! ./SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n ZOOM: __webpack_require__(/*! ./ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/index.js?')},"./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager has successfully entered fullscreen mode.\r\n *\r\n * @event Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'enterfullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode but failed.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @since 3.17.0\r\n */\r\nmodule.exports = 'fullscreenfailed';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'fullscreenunsupported';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js?")},"./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager was in fullscreen mode, but has since left, either directly via game code,\r\n * or via a user gestured, such as pressing the ESC key.\r\n *\r\n * @event Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'leavefullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Orientation Change Event.\r\n *\r\n * @event Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.1\r\n * \r\n * @param {string} orientation - \r\n */\r\nmodule.exports = 'orientationchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js?")},"./node_modules/phaser/src/scale/events/RESIZE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/RESIZE_EVENT.js?")},"./node_modules/phaser/src/scale/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scale.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ENTER_FULLSCREEN: __webpack_require__(/*! ./ENTER_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js"),\r\n FULLSCREEN_FAILED: __webpack_require__(/*! ./FULLSCREEN_FAILED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js"),\r\n FULLSCREEN_UNSUPPORTED: __webpack_require__(/*! ./FULLSCREEN_UNSUPPORTED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js"),\r\n LEAVE_FULLSCREEN: __webpack_require__(/*! ./LEAVE_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js"),\r\n ORIENTATION_CHANGE: __webpack_require__(/*! ./ORIENTATION_CHANGE_EVENT */ "./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js"),\r\n RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "./node_modules/phaser/src/scale/events/RESIZE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/index.js?')},"./node_modules/phaser/src/scale/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scale/const/index.js");\r\n\r\n/**\r\n * @namespace Phaser.Scale\r\n * \r\n * @borrows Phaser.Scale.Center.NO_CENTER as NO_CENTER\r\n * @borrows Phaser.Scale.Center.CENTER_BOTH as CENTER_BOTH\r\n * @borrows Phaser.Scale.Center.CENTER_HORIZONTALLY as CENTER_HORIZONTALLY\r\n * @borrows Phaser.Scale.Center.CENTER_VERTICALLY as CENTER_VERTICALLY\r\n * \r\n * @borrows Phaser.Scale.Orientation.LANDSCAPE as LANDSCAPE\r\n * @borrows Phaser.Scale.Orientation.PORTRAIT as PORTRAIT\r\n * \r\n * @borrows Phaser.Scale.ScaleModes.NONE as NONE\r\n * @borrows Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT as WIDTH_CONTROLS_HEIGHT\r\n * @borrows Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH as HEIGHT_CONTROLS_WIDTH\r\n * @borrows Phaser.Scale.ScaleModes.FIT as FIT\r\n * @borrows Phaser.Scale.ScaleModes.ENVELOP as ENVELOP\r\n * @borrows Phaser.Scale.ScaleModes.RESIZE as RESIZE\r\n * \r\n * @borrows Phaser.Scale.Zoom.NO_ZOOM as NO_ZOOM\r\n * @borrows Phaser.Scale.Zoom.ZOOM_2X as ZOOM_2X\r\n * @borrows Phaser.Scale.Zoom.ZOOM_4X as ZOOM_4X\r\n * @borrows Phaser.Scale.Zoom.MAX_ZOOM as MAX_ZOOM\r\n */\r\n\r\nvar Scale = {\r\n\r\n Center: __webpack_require__(/*! ./const/CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scale/events/index.js"),\r\n Orientation: __webpack_require__(/*! ./const/ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n ScaleManager: __webpack_require__(/*! ./ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js"),\r\n ScaleModes: __webpack_require__(/*! ./const/SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n Zoom: __webpack_require__(/*! ./const/ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nScale = Extend(false, Scale, CONST.CENTER);\r\nScale = Extend(false, Scale, CONST.ORIENTATION);\r\nScale = Extend(false, Scale, CONST.SCALE_MODE);\r\nScale = Extend(false, Scale, CONST.ZOOM);\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/index.js?')},"./node_modules/phaser/src/scene/GetPhysicsPlugins.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * Builds an array of which physics plugins should be activated for the given Scene.\r\n *\r\n * @function Phaser.Scenes.GetPhysicsPlugins\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of.\r\n *\r\n * @return {array} An array of Physics systems to start for this Scene.\r\n */\r\nvar GetPhysicsPlugins = function (sys)\r\n{\r\n var defaultSystem = sys.game.config.defaultPhysicsSystem;\r\n var sceneSystems = GetFastValue(sys.settings, 'physics', false);\r\n\r\n if (!defaultSystem && !sceneSystems)\r\n {\r\n // No default physics system or systems in this scene\r\n return;\r\n }\r\n\r\n // Let's build the systems array\r\n var output = [];\r\n\r\n if (defaultSystem)\r\n {\r\n output.push(UppercaseFirst(defaultSystem + 'Physics'));\r\n }\r\n\r\n if (sceneSystems)\r\n {\r\n for (var key in sceneSystems)\r\n {\r\n key = UppercaseFirst(key.concat('Physics'));\r\n\r\n if (output.indexOf(key) === -1)\r\n {\r\n output.push(key);\r\n }\r\n }\r\n }\r\n\r\n // An array of Physics systems to start for this Scene\r\n return output;\r\n};\r\n\r\nmodule.exports = GetPhysicsPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetPhysicsPlugins.js?")},"./node_modules/phaser/src/scene/GetScenePlugins.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\n\n/**\n * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene.\n *\n * @function Phaser.Scenes.GetScenePlugins\n * @since 3.0.0\n *\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins.\n *\n * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object.\n */\nvar GetScenePlugins = function (sys)\n{\n var defaultPlugins = sys.plugins.getDefaultScenePlugins();\n\n var scenePlugins = GetFastValue(sys.settings, 'plugins', false);\n\n // Scene Plugins always override Default Plugins\n if (Array.isArray(scenePlugins))\n {\n return scenePlugins;\n }\n else if (defaultPlugins)\n {\n return defaultPlugins;\n }\n else\n {\n // No default plugins or plugins in this scene\n return [];\n }\n};\n\nmodule.exports = GetScenePlugins;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetScenePlugins.js?")},"./node_modules/phaser/src/scene/InjectionMap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// These properties get injected into the Scene and map to local systems\r\n// The map value is the property that is injected into the Scene, the key is the Scene.Systems reference.\r\n// These defaults can be modified via the Scene config object\r\n// var config = {\r\n// map: {\r\n// add: 'makeStuff',\r\n// load: 'loader'\r\n// }\r\n// };\r\n\r\nvar InjectionMap = {\r\n\r\n game: 'game',\r\n\r\n anims: 'anims',\r\n cache: 'cache',\r\n plugins: 'plugins',\r\n registry: 'registry',\r\n scale: 'scale',\r\n sound: 'sound',\r\n textures: 'textures',\r\n\r\n events: 'events',\r\n cameras: 'cameras',\r\n add: 'add',\r\n make: 'make',\r\n scenePlugin: 'scene',\r\n displayList: 'children',\r\n lights: 'lights',\r\n\r\n data: 'data',\r\n input: 'input',\r\n load: 'load',\r\n time: 'time',\r\n tweens: 'tweens',\r\n\r\n arcadePhysics: 'physics',\r\n impactPhysics: 'impact',\r\n matterPhysics: 'matter'\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n InjectionMap.cameras3d = 'cameras3d';\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n InjectionMap.facebook = 'facebook';\r\n}\r\n\r\nmodule.exports = InjectionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/InjectionMap.js?")},"./node_modules/phaser/src/scene/Scene.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Systems = __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js");\r\n\r\n/**\r\n * @classdesc\r\n * A base Phaser.Scene class which can be extended for your own use.\r\n *\r\n * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}.\r\n *\r\n * @class Scene\r\n * @memberof Phaser\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Scene = new Class({\r\n\r\n initialize:\r\n\r\n function Scene (config)\r\n {\r\n /**\r\n * The Scene Systems. You must never overwrite this property, or all hell will break lose.\r\n *\r\n * @name Phaser.Scene#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = new Systems(this, config);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the game level Data Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the Sound Manager.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#sound\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n /**\r\n * A scene level Event Emitter.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A scene level Camera System.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A scene level Game Object Factory.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A scene level Game Object Creator.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scene\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A scene level Game Object Display List.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#children\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.children;\r\n\r\n /**\r\n * A scene level Lights Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#lights\r\n * @type {Phaser.GameObjects.LightsManager}\r\n * @since 3.0.0\r\n */\r\n this.lights;\r\n\r\n /**\r\n * A scene level Data Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.data;\r\n\r\n /**\r\n * A scene level Input Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#input\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.0.0\r\n */\r\n this.input;\r\n\r\n /**\r\n * A scene level Loader Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#load\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.load;\r\n\r\n /**\r\n * A scene level Time and Clock Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#time\r\n * @type {Phaser.Time.Clock}\r\n * @since 3.0.0\r\n */\r\n this.time;\r\n\r\n /**\r\n * A scene level Tween Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#tweens\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.tweens;\r\n\r\n /**\r\n * A scene level Arcade Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#physics\r\n * @type {Phaser.Physics.Arcade.ArcadePhysics}\r\n * @since 3.0.0\r\n */\r\n this.physics;\r\n\r\n /**\r\n * A scene level Impact Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#impact\r\n * @type {Phaser.Physics.Impact.ImpactPhysics}\r\n * @since 3.0.0\r\n */\r\n this.impact;\r\n\r\n /**\r\n * A scene level Matter Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#matter\r\n * @type {Phaser.Physics.Matter.MatterPhysics}\r\n * @since 3.0.0\r\n */\r\n this.matter;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * A scene level Facebook Instant Games Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.2\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Scene#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n },\r\n\r\n /**\r\n * Should be overridden by your own Scenes.\r\n * This method is called once per game step while the scene is running.\r\n *\r\n * @method Phaser.Scene#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Scene.js?')},"./node_modules/phaser/src/scene/SceneManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar LoaderEvents = __webpack_require__(/*! ../loader/events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Scene = __webpack_require__(/*! ./Scene */ \"./node_modules/phaser/src/scene/Scene.js\");\r\nvar Systems = __webpack_require__(/*! ./Systems */ \"./node_modules/phaser/src/scene/Systems.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Manager.\r\n *\r\n * The Scene Manager is a Game level system, responsible for creating, processing and updating all of the\r\n * Scenes in a Game instance.\r\n *\r\n *\r\n * @class SceneManager\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Scene Manager belongs to.\r\n * @param {object} sceneConfig - Scene specific configuration settings.\r\n */\r\nvar SceneManager = new Class({\r\n\r\n initialize:\r\n\r\n function SceneManager (game, sceneConfig)\r\n {\r\n /**\r\n * The Game that this SceneManager belongs to.\r\n *\r\n * @name Phaser.Scenes.SceneManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.\r\n *\r\n * @name Phaser.Scenes.SceneManager#keys\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.keys = {};\r\n\r\n /**\r\n * The array in which all of the scenes are kept.\r\n *\r\n * @name Phaser.Scenes.SceneManager#scenes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.scenes = [];\r\n\r\n /**\r\n * Scenes pending to be added are stored in here until the manager has time to add it.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of scenes waiting to be started once the game has booted.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_start\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._start = [];\r\n\r\n /**\r\n * An operations queue, because we don't manipulate the scenes array during processing.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_queue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._queue = [];\r\n\r\n /**\r\n * Boot time data to merge.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_data\r\n * @type {object}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._data = {};\r\n\r\n /**\r\n * Is the Scene Manager actively processing the Scenes list?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isProcessing\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isProcessing = false;\r\n\r\n /**\r\n * Has the Scene Manager properly started?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isBooted\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * Do any of the Cameras in any of the Scenes require a custom viewport?\r\n * If not we can skip scissor tests.\r\n *\r\n * @name Phaser.Scenes.SceneManager#customViewports\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.customViewports = 0;\r\n\r\n if (sceneConfig)\r\n {\r\n if (!Array.isArray(sceneConfig))\r\n {\r\n sceneConfig = [ sceneConfig ];\r\n }\r\n\r\n for (var i = 0; i < sceneConfig.length; i++)\r\n {\r\n // The i === 0 part just autostarts the first Scene given (unless it says otherwise in its config)\r\n this._pending.push({\r\n key: 'default',\r\n scene: sceneConfig[i],\r\n autoStart: (i === 0),\r\n data: {}\r\n });\r\n }\r\n }\r\n\r\n game.events.once(GameEvents.READY, this.bootQueue, this);\r\n },\r\n\r\n /**\r\n * Internal first-time Scene boot handler.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootQueue\r\n * @private\r\n * @since 3.2.0\r\n */\r\n bootQueue: function ()\r\n {\r\n if (this.isBooted)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n var key;\r\n var sceneConfig;\r\n\r\n for (i = 0; i < this._pending.length; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n key = entry.key;\r\n sceneConfig = entry.scene;\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n // Any data to inject?\r\n if (this._data[key])\r\n {\r\n newScene.sys.settings.data = this._data[key].data;\r\n\r\n if (this._data[key].autoStart)\r\n {\r\n entry.autoStart = true;\r\n }\r\n }\r\n\r\n if (entry.autoStart || newScene.sys.settings.active)\r\n {\r\n this._start.push(key);\r\n }\r\n }\r\n\r\n // Clear the pending lists\r\n this._pending.length = 0;\r\n\r\n this._data = {};\r\n\r\n this.isBooted = true;\r\n\r\n // _start might have been populated by the above\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n this._start.length = 0;\r\n },\r\n\r\n /**\r\n * Process the Scene operations queue.\r\n *\r\n * @method Phaser.Scenes.SceneManager#processQueue\r\n * @since 3.0.0\r\n */\r\n processQueue: function ()\r\n {\r\n var pendingLength = this._pending.length;\r\n var queueLength = this._queue.length;\r\n\r\n if (pendingLength === 0 && queueLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n\r\n if (pendingLength)\r\n {\r\n for (i = 0; i < pendingLength; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n this.add(entry.key, entry.scene, entry.autoStart, entry.data);\r\n }\r\n\r\n // _start might have been populated by this.add\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n // Clear the pending lists\r\n this._start.length = 0;\r\n this._pending.length = 0;\r\n\r\n return;\r\n }\r\n\r\n for (i = 0; i < this._queue.length; i++)\r\n {\r\n entry = this._queue[i];\r\n\r\n this[entry.op](entry.keyA, entry.keyB);\r\n }\r\n\r\n this._queue.length = 0;\r\n },\r\n\r\n /**\r\n * Adds a new Scene into the SceneManager.\r\n * You must give each Scene a unique key by which you'll identify it.\r\n *\r\n * The `sceneConfig` can be:\r\n *\r\n * * A `Phaser.Scene` object, or an object that extends it.\r\n * * A plain JavaScript object\r\n * * A JavaScript ES6 Class that extends `Phaser.Scene`\r\n * * A JavaScript ES5 prototype based Class\r\n * * A JavaScript function\r\n *\r\n * If a function is given then a new Scene will be created by calling it.\r\n *\r\n * @method Phaser.Scenes.SceneManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene\r\n * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {?Phaser.Scene} The added Scene, if it was added immediately, otherwise `null`.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n if (autoStart === undefined) { autoStart = false; }\r\n if (data === undefined) { data = {}; }\r\n\r\n // If processing or not booted then put scene into a holding pattern\r\n if (this.isProcessing || !this.isBooted)\r\n {\r\n this._pending.push({\r\n key: key,\r\n scene: sceneConfig,\r\n autoStart: autoStart,\r\n data: data\r\n });\r\n\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = { data: data };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n key = this.getKey(key, sceneConfig);\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n sceneConfig.key = key;\r\n\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Any data to inject?\r\n newScene.sys.settings.data = data;\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n if (autoStart || newScene.sys.settings.active)\r\n {\r\n if (this._pending.length)\r\n {\r\n this._start.push(key);\r\n }\r\n else\r\n {\r\n this.start(key);\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it will\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.SceneManager#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} scene - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'remove', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var sceneToRemove = this.getScene(key);\r\n\r\n if (!sceneToRemove || sceneToRemove.sys.isTransitioning())\r\n {\r\n return this;\r\n }\r\n\r\n var index = this.scenes.indexOf(sceneToRemove);\r\n var sceneKey = sceneToRemove.sys.settings.key;\r\n\r\n if (index > -1)\r\n {\r\n delete this.keys[sceneKey];\r\n this.scenes.splice(index, 1);\r\n\r\n if (this._start.indexOf(sceneKey) > -1)\r\n {\r\n index = this._start.indexOf(sceneKey);\r\n this._start.splice(index, 1);\r\n }\r\n\r\n sceneToRemove.sys.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boot the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootScene\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to boot.\r\n */\r\n bootScene: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.init)\r\n {\r\n scene.init.call(scene, settings.data);\r\n\r\n settings.status = CONST.INIT;\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_INIT, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n }\r\n\r\n var loader;\r\n\r\n if (sys.load)\r\n {\r\n loader = sys.load;\r\n\r\n loader.reset();\r\n }\r\n\r\n if (loader && scene.preload)\r\n {\r\n scene.preload.call(scene);\r\n\r\n // Is the loader empty?\r\n if (loader.list.size === 0)\r\n {\r\n this.create(scene);\r\n }\r\n else\r\n {\r\n settings.status = CONST.LOADING;\r\n\r\n // Start the loader going as we have something in the queue\r\n loader.once(LoaderEvents.COMPLETE, this.loadComplete, this);\r\n\r\n loader.start();\r\n }\r\n }\r\n else\r\n {\r\n // No preload? Then there was nothing to load either\r\n this.create(scene);\r\n }\r\n },\r\n\r\n /**\r\n * Handles load completion for a Scene's Loader.\r\n *\r\n * Starts the Scene that the Loader belongs to.\r\n *\r\n * @method Phaser.Scenes.SceneManager#loadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading.\r\n */\r\n loadComplete: function (loader)\r\n {\r\n var scene = loader.scene;\r\n\r\n // TODO - Remove. This should *not* be handled here\r\n // Try to unlock HTML5 sounds every time any loader completes\r\n if (this.game.sound && this.game.sound.onBlurPausedSounds)\r\n {\r\n this.game.sound.unlock();\r\n }\r\n\r\n this.create(scene);\r\n },\r\n\r\n /**\r\n * Handle payload completion for a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#payloadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading its Scene's payload.\r\n */\r\n payloadComplete: function (loader)\r\n {\r\n this.bootScene(loader.scene);\r\n },\r\n\r\n /**\r\n * Updates the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - Time elapsed.\r\n * @param {number} delta - Delta time from the last update.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.processQueue();\r\n\r\n this.isProcessing = true;\r\n\r\n // Loop through the active scenes in reverse order\r\n for (var i = this.scenes.length - 1; i >= 0; i--)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.status > CONST.START && sys.settings.status <= CONST.RUNNING)\r\n {\r\n sys.step(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#render\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer to use.\r\n */\r\n render: function (renderer)\r\n {\r\n // Loop through the scenes in forward order\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.visible && sys.settings.status >= CONST.LOADING && sys.settings.status < CONST.SLEEPING)\r\n {\r\n sys.render(renderer);\r\n }\r\n }\r\n\r\n this.isProcessing = false;\r\n },\r\n\r\n /**\r\n * Calls the given Scene's {@link Phaser.Scene#create} method and updates its status.\r\n *\r\n * @method Phaser.Scenes.SceneManager#create\r\n * @private\r\n * @fires Phaser.Scenes.Events#CREATE\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to create.\r\n */\r\n create: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.create)\r\n {\r\n settings.status = CONST.CREATING;\r\n\r\n scene.create.call(scene, settings.data);\r\n\r\n if (settings.status === CONST.DESTROYED)\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_START, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n // If the Scene has an update function we'll set it now, otherwise it'll remain as NOOP\r\n if (scene.update)\r\n {\r\n sys.sceneUpdate = scene.update;\r\n }\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n sys.events.emit(Events.CREATE, scene);\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from a function.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromFunction\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {function} scene - The function to create the Scene from.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromFunction: function (key, scene)\r\n {\r\n var newScene = new scene();\r\n\r\n if (newScene instanceof Scene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n\r\n return this.createSceneFromInstance(key, newScene);\r\n }\r\n else\r\n {\r\n newScene.sys = new Systems(newScene);\r\n\r\n newScene.sys.settings.key = key;\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n }\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene instance.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromInstance\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {Phaser.Scene} newScene - The Scene instance.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromInstance: function (key, newScene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from an Object definition.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromObject\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig)} sceneConfig - The Scene config.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromObject: function (key, sceneConfig)\r\n {\r\n var newScene = new Scene(sceneConfig);\r\n\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n // Extract callbacks\r\n\r\n var defaults = [ 'init', 'preload', 'create', 'update', 'render' ];\r\n\r\n for (var i = 0; i < defaults.length; i++)\r\n {\r\n var sceneCallback = GetValue(sceneConfig, defaults[i], null);\r\n\r\n if (sceneCallback)\r\n {\r\n newScene[defaults[i]] = sceneCallback;\r\n }\r\n }\r\n\r\n // Now let's move across any other functions or properties that may exist in the extend object:\r\n\r\n /*\r\n scene: {\r\n preload: preload,\r\n create: create,\r\n extend: {\r\n hello: 1,\r\n test: 'atari',\r\n addImage: addImage\r\n }\r\n }\r\n */\r\n\r\n if (sceneConfig.hasOwnProperty('extend'))\r\n {\r\n for (var propertyKey in sceneConfig.extend)\r\n {\r\n var value = sceneConfig.extend[propertyKey];\r\n\r\n if (propertyKey === 'data' && newScene.hasOwnProperty('data') && typeof value === 'object')\r\n {\r\n // Populate the DataManager\r\n newScene.data.merge(value);\r\n }\r\n else if (propertyKey !== 'sys')\r\n {\r\n newScene[propertyKey] = value;\r\n }\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Retrieves the key of a Scene from a Scene config.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getKey\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check in the Scene config.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|function)} sceneConfig - The Scene config.\r\n *\r\n * @return {string} The Scene key.\r\n */\r\n getKey: function (key, sceneConfig)\r\n {\r\n if (!key) { key = 'default'; }\r\n\r\n if (typeof sceneConfig === 'function')\r\n {\r\n return key;\r\n }\r\n else if (sceneConfig instanceof Scene)\r\n {\r\n key = sceneConfig.sys.settings.key;\r\n }\r\n else if (typeof sceneConfig === 'object' && sceneConfig.hasOwnProperty('key'))\r\n {\r\n key = sceneConfig.key;\r\n }\r\n\r\n // By this point it's either 'default' or extracted from the Scene\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n else\r\n {\r\n return key;\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all the current Scenes being managed by this Scene Manager.\r\n *\r\n * You can filter the output by the active state of the Scene and choose to have\r\n * the array returned in normal or reversed order.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScenes\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} [isActive=true] - Only include Scene's that are currently active?\r\n * @param {boolean} [inReverse=false] - Return the array of Scenes in reverse?\r\n *\r\n * @return {Phaser.Scene[]} An array containing all of the Scenes in the Scene Manager.\r\n */\r\n getScenes: function (isActive, inReverse)\r\n {\r\n if (isActive === undefined) { isActive = true; }\r\n if (inReverse === undefined) { inReverse = false; }\r\n\r\n var out = [];\r\n var scenes = this.scenes;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene && (!isActive || (isActive && scene.sys.isActive())))\r\n {\r\n out.push(scene);\r\n }\r\n }\r\n\r\n return (inReverse) ? out.reverse() : out;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScene\r\n * @since 3.0.0\r\n *\r\n * @param {string|Phaser.Scene} key - The Scene to retrieve.\r\n *\r\n * @return {?Phaser.Scene} The Scene.\r\n */\r\n getScene: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.keys[key])\r\n {\r\n return this.keys[key];\r\n }\r\n }\r\n else\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n if (key === this.scenes[i])\r\n {\r\n return key;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is running.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isActive();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is paused.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isPaused();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is visible.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isVisible();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is sleeping.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isSleeping();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Pauses the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its pause event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n pause: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.pause(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its resume event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n resume: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.resume(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the given Scene to sleep.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its sleep event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sleep: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.sleep(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Awakens the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its wake event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n wake: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.wake(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene on start, wake, or resume.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This Scene Manager.\r\n */\r\n run: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (!scene)\r\n {\r\n for (var i = 0; i < this._pending.length; i++)\r\n {\r\n if (this._pending[i].key === key)\r\n {\r\n this.queueOp('start', key, data);\r\n break;\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n if (scene.sys.isSleeping())\r\n {\r\n // Sleeping?\r\n scene.sys.wake(data);\r\n }\r\n else if (scene.sys.isBooted && !scene.sys.isActive())\r\n {\r\n // Paused?\r\n scene.sys.resume(data);\r\n }\r\n else\r\n {\r\n // Not actually running?\r\n this.start(key, data);\r\n }\r\n },\r\n\r\n /**\r\n * Starts the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n * @param {object} [data] - Optional data object to pass to Scene.Settings and Scene.init.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n start: function (key, data)\r\n {\r\n // If the Scene Manager is not running, then put the Scene into a holding pattern\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = {\r\n autoStart: true,\r\n data: data\r\n };\r\n\r\n return this;\r\n }\r\n\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n // If the Scene is already running (perhaps they called start from a launched sub-Scene?)\r\n // then we close it down before starting it again.\r\n if (scene.sys.isActive() || scene.sys.isPaused())\r\n {\r\n scene.sys.shutdown();\r\n\r\n scene.sys.start(data);\r\n }\r\n else\r\n {\r\n scene.sys.start(data);\r\n\r\n var loader;\r\n\r\n if (scene.sys.load)\r\n {\r\n loader = scene.sys.load;\r\n }\r\n\r\n // Files payload?\r\n if (loader && scene.sys.settings.hasOwnProperty('pack'))\r\n {\r\n loader.reset();\r\n\r\n if (loader.addPack({ payload: scene.sys.settings.pack }))\r\n {\r\n scene.sys.settings.status = CONST.LOADING;\r\n\r\n loader.once(LoaderEvents.COMPLETE, this.payloadComplete, this);\r\n\r\n loader.start();\r\n\r\n return this;\r\n }\r\n }\r\n }\r\n\r\n this.bootScene(scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n stop: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.shutdown();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sleeps one one Scene and starts the other.\r\n *\r\n * @method Phaser.Scenes.SceneManager#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} from - The Scene to sleep.\r\n * @param {string} to - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n switch: function (from, to)\r\n {\r\n var sceneA = this.getScene(from);\r\n var sceneB = this.getScene(to);\r\n\r\n if (sceneA && sceneB && sceneA !== sceneB)\r\n {\r\n this.sleep(from);\r\n\r\n if (this.isSleeping(to))\r\n {\r\n this.wake(to);\r\n }\r\n else\r\n {\r\n this.start(to);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene by numeric index.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the Scene to retrieve.\r\n *\r\n * @return {(Phaser.Scene|undefined)} The Scene.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.scenes[index];\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The key of the Scene.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n return this.scenes.indexOf(scene);\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'bringToTop', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index < this.scenes.length)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.push(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'sendToBack', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index > 0)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.unshift(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveDown', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA > 0)\r\n {\r\n var indexB = indexA - 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveUp', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA < this.scenes.length - 1)\r\n {\r\n var indexB = indexA + 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately above another Scene in the Scenes list.\r\n *\r\n * This means it will render over the top of the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveAbove', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n // Add in new location\r\n this.scenes.splice(indexA + 1, 0, tempScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately below another Scene in the Scenes list.\r\n *\r\n * This means it will render behind the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveBelow', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n if (indexA === 0)\r\n {\r\n this.scenes.unshift(tempScene);\r\n }\r\n else\r\n {\r\n // Add in new location\r\n this.scenes.splice(indexA, 0, tempScene);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queue a Scene operation for the next update.\r\n *\r\n * @method Phaser.Scenes.SceneManager#queueOp\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} op - The operation to perform.\r\n * @param {(string|Phaser.Scene)} keyA - Scene A.\r\n * @param {(string|Phaser.Scene)} [keyB] - Scene B.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n queueOp: function (op, keyA, keyB)\r\n {\r\n this._queue.push({ op: op, keyA: keyA, keyB: keyB });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the positions of two Scenes in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#swapPosition\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The first Scene to swap.\r\n * @param {(string|Phaser.Scene)} keyB - The second Scene to swap.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'swapPosition', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== indexB && indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexA);\r\n\r\n this.scenes[indexA] = this.scenes[indexB];\r\n this.scenes[indexB] = tempScene;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps debug information about each Scene to the developer console.\r\n *\r\n * @method Phaser.Scenes.SceneManager#dump\r\n * @since 3.2.0\r\n */\r\n dump: function ()\r\n {\r\n var out = [];\r\n var map = [ 'pending', 'init', 'start', 'loading', 'creating', 'running', 'paused', 'sleeping', 'shutdown', 'destroyed' ];\r\n\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n var key = (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED)) ? '[*] ' : '[-] ';\r\n key += sys.settings.key + ' (' + map[sys.settings.status] + ')';\r\n\r\n out.push(key);\r\n }\r\n\r\n console.log(out.join('\\n'));\r\n },\r\n\r\n /**\r\n * Destroy the SceneManager and all of its Scene's systems.\r\n *\r\n * @method Phaser.Scenes.SceneManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n sys.destroy();\r\n }\r\n\r\n this.update = NOOP;\r\n\r\n this.scenes = [];\r\n\r\n this._pending = [];\r\n this._start = [];\r\n this._queue = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SceneManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/SceneManager.js?")},"./node_modules/phaser/src/scene/ScenePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A proxy class to the Global Scene Manager.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this ScenePlugin belongs to.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene)\r\n {\r\n /**\r\n * The Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems instance of the Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The settings of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * The key of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = scene.sys.settings.key;\r\n\r\n /**\r\n * The Game's SceneManager.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#manager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.scene;\r\n\r\n /**\r\n * If this Scene is currently transitioning to another, this holds\r\n * the current percentage of the transition progress, between 0 and 1.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#transitionProgress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.transitionProgress = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_elapsed\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_target\r\n * @type {?Phaser.Scenes.Scene}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._target = null;\r\n\r\n /**\r\n * Transition duration.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_duration\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._duration = 0;\r\n\r\n /**\r\n * Transition callback.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * Transition callback scope.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdateScope\r\n * @type {object}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n\r\n /**\r\n * Will this Scene sleep (true) after the transition, or stop (false)\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willSleep\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willSleep = false;\r\n\r\n /**\r\n * Will this Scene be removed from the Scene Manager after the transition completes?\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willRemove\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willRemove = false;\r\n\r\n scene.sys.events.once(Events.BOOT, this.boot, this);\r\n scene.sys.events.on(Events.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(Events.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pluginStart\r\n * @private\r\n * @since 3.5.0\r\n */\r\n pluginStart: function ()\r\n {\r\n this._target = null;\r\n\r\n this.systems.events.once(Events.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and run the given one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to start.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n start: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', this.key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts this Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#restart\r\n * @since 3.4.0\r\n *\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n restart: function (data)\r\n {\r\n var key = this.key;\r\n\r\n this.manager.queueOp('stop', key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This will start a transition from the current Scene to the target Scene given.\r\n *\r\n * The transition will last for the duration specified in milliseconds.\r\n *\r\n * You can have the target Scene moved above or below this one in the display list.\r\n *\r\n * You can specify an update callback. This callback will be invoked _every frame_ for the duration\r\n * of the transition.\r\n *\r\n * This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop.\r\n *\r\n * There are also 5 transition related events: This scene will emit the event `transitionout` when\r\n * the transition begins, which is typically the frame after calling this method.\r\n *\r\n * The target Scene will emit the event `transitioninit` when that Scene's `init` method is called.\r\n * It will then emit the event `transitionstart` when its `create` method is called.\r\n * If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two,\r\n * as the Scenes `init` and `create` methods are not invoked when a Scene wakes up.\r\n *\r\n * When the duration of the transition has elapsed it will emit the event `transitioncomplete`.\r\n * These events are cleared of all listeners when the Scene shuts down, but not if it is sent to sleep.\r\n *\r\n * It's important to understand that the duration of the transition begins the moment you call this method.\r\n * If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the\r\n * time still counts down even while that is happening. If the game itself pauses, or something else causes\r\n * this Scenes update loop to stop, then the transition will also pause for that duration. There are\r\n * checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to\r\n * override this understand that until the target Scene completes it might never be unlocked for input events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transition\r\n * @fires Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Types.Scenes.SceneTransitionConfig} config - The transition configuration object.\r\n *\r\n * @return {boolean} `true` is the transition was started, otherwise `false`.\r\n */\r\n transition: function (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetFastValue(config, 'target', false);\r\n\r\n var target = this.manager.getScene(key);\r\n\r\n if (!key || !this.checkValidTransition(target))\r\n {\r\n return false;\r\n }\r\n\r\n var duration = GetFastValue(config, 'duration', 1000);\r\n\r\n this._elapsed = 0;\r\n this._target = target;\r\n this._duration = duration;\r\n this._willSleep = GetFastValue(config, 'sleep', false);\r\n this._willRemove = GetFastValue(config, 'remove', false);\r\n\r\n var callback = GetFastValue(config, 'onUpdate', null);\r\n\r\n if (callback)\r\n {\r\n this._onUpdate = callback;\r\n this._onUpdateScope = GetFastValue(config, 'onUpdateScope', this.scene);\r\n }\r\n\r\n var allowInput = GetFastValue(config, 'allowInput', false);\r\n\r\n this.settings.transitionAllowInput = allowInput;\r\n\r\n var targetSettings = target.sys.settings;\r\n\r\n targetSettings.isTransition = true;\r\n targetSettings.transitionFrom = this.scene;\r\n targetSettings.transitionDuration = duration;\r\n targetSettings.transitionAllowInput = allowInput;\r\n\r\n if (GetFastValue(config, 'moveAbove', false))\r\n {\r\n this.manager.moveAbove(this.key, key);\r\n }\r\n else if (GetFastValue(config, 'moveBelow', false))\r\n {\r\n this.manager.moveBelow(this.key, key);\r\n }\r\n\r\n if (target.sys.isSleeping())\r\n {\r\n target.sys.wake();\r\n }\r\n else\r\n {\r\n this.manager.start(key, GetFastValue(config, 'data'));\r\n }\r\n\r\n this.systems.events.emit(Events.TRANSITION_OUT, target, duration);\r\n\r\n this.systems.events.on(Events.UPDATE, this.step, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if this Scene can transition to the target Scene or not.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#checkValidTransition\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - The Scene to test against.\r\n *\r\n * @return {boolean} `true` if this Scene can transition, otherwise `false`.\r\n */\r\n checkValidTransition: function (target)\r\n {\r\n // Not a valid target if it doesn't exist, isn't active or is already transitioning in or out\r\n if (!target || target.sys.isActive() || target.sys.isTransitioning() || target === this.scene || this.systems.isTransitioning())\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * A single game step. This is only called if the parent Scene is transitioning\r\n * out to another Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#step\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n this._elapsed += delta;\r\n\r\n this.transitionProgress = Clamp(this._elapsed / this._duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.transitionProgress);\r\n }\r\n\r\n if (this._elapsed >= this._duration)\r\n {\r\n this.transitionComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called by `step` when the transition out of this scene to another is over.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transitionComplete\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n var targetSys = this._target.sys;\r\n var targetSettings = this._target.sys.settings;\r\n\r\n // Stop the step\r\n this.systems.events.off(Events.UPDATE, this.step, this);\r\n\r\n // Notify target scene\r\n targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene);\r\n\r\n // Clear target scene settings\r\n targetSettings.isTransition = false;\r\n targetSettings.transitionFrom = null;\r\n\r\n // Clear local settings\r\n this._duration = 0;\r\n this._target = null;\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n // Now everything is clear we can handle what happens to this Scene\r\n if (this._willRemove)\r\n {\r\n this.manager.remove(this.key);\r\n }\r\n else if (this._willSleep)\r\n {\r\n this.systems.sleep();\r\n }\r\n else\r\n {\r\n this.manager.stop(this.key);\r\n }\r\n },\r\n\r\n /**\r\n * Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene key.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene.\r\n * @param {boolean} autoStart - Whether to start the Scene after it's added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {Phaser.Scene} An instance of the Scene that was added to the Scene Manager.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n return this.manager.add(key, sceneConfig, autoStart, data);\r\n },\r\n\r\n /**\r\n * Launch the given Scene and run it in parallel with this one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#launch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to launch.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n launch: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('start', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene and emitted in its ready, wake, or resume events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n run: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('run', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pause the Scene - this stops the update step from happening but it still renders.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its pause event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n pause: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('pause', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume the Scene - starts the update loop again.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its resume event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n resume: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('resume', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene sleep (no update, no render) but doesn't shutdown.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its sleep event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sleep: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('sleep', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene wake-up (starts update and render)\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its wake event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n wake: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('wake', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes this Scene sleep then starts the Scene given.\r\n * \r\n * No checks are made to see if an instance of the given Scene is already running.\r\n * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple\r\n * instances of them _at the same time_. This means, calling this function\r\n * may launch another instance of the requested Scene if it's already running.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n switch: function (key)\r\n {\r\n if (key !== this.key)\r\n {\r\n this.manager.queueOp('switch', this.key, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shutdown the Scene, clearing display list, timers, etc.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n stop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the active state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed. If `false` it will be paused.\r\n * @param {string} [key] - The Scene to set the active state of.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted with its events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setActive: function (value, key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setActive(value, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visible state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible value.\r\n * @param {string} [key] - The Scene to set the visible state for.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setVisible: function (value, key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setVisible(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is sleeping or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isSleeping(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is running or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isActive(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is paused or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isPaused(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is visible or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isVisible(key);\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#swapPosition\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The first Scene to swap.\r\n * @param {string} [keyB] - The second Scene to swap. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.swapPosition(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be above.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveAbove(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be below.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveBelow(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it wil\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.remove(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveUp(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveDown(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.bringToTop(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.sendToBack(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve a Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to retrieve.\r\n *\r\n * @return {Phaser.Scene} The Scene.\r\n */\r\n get: function (key)\r\n {\r\n return this.manager.getScene(key);\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#getIndex\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to get the index of.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.getIndex(key);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(Events.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.off(Events.POST_UPDATE, this.step, this);\r\n eventEmitter.off(Events.TRANSITION_OUT);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(Events.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.settings = null;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('ScenePlugin', ScenePlugin, 'scenePlugin');\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/ScenePlugin.js?")},"./node_modules/phaser/src/scene/Settings.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Merge = __webpack_require__(/*! ../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\r\nvar InjectionMap = __webpack_require__(/*! ./InjectionMap */ \"./node_modules/phaser/src/scene/InjectionMap.js\");\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Settings\r\n */\r\n\r\nvar Settings = {\r\n\r\n /**\r\n * Takes a Scene configuration object and returns a fully formed System Settings object.\r\n *\r\n * @function Phaser.Scenes.Settings.create\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - The Scene configuration object used to create this Scene Settings.\r\n *\r\n * @return {Phaser.Types.Scenes.SettingsObject} The Scene Settings object created as a result of the config and default settings.\r\n */\r\n create: function (config)\r\n {\r\n if (typeof config === 'string')\r\n {\r\n config = { key: config };\r\n }\r\n else if (config === undefined)\r\n {\r\n // Pass the 'hasOwnProperty' checks\r\n config = {};\r\n }\r\n\r\n return {\r\n\r\n status: CONST.PENDING,\r\n\r\n key: GetValue(config, 'key', ''),\r\n active: GetValue(config, 'active', false),\r\n visible: GetValue(config, 'visible', true),\r\n\r\n isBooted: false,\r\n\r\n isTransition: false,\r\n transitionFrom: null,\r\n transitionDuration: 0,\r\n transitionAllowInput: true,\r\n\r\n // Loader payload array\r\n\r\n data: {},\r\n\r\n pack: GetValue(config, 'pack', false),\r\n\r\n // Cameras\r\n\r\n cameras: GetValue(config, 'cameras', null),\r\n\r\n // Scene Property Injection Map\r\n\r\n map: GetValue(config, 'map', Merge(InjectionMap, GetValue(config, 'mapAdd', {}))),\r\n\r\n // Physics\r\n\r\n physics: GetValue(config, 'physics', {}),\r\n\r\n // Loader\r\n\r\n loader: GetValue(config, 'loader', {}),\r\n\r\n // Plugins\r\n\r\n plugins: GetValue(config, 'plugins', false),\r\n\r\n // Input\r\n\r\n input: GetValue(config, 'input', {})\r\n\r\n };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Settings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Settings.js?")},"./node_modules/phaser/src/scene/Systems.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetPhysicsPlugins = __webpack_require__(/*! ./GetPhysicsPlugins */ \"./node_modules/phaser/src/scene/GetPhysicsPlugins.js\");\r\nvar GetScenePlugins = __webpack_require__(/*! ./GetScenePlugins */ \"./node_modules/phaser/src/scene/GetScenePlugins.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Settings = __webpack_require__(/*! ./Settings */ \"./node_modules/phaser/src/scene/Settings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Systems class.\r\n *\r\n * This class is available from within a Scene under the property `sys`.\r\n * It is responsible for managing all of the plugins a Scene has running, including the display list, and\r\n * handling the update step and renderer. It also contains references to global systems belonging to Game.\r\n *\r\n * @class Systems\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns this Systems instance.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Systems = new Class({\r\n\r\n initialize:\r\n\r\n function Systems (scene, config)\r\n {\r\n /**\r\n * A reference to the Scene that these Systems belong to.\r\n *\r\n * @name Phaser.Scenes.Systems#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Phaser Game instance.\r\n *\r\n * @name Phaser.Scenes.Systems#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Scenes.Systems#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * The Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.Scenes.Systems#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * The Scene Configuration object, as passed in when creating the Scene.\r\n *\r\n * @name Phaser.Scenes.Systems#config\r\n * @type {(string|Phaser.Types.Scenes.SettingsConfig)}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * The Scene Settings. This is the parsed output based on the Scene configuration.\r\n *\r\n * @name Phaser.Scenes.Systems#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = Settings.create(config);\r\n\r\n /**\r\n * A handy reference to the Scene canvas / context.\r\n *\r\n * @name Phaser.Scenes.Systems#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * A reference to the Canvas Rendering Context being used by the renderer.\r\n *\r\n * @name Phaser.Scenes.Systems#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context;\r\n\r\n // Global Systems - these are single-instance global managers that belong to Game\r\n\r\n /**\r\n * A reference to the global Animations Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.anims` property.\r\n *\r\n * @name Phaser.Scenes.Systems#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache. The Cache stores all files bought in to Phaser via\r\n * the Loader, with the exception of images. Images are stored in the Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cache` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the global Plugins Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.plugins` property.\r\n *\r\n * @name Phaser.Scenes.Systems#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n\r\n /**\r\n * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing\r\n * you to exchange data between Scenes via a universal and shared point.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.registry` property.\r\n *\r\n * @name Phaser.Scenes.Systems#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scale` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.15.0\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the global Sound Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.sound` property.\r\n *\r\n * @name Phaser.Scenes.Systems#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.textures` property.\r\n *\r\n * @name Phaser.Scenes.Systems#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n // Core Plugins - these are non-optional Scene plugins, needed by lots of the other systems\r\n\r\n /**\r\n * A reference to the Scene's Game Object Factory.\r\n * \r\n * Use this to quickly and easily create new Game Object's.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.add` property.\r\n *\r\n * @name Phaser.Scenes.Systems#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager.\r\n * \r\n * Use this to manipulate and create Cameras for this specific Scene.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cameras` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A reference to the Scene's Display List.\r\n * \r\n * Use this to organize the children contained in the display list.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.children` property.\r\n *\r\n * @name Phaser.Scenes.Systems#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene's Event Manager.\r\n * \r\n * Use this to listen for Scene specific events, such as `pause` and `shutdown`.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.events` property.\r\n *\r\n * @name Phaser.Scenes.Systems#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A reference to the Scene's Game Object Creator.\r\n * \r\n * Use this to quickly and easily create new Game Object's. The difference between this and the\r\n * Game Object Factory, is that the Creator just creates and returns Game Object instances, it\r\n * doesn't then add them to the Display List or Update List.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.make` property.\r\n *\r\n * @name Phaser.Scenes.Systems#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * \r\n * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene,\r\n * or pause or resume a Scene, or switch from this Scene to another.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scene` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scenePlugin\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scenePlugin;\r\n\r\n /**\r\n * A reference to the Scene's Update List.\r\n * \r\n * Use this to organize the children contained in the update list.\r\n * \r\n * The Update List is responsible for managing children that need their `preUpdate` methods called,\r\n * in order to process so internal components, such as Sprites with Animations.\r\n * \r\n * In the default set-up there is no reference to this from within the Scene itself.\r\n *\r\n * @name Phaser.Scenes.Systems#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n /**\r\n * The Scene Update function.\r\n *\r\n * This starts out as NOOP during init, preload and create, and at the end of create\r\n * it swaps to be whatever the Scene.update function is.\r\n *\r\n * @name Phaser.Scenes.Systems#sceneUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.sceneUpdate = NOOP;\r\n },\r\n\r\n /**\r\n * This method is called only once by the Scene Manager when the Scene is instantiated.\r\n * It is responsible for setting up all of the Scene plugins and references.\r\n * It should never be called directly.\r\n *\r\n * @method Phaser.Scenes.Systems#init\r\n * @protected\r\n * @fires Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n this.settings.status = CONST.INIT;\r\n\r\n // This will get replaced by the SceneManager with the actual update function, if it exists, once create is over.\r\n this.sceneUpdate = NOOP;\r\n\r\n this.game = game;\r\n this.renderer = game.renderer;\r\n\r\n this.canvas = game.canvas;\r\n this.context = game.context;\r\n\r\n var pluginManager = game.plugins;\r\n\r\n this.plugins = pluginManager;\r\n\r\n pluginManager.addToScene(this, DefaultPlugins.Global, [ DefaultPlugins.CoreScene, GetScenePlugins(this), GetPhysicsPlugins(this) ]);\r\n\r\n this.events.emit(Events.BOOT, this);\r\n\r\n this.settings.isBooted = true;\r\n },\r\n\r\n /**\r\n * Called by a plugin, it tells the System to install the plugin locally.\r\n *\r\n * @method Phaser.Scenes.Systems#install\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {array} plugin - An array of plugins to install into this Scene.\r\n */\r\n install: function (plugin)\r\n {\r\n if (!Array.isArray(plugin))\r\n {\r\n plugin = [ plugin ];\r\n }\r\n\r\n this.plugins.installLocal(this, plugin);\r\n },\r\n\r\n /**\r\n * A single game step. Called automatically by the Scene Manager as a result of a Request Animation\r\n * Frame or Set Timeout call to the main Game instance.\r\n *\r\n * @method Phaser.Scenes.Systems#step\r\n * @fires Phaser.Scenes.Events#PRE_UPDATE\r\n * @fires Phaser.Scenes.Events#_UPDATE\r\n * @fires Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n this.events.emit(Events.PRE_UPDATE, time, delta);\r\n\r\n this.events.emit(Events.UPDATE, time, delta);\r\n\r\n this.sceneUpdate.call(this.scene, time, delta);\r\n\r\n this.events.emit(Events.POST_UPDATE, time, delta);\r\n },\r\n\r\n /**\r\n * Called automatically by the Scene Manager.\r\n * Instructs the Scene to render itself via its Camera Manager to the renderer given.\r\n *\r\n * @method Phaser.Scenes.Systems#render\r\n * @fires Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that invoked the render call.\r\n */\r\n render: function (renderer)\r\n {\r\n var displayList = this.displayList;\r\n\r\n displayList.depthSort();\r\n\r\n this.cameras.render(renderer, displayList);\r\n\r\n this.events.emit(Events.RENDER, renderer);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next render.\r\n *\r\n * @method Phaser.Scenes.Systems#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.displayList.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.Scenes.Systems#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n this.displayList.depthSort();\r\n },\r\n\r\n /**\r\n * Pause this Scene.\r\n * A paused Scene still renders, it just doesn't run ANY of its update handlers or systems.\r\n *\r\n * @method Phaser.Scenes.Systems#pause\r\n * @fires Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'pause' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n pause: function (data)\r\n {\r\n if (this.settings.active)\r\n {\r\n this.settings.status = CONST.PAUSED;\r\n\r\n this.settings.active = false;\r\n\r\n this.events.emit(Events.PAUSE, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume this Scene from a paused state.\r\n *\r\n * @method Phaser.Scenes.Systems#resume\r\n * @fires Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'resume' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n resume: function (data)\r\n {\r\n if (!this.settings.active)\r\n {\r\n this.settings.status = CONST.RUNNING;\r\n\r\n this.settings.active = true;\r\n\r\n this.events.emit(Events.RESUME, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Send this Scene to sleep.\r\n *\r\n * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down\r\n * or have any of its systems or children removed, meaning it can be re-activated at any point and\r\n * will carry on from where it left off. It also keeps everything in memory and events and callbacks\r\n * from other Scenes may still invoke changes within it, so be careful what is left active.\r\n *\r\n * @method Phaser.Scenes.Systems#sleep\r\n * @fires Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'sleep' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n sleep: function (data)\r\n {\r\n this.settings.status = CONST.SLEEPING;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SLEEP, this, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Wake-up this Scene if it was previously asleep.\r\n *\r\n * @method Phaser.Scenes.Systems#wake\r\n * @fires Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'wake' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n wake: function (data)\r\n {\r\n var settings = this.settings;\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n settings.active = true;\r\n settings.visible = true;\r\n\r\n this.events.emit(Events.WAKE, this, data);\r\n\r\n if (settings.isTransition)\r\n {\r\n this.events.emit(Events.TRANSITION_WAKE, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this Scene sleeping?\r\n *\r\n * @method Phaser.Scenes.Systems#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is asleep, otherwise `false`.\r\n */\r\n isSleeping: function ()\r\n {\r\n return (this.settings.status === CONST.SLEEPING);\r\n },\r\n\r\n /**\r\n * Is this Scene running?\r\n *\r\n * @method Phaser.Scenes.Systems#isActive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is running, otherwise `false`.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.settings.status === CONST.RUNNING);\r\n },\r\n\r\n /**\r\n * Is this Scene paused?\r\n *\r\n * @method Phaser.Scenes.Systems#isPaused\r\n * @since 3.13.0\r\n *\r\n * @return {boolean} `true` if this Scene is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.settings.status === CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out to, or in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitioning\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is currently transitioning, otherwise `false`.\r\n */\r\n isTransitioning: function ()\r\n {\r\n return (this.settings.isTransition || this.scenePlugin._target !== null);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out from itself to another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionOut\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is in transition to another Scene, otherwise `false`.\r\n */\r\n isTransitionOut: function ()\r\n {\r\n return (this.scenePlugin._target !== null && this.scenePlugin._duration > 0);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionIn\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is transitioning in from another Scene, otherwise `false`.\r\n */\r\n isTransitionIn: function ()\r\n {\r\n return (this.settings.isTransition);\r\n },\r\n\r\n /**\r\n * Is this Scene visible and rendering?\r\n *\r\n * @method Phaser.Scenes.Systems#isVisible\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is visible, otherwise `false`.\r\n */\r\n isVisible: function ()\r\n {\r\n return this.settings.visible;\r\n },\r\n\r\n /**\r\n * Sets the visible state of this Scene.\r\n * An invisible Scene will not render, but will still process updates.\r\n *\r\n * @method Phaser.Scenes.Systems#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to render this Scene, otherwise `false`.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.settings.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the active state of this Scene.\r\n * \r\n * An active Scene will run its core update loop.\r\n *\r\n * @method Phaser.Scenes.Systems#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed, if previously paused. If `false` it will be paused.\r\n * @param {object} [data] - A data object that will be passed in the 'resume' or 'pause' events.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setActive: function (value, data)\r\n {\r\n if (value)\r\n {\r\n return this.resume(data);\r\n }\r\n else\r\n {\r\n return this.pause(data);\r\n }\r\n },\r\n\r\n /**\r\n * Start this Scene running and rendering.\r\n * Called automatically by the SceneManager.\r\n *\r\n * @method Phaser.Scenes.Systems#start\r\n * @fires Phaser.Scenes.Events#START\r\n * @fires Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Optional data object that may have been passed to this Scene from another.\r\n */\r\n start: function (data)\r\n {\r\n if (data)\r\n {\r\n this.settings.data = data;\r\n }\r\n\r\n this.settings.status = CONST.START;\r\n\r\n this.settings.active = true;\r\n this.settings.visible = true;\r\n\r\n // For plugins to listen out for\r\n this.events.emit(Events.START, this);\r\n\r\n // For user-land code to listen out for\r\n this.events.emit(Events.READY, this, data);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and send a shutdown event to all of its systems.\r\n * A Scene that has been shutdown will not run its update loop or render, but it does\r\n * not destroy any of its plugins or references. It is put into hibernation for later use.\r\n * If you don't ever plan to use this Scene again, then it should be destroyed instead\r\n * to free-up resources.\r\n *\r\n * @method Phaser.Scenes.Systems#shutdown\r\n * @fires Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'shutdown' event.\r\n */\r\n shutdown: function (data)\r\n {\r\n this.events.off(Events.TRANSITION_INIT);\r\n this.events.off(Events.TRANSITION_START);\r\n this.events.off(Events.TRANSITION_COMPLETE);\r\n this.events.off(Events.TRANSITION_OUT);\r\n\r\n this.settings.status = CONST.SHUTDOWN;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SHUTDOWN, this, data);\r\n },\r\n\r\n /**\r\n * Destroy this Scene and send a destroy event all of its systems.\r\n * A destroyed Scene cannot be restarted.\r\n * You should not call this directly, instead use `SceneManager.remove`.\r\n *\r\n * @method Phaser.Scenes.Systems#destroy\r\n * @private\r\n * @fires Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.settings.status = CONST.DESTROYED;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.DESTROY, this);\r\n\r\n this.events.removeAllListeners();\r\n\r\n var props = [ 'scene', 'game', 'anims', 'cache', 'plugins', 'registry', 'sound', 'textures', 'add', 'camera', 'displayList', 'events', 'make', 'scenePlugin', 'updateList' ];\r\n\r\n for (var i = 0; i < props.length; i++)\r\n {\r\n this[props[i]] = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Systems;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Systems.js?")},"./node_modules/phaser/src/scene/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Scene consts.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PENDING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING: 0,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.INIT\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.START\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n START: 2,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.LOADING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADING: 3,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.CREATING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATING: 4,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.RUNNING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RUNNING: 5,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PAUSED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 6,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SLEEPING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SLEEPING: 7,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SHUTDOWN\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHUTDOWN: 8,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.DESTROYED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DESTROYED: 9\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/const.js?")},"./node_modules/phaser/src/scene/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/scene/events/CREATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/CREATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/scene/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/READY_EVENT.js?")},"./node_modules/phaser/src/scene/events/RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RENDER_EVENT.js?")},"./node_modules/phaser/src/scene/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/scene/events/SLEEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SLEEP_EVENT.js?")},"./node_modules/phaser/src/scene/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/scene/events/BOOT_EVENT.js"),\r\n CREATE: __webpack_require__(/*! ./CREATE_EVENT */ "./node_modules/phaser/src/scene/events/CREATE_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/scene/events/DESTROY_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/scene/events/PAUSE_EVENT.js"),\r\n POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/scene/events/READY_EVENT.js"),\r\n RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "./node_modules/phaser/src/scene/events/RENDER_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/scene/events/RESUME_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js"),\r\n SLEEP: __webpack_require__(/*! ./SLEEP_EVENT */ "./node_modules/phaser/src/scene/events/SLEEP_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/scene/events/START_EVENT.js"),\r\n TRANSITION_COMPLETE: __webpack_require__(/*! ./TRANSITION_COMPLETE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js"),\r\n TRANSITION_INIT: __webpack_require__(/*! ./TRANSITION_INIT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js"),\r\n TRANSITION_OUT: __webpack_require__(/*! ./TRANSITION_OUT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js"),\r\n TRANSITION_START: __webpack_require__(/*! ./TRANSITION_START_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js"),\r\n TRANSITION_WAKE: __webpack_require__(/*! ./TRANSITION_WAKE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/UPDATE_EVENT.js"),\r\n WAKE: __webpack_require__(/*! ./WAKE_EVENT */ "./node_modules/phaser/src/scene/events/WAKE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/index.js?')},"./node_modules/phaser/src/scene/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scene/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Scenes\r\n */\r\n\r\nvar Scene = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scene/events/index.js"),\r\n SceneManager: __webpack_require__(/*! ./SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/scene/ScenePlugin.js"),\r\n Settings: __webpack_require__(/*! ./Settings */ "./node_modules/phaser/src/scene/Settings.js"),\r\n Systems: __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nScene = Extend(false, Scene, CONST);\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/index.js?')},"./node_modules/phaser/src/sound/BaseSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Class containing all the shared state and behavior of a sound object, independent of the implementation.\r\n *\r\n * @class BaseSound\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n */\r\nvar BaseSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSound (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to the sound manager.\r\n *\r\n * @name Phaser.Sound.BaseSound#manager\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * Asset key for the sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#key\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Flag indicating if sound is currently playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * Flag indicating if sound is currently paused.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPaused = false;\r\n\r\n /**\r\n * A property that holds the value of sound's actual playback rate,\r\n * after its rate and detune values has been combined with global\r\n * rate and detune values.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalRate\r\n * @type {number}\r\n * @default 1\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalRate = 1;\r\n\r\n /**\r\n * A value representing the duration, in seconds.\r\n * It could be total sound duration or a marker duration.\r\n *\r\n * @name Phaser.Sound.BaseSound#duration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.duration = this.duration || 0;\r\n\r\n /**\r\n * The total duration of the sound in seconds.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalDuration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = this.totalDuration || 0;\r\n\r\n /**\r\n * A config object used to store default sound settings' values.\r\n * Default values will be set by properties' setters.\r\n *\r\n * @name Phaser.Sound.BaseSound#config\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n\r\n };\r\n\r\n /**\r\n * Reference to the currently used config.\r\n * It could be default config or marker config.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentConfig\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.currentConfig = this.config;\r\n\r\n this.config = Extend(this.config, config);\r\n\r\n /**\r\n * Object containing markers definitions.\r\n *\r\n * @name Phaser.Sound.BaseSound#markers\r\n * @type {Object.}\r\n * @default {}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.markers = {};\r\n\r\n /**\r\n * Currently playing marker.\r\n * 'null' if whole sound is playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentMarker\r\n * @type {Phaser.Types.Sound.SoundMarker}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.currentMarker = null;\r\n\r\n /**\r\n * Flag indicating if destroy method was called on this sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#pendingRemove\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRemove = false;\r\n },\r\n\r\n /**\r\n * Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object.\r\n * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.\r\n *\r\n * @method Phaser.Sound.BaseSound#addMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object.\r\n *\r\n * @return {boolean} Whether the marker was added successfully.\r\n */\r\n addMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('addMarker ' + marker.name + ' already exists in Sound');\r\n\r\n return false;\r\n }\r\n\r\n marker = Extend(true, {\r\n name: '',\r\n start: 0,\r\n duration: this.totalDuration - (marker.start || 0),\r\n config: {\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }\r\n }, marker);\r\n\r\n this.markers[marker.name] = marker;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Updates previously added marker.\r\n *\r\n * @method Phaser.Sound.BaseSound#updateMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values.\r\n *\r\n * @return {boolean} Whether the marker was updated successfully.\r\n */\r\n updateMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio Marker: ' + marker.name + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.markers[marker.name] = Extend(true, this.markers[marker.name], marker);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a marker from the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#removeMarker\r\n * @since 3.0.0\r\n *\r\n * @param {string} markerName - The name of the marker to remove.\r\n *\r\n * @return {?Phaser.Types.Sound.SoundMarker} Removed marker object or 'null' if there was no marker with provided name.\r\n */\r\n removeMarker: function (markerName)\r\n {\r\n var marker = this.markers[markerName];\r\n\r\n if (!marker)\r\n {\r\n return null;\r\n }\r\n\r\n this.markers[markerName] = null;\r\n\r\n return marker;\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.BaseSound#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (markerName === undefined) { markerName = ''; }\r\n\r\n if (typeof markerName === 'object')\r\n {\r\n config = markerName;\r\n markerName = '';\r\n }\r\n\r\n if (typeof markerName !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!markerName)\r\n {\r\n this.currentMarker = null;\r\n this.currentConfig = this.config;\r\n this.duration = this.totalDuration;\r\n }\r\n else\r\n {\r\n if (!this.markers[markerName])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Marker: ' + markerName + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.currentMarker = this.markers[markerName];\r\n this.currentConfig = this.currentMarker.config;\r\n this.duration = this.currentMarker.duration;\r\n }\r\n\r\n this.resetConfig();\r\n\r\n this.currentConfig = Extend(this.currentConfig, config);\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#pause\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.isPaused || !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#resume\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (!this.isPaused || this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#stop\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!this.isPaused && !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.mute = this.currentConfig.mute;\r\n this.volume = this.currentConfig.volume;\r\n this.rate = this.currentConfig.rate;\r\n this.detune = this.currentConfig.detune;\r\n this.loop = this.currentConfig.loop;\r\n },\r\n\r\n /**\r\n * Method used internally for resetting values of some of the config properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#resetConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n resetConfig: function ()\r\n {\r\n this.currentConfig.seek = 0;\r\n this.currentConfig.delay = 0;\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.BaseSound#update\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: NOOP,\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n var cent = 1.0005777895065548; // Math.pow(2, 1/1200);\r\n var totalDetune = this.currentConfig.detune + this.manager.detune;\r\n var detuneRate = Math.pow(cent, totalDetune);\r\n\r\n this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate;\r\n },\r\n\r\n /**\r\n * Destroys this sound and all associated events and marks it for removal from the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSound#destroy\r\n * @fires Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.pendingRemove)\r\n {\r\n return;\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n this.pendingRemove = true;\r\n this.manager = null;\r\n this.key = '';\r\n this.removeAllListeners();\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.config = null;\r\n this.currentConfig = null;\r\n this.markers = null;\r\n this.currentMarker = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSound.js?")},"./node_modules/phaser/src/sound/BaseSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clone = __webpack_require__(/*! ../utils/object/Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback.\r\n * The audio file type and the encoding of those files are extremely important.\r\n *\r\n * Not all browsers can play all audio formats.\r\n *\r\n * There is a good guide to what\'s supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support).\r\n *\r\n * @class BaseSoundManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar BaseSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to game.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * Local reference to the JSON Cache, as used by Audio Sprites.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#jsonCache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @readonly\r\n * @since 3.7.0\r\n */\r\n this.jsonCache = game.cache.json;\r\n\r\n /**\r\n * An array containing all added sounds.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#sounds\r\n * @type {Phaser.Sound.BaseSound[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.sounds = [];\r\n\r\n /**\r\n * Global mute setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#mute\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.mute = false;\r\n\r\n /**\r\n * Global volume setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#volume\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.volume = 1;\r\n\r\n /**\r\n * Flag indicating if sounds should be paused when game looses focus,\r\n * for instance when user switches to another tab/program/app.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#pauseOnBlur\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.pauseOnBlur = true;\r\n\r\n /**\r\n * Property that actually holds the value of global playback rate.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_rate\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._rate = 1;\r\n\r\n /**\r\n * Property that actually holds the value of global detune.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_detune\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._detune = 0;\r\n\r\n /**\r\n * Mobile devices require sounds to be triggered from an explicit user action,\r\n * such as a tap, before any sound can be loaded/played on a web page.\r\n * Set to true if the audio system is currently locked awaiting user interaction.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#locked\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.locked = this.locked || false;\r\n\r\n /**\r\n * Flag used internally for handling when the audio system\r\n * has been unlocked, if there ever was a need for it.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#unlocked\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.unlocked = false;\r\n\r\n game.events.on(GameEvents.BLUR, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onBlur();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.FOCUS, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onFocus();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.update, this);\r\n game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#add\r\n * @override\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.BaseSound} The new sound instance.\r\n */\r\n add: NOOP,\r\n\r\n /**\r\n * Adds a new audio sprite sound into the sound manager.\r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#addAudioSprite\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Types.Sound.AudioSpriteSound} The new audio sprite sound instance.\r\n */\r\n addAudioSprite: function (key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = this.jsonCache.get(key).spritemap;\r\n\r\n for (var markerName in sound.spritemap)\r\n {\r\n if (!sound.spritemap.hasOwnProperty(markerName))\r\n {\r\n continue;\r\n }\r\n\r\n var markerConfig = Clone(config);\r\n\r\n var marker = sound.spritemap[markerName];\r\n\r\n markerConfig.loop = (marker.hasOwnProperty(\'loop\')) ? marker.loop : false;\r\n\r\n sound.addMarker({\r\n name: markerName,\r\n start: marker.start,\r\n duration: marker.end - marker.start,\r\n config: markerConfig\r\n });\r\n }\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Enables playing sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#play\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {(Phaser.Types.Sound.SoundConfig|Phaser.Types.Sound.SoundMarker)} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (key, extra)\r\n {\r\n var sound = this.add(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n if (extra)\r\n {\r\n if (extra.name)\r\n {\r\n sound.addMarker(extra);\r\n\r\n return sound.play(extra.name);\r\n }\r\n else\r\n {\r\n return sound.play(extra);\r\n }\r\n }\r\n else\r\n {\r\n return sound.play();\r\n }\r\n },\r\n\r\n /**\r\n * Enables playing audio sprite sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#playAudioSprite\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {string} spriteName - The name of the sound sprite to play.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {boolean} Whether the audio sprite sound started playing successfully.\r\n */\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n var sound = this.addAudioSprite(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n return sound.play(spriteName, config);\r\n },\r\n\r\n /**\r\n * Removes a sound from the sound manager.\r\n * The removed sound is destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSound} sound - The sound object to remove.\r\n *\r\n * @return {boolean} True if the sound was removed successfully, otherwise false.\r\n */\r\n remove: function (sound)\r\n {\r\n var index = this.sounds.indexOf(sound);\r\n\r\n if (index !== -1)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Removes all sounds from the sound manager that have an asset key matching the given value.\r\n * The removed sounds are destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#removeByKey\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to match when removing sound objects.\r\n *\r\n * @return {number} The number of matching sound objects that were removed.\r\n */\r\n removeByKey: function (key)\r\n {\r\n var removed = 0;\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n var sound = this.sounds[i];\r\n\r\n if (sound.key === key)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(i, 1);\r\n\r\n removed++;\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Pauses all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#pauseAll\r\n * @fires Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\n pauseAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.pause();\r\n });\r\n\r\n this.emit(Events.PAUSE_ALL, this);\r\n },\r\n\r\n /**\r\n * Resumes all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#resumeAll\r\n * @fires Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\n resumeAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.resume();\r\n });\r\n\r\n this.emit(Events.RESUME_ALL, this);\r\n },\r\n\r\n /**\r\n * Stops all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#stopAll\r\n * @fires Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n */\r\n stopAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.stop();\r\n });\r\n\r\n this.emit(Events.STOP_ALL, this);\r\n },\r\n\r\n /**\r\n * Method used internally for unlocking audio playback on devices that\r\n * require user interaction before any sound can be played on a web page.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#unlock\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n unlock: NOOP,\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onBlur\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: NOOP,\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onFocus\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: NOOP,\r\n\r\n /**\r\n * Update method called on every game step.\r\n * Removes destroyed sounds and updates every active sound in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#update\r\n * @protected\r\n * @fires Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.unlocked)\r\n {\r\n this.unlocked = false;\r\n this.locked = false;\r\n\r\n this.emit(Events.UNLOCKED, this);\r\n }\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n if (this.sounds[i].pendingRemove)\r\n {\r\n this.sounds.splice(i, 1);\r\n }\r\n }\r\n\r\n this.sounds.forEach(function (sound)\r\n {\r\n sound.update(time, delta);\r\n });\r\n },\r\n\r\n /**\r\n * Destroys all the sounds in the game and all associated events.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.destroy();\r\n });\r\n\r\n this.sounds.length = 0;\r\n this.sounds = null;\r\n\r\n this.game = null;\r\n },\r\n\r\n /**\r\n * Method used internally for iterating only over active sounds and skipping sounds that are marked for removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#forEachActiveSound\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.EachActiveSoundCallback} callback - Callback function. (manager: Phaser.Sound.BaseSoundManager, sound: Phaser.Sound.BaseSound, index: number, sounds: Phaser.Manager.BaseSound[]) => void\r\n * @param {*} [scope] - Callback context.\r\n */\r\n forEachActiveSound: function (callback, scope)\r\n {\r\n var _this = this;\r\n\r\n this.sounds.forEach(function (sound, index)\r\n {\r\n if (!sound.pendingRemove)\r\n {\r\n callback.call(scope || _this, sound, index, _this.sounds);\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Sets the global playback rate at which all the sounds will be played.\r\n *\r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setRate\r\n * @fires Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - Global playback rate at which all the sounds will be played.\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global playback rate at which all the sounds will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audio\'s playback speed.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#rate\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this._rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rate = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setDetune\r\n * @fires Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#detune\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this._detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._detune = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_DETUNE, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSoundManager.js?')},"./node_modules/phaser/src/sound/SoundManagerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HTML5AudioSoundManager = __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js");\r\nvar NoAudioSoundManager = __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js");\r\nvar WebAudioSoundManager = __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js");\r\n\r\n/**\r\n * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.\r\n *\r\n * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes\r\n *\r\n * @function Phaser.Sound.SoundManagerCreator\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar SoundManagerCreator = {\r\n\r\n create: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n return new NoAudioSoundManager(game);\r\n }\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new WebAudioSoundManager(game);\r\n }\r\n\r\n return new HTML5AudioSoundManager(game);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SoundManagerCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/SoundManagerCreator.js?')},"./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Complete Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they complete playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('complete', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded All Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method,\r\n * once all files passed to the method have been decoded (or errored).\r\n * \r\n * Use `Phaser.Sound.Events#DECODED` to listen for single sounds being decoded, and `DECODED_ALL` to\r\n * listen for them all completing.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decodedall', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.once('decodedall', handler);\r\n * this.sound.decodeAudio([ audioFiles ]);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n */\r\nmodule.exports = 'decodedall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decoded', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.on('decoded', handler);\r\n * this.sound.decodeAudio(key, audioData);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED\r\n * @since 3.18.0\r\n * \r\n * @param {string} key - The key of the audio file that was decoded and added to the audio cache.\r\n */\r\nmodule.exports = 'decoded';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_EVENT.js?")},"./node_modules/phaser/src/sound/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Destroy Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are destroyed, either\r\n * directly or via a Sound Manager.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('destroy', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('destroy', listener);\r\n * music.destroy();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/sound/events/DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Detune Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their detune value changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('detune', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('detune', listener);\r\n * music.play();\r\n * music.setDetune(200);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Detune Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `detune` property of the Sound Manager is changed, which globally\r\n * adjusts the detuning of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} detune - The updated detune value.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Mute Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `mute` property is changed, either directly\r\n * or via the `setMute` method. This changes the mute state of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('mute', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound Manager is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Rate Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `rate` property of the Sound Manager is changed, which globally\r\n * adjusts the playback rate of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} rate - The updated rate value.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Volume Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `volume` property is changed, either directly\r\n * or via the `setVolume` method. This changes the volume of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('volume', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} volume - The new global volume of the Sound Manager.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOPED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Looped Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('looped', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('looped', listener);\r\n * music.setLoop(true);\r\n * music.play();\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOP]{@linkcode Phaser.Sound.Events#event:LOOP} event, which only emits when the loop state of a Sound is changed.\r\n *\r\n * @event Phaser.Sound.Events#LOOPED\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'looped';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOPED_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Loop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their loop state is changed.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('loop', listener);\r\n * music.setLoop(true);\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOPED]{@linkcode Phaser.Sound.Events#event:LOOPED} event, which emits each time a Sound loops during playback.\r\n *\r\n * @event Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} loop - The new loop value. `true` if the Sound will loop, otherwise `false`.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Mute Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their mute state changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('mute', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('mute', listener);\r\n * music.play();\r\n * music.setMute(true);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `pauseAll` method is invoked and after all current Sounds\r\n * have been paused.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('pauseall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Pause Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are paused.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('pause', listener);\r\n * music.play();\r\n * music.pause();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PLAY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Play Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are played.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('play', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('play', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'play';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PLAY_EVENT.js?")},"./node_modules/phaser/src/sound/events/RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Rate Change Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their rate changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('rate', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('rate', listener);\r\n * music.play();\r\n * music.setRate(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} rate - The new rate of the Sound.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `resumeAll` method is invoked and after all current Sounds\r\n * have been resumed.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('resumeall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Resume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are resumed from a paused state.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('resume', listener);\r\n * music.play();\r\n * music.pause();\r\n * music.resume();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/SEEK_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Seek Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are seeked to a new position.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('seek', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('seek', listener);\r\n * music.play();\r\n * music.setSeek(5000);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'seek';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/SEEK_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Stop All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `stopAll` method is invoked and after all current Sounds\r\n * have been stopped.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('stopall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'stopall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Stop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are stopped.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('stop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('stop', listener);\r\n * music.play();\r\n * music.stop();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'stop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Unlocked Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched during the update loop when the Sound Manager becomes unlocked. For\r\n * Web Audio this is on the first user gesture on the page.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js?")},"./node_modules/phaser/src/sound/events/VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Volume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their volume changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('volume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('volume', listener);\r\n * music.play();\r\n * music.setVolume(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} volume - The new volume of the Sound.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js"),\r\n DECODED: __webpack_require__(/*! ./DECODED_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_EVENT.js"),\r\n DECODED_ALL: __webpack_require__(/*! ./DECODED_ALL_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/sound/events/DESTROY_EVENT.js"),\r\n DETUNE: __webpack_require__(/*! ./DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/DETUNE_EVENT.js"),\r\n GLOBAL_DETUNE: __webpack_require__(/*! ./GLOBAL_DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js"),\r\n GLOBAL_MUTE: __webpack_require__(/*! ./GLOBAL_MUTE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js"),\r\n GLOBAL_RATE: __webpack_require__(/*! ./GLOBAL_RATE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js"),\r\n GLOBAL_VOLUME: __webpack_require__(/*! ./GLOBAL_VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js"),\r\n LOOP: __webpack_require__(/*! ./LOOP_EVENT */ "./node_modules/phaser/src/sound/events/LOOP_EVENT.js"),\r\n LOOPED: __webpack_require__(/*! ./LOOPED_EVENT */ "./node_modules/phaser/src/sound/events/LOOPED_EVENT.js"),\r\n MUTE: __webpack_require__(/*! ./MUTE_EVENT */ "./node_modules/phaser/src/sound/events/MUTE_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_EVENT.js"),\r\n PLAY: __webpack_require__(/*! ./PLAY_EVENT */ "./node_modules/phaser/src/sound/events/PLAY_EVENT.js"),\r\n RATE: __webpack_require__(/*! ./RATE_EVENT */ "./node_modules/phaser/src/sound/events/RATE_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_EVENT.js"),\r\n SEEK: __webpack_require__(/*! ./SEEK_EVENT */ "./node_modules/phaser/src/sound/events/SEEK_EVENT.js"),\r\n STOP_ALL: __webpack_require__(/*! ./STOP_ALL_EVENT */ "./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js"),\r\n STOP: __webpack_require__(/*! ./STOP_EVENT */ "./node_modules/phaser/src/sound/events/STOP_EVENT.js"),\r\n UNLOCKED: __webpack_require__(/*! ./UNLOCKED_EVENT */ "./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js"),\r\n VOLUME: __webpack_require__(/*! ./VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/VOLUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/index.js?')},"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * HTML5 Audio implementation of the sound.\r\n *\r\n * @class HTML5AudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar HTML5AudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * An array containing all HTML5 Audio tags that could be used for individual\r\n * sound's playback. Number of instances depends on the config value passed\r\n * to the Loader#audio method call, default is 1.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#tags\r\n * @type {HTMLAudioElement[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.tags = manager.game.cache.audio.get(key);\r\n\r\n if (!this.tags)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * Reference to an HTML5 Audio tag used for playing sound.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#audio\r\n * @type {HTMLAudioElement}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.audio = null;\r\n\r\n /**\r\n * Timestamp as generated by the Request Animation Frame or SetTimeout\r\n * representing the time at which the delayed sound playback should start.\r\n * Set to 0 if sound playback is not delayed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * Audio tag's playback position recorded on previous\r\n * update method call. Set to 0 if sound is not playing.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#previousTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.previousTime = 0;\r\n\r\n this.duration = this.tags[0].duration;\r\n\r\n this.totalDuration = this.tags[0].duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (this.manager.isLocked(this, 'play', [ markerName, config ]))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.isLocked(this, 'pause'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.isLocked(this, 'resume'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (this.manager.isLocked(this, 'stop'))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAndPlayAudioTag: function ()\r\n {\r\n if (!this.pickAudioTag())\r\n {\r\n this.reset();\r\n return false;\r\n }\r\n\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n\r\n this.previousTime = offset;\r\n this.audio.currentTime = offset;\r\n this.applyConfig();\r\n\r\n if (delay === 0)\r\n {\r\n this.startTime = 0;\r\n\r\n if (this.audio.paused)\r\n {\r\n this.playCatchPromise();\r\n }\r\n }\r\n else\r\n {\r\n this.startTime = window.performance.now() + delay * 1000;\r\n\r\n if (!this.audio.paused)\r\n {\r\n this.audio.pause();\r\n }\r\n }\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * This method performs the audio tag pooling logic. It first looks for\r\n * unused audio tag to assign to this sound object. If there are no unused\r\n * audio tags, based on HTML5AudioSoundManager#override property value, it\r\n * looks for sound with most advanced playback and hijacks its audio tag or\r\n * does nothing.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAudioTag: function ()\r\n {\r\n if (this.audio)\r\n {\r\n return true;\r\n }\r\n\r\n for (var i = 0; i < this.tags.length; i++)\r\n {\r\n var audio = this.tags[i];\r\n\r\n if (audio.dataset.used === 'false')\r\n {\r\n audio.dataset.used = 'true';\r\n this.audio = audio;\r\n return true;\r\n }\r\n }\r\n\r\n if (!this.manager.override)\r\n {\r\n return false;\r\n }\r\n\r\n var otherSounds = [];\r\n\r\n this.manager.forEachActiveSound(function (sound)\r\n {\r\n if (sound.key === this.key && sound.audio)\r\n {\r\n otherSounds.push(sound);\r\n }\r\n }, this);\r\n\r\n otherSounds.sort(function (a1, a2)\r\n {\r\n if (a1.loop === a2.loop)\r\n {\r\n // sort by progress\r\n return (a2.seek / a2.duration) - (a1.seek / a1.duration);\r\n }\r\n return a1.loop ? 1 : -1;\r\n });\r\n\r\n var selectedSound = otherSounds[0];\r\n\r\n this.audio = selectedSound.audio;\r\n\r\n selectedSound.reset();\r\n selectedSound.audio = null;\r\n selectedSound.startTime = 0;\r\n selectedSound.previousTime = 0;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used for playing audio tag and catching possible exceptions\r\n * thrown from rejected Promise returned from play method call.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#playCatchPromise\r\n * @private\r\n * @since 3.0.0\r\n */\r\n playCatchPromise: function ()\r\n {\r\n var playPromise = this.audio.play();\r\n\r\n if (playPromise)\r\n {\r\n // eslint-disable-next-line no-unused-vars\r\n playPromise.catch(function (reason)\r\n {\r\n console.warn(reason);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stopAndReleaseAudioTag\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndReleaseAudioTag: function ()\r\n {\r\n this.audio.pause();\r\n this.audio.dataset.used = 'false';\r\n this.audio = null;\r\n this.startTime = 0;\r\n this.previousTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally to reset sound state, usually when stopping sound\r\n * or when hijacking audio tag from another sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#reset\r\n * @private\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n BaseSound.prototype.stop.call(this);\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for pausing sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.currentConfig.delay = Math.max(0, (this.startTime - window.performance.now()) / 1000);\r\n\r\n this.stopAndReleaseAudioTag();\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for resuming sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#onFocus\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n this.pickAndPlayAudioTag();\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (!this.isPlaying)\r\n {\r\n return;\r\n }\r\n\r\n // handling delayed playback\r\n if (this.startTime > 0)\r\n {\r\n if (this.startTime < time - this.manager.audioPlayDelay)\r\n {\r\n this.audio.currentTime += Math.max(0, time - this.startTime) / 1000;\r\n this.startTime = 0;\r\n this.previousTime = this.audio.currentTime;\r\n this.playCatchPromise();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // handle looping and ending\r\n var startTime = this.currentMarker ? this.currentMarker.start : 0;\r\n var endTime = startTime + this.duration;\r\n var currentTime = this.audio.currentTime;\r\n\r\n if (this.currentConfig.loop)\r\n {\r\n if (currentTime >= endTime - this.manager.loopEndOffset)\r\n {\r\n this.audio.currentTime = startTime + Math.max(0, currentTime - endTime);\r\n currentTime = this.audio.currentTime;\r\n }\r\n else if (currentTime < startTime)\r\n {\r\n this.audio.currentTime += startTime;\r\n currentTime = this.audio.currentTime;\r\n }\r\n\r\n if (currentTime < this.previousTime)\r\n {\r\n this.emit(Events.LOOPED, this);\r\n }\r\n }\r\n else if (currentTime >= endTime)\r\n {\r\n this.reset();\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n\r\n return;\r\n }\r\n\r\n this.previousTime = currentTime;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.tags = null;\r\n\r\n if (this.audio)\r\n {\r\n this.stopAndReleaseAudioTag();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to determine mute setting of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateMute\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateMute: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.muted = this.currentConfig.mute || this.manager.mute;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total volume of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateVolume\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateVolume: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.volume = this.currentConfig.volume * this.manager.volume;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n if (this.audio)\r\n {\r\n this.audio.playbackRate = this.totalRate;\r\n }\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n\r\n if (this.manager.isLocked(this, 'mute', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateMute();\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n\r\n if (this.manager.isLocked(this, 'volume', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateVolume();\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n if (this.manager.isLocked(this, Events.RATE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n if (this.manager.isLocked(this, Events.DETUNE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n return this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.isLocked(this, 'seek', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n if (this.isPlaying)\r\n {\r\n this.previousTime = value;\r\n this.audio.currentTime = value;\r\n }\r\n else if (this.isPaused)\r\n {\r\n this.currentConfig.seek = value;\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.manager.isLocked(this, 'loop', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.audio)\r\n {\r\n this.audio.loop = value;\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSound.js?")},"./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar HTML5AudioSound = __webpack_require__(/*! ./HTML5AudioSound */ \"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js\");\r\n\r\n/**\r\n * HTML5 Audio implementation of the Sound Manager.\r\n *\r\n * @class HTML5AudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar HTML5AudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSoundManager (game)\r\n {\r\n /**\r\n * Flag indicating whether if there are no idle instances of HTML5 Audio tag,\r\n * for any particular sound, if one of the used tags should be hijacked and used\r\n * for succeeding playback or if succeeding Phaser.Sound.HTML5AudioSound#play\r\n * call should be ignored.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#override\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.override = true;\r\n\r\n /**\r\n * Value representing time difference, in seconds, between calling\r\n * play method on an audio tag and when it actually starts playing.\r\n * It is used to achieve more accurate delayed sound playback.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since audio play delay varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#audioPlayDelay\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.audioPlayDelay = 0.1;\r\n\r\n /**\r\n * A value by which we should offset the loop end marker of the\r\n * looping sound to compensate for lag, caused by changing audio\r\n * tag playback position, in order to achieve gapless looping.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since loop lag varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#loopEndOffset\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.loopEndOffset = 0.05;\r\n\r\n /**\r\n * An array for keeping track of all the sounds\r\n * that were paused when game lost focus.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#onBlurPausedSounds\r\n * @type {Phaser.Sound.HTML5AudioSound[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.onBlurPausedSounds = [];\r\n\r\n this.locked = 'ontouchstart' in window;\r\n\r\n /**\r\n * A queue of all actions performed on sound objects while audio was locked.\r\n * Once the audio gets unlocked, after an explicit user interaction,\r\n * all actions will be performed in chronological order.\r\n * Array of object types: { sound: Phaser.Sound.HTML5AudioSound, name: string, value?: * }\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#lockedActionsQueue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.lockedActionsQueue = this.locked ? [] : null;\r\n\r\n /**\r\n * Property that actually holds the value of global mute\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_mute\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._mute = false;\r\n\r\n /**\r\n * Property that actually holds the value of global volume\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_volume\r\n * @type {boolean}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._volume = 1;\r\n\r\n BaseSoundManager.call(this, game);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new HTML5AudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Unlocks HTML5 Audio loading and playback on mobile\r\n * devices on the initial explicit user interaction.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n this.locked = false;\r\n\r\n var _this = this;\r\n\r\n this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n if (tags[i].dataset.locked === 'true')\r\n {\r\n _this.locked = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (!this.locked)\r\n {\r\n return;\r\n }\r\n\r\n var moved = false;\r\n\r\n var detectMove = function ()\r\n {\r\n moved = true;\r\n };\r\n\r\n var unlock = function ()\r\n {\r\n if (moved)\r\n {\r\n moved = false;\r\n return;\r\n }\r\n\r\n document.body.removeEventListener('touchmove', detectMove);\r\n document.body.removeEventListener('touchend', unlock);\r\n\r\n var lockedTags = [];\r\n\r\n _this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n var tag = tags[i];\r\n\r\n if (tag.dataset.locked === 'true')\r\n {\r\n lockedTags.push(tag);\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (lockedTags.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var lastTag = lockedTags[lockedTags.length - 1];\r\n\r\n lastTag.oncanplaythrough = function ()\r\n {\r\n lastTag.oncanplaythrough = null;\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.dataset.locked = 'false';\r\n });\r\n\r\n _this.unlocked = true;\r\n };\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.load();\r\n });\r\n };\r\n\r\n this.once(Events.UNLOCKED, function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.currentMarker === null && sound.duration === 0)\r\n {\r\n sound.duration = sound.tags[0].duration;\r\n }\r\n\r\n sound.totalDuration = sound.tags[0].duration;\r\n });\r\n\r\n while (this.lockedActionsQueue.length)\r\n {\r\n var lockedAction = this.lockedActionsQueue.shift();\r\n\r\n if (lockedAction.sound[lockedAction.prop].apply)\r\n {\r\n lockedAction.sound[lockedAction.prop].apply(lockedAction.sound, lockedAction.value || []);\r\n }\r\n else\r\n {\r\n lockedAction.sound[lockedAction.prop] = lockedAction.value;\r\n }\r\n }\r\n\r\n }, this);\r\n\r\n document.body.addEventListener('touchmove', detectMove, false);\r\n document.body.addEventListener('touchend', unlock, false);\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.isPlaying)\r\n {\r\n this.onBlurPausedSounds.push(sound);\r\n sound.onBlur();\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.onBlurPausedSounds.forEach(function (sound)\r\n {\r\n sound.onFocus();\r\n });\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n this.onBlurPausedSounds = null;\r\n },\r\n\r\n /**\r\n * Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters\r\n * to check if sound manager is locked and then either perform action immediately or queue it\r\n * to be performed once the sound manager gets unlocked.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#isLocked\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action.\r\n * @param {string} prop - Name of the method to be called or property to be assigned a value to.\r\n * @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.\r\n *\r\n * @return {boolean} Whether the sound manager is locked.\r\n */\r\n isLocked: function (sound, prop, value)\r\n {\r\n if (sound.tags[0].dataset.locked === 'true')\r\n {\r\n this.lockedActionsQueue.push({\r\n sound: sound,\r\n prop: prop,\r\n value: value\r\n });\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this._mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._mute = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateMute();\r\n });\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this._volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._volume = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateVolume();\r\n });\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js?")},"./node_modules/phaser/src/sound/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound\r\n */\r\n\r\nmodule.exports = {\r\n\r\n SoundManagerCreator: __webpack_require__(/*! ./SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js"),\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js"),\r\n\r\n BaseSound: __webpack_require__(/*! ./BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js"),\r\n BaseSoundManager: __webpack_require__(/*! ./BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js"),\r\n\r\n WebAudioSound: __webpack_require__(/*! ./webaudio/WebAudioSound */ "./node_modules/phaser/src/sound/webaudio/WebAudioSound.js"),\r\n WebAudioSoundManager: __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js"),\r\n\r\n HTML5AudioSound: __webpack_require__(/*! ./html5/HTML5AudioSound */ "./node_modules/phaser/src/sound/html5/HTML5AudioSound.js"),\r\n HTML5AudioSoundManager: __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js"),\r\n\r\n NoAudioSound: __webpack_require__(/*! ./noaudio/NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js"),\r\n NoAudioSoundManager: __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/index.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSound.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar NoAudioSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSound (manager, key, config)\r\n {\r\n if (config === void 0) { config = {}; }\r\n\r\n EventEmitter.call(this);\r\n\r\n this.manager = manager;\r\n this.key = key;\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.totalRate = 1;\r\n this.duration = 0;\r\n this.totalDuration = 0;\r\n\r\n this.config = Extend({\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }, config);\r\n\r\n this.currentConfig = this.config;\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.seek = 0;\r\n this.loop = false;\r\n this.markers = {};\r\n this.currentMarker = null;\r\n this.pendingRemove = false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n addMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n updateMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n removeMarker: function (markerName)\r\n {\r\n return null;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (markerName, config)\r\n {\r\n return false;\r\n },\r\n\r\n pause: function ()\r\n {\r\n return false;\r\n },\r\n\r\n resume: function ()\r\n {\r\n return false;\r\n },\r\n\r\n stop: function ()\r\n {\r\n return false;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.manager.remove(this);\r\n\r\n BaseSound.prototype.destroy.call(this);\r\n }\r\n});\r\n\r\nmodule.exports = NoAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSound.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar NoAudioSound = __webpack_require__(/*! ./NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound manager. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound manager logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar NoAudioSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n this.game = game;\r\n this.sounds = [];\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.pauseOnBlur = true;\r\n this.locked = false;\r\n },\r\n\r\n add: function (key, config)\r\n {\r\n var sound = new NoAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n addAudioSprite: function (key, config)\r\n {\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = {};\r\n\r\n return sound;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (key, extra)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n return false;\r\n },\r\n\r\n remove: function (sound)\r\n {\r\n return BaseSoundManager.prototype.remove.call(this, sound);\r\n },\r\n\r\n removeByKey: function (key)\r\n {\r\n return BaseSoundManager.prototype.removeByKey.call(this, key);\r\n },\r\n\r\n pauseAll: NOOP,\r\n resumeAll: NOOP,\r\n stopAll: NOOP,\r\n update: NOOP,\r\n setRate: NOOP,\r\n setDetune: NOOP,\r\n setMute: NOOP,\r\n setVolume: NOOP,\r\n\r\n forEachActiveSound: function (callbackfn, scope)\r\n {\r\n BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope);\r\n },\r\n\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = NoAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js?')},"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound.\r\n *\r\n * @class WebAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar WebAudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function WebAudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * Audio buffer containing decoded data of the audio asset to be played.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#audioBuffer\r\n * @type {AudioBuffer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.audioBuffer = manager.game.cache.audio.get(key);\r\n\r\n if (!this.audioBuffer)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * A reference to an audio source node used for playing back audio from\r\n * audio data stored in Phaser.Sound.WebAudioSound#audioBuffer.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#source\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.source = null;\r\n\r\n /**\r\n * A reference to a second audio source used for gapless looped playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopSource\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.loopSource = null;\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#muteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.muteNode = manager.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#volumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.volumeNode = manager.context.createGain();\r\n\r\n /**\r\n * The time at which the sound should have started playback from the beginning.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#playTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.playTime = 0;\r\n\r\n /**\r\n * The time at which the sound source should have actually started playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time at which the sound loop source should actually start playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopTime = 0;\r\n\r\n /**\r\n * An array where we keep track of all rate updates during playback.\r\n * Array of object types: { time: number, rate: number }\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rateUpdates\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.rateUpdates = [];\r\n\r\n /**\r\n * Used for keeping track when sound source playback has ended\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasEnded\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasEnded = false;\r\n\r\n /**\r\n * Used for keeping track when sound source has looped\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasLooped\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasLooped = false;\r\n\r\n this.muteNode.connect(this.volumeNode);\r\n\r\n this.volumeNode.connect(manager.destination);\r\n\r\n this.duration = this.audioBuffer.duration;\r\n\r\n this.totalDuration = this.audioBuffer.duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * \r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.getCurrentTime(); // Equivalent to setting paused time\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartBufferSource: function ()\r\n {\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var when = this.manager.context.currentTime + delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n var duration = this.duration - seek;\r\n\r\n this.playTime = when - seek;\r\n this.startTime = when;\r\n this.source = this.createBufferSource();\r\n\r\n this.applyConfig();\r\n\r\n this.source.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n\r\n this.resetConfig();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartLoopBufferSource: function ()\r\n {\r\n var when = this.getLoopTime();\r\n var offset = this.currentMarker ? this.currentMarker.start : 0;\r\n var duration = this.duration;\r\n\r\n this.loopTime = when;\r\n this.loopSource = this.createBufferSource();\r\n this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0);\r\n this.loopSource.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createBufferSource\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {AudioBufferSourceNode}\r\n */\r\n createBufferSource: function ()\r\n {\r\n var _this = this;\r\n var source = this.manager.context.createBufferSource();\r\n\r\n source.buffer = this.audioBuffer;\r\n\r\n source.connect(this.muteNode);\r\n\r\n source.onended = function (ev)\r\n {\r\n if (ev.target === _this.source)\r\n {\r\n // sound ended\r\n if (_this.currentConfig.loop)\r\n {\r\n _this.hasLooped = true;\r\n }\r\n else\r\n {\r\n _this.hasEnded = true;\r\n }\r\n }\r\n\r\n // else was stopped\r\n };\r\n\r\n return source;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveBufferSource: function ()\r\n {\r\n if (this.source)\r\n {\r\n this.source.stop();\r\n this.source.disconnect();\r\n this.source = null;\r\n }\r\n\r\n this.playTime = 0;\r\n this.startTime = 0;\r\n\r\n this.stopAndRemoveLoopBufferSource();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveLoopBufferSource: function ()\r\n {\r\n if (this.loopSource)\r\n {\r\n this.loopSource.stop();\r\n this.loopSource.disconnect();\r\n this.loopSource = null;\r\n }\r\n\r\n this.loopTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: 1\r\n });\r\n\r\n BaseSound.prototype.applyConfig.call(this);\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (this.hasEnded)\r\n {\r\n this.hasEnded = false;\r\n\r\n BaseSound.prototype.stop.call(this);\r\n\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n }\r\n else if (this.hasLooped)\r\n {\r\n this.hasLooped = false;\r\n this.source = this.loopSource;\r\n this.loopSource = null;\r\n this.playTime = this.startTime = this.loopTime;\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: this.totalRate\r\n });\r\n\r\n this.createAndStartLoopBufferSource();\r\n\r\n this.emit(Events.LOOPED, this);\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.audioBuffer = null;\r\n this.stopAndRemoveBufferSource();\r\n this.muteNode.disconnect();\r\n this.muteNode = null;\r\n this.volumeNode.disconnect();\r\n this.volumeNode = null;\r\n this.rateUpdates.length = 0;\r\n this.rateUpdates = null;\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n var now = this.manager.context.currentTime;\r\n\r\n if (this.source && typeof this.totalRate === 'number')\r\n {\r\n this.source.playbackRate.setValueAtTime(this.totalRate, now);\r\n }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.rateUpdates.push({\r\n time: Math.max(this.startTime, now) - this.playTime,\r\n rate: this.totalRate\r\n });\r\n\r\n if (this.loopSource)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for calculating current playback time of a playing sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getCurrentTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getCurrentTime: function ()\r\n {\r\n var currentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length; i++)\r\n {\r\n var nextTime = 0;\r\n\r\n if (i < this.rateUpdates.length - 1)\r\n {\r\n nextTime = this.rateUpdates[i + 1].time;\r\n }\r\n else\r\n {\r\n nextTime = this.manager.context.currentTime - this.playTime;\r\n }\r\n\r\n currentTime += (nextTime - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n return currentTime;\r\n },\r\n\r\n /**\r\n * Method used internally for calculating the time\r\n * at witch the loop source should start playing.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getLoopTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getLoopTime: function ()\r\n {\r\n var lastRateUpdateCurrentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length - 1; i++)\r\n {\r\n lastRateUpdateCurrentTime += (this.rateUpdates[i + 1].time - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n var lastRateUpdate = this.rateUpdates[this.rateUpdates.length - 1];\r\n\r\n return this.playTime + lastRateUpdate.time + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.WebAudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.muteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n this.muteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.WebAudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.volumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n this.volumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return this.startTime - this.playTime;\r\n }\r\n\r\n return this.getCurrentTime();\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n this.currentConfig.seek = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n\r\n if (value)\r\n {\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSound.js?")},"./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64ToArrayBuffer = __webpack_require__(/*! ../../utils/base64/Base64ToArrayBuffer */ \"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js\");\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar WebAudioSound = __webpack_require__(/*! ./WebAudioSound */ \"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound manager.\r\n *\r\n * @class WebAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar WebAudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function WebAudioSoundManager (game)\r\n {\r\n /**\r\n * The AudioContext being used for playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#context\r\n * @type {AudioContext}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.context = this.createAudioContext(game);\r\n\r\n /**\r\n * Gain node responsible for controlling global muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterMuteNode = this.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling global volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterVolumeNode = this.context.createGain();\r\n\r\n this.masterMuteNode.connect(this.masterVolumeNode);\r\n\r\n this.masterVolumeNode.connect(this.context.destination);\r\n\r\n /**\r\n * Destination node for connecting individual sounds to.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#destination\r\n * @type {AudioNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.destination = this.masterMuteNode;\r\n\r\n this.locked = this.context.state === 'suspended' && ('ontouchstart' in window || 'onclick' in window);\r\n\r\n BaseSoundManager.call(this, game);\r\n\r\n if (this.locked)\r\n {\r\n this.unlock();\r\n }\r\n },\r\n\r\n /**\r\n * Method responsible for instantiating and returning AudioContext instance.\r\n * If an instance of an AudioContext class was provided through the game config,\r\n * that instance will be returned instead. This can come in handy if you are reloading\r\n * a Phaser game on a page that never properly refreshes (such as in an SPA project)\r\n * and you want to reuse already instantiated AudioContext.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#createAudioContext\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n *\r\n * @return {AudioContext} The AudioContext instance to be used for playback.\r\n */\r\n createAudioContext: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n\r\n if (audioConfig && audioConfig.context)\r\n {\r\n audioConfig.context.resume();\r\n\r\n return audioConfig.context;\r\n }\r\n\r\n return new AudioContext();\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new WebAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Decode audio data into a format ready for playback via Web Audio.\r\n * \r\n * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n * \r\n * The `audioKey` is the key that will be used to save the decoded audio to the audio cache.\r\n * \r\n * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig`\r\n * objects as the first and only argument.\r\n * \r\n * Decoding is an async process, so be sure to listen for the events to know when decoding has completed.\r\n * \r\n * Once the audio has decoded it can be added to the Sound Manager or played via its key.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#decodeAudio\r\n * @fires Phaser.Sound.Events#DECODED\r\n * @fires Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n *\r\n * @param {(Phaser.Types.Sound.DecodeAudioConfig[]|string)} [audioKey] - The string-based key to be used to reference the decoded audio in the audio cache, or an array of audio config objects.\r\n * @param {(ArrayBuffer|string)} [audioData] - The audio data, either a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n */\r\n decodeAudio: function (audioKey, audioData)\r\n {\r\n var audioFiles;\r\n\r\n if (!Array.isArray(audioKey))\r\n {\r\n audioFiles = [ { key: audioKey, data: audioData } ];\r\n }\r\n else\r\n {\r\n audioFiles = audioKey;\r\n }\r\n\r\n var cache = this.game.cache.audio;\r\n var remaining = audioFiles.length;\r\n\r\n for (var i = 0; i < audioFiles.length; i++)\r\n {\r\n var entry = audioFiles[i];\r\n\r\n var key = entry.key;\r\n var data = entry.data;\r\n\r\n if (typeof data === 'string')\r\n {\r\n data = Base64ToArrayBuffer(data);\r\n }\r\n\r\n var success = function (key, audioBuffer)\r\n {\r\n cache.add(key, audioBuffer);\r\n \r\n this.emit(Events.DECODED, key);\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n \r\n var failure = function (key, error)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + key + ' - ', error ? error.message : '');\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n\r\n this.context.decodeAudioData(data, success, failure);\r\n }\r\n },\r\n\r\n /**\r\n * Unlocks Web Audio API on the initial input event.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n var _this = this;\r\n\r\n var unlockHandler = function unlockHandler ()\r\n {\r\n if (_this.context)\r\n {\r\n _this.context.resume().then(function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n \r\n _this.unlocked = true;\r\n }, function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n });\r\n }\r\n };\r\n\r\n if (document.body)\r\n {\r\n document.body.addEventListener('touchstart', unlockHandler, false);\r\n document.body.addEventListener('touchend', unlockHandler, false);\r\n document.body.addEventListener('click', unlockHandler, false);\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.suspend();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.resume();\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.destination = null;\r\n this.masterVolumeNode.disconnect();\r\n this.masterVolumeNode = null;\r\n this.masterMuteNode.disconnect();\r\n this.masterMuteNode = null;\r\n\r\n if (this.game.config.audio && this.game.config.audio.context)\r\n {\r\n this.context.suspend();\r\n }\r\n else\r\n {\r\n var _this = this;\r\n\r\n this.context.close().then(function ()\r\n {\r\n\r\n _this.context = null;\r\n\r\n });\r\n }\r\n\r\n BaseSoundManager.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.masterMuteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.masterVolumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterVolumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js?")},"./node_modules/phaser/src/structs/List.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\n\r\n/**\r\n * @callback EachListCallback\r\n *\r\n * @param {I} item - The item which is currently being processed.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * List is a generic implementation of an ordered list which contains utility methods for retrieving, manipulating, and iterating items.\r\n *\r\n * @class List\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n *\r\n * @param {*} parent - The parent of this list.\r\n */\r\nvar List = new Class({\r\n\r\n initialize:\r\n\r\n function List (parent)\r\n {\r\n /**\r\n * The parent of this list.\r\n *\r\n * @name Phaser.Structs.List#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The objects that belong to this collection.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.List#list\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The index of the current element.\r\n * \r\n * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties.\r\n *\r\n * @name Phaser.Structs.List#position\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * A callback that is invoked every time a child is added to this list.\r\n *\r\n * @name Phaser.Structs.List#addCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.addCallback = NOOP;\r\n\r\n /**\r\n * A callback that is invoked every time a child is removed from this list.\r\n *\r\n * @name Phaser.Structs.List#removeCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.removeCallback = NOOP;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.Structs.List#_sortKey\r\n * @type {string}\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n },\r\n\r\n /**\r\n * Adds the given item to the end of the list. Each item must be unique.\r\n *\r\n * @method Phaser.Structs.List#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*|Array.<*>} child - The item, or array of items, to add to the list.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The list's underlying array.\r\n */\r\n add: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Add(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Add(this.list, child, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an item to list, starting at a specified index. Each item must be unique within the list.\r\n *\r\n * @method Phaser.Structs.List#addAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to add to the list.\r\n * @param {integer} [index=0] - The index in the list at which the element(s) will be inserted.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The List's underlying array.\r\n */\r\n addAt: function (child, index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the item at a given position inside the List.\r\n *\r\n * @method Phaser.Structs.List#getAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The index of the item.\r\n *\r\n * @return {*} The retrieved item, or `undefined` if it's outside the List's bounds.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Locates an item within the List and returns its index.\r\n *\r\n * @method Phaser.Structs.List#getIndex\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to locate.\r\n *\r\n * @return {integer} The index of the item within the List, or -1 if it's not in the List.\r\n */\r\n getIndex: function (child)\r\n {\r\n // Return -1 if given child isn't a child of this display list\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this List so the items are in order based on the given property.\r\n * For example, `sort('alpha')` would sort the List contents based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.Structs.List#sort\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [children,$return]\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name`\r\n * property matching the given argument. Should more than one child have\r\n * the same name only the first is returned.\r\n *\r\n * @method Phaser.Structs.List#getByName\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?*} The first child with a matching name, or null if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random child from the group.\r\n *\r\n * @method Phaser.Structs.List#getRandom\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child).\r\n * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from.\r\n *\r\n * @return {?*} A random child of this Group.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Returns the first element in a given part of the List which matches a specific criterion.\r\n *\r\n * @method Phaser.Structs.List#getFirst\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} property - The name of the property to test or a falsey value to have no criterion.\r\n * @param {*} value - The value to test the `property` against, or `undefined` to allow any value and only check for existence.\r\n * @param {number} [startIndex=0] - The position in the List to start the search at.\r\n * @param {number} [endIndex] - The position in the List to optionally stop the search at. It won't be checked.\r\n *\r\n * @return {?*} The first item which matches the given criterion, or `null` if no such item exists.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all children in this List.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('parent')` would return only children that have a property called `parent`.\r\n *\r\n * You can also specify a value to compare the property to:\r\n * \r\n * `getAll('visible', true)` would return only children that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this List had 100 children,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 children in the List.\r\n *\r\n * @method Phaser.Structs.List#getAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - An optional property to test against the value argument.\r\n * @param {*} [value] - If property is set then Child.property must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n *\r\n * @return {Array.<*>} All items of the List which match the given criterion, if any.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of items in the List which have a property matching the given value.\r\n *\r\n * @method Phaser.Structs.List#count\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The property to test on each item.\r\n * @param {*} value - The value to test the property against.\r\n *\r\n * @return {integer} The total number of matching elements.\r\n */\r\n count: function (property, value)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value);\r\n },\r\n\r\n /**\r\n * Swaps the positions of two items in the list.\r\n *\r\n * @method Phaser.Structs.List#swap\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {*} child1 - The first item to swap.\r\n * @param {*} child2 - The second item to swap.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n },\r\n\r\n /**\r\n * Moves an item in the List to a new position.\r\n *\r\n * @method Phaser.Structs.List#moveTo\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move.\r\n * @param {integer} index - Moves an item in the List to a new position.\r\n *\r\n * @return {*} The item that was moved.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n return ArrayUtils.MoveTo(this.list, child, index);\r\n },\r\n\r\n /**\r\n * Removes one or many items from the List.\r\n *\r\n * @method Phaser.Structs.List#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to remove.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item, or array of items, which were successfully removed from the List.\r\n */\r\n remove: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Remove(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Remove(this.list, child, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the item at the given position in the List.\r\n *\r\n * @method Phaser.Structs.List#removeAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The position to remove the item from.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\n removeAt: function (index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the items within the given range in the List.\r\n *\r\n * @method Phaser.Structs.List#removeBetween\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - The index to start removing from.\r\n * @param {integer} [endIndex] - The position to stop removing at. The item at this position won't be removed.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Array.<*>} An array of the items which were removed.\r\n */\r\n removeBetween: function (startIndex, endIndex, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes all the items.\r\n *\r\n * @method Phaser.Structs.List#removeAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n * \r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n removeAll: function (skipCallback)\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this.list[i], skipCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given child to the top of this List.\r\n *\r\n * @method Phaser.Structs.List#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to bring to the top of the List.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n bringToTop: function (child)\r\n {\r\n return ArrayUtils.BringToTop(this.list, child);\r\n },\r\n\r\n /**\r\n * Sends the given child to the bottom of this List.\r\n *\r\n * @method Phaser.Structs.List#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to send to the back of the list.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n sendToBack: function (child)\r\n {\r\n return ArrayUtils.SendToBack(this.list, child);\r\n },\r\n\r\n /**\r\n * Moves the given child up one place in this group unless it's already at the top.\r\n *\r\n * @method Phaser.Structs.List#moveUp\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move up.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Moves the given child down one place in this group unless it's already at the bottom.\r\n *\r\n * @method Phaser.Structs.List#moveDown\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move down.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Reverses the order of all children in this List.\r\n *\r\n * @method Phaser.Structs.List#reverse\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the items in the list.\r\n *\r\n * @method Phaser.Structs.List#shuffle\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.\r\n *\r\n * @method Phaser.Structs.List#replace\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [oldChild,newChild,$return]\r\n *\r\n * @param {*} oldChild - The child in this List that will be replaced.\r\n * @param {*} newChild - The child to be inserted into this List.\r\n *\r\n * @return {*} Returns the oldChild that was replaced within this group.\r\n */\r\n replace: function (oldChild, newChild)\r\n {\r\n return ArrayUtils.Replace(this.list, oldChild, newChild);\r\n },\r\n\r\n /**\r\n * Checks if an item exists within the List.\r\n *\r\n * @method Phaser.Structs.List#exists\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to check for the existence of.\r\n *\r\n * @return {boolean} `true` if the item is found in the list, otherwise `false`.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property `key` to the given value on all members of this List.\r\n *\r\n * @method Phaser.Structs.List#setAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The name of the property to set.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all children to the given callback.\r\n *\r\n * @method Phaser.Structs.List#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachListCallback.} - [callback]\r\n *\r\n * @param {EachListCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the List and recreates its internal array.\r\n *\r\n * @method Phaser.Structs.List#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.list = [];\r\n },\r\n\r\n /**\r\n * Destroys this List.\r\n *\r\n * @method Phaser.Structs.List#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.parent = null;\r\n this.addCallback = null;\r\n this.removeCallback = null;\r\n },\r\n\r\n /**\r\n * The number of items inside the List.\r\n *\r\n * @name Phaser.Structs.List#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The first item in the List or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#first\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The last item in the List, or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#last\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The next item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List.\r\n *\r\n * @name Phaser.Structs.List#next\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The previous item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards.\r\n *\r\n * @name Phaser.Structs.List#previous\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = List;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/List.js?")},"./node_modules/phaser/src/structs/Map.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachMapCallback\r\n *\r\n * @param {string} key - The key of the Map entry.\r\n * @param {E} entry - The value of the Map entry.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The keys of a Map can be arbitrary values.\r\n * \r\n * ```javascript\r\n * var map = new Map([\r\n * [ 1, 'one' ],\r\n * [ 2, 'two' ],\r\n * [ 3, 'three' ]\r\n * ]);\r\n * ```\r\n *\r\n * @class Map\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic K\r\n * @generic V\r\n * @genericUse {V[]} - [elements]\r\n *\r\n * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with.\r\n */\r\nvar Map = new Class({\r\n\r\n initialize:\r\n\r\n function Map (elements)\r\n {\r\n /**\r\n * The entries in this Map.\r\n *\r\n * @genericUse {Object.} - [$type]\r\n *\r\n * @name Phaser.Structs.Map#entries\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.entries = {};\r\n\r\n /**\r\n * The number of key / value pairs in this Map.\r\n *\r\n * @name Phaser.Structs.Map#size\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.size = 0;\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i][0], elements[i][1]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds an element with a specified `key` and `value` to this Map.\r\n * If the `key` already exists, the value will be replaced.\r\n *\r\n * @method Phaser.Structs.Map#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [value]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to be added to this Map.\r\n * @param {*} value - The value of the element to be added to this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n set: function (key, value)\r\n {\r\n if (!this.has(key))\r\n {\r\n this.size++;\r\n }\r\n\r\n this.entries[key] = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the value associated to the `key`, or `undefined` if there is none.\r\n *\r\n * @method Phaser.Structs.Map#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [$return]\r\n *\r\n * @param {string} key - The key of the element to return from the `Map` object.\r\n *\r\n * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object.\r\n */\r\n get: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n return this.entries[key];\r\n }\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all the values stored in this Map.\r\n *\r\n * @method Phaser.Structs.Map#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array of the values stored in this Map.\r\n */\r\n getArray: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns a boolean indicating whether an element with the specified key exists or not.\r\n *\r\n * @method Phaser.Structs.Map#has\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n *\r\n * @param {string} key - The key of the element to test for presence of in this Map.\r\n *\r\n * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return (this.entries.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Delete the specified element from this Map.\r\n *\r\n * @method Phaser.Structs.Map#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to delete from this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n delete: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n delete this.entries[key];\r\n this.size--;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all entries from this Map.\r\n *\r\n * @method Phaser.Structs.Map#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n clear: function ()\r\n {\r\n Object.keys(this.entries).forEach(function (prop)\r\n {\r\n delete this.entries[prop];\r\n\r\n }, this);\r\n\r\n this.size = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all entries keys in this Map.\r\n *\r\n * @method Phaser.Structs.Map#keys\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K[]} - [$return]\r\n *\r\n * @return {string[]} Array containing entries' keys.\r\n */\r\n keys: function ()\r\n {\r\n return Object.keys(this.entries);\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all entries.\r\n *\r\n * @method Phaser.Structs.Map#values\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An `Array` of entries.\r\n */\r\n values: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Map to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Map#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n var entries = this.entries;\r\n\r\n // eslint-disable-next-line no-console\r\n console.group('Map');\r\n\r\n for (var key in entries)\r\n {\r\n console.log(key, entries[key]);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes all entries in this Map to the given callback.\r\n *\r\n * @method Phaser.Structs.Map#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachMapCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n each: function (callback)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (callback(key, entries[key]) === false)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the value exists within this Map. Otherwise, returns `false`.\r\n *\r\n * @method Phaser.Structs.Map#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V} - [value]\r\n *\r\n * @param {*} value - The value to search for.\r\n *\r\n * @return {boolean} `true` if the value is found, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (entries[key] === value)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Merges all new keys from the given Map into this one.\r\n * If it encounters a key that already exists it will be skipped unless override is set to `true`.\r\n *\r\n * @method Phaser.Structs.Map#merge\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [map,$return]\r\n *\r\n * @param {Phaser.Structs.Map} map - The Map to merge in to this Map.\r\n * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n merge: function (map, override)\r\n {\r\n if (override === undefined) { override = false; }\r\n\r\n var local = this.entries;\r\n var source = map.entries;\r\n\r\n for (var key in source)\r\n {\r\n if (local.hasOwnProperty(key) && override)\r\n {\r\n local[key] = source[key];\r\n }\r\n else\r\n {\r\n this.set(key, source[key]);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Map;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Map.js?")},"./node_modules/phaser/src/structs/ProcessQueue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Process Queue maintains three internal lists.\r\n * \r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * When new items are added to a Process Queue they are put in the pending list, rather than being added\r\n * immediately the active list. Equally, items that are removed are put into the destroy list, rather than\r\n * being destroyed immediately. This allows the Process Queue to carefully process each item at a specific, fixed\r\n * time, rather than at the time of the request from the API.\r\n *\r\n * @class ProcessQueue\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n */\r\nvar ProcessQueue = new Class({\r\n\r\n initialize:\r\n\r\n function ProcessQueue ()\r\n {\r\n /**\r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_pending\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_active\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_destroy\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The total number of items awaiting processing.\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Adds a new item to the Process Queue.\r\n * The item is added to the pending list and made active in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to add to the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n add: function (item)\r\n {\r\n this._pending.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an item from the Process Queue.\r\n * The item is added to the pending destroy and fully removed in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to be removed from the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n remove: function (item)\r\n {\r\n this._destroy.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Update this queue. First it will process any items awaiting destruction, and remove them.\r\n * \r\n * Then it will check to see if there are any items pending insertion, and move them to an\r\n * active state. Finally, it will return a list of active items for further processing.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#update\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n update: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return this._active;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var i;\r\n var item;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(item);\r\n\r\n if (idx !== -1)\r\n {\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the pending addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during an update\r\n\r\n list = this._pending;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n this._active.push(item);\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n\r\n // The owner of this queue can now safely do whatever it needs to with the active list\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Returns the current list of active items.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#getActive\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n getActive: function ()\r\n {\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Immediately destroys this process queue, clearing all of its internal arrays and resetting the process totals.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this._toProcess = 0;\r\n\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ProcessQueue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/ProcessQueue.js?")},"./node_modules/phaser/src/structs/RTree.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Vladimir Agafonkin\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar quickselect = __webpack_require__(/*! ../utils/array/QuickSelect */ \"./node_modules/phaser/src/utils/array/QuickSelect.js\");\r\n\r\n/**\r\n * @classdesc\r\n * RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles.\r\n * It's based on an optimized R-tree data structure with bulk insertion support.\r\n *\r\n * Spatial index is a special data structure for points and rectangles that allows you to perform queries like\r\n * \"all items within this bounding box\" very efficiently (e.g. hundreds of times faster than looping over all items).\r\n *\r\n * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`.\r\n * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations.\r\n * \r\n * rbush is forked from https://github.com/mourner/rbush by Vladimir Agafonkin\r\n *\r\n * @class RTree\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\n\r\nfunction rbush (maxEntries)\r\n{\r\n var format = [ '.left', '.top', '.right', '.bottom' ];\r\n\r\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\r\n\r\n // max entries in a node is 9 by default; min node fill is 40% for best performance\r\n this._maxEntries = Math.max(4, maxEntries || 9);\r\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\r\n\r\n this.clear();\r\n}\r\n\r\nrbush.prototype = {\r\n\r\n all: function ()\r\n {\r\n return this._all(this.data, []);\r\n },\r\n\r\n search: function (bbox)\r\n {\r\n var node = this.data,\r\n result = [],\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return result;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf) result.push(child);\r\n else if (contains(bbox, childBBox)) this._all(child, result);\r\n else nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return result;\r\n },\r\n\r\n collides: function (bbox)\r\n {\r\n var node = this.data,\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return false;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf || contains(bbox, childBBox)) return true;\r\n nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return false;\r\n },\r\n\r\n load: function (data)\r\n {\r\n if (!(data && data.length)) return this;\r\n\r\n if (data.length < this._minEntries) {\r\n for (var i = 0, len = data.length; i < len; i++) {\r\n this.insert(data[i]);\r\n }\r\n return this;\r\n }\r\n\r\n // recursively build the tree with the given data from scratch using OMT algorithm\r\n var node = this._build(data.slice(), 0, data.length - 1, 0);\r\n\r\n if (!this.data.children.length) {\r\n // save as is if tree is empty\r\n this.data = node;\r\n\r\n } else if (this.data.height === node.height) {\r\n // split root if trees have the same height\r\n this._splitRoot(this.data, node);\r\n\r\n } else {\r\n if (this.data.height < node.height) {\r\n // swap trees if inserted one is bigger\r\n var tmpNode = this.data;\r\n this.data = node;\r\n node = tmpNode;\r\n }\r\n\r\n // insert the small tree into the large tree at appropriate level\r\n this._insert(node, this.data.height - node.height - 1, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n insert: function (item)\r\n {\r\n if (item) this._insert(item, this.data.height - 1);\r\n return this;\r\n },\r\n\r\n clear: function ()\r\n {\r\n this.data = createNode([]);\r\n return this;\r\n },\r\n\r\n remove: function (item, equalsFn)\r\n {\r\n if (!item) return this;\r\n\r\n var node = this.data,\r\n bbox = this.toBBox(item),\r\n path = [],\r\n indexes = [],\r\n i, parent, index, goingUp;\r\n\r\n // depth-first iterative tree traversal\r\n while (node || path.length) {\r\n\r\n if (!node) { // go up\r\n node = path.pop();\r\n parent = path[path.length - 1];\r\n i = indexes.pop();\r\n goingUp = true;\r\n }\r\n\r\n if (node.leaf) { // check current node\r\n index = findItem(item, node.children, equalsFn);\r\n\r\n if (index !== -1) {\r\n // item found, remove the item and condense tree upwards\r\n node.children.splice(index, 1);\r\n path.push(node);\r\n this._condense(path);\r\n return this;\r\n }\r\n }\r\n\r\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\r\n path.push(node);\r\n indexes.push(i);\r\n i = 0;\r\n parent = node;\r\n node = node.children[0];\r\n\r\n } else if (parent) { // go right\r\n i++;\r\n node = parent.children[i];\r\n goingUp = false;\r\n\r\n } else node = null; // nothing found\r\n }\r\n\r\n return this;\r\n },\r\n\r\n toBBox: function (item) { return item; },\r\n\r\n compareMinX: compareNodeMinX,\r\n compareMinY: compareNodeMinY,\r\n\r\n toJSON: function () { return this.data; },\r\n\r\n fromJSON: function (data)\r\n {\r\n this.data = data;\r\n return this;\r\n },\r\n\r\n _all: function (node, result)\r\n {\r\n var nodesToSearch = [];\r\n while (node) {\r\n if (node.leaf) result.push.apply(result, node.children);\r\n else nodesToSearch.push.apply(nodesToSearch, node.children);\r\n\r\n node = nodesToSearch.pop();\r\n }\r\n return result;\r\n },\r\n\r\n _build: function (items, left, right, height)\r\n {\r\n var N = right - left + 1,\r\n M = this._maxEntries,\r\n node;\r\n\r\n if (N <= M) {\r\n // reached leaf level; return leaf\r\n node = createNode(items.slice(left, right + 1));\r\n calcBBox(node, this.toBBox);\r\n return node;\r\n }\r\n\r\n if (!height) {\r\n // target height of the bulk-loaded tree\r\n height = Math.ceil(Math.log(N) / Math.log(M));\r\n\r\n // target number of root entries to maximize storage utilization\r\n M = Math.ceil(N / Math.pow(M, height - 1));\r\n }\r\n\r\n node = createNode([]);\r\n node.leaf = false;\r\n node.height = height;\r\n\r\n // split the items into M mostly square tiles\r\n\r\n var N2 = Math.ceil(N / M),\r\n N1 = N2 * Math.ceil(Math.sqrt(M)),\r\n i, j, right2, right3;\r\n\r\n multiSelect(items, left, right, N1, this.compareMinX);\r\n\r\n for (i = left; i <= right; i += N1) {\r\n\r\n right2 = Math.min(i + N1 - 1, right);\r\n\r\n multiSelect(items, i, right2, N2, this.compareMinY);\r\n\r\n for (j = i; j <= right2; j += N2) {\r\n\r\n right3 = Math.min(j + N2 - 1, right2);\r\n\r\n // pack each entry recursively\r\n node.children.push(this._build(items, j, right3, height - 1));\r\n }\r\n }\r\n\r\n calcBBox(node, this.toBBox);\r\n\r\n return node;\r\n },\r\n\r\n _chooseSubtree: function (bbox, node, level, path)\r\n {\r\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\r\n\r\n while (true) {\r\n path.push(node);\r\n\r\n if (node.leaf || path.length - 1 === level) break;\r\n\r\n minArea = minEnlargement = Infinity;\r\n\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n child = node.children[i];\r\n area = bboxArea(child);\r\n enlargement = enlargedArea(bbox, child) - area;\r\n\r\n // choose entry with the least area enlargement\r\n if (enlargement < minEnlargement) {\r\n minEnlargement = enlargement;\r\n minArea = area < minArea ? area : minArea;\r\n targetNode = child;\r\n\r\n } else if (enlargement === minEnlargement) {\r\n // otherwise choose one with the smallest area\r\n if (area < minArea) {\r\n minArea = area;\r\n targetNode = child;\r\n }\r\n }\r\n }\r\n\r\n node = targetNode || node.children[0];\r\n }\r\n\r\n return node;\r\n },\r\n\r\n _insert: function (item, level, isNode)\r\n {\r\n var toBBox = this.toBBox,\r\n bbox = isNode ? item : toBBox(item),\r\n insertPath = [];\r\n\r\n // find the best node for accommodating the item, saving all nodes along the path too\r\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\r\n\r\n // put the item into the node\r\n node.children.push(item);\r\n extend(node, bbox);\r\n\r\n // split on node overflow; propagate upwards if necessary\r\n while (level >= 0) {\r\n if (insertPath[level].children.length > this._maxEntries) {\r\n this._split(insertPath, level);\r\n level--;\r\n } else break;\r\n }\r\n\r\n // adjust bboxes along the insertion path\r\n this._adjustParentBBoxes(bbox, insertPath, level);\r\n },\r\n\r\n // split overflowed node into two\r\n _split: function (insertPath, level)\r\n {\r\n var node = insertPath[level],\r\n M = node.children.length,\r\n m = this._minEntries;\r\n\r\n this._chooseSplitAxis(node, m, M);\r\n\r\n var splitIndex = this._chooseSplitIndex(node, m, M);\r\n\r\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\r\n newNode.height = node.height;\r\n newNode.leaf = node.leaf;\r\n\r\n calcBBox(node, this.toBBox);\r\n calcBBox(newNode, this.toBBox);\r\n\r\n if (level) insertPath[level - 1].children.push(newNode);\r\n else this._splitRoot(node, newNode);\r\n },\r\n\r\n _splitRoot: function (node, newNode)\r\n {\r\n // split root node\r\n this.data = createNode([node, newNode]);\r\n this.data.height = node.height + 1;\r\n this.data.leaf = false;\r\n calcBBox(this.data, this.toBBox);\r\n },\r\n\r\n _chooseSplitIndex: function (node, m, M)\r\n {\r\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\r\n\r\n minOverlap = minArea = Infinity;\r\n\r\n for (i = m; i <= M - m; i++) {\r\n bbox1 = distBBox(node, 0, i, this.toBBox);\r\n bbox2 = distBBox(node, i, M, this.toBBox);\r\n\r\n overlap = intersectionArea(bbox1, bbox2);\r\n area = bboxArea(bbox1) + bboxArea(bbox2);\r\n\r\n // choose distribution with minimum overlap\r\n if (overlap < minOverlap) {\r\n minOverlap = overlap;\r\n index = i;\r\n\r\n minArea = area < minArea ? area : minArea;\r\n\r\n } else if (overlap === minOverlap) {\r\n // otherwise choose distribution with minimum area\r\n if (area < minArea) {\r\n minArea = area;\r\n index = i;\r\n }\r\n }\r\n }\r\n\r\n return index;\r\n },\r\n\r\n // sorts node children by the best axis for split\r\n _chooseSplitAxis: function (node, m, M)\r\n {\r\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\r\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\r\n xMargin = this._allDistMargin(node, m, M, compareMinX),\r\n yMargin = this._allDistMargin(node, m, M, compareMinY);\r\n\r\n // if total distributions margin value is minimal for x, sort by minX,\r\n // otherwise it's already sorted by minY\r\n if (xMargin < yMargin) node.children.sort(compareMinX);\r\n },\r\n\r\n // total margin of all possible split distributions where each node is at least m full\r\n _allDistMargin: function (node, m, M, compare)\r\n {\r\n node.children.sort(compare);\r\n\r\n var toBBox = this.toBBox,\r\n leftBBox = distBBox(node, 0, m, toBBox),\r\n rightBBox = distBBox(node, M - m, M, toBBox),\r\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\r\n i, child;\r\n\r\n for (i = m; i < M - m; i++) {\r\n child = node.children[i];\r\n extend(leftBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(leftBBox);\r\n }\r\n\r\n for (i = M - m - 1; i >= m; i--) {\r\n child = node.children[i];\r\n extend(rightBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(rightBBox);\r\n }\r\n\r\n return margin;\r\n },\r\n\r\n _adjustParentBBoxes: function (bbox, path, level)\r\n {\r\n // adjust bboxes along the given tree path\r\n for (var i = level; i >= 0; i--) {\r\n extend(path[i], bbox);\r\n }\r\n },\r\n\r\n _condense: function (path)\r\n {\r\n // go through the path, removing empty nodes and updating bboxes\r\n for (var i = path.length - 1, siblings; i >= 0; i--) {\r\n if (path[i].children.length === 0) {\r\n if (i > 0) {\r\n siblings = path[i - 1].children;\r\n siblings.splice(siblings.indexOf(path[i]), 1);\r\n\r\n } else this.clear();\r\n\r\n } else calcBBox(path[i], this.toBBox);\r\n }\r\n },\r\n\r\n compareMinX: function (a, b)\r\n {\r\n return a.left - b.left;\r\n },\r\n\r\n compareMinY: function (a, b)\r\n {\r\n return a.top - b.top;\r\n },\r\n\r\n toBBox: function (a)\r\n {\r\n return {\r\n minX: a.left,\r\n minY: a.top,\r\n maxX: a.right,\r\n maxY: a.bottom\r\n };\r\n }\r\n};\r\n\r\nfunction findItem (item, items, equalsFn)\r\n{\r\n if (!equalsFn) return items.indexOf(item);\r\n\r\n for (var i = 0; i < items.length; i++) {\r\n if (equalsFn(item, items[i])) return i;\r\n }\r\n return -1;\r\n}\r\n\r\n// calculate node's bbox from bboxes of its children\r\nfunction calcBBox (node, toBBox)\r\n{\r\n distBBox(node, 0, node.children.length, toBBox, node);\r\n}\r\n\r\n// min bounding rectangle of node children from k to p-1\r\nfunction distBBox (node, k, p, toBBox, destNode)\r\n{\r\n if (!destNode) destNode = createNode(null);\r\n destNode.minX = Infinity;\r\n destNode.minY = Infinity;\r\n destNode.maxX = -Infinity;\r\n destNode.maxY = -Infinity;\r\n\r\n for (var i = k, child; i < p; i++) {\r\n child = node.children[i];\r\n extend(destNode, node.leaf ? toBBox(child) : child);\r\n }\r\n\r\n return destNode;\r\n}\r\n\r\nfunction extend (a, b)\r\n{\r\n a.minX = Math.min(a.minX, b.minX);\r\n a.minY = Math.min(a.minY, b.minY);\r\n a.maxX = Math.max(a.maxX, b.maxX);\r\n a.maxY = Math.max(a.maxY, b.maxY);\r\n return a;\r\n}\r\n\r\nfunction compareNodeMinX (a, b) { return a.minX - b.minX; }\r\nfunction compareNodeMinY (a, b) { return a.minY - b.minY; }\r\n\r\nfunction bboxArea (a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\r\nfunction bboxMargin (a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\r\n\r\nfunction enlargedArea (a, b)\r\n{\r\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\r\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\r\n}\r\n\r\nfunction intersectionArea (a, b)\r\n{\r\n var minX = Math.max(a.minX, b.minX),\r\n minY = Math.max(a.minY, b.minY),\r\n maxX = Math.min(a.maxX, b.maxX),\r\n maxY = Math.min(a.maxY, b.maxY);\r\n\r\n return Math.max(0, maxX - minX) *\r\n Math.max(0, maxY - minY);\r\n}\r\n\r\nfunction contains (a, b)\r\n{\r\n return a.minX <= b.minX &&\r\n a.minY <= b.minY &&\r\n b.maxX <= a.maxX &&\r\n b.maxY <= a.maxY;\r\n}\r\n\r\nfunction intersects (a, b)\r\n{\r\n return b.minX <= a.maxX &&\r\n b.minY <= a.maxY &&\r\n b.maxX >= a.minX &&\r\n b.maxY >= a.minY;\r\n}\r\n\r\nfunction createNode (children)\r\n{\r\n return {\r\n children: children,\r\n height: 1,\r\n leaf: true,\r\n minX: Infinity,\r\n minY: Infinity,\r\n maxX: -Infinity,\r\n maxY: -Infinity\r\n };\r\n}\r\n\r\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\r\n// combines selection algorithm with binary divide & conquer approach\r\n\r\nfunction multiSelect (arr, left, right, n, compare)\r\n{\r\n var stack = [left, right],\r\n mid;\r\n\r\n while (stack.length)\r\n {\r\n right = stack.pop();\r\n left = stack.pop();\r\n\r\n if (right - left <= n) continue;\r\n\r\n mid = left + Math.ceil((right - left) / n / 2) * n;\r\n quickselect(arr, mid, left, right, compare);\r\n\r\n stack.push(left, mid, mid, right);\r\n }\r\n}\r\n\r\nmodule.exports = rbush;\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/RTree.js?")},"./node_modules/phaser/src/structs/Set.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachSetCallback\r\n *\r\n * @param {E} entry - The Set entry.\r\n * @param {number} index - The index of the entry within the Set.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Set is a collection of unique elements.\r\n *\r\n * @class Set\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [elements]\r\n *\r\n * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set.\r\n */\r\nvar Set = new Class({\r\n\r\n initialize:\r\n\r\n function Set (elements)\r\n {\r\n /**\r\n * The entries of this Set. Stored internally as an array.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.Set#entries\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.entries = [];\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect.\r\n *\r\n * @method Phaser.Structs.Set#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to insert into this Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n set: function (value)\r\n {\r\n if (this.entries.indexOf(value) === -1)\r\n {\r\n this.entries.push(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value.\r\n * If no elements of this Set satisfy the condition then this method will return `null`.\r\n *\r\n * @method Phaser.Structs.Set#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value,$return]\r\n *\r\n * @param {string} property - The property name to check on the elements of this Set.\r\n * @param {*} value - The value to check for.\r\n *\r\n * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition.\r\n */\r\n get: function (property, value)\r\n {\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n if (entry[property] === value)\r\n {\r\n return entry;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array containing all the values in this Set.\r\n *\r\n * @method Phaser.Structs.Set#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array containing all the values in this Set.\r\n */\r\n getArray: function ()\r\n {\r\n return this.entries.slice(0);\r\n },\r\n\r\n /**\r\n * Removes the given value from this Set if this Set contains that value.\r\n *\r\n * @method Phaser.Structs.Set#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to remove from the Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n delete: function (value)\r\n {\r\n var index = this.entries.indexOf(value);\r\n\r\n if (index > -1)\r\n {\r\n this.entries.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Set to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Set#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.group('Set');\r\n\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n console.log(entry);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`.\r\n *\r\n * @method Phaser.Structs.Set#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n each: function (callback, callbackScope)\r\n {\r\n var i;\r\n var temp = this.entries.slice();\r\n var len = temp.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * For when you absolutely know this Set won't be modified during the iteration.\r\n *\r\n * @method Phaser.Structs.Set#iterate\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterate: function (callback, callbackScope)\r\n {\r\n var i;\r\n var len = this.entries.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Goes through each entry in this Set and invokes the given function on them, passing in the arguments.\r\n *\r\n * @method Phaser.Structs.Set#iterateLocal\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {string} callbackKey - The key of the function to be invoked on each Set entry.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterateLocal: function (callbackKey)\r\n {\r\n var i;\r\n var args = [];\r\n\r\n for (i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n var len = this.entries.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n entry[callbackKey].apply(entry, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears this Set so that it no longer contains any values.\r\n *\r\n * @method Phaser.Structs.Set#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n clear: function ()\r\n {\r\n this.entries.length = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if this Set contains the given value, otherwise returns `false`.\r\n *\r\n * @method Phaser.Structs.Set#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {*} value - The value to check for in this Set.\r\n *\r\n * @return {boolean} `true` if the given value was found in this Set, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n return (this.entries.indexOf(value) > -1);\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument.\r\n *\r\n * @method Phaser.Structs.Set#union\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the union with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument.\r\n */\r\n union: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n set.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set that contains only the values which are in this Set and that are also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#intersect\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to intersect this set with.\r\n *\r\n * @return {Phaser.Structs.Set} The result of the intersection, as a new Set.\r\n */\r\n intersect: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all the values in this Set which are *not* also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#difference\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the difference with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method.\r\n */\r\n difference: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (!set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * The size of this Set. This is the number of entries within it.\r\n * Changing the size will truncate the Set if the given value is smaller than the current size.\r\n * Increasing the size larger than the current size has no effect.\r\n *\r\n * @name Phaser.Structs.Set#size\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n size: {\r\n\r\n get: function ()\r\n {\r\n return this.entries.length;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value < this.entries.length)\r\n {\r\n return this.entries.length = value;\r\n }\r\n else\r\n {\r\n return this.entries.length;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Set;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Set.js?")},"./node_modules/phaser/src/structs/Size.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Size component allows you to set `width` and `height` properties and define the relationship between them.\r\n * \r\n * The component can automatically maintain the aspect ratios between the two values, and clamp them\r\n * to a defined min-max range. You can also control the dominant axis. When dimensions are given to the Size component\r\n * that would cause it to exceed its min-max range, the dimensions are adjusted based on the dominant axis.\r\n *\r\n * @class Size\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The width of the Size component.\r\n * @param {number} [height=width] - The height of the Size component. If not given, it will use the `width`.\r\n * @param {integer} [aspectMode=0] - The aspect mode of the Size component. Defaults to 0, no mode.\r\n * @param {any} [parent=null] - The parent of this Size component. Can be any object with public `width` and `height` properties. Dimensions are clamped to keep them within the parent bounds where possible.\r\n */\r\nvar Size = new Class({\r\n\r\n initialize:\r\n\r\n function Size (width, height, aspectMode, parent)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (aspectMode === undefined) { aspectMode = 0; }\r\n if (parent === undefined) { parent = null; }\r\n\r\n /**\r\n * Internal width value.\r\n *\r\n * @name Phaser.Structs.Size#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * Internal height value.\r\n *\r\n * @name Phaser.Structs.Size#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * Internal parent reference.\r\n *\r\n * @name Phaser.Structs.Size#_parent\r\n * @type {any}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._parent = parent;\r\n\r\n /**\r\n * The aspect mode this Size component will use when calculating its dimensions.\r\n * This property is read-only. To change it use the `setAspectMode` method.\r\n *\r\n * @name Phaser.Structs.Size#aspectMode\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectMode = aspectMode;\r\n\r\n /**\r\n * The proportional relationship between the width and height.\r\n * \r\n * This property is read-only and is updated automatically when either the `width` or `height` properties are changed,\r\n * depending on the aspect mode.\r\n *\r\n * @name Phaser.Structs.Size#aspectRatio\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectRatio = (height === 0) ? 1 : width / height;\r\n\r\n /**\r\n * The minimum allowed width.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minWidth = 0;\r\n\r\n /**\r\n * The minimum allowed height.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minHeight = 0;\r\n\r\n /**\r\n * The maximum allowed width.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxWidth = Number.MAX_VALUE;\r\n\r\n /**\r\n * The maximum allowed height.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxHeight = Number.MAX_VALUE;\r\n\r\n /**\r\n * A Vector2 containing the horizontal and vertical snap values, which the width and height are snapped to during resizing.\r\n * \r\n * By default this is disabled.\r\n * \r\n * This property is read-only. To change it see the `setSnap` method.\r\n *\r\n * @name Phaser.Structs.Size#snapTo\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.snapTo = new Vector2();\r\n },\r\n\r\n /**\r\n * Sets the aspect mode of this Size component.\r\n * \r\n * The aspect mode controls what happens when you modify the `width` or `height` properties, or call `setSize`.\r\n * \r\n * It can be a number from 0 to 4, or a Size constant:\r\n * \r\n * 0. NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * 1. WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.\r\n * 2. HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.\r\n * 3. FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * 4. ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setAspectMode\r\n * @since 3.16.0\r\n *\r\n * @param {integer} [value=0] - The aspect mode value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectMode: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.aspectMode = value;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * By setting a Snap To value when this Size component is modified its dimensions will automatically\r\n * by snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,\r\n * and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)\r\n * \r\n * Note that snapping takes place before adjustments by the parent, or the min / max settings. If these\r\n * values are not multiples of the given snap values, then this can result in un-snapped dimensions.\r\n * \r\n * Call this method with no arguments to reset the snap values.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setSnap\r\n * @since 3.16.0\r\n *\r\n * @param {number} [snapWidth=0] - The amount to snap the width to. If you don't want to snap the width, pass a value of zero.\r\n * @param {number} [snapHeight=snapWidth] - The amount to snap the height to. If not provided it will use the `snapWidth` value. If you don't want to snap the height, pass a value of zero.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSnap: function (snapWidth, snapHeight)\r\n {\r\n if (snapWidth === undefined) { snapWidth = 0; }\r\n if (snapHeight === undefined) { snapHeight = snapWidth; }\r\n\r\n this.snapTo.set(snapWidth, snapHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets, or clears, the parent of this Size component.\r\n * \r\n * To clear the parent call this method with no arguments.\r\n * \r\n * The parent influences the maximum extents to which this Size compoent can expand,\r\n * based on the aspect mode:\r\n * \r\n * NONE - The parent clamps both the width and height.\r\n * WIDTH_CONTROLS_HEIGHT - The parent clamps just the width.\r\n * HEIGHT_CONTROLS_WIDTH - The parent clamps just the height.\r\n * FIT - The parent clamps whichever axis is required to ensure the size fits within it.\r\n * ENVELOP - The parent is used to ensure the size fully envelops the parent.\r\n * \r\n * Calling this method automatically calls `setSize`.\r\n *\r\n * @method Phaser.Structs.Size#setParent\r\n * @since 3.16.0\r\n *\r\n * @param {any} [parent] - Sets the parent of this Size component. Don't provide a value to clear an existing parent.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setParent: function (parent)\r\n {\r\n this._parent = parent;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the minimum width and height values this Size component will allow.\r\n * \r\n * The minimum values can never be below zero, or greater than the maximum values.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMin\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The minimum allowed width of the Size component.\r\n * @param {number} [height=width] - The minimum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMin: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.minWidth = Clamp(width, 0, this.maxWidth);\r\n this.minHeight = Clamp(height, 0, this.maxHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the maximum width and height values this Size component will allow.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the maximums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMax\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=Number.MAX_VALUE] - The maximum allowed width of the Size component.\r\n * @param {number} [height=width] - The maximum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMax: function (width, height)\r\n {\r\n if (width === undefined) { width = Number.MAX_VALUE; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.maxWidth = Clamp(width, this.minWidth, Number.MAX_VALUE);\r\n this.maxHeight = Clamp(height, this.minHeight, Number.MAX_VALUE);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets the width and height of this Size component based on the aspect mode.\r\n * \r\n * If the aspect mode is 'none' then calling this method will change the aspect ratio, otherwise the current\r\n * aspect ratio is honored across all other modes.\r\n * \r\n * If snapTo values have been set then the given width and height are snapped first, prior to any further\r\n * adjustment via min/max values, or a parent.\r\n * \r\n * If minimum and/or maximum dimensions have been specified, the values given to this method will be clamped into\r\n * that range prior to adjustment, but may still exceed them depending on the aspect mode.\r\n * \r\n * If this Size component has a parent set, and the aspect mode is `fit` or `envelop`, then the given sizes will\r\n * be clamped to the range specified by the parent.\r\n *\r\n * @method Phaser.Structs.Size#setSize\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n \r\n switch (this.aspectMode)\r\n {\r\n case Size.NONE:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n break;\r\n\r\n case Size.WIDTH_CONTROLS_HEIGHT:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(this._width * (1 / this.aspectRatio), false);\r\n break;\r\n\r\n case Size.HEIGHT_CONTROLS_WIDTH:\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this._width = this.getNewWidth(this._height * this.aspectRatio, false);\r\n break;\r\n\r\n case Size.FIT:\r\n this.constrain(width, height, true);\r\n break;\r\n\r\n case Size.ENVELOP:\r\n this.constrain(width, height, false);\r\n break;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new aspect ratio, overriding what was there previously.\r\n * \r\n * It then calls `setSize` immediately using the current dimensions.\r\n *\r\n * @method Phaser.Structs.Size#setAspectRatio\r\n * @since 3.16.0\r\n *\r\n * @param {number} ratio - The new aspect ratio.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectRatio: function (ratio)\r\n {\r\n this.aspectRatio = ratio;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets a new width and height for this Size component and updates the aspect ratio based on them.\r\n * \r\n * It _doesn't_ change the `aspectMode` and still factors in size limits such as the min max and parent bounds.\r\n *\r\n * @method Phaser.Structs.Size#resize\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a new width and passes it through the min/max clamp and then checks it doesn't exceed the parent width.\r\n *\r\n * @method Phaser.Structs.Size#getNewWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified width value.\r\n */\r\n getNewWidth: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n \r\n value = Clamp(value, this.minWidth, this.maxWidth);\r\n\r\n if (checkParent && this._parent && value > this._parent.width)\r\n {\r\n value = Math.max(this.minWidth, this._parent.width);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * Takes a new height and passes it through the min/max clamp and then checks it doesn't exceed the parent height.\r\n *\r\n * @method Phaser.Structs.Size#getNewHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified height value.\r\n */\r\n getNewHeight: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n\r\n value = Clamp(value, this.minHeight, this.maxHeight);\r\n\r\n if (checkParent && this._parent && value > this._parent.height)\r\n {\r\n value = Math.max(this.minHeight, this._parent.height);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * If `fit` is true there may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * If `fit` is false the size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#constrain\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n * @param {boolean} [fit=true] - Perform a `fit` (true) constraint, or an `envelop` (false) constraint.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n constrain: function (width, height, fit)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (fit === undefined) { fit = true; }\r\n\r\n width = this.getNewWidth(width);\r\n height = this.getNewHeight(height);\r\n\r\n var snap = this.snapTo;\r\n var newRatio = (height === 0) ? 1 : width / height;\r\n\r\n if ((fit && this.aspectRatio > newRatio) || (!fit && this.aspectRatio < newRatio))\r\n {\r\n // We need to change the height to fit the width\r\n // height = width / this.aspectRatio;\r\n\r\n width = SnapFloor(width, snap.x);\r\n\r\n height = width / this.aspectRatio;\r\n\r\n if (snap.y > 0)\r\n {\r\n height = SnapFloor(height, snap.y);\r\n\r\n // Reduce the width accordingly\r\n width = height * this.aspectRatio;\r\n }\r\n }\r\n else if ((fit && this.aspectRatio < newRatio) || (!fit && this.aspectRatio > newRatio))\r\n {\r\n // We need to change the width to fit the height\r\n // width = height * this.aspectRatio;\r\n\r\n height = SnapFloor(height, snap.y);\r\n\r\n width = height * this.aspectRatio;\r\n\r\n if (snap.x > 0)\r\n {\r\n width = SnapFloor(width, snap.x);\r\n\r\n // Reduce the height accordingly\r\n height = width * (1 / this.aspectRatio);\r\n }\r\n }\r\n\r\n this._width = width;\r\n this._height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * There may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#fitTo\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n fitTo: function (width, height)\r\n {\r\n return this.constrain(width, height, true);\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted so that they fully envlop the given dimensions, while keeping the aspect ratio.\r\n * \r\n * The size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the values are clamped so that it never exceeds the parent\r\n * on the longest axis.\r\n *\r\n * @method Phaser.Structs.Size#envelop\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n envelop: function (width, height)\r\n {\r\n return this.constrain(width, height, false);\r\n },\r\n\r\n /**\r\n * Sets the width of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the width may also update the height and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setWidth: function (value)\r\n {\r\n return this.setSize(value, this._height);\r\n },\r\n\r\n /**\r\n * Sets the height of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the height may also update the width and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} height - The new height of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setHeight: function (value)\r\n {\r\n return this.setSize(this._width, value);\r\n },\r\n\r\n /**\r\n * Returns a string representation of this Size component.\r\n *\r\n * @method Phaser.Structs.Size#toString\r\n * @since 3.16.0\r\n *\r\n * @return {string} A string representation of this Size component.\r\n */\r\n toString: function ()\r\n {\r\n return '[{ Size (width=' + this._width + ' height=' + this._height + ' aspectRatio=' + this.aspectRatio + ' aspectMode=' + this.aspectMode + ') }]';\r\n },\r\n\r\n /**\r\n * Sets the values of this Size component to the `element.style.width` and `height`\r\n * properties of the given DOM Element. The properties are set as `px` values.\r\n *\r\n * @method Phaser.Structs.Size#setCSS\r\n * @since 3.17.0\r\n *\r\n * @param {HTMLElement} element - The DOM Element to set the CSS style on.\r\n */\r\n setCSS: function (element)\r\n {\r\n if (element && element.style)\r\n {\r\n element.style.width = this._width + 'px';\r\n element.style.height = this._height + 'px';\r\n }\r\n },\r\n\r\n /**\r\n * Copies the aspect mode, aspect ratio, width and height from this Size component\r\n * to the given Size component. Note that the parent, if set, is not copied across.\r\n *\r\n * @method Phaser.Structs.Size#copy\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Structs.Size} destination - The Size component to copy the values to.\r\n *\r\n * @return {Phaser.Structs.Size} The updated destination Size component.\r\n */\r\n copy: function (destination)\r\n {\r\n destination.setAspectMode(this.aspectMode);\r\n\r\n destination.aspectRatio = this.aspectRatio;\r\n\r\n return destination.setSize(this.width, this.height);\r\n },\r\n\r\n /**\r\n * Destroys this Size component.\r\n * \r\n * This clears the local properties and any parent object, if set.\r\n * \r\n * A destroyed Size component cannot be re-used.\r\n *\r\n * @method Phaser.Structs.Size#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this._parent = null;\r\n this.snapTo = null;\r\n },\r\n\r\n /**\r\n * The width of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minWidth` and `maxWidth`, if enabled.\r\n * \r\n * A width can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `height` if the aspect ratio lock is enabled.\r\n * You can also use the `setWidth` and `getWidth` methods.\r\n *\r\n * @name Phaser.Structs.Size#width\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(value, this._height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minHeight` and `maxHeight`, if enabled.\r\n * \r\n * A height can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `width` if the aspect ratio lock is enabled.\r\n * You can also use the `setHeight` and `getHeight` methods.\r\n *\r\n * @name Phaser.Structs.Size#height\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(this._width, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * \r\n * @name Phaser.Structs.Size.NONE\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.NONE = 0;\r\n\r\n/**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Structs.Size.WIDTH_CONTROLS_HEIGHT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.WIDTH_CONTROLS_HEIGHT = 1;\r\n\r\n/**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Structs.Size.HEIGHT_CONTROLS_WIDTH\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.HEIGHT_CONTROLS_WIDTH = 2;\r\n\r\n/**\r\n * The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * \r\n * @name Phaser.Structs.Size.FIT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.FIT = 3;\r\n\r\n/**\r\n * The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Structs.Size.ENVELOP\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.ENVELOP = 4;\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Size.js?")},"./node_modules/phaser/src/structs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Structs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n List: __webpack_require__(/*! ./List */ "./node_modules/phaser/src/structs/List.js"),\r\n Map: __webpack_require__(/*! ./Map */ "./node_modules/phaser/src/structs/Map.js"),\r\n ProcessQueue: __webpack_require__(/*! ./ProcessQueue */ "./node_modules/phaser/src/structs/ProcessQueue.js"),\r\n RTree: __webpack_require__(/*! ./RTree */ "./node_modules/phaser/src/structs/RTree.js"),\r\n Set: __webpack_require__(/*! ./Set */ "./node_modules/phaser/src/structs/Set.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/structs/Size.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/index.js?')},"./node_modules/phaser/src/textures/CanvasTexture.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ "./node_modules/phaser/src/display/color/Color.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar Texture = __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.\r\n *\r\n * You can use the properties of this texture to draw to the canvas element directly, using all of the standard\r\n * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.\r\n *\r\n * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to\r\n * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this\r\n * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep\r\n * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading\r\n * texture data to it. This restriction does not apply if using the Canvas Renderer.\r\n * \r\n * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify\r\n * sections of the canvas using the `add` method.\r\n * \r\n * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying\r\n * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause\r\n * graphical errors.\r\n *\r\n * @class CanvasTexture\r\n * @extends Phaser.Textures.Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {HTMLCanvasElement} source - The canvas element that is used as the base of this texture.\r\n * @param {integer} width - The width of the canvas.\r\n * @param {integer} height - The height of the canvas.\r\n */\r\nvar CanvasTexture = new Class({\r\n\r\n Extends: Texture,\r\n\r\n initialize:\r\n\r\n function CanvasTexture (manager, key, source, width, height)\r\n {\r\n Texture.call(this, manager, key, source, width, height);\r\n\r\n this.add(\'__BASE\', 0, 0, 0, width, height);\r\n\r\n /**\r\n * A reference to the Texture Source of this Canvas.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#_source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._source = this.frames[\'__BASE\'].source;\r\n\r\n /**\r\n * The source Canvas Element.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#canvas\r\n * @readonly\r\n * @type {HTMLCanvasElement}\r\n * @since 3.7.0\r\n */\r\n this.canvas = this._source.image;\r\n\r\n /**\r\n * The 2D Canvas Rendering Context.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#context\r\n * @readonly\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.7.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The width of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#width\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#height\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The context image data.\r\n * Use the `update` method to populate this when the canvas changes.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#imageData\r\n * @type {ImageData}\r\n * @since 3.13.0\r\n */\r\n this.imageData = this.context.getImageData(0, 0, width, height);\r\n\r\n /**\r\n * A Uint8ClampedArray view into the `buffer`.\r\n * Use the `update` method to populate this when the canvas changes.\r\n * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#data\r\n * @type {Uint8ClampedArray}\r\n * @since 3.13.0\r\n */\r\n this.data = null;\r\n\r\n if (this.imageData)\r\n {\r\n this.data = this.imageData.data;\r\n }\r\n\r\n /**\r\n * An Uint32Array view into the `buffer`.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#pixels\r\n * @type {Uint32Array}\r\n * @since 3.13.0\r\n */\r\n this.pixels = null;\r\n\r\n /**\r\n * An ArrayBuffer the same size as the context ImageData.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#buffer\r\n * @type {ArrayBuffer}\r\n * @since 3.13.0\r\n */\r\n this.buffer;\r\n\r\n if (this.data)\r\n {\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * This re-creates the `imageData` from the current context.\r\n * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.\r\n *\r\n * Warning: This is a very expensive operation, so use it sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#update\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n update: function ()\r\n {\r\n this.imageData = this.context.getImageData(0, 0, this.width, this.height);\r\n\r\n this.data = this.imageData.data;\r\n\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n\r\n if (this.manager.game.config.renderType === CONST.WEBGL)\r\n {\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#draw\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate to draw the source at.\r\n * @param {integer} y - The y coordinate to draw the source at.\r\n * @param {(HTMLImageElement|HTMLCanvasElement)} source - The element to draw to this canvas.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n draw: function (x, y, source)\r\n {\r\n this.context.drawImage(source, x, y);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Draws the given texture frame to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#drawFrame\r\n * @since 3.16.0\r\n * \r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {integer} [x=0] - The x coordinate to draw the source at.\r\n * @param {integer} [y=0] - The y coordinate to draw the source at.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n drawFrame: function (key, frame, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n var textureFrame = this.manager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var width = textureFrame.cutWidth;\r\n var height = textureFrame.cutHeight;\r\n var res = textureFrame.source.resolution;\r\n\r\n this.context.drawImage(\r\n textureFrame.source.image,\r\n cd.x, cd.y,\r\n width,\r\n height,\r\n x, y,\r\n width / res,\r\n height / res\r\n );\r\n\r\n return this.update();\r\n }\r\n else\r\n {\r\n return this;\r\n }\r\n },\r\n\r\n /**\r\n * Sets a pixel in the CanvasTexture to the given color and alpha values.\r\n *\r\n * This is an expensive operation to run in large quantities, so use sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setPixel\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n setPixel: function (x, y, red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n x = Math.abs(Math.floor(x));\r\n y = Math.abs(Math.floor(y));\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var imageData = this.context.getImageData(x, y, 1, 1);\r\n\r\n imageData.data[0] = red;\r\n imageData.data[1] = green;\r\n imageData.data[2] = blue;\r\n imageData.data[3] = alpha;\r\n\r\n this.context.putImageData(imageData, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the ImageData into the context of this CanvasTexture at the given coordinates.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#putData\r\n * @since 3.16.0\r\n * \r\n * @param {ImageData} imageData - The ImageData to put at the given location.\r\n * @param {integer} x - The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [dirtyX=0] - Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyY=0] - Vertical position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyWidth] - Width of the rectangle to be painted. Defaults to the width of the image data.\r\n * @param {integer} [dirtyHeight] - Height of the rectangle to be painted. Defaults to the height of the image data.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n putData: function (imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight)\r\n {\r\n if (dirtyX === undefined) { dirtyX = 0; }\r\n if (dirtyY === undefined) { dirtyY = 0; }\r\n if (dirtyWidth === undefined) { dirtyWidth = imageData.width; }\r\n if (dirtyHeight === undefined) { dirtyHeight = imageData.height; }\r\n\r\n this.context.putImageData(imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an ImageData region from this CanvasTexture from the position and size specified.\r\n * You can write this back using `CanvasTexture.putData`, or manipulate it.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getData\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param {integer} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * \r\n * @return {ImageData} The ImageData extracted from this CanvasTexture.\r\n */\r\n getData: function (x, y, width, height)\r\n {\r\n x = Clamp(Math.floor(x), 0, this.width - 1);\r\n y = Clamp(Math.floor(y), 0, this.height - 1);\r\n width = Clamp(width, 1, this.width - x);\r\n height = Clamp(height, 1, this.height - y);\r\n\r\n var imageData = this.context.getImageData(x, y, width, height);\r\n\r\n return imageData;\r\n },\r\n\r\n /**\r\n * Get the color of a specific pixel from this texture and store it in a Color object.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixel\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {Phaser.Display.Color} [out] - A Color object to store the pixel values in. If not provided a new Color object will be created.\r\n * \r\n * @return {Phaser.Display.Color} An object with the red, green, blue and alpha values set in the r, g, b and a properties.\r\n */\r\n getPixel: function (x, y, out)\r\n {\r\n if (!out)\r\n {\r\n out = new Color();\r\n }\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var data = this.data;\r\n\r\n var r = data[index + 0];\r\n var g = data[index + 1];\r\n var b = data[index + 2];\r\n var a = data[index + 3];\r\n\r\n out.setTo(r, g, b, a);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing all of the pixels in the given region.\r\n *\r\n * If the requested region extends outside the bounds of this CanvasTexture,\r\n * the region is truncated to fit.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixels\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given.\r\n * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.\r\n * \r\n * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects.\r\n */\r\n getPixels: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = width; }\r\n\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n var left = Clamp(x, 0, this.width);\r\n var right = Clamp(x + width, 0, this.width);\r\n var top = Clamp(y, 0, this.height);\r\n var bottom = Clamp(y + height, 0, this.height);\r\n\r\n var pixel = new Color();\r\n\r\n var out = [];\r\n\r\n for (var py = top; py < bottom; py++)\r\n {\r\n var row = [];\r\n\r\n for (var px = left; px < right; px++)\r\n {\r\n pixel = this.getPixel(px, py, pixel);\r\n\r\n row.push({ x: px, y: py, color: pixel.color, alpha: pixel.alphaGL });\r\n }\r\n\r\n out.push(row);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the Image Data index for the given pixel in this CanvasTexture.\r\n *\r\n * The index can be used to read directly from the `this.data` array.\r\n *\r\n * The index points to the red value in the array. The subsequent 3 indexes\r\n * point to green, blue and alpha respectively.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getIndex\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * \r\n * @return {integer} \r\n */\r\n getIndex: function (x, y)\r\n {\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n if (x < this.width && y < this.height)\r\n {\r\n return (x + y * this.width) * 4;\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n },\r\n\r\n /**\r\n * This should be called manually if you are running under WebGL.\r\n * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the\r\n * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#refresh\r\n * @since 3.7.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n refresh: function ()\r\n {\r\n this._source.update();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the Canvas Element.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getCanvas\r\n * @since 3.7.0\r\n *\r\n * @return {HTMLCanvasElement} The Canvas DOM element this texture is using.\r\n */\r\n getCanvas: function ()\r\n {\r\n return this.canvas;\r\n },\r\n\r\n /**\r\n * Gets the 2D Canvas Rendering Context.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getContext\r\n * @since 3.7.0\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context this texture is using.\r\n */\r\n getContext: function ()\r\n {\r\n return this.context;\r\n },\r\n\r\n /**\r\n * Clears the given region of this Canvas Texture, resetting it back to transparent.\r\n * If no region is given, the whole Canvas Texture is cleared.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#clear\r\n * @since 3.7.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region to clear.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region to clear.\r\n * @param {integer} [width] - The width of the region.\r\n * @param {integer} [height] - The height of the region.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n clear: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n\r\n this.context.clearRect(x, y, width, height);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Changes the size of this Canvas Texture.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The new width of the Canvas.\r\n * @param {integer} [height] - The new height of the Canvas. If not given it will use the width as the height.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n // Update the Canvas\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n // Update the Texture Source\r\n this._source.width = width;\r\n this._source.height = height;\r\n this._source.isPowerOf2 = IsSizePowerOfTwo(width, height);\r\n\r\n // Update the Frame\r\n this.frames[\'__BASE\'].setSize(width, height, 0, 0);\r\n\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n Texture.prototype.destroy.call(this);\r\n\r\n this._source = null;\r\n this.canvas = null;\r\n this.context = null;\r\n this.imageData = null;\r\n this.data = null;\r\n this.pixels = null;\r\n this.buffer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/CanvasTexture.js?')},"./node_modules/phaser/src/textures/Frame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n * \r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The width of the frame before being trimmed.\r\n * @param {integer} height - The height of the frame before being trimmed.\r\n * @param {integer} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n * \r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n \r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n \r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Frame.js?')},"./node_modules/phaser/src/textures/Texture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Frame = __webpack_require__(/*! ./Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar TextureSource = __webpack_require__(/*! ./TextureSource */ \"./node_modules/phaser/src/textures/TextureSource.js\");\r\n\r\nvar TEXTURE_MISSING_ERROR = 'Texture.frame missing: ';\r\n\r\n/**\r\n * @classdesc\r\n * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames.\r\n * The Frames represent the different areas of the Texture. For example a texture atlas\r\n * may have many Frames, one for each element within the atlas. Where-as a single image would have\r\n * just one frame, that encompasses the whole image.\r\n * \r\n * Every Texture, no matter where it comes from, always has at least 1 frame called the `__BASE` frame.\r\n * This frame represents the entirety of the source image.\r\n *\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * @class Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} source - An array of sources that are used to create the texture. Usually Images, but can also be a Canvas.\r\n * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images.\r\n * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images.\r\n */\r\nvar Texture = new Class({\r\n\r\n initialize:\r\n\r\n function Texture (manager, key, source, width, height)\r\n {\r\n if (!Array.isArray(source))\r\n {\r\n source = [ source ];\r\n }\r\n\r\n /**\r\n * A reference to the Texture Manager this Texture belongs to.\r\n *\r\n * @name Phaser.Textures.Texture#manager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique string-based key of this Texture.\r\n *\r\n * @name Phaser.Textures.Texture#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * An array of TextureSource instances.\r\n * These are unique to this Texture and contain the actual Image (or Canvas) data.\r\n *\r\n * @name Phaser.Textures.Texture#source\r\n * @type {Phaser.Textures.TextureSource[]}\r\n * @since 3.0.0\r\n */\r\n this.source = [];\r\n\r\n /**\r\n * An array of TextureSource data instances.\r\n * Used to store additional data images, such as normal maps or specular maps.\r\n *\r\n * @name Phaser.Textures.Texture#dataSource\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.dataSource = [];\r\n\r\n /**\r\n * A key-value object pair associating the unique Frame keys with the Frames objects.\r\n *\r\n * @name Phaser.Textures.Texture#frames\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.frames = {};\r\n\r\n /**\r\n * Any additional data that was set in the source JSON (if any),\r\n * or any extra data you'd like to store relating to this texture\r\n *\r\n * @name Phaser.Textures.Texture#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * The name of the first frame of the Texture.\r\n *\r\n * @name Phaser.Textures.Texture#firstFrame\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.firstFrame = '__BASE';\r\n\r\n /**\r\n * The total number of Frames in this Texture, including the `__BASE` frame.\r\n * \r\n * A Texture will always contain at least 1 frame because every Texture contains a `__BASE` frame by default,\r\n * in addition to any extra frames that have been added to it, such as when parsing a Sprite Sheet or Texture Atlas.\r\n *\r\n * @name Phaser.Textures.Texture#frameTotal\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameTotal = 0;\r\n\r\n // Load the Sources\r\n for (var i = 0; i < source.length; i++)\r\n {\r\n this.source.push(new TextureSource(this, source[i], width, height));\r\n }\r\n },\r\n\r\n /**\r\n * Adds a new Frame to this Texture.\r\n *\r\n * A Frame is a rectangular region of a TextureSource with a unique index or string-based key.\r\n * \r\n * The name given must be unique within this Texture. If it already exists, this method will return `null`.\r\n *\r\n * @method Phaser.Textures.Texture#add\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n *\r\n * @return {?Phaser.Textures.Frame} The Frame that was added to this Texture, or `null` if the given name already exists.\r\n */\r\n add: function (name, sourceIndex, x, y, width, height)\r\n {\r\n if (this.has(name))\r\n {\r\n return null;\r\n }\r\n\r\n var frame = new Frame(this, name, sourceIndex, x, y, width, height);\r\n\r\n this.frames[name] = frame;\r\n\r\n // Set the first frame of the Texture (other than __BASE)\r\n // This is used to ensure we don't spam the display with entire\r\n // atlases of sprite sheets, but instead just the first frame of them\r\n // should the dev incorrectly specify the frame index\r\n if (this.firstFrame === '__BASE')\r\n {\r\n this.firstFrame = name;\r\n }\r\n\r\n this.frameTotal++;\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Removes the given Frame from this Texture. The Frame is destroyed immediately.\r\n * \r\n * Any Game Objects using this Frame should stop using it _before_ you remove it,\r\n * as it does not happen automatically.\r\n *\r\n * @method Phaser.Textures.Texture#remove\r\n * @since 3.19.0\r\n *\r\n * @param {string} name - The key of the Frame to remove.\r\n *\r\n * @return {boolean} True if a Frame with the matching key was removed from this Texture.\r\n */\r\n remove: function (name)\r\n {\r\n if (this.has(name))\r\n {\r\n var frame = this.get(name);\r\n\r\n frame.destroy();\r\n\r\n delete this.frames[name];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Checks to see if a Frame matching the given key exists within this Texture.\r\n *\r\n * @method Phaser.Textures.Texture#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The key of the Frame to check for.\r\n *\r\n * @return {boolean} True if a Frame with the matching key exists in this Texture.\r\n */\r\n has: function (name)\r\n {\r\n return (this.frames[name]);\r\n },\r\n\r\n /**\r\n * Gets a Frame from this Texture based on either the key or the index of the Frame.\r\n *\r\n * In a Texture Atlas Frames are typically referenced by a key.\r\n * In a Sprite Sheet Frames are referenced by an index.\r\n * Passing no value for the name returns the base texture.\r\n *\r\n * @method Phaser.Textures.Texture#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} The Texture Frame.\r\n */\r\n get: function (name)\r\n {\r\n // null, undefined, empty string, zero\r\n if (!name)\r\n {\r\n name = this.firstFrame;\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n frame = this.frames[this.firstFrame];\r\n }\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Takes the given TextureSource and returns the index of it within this Texture.\r\n * If it's not in this Texture, it returns -1.\r\n * Unless this Texture has multiple TextureSources, such as with a multi-atlas, this\r\n * method will always return zero or -1.\r\n *\r\n * @method Phaser.Textures.Texture#getTextureSourceIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureSource} source - The TextureSource to check.\r\n *\r\n * @return {integer} The index of the TextureSource within this Texture, or -1 if not in this Texture.\r\n */\r\n getTextureSourceIndex: function (source)\r\n {\r\n for (var i = 0; i < this.source.length; i++)\r\n {\r\n if (this.source[i] === source)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Returns an array of all the Frames in the given TextureSource.\r\n *\r\n * @method Phaser.Textures.Texture#getFramesFromTextureSource\r\n * @since 3.0.0\r\n *\r\n * @param {integer} sourceIndex - The index of the TextureSource to get the Frames from.\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {Phaser.Textures.Frame[]} An array of Texture Frames.\r\n */\r\n getFramesFromTextureSource: function (sourceIndex, includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = [];\r\n\r\n for (var frameName in this.frames)\r\n {\r\n if (frameName === '__BASE' && !includeBase)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = this.frames[frameName];\r\n\r\n if (frame.sourceIndex === sourceIndex)\r\n {\r\n out.push(frame);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array with all of the names of the Frames in this Texture.\r\n *\r\n * Useful if you want to randomly assign a Frame to a Game Object, as you can\r\n * pick a random element from the returned array.\r\n *\r\n * @method Phaser.Textures.Texture#getFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {string[]} An array of all Frame names in this Texture.\r\n */\r\n getFrameNames: function (includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = Object.keys(this.frames);\r\n\r\n if (!includeBase)\r\n {\r\n var idx = out.indexOf('__BASE');\r\n\r\n if (idx !== -1)\r\n {\r\n out.splice(idx, 1);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the source image it uses to render with.\r\n *\r\n * This will return the actual DOM Image or Canvas element.\r\n *\r\n * @method Phaser.Textures.Texture#getSourceImage\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture)} The DOM Image, Canvas Element or Render Texture.\r\n */\r\n getSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (frame)\r\n {\r\n return frame.source.image;\r\n }\r\n else\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n return this.frames['__BASE'].source.image;\r\n }\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the data source image it uses to render with.\r\n * You can use this to get the normal map for an image for example.\r\n *\r\n * This will return the actual DOM Image.\r\n *\r\n * @method Phaser.Textures.Texture#getDataSourceImage\r\n * @since 3.7.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement)} The DOM Image or Canvas Element.\r\n */\r\n getDataSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n var idx;\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n idx = this.frames['__BASE'].sourceIndex;\r\n }\r\n else\r\n {\r\n idx = frame.sourceIndex;\r\n }\r\n\r\n return this.dataSource[idx].image;\r\n },\r\n\r\n /**\r\n * Adds a data source image to this Texture.\r\n *\r\n * An example of a data source image would be a normal map, where all of the Frames for this Texture\r\n * equally apply to the normal map.\r\n *\r\n * @method Phaser.Textures.Texture#setDataSource\r\n * @since 3.0.0\r\n *\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} data - The source image.\r\n */\r\n setDataSource: function (data)\r\n {\r\n if (!Array.isArray(data))\r\n {\r\n data = [ data ];\r\n }\r\n \r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var source = this.source[i];\r\n\r\n this.dataSource.push(new TextureSource(this, data[i], source.width, source.height));\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * The mode applies to the entire Texture, not just a specific Frame of it.\r\n *\r\n * @method Phaser.Textures.Texture#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].setFilter(filterMode);\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].setFilter(filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.Texture#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].destroy();\r\n }\r\n\r\n for (var frameName in this.frames)\r\n {\r\n var frame = this.frames[frameName];\r\n\r\n frame.destroy();\r\n }\r\n\r\n this.source = [];\r\n this.dataSource = [];\r\n this.frames = {};\r\n\r\n this.manager.removeKey(this.key);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Texture.js?")},"./node_modules/phaser/src/textures/TextureManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar CanvasTexture = __webpack_require__(/*! ./CanvasTexture */ \"./node_modules/phaser/src/textures/CanvasTexture.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GenerateTexture = __webpack_require__(/*! ../create/GenerateTexture */ \"./node_modules/phaser/src/create/GenerateTexture.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Parser = __webpack_require__(/*! ./parsers */ \"./node_modules/phaser/src/textures/parsers/index.js\");\r\nvar Texture = __webpack_require__(/*! ./Texture */ \"./node_modules/phaser/src/textures/Texture.js\");\r\n\r\n/**\r\n * @callback EachTextureCallback\r\n *\r\n * @param {Phaser.Textures.Texture} texture - Each texture in Texture Manager.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * Access it via `scene.textures`.\r\n *\r\n * @class TextureManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Texture Manager belongs to.\r\n */\r\nvar TextureManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function TextureManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Game that this TextureManager belongs to.\r\n *\r\n * @name Phaser.Textures.TextureManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The name of this manager.\r\n *\r\n * @name Phaser.Textures.TextureManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'TextureManager';\r\n\r\n /**\r\n * An object that has all of textures that Texture Manager creates.\r\n * Textures are assigned to keys so we can access to any texture that this object has directly by key value without iteration.\r\n *\r\n * @name Phaser.Textures.TextureManager#list\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The temporary canvas element to save an pixel data of an arbitrary texture in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempCanvas\r\n * @type {HTMLCanvasElement}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempCanvas = CanvasPool.create2D(this, 1, 1);\r\n\r\n /**\r\n * The context of the temporary canvas element made to save an pixel data in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempContext\r\n * @type {CanvasRenderingContext2D}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempContext = this._tempCanvas.getContext('2d');\r\n\r\n /**\r\n * An counting value used for emitting 'ready' event after all of managers in game is loaded.\r\n *\r\n * @name Phaser.Textures.TextureManager#_pending\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pending = 0;\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot Handler called by Phaser.Game when it first starts up.\r\n *\r\n * @method Phaser.Textures.TextureManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this._pending = 2;\r\n\r\n this.on(Events.LOAD, this.updatePending, this);\r\n this.on(Events.ERROR, this.updatePending, this);\r\n\r\n this.addBase64('__DEFAULT', this.game.config.defaultImage);\r\n this.addBase64('__MISSING', this.game.config.missingImage);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * After 'onload' or 'onerror' invoked twice, emit 'ready' event.\r\n *\r\n * @method Phaser.Textures.TextureManager#updatePending\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updatePending: function ()\r\n {\r\n this._pending--;\r\n\r\n if (this._pending === 0)\r\n {\r\n this.off(Events.LOAD);\r\n this.off(Events.ERROR);\r\n\r\n this.emit(Events.READY);\r\n }\r\n },\r\n\r\n /**\r\n * Checks the given texture key and throws a console.warn if the key is already in use, then returns false.\r\n * If you wish to avoid the console.warn then use `TextureManager.exists` instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#checkKey\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The texture key to check.\r\n *\r\n * @return {boolean} `true` if it's safe to use the texture key, otherwise `false`.\r\n */\r\n checkKey: function (key)\r\n {\r\n if (this.exists(key))\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Texture key already in use: ' + key);\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a Texture from the Texture Manager and destroys it. This will immediately\r\n * clear all references to it from the Texture Manager, and if it has one, destroy its\r\n * WebGLTexture. This will emit a `removetexture` event.\r\n *\r\n * Note: If you have any Game Objects still using this texture they will start throwing\r\n * errors the next time they try to render. Make sure that removing the texture is the final\r\n * step when clearing down to avoid this.\r\n *\r\n * @method Phaser.Textures.TextureManager#remove\r\n * @fires Phaser.Textures.Events#REMOVE\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the Texture to remove, or a reference to it.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n remove: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.exists(key))\r\n {\r\n key = this.get(key);\r\n }\r\n else\r\n {\r\n console.warn('No texture found matching key: ' + key);\r\n return this;\r\n }\r\n }\r\n\r\n // By this point key should be a Texture, if not, the following fails anyway\r\n if (this.list.hasOwnProperty(key.key))\r\n {\r\n key.destroy();\r\n\r\n this.emit(Events.REMOVE, key.key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a key from the Texture Manager but does not destroy the Texture that was using the key.\r\n *\r\n * @method Phaser.Textures.TextureManager#removeKey\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key to remove from the texture list.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n removeKey: function (key)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n delete this.list[key];\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Base64 encoded data.\r\n *\r\n * @method Phaser.Textures.TextureManager#addBase64\r\n * @fires Phaser.Textures.Events#ADD\r\n * @fires Phaser.Textures.Events#ERROR\r\n * @fires Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {*} data - The Base64 encoded data.\r\n * \r\n * @return {this} This Texture Manager instance.\r\n */\r\n addBase64: function (key, data)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var _this = this;\r\n\r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n _this.emit(Events.ERROR, key);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n var texture = _this.create(key, image);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n _this.emit(Events.ADD, key, texture);\r\n\r\n _this.emit(Events.LOAD, key, texture);\r\n };\r\n\r\n image.src = data;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.\r\n * \r\n * You can also provide the image type and encoder options.\r\n * \r\n * This will only work with bitmap based texture frames, such as those created from Texture Atlases.\r\n * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please\r\n * see the WebGL Snapshot function instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#getBase64\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {string} [type='image/png'] - [description]\r\n * @param {number} [encoderOptions=0.92] - [description]\r\n * \r\n * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found.\r\n */\r\n getBase64: function (key, frame, type, encoderOptions)\r\n {\r\n if (type === undefined) { type = 'image/png'; }\r\n if (encoderOptions === undefined) { encoderOptions = 0.92; }\r\n\r\n var data = '';\r\n\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame && (textureFrame.source.isRenderTexture || textureFrame.source.isGLTexture))\r\n {\r\n console.warn('Cannot getBase64 from WebGL Texture');\r\n }\r\n else if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var canvas = CanvasPool.create2D(this, cd.width, cd.height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n ctx.drawImage(\r\n textureFrame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n 0,\r\n 0,\r\n cd.width,\r\n cd.height\r\n );\r\n\r\n data = canvas.toDataURL(type, encoderOptions);\r\n\r\n CanvasPool.remove(canvas);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Image element.\r\n *\r\n * @method Phaser.Textures.TextureManager#addImage\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {HTMLImageElement|HTMLCanvasElement} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addImage: function (key, source, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.\r\n * \r\n * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.\r\n * \r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Textures.TextureManager#addGLTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {WebGLTexture} glTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addGLTexture: function (key, glTexture, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, glTexture, width, height);\r\n\r\n texture.add('__BASE', 0, 0, 0, width, height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Render Texture to the Texture Manager using the given key.\r\n * This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.\r\n *\r\n * @method Phaser.Textures.TextureManager#addRenderTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.GameObjects.RenderTexture} renderTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addRenderTexture: function (key, renderTexture)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, renderTexture);\r\n\r\n texture.add('__BASE', 0, 0, 0, renderTexture.width, renderTexture.height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given config values.\r\n * Generated textures consist of a Canvas element to which the texture data is drawn.\r\n * See the Phaser.Create function for the more direct way to create textures.\r\n *\r\n * @method Phaser.Textures.TextureManager#generate\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {object} config - The configuration object needed to generate the texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n generate: function (key, config)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, 1, 1);\r\n\r\n config.canvas = canvas;\r\n\r\n GenerateTexture(config);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using a blank Canvas element of the size given.\r\n *\r\n * Canvas elements are automatically pooled and calling this method will\r\n * extract a free canvas from the CanvasPool, or create one if none are available.\r\n *\r\n * @method Phaser.Textures.TextureManager#createCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {integer} [width=256] - The width of the Canvas element.\r\n * @param {integer} [height=256] - The height of the Canvas element.\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n createCanvas: function (key, width, height)\r\n {\r\n if (width === undefined) { width = 256; }\r\n if (height === undefined) { height = 256; }\r\n\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, width, height, CONST.CANVAS, true);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Creates a new Canvas Texture object from an existing Canvas element\r\n * and adds it to this Texture Manager, unless `skipCache` is true.\r\n *\r\n * @method Phaser.Textures.TextureManager#addCanvas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLCanvasElement} source - The Canvas element to form the base of the new Texture.\r\n * @param {boolean} [skipCache=false] - Skip adding this Texture into the Cache?\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n addCanvas: function (key, source, skipCache)\r\n {\r\n if (skipCache === undefined) { skipCache = false; }\r\n\r\n var texture = null;\r\n\r\n if (skipCache)\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n }\r\n else if (this.checkKey(key))\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n\r\n this.list[key] = texture;\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a new Texture Atlas to this Texture Manager.\r\n * It can accept either JSON Array or JSON Hash formats, as exported by Texture Packer and similar software.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlas: function (key, source, data, dataSource)\r\n {\r\n // New Texture Packer format?\r\n if (Array.isArray(data.textures) || Array.isArray(data.frames))\r\n {\r\n return this.addAtlasJSONArray(key, source, data, dataSource);\r\n }\r\n else\r\n {\r\n return this.addAtlasJSONHash(key, source, data, dataSource);\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Array within the JSON.\r\n * This is known as a JSON Array in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONArray\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(HTMLImageElement|HTMLImageElement[])} source - The source Image element/s.\r\n * @param {(object|object[])} data - The Texture Atlas data/s.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONArray: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n // Multi-Atlas?\r\n if (Array.isArray(data))\r\n {\r\n var singleAtlasFile = (data.length === 1); // multi-pack with one atlas file for all images\r\n\r\n // !! Assumes the textures are in the same order in the source array as in the json data !!\r\n for (var i = 0; i < texture.source.length; i++)\r\n {\r\n var atlasData = singleAtlasFile ? data[0] : data[i];\r\n\r\n Parser.JSONArray(texture, i, atlasData);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONArray(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Object within the JSON.\r\n * This is known as a JSON Hash in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONHash\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONHash: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n if (Array.isArray(data))\r\n {\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n Parser.JSONHash(texture, i, data[i]);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONHash(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager, where the atlas data is given\r\n * in the XML format.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasXML\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas XML data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasXML: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n \r\n Parser.AtlasXML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Unity Texture Atlas to this Texture Manager.\r\n * The data must be in the form of a Unity YAML file.\r\n *\r\n * @method Phaser.Textures.TextureManager#addUnityAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addUnityAtlas: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.UnityYAML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheet\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {Phaser.Types.Textures.SpriteSheetConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheet: function (key, source, config)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n var width = texture.source[0].width;\r\n var height = texture.source[0].height;\r\n\r\n Parser.SpriteSheet(texture, 0, 0, 0, width, height, config);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheetFromAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.Types.Textures.SpriteSheetFromAtlasConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheetFromAtlas: function (key, config)\r\n {\r\n if (!this.checkKey(key))\r\n {\r\n return null;\r\n }\r\n\r\n var atlasKey = GetValue(config, 'atlas', null);\r\n var atlasFrame = GetValue(config, 'frame', null);\r\n\r\n if (!atlasKey || !atlasFrame)\r\n {\r\n return;\r\n }\r\n\r\n var atlas = this.get(atlasKey);\r\n var sheet = atlas.get(atlasFrame);\r\n\r\n if (sheet)\r\n {\r\n var texture = this.create(key, sheet.source.image);\r\n\r\n if (sheet.trimmed)\r\n {\r\n // If trimmed we need to help the parser adjust\r\n Parser.SpriteSheetFromAtlas(texture, sheet, config);\r\n }\r\n else\r\n {\r\n Parser.SpriteSheet(texture, 0, sheet.cutX, sheet.cutY, sheet.cutWidth, sheet.cutHeight, config);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n\r\n return texture;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given source and dimensions.\r\n *\r\n * @method Phaser.Textures.TextureManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {integer} width - The width of the Texture.\r\n * @param {integer} height - The height of the Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n create: function (key, source, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = new Texture(this, key, source, width, height);\r\n\r\n this.list[key] = texture;\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Checks the given key to see if a Texture using it exists within this Texture Manager.\r\n *\r\n * @method Phaser.Textures.TextureManager#exists\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {boolean} Returns `true` if a Texture matching the given key exists in this Texture Manager.\r\n */\r\n exists: function (key)\r\n {\r\n return (this.list.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Returns a Texture from the Texture Manager that matches the given key.\r\n * If the key is undefined it will return the `__DEFAULT` Texture.\r\n * If the key is given, but not found, it will return the `__MISSING` Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was created.\r\n */\r\n get: function (key)\r\n {\r\n if (key === undefined) { key = '__DEFAULT'; }\r\n\r\n if (this.list[key])\r\n {\r\n return this.list[key];\r\n }\r\n else\r\n {\r\n return this.list['__MISSING'];\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a clone of that Frame if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#cloneFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} frame - The string or index of the Frame to be cloned.\r\n *\r\n * @return {Phaser.Textures.Frame} A Clone of the given Frame.\r\n */\r\n cloneFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame).clone();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a reference to that Frame, if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#getFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} A Texture Frame object.\r\n */\r\n getFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array with all of the keys of all Textures in this Texture Manager.\r\n * The output array will exclude the `__DEFAULT` and `__MISSING` keys.\r\n *\r\n * @method Phaser.Textures.TextureManager#getTextureKeys\r\n * @since 3.0.0\r\n *\r\n * @return {string[]} An array containing all of the Texture keys stored in this Texture Manager.\r\n */\r\n getTextureKeys: function ()\r\n {\r\n var output = [];\r\n\r\n for (var key in this.list)\r\n {\r\n if (key !== '__DEFAULT' && key !== '__MISSING')\r\n {\r\n output.push(key);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a new\r\n * Color object that has been populated with the color and alpha values of the pixel\r\n * at that location in the Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixel\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {?Phaser.Display.Color} A Color object populated with the color values of the requested pixel,\r\n * or `null` if the coordinates were out of bounds.\r\n */\r\n getPixel: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n\r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n\r\n return new Color(rgb.data[0], rgb.data[1], rgb.data[2], rgb.data[3]);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255\r\n * corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate\r\n * is out of bounds it will return null.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixelAlpha\r\n * @since 3.10.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {integer} A value between 0 and 255, or `null` if the coordinates were out of bounds.\r\n */\r\n getPixelAlpha: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n \r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n \r\n return rgb.data[3];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Sets the given Game Objects `texture` and `frame` properties so that it uses\r\n * the Texture and Frame specified in the `key` and `frame` arguments to this method.\r\n *\r\n * @method Phaser.Textures.TextureManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the texture would be set on.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object the texture was set on.\r\n */\r\n setTexture: function (gameObject, key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n gameObject.texture = this.list[key];\r\n gameObject.frame = gameObject.texture.get(frame);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Changes the key being used by a Texture to the new key provided.\r\n * \r\n * The old key is removed, allowing it to be re-used.\r\n * \r\n * Game Objects are linked to Textures by a reference to the Texture object, so\r\n * all existing references will be retained.\r\n *\r\n * @method Phaser.Textures.TextureManager#renameTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} currentKey - The current string-based key of the Texture you wish to rename.\r\n * @param {string} newKey - The new unique string-based key to use for the Texture.\r\n *\r\n * @return {boolean} `true` if the Texture key was successfully renamed, otherwise `false`.\r\n */\r\n renameTexture: function (currentKey, newKey)\r\n {\r\n var texture = this.get(currentKey);\r\n\r\n if (texture && currentKey !== newKey)\r\n {\r\n texture.key = newKey;\r\n\r\n this.list[newKey] = texture;\r\n\r\n delete this.list[currentKey];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Passes all Textures to the given callback.\r\n *\r\n * @method Phaser.Textures.TextureManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {EachTextureCallback} callback - The callback function to be sent the Textures.\r\n * @param {object} scope - The value to use as `this` when executing the callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Texture Manager and all Textures stored within it.\r\n *\r\n * @method Phaser.Textures.TextureManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var texture in this.list)\r\n {\r\n this.list[texture].destroy();\r\n }\r\n\r\n this.list = {};\r\n\r\n this.game = null;\r\n\r\n CanvasPool.remove(this._tempCanvas);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureManager.js?")},"./node_modules/phaser/src/textures/TextureSource.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Texture Source is the encapsulation of the actual source data for a Texture.\r\n * This is typically an Image Element, loaded from the file system or network, or a Canvas Element.\r\n *\r\n * A Texture can contain multiple Texture Sources, which only happens when a multi-atlas is loaded.\r\n *\r\n * @class TextureSource\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)} source - The source image data.\r\n * @param {integer} [width] - Optional width of the source image. If not given it\'s derived from the source itself.\r\n * @param {integer} [height] - Optional height of the source image. If not given it\'s derived from the source itself.\r\n */\r\nvar TextureSource = new Class({\r\n\r\n initialize:\r\n\r\n function TextureSource (texture, source, width, height)\r\n {\r\n var game = texture.manager.game;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.7.0\r\n */\r\n this.renderer = game.renderer;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The source of the image data.\r\n * This is either an Image Element, a Canvas Element, a RenderTexture or a WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#source\r\n * @type {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)}\r\n * @since 3.12.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The image data.\r\n * This is either an Image element or a Canvas element.\r\n *\r\n * @name Phaser.Textures.TextureSource#image\r\n * @type {(HTMLImageElement|HTMLCanvasElement)}\r\n * @since 3.0.0\r\n */\r\n this.image = source;\r\n\r\n /**\r\n * Currently un-used.\r\n *\r\n * @name Phaser.Textures.TextureSource#compressionAlgorithm\r\n * @type {integer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.compressionAlgorithm = null;\r\n\r\n /**\r\n * The resolution of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#resolution\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The width of the source image. If not specified in the constructor it will check\r\n * the `naturalWidth` and then `width` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width || source.naturalWidth || source.width || 0;\r\n\r\n /**\r\n * The height of the source image. If not specified in the constructor it will check\r\n * the `naturalHeight` and then `height` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height || source.naturalHeight || source.height || 0;\r\n\r\n /**\r\n * The Scale Mode the image will use when rendering.\r\n * Either Linear or Nearest.\r\n *\r\n * @name Phaser.Textures.TextureSource#scaleMode\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = ScaleModes.DEFAULT;\r\n\r\n /**\r\n * Is the source image a Canvas Element?\r\n *\r\n * @name Phaser.Textures.TextureSource#isCanvas\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isCanvas = (source instanceof HTMLCanvasElement);\r\n\r\n /**\r\n * Is the source image a Render Texture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isRenderTexture\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.isRenderTexture = (source.type === \'RenderTexture\');\r\n\r\n /**\r\n * Is the source image a WebGLTexture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isGLTexture\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.isGLTexture = (source instanceof WebGLTexture);\r\n\r\n /**\r\n * Are the source image dimensions a power of two?\r\n *\r\n * @name Phaser.Textures.TextureSource#isPowerOf2\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isPowerOf2 = IsSizePowerOfTwo(this.width, this.height);\r\n\r\n /**\r\n * The WebGL Texture of the source image. If this TextureSource is driven from a WebGLTexture\r\n * already, then this is a reference to that WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.glTexture = null;\r\n\r\n this.init(game);\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture, if required, and sets the Texture filter mode.\r\n *\r\n * @method Phaser.Textures.TextureSource#init\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n if (this.renderer)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n if (this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image);\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n \r\n this.glTexture = this.renderer.createTextureFromSource(null, this.width, this.height, this.scaleMode);\r\n }\r\n else if (this.isGLTexture)\r\n {\r\n this.glTexture = this.source;\r\n }\r\n else\r\n {\r\n this.glTexture = this.renderer.createTextureFromSource(this.image, this.width, this.height, this.scaleMode);\r\n }\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n }\r\n }\r\n\r\n if (!game.config.antialias)\r\n {\r\n this.setFilter(1);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * @method Phaser.Textures.TextureSource#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n this.renderer.setTextureFilter(this.glTexture, filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * If this TextureSource is backed by a Canvas and is running under WebGL,\r\n * it updates the WebGLTexture using the canvas data.\r\n *\r\n * @method Phaser.Textures.TextureSource#update\r\n * @since 3.7.0\r\n */\r\n update: function ()\r\n {\r\n if (this.renderer.gl && this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image, this.glTexture);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture Source and nulls the references.\r\n *\r\n * @method Phaser.Textures.TextureSource#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.glTexture)\r\n {\r\n this.renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n if (this.isCanvas)\r\n {\r\n CanvasPool.remove(this.image);\r\n }\r\n\r\n this.renderer = null;\r\n this.texture = null;\r\n this.source = null;\r\n this.image = null;\r\n this.glTexture = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureSource;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureSource.js?')},"./node_modules/phaser/src/textures/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Filter Types.\r\n *\r\n * @namespace Phaser.Textures.FilterMode\r\n * @memberof Phaser.Textures\r\n * @since 3.0.0\r\n */\r\nvar CONST = {\r\n\r\n /**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest neighbor filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n \r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/const.js?")},"./node_modules/phaser/src/textures/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Add Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is added to it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was added to the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager.\r\n */\r\nmodule.exports = 'addtexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ADD_EVENT.js?")},"./node_modules/phaser/src/textures/events/ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Error Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture it requested to load failed.\r\n * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that failed to load into the Texture Manager.\r\n */\r\nmodule.exports = 'onerror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ERROR_EVENT.js?")},"./node_modules/phaser/src/textures/events/LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture has finished loading on it.\r\n * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`.\r\n * \r\n * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event.\r\n *\r\n * @event Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was loaded by the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager.\r\n */\r\nmodule.exports = 'onload';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/LOAD_EVENT.js?")},"./node_modules/phaser/src/textures/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This internal event signifies that the Texture Manager is now ready and the Game can continue booting.\r\n * \r\n * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking\r\n * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game\r\n * instance, which tells the Game to carry on booting.\r\n *\r\n * @event Phaser.Textures.Events#READY\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/READY_EVENT.js?")},"./node_modules/phaser/src/textures/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Remove Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is removed from it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`.\r\n * \r\n * If you have any Game Objects still using the removed texture, they will start throwing\r\n * errors the next time they try to render. Be sure to clear all use of the texture in this event handler.\r\n *\r\n * @event Phaser.Textures.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was removed from the Texture Manager.\r\n */\r\nmodule.exports = 'removetexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/textures/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/textures/events/ADD_EVENT.js"),\r\n ERROR: __webpack_require__(/*! ./ERROR_EVENT */ "./node_modules/phaser/src/textures/events/ERROR_EVENT.js"),\r\n LOAD: __webpack_require__(/*! ./LOAD_EVENT */ "./node_modules/phaser/src/textures/events/LOAD_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/textures/events/READY_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/textures/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/index.js?')},"./node_modules/phaser/src/textures/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar FilterMode = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/textures/const.js");\r\n\r\n/**\r\n * @namespace Phaser.Textures\r\n */\r\n\r\n/**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Nearest Neighbor filter type.\r\n * \r\n * @name Phaser.Textures.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\nvar Textures = {\r\n\r\n CanvasTexture: __webpack_require__(/*! ./CanvasTexture */ "./node_modules/phaser/src/textures/CanvasTexture.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/textures/events/index.js"),\r\n FilterMode: FilterMode,\r\n Frame: __webpack_require__(/*! ./Frame */ "./node_modules/phaser/src/textures/Frame.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/textures/parsers/index.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js"),\r\n TextureManager: __webpack_require__(/*! ./TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js"),\r\n TextureSource: __webpack_require__(/*! ./TextureSource */ "./node_modules/phaser/src/textures/TextureSource.js")\r\n\r\n};\r\n\r\nTextures = Extend(false, Textures, FilterMode);\r\n\r\nmodule.exports = Textures;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/index.js?')},"./node_modules/phaser/src/textures/parsers/AtlasXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Parses an XML Texture Atlas object and adds all the Frames into a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.AtlasXML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {*} xml - The XML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar AtlasXML = function (texture, sourceIndex, xml)\r\n{\r\n // Malformed?\r\n if (!xml.getElementsByTagName('TextureAtlas'))\r\n {\r\n console.warn('Invalid Texture Atlas XML given');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = xml.getElementsByTagName('SubTexture');\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i].attributes;\r\n\r\n var name = frame.name.value;\r\n var x = parseInt(frame.x.value, 10);\r\n var y = parseInt(frame.y.value, 10);\r\n var width = parseInt(frame.width.value, 10);\r\n var height = parseInt(frame.height.value, 10);\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(name, sourceIndex, x, y, width, height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (frame.frameX)\r\n {\r\n var frameX = Math.abs(parseInt(frame.frameX.value, 10));\r\n var frameY = Math.abs(parseInt(frame.frameY.value, 10));\r\n var frameWidth = parseInt(frame.frameWidth.value, 10);\r\n var frameHeight = parseInt(frame.frameHeight.value, 10);\r\n\r\n newFrame.setTrim(\r\n width,\r\n height,\r\n frameX,\r\n frameY,\r\n frameWidth,\r\n frameHeight\r\n );\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = AtlasXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/AtlasXML.js?")},"./node_modules/phaser/src/textures/parsers/Canvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds a Canvas Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Canvas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Canvas = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Canvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Canvas.js?")},"./node_modules/phaser/src/textures/parsers/Image.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds an Image Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Image\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Image = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Image.js?")},"./node_modules/phaser/src/textures/parsers/JSONArray.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Array and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an array of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONArray\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONArray = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'] && !json['textures'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Array');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = (Array.isArray(json.textures)) ? json.textures[sourceIndex].frames : json.frames;\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var src = frames[i];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(src.filename, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n if (src.anchor)\r\n {\r\n newFrame.customPivot = true;\r\n newFrame.pivotX = src.anchor.x;\r\n newFrame.pivotY = src.anchor.y;\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONArray.js?")},"./node_modules/phaser/src/textures/parsers/JSONHash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an object of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONHash\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONHash = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Hash given, missing \\'frames\\' Object');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed Object\r\n var frames = json['frames'];\r\n var newFrame;\r\n\r\n for (var key in frames)\r\n {\r\n var src = frames[key];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(key, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONHash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONHash.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheet.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture.\r\n * \r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheet\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {integer} x - [description]\r\n * @param {integer} y - [description]\r\n * @param {integer} width - [description]\r\n * @param {integer} height - [description]\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - [description]\r\n * @param {number} [config.endFrame=-1] - [description]\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (frameWidth === null)\r\n {\r\n throw new Error('TextureManager.SpriteSheet: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var row = Math.floor((width - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n if (total === 0)\r\n {\r\n console.warn('SpriteSheet frame dimensions will result in zero frames.');\r\n }\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var fx = margin;\r\n var fy = margin;\r\n var ax = 0;\r\n var ay = 0;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n ax = 0;\r\n ay = 0;\r\n\r\n var w = fx + frameWidth;\r\n var h = fy + frameHeight;\r\n\r\n if (w > width)\r\n {\r\n ax = w - width;\r\n }\r\n\r\n if (h > height)\r\n {\r\n ay = h - height;\r\n }\r\n\r\n texture.add(i, sourceIndex, x + fx, y + fy, frameWidth - ax, frameHeight - ay);\r\n\r\n fx += frameWidth + spacing;\r\n\r\n if (fx + frameWidth > width)\r\n {\r\n fx = margin;\r\n fy += frameHeight + spacing;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheet.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheetFromAtlas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {Phaser.Textures.Frame} frame - The Frame that contains the Sprite Sheet.\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - Index of the start frame in the sprite sheet\r\n * @param {number} [config.endFrame=-1] - Index of the end frame in the sprite sheet. -1 mean all the rest of the frames\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheetFromAtlas = function (texture, frame, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (!frameWidth)\r\n {\r\n throw new Error('TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas frame)\r\n var source = texture.source[0];\r\n texture.add('__BASE', 0, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var x = frame.cutX;\r\n var y = frame.cutY;\r\n\r\n var cutWidth = frame.cutWidth;\r\n var cutHeight = frame.cutHeight;\r\n var sheetWidth = frame.realWidth;\r\n var sheetHeight = frame.realHeight;\r\n\r\n var row = Math.floor((sheetWidth - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((sheetHeight - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n // trim offsets\r\n\r\n var leftPad = frame.x;\r\n var leftWidth = frameWidth - leftPad;\r\n\r\n var rightWidth = frameWidth - ((sheetWidth - cutWidth) - leftPad);\r\n\r\n var topPad = frame.y;\r\n var topHeight = frameHeight - topPad;\r\n\r\n var bottomHeight = frameHeight - ((sheetHeight - cutHeight) - topPad);\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var sheetFrame;\r\n var frameX = margin;\r\n var frameY = margin;\r\n var frameIndex = 0;\r\n var sourceIndex = frame.sourceIndex;\r\n\r\n for (var sheetY = 0; sheetY < column; sheetY++)\r\n {\r\n var topRow = (sheetY === 0);\r\n var bottomRow = (sheetY === column - 1);\r\n\r\n for (var sheetX = 0; sheetX < row; sheetX++)\r\n {\r\n var leftRow = (sheetX === 0);\r\n var rightRow = (sheetX === row - 1);\r\n\r\n sheetFrame = texture.add(frameIndex, sourceIndex, x + frameX, y + frameY, frameWidth, frameHeight);\r\n\r\n if (leftRow || topRow || rightRow || bottomRow)\r\n {\r\n var destX = (leftRow) ? leftPad : 0;\r\n var destY = (topRow) ? topPad : 0;\r\n\r\n var trimWidth = 0;\r\n var trimHeight = 0;\r\n\r\n if (leftRow)\r\n {\r\n trimWidth += (frameWidth - leftWidth);\r\n }\r\n\r\n if (rightRow)\r\n {\r\n trimWidth += (frameWidth - rightWidth);\r\n }\r\n\r\n if (topRow)\r\n {\r\n trimHeight += (frameHeight - topHeight);\r\n }\r\n\r\n if (bottomRow)\r\n {\r\n trimHeight += (frameHeight - bottomHeight);\r\n }\r\n\r\n var destWidth = frameWidth - trimWidth;\r\n var destHeight = frameHeight - trimHeight;\r\n\r\n sheetFrame.cutWidth = destWidth;\r\n sheetFrame.cutHeight = destHeight;\r\n\r\n sheetFrame.setTrim(frameWidth, frameHeight, destX, destY, destWidth, destHeight);\r\n }\r\n\r\n frameX += spacing;\r\n\r\n if (leftRow)\r\n {\r\n frameX += leftWidth;\r\n }\r\n else if (rightRow)\r\n {\r\n frameX += rightWidth;\r\n }\r\n else\r\n {\r\n frameX += frameWidth;\r\n }\r\n\r\n frameIndex++;\r\n }\r\n\r\n frameX = margin;\r\n frameY += spacing;\r\n\r\n if (topRow)\r\n {\r\n frameY += topHeight;\r\n }\r\n else if (bottomRow)\r\n {\r\n frameY += bottomHeight;\r\n }\r\n else\r\n {\r\n frameY += frameHeight;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheetFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js?")},"./node_modules/phaser/src/textures/parsers/UnityYAML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar imageHeight = 0;\r\n\r\n/**\r\n * @function addFrame\r\n * @private\r\n * @since 3.0.0\r\n */\r\nvar addFrame = function (texture, sourceIndex, name, frame)\r\n{\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n\r\n var y = imageHeight - frame.y - frame.height;\r\n\r\n texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n /*\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n */\r\n};\r\n\r\n/**\r\n * Parses a Unity YAML File and creates Frames in the Texture.\r\n * For more details about Sprite Meta Data see https://docs.unity3d.com/ScriptReference/SpriteMetaData.html\r\n *\r\n * @function Phaser.Textures.Parsers.UnityYAML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} yaml - The YAML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar UnityYAML = function (texture, sourceIndex, yaml)\r\n{\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n imageHeight = source.height;\r\n\r\n var data = yaml.split('\\n');\r\n\r\n var lineRegExp = /^[ ]*(- )*(\\w+)+[: ]+(.*)/;\r\n\r\n var prevSprite = '';\r\n var currentSprite = '';\r\n var rect = { x: 0, y: 0, width: 0, height: 0 };\r\n\r\n // var pivot = { x: 0, y: 0 };\r\n // var border = { x: 0, y: 0, z: 0, w: 0 };\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var results = data[i].match(lineRegExp);\r\n\r\n if (!results)\r\n {\r\n continue;\r\n }\r\n\r\n var isList = (results[1] === '- ');\r\n var key = results[2];\r\n var value = results[3];\r\n\r\n if (isList)\r\n {\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n\r\n prevSprite = currentSprite;\r\n }\r\n\r\n rect = { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n\r\n if (key === 'name')\r\n {\r\n // Start new list\r\n currentSprite = value;\r\n continue;\r\n }\r\n\r\n switch (key)\r\n {\r\n case 'x':\r\n case 'y':\r\n case 'width':\r\n case 'height':\r\n rect[key] = parseInt(value, 10);\r\n break;\r\n\r\n // case 'pivot':\r\n // pivot = eval('var obj = ' + value);\r\n // break;\r\n\r\n // case 'border':\r\n // border = eval('var obj = ' + value);\r\n // break;\r\n }\r\n }\r\n\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = UnityYAML;\r\n\r\n/*\r\nExample data:\r\n\r\nTextureImporter:\r\n spritePivot: {x: .5, y: .5}\r\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\r\n spritePixelsToUnits: 100\r\n spriteSheet:\r\n sprites:\r\n - name: asteroids_0\r\n rect:\r\n serializedVersion: 2\r\n x: 5\r\n y: 328\r\n width: 65\r\n height: 82\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n - name: asteroids_1\r\n rect:\r\n serializedVersion: 2\r\n x: 80\r\n y: 322\r\n width: 53\r\n height: 88\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n spritePackingTag: Asteroids\r\n*/\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/UnityYAML.js?")},"./node_modules/phaser/src/textures/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AtlasXML: __webpack_require__(/*! ./AtlasXML */ "./node_modules/phaser/src/textures/parsers/AtlasXML.js"),\r\n Canvas: __webpack_require__(/*! ./Canvas */ "./node_modules/phaser/src/textures/parsers/Canvas.js"),\r\n Image: __webpack_require__(/*! ./Image */ "./node_modules/phaser/src/textures/parsers/Image.js"),\r\n JSONArray: __webpack_require__(/*! ./JSONArray */ "./node_modules/phaser/src/textures/parsers/JSONArray.js"),\r\n JSONHash: __webpack_require__(/*! ./JSONHash */ "./node_modules/phaser/src/textures/parsers/JSONHash.js"),\r\n SpriteSheet: __webpack_require__(/*! ./SpriteSheet */ "./node_modules/phaser/src/textures/parsers/SpriteSheet.js"),\r\n SpriteSheetFromAtlas: __webpack_require__(/*! ./SpriteSheetFromAtlas */ "./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js"),\r\n UnityYAML: __webpack_require__(/*! ./UnityYAML */ "./node_modules/phaser/src/textures/parsers/UnityYAML.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/Formats.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Formats\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * CSV Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.CSV\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CSV: 0,\r\n\r\n /**\r\n * Tiled JSON Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.TILED_JSON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TILED_JSON: 1,\r\n\r\n /**\r\n * 2D Array Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.ARRAY_2D\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n ARRAY_2D: 2,\r\n\r\n /**\r\n * Weltmeister (Impact.js) Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.WELTMEISTER\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WELTMEISTER: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Formats.js?")},"./node_modules/phaser/src/tilemaps/ImageCollection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image.\r\n *\r\n * Image Collections are normally created automatically when Tiled data is loaded.\r\n *\r\n * @class ImageCollection\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @param {string} name - The name of the image collection in the map data.\r\n * @param {integer} firstgid - The first image index this image collection contains.\r\n * @param {integer} [width=32] - Width of widest image (in pixels).\r\n * @param {integer} [height=32] - Height of tallest image (in pixels).\r\n * @param {integer} [margin=0] - The margin around all images in the collection (in pixels).\r\n * @param {integer} [spacing=0] - The spacing between each image in the collection (in pixels).\r\n * @param {object} [properties={}] - Custom Image Collection properties.\r\n */\r\nvar ImageCollection = new Class({\r\n\r\n initialize:\r\n\r\n function ImageCollection (name, firstgid, width, height, margin, spacing, properties)\r\n {\r\n if (width === undefined || width <= 0) { width = 32; }\r\n if (height === undefined || height <= 0) { height = 32; }\r\n if (margin === undefined) { margin = 0; }\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n /**\r\n * The name of the Image Collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The Tiled firstgid value.\r\n * This is the starting index of the first image index this Image Collection contains.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid | 0;\r\n\r\n /**\r\n * The width of the widest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageWidth = width | 0;\r\n\r\n /**\r\n * The height of the tallest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageHeight = height | 0;\r\n\r\n /**\r\n * The margin around the images in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageMarge\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageMargin = margin | 0;\r\n\r\n /**\r\n * The spacing between each image in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageSpacing = spacing | 0;\r\n\r\n /**\r\n * Image Collection-specific properties that are typically defined in the Tiled editor.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = properties || {};\r\n\r\n /**\r\n * The cached images that are a part of this collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#images\r\n * @type {array}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.images = [];\r\n\r\n /**\r\n * The total number of images in the image collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this image collection contains the given image index.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#containsImageIndex\r\n * @since 3.0.0\r\n * \r\n * @param {integer} imageIndex - The image index to search for.\r\n * \r\n * @return {boolean} True if this Image Collection contains the given index.\r\n */\r\n containsImageIndex: function (imageIndex)\r\n {\r\n return (imageIndex >= this.firstgid && imageIndex < (this.firstgid + this.total));\r\n },\r\n\r\n /**\r\n * Add an image to this Image Collection.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#addImage\r\n * @since 3.0.0\r\n * \r\n * @param {integer} gid - The gid of the image in the Image Collection.\r\n * @param {string} image - The the key of the image in the Image Collection and in the cache.\r\n *\r\n * @return {Phaser.Tilemaps.ImageCollection} This ImageCollection object.\r\n */\r\n addImage: function (gid, image)\r\n {\r\n this.images.push({ gid: gid, image: image });\r\n this.total++;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImageCollection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ImageCollection.js?')},"./node_modules/phaser/src/tilemaps/ParseToTilemap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Parse = __webpack_require__(/*! ./parsers/Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js");\r\nvar Tilemap = __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js");\r\n\r\n/**\r\n * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When\r\n * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from\r\n * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For\r\n * an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @function Phaser.Tilemaps.ParseToTilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels.\r\n * @param {integer} [width=10] - The width of the map in tiles.\r\n * @param {integer} [height=10] - The height of the map in tiles.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nvar ParseToTilemap = function (scene, key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n if (tileWidth === undefined) { tileWidth = 32; }\r\n if (tileHeight === undefined) { tileHeight = 32; }\r\n if (width === undefined) { width = 10; }\r\n if (height === undefined) { height = 10; }\r\n if (insertNull === undefined) { insertNull = false; }\r\n\r\n var mapData = null;\r\n\r\n if (Array.isArray(data))\r\n {\r\n var name = key !== undefined ? key : \'map\';\r\n mapData = Parse(name, Formats.ARRAY_2D, data, tileWidth, tileHeight, insertNull);\r\n }\r\n else if (key !== undefined)\r\n {\r\n var tilemapData = scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData)\r\n {\r\n console.warn(\'No map data found for key \' + key);\r\n }\r\n else\r\n {\r\n mapData = Parse(key, tilemapData.format, tilemapData.data, tileWidth, tileHeight, insertNull);\r\n }\r\n }\r\n\r\n if (mapData === null)\r\n {\r\n mapData = new MapData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n }\r\n\r\n return new Tilemap(scene, mapData);\r\n};\r\n\r\nmodule.exports = ParseToTilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ParseToTilemap.js?')},"./node_modules/phaser/src/tilemaps/Tile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle */ \"./node_modules/phaser/src/geom/rectangle/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data\r\n * representation, so its position information is stored without factoring in scroll, layer\r\n * scale or layer position.\r\n *\r\n * @class Tile\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The LayerData object in the Tilemap that this tile belongs to.\r\n * @param {integer} index - The unique index of this tile within the map.\r\n * @param {integer} x - The x coordinate of this tile in tile coordinates.\r\n * @param {integer} y - The y coordinate of this tile in tile coordinates.\r\n * @param {integer} width - Width of the tile in pixels.\r\n * @param {integer} height - Height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels). Tiled maps support\r\n * multiple tileset sizes within one map, but they are still placed at intervals of the base\r\n * tile width.\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels). Tiled maps\r\n * support multiple tileset sizes within one map, but they are still placed at intervals of the\r\n * base tile height.\r\n */\r\nvar Tile = new Class({\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Flip,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Tile (layer, index, x, y, width, height, baseWidth, baseHeight)\r\n {\r\n /**\r\n * The LayerData in the Tilemap data that this tile belongs to.\r\n *\r\n * @name Phaser.Tilemaps.Tile#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = layer;\r\n\r\n /**\r\n * The index of this tile within the map data corresponding to the tileset, or -1 if this\r\n * represents a blank tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The x map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#x\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseWidth = (baseWidth !== undefined) ? baseWidth : width;\r\n\r\n /**\r\n * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseHeight = (baseHeight !== undefined) ? baseHeight : height;\r\n\r\n /**\r\n * The x coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelX = 0;\r\n\r\n /**\r\n * The y coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelY = 0;\r\n\r\n this.updatePixelXY();\r\n\r\n /**\r\n * Tile specific properties. These usually come from Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tile#properties\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.properties = {};\r\n\r\n /**\r\n * The rotation angle of this tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the left side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the right side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideRight = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the top side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideUp\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideUp = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the bottom side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideDown\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideDown = false;\r\n\r\n /**\r\n * Whether the tile's left edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceLeft = false;\r\n\r\n /**\r\n * Whether the tile's right edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceRight = false;\r\n\r\n /**\r\n * Whether the tile's top edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceTop\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceTop = false;\r\n\r\n /**\r\n * Whether the tile's bottom edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceBottom\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceBottom = false;\r\n\r\n /**\r\n * Tile collision callback.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallback = null;\r\n\r\n /**\r\n * The context in which the collision callback will be called.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallbackContext\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallbackContext = this;\r\n\r\n /**\r\n * The tint to apply to this tile. Note: tint is currently a single color value instead of\r\n * the 4 corner tint component on other GameObjects.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tint\r\n * @type {number}\r\n * @default\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * An empty object where physics-engine specific information (e.g. bodies) may be stored.\r\n *\r\n * @name Phaser.Tilemaps.Tile#physics\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.physics = {};\r\n },\r\n\r\n /**\r\n * Check if the given x and y world coordinates are within this Tile. This does not factor in\r\n * camera scroll, layer scale or layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#containsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to test.\r\n * @param {number} y - The y coordinate to test.\r\n *\r\n * @return {boolean} True if the coordinates are within this Tile, otherwise false.\r\n */\r\n containsPoint: function (x, y)\r\n {\r\n return !(x < this.pixelX || y < this.pixelY || x > this.right || y > this.bottom);\r\n },\r\n\r\n /**\r\n * Copies the tile data & properties from the given tile to this tile. This copies everything\r\n * except for position and interesting faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The tile to copy from.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n copy: function (tile)\r\n {\r\n this.index = tile.index;\r\n this.alpha = tile.alpha;\r\n this.properties = tile.properties;\r\n this.visible = tile.visible;\r\n this.setFlip(tile.flipX, tile.flipY);\r\n this.tint = tile.tint;\r\n this.rotation = tile.rotation;\r\n this.collideUp = tile.collideUp;\r\n this.collideDown = tile.collideDown;\r\n this.collideLeft = tile.collideLeft;\r\n this.collideRight = tile.collideRight;\r\n this.collisionCallback = tile.collisionCallback;\r\n this.collisionCallbackContext = tile.collisionCallbackContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The collision group for this Tile, defined within the Tileset. This returns a reference to\r\n * the collision group stored within the Tileset, so any modification of the returned object\r\n * will impact all tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getCollisionGroup: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileCollisionGroup(this.index) : null;\r\n },\r\n\r\n /**\r\n * The tile data for this Tile, defined within the Tileset. This typically contains Tiled\r\n * collision data, tile animations and terrain information. This returns a reference to the tile\r\n * data stored within the Tileset, so any modification of the returned object will impact all\r\n * tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTileData\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getTileData: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileData(this.index) : null;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the left side of the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getLeft: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? tilemapLayer.tileToWorldX(this.x, camera) : this.x * this.baseWidth;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the right side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getRight: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? this.getLeft(camera) + this.width * tilemapLayer.scaleX : this.getLeft(camera) + this.width;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the top side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getTop: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile in grid\r\n // units is the bottom left, so the y coordinate needs to be adjusted by the difference\r\n // between the base size and this tile's size.\r\n return tilemapLayer\r\n ? tilemapLayer.tileToWorldY(this.y, camera) - (this.height - this.baseHeight) * tilemapLayer.scaleY\r\n : this.y * this.baseHeight - (this.height - this.baseHeight);\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the bottom side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n\r\n * @method Phaser.Tilemaps.Tile#getBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getBottom: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer\r\n ? this.getTop(camera) + this.height * tilemapLayer.scaleY\r\n : this.getTop(camera) + this.height;\r\n },\r\n\r\n\r\n /**\r\n * Gets the world rectangle bounding box for the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n * @param {object} [output] - [description]\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)}\r\n */\r\n getBounds: function (camera, output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.x = this.getLeft();\r\n output.y = this.getTop();\r\n output.width = this.getRight() - output.x;\r\n output.height = this.getBottom() - output.y;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterX: function (camera)\r\n {\r\n return (this.getLeft(camera) + this.getRight(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterY: function (camera)\r\n {\r\n return (this.getTop(camera) + this.getBottom(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Clean up memory.\r\n *\r\n * @method Phaser.Tilemaps.Tile#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n this.properties = undefined;\r\n },\r\n\r\n /**\r\n * Check for intersection with this tile. This does not factor in camera scroll, layer scale or\r\n * layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x axis in pixels.\r\n * @param {number} y - The y axis in pixels.\r\n * @param {number} right - The right point.\r\n * @param {number} bottom - The bottom point.\r\n *\r\n * @return {boolean}\r\n */\r\n intersects: function (x, y, right, bottom)\r\n {\r\n return !(\r\n right <= this.pixelX || bottom <= this.pixelY ||\r\n x >= this.right || y >= this.bottom\r\n );\r\n },\r\n\r\n /**\r\n * Checks if the tile is interesting.\r\n *\r\n * @method Phaser.Tilemaps.Tile#isInteresting\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} collides - If true, will consider the tile interesting if it collides on any side.\r\n * @param {boolean} faces - If true, will consider the tile interesting if it has an interesting face.\r\n *\r\n * @return {boolean} True if the Tile is interesting, otherwise false.\r\n */\r\n isInteresting: function (collides, faces)\r\n {\r\n if (collides && faces) { return (this.canCollide || this.hasInterestingFace); }\r\n else if (collides) { return this.collides; }\r\n else if (faces) { return this.hasInterestingFace; }\r\n return false;\r\n },\r\n\r\n /**\r\n * Reset collision status flags.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetCollision: function (recalculateFaces)\r\n {\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = false;\r\n this.collideRight = false;\r\n this.collideUp = false;\r\n this.collideDown = false;\r\n\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetFaces\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetFaces: function ()\r\n {\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision flags for each side of this tile and updates the interesting faces list.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} left - Indicating collide with any object on the left.\r\n * @param {boolean} [right] - Indicating collide with any object on the right.\r\n * @param {boolean} [up] - Indicating collide with any object on the top.\r\n * @param {boolean} [down] - Indicating collide with any object on the bottom.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces\r\n * for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollision: function (left, right, up, down, recalculateFaces)\r\n {\r\n if (right === undefined) { right = left; }\r\n if (up === undefined) { up = left; }\r\n if (down === undefined) { down = left; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = left;\r\n this.collideRight = right;\r\n this.collideUp = up;\r\n this.collideDown = down;\r\n\r\n this.faceLeft = left;\r\n this.faceRight = right;\r\n this.faceTop = up;\r\n this.faceBottom = down;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback to be called when this tile is hit by an object. The callback must true for\r\n * collision processing to take place.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollisionCallback\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - Callback function.\r\n * @param {object} context - Callback will be called within this context.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollisionCallback: function (callback, context)\r\n {\r\n if (callback === null)\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n }\r\n else\r\n {\r\n this.collisionCallback = callback;\r\n this.collisionCallbackContext = context;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the tile and updates its pixelX and pixelY.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tile in pixels.\r\n * @param {integer} tileHeight - The height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels).\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setSize: function (tileWidth, tileHeight, baseWidth, baseHeight)\r\n {\r\n if (tileWidth !== undefined) { this.width = tileWidth; }\r\n if (tileHeight !== undefined) { this.height = tileHeight; }\r\n if (baseWidth !== undefined) { this.baseWidth = baseWidth; }\r\n if (baseHeight !== undefined) { this.baseHeight = baseHeight; }\r\n\r\n this.updatePixelXY();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Used internally. Updates the tile's world XY position based on the current tile size.\r\n *\r\n * @method Phaser.Tilemaps.Tile#updatePixelXY\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n updatePixelXY: function ()\r\n {\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile is the\r\n // bottom left, while the Phaser renderer assumes the origin is the top left. The y\r\n // coordinate needs to be adjusted by the difference.\r\n this.pixelX = this.x * this.baseWidth;\r\n this.pixelY = this.y * this.baseHeight;\r\n\r\n // this.pixelY = this.y * this.baseHeight - (this.height - this.baseHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces or has a collision callback set.\r\n *\r\n * @name Phaser.Tilemaps.Tile#canCollide\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canCollide: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.collisionCallback);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collides\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile has any interesting faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#hasInterestingFace\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n hasInterestingFace: {\r\n get: function ()\r\n {\r\n return (this.faceTop || this.faceBottom || this.faceLeft || this.faceRight);\r\n }\r\n },\r\n\r\n /**\r\n * The tileset that contains this Tile. This is null if accessed from a LayerData instance\r\n * before the tile is placed in a StaticTilemapLayer or DynamicTilemapLayer, or if the tile has\r\n * an index that doesn't correspond to any of the map's tilesets.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tileset\r\n * @type {?Phaser.Tilemaps.Tileset}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tileset: {\r\n\r\n get: function ()\r\n {\r\n var tilemapLayer = this.layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n var tileset = tilemapLayer.gidMap[this.index];\r\n\r\n if (tileset)\r\n {\r\n return tileset;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tilemap layer that contains this Tile. This will only return null if accessed from a\r\n * LayerData instance before the tile is placed within a StaticTilemapLayer or\r\n * DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemapLayer\r\n * @type {?Phaser.Tilemaps.StaticTilemapLayer|Phaser.Tilemaps.DynamicTilemapLayer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemapLayer: {\r\n get: function ()\r\n {\r\n return this.layer.tilemapLayer;\r\n }\r\n },\r\n\r\n /**\r\n * The tilemap that contains this Tile. This will only return null if accessed from a LayerData\r\n * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemap\r\n * @type {?Phaser.Tilemaps.Tilemap}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemap: {\r\n get: function ()\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer ? tilemapLayer.tilemap : null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tile.js?")},"./node_modules/phaser/src/tilemaps/Tilemap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DynamicTilemapLayer = __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar Formats = __webpack_require__(/*! ./Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar LayerData = __webpack_require__(/*! ./mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar Rotate = __webpack_require__(/*! ../math/Rotate */ \"./node_modules/phaser/src/math/Rotate.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar StaticTilemapLayer = __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js\");\r\nvar Tile = __webpack_require__(/*! ./Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar Tileset = __webpack_require__(/*! ./Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * @callback TilemapFilterCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found in the filtered area.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The object.\r\n */\r\n\r\n/**\r\n * @callback TilemapFindCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {boolean} `true` if the callback should be invoked, otherwise `false`.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data\r\n * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or\r\n * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display\r\n * objects that actually render tiles.\r\n *\r\n * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free\r\n * software package specifically for creating tile maps, and is available from:\r\n * http://www.mapeditor.org\r\n *\r\n * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only\r\n * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer.\r\n *\r\n * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a\r\n * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides\r\n * it.\r\n *\r\n * @class Tilemap\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {Phaser.Tilemaps.MapData} mapData - A MapData instance containing Tilemap data.\r\n */\r\nvar Tilemap = new Class({\r\n\r\n initialize:\r\n\r\n function Tilemap (scene, mapData)\r\n {\r\n /**\r\n * @name Phaser.Tilemaps.Tilemap#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The base width of a tile in pixels. Note that individual layers may have a different tile\r\n * width.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = mapData.tileWidth;\r\n\r\n /**\r\n * The base height of a tile in pixels. Note that individual layers may have a different\r\n * tile height.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = mapData.tileHeight;\r\n\r\n /**\r\n * The width of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = mapData.width;\r\n\r\n /**\r\n * The height of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = mapData.height;\r\n\r\n /**\r\n * The orientation of the map data (as specified in Tiled), usually 'orthogonal'.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = mapData.orientation;\r\n\r\n /**\r\n * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'.\r\n *\r\n * The draw orders are:\r\n *\r\n * right-down\r\n * left-down\r\n * right-up\r\n * left-up\r\n *\r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = mapData.renderOrder;\r\n\r\n /**\r\n * The format of the map data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#format\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.format = mapData.format;\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled, usually 1).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#version\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.version = mapData.version;\r\n\r\n /**\r\n * Map specific properties as specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = mapData.properties;\r\n\r\n /**\r\n * The width of the map in pixels based on width * tileWidth.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = mapData.widthInPixels;\r\n\r\n /**\r\n * The height of the map in pixels based on height * tileHeight.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = mapData.heightInPixels;\r\n\r\n /**\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#imageCollections\r\n * @type {Phaser.Tilemaps.ImageCollection[]}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = mapData.imageCollections;\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = mapData.images;\r\n\r\n /**\r\n * An array of Tilemap layer data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layers\r\n * @type {Phaser.Tilemaps.LayerData[]}\r\n * @since 3.0.0\r\n */\r\n this.layers = mapData.layers;\r\n\r\n /**\r\n * An array of Tilesets used in the map.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = mapData.tilesets;\r\n\r\n /**\r\n * An array of ObjectLayer instances parsed from Tiled object layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#objects\r\n * @type {Phaser.Tilemaps.ObjectLayer[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = mapData.objects;\r\n\r\n /**\r\n * The index of the currently selected LayerData object.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#currentLayerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentLayerIndex = 0;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this map.\r\n *\r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n *\r\n * The draw orders are:\r\n *\r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n *\r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n *\r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * Calling this method _after_ creating Static or Dynamic Tilemap Layers will **not** automatically\r\n * update them to use the new render order. If you call this method after creating layers, use their\r\n * own `setRenderOrder` methods to change them as needed.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'number')\r\n {\r\n renderOrder = orders[renderOrder];\r\n }\r\n\r\n if (orders.indexOf(renderOrder) > -1)\r\n {\r\n this.renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.\r\n * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled\r\n * editor.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#addTilesetImage\r\n * @since 3.0.0\r\n *\r\n * @param {string} tilesetName - The name of the tileset as specified in the map data.\r\n * @param {string} [key] - The key of the Phaser.Cache image used for this tileset. If\r\n * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter.\r\n * @param {integer} [tileWidth] - The width of the tile (in pixels) in the Tileset Image. If not\r\n * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled\r\n * JSON file.\r\n * @param {integer} [tileHeight] - The height of the tiles (in pixels) in the Tileset Image. If\r\n * not given it will default to the map's tileHeight value, or the tileHeight specified in the\r\n * Tiled JSON file.\r\n * @param {integer} [tileMargin] - The margin around the tiles in the sheet (in pixels). If not\r\n * specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [tileSpacing] - The spacing between each the tile in the sheet (in pixels).\r\n * If not specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [gid=0] - If adding multiple tilesets to a blank map, specify the starting\r\n * GID this set will use here.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} Returns the Tileset object that was created or updated, or null if it\r\n * failed.\r\n */\r\n addTilesetImage: function (tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid)\r\n {\r\n if (tilesetName === undefined) { return null; }\r\n if (key === undefined || key === null) { key = tilesetName; }\r\n\r\n if (!this.scene.sys.textures.exists(key))\r\n {\r\n console.warn('Invalid Tileset Image: ' + key);\r\n return null;\r\n }\r\n\r\n var texture = this.scene.sys.textures.get(key);\r\n\r\n var index = this.getTilesetIndex(tilesetName);\r\n\r\n if (index === null && this.format === Formats.TILED_JSON)\r\n {\r\n console.warn('No data found for Tileset: ' + tilesetName);\r\n return null;\r\n }\r\n\r\n var tileset = this.tilesets[index];\r\n\r\n if (tileset)\r\n {\r\n tileset.setTileSize(tileWidth, tileHeight);\r\n tileset.setSpacing(tileMargin, tileSpacing);\r\n tileset.setImage(texture);\r\n\r\n return tileset;\r\n }\r\n\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (gid === undefined) { gid = 0; }\r\n\r\n tileset = new Tileset(tilesetName, gid, tileWidth, tileHeight, tileMargin, tileSpacing);\r\n\r\n tileset.setImage(texture);\r\n\r\n this.tilesets.push(tileset);\r\n\r\n return tileset;\r\n },\r\n\r\n /**\r\n * Turns the DynamicTilemapLayer associated with the given layer into a StaticTilemapLayer. If\r\n * no layer specified, the map's current layer is used. This is useful if you want to manipulate\r\n * a map at the start of a scene, but then make it non-manipulable and optimize it for speed.\r\n * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value\r\n * returned from this method if you want to manipulate the new StaticTilemapLayer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#convertLayerToStatic\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer)} [layer] - The name of the layer from Tiled, the\r\n * index of the layer in the map, or a DynamicTilemapLayer.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer that was created, or null if it\r\n * failed.\r\n */\r\n convertLayerToStatic: function (layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n var dynamicLayer = layer.tilemapLayer;\r\n\r\n if (!dynamicLayer || !(dynamicLayer instanceof DynamicTilemapLayer))\r\n {\r\n return null;\r\n }\r\n\r\n var staticLayer = new StaticTilemapLayer(\r\n dynamicLayer.scene,\r\n dynamicLayer.tilemap,\r\n dynamicLayer.layerIndex,\r\n dynamicLayer.tileset,\r\n dynamicLayer.x,\r\n dynamicLayer.y\r\n );\r\n\r\n this.scene.sys.displayList.add(staticLayer);\r\n\r\n dynamicLayer.destroy();\r\n\r\n return staticLayer;\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'copy')) { return this; }\r\n\r\n if (layer !== null)\r\n {\r\n TilemapComponents.Copy(\r\n srcTileX, srcTileY,\r\n width, height,\r\n destTileX, destTileY,\r\n recalculateFaces, layer\r\n );\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set to this new layer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createBlankDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of this layer. Must be unique within the map.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n * @param {integer} [width] - The width of the layer in tiles. If not specified, it will default to the map's width.\r\n * @param {integer} [height] - The height of the layer in tiles. If not specified, it will default to the map's height.\r\n * @param {integer} [tileWidth] - The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth.\r\n * @param {integer} [tileHeight] - The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer that was created, or `null` if it failed.\r\n */\r\n createBlankDynamicLayer: function (name, tileset, x, y, width, height, tileWidth, tileHeight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n\r\n var index = this.getLayerIndex(name);\r\n\r\n if (index !== null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + name);\r\n return null;\r\n }\r\n\r\n var layerData = new LayerData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n\r\n var row;\r\n\r\n for (var tileY = 0; tileY < height; tileY++)\r\n {\r\n row = [];\r\n\r\n for (var tileX = 0; tileX < width; tileX++)\r\n {\r\n row.push(new Tile(layerData, -1, tileX, tileY, tileWidth, tileHeight, this.tileWidth, this.tileHeight));\r\n }\r\n\r\n layerData.data.push(row);\r\n }\r\n\r\n this.layers.push(layerData);\r\n\r\n this.currentLayerIndex = this.layers.length - 1;\r\n\r\n var dynamicLayer = new DynamicTilemapLayer(this.scene, this, this.currentLayerIndex, tileset, x, y);\r\n\r\n dynamicLayer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(dynamicLayer);\r\n\r\n return dynamicLayer;\r\n },\r\n\r\n /**\r\n * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createDynamicLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n\r\n if (x === undefined)\r\n {\r\n x = layerData.x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n y = layerData.y;\r\n }\r\n\r\n var layer = new DynamicTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given gid in the map data. All properties from\r\n * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy\r\n * way to configure Sprite properties from within the map editor. For example giving an object a\r\n * property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created.\r\n *\r\n * Custom object properties not sharing names with the Sprite's own properties are copied to the\r\n * Sprite's {@link Phaser.GameObjects.Sprite#data data store}.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromObjects\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the object layer (from Tiled) to create Sprites from.\r\n * @param {(integer|string)} id - Either the id (object), gid (tile object) or name (object or\r\n * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects\r\n * with the same graphic. The same name can be used on multiple objects.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=the scene the map is within] - The Scene to create the Sprites within.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromObjects: function (name, id, spriteConfig, scene)\r\n {\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n if (scene === undefined) { scene = this.scene; }\r\n\r\n var objectLayer = this.getObjectLayer(name);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('Cannot create from object. Invalid objectgroup name given: ' + name);\r\n return;\r\n }\r\n\r\n var objects = objectLayer.objects;\r\n var sprites = [];\r\n\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n var found = false;\r\n var obj = objects[i];\r\n\r\n if (obj.gid !== undefined && typeof id === 'number' && obj.gid === id ||\r\n obj.id !== undefined && typeof id === 'number' && obj.id === id ||\r\n obj.name !== undefined && typeof id === 'string' && obj.name === id)\r\n {\r\n found = true;\r\n }\r\n\r\n if (found)\r\n {\r\n var config = Extend({}, spriteConfig, obj.properties);\r\n\r\n config.x = obj.x;\r\n config.y = obj.y;\r\n\r\n var sprite = scene.make.sprite(config);\r\n\r\n sprite.name = obj.name;\r\n\r\n if (obj.width) { sprite.displayWidth = obj.width; }\r\n if (obj.height) { sprite.displayHeight = obj.height; }\r\n\r\n // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin.\r\n var offset = {\r\n x: sprite.originX * sprite.displayWidth,\r\n y: (sprite.originY - 1) * sprite.displayHeight\r\n };\r\n\r\n // If the object is rotated, then the origin offset also needs to be rotated.\r\n if (obj.rotation)\r\n {\r\n var angle = DegToRad(obj.rotation);\r\n Rotate(offset, angle);\r\n sprite.rotation = angle;\r\n }\r\n\r\n sprite.x += offset.x;\r\n sprite.y += offset.y;\r\n\r\n if (obj.flippedHorizontal !== undefined || obj.flippedVertical !== undefined)\r\n {\r\n sprite.setFlip(obj.flippedHorizontal, obj.flippedVertical);\r\n }\r\n\r\n if (!obj.visible) { sprite.visible = false; }\r\n\r\n for (var key in obj.properties)\r\n {\r\n if (sprite.hasOwnProperty(key))\r\n {\r\n continue;\r\n }\r\n\r\n sprite.setData(key, obj.properties[key]);\r\n }\r\n\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.GameObjects.Sprite[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, layer);\r\n },\r\n\r\n /**\r\n * Creates a new StaticTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for\r\n * more information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createStaticLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createStaticLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n if (x === undefined && this.layers[index].x) { x = this.layers[index].x; }\r\n if (y === undefined && this.layers[index].y) { y = this.layers[index].y; }\r\n\r\n var layer = new StaticTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any\r\n * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllLayers();\r\n this.tilesets.length = 0;\r\n this.objects.length = 0;\r\n this.scene = undefined;\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n if (this._isStaticCall(layer, 'fill')) { return this; }\r\n\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each object in the given object layer, run the given filter callback function. Any\r\n * objects that pass the filter test (i.e. where the callback returns true) will returned as a\r\n * new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterObjects\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFilterCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject[]} An array of object that match the search, or null if the objectLayer given was invalid.\r\n */\r\n filterObjects: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.filter(callback, context);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findByIndex: function (findIndex, skip, reverse, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, layer);\r\n },\r\n\r\n /**\r\n * Find the first object in the given object layer that satisfies the provided testing function.\r\n * I.e. finds the first object for which `callback` returns true. Similar to\r\n * Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findObject\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFindCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} An object that matches the search, or null if no object found.\r\n */\r\n findObject: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.find(callback, context) || null;\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the image layer index based on its name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getImageIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the image to get.\r\n *\r\n * @return {integer} The index of the image in this tilemap, or null if not found.\r\n */\r\n getImageIndex: function (name)\r\n {\r\n return this.getIndex(this.images, name);\r\n },\r\n\r\n /**\r\n * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name\r\n * property matches the given `name`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {array} location - The Tilemap array to search.\r\n * @param {string} name - The name of the array element to get.\r\n *\r\n * @return {number} The index of the element in the array, or null if not found.\r\n */\r\n getIndex: function (location, name)\r\n {\r\n for (var i = 0; i < location.length; i++)\r\n {\r\n if (location[i].name === name)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the maps current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.LayerData} The corresponding LayerData within this.layers.\r\n */\r\n getLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n return (index !== null) ? this.layers[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer\r\n * is found with that name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getObjectLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} [name] - The name of the object layer from Tiled.\r\n *\r\n * @return {?Phaser.Tilemaps.ObjectLayer} The corresponding ObjectLayer within this.objects or null.\r\n */\r\n getObjectLayer: function (name)\r\n {\r\n var index = this.getIndex(this.objects, name);\r\n\r\n return (index !== null) ? this.objects[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndex: function (layer)\r\n {\r\n if (layer === undefined)\r\n {\r\n return this.currentLayerIndex;\r\n }\r\n else if (typeof layer === 'string')\r\n {\r\n return this.getLayerIndexByName(layer);\r\n }\r\n else if (typeof layer === 'number' && layer < this.layers.length)\r\n {\r\n return layer;\r\n }\r\n else if (layer instanceof StaticTilemapLayer || layer instanceof DynamicTilemapLayer)\r\n {\r\n return layer.layerIndex;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the index of the LayerData within this.layers that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndexByName\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the layer to get.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndexByName: function (name)\r\n {\r\n return this.getIndex(this.layers, name);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the Tileset that has the given `name`, or null if an invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileset\r\n * @since 3.14.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} The Tileset, or `null` if no matching named tileset was found.\r\n */\r\n getTileset: function (name)\r\n {\r\n var index = this.getIndex(this.tilesets, name);\r\n\r\n return (index !== null) ? this.tilesets[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {integer} The Tileset index within this.tilesets.\r\n */\r\n getTilesetIndex: function (name)\r\n {\r\n return this.getIndex(this.tilesets, name);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAt(tileX, tileY, layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, layer);\r\n },\r\n\r\n /**\r\n * The LayerData object that is currently selected in the map. You can set this property using\r\n * any type supported by setLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n layer: {\r\n get: function ()\r\n {\r\n return this.layers[this.currentLayerIndex];\r\n },\r\n\r\n set: function (layer)\r\n {\r\n this.setLayer(layer);\r\n }\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid or the coordinates were out of bounds.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTilesAt')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'randomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given TilemapLayer from this Tilemap without destroying it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be removed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n removeLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the given TilemapLayer and removes it from this Tilemap.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroyLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be destroyed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n destroyLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n layer = this.layers[index];\r\n\r\n layer.destroy();\r\n\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or\r\n * DynamicTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeAllLayers\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n removeAllLayers: function ()\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].tilemapLayer)\r\n {\r\n layers[i].tilemapLayer.destroy(false);\r\n }\r\n }\r\n\r\n layers.length = 0;\r\n\r\n this.currentLayerIndex = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Tile, or an array of Tiles, from the layer to which they belong,\r\n * and optionally recalculates the collision information.\r\n *\r\n * This cannot be applied to Tiles that belong to Static Tilemap Layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTile\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Tilemaps.Tile|Phaser.Tilemaps.Tile[])} tiles - The Tile to remove, or an array of Tiles.\r\n * @param {integer} [replaceIndex=-1] - After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Returns an array of Tiles that were removed.\r\n */\r\n removeTile: function (tiles, replaceIndex, recalculateFaces)\r\n {\r\n if (replaceIndex === undefined) { replaceIndex = -1; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var removed = [];\r\n\r\n if (!Array.isArray(tiles))\r\n {\r\n tiles = [ tiles ];\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n removed.push(this.removeTileAt(tile.x, tile.y, true, recalculateFaces, tile.tilemapLayer));\r\n\r\n if (replaceIndex > -1)\r\n {\r\n this.putTileAt(replaceIndex, tile.x, tile.y, recalculateFaces, tile.tilemapLayer);\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns the Tile that was removed, or null if the layer given was invalid.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebug: function (graphics, styleConfig, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws a debug representation of all layers within this Tilemap to the given Graphics object.\r\n *\r\n * This is helpful when you want to get a quick idea of which of your tiles are colliding and which\r\n * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to\r\n * place the debug representation wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebugFull\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebugFull: function (graphics, styleConfig)\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layers[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'replaceByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordindates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current layer to the LayerData associated with `layer`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n this.currentLayerIndex = index;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and\r\n * tileHeight for all layers. This also updates the base size on all tiles across all layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setBaseTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles the map uses for calculations.\r\n * @param {integer} tileHeight - The height of the tiles the map uses for calculations.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setBaseTileSize: function (tileWidth, tileHeight)\r\n {\r\n this.tileWidth = tileWidth;\r\n this.tileHeight = tileHeight;\r\n this.widthInPixels = this.width * tileWidth;\r\n this.heightInPixels = this.height * tileHeight;\r\n\r\n // Update the base tile size on all layers & tiles\r\n for (var i = 0; i < this.layers.length; i++)\r\n {\r\n this.layers[i].baseTileWidth = tileWidth;\r\n this.layers[i].baseTileHeight = tileHeight;\r\n\r\n var mapData = this.layers[i].data;\r\n var mapWidth = this.layers[i].width;\r\n var mapHeight = this.layers[i].height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(undefined, undefined, tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's\r\n * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any\r\n * tiles the layer has.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayerTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles (in pixels) in the layer.\r\n * @param {integer} tileHeight - The height of the tiles (in pixels) in the layer.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayerTileSize: function (tileWidth, tileHeight, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return this; }\r\n\r\n layer.tileWidth = tileWidth;\r\n layer.tileHeight = tileHeight;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n shuffle: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'shuffle')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'swapByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldX: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldX(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldY: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldY(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the map's current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'weightedRandomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Used internally to check if a layer is static and prints out a warning.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#_isStaticCall\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean}\r\n */\r\n _isStaticCall: function (layer, functionName)\r\n {\r\n if (layer.tilemapLayer instanceof StaticTilemapLayer)\r\n {\r\n console.warn(functionName + ': You cannot change the tiles in a static tilemap layer');\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tilemap.js?")},"./node_modules/phaser/src/tilemaps/TilemapCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Types.Tilemaps.TilemapConfig} [config] - The config options for the Tilemap.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectCreator.register(\'tilemap\', function (config)\r\n{\r\n // Defaults are applied in ParseToTilemap\r\n var c = (config !== undefined) ? config : {};\r\n\r\n return ParseToTilemap(\r\n this.scene,\r\n c.key,\r\n c.tileWidth,\r\n c.tileHeight,\r\n c.width,\r\n c.height,\r\n c.data,\r\n c.insertNull\r\n );\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapCreator.js?')},"./node_modules/phaser/src/tilemaps/TilemapFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ \"./node_modules/phaser/src/tilemaps/ParseToTilemap.js\");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tilemap\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [width=10] - The width of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [height=10] - The height of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes. Pass in `null` for no data.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n // Allow users to specify null to indicate that they want the default value, since null is\r\n // shorter & more legible than undefined. Convert null to undefined to allow ParseToTilemap\r\n // defaults to take effect.\r\n\r\n if (key === null) { key = undefined; }\r\n if (tileWidth === null) { tileWidth = undefined; }\r\n if (tileHeight === null) { tileHeight = undefined; }\r\n if (width === null) { width = undefined; }\r\n if (height === null) { height = undefined; }\r\n\r\n return ParseToTilemap(this.scene, key, tileWidth, tileHeight, width, height, data, insertNull);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapFactory.js?")},"./node_modules/phaser/src/tilemaps/Tileset.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tileset is a combination of an image containing the tiles and a container for data about\r\n * each tile.\r\n *\r\n * @class Tileset\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tileset in the map data.\r\n * @param {integer} firstgid - The first tile index this tileset contains.\r\n * @param {integer} [tileWidth=32] - Width of each tile (in pixels).\r\n * @param {integer} [tileHeight=32] - Height of each tile (in pixels).\r\n * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels).\r\n * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels).\r\n * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset.\r\n * These typically are custom properties created in Tiled when editing a tileset.\r\n * @param {object} [tileData={}] - Data stored per tile. These typically are created in Tiled\r\n * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor.\r\n */\r\nvar Tileset = new Class({\r\n\r\n initialize:\r\n\r\n function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData)\r\n {\r\n if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; }\r\n if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (tileProperties === undefined) { tileProperties = {}; }\r\n if (tileData === undefined) { tileData = {}; }\r\n\r\n /**\r\n * The name of the Tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The starting index of the first tile index this Tileset contains.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid;\r\n\r\n /**\r\n * The width of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = tileWidth;\r\n\r\n /**\r\n * The height of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = tileHeight;\r\n\r\n /**\r\n * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileMargin\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileMargin = tileMargin;\r\n\r\n /**\r\n * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileSpacing = tileSpacing;\r\n\r\n /**\r\n * Tileset-specific properties per tile that are typically defined in the Tiled editor in the\r\n * Tileset editor.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileProperties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileProperties = tileProperties;\r\n\r\n /**\r\n * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within\r\n * the Tileset collision editor. This is where collision objects and terrain are stored.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileData = tileData;\r\n\r\n /**\r\n * The cached image that contains the individual tiles. Use setImage to set.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#image\r\n * @type {?Phaser.Textures.Texture}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.image = null;\r\n\r\n /**\r\n * The gl texture used by the WebGL renderer.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#glTexture\r\n * @type {?WebGLTexture}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * The number of tile rows in the the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#rows\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.rows = 0;\r\n\r\n /**\r\n * The number of tile columns in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#columns\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.columns = 0;\r\n\r\n /**\r\n * The total number of tiles in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n\r\n /**\r\n * The look-up table to specific tile image texture coordinates (UV in pixels). Each element\r\n * contains the coordinates for a tile in an object of the form {x, y}.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#texCoordinates\r\n * @type {object[]}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.texCoordinates = [];\r\n },\r\n\r\n /**\r\n * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined in Tiled under the Tileset editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?(object|undefined)}\r\n */\r\n getTileProperties: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileProperties[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained\r\n * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision\r\n * info and terrain mapping.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object|undefined}\r\n */\r\n getTileData: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileData[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined within Tiled's tileset collision editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object}\r\n */\r\n getTileCollisionGroup: function (tileIndex)\r\n {\r\n var data = this.getTileData(tileIndex);\r\n\r\n return (data && data.objectgroup) ? data.objectgroup : null;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this Tileset contains the given tile index.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#containsTileIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {boolean}\r\n */\r\n containsTileIndex: function (tileIndex)\r\n {\r\n return (\r\n tileIndex >= this.firstgid &&\r\n tileIndex < (this.firstgid + this.total)\r\n );\r\n },\r\n\r\n /**\r\n * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index.\r\n * Returns null if tile index is not contained in this Tileset.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object} Object in the form { x, y } representing the top-left UV coordinate\r\n * within the Tileset image.\r\n */\r\n getTileTextureCoordinates: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.texCoordinates[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setImage\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The image that contains the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setImage: function (texture)\r\n {\r\n this.image = texture;\r\n\r\n this.glTexture = texture.get().source.glTexture;\r\n\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile width & height and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileWidth] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight] - The height of a tile in pixels.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setTileSize: function (tileWidth, tileHeight)\r\n {\r\n if (tileWidth !== undefined) { this.tileWidth = tileWidth; }\r\n if (tileHeight !== undefined) { this.tileHeight = tileHeight; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setSpacing\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels).\r\n * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setSpacing: function (margin, spacing)\r\n {\r\n if (margin !== undefined) { this.tileMargin = margin; }\r\n if (spacing !== undefined) { this.tileSpacing = spacing; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates tile texture coordinates and tileset data.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#updateTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} imageWidth - The (expected) width of the image to slice.\r\n * @param {integer} imageHeight - The (expected) height of the image to slice.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n updateTileData: function (imageWidth, imageHeight)\r\n {\r\n var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing);\r\n var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing);\r\n\r\n if (rowCount % 1 !== 0 || colCount % 1 !== 0)\r\n {\r\n console.warn('Image tile area not tile size multiple in: ' + this.name);\r\n }\r\n\r\n // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated\r\n // - hence the floor when calculating the rows/columns.\r\n rowCount = Math.floor(rowCount);\r\n colCount = Math.floor(colCount);\r\n\r\n this.rows = rowCount;\r\n this.columns = colCount;\r\n\r\n // In Tiled, \"empty\" spaces in a tileset count as tiles and hence count towards the gid\r\n this.total = rowCount * colCount;\r\n\r\n this.texCoordinates.length = 0;\r\n\r\n var tx = this.tileMargin;\r\n var ty = this.tileMargin;\r\n\r\n for (var y = 0; y < this.rows; y++)\r\n {\r\n for (var x = 0; x < this.columns; x++)\r\n {\r\n this.texCoordinates.push({ x: tx, y: ty });\r\n tx += this.tileWidth + this.tileSpacing;\r\n }\r\n\r\n tx = this.tileMargin;\r\n ty += this.tileHeight + this.tileSpacing;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tileset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tileset.js?")},"./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\n\r\n/**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesAt\r\n * @private\r\n * @since 3.0.0\r\n * \r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesAt = function (tileX, tileY, layer)\r\n{\r\n var tile = GetTileAt(tileX, tileY, true, layer);\r\n var above = GetTileAt(tileX, tileY - 1, true, layer);\r\n var below = GetTileAt(tileX, tileY + 1, true, layer);\r\n var left = GetTileAt(tileX - 1, tileY, true, layer);\r\n var right = GetTileAt(tileX + 1, tileY, true, layer);\r\n var tileCollides = tile && tile.collides;\r\n\r\n // Assume the changed tile has all interesting edges\r\n if (tileCollides)\r\n {\r\n tile.faceTop = true;\r\n tile.faceBottom = true;\r\n tile.faceLeft = true;\r\n tile.faceRight = true;\r\n }\r\n\r\n // Reset edges that are shared between tile and its neighbors\r\n if (above && above.collides)\r\n {\r\n if (tileCollides) { tile.faceTop = false; }\r\n above.faceBottom = !tileCollides;\r\n }\r\n\r\n if (below && below.collides)\r\n {\r\n if (tileCollides) { tile.faceBottom = false; }\r\n below.faceTop = !tileCollides;\r\n }\r\n\r\n if (left && left.collides)\r\n {\r\n if (tileCollides) { tile.faceLeft = false; }\r\n left.faceRight = !tileCollides;\r\n }\r\n\r\n if (right && right.collides)\r\n {\r\n if (tileCollides) { tile.faceRight = false; }\r\n right.faceLeft = !tileCollides;\r\n }\r\n\r\n if (tile && !tile.collides) { tile.resetFaces(); }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = CalculateFacesAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js?')},"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesWithin = function (tileX, tileY, width, height, layer)\r\n{\r\n var above = null;\r\n var below = null;\r\n var left = null;\r\n var right = null;\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (tile)\r\n {\r\n if (tile.collides)\r\n {\r\n above = GetTileAt(tile.x, tile.y - 1, true, layer);\r\n below = GetTileAt(tile.x, tile.y + 1, true, layer);\r\n left = GetTileAt(tile.x - 1, tile.y, true, layer);\r\n right = GetTileAt(tile.x + 1, tile.y, true, layer);\r\n\r\n tile.faceTop = (above && above.collides) ? false : true;\r\n tile.faceBottom = (below && below.collides) ? false : true;\r\n tile.faceLeft = (left && left.collides) ? false : true;\r\n tile.faceRight = (right && right.collides) ? false : true;\r\n }\r\n else\r\n {\r\n tile.resetFaces();\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = CalculateFacesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js?')},"./node_modules/phaser/src/tilemaps/components/Copy.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\n\r\n/**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @function Phaser.Tilemaps.Components.Copy\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n{\r\n if (srcTileX < 0) { srcTileX = 0; }\r\n if (srcTileY < 0) { srcTileY = 0; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var srcTiles = GetTilesWithin(srcTileX, srcTileY, width, height, null, layer);\r\n\r\n var offsetX = destTileX - srcTileX;\r\n var offsetY = destTileY - srcTileY;\r\n\r\n for (var i = 0; i < srcTiles.length; i++)\r\n {\r\n var tileX = srcTiles[i].x + offsetX;\r\n var tileY = srcTiles[i].y + offsetY;\r\n if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height)\r\n {\r\n if (layer.data[tileY][tileX])\r\n {\r\n layer.data[tileY][tileX].copy(srcTiles[i]);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(destTileX - 1, destTileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Copy;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Copy.js?')},"./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ReplaceByIndex = __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js");\r\n\r\n/**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @function Phaser.Tilemaps.Components.CreateFromTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\nvar CreateFromTiles = function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n{\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n var tilemapLayer = layer.tilemapLayer;\r\n if (scene === undefined) { scene = tilemapLayer.scene; }\r\n if (camera === undefined) { camera = scene.cameras.main; }\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n var sprites = [];\r\n var i;\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (indexes.indexOf(tile.index) !== -1)\r\n {\r\n spriteConfig.x = TileToWorldX(tile.x, camera, layer);\r\n spriteConfig.y = TileToWorldY(tile.y, camera, layer);\r\n\r\n var sprite = scene.make.sprite(spriteConfig);\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n if (typeof replacements === \'number\')\r\n {\r\n // Assume 1 replacement for all types of tile given\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements, 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n else if (Array.isArray(replacements))\r\n {\r\n // Assume 1 to 1 mapping with indexes array\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements[i], 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n\r\n return sprites;\r\n};\r\n\r\nmodule.exports = CreateFromTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js?')},"./node_modules/phaser/src/tilemaps/components/CullTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js");\r\nvar SnapCeil = __webpack_require__(/*! ../../math/snap/SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js");\r\n\r\n/**\r\n * Returns the tiles in the given layer that are within the camera\'s viewport. This is used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CullTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n * @param {array} [outputArray] - An optional array to store the Tile objects within.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\nvar CullTiles = function (layer, camera, outputArray, renderOrder)\r\n{\r\n if (outputArray === undefined) { outputArray = []; }\r\n if (renderOrder === undefined) { renderOrder = 0; }\r\n\r\n outputArray.length = 0;\r\n\r\n var tilemap = layer.tilemapLayer.tilemap;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n // We need to use the tile sizes defined for the map as a whole, not the layer,\r\n // in order to calculate the bounds correctly. As different sized tiles may be\r\n // placed on the grid and we cannot trust layer.baseTileWidth to give us the true size.\r\n var tileW = Math.floor(tilemap.tileWidth * tilemapLayer.scaleX);\r\n var tileH = Math.floor(tilemap.tileHeight * tilemapLayer.scaleY);\r\n\r\n var drawLeft = 0;\r\n var drawRight = mapWidth;\r\n var drawTop = 0;\r\n var drawBottom = mapHeight;\r\n\r\n if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)\r\n {\r\n // Camera world view bounds, snapped for scaled tile size\r\n // Cull Padding values are given in tiles, not pixels\r\n\r\n var boundsLeft = SnapFloor(camera.worldView.x - tilemapLayer.x, tileW, 0, true) - tilemapLayer.cullPaddingX;\r\n var boundsRight = SnapCeil(camera.worldView.right - tilemapLayer.x, tileW, 0, true) + tilemapLayer.cullPaddingX;\r\n var boundsTop = SnapFloor(camera.worldView.y - tilemapLayer.y, tileH, 0, true) - tilemapLayer.cullPaddingY;\r\n var boundsBottom = SnapCeil(camera.worldView.bottom - tilemapLayer.y, tileH, 0, true) + tilemapLayer.cullPaddingY;\r\n\r\n drawLeft = Math.max(0, boundsLeft);\r\n drawRight = Math.min(mapWidth, boundsRight);\r\n drawTop = Math.max(0, boundsTop);\r\n drawBottom = Math.min(mapHeight, boundsBottom);\r\n }\r\n\r\n var x;\r\n var y;\r\n var tile;\r\n\r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n\r\n tilemapLayer.tilesDrawn = outputArray.length;\r\n tilemapLayer.tilesTotal = mapWidth * mapHeight;\r\n\r\n return outputArray;\r\n};\r\n\r\nmodule.exports = CullTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CullTiles.js?')},"./node_modules/phaser/src/tilemaps/components/Fill.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @function Phaser.Tilemaps.Components.Fill\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} recalculateFaces - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The tile layer to use. If not given the current layer is used.\r\n */\r\nvar Fill = function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n{\r\n var doesIndexCollide = (layer.collideIndexes.indexOf(index) !== -1);\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = index;\r\n\r\n SetTileCollision(tiles[i], doesIndexCollide);\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Fill;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Fill.js?')},"./node_modules/phaser/src/tilemaps/components/FilterTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FilterTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles.\r\n */\r\nvar FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return tiles.filter(callback, context);\r\n};\r\n\r\nmodule.exports = FilterTiles;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FilterTiles.js?')},"./node_modules/phaser/src/tilemaps/components/FindByIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} The first (or n skipped) tile with the matching index.\r\n */\r\nvar FindByIndex = function (findIndex, skip, reverse, layer)\r\n{\r\n if (skip === undefined) { skip = 0; }\r\n if (reverse === undefined) { reverse = false; }\r\n\r\n var count = 0;\r\n var tx;\r\n var ty;\r\n var tile;\r\n\r\n if (reverse)\r\n {\r\n for (ty = layer.height - 1; ty >= 0; ty--)\r\n {\r\n for (tx = layer.width - 1; tx >= 0; tx--)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (ty = 0; ty < layer.height; ty++)\r\n {\r\n for (tx = 0; tx < layer.width; tx++)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = FindByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindByIndex.js?")},"./node_modules/phaser/src/tilemaps/components/FindTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback FindTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n *\r\n * @return {boolean} Return `true` if the callback should run, otherwise `false`.\r\n */\r\n\r\n/**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} A Tile that matches the search, or null if no Tile found\r\n */\r\nvar FindTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n return tiles.find(callback, context) || null;\r\n};\r\n\r\nmodule.exports = FindTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindTile.js?')},"./node_modules/phaser/src/tilemaps/components/ForEachTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback EachTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n */\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.ForEachTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ForEachTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n tiles.forEach(callback, context);\r\n};\r\n\r\nmodule.exports = ForEachTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ForEachTile.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAt = function (tileX, tileY, nonNull, layer)\r\n{\r\n if (nonNull === undefined) { nonNull = false; }\r\n\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX] || null;\r\n if (tile === null)\r\n {\r\n return null;\r\n }\r\n else if (tile.index === -1)\r\n {\r\n return nonNull ? tile : null;\r\n }\r\n else\r\n {\r\n return tile;\r\n }\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n};\r\n\r\nmodule.exports = GetTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAtWorldXY = function (worldX, worldY, nonNull, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return GetTileAt(tileX, tileY, nonNull, layer);\r\n};\r\n\r\nmodule.exports = GetTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n if (tileX === undefined) { tileX = 0; }\r\n if (tileY === undefined) { tileY = 0; }\r\n if (width === undefined) { width = layer.width; }\r\n if (height === undefined) { height = layer.height; }\r\n\r\n var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false);\r\n var isColliding = GetFastValue(filteringOptions, 'isColliding', false);\r\n var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false);\r\n\r\n // Clip x, y to top left of map, while shrinking width/height to match.\r\n if (tileX < 0)\r\n {\r\n width += tileX;\r\n tileX = 0;\r\n }\r\n if (tileY < 0)\r\n {\r\n height += tileY;\r\n tileY = 0;\r\n }\r\n\r\n // Clip width and height to bottom right of map.\r\n if (tileX + width > layer.width)\r\n {\r\n width = Math.max(layer.width - tileX, 0);\r\n }\r\n if (tileY + height > layer.height)\r\n {\r\n height = Math.max(layer.height - tileY, 0);\r\n }\r\n\r\n var results = [];\r\n\r\n for (var ty = tileY; ty < tileY + height; ty++)\r\n {\r\n for (var tx = tileX; tx < tileX + width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile !== null)\r\n {\r\n if (isNotEmpty && tile.index === -1) { continue; }\r\n if (isColliding && !tile.collides) { continue; }\r\n if (hasInterestingFace && !tile.hasInterestingFace) { continue; }\r\n results.push(tile);\r\n }\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js?")},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Geom = __webpack_require__(/*! ../../geom/ */ "./node_modules/phaser/src/geom/index.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Intersects = __webpack_require__(/*! ../../geom/intersects/ */ "./node_modules/phaser/src/geom/intersects/index.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\nvar TriangleToRectangle = function (triangle, rect)\r\n{\r\n return Intersects.RectangleToTriangle(rect, triangle);\r\n};\r\n\r\n// Note: Could possibly be optimized by copying the shape and shifting it into tilemapLayer\r\n// coordinates instead of shifting the tiles.\r\n\r\n/**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinShape\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinShape = function (shape, filteringOptions, camera, layer)\r\n{\r\n if (shape === undefined) { return []; }\r\n\r\n // intersectTest is a function with parameters: shape, rect\r\n var intersectTest = NOOP;\r\n if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; }\r\n else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; }\r\n else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; }\r\n else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; }\r\n\r\n // Top left corner of the shapes\'s bounding box, rounded down to include partial tiles\r\n var xStart = WorldToTileX(shape.left, true, camera, layer);\r\n var yStart = WorldToTileY(shape.top, true, camera, layer);\r\n\r\n // Bottom right corner of the shapes\'s bounding box, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(shape.right, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(shape.bottom, false, camera, layer));\r\n\r\n // Tiles within bounding rectangle of shape. Bounds are forced to be at least 1 x 1 tile in size\r\n // to grab tiles for shapes that don\'t have a height or width (e.g. a horizontal line).\r\n var width = Math.max(xEnd - xStart, 1);\r\n var height = Math.max(yEnd - yStart, 1);\r\n var tiles = GetTilesWithin(xStart, yStart, width, height, filteringOptions, layer);\r\n\r\n var tileWidth = layer.tileWidth;\r\n var tileHeight = layer.tileHeight;\r\n if (layer.tilemapLayer)\r\n {\r\n tileWidth *= layer.tilemapLayer.scaleX;\r\n tileHeight *= layer.tilemapLayer.scaleY;\r\n }\r\n\r\n var results = [];\r\n var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n tileRect.x = TileToWorldX(tile.x, camera, layer);\r\n tileRect.y = TileToWorldY(tile.y, camera, layer);\r\n if (intersectTest(shape, tileRect))\r\n {\r\n results.push(tile);\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithinShape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n{\r\n // Top left corner of the rect, rounded down to include partial tiles\r\n var xStart = WorldToTileX(worldX, true, camera, layer);\r\n var yStart = WorldToTileY(worldY, true, camera, layer);\r\n\r\n // Bottom right corner of the rect, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(worldX + width, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(worldY + height, false, camera, layer));\r\n\r\n return GetTilesWithin(xStart, yStart, xEnd - xStart, yEnd - yStart, filteringOptions, layer);\r\n};\r\n\r\nmodule.exports = GetTilesWithinWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAt = function (tileX, tileY, layer)\r\n{\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX];\r\n return (tile !== null && tile.index > -1);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = HasTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasTileAt = __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAtWorldXY = function (worldX, worldY, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return HasTileAt(tileX, tileY, layer);\r\n};\r\n\r\nmodule.exports = HasTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given tile coordinates are within the bounds of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.IsInLayerBounds\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`.\r\n */\r\nvar IsInLayerBounds = function (tileX, tileY, layer)\r\n{\r\n return (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height);\r\n};\r\n\r\nmodule.exports = IsInLayerBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js?")},"./node_modules/phaser/src/tilemaps/components/PutTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!IsInLayerBounds(tileX, tileY, layer)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var oldTile = layer.data[tileY][tileX];\r\n var oldTileCollides = oldTile && oldTile.collides;\r\n\r\n if (tile instanceof Tile)\r\n {\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height);\r\n }\r\n layer.data[tileY][tileX].copy(tile);\r\n }\r\n else\r\n {\r\n var index = tile;\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight);\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX].index = index;\r\n }\r\n }\r\n\r\n // Updating colliding flag on the new tile\r\n var newTile = layer.data[tileY][tileX];\r\n var collides = layer.collideIndexes.indexOf(newTile.index) !== -1;\r\n SetTileCollision(newTile, collides);\r\n\r\n // Recalculate faces only if the colliding flag at (tileX, tileY) has changed\r\n if (recalculateFaces && (oldTileCollides !== newTile.collides))\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return newTile;\r\n};\r\n\r\nmodule.exports = PutTileAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = PutTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/PutTilesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\n\r\n/**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTilesAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!Array.isArray(tilesArray)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n // Force the input array to be a 2D array\r\n if (!Array.isArray(tilesArray[0]))\r\n {\r\n tilesArray = [ tilesArray ];\r\n }\r\n\r\n var height = tilesArray.length;\r\n var width = tilesArray[0].length;\r\n\r\n for (var ty = 0; ty < height; ty++)\r\n {\r\n for (var tx = 0; tx < width; tx++)\r\n {\r\n var tile = tilesArray[ty][tx];\r\n PutTileAt(tile, tileX + tx, tileY + ty, false, layer);\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = PutTilesAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTilesAt.js?')},"./node_modules/phaser/src/tilemaps/components/Randomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Randomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Randomize = function (tileX, tileY, width, height, indexes, layer)\r\n{\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n // If no indicies are given, then find all the unique indexes within the specified region\r\n if (indexes === undefined)\r\n {\r\n indexes = [];\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n if (indexes.indexOf(tiles[i].index) === -1)\r\n {\r\n indexes.push(tiles[i].index);\r\n }\r\n }\r\n }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = GetRandom(indexes);\r\n }\r\n};\r\n\r\nmodule.exports = Randomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Randomize.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\n\r\n/**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAt = function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n{\r\n if (replaceWithNull === undefined) { replaceWithNull = false; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (!IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n return null;\r\n }\r\n\r\n var tile = layer.data[tileY][tileX];\r\n\r\n if (!tile)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX] = (replaceWithNull) ? null : new Tile(layer, -1, tileX, tileY, tile.width, tile.height);\r\n }\r\n\r\n // Recalculate faces only if the removed tile was a colliding tile\r\n if (recalculateFaces && tile && tile.collides)\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = RemoveTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RemoveTileAt = __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = RemoveTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/RenderDebug.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Color = __webpack_require__(/*! ../../display/color */ "./node_modules/phaser/src/display/color/index.js");\r\n\r\nvar defaultTileColor = new Color(105, 210, 231, 150);\r\nvar defaultCollidingTileColor = new Color(243, 134, 48, 200);\r\nvar defaultFaceColor = new Color(40, 39, 37, 150);\r\n\r\n/**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @function Phaser.Tilemaps.Components.RenderDebug\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {object} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {?Phaser.Display.Color} [styleConfig.tileColor=blue] - Color to use for drawing a filled rectangle at\r\n * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.collidingTileColor=orange] - Color to use for drawing a filled\r\n * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.faceColor=grey] - Color to use for drawing a line at interesting\r\n * tile faces. If set to null, interesting tile faces will not be drawn.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar RenderDebug = function (graphics, styleConfig, layer)\r\n{\r\n if (styleConfig === undefined) { styleConfig = {}; }\r\n\r\n // Default colors without needlessly creating Color objects\r\n var tileColor = (styleConfig.tileColor !== undefined) ? styleConfig.tileColor : defaultTileColor;\r\n var collidingTileColor = (styleConfig.collidingTileColor !== undefined) ? styleConfig.collidingTileColor : defaultCollidingTileColor;\r\n var faceColor = (styleConfig.faceColor !== undefined) ? styleConfig.faceColor : defaultFaceColor;\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n\r\n graphics.translateCanvas(layer.tilemapLayer.x, layer.tilemapLayer.y);\r\n graphics.scaleCanvas(layer.tilemapLayer.scaleX, layer.tilemapLayer.scaleY);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n var tw = tile.width;\r\n var th = tile.height;\r\n var x = tile.pixelX;\r\n var y = tile.pixelY;\r\n\r\n var color = tile.collides ? collidingTileColor : tileColor;\r\n\r\n if (color !== null)\r\n {\r\n graphics.fillStyle(color.color, color.alpha / 255);\r\n graphics.fillRect(x, y, tw, th);\r\n }\r\n\r\n // Inset the face line to prevent neighboring tile\'s lines from overlapping\r\n x += 1;\r\n y += 1;\r\n tw -= 2;\r\n th -= 2;\r\n\r\n if (faceColor !== null)\r\n {\r\n graphics.lineStyle(1, faceColor.color, faceColor.alpha / 255);\r\n\r\n if (tile.faceTop) { graphics.lineBetween(x, y, x + tw, y); }\r\n if (tile.faceRight) { graphics.lineBetween(x + tw, y, x + tw, y + th); }\r\n if (tile.faceBottom) { graphics.lineBetween(x, y + th, x + tw, y + th); }\r\n if (tile.faceLeft) { graphics.lineBetween(x, y, x, y + th); }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = RenderDebug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RenderDebug.js?')},"./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.ReplaceByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ReplaceByIndex = function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i] && tiles[i].index === findIndex)\r\n {\r\n tiles[i].index = newIndex;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ReplaceByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollision.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollision = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Update the array of colliding indexes\r\n for (var i = 0; i < indexes.length; i++)\r\n {\r\n SetLayerCollisionIndex(indexes[i], collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (tile && indexes.indexOf(tile.index) !== -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollision.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionBetween\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionBetween = function (start, stop, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (start > stop) { return; }\r\n\r\n // Update the array of colliding indexes\r\n for (var index = start; index <= stop; index++)\r\n {\r\n SetLayerCollisionIndex(index, collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile)\r\n {\r\n if (tile.index >= start && tile.index <= stop)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByExclusion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByExclusion = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Note: this only updates layer.collideIndexes for tile indexes found currently in the layer\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile && indexes.indexOf(tile.index) === -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n SetLayerCollisionIndex(tile.index, collides, layer);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByExclusion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that\r\n * has a value of true. Any tile that doesn\'t have "collides" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a\r\n * "types" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByProperty\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByProperty = function (properties, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n for (var property in properties)\r\n {\r\n if (!HasValue(tile.properties, property)) { continue; }\r\n\r\n var values = properties[property];\r\n if (!Array.isArray(values))\r\n {\r\n values = [ values ];\r\n }\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n if (tile.properties[property] === values[i])\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByProperty;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ \"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js\");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ \"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js\");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionFromCollisionGroup = function (collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n var collisionGroup = tile.getCollisionGroup();\r\n\r\n // It's possible in Tiled to have a collision group without any shapes, e.g. create a\r\n // shape and then delete the shape.\r\n if (collisionGroup && collisionGroup.objects && collisionGroup.objects.length > 0)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionFromCollisionGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js?")},"./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to keep track of the tile indexes that collide within a layer. This\r\n * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The tile index to set the collision boolean for.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetLayerCollisionIndex = function (tileIndex, collides, layer)\r\n{\r\n var loc = layer.collideIndexes.indexOf(tileIndex);\r\n\r\n if (collides && loc === -1)\r\n {\r\n layer.collideIndexes.push(tileIndex);\r\n }\r\n else if (!collides && loc !== -1)\r\n {\r\n layer.collideIndexes.splice(loc, 1);\r\n }\r\n};\r\n\r\nmodule.exports = SetLayerCollisionIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to set the colliding state of a tile. This does not recalculate\r\n * interesting faces.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n */\r\nvar SetTileCollision = function (tile, collides)\r\n{\r\n if (collides)\r\n {\r\n tile.setCollision(true, true, true, true, false);\r\n }\r\n else\r\n {\r\n tile.resetCollision(false);\r\n }\r\n};\r\n\r\nmodule.exports = SetTileCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileCollision.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileIndexCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileIndexCallback = function (indexes, callback, callbackContext, layer)\r\n{\r\n if (typeof indexes === 'number')\r\n {\r\n layer.callbacks[indexes] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n else\r\n {\r\n for (var i = 0, len = indexes.length; i < len; i++)\r\n {\r\n layer.callbacks[indexes[i]] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SetTileIndexCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileLocationCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileLocationCallback = function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].setCollisionCallback(callback, callbackContext);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetTileLocationCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js?')},"./node_modules/phaser/src/tilemaps/components/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ShuffleArray = __webpack_require__(/*! ../../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they\'re all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Shuffle\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Shuffle = function (tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var indexes = tiles.map(function (tile) { return tile.index; });\r\n ShuffleArray(indexes);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = indexes[i];\r\n }\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Shuffle.js?')},"./node_modules/phaser/src/tilemaps/components/SwapByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.SwapByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i])\r\n {\r\n if (tiles[i].index === indexA)\r\n {\r\n tiles[i].index = indexB;\r\n }\r\n else if (tiles[i].index === indexB)\r\n {\r\n tiles[i].index = indexA;\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SwapByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SwapByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldX = function (tileX, camera, layer)\r\n{\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldX = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldX = tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX);\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return layerWorldX + tileX * tileWidth;\r\n};\r\n\r\nmodule.exports = TileToWorldX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldX.js?")},"./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in world coordinates.\r\n */\r\nvar TileToWorldXY = function (tileX, tileY, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = TileToWorldX(tileX, camera, layer);\r\n point.y = TileToWorldY(tileY, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = TileToWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldY = function (tileY, camera, layer)\r\n{\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldY = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldY = (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return layerWorldY + tileY * tileHeight;\r\n};\r\n\r\nmodule.exports = TileToWorldY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldY.js?")},"./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index\'s weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.WeightedRandomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, layer)\r\n{\r\n if (weightedIndexes === undefined) { return; }\r\n\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var weightTotal = 0;\r\n for (i = 0; i < weightedIndexes.length; i++)\r\n {\r\n weightTotal += weightedIndexes[i].weight;\r\n }\r\n\r\n if (weightTotal <= 0) { return; }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var rand = Math.random() * weightTotal;\r\n var sum = 0;\r\n var randomIndex = -1;\r\n for (var j = 0; j < weightedIndexes.length; j++)\r\n {\r\n sum += weightedIndexes[j].weight;\r\n if (rand <= sum)\r\n {\r\n var chosen = weightedIndexes[j].index;\r\n randomIndex = Array.isArray(chosen)\r\n ? chosen[Math.floor(Math.random() * chosen.length)]\r\n : chosen;\r\n break;\r\n }\r\n }\r\n\r\n tiles[i].index = randomIndex;\r\n }\r\n};\r\n\r\nmodule.exports = WeightedRandomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The X location in tile units.\r\n */\r\nvar WorldToTileX = function (worldX, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's horizontal scroll\r\n worldX = worldX - (tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX));\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldX / tileWidth)\r\n : worldX / tileWidth;\r\n};\r\n\r\nmodule.exports = WorldToTileX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileX.js?")},"./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in tile units.\r\n */\r\nvar WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = WorldToTileX(worldX, snapToFloor, camera, layer);\r\n point.y = WorldToTileY(worldY, snapToFloor, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = WorldToTileXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The Y location in tile units.\r\n */\r\nvar WorldToTileY = function (worldY, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's vertical scroll\r\n worldY = worldY - (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldY / tileHeight)\r\n : worldY / tileHeight;\r\n};\r\n\r\nmodule.exports = WorldToTileY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileY.js?")},"./node_modules/phaser/src/tilemaps/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CalculateFacesAt: __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js"),\r\n CalculateFacesWithin: __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js"),\r\n Copy: __webpack_require__(/*! ./Copy */ "./node_modules/phaser/src/tilemaps/components/Copy.js"),\r\n CreateFromTiles: __webpack_require__(/*! ./CreateFromTiles */ "./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js"),\r\n CullTiles: __webpack_require__(/*! ./CullTiles */ "./node_modules/phaser/src/tilemaps/components/CullTiles.js"),\r\n Fill: __webpack_require__(/*! ./Fill */ "./node_modules/phaser/src/tilemaps/components/Fill.js"),\r\n FilterTiles: __webpack_require__(/*! ./FilterTiles */ "./node_modules/phaser/src/tilemaps/components/FilterTiles.js"),\r\n FindByIndex: __webpack_require__(/*! ./FindByIndex */ "./node_modules/phaser/src/tilemaps/components/FindByIndex.js"),\r\n FindTile: __webpack_require__(/*! ./FindTile */ "./node_modules/phaser/src/tilemaps/components/FindTile.js"),\r\n ForEachTile: __webpack_require__(/*! ./ForEachTile */ "./node_modules/phaser/src/tilemaps/components/ForEachTile.js"),\r\n GetTileAt: __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js"),\r\n GetTileAtWorldXY: __webpack_require__(/*! ./GetTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js"),\r\n GetTilesWithin: __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js"),\r\n GetTilesWithinShape: __webpack_require__(/*! ./GetTilesWithinShape */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js"),\r\n GetTilesWithinWorldXY: __webpack_require__(/*! ./GetTilesWithinWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js"),\r\n HasTileAt: __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js"),\r\n HasTileAtWorldXY: __webpack_require__(/*! ./HasTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js"),\r\n IsInLayerBounds: __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js"),\r\n PutTileAt: __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js"),\r\n PutTileAtWorldXY: __webpack_require__(/*! ./PutTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js"),\r\n PutTilesAt: __webpack_require__(/*! ./PutTilesAt */ "./node_modules/phaser/src/tilemaps/components/PutTilesAt.js"),\r\n Randomize: __webpack_require__(/*! ./Randomize */ "./node_modules/phaser/src/tilemaps/components/Randomize.js"),\r\n RemoveTileAt: __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js"),\r\n RemoveTileAtWorldXY: __webpack_require__(/*! ./RemoveTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js"),\r\n RenderDebug: __webpack_require__(/*! ./RenderDebug */ "./node_modules/phaser/src/tilemaps/components/RenderDebug.js"),\r\n ReplaceByIndex: __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js"),\r\n SetCollision: __webpack_require__(/*! ./SetCollision */ "./node_modules/phaser/src/tilemaps/components/SetCollision.js"),\r\n SetCollisionBetween: __webpack_require__(/*! ./SetCollisionBetween */ "./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js"),\r\n SetCollisionByExclusion: __webpack_require__(/*! ./SetCollisionByExclusion */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js"),\r\n SetCollisionByProperty: __webpack_require__(/*! ./SetCollisionByProperty */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js"),\r\n SetCollisionFromCollisionGroup: __webpack_require__(/*! ./SetCollisionFromCollisionGroup */ "./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js"),\r\n SetTileIndexCallback: __webpack_require__(/*! ./SetTileIndexCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js"),\r\n SetTileLocationCallback: __webpack_require__(/*! ./SetTileLocationCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/tilemaps/components/Shuffle.js"),\r\n SwapByIndex: __webpack_require__(/*! ./SwapByIndex */ "./node_modules/phaser/src/tilemaps/components/SwapByIndex.js"),\r\n TileToWorldX: __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js"),\r\n TileToWorldXY: __webpack_require__(/*! ./TileToWorldXY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js"),\r\n TileToWorldY: __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js"),\r\n WeightedRandomize: __webpack_require__(/*! ./WeightedRandomize */ "./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js"),\r\n WorldToTileX: __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js"),\r\n WorldToTileXY: __webpack_require__(/*! ./WorldToTileXY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js"),\r\n WorldToTileY: __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/index.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DynamicTilemapLayerRender = __webpack_require__(/*! ./DynamicTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a\r\n * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the\r\n * tiles in a DynamicTilemapLayer.\r\n * \r\n * Use this over a Static Tilemap Layer when you need those features.\r\n *\r\n * @class DynamicTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar DynamicTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n DynamicTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'DynamicTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally with the canvas render. This holds the tiles that are visible within the\r\n * camera.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * The total number of tiles drawn by the renderer in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles, this._renderOrder);\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces)\r\n {\r\n TilemapComponents.Copy(srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces)\r\n {\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces)\r\n {\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces)\r\n {\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes)\r\n {\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces)\r\n {\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setSkipCull\r\n * @since 3.11.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCullPadding\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|integer[])} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} [callback] - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n shuffle: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will recieve a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes)\r\n {\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var halfWidth = tile.width / 2;\r\n var halfHeight = tile.height / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n \r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n \r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tile.width, tile.height,\r\n -halfWidth, -halfHeight,\r\n tile.width, tile.height\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (tileCount === 0 || alpha <= 0)\r\n {\r\n return;\r\n }\r\n\r\n var gidMap = src.gidMap;\r\n var pipeline = src.pipeline;\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n\r\n var x = src.x;\r\n var y = src.y;\r\n\r\n var sx = src.scaleX;\r\n var sy = src.scaleY;\r\n\r\n var tilesets = src.tileset;\r\n\r\n // Loop through each tileset in this layer, drawing just the tiles that are in that set each time\r\n // Doing it this way around allows us to batch tiles using the same tileset\r\n for (var c = 0; c < tilesets.length; c++)\r\n {\r\n var currentSet = tilesets[c];\r\n var texture = currentSet.glTexture;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (tileset !== currentSet)\r\n {\r\n // Skip tiles that aren\'t in this set\r\n continue;\r\n }\r\n \r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords === null)\r\n {\r\n continue;\r\n }\r\n\r\n var frameWidth = tile.width;\r\n var frameHeight = tile.height;\r\n\r\n var frameX = tileTexCoords.x;\r\n var frameY = tileTexCoords.y;\r\n\r\n var tw = tile.width * 0.5;\r\n var th = tile.height * 0.5;\r\n\r\n var tint = getTint(tile.tint, alpha * tile.alpha);\r\n\r\n pipeline.batchTexture(\r\n src,\r\n texture,\r\n texture.width, texture.height,\r\n x + ((tw + tile.pixelX) * sx), y + ((th + tile.pixelY) * sy),\r\n tile.width, tile.height,\r\n sx, sy,\r\n tile.rotation,\r\n tile.flipX, tile.flipY,\r\n scrollFactorX, scrollFactorY,\r\n tw, th,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tint, tint, tint, tint, false,\r\n 0, 0,\r\n camera,\r\n null,\r\n true\r\n );\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js?')},"./node_modules/phaser/src/tilemaps/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/tilemaps/components/index.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/tilemaps/parsers/index.js"),\r\n\r\n Formats: __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js"),\r\n ImageCollection: __webpack_require__(/*! ./ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js"),\r\n ParseToTilemap: __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js"),\r\n Tile: __webpack_require__(/*! ./Tile */ "./node_modules/phaser/src/tilemaps/Tile.js"),\r\n Tilemap: __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js"),\r\n TilemapCreator: __webpack_require__(/*! ./TilemapCreator */ "./node_modules/phaser/src/tilemaps/TilemapCreator.js"),\r\n TilemapFactory: __webpack_require__(/*! ./TilemapFactory */ "./node_modules/phaser/src/tilemaps/TilemapFactory.js"),\r\n Tileset: __webpack_require__(/*! ./Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js"),\r\n\r\n LayerData: __webpack_require__(/*! ./mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js"),\r\n MapData: __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js"),\r\n ObjectLayer: __webpack_require__(/*! ./mapdata/ObjectLayer */ "./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js"),\r\n\r\n DynamicTilemapLayer: __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js"),\r\n StaticTilemapLayer: __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/index.js?')},"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled,\r\n * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference\r\n * to this data and use it to look up and perform operations on tiles.\r\n *\r\n * @class LayerData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} [config] - [description]\r\n */\r\nvar LayerData = new Class({\r\n\r\n initialize:\r\n\r\n function LayerData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the layer, if specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'layer');\r\n\r\n /**\r\n * The x offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = GetFastValue(config, 'x', 0);\r\n\r\n /**\r\n * The y offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = GetFastValue(config, 'y', 0);\r\n\r\n /**\r\n * The width in tile of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height in tiles of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * The pixel width of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The pixel height of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileHeight = GetFastValue(config, 'baseTileHeight', this.tileHeight);\r\n\r\n /**\r\n * The width in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.baseTileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.alpha = GetFastValue(config, 'alpha', 1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * Layer specific properties (can be specified in Tiled)\r\n *\r\n * @name Phaser.Tilemaps.LayerData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#indexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.indexes = GetFastValue(config, 'indexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#collideIndexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.collideIndexes = GetFastValue(config, 'collideIndexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#callbacks\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = GetFastValue(config, 'callbacks', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#bodies\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.bodies = GetFastValue(config, 'bodies', []);\r\n\r\n /**\r\n * An array of the tile indexes\r\n *\r\n * @name Phaser.Tilemaps.LayerData#data\r\n * @type {(number[])}\r\n * @since 3.0.0\r\n */\r\n this.data = GetFastValue(config, 'data', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tilemapLayer\r\n * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)}\r\n * @since 3.0.0\r\n */\r\n this.tilemapLayer = GetFastValue(config, 'tilemapLayer', null);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LayerData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/LayerData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/MapData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this\r\n * format. A Tilemap object get a copy of this data and then unpacks the needed properties into\r\n * itself.\r\n *\r\n * @class MapData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.MapDataConfig} [config] - The Map configuration object.\r\n */\r\nvar MapData = new Class({\r\n\r\n initialize:\r\n\r\n function MapData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * \r\n * @name Phaser.Tilemaps.MapData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'map');\r\n\r\n /**\r\n * The width of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * If the map is infinite or not.\r\n *\r\n * @name Phaser.Tilemaps.MapData#infinite\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.infinite = GetFastValue(config, 'infinite', false);\r\n\r\n /**\r\n * The width of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The height of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * The width in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.tileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#format\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.format = GetFastValue(config, 'format', null);\r\n\r\n /**\r\n * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.\r\n * \r\n * @name Phaser.Tilemaps.MapData#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = GetFastValue(config, 'orientation', 'orthogonal');\r\n\r\n /**\r\n * Determines the draw order of tilemap. Default is right-down\r\n * \r\n * 0, or 'right-down'\r\n * 1, or 'left-down'\r\n * 2, or 'right-up'\r\n * 3, or 'left-up'\r\n * \r\n * @name Phaser.Tilemaps.MapData#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = GetFastValue(config, 'renderOrder', 'right-down');\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled).\r\n * \r\n * @name Phaser.Tilemaps.MapData#version\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.version = GetFastValue(config, 'version', '1');\r\n\r\n /**\r\n * Map specific properties (can be specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * An array with all the layers configured to the MapData.\r\n * \r\n * @name Phaser.Tilemaps.MapData#layers\r\n * @type {(Phaser.Tilemaps.LayerData[]|Phaser.Tilemaps.ObjectLayer)}\r\n * @since 3.0.0\r\n */\r\n this.layers = GetFastValue(config, 'layers', []);\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = GetFastValue(config, 'images', []);\r\n\r\n /**\r\n * An object of Tiled Object Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#objects\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', {});\r\n\r\n /**\r\n * An object of collision data. Must be created as physics object or will return undefined.\r\n * \r\n * @name Phaser.Tilemaps.MapData#collision\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collision = GetFastValue(config, 'collision', {});\r\n\r\n /**\r\n * An array of Tilesets.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = GetFastValue(config, 'tilesets', []);\r\n\r\n /**\r\n * The collection of images the map uses(specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#imageCollections\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = GetFastValue(config, 'imageCollections', []);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#tiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.tiles = GetFastValue(config, 'tiles', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MapData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/MapData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled\r\n * object layer, except:\r\n * - \"x\" & \"y\" properties are ignored since these cannot be changed in Tiled.\r\n * - \"offsetx\" & \"offsety\" are applied to the individual object coordinates directly, so they\r\n * are ignored as well.\r\n * - \"draworder\" is ignored.\r\n *\r\n * @class ObjectLayer\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.ObjectLayerConfig} [config] - The data for the layer from the Tiled JSON object.\r\n */\r\nvar ObjectLayer = new Class({\r\n\r\n initialize:\r\n\r\n function ObjectLayer (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the Object Layer.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'object layer');\r\n\r\n /**\r\n * The opacity of the layer, between 0 and 1.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#opacity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.opacity = GetFastValue(config, 'opacity', 1);\r\n\r\n /**\r\n * The custom properties defined on the Object Layer, keyed by their name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * The type of each custom property defined on the Object Layer, keyed by its name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#propertyTypes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.propertyTypes = GetFastValue(config, 'propertytypes', {});\r\n\r\n /**\r\n * The type of the layer, which should be `objectgroup`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(config, 'type', 'objectgroup');\r\n\r\n /**\r\n * Whether the layer is shown (`true`) or hidden (`false`).\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * An array of all objects on this Object Layer.\r\n *\r\n * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique),\r\n * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees),\r\n * `properties` (if any), `visible` state (`true` if visible, `false` otherwise),\r\n * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels).\r\n *\r\n * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property,\r\n * a `flippedVertical` property, and `flippedAntiDiagonal` property.\r\n * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains\r\n * information on flipping and rotation.\r\n *\r\n * Polylines have a `polyline` property, which is an array of objects corresponding to points,\r\n * where each point has an `x` property and a `y` property. Polygons have an identically structured\r\n * array in their `polygon` property. Text objects have a `text` property with the text's properties.\r\n *\r\n * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#objects\r\n * @type {Phaser.Types.Tilemaps.TiledObject[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ObjectLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js?")},"./node_modules/phaser/src/tilemaps/parsers/Parse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js");\r\nvar ParseCSV = __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js");\r\nvar ParseJSONTiled = __webpack_require__(/*! ./tiled/ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js");\r\nvar ParseWeltmeister = __webpack_require__(/*! ./impact/ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js");\r\n\r\n/**\r\n * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format\r\n * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth &\r\n * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from\r\n * the map data.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer} mapFormat - See ../Formats.js.\r\n * @param {(integer[][]|string|object)} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {integer} tileHeight - The height of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The created `MapData` object.\r\n */\r\nvar Parse = function (name, mapFormat, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var newMap;\r\n\r\n switch (mapFormat)\r\n {\r\n case (Formats.ARRAY_2D):\r\n newMap = Parse2DArray(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.CSV):\r\n newMap = ParseCSV(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.TILED_JSON):\r\n newMap = ParseJSONTiled(name, data, insertNull);\r\n break;\r\n case (Formats.WELTMEISTER):\r\n newMap = ParseWeltmeister(name, data, insertNull);\r\n break;\r\n default:\r\n console.warn(\'Unrecognized tilemap data format: \' + mapFormat);\r\n newMap = null;\r\n }\r\n\r\n return newMap;\r\n};\r\n\r\nmodule.exports = Parse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse.js?')},"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar LayerData = __webpack_require__(/*! ../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar MapData = __webpack_require__(/*! ../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * Parses a 2D array of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse2DArray\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer[][]} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} [description]\r\n */\r\nvar Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var layerData = new LayerData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight\r\n });\r\n\r\n var mapData = new MapData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n format: Formats.ARRAY_2D,\r\n layers: [ layerData ]\r\n });\r\n\r\n var tiles = [];\r\n var height = data.length;\r\n var width = 0;\r\n\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n tiles[y] = [];\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var tileIndex = parseInt(row[x], 10);\r\n\r\n if (isNaN(tileIndex) || tileIndex === -1)\r\n {\r\n tiles[y][x] = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, tileWidth, tileHeight);\r\n }\r\n else\r\n {\r\n tiles[y][x] = new Tile(layerData, tileIndex, x, y, tileWidth, tileHeight);\r\n }\r\n }\r\n\r\n if (width === 0)\r\n {\r\n width = row.length;\r\n }\r\n }\r\n\r\n mapData.width = layerData.width = width;\r\n mapData.height = layerData.height = height;\r\n mapData.widthInPixels = layerData.widthInPixels = width * tileWidth;\r\n mapData.heightInPixels = layerData.heightInPixels = height * tileHeight;\r\n layerData.data = tiles;\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = Parse2DArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js?')},"./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ \"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js\");\r\n\r\n/**\r\n * Parses a CSV string of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.ParseCSV\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {string} data - CSV string of tile indexes.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The resulting MapData object.\r\n */\r\nvar ParseCSV = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var array2D = data\r\n .trim()\r\n .split('\\n')\r\n .map(function (row) { return row.split(','); });\r\n\r\n var map = Parse2DArray(name, array2D, tileWidth, tileHeight, insertNull);\r\n map.format = Formats.CSV;\r\n\r\n return map;\r\n};\r\n\r\nmodule.exports = ParseCSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n var layerData = new LayerData({\r\n name: layer.name,\r\n width: layer.width,\r\n height: layer.height,\r\n tileWidth: layer.tilesize,\r\n tileHeight: layer.tilesize,\r\n visible: layer.visible === 1\r\n });\r\n\r\n var row = [];\r\n var tileGrid = [];\r\n\r\n // Loop through the data field in the JSON. This is a 2D array containing the tile indexes,\r\n // one after the other. The indexes are relative to the tileset that contains the tile.\r\n for (var y = 0; y < layer.data.length; y++)\r\n {\r\n for (var x = 0; x < layer.data[y].length; x++)\r\n {\r\n // In Weltmeister, 0 = no tile, but the Tilemap API expects -1 = no tile.\r\n var index = layer.data[y][x] - 1;\r\n\r\n var tile;\r\n\r\n if (index > -1)\r\n {\r\n tile = new Tile(layerData, index, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n else\r\n {\r\n tile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n\r\n row.push(tile);\r\n }\r\n\r\n tileGrid.push(row);\r\n row = [];\r\n }\r\n\r\n layerData.data = tileGrid;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var tilesetsNames = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n // A relative filepath to the source image (within Weltmeister) is used for the name\r\n var tilesetName = layer.tilesetName;\r\n\r\n // Only add unique tilesets that have a valid name. Collision layers will have a blank name.\r\n if (tilesetName !== '' && tilesetsNames.indexOf(tilesetName) === -1)\r\n {\r\n tilesetsNames.push(tilesetName);\r\n\r\n // Tiles are stored with an ID relative to the tileset, rather than a globally unique ID\r\n // across all tilesets. Also, tilesets in Weltmeister have no margin or padding.\r\n tilesets.push(new Tileset(tilesetName, 0, layer.tilesize, layer.tilesize, 0, 0));\r\n }\r\n }\r\n\r\n return tilesets;\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js");\r\n\r\n/**\r\n * Parses a Weltmeister JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseWeltmeister\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Weltmeister JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?object} [description]\r\n */\r\nvar ParseWeltmeister = function (name, json, insertNull)\r\n{\r\n if (json.layer.length === 0)\r\n {\r\n console.warn(\'No layers found in the Weltmeister map: \' + name);\r\n return null;\r\n }\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n if (json.layer[i].width > width) { width = json.layer[i].width; }\r\n if (json.layer[i].height > height) { height = json.layer[i].height; }\r\n }\r\n\r\n var mapData = new MapData({\r\n width: width,\r\n height: height,\r\n name: name,\r\n tileWidth: json.layer[0].tilesize,\r\n tileHeight: json.layer[0].tilesize,\r\n format: Formats.WELTMEISTER\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.tilesets = ParseTilesets(json);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseWeltmeister;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Impact\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js"),\r\n ParseWeltmeister: __webpack_require__(/*! ./ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Parse: __webpack_require__(/*! ./Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js"),\r\n Parse2DArray: __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js"),\r\n ParseCSV: __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js"),\r\n\r\n Impact: __webpack_require__(/*! ./impact/ */ "./node_modules/phaser/src/tilemaps/parsers/impact/index.js"),\r\n Tiled: __webpack_require__(/*! ./tiled/ */ "./node_modules/phaser/src/tilemaps/parsers/tiled/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * Copy properties from tileset to tiles.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n */\r\nvar AssignTileProperties = function (mapData)\r\n{\r\n var layerData;\r\n var tile;\r\n var sid;\r\n var set;\r\n var row;\r\n\r\n // go through each of the map data layers\r\n for (var i = 0; i < mapData.layers.length; i++)\r\n {\r\n layerData = mapData.layers[i];\r\n\r\n set = null;\r\n\r\n // rows of tiles\r\n for (var j = 0; j < layerData.data.length; j++)\r\n {\r\n row = layerData.data[j];\r\n\r\n // individual tiles\r\n for (var k = 0; k < row.length; k++)\r\n {\r\n tile = row[k];\r\n\r\n if (tile === null || tile.index < 0)\r\n {\r\n continue;\r\n }\r\n\r\n // find the relevant tileset\r\n sid = mapData.tiles[tile.index][2];\r\n set = mapData.tilesets[sid];\r\n\r\n // Ensure that a tile\'s size matches its tileset\r\n tile.width = set.tileWidth;\r\n tile.height = set.tileHeight;\r\n\r\n // if that tile type has any properties, add them to the tile object\r\n if (set.tileProperties && set.tileProperties[tile.index - set.firstgid])\r\n {\r\n tile.properties = Extend(\r\n tile.properties, set.tileProperties[tile.index - set.firstgid]\r\n );\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = AssignTileProperties;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decode base-64 encoded data, for example as exported by Tiled.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.Base64Decode\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Base-64 encoded data to decode.\r\n *\r\n * @return {array} Array containing the decoded bytes.\r\n */\r\nvar Base64Decode = function (data)\r\n{\r\n var binaryString = window.atob(data);\r\n var len = binaryString.length;\r\n var bytes = new Array(len / 4);\r\n\r\n // Interpret binaryString as an array of bytes representing little-endian encoded uint32 values.\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n bytes[i / 4] = (\r\n binaryString.charCodeAt(i) |\r\n binaryString.charCodeAt(i + 1) << 8 |\r\n binaryString.charCodeAt(i + 2) << 16 |\r\n binaryString.charCodeAt(i + 3) << 24\r\n ) >>> 0;\r\n }\r\n\r\n return bytes;\r\n};\r\n\r\nmodule.exports = Base64Decode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Master list of tiles -> x, y, index in tileset.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar BuildTilesetIndex = function (mapData)\r\n{\r\n var tiles = [];\r\n\r\n for (var i = 0; i < mapData.tilesets.length; i++)\r\n {\r\n var set = mapData.tilesets[i];\r\n\r\n var x = set.tileMargin;\r\n var y = set.tileMargin;\r\n\r\n var count = 0;\r\n var countX = 0;\r\n var countY = 0;\r\n\r\n for (var t = set.firstgid; t < set.firstgid + set.total; t++)\r\n {\r\n // Can add extra properties here as needed\r\n tiles[t] = [ x, y, i ];\r\n\r\n x += set.tileWidth + set.tileSpacing;\r\n\r\n count++;\r\n\r\n if (count === set.total)\r\n {\r\n break;\r\n }\r\n\r\n countX++;\r\n\r\n if (countX === set.columns)\r\n {\r\n x = set.tileMargin;\r\n y += set.tileHeight + set.tileSpacing;\r\n\r\n countX = 0;\r\n countY++;\r\n\r\n if (countY === set.rows)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return tiles;\r\n};\r\n\r\nmodule.exports = BuildTilesetIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FLIPPED_HORIZONTAL = 0x80000000;\r\nvar FLIPPED_VERTICAL = 0x40000000;\r\nvar FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left corners\r\n\r\n/**\r\n * See Tiled documentation on tile flipping:\r\n * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID\r\n * @since 3.0.0\r\n *\r\n * @param {number} gid - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseGID = function (gid)\r\n{\r\n var flippedHorizontal = Boolean(gid & FLIPPED_HORIZONTAL);\r\n var flippedVertical = Boolean(gid & FLIPPED_VERTICAL);\r\n var flippedAntiDiagonal = Boolean(gid & FLIPPED_ANTI_DIAGONAL);\r\n gid = gid & ~(FLIPPED_HORIZONTAL | FLIPPED_VERTICAL | FLIPPED_ANTI_DIAGONAL);\r\n\r\n // Parse the flip flags into something Phaser can use\r\n var rotation = 0;\r\n var flipped = false;\r\n\r\n if (flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = false;\r\n }\r\n\r\n return {\r\n gid: gid,\r\n flippedHorizontal: flippedHorizontal,\r\n flippedVertical: flippedVertical,\r\n flippedAntiDiagonal: flippedAntiDiagonal,\r\n rotation: rotation,\r\n flipped: flipped\r\n };\r\n};\r\n\r\nmodule.exports = ParseGID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseImageLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseImageLayers = function (json)\r\n{\r\n var images = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'imagelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curi = json.layers[i];\r\n\r\n images.push({\r\n name: curi.name,\r\n image: curi.image,\r\n x: GetFastValue(curi, 'offsetx', 0) + curi.x,\r\n y: GetFastValue(curi, 'offsety', 0) + curi.y,\r\n alpha: curi.opacity,\r\n visible: curi.visible,\r\n properties: GetFastValue(curi, 'properties', {})\r\n });\r\n }\r\n\r\n return images;\r\n};\r\n\r\nmodule.exports = ParseImageLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js");\r\nvar ParseImageLayers = __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js");\r\nvar ParseObjectLayers = __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js");\r\nvar BuildTilesetIndex = __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js");\r\nvar AssignTileProperties = __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js");\r\n\r\n/**\r\n * Parses a Tiled JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Tiled JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can\'t be parsed.\r\n */\r\nvar ParseJSONTiled = function (name, json, insertNull)\r\n{\r\n if (json.orientation !== \'orthogonal\')\r\n {\r\n console.warn(\'Only orthogonal map types are supported in this version of Phaser\');\r\n return null;\r\n }\r\n\r\n // Map data will consist of: layers, objects, images, tilesets, sizes\r\n var mapData = new MapData({\r\n width: json.width,\r\n height: json.height,\r\n name: name,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n orientation: json.orientation,\r\n format: Formats.TILED_JSON,\r\n version: json.version,\r\n properties: json.properties,\r\n renderOrder: json.renderorder,\r\n infinite: json.infinite\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.images = ParseImageLayers(json);\r\n\r\n var sets = ParseTilesets(json);\r\n mapData.tilesets = sets.tilesets;\r\n mapData.imageCollections = sets.imageCollections;\r\n\r\n mapData.objects = ParseObjectLayers(json);\r\n\r\n mapData.tiles = BuildTilesetIndex(mapData);\r\n\r\n AssignTileProperties(mapData);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseJSONTiled;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pick = __webpack_require__(/*! ../../../utils/object/Pick */ \"./node_modules/phaser/src/utils/object/Pick.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\n\r\nvar copyPoints = function (p) { return { x: p.x, y: p.y }; };\r\n\r\nvar commonObjectProps = [ 'id', 'name', 'type', 'rotation', 'properties', 'visible', 'x', 'y', 'width', 'height' ];\r\n\r\n/**\r\n * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.)\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} tiledObject - Tiled object to convert to an internal parsed object normalising and copying properties over.\r\n * @param {number} [offsetX=0] - Optional additional offset to apply to the object's x property. Defaults to 0.\r\n * @param {number} [offsetY=0] - Optional additional offset to apply to the object's y property. Defaults to 0.\r\n *\r\n * @return {object} The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.\r\n */\r\nvar ParseObject = function (tiledObject, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n var parsedObject = Pick(tiledObject, commonObjectProps);\r\n\r\n parsedObject.x += offsetX;\r\n parsedObject.y += offsetY;\r\n\r\n if (tiledObject.gid)\r\n {\r\n // Object tiles\r\n var gidInfo = ParseGID(tiledObject.gid);\r\n parsedObject.gid = gidInfo.gid;\r\n parsedObject.flippedHorizontal = gidInfo.flippedHorizontal;\r\n parsedObject.flippedVertical = gidInfo.flippedVertical;\r\n parsedObject.flippedAntiDiagonal = gidInfo.flippedAntiDiagonal;\r\n }\r\n else if (tiledObject.polyline)\r\n {\r\n parsedObject.polyline = tiledObject.polyline.map(copyPoints);\r\n }\r\n else if (tiledObject.polygon)\r\n {\r\n parsedObject.polygon = tiledObject.polygon.map(copyPoints);\r\n }\r\n else if (tiledObject.ellipse)\r\n {\r\n parsedObject.ellipse = tiledObject.ellipse;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n else if (tiledObject.text)\r\n {\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n parsedObject.text = tiledObject.text;\r\n }\r\n else\r\n {\r\n // Otherwise, assume it is a rectangle\r\n parsedObject.rectangle = true;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n\r\n return parsedObject;\r\n};\r\n\r\nmodule.exports = ParseObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js\");\r\nvar ObjectLayer = __webpack_require__(/*! ../../mapdata/ObjectLayer */ \"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js\");\r\n\r\n/**\r\n * Parses a Tiled JSON object into an array of ObjectLayer objects.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObjectLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - The Tiled JSON object.\r\n *\r\n * @return {array} An array of all object layers in the tilemap as `ObjectLayer`s.\r\n */\r\nvar ParseObjectLayers = function (json)\r\n{\r\n var objectLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'objectgroup')\r\n {\r\n continue;\r\n }\r\n\r\n var curo = json.layers[i];\r\n var offsetX = GetFastValue(curo, 'offsetx', 0);\r\n var offsetY = GetFastValue(curo, 'offsety', 0);\r\n var objects = [];\r\n\r\n for (var j = 0; j < curo.objects.length; j++)\r\n {\r\n var parsedObject = ParseObject(curo.objects[j], offsetX, offsetY);\r\n\r\n objects.push(parsedObject);\r\n }\r\n\r\n var objectLayer = new ObjectLayer(curo);\r\n objectLayer.objects = objects;\r\n\r\n objectLayers.push(objectLayer);\r\n }\r\n\r\n return objectLayers;\r\n};\r\n\r\nmodule.exports = ParseObjectLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64Decode = __webpack_require__(/*! ./Base64Decode */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var infiniteMap = GetFastValue(json, 'infinite', false);\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'tilelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curl = json.layers[i];\r\n\r\n // Base64 decode data if necessary. NOTE: uncompressed base64 only.\r\n if (curl.compression)\r\n {\r\n console.warn(\r\n 'TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer \\''\r\n + curl.name + '\\''\r\n );\r\n continue;\r\n }\r\n else if (curl.encoding && curl.encoding === 'base64')\r\n {\r\n curl.data = Base64Decode(curl.data);\r\n delete curl.encoding; // Allow the same map to be parsed multiple times\r\n }\r\n\r\n // This is an array containing the tile indexes, one after the other. -1 = no tile,\r\n // everything else = the tile index (starting at 1 for Tiled, 0 for CSV) If the map\r\n // contains multiple tilesets then the indexes are relative to that which the set starts\r\n // from. Need to set which tileset in the cache = which tileset in the JSON, if you do this\r\n // manually it means you can use the same map data but a new tileset.\r\n\r\n var layerData;\r\n var gidInfo;\r\n var tile;\r\n var blankTile;\r\n\r\n var output = [];\r\n var x = 0;\r\n\r\n if (infiniteMap)\r\n {\r\n var layerOffsetX = GetFastValue(curl, 'startx', 0) + curl.x;\r\n var layerOffsetY = GetFastValue(curl, 'starty', 0) + curl.y;\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: layerOffsetX,\r\n y: layerOffsetY,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n for (var c = 0; c < curl.height; c++)\r\n {\r\n output.push([ null ]);\r\n\r\n for (var j = 0; j < curl.width; j++)\r\n {\r\n output[c][j] = null;\r\n }\r\n }\r\n\r\n for (c = 0, len = curl.chunks.length; c < len; c++)\r\n {\r\n var chunk = curl.chunks[c];\r\n\r\n var offsetX = (chunk.x - layerOffsetX);\r\n var offsetY = (chunk.y - layerOffsetY);\r\n\r\n var y = 0;\r\n\r\n for (var t = 0, len2 = chunk.data.length; t < len2; t++)\r\n {\r\n var newOffsetX = x + offsetX;\r\n var newOffsetY = y + offsetY;\r\n\r\n gidInfo = ParseGID(chunk.data[t]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, newOffsetX, newOffsetY, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n output[newOffsetY][newOffsetX] = tile;\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, newOffsetX, newOffsetY, json.tilewidth, json.tileheight);\r\n\r\n output[newOffsetY][newOffsetX] = blankTile;\r\n }\r\n\r\n x++;\r\n\r\n if (x === chunk.width)\r\n {\r\n y++;\r\n x = 0;\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: GetFastValue(curl, 'offsetx', 0) + curl.x,\r\n y: GetFastValue(curl, 'offsety', 0) + curl.y,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n var row = [];\r\n\r\n // Loop through the data field in the JSON.\r\n for (var k = 0, len = curl.data.length; k < len; k++)\r\n {\r\n gidInfo = ParseGID(curl.data[k]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, x, output.length, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n row.push(tile);\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, output.length, json.tilewidth, json.tileheight);\r\n row.push(blankTile);\r\n }\r\n\r\n x++;\r\n\r\n if (x === curl.width)\r\n {\r\n output.push(row);\r\n x = 0;\r\n row = [];\r\n }\r\n }\r\n }\r\n\r\n layerData.data = output;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js");\r\nvar ImageCollection = __webpack_require__(/*! ../../ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js");\r\n\r\n/**\r\n * Tilesets and Image Collections\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var imageCollections = [];\r\n var lastSet = null;\r\n var stringID;\r\n\r\n for (var i = 0; i < json.tilesets.length; i++)\r\n {\r\n // name, firstgid, width, height, margin, spacing, properties\r\n var set = json.tilesets[i];\r\n\r\n if (set.source)\r\n {\r\n console.warn(\'Phaser can\\\'t load external tilesets. Use the Embed Tileset button and then export the map again.\');\r\n }\r\n else if (set.image)\r\n {\r\n var newSet = new Tileset(set.name, set.firstgid, set.tilewidth, set.tileheight, set.margin, set.spacing);\r\n\r\n if (json.version > 1)\r\n {\r\n // Tiled 1.2+\r\n\r\n if (Array.isArray(set.tiles))\r\n {\r\n var tiles = {};\r\n var props = {};\r\n\r\n for (var t = 0; t < set.tiles.length; t++)\r\n {\r\n var tile = set.tiles[t];\r\n\r\n // Convert tileproperties\r\n if (tile.properties)\r\n {\r\n var newPropData = {};\r\n\r\n tile.properties.forEach(function (propData)\r\n {\r\n newPropData[propData[\'name\']] = propData[\'value\'];\r\n });\r\n\r\n props[tile.id] = newPropData;\r\n }\r\n\r\n // Convert objectgroup\r\n if (tile.objectgroup)\r\n {\r\n tiles[tile.id] = { objectgroup: tile.objectgroup };\r\n\r\n if (tile.objectgroup.objects)\r\n {\r\n var parsedObjects2 = tile.objectgroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n\r\n tiles[tile.id].objectgroup.objects = parsedObjects2;\r\n }\r\n }\r\n\r\n // Copy animation data\r\n if (tile.animation)\r\n {\r\n if (tiles.hasOwnProperty(tile.id))\r\n {\r\n tiles[tile.id].animation = tile.animation;\r\n }\r\n else\r\n {\r\n tiles[tile.id] = { animation: tile.animation };\r\n }\r\n }\r\n }\r\n\r\n newSet.tileData = tiles;\r\n newSet.tileProperties = props;\r\n }\r\n }\r\n else\r\n {\r\n // Tiled 1\r\n\r\n // Properties stored per-tile in object with string indexes starting at "0"\r\n if (set.tileproperties)\r\n {\r\n newSet.tileProperties = set.tileproperties;\r\n }\r\n\r\n // Object & terrain shapes stored per-tile in object with string indexes starting at "0"\r\n if (set.tiles)\r\n {\r\n newSet.tileData = set.tiles;\r\n\r\n // Parse the objects into Phaser format to match handling of other Tiled objects\r\n for (stringID in newSet.tileData)\r\n {\r\n var objectGroup = newSet.tileData[stringID].objectgroup;\r\n if (objectGroup && objectGroup.objects)\r\n {\r\n var parsedObjects1 = objectGroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n newSet.tileData[stringID].objectgroup.objects = parsedObjects1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // For a normal sliced tileset the row/count/size information is computed when updated.\r\n // This is done (again) after the image is set.\r\n newSet.updateTileData(set.imagewidth, set.imageheight);\r\n\r\n tilesets.push(newSet);\r\n }\r\n else\r\n {\r\n var newCollection = new ImageCollection(set.name, set.firstgid, set.tilewidth,\r\n set.tileheight, set.margin, set.spacing, set.properties);\r\n\r\n for (stringID in set.tiles)\r\n {\r\n var image = set.tiles[stringID].image;\r\n var gid = set.firstgid + parseInt(stringID, 10);\r\n newCollection.addImage(gid, image);\r\n }\r\n\r\n imageCollections.push(newCollection);\r\n }\r\n\r\n // We\'ve got a new Tileset, so set the lastgid into the previous one\r\n if (lastSet)\r\n {\r\n lastSet.lastgid = set.firstgid - 1;\r\n }\r\n\r\n lastSet = set;\r\n }\r\n\r\n return { tilesets: tilesets, imageCollections: imageCollections };\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Tiled\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AssignTileProperties: __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js"),\r\n Base64Decode: __webpack_require__(/*! ./Base64Decode */ "./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js"),\r\n BuildTilesetIndex: __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js"),\r\n ParseGID: __webpack_require__(/*! ./ParseGID */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js"),\r\n ParseImageLayers: __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js"),\r\n ParseJSONTiled: __webpack_require__(/*! ./ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js"),\r\n ParseObject: __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js"),\r\n ParseObjectLayers: __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js"),\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/index.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar StaticTilemapLayerRender = __webpack_require__(/*! ./StaticTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Static Tilemap Layer is optimized for rendering speed over flexibility. You cannot apply per-tile\r\n * effects like tint or alpha, or change the tiles or tilesets the layer uses.\r\n * \r\n * Use a Static Tilemap Layer instead of a Dynamic Tilemap Layer when you don't need tile manipulation features.\r\n *\r\n * @class StaticTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar StaticTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n StaticTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function StaticTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'StaticTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally by the Canvas renderer.\r\n * This holds the tiles that are visible within the camera in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles drawn by the renderer in the last frame.\r\n * \r\n * This only works when rending with Canvas.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.12.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * A reference to the renderer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * An array of vertex buffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexBuffer\r\n * @type {WebGLBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = [];\r\n\r\n /**\r\n * An array of ArrayBuffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#bufferData\r\n * @type {ArrayBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.bufferData = [];\r\n\r\n /**\r\n * An array of Float32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewF32\r\n * @type {Float32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = [];\r\n\r\n /**\r\n * An array of Uint32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewU32\r\n * @type {Uint32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = [];\r\n\r\n /**\r\n * An array of booleans, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single boolean.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#dirty\r\n * @type {boolean[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dirty = [];\r\n\r\n /**\r\n * An array of integers, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single integer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexCount\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = [];\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_tempMatrix\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.14.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.updateVBOData();\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.updateVBOData();\r\n }, this);\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Prepares the VBO data arrays for population by the `upload` method.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#updateVBOData\r\n * @private\r\n * @since 3.14.0\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n updateVBOData: function ()\r\n {\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Upload the tile data to a VBO.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#upload\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to render to.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n upload: function (camera, tilesetIndex)\r\n {\r\n var renderer = this.renderer;\r\n var gl = renderer.gl;\r\n\r\n var pipeline = renderer.pipelines.TextureTintPipeline;\r\n\r\n if (this.dirty[tilesetIndex])\r\n {\r\n var tileset = this.tileset[tilesetIndex];\r\n var mapWidth = this.layer.width;\r\n var mapHeight = this.layer.height;\r\n var width = tileset.image.source[0].width;\r\n var height = tileset.image.source[0].height;\r\n var mapData = this.layer.data;\r\n var tile;\r\n var row;\r\n var col;\r\n var renderOrder = this._renderOrder;\r\n var minTileIndex = tileset.firstgid;\r\n var maxTileIndex = tileset.firstgid + tileset.total;\r\n \r\n var vertexBuffer = this.vertexBuffer[tilesetIndex];\r\n var bufferData = this.bufferData[tilesetIndex];\r\n var vOffset = -1;\r\n var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6;\r\n\r\n this.vertexCount[tilesetIndex] = 0;\r\n \r\n if (bufferData === null)\r\n {\r\n bufferData = new ArrayBuffer(bufferSize);\r\n\r\n this.bufferData[tilesetIndex] = bufferData;\r\n\r\n this.vertexViewF32[tilesetIndex] = new Float32Array(bufferData);\r\n this.vertexViewU32[tilesetIndex] = new Uint32Array(bufferData);\r\n }\r\n \r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n \r\n this.dirty[tilesetIndex] = false;\r\n \r\n if (vertexBuffer === null)\r\n {\r\n vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW);\r\n \r\n this.vertexBuffer[tilesetIndex] = vertexBuffer;\r\n }\r\n else\r\n {\r\n renderer.setVertexBuffer(vertexBuffer);\r\n \r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a single tile into the batch.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#batchTile\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {integer} vOffset - The vertex offset.\r\n * @param {any} tile - The tile being rendered.\r\n * @param {any} tileset - The tileset being used for rendering.\r\n * @param {integer} width - The width of the tileset image in pixels.\r\n * @param {integer} height - The height of the tileset image in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the layer is being rendered with.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {integer} The new vOffset value.\r\n */\r\n batchTile: function (vOffset, tile, tileset, width, height, camera, tilesetIndex)\r\n {\r\n var texCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (!texCoords)\r\n {\r\n return vOffset;\r\n }\r\n\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n\r\n var halfTileWidth = tileWidth / 2;\r\n var halfTileHeight = tileHeight / 2;\r\n\r\n var u0 = texCoords.x / width;\r\n var v0 = texCoords.y / height;\r\n var u1 = (texCoords.x + tileWidth) / width;\r\n var v1 = (texCoords.y + tileHeight) / height;\r\n\r\n var matrix = this._tempMatrix;\r\n\r\n var x = -halfTileWidth;\r\n var y = -halfTileHeight;\r\n\r\n if (tile.flipX)\r\n {\r\n tileWidth *= -1;\r\n x += tileset.tileWidth;\r\n }\r\n\r\n if (tile.flipY)\r\n {\r\n tileHeight *= -1;\r\n y += tileset.tileHeight;\r\n }\r\n\r\n var xw = x + tileWidth;\r\n var yh = y + tileHeight;\r\n\r\n matrix.applyITRS(halfTileWidth + tile.pixelX, halfTileHeight + tile.pixelY, tile.rotation, 1, 1);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, camera.alpha * this.alpha * tile.alpha);\r\n\r\n var tx0 = matrix.getX(x, y);\r\n var ty0 = matrix.getY(x, y);\r\n\r\n var tx1 = matrix.getX(x, yh);\r\n var ty1 = matrix.getY(x, yh);\r\n\r\n var tx2 = matrix.getX(xw, yh);\r\n var ty2 = matrix.getY(xw, yh);\r\n\r\n var tx3 = matrix.getX(xw, y);\r\n var ty3 = matrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32[tilesetIndex];\r\n var vertexViewU32 = this.vertexViewU32[tilesetIndex];\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx1;\r\n vertexViewF32[++vOffset] = ty1;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx3;\r\n vertexViewF32[++vOffset] = ty3;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n this.vertexCount[tilesetIndex] += 6;\r\n\r\n return vOffset;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles);\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setSkipCull\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCullPadding\r\n * @since 3.12.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} worldY - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {number} height - How many tiles high from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from in tile coordinates.\r\n * @param {integer} tileY - Y position to get the tile from in tile coordinates.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should\r\n * be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a\r\n * collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.]\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Destroys this StaticTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n // Undo the camera scroll\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n ctx.globalAlpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n var halfWidth = tileWidth / 2;\r\n var halfHeight = tileHeight / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n\r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n\r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tileWidth, tileHeight,\r\n -halfWidth, -halfHeight,\r\n tileWidth, tileHeight\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StaticTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StaticTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * \r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n * \r\n * A Static Tilemap Layer renders immediately and does not use any batching.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n var tilesets = src.tileset;\r\n\r\n var pipeline = src.pipeline;\r\n var pipelineVertexBuffer = pipeline.vertexBuffer;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n pipeline.modelIdentity();\r\n pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);\r\n pipeline.modelScale(src.scaleX, src.scaleY, 1);\r\n pipeline.viewLoad2D(camera.matrix.matrix);\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n src.upload(camera, i);\r\n\r\n if (src.vertexCount[i] > 0)\r\n {\r\n if (renderer.currentPipeline && renderer.currentPipeline.vertexCount > 0)\r\n {\r\n renderer.flush();\r\n }\r\n \r\n pipeline.vertexBuffer = src.vertexBuffer[i];\r\n \r\n renderer.setPipeline(pipeline);\r\n \r\n renderer.setTexture2D(tilesets[i].glTexture, 0);\r\n \r\n renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);\r\n }\r\n }\r\n\r\n // Restore the pipeline\r\n pipeline.vertexBuffer = pipelineVertexBuffer;\r\n\r\n pipeline.viewIdentity();\r\n pipeline.modelIdentity();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js?")},"./node_modules/phaser/src/time/Clock.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar TimerEvent = __webpack_require__(/*! ./TimerEvent */ \"./node_modules/phaser/src/time/TimerEvent.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Clock is a Scene plugin which creates and updates Timer Events for its Scene.\r\n *\r\n * @class Clock\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Clock.\r\n */\r\nvar Clock = new Class({\r\n\r\n initialize:\r\n\r\n function Clock (scene)\r\n {\r\n /**\r\n * The Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems object of the Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The current time of the Clock, in milliseconds.\r\n *\r\n * If accessed externally, this is equivalent to the `time` parameter normally passed to a Scene's `update` method.\r\n *\r\n * @name Phaser.Time.Clock#now\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.now = 0;\r\n\r\n // Scale the delta time coming into the Clock by this factor\r\n // which then influences anything using this Clock for calculations, like TimerEvents\r\n\r\n /**\r\n * The scale of the Clock's time delta.\r\n * \r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock.\r\n *\r\n * @name Phaser.Time.Clock#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Whether the Clock is paused (`true`) or active (`false`).\r\n *\r\n * When paused, the Clock will not update any of its Timer Events, thus freezing time.\r\n *\r\n * @name Phaser.Time.Clock#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * An array of all Timer Events whose delays haven't expired - these are actively updating Timer Events.\r\n *\r\n * @name Phaser.Time.Clock#_active\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be added to the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingInsertion\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be removed from the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingRemoval\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n // Sync with the TimeStep\r\n this.now = this.systems.game.loop.time;\r\n \r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#addEvent\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n addEvent: function (config)\r\n {\r\n var event = new TimerEvent(config);\r\n\r\n this._pendingInsertion.push(event);\r\n\r\n return event;\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * This is a shortcut for {@link #addEvent} which can be shorter and is compatible with the syntax of the GreenSock Animation Platform (GSAP).\r\n *\r\n * @method Phaser.Time.Clock#delayedCall\r\n * @since 3.0.0\r\n *\r\n * @param {number} delay - The delay of the function call, in milliseconds.\r\n * @param {function} callback - The function to call after the delay expires.\r\n * @param {Array.<*>} args - The arguments to call the function with.\r\n * @param {*} callbackScope - The scope (`this` object) to call the function with.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n delayedCall: function (delay, callback, args, callbackScope)\r\n {\r\n return this.addEvent({ delay: delay, callback: callback, args: args, callbackScope: callbackScope });\r\n },\r\n\r\n /**\r\n * Clears and recreates the array of pending Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#clearPendingEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n clearPendingEvents: function ()\r\n {\r\n this._pendingInsertion = [];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules all active Timer Events for removal at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#removeAllEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n removeAllEvents: function ()\r\n {\r\n this._pendingRemoval = this._pendingRemoval.concat(this._active);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the arrays of active and pending Timer Events. Called at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var event;\r\n\r\n // Delete old events\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n event = this._pendingRemoval[i];\r\n\r\n var index = this._active.indexOf(event);\r\n\r\n if (index > -1)\r\n {\r\n this._active.splice(index, 1);\r\n }\r\n\r\n // Pool them?\r\n event.destroy();\r\n }\r\n\r\n for (i = 0; i < toInsert; i++)\r\n {\r\n event = this._pendingInsertion[i];\r\n\r\n this._active.push(event);\r\n }\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * Updates the Clock's internal time and all of its Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.now = time;\r\n\r\n if (this.paused)\r\n {\r\n return;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < this._active.length; i++)\r\n {\r\n var event = this._active[i];\r\n\r\n if (event.paused)\r\n {\r\n continue;\r\n }\r\n\r\n // Use delta time to increase elapsed.\r\n // Avoids needing to adjust for pause / resume.\r\n // Automatically smoothed by TimeStep class.\r\n // In testing accurate to +- 1ms!\r\n event.elapsed += delta * event.timeScale;\r\n\r\n if (event.elapsed >= event.delay)\r\n {\r\n var remainder = event.elapsed - event.delay;\r\n\r\n // Limit it, in case it's checked in the callback\r\n event.elapsed = event.delay;\r\n\r\n // Process the event\r\n if (!event.hasDispatched && event.callback)\r\n {\r\n event.hasDispatched = true;\r\n event.callback.apply(event.callbackScope, event.args);\r\n }\r\n\r\n if (event.repeatCount > 0)\r\n {\r\n event.repeatCount--;\r\n\r\n event.elapsed = remainder;\r\n event.hasDispatched = false;\r\n }\r\n else\r\n {\r\n this._pendingRemoval.push(event);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Time.Clock#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this._pendingInsertion.length; i++)\r\n {\r\n this._pendingInsertion[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._active.length; i++)\r\n {\r\n this._active[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._pendingRemoval.length; i++)\r\n {\r\n this._pendingRemoval[i].destroy();\r\n }\r\n\r\n this._active.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Time.Clock#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Clock', Clock, 'time');\r\n\r\nmodule.exports = Clock;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/Clock.js?")},"./node_modules/phaser/src/time/TimerEvent.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timer Event represents a delayed function call. It's managed by a Scene's {@link Clock} and will call its function after a set amount of time has passed. The Timer Event can optionally repeat - i.e. call its function multiple times before finishing, or loop indefinitely.\r\n *\r\n * Because it's managed by a Clock, a Timer Event is based on game time, will be affected by its Clock's time scale, and will pause if its Clock pauses.\r\n *\r\n * @class TimerEvent\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event, including its delay and callback.\r\n */\r\nvar TimerEvent = new Class({\r\n\r\n initialize:\r\n\r\n function TimerEvent (config)\r\n {\r\n /**\r\n * The delay in ms at which this TimerEvent fires.\r\n *\r\n * @name Phaser.Time.TimerEvent#delay\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.delay = 0;\r\n\r\n /**\r\n * The total number of times this TimerEvent will repeat before finishing.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeat\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.repeat = 0;\r\n\r\n /**\r\n * If repeating this contains the current repeat count.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeatCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCount = 0;\r\n\r\n /**\r\n * True if this TimerEvent loops, otherwise false.\r\n *\r\n * @name Phaser.Time.TimerEvent#loop\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.loop = false;\r\n\r\n /**\r\n * The callback that will be called when the TimerEvent occurs.\r\n *\r\n * @name Phaser.Time.TimerEvent#callback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.callback;\r\n\r\n /**\r\n * The scope in which the callback will be called.\r\n *\r\n * @name Phaser.Time.TimerEvent#callbackScope\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n\r\n /**\r\n * Additional arguments to be passed to the callback.\r\n *\r\n * @name Phaser.Time.TimerEvent#args\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.args;\r\n\r\n /**\r\n * Scale the time causing this TimerEvent to update.\r\n *\r\n * @name Phaser.Time.TimerEvent#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Start this many MS into the elapsed (useful if you want a long duration with repeat, but for the first loop to fire quickly)\r\n *\r\n * @name Phaser.Time.TimerEvent#startAt\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startAt = 0;\r\n\r\n /**\r\n * The time in milliseconds which has elapsed since the Timer Event's creation.\r\n *\r\n * This value is local for the Timer Event and is relative to its Clock. As such, it's influenced by the Clock's time scale and paused state, the Timer Event's initial {@link #startAt} property, and the Timer Event's {@link #timeScale} and {@link #paused} state.\r\n *\r\n * @name Phaser.Time.TimerEvent#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Whether or not this timer is paused.\r\n *\r\n * @name Phaser.Time.TimerEvent#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Whether the Timer Event's function has been called.\r\n *\r\n * When the Timer Event fires, this property will be set to `true` before the callback function is invoked and will be reset immediately afterward if the Timer Event should repeat. The value of this property does not directly influence whether the Timer Event will be removed from its Clock, but can prevent it from firing.\r\n *\r\n * @name Phaser.Time.TimerEvent#hasDispatched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasDispatched = false;\r\n\r\n this.reset(config);\r\n },\r\n\r\n /**\r\n * Completely reinitializes the Timer Event, regardless of its current state, according to a configuration object.\r\n *\r\n * @method Phaser.Time.TimerEvent#reset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The new state for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} This TimerEvent object.\r\n */\r\n reset: function (config)\r\n {\r\n this.delay = GetFastValue(config, 'delay', 0);\r\n\r\n // Can also be set to -1 for an infinite loop (same as setting loop: true)\r\n this.repeat = GetFastValue(config, 'repeat', 0);\r\n\r\n this.loop = GetFastValue(config, 'loop', false);\r\n\r\n this.callback = GetFastValue(config, 'callback', undefined);\r\n\r\n this.callbackScope = GetFastValue(config, 'callbackScope', this.callback);\r\n\r\n this.args = GetFastValue(config, 'args', []);\r\n\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n this.startAt = GetFastValue(config, 'startAt', 0);\r\n\r\n this.paused = GetFastValue(config, 'paused', false);\r\n\r\n this.elapsed = this.startAt;\r\n this.hasDispatched = false;\r\n this.repeatCount = (this.repeat === -1 || this.loop) ? 999999999999 : this.repeat;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the progress of the current iteration, not factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} A number between 0 and 1 representing the current progress.\r\n */\r\n getProgress: function ()\r\n {\r\n return (this.elapsed / this.delay);\r\n },\r\n\r\n /**\r\n * Gets the progress of the timer overall, factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getOverallProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} The overall progress of the Timer Event, between 0 and 1.\r\n */\r\n getOverallProgress: function ()\r\n {\r\n if (this.repeat > 0)\r\n {\r\n var totalDuration = this.delay + (this.delay * this.repeat);\r\n var totalElapsed = this.elapsed + (this.delay * (this.repeat - this.repeatCount));\r\n\r\n return (totalElapsed / totalDuration);\r\n }\r\n else\r\n {\r\n return this.getProgress();\r\n }\r\n },\r\n\r\n /**\r\n * Returns the number of times this Timer Event will repeat before finishing.\r\n *\r\n * This should not be confused with the number of times the Timer Event will fire before finishing. A return value of 0 doesn't indicate that the Timer Event has finished running - it indicates that it will not repeat after the next time it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#getRepeatCount\r\n * @since 3.0.0\r\n *\r\n * @return {number} How many times the Timer Event will repeat.\r\n */\r\n getRepeatCount: function ()\r\n {\r\n return this.repeatCount;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsed\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in milliseconds.\r\n */\r\n getElapsed: function ()\r\n {\r\n return this.elapsed;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event in seconds.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsedSeconds\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in seconds.\r\n */\r\n getElapsedSeconds: function ()\r\n {\r\n return this.elapsed * 0.001;\r\n },\r\n\r\n /**\r\n * Forces the Timer Event to immediately expire, thus scheduling its removal in the next frame.\r\n *\r\n * @method Phaser.Time.TimerEvent#remove\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [dispatchCallback=false] - If `true`, the function of the Timer Event will be called before its removal.\r\n */\r\n remove: function (dispatchCallback)\r\n {\r\n if (dispatchCallback === undefined) { dispatchCallback = false; }\r\n\r\n this.elapsed = this.delay;\r\n\r\n this.hasDispatched = !dispatchCallback;\r\n\r\n this.repeatCount = 0;\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Timer Event, i.e. its callback, scope, and arguments.\r\n *\r\n * Normally, this method is only called by the Clock when it shuts down. As such, it doesn't stop the Timer Event. If called manually, the Timer Event will still be updated by the Clock, but it won't do anything when it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.callback = undefined;\r\n this.callbackScope = undefined;\r\n this.args = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimerEvent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/TimerEvent.js?")},"./node_modules/phaser/src/time/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Time\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clock: __webpack_require__(/*! ./Clock */ "./node_modules/phaser/src/time/Clock.js"),\r\n TimerEvent: __webpack_require__(/*! ./TimerEvent */ "./node_modules/phaser/src/time/TimerEvent.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/index.js?')},"./node_modules/phaser/src/tweens/Timeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween.\r\n *\r\n * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence\r\n * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline.\r\n *\r\n * @class Timeline\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager which owns this Timeline.\r\n */\r\nvar Timeline = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Timeline (manager)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Tween Manager which owns this Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#manager\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A constant value which allows this Timeline to be easily identified as one.\r\n *\r\n * @name Phaser.Tweens.Timeline#isTimeline\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isTimeline = true;\r\n\r\n /**\r\n * An array of Tween objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Timeline#data\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.data = [];\r\n\r\n /**\r\n * The cached size of the data array.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalData\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalData = 0;\r\n\r\n /**\r\n * If true then duration, delay, etc values are all frame totals, rather than ms.\r\n *\r\n * @name Phaser.Tweens.Timeline#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Timeline#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this Timeline? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween)\r\n *\r\n * @name Phaser.Tweens.Timeline#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before this Timeline loops.\r\n *\r\n * @name Phaser.Tweens.Timeline#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Timeline#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Timeline#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer value, as used by `loopDelay` and `completeDelay`.\r\n *\r\n * @name Phaser.Tweens.Timeline#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * The current state of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the Timeline when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Timeline#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * Does the Timeline start off paused? (if so it needs to be started with Timeline.play)\r\n *\r\n * @name Phaser.Tweens.Timeline#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Timeline#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_.\r\n *\r\n * @name Phaser.Tweens.Timeline#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for all Tweens in this Timeline to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Timeline#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely.\r\n * `onLoop` When a Timeline loops.\r\n * `onStart` When the Timeline starts playing.\r\n * `onUpdate` When a Timeline updates a child Tween.\r\n * `onYoyo` When a Timeline starts a yoyo.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onComplete: null,\r\n onLoop: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Timeline based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Timeline#dispatchTimelineEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTimelineEvent: function (event, callback)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n * \r\n * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @method Phaser.Tweens.Timeline#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The time scale value to set.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Timeline#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the time scale applied to this Timeline.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Check whether or not the Timeline is playing.\r\n *\r\n * @method Phaser.Tweens.Timeline#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Timeline is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Tweens.TweenBuilderConfig|object)} config - The configuration object for the Tween.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n add: function (config)\r\n {\r\n return this.queue(TweenBuilder(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Tween to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#queue\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be added to this Timeline.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n queue: function (tween)\r\n {\r\n if (!this.isPlaying())\r\n {\r\n tween.parent = this;\r\n tween.parentIsTimeline = true;\r\n\r\n this.data.push(tween);\r\n\r\n this.totalData = this.data.length;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks whether a Tween has an offset value.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasOffset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {boolean} `true` if the tween has a non-null offset.\r\n */\r\n hasOffset: function (tween)\r\n {\r\n return (tween.offset !== null);\r\n },\r\n\r\n /**\r\n * Checks whether the offset value is a number or a directive that is relative to previous tweens.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetAbsolute\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the result is a number, `false` if it is a directive like \" -= 1000\".\r\n */\r\n isOffsetAbsolute: function (value)\r\n {\r\n return (typeof(value) === 'number');\r\n },\r\n\r\n /**\r\n * Checks if the offset is a relative value rather than an absolute one.\r\n * If the value is just a number, this returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetRelative\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the value is relative, i.e \" -= 1000\". If `false`, the offset is absolute.\r\n */\r\n isOffsetRelative: function (value)\r\n {\r\n var t = typeof(value);\r\n\r\n if (t === 'string')\r\n {\r\n var op = value[0];\r\n\r\n if (op === '-' || op === '+')\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Parses the relative offset value, returning a positive or negative number.\r\n *\r\n * @method Phaser.Tweens.Timeline#getRelativeOffset\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here.\r\n * @param {number} base - The value to use as the offset.\r\n *\r\n * @return {number} The parsed offset value.\r\n */\r\n getRelativeOffset: function (value, base)\r\n {\r\n var op = value[0];\r\n var num = parseFloat(value.substr(2));\r\n var result = base;\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n result += num;\r\n break;\r\n\r\n case '-':\r\n result -= num;\r\n break;\r\n }\r\n\r\n // Cannot ever be < 0\r\n return Math.max(0, result);\r\n },\r\n\r\n /**\r\n * Calculates the total duration of the timeline.\r\n * \r\n * Computes all tween durations and returns the full duration of the timeline.\r\n * \r\n * The resulting number is stored in the timeline, not as a return value.\r\n *\r\n * @method Phaser.Tweens.Timeline#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var prevEnd = 0;\r\n var totalDuration = 0;\r\n var offsetDuration = 0;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.init();\r\n\r\n if (this.hasOffset(tween))\r\n {\r\n if (this.isOffsetAbsolute(tween.offset))\r\n {\r\n // An actual number, so it defines the start point from the beginning of the timeline\r\n tween.calculatedOffset = tween.offset;\r\n\r\n if (tween.offset === 0)\r\n {\r\n offsetDuration = 0;\r\n }\r\n }\r\n else if (this.isOffsetRelative(tween.offset))\r\n {\r\n // A relative offset (i.e. '-=1000', so starts at 'offset' ms relative to the PREVIOUS Tweens ending time)\r\n tween.calculatedOffset = this.getRelativeOffset(tween.offset, prevEnd);\r\n }\r\n }\r\n else\r\n {\r\n // Sequential\r\n tween.calculatedOffset = offsetDuration;\r\n }\r\n\r\n prevEnd = tween.totalDuration + tween.calculatedOffset;\r\n\r\n totalDuration += tween.totalDuration;\r\n offsetDuration += tween.totalDuration;\r\n }\r\n\r\n // Excludes loop values\r\n this.duration = totalDuration;\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n },\r\n\r\n /**\r\n * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed.\r\n * Returns a boolean indicating whether the timeline is auto-started or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Timeline is started. `false` if it is paused.\r\n */\r\n init: function ()\r\n {\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.paused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Resets all of the timeline's tweens back to their initial states.\r\n * The boolean parameter indicates whether tweens that are looping should reset as well, or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#resetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - If `true`, resets all looping tweens to their initial values.\r\n */\r\n resetTweens: function (resetFromLoop)\r\n {\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.play(resetFromLoop);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a callback for the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - The internal type of callback to set.\r\n * @param {function} callback - Timeline allows multiple tweens to be linked together to create a streaming sequence.\r\n * @param {array} [params] - The parameters to pass to the callback.\r\n * @param {object} [scope] - The context scope of the callback.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n if (Timeline.TYPES.indexOf(type) !== -1)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passed a Tween to the Tween Manager and requests it be made active.\r\n *\r\n * @method Phaser.Tweens.Timeline#makeActive\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The tween object to make active.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} The Timeline's Tween Manager reference.\r\n */\r\n makeActive: function (tween)\r\n {\r\n return this.manager.makeActive(tween);\r\n },\r\n\r\n /**\r\n * Starts playing the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#play\r\n * @fires Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n */\r\n play: function ()\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return;\r\n }\r\n\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.manager.makeActive(this);\r\n\r\n return;\r\n }\r\n else\r\n {\r\n this.resetTweens(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_START, this.callbacks.onStart);\r\n },\r\n\r\n /**\r\n * Updates the Timeline's `state` and fires callbacks and events.\r\n *\r\n * @method Phaser.Tweens.Timeline#nextState\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n *\r\n * @see Phaser.Tweens.Timeline#update\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n // Reset the elapsed time\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n\r\n this.loopCounter--;\r\n\r\n this.resetTweens(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager.\r\n * Otherwise, returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#update\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Timeline has finished and should be removed from the Tween Manager.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.manager.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n var stillRunning = this.totalData;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n if (tween.update(timestamp, delta))\r\n {\r\n stillRunning--;\r\n }\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_UPDATE, this.callbacks.onUpdate);\r\n\r\n // Anything still running? If not, we're done\r\n if (stillRunning === 0)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n },\r\n\r\n /**\r\n * Pauses the Timeline, retaining its internal state.\r\n * \r\n * Calling this on a Timeline that is already paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#pause\r\n * @fires Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n this.emit(Events.TIMELINE_PAUSE, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a paused Timeline from where it was when it was paused.\r\n * \r\n * Calling this on a Timeline that isn't paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#resume\r\n * @fires Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n\r\n this.emit(Events.TIMELINE_RESUME, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if any of the Tweens in this Timeline as operating on the target object.\r\n * \r\n * Returns `false` if no Tweens operate on the target object.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check all Tweens against.\r\n *\r\n * @return {boolean} `true` if there is at least a single Tween that operates on the target object, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n if (this.data[i].hasTarget(target))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags\r\n * them for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n this.data[i].stop();\r\n }\r\n }\r\n\r\n});\r\n\r\nTimeline.TYPES = [ 'onStart', 'onUpdate', 'onLoop', 'onComplete', 'onYoyo' ];\r\n\r\nmodule.exports = Timeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/Timeline.js?")},"./node_modules/phaser/src/tweens/TweenManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NumberTweenBuilder = __webpack_require__(/*! ./builders/NumberTweenBuilder */ \"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar StaggerBuilder = __webpack_require__(/*! ./builders/StaggerBuilder */ \"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js\");\r\nvar TimelineBuilder = __webpack_require__(/*! ./builders/TimelineBuilder */ \"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines.\r\n *\r\n * @class TweenManager\r\n * @memberof Phaser.Tweens\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Tween Manager.\r\n */\r\nvar TweenManager = new Class({\r\n\r\n initialize:\r\n\r\n function TweenManager (scene)\r\n {\r\n /**\r\n * The Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Systems object of the Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The time scale of the Tween Manager.\r\n *\r\n * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be added to the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_add\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._add = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines pending to be later added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which are still incomplete and are actively processed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_active\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_destroy\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The number of Tweens and Timelines which need to be processed by the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.timeScale = 1;\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#createTimeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n createTimeline: function (config)\r\n {\r\n return TimelineBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and add it to the active Tween list/\r\n *\r\n * @method Phaser.Tweens.TweenManager#timeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n timeline: function (config)\r\n {\r\n var timeline = TimelineBuilder(this, config);\r\n\r\n if (!timeline.paused)\r\n {\r\n this._add.push(timeline);\r\n\r\n this._toProcess++;\r\n }\r\n\r\n return timeline;\r\n },\r\n\r\n /**\r\n * Create a Tween and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween object.\r\n */\r\n create: function (config)\r\n {\r\n return TweenBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween.\r\n */\r\n add: function (config)\r\n {\r\n var tween = TweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Add an existing tween into the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to add.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n existing: function (tween)\r\n {\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a Number Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#addCounter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - The configuration object for the Number Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Number Tween.\r\n */\r\n addCounter: function (config)\r\n {\r\n var tween = NumberTweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @method Phaser.Tweens.TweenManager#stagger\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\n stagger: function (value, options)\r\n {\r\n return StaggerBuilder(value, options);\r\n },\r\n\r\n /**\r\n * Updates the Tween Manager's internal lists at the start of the frame.\r\n *\r\n * This method will return immediately if no changes have been indicated.\r\n *\r\n * @method Phaser.Tweens.TweenManager#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var pending = this._pending;\r\n var i;\r\n var tween;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(tween);\r\n\r\n if (idx === -1)\r\n {\r\n // Not in the active array, is it in pending instead?\r\n idx = pending.indexOf(tween);\r\n\r\n if (idx > -1)\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n pending.splice(idx, 1);\r\n }\r\n }\r\n else\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during the update\r\n\r\n list = this._add;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n // Return true if the Tween should be started right away, otherwise false\r\n if (tween.init())\r\n {\r\n tween.play();\r\n\r\n this._active.push(tween);\r\n }\r\n else\r\n {\r\n this._pending.push(tween);\r\n }\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Updates all Tweens and Timelines of the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time in milliseconds.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n // Process active tweens\r\n var list = this._active;\r\n var tween;\r\n\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // If Tween.update returns 'true' then it means it has completed,\r\n // so move it to the destroy list\r\n if (tween.update(timestamp, delta))\r\n {\r\n this._destroy.push(tween);\r\n this._toProcess++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Removes the given tween from the Tween Manager, regardless of its state (pending or active).\r\n *\r\n * @method Phaser.Tweens.TweenManager#remove\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be removed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n remove: function (tween)\r\n {\r\n ArrayRemove(this._add, tween);\r\n ArrayRemove(this._pending, tween);\r\n ArrayRemove(this._active, tween);\r\n ArrayRemove(this._destroy, tween);\r\n\r\n tween.state = TWEEN_CONST.REMOVED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't.\r\n *\r\n * @method Phaser.Tweens.TweenManager#makeActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n makeActive: function (tween)\r\n {\r\n if (this._add.indexOf(tween) !== -1 || this._active.indexOf(tween) !== -1)\r\n {\r\n return this;\r\n }\r\n\r\n var idx = this._pending.indexOf(tween);\r\n\r\n if (idx !== -1)\r\n {\r\n this._pending.splice(idx, 1);\r\n }\r\n\r\n this._add.push(tween);\r\n\r\n tween.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Tweens to the given callback.\r\n *\r\n * @method Phaser.Tweens.TweenManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [scope] - The scope (`this` object) to call the function with.\r\n * @param {...*} [args] - The arguments to pass into the function. Its first argument will always be the Tween currently being iterated.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all active Tweens and Timelines in the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getAllTweens\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing references to all active Tweens and Timelines.\r\n */\r\n getAllTweens: function ()\r\n {\r\n var list = this._active;\r\n var output = [];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n output.push(list[i]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The scale of the time delta, usually 1.\r\n */\r\n getGlobalTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s).\r\n */\r\n getTweensOf: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n var output = [];\r\n var i;\r\n\r\n if (Array.isArray(target))\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n for (var t = 0; t < target.length; t++)\r\n {\r\n if (tween.hasTarget(target[t]))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given object is being affected by a playing Tween.\r\n *\r\n * @method Phaser.Tweens.TweenManager#isTweening\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - target Phaser.Tweens.Tween object\r\n *\r\n * @return {boolean} returns if target tween object is active or not\r\n */\r\n isTweening: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target) && tween.isPlaying())\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame.\r\n *\r\n * @method Phaser.Tweens.TweenManager#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killAll: function ()\r\n {\r\n var tweens = this.getAllTweens();\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @see {@link #getTweensOf}\r\n *\r\n * @method Phaser.Tweens.TweenManager#killTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killTweensOf: function (target)\r\n {\r\n var tweens = this.getTweensOf(target);\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#pauseAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#resumeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new scale of the time delta for this Tween Manager.\r\n *\r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens.\r\n *\r\n * @method Phaser.Tweens.TweenManager#setGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new scale of the time delta, where 1 is the normal speed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n setGlobalTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Tweens.TweenManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.killAll();\r\n\r\n this._add = [];\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n\r\n this._toProcess = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Tweens.TweenManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('TweenManager', TweenManager, 'tweens');\r\n\r\nmodule.exports = TweenManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/TweenManager.js?")},"./node_modules/phaser/src/tweens/builders/GetBoolean.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetBoolean.js?")},"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EaseMap = __webpack_require__(/*! ../../math/easing/EaseMap */ \"./node_modules/phaser/src/math/easing/EaseMap.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * This internal function is used to return the correct ease function for a Tween.\r\n * \r\n * It can take a variety of input, including an EaseMap based string, or a custom function.\r\n *\r\n * @function Phaser.Tweens.Builders.GetEaseFunction\r\n * @since 3.0.0\r\n *\r\n * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function.\r\n * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease.\r\n *\r\n * @return {function} The ease function.\r\n */\r\nvar GetEaseFunction = function (ease, easeParams)\r\n{\r\n // Default ease function\r\n var easeFunction = EaseMap.Power0;\r\n\r\n // Prepare ease function\r\n if (typeof ease === 'string')\r\n {\r\n // String based look-up\r\n\r\n // 1) They specified it correctly\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n else\r\n {\r\n // Do some string manipulation to try and find it\r\n var direction = '';\r\n\r\n if (ease.indexOf('.'))\r\n {\r\n // quad.in = Quad.easeIn\r\n // quad.out = Quad.easeOut\r\n // quad.inout =Quad.easeInOut\r\n\r\n direction = ease.substr(ease.indexOf('.') + 1);\r\n\r\n if (direction.toLowerCase() === 'in')\r\n {\r\n direction = 'easeIn';\r\n }\r\n else if (direction.toLowerCase() === 'out')\r\n {\r\n direction = 'easeOut';\r\n }\r\n else if (direction.toLowerCase() === 'inout')\r\n {\r\n direction = 'easeInOut';\r\n }\r\n }\r\n\r\n ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction);\r\n\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n }\r\n }\r\n else if (typeof ease === 'function')\r\n {\r\n // Custom function\r\n easeFunction = ease;\r\n }\r\n else if (Array.isArray(ease) && ease.length === 4)\r\n {\r\n // Bezier function (TODO)\r\n }\r\n\r\n // No custom ease parameters?\r\n if (!easeParams)\r\n {\r\n // Return ease function\r\n return easeFunction;\r\n }\r\n\r\n var cloneParams = easeParams.slice(0);\r\n\r\n cloneParams.unshift(0);\r\n\r\n // Return ease function with custom ease parameters\r\n return function (v)\r\n {\r\n cloneParams[0] = v;\r\n\r\n return easeFunction.apply(this, cloneParams);\r\n };\r\n};\r\n\r\nmodule.exports = GetEaseFunction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetEaseFunction.js?")},"./node_modules/phaser/src/tweens/builders/GetNewValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internal function used by the Tween Builder to create a function that will return\r\n * the given value from the source.\r\n *\r\n * @function Phaser.Tweens.Builders.GetNewValue\r\n * @since 3.0.0\r\n *\r\n * @param {any} source - The source object to get the value from.\r\n * @param {string} key - The property to get from the source.\r\n * @param {any} defaultValue - A default value to return should the source not have the property set.\r\n *\r\n * @return {function} A function which when called will return the property value from the source.\r\n */\r\nvar GetNewValue = function (source, key, defaultValue)\r\n{\r\n var valueCallback;\r\n\r\n if (source.hasOwnProperty(key))\r\n {\r\n var t = typeof(source[key]);\r\n\r\n if (t === 'function')\r\n {\r\n valueCallback = function (target, targetKey, value, targetIndex, totalTargets, tween)\r\n {\r\n return source[key](target, targetKey, value, targetIndex, totalTargets, tween);\r\n };\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return source[key];\r\n };\r\n }\r\n }\r\n else if (typeof defaultValue === 'function')\r\n {\r\n valueCallback = defaultValue;\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return defaultValue;\r\n };\r\n }\r\n\r\n return valueCallback;\r\n};\r\n\r\nmodule.exports = GetNewValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetNewValue.js?")},"./node_modules/phaser/src/tweens/builders/GetProps.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RESERVED = __webpack_require__(/*! ../tween/ReservedProps */ \"./node_modules/phaser/src/tweens/tween/ReservedProps.js\");\r\n\r\n/**\r\n * Internal function used by the Tween Builder to return an array of properties\r\n * that the Tween will be operating on. It takes a tween configuration object\r\n * and then checks that none of the `props` entries start with an underscore, or that\r\n * none of the direct properties are on the Reserved list.\r\n *\r\n * @function Phaser.Tweens.Builders.GetProps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig} config - The configuration object of the Tween to get the properties from.\r\n *\r\n * @return {string[]} An array of all the properties the tween will operate on.\r\n */\r\nvar GetProps = function (config)\r\n{\r\n var key;\r\n var keys = [];\r\n\r\n // First see if we have a props object\r\n\r\n if (config.hasOwnProperty('props'))\r\n {\r\n for (key in config.props)\r\n {\r\n // Skip any property that starts with an underscore\r\n if (key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config.props[key] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (key in config)\r\n {\r\n // Skip any property that is in the ReservedProps list or that starts with an underscore\r\n if (RESERVED.indexOf(key) === -1 && key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config[key] });\r\n }\r\n }\r\n }\r\n\r\n return keys;\r\n};\r\n\r\nmodule.exports = GetProps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetProps.js?")},"./node_modules/phaser/src/tweens/builders/GetTargets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Extracts an array of targets from a Tween configuration object.\r\n *\r\n * The targets will be looked for in a `targets` property. If it's a function, its return value will be used as the result.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTargets\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object to use.\r\n *\r\n * @return {array} An array of targets (may contain only one element), or `null` if no targets were specified.\r\n */\r\nvar GetTargets = function (config)\r\n{\r\n var targets = GetValue(config, 'targets', null);\r\n\r\n if (targets === null)\r\n {\r\n return targets;\r\n }\r\n\r\n if (typeof targets === 'function')\r\n {\r\n targets = targets.call();\r\n }\r\n\r\n if (!Array.isArray(targets))\r\n {\r\n targets = [ targets ];\r\n }\r\n\r\n return targets;\r\n};\r\n\r\nmodule.exports = GetTargets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTargets.js?")},"./node_modules/phaser/src/tweens/builders/GetTweens.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Internal function used by the Timeline Builder.\r\n * \r\n * It returns an array of all tweens in the given timeline config.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} An array of Tween instances that the Timeline will manage.\r\n */\r\nvar GetTweens = function (config)\r\n{\r\n var tweens = GetValue(config, 'tweens', null);\r\n\r\n if (tweens === null)\r\n {\r\n return [];\r\n }\r\n else if (typeof tweens === 'function')\r\n {\r\n tweens = tweens.call();\r\n }\r\n\r\n if (!Array.isArray(tweens))\r\n {\r\n tweens = [ tweens ];\r\n }\r\n\r\n return tweens;\r\n};\r\n\r\nmodule.exports = GetTweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTweens.js?")},"./node_modules/phaser/src/tweens/builders/GetValueOp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetActive (def)\r\n{\r\n return (!!def.getActive && typeof def.getActive === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetStart (def)\r\n{\r\n return (!!def.getStart && typeof def.getStart === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetEnd (def)\r\n{\r\n return (!!def.getEnd && typeof def.getEnd === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetters (def)\r\n{\r\n return hasGetStart(def) || hasGetEnd(def) || hasGetActive(def);\r\n}\r\n\r\n/**\r\n * Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.\r\n * \r\n * `getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * `getEnd` is invoked once any start delays have expired and returns what the value should tween to.\r\n * `getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.\r\n *\r\n * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.\r\n * A string can be provided to specify a relative end value which consists of an operation\r\n * (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current\r\n * value, or `/=` to divide the current value) followed by its operand.\r\n * \r\n * A function can be provided to allow greater control over the end value; it will receive the target\r\n * object being tweened, the name of the property being tweened, and the current value of the property\r\n * as its arguments.\r\n * \r\n * If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`\r\n * callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`\r\n * property is provided, the property will be used as the effective value under the same rules described here.\r\n *\r\n * @function Phaser.Tweens.Builders.GetValueOp\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The name of the property to modify.\r\n * @param {*} propertyValue - The ending value of the property, as described above.\r\n *\r\n * @return {function} An array of functions, `getActive`, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.\r\n */\r\nvar GetValueOp = function (key, propertyValue)\r\n{\r\n var callbacks;\r\n\r\n // The returned value sets what the property will be at the END of the Tween (usually called at the start of the Tween)\r\n var getEnd = function (target, key, value) { return value; };\r\n\r\n // The returned value sets what the property will be at the START of the Tween (usually called at the end of the Tween)\r\n var getStart = function (target, key, value) { return value; };\r\n\r\n // What to set the property to the moment the TweenData is invoked\r\n var getActive = null;\r\n\r\n var t = typeof(propertyValue);\r\n\r\n if (t === 'number')\r\n {\r\n // props: {\r\n // x: 400,\r\n // y: 300\r\n // }\r\n\r\n getEnd = function ()\r\n {\r\n return propertyValue;\r\n };\r\n }\r\n else if (t === 'string')\r\n {\r\n // props: {\r\n // x: '+=400',\r\n // y: '-=300',\r\n // z: '*=2',\r\n // w: '/=2'\r\n // }\r\n\r\n var op = propertyValue[0];\r\n var num = parseFloat(propertyValue.substr(2));\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n getEnd = function (target, key, value)\r\n {\r\n return value + num;\r\n };\r\n break;\r\n\r\n case '-':\r\n getEnd = function (target, key, value)\r\n {\r\n return value - num;\r\n };\r\n break;\r\n\r\n case '*':\r\n getEnd = function (target, key, value)\r\n {\r\n return value * num;\r\n };\r\n break;\r\n\r\n case '/':\r\n getEnd = function (target, key, value)\r\n {\r\n return value / num;\r\n };\r\n break;\r\n\r\n default:\r\n getEnd = function ()\r\n {\r\n return parseFloat(propertyValue);\r\n };\r\n }\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the getEnd function and no getStart\r\n\r\n // props: {\r\n // x: function (target, key, value, targetIndex, totalTargets, tween) { return value + 50); },\r\n // }\r\n\r\n getEnd = propertyValue;\r\n }\r\n else if (t === 'object')\r\n {\r\n if (hasGetters(propertyValue))\r\n {\r\n /*\r\n x: {\r\n // Called the moment Tween is active. The returned value sets the property on the target immediately.\r\n getActive: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the start of the Tween. The returned value sets what the property will be at the END of the Tween.\r\n getEnd: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the end of the Tween. The returned value sets what the property will be at the START of the Tween.\r\n getStart: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (hasGetActive(propertyValue))\r\n {\r\n getActive = propertyValue.getActive;\r\n }\r\n\r\n if (hasGetEnd(propertyValue))\r\n {\r\n getEnd = propertyValue.getEnd;\r\n }\r\n\r\n if (hasGetStart(propertyValue))\r\n {\r\n getStart = propertyValue.getStart;\r\n }\r\n }\r\n else if (propertyValue.hasOwnProperty('value'))\r\n {\r\n // 'value' may still be a string, function or a number\r\n // props: {\r\n // x: { value: 400, ... },\r\n // y: { value: 300, ... }\r\n // }\r\n\r\n callbacks = GetValueOp(key, propertyValue.value);\r\n }\r\n else\r\n {\r\n // 'from' and 'to' may still be a string, function or a number\r\n // props: {\r\n // x: { from: 400, to: 600 },\r\n // y: { from: 300, to: 500 }\r\n // }\r\n\r\n // Same as above, but the 'start' value is set immediately on the target\r\n // props: {\r\n // x: { start: 400, to: 600 },\r\n // y: { start: 300, to: 500 }\r\n // }\r\n\r\n // 'start' value is set immediately, then it goes 'from' to 'to' during the tween\r\n // props: {\r\n // x: { start: 200, from: 400, to: 600 },\r\n // y: { start: 300, from: 300, to: 500 }\r\n // }\r\n\r\n var hasTo = propertyValue.hasOwnProperty('to');\r\n var hasFrom = propertyValue.hasOwnProperty('from');\r\n var hasStart = propertyValue.hasOwnProperty('start');\r\n\r\n if (hasTo && (hasFrom || hasStart))\r\n {\r\n callbacks = GetValueOp(key, propertyValue.to);\r\n\r\n if (hasStart)\r\n {\r\n var startCallbacks = GetValueOp(key, propertyValue.start);\r\n \r\n callbacks.getActive = startCallbacks.getEnd;\r\n }\r\n \r\n if (hasFrom)\r\n {\r\n var fromCallbacks = GetValueOp(key, propertyValue.from);\r\n \r\n callbacks.getStart = fromCallbacks.getEnd;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // If callback not set by the else if block above then set it here and return it\r\n if (!callbacks)\r\n {\r\n callbacks = {\r\n getActive: getActive,\r\n getEnd: getEnd,\r\n getStart: getStart\r\n };\r\n }\r\n\r\n return callbacks;\r\n};\r\n\r\nmodule.exports = GetValueOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetValueOp.js?")},"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Number Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.NumberTweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar NumberTweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // var tween = this.tweens.addCounter({\r\n // from: 100,\r\n // to: 200,\r\n // ... (normal tween properties)\r\n // })\r\n //\r\n // Then use it in your game via:\r\n //\r\n // tween.getValue()\r\n\r\n var from = GetValue(config, 'from', 0);\r\n var to = GetValue(config, 'to', 1);\r\n\r\n var targets = [ { value: from } ];\r\n\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n\r\n var data = [];\r\n\r\n var ops = GetValueOp('value', to);\r\n\r\n var tweenData = TweenData(\r\n targets[0],\r\n 0,\r\n 'value',\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n ease,\r\n delay,\r\n duration,\r\n yoyo,\r\n hold,\r\n repeat,\r\n repeatDelay,\r\n false,\r\n false\r\n );\r\n\r\n tweenData.start = from;\r\n tweenData.current = from;\r\n tweenData.to = to;\r\n\r\n data.push(tweenData);\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = NumberTweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @function Phaser.Tweens.Builders.StaggerBuilder\r\n * @since 3.19.0\r\n *\r\n * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.\r\n * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\nvar StaggerBuilder = function (value, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var result;\r\n\r\n var start = GetValue(options, 'start', 0);\r\n var ease = GetValue(options, 'ease', null);\r\n var grid = GetValue(options, 'grid', null);\r\n\r\n var from = GetValue(options, 'from', 0);\r\n\r\n var fromFirst = (from === 'first');\r\n var fromCenter = (from === 'center');\r\n var fromLast = (from === 'last');\r\n var fromValue = (typeof(from) === 'number');\r\n\r\n var isRange = (Array.isArray(value));\r\n var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value);\r\n var value2 = (isRange) ? parseFloat(value[1]) : 0;\r\n var maxValue = Math.max(value1, value2);\r\n\r\n if (isRange)\r\n {\r\n start += value1;\r\n }\r\n\r\n if (grid)\r\n {\r\n // Pre-calc the grid to save doing it for ever tweendata update\r\n var gridWidth = grid[0];\r\n var gridHeight = grid[1];\r\n\r\n var fromX = 0;\r\n var fromY = 0;\r\n\r\n var distanceX = 0;\r\n var distanceY = 0;\r\n\r\n var gridValues = [];\r\n\r\n if (fromLast)\r\n {\r\n fromX = gridWidth - 1;\r\n fromY = gridHeight - 1;\r\n }\r\n else if (fromValue)\r\n {\r\n fromX = from % gridWidth;\r\n fromY = Math.floor(from / gridWidth);\r\n }\r\n else if (fromCenter)\r\n {\r\n fromX = (gridWidth - 1) / 2;\r\n fromY = (gridHeight - 1) / 2;\r\n }\r\n\r\n var gridMax = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var toY = 0; toY < gridHeight; toY++)\r\n {\r\n gridValues[toY] = [];\r\n\r\n for (var toX = 0; toX < gridWidth; toX++)\r\n {\r\n distanceX = fromX - toX;\r\n distanceY = fromY - toY;\r\n\r\n var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\r\n\r\n if (dist > gridMax)\r\n {\r\n gridMax = dist;\r\n }\r\n\r\n gridValues[toY][toX] = dist;\r\n }\r\n }\r\n }\r\n\r\n var easeFunction = (ease) ? GetEaseFunction(ease) : null;\r\n\r\n if (grid)\r\n {\r\n result = function (target, key, value, index)\r\n {\r\n var gridSpace = 0;\r\n var toX = index % gridWidth;\r\n var toY = Math.floor(index / gridWidth);\r\n \r\n if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight)\r\n {\r\n gridSpace = gridValues[toY][toX];\r\n }\r\n\r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var diff = (value2 - value1);\r\n \r\n if (easeFunction)\r\n {\r\n output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = (gridSpace / gridMax) * diff;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (gridSpace * value1) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = gridSpace * value1;\r\n }\r\n\r\n return output + start;\r\n };\r\n }\r\n else\r\n {\r\n result = function (target, key, value, index, total)\r\n {\r\n // zero offset\r\n total--;\r\n \r\n var fromIndex;\r\n \r\n if (fromFirst)\r\n {\r\n fromIndex = index;\r\n }\r\n else if (fromCenter)\r\n {\r\n fromIndex = Math.abs((total / 2) - index);\r\n }\r\n else if (fromLast)\r\n {\r\n fromIndex = total - index;\r\n }\r\n else if (fromValue)\r\n {\r\n fromIndex = Math.abs(from - index);\r\n }\r\n \r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var spacing;\r\n\r\n if (fromCenter)\r\n {\r\n spacing = ((value2 - value1) / total) * (fromIndex * 2);\r\n }\r\n else\r\n {\r\n spacing = ((value2 - value1) / total) * fromIndex;\r\n }\r\n \r\n if (easeFunction)\r\n {\r\n output = spacing * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = spacing;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (total * maxValue) * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = fromIndex * value1;\r\n }\r\n \r\n return output + start;\r\n };\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = StaggerBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/StaggerBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetTweens = __webpack_require__(/*! ./GetTweens */ \"./node_modules/phaser/src/tweens/builders/GetTweens.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Timeline = __webpack_require__(/*! ../Timeline */ \"./node_modules/phaser/src/tweens/Timeline.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * Builds a Timeline of Tweens based on a configuration object.\r\n *\r\n * @function Phaser.Tweens.Builders.TimelineBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager to which the Timeline will belong.\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline.\r\n */\r\nvar TimelineBuilder = function (manager, config)\r\n{\r\n var timeline = new Timeline(manager);\r\n\r\n var tweens = GetTweens(config);\r\n\r\n if (tweens.length === 0)\r\n {\r\n timeline.paused = true;\r\n\r\n return timeline;\r\n }\r\n\r\n var defaults = Clone(Defaults);\r\n\r\n defaults.targets = GetTargets(config);\r\n\r\n // totalDuration: If specified each tween in the Timeline is given an equal portion of the totalDuration\r\n\r\n var totalDuration = GetAdvancedValue(config, 'totalDuration', 0);\r\n\r\n if (totalDuration > 0)\r\n {\r\n defaults.duration = Math.floor(totalDuration / tweens.length);\r\n }\r\n else\r\n {\r\n defaults.duration = GetNewValue(config, 'duration', defaults.duration);\r\n }\r\n\r\n defaults.delay = GetNewValue(config, 'delay', defaults.delay);\r\n defaults.easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n defaults.ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), defaults.easeParams);\r\n defaults.hold = GetNewValue(config, 'hold', defaults.hold);\r\n defaults.repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n defaults.repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n defaults.yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n defaults.flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n defaults.flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n // Create the Tweens\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n timeline.queue(TweenBuilder(timeline, tweens[i], defaults));\r\n }\r\n\r\n timeline.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n timeline.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n timeline.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n timeline.paused = GetBoolean(config, 'paused', false);\r\n timeline.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Callbacks\r\n\r\n var scope = GetValue(config, 'callbackScope', timeline);\r\n\r\n var timelineArray = [ timeline ];\r\n\r\n var onStart = GetValue(config, 'onStart', false);\r\n\r\n // The Start of the Timeline\r\n if (onStart)\r\n {\r\n var onStartScope = GetValue(config, 'onStartScope', scope);\r\n var onStartParams = GetValue(config, 'onStartParams', []);\r\n\r\n timeline.setCallback('onStart', onStart, timelineArray.concat(onStartParams), onStartScope);\r\n }\r\n\r\n var onUpdate = GetValue(config, 'onUpdate', false);\r\n\r\n // Every time the Timeline updates (regardless which Tweens are running)\r\n if (onUpdate)\r\n {\r\n var onUpdateScope = GetValue(config, 'onUpdateScope', scope);\r\n var onUpdateParams = GetValue(config, 'onUpdateParams', []);\r\n\r\n timeline.setCallback('onUpdate', onUpdate, timelineArray.concat(onUpdateParams), onUpdateScope);\r\n }\r\n\r\n var onLoop = GetValue(config, 'onLoop', false);\r\n\r\n // Called when the whole Timeline loops\r\n if (onLoop)\r\n {\r\n var onLoopScope = GetValue(config, 'onLoopScope', scope);\r\n var onLoopParams = GetValue(config, 'onLoopParams', []);\r\n\r\n timeline.setCallback('onLoop', onLoop, timelineArray.concat(onLoopParams), onLoopScope);\r\n }\r\n\r\n var onYoyo = GetValue(config, 'onYoyo', false);\r\n\r\n // Called when a Timeline yoyos\r\n if (onYoyo)\r\n {\r\n var onYoyoScope = GetValue(config, 'onYoyoScope', scope);\r\n var onYoyoParams = GetValue(config, 'onYoyoParams', []);\r\n\r\n timeline.setCallback('onYoyo', onYoyo, timelineArray.concat(null, onYoyoParams), onYoyoScope);\r\n }\r\n\r\n var onComplete = GetValue(config, 'onComplete', false);\r\n\r\n // Called when the Timeline completes, after the completeDelay, etc.\r\n if (onComplete)\r\n {\r\n var onCompleteScope = GetValue(config, 'onCompleteScope', scope);\r\n var onCompleteParams = GetValue(config, 'onCompleteParams', []);\r\n\r\n timeline.setCallback('onComplete', onComplete, timelineArray.concat(onCompleteParams), onCompleteScope);\r\n }\r\n\r\n return timeline;\r\n};\r\n\r\nmodule.exports = TimelineBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TimelineBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetProps = __webpack_require__(/*! ./GetProps */ \"./node_modules/phaser/src/tweens/builders/GetProps.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.TweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar TweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // Create arrays of the Targets and the Properties\r\n var targets = (defaults.targets) ? defaults.targets : GetTargets(config);\r\n\r\n // var props = (defaults.props) ? defaults.props : GetProps(config);\r\n var props = GetProps(config);\r\n\r\n // Default Tween values\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n var flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n var flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n var data = [];\r\n\r\n // Loop through every property defined in the Tween, i.e.: props { x, y, alpha }\r\n for (var p = 0; p < props.length; p++)\r\n {\r\n var key = props[p].key;\r\n var value = props[p].value;\r\n\r\n // Create 1 TweenData per target, per property\r\n for (var t = 0; t < targets.length; t++)\r\n {\r\n var ops = GetValueOp(key, value);\r\n\r\n var tweenData = TweenData(\r\n targets[t],\r\n t,\r\n key,\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n GetEaseFunction(GetValue(value, 'ease', ease), easeParams),\r\n GetNewValue(value, 'delay', delay),\r\n GetNewValue(value, 'duration', duration),\r\n GetBoolean(value, 'yoyo', yoyo),\r\n GetNewValue(value, 'hold', hold),\r\n GetNewValue(value, 'repeat', repeat),\r\n GetNewValue(value, 'repeatDelay', repeatDelay),\r\n GetBoolean(value, 'flipX', flipX),\r\n GetBoolean(value, 'flipY', flipY)\r\n );\r\n\r\n data.push(tweenData);\r\n }\r\n }\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = TweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Builders\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetBoolean: __webpack_require__(/*! ./GetBoolean */ "./node_modules/phaser/src/tweens/builders/GetBoolean.js"),\r\n GetEaseFunction: __webpack_require__(/*! ./GetEaseFunction */ "./node_modules/phaser/src/tweens/builders/GetEaseFunction.js"),\r\n GetNewValue: __webpack_require__(/*! ./GetNewValue */ "./node_modules/phaser/src/tweens/builders/GetNewValue.js"),\r\n GetProps: __webpack_require__(/*! ./GetProps */ "./node_modules/phaser/src/tweens/builders/GetProps.js"),\r\n GetTargets: __webpack_require__(/*! ./GetTargets */ "./node_modules/phaser/src/tweens/builders/GetTargets.js"),\r\n GetTweens: __webpack_require__(/*! ./GetTweens */ "./node_modules/phaser/src/tweens/builders/GetTweens.js"),\r\n GetValueOp: __webpack_require__(/*! ./GetValueOp */ "./node_modules/phaser/src/tweens/builders/GetValueOp.js"),\r\n NumberTweenBuilder: __webpack_require__(/*! ./NumberTweenBuilder */ "./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js"),\r\n TimelineBuilder: __webpack_require__(/*! ./TimelineBuilder */ "./node_modules/phaser/src/tweens/builders/TimelineBuilder.js"),\r\n TweenBuilder: __webpack_require__(/*! ./TweenBuilder */ "./node_modules/phaser/src/tweens/builders/TweenBuilder.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/index.js?')},"./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Complete Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it completes playback.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('complete', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Loop Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it loops.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 4,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('loop', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Pause Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is paused.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('pause', listener);\r\n * // At some point later ...\r\n * timeline.pause();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Resume Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is resumed from a paused state.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('resume', listener);\r\n * // At some point later ...\r\n * timeline.resume();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Start Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it starts.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('start', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Update Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it updates, which can happen a lot of times per second,\r\n * so be careful about listening to this event unless you absolutely require it.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('update', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Active Event.\r\n * \r\n * This event is dispatched by a Tween when it becomes active within the Tween Manager.\r\n * \r\n * An 'active' Tween is one that is now progressing, although it may not yet be updating\r\n * any target properties, due to settings such as `delay`. If you need an event for when\r\n * the Tween starts actually updating its first property, see `TWEEN_START`.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('active', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('active', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'active';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Complete Event.\r\n * \r\n * This event is dispatched by a Tween when it completes playback entirely, factoring in repeats and loops.\r\n * \r\n * If the Tween has been set to loop or repeat infinitely, this event will not be dispatched\r\n * unless the `Tween.stop` method is called.\r\n * \r\n * If a Tween has a `completeDelay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('complete', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Loop Event.\r\n * \r\n * This event is dispatched by a Tween when it loops.\r\n * \r\n * This event will only be dispatched if the Tween has a loop count set.\r\n * \r\n * If a Tween has a `loopDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 6\r\n * });\r\n * tween.on('loop', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Repeat Event.\r\n * \r\n * This event is dispatched by a Tween when one of the properties it is tweening repeats.\r\n * \r\n * This event will only be dispatched if the Tween has a property with a repeat count set.\r\n * \r\n * If a Tween has a `repeatDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('repeat', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * repeat: 4\r\n * });\r\n * tween.on('repeat', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The key of the property that just repeated.\r\n * @param {any} target - The target that the property just repated on.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Start Event.\r\n * \r\n * This event is dispatched by a Tween when it starts tweening its first property.\r\n * \r\n * A Tween will only emit this event once, as it can only start once.\r\n * \r\n * If a Tween has a `delay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('start', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Update Event.\r\n * \r\n * This event is dispatched by a Tween every time it updates _any_ of the properties it is tweening.\r\n * \r\n * A Tween that is changing 3 properties of a target will emit this event 3 times per change, once per property.\r\n * \r\n * **Note:** This is a very high frequency event and may be dispatched multiple times, every single frame.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * });\r\n * tween.on('update', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that was updated, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Yoyo Event.\r\n * \r\n * This event is dispatched by a Tween whenever a property it is tweening yoyos.\r\n * \r\n * This event will only be dispatched if the Tween has a property with `yoyo` set.\r\n * \r\n * If the Tween has a `hold` value, this event is dispatched when the hold expires.\r\n * \r\n * This event is dispatched for every property, and for every target, that yoyos.\r\n * For example, if a Tween was updating 2 properties and had 10 targets, this event\r\n * would be dispatched 20 times (twice per target). So be careful how you use it!\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('yoyo', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * yoyo: true\r\n * });\r\n * tween.on('yoyo', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that yoyo'd, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was yoyo'd. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'yoyo';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js?")},"./node_modules/phaser/src/tweens/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n TIMELINE_COMPLETE: __webpack_require__(/*! ./TIMELINE_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js"),\r\n TIMELINE_LOOP: __webpack_require__(/*! ./TIMELINE_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js"),\r\n TIMELINE_PAUSE: __webpack_require__(/*! ./TIMELINE_PAUSE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js"),\r\n TIMELINE_RESUME: __webpack_require__(/*! ./TIMELINE_RESUME_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js"),\r\n TIMELINE_START: __webpack_require__(/*! ./TIMELINE_START_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js"),\r\n TIMELINE_UPDATE: __webpack_require__(/*! ./TIMELINE_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js"),\r\n TWEEN_ACTIVE: __webpack_require__(/*! ./TWEEN_ACTIVE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js"),\r\n TWEEN_COMPLETE: __webpack_require__(/*! ./TWEEN_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js"),\r\n TWEEN_LOOP: __webpack_require__(/*! ./TWEEN_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js"),\r\n TWEEN_REPEAT: __webpack_require__(/*! ./TWEEN_REPEAT_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js"),\r\n TWEEN_START: __webpack_require__(/*! ./TWEEN_START_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js"),\r\n TWEEN_UPDATE: __webpack_require__(/*! ./TWEEN_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js"),\r\n TWEEN_YOYO: __webpack_require__(/*! ./TWEEN_YOYO_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/index.js?')},"./node_modules/phaser/src/tweens/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./tween/const */ "./node_modules/phaser/src/tweens/tween/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Tweens\r\n */\r\n\r\nvar Tweens = {\r\n\r\n Builders: __webpack_require__(/*! ./builders */ "./node_modules/phaser/src/tweens/builders/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/tweens/events/index.js"),\r\n\r\n TweenManager: __webpack_require__(/*! ./TweenManager */ "./node_modules/phaser/src/tweens/TweenManager.js"),\r\n Tween: __webpack_require__(/*! ./tween/Tween */ "./node_modules/phaser/src/tweens/tween/Tween.js"),\r\n TweenData: __webpack_require__(/*! ./tween/TweenData */ "./node_modules/phaser/src/tweens/tween/TweenData.js"),\r\n Timeline: __webpack_require__(/*! ./Timeline */ "./node_modules/phaser/src/tweens/Timeline.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nTweens = Extend(false, Tweens, CONST);\r\n\r\nmodule.exports = Tweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/index.js?')},"./node_modules/phaser/src/tweens/tween/Defaults.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Types.Tweens.TweenConfigDefaults\r\n * @since 3.0.0\r\n * \r\n * @property {(object|object[])} targets - The object, or an array of objects, to run the tween on.\r\n * @property {number} [delay=0] - The number of milliseconds to delay before the tween will start.\r\n * @property {number} [duration=1000] - The duration of the tween in milliseconds.\r\n * @property {string} [ease='Power0'] - The easing equation to use for the tween.\r\n * @property {array} [easeParams] - Optional easing parameters.\r\n * @property {number} [hold=0] - The number of milliseconds to hold the tween for before yoyo'ing.\r\n * @property {number} [repeat=0] - The number of times to repeat the tween.\r\n * @property {number} [repeatDelay=0] - The number of milliseconds to pause before a tween will repeat.\r\n * @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.\r\n * @property {boolean} [flipX=false] - Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.\r\n * @property {boolean} [flipY=false] - Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.\r\n */\r\n\r\nvar TWEEN_DEFAULTS = {\r\n targets: null,\r\n delay: 0,\r\n duration: 1000,\r\n ease: 'Power0',\r\n easeParams: null,\r\n hold: 0,\r\n repeat: 0,\r\n repeatDelay: 0,\r\n yoyo: false,\r\n flipX: false,\r\n flipY: false\r\n};\r\n\r\nmodule.exports = TWEEN_DEFAULTS;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Defaults.js?")},"./node_modules/phaser/src/tweens/tween/ReservedProps.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// RESERVED properties that a Tween config object uses\r\n\r\n// completeDelay: The time the tween will wait before the onComplete event is dispatched once it has completed\r\n// delay: The time the tween will wait before it first starts\r\n// duration: The duration of the tween\r\n// ease: The ease function used by the tween\r\n// easeParams: The parameters to go with the ease function (if any)\r\n// flipX: flip X the GameObject on tween end\r\n// flipY: flip Y the GameObject on tween end// hold: The time the tween will pause before running a yoyo\r\n// hold: The time the tween will pause before running a yoyo\r\n// loop: The time the tween will pause before starting either a yoyo or returning to the start for a repeat\r\n// loopDelay: \r\n// offset: Used when the Tween is part of a Timeline\r\n// paused: Does the tween start in a paused state, or playing?\r\n// props: The properties being tweened by the tween\r\n// repeat: The number of times the tween will repeat itself (a value of 1 means the tween will play twice, as it repeated once)\r\n// repeatDelay: The time the tween will pause for before starting a repeat. The tween holds in the start state.\r\n// targets: The targets the tween is updating.\r\n// useFrames: Use frames or milliseconds?\r\n// yoyo: boolean - Does the tween reverse itself (yoyo) when it reaches the end?\r\n\r\nmodule.exports = [\r\n 'callbackScope',\r\n 'completeDelay',\r\n 'delay',\r\n 'duration',\r\n 'ease',\r\n 'easeParams',\r\n 'flipX',\r\n 'flipY',\r\n 'hold',\r\n 'loop',\r\n 'loopDelay',\r\n 'offset',\r\n 'onActive',\r\n 'onActiveParams',\r\n 'onActiveScope',\r\n 'onComplete',\r\n 'onCompleteParams',\r\n 'onCompleteScope',\r\n 'onLoop',\r\n 'onLoopParams',\r\n 'onLoopScope',\r\n 'onRepeat',\r\n 'onRepeatParams',\r\n 'onRepeatScope',\r\n 'onStart',\r\n 'onStartParams',\r\n 'onStartScope',\r\n 'onUpdate',\r\n 'onUpdateParams',\r\n 'onUpdateScope',\r\n 'onYoyo',\r\n 'onYoyoParams',\r\n 'onYoyoScope',\r\n 'paused',\r\n 'props',\r\n 'repeat',\r\n 'repeatDelay',\r\n 'targets',\r\n 'useFrames',\r\n 'yoyo'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/ReservedProps.js?")},"./node_modules/phaser/src/tweens/tween/Tween.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tween is able to manipulate the properties of one or more objects to any given value, based\r\n * on a duration and type of ease. They are rarely instantiated directly and instead should be\r\n * created via the TweenManager.\r\n *\r\n * @class Tween\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - A reference to the parent of this Tween. Either the Tween Manager or a Tween Timeline instance.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig[]} data - An array of TweenData objects, each containing a unique property to be tweened.\r\n * @param {array} targets - An array of targets to be tweened.\r\n */\r\nvar Tween = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Tween (parent, data, targets)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the parent of this Tween.\r\n * Either the Tween Manager or a Tween Timeline instance.\r\n *\r\n * @name Phaser.Tweens.Tween#parent\r\n * @type {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * Is the parent of this Tween a Timeline?\r\n *\r\n * @name Phaser.Tweens.Tween#parentIsTimeline\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.parentIsTimeline = parent.hasOwnProperty('isTimeline');\r\n\r\n /**\r\n * An array of TweenData objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Tween#data\r\n * @type {Phaser.Types.Tweens.TweenDataConfig[]}\r\n * @since 3.0.0\r\n */\r\n this.data = data;\r\n\r\n /**\r\n * The cached length of the data array.\r\n *\r\n * @name Phaser.Tweens.Tween#totalData\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalData = data.length;\r\n\r\n /**\r\n * An array of references to the target/s this Tween is operating on.\r\n *\r\n * @name Phaser.Tweens.Tween#targets\r\n * @type {object[]}\r\n * @since 3.0.0\r\n */\r\n this.targets = targets;\r\n\r\n /**\r\n * Cached target total (not necessarily the same as the data total)\r\n *\r\n * @name Phaser.Tweens.Tween#totalTargets\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalTargets = targets.length;\r\n\r\n /**\r\n * If `true` then duration, delay, etc values are all frame totals.\r\n *\r\n * @name Phaser.Tweens.Tween#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Tween#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this tween? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL TweenDatas again. Use TweenData.repeat to loop a single element.\r\n *\r\n * @name Phaser.Tweens.Tween#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before the tween loops.\r\n *\r\n * @name Phaser.Tweens.Tween#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Tween#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onStart' event fires.\r\n * This is the shortest `delay` value across all of the TweenDatas of this Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#startDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.19.0\r\n */\r\n this.startDelay = 0;\r\n\r\n /**\r\n * Has this Tween started playback yet?\r\n * This boolean is toggled when the Tween leaves the 'delayed' state and starts running.\r\n *\r\n * @name Phaser.Tweens.Tween#hasStarted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.hasStarted = false;\r\n\r\n /**\r\n * Is this Tween currently seeking?\r\n * This boolean is toggled in the `Tween.seek` method.\r\n * When a tween is seeking it will not dispatch any events or callbacks.\r\n *\r\n * @name Phaser.Tweens.Tween#isSeeking\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isSeeking = false;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = -1 (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Tween#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer (used by timeline offset, loopDelay and completeDelay)\r\n *\r\n * @name Phaser.Tweens.Tween#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline.\r\n *\r\n * @name Phaser.Tweens.Tween#offset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.offset = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline. The calculated offset amount.\r\n *\r\n * @name Phaser.Tweens.Tween#calculatedOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.calculatedOffset = 0;\r\n\r\n /**\r\n * The current state of the tween\r\n *\r\n * @name Phaser.Tweens.Tween#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the tween when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Tween#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n /**\r\n * Does the Tween start off paused? (if so it needs to be started with Tween.play)\r\n *\r\n * @name Phaser.Tweens.Tween#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through the Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Tween to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Tween#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the Tween, excluding loops.\r\n *\r\n * @name Phaser.Tweens.Tween#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for the Tween to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Tween#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @name Phaser.Tweens.Tween#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onActive: null,\r\n onComplete: null,\r\n onLoop: null,\r\n onRepeat: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Tween#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Returns the current value of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the Tween.\r\n */\r\n getValue: function ()\r\n {\r\n return this.data[0].current;\r\n },\r\n\r\n /**\r\n * Set the scale the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Tween#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The scale factor for timescale.\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time applied to this Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The timescale of this tween (between 0 and 1)\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently active.\r\n *\r\n * @method Phaser.Tweens.Tween#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently paused.\r\n *\r\n * @method Phaser.Tweens.Tween#isPaused\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.state === TWEEN_CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * See if this Tween is currently acting upon the given target.\r\n *\r\n * @method Phaser.Tweens.Tween#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check against this Tween.\r\n *\r\n * @return {boolean} `true` if the given target is a target of this Tween, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n return (this.targets.indexOf(target) !== -1);\r\n },\r\n\r\n /**\r\n * Updates the value of a property of this Tween to a new value, without adjusting the\r\n * Tween duration or current progress.\r\n * \r\n * You can optionally tell it to set the 'start' value to be the current value (before the change).\r\n *\r\n * @method Phaser.Tweens.Tween#updateTo\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The property to set the new value for.\r\n * @param {*} value - The new value of the property.\r\n * @param {boolean} [startToCurrent=false] - Should this change set the start value to be the current value?\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n updateTo: function (key, value, startToCurrent)\r\n {\r\n if (startToCurrent === undefined) { startToCurrent = false; }\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (tweenData.key === key)\r\n {\r\n tweenData.end = value;\r\n\r\n if (startToCurrent)\r\n {\r\n tweenData.start = tweenData.current;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts the tween from the beginning.\r\n *\r\n * @method Phaser.Tweens.Tween#restart\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n restart: function ()\r\n {\r\n // Reset these so they're ready for the next update\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return this.seek(0);\r\n }\r\n else if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n else if (this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n return this;\r\n }\r\n else\r\n {\r\n return this.play();\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that calculates the overall duration of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var maxDuration = 0;\r\n var minDelay = Number.MAX_SAFE_INTEGER;\r\n\r\n var data = this.data;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n // Set t1 (duration + hold + yoyo)\r\n tweenData.t1 = tweenData.duration + tweenData.hold;\r\n\r\n if (tweenData.yoyo)\r\n {\r\n tweenData.t1 += tweenData.duration;\r\n }\r\n\r\n // Set t2 (repeatDelay + duration + hold + yoyo)\r\n tweenData.t2 = tweenData.t1 + tweenData.repeatDelay;\r\n\r\n // Total Duration\r\n tweenData.totalDuration = tweenData.delay + tweenData.t1;\r\n\r\n if (tweenData.repeat === -1)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * 999999999999);\r\n }\r\n else if (tweenData.repeat > 0)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * tweenData.repeat);\r\n }\r\n\r\n if (tweenData.totalDuration > maxDuration)\r\n {\r\n // Get the longest TweenData from the Tween, used to calculate the Tween TD\r\n maxDuration = tweenData.totalDuration;\r\n }\r\n\r\n if (tweenData.delay < minDelay)\r\n {\r\n minDelay = tweenData.delay;\r\n }\r\n }\r\n\r\n // Excludes loop values\r\n\r\n // If duration has been set to 0 then we give it a super-low value so that it always\r\n // renders at least 1 frame, but no more, without causing divided by zero errors elsewhere.\r\n this.duration = Math.max(maxDuration, 0.001);\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n\r\n // How long before this Tween starts playback?\r\n this.startDelay = minDelay;\r\n },\r\n\r\n /**\r\n * Called by TweenManager.preUpdate as part of its loop to check pending and active tweens.\r\n * Should not be called directly.\r\n *\r\n * @method Phaser.Tweens.Tween#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Tween should be moved from the pending list to the active list by the Tween Manager.\r\n */\r\n init: function ()\r\n {\r\n // You can't have a paused Tween if it's part of a Timeline\r\n if (this.paused && !this.parentIsTimeline)\r\n {\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n return false;\r\n }\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n }\r\n\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n this.elapsed = 0;\r\n this.totalElapsed = 0;\r\n\r\n this.state = TWEEN_CONST.INIT;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal method that makes this Tween active within the TweenManager\r\n * and emits the onActive event and callback.\r\n *\r\n * @method Phaser.Tweens.Tween#makeActive\r\n * @fires Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n */\r\n makeActive: function ()\r\n {\r\n this.parent.makeActive(this);\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_ACTIVE, this.callbacks.onActive);\r\n },\r\n\r\n /**\r\n * Internal method that advances to the next state of the Tween during playback.\r\n *\r\n * @method Phaser.Tweens.Tween#nextState\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.0.0\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.loopCounter--;\r\n\r\n this.resetTweenData(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Pauses the Tween immediately. Use `resume` to continue playback.\r\n *\r\n * @method Phaser.Tweens.Tween#pause\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return this;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Starts a Tween playing.\r\n * \r\n * You only need to call this method if you have configured the tween to be paused on creation.\r\n * \r\n * If the Tween is already playing, calling this method again will have no effect. If you wish to\r\n * restart the Tween, use `Tween.restart` instead.\r\n * \r\n * Calling this method after the Tween has completed will start the Tween playing again from the start.\r\n * This is the same as calling `Tween.seek(0)` and then `Tween.play()`.\r\n *\r\n * @method Phaser.Tweens.Tween#play\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetFromTimeline=false] - Is this Tween being played as part of a Timeline?\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n play: function (resetFromTimeline)\r\n {\r\n if (resetFromTimeline === undefined) { resetFromTimeline = false; }\r\n\r\n var state = this.state;\r\n\r\n if (state === TWEEN_CONST.INIT && !this.parentIsTimeline)\r\n {\r\n this.resetTweenData(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n return this;\r\n }\r\n else if (state === TWEEN_CONST.ACTIVE || (state === TWEEN_CONST.PENDING_ADD && this._pausedState === TWEEN_CONST.PENDING_ADD))\r\n {\r\n return this;\r\n }\r\n else if (!this.parentIsTimeline && (state === TWEEN_CONST.PENDING_REMOVE || state === TWEEN_CONST.REMOVED))\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n\r\n if (this.parentIsTimeline)\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n if (this.calculatedOffset === 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n else\r\n {\r\n this.countdown = this.calculatedOffset;\r\n\r\n this.state = TWEEN_CONST.OFFSET_DELAY;\r\n }\r\n }\r\n else if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.makeActive();\r\n }\r\n else\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.makeActive();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that resets all of the Tween Data, including the progress and elapsed values.\r\n *\r\n * @method Phaser.Tweens.Tween#resetTweenData\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - Has this method been called as part of a loop?\r\n */\r\n resetTweenData: function (resetFromLoop)\r\n {\r\n var data = this.data;\r\n var total = this.totalData;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n var target = tweenData.target;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n if (resetFromLoop)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, key, tweenData.start, targetIndex, totalTargets, this);\r\n\r\n tweenData.end = tweenData.getEndValue(target, key, tweenData.end, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n\r\n if (tweenData.getActiveValue)\r\n {\r\n target[key] = tweenData.getActiveValue(tweenData.target, tweenData.key, tweenData.start);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resumes the playback of a previously paused Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#resume\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n }\r\n else\r\n {\r\n this.play();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in the Tween.\r\n * \r\n * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration.\r\n * \r\n * The given position is a value between 0 and 1 which represents how far through the Tween to seek to.\r\n * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start.\r\n * \r\n * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats.\r\n * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,\r\n * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration.\r\n * \r\n * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`\r\n * jumps per step. The longer the Tween, the longer this can take.\r\n *\r\n * @method Phaser.Tweens.Tween#seek\r\n * @since 3.0.0\r\n *\r\n * @param {number} toPosition - A value between 0 and 1 which represents the progress point to seek to.\r\n * @param {number} [delta=16.6] - The size of each step when seeking through the Tween. A higher value completes faster but at a cost of less precision.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n seek: function (toPosition, delta)\r\n {\r\n if (delta === undefined) { delta = 16.6; }\r\n\r\n if (this.totalDuration >= 3600000)\r\n {\r\n console.warn('Tween.seek duration too long');\r\n\r\n return this;\r\n }\r\n\r\n if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.makeActive();\r\n }\r\n\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.updateTweenData(this, tweenData, 0, targetIndex, totalTargets);\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n }\r\n\r\n this.calcDuration();\r\n\r\n var wasPaused = false;\r\n\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n wasPaused = true;\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.isSeeking = true;\r\n\r\n do\r\n {\r\n this.update(0, delta);\r\n\r\n } while (this.totalProgress < toPosition);\r\n\r\n this.isSeeking = false;\r\n\r\n if (wasPaused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an event based callback to be invoked during playback.\r\n * \r\n * Calling this method will replace a previously set callback for the given type, if any exists.\r\n * \r\n * The types available are:\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @method Phaser.Tweens.Tween#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - Type of the callback to set.\r\n * @param {function} callback - The function to invoke when this callback happens.\r\n * @param {array} [params] - An array of parameters for specified callbacks types.\r\n * @param {any} [scope] - The context the callback will be invoked in.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flags the Tween as being complete, whatever stage of progress it is at.\r\n *\r\n * If an onComplete callback has been defined it will automatically invoke it, unless a `delay`\r\n * argument is provided, in which case the Tween will delay for that period of time before calling the callback.\r\n *\r\n * If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead.\r\n *\r\n * @method Phaser.Tweens.Tween#complete\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.2.0\r\n *\r\n * @param {number} [delay=0] - The time to wait before invoking the complete callback. If zero it will fire immediately.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n complete: function (delay)\r\n {\r\n if (delay === undefined) { delay = 0; }\r\n\r\n if (delay)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = delay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately removes this Tween from the TweenManager and all of its internal arrays,\r\n * no matter what stage it as it. Then sets the tween state to `REMOVED`.\r\n * \r\n * You should dispose of your reference to this tween after calling this method, to\r\n * free it from memory.\r\n *\r\n * @method Phaser.Tweens.Tween#remove\r\n * @since 3.17.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n remove: function ()\r\n {\r\n this.parent.remove(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Tween#stop\r\n * @since 3.0.0\r\n *\r\n * @param {number} [resetTo] - If you want to seek the tween, provide a value between 0 and 1.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n stop: function (resetTo)\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n if (resetTo !== undefined)\r\n {\r\n this.seek(resetTo);\r\n }\r\n }\r\n\r\n if (this.state !== TWEEN_CONST.REMOVED)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED || this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n if (this.parentIsTimeline)\r\n {\r\n this.parent.manager._destroy.push(this);\r\n this.parent.manager._toProcess++;\r\n }\r\n else\r\n {\r\n this.parent._destroy.push(this);\r\n this.parent._toProcess++;\r\n }\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that advances the Tween based on the time values.\r\n *\r\n * @method Phaser.Tweens.Tween#update\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @fires Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.parent.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n if (!this.hasStarted && !this.isSeeking)\r\n {\r\n this.startDelay -= delta;\r\n \r\n if (this.startDelay <= 0)\r\n {\r\n this.hasStarted = true;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_START, this.callbacks.onStart);\r\n }\r\n }\r\n\r\n var stillRunning = false;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (this.updateTweenData(this, tweenData, delta))\r\n {\r\n stillRunning = true;\r\n }\r\n }\r\n\r\n // Anything still running? If not, we're done\r\n if (!stillRunning)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.OFFSET_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Internal method that will emit a TweenData based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenDataEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData object that caused this event.\r\n */\r\n dispatchTweenDataEvent: function (event, callback, tweenData)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, tweenData.key, tweenData.target);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = tweenData.target;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Tween based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTweenEvent: function (event, callback)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n \r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play in reverse.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromEnd\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @fires Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromEnd: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.yoyo)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a yoyo\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_YOYO, tween.callbacks.onYoyo, tweenData);\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n return TWEEN_CONST.PLAYING_BACKWARD;\r\n }\r\n else if (tweenData.repeatCounter > 0)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a Repeat.\r\n // So we're going to go right back to the start to repeat it again.\r\n\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play from the start.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromStart\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromStart: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.repeatCounter > 0)\r\n {\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method that advances the TweenData based on the time value given.\r\n *\r\n * @method Phaser.Tweens.Tween#updateTweenData\r\n * @fires Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} delta - Either a value in ms, or 1 if Tween.useFrames is true.\r\n *\r\n * @return {boolean} True if the tween is not complete (e.g., playing), or false if the tween is complete.\r\n */\r\n updateTweenData: function (tween, tweenData, delta)\r\n {\r\n var target = tweenData.target;\r\n\r\n switch (tweenData.state)\r\n {\r\n case TWEEN_CONST.PLAYING_FORWARD:\r\n case TWEEN_CONST.PLAYING_BACKWARD:\r\n\r\n if (!target)\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n break;\r\n }\r\n\r\n var elapsed = tweenData.elapsed;\r\n var duration = tweenData.duration;\r\n var diff = 0;\r\n\r\n elapsed += delta;\r\n\r\n if (elapsed > duration)\r\n {\r\n diff = elapsed - duration;\r\n elapsed = duration;\r\n }\r\n\r\n var forward = (tweenData.state === TWEEN_CONST.PLAYING_FORWARD);\r\n var progress = elapsed / duration;\r\n\r\n tweenData.elapsed = elapsed;\r\n tweenData.progress = progress;\r\n\r\n if (progress === 1)\r\n {\r\n if (forward)\r\n {\r\n tweenData.current = tweenData.end;\r\n target[tweenData.key] = tweenData.end;\r\n\r\n if (tweenData.hold > 0)\r\n {\r\n tweenData.elapsed = tweenData.hold - diff;\r\n\r\n tweenData.state = TWEEN_CONST.HOLD_DELAY;\r\n }\r\n else\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n tweenData.current = tweenData.start;\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = this.setStateFromStart(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n var v = (forward) ? tweenData.ease(progress) : tweenData.ease(1 - progress);\r\n\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n\r\n target[tweenData.key] = tweenData.current;\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_UPDATE, tween.callbacks.onUpdate, tweenData);\r\n\r\n break;\r\n\r\n case TWEEN_CONST.DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.REPEAT_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.HOLD_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, Math.abs(tweenData.elapsed));\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.PENDING_RENDER:\r\n\r\n if (target)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, tweenData.key, target[tweenData.key], tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n }\r\n\r\n break;\r\n }\r\n\r\n // Return TRUE if this TweenData still playing, otherwise return FALSE\r\n return (tweenData.state !== TWEEN_CONST.COMPLETE);\r\n }\r\n\r\n});\r\n\r\n// onActive = 'active' event = When the Tween is moved from the pending to the active list in the manager, even if playback delayed\r\n// onStart = 'start' event = When the Tween starts playing from a delayed state (will happen same time as onActive if no delay)\r\n// onYoyo = 'yoyo' event = When the Tween starts a yoyo\r\n// onRepeat = 'repeat' event = When a TweenData repeats playback (if any)\r\n// onComplete = 'complete' event = When the Tween finishes all playback (can sometimes never happen if repeat -1), also when 'stop' called\r\n// onUpdate = 'update' event = When the Tween updates a TweenData during playback (expensive!)\r\n// onLoop = 'loop' event = Used to loop ALL TweenDatas in a Tween\r\n\r\nTween.TYPES = [\r\n 'onActive',\r\n 'onComplete',\r\n 'onLoop',\r\n 'onRepeat',\r\n 'onStart',\r\n 'onUpdate',\r\n 'onYoyo'\r\n];\r\n\r\n/**\r\n * Creates a new Tween object.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectFactory.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.add(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\n/**\r\n * Creates a new Tween object and returns it.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectCreator.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.create(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\r\nmodule.exports = Tween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Tween.js?")},"./node_modules/phaser/src/tweens/tween/TweenData.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target.\r\n * A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.\r\n *\r\n * This is an internal function used by the TweenBuilder and should not be accessed directly, instead,\r\n * Tweens should be created using the GameObjectFactory or GameObjectCreator.\r\n *\r\n * @function Phaser.Tweens.TweenData\r\n * @since 3.0.0\r\n *\r\n * @param {any} target - The target to tween.\r\n * @param {integer} index - The target index within the Tween targets array.\r\n * @param {string} key - The property of the target to tween.\r\n * @param {function} getEnd - What the property will be at the END of the Tween.\r\n * @param {function} getStart - What the property will be at the START of the Tween.\r\n * @param {?function} getActive - If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * @param {function} ease - The ease function this tween uses.\r\n * @param {number} delay - Time in ms/frames before tween will start.\r\n * @param {number} duration - Duration of the tween in ms/frames.\r\n * @param {boolean} yoyo - Determines whether the tween should return back to its start value after hold has expired.\r\n * @param {number} hold - Time in ms/frames the tween will pause before repeating or returning to its starting value if yoyo is set to true.\r\n * @param {number} repeat - Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n * @param {number} repeatDelay - Time in ms/frames before the repeat will start.\r\n * @param {boolean} flipX - Should toggleFlipX be called when yoyo or repeat happens?\r\n * @param {boolean} flipY - Should toggleFlipY be called when yoyo or repeat happens?\r\n *\r\n * @return {Phaser.Types.Tweens.TweenDataConfig} The config object describing this TweenData.\r\n */\r\nvar TweenData = function (target, index, key, getEnd, getStart, getActive, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)\r\n{\r\n return {\r\n\r\n // The target to tween\r\n target: target,\r\n\r\n // The index of the target within the tween targets array\r\n index: index,\r\n\r\n // The property of the target to tween\r\n key: key,\r\n\r\n // What to set the property to the moment the TweenData is invoked.\r\n getActiveValue: getActive,\r\n\r\n // The returned value sets what the property will be at the END of the Tween.\r\n getEndValue: getEnd,\r\n\r\n // The returned value sets what the property will be at the START of the Tween.\r\n getStartValue: getStart,\r\n\r\n // The ease function this tween uses.\r\n ease: ease,\r\n\r\n // Duration of the tween in ms/frames, excludes time for yoyo or repeats.\r\n duration: 0,\r\n\r\n // The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo)\r\n totalDuration: 0,\r\n\r\n // Time in ms/frames before tween will start.\r\n delay: 0,\r\n\r\n // Cause the tween to return back to its start value after hold has expired.\r\n yoyo: yoyo,\r\n\r\n // Time in ms/frames the tween will pause before running the yoyo or starting a repeat.\r\n hold: 0,\r\n\r\n // Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n repeat: 0,\r\n\r\n // Time in ms/frames before the repeat will start.\r\n repeatDelay: 0,\r\n\r\n // Automatically call toggleFlipX when the TweenData yoyos or repeats\r\n flipX: flipX,\r\n\r\n // Automatically call toggleFlipY when the TweenData yoyos or repeats\r\n flipY: flipY,\r\n\r\n // Between 0 and 1 showing completion of this TweenData.\r\n progress: 0,\r\n\r\n // Delta counter.\r\n elapsed: 0,\r\n\r\n // How many repeats are left to run?\r\n repeatCounter: 0,\r\n\r\n // Ease Value Data:\r\n\r\n start: 0,\r\n current: 0,\r\n end: 0,\r\n\r\n // Time Durations\r\n t1: 0,\r\n t2: 0,\r\n\r\n // LoadValue generation functions\r\n gen: {\r\n delay: delay,\r\n duration: duration,\r\n hold: hold,\r\n repeat: repeat,\r\n repeatDelay: repeatDelay\r\n },\r\n\r\n // TWEEN_CONST.CREATED\r\n state: 0\r\n };\r\n};\r\n\r\nmodule.exports = TweenData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/TweenData.js?")},"./node_modules/phaser/src/tweens/tween/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/const.js?")},"./node_modules/phaser/src/utils/Class.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/Class.js?")},"./node_modules/phaser/src/utils/NOOP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/NOOP.js?")},"./node_modules/phaser/src/utils/array/Add.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Add.js?")},"./node_modules/phaser/src/utils/array/AddAt.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/AddAt.js?")},"./node_modules/phaser/src/utils/array/BringToTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/BringToTop.js?")},"./node_modules/phaser/src/utils/array/CountAllMatching.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/CountAllMatching.js?')},"./node_modules/phaser/src/utils/array/Each.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Each.js?")},"./node_modules/phaser/src/utils/array/EachInRange.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/EachInRange.js?')},"./node_modules/phaser/src/utils/array/FindClosestInSorted.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/FindClosestInSorted.js?")},"./node_modules/phaser/src/utils/array/GetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetAll.js?")},"./node_modules/phaser/src/utils/array/GetFirst.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetFirst.js?")},"./node_modules/phaser/src/utils/array/GetRandom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetRandom.js?")},"./node_modules/phaser/src/utils/array/MoveDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveDown.js?")},"./node_modules/phaser/src/utils/array/MoveTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveTo.js?")},"./node_modules/phaser/src/utils/array/MoveUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveUp.js?")},"./node_modules/phaser/src/utils/array/NumberArray.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\r\n * the given `start` and `end` arguments. For example:\r\n *\r\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\r\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n *\r\n * This is equivalent to `numberArrayStep(start, end, 1)`.\r\n *\r\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\r\n * strings, not integers. For example:\r\n *\r\n * `var array = numberArray(1, 4, \'Level \'); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]`\r\n * `var array = numberArray(5, 7, \'HD-\', \'.png\'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]`\r\n *\r\n * @function Phaser.Utils.Array.NumberArray\r\n * @since 3.0.0\r\n *\r\n * @param {number} start - The minimum value the array starts with.\r\n * @param {number} end - The maximum value the array contains.\r\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\r\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\r\n *\r\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\r\n */\r\nvar NumberArray = function (start, end, prefix, suffix)\r\n{\r\n var result = [];\r\n\r\n for (var i = start; i <= end; i++)\r\n {\r\n if (prefix || suffix)\r\n {\r\n var key = (prefix) ? prefix + i.toString() : i.toString();\r\n\r\n if (suffix)\r\n {\r\n key = key.concat(suffix);\r\n }\r\n\r\n result.push(key);\r\n }\r\n else\r\n {\r\n result.push(i);\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArray.js?')},"./node_modules/phaser/src/utils/array/NumberArrayStep.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js");\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArrayStep.js?')},"./node_modules/phaser/src/utils/array/QuickSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/QuickSelect.js?")},"./node_modules/phaser/src/utils/array/Range.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Shuffle = __webpack_require__(/*! ./Shuffle */ \"./node_modules/phaser/src/utils/array/Shuffle.js\");\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Range.js?")},"./node_modules/phaser/src/utils/array/Remove.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn\'t found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Remove.js?')},"./node_modules/phaser/src/utils/array/RemoveAt.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveAt.js?")},"./node_modules/phaser/src/utils/array/RemoveBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveBetween.js?')},"./node_modules/phaser/src/utils/array/RemoveRandomElement.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveRandomElement.js?')},"./node_modules/phaser/src/utils/array/Replace.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Replace.js?")},"./node_modules/phaser/src/utils/array/RotateLeft.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The "rotation" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/RotateRight.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The "rotation" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateRight.js?')},"./node_modules/phaser/src/utils/array/SafeRange.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SafeRange.js?")},"./node_modules/phaser/src/utils/array/SendToBack.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SendToBack.js?")},"./node_modules/phaser/src/utils/array/SetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SetAll.js?")},"./node_modules/phaser/src/utils/array/Shuffle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Shuffle.js?")},"./node_modules/phaser/src/utils/array/SpliceOne.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SpliceOne.js?")},"./node_modules/phaser/src/utils/array/StableSort.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\r\n//! © 2017 Angry Bytes and contributors. MIT licensed.\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.StableSortFunctions\r\n */\r\n\r\n(function() {\r\n\r\n /**\r\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array to be sorted.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar stable = function(arr, comp) {\r\n return exec(arr.slice(), comp);\r\n};\r\n\r\n /**\r\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\r\n *\r\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\r\n * @memberof Phaser.Utils.Array.StableSortFunctions\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted array.\r\n */\r\nstable.inplace = function(arr, comp) {\r\n var result = exec(arr, comp);\r\n\r\n // This simply copies back if the result isn't in the original array,\r\n // which happens on an odd number of passes.\r\n if (result !== arr) {\r\n pass(result, null, arr.length, arr);\r\n }\r\n\r\n return arr;\r\n};\r\n\r\n// Execute the sort using the input array and a second buffer as work space.\r\n// Returns one of those two, containing the final result.\r\nfunction exec(arr, comp) {\r\n if (typeof(comp) !== 'function') {\r\n comp = function(a, b) {\r\n return String(a).localeCompare(b);\r\n };\r\n }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n var len = arr.length;\r\n if (len <= 1) {\r\n return arr;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n for (var chk = 1; chk < len; chk *= 2) {\r\n pass(arr, comp, chk, buffer);\r\n\r\n var tmp = arr;\r\n arr = buffer;\r\n buffer = tmp;\r\n }\r\n\r\n return arr;\r\n}\r\n\r\n// Run a single pass with the given chunk size.\r\nvar pass = function(arr, comp, chk, result) {\r\n var len = arr.length;\r\n var i = 0;\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl) {\r\n r = l + chk;\r\n e = r + chk;\r\n if (r > len) r = len;\r\n if (e > len) e = len;\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n while (true) {\r\n // Compare the chunks.\r\n if (li < r && ri < e) {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0) {\r\n result[i++] = arr[li++];\r\n }\r\n else {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n // Nothing to compare, just flush what's left.\r\n else if (li < r) {\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e) {\r\n result[i++] = arr[ri++];\r\n }\r\n // Both iterators are at the chunk ends.\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// Export using CommonJS or to the window.\r\nif (true) {\r\n module.exports = stable;\r\n}\r\nelse {}\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/StableSort.js?")},"./node_modules/phaser/src/utils/array/Swap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Swap.js?")},"./node_modules/phaser/src/utils/array/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: __webpack_require__(/*! ./matrix */ "./node_modules/phaser/src/utils/array/matrix/index.js"),\r\n\r\n Add: __webpack_require__(/*! ./Add */ "./node_modules/phaser/src/utils/array/Add.js"),\r\n AddAt: __webpack_require__(/*! ./AddAt */ "./node_modules/phaser/src/utils/array/AddAt.js"),\r\n BringToTop: __webpack_require__(/*! ./BringToTop */ "./node_modules/phaser/src/utils/array/BringToTop.js"),\r\n CountAllMatching: __webpack_require__(/*! ./CountAllMatching */ "./node_modules/phaser/src/utils/array/CountAllMatching.js"),\r\n Each: __webpack_require__(/*! ./Each */ "./node_modules/phaser/src/utils/array/Each.js"),\r\n EachInRange: __webpack_require__(/*! ./EachInRange */ "./node_modules/phaser/src/utils/array/EachInRange.js"),\r\n FindClosestInSorted: __webpack_require__(/*! ./FindClosestInSorted */ "./node_modules/phaser/src/utils/array/FindClosestInSorted.js"),\r\n GetAll: __webpack_require__(/*! ./GetAll */ "./node_modules/phaser/src/utils/array/GetAll.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/utils/array/GetFirst.js"),\r\n GetRandom: __webpack_require__(/*! ./GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js"),\r\n MoveDown: __webpack_require__(/*! ./MoveDown */ "./node_modules/phaser/src/utils/array/MoveDown.js"),\r\n MoveTo: __webpack_require__(/*! ./MoveTo */ "./node_modules/phaser/src/utils/array/MoveTo.js"),\r\n MoveUp: __webpack_require__(/*! ./MoveUp */ "./node_modules/phaser/src/utils/array/MoveUp.js"),\r\n NumberArray: __webpack_require__(/*! ./NumberArray */ "./node_modules/phaser/src/utils/array/NumberArray.js"),\r\n NumberArrayStep: __webpack_require__(/*! ./NumberArrayStep */ "./node_modules/phaser/src/utils/array/NumberArrayStep.js"),\r\n QuickSelect: __webpack_require__(/*! ./QuickSelect */ "./node_modules/phaser/src/utils/array/QuickSelect.js"),\r\n Range: __webpack_require__(/*! ./Range */ "./node_modules/phaser/src/utils/array/Range.js"),\r\n Remove: __webpack_require__(/*! ./Remove */ "./node_modules/phaser/src/utils/array/Remove.js"),\r\n RemoveAt: __webpack_require__(/*! ./RemoveAt */ "./node_modules/phaser/src/utils/array/RemoveAt.js"),\r\n RemoveBetween: __webpack_require__(/*! ./RemoveBetween */ "./node_modules/phaser/src/utils/array/RemoveBetween.js"),\r\n RemoveRandomElement: __webpack_require__(/*! ./RemoveRandomElement */ "./node_modules/phaser/src/utils/array/RemoveRandomElement.js"),\r\n Replace: __webpack_require__(/*! ./Replace */ "./node_modules/phaser/src/utils/array/Replace.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js"),\r\n SafeRange: __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js"),\r\n SendToBack: __webpack_require__(/*! ./SendToBack */ "./node_modules/phaser/src/utils/array/SendToBack.js"),\r\n SetAll: __webpack_require__(/*! ./SetAll */ "./node_modules/phaser/src/utils/array/SetAll.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js"),\r\n SpliceOne: __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js"),\r\n StableSort: __webpack_require__(/*! ./StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js"),\r\n Swap: __webpack_require__(/*! ./Swap */ "./node_modules/phaser/src/utils/array/Swap.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/index.js?')},"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/MatrixToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = __webpack_require__(/*! ../../string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/MatrixToString.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseRows.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseRows.js?")},"./node_modules/phaser/src/utils/array/matrix/Rotate180.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/Rotate180.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\nvar TransposeMatrix = __webpack_require__(/*! ./TransposeMatrix */ \"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js\");\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/RotateRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateRight.js?')},"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: __webpack_require__(/*! ./CheckMatrix */ "./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js"),\r\n MatrixToString: __webpack_require__(/*! ./MatrixToString */ "./node_modules/phaser/src/utils/array/matrix/MatrixToString.js"),\r\n ReverseColumns: __webpack_require__(/*! ./ReverseColumns */ "./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js"),\r\n ReverseRows: __webpack_require__(/*! ./ReverseRows */ "./node_modules/phaser/src/utils/array/matrix/ReverseRows.js"),\r\n Rotate180: __webpack_require__(/*! ./Rotate180 */ "./node_modules/phaser/src/utils/array/matrix/Rotate180.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/matrix/RotateLeft.js"),\r\n RotateMatrix: __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/matrix/RotateRight.js"),\r\n TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/index.js?')},"./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n/**\r\n * Converts an ArrayBuffer into a base64 string.\r\n * \r\n * The resulting string can optionally be a data uri if the `mediaType` argument is provided.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs for more details.\r\n *\r\n * @function Phaser.Utils.Base64.ArrayBufferToBase64\r\n * @since 3.18.0\r\n * \r\n * @param {ArrayBuffer} arrayBuffer - The Array Buffer to encode.\r\n * @param {string} [mediaType] - An optional media type, i.e. `audio/ogg` or `image/jpeg`. If included the resulting string will be a data URI.\r\n * \r\n * @return {string} The base64 encoded Array Buffer.\r\n */\r\nvar ArrayBufferToBase64 = function (arrayBuffer, mediaType)\r\n{\r\n var bytes = new Uint8Array(arrayBuffer);\r\n var len = bytes.length;\r\n\r\n var base64 = (mediaType) ? 'data:' + mediaType + ';base64,' : '';\r\n\r\n for (var i = 0; i < len; i += 3)\r\n {\r\n base64 += chars[bytes[i] >> 2];\r\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\r\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\r\n base64 += chars[bytes[i + 2] & 63];\r\n }\r\n\r\n if ((len % 3) === 2)\r\n {\r\n base64 = base64.substring(0, base64.length - 1) + '=';\r\n }\r\n else if (len % 3 === 1)\r\n {\r\n base64 = base64.substring(0, base64.length - 2) + '==';\r\n }\r\n \r\n return base64;\r\n};\r\n\r\nmodule.exports = ArrayBufferToBase64;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js?")},"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n// Use a lookup table to find the index.\r\nvar lookup = new Uint8Array(256);\r\n\r\nfor (var i = 0; i < chars.length; i++)\r\n{\r\n lookup[chars.charCodeAt(i)] = i;\r\n}\r\n\r\n/**\r\n * Converts a base64 string, either with or without a data uri, into an Array Buffer.\r\n *\r\n * @function Phaser.Utils.Base64.Base64ToArrayBuffer\r\n * @since 3.18.0\r\n * \r\n * @param {string} base64 - The base64 string to be decoded. Can optionally contain a data URI header, which will be stripped out prior to decoding.\r\n * \r\n * @return {ArrayBuffer} An ArrayBuffer decoded from the base64 data.\r\n */\r\nvar Base64ToArrayBuffer = function (base64)\r\n{\r\n // Is it a data uri? if so, strip the header away\r\n base64 = base64.substr(base64.indexOf(',') + 1);\r\n\r\n var len = base64.length;\r\n var bufferLength = len * 0.75;\r\n var p = 0;\r\n var encoded1;\r\n var encoded2;\r\n var encoded3;\r\n var encoded4;\r\n\r\n if (base64[len - 1] === '=')\r\n {\r\n bufferLength--;\r\n\r\n if (base64[len - 2] === '=')\r\n {\r\n bufferLength--;\r\n }\r\n }\r\n\r\n var arrayBuffer = new ArrayBuffer(bufferLength);\r\n var bytes = new Uint8Array(arrayBuffer);\r\n\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n encoded1 = lookup[base64.charCodeAt(i)];\r\n encoded2 = lookup[base64.charCodeAt(i + 1)];\r\n encoded3 = lookup[base64.charCodeAt(i + 2)];\r\n encoded4 = lookup[base64.charCodeAt(i + 3)];\r\n\r\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\r\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\r\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\r\n }\r\n\r\n return arrayBuffer;\r\n};\r\n\r\nmodule.exports = Base64ToArrayBuffer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js?")},"./node_modules/phaser/src/utils/base64/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Base64\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ArrayBufferToBase64: __webpack_require__(/*! ./ArrayBufferToBase64 */ "./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js"),\r\n Base64ToArrayBuffer: __webpack_require__(/*! ./Base64ToArrayBuffer */ "./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/index.js?')},"./node_modules/phaser/src/utils/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Array: __webpack_require__(/*! ./array/ */ "./node_modules/phaser/src/utils/array/index.js"),\r\n Base64: __webpack_require__(/*! ./base64/ */ "./node_modules/phaser/src/utils/base64/index.js"),\r\n Objects: __webpack_require__(/*! ./object/ */ "./node_modules/phaser/src/utils/object/index.js"),\r\n String: __webpack_require__(/*! ./string/ */ "./node_modules/phaser/src/utils/string/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/index.js?')},"./node_modules/phaser/src/utils/object/Clone.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shallow Object Clone. Will not clone nested objects.\r\n *\r\n * @function Phaser.Utils.Objects.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - the object from which to clone\r\n *\r\n * @return {object} a new object with the same properties as the input obj\r\n */\r\nvar Clone = function (obj)\r\n{\r\n var clone = {};\r\n\r\n for (var key in obj)\r\n {\r\n if (Array.isArray(obj[key]))\r\n {\r\n clone[key] = obj[key].slice(0);\r\n }\r\n else\r\n {\r\n clone[key] = obj[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Clone.js?")},"./node_modules/phaser/src/utils/object/Extend.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Extend.js?")},"./node_modules/phaser/src/utils/object/GetAdvancedValue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = __webpack_require__(/*! ../../math */ \"./node_modules/phaser/src/math/index.js\");\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetAdvancedValue.js?")},"./node_modules/phaser/src/utils/object/GetFastValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetFastValue.js?")},"./node_modules/phaser/src/utils/object/GetMinMaxValue.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Retrieves and clamps a numerical value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetMinMaxValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`).\r\n * @param {number} min - The minimum value which can be returned.\r\n * @param {number} max - The maximum value which can be returned.\r\n * @param {number} defaultValue - The value to return if the property doesn\'t exist. It\'s also constrained to the given bounds.\r\n *\r\n * @return {number} The clamped value from the `source` object.\r\n */\r\nvar GetMinMaxValue = function (source, key, min, max, defaultValue)\r\n{\r\n if (defaultValue === undefined) { defaultValue = min; }\r\n\r\n var value = GetValue(source, key, defaultValue);\r\n\r\n return Clamp(value, min, max);\r\n};\r\n\r\nmodule.exports = GetMinMaxValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetMinMaxValue.js?')},"./node_modules/phaser/src/utils/object/GetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetValue.js?")},"./node_modules/phaser/src/utils/object/HasAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains all requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAll\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to ensure the source object contains\r\n *\r\n * @return {boolean} true if the source object contains all keys, false otherwise.\r\n */\r\nvar HasAll = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (!source.hasOwnProperty(keys[i]))\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = HasAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAll.js?")},"./node_modules/phaser/src/utils/object/HasAny.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains at least one of the requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAny\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to search the object for\r\n *\r\n * @return {boolean} true if the source object contains at least one of the keys, false otherwise\r\n */\r\nvar HasAny = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (source.hasOwnProperty(keys[i]))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = HasAny;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAny.js?")},"./node_modules/phaser/src/utils/object/HasValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determine whether the source object has a property with the specified key.\r\n *\r\n * @function Phaser.Utils.Objects.HasValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source object to be checked.\r\n * @param {string} key - The property to check for within the object\r\n *\r\n * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`.\r\n */\r\nvar HasValue = function (source, key)\r\n{\r\n return (source.hasOwnProperty(key));\r\n};\r\n\r\nmodule.exports = HasValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasValue.js?")},"./node_modules/phaser/src/utils/object/IsPlainObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/IsPlainObject.js?")},"./node_modules/phaser/src/utils/object/Merge.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1 and obj2.\r\n * If a value exists in both obj1 and obj2, the value in obj1 is used.\r\n * \r\n * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this\r\n * function on shallow objects.\r\n *\r\n * @function Phaser.Utils.Objects.Merge\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object.\r\n * @param {object} obj2 - The second object.\r\n *\r\n * @return {object} A new object containing the union of obj1's and obj2's properties.\r\n */\r\nvar Merge = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (!clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Merge;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Merge.js?")},"./node_modules/phaser/src/utils/object/MergeRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1.\r\n * \r\n * Then scans obj2. If a property is found in obj2 that *also* exists in obj1, the value from obj2 is used, otherwise the property is skipped.\r\n *\r\n * @function Phaser.Utils.Objects.MergeRight\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object to merge.\r\n * @param {object} obj2 - The second object to merge. Keys from this object which also exist in `obj1` will be copied to `obj1`.\r\n *\r\n * @return {object} The merged object. `obj1` and `obj2` are not modified.\r\n */\r\nvar MergeRight = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = MergeRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/MergeRight.js?')},"./node_modules/phaser/src/utils/object/Pick.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasValue = __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Returns a new object that only contains the `keys` that were found on the object provided.\r\n * If no `keys` are found, an empty object is returned.\r\n *\r\n * @function Phaser.Utils.Objects.Pick\r\n * @since 3.18.0\r\n *\r\n * @param {object} object - The object to pick the provided keys from.\r\n * @param {array} keys - An array of properties to retrieve from the provided object.\r\n *\r\n * @return {object} A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.\r\n */\r\nvar Pick = function (object, keys)\r\n{\r\n var obj = {};\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var key = keys[i];\r\n\r\n if (HasValue(object, key))\r\n {\r\n obj[key] = object[key];\r\n }\r\n }\r\n\r\n return obj;\r\n};\r\n\r\nmodule.exports = Pick;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Pick.js?')},"./node_modules/phaser/src/utils/object/SetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a value in an object, allowing for dot notation to control the depth of the property.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var data = {\r\n * world: {\r\n * position: {\r\n * x: 200,\r\n * y: 100\r\n * }\r\n * }\r\n * };\r\n * \r\n * SetValue(data, 'world.position.y', 300);\r\n * \r\n * console.log(data.world.position.y); // 300\r\n * ```\r\n *\r\n * @function Phaser.Utils.Objects.SetValue\r\n * @since 3.17.0\r\n *\r\n * @param {object} source - The object to set the value in.\r\n * @param {string} key - The name of the property in the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`)\r\n * @param {any} value - The value to set into the property, if found in the source object.\r\n *\r\n * @return {boolean} `true` if the property key was valid and the value was set, otherwise `false`.\r\n */\r\nvar SetValue = function (source, key, value)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return false;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n source[key] = value;\r\n\r\n return true;\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var prev = source;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n prev = parent;\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n prev[keys[keys.length - 1]] = value;\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n};\r\n\r\nmodule.exports = SetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/SetValue.js?")},"./node_modules/phaser/src/utils/object/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Objects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clone: __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js"),\r\n Extend: __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/utils/object/Extend.js"),\r\n GetAdvancedValue: __webpack_require__(/*! ./GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js"),\r\n GetFastValue: __webpack_require__(/*! ./GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js"),\r\n GetMinMaxValue: __webpack_require__(/*! ./GetMinMaxValue */ "./node_modules/phaser/src/utils/object/GetMinMaxValue.js"),\r\n GetValue: __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js"),\r\n HasAll: __webpack_require__(/*! ./HasAll */ "./node_modules/phaser/src/utils/object/HasAll.js"),\r\n HasAny: __webpack_require__(/*! ./HasAny */ "./node_modules/phaser/src/utils/object/HasAny.js"),\r\n HasValue: __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js"),\r\n IsPlainObject: __webpack_require__(/*! ./IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js"),\r\n Merge: __webpack_require__(/*! ./Merge */ "./node_modules/phaser/src/utils/object/Merge.js"),\r\n MergeRight: __webpack_require__(/*! ./MergeRight */ "./node_modules/phaser/src/utils/object/MergeRight.js"),\r\n Pick: __webpack_require__(/*! ./Pick */ "./node_modules/phaser/src/utils/object/Pick.js"),\r\n SetValue: __webpack_require__(/*! ./SetValue */ "./node_modules/phaser/src/utils/object/SetValue.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/index.js?')},"./node_modules/phaser/src/utils/string/Format.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a string and replaces instances of markers with values in the given array.\r\n * The markers take the form of `%1`, `%2`, etc. I.e.:\r\n *\r\n * `Format(\"The %1 is worth %2 gold\", [ 'Sword', 500 ])`\r\n *\r\n * @function Phaser.Utils.String.Format\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string containing the replacement markers.\r\n * @param {array} values - An array containing values that will replace the markers. If no value exists an empty string is inserted instead.\r\n *\r\n * @return {string} The string containing replaced values.\r\n */\r\nvar Format = function (string, values)\r\n{\r\n return string.replace(/%([0-9]+)/g, function (s, n)\r\n {\r\n return values[Number(n) - 1];\r\n });\r\n};\r\n\r\nmodule.exports = Format;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Format.js?")},"./node_modules/phaser/src/utils/string/Pad.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Pad.js?")},"./node_modules/phaser/src/utils/string/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and reverses it, returning the reversed string.\r\n * For example if given the string `Atari 520ST` it would return `TS025 iratA`.\r\n *\r\n * @function Phaser.Utils.String.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string to be reversed.\r\n *\r\n * @return {string} The reversed string.\r\n */\r\nvar Reverse = function (string)\r\n{\r\n return string.split('').reverse().join('');\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Reverse.js?")},"./node_modules/phaser/src/utils/string/UUID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates and returns an RFC4122 version 4 compliant UUID.\r\n * \r\n * The string is in the form: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` where each `x` is replaced with a random\r\n * hexadecimal digit from 0 to f, and `y` is replaced with a random hexadecimal digit from 8 to b.\r\n *\r\n * @function Phaser.Utils.String.UUID\r\n * @since 3.12.0\r\n *\r\n * @return {string} The UUID string.\r\n */\r\nvar UUID = function ()\r\n{\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c)\r\n {\r\n var r = Math.random() * 16 | 0;\r\n var v = (c === 'x') ? r : (r & 0x3 | 0x8);\r\n\r\n return v.toString(16);\r\n });\r\n};\r\n\r\nmodule.exports = UUID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UUID.js?")},"./node_modules/phaser/src/utils/string/UppercaseFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Capitalizes the first letter of a string if there is one.\r\n * @example\r\n * UppercaseFirst('abc');\r\n * // returns 'Abc'\r\n * @example\r\n * UppercaseFirst('the happy family');\r\n * // returns 'The happy family'\r\n * @example\r\n * UppercaseFirst('');\r\n * // returns ''\r\n *\r\n * @function Phaser.Utils.String.UppercaseFirst\r\n * @since 3.0.0\r\n *\r\n * @param {string} str - The string to capitalize.\r\n *\r\n * @return {string} A new string, same as the first, but with the first letter capitalized.\r\n */\r\nvar UppercaseFirst = function (str)\r\n{\r\n return str && str[0].toUpperCase() + str.slice(1);\r\n};\r\n\r\nmodule.exports = UppercaseFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UppercaseFirst.js?")},"./node_modules/phaser/src/utils/string/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.String\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Format: __webpack_require__(/*! ./Format */ "./node_modules/phaser/src/utils/string/Format.js"),\r\n Pad: __webpack_require__(/*! ./Pad */ "./node_modules/phaser/src/utils/string/Pad.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/utils/string/Reverse.js"),\r\n UppercaseFirst: __webpack_require__(/*! ./UppercaseFirst */ "./node_modules/phaser/src/utils/string/UppercaseFirst.js"),\r\n UUID: __webpack_require__(/*! ./UUID */ "./node_modules/phaser/src/utils/string/UUID.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/index.js?')},"./node_modules/process/browser.js":function(module,exports){eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?")},"./node_modules/webpack/buildin/global.js":function(module,exports){eval('var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function("return this")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === "object") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it\'s\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?')},1:function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! /Users/danieldanielecki/Downloads/tappyplane/node_modules/phaser/src/phaser.js */"./node_modules/phaser/src/phaser.js");\n\n\n//# sourceURL=webpack:///multi_./node_modules/phaser/src/phaser.js?')}}); \ No newline at end of file diff --git a/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js.LICENSE b/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js.LICENSE deleted file mode 100644 index 525e331..0000000 --- a/cordova/platforms/ios/www/vendor.9225d8b7cdd4505af1b3.js.LICENSE +++ /dev/null @@ -1,5717 +0,0 @@ -/*!*********************************************!*\ - !*** ./node_modules/eventemitter3/index.js ***! - \*********************************************/ - -/*! no static exports found */ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/Camera.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/CameraManager.js ***! - \*******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js ***! - \***********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/index.js ***! - \***********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js ***! - \******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js ***! - \******************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/AdInstance.js ***! - \*****************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js ***! - \*********************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js ***! - \******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Product.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Purchase.js ***! - \***************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/Angle.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/Call.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetFirst.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetLast.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/GridAlign.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncAlpha.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnCircle.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnEllipse.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnLine.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnRectangle.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnTriangle.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlayAnimation.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueInc.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueSet.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomCircle.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomEllipse.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomLine.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomRectangle.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomTriangle.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Rotate.js ***! - \***************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAround.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAroundDistance.js ***! - \*****************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleX.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleXY.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleY.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetAlpha.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetBlendMode.js ***! - \*********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetDepth.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetHitArea.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetOrigin.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetRotation.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScale.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleY.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetTint.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetVisible.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ShiftPosition.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/Shuffle.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmoothStep.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmootherStep.js ***! - \*********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Spread.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ToggleVisible.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/WrapInRectangle.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/index.js ***! - \**************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/animations/Animation.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationFrame.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationManager.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! - \**************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! - \*****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! - \******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! - \****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! - \**************************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! - \******************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! - \****************************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! - \*****************************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! - \***************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! - \****************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! - \************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! - \*************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! - \************************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/animations/index.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/cache/BaseCache.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/CacheManager.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/ADD_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/REMOVE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/cache/index.js ***! - \************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/BaseCamera.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/Camera.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/CameraManager.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Fade.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Flash.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Pan.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Shake.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Zoom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/index.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js ***! - \********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js ***! - \******************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/index.js ***! - \*****************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/FixedKeyControl.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js ***! - \************************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/index.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/cameras/index.js ***! - \**************************************************/ - -/*!******************************************!*\ - !*** ./node_modules/phaser/src/const.js ***! - \******************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/core/Config.js ***! - \************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/core/CreateRenderer.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/core/DebugHeader.js ***! - \*****************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/core/Game.js ***! - \**********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/core/TimeStep.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/VisibilityHandler.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BLUR_EVENT.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BOOT_EVENT.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/DESTROY_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/FOCUS_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/HIDDEN_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PAUSE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_STEP_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/READY_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/RESUME_EVENT.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/STEP_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/VISIBLE_EVENT.js ***! - \**************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/core/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/core/index.js ***! - \***********************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/GenerateTexture.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/create/index.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/Arne16.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/C64.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/CGA.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/JMP.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/MSX.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/index.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/curves/CubicBezierCurve.js ***! - \************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/Curve.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/curves/EllipseCurve.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/LineCurve.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/curves/QuadraticBezierCurve.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/SplineCurve.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/index.js ***! - \*************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/MoveTo.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/Path.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManager.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManagerPlugin.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \**********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/SET_DATA_EVENT.js ***! - \***************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/data/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/data/index.js ***! - \***********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Audio.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/device/Browser.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/device/CanvasFeatures.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/device/Features.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/device/Fullscreen.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Input.js ***! - \*************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/device/OS.js ***! - \**********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Video.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/index.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/const.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomRight.js ***! - \*****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/Center.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/LeftCenter.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/QuickSet.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/RightCenter.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/index.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomRight.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftBottom.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftCenter.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftTop.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightBottom.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightCenter.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightTop.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/index.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/CenterOn.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetLeft.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetY.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetTop.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetTop.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/index.js ***! - \*********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasInterpolation.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasPool.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/Smoothing.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/TouchAction.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/UserSelect.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/index.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Color.js ***! - \********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ColorToRGBA.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ComponentToHex.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor32.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSLToColor.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVColorWheel.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVToRGB.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HexStringToColor.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HueToComponent.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToColor.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToRGB.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Interpolate.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ObjectToColor.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBStringToColor.js ***! - \*******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToHSV.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToString.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RandomRGB.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ValueToColor.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/index.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/display/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/BitmapMask.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/GeometryMask.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/index.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/shader/BaseShader.js ***! - \**************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/AddToDOM.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/dom/CreateDOMContainer.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/dom/DOMContentLoaded.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetInnerHeight.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetScreenOrientation.js ***! - \*************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetTarget.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/ParseXML.js ***! - \*************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/dom/RemoveFromDOM.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/dom/RequestAnimationFrame.js ***! - \**************************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/dom/index.js ***! - \**********************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/events/EventEmitter.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/events/index.js ***! - \*************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObject.js ***! - \****************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js ***! - \*************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/DisplayList.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObject.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectCreator.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectFactory.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/UpdateList.js ***! - \***********************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js ***! - \******************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/const.js ***! - \*****************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js ***! - \*************************************************************************************/ - -/*!***************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js ***! - \***************************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js ***! - \********************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js ***! - \********************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js ***! - \*******************************************************************************************/ - -/*!**************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js ***! - \**************************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js ***! - \*******************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js ***! - \************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js ***! - \************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js ***! - \***********************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js ***! - \******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Blitter.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Bob.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Alpha.js ***! - \*****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Animation.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/BlendMode.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ComputedSize.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Crop.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Depth.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Flip.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/GetBounds.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Mask.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Origin.js ***! - \******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/PathFollower.js ***! - \************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Pipeline.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ScrollFactor.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Size.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Texture.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TextureCrop.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Tint.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ToJSON.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Transform.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TransformMatrix.js ***! - \***************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Visible.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/index.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/Container.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCreator.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElement.js ***! - \**********************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js ***! - \*********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/index.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/Extern.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Commands.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Graphics.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/Group.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupFactory.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/Image.js ***! - \************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageFactory.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageRender.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js ***! - \*************************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/Light.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsManager.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js ***! - \********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/Mesh.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js ***! - \************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshRender.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/EmitterOp.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/GravityWell.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/Particle.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js ***! - \*********************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js ***! - \*********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/index.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js ***! - \*************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/index.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js ***! - \*********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/Quad.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js ***! - \***********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js ***! - \***********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/Shader.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js ***! - \***************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js ***! - \**********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/Shape.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js ***! - \**********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/Arc.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/Curve.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/Grid.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js ***! - \*************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/Line.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js ***! - \**************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/Star.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js ***! - \************************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js ***! - \**************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js ***! - \******************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js ***! - \*************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/Sprite.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js ***! - \***************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/GetTextSize.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/MeasureText.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/TextStyle.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/Text.js ***! - \*****************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCreator.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextFactory.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextRender.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js ***! - \******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/Zone.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Area.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circle.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circumference.js ***! - \**************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CircumferencePoint.js ***! - \*******************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Clone.js ***! - \******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Contains.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsPoint.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsRect.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CopyFrom.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Equals.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetBounds.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoint.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoints.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Offset.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/OffsetPoint.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Random.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/const.js ***! - \***********************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Area.js ***! - \******************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Circumference.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsPoint.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsRect.js ***! - \**************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CopyFrom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Ellipse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Equals.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetBounds.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoint.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoints.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Offset.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/OffsetPoint.js ***! - \*************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Random.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/index.js ***! - \*******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/index.js ***! - \***********************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToCircle.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToRectangle.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js ***! - \**********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js ***! - \*************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToCircle.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js ***! - \****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js ***! - \**************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToCircle.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToLine.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToRectangle.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLine.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLineSegment.js ***! - \***********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToValues.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToCircle.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToLine.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js ***! - \***********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/index.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Angle.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/BresenhamPoints.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CenterOn.js ***! - \*******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Clone.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CopyFrom.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Equals.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Extend.js ***! - \*****************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetMidPoint.js ***! - \**********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNearestPoint.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNormal.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoint.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoints.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetShortestDistance.js ***! - \******************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Height.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Length.js ***! - \*****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Line.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalAngle.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalY.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Offset.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/PerpSlope.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Random.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/ReflectAngle.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Rotate.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundPoint.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundXY.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/SetToAngle.js ***! - \*********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Slope.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Width.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/index.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Clone.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/CopyFrom.js ***! - \********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Equals.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetCentroid.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitude.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitudeSq.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js ***! - \**********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Interpolate.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Invert.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Negative.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Point.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Project.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/ProjectUnit.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/SetMagnitude.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/index.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/ContainsPoint.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Earcut.js ***! - \********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetAABB.js ***! - \*********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetNumberArray.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetPoints.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Perimeter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Polygon.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Reverse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Smooth.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Area.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Ceil.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CeilAll.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CenterOn.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Clone.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Contains.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsPoint.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsRect.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CopyFrom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Decompose.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Equals.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitInside.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitOutside.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Floor.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FloorAll.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FromPoints.js ***! - \**************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetCenter.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoint.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoints.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetSize.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Inflate.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Intersection.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MarchingAnts.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergePoints.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeRect.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeXY.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Offset.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/OffsetPoint.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Overlaps.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Perimeter.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js ***! - \******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Random.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/RandomOutside.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Rectangle.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/SameDimensions.js ***! - \******************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Scale.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Union.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/index.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Area.js ***! - \*******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildEquilateral.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildRight.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CenterOn.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Centroid.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCenter.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCircle.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Clone.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Contains.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsArray.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsPoint.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CopyFrom.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Decompose.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Equals.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoint.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoints.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/InCenter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Offset.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Perimeter.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Random.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Rotate.js ***! - \*********************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundXY.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Triangle.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreateInteractiveObject.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreatePixelPerfectHandler.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPlugin.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPluginCache.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/input/Pointer.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_END_EVENT.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_START_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DROP_EVENT.js ***! - \************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js ***! - \***************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js ***! - \****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js ***! - \******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js ***! - \*********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/START_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/events/index.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Axis.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Button.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Gamepad.js ***! - \**********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/GamepadPlugin.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js ***! - \******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js ***! - \***************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js ***! - \*****************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/index.js ***! - \****************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js ***! - \*************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js ***! - \***********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js ***! - \*********************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/index.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/index.js ***! - \********************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/index.js ***! - \************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardManager.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js ***! - \*************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js ***! - \*******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/index.js ***! - \*********************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/DownDuration.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustDown.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustUp.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/Key.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyMap.js ***! - \***************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/UpDuration.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/MouseManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/TouchManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/index.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/loader/File.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/FileTypesManager.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/loader/GetURL.js ***! - \**************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/LoaderPlugin.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/MergeXHRSettings.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/MultiFile.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRLoader.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRSettings.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/const.js ***! - \*************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/ADD_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/START_EVENT.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/index.js ***! - \********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BinaryFile.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/CSSFile.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/GLSLFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js ***! - \********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLFile.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js ***! - \*********************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ImageFile.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/JSONFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PackFile.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PluginFile.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SVGFile.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SceneFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScriptFile.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TextFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/XMLFile.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/index.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/index.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Average.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Bernstein.js ***! - \***************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Between.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/CatmullRom.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/CeilTo.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/Clamp.js ***! - \***********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/DegToRad.js ***! - \**************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Difference.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Factorial.js ***! - \***************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/FloatBetween.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/FloorTo.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/FromPercent.js ***! - \*****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/GetSpeed.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEven.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEvenStrict.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Linear.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MaxAdd.js ***! - \************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MinSub.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Percent.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Quaternion.js ***! - \****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RadToDeg.js ***! - \**************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXY.js ***! - \**************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZ.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZW.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Rotate.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAround.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAroundDistance.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateVec3.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundAwayFromZero.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundTo.js ***! - \*************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/SinCosTableGenerator.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/SmoothStep.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/SmootherStep.js ***! - \******************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/ToXY.js ***! - \**********************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/TransformXY.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector2.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Within.js ***! - \************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/Wrap.js ***! - \**********************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Between.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPoints.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPointsY.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenY.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/CounterClockwise.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Normalize.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Reverse.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/RotateTo.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/ShortestBetween.js ***! - \***************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Wrap.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/WrapDegrees.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/const.js ***! - \***********************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceBetween.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistancePower.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceSquared.js ***! - \******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/index.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/EaseMap.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/index.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/In.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/InOut.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/Out.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/In.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/InOut.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/Out.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/index.js ***! - \***************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/In.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/InOut.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/Out.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/index.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/index.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/index.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/Linear.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/index.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/In.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/InOut.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/Out.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/index.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/index.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/index.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/Stepped.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/index.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Equal.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/GreaterThan.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/LessThan.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/index.js ***! - \***********************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/BezierInterpolation.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \*******************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/LinearInterpolation.js ***! - \***************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \*******************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \*********************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \****************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/index.js ***! - \****************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \***********************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapCeil.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapFloor.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapTo.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/index.js ***! - \****************************************************/ - -/*!*******************************************!*\ - !*** ./node_modules/phaser/src/phaser.js ***! - \*******************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadePhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeSprite.js ***! - \****************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Collider.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapX.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapY.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/PhysicsGroup.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateY.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticBody.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Acceleration.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Angular.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Bounce.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Debug.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Drag.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Enable.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Gravity.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Immovable.js ***! - \************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Mass.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/OverlapRect.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Size.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/index.js ***! - \********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/const.js ***! - \*********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js ***! - \********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js ***! - \**********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js ***! - \**********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js ***! - \**********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js ***! - \******************************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/COLLIDES.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/CollisionMap.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/DefaultDefs.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/GetVelocity.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactBody.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactPhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactSprite.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateY.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Solver.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/TYPE.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/UpdateMotion.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Acceleration.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyScale.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyType.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Bounce.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/CheckAgainst.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Collides.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Debug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Gravity.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Offset.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/SetGameObject.js ***! - \****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/index.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/index.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/physics/index.js ***! - \**************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/CustomMain.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/Factory.js ***! - \**************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterGameObject.js ***! - \***********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterImage.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterPhysics.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterSprite.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterTileBody.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PointerConstraint.js ***! - \************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/World.js ***! - \************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Bounce.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Collision.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Force.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Friction.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Gravity.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Mass.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sensor.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/SetBody.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sleep.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Static.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Transform.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Velocity.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/index.js ***! - \***********************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js ***! - \*********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js ***! - \************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js ***! - \*********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js ***! - \****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js ***! - \******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/index.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/index.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Body.js ***! - \********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js ***! - \*************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/World.js ***! - \*********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js ***! - \*****************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js ***! - \************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js ***! - \********************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Common.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Events.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js ***! - \**************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js ***! - \***********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js ***! - \************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/plugins/BasePlugin.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/DefaultPlugins.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginCache.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginManager.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/ScenePlugin.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/plugins/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.forEach.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.isArray.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Math.trunc.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Uint32Array.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/console.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/index.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/performance.now.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/requestAnimationFrame.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/BlendModes.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/ScaleModes.js ***! - \********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js ***! - \*******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/index.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js ***! - \***********************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/renderer/index.js ***! - \***************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js ***! - \********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/index.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/Utils.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js ***! - \*****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js ***! - \********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js ***! - \*****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js ***! - \*********************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js ***! - \********************************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/index.js ***! - \*******************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js ***! - \*******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js ***! - \****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js ***! - \****************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/ScaleManager.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/CENTER_CONST.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ZOOM_CONST.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/index.js ***! - \******************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js ***! - \*************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js ***! - \******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/RESIZE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scale/index.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetPhysicsPlugins.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetScenePlugins.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/InjectionMap.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/Scene.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/SceneManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scene/ScenePlugin.js ***! - \******************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/scene/Settings.js ***! - \***************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/scene/Systems.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/CREATE_EVENT.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/READY_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RENDER_EVENT.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SLEEP_EVENT.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/START_EVENT.js ***! - \*************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/WAKE_EVENT.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/index.js ***! - \************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSound.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSoundManager.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/SoundManagerCreator.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js ***! - \*******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_EVENT.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DETUNE_EVENT.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOPED_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOP_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/MUTE_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PLAY_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RATE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/SEEK_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/VOLUME_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/index.js ***! - \*******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSound.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js ***! - \***********************************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/sound/index.js ***! - \************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSound.js ***! - \***************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js ***! - \**********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSound.js ***! - \*****************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js ***! - \************************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/List.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Map.js ***! - \************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/structs/ProcessQueue.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/RTree.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Set.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/Size.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/index.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/CanvasTexture.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/Frame.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/textures/Texture.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureManager.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureSource.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/const.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ADD_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ERROR_EVENT.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/LOAD_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/READY_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/REMOVE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/index.js ***! - \**********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/index.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/AtlasXML.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Canvas.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Image.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONArray.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONHash.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheet.js ***! - \*****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js ***! - \**************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/UnityYAML.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/index.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Formats.js ***! - \*****************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ImageCollection.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ParseToTilemap.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tile.js ***! - \**************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tilemap.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapCreator.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapFactory.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tileset.js ***! - \*****************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js ***! - \*****************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Copy.js ***! - \*************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CullTiles.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Fill.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FilterTiles.js ***! - \********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindByIndex.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindTile.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ForEachTile.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js ***! - \***********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js ***! - \****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js ***! - \******************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTilesAt.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Randomize.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RenderDebug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollision.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js ***! - \****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js ***! - \********************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js ***! - \*******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js ***! - \***************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js ***! - \*******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileCollision.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js ***! - \********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Shuffle.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SwapByIndex.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldY.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileY.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/index.js ***! - \**************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/index.js ***! - \***************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/LayerData.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/MapData.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js ***! - \*****************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/index.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/index.js ***! - \***********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js ***! - \********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js ***! - \************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js ***! - \*************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/index.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/Clock.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/time/TimerEvent.js ***! - \****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/index.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/tweens/Timeline.js ***! - \****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/TweenManager.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetBoolean.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetEaseFunction.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetNewValue.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetProps.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTargets.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTweens.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetValueOp.js ***! - \***************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/StaggerBuilder.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TimelineBuilder.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TweenBuilder.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/index.js ***! - \**********************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js ***! - \************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/index.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/tweens/index.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Defaults.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/ReservedProps.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Tween.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/TweenData.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/const.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/Class.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/utils/NOOP.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Add.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/AddAt.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/BringToTop.js ***! - \***********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/CountAllMatching.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Each.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/EachInRange.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/FindClosestInSorted.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetAll.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetFirst.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetRandom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveDown.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveTo.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveUp.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArray.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArrayStep.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/QuickSelect.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Range.js ***! - \******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Remove.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveAt.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveBetween.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveRandomElement.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Replace.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SafeRange.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SendToBack.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SetAll.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Shuffle.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SpliceOne.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/StableSort.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Swap.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/index.js ***! - \******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/MatrixToString.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseRows.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/Rotate180.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateLeft.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateRight.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \***********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/index.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js ***! - \*********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/index.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Clone.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Extend.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetAdvancedValue.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetFastValue.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetMinMaxValue.js ***! - \****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetValue.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAll.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAny.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasValue.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/IsPlainObject.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Merge.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/MergeRight.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Pick.js ***! - \******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/SetValue.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Format.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Pad.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Reverse.js ***! - \*********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UUID.js ***! - \******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UppercaseFirst.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/index.js ***! - \*******************************************************/ - -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ - -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ - -/*!*************************************************!*\ - !*** multi ./node_modules/phaser/src/phaser.js ***! - \*************************************************/ diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/LICENSE b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/LICENSE new file mode 100644 index 0000000..78458f7 --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2020 Ara Hovakimyan + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/README.md b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/README.md new file mode 100644 index 0000000..691497a --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/README.md @@ -0,0 +1,20 @@ +# cordova-plugin-wkwebviewxhrfix +Cordova iOS plugin to fix local file access via XHR with WKWebView for Cordova iOS 6+ + +## About +Install this plugin to fix local file access via XHR with WKWebView for Cordova iOS 6+ which is accompanied with an error message about "Cross origin requests are only supported for HTTP". + +## Installation +Install the plugin by running: +``` +cordova plugin add @ahovakimyan/cordova-plugin-wkwebviewxhrfix +``` +Or install from github +``` +cordova plugin add https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix +``` + +## Notes +This plugin does not depend on any other additional plugins and does not require additional permissions. + +That's it! Seriously! \ No newline at end of file diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/package.json b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/package.json new file mode 100644 index 0000000..0c32f5e --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/package.json @@ -0,0 +1,35 @@ +{ + "name": "@ahovakimyan/cordova-plugin-wkwebviewxhrfix", + "version": "1.0.2", + "description": "Cordova plugin to fix local file XHR access inside WKWebView for Cordova iOS 6+", + "cordova": { + "id": "@ahovakimyan/cordova-plugin-wkwebviewxhrfix", + "platforms": [ + "ios" + ] + }, + "repository": { + "type": "git", + "url": "git+https://github.com/arahovakimyan/cordova-plugin-wkwebviewxhrfix.git" + }, + "bugs": { + "url": "https://github.com/arahovakimyan/cordova-plugin-wkwebviewxhrfix/issues" + }, + "homepage": "https://github.com/arahovakimyan/cordova-plugin-wkwebviewxhrfix#readme", + "keywords": [ + "cordova", + "wkwebview", + "ecosystem:cordova", + "cordova-ios" + ], + "author": "Ara Hovakimyan", + "license": "MIT", + "engines": { + "cordovaDependencies": { + "1.0.0": { + "cordova": ">5.0.0", + "cordova-ios": ">4.0.0" + } + } + } +} diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/plugin.xml b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/plugin.xml new file mode 100644 index 0000000..a5ba2cf --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/plugin.xml @@ -0,0 +1,30 @@ + + + + Cordova WKWebView File XHR Fix + Cordova iOS plugin to fix local file access via XHR with WKWebView(resolves XHR Cross-Origin Resource Sharing (CORS) constraints) for Cordova iOS 6+ + MIT + cordova,wkwebview,webview + https://github.com/AraHovakimyan/cordova-plugin-wkwebviewxhrfix + + + + + + + + + + + + + + + + + + + + diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.h b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.h new file mode 100644 index 0000000..8358118 --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.h @@ -0,0 +1,14 @@ +// +// CDVWebViewEngine+FileXhrFix.h +// +// Created by Ara Hovakimyan on 25/Aug/2020. +// +// + +#if __has_include("../../../../CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.h") +#define EXIST_CDVWEBVIEWENGINE +#import "../../../../CordovaLib/Classes/Private/Plugins/CDVWebViewEngine/CDVWebViewEngine.h" + +@interface CDVWebViewEngine (FileXhrFix) +@end +#endif diff --git a/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.m b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.m new file mode 100644 index 0000000..b1c3d9c --- /dev/null +++ b/cordova/plugins/@ahovakimyan/cordova-plugin-wkwebviewxhrfix/src/ios/CDVWebViewEngine+FileXhrFix.m @@ -0,0 +1,41 @@ +// +// CDVWebViewEngine+FileXhrFix.m +// +// Created by Ara Hovakimyan on 25/Aug/2020. +// +// + +#import +#import "CDVWebViewEngine+FileXhrFix.h" + +#ifdef EXIST_CDVWEBVIEWENGINE +@implementation CDVWebViewEngine (FileXhrFix) ++ (void)load { + SEL selector = NSSelectorFromString(@"createConfigurationFromSettings:"); + Method originalMethod = class_getInstanceMethod([CDVWebViewEngine class], selector); + IMP originalImp = method_getImplementation(originalMethod); + typedef WKWebViewConfiguration* (*send_type)(id, SEL , NSDictionary*); + send_type originalImpSend = (send_type)originalImp; + + IMP newImp = imp_implementationWithBlock(^(id _self, NSDictionary* settings){ + // Get the original configuration + WKWebViewConfiguration* configuration = originalImpSend(_self, selector, settings); + + // allow access to file api + @try { + [configuration.preferences setValue:@TRUE forKey:@"allowFileAccessFromFileURLs"]; + } + @catch (NSException *exception) {} + + @try { + [configuration setValue:@TRUE forKey:@"allowUniversalAccessFromFileURLs"]; + } + @catch (NSException *exception) {} + + return configuration; + }); + + method_setImplementation(originalMethod, newImp); +} +@end +#endif diff --git a/cordova/plugins/admob-plus-cordova/plugin.xml b/cordova/plugins/admob-plus-cordova/plugin.xml index 2ad2e5b..022d286 100644 --- a/cordova/plugins/admob-plus-cordova/plugin.xml +++ b/cordova/plugins/admob-plus-cordova/plugin.xml @@ -84,9 +84,9 @@ - - $USAGE - + + + diff --git a/cordova/plugins/android.json b/cordova/plugins/android.json index cba76de..fb3ba29 100644 --- a/cordova/plugins/android.json +++ b/cordova/plugins/android.json @@ -49,6 +49,9 @@ "APP_ID_ANDROID": "ca-app-pub-4865595196880143~4169283752", "PLAY_SERVICES_VERSION": "20.6.0", "PACKAGE_NAME": "com.doyban.flyingplane" + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "PACKAGE_NAME": "com.doyban.flyingplane" } }, "dependent_plugins": { diff --git a/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVWKInAppBrowser.m b/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVWKInAppBrowser.m index cf4b6f6..3dc26da 100644 --- a/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVWKInAppBrowser.m +++ b/cordova/plugins/cordova-plugin-inappbrowser/src/ios/CDVWKInAppBrowser.m @@ -6,9 +6,9 @@ Licensed to the Apache Software Foundation (ASF) under one to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at - + http://www.apache.org/licenses/LICENSE-2.0 - + Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY @@ -75,7 +75,7 @@ - (void)close:(CDVInvokedUrlCommand*)command NSLog(@"IAB.close() called but it was already closed."); return; } - + // Things are cleaned up in browserExit. [self.inAppBrowserViewController close]; } @@ -85,28 +85,28 @@ - (BOOL) isSystemUrl:(NSURL*)url if ([[url host] isEqualToString:@"itunes.apple.com"]) { return YES; } - + return NO; } - (void)open:(CDVInvokedUrlCommand*)command { CDVPluginResult* pluginResult; - + NSString* url = [command argumentAtIndex:0]; NSString* target = [command argumentAtIndex:1 withDefault:kInAppBrowserTargetSelf]; NSString* options = [command argumentAtIndex:2 withDefault:@"" andClass:[NSString class]]; - + self.callbackId = command.callbackId; - + if (url != nil) { NSURL* baseUrl = [self.webViewEngine URL]; NSURL* absoluteUrl = [[NSURL URLWithString:url relativeToURL:baseUrl] absoluteURL]; - + if ([self isSystemUrl:absoluteUrl]) { target = kInAppBrowserTargetSystem; } - + if ([target isEqualToString:kInAppBrowserTargetSelf]) { [self openInCordovaWebView:absoluteUrl withOptions:options]; } else if ([target isEqualToString:kInAppBrowserTargetSystem]) { @@ -114,12 +114,12 @@ - (void)open:(CDVInvokedUrlCommand*)command } else { // _blank or anything else [self openInInAppBrowser:absoluteUrl withOptions:options]; } - + pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK]; } else { pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsString:@"incorrect number of arguments"]; } - + [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; } @@ -127,17 +127,17 @@ - (void)open:(CDVInvokedUrlCommand*)command - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options { CDVInAppBrowserOptions* browserOptions = [CDVInAppBrowserOptions parseOptions:options]; - + WKWebsiteDataStore* dataStore = [WKWebsiteDataStore defaultDataStore]; if (browserOptions.cleardata) { - + NSDate* dateFrom = [NSDate dateWithTimeIntervalSince1970:0]; [dataStore removeDataOfTypes:[WKWebsiteDataStore allWebsiteDataTypes] modifiedSince:dateFrom completionHandler:^{ NSLog(@"Removed all WKWebView data"); self.inAppBrowserViewController.webView.configuration.processPool = [[WKProcessPool alloc] init]; // create new process pool to flush all data }]; } - + if (browserOptions.clearcache) { bool isAtLeastiOS11 = false; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 @@ -145,7 +145,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options isAtLeastiOS11 = true; } #endif - + if(isAtLeastiOS11){ #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 // Deletes all cookies @@ -173,7 +173,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options }]; } } - + if (browserOptions.clearsessioncache) { bool isAtLeastiOS11 = false; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 @@ -202,12 +202,12 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options if (self.inAppBrowserViewController == nil) { self.inAppBrowserViewController = [[CDVWKInAppBrowserViewController alloc] initWithBrowserOptions: browserOptions andSettings:self.commandDelegate.settings]; self.inAppBrowserViewController.navigationDelegate = self; - + if ([self.viewController conformsToProtocol:@protocol(CDVScreenOrientationDelegate)]) { self.inAppBrowserViewController.orientationDelegate = (UIViewController *)self.viewController; } } - + [self.inAppBrowserViewController showLocationBar:browserOptions.location]; [self.inAppBrowserViewController showToolBar:browserOptions.toolbar :browserOptions.toolbarposition]; if (browserOptions.closebuttoncaption != nil || browserOptions.closebuttoncolor != nil) { @@ -224,7 +224,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } self.inAppBrowserViewController.modalPresentationStyle = presentationStyle; - + // Set Transition Style UIModalTransitionStyle transitionStyle = UIModalTransitionStyleCoverVertical; // default if (browserOptions.transitionstyle != nil) { @@ -235,7 +235,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } self.inAppBrowserViewController.modalTransitionStyle = transitionStyle; - + //prevent webView from bouncing if (browserOptions.disallowoverscroll) { if ([self.inAppBrowserViewController.webView respondsToSelector:@selector(scrollView)]) { @@ -248,7 +248,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options } } } - + // use of beforeload event if([browserOptions.beforeload isKindOfClass:[NSString class]]){ _beforeload = browserOptions.beforeload; @@ -256,7 +256,7 @@ - (void)openInInAppBrowser:(NSURL*)url withOptions:(NSString*)options _beforeload = @"yes"; } _waitForBeforeload = ![_beforeload isEqualToString:@""]; - + [self.inAppBrowserViewController navigateTo:url]; if (!browserOptions.hidden) { [self show:nil withNoAnimate:browserOptions.hidden]; @@ -273,7 +273,7 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate if(command == nil && noAnimate == YES){ initHidden = YES; } - + if (self.inAppBrowserViewController == nil) { NSLog(@"Tried to show IAB after it was closed."); return; @@ -282,20 +282,20 @@ - (void)show:(CDVInvokedUrlCommand*)command withNoAnimate:(BOOL)noAnimate NSLog(@"Tried to show IAB while already shown"); return; } - + if(!initHidden){ _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; } - + __block CDVInAppBrowserNavigationController* nav = [[CDVInAppBrowserNavigationController alloc] initWithRootViewController:self.inAppBrowserViewController]; nav.orientationDelegate = self.inAppBrowserViewController; nav.navigationBarHidden = YES; nav.modalPresentationStyle = self.inAppBrowserViewController.modalPresentationStyle; nav.presentationController.delegate = self.inAppBrowserViewController; - + __weak CDVWKInAppBrowser* weakSelf = self; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ if (weakSelf.inAppBrowserViewController != nil) { @@ -330,16 +330,16 @@ - (void)hide:(CDVInvokedUrlCommand*)command if (self.inAppBrowserViewController == nil) { NSLog(@"Tried to hide IAB after it was closed."); return; - - + + } if (_previousStatusBarStyle == -1) { NSLog(@"Tried to hide IAB while already hidden"); return; } - + _previousStatusBarStyle = [UIApplication sharedApplication].statusBarStyle; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ if (self.inAppBrowserViewController != nil) { @@ -400,7 +400,7 @@ - (void)injectDeferredObject:(NSString*)source withWrapper:(NSString*)jsWrapper { // Ensure a message handler bridge is created to communicate with the CDVWKInAppBrowserViewController [self evaluateJavaScript: [NSString stringWithFormat:@"(function(w){if(!w._cdvMessageHandler) {w._cdvMessageHandler = function(id,d){w.webkit.messageHandlers.%@.postMessage({d:d, id:id});}}})(window)", IAB_BRIDGE_NAME]]; - + if (jsWrapper != nil) { NSData* jsonData = [NSJSONSerialization dataWithJSONObject:@[source] options:0 error:nil]; NSString* sourceArrayString = [[NSString alloc] initWithData:jsonData encoding:NSUTF8StringEncoding]; @@ -432,7 +432,7 @@ - (void)evaluateJavaScript:(NSString *)script { - (void)injectScriptCode:(CDVInvokedUrlCommand*)command { NSString* jsWrapper = nil; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"_cdvMessageHandler('%@',JSON.stringify([eval(%%@)]));", command.callbackId]; } @@ -442,7 +442,7 @@ - (void)injectScriptCode:(CDVInvokedUrlCommand*)command - (void)injectScriptFile:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('script'); c.src = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -454,7 +454,7 @@ - (void)injectScriptFile:(CDVInvokedUrlCommand*)command - (void)injectStyleCode:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('style'); c.innerHTML = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -466,7 +466,7 @@ - (void)injectStyleCode:(CDVInvokedUrlCommand*)command - (void)injectStyleFile:(CDVInvokedUrlCommand*)command { NSString* jsWrapper; - + if ((command.callbackId != nil) && ![command.callbackId isEqualToString:@"INVALID"]) { jsWrapper = [NSString stringWithFormat:@"(function(d) { var c = d.createElement('link'); c.rel='stylesheet'; c.type='text/css'; c.href = %%@; c.onload = function() { _cdvMessageHandler('%@'); }; d.body.appendChild(c); })(document)", command.callbackId]; } else { @@ -498,7 +498,7 @@ - (BOOL)isValidCallbackId:(NSString *)callbackId * other code execution is possible. */ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavigationAction *)navigationAction decisionHandler:(void (^)(WKNavigationActionPolicy))decisionHandler { - + NSURL* url = navigationAction.request.URL; NSURL* mainDocumentURL = navigationAction.request.mainDocumentURL; BOOL isTopLevelNavigation = [url isEqual:mainDocumentURL]; @@ -506,7 +506,7 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig BOOL useBeforeLoad = NO; NSString* httpMethod = navigationAction.request.HTTPMethod; NSString* errorMessage = nil; - + if([_beforeload isEqualToString:@"post"]){ //TODO handle POST requests by preserving POST data then remove this condition errorMessage = @"beforeload doesn't yet support POST requests"; @@ -525,12 +525,12 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"beforeload", @"url":[url absoluteString]}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; decisionHandler(WKNavigationActionPolicyCancel); return; } - + if(errorMessage != nil){ NSLog(errorMessage); CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR @@ -538,7 +538,7 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } - + //if is an app store link, let the system handle it, otherwise it fails to load it if ([[ url scheme] isEqualToString:@"itms-appss"] || [[ url scheme] isEqualToString:@"itms-apps"]) { [theWebView stopLoading]; @@ -550,14 +550,14 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"loadstart", @"url":[url absoluteString]}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } if (useBeforeLoad) { _waitForBeforeload = YES; } - + if(shouldStart){ // Fix GH-417 & GH-424: Handle non-default target attribute // Based on https://stackoverflow.com/a/25713070/777265 @@ -574,13 +574,13 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig #pragma mark WKScriptMessageHandler delegate - (void)userContentController:(nonnull WKUserContentController *)userContentController didReceiveScriptMessage:(nonnull WKScriptMessage *)message { - + CDVPluginResult* pluginResult = nil; - + if([message.body isKindOfClass:[NSDictionary class]]){ NSDictionary* messageContent = (NSDictionary*) message.body; NSString* scriptCallbackId = messageContent[@"id"]; - + if([messageContent objectForKey:@"d"]){ NSString* scriptResult = messageContent[@"d"]; NSError* __autoreleasing error = nil; @@ -630,7 +630,7 @@ - (void)didFinishNavigation:(WKWebView*)theWebView CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:@{@"type":@"loadstop", @"url":url}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } } @@ -649,7 +649,7 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(NSError*)error CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_ERROR messageAsDictionary:@{@"type":@"loaderror", @"url":url, @"code": [NSNumber numberWithInteger:error.code], @"message": error.localizedDescription}]; [pluginResult setKeepCallback:[NSNumber numberWithBool:YES]]; - + [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; } } @@ -662,16 +662,16 @@ - (void)browserExit [self.commandDelegate sendPluginResult:pluginResult callbackId:self.callbackId]; self.callbackId = nil; } - + [self.inAppBrowserViewController.configuration.userContentController removeScriptMessageHandlerForName:IAB_BRIDGE_NAME]; self.inAppBrowserViewController.configuration = nil; - + [self.inAppBrowserViewController.webView stopLoading]; [self.inAppBrowserViewController.webView removeFromSuperview]; [self.inAppBrowserViewController.webView setUIDelegate:nil]; [self.inAppBrowserViewController.webView setNavigationDelegate:nil]; self.inAppBrowserViewController.webView = nil; - + // Set navigationDelegate to nil to ensure no callbacks are received from it. self.inAppBrowserViewController.navigationDelegate = nil; self.inAppBrowserViewController = nil; @@ -684,10 +684,10 @@ - (void)browserExit if (IsAtLeastiOSVersion(@"7.0")) { if (_previousStatusBarStyle != -1) { [[UIApplication sharedApplication] setStatusBarStyle:_previousStatusBarStyle]; - + } } - + _previousStatusBarStyle = -1; // this value was reset before reapplying it. caused statusbar to stay black on ios7 } @@ -710,10 +710,10 @@ - (id)initWithBrowserOptions: (CDVInAppBrowserOptions*) browserOptions andSettin _settings = settings; self.webViewUIDelegate = [[CDVWKInAppBrowserUIDelegate alloc] initWithTitle:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]]; [self.webViewUIDelegate setViewController:self]; - + [self createViews]; } - + return self; } @@ -724,14 +724,14 @@ -(void)dealloc { - (void)createViews { // We create the views in code for primarily for ease of upgrades and not requiring an external .xib to be included - + CGRect webViewBounds = self.view.bounds; BOOL toolbarIsAtBottom = ![_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop]; webViewBounds.size.height -= _browserOptions.location ? FOOTER_HEIGHT : TOOLBAR_HEIGHT; WKUserContentController* userContentController = [[WKUserContentController alloc] init]; - + WKWebViewConfiguration* configuration = [[WKWebViewConfiguration alloc] init]; - + NSString *userAgent = configuration.applicationNameForUserAgent; if ( [self settingForKey:@"OverrideUserAgent"] == nil && @@ -747,7 +747,7 @@ - (void)createViews configuration.processPool = [[CDVWKProcessPoolFactory sharedFactory] sharedProcessPool]; #endif [configuration.userContentController addScriptMessageHandler:self name:IAB_BRIDGE_NAME]; - + //WKWebView options configuration.allowsInlineMediaPlayback = _browserOptions.allowinlinemediaplayback; if (IsAtLeastiOSVersion(@"10.0")) { @@ -760,7 +760,7 @@ - (void)createViews }else{ // iOS 9 configuration.mediaPlaybackRequiresUserAction = _browserOptions.mediaplaybackrequiresuseraction; } - + if (@available(iOS 13.0, *)) { NSString *contentMode = [self settingForKey:@"PreferredContentMode"]; if ([contentMode isEqual: @"mobile"]) { @@ -768,23 +768,23 @@ - (void)createViews } else if ([contentMode isEqual: @"desktop"]) { configuration.defaultWebpagePreferences.preferredContentMode = WKContentModeDesktop; } - + } - + self.webView = [[WKWebView alloc] initWithFrame:webViewBounds configuration:configuration]; - + [self.view addSubview:self.webView]; [self.view sendSubviewToBack:self.webView]; - - + + self.webView.navigationDelegate = self; self.webView.UIDelegate = self.webViewUIDelegate; self.webView.backgroundColor = [UIColor whiteColor]; if ([self settingForKey:@"OverrideUserAgent"] != nil) { self.webView.customUserAgent = [self settingForKey:@"OverrideUserAgent"]; } - + self.webView.clearsContextBeforeDrawing = YES; self.webView.clipsToBounds = YES; self.webView.contentMode = UIViewContentModeScaleToFill; @@ -795,13 +795,13 @@ - (void)createViews [self.webView setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth]; self.webView.allowsLinkPreview = NO; self.webView.allowsBackForwardNavigationGestures = NO; - + #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 110000 if (@available(iOS 11.0, *)) { [self.webView.scrollView setContentInsetAdjustmentBehavior:UIScrollViewContentInsetAdjustmentNever]; } #endif - + self.spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; self.spinner.alpha = 1.000; self.spinner.autoresizesSubviews = YES; @@ -816,18 +816,18 @@ - (void)createViews self.spinner.opaque = NO; self.spinner.userInteractionEnabled = NO; [self.spinner stopAnimating]; - + self.closeButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(close)]; self.closeButton.enabled = YES; - + UIBarButtonItem* flexibleSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil]; - + UIBarButtonItem* fixedSpaceButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; fixedSpaceButton.width = 20; - + float toolbarY = toolbarIsAtBottom ? self.view.bounds.size.height - TOOLBAR_HEIGHT : 0.0; CGRect toolbarFrame = CGRectMake(0.0, toolbarY, self.view.bounds.size.width, TOOLBAR_HEIGHT); - + self.toolbar = [[UIToolbar alloc] initWithFrame:toolbarFrame]; self.toolbar.alpha = 1.000; self.toolbar.autoresizesSubviews = YES; @@ -846,10 +846,10 @@ - (void)createViews if (!_browserOptions.toolbartranslucent) { // Set toolbar translucent to no if user sets it in options self.toolbar.translucent = NO; } - + CGFloat labelInset = 5.0; float locationBarY = toolbarIsAtBottom ? self.view.bounds.size.height - FOOTER_HEIGHT : self.view.bounds.size.height - LOCATIONBAR_HEIGHT; - + self.addressLabel = [[UILabel alloc] initWithFrame:CGRectMake(labelInset, locationBarY, self.view.bounds.size.width - labelInset, LOCATIONBAR_HEIGHT)]; self.addressLabel.adjustsFontSizeToFitWidth = NO; self.addressLabel.alpha = 1.000; @@ -863,13 +863,13 @@ - (void)createViews self.addressLabel.enabled = YES; self.addressLabel.hidden = NO; self.addressLabel.lineBreakMode = NSLineBreakByTruncatingTail; - + if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumScaleFactor:")]) { [self.addressLabel setValue:@(10.0/[UIFont labelFontSize]) forKey:@"minimumScaleFactor"]; } else if ([self.addressLabel respondsToSelector:NSSelectorFromString(@"setMinimumFontSize:")]) { [self.addressLabel setValue:@(10.0) forKey:@"minimumFontSize"]; } - + self.addressLabel.multipleTouchEnabled = NO; self.addressLabel.numberOfLines = 1; self.addressLabel.opaque = NO; @@ -878,7 +878,7 @@ - (void)createViews self.addressLabel.textAlignment = NSTextAlignmentLeft; self.addressLabel.textColor = [UIColor colorWithWhite:1.000 alpha:1.000]; self.addressLabel.userInteractionEnabled = NO; - + NSString* frontArrowString = NSLocalizedString(@"►", nil); // create arrow from Unicode char self.forwardButton = [[UIBarButtonItem alloc] initWithTitle:frontArrowString style:UIBarButtonItemStylePlain target:self action:@selector(goForward:)]; self.forwardButton.enabled = YES; @@ -907,7 +907,7 @@ - (void)createViews } else { [self.toolbar setItems:@[self.closeButton, flexibleSpaceButton, self.backButton, fixedSpaceButton, self.forwardButton]]; } - + self.view.backgroundColor = [UIColor clearColor]; [self.view addSubview:self.toolbar]; [self.view addSubview:self.addressLabel]; @@ -934,7 +934,7 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b self.closeButton.enabled = YES; // If color on closebutton is requested then initialize with that that color, otherwise use initialize with default self.closeButton.tintColor = colorString != nil ? [self colorFromHexString:colorString] : [UIColor colorWithRed:60.0 / 255.0 green:136.0 / 255.0 blue:230.0 / 255.0 alpha:1]; - + NSMutableArray* items = [self.toolbar.items mutableCopy]; [items replaceObjectAtIndex:buttonIndex withObject:self.closeButton]; [self.toolbar setItems:items]; @@ -943,43 +943,43 @@ - (void)setCloseButtonTitle:(NSString*)title : (NSString*) colorString : (int) b - (void)showLocationBar:(BOOL)show { CGRect locationbarFrame = self.addressLabel.frame; - + BOOL toolbarVisible = !self.toolbar.hidden; - + // prevent double show/hide if (show == !(self.addressLabel.hidden)) { return; } - + if (show) { self.addressLabel.hidden = NO; - + if (toolbarVisible) { // toolBar at the bottom, leave as is // put locationBar on top of the toolBar - + CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= FOOTER_HEIGHT; [self setWebViewFrame:webViewBounds]; - + locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; } else { // no toolBar, so put locationBar at the bottom - + CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= LOCATIONBAR_HEIGHT; [self setWebViewFrame:webViewBounds]; - + locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; } } else { self.addressLabel.hidden = YES; - + if (toolbarVisible) { // locationBar is on top of toolBar, hide locationBar - + // webView take up whole height less toolBar height CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= TOOLBAR_HEIGHT; @@ -995,18 +995,18 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition { CGRect toolbarFrame = self.toolbar.frame; CGRect locationbarFrame = self.addressLabel.frame; - + BOOL locationbarVisible = !self.addressLabel.hidden; - + // prevent double show/hide if (show == !(self.toolbar.hidden)) { return; } - + if (show) { self.toolbar.hidden = NO; CGRect webViewBounds = self.view.bounds; - + if (locationbarVisible) { // locationBar at the bottom, move locationBar up // put toolBar at the bottom @@ -1020,7 +1020,7 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition webViewBounds.size.height -= TOOLBAR_HEIGHT; self.toolbar.frame = toolbarFrame; } - + if ([toolbarPosition isEqualToString:kInAppBrowserToolbarBarPositionTop]) { toolbarFrame.origin.y = 0; webViewBounds.origin.y += toolbarFrame.size.height; @@ -1029,19 +1029,19 @@ - (void)showToolBar:(BOOL)show : (NSString *) toolbarPosition toolbarFrame.origin.y = (webViewBounds.size.height + LOCATIONBAR_HEIGHT); } [self setWebViewFrame:webViewBounds]; - + } else { self.toolbar.hidden = YES; - + if (locationbarVisible) { // locationBar is on top of toolBar, hide toolBar // put locationBar at the bottom - + // webView take up whole height less locationBar height CGRect webViewBounds = self.view.bounds; webViewBounds.size.height -= LOCATIONBAR_HEIGHT; [self setWebViewFrame:webViewBounds]; - + // move locationBar down locationbarFrame.origin.y = webViewBounds.size.height; self.addressLabel.frame = locationbarFrame; @@ -1089,9 +1089,9 @@ - (BOOL)prefersStatusBarHidden { - (void)close { self.currentURL = nil; - + __weak UIViewController* weakSelf = self; - + // Run later to avoid the "took a long time" log message. dispatch_async(dispatch_get_main_queue(), ^{ isExiting = TRUE; @@ -1127,7 +1127,7 @@ - (void)goForward:(id)sender - (void)viewWillAppear:(BOOL)animated { [self rePositionViews]; - + [super viewWillAppear:animated]; } @@ -1143,21 +1143,21 @@ - (float) getStatusBarOffset { - (void) rePositionViews { CGRect viewBounds = [self.webView bounds]; CGFloat statusBarHeight = [self getStatusBarOffset]; - + // orientation portrait or portraitUpsideDown: status bar is on the top and web view is to be aligned to the bottom of the status bar // orientation landscapeLeft or landscapeRight: status bar height is 0 in but lets account for it in case things ever change in the future viewBounds.origin.y = statusBarHeight; - + // account for web view height portion that may have been reduced by a previous call to this method viewBounds.size.height = viewBounds.size.height - statusBarHeight + lastReducedStatusBarHeight; lastReducedStatusBarHeight = statusBarHeight; - + if ((_browserOptions.toolbar) && ([_browserOptions.toolbarposition isEqualToString:kInAppBrowserToolbarBarPositionTop])) { // if we have to display the toolbar on top of the web view, we need to account for its height viewBounds.origin.y += TOOLBAR_HEIGHT; self.toolbar.frame = CGRectMake(self.toolbar.frame.origin.x, statusBarHeight, self.toolbar.frame.size.width, self.toolbar.frame.size.height); } - + self.webView.frame = viewBounds; } @@ -1175,18 +1175,18 @@ - (UIColor *)colorFromHexString:(NSString *)hexString { #pragma mark WKNavigationDelegate - (void)webView:(WKWebView *)theWebView didStartProvisionalNavigation:(WKNavigation *)navigation{ - + // loading url, start spinner, update back/forward - + self.addressLabel.text = NSLocalizedString(@"Loading...", nil); self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; - + NSLog(_browserOptions.hidespinner ? @"Yes" : @"No"); if(!_browserOptions.hidespinner) { [self.spinner startAnimating]; } - + return [self.navigationDelegate didStartProvisionalNavigation:theWebView]; } @@ -1194,40 +1194,40 @@ - (void)webView:(WKWebView *)theWebView decidePolicyForNavigationAction:(WKNavig { NSURL *url = navigationAction.request.URL; NSURL *mainDocumentURL = navigationAction.request.mainDocumentURL; - + BOOL isTopLevelNavigation = [url isEqual:mainDocumentURL]; - + if (isTopLevelNavigation) { self.currentURL = url; } - + [self.navigationDelegate webView:theWebView decidePolicyForNavigationAction:navigationAction decisionHandler:decisionHandler]; } - (void)webView:(WKWebView *)theWebView didFinishNavigation:(WKNavigation *)navigation { // update url, stop spinner, update back/forward - + self.addressLabel.text = [self.currentURL absoluteString]; self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; theWebView.scrollView.contentInset = UIEdgeInsetsZero; - + [self.spinner stopAnimating]; - + [self.navigationDelegate didFinishNavigation:theWebView]; } - + - (void)webView:(WKWebView*)theWebView failedNavigation:(NSString*) delegateName withError:(nonnull NSError *)error{ // log fail message, stop spinner, update back/forward NSLog(@"webView:%@ - %ld: %@", delegateName, (long)error.code, [error localizedDescription]); - + self.backButton.enabled = theWebView.canGoBack; self.forwardButton.enabled = theWebView.canGoForward; [self.spinner stopAnimating]; - + self.addressLabel.text = NSLocalizedString(@"Load Error", nil); - + [self.navigationDelegate webView:theWebView didFailNavigation:error]; } @@ -1235,7 +1235,7 @@ - (void)webView:(WKWebView*)theWebView didFailNavigation:(null_unspecified WKNav { [self webView:theWebView failedNavigation:@"didFailNavigation" withError:error]; } - + - (void)webView:(WKWebView*)theWebView didFailProvisionalNavigation:(null_unspecified WKNavigation *)navigation withError:(nonnull NSError *)error { [self webView:theWebView failedNavigation:@"didFailProvisionalNavigation" withError:error]; @@ -1265,7 +1265,7 @@ - (UIInterfaceOrientationMask)supportedInterfaceOrientations if ((self.orientationDelegate != nil) && [self.orientationDelegate respondsToSelector:@selector(supportedInterfaceOrientations)]) { return [self.orientationDelegate supportedInterfaceOrientations]; } - + return 1 << UIInterfaceOrientationPortrait; } diff --git a/cordova/plugins/fetch.json b/cordova/plugins/fetch.json index 82b4ea7..fd86e68 100644 --- a/cordova/plugins/fetch.json +++ b/cordova/plugins/fetch.json @@ -104,5 +104,13 @@ "APP_ID_ANDROID": "ca-app-pub-4865595196880143~4169283752", "APP_ID_IOS": "ca-app-pub-4865595196880143~7209793334" } + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "source": { + "type": "registry", + "id": "@ahovakimyan/cordova-plugin-wkwebviewxhrfix@1.0.2" + }, + "is_top_level": true, + "variables": {} } -} +} \ No newline at end of file diff --git a/cordova/plugins/ios.json b/cordova/plugins/ios.json index 079c9ad..d4be2ac 100644 --- a/cordova/plugins/ios.json +++ b/cordova/plugins/ios.json @@ -52,6 +52,9 @@ "USAGE": "This identifier will be used to deliver personalized ads to you.", "DISABLESDKCRASHREPORTING": "false", "PACKAGE_NAME": "com.doyban.flyingplane" + }, + "@ahovakimyan/cordova-plugin-wkwebviewxhrfix": { + "PACKAGE_NAME": "com.doyban.flyingplane" } }, "dependent_plugins": { diff --git a/cordova/ul_web_hooks/ios/xxxxx.page.link#apple-app-site-association b/cordova/ul_web_hooks/ios/doyban.page.link#apple-app-site-association similarity index 99% rename from cordova/ul_web_hooks/ios/xxxxx.page.link#apple-app-site-association rename to cordova/ul_web_hooks/ios/doyban.page.link#apple-app-site-association index 82eac3f..a84d482 100644 --- a/cordova/ul_web_hooks/ios/xxxxx.page.link#apple-app-site-association +++ b/cordova/ul_web_hooks/ios/doyban.page.link#apple-app-site-association @@ -11,4 +11,4 @@ } ] } -} +} \ No newline at end of file diff --git a/cordova/ul_web_hooks/ios/xxxx-zzzzz.firebaseapp.com#apple-app-site-association b/cordova/ul_web_hooks/ios/tappyplane-b349f.firebaseapp.com#apple-app-site-association similarity index 99% rename from cordova/ul_web_hooks/ios/xxxx-zzzzz.firebaseapp.com#apple-app-site-association rename to cordova/ul_web_hooks/ios/tappyplane-b349f.firebaseapp.com#apple-app-site-association index c91b5dd..e154739 100644 --- a/cordova/ul_web_hooks/ios/xxxx-zzzzz.firebaseapp.com#apple-app-site-association +++ b/cordova/ul_web_hooks/ios/tappyplane-b349f.firebaseapp.com#apple-app-site-association @@ -10,4 +10,4 @@ } ] } -} +} \ No newline at end of file diff --git a/cordova/www/app.0909a17fa1f4ba2383c9.js b/cordova/www/app.0909a17fa1f4ba2383c9.js deleted file mode 100644 index f1fa517..0000000 --- a/cordova/www/app.0909a17fa1f4ba2383c9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see app.0909a17fa1f4ba2383c9.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=0)}({"./node_modules/@firebase/analytics/dist/esm/index.esm2017.js":function(module,__webpack_exports__,__webpack_require__){"use strict";eval('__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getAnalytics", function() { return getAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getGoogleAnalyticsClientId", function() { return getGoogleAnalyticsClientId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "initializeAnalytics", function() { return initializeAnalytics; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isSupported", function() { return isSupported; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "logEvent", function() { return logEvent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAnalyticsCollectionEnabled", function() { return setAnalyticsCollectionEnabled; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setConsent", function() { return setConsent; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setCurrentScreen", function() { return setCurrentScreen; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setDefaultEventParameters", function() { return setDefaultEventParameters; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserId", function() { return setUserId; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUserProperties", function() { return setUserProperties; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "settings", function() { return settings; });\n/* harmony import */ var _firebase_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @firebase/app */ "./node_modules/@firebase/app/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_logger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @firebase/logger */ "./node_modules/@firebase/logger/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @firebase/util */ "./node_modules/@firebase/util/dist/index.esm2017.js");\n/* harmony import */ var _firebase_component__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @firebase/component */ "./node_modules/@firebase/component/dist/esm/index.esm2017.js");\n/* harmony import */ var _firebase_installations__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @firebase/installations */ "./node_modules/@firebase/installations/dist/esm/index.esm2017.js");\n\n\n\n\n\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Type constant for Firebase Analytics.\r\n */\r\nconst ANALYTICS_TYPE = \'analytics\';\r\n// Key to attach FID to in gtag params.\r\nconst GA_FID_KEY = \'firebase_id\';\r\nconst ORIGIN_KEY = \'origin\';\r\nconst FETCH_TIMEOUT_MILLIS = 60 * 1000;\r\nconst DYNAMIC_CONFIG_URL = \'https://firebase.googleapis.com/v1alpha/projects/-/apps/{app-id}/webConfig\';\r\nconst GTAG_URL = \'https://www.googletagmanager.com/gtag/js\';\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst logger = new _firebase_logger__WEBPACK_IMPORTED_MODULE_1__["Logger"](\'@firebase/analytics\');\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nconst ERRORS = {\r\n ["already-exists" /* AnalyticsError.ALREADY_EXISTS */]: \'A Firebase Analytics instance with the appId {$id} \' +\r\n \' already exists. \' +\r\n \'Only one Firebase Analytics instance can be created for each appId.\',\r\n ["already-initialized" /* AnalyticsError.ALREADY_INITIALIZED */]: \'initializeAnalytics() cannot be called again with different options than those \' +\r\n \'it was initially called with. It can be called again with the same options to \' +\r\n \'return the existing instance, or getAnalytics() can be used \' +\r\n \'to get a reference to the already-intialized instance.\',\r\n ["already-initialized-settings" /* AnalyticsError.ALREADY_INITIALIZED_SETTINGS */]: \'Firebase Analytics has already been initialized.\' +\r\n \'settings() must be called before initializing any Analytics instance\' +\r\n \'or it will have no effect.\',\r\n ["interop-component-reg-failed" /* AnalyticsError.INTEROP_COMPONENT_REG_FAILED */]: \'Firebase Analytics Interop Component failed to instantiate: {$reason}\',\r\n ["invalid-analytics-context" /* AnalyticsError.INVALID_ANALYTICS_CONTEXT */]: \'Firebase Analytics is not supported in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */]: \'IndexedDB unavailable or restricted in this environment. \' +\r\n \'Wrap initialization of analytics in analytics.isSupported() \' +\r\n \'to prevent initialization in unsupported environments. Details: {$errorInfo}\',\r\n ["fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */]: \'The config fetch request timed out while in an exponential backoff state.\' +\r\n \' Unix timestamp in milliseconds when fetch request throttling ends: {$throttleEndTimeMillis}.\',\r\n ["config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */]: \'Dynamic config fetch failed: [{$httpStatus}] {$responseMessage}\',\r\n ["no-api-key" /* AnalyticsError.NO_API_KEY */]: \'The "apiKey" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid API key.\',\r\n ["no-app-id" /* AnalyticsError.NO_APP_ID */]: \'The "appId" field is empty in the local Firebase config. Firebase Analytics requires this field to\' +\r\n \'contain a valid app ID.\',\r\n ["no-client-id" /* AnalyticsError.NO_CLIENT_ID */]: \'The "client_id" field is empty.\',\r\n ["invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */]: \'Trusted Types detected an invalid gtag resource: {$gtagURL}.\'\r\n};\r\nconst ERROR_FACTORY = new _firebase_util__WEBPACK_IMPORTED_MODULE_2__["ErrorFactory"](\'analytics\', \'Analytics\', ERRORS);\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Verifies and creates a TrustedScriptURL.\r\n */\r\nfunction createGtagTrustedTypesScriptURL(url) {\r\n if (!url.startsWith(GTAG_URL)) {\r\n const err = ERROR_FACTORY.create("invalid-gtag-resource" /* AnalyticsError.INVALID_GTAG_RESOURCE */, {\r\n gtagURL: url\r\n });\r\n logger.warn(err.message);\r\n return \'\';\r\n }\r\n return url;\r\n}\r\n/**\r\n * Makeshift polyfill for Promise.allSettled(). Resolves when all promises\r\n * have either resolved or rejected.\r\n *\r\n * @param promises Array of promises to wait for.\r\n */\r\nfunction promiseAllSettled(promises) {\r\n return Promise.all(promises.map(promise => promise.catch(e => e)));\r\n}\r\n/**\r\n * Creates a TrustedTypePolicy object that implements the rules passed as policyOptions.\r\n *\r\n * @param policyName A string containing the name of the policy\r\n * @param policyOptions Object containing implementations of instance methods for TrustedTypesPolicy, see {@link https://developer.mozilla.org/en-US/docs/Web/API/TrustedTypePolicy#instance_methods\r\n * | the TrustedTypePolicy reference documentation}.\r\n */\r\nfunction createTrustedTypesPolicy(policyName, policyOptions) {\r\n // Create a TrustedTypes policy that we can use for updating src\r\n // properties\r\n let trustedTypesPolicy;\r\n if (window.trustedTypes) {\r\n trustedTypesPolicy = window.trustedTypes.createPolicy(policyName, policyOptions);\r\n }\r\n return trustedTypesPolicy;\r\n}\r\n/**\r\n * Inserts gtag script tag into the page to asynchronously download gtag.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction insertScriptTag(dataLayerName, measurementId) {\r\n const trustedTypesPolicy = createTrustedTypesPolicy(\'firebase-js-sdk-policy\', {\r\n createScriptURL: createGtagTrustedTypesScriptURL\r\n });\r\n const script = document.createElement(\'script\');\r\n // We are not providing an analyticsId in the URL because it would trigger a `page_view`\r\n // without fid. We will initialize ga-id using gtag (config) command together with fid.\r\n const gtagScriptURL = `${GTAG_URL}?l=${dataLayerName}&id=${measurementId}`;\r\n script.src = trustedTypesPolicy\r\n ? trustedTypesPolicy === null || trustedTypesPolicy === void 0 ? void 0 : trustedTypesPolicy.createScriptURL(gtagScriptURL)\r\n : gtagScriptURL;\r\n script.async = true;\r\n document.head.appendChild(script);\r\n}\r\n/**\r\n * Get reference to, or create, global datalayer.\r\n * @param dataLayerName Name of datalayer (most often the default, "_dataLayer").\r\n */\r\nfunction getOrCreateDataLayer(dataLayerName) {\r\n // Check for existing dataLayer and create if needed.\r\n let dataLayer = [];\r\n if (Array.isArray(window[dataLayerName])) {\r\n dataLayer = window[dataLayerName];\r\n }\r\n else {\r\n window[dataLayerName] = dataLayer;\r\n }\r\n return dataLayer;\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'config\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param measurementId GA Measurement ID to set config for.\r\n * @param gtagParams Gtag config params to set.\r\n */\r\nasync function gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams) {\r\n // If config is already fetched, we know the appId and can use it to look up what FID promise we\r\n /// are waiting for, and wait only on that one.\r\n const correspondingAppId = measurementIdToAppId[measurementId];\r\n try {\r\n if (correspondingAppId) {\r\n await initializationPromisesMap[correspondingAppId];\r\n }\r\n else {\r\n // If config is not fetched yet, wait for all configs (we don\'t know which one we need) and\r\n // find the appId (if any) corresponding to this measurementId. If there is one, wait on\r\n // that appId\'s initialization promise. If there is none, promise resolves and gtag\r\n // call goes through.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === measurementId);\r\n if (foundConfig) {\r\n await initializationPromisesMap[foundConfig.appId];\r\n }\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n gtagCore("config" /* GtagCommand.CONFIG */, measurementId, gtagParams);\r\n}\r\n/**\r\n * Wrapped gtag logic when gtag is called with \'event\' command.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementId GA Measurement ID to log event to.\r\n * @param gtagParams Params to log with this event.\r\n */\r\nasync function gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams) {\r\n try {\r\n let initializationPromisesToWaitFor = [];\r\n // If there\'s a \'send_to\' param, check if any ID specified matches\r\n // an initializeIds() promise we are waiting for.\r\n if (gtagParams && gtagParams[\'send_to\']) {\r\n let gaSendToList = gtagParams[\'send_to\'];\r\n // Make it an array if is isn\'t, so it can be dealt with the same way.\r\n if (!Array.isArray(gaSendToList)) {\r\n gaSendToList = [gaSendToList];\r\n }\r\n // Checking \'send_to\' fields requires having all measurement ID results back from\r\n // the dynamic config fetch.\r\n const dynamicConfigResults = await promiseAllSettled(dynamicConfigPromisesList);\r\n for (const sendToId of gaSendToList) {\r\n // Any fetched dynamic measurement ID that matches this \'send_to\' ID\r\n const foundConfig = dynamicConfigResults.find(config => config.measurementId === sendToId);\r\n const initializationPromise = foundConfig && initializationPromisesMap[foundConfig.appId];\r\n if (initializationPromise) {\r\n initializationPromisesToWaitFor.push(initializationPromise);\r\n }\r\n else {\r\n // Found an item in \'send_to\' that is not associated\r\n // directly with an FID, possibly a group. Empty this array,\r\n // exit the loop early, and let it get populated below.\r\n initializationPromisesToWaitFor = [];\r\n break;\r\n }\r\n }\r\n }\r\n // This will be unpopulated if there was no \'send_to\' field , or\r\n // if not all entries in the \'send_to\' field could be mapped to\r\n // a FID. In these cases, wait on all pending initialization promises.\r\n if (initializationPromisesToWaitFor.length === 0) {\r\n initializationPromisesToWaitFor = Object.values(initializationPromisesMap);\r\n }\r\n // Run core gtag function with args after all relevant initialization\r\n // promises have been resolved.\r\n await Promise.all(initializationPromisesToWaitFor);\r\n // Workaround for http://b/141370449 - third argument cannot be undefined.\r\n gtagCore("event" /* GtagCommand.EVENT */, measurementId, gtagParams || {});\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n}\r\n/**\r\n * Wraps a standard gtag function with extra code to wait for completion of\r\n * relevant initialization promises before sending requests.\r\n *\r\n * @param gtagCore Basic gtag function that just appends to dataLayer.\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n */\r\nfunction wrapGtag(gtagCore, \r\n/**\r\n * Allows wrapped gtag calls to wait on whichever intialization promises are required,\r\n * depending on the contents of the gtag params\' `send_to` field, if any.\r\n */\r\ninitializationPromisesMap, \r\n/**\r\n * Wrapped gtag calls sometimes require all dynamic config fetches to have returned\r\n * before determining what initialization promises (which include FIDs) to wait for.\r\n */\r\ndynamicConfigPromisesList, \r\n/**\r\n * Wrapped gtag config calls can narrow down which initialization promise (with FID)\r\n * to wait for if the measurementId is already fetched, by getting the corresponding appId,\r\n * which is the key for the initialization promises map.\r\n */\r\nmeasurementIdToAppId) {\r\n /**\r\n * Wrapper around gtag that ensures FID is sent with gtag calls.\r\n * @param command Gtag command type.\r\n * @param idOrNameOrParams Measurement ID if command is EVENT/CONFIG, params if command is SET.\r\n * @param gtagParams Params if event is EVENT/CONFIG.\r\n */\r\n async function gtagWrapper(command, ...args) {\r\n try {\r\n // If event, check that relevant initialization promises have completed.\r\n if (command === "event" /* GtagCommand.EVENT */) {\r\n const [measurementId, gtagParams] = args;\r\n // If EVENT, second arg must be measurementId.\r\n await gtagOnEvent(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementId, gtagParams);\r\n }\r\n else if (command === "config" /* GtagCommand.CONFIG */) {\r\n const [measurementId, gtagParams] = args;\r\n // If CONFIG, second arg must be measurementId.\r\n await gtagOnConfig(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, measurementId, gtagParams);\r\n }\r\n else if (command === "consent" /* GtagCommand.CONSENT */) {\r\n const [gtagParams] = args;\r\n gtagCore("consent" /* GtagCommand.CONSENT */, \'update\', gtagParams);\r\n }\r\n else if (command === "get" /* GtagCommand.GET */) {\r\n const [measurementId, fieldName, callback] = args;\r\n gtagCore("get" /* GtagCommand.GET */, measurementId, fieldName, callback);\r\n }\r\n else if (command === "set" /* GtagCommand.SET */) {\r\n const [customParams] = args;\r\n // If SET, second arg must be params.\r\n gtagCore("set" /* GtagCommand.SET */, customParams);\r\n }\r\n else {\r\n gtagCore(command, ...args);\r\n }\r\n }\r\n catch (e) {\r\n logger.error(e);\r\n }\r\n }\r\n return gtagWrapper;\r\n}\r\n/**\r\n * Creates global gtag function or wraps existing one if found.\r\n * This wrapped function attaches Firebase instance ID (FID) to gtag \'config\' and\r\n * \'event\' calls that belong to the GAID associated with this Firebase instance.\r\n *\r\n * @param initializationPromisesMap Map of appIds to their initialization promises.\r\n * @param dynamicConfigPromisesList Array of dynamic config fetch promises.\r\n * @param measurementIdToAppId Map of GA measurementIDs to corresponding Firebase appId.\r\n * @param dataLayerName Name of global GA datalayer array.\r\n * @param gtagFunctionName Name of global gtag function ("gtag" if not user-specified).\r\n */\r\nfunction wrapOrCreateGtag(initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId, dataLayerName, gtagFunctionName) {\r\n // Create a basic core gtag function\r\n let gtagCore = function (..._args) {\r\n // Must push IArguments object, not an array.\r\n window[dataLayerName].push(arguments);\r\n };\r\n // Replace it with existing one if found\r\n if (window[gtagFunctionName] &&\r\n typeof window[gtagFunctionName] === \'function\') {\r\n // @ts-ignore\r\n gtagCore = window[gtagFunctionName];\r\n }\r\n window[gtagFunctionName] = wrapGtag(gtagCore, initializationPromisesMap, dynamicConfigPromisesList, measurementIdToAppId);\r\n return {\r\n gtagCore,\r\n wrappedGtag: window[gtagFunctionName]\r\n };\r\n}\r\n/**\r\n * Returns the script tag in the DOM matching both the gtag url pattern\r\n * and the provided data layer name.\r\n */\r\nfunction findGtagScriptOnPage(dataLayerName) {\r\n const scriptTags = window.document.getElementsByTagName(\'script\');\r\n for (const tag of Object.values(scriptTags)) {\r\n if (tag.src &&\r\n tag.src.includes(GTAG_URL) &&\r\n tag.src.includes(dataLayerName)) {\r\n return tag;\r\n }\r\n }\r\n return null;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Backoff factor for 503 errors, which we want to be conservative about\r\n * to avoid overloading servers. Each retry interval will be\r\n * BASE_INTERVAL_MILLIS * LONG_RETRY_FACTOR ^ retryCount, so the second one\r\n * will be ~30 seconds (with fuzzing).\r\n */\r\nconst LONG_RETRY_FACTOR = 30;\r\n/**\r\n * Base wait interval to multiplied by backoffFactor^backoffCount.\r\n */\r\nconst BASE_INTERVAL_MILLIS = 1000;\r\n/**\r\n * Stubbable retry data storage class.\r\n */\r\nclass RetryData {\r\n constructor(throttleMetadata = {}, intervalMillis = BASE_INTERVAL_MILLIS) {\r\n this.throttleMetadata = throttleMetadata;\r\n this.intervalMillis = intervalMillis;\r\n }\r\n getThrottleMetadata(appId) {\r\n return this.throttleMetadata[appId];\r\n }\r\n setThrottleMetadata(appId, metadata) {\r\n this.throttleMetadata[appId] = metadata;\r\n }\r\n deleteThrottleMetadata(appId) {\r\n delete this.throttleMetadata[appId];\r\n }\r\n}\r\nconst defaultRetryData = new RetryData();\r\n/**\r\n * Set GET request headers.\r\n * @param apiKey App API key.\r\n */\r\nfunction getHeaders(apiKey) {\r\n return new Headers({\r\n Accept: \'application/json\',\r\n \'x-goog-api-key\': apiKey\r\n });\r\n}\r\n/**\r\n * Fetches dynamic config from backend.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfig(appFields) {\r\n var _a;\r\n const { appId, apiKey } = appFields;\r\n const request = {\r\n method: \'GET\',\r\n headers: getHeaders(apiKey)\r\n };\r\n const appUrl = DYNAMIC_CONFIG_URL.replace(\'{app-id}\', appId);\r\n const response = await fetch(appUrl, request);\r\n if (response.status !== 200 && response.status !== 304) {\r\n let errorMessage = \'\';\r\n try {\r\n // Try to get any error message text from server response.\r\n const jsonResponse = (await response.json());\r\n if ((_a = jsonResponse.error) === null || _a === void 0 ? void 0 : _a.message) {\r\n errorMessage = jsonResponse.error.message;\r\n }\r\n }\r\n catch (_ignored) { }\r\n throw ERROR_FACTORY.create("config-fetch-failed" /* AnalyticsError.CONFIG_FETCH_FAILED */, {\r\n httpStatus: response.status,\r\n responseMessage: errorMessage\r\n });\r\n }\r\n return response.json();\r\n}\r\n/**\r\n * Fetches dynamic config from backend, retrying if failed.\r\n * @param app Firebase app to fetch config for.\r\n */\r\nasync function fetchDynamicConfigWithRetry(app, \r\n// retryData and timeoutMillis are parameterized to allow passing a different value for testing.\r\nretryData = defaultRetryData, timeoutMillis) {\r\n const { appId, apiKey, measurementId } = app.options;\r\n if (!appId) {\r\n throw ERROR_FACTORY.create("no-app-id" /* AnalyticsError.NO_APP_ID */);\r\n }\r\n if (!apiKey) {\r\n if (measurementId) {\r\n return {\r\n measurementId,\r\n appId\r\n };\r\n }\r\n throw ERROR_FACTORY.create("no-api-key" /* AnalyticsError.NO_API_KEY */);\r\n }\r\n const throttleMetadata = retryData.getThrottleMetadata(appId) || {\r\n backoffCount: 0,\r\n throttleEndTimeMillis: Date.now()\r\n };\r\n const signal = new AnalyticsAbortSignal();\r\n setTimeout(async () => {\r\n // Note a very low delay, eg < 10ms, can elapse before listeners are initialized.\r\n signal.abort();\r\n }, timeoutMillis !== undefined ? timeoutMillis : FETCH_TIMEOUT_MILLIS);\r\n return attemptFetchDynamicConfigWithRetry({ appId, apiKey, measurementId }, throttleMetadata, signal, retryData);\r\n}\r\n/**\r\n * Runs one retry attempt.\r\n * @param appFields Necessary app config fields.\r\n * @param throttleMetadata Ongoing metadata to determine throttling times.\r\n * @param signal Abort signal.\r\n */\r\nasync function attemptFetchDynamicConfigWithRetry(appFields, { throttleEndTimeMillis, backoffCount }, signal, retryData = defaultRetryData // for testing\r\n) {\r\n var _a;\r\n const { appId, measurementId } = appFields;\r\n // Starts with a (potentially zero) timeout to support resumption from stored state.\r\n // Ensures the throttle end time is honored if the last attempt timed out.\r\n // Note the SDK will never make a request if the fetch timeout expires at this point.\r\n try {\r\n await setAbortableTimeout(signal, throttleEndTimeMillis);\r\n }\r\n catch (e) {\r\n if (measurementId) {\r\n logger.warn(`Timed out fetching this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${e === null || e === void 0 ? void 0 : e.message}]`);\r\n return { appId, measurementId };\r\n }\r\n throw e;\r\n }\r\n try {\r\n const response = await fetchDynamicConfig(appFields);\r\n // Note the SDK only clears throttle state if response is success or non-retriable.\r\n retryData.deleteThrottleMetadata(appId);\r\n return response;\r\n }\r\n catch (e) {\r\n const error = e;\r\n if (!isRetriableError(error)) {\r\n retryData.deleteThrottleMetadata(appId);\r\n if (measurementId) {\r\n logger.warn(`Failed to fetch this Firebase app\'s measurement ID from the server.` +\r\n ` Falling back to the measurement ID ${measurementId}` +\r\n ` provided in the "measurementId" field in the local Firebase config. [${error === null || error === void 0 ? void 0 : error.message}]`);\r\n return { appId, measurementId };\r\n }\r\n else {\r\n throw e;\r\n }\r\n }\r\n const backoffMillis = Number((_a = error === null || error === void 0 ? void 0 : error.customData) === null || _a === void 0 ? void 0 : _a.httpStatus) === 503\r\n ? Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis, LONG_RETRY_FACTOR)\r\n : Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["calculateBackoffMillis"])(backoffCount, retryData.intervalMillis);\r\n // Increments backoff state.\r\n const throttleMetadata = {\r\n throttleEndTimeMillis: Date.now() + backoffMillis,\r\n backoffCount: backoffCount + 1\r\n };\r\n // Persists state.\r\n retryData.setThrottleMetadata(appId, throttleMetadata);\r\n logger.debug(`Calling attemptFetch again in ${backoffMillis} millis`);\r\n return attemptFetchDynamicConfigWithRetry(appFields, throttleMetadata, signal, retryData);\r\n }\r\n}\r\n/**\r\n * Supports waiting on a backoff by:\r\n *\r\n *
    \r\n *
  • Promisifying setTimeout, so we can set a timeout in our Promise chain
  • \r\n *
  • Listening on a signal bus for abort events, just like the Fetch API
  • \r\n *
  • Failing in the same way the Fetch API fails, so timing out a live request and a throttled\r\n * request appear the same.
  • \r\n *
\r\n *\r\n *

Visible for testing.\r\n */\r\nfunction setAbortableTimeout(signal, throttleEndTimeMillis) {\r\n return new Promise((resolve, reject) => {\r\n // Derives backoff from given end time, normalizing negative numbers to zero.\r\n const backoffMillis = Math.max(throttleEndTimeMillis - Date.now(), 0);\r\n const timeout = setTimeout(resolve, backoffMillis);\r\n // Adds listener, rather than sets onabort, because signal is a shared object.\r\n signal.addEventListener(() => {\r\n clearTimeout(timeout);\r\n // If the request completes before this timeout, the rejection has no effect.\r\n reject(ERROR_FACTORY.create("fetch-throttle" /* AnalyticsError.FETCH_THROTTLE */, {\r\n throttleEndTimeMillis\r\n }));\r\n });\r\n });\r\n}\r\n/**\r\n * Returns true if the {@link Error} indicates a fetch request may succeed later.\r\n */\r\nfunction isRetriableError(e) {\r\n if (!(e instanceof _firebase_util__WEBPACK_IMPORTED_MODULE_2__["FirebaseError"]) || !e.customData) {\r\n return false;\r\n }\r\n // Uses string index defined by ErrorData, which FirebaseError implements.\r\n const httpStatus = Number(e.customData[\'httpStatus\']);\r\n return (httpStatus === 429 ||\r\n httpStatus === 500 ||\r\n httpStatus === 503 ||\r\n httpStatus === 504);\r\n}\r\n/**\r\n * Shims a minimal AbortSignal (copied from Remote Config).\r\n *\r\n *

AbortController\'s AbortSignal conveniently decouples fetch timeout logic from other aspects\r\n * of networking, such as retries. Firebase doesn\'t use AbortController enough to justify a\r\n * polyfill recommendation, like we do with the Fetch API, but this minimal shim can easily be\r\n * swapped out if/when we do.\r\n */\r\nclass AnalyticsAbortSignal {\r\n constructor() {\r\n this.listeners = [];\r\n }\r\n addEventListener(listener) {\r\n this.listeners.push(listener);\r\n }\r\n abort() {\r\n this.listeners.forEach(listener => listener());\r\n }\r\n}\n\n/**\r\n * @license\r\n * Copyright 2019 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n/**\r\n * Event parameters to set on \'gtag\' during initialization.\r\n */\r\nlet defaultEventParametersForInit;\r\n/**\r\n * Logs an analytics event through the Firebase SDK.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param eventName Google Analytics event name, choose from standard list or use a custom string.\r\n * @param eventParams Analytics event parameters.\r\n */\r\nasync function logEvent$1(gtagFunction, initializationPromise, eventName, eventParams, options) {\r\n if (options && options.global) {\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, eventParams);\r\n return;\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n const params = Object.assign(Object.assign({}, eventParams), { \'send_to\': measurementId });\r\n gtagFunction("event" /* GtagCommand.EVENT */, eventName, params);\r\n }\r\n}\r\n/**\r\n * Set screen_name parameter for this Google Analytics ID.\r\n *\r\n * @deprecated Use {@link logEvent} with `eventName` as \'screen_view\' and add relevant `eventParams`.\r\n * See {@link https://firebase.google.com/docs/analytics/screenviews | Track Screenviews}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param screenName Screen name string to set.\r\n */\r\nasync function setCurrentScreen$1(gtagFunction, initializationPromise, screenName, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'screen_name\': screenName });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'screen_name\': screenName\r\n });\r\n }\r\n}\r\n/**\r\n * Set user_id parameter for this Google Analytics ID.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param id User ID string to set\r\n */\r\nasync function setUserId$1(gtagFunction, initializationPromise, id, options) {\r\n if (options && options.global) {\r\n gtagFunction("set" /* GtagCommand.SET */, { \'user_id\': id });\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_id\': id\r\n });\r\n }\r\n}\r\n/**\r\n * Set all other user properties other than user_id and screen_name.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n * @param properties Map of user properties to set\r\n */\r\nasync function setUserProperties$1(gtagFunction, initializationPromise, properties, options) {\r\n if (options && options.global) {\r\n const flatProperties = {};\r\n for (const key of Object.keys(properties)) {\r\n // use dot notation for merge behavior in gtag.js\r\n flatProperties[`user_properties.${key}`] = properties[key];\r\n }\r\n gtagFunction("set" /* GtagCommand.SET */, flatProperties);\r\n return Promise.resolve();\r\n }\r\n else {\r\n const measurementId = await initializationPromise;\r\n gtagFunction("config" /* GtagCommand.CONFIG */, measurementId, {\r\n update: true,\r\n \'user_properties\': properties\r\n });\r\n }\r\n}\r\n/**\r\n * Retrieves a unique Google Analytics identifier for the web client.\r\n * See {@link https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id | client_id}.\r\n *\r\n * @param gtagFunction Wrapped gtag function that waits for fid to be set before sending an event\r\n */\r\nasync function internalGetGoogleAnalyticsClientId(gtagFunction, initializationPromise) {\r\n const measurementId = await initializationPromise;\r\n return new Promise((resolve, reject) => {\r\n gtagFunction("get" /* GtagCommand.GET */, measurementId, \'client_id\', (clientId) => {\r\n if (!clientId) {\r\n reject(ERROR_FACTORY.create("no-client-id" /* AnalyticsError.NO_CLIENT_ID */));\r\n }\r\n resolve(clientId);\r\n });\r\n });\r\n}\r\n/**\r\n * Set whether collection is enabled for this ID.\r\n *\r\n * @param enabled If true, collection is enabled for this ID.\r\n */\r\nasync function setAnalyticsCollectionEnabled$1(initializationPromise, enabled) {\r\n const measurementId = await initializationPromise;\r\n window[`ga-disable-${measurementId}`] = !enabled;\r\n}\r\n/**\r\n * Consent parameters to default to during \'gtag\' initialization.\r\n */\r\nlet defaultConsentSettingsForInit;\r\n/**\r\n * Sets the variable {@link defaultConsentSettingsForInit} for use in the initialization of\r\n * analytics.\r\n *\r\n * @param consentSettings Maps the applicable end user consent state for gtag.js.\r\n */\r\nfunction _setConsentDefaultForInit(consentSettings) {\r\n defaultConsentSettingsForInit = consentSettings;\r\n}\r\n/**\r\n * Sets the variable `defaultEventParametersForInit` for use in the initialization of\r\n * analytics.\r\n *\r\n * @param customParams Any custom params the user may pass to gtag.js.\r\n */\r\nfunction _setDefaultEventParametersForInit(customParams) {\r\n defaultEventParametersForInit = customParams;\r\n}\n\n/**\r\n * @license\r\n * Copyright 2020 Google LLC\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the "License");\r\n * you may not use this file except in compliance with the License.\r\n * You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\nasync function validateIndexedDB() {\r\n if (!Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["isIndexedDBAvailable"])()) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: \'IndexedDB is not available in this environment.\'\r\n }).message);\r\n return false;\r\n }\r\n else {\r\n try {\r\n await Object(_firebase_util__WEBPACK_IMPORTED_MODULE_2__["validateIndexedDBOpenable"])();\r\n }\r\n catch (e) {\r\n logger.warn(ERROR_FACTORY.create("indexeddb-unavailable" /* AnalyticsError.INDEXEDDB_UNAVAILABLE */, {\r\n errorInfo: e === null || e === void 0 ? void 0 : e.toString()\r\n }).message);\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n/**\r\n * Initialize the analytics instance in gtag.js by calling config command with fid.\r\n *\r\n * NOTE: We combine analytics initialization and setting fid together because we want fid to be\r\n * part of the `page_view` event that\'s sent during the initialization\r\n * @param app Firebase app\r\n * @param gtagCore The gtag function that\'s not wrapped.\r\n * @param dynamicConfigPromisesList Array of all dynamic config promises.\r\n * @param measurementIdToAppId Maps measurementID to appID.\r\n * @param installations _FirebaseInstallationsInternal instance.\r\n *\r\n * @returns Measurement ID.\r\n */\r\nasync function _initializeAnalytics(app, dynamicConfigPromisesList, measurementIdToAppId, installations, gtagCore, dataLayerName, options) {\r\n var _a;\r\n const dynamicConfigPromise = fetchDynamicConfigWithRetry(app);\r\n // Once fetched, map measurementIds to appId, for ease of lookup in wrapped gtag function.\r\n dynamicConfigPromise\r\n .then(config => {\r\n measurementIdToAppId[config.measurementId] = config.appId;\r\n if (app.options.measurementId &&\r\n config.measurementId !== app.options.measurementId) {\r\n logger.warn(`The measurement ID in the local Firebase config (${app.options.measurementId})` +\r\n ` does not match the measurement ID fetched from the server (${config.measurementId}).` +\r\n ` To ensure analytics events are always sent to the correct Analytics property,` +\r\n ` update the` +\r\n ` measurement ID field in the local config or remove it from the local config.`);\r\n }\r\n })\r\n .catch(e => logger.error(e));\r\n // Add to list to track state of all dynamic config promises.\r\n dynamicConfigPromisesList.push(dynamicConfigPromise);\r\n const fidPromise = validateIndexedDB().then(envIsValid => {\r\n if (envIsValid) {\r\n return installations.getId();\r\n }\r\n else {\r\n return undefined;\r\n }\r\n });\r\n const [dynamicConfig, fid] = await Promise.all([\r\n dynamicConfigPromise,\r\n fidPromise\r\n ]);\r\n // Detect if user has already put the gtag + + + FlyingPlane @@ -38,8 +40,6 @@

- - - + diff --git a/cordova/www/vendor.0909a17fa1f4ba2383c9.js b/cordova/www/vendor.0909a17fa1f4ba2383c9.js deleted file mode 100644 index 976ddc9..0000000 --- a/cordova/www/vendor.0909a17fa1f4ba2383c9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see vendor.0909a17fa1f4ba2383c9.js.LICENSE */ -!function(e){var r={};function n(t){if(r[t])return r[t].exports;var a=r[t]={i:t,l:!1,exports:{}};return e[t].call(a.exports,a,a.exports,n),a.l=!0,a.exports}n.m=e,n.c=r,n.d=function(e,r,t){if(!n.o(e,r))Object.defineProperty(e,r,{enumerable:!0,get:t})},n.r=function(e){if("undefined"!=typeof Symbol&&Symbol.toStringTag)Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,r){if(1&r)e=n(e);if(8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(n.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var a in e)n.d(t,a,function(r){return e[r]}.bind(null,a));return t},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},n.p="",n(n.s=1)}({"./node_modules/eventemitter3/index.js":function(module,exports,__webpack_require__){"use strict";eval("\n\nvar has = Object.prototype.hasOwnProperty\n , prefix = '~';\n\n/**\n * Constructor to create a storage for our `EE` objects.\n * An `Events` instance is a plain object whose properties are event names.\n *\n * @constructor\n * @private\n */\nfunction Events() {}\n\n//\n// We try to not inherit from `Object.prototype`. In some engines creating an\n// instance in this way is faster than calling `Object.create(null)` directly.\n// If `Object.create(null)` is not supported we prefix the event names with a\n// character to make sure that the built-in object properties are not\n// overridden or used as an attack vector.\n//\nif (Object.create) {\n Events.prototype = Object.create(null);\n\n //\n // This hack is needed because the `__proto__` property is still inherited in\n // some old browsers like Android 4, iPhone 5.1, Opera 11 and Safari 5.\n //\n if (!new Events().__proto__) prefix = false;\n}\n\n/**\n * Representation of a single event listener.\n *\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} [once=false] Specify if the listener is a one-time listener.\n * @constructor\n * @private\n */\nfunction EE(fn, context, once) {\n this.fn = fn;\n this.context = context;\n this.once = once || false;\n}\n\n/**\n * Add a listener for a given event.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} context The context to invoke the listener with.\n * @param {Boolean} once Specify if the listener is a one-time listener.\n * @returns {EventEmitter}\n * @private\n */\nfunction addListener(emitter, event, fn, context, once) {\n if (typeof fn !== 'function') {\n throw new TypeError('The listener must be a function');\n }\n\n var listener = new EE(fn, context || emitter, once)\n , evt = prefix ? prefix + event : event;\n\n if (!emitter._events[evt]) emitter._events[evt] = listener, emitter._eventsCount++;\n else if (!emitter._events[evt].fn) emitter._events[evt].push(listener);\n else emitter._events[evt] = [emitter._events[evt], listener];\n\n return emitter;\n}\n\n/**\n * Clear event by name.\n *\n * @param {EventEmitter} emitter Reference to the `EventEmitter` instance.\n * @param {(String|Symbol)} evt The Event name.\n * @private\n */\nfunction clearEvent(emitter, evt) {\n if (--emitter._eventsCount === 0) emitter._events = new Events();\n else delete emitter._events[evt];\n}\n\n/**\n * Minimal `EventEmitter` interface that is molded against the Node.js\n * `EventEmitter` interface.\n *\n * @constructor\n * @public\n */\nfunction EventEmitter() {\n this._events = new Events();\n this._eventsCount = 0;\n}\n\n/**\n * Return an array listing the events for which the emitter has registered\n * listeners.\n *\n * @returns {Array}\n * @public\n */\nEventEmitter.prototype.eventNames = function eventNames() {\n var names = []\n , events\n , name;\n\n if (this._eventsCount === 0) return names;\n\n for (name in (events = this._events)) {\n if (has.call(events, name)) names.push(prefix ? name.slice(1) : name);\n }\n\n if (Object.getOwnPropertySymbols) {\n return names.concat(Object.getOwnPropertySymbols(events));\n }\n\n return names;\n};\n\n/**\n * Return the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Array} The registered listeners.\n * @public\n */\nEventEmitter.prototype.listeners = function listeners(event) {\n var evt = prefix ? prefix + event : event\n , handlers = this._events[evt];\n\n if (!handlers) return [];\n if (handlers.fn) return [handlers.fn];\n\n for (var i = 0, l = handlers.length, ee = new Array(l); i < l; i++) {\n ee[i] = handlers[i].fn;\n }\n\n return ee;\n};\n\n/**\n * Return the number of listeners listening to a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Number} The number of listeners.\n * @public\n */\nEventEmitter.prototype.listenerCount = function listenerCount(event) {\n var evt = prefix ? prefix + event : event\n , listeners = this._events[evt];\n\n if (!listeners) return 0;\n if (listeners.fn) return 1;\n return listeners.length;\n};\n\n/**\n * Calls each of the listeners registered for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @returns {Boolean} `true` if the event had listeners, else `false`.\n * @public\n */\nEventEmitter.prototype.emit = function emit(event, a1, a2, a3, a4, a5) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return false;\n\n var listeners = this._events[evt]\n , len = arguments.length\n , args\n , i;\n\n if (listeners.fn) {\n if (listeners.once) this.removeListener(event, listeners.fn, undefined, true);\n\n switch (len) {\n case 1: return listeners.fn.call(listeners.context), true;\n case 2: return listeners.fn.call(listeners.context, a1), true;\n case 3: return listeners.fn.call(listeners.context, a1, a2), true;\n case 4: return listeners.fn.call(listeners.context, a1, a2, a3), true;\n case 5: return listeners.fn.call(listeners.context, a1, a2, a3, a4), true;\n case 6: return listeners.fn.call(listeners.context, a1, a2, a3, a4, a5), true;\n }\n\n for (i = 1, args = new Array(len -1); i < len; i++) {\n args[i - 1] = arguments[i];\n }\n\n listeners.fn.apply(listeners.context, args);\n } else {\n var length = listeners.length\n , j;\n\n for (i = 0; i < length; i++) {\n if (listeners[i].once) this.removeListener(event, listeners[i].fn, undefined, true);\n\n switch (len) {\n case 1: listeners[i].fn.call(listeners[i].context); break;\n case 2: listeners[i].fn.call(listeners[i].context, a1); break;\n case 3: listeners[i].fn.call(listeners[i].context, a1, a2); break;\n case 4: listeners[i].fn.call(listeners[i].context, a1, a2, a3); break;\n default:\n if (!args) for (j = 1, args = new Array(len -1); j < len; j++) {\n args[j - 1] = arguments[j];\n }\n\n listeners[i].fn.apply(listeners[i].context, args);\n }\n }\n }\n\n return true;\n};\n\n/**\n * Add a listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.on = function on(event, fn, context) {\n return addListener(this, event, fn, context, false);\n};\n\n/**\n * Add a one-time listener for a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn The listener function.\n * @param {*} [context=this] The context to invoke the listener with.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.once = function once(event, fn, context) {\n return addListener(this, event, fn, context, true);\n};\n\n/**\n * Remove the listeners of a given event.\n *\n * @param {(String|Symbol)} event The event name.\n * @param {Function} fn Only remove the listeners that match this function.\n * @param {*} context Only remove the listeners that have this context.\n * @param {Boolean} once Only remove one-time listeners.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeListener = function removeListener(event, fn, context, once) {\n var evt = prefix ? prefix + event : event;\n\n if (!this._events[evt]) return this;\n if (!fn) {\n clearEvent(this, evt);\n return this;\n }\n\n var listeners = this._events[evt];\n\n if (listeners.fn) {\n if (\n listeners.fn === fn &&\n (!once || listeners.once) &&\n (!context || listeners.context === context)\n ) {\n clearEvent(this, evt);\n }\n } else {\n for (var i = 0, events = [], length = listeners.length; i < length; i++) {\n if (\n listeners[i].fn !== fn ||\n (once && !listeners[i].once) ||\n (context && listeners[i].context !== context)\n ) {\n events.push(listeners[i]);\n }\n }\n\n //\n // Reset the array, or remove it completely if we have no more listeners.\n //\n if (events.length) this._events[evt] = events.length === 1 ? events[0] : events;\n else clearEvent(this, evt);\n }\n\n return this;\n};\n\n/**\n * Remove all listeners, or those of the specified event.\n *\n * @param {(String|Symbol)} [event] The event name.\n * @returns {EventEmitter} `this`.\n * @public\n */\nEventEmitter.prototype.removeAllListeners = function removeAllListeners(event) {\n var evt;\n\n if (event) {\n evt = prefix ? prefix + event : event;\n if (this._events[evt]) clearEvent(this, evt);\n } else {\n this._events = new Events();\n this._eventsCount = 0;\n }\n\n return this;\n};\n\n//\n// Alias methods names because people roll like that.\n//\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\nEventEmitter.prototype.addListener = EventEmitter.prototype.on;\n\n//\n// Expose the prefix.\n//\nEventEmitter.prefixed = prefix;\n\n//\n// Allow `EventEmitter` to be imported as module namespace.\n//\nEventEmitter.EventEmitter = EventEmitter;\n\n//\n// Expose the module.\n//\nif (true) {\n module.exports = EventEmitter;\n}\n\n\n//# sourceURL=webpack:///./node_modules/eventemitter3/index.js?")},"./node_modules/phaser/plugins/camera3d/src/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Matrix4 = __webpack_require__(/*! ../../../src/math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar RandomXYZ = __webpack_require__(/*! ../../../src/math/RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js");\r\nvar RandomXYZW = __webpack_require__(/*! ../../../src/math/RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js");\r\nvar RotateVec3 = __webpack_require__(/*! ../../../src/math/RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js");\r\nvar Set = __webpack_require__(/*! ../../../src/structs/Set */ "./node_modules/phaser/src/structs/Set.js");\r\nvar Sprite3D = __webpack_require__(/*! ./sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\nvar tmpVec4 = new Vector4();\r\nvar dirvec = new Vector3();\r\nvar rightvec = new Vector3();\r\nvar billboardMatrix = new Matrix4();\r\n\r\n// @author attribute https://github.com/mattdesl/cam3d/wiki\r\n\r\n/**\r\n * @typedef {object} RayDef\r\n *\r\n * @property {Phaser.Math.Vector3} origin - [description]\r\n * @property {Phaser.Math.Vector3} direction - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar Camera = new Class({\r\n\r\n initialize:\r\n\r\n function Camera (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList = scene.sys.displayList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList = scene.sys.updateList;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#direction\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.direction = new Vector3(0, 0, -1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#up\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.up = new Vector3(0, 1, 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#position\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector3();\r\n\r\n\r\n /**\r\n * The mapping from 3D size units to pixels.\r\n * In the default case 1 3D unit = 128 pixels. So a sprite that is\r\n * 256 x 128 px in size will be 2 x 1 units.\r\n * Change to whatever best fits your game assets.\r\n *\r\n * @name Phaser.Cameras.Sprite3D#pixelScale\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelScale = 128;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#projection\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.projection = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#view\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.view = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#combined\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.combined = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#invProjectionView\r\n * @type {Phaser.Math.Matrix4}\r\n * @since 3.0.0\r\n */\r\n this.invProjectionView = new Matrix4();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#near\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.near = 1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#far\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.far = 100;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#ray\r\n * @type {RayDef}\r\n * @since 3.0.0\r\n */\r\n this.ray = {\r\n origin: new Vector3(),\r\n direction: new Vector3()\r\n };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#viewportHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#billboardMatrixDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.billboardMatrixDirty = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPosition: function (x, y, z)\r\n {\r\n this.position.set(x, y, z);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setScene: function (scene)\r\n {\r\n this.scene = scene;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setPixelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setPixelScale: function (value)\r\n {\r\n this.pixelScale = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite3D} sprite3D - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n add: function (sprite3D)\r\n {\r\n this.children.set(sprite3D);\r\n\r\n this.displayList.add(sprite3D.gameObject);\r\n this.updateList.add(sprite3D.gameObject);\r\n\r\n this.updateChildren();\r\n\r\n return sprite3D;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n remove: function (child)\r\n {\r\n this.displayList.remove(child.gameObject);\r\n this.updateList.remove(child.gameObject);\r\n\r\n this.children.delete(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n clear: function ()\r\n {\r\n var children = this.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.remove(children[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {array} [description]\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} [description]\r\n */\r\n create: function (x, y, z, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var child = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n this.updateChildren();\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {number} quantity - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} frame - [description]\r\n * @param {boolean} [visible=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createMultiple: function (quantity, key, frame, visible)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var child = new Sprite3D(this.scene, 0, 0, 0, key, frame);\r\n\r\n this.displayList.add(child.gameObject);\r\n this.updateList.add(child.gameObject);\r\n\r\n child.visible = visible;\r\n\r\n this.children.set(child);\r\n\r\n output.push(child);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n // Create a bunch of Sprite3D objects in a rectangle\r\n // size and spacing are Vec3s (or if integers are converted to vec3s)\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#createRect\r\n * @since 3.0.0\r\n *\r\n * @param {(number|{x:number,y:number})} size - [description]\r\n * @param {(number|{x:number,y:number,z:number})} spacing - [description]\r\n * @param {string} key - [description]\r\n * @param {(string|number)} [frame] - [description]\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D[]} [description]\r\n */\r\n createRect: function (size, spacing, key, frame)\r\n {\r\n if (typeof size === \'number\') { size = { x: size, y: size, z: size }; }\r\n if (typeof spacing === \'number\') { spacing = { x: spacing, y: spacing, z: spacing }; }\r\n\r\n var quantity = size.x * size.y * size.z;\r\n\r\n var sprites = this.createMultiple(quantity, key, frame);\r\n\r\n var i = 0;\r\n\r\n for (var z = 0.5 - (size.z / 2); z < (size.z / 2); z++)\r\n {\r\n for (var y = 0.5 - (size.y / 2); y < (size.y / 2); y++)\r\n {\r\n for (var x = 0.5 - (size.x / 2); x < (size.x / 2); x++)\r\n {\r\n var bx = (x * spacing.x);\r\n var by = (y * spacing.y);\r\n var bz = (z * spacing.z);\r\n\r\n sprites[i].position.set(bx, by, bz);\r\n\r\n i++;\r\n }\r\n }\r\n }\r\n\r\n this.update();\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomSphere\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radius=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomSphere: function (radius, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZ(sprites[i].position, radius);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#randomCube\r\n * @since 3.0.0\r\n *\r\n * @param {number} [scale=1] - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} [sprites] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n randomCube: function (scale, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n RandomXYZW(sprites[i].position, scale);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translateChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translateChildren: function (vec3, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.add(vec3);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#transformChildren\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat4 - [description]\r\n * @param {Phaser.GameObjects.Sprite3D[]} sprites - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n transformChildren: function (mat4, sprites)\r\n {\r\n if (sprites === undefined) { sprites = this.getChildren(); }\r\n\r\n for (var i = 0; i < sprites.length; i++)\r\n {\r\n sprites[i].position.transformMat4(mat4);\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Sets the width and height of the viewport. Does not update any matrices.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setViewport: function (width, height)\r\n {\r\n this.viewportWidth = width;\r\n this.viewportHeight = height;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Translates this camera by a specified Vector3 object\r\n * or x, y, z parameters. Any undefined x y z values will\r\n * default to zero, leaving that component unaffected.\r\n * If you wish to set the camera position directly call setPosition instead.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n translate: function (x, y, z)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.position.x += x.x || 0;\r\n this.position.y += x.y || 0;\r\n this.position.z += x.z || 0;\r\n }\r\n else\r\n {\r\n this.position.x += x || 0;\r\n this.position.y += y || 0;\r\n this.position.z += z || 0;\r\n }\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - [description]\r\n * @param {number} [y] - [description]\r\n * @param {number} [z] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n lookAt: function (x, y, z)\r\n {\r\n var dir = this.direction;\r\n var up = this.up;\r\n\r\n if (typeof x === \'object\')\r\n {\r\n dir.copy(x);\r\n }\r\n else\r\n {\r\n dir.set(x, y, z);\r\n }\r\n\r\n dir.subtract(this.position).normalize();\r\n\r\n // Calculate right vector\r\n tmpVec3.copy(dir).cross(up).normalize();\r\n\r\n // Calculate up vector\r\n up.copy(tmpVec3).cross(dir).normalize();\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotate: function (radians, axis)\r\n {\r\n RotateVec3(this.direction, axis, radians);\r\n RotateVec3(this.up, axis, radians);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#rotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} point - [description]\r\n * @param {number} radians - [description]\r\n * @param {Phaser.Math.Vector3} axis - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n rotateAround: function (point, radians, axis)\r\n {\r\n tmpVec3.copy(point).subtract(this.position);\r\n\r\n this.translate(tmpVec3);\r\n this.rotate(radians, axis);\r\n this.translate(tmpVec3.negate());\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - [description]\r\n * @param {Phaser.Math.Vector4} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector4} [description]\r\n */\r\n project: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector4(); }\r\n\r\n // TODO: support viewport XY\r\n var viewportWidth = this.viewportWidth;\r\n var viewportHeight = this.viewportHeight;\r\n var n = Camera.NEAR_RANGE;\r\n var f = Camera.FAR_RANGE;\r\n\r\n // For useful Z and W values we should do the usual steps: clip space -> NDC -> window coords\r\n\r\n // Implicit 1.0 for w component\r\n tmpVec4.set(vec.x, vec.y, vec.z, 1.0);\r\n\r\n // Transform into clip space\r\n tmpVec4.transformMat4(this.combined);\r\n\r\n // Avoid divide by zero when 0x0x0 camera projects to a 0x0x0 vec3\r\n if (tmpVec4.w === 0)\r\n {\r\n tmpVec4.w = 1;\r\n }\r\n\r\n // Now into NDC\r\n tmpVec4.x = tmpVec4.x / tmpVec4.w;\r\n tmpVec4.y = tmpVec4.y / tmpVec4.w;\r\n tmpVec4.z = tmpVec4.z / tmpVec4.w;\r\n\r\n // And finally into window coordinates\r\n out.x = viewportWidth / 2 * tmpVec4.x + (0 + viewportWidth / 2);\r\n out.y = viewportHeight / 2 * tmpVec4.y + (0 + viewportHeight / 2);\r\n out.z = (f - n) / 2 * tmpVec4.z + (f + n) / 2;\r\n\r\n // If the out vector has a fourth component, we also store (1/clip.w), same idea as gl_FragCoord.w\r\n if (out.w === 0 || out.w)\r\n {\r\n out.w = 1 / tmpVec4.w;\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec - [description]\r\n * @param {Phaser.Math.Vector3} out - [description]\r\n *\r\n * @return {Phaser.Math.Vector3} [description]\r\n */\r\n unproject: function (vec, out)\r\n {\r\n if (out === undefined) { out = new Vector3(); }\r\n\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n\r\n return out.copy(vec).unproject(viewport, this.invProjectionView);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPickRay\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {RayDef} [description]\r\n */\r\n getPickRay: function (x, y)\r\n {\r\n var origin = this.ray.origin.set(x, y, 0);\r\n var direction = this.ray.direction.set(x, y, 1);\r\n var viewport = tmpVec4.set(0, 0, this.viewportWidth, this.viewportHeight);\r\n var mtx = this.invProjectionView;\r\n\r\n origin.unproject(viewport, mtx);\r\n\r\n direction.unproject(viewport, mtx);\r\n\r\n direction.subtract(origin).normalize();\r\n\r\n return this.ray;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n updateChildren: function ()\r\n {\r\n var children = this.children.entries;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].project(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n // Overriden by subclasses\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n update: function ()\r\n {\r\n return this.updateChildren();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#updateBillboardMatrix\r\n * @since 3.0.0\r\n */\r\n updateBillboardMatrix: function ()\r\n {\r\n var dir = dirvec.set(this.direction).negate();\r\n\r\n // Better view-aligned billboards might use this:\r\n // var dir = tmp.set(camera.position).subtract(p).normalize();\r\n\r\n var right = rightvec.set(this.up).cross(dir).normalize();\r\n var up = tmpVec3.set(dir).cross(right).normalize();\r\n\r\n var out = billboardMatrix.val;\r\n\r\n out[0] = right.x;\r\n out[1] = right.y;\r\n out[2] = right.z;\r\n out[3] = 0;\r\n\r\n out[4] = up.x;\r\n out[5] = up.y;\r\n out[6] = up.z;\r\n out[7] = 0;\r\n\r\n out[8] = dir.x;\r\n out[9] = dir.y;\r\n out[10] = dir.z;\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n this.billboardMatrixDirty = false;\r\n },\r\n\r\n /**\r\n * This is a utility function for canvas 3D rendering,\r\n * which determines the "point size" of a camera-facing\r\n * sprite billboard given its 3D world position\r\n * (origin at center of sprite) and its world width\r\n * and height in x/y.\r\n *\r\n * We place into the output Vector2 the scaled width\r\n * and height. If no `out` is specified, a new Vector2\r\n * will be created for convenience (this should be avoided\r\n * in tight loops).\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#getPointSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vec - The position of the 3D Sprite.\r\n * @param {Phaser.Math.Vector2} size - The x and y dimensions.\r\n * @param {Phaser.Math.Vector2} out - The result, scaled x and y dimensions.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointSize: function (vec, size, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n // TODO: optimize this with a simple distance calculation:\r\n // https://developer.valvesoftware.com/wiki/Field_of_View\r\n\r\n if (this.billboardMatrixDirty)\r\n {\r\n this.updateBillboardMatrix();\r\n }\r\n\r\n var tmp = tmpVec3;\r\n\r\n var dx = (size.x / this.pixelScale) / 2;\r\n var dy = (size.y / this.pixelScale) / 2;\r\n\r\n tmp.set(-dx, -dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var tlx = tmp.x;\r\n var tly = tmp.y;\r\n\r\n tmp.set(dx, dy, 0).transformMat4(billboardMatrix).add(vec);\r\n\r\n this.project(tmp, tmp);\r\n\r\n var brx = tmp.x;\r\n var bry = tmp.y;\r\n\r\n // var w = Math.abs(brx - tlx);\r\n // var h = Math.abs(bry - tly);\r\n\r\n // Allow the projection to get negative ...\r\n var w = brx - tlx;\r\n var h = bry - tly;\r\n\r\n return out.set(w, h);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.children.clear();\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setX: function (value)\r\n {\r\n this.position.x = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setY: function (value)\r\n {\r\n this.position.y = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.Camera#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.Camera} This Camera object.\r\n */\r\n setZ: function (value)\r\n {\r\n this.position.z = value;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n this.update();\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.Camera#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nCamera.FAR_RANGE = 1.0;\r\nCamera.NEAR_RANGE = 0.0;\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/Camera.js?')},"./node_modules/phaser/plugins/camera3d/src/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar OrthographicCamera = __webpack_require__(/*! ./OrthographicCamera */ \"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js\");\r\nvar PerspectiveCamera = __webpack_require__(/*! ./PerspectiveCamera */ \"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../../src/plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CameraManager\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Sprite3D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Sprite3D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n scene.sys.events.once('boot', this.boot, this);\r\n scene.sys.events.on('start', this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene3D.CameraManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once('destroy', this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on('update', this.update, this);\r\n eventEmitter.once('shutdown', this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n add: function (fieldOfView, width, height)\r\n {\r\n return this.addPerspectiveCamera(fieldOfView, width, height);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addOrthographicCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n addOrthographicCamera: function (width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new OrthographicCamera(this.scene, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#addPerspectiveCamera\r\n * @since 3.0.0\r\n *\r\n * @param {number} [fieldOfView=80] - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n addPerspectiveCamera: function (fieldOfView, width, height)\r\n {\r\n var config = this.scene.sys.game.config;\r\n\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (width === undefined) { width = config.width; }\r\n if (height === undefined) { height = config.height; }\r\n\r\n var camera = new PerspectiveCamera(this.scene, fieldOfView, width, height);\r\n\r\n this.cameras.push(camera);\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - [description]\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n getCamera: function (name)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n if (this.cameras[i].name === name)\r\n {\r\n return this.cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeCamera\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} camera - [description]\r\n */\r\n removeCamera: function (camera)\r\n {\r\n var cameraIndex = this.cameras.indexOf(camera);\r\n\r\n if (cameraIndex !== -1)\r\n {\r\n this.cameras.splice(cameraIndex, 1);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]\r\n */\r\n removeAll: function ()\r\n {\r\n while (this.cameras.length > 0)\r\n {\r\n var camera = this.cameras.pop();\r\n\r\n camera.destroy();\r\n }\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestep - [description]\r\n * @param {number} delta - [description]\r\n */\r\n update: function (timestep, delta)\r\n {\r\n for (var i = 0, l = this.cameras.length; i < l; ++i)\r\n {\r\n this.cameras[i].update(timestep, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off('update', this.update, this);\r\n eventEmitter.off('shutdown', this.shutdown, this);\r\n\r\n this.removeAll();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Sprite3D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off('start', this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager3D', CameraManager, 'cameras3d');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/CameraManager.js?")},"./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class OrthographicCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar OrthographicCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n initialize:\r\n\r\n function OrthographicCamera (scene, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#viewportHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._zoom = 1.0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#near\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.near = 0;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#setToOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} yDown - [description]\r\n * @param {number} [viewportWidth] - [description]\r\n * @param {number} [viewportHeight] - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n setToOrtho: function (yDown, viewportWidth, viewportHeight)\r\n {\r\n if (viewportWidth === undefined) { viewportWidth = this.viewportWidth; }\r\n if (viewportHeight === undefined) { viewportHeight = this.viewportHeight; }\r\n\r\n var zoom = this.zoom;\r\n\r\n this.up.set(0, (yDown) ? -1 : 1, 0);\r\n this.direction.set(0, 0, (yDown) ? 1 : -1);\r\n this.position.set(zoom * viewportWidth / 2, zoom * viewportHeight / 2, 0);\r\n\r\n this.viewportWidth = viewportWidth;\r\n this.viewportHeight = viewportHeight;\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.OrthographicCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.OrthographicCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var w = this.viewportWidth;\r\n var h = this.viewportHeight;\r\n var near = Math.abs(this.near);\r\n var far = Math.abs(this.far);\r\n var zoom = this.zoom;\r\n\r\n if (w === 0 || h === 0)\r\n {\r\n // What to do here... hmm?\r\n return this;\r\n }\r\n\r\n this.projection.ortho(\r\n zoom * -w / 2, zoom * w / 2,\r\n zoom * -h / 2, zoom * h / 2,\r\n near,\r\n far\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.OrthographicCamera#zoom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.update();\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = OrthographicCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ../../../src/math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\n\r\n// Local cache vars\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class PerspectiveCamera\r\n * @extends Phaser.Cameras.Sprite3D.Camera\r\n * @memberOf Phaser.Cameras.Sprite3D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n * @param {integer} [fieldOfView=80] - [description]\r\n * @param {integer} [viewportWidth=0] - [description]\r\n * @param {integer} [viewportHeight=0] - [description]\r\n */\r\nvar PerspectiveCamera = new Class({\r\n\r\n Extends: Camera,\r\n\r\n // FOV is converted to radians automatically\r\n initialize:\r\n\r\n function PerspectiveCamera (scene, fieldOfView, viewportWidth, viewportHeight)\r\n {\r\n if (fieldOfView === undefined) { fieldOfView = 80; }\r\n if (viewportWidth === undefined) { viewportWidth = 0; }\r\n if (viewportHeight === undefined) { viewportHeight = 0; }\r\n\r\n Camera.call(this, scene);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportWidth\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportWidth = viewportWidth;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#viewportHeight\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.viewportHeight = viewportHeight;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Cameras.Sprite3D.PerspectiveCamera#fieldOfView\r\n * @type {integer}\r\n * @default 80\r\n * @since 3.0.0\r\n */\r\n this.fieldOfView = fieldOfView * Math.PI / 180;\r\n\r\n this.update();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#setFOV\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n setFOV: function (value)\r\n {\r\n this.fieldOfView = value * Math.PI / 180;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Cameras.Sprite3D.PerspectiveCamera#update\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]\r\n */\r\n update: function ()\r\n {\r\n var aspect = this.viewportWidth / this.viewportHeight;\r\n\r\n // Create a perspective matrix for our camera\r\n this.projection.perspective(\r\n this.fieldOfView,\r\n aspect,\r\n Math.abs(this.near),\r\n Math.abs(this.far)\r\n );\r\n\r\n // Build the view matrix\r\n tmpVec3.copy(this.position).add(this.direction);\r\n\r\n this.view.lookAt(this.position, tmpVec3, this.up);\r\n\r\n // Projection * view matrix\r\n this.combined.copy(this.projection).multiply(this.view);\r\n\r\n // Invert combined matrix, used for unproject\r\n this.invProjectionView.copy(this.combined).invert();\r\n\r\n this.billboardMatrixDirty = true;\r\n\r\n this.updateChildren();\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PerspectiveCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js?')},"./node_modules/phaser/plugins/camera3d/src/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Sprite3D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/plugins/camera3d/src/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/plugins/camera3d/src/CameraManager.js"),\r\n OrthographicCamera: __webpack_require__(/*! ./OrthographicCamera */ "./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js"),\r\n PerspectiveCamera: __webpack_require__(/*! ./PerspectiveCamera */ "./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/index.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../../src/utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GameObject = __webpack_require__(/*! ../../../../src/gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Sprite = __webpack_require__(/*! ../../../../src/gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../../src/math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vector4 = __webpack_require__(/*! ../../../../src/math/Vector4 */ "./node_modules/phaser/src/math/Vector4.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite 3D Game Object.\r\n *\r\n * The Sprite 3D object is an encapsulation of a standard Sprite object, with additional methods to allow\r\n * it to be rendered by a 3D Camera. The Sprite can be positioned anywhere within 3D space.\r\n *\r\n * @class Sprite3D\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberOf Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The x position of this Game Object.\r\n * @param {number} y - The y position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite3D = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n initialize:\r\n\r\n function Sprite3D (scene, x, y, z, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite3D\');\r\n\r\n /**\r\n * The encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = new Sprite(scene, 0, 0, texture, frame);\r\n\r\n /**\r\n * The position of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#position\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector4(x, y, z);\r\n\r\n /**\r\n * The 2D size of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#size\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.size = new Vector2(this.gameObject.width, this.gameObject.height);\r\n\r\n /**\r\n * The 2D scale of the Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#scale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.scale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether to automatically set the horizontal scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleX\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleX = true;\r\n\r\n /**\r\n * Whether to automatically set the vertical scale of the encapsulated Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#adjustScaleY\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.adjustScaleY = true;\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#_visible\r\n * @type {boolean}\r\n * @default true\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = true;\r\n },\r\n\r\n /**\r\n * Project this Sprite onto the given 3D Camera.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Sprite3D.Camera} camera - The 3D Camera onto which to project this Sprite.\r\n */\r\n project: function (camera)\r\n {\r\n var pos = this.position;\r\n\r\n var gameObject = this.gameObject;\r\n\r\n camera.project(pos, gameObject);\r\n\r\n camera.getPointSize(pos, this.size, this.scale);\r\n\r\n if (this.scale.x <= 0 || this.scale.y <= 0)\r\n {\r\n gameObject.setVisible(false);\r\n }\r\n else\r\n {\r\n if (!gameObject.visible)\r\n {\r\n gameObject.setVisible(true);\r\n }\r\n\r\n if (this.adjustScaleX)\r\n {\r\n gameObject.scaleX = this.scale.x;\r\n }\r\n\r\n if (this.adjustScaleY)\r\n {\r\n gameObject.scaleY = this.scale.y;\r\n }\r\n\r\n gameObject.setDepth(gameObject.z * -1);\r\n }\r\n },\r\n\r\n /**\r\n * Set the visible state of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Sprite3D#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} This Sprite3D Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n *\r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.gameObject.visible = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The z position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Sprite3D#z\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n z: {\r\n\r\n get: function ()\r\n {\r\n return this.position.z;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.z = value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite3D;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../../../../src/gameobjects/BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../../src/utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite3D\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite3D(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function \'this\' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js?')},"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Sprite3D = __webpack_require__(/*! ./Sprite3D */ \"./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../../../src/gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Sprite3D Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite3D Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite3D\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object.\r\n * @param {number} y - The vertical position of this Game Object.\r\n * @param {number} z - The z position of this Game Object.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite3D} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite3D', function (x, y, z, key, frame)\r\n{\r\n var sprite = new Sprite3D(this.scene, x, y, z, key, frame);\r\n\r\n this.displayList.add(sprite.gameObject);\r\n this.updateList.add(sprite.gameObject);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js?")},"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} AdInstance\r\n *\r\n * @property {any} instance - Represents an instance of an ad.\r\n * @property {string} placementID - The Audience Network placement ID of this ad instance.\r\n * @property {boolean} shown - Has this ad already been shown in-game?\r\n * @property {boolean} video - Is this a video ad?\r\n */\r\n\r\nvar AdInstance = function (placementID, instance, video)\r\n{\r\n return {\r\n instance: instance,\r\n placementID: placementID,\r\n shown: false,\r\n video: video\r\n };\r\n};\r\n\r\nmodule.exports = AdInstance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/AdInstance.js?")},"./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js":function(module,exports,__webpack_require__){eval("/* eslint no-console: 0 */\r\n\r\n/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar AdInstance = __webpack_require__(/*! ./AdInstance */ \"./node_modules/phaser/plugins/fbinstant/src/AdInstance.js\");\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DataManager = __webpack_require__(/*! ../../../src/data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Leaderboard = __webpack_require__(/*! ./Leaderboard */ \"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js\");\r\nvar Product = __webpack_require__(/*! ./Product */ \"./node_modules/phaser/plugins/fbinstant/src/Product.js\");\r\nvar Purchase = __webpack_require__(/*! ./Purchase */ \"./node_modules/phaser/plugins/fbinstant/src/Purchase.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Facebook Instant Games Plugin for Phaser 3 provides a seamless bridge between Phaser\r\n * and the Facebook Instant Games API version 6.2.\r\n * \r\n * You can access this plugin via the `facebook` property in a Scene, i.e:\r\n * \r\n * ```javascript\r\n * this.facebook.getPlatform();\r\n * ```\r\n * \r\n * If this is unavailable please check to make sure you're using a build of Phaser that has\r\n * this plugin within it. You can quickly check this by looking at the dev tools console\r\n * header - the Phaser version number will have `-FB` after it if this plugin is loaded.\r\n *\r\n * If you are building your own version of Phaser then use this Webpack DefinePlugin flag:\r\n * \r\n * `\"typeof PLUGIN_FBINSTANT\": JSON.stringify(true)`\r\n * \r\n * You will find that every Instant Games API method has a mapping in this plugin.\r\n * For a full list please consult either the plugin documentation, or the 6.2 SDK documentation\r\n * at https://developers.facebook.com/docs/games/instant-games/sdk/fbinstant6.2\r\n * \r\n * Internally this plugin uses its own Data Manager to handle seamless user data updates and provides\r\n * handy functions for advertisement displaying, opening share dialogs, logging, leaderboards, purchase API requests,\r\n * loader integration and more.\r\n * \r\n * To get started with Facebook Instant Games you will need to register on Facebook and create a new Instant\r\n * Game app that has its own unique app ID. Facebook have also provided a dashboard interface for setting up\r\n * various features for your game, including leaderboards, ad requests and the payments API. There are lots\r\n * of guides on the Facebook Developers portal to assist with setting these\r\n * various systems up: https://developers.facebook.com/docs/games/instant-games/guides\r\n * \r\n * For more details follow the Quick Start guide here: https://developers.facebook.com/docs/games/instant-games\r\n *\r\n * @class FacebookInstantGamesPlugin\r\n * @memberOf Phaser\r\n * @constructor\r\n * @extends Phaser.Events.EventEmitter\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar FacebookInstantGamesPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function FacebookInstantGamesPlugin (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#game\r\n * @type {Phaser.Game}\r\n * @readOnly\r\n * @since 3.13.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Data Manager instance.\r\n * It allows you to store, query and retrieve any key/value data you may need to store.\r\n * It's also used internally by the plugin to store FBIG API data.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.13.0\r\n */\r\n this.data = new DataManager(this);\r\n\r\n this.on('setdata', this.setDataHandler, this);\r\n this.on('changedata', this.changeDataHandler, this);\r\n\r\n /**\r\n * Has the Facebook Instant Games API loaded yet?\r\n * This is set automatically during the boot process.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#hasLoaded\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.hasLoaded = false;\r\n\r\n /**\r\n * Is the Data Manager currently locked?\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#dataLocked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.dataLocked = false;\r\n\r\n /**\r\n * A list of the Facebook Instant Games APIs that are available,\r\n * based on the given platform, context and user privacy settings.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#supportedAPIs\r\n * @type {string[]}\r\n * @since 3.13.0\r\n */\r\n this.supportedAPIs = [];\r\n\r\n /**\r\n * Holds the entry point that the game was launched from.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPoint\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.entryPoint = '';\r\n\r\n /**\r\n * An object that contains any data associated with the entry point that the game was launched from.\r\n * The contents of the object are developer-defined, and can occur from entry points on different platforms.\r\n * This will return null for older mobile clients, as well as when there is no data associated with the particular entry point.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#entryPointData\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.entryPointData = null;\r\n\r\n /**\r\n * A unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = null;\r\n\r\n /**\r\n * The current context in which your game is running. This can be either `null` or\r\n * one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#contextType\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.contextType = null;\r\n\r\n /**\r\n * The current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#locale\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.locale = null;\r\n\r\n /**\r\n * The platform on which the game is currently running, i.e. `IOS`.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#platform\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.platform = null;\r\n\r\n /**\r\n * The string representation of the Facebook Instant Games SDK version being used.\r\n * This value is populated automatically during boot.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#version\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.version = null;\r\n\r\n /**\r\n * Holds the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerID\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerID = null;\r\n\r\n /**\r\n * The player's localized display name.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerName\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerName = null;\r\n\r\n /**\r\n * A url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * This value is populated automatically during boot if the API is supported.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerPhotoURL\r\n * @type {?string}\r\n * @since 3.13.0\r\n */\r\n this.playerPhotoURL = null;\r\n\r\n /**\r\n * Whether a player can subscribe to the game bot or not.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#playerCanSubscribeBot\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.playerCanSubscribeBot = false;\r\n\r\n /**\r\n * Does the current platform and context allow for use of the payments API?\r\n * Currently this is only available on Facebook.com and Android 6+.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#paymentsReady\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.paymentsReady = false;\r\n\r\n /**\r\n * The set of products that are registered to the game.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#catalog\r\n * @type {Product[]}\r\n * @since 3.13.0\r\n */\r\n this.catalog = [];\r\n\r\n /**\r\n * Contains all of the player's unconsumed purchases.\r\n * The game must fetch the current player's purchases as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#purchases\r\n * @type {Purchase[]}\r\n * @since 3.13.0\r\n */\r\n this.purchases = [];\r\n\r\n /**\r\n * Contains all of the leaderboard data, as populated by the `getLeaderboard()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#leaderboards\r\n * @type {Phaser.FacebookInstantGamesLeaderboard[]}\r\n * @since 3.13.0\r\n */\r\n this.leaderboards = {};\r\n\r\n /**\r\n * Contains AdInstance objects, as created by the `preloadAds()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesPlugin#ads\r\n * @type {AdInstance[]}\r\n * @since 3.13.0\r\n */\r\n this.ads = [];\r\n },\r\n\r\n /**\r\n * Internal set data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#setDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n setDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Internal change data handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#changeDataHandler\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Data.DataManager} parent - The parent Data Manager instance.\r\n * @param {string} key - The key of the data.\r\n * @param {any} value - The value of the data.\r\n */\r\n changeDataHandler: function (parent, key, value)\r\n {\r\n if (this.dataLocked)\r\n {\r\n return;\r\n }\r\n\r\n var data = {};\r\n\r\n data[key] = value;\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n });\r\n },\r\n\r\n /**\r\n * Call this method from your `Scene.preload` in order to sync the load progress\r\n * of the Phaser Loader with the Facebook Instant Games loader display, i.e.:\r\n * \r\n * ```javascript\r\n * this.facebook.showLoadProgress(this);\r\n * this.facebook.once('startgame', this.startGame, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showLoadProgress\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene for which you want to show loader progress for.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showLoadProgress: function (scene)\r\n {\r\n scene.load.on('progress', function (value)\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n FBInstant.setLoadingProgress(value * 100);\r\n }\r\n\r\n }, this);\r\n\r\n scene.load.on('complete', function ()\r\n {\r\n if (!this.hasLoaded)\r\n {\r\n this.hasLoaded = true;\r\n\r\n FBInstant.startGameAsync().then(this.gameStarted.bind(this));\r\n }\r\n \r\n }, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is called automatically when the game has finished loading,\r\n * if you used the `showLoadProgress` method. If your game doesn't need to\r\n * load any assets, or you're managing the load yourself, then call this\r\n * method directly to start the API running.\r\n * \r\n * When the API has finished starting this plugin will emit a `startgame` event\r\n * which you should listen for.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#gameStarted\r\n * @since 3.13.0\r\n */\r\n gameStarted: function ()\r\n {\r\n var APIs = FBInstant.getSupportedAPIs();\r\n\r\n var supported = {};\r\n\r\n var dotToUpper = function (match)\r\n {\r\n return match[1].toUpperCase();\r\n };\r\n\r\n APIs.forEach(function (api)\r\n {\r\n api = api.replace(/\\../g, dotToUpper);\r\n\r\n supported[api] = true;\r\n });\r\n\r\n this.supportedAPIs = supported;\r\n\r\n this.getID();\r\n this.getType();\r\n this.getLocale();\r\n this.getPlatform();\r\n this.getSDKVersion();\r\n\r\n this.getPlayerID();\r\n this.getPlayerName();\r\n this.getPlayerPhotoURL();\r\n\r\n var _this = this;\r\n\r\n FBInstant.onPause(function ()\r\n {\r\n _this.emit('pause');\r\n });\r\n\r\n FBInstant.getEntryPointAsync().then(function (entrypoint)\r\n {\r\n _this.entryPoint = entrypoint;\r\n _this.entryPointData = FBInstant.getEntryPointData();\r\n\r\n _this.emit('startgame');\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n // Facebook.com and Android 6 only\r\n if (this.supportedAPIs.paymentsPurchaseAsync)\r\n {\r\n FBInstant.payments.onReady(function ()\r\n {\r\n _this.paymentsReady = true;\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Checks to see if a given Facebook Instant Games API is available or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#checkAPI\r\n * @since 3.13.0\r\n * \r\n * @param {string} api - The API to check for, i.e. `player.getID`.\r\n * \r\n * @return {boolean} `true` if the API is supported, otherwise `false`.\r\n */\r\n checkAPI: function (api)\r\n {\r\n if (!this.supportedAPIs[api])\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the unique identifier for the current game context. This represents a specific context\r\n * that the game is being played in (for example, a particular messenger conversation or facebook post).\r\n * The identifier will be null if game is being played in a solo context.\r\n * \r\n * It is only populated if `contextGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getID\r\n * @since 3.13.0\r\n * \r\n * @return {string} The context ID.\r\n */\r\n getID: function ()\r\n {\r\n if (!this.contextID && this.supportedAPIs.contextGetID)\r\n {\r\n this.contextID = FBInstant.context.getID();\r\n }\r\n\r\n return this.contextID;\r\n },\r\n\r\n /**\r\n * Returns the current context in which your game is running. This can be either `null` or one of:\r\n * \r\n * `POST` - The game is running inside of a Facebook post.\r\n * `THREAD` - The game is running inside a Facebook Messenger thread.\r\n * `GROUP` - The game is running inside a Facebook Group.\r\n * `SOLO` - This is the default context, the player is the only participant.\r\n * \r\n * It is only populated if `contextGetType` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getType\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The context type.\r\n */\r\n getType: function ()\r\n {\r\n if (!this.contextType && this.supportedAPIs.contextGetType)\r\n {\r\n this.contextType = FBInstant.context.getType();\r\n }\r\n\r\n return this.contextType;\r\n },\r\n\r\n /**\r\n * Returns the current locale.\r\n * See https://origincache.facebook.com/developers/resources/?id=FacebookLocales.xml for a complete list of supported locale values.\r\n * Use this to determine what languages the current game should be localized with.\r\n * It is only populated if `getLocale` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLocale\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current locale.\r\n */\r\n getLocale: function ()\r\n {\r\n if (!this.locale && this.supportedAPIs.getLocale)\r\n {\r\n this.locale = FBInstant.getLocale();\r\n }\r\n\r\n return this.locale;\r\n },\r\n\r\n /**\r\n * Returns the platform on which the game is currently running, i.e. `IOS`.\r\n * It is only populated if `getPlatform` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlatform\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The current platform.\r\n */\r\n getPlatform: function ()\r\n {\r\n if (!this.platform && this.supportedAPIs.getPlatform)\r\n {\r\n this.platform = FBInstant.getPlatform();\r\n }\r\n\r\n return this.platform;\r\n },\r\n\r\n /**\r\n * Returns the string representation of the Facebook Instant Games SDK version being used.\r\n * It is only populated if `getSDKVersion` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getSDKVersion\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The sdk version.\r\n */\r\n getSDKVersion: function ()\r\n {\r\n if (!this.version && this.supportedAPIs.getSDKVersion)\r\n {\r\n this.version = FBInstant.getSDKVersion();\r\n }\r\n\r\n return this.version;\r\n },\r\n\r\n /**\r\n * Returns the id of the player. This is a string based ID, the same as `FBInstant.player.getID()`.\r\n * It is only populated if `playerGetID` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerID\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player ID.\r\n */\r\n getPlayerID: function ()\r\n {\r\n if (!this.playerID && this.supportedAPIs.playerGetID)\r\n {\r\n this.playerID = FBInstant.player.getID();\r\n }\r\n\r\n return this.playerID;\r\n },\r\n\r\n /**\r\n * Returns the player's localized display name.\r\n * It is only populated if `playerGetName` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerName\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's localized display name.\r\n */\r\n getPlayerName: function ()\r\n {\r\n if (!this.playerName && this.supportedAPIs.playerGetName)\r\n {\r\n this.playerName = FBInstant.player.getName();\r\n }\r\n\r\n return this.playerName;\r\n },\r\n\r\n /**\r\n * Returns the url to the player's public profile photo. The photo will always be a square, and with dimensions\r\n * of at least 200x200. When rendering it in the game, the exact dimensions should never be assumed to be constant.\r\n * It's recommended to always scale the image to a desired size before rendering.\r\n * It is only populated if `playerGetPhoto` is in the list of supported APIs.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayerPhotoURL\r\n * @since 3.13.0\r\n * \r\n * @return {?string} The player's photo url.\r\n */\r\n getPlayerPhotoURL: function ()\r\n {\r\n if (!this.playerPhotoURL && this.supportedAPIs.playerGetPhoto)\r\n {\r\n this.playerPhotoURL = FBInstant.player.getPhoto();\r\n }\r\n\r\n return this.playerPhotoURL;\r\n },\r\n\r\n /**\r\n * Load the player's photo and store it in the Texture Manager, ready for use in-game.\r\n * \r\n * This method works by using a Scene Loader instance and then asking the Loader to\r\n * retrieve the image.\r\n * \r\n * When complete the plugin will emit a `photocomplete` event, along with the key of the photo.\r\n * \r\n * ```javascript\r\n * this.facebook.loadPlayerPhoto(this, 'player').once('photocomplete', function (key) {\r\n * this.add.image(x, y, 'player');\r\n * }, this);\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#loadPlayerPhoto\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene that will be responsible for loading this photo.\r\n * @param {string} key - The key to use when storing the photo in the Texture Manager.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n loadPlayerPhoto: function (scene, key)\r\n {\r\n if (this.playerPhotoURL)\r\n {\r\n scene.load.setCORS('anonymous');\r\n \r\n scene.load.image(key, this.playerPhotoURL);\r\n \r\n scene.load.once('filecomplete-image-' + key, function ()\r\n {\r\n this.emit('photocomplete', key);\r\n\r\n }, this);\r\n \r\n scene.load.start();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current player can subscribe to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they can subscribe, the `playerCanSubscribeBot` property is set to `true`\r\n * and this plugin will emit the `cansubscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `cansubscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#canSubscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n canSubscribeBot: function ()\r\n {\r\n if (this.supportedAPIs.playerCanSubscribeBotAsync)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.canSubscribeBotAsync().then(function ()\r\n {\r\n _this.playerCanSubscribeBot = true;\r\n\r\n _this.emit('cansubscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('cansubscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('cansubscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subscribes the current player to the game bot.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `subscribebot` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `subscribebotfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#subscribeBot\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n subscribeBot: function ()\r\n {\r\n if (this.playerCanSubscribeBot)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.player.subscribeBotAsync().then(function ()\r\n {\r\n _this.emit('subscribebot');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('subscribebotfail', e);\r\n });\r\n }\r\n else\r\n {\r\n this.emit('subscribebotfail');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the associated data from the player based on the given key, or array of keys.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the data is set into this plugins Data Manager and the\r\n * `getdata` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getData\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} keys - The key/s of the data to retrieve.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getData: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(keys))\r\n {\r\n keys = [ keys ];\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getDataAsync(keys).then(function (data)\r\n {\r\n _this.dataLocked = true;\r\n\r\n for (var key in data)\r\n {\r\n _this.data.set(key, data[key]);\r\n }\r\n\r\n _this.dataLocked = false;\r\n\r\n _this.emit('getdata', data);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set data to be saved to the designated cloud storage of the current player. The game can store up to 1MB of data for each unique player.\r\n * \r\n * The data save is requested in an async call, so the result isn't available immediately.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to replace the data object directly.\r\n * \r\n * When the APIs `setDataAsync` call resolves it will emit the `savedata` event from this plugin. If the call fails for some\r\n * reason it will emit `savedatafail` instead.\r\n * \r\n * The call resolving does not necessarily mean that the input has already been persisted. Rather, it means that the data was valid and\r\n * has been scheduled to be saved. It also guarantees that all values that were set are now available in `getData`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveData\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage.\r\n * The object must contain only serializable values - any non-serializable values will cause the entire modification to be rejected.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveData: function (data)\r\n {\r\n if (!this.checkAPI('playerSetDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setDataAsync(data).then(function ()\r\n {\r\n _this.emit('savedata', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savedatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately flushes any changes to the player data to the designated cloud storage.\r\n * This function is expensive, and should primarily be used for critical changes where persistence needs to be immediate\r\n * and known by the game. Non-critical changes should rely on the platform to persist them in the background.\r\n * NOTE: Calls to player.setDataAsync will be rejected while this function's result is pending.\r\n * \r\n * Data managed via this plugins Data Manager instance is automatically synced with Facebook. However, you can call this\r\n * method directly if you need to flush the data directly.\r\n * \r\n * When the APIs `flushDataAsync` call resolves it will emit the `flushdata` event from this plugin. If the call fails for some\r\n * reason it will emit `flushdatafail` instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#flushData\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n flushData: function ()\r\n {\r\n if (!this.checkAPI('playerFlushDataAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.flushDataAsync().then(function ()\r\n {\r\n _this.emit('flushdata');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('flushdatafail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve stats from the designated cloud storage of the current player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `getstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getStats\r\n * @since 3.13.0\r\n * \r\n * @param {string[]} [keys] - An optional array of unique keys to retrieve stats for. If the function is called without it, it will fetch all stats.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getStats: function (keys)\r\n {\r\n if (!this.checkAPI('playerGetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getStatsAsync(keys).then(function (data)\r\n {\r\n _this.emit('getstats', data);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Save the stats of the current player to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `savestats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `savestatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs that should be persisted to cloud storage as stats. Note that only numerical values are stored.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveStats: function (data)\r\n {\r\n if (!this.checkAPI('playerSetStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.setStatsAsync(output).then(function ()\r\n {\r\n _this.emit('savestats', output);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('savestatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increment the stats of the current player and save them to the designated cloud storage.\r\n * \r\n * Stats in the Facebook Instant Games API are purely numerical values paired with a string-based key. Only numbers can be saved as stats,\r\n * all other data types will be ignored.\r\n * \r\n * The data object provided for this call should contain offsets for how much to modify the stats by:\r\n * \r\n * ```javascript\r\n * this.facebook.incStats({\r\n * level: 1,\r\n * zombiesSlain: 17,\r\n * rank: -1\r\n * });\r\n * ```\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `incstats` event will be emitted along with the data object returned.\r\n * \r\n * If the call fails, i.e. it's not in the list of supported APIs, or the request was rejected,\r\n * it will emit a `incstatsfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#incStats\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An object containing a set of key-value pairs indicating how much to increment each stat in cloud storage. Note that only numerical values are processed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n incStats: function (data)\r\n {\r\n if (!this.checkAPI('playerIncrementStatsAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var output = {};\r\n\r\n for (var key in data)\r\n {\r\n if (typeof data[key] === 'number')\r\n {\r\n output[key] = data[key];\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.incrementStatsAsync(output).then(function (stats)\r\n {\r\n _this.emit('incstats', stats);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('incstatsfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the data associated with the individual gameplay session for the current context.\r\n * \r\n * This function should be called whenever the game would like to update the current session data.\r\n * \r\n * This session data may be used to populate a variety of payloads, such as game play webhooks.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#saveSession\r\n * @since 3.13.0\r\n * \r\n * @param {object} data - An arbitrary data object, which must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n saveSession: function (data)\r\n {\r\n if (!this.checkAPI('setSessionData'))\r\n {\r\n return this;\r\n }\r\n\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length <= 1000)\r\n {\r\n FBInstant.setSessionData(data);\r\n }\r\n else\r\n {\r\n console.warn('Session data too long. Max 1000 chars.');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openShare\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openShare: function (text, key, frame, sessionData)\r\n {\r\n return this._share('SHARE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user invite a friend to play this game, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openInvite\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openInvite: function (text, key, frame, sessionData)\r\n {\r\n return this._share('INVITE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openRequest\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openRequest: function (text, key, frame, sessionData)\r\n {\r\n return this._share('REQUEST', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * This invokes a dialog to let the user share specified content, either as a message in Messenger or as a post on the user's timeline.\r\n * \r\n * A blob of data can be attached to the share which every game session launched from the share will be able to access via the `this.entryPointData` property.\r\n * \r\n * This data must be less than or equal to 1000 characters when stringified.\r\n * \r\n * When this method is called you should consider your game paused. Listen out for the `resume` event from this plugin to know when the dialog has been closed.\r\n * \r\n * The user may choose to cancel the share action and close the dialog. The resulting `resume` event will be dispatched regardless if the user actually shared the content or not.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#openChallenge\r\n * @since 3.13.0\r\n * \r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n openChallenge: function (text, key, frame, sessionData)\r\n {\r\n return this._share('CHALLENGE', text, key, frame, sessionData);\r\n },\r\n\r\n /**\r\n * Internal share handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_share\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} intent - (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n * @param {string} text - A text message to be shared.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {string} [frame] - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {object} [sessionData] - A blob of data to attach to the share.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _share: function (intent, text, key, frame, sessionData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (sessionData === undefined) { sessionData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n // intent (\"INVITE\" | \"REQUEST\" | \"CHALLENGE\" | \"SHARE\") Indicates the intent of the share.\r\n // image string A base64 encoded image to be shared.\r\n // text string A text message to be shared.\r\n // data Object? A blob of data to attach to the share. All game sessions launched from the share will be able to access this blob through FBInstant.getEntryPointData().\r\n\r\n var payload = {\r\n intent: intent,\r\n image: imageData,\r\n text: text,\r\n data: sessionData\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.shareAsync(payload).then(function ()\r\n {\r\n _this.emit('resume');\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function determines whether the number of participants in the current game context is between a given minimum and maximum, inclusive.\r\n * If one of the bounds is null only the other bound will be checked against.\r\n * It will always return the original result for the first call made in a context in a given game play session.\r\n * Subsequent calls, regardless of arguments, will return the answer to the original query until a context change occurs and the query result is reset.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#isSizeBetween\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min] - The minimum bound of the context size query.\r\n * @param {integer} [max] - The maximum bound of the context size query.\r\n * \r\n * @return {object} The Context Size Response object in the format: `{answer: boolean, minSize: number?, maxSize: number?}`.\r\n */\r\n isSizeBetween: function (min, max)\r\n {\r\n if (!this.checkAPI('contextIsSizeBetween'))\r\n {\r\n return this;\r\n }\r\n\r\n return FBInstant.context.isSizeBetween(min, max);\r\n },\r\n\r\n /**\r\n * Request a switch into a specific context. If the player does not have permission to enter that context,\r\n * or if the player does not provide permission for the game to enter that context, this will emit a `switchfail` event.\r\n * \r\n * Otherwise, the plugin will emit the `switch` event when the game has switched into the specified context.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchContext: function (contextID)\r\n {\r\n if (!this.checkAPI('contextSwitchAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (contextID !== this.contextID)\r\n {\r\n var _this = this;\r\n\r\n FBInstant.context.switchAsync(contextID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n\r\n _this.emit('switch', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchfail', e);\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Opens a context selection dialog for the player. If the player selects an available context,\r\n * the client will attempt to switch into that context, and emit the `choose` event if successful.\r\n * Otherwise, if the player exits the menu or the client fails to switch into the new context, the `choosefail` event will be emitted.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#chooseContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} contextID - The ID of the desired context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n chooseContext: function (options)\r\n {\r\n if (!this.checkAPI('contextChooseAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.chooseAsync(options).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('choose', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('choosefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to create or switch into a context between a specified player and the current player.\r\n * This plugin will emit the `create` event once the context switch is completed.\r\n * If the API call fails, such as if the player listed is not a Connected Player of the current player or if the\r\n * player does not provide permission to enter the new context, then the plugin will emit a 'createfail' event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createContext\r\n * @since 3.13.0\r\n * \r\n * @param {string} playerID - ID of the player.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createContext: function (playerID)\r\n {\r\n if (!this.checkAPI('contextCreateAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.context.createAsync(playerID).then(function ()\r\n {\r\n _this.contextID = FBInstant.context.getID();\r\n _this.emit('create', _this.contextID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('createfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches an array of ConnectedPlayer objects containing information about active players\r\n * (people who played the game in the last 90 days) that are connected to the current player.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `players` event along\r\n * with the player data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `playersfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPlayers\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPlayers: function ()\r\n {\r\n if (!this.checkAPI('playerGetConnectedPlayersAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.player.getConnectedPlayersAsync().then(function (players)\r\n {\r\n _this.emit('players', players);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('playersfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches the game's product catalog.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getcatalog` event along\r\n * with the catalog data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getcatalogfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getCatalog\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getCatalog: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var catalog = this.catalog;\r\n\r\n FBInstant.payments.getCatalogAsync().then(function (data)\r\n {\r\n catalog = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n catalog.push(Product(item));\r\n });\r\n\r\n _this.emit('getcatalog', catalog);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getcatalogfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches a single Product from the game's product catalog.\r\n * \r\n * The product catalog must have been populated using `getCatalog` prior to calling this method.\r\n * \r\n * Use this to look-up product details based on a purchase list.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getProduct\r\n * @since 3.17.0\r\n * \r\n * @param {string} productID - The Product ID of the item to get from the catalog.\r\n * \r\n * @return {?Product} The Product from the catalog, or `null` if it couldn't be found or the catalog isn't populated.\r\n */\r\n getProduct: function (productID)\r\n {\r\n for (var i = 0; i < this.catalog.length; i++)\r\n {\r\n if (this.catalog[i].productID === productID)\r\n {\r\n return this.catalog[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Begins the purchase flow for a specific product.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `purchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `purchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#purchase\r\n * @since 3.13.0\r\n * \r\n * @param {string} productID - The identifier of the product to purchase.\r\n * @param {string} [developerPayload] - An optional developer-specified payload, to be included in the returned purchase's signed request.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n purchase: function (productID, developerPayload)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var config = {productID: productID};\r\n\r\n if (developerPayload)\r\n {\r\n config.developerPayload = developerPayload;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.purchaseAsync(config).then(function (data)\r\n {\r\n var purchase = Purchase(data);\r\n\r\n _this.emit('purchase', purchase);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('purchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetches all of the player's unconsumed purchases. The game must fetch the current player's purchases\r\n * as soon as the client indicates that it is ready to perform payments-related operations,\r\n * i.e. at game start. The game can then process and consume any purchases that are waiting to be consumed.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `getpurchases` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `getpurchasesfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getPurchases\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getPurchases: function ()\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n var purchases = this.purchases;\r\n\r\n FBInstant.payments.getPurchasesAsync().then(function (data)\r\n {\r\n purchases = [];\r\n\r\n data.forEach(function (item)\r\n {\r\n purchases.push(Purchase(item));\r\n });\r\n\r\n _this.emit('getpurchases', purchases);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('getpurchasesfail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Consumes a specific purchase belonging to the current player. Before provisioning a product's effects to the player,\r\n * the game should request the consumption of the purchased product. Once the purchase is successfully consumed,\r\n * the game should immediately provide the player with the effects of their purchase.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If they are successfully subscribed this plugin will emit the `consumepurchase` event along\r\n * with the purchase data.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `consumepurchasefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#consumePurchase\r\n * @since 3.17.0\r\n * \r\n * @param {string} purchaseToken - The purchase token of the purchase that should be consumed.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n consumePurchase: function (purchaseToken)\r\n {\r\n if (!this.paymentsReady)\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.payments.consumePurchaseAsync(purchaseToken).then(function ()\r\n {\r\n _this.emit('consumepurchase', purchaseToken);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('consumepurchasefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Informs Facebook of a custom update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#update\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n update: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('CUSTOM', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Informs Facebook of a leaderboard update that occurred in the game.\r\n * This will temporarily yield control to Facebook and Facebook will decide what to do based on what the update is.\r\n * Once Facebook returns control to the game the plugin will emit an `update` or `upatefail` event.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * The `text` parameter is an update payload with the following structure:\r\n * \r\n * ```\r\n * text: {\r\n * default: 'X just invaded Y\\'s village!',\r\n * localizations: {\r\n * ar_AR: 'X \\u0641\\u0642\\u0637 \\u063A\\u0632\\u062A ' +\r\n * '\\u0642\\u0631\\u064A\\u0629 Y!',\r\n * en_US: 'X just invaded Y\\'s village!',\r\n * es_LA: '\\u00A1X acaba de invadir el pueblo de Y!',\r\n * }\r\n * }\r\n * ```\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#updateLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n updateLeaderboard: function (cta, text, key, frame, template, updateData)\r\n {\r\n return this._update('LEADERBOARD', cta, text, key, frame, template, updateData);\r\n },\r\n\r\n /**\r\n * Internal update handler.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#_update\r\n * @private\r\n * @since 3.13.0\r\n * \r\n * @param {string} action - The update action.\r\n * @param {string} cta - The call to action text.\r\n * @param {object} text - The text object.\r\n * @param {string} key - The key of the texture to use as the share image.\r\n * @param {?(string|integer)} frame - The frame of the texture to use as the share image. Set to `null` if you don't require a frame, but do need to set session data.\r\n * @param {string} template - The update template key.\r\n * @param {object} updateData - The update data object payload.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n _update: function (action, cta, text, key, frame, template, updateData)\r\n {\r\n if (!this.checkAPI('shareAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (cta === undefined) { cta = ''; }\r\n\r\n if (typeof text === 'string')\r\n {\r\n text = {default: text};\r\n }\r\n\r\n if (updateData === undefined) { updateData = {}; }\r\n\r\n if (key)\r\n {\r\n var imageData = this.game.textures.getBase64(key, frame);\r\n }\r\n\r\n var payload = {\r\n action: action,\r\n cta: cta,\r\n image: imageData,\r\n text: text,\r\n template: template,\r\n data: updateData,\r\n strategy: 'IMMEDIATE',\r\n notification: 'NO_PUSH'\r\n };\r\n\r\n var _this = this;\r\n\r\n FBInstant.updateAsync(payload).then(function ()\r\n {\r\n _this.emit('update');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('updatefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Request that the client switch to a different Instant Game.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the game switches successfully this plugin will emit the `switchgame` event and the client will load the new game.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `switchgamefail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#switchGame\r\n * @since 3.13.0\r\n * \r\n * @param {string} appID - The Application ID of the Instant Game to switch to. The application must be an Instant Game, and must belong to the same business as the current game.\r\n * @param {object} [data] - An optional data payload. This will be set as the entrypoint data for the game being switched to. Must be less than or equal to 1000 characters when stringified.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n switchGame: function (appID, data)\r\n {\r\n if (!this.checkAPI('switchGameAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (data)\r\n {\r\n var test = JSON.stringify(data);\r\n\r\n if (test.length > 1000)\r\n {\r\n console.warn('Switch Game data too long. Max 1000 chars.');\r\n return this;\r\n }\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.switchGameAsync(appID, data).then(function ()\r\n {\r\n _this.emit('switchgame', appID);\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('switchgamefail', e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Prompts the user to create a shortcut to the game if they are eligible to.\r\n * Can only be called once per session.\r\n * \r\n * It makes an async call to the API, so the result isn't available immediately.\r\n * \r\n * If the user choose to create a shortcut this plugin will emit the `shortcutcreated` event.\r\n * \r\n * If they cannot, i.e. it's not in the list of supported APIs, or the request\r\n * was rejected, it will emit a `shortcutcreatedfail` event instead.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#createShortcut\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n createShortcut: function ()\r\n {\r\n var _this = this;\r\n\r\n FBInstant.canCreateShortcutAsync().then(function (canCreateShortcut)\r\n {\r\n if (canCreateShortcut)\r\n {\r\n FBInstant.createShortcutAsync().then(function ()\r\n {\r\n _this.emit('shortcutcreated');\r\n\r\n }).catch(function (e)\r\n {\r\n _this.emit('shortcutfailed', e);\r\n });\r\n }\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the game.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#quit\r\n * @since 3.13.0\r\n */\r\n quit: function ()\r\n {\r\n FBInstant.quit();\r\n },\r\n\r\n /**\r\n * Log an app event with FB Analytics.\r\n * \r\n * See https://developers.facebook.com/docs/javascript/reference/v2.8#app_events for more details about FB Analytics.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#log\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - Name of the event. Must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters.\r\n * @param {number} [value] - An optional numeric value that FB Analytics can calculate a sum with.\r\n * @param {object} [params] - An optional object that can contain up to 25 key-value pairs to be logged with the event. Keys must be 2 to 40 characters, and can only contain '_', '-', ' ', and alphanumeric characters. Values must be less than 100 characters in length.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n log: function (name, value, params)\r\n {\r\n if (!this.checkAPI('logEvent'))\r\n {\r\n return this;\r\n }\r\n\r\n if (params === undefined) { params = {}; }\r\n\r\n if (name.length >= 2 && name.length <= 40)\r\n {\r\n FBInstant.logEvent(name, parseFloat(value), params);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an interstitial ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showAd()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getInterstitialAdAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getInterstitialAdAsync(id).then(function (interstitial)\r\n {\r\n data = interstitial;\r\n\r\n return interstitial.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, false);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempt to create an instance of an rewarded video ad.\r\n * \r\n * If the instance is created successfully then the ad is preloaded ready for display in-game via the method `showVideo()`.\r\n * \r\n * If the ad loads it will emit the `adloaded` event, passing the AdInstance as the only parameter.\r\n * \r\n * If the ad cannot be displayed because there was no inventory to fill it, it will emit the `adsnofill` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#preloadVideoAds\r\n * @since 3.13.0\r\n * \r\n * @param {(string|string[])} placementID - The ad placement ID, or an array of IDs, as created in your Audience Network settings within Facebook.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n preloadVideoAds: function (placementID)\r\n {\r\n if (!this.checkAPI('getRewardedVideoAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n if (!Array.isArray(placementID))\r\n {\r\n placementID = [ placementID ];\r\n }\r\n\r\n var i;\r\n var _this = this;\r\n\r\n var total = 0;\r\n\r\n for (i = 0; i < this.ads.length; i++)\r\n {\r\n if (!this.ads[i].shown)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n if (total + placementID.length >= 3)\r\n {\r\n console.warn('Too many AdInstances. Show an ad before loading more');\r\n return this;\r\n }\r\n\r\n for (i = 0; i < placementID.length; i++)\r\n {\r\n var id = placementID[i];\r\n var data;\r\n\r\n FBInstant.getRewardedVideoAsync(id).then(function (reward)\r\n {\r\n data = reward;\r\n\r\n return reward.loadAsync();\r\n\r\n }).then(function ()\r\n {\r\n var ad = AdInstance(id, data, true);\r\n\r\n _this.ads.push(ad);\r\n\r\n _this.emit('adloaded', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NO_FILL')\r\n {\r\n _this.emit('adsnofill', id);\r\n }\r\n else if (e.code === 'ADS_FREQUENT_LOAD')\r\n {\r\n _this.emit('adsfrequentload', id);\r\n }\r\n else\r\n {\r\n console.warn(e);\r\n }\r\n });\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showAd\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showAd: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Displays a previously loaded interstitial video ad.\r\n * \r\n * If the ad is successfully displayed this plugin will emit the `adfinished` event, with the AdInstance object as its parameter.\r\n * \r\n * If the ad cannot be displayed, it will emit the `adsnotloaded` event.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#showVideo\r\n * @since 3.13.0\r\n * \r\n * @param {string} placementID - The ad placement ID to display.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n showVideo: function (placementID)\r\n {\r\n var _this = this;\r\n\r\n for (var i = 0; i < this.ads.length; i++)\r\n {\r\n var ad = this.ads[i];\r\n\r\n if (ad.placementID === placementID && ad.video)\r\n {\r\n ad.instance.showAsync().then(function ()\r\n {\r\n ad.shown = true;\r\n\r\n _this.emit('adfinished', ad);\r\n\r\n }).catch(function (e)\r\n {\r\n if (e.code === 'ADS_NOT_LOADED')\r\n {\r\n _this.emit('adsnotloaded', ad);\r\n }\r\n else if (e.code === 'RATE_LIMITED')\r\n {\r\n _this.emit('adratelimited', ad);\r\n }\r\n \r\n _this.emit('adshowerror', e, ad);\r\n });\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Attempts to match the current player with other users looking for people to play with.\r\n * If successful, a new Messenger group thread will be created containing the matched players and the player will\r\n * be context switched to that thread. This plugin will also dispatch the `matchplayer` event, containing the new context ID and Type.\r\n * \r\n * The default minimum and maximum number of players in one matched thread are 2 and 20 respectively,\r\n * depending on how many players are trying to get matched around the same time.\r\n * \r\n * The values can be changed in `fbapp-config.json`. See the Bundle Config documentation for documentation about `fbapp-config.json`.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#matchPlayer\r\n * @since 3.13.0\r\n * \r\n * @param {string} [matchTag] - Optional extra information about the player used to group them with similar players. Players will only be grouped with other players with exactly the same tag. The tag must only include letters, numbers, and underscores and be 100 characters or less in length.\r\n * @param {boolean} [switchImmediately=false] - Optional extra parameter that specifies whether the player should be immediately switched to the new context when a match is found. By default this will be false which will mean the player needs explicitly press play after being matched to switch to the new context.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n matchPlayer: function (matchTag, switchImmediately)\r\n {\r\n if (matchTag === undefined) { matchTag = null; }\r\n if (switchImmediately === undefined) { switchImmediately = false; }\r\n\r\n if (!this.checkAPI('matchPlayerAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.matchPlayerAsync(matchTag, switchImmediately).then(function ()\r\n {\r\n _this.getID();\r\n _this.getType();\r\n\r\n _this.emit('matchplayer', _this.contextID, _this.contextType);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fetch a specific leaderboard belonging to this Instant Game.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes the `getleaderboard` event will be emitted along with a Leaderboard object instance.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#getLeaderboard\r\n * @since 3.13.0\r\n * \r\n * @param {string} name - The name of the leaderboard. Each leaderboard for an Instant Game must have its own distinct name.\r\n * \r\n * @return {this} This Facebook Instant Games Plugin instance.\r\n */\r\n getLeaderboard: function (name)\r\n {\r\n if (!this.checkAPI('getLeaderboardAsync'))\r\n {\r\n return this;\r\n }\r\n\r\n var _this = this;\r\n\r\n FBInstant.getLeaderboardAsync(name).then(function (data)\r\n {\r\n var leaderboard = new Leaderboard(_this, data);\r\n\r\n _this.leaderboards[name] = leaderboard;\r\n\r\n _this.emit('getleaderboard', leaderboard);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Quits the Facebook API and then destroys this plugin.\r\n *\r\n * @method Phaser.FacebookInstantGamesPlugin#destroy\r\n * @since 3.13.0\r\n */\r\n destroy: function ()\r\n {\r\n FBInstant.quit();\r\n\r\n this.data.destroy();\r\n\r\n this.removeAllListeners();\r\n\r\n this.catalog = [];\r\n this.purchases = [];\r\n this.leaderboards = [];\r\n this.ads = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FacebookInstantGamesPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js?")},"./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../src/utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar LeaderboardScore = __webpack_require__(/*! ./LeaderboardScore */ \"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js\");\r\n\r\n/**\r\n * @classdesc\r\n * This class represents one single Leaderboard that belongs to a Facebook Instant Game.\r\n * \r\n * You do not need to instantiate this class directly, it will be created when you use the\r\n * `getLeaderboard()` method of the main plugin.\r\n *\r\n * @class FacebookInstantGamesLeaderboard\r\n * @memberOf Phaser\r\n * @constructor\r\n * @since 3.13.0\r\n * \r\n * @param {Phaser.FacebookInstantGamesPlugin} plugin - A reference to the Facebook Instant Games Plugin.\r\n * @param {any} data - An Instant Game leaderboard instance.\r\n */\r\nvar Leaderboard = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Leaderboard (plugin, data)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#plugin\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * An Instant Game leaderboard instance.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#ref\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.ref = data;\r\n\r\n /**\r\n * The name of the leaderboard.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#name\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.name = data.getName();\r\n\r\n /**\r\n * The ID of the context that the leaderboard is associated with, or null if the leaderboard is not tied to a particular context.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#contextID\r\n * @type {string}\r\n * @since 3.13.0\r\n */\r\n this.contextID = data.getContextID();\r\n\r\n /**\r\n * The total number of player entries in the leaderboard.\r\n * This value defaults to zero. Populate it via the `getEntryCount()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#entryCount\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n this.entryCount = 0;\r\n\r\n /**\r\n * The players score object.\r\n * This value defaults to `null`. Populate it via the `getPlayerScore()` method.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#playerScore\r\n * @type {LeaderboardScore}\r\n * @since 3.13.0\r\n */\r\n this.playerScore = null;\r\n\r\n /**\r\n * The scores in the Leaderboard from the currently requested range.\r\n * This value defaults to an empty array. Populate it via the `getScores()` method.\r\n * The contents of this array are reset each time `getScores()` is called.\r\n *\r\n * @name Phaser.FacebookInstantGamesLeaderboard#scores\r\n * @type {LeaderboardScore[]}\r\n * @since 3.13.0\r\n */\r\n this.scores = [];\r\n\r\n this.getEntryCount();\r\n },\r\n\r\n /**\r\n * Fetches the total number of player entries in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getentrycount` event along with the count and name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getEntryCount\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getEntryCount: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getEntryCountAsync().then(function (count)\r\n {\r\n _this.entryCount = count;\r\n\r\n _this.emit('getentrycount', count, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the player's score. If the player has an existing score, the old score will only be replaced if the new score is better than it.\r\n * NOTE: If the leaderboard is associated with a specific context, the game must be in that context to set a score for the player.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `setscore` event along with the LeaderboardScore object and the name of the Leaderboard.\r\n * \r\n * If the save fails the event will send `null` as the score value.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#setScore\r\n * @since 3.13.0\r\n * \r\n * @param {integer} score - The new score for the player. Must be a 64-bit integer number.\r\n * @param {(string|any)} [data] - Metadata to associate with the stored score. Must be less than 2KB in size. If an object is given it will be passed to `JSON.stringify`.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n setScore: function (score, data)\r\n {\r\n if (data === undefined) { data = ''; }\r\n\r\n if (typeof data === 'object')\r\n {\r\n data = JSON.stringify(data);\r\n }\r\n\r\n var _this = this;\r\n\r\n this.ref.setScoreAsync(score, data).then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('setscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('setscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the players leaderboard entry and stores it in the `playerScore` property.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getplayerscore` event along with the score and the name of the Leaderboard.\r\n * \r\n * If the player has not yet saved a score, the event will send `null` as the score value, and `playerScore` will be set to `null` as well.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getPlayerScore\r\n * @since 3.13.0\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getPlayerScore: function ()\r\n {\r\n var _this = this;\r\n\r\n this.ref.getPlayerEntryAsync().then(function (entry)\r\n {\r\n if (entry)\r\n {\r\n var score = LeaderboardScore(entry);\r\n\r\n _this.playerScore = score;\r\n \r\n _this.emit('getplayerscore', score, _this.name);\r\n }\r\n else\r\n {\r\n _this.emit('getplayerscore', null, _this.name);\r\n }\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, ordered by score ranking in the leaderboard.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getScores\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getEntriesAsync(count, offset).then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a set of leaderboard entries, based on the current player's connected players (including the current player), ordered by local rank within the set of connected players.\r\n * \r\n * The data is requested in an async call, so the result isn't available immediately.\r\n * \r\n * When the call completes this Leaderboard will emit the `getconnectedscores` event along with an array of LeaderboardScore entries and the name of the Leaderboard.\r\n *\r\n * @method Phaser.FacebookInstantGamesLeaderboard#getConnectedScores\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [count=10] - The number of entries to attempt to fetch from the leaderboard. Currently, up to a maximum of 100 entries may be fetched per query.\r\n * @param {integer} [offset=0] - The offset from the top of the leaderboard that entries will be fetched from.\r\n * \r\n * @return {this} This Leaderboard instance.\r\n */\r\n getConnectedScores: function (count, offset)\r\n {\r\n if (count === undefined) { count = 10; }\r\n if (offset === undefined) { offset = 0; }\r\n\r\n var _this = this;\r\n\r\n this.ref.getConnectedPlayerEntriesAsync().then(function (entries)\r\n {\r\n _this.scores = [];\r\n\r\n entries.forEach(function (entry)\r\n {\r\n _this.scores.push(LeaderboardScore(entry));\r\n });\r\n\r\n _this.emit('getconnectedscores', _this.scores, _this.name);\r\n\r\n }).catch(function (e)\r\n {\r\n console.warn(e);\r\n });\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Leaderboard;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js?")},"./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} LeaderboardScore\r\n *\r\n * @property {integer} score - An integer score value.\r\n * @property {string} scoreFormatted - The score value, formatted with the score format associated with the leaderboard.\r\n * @property {integer} timestamp - The Unix timestamp of when the leaderboard entry was last updated.\r\n * @property {integer} rank - The entry's leaderboard ranking.\r\n * @property {string} data - The developer-specified payload associated with the score, or null if one was not set.\r\n * @property {string} playerName - The player's localized display name.\r\n * @property {string} playerPhotoURL - A url to the player's public profile photo.\r\n * @property {string} playerID - The game's unique identifier for the player.\r\n */\r\n\r\nvar LeaderboardScore = function (entry)\r\n{\r\n return {\r\n score: entry.getScore(),\r\n scoreFormatted: entry.getFormattedScore(),\r\n timestamp: entry.getTimestamp(),\r\n rank: entry.getRank(),\r\n data: entry.getExtraData(),\r\n playerName: entry.getPlayer().getName(),\r\n playerPhotoURL: entry.getPlayer().getPhoto(),\r\n playerID: entry.getPlayer().getID()\r\n };\r\n};\r\n\r\nmodule.exports = LeaderboardScore;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js?")},"./node_modules/phaser/plugins/fbinstant/src/Product.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Product\r\n *\r\n * @property {string} [title] - The title of the product.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [description] - The product description.\r\n * @property {string} [imageURI] - A link to the product's associated image.\r\n * @property {string} [price] - The price of the product.\r\n * @property {string} [priceCurrencyCode] - The currency code for the product.\r\n */\r\n\r\nvar Product = function (data)\r\n{\r\n return {\r\n title: GetFastValue(data, 'title', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n description: GetFastValue(data, 'description', ''),\r\n imageURI: GetFastValue(data, 'imageURI', ''),\r\n price: GetFastValue(data, 'price', ''),\r\n priceCurrencyCode: GetFastValue(data, 'priceCurrencyCode', '')\r\n };\r\n};\r\n\r\nmodule.exports = Product;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Product.js?")},"./node_modules/phaser/plugins/fbinstant/src/Purchase.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2018 Photon Storm Ltd.\r\n * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../src/utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @typedef {object} Purchase\r\n *\r\n * @property {string} [developerPayload] - A developer-specified string, provided during the purchase of the product.\r\n * @property {string} [paymentID] - The identifier for the purchase transaction.\r\n * @property {string} [productID] - The product's game-specified identifier.\r\n * @property {string} [purchaseTime] - Unix timestamp of when the purchase occurred.\r\n * @property {string} [purchaseToken] - A token representing the purchase that may be used to consume the purchase.\r\n * @property {string} [signedRequest] - Server-signed encoding of the purchase request.\r\n */\r\n\r\nvar Purchase = function (data)\r\n{\r\n return {\r\n developerPayload: GetFastValue(data, 'developerPayload', ''),\r\n paymentID: GetFastValue(data, 'paymentID', ''),\r\n productID: GetFastValue(data, 'productID', ''),\r\n purchaseTime: GetFastValue(data, 'purchaseTime', ''),\r\n purchaseToken: GetFastValue(data, 'purchaseToken', ''),\r\n signedRequest: GetFastValue(data, 'signedRequest', '')\r\n };\r\n};\r\n\r\nmodule.exports = Purchase;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/plugins/fbinstant/src/Purchase.js?")},"./node_modules/phaser/src/actions/Angle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `angle` property,\r\n * and then adds the given value to each of their `angle` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Angle(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Angle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `angle` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Angle = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'angle', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Angle.js?")},"./node_modules/phaser/src/actions/Call.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and passes each of them to the given callback.\r\n *\r\n * @function Phaser.Actions.Call\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.\r\n * @param {*} context - The scope in which the callback will be invoked.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that was passed to this Action.\r\n */\r\nvar Call = function (items, callback, context)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n callback.call(context, item);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Call;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Call.js?")},"./node_modules/phaser/src/actions/GetFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the first element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetFirst(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetFirst\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The first object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetFirst = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetFirst.js?")},"./node_modules/phaser/src/actions/GetLast.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of objects and returns the last element in the array that has properties which match\r\n * all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`\r\n * then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.\r\n *\r\n * To use this with a Group: `GetLast(group.getChildren(), compare, index)`\r\n *\r\n * @function Phaser.Actions.GetLast\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.\r\n * @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n *\r\n * @return {?(object|Phaser.GameObjects.GameObject)} The last object in the array that matches the comparison object, or `null` if no match was found.\r\n */\r\nvar GetLast = function (items, compare, index)\r\n{\r\n if (index === undefined) { index = 0; }\r\n\r\n for (var i = index; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n var match = true;\r\n\r\n for (var property in compare)\r\n {\r\n if (item[property] !== compare[property])\r\n {\r\n match = false;\r\n }\r\n }\r\n\r\n if (match)\r\n {\r\n return item;\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetLast;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GetLast.js?")},"./node_modules/phaser/src/actions/GridAlign.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AlignIn = __webpack_require__(/*! ../display/align/in/QuickSet */ \"./node_modules/phaser/src/display/align/in/QuickSet.js\");\r\nvar CONST = __webpack_require__(/*! ../display/align/const */ \"./node_modules/phaser/src/display/align/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Zone = __webpack_require__(/*! ../gameobjects/zone/Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\nvar tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1);\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then aligns them based on the grid configuration given to this action.\r\n *\r\n * @function Phaser.Actions.GridAlign\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {Phaser.Types.Actions.GridAlignConfig} options - The GridAlign Configuration object.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar GridAlign = function (items, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var width = GetFastValue(options, 'width', -1);\r\n var height = GetFastValue(options, 'height', -1);\r\n var cellWidth = GetFastValue(options, 'cellWidth', 1);\r\n var cellHeight = GetFastValue(options, 'cellHeight', cellWidth);\r\n var position = GetFastValue(options, 'position', CONST.TOP_LEFT);\r\n var x = GetFastValue(options, 'x', 0);\r\n var y = GetFastValue(options, 'y', 0);\r\n\r\n var cx = 0;\r\n var cy = 0;\r\n var w = (width * cellWidth);\r\n var h = (height * cellHeight);\r\n\r\n tempZone.setPosition(x, y);\r\n tempZone.setSize(cellWidth, cellHeight);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n AlignIn(items[i], tempZone, position);\r\n\r\n if (width === -1)\r\n {\r\n // We keep laying them out horizontally until we've done them all\r\n cy += cellHeight;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n cy = 0;\r\n tempZone.x += cellWidth;\r\n tempZone.y = y;\r\n }\r\n }\r\n else if (height === -1)\r\n {\r\n // We keep laying them out vertically until we've done them all\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n }\r\n }\r\n else\r\n {\r\n // We keep laying them out until we hit the column limit\r\n cx += cellWidth;\r\n tempZone.x += cellWidth;\r\n\r\n if (cx === w)\r\n {\r\n cx = 0;\r\n cy += cellHeight;\r\n tempZone.x = x;\r\n tempZone.y += cellHeight;\r\n\r\n if (cy === h)\r\n {\r\n // We've hit the column limit, so return, even if there are items left\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = GridAlign;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/GridAlign.js?")},"./node_modules/phaser/src/actions/IncAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `alpha` property,\r\n * and then adds the given value to each of their `alpha` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `alpha` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncAlpha.js?")},"./node_modules/phaser/src/actions/IncX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `x` property,\r\n * and then adds the given value to each of their `x` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `x` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncX.js?")},"./node_modules/phaser/src/actions/IncXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `x` and `y` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.IncXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to be added to the `x` property.\r\n * @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueInc(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = IncXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncXY.js?")},"./node_modules/phaser/src/actions/IncY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `y` property,\r\n * and then adds the given value to each of their `y` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `IncY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.IncY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `y` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar IncY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = IncY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/IncY.js?")},"./node_modules/phaser/src/actions/PlaceOnCircle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnCircle = function (items, circle, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = circle.x + (circle.radius * Math.cos(angle));\r\n items[i].y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnCircle.js?")},"./node_modules/phaser/src/actions/PlaceOnEllipse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of an Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects on.\r\n * @param {number} [startAngle=0] - Optional angle to start position from, in radians.\r\n * @param {number} [endAngle=6.28] - Optional angle to stop position at, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnEllipse = function (items, ellipse, startAngle, endAngle)\r\n{\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 6.28; }\r\n\r\n var angle = startAngle;\r\n var angleStep = (endAngle - startAngle) / items.length;\r\n\r\n var a = ellipse.width / 2;\r\n var b = ellipse.height / 2;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = ellipse.x + a * Math.cos(angle);\r\n items[i].y = ellipse.y + b * Math.sin(angle);\r\n\r\n angle += angleStep;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnEllipse.js?")},"./node_modules/phaser/src/actions/PlaceOnLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoints = __webpack_require__(/*! ../geom/line/GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\n\r\n/**\r\n * Positions an array of Game Objects on evenly spaced points of a Line.\r\n *\r\n * @function Phaser.Actions.PlaceOnLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnLine = function (items, line)\r\n{\r\n var points = GetPoints(line, items.length);\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = points[i];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnLine.js?')},"./node_modules/phaser/src/actions/PlaceOnRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MarchingAnts = __webpack_require__(/*! ../geom/rectangle/MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nvar RotateLeft = __webpack_require__(/*! ../utils/array/RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js");\r\nvar RotateRight = __webpack_require__(/*! ../utils/array/RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle.\r\n * \r\n * Placement starts from the top-left of the rectangle, and proceeds in a clockwise direction.\r\n * If the `shift` parameter is given you can offset where placement begins.\r\n *\r\n * @function Phaser.Actions.PlaceOnRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects on.\r\n * @param {integer} [shift=1] - An optional positional offset.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnRectangle = function (items, rect, shift)\r\n{\r\n if (shift === undefined) { shift = 0; }\r\n\r\n var points = MarchingAnts(rect, false, items.length);\r\n\r\n if (shift > 0)\r\n {\r\n RotateLeft(points, shift);\r\n }\r\n else if (shift < 0)\r\n {\r\n RotateRight(points, Math.abs(shift));\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].x = points[i].x;\r\n items[i].y = points[i].y;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnRectangle.js?')},"./node_modules/phaser/src/actions/PlaceOnTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BresenhamPoints = __webpack_require__(/*! ../geom/line/BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.PlaceOnTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects on.\r\n * @param {number} [stepRate=1] - An optional step rate, to increase or decrease the packing of the Game Objects on the lines.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlaceOnTriangle = function (items, triangle, stepRate)\r\n{\r\n var p1 = BresenhamPoints({ x1: triangle.x1, y1: triangle.y1, x2: triangle.x2, y2: triangle.y2 }, stepRate);\r\n var p2 = BresenhamPoints({ x1: triangle.x2, y1: triangle.y2, x2: triangle.x3, y2: triangle.y3 }, stepRate);\r\n var p3 = BresenhamPoints({ x1: triangle.x3, y1: triangle.y3, x2: triangle.x1, y2: triangle.y1 }, stepRate);\r\n\r\n // Remove overlaps\r\n p1.pop();\r\n p2.pop();\r\n p3.pop();\r\n\r\n p1 = p1.concat(p2, p3);\r\n\r\n var step = p1.length / items.length;\r\n var p = 0;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n var point = p1[Math.floor(p)];\r\n\r\n item.x = point.x;\r\n item.y = point.y;\r\n\r\n p += step;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlaceOnTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlaceOnTriangle.js?')},"./node_modules/phaser/src/actions/PlayAnimation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Play an animation with the given key, starting at the given startFrame on all Game Objects in items.\r\n *\r\n * @function Phaser.Actions.PlayAnimation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} key - The name of the animation to play.\r\n * @param {(string|integer)} [startFrame] - The starting frame of the animation with the given key.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar PlayAnimation = function (items, key, startFrame)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].anims.play(key, startFrame);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PlayAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PlayAnimation.js?")},"./node_modules/phaser/src/actions/PropertyValueInc.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then adds the given value to it.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueInc\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to be added to the property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueInc = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] += value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueInc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueInc.js?")},"./node_modules/phaser/src/actions/PropertyValueSet.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public property as defined in `key`,\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`\r\n *\r\n * @function Phaser.Actions.PropertyValueSet\r\n * @since 3.3.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {string} key - The property to be updated.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar PropertyValueSet = function (items, key, value, step, index, direction)\r\n{\r\n if (step === undefined) { step = 0; }\r\n if (index === undefined) { index = 0; }\r\n if (direction === undefined) { direction = 1; }\r\n\r\n var i;\r\n var t = 0;\r\n var end = items.length;\r\n\r\n if (direction === 1)\r\n {\r\n // Start to End\r\n for (i = index; i < end; i++)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n else\r\n {\r\n // End to Start\r\n for (i = index; i >= 0; i--)\r\n {\r\n items[i][key] = value + (t * step);\r\n t++;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = PropertyValueSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/PropertyValueSet.js?")},"./node_modules/phaser/src/actions/RandomCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/circle/Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Circle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Circle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomCircle = function (items, circle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(circle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomCircle.js?')},"./node_modules/phaser/src/actions/RandomEllipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/ellipse/Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Ellipse.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Ellipse` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomEllipse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomEllipse = function (items, ellipse)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(ellipse, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomEllipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomEllipse.js?')},"./node_modules/phaser/src/actions/RandomLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/line/Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations on the Line.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Line` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomLine\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Line} line - The Line to position the Game Objects randomly on.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomLine = function (items, line)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(line, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomLine.js?')},"./node_modules/phaser/src/actions/RandomRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/rectangle/Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Rectangle.\r\n *\r\n * @function Phaser.Actions.RandomRectangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomRectangle = function (items, rect)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(rect, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomRectangle.js?')},"./node_modules/phaser/src/actions/RandomTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Random = __webpack_require__(/*! ../geom/triangle/Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * Takes an array of Game Objects and positions them at random locations within the Triangle.\r\n * \r\n * If you wish to pass a `Phaser.GameObjects.Triangle` Shape to this function, you should pass its `geom` property.\r\n *\r\n * @function Phaser.Actions.RandomTriangle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to position the Game Objects within.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RandomTriangle = function (items, triangle)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n Random(triangle, items[i]);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RandomTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RandomTriangle.js?')},"./node_modules/phaser/src/actions/Rotate.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `rotation` property,\r\n * and then adds the given value to each of their `rotation` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `Rotate(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `rotation` property (in radians).\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar Rotate = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Rotate.js?")},"./node_modules/phaser/src/actions/RotateAround.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Rotates each item around the given point by the given angle.\r\n *\r\n * @function Phaser.Actions.RotateAround\r\n * @since 3.0.0\r\n * @see Phaser.Math.RotateAroundDistance\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAround = function (items, point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n RotateAroundDistance(item, x, y, angle, Math.max(1, DistanceBetween(item.x, item.y, x, y)));\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAround.js?')},"./node_modules/phaser/src/actions/RotateAroundDistance.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathRotateAroundDistance = __webpack_require__(/*! ../math/RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js");\r\n\r\n/**\r\n * Rotates an array of Game Objects around a point by the given angle and distance.\r\n *\r\n * @function Phaser.Actions.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {object} point - Any object with public `x` and `y` properties.\r\n * @param {number} angle - The angle to rotate by, in radians.\r\n * @param {number} distance - The distance from the point of rotation in pixels.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar RotateAroundDistance = function (items, point, angle, distance)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n // There\'s nothing to do\r\n if (distance === 0)\r\n {\r\n return items;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n MathRotateAroundDistance(items[i], x, y, angle, distance);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/RotateAroundDistance.js?')},"./node_modules/phaser/src/actions/ScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleX` property,\r\n * and then adds the given value to each of their `scaleX` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleX` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleX.js?")},"./node_modules/phaser/src/actions/ScaleXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,\r\n * and then adds the given value to each of them.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.ScaleXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to be added to the `scaleX` property.\r\n * @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleXY = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueInc(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueInc(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleXY.js?")},"./node_modules/phaser/src/actions/ScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueInc = __webpack_require__(/*! ./PropertyValueInc */ \"./node_modules/phaser/src/actions/PropertyValueInc.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have a public `scaleY` property,\r\n * and then adds the given value to each of their `scaleY` properties.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `ScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.ScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to be added to the `scaleY` property.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar ScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueInc(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = ScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ScaleY.js?")},"./node_modules/phaser/src/actions/SetAlpha.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `alpha`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetAlpha(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetAlpha\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetAlpha = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'alpha', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetAlpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetAlpha.js?")},"./node_modules/phaser/src/actions/SetBlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `blendMode`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetBlendMode(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetBlendMode\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetBlendMode = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'blendMode', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetBlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetBlendMode.js?")},"./node_modules/phaser/src/actions/SetDepth.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `depth`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetDepth(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetDepth\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetDepth = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'depth', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetDepth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetDepth.js?")},"./node_modules/phaser/src/actions/SetHitArea.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes all provided Game Objects to the Input Manager to enable them for input with identical areas and callbacks.\r\n * \r\n * @see {@link Phaser.GameObjects.GameObject#setInteractive}\r\n *\r\n * @function Phaser.Actions.SetHitArea\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {*} hitArea - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetHitArea = function (items, hitArea, hitAreaCallback)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setInteractive(hitArea, hitAreaCallback);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetHitArea;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetHitArea.js?")},"./node_modules/phaser/src/actions/SetOrigin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetOrigin\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} originX - The amount to set the `originX` property to.\r\n * @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.\r\n * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetOrigin = function (items, originX, originY, stepX, stepY, index, direction)\r\n{\r\n if (originY === undefined || originY === null) { originY = originX; }\r\n\r\n PropertyValueSet(items, 'originX', originX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'originY', originY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetOrigin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetOrigin.js?")},"./node_modules/phaser/src/actions/SetRotation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `rotation`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetRotation(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetRotation\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetRotation = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'rotation', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetRotation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetRotation.js?")},"./node_modules/phaser/src/actions/SetScale.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetScale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} scaleX - The amount to set the `scaleX` property to.\r\n * @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.\r\n * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScale = function (items, scaleX, scaleY, stepX, stepY, index, direction)\r\n{\r\n if (scaleY === undefined || scaleY === null) { scaleY = scaleX; }\r\n\r\n PropertyValueSet(items, 'scaleX', scaleX, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'scaleY', scaleY, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScale.js?")},"./node_modules/phaser/src/actions/SetScaleX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleX`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleX', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleX.js?")},"./node_modules/phaser/src/actions/SetScaleY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `scaleY`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetScaleY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetScaleY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetScaleY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'scaleY', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetScaleY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetScaleY.js?")},"./node_modules/phaser/src/actions/SetTint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public method setTint() and then updates it to the given value(s). You can specify tint color per corner or provide only one color value for `topLeft` parameter, in which case whole item will be tinted with that color.\r\n *\r\n * @function Phaser.Actions.SetTint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} topLeft - The tint being applied to top-left corner of item. If other parameters are given no value, this tint will be applied to whole item.\r\n * @param {number} [topRight] - The tint to be applied to top-right corner of item.\r\n * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item.\r\n * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SetTint = function (items, topLeft, topRight, bottomLeft, bottomRight)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SetTint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetTint.js?")},"./node_modules/phaser/src/actions/SetVisible.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `visible`\r\n * and then sets it to the given value.\r\n *\r\n * To use this with a Group: `SetVisible(group.getChildren(), value)`\r\n *\r\n * @function Phaser.Actions.SetVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {boolean} value - The value to set the property to.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetVisible = function (items, value, index, direction)\r\n{\r\n return PropertyValueSet(items, 'visible', value, 0, index, direction);\r\n};\r\n\r\nmodule.exports = SetVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetVisible.js?")},"./node_modules/phaser/src/actions/SetX.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `x`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetX(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetX = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'x', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetX.js?")},"./node_modules/phaser/src/actions/SetXY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public properties `x` and `y`\r\n * and then sets them to the given values.\r\n *\r\n * The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)`\r\n *\r\n * @function Phaser.Actions.SetXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} x - The amount to set the `x` property to.\r\n * @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.\r\n * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.\r\n * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetXY = function (items, x, y, stepX, stepY, index, direction)\r\n{\r\n if (y === undefined || y === null) { y = x; }\r\n\r\n PropertyValueSet(items, 'x', x, stepX, index, direction);\r\n\r\n return PropertyValueSet(items, 'y', y, stepY, index, direction);\r\n};\r\n\r\nmodule.exports = SetXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetXY.js?")},"./node_modules/phaser/src/actions/SetY.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PropertyValueSet = __webpack_require__(/*! ./PropertyValueSet */ \"./node_modules/phaser/src/actions/PropertyValueSet.js\");\r\n\r\n/**\r\n * Takes an array of Game Objects, or any objects that have the public property `y`\r\n * and then sets it to the given value.\r\n *\r\n * The optional `step` property is applied incrementally, multiplied by each item in the array.\r\n *\r\n * To use this with a Group: `SetY(group.getChildren(), value, step)`\r\n *\r\n * @function Phaser.Actions.SetY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.\r\n * @param {integer} [index=0] - An optional offset to start searching from within the items array.\r\n * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of objects that were passed to this Action.\r\n */\r\nvar SetY = function (items, value, step, index, direction)\r\n{\r\n return PropertyValueSet(items, 'y', value, step, index, direction);\r\n};\r\n\r\nmodule.exports = SetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SetY.js?")},"./node_modules/phaser/src/actions/ShiftPosition.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Iterate through the items array changing the position of each element to be that of the element that came before\r\n * it in the array (or after it if direction = 1)\r\n * \r\n * The first items position is set to x/y.\r\n * \r\n * The final x/y coords are returned\r\n *\r\n * @function Phaser.Actions.ShiftPosition\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items]\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {number} x - The x coordinate to place the first item in the array at.\r\n * @param {number} y - The y coordinate to place the first item in the array at.\r\n * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An optional objec to store the final objects position in.\r\n *\r\n * @return {Phaser.Math.Vector2} The output vector.\r\n */\r\nvar ShiftPosition = function (items, x, y, direction, output)\r\n{\r\n if (direction === undefined) { direction = 0; }\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var px;\r\n var py;\r\n\r\n if (items.length > 1)\r\n {\r\n var i;\r\n var cx;\r\n var cy;\r\n var cur;\r\n\r\n if (direction === 0)\r\n {\r\n // Bottom to Top\r\n\r\n var len = items.length - 1;\r\n\r\n px = items[len].x;\r\n py = items[len].y;\r\n\r\n for (i = len - 1; i >= 0; i--)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[len].x = x;\r\n items[len].y = y;\r\n }\r\n else\r\n {\r\n // Top to Bottom\r\n\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n for (i = 1; i < items.length; i++)\r\n {\r\n // Current item\r\n cur = items[i];\r\n\r\n // Get current item x/y, to be passed to the next item in the list\r\n cx = cur.x;\r\n cy = cur.y;\r\n\r\n // Set current item to the previous items x/y\r\n cur.x = px;\r\n cur.y = py;\r\n\r\n // Set current as previous\r\n px = cx;\r\n py = cy;\r\n }\r\n\r\n // Update the head item to the new x/y coordinates\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n }\r\n else\r\n {\r\n px = items[0].x;\r\n py = items[0].y;\r\n\r\n items[0].x = x;\r\n items[0].y = y;\r\n }\r\n\r\n // Return the final set of coordinates as they\'re effectively lost from the shift and may be needed\r\n\r\n output.x = px;\r\n output.y = py;\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ShiftPosition;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ShiftPosition.js?')},"./node_modules/phaser/src/actions/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayShuffle = __webpack_require__(/*! ../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the array in place. The shuffled array is both modified and returned.\r\n *\r\n * @function Phaser.Actions.Shuffle\r\n * @since 3.0.0\r\n * @see Phaser.Utils.Array.Shuffle\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar Shuffle = function (items)\r\n{\r\n return ArrayShuffle(items);\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Shuffle.js?')},"./node_modules/phaser/src/actions/SmoothStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmoothStep = __webpack_require__(/*! ../math/SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js");\r\n\r\n/**\r\n * Smoothstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmoothStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmoothStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmoothStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmoothStep.js?')},"./node_modules/phaser/src/actions/SmootherStep.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathSmootherStep = __webpack_require__(/*! ../math/SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js");\r\n\r\n/**\r\n * Smootherstep is a sigmoid-like interpolation and clamping function.\r\n * \r\n * The function depends on three parameters, the input x, the "left edge" and the "right edge", with the left edge being assumed smaller than the right edge. The function receives a real number x as an argument and returns 0 if x is less than or equal to the left edge, 1 if x is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial, between 0 and 1 otherwise. The slope of the smoothstep function is zero at both edges. This is convenient for creating a sequence of transitions using smoothstep to interpolate each segment as an alternative to using more sophisticated or expensive interpolation techniques.\r\n *\r\n * @function Phaser.Actions.SmootherStep\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to interpolate.\r\n * @param {number} min - The minimum interpolation value.\r\n * @param {number} max - The maximum interpolation value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar SmootherStep = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = MathSmootherStep(i * step, min, max);\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/SmootherStep.js?')},"./node_modules/phaser/src/actions/Spread.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and then modifies their `property` so the value equals, or is incremented, by the\r\n * calculated spread value.\r\n * \r\n * The spread value is derived from the given `min` and `max` values and the total number of items in the array.\r\n * \r\n * For example, to cause an array of Sprites to change in alpha from 0 to 1 you could call:\r\n * \r\n * ```javascript\r\n * Phaser.Actions.Spread(itemsArray, 'alpha', 0, 1);\r\n * ```\r\n *\r\n * @function Phaser.Actions.Spread\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {string} property - The property of the Game Object to spread.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n * @param {boolean} [inc=false] - Should the values be incremented? `true` or set (`false`)\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that were passed to this Action.\r\n */\r\nvar Spread = function (items, property, min, max, inc)\r\n{\r\n if (inc === undefined) { inc = false; }\r\n\r\n var step = Math.abs(max - min) / items.length;\r\n var i;\r\n\r\n if (inc)\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] += i * step + min;\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < items.length; i++)\r\n {\r\n items[i][property] = i * step + min;\r\n }\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = Spread;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/Spread.js?")},"./node_modules/phaser/src/actions/ToggleVisible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes an array of Game Objects and toggles the visibility of each one.\r\n * Those previously `visible = false` will become `visible = true`, and vice versa.\r\n *\r\n * @function Phaser.Actions.ToggleVisible\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar ToggleVisible = function (items)\r\n{\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].visible = !items[i].visible;\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = ToggleVisible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/ToggleVisible.js?")},"./node_modules/phaser/src/actions/WrapInRectangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author samme \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * Wrap each item's coordinates within a rectangle's area.\r\n *\r\n * @function Phaser.Actions.WrapInRectangle\r\n * @since 3.0.0\r\n * @see Phaser.Math.Wrap\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n * @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.\r\n *\r\n * @return {(array|Phaser.GameObjects.GameObject[])} The array of Game Objects that was passed to this Action.\r\n */\r\nvar WrapInRectangle = function (items, rect, padding)\r\n{\r\n if (padding === undefined)\r\n {\r\n padding = 0;\r\n }\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n var item = items[i];\r\n\r\n item.x = Wrap(item.x, rect.left - padding, rect.right + padding);\r\n item.y = Wrap(item.y, rect.top - padding, rect.bottom + padding);\r\n }\r\n\r\n return items;\r\n};\r\n\r\nmodule.exports = WrapInRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/WrapInRectangle.js?")},"./node_modules/phaser/src/actions/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Actions\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Angle: __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/actions/Angle.js"),\r\n Call: __webpack_require__(/*! ./Call */ "./node_modules/phaser/src/actions/Call.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/actions/GetFirst.js"),\r\n GetLast: __webpack_require__(/*! ./GetLast */ "./node_modules/phaser/src/actions/GetLast.js"),\r\n GridAlign: __webpack_require__(/*! ./GridAlign */ "./node_modules/phaser/src/actions/GridAlign.js"),\r\n IncAlpha: __webpack_require__(/*! ./IncAlpha */ "./node_modules/phaser/src/actions/IncAlpha.js"),\r\n IncX: __webpack_require__(/*! ./IncX */ "./node_modules/phaser/src/actions/IncX.js"),\r\n IncXY: __webpack_require__(/*! ./IncXY */ "./node_modules/phaser/src/actions/IncXY.js"),\r\n IncY: __webpack_require__(/*! ./IncY */ "./node_modules/phaser/src/actions/IncY.js"),\r\n PlaceOnCircle: __webpack_require__(/*! ./PlaceOnCircle */ "./node_modules/phaser/src/actions/PlaceOnCircle.js"),\r\n PlaceOnEllipse: __webpack_require__(/*! ./PlaceOnEllipse */ "./node_modules/phaser/src/actions/PlaceOnEllipse.js"),\r\n PlaceOnLine: __webpack_require__(/*! ./PlaceOnLine */ "./node_modules/phaser/src/actions/PlaceOnLine.js"),\r\n PlaceOnRectangle: __webpack_require__(/*! ./PlaceOnRectangle */ "./node_modules/phaser/src/actions/PlaceOnRectangle.js"),\r\n PlaceOnTriangle: __webpack_require__(/*! ./PlaceOnTriangle */ "./node_modules/phaser/src/actions/PlaceOnTriangle.js"),\r\n PlayAnimation: __webpack_require__(/*! ./PlayAnimation */ "./node_modules/phaser/src/actions/PlayAnimation.js"),\r\n PropertyValueInc: __webpack_require__(/*! ./PropertyValueInc */ "./node_modules/phaser/src/actions/PropertyValueInc.js"),\r\n PropertyValueSet: __webpack_require__(/*! ./PropertyValueSet */ "./node_modules/phaser/src/actions/PropertyValueSet.js"),\r\n RandomCircle: __webpack_require__(/*! ./RandomCircle */ "./node_modules/phaser/src/actions/RandomCircle.js"),\r\n RandomEllipse: __webpack_require__(/*! ./RandomEllipse */ "./node_modules/phaser/src/actions/RandomEllipse.js"),\r\n RandomLine: __webpack_require__(/*! ./RandomLine */ "./node_modules/phaser/src/actions/RandomLine.js"),\r\n RandomRectangle: __webpack_require__(/*! ./RandomRectangle */ "./node_modules/phaser/src/actions/RandomRectangle.js"),\r\n RandomTriangle: __webpack_require__(/*! ./RandomTriangle */ "./node_modules/phaser/src/actions/RandomTriangle.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/actions/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/actions/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/actions/RotateAroundDistance.js"),\r\n ScaleX: __webpack_require__(/*! ./ScaleX */ "./node_modules/phaser/src/actions/ScaleX.js"),\r\n ScaleXY: __webpack_require__(/*! ./ScaleXY */ "./node_modules/phaser/src/actions/ScaleXY.js"),\r\n ScaleY: __webpack_require__(/*! ./ScaleY */ "./node_modules/phaser/src/actions/ScaleY.js"),\r\n SetAlpha: __webpack_require__(/*! ./SetAlpha */ "./node_modules/phaser/src/actions/SetAlpha.js"),\r\n SetBlendMode: __webpack_require__(/*! ./SetBlendMode */ "./node_modules/phaser/src/actions/SetBlendMode.js"),\r\n SetDepth: __webpack_require__(/*! ./SetDepth */ "./node_modules/phaser/src/actions/SetDepth.js"),\r\n SetHitArea: __webpack_require__(/*! ./SetHitArea */ "./node_modules/phaser/src/actions/SetHitArea.js"),\r\n SetOrigin: __webpack_require__(/*! ./SetOrigin */ "./node_modules/phaser/src/actions/SetOrigin.js"),\r\n SetRotation: __webpack_require__(/*! ./SetRotation */ "./node_modules/phaser/src/actions/SetRotation.js"),\r\n SetScale: __webpack_require__(/*! ./SetScale */ "./node_modules/phaser/src/actions/SetScale.js"),\r\n SetScaleX: __webpack_require__(/*! ./SetScaleX */ "./node_modules/phaser/src/actions/SetScaleX.js"),\r\n SetScaleY: __webpack_require__(/*! ./SetScaleY */ "./node_modules/phaser/src/actions/SetScaleY.js"),\r\n SetTint: __webpack_require__(/*! ./SetTint */ "./node_modules/phaser/src/actions/SetTint.js"),\r\n SetVisible: __webpack_require__(/*! ./SetVisible */ "./node_modules/phaser/src/actions/SetVisible.js"),\r\n SetX: __webpack_require__(/*! ./SetX */ "./node_modules/phaser/src/actions/SetX.js"),\r\n SetXY: __webpack_require__(/*! ./SetXY */ "./node_modules/phaser/src/actions/SetXY.js"),\r\n SetY: __webpack_require__(/*! ./SetY */ "./node_modules/phaser/src/actions/SetY.js"),\r\n ShiftPosition: __webpack_require__(/*! ./ShiftPosition */ "./node_modules/phaser/src/actions/ShiftPosition.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/actions/Shuffle.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/actions/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/actions/SmoothStep.js"),\r\n Spread: __webpack_require__(/*! ./Spread */ "./node_modules/phaser/src/actions/Spread.js"),\r\n ToggleVisible: __webpack_require__(/*! ./ToggleVisible */ "./node_modules/phaser/src/actions/ToggleVisible.js"),\r\n WrapInRectangle: __webpack_require__(/*! ./WrapInRectangle */ "./node_modules/phaser/src/actions/WrapInRectangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/actions/index.js?')},"./node_modules/phaser/src/animations/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar FindClosestInSorted = __webpack_require__(/*! ../utils/array/FindClosestInSorted */ \"./node_modules/phaser/src/utils/array/FindClosestInSorted.js\");\r\nvar Frame = __webpack_require__(/*! ./AnimationFrame */ \"./node_modules/phaser/src/animations/AnimationFrame.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame based Animation.\r\n *\r\n * This consists of a key, some default values (like the frame rate) and a bunch of Frame objects.\r\n *\r\n * The Animation Manager creates these. Game Objects don't own an instance of these directly.\r\n * Game Objects have the Animation Component, which are like playheads to global Animations (these objects)\r\n * So multiple Game Objects can have playheads all pointing to this one Animation instance.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.Animations\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationManager} manager - A reference to the global Animation Manager\r\n * @param {string} key - The unique identifying string for this animation.\r\n * @param {Phaser.Types.Animations.Animation} config - The Animation configuration.\r\n */\r\nvar Animation = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Animation (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.Animations.Animation#manager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique identifying string for this animation.\r\n *\r\n * @name Phaser.Animations.Animation#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * A frame based animation (as opposed to a bone based animation)\r\n *\r\n * @name Phaser.Animations.Animation#type\r\n * @type {string}\r\n * @default frame\r\n * @since 3.0.0\r\n */\r\n this.type = 'frame';\r\n\r\n /**\r\n * Extract all the frame data into the frames array.\r\n *\r\n * @name Phaser.Animations.Animation#frames\r\n * @type {Phaser.Animations.AnimationFrame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = this.getFrames(\r\n manager.textureManager,\r\n GetValue(config, 'frames', []),\r\n GetValue(config, 'defaultTextureKey', null)\r\n );\r\n\r\n /**\r\n * The frame rate of playback in frames per second (default 24 if duration is null)\r\n *\r\n * @name Phaser.Animations.Animation#frameRate\r\n * @type {integer}\r\n * @default 24\r\n * @since 3.0.0\r\n */\r\n this.frameRate = GetValue(config, 'frameRate', null);\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.Animations.Animation#duration\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.duration = GetValue(config, 'duration', null);\r\n\r\n if (this.duration === null && this.frameRate === null)\r\n {\r\n // No duration or frameRate given, use default frameRate of 24fps\r\n this.frameRate = 24;\r\n this.duration = (this.frameRate / this.frames.length) * 1000;\r\n }\r\n else if (this.duration && this.frameRate === null)\r\n {\r\n // Duration given but no frameRate, so set the frameRate based on duration\r\n // I.e. 12 frames in the animation, duration = 4000 ms\r\n // So frameRate is 12 / (4000 / 1000) = 3 fps\r\n this.frameRate = this.frames.length / (this.duration / 1000);\r\n }\r\n else\r\n {\r\n // frameRate given, derive duration from it (even if duration also specified)\r\n // I.e. 15 frames in the animation, frameRate = 30 fps\r\n // So duration is 15 / 30 = 0.5 * 1000 (half a second, or 500ms)\r\n this.duration = (this.frames.length / this.frameRate) * 1000;\r\n }\r\n\r\n /**\r\n * How many ms per frame, not including frame specific modifiers.\r\n *\r\n * @name Phaser.Animations.Animation#msPerFrame\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 1000 / this.frameRate;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.Animations.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = GetValue(config, 'skipMissedFrames', true);\r\n\r\n /**\r\n * The delay in ms before the playback will begin.\r\n *\r\n * @name Phaser.Animations.Animation#delay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = GetValue(config, 'delay', 0);\r\n\r\n /**\r\n * Number of times to repeat the animation. Set to -1 to repeat forever.\r\n *\r\n * @name Phaser.Animations.Animation#repeat\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeat = GetValue(config, 'repeat', 0);\r\n\r\n /**\r\n * The delay in ms before the a repeat play starts.\r\n *\r\n * @name Phaser.Animations.Animation#repeatDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatDelay = GetValue(config, 'repeatDelay', 0);\r\n\r\n /**\r\n * Should the animation yoyo (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.Animations.Animation#yoyo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.yoyo = GetValue(config, 'yoyo', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `true` when the animation starts to play?\r\n *\r\n * @name Phaser.Animations.Animation#showOnStart\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.showOnStart = GetValue(config, 'showOnStart', false);\r\n\r\n /**\r\n * Should the GameObject's `visible` property be set to `false` when the animation finishes?\r\n *\r\n * @name Phaser.Animations.Animation#hideOnComplete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hideOnComplete = GetValue(config, 'hideOnComplete', false);\r\n\r\n /**\r\n * Global pause. All Game Objects using this Animation instance are impacted by this property.\r\n *\r\n * @name Phaser.Animations.Animation#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n this.manager.on(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.on(Events.RESUME_ALL, this.resume, this);\r\n },\r\n\r\n /**\r\n * Add frames to the end of the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrame: function (config)\r\n {\r\n return this.addFrameAt(this.frames.length, config);\r\n },\r\n\r\n /**\r\n * Add frame/s into the animation.\r\n *\r\n * @method Phaser.Animations.Animation#addFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to insert the frame at within the animation.\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n addFrameAt: function (index, config)\r\n {\r\n var newFrames = this.getFrames(this.manager.textureManager, config);\r\n\r\n if (newFrames.length > 0)\r\n {\r\n if (index === 0)\r\n {\r\n this.frames = newFrames.concat(this.frames);\r\n }\r\n else if (index === this.frames.length)\r\n {\r\n this.frames = this.frames.concat(newFrames);\r\n }\r\n else\r\n {\r\n var pre = this.frames.slice(0, index);\r\n var post = this.frames.slice(index);\r\n\r\n this.frames = pre.concat(newFrames, post);\r\n }\r\n\r\n this.updateFrameSequence();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the given frame index is valid.\r\n *\r\n * @method Phaser.Animations.Animation#checkFrame\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index to be checked.\r\n *\r\n * @return {boolean} `true` if the index is valid, otherwise `false`.\r\n */\r\n checkFrame: function (index)\r\n {\r\n return (index >= 0 && index < this.frames.length);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#completeAnimation\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n completeAnimation: function (component)\r\n {\r\n if (this.hideOnComplete)\r\n {\r\n component.parent.visible = false;\r\n }\r\n\r\n component.stop();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFirstTick\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n * @param {boolean} [includeDelay=true] - [description]\r\n */\r\n getFirstTick: function (component, includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = true; }\r\n\r\n // When is the first update due?\r\n component.accumulator = 0;\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n\r\n if (includeDelay)\r\n {\r\n component.nextTick += component._delay;\r\n }\r\n },\r\n\r\n /**\r\n * Returns the AnimationFrame at the provided index\r\n *\r\n * @method Phaser.Animations.Animation#getFrameAt\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame at the index provided from the animation sequence\r\n */\r\n getFrameAt: function (index)\r\n {\r\n return this.frames[index];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getFrames\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - [description]\r\n * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description]\r\n * @param {string} [defaultTextureKey] - [description]\r\n *\r\n * @return {Phaser.Animations.AnimationFrame[]} [description]\r\n */\r\n getFrames: function (textureManager, frames, defaultTextureKey)\r\n {\r\n var out = [];\r\n var prev;\r\n var animationFrame;\r\n var index = 1;\r\n var i;\r\n var textureKey;\r\n\r\n // if frames is a string, we'll get all the frames from the texture manager as if it's a sprite sheet\r\n if (typeof frames === 'string')\r\n {\r\n textureKey = frames;\r\n\r\n var texture = textureManager.get(textureKey);\r\n var frameKeys = texture.getFrameNames();\r\n\r\n frames = [];\r\n\r\n frameKeys.forEach(function (idx, value)\r\n {\r\n frames.push({ key: textureKey, frame: value });\r\n });\r\n }\r\n\r\n if (!Array.isArray(frames) || frames.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n var item = frames[i];\r\n\r\n var key = GetValue(item, 'key', defaultTextureKey);\r\n\r\n if (!key)\r\n {\r\n continue;\r\n }\r\n\r\n // Could be an integer or a string\r\n var frame = GetValue(item, 'frame', 0);\r\n\r\n // The actual texture frame\r\n var textureFrame = textureManager.getFrame(key, frame);\r\n\r\n animationFrame = new Frame(key, frame, index, textureFrame);\r\n\r\n animationFrame.duration = GetValue(item, 'duration', 0);\r\n\r\n animationFrame.isFirst = (!prev);\r\n\r\n // The previously created animationFrame\r\n if (prev)\r\n {\r\n prev.nextFrame = animationFrame;\r\n\r\n animationFrame.prevFrame = prev;\r\n }\r\n\r\n out.push(animationFrame);\r\n\r\n prev = animationFrame;\r\n\r\n index++;\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n animationFrame.isLast = true;\r\n\r\n // Link them end-to-end, so they loop\r\n animationFrame.nextFrame = out[0];\r\n\r\n out[0].prevFrame = animationFrame;\r\n\r\n // Generate the progress data\r\n\r\n var slice = 1 / (out.length - 1);\r\n\r\n for (i = 0; i < out.length; i++)\r\n {\r\n out[i].progress = i * slice;\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#getNextTick\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n getNextTick: function (component)\r\n {\r\n // accumulator += delta * _timeScale\r\n // after a large delta surge (perf issue for example) we need to adjust for it here\r\n\r\n // When is the next update due?\r\n component.accumulator -= component.nextTick;\r\n\r\n component.nextTick = component.msPerFrame + component.currentFrame.duration;\r\n },\r\n\r\n /**\r\n * Loads the Animation values into the Animation Component.\r\n *\r\n * @method Phaser.Animations.Animation#load\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to load values into.\r\n * @param {integer} startFrame - The start frame of the animation to load.\r\n */\r\n load: function (component, startFrame)\r\n {\r\n if (startFrame >= this.frames.length)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (component.currentAnim !== this)\r\n {\r\n component.currentAnim = this;\r\n\r\n component.frameRate = this.frameRate;\r\n component.duration = this.duration;\r\n component.msPerFrame = this.msPerFrame;\r\n component.skipMissedFrames = this.skipMissedFrames;\r\n\r\n component._delay = this.delay;\r\n component._repeat = this.repeat;\r\n component._repeatDelay = this.repeatDelay;\r\n component._yoyo = this.yoyo;\r\n }\r\n\r\n var frame = this.frames[startFrame];\r\n\r\n if (startFrame === 0 && !component.forward)\r\n {\r\n frame = this.getLastFrame();\r\n }\r\n\r\n component.updateFrame(frame);\r\n },\r\n\r\n /**\r\n * Returns the frame closest to the given progress value between 0 and 1.\r\n *\r\n * @method Phaser.Animations.Animation#getFrameByProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} The frame closest to the given progress value.\r\n */\r\n getFrameByProgress: function (value)\r\n {\r\n value = Clamp(value, 0, 1);\r\n\r\n return FindClosestInSorted(value, this.frames, 'progress');\r\n },\r\n\r\n /**\r\n * Advance the animation frame.\r\n *\r\n * @method Phaser.Animations.Animation#nextFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n */\r\n nextFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isLast)\r\n {\r\n // We're at the end of the animation\r\n\r\n // Yoyo? (happens before repeat)\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, false);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n // Repeat (happens before complete)\r\n\r\n if (component._reverse && component.forward)\r\n {\r\n component.forward = false;\r\n }\r\n else\r\n {\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.nextFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Handle the yoyo functionality in nextFrame and previousFrame methods.\r\n *\r\n * @method Phaser.Animations.Animation#handleYoyoFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component to advance.\r\n * @param {boolean} isReverse - Is animation in reverse mode? (Default: false)\r\n */\r\n handleYoyoFrame: function (component, isReverse)\r\n {\r\n if (!isReverse) { isReverse = false; }\r\n\r\n if (component._reverse === !isReverse && component.repeatCounter > 0)\r\n {\r\n component.forward = isReverse;\r\n\r\n this.repeatAnimation(component);\r\n\r\n return;\r\n }\r\n\r\n if (component._reverse !== isReverse && component.repeatCounter === 0)\r\n {\r\n this.completeAnimation(component);\r\n\r\n return;\r\n }\r\n \r\n component.forward = isReverse;\r\n\r\n var frame = (isReverse) ? component.currentFrame.nextFrame : component.currentFrame.prevFrame;\r\n\r\n this.updateAndGetNextTick(component, frame);\r\n },\r\n\r\n /**\r\n * Returns the animation last frame.\r\n *\r\n * @method Phaser.Animations.Animation#getLastFrame\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.Animations.AnimationFrame} component - The Animation Last Frame.\r\n */\r\n getLastFrame: function ()\r\n {\r\n return this.frames[this.frames.length - 1];\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#previousFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n previousFrame: function (component)\r\n {\r\n var frame = component.currentFrame;\r\n\r\n // TODO: Add frame skip support\r\n\r\n if (frame.isFirst)\r\n {\r\n // We're at the start of the animation\r\n\r\n if (component._yoyo)\r\n {\r\n this.handleYoyoFrame(component, true);\r\n }\r\n else if (component.repeatCounter > 0)\r\n {\r\n if (component._reverse && !component.forward)\r\n {\r\n component.currentFrame = this.getLastFrame();\r\n this.repeatAnimation(component);\r\n }\r\n else\r\n {\r\n // Repeat (happens before complete)\r\n component.forward = true;\r\n this.repeatAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.completeAnimation(component);\r\n }\r\n }\r\n else\r\n {\r\n this.updateAndGetNextTick(component, frame.prevFrame);\r\n }\r\n },\r\n\r\n /**\r\n * Update Frame and Wait next tick.\r\n *\r\n * @method Phaser.Animations.Animation#updateAndGetNextTick\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - An Animation frame.\r\n */\r\n updateAndGetNextTick: function (component, frame)\r\n {\r\n component.updateFrame(frame);\r\n\r\n this.getNextTick(component);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#removeFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - [description]\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrame: function (frame)\r\n {\r\n var index = this.frames.indexOf(frame);\r\n\r\n if (index !== -1)\r\n {\r\n this.removeFrameAt(index);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a frame from the AnimationFrame array at the provided index\r\n * and updates the animation accordingly.\r\n *\r\n * @method Phaser.Animations.Animation#removeFrameAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index in the AnimationFrame array\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n removeFrameAt: function (index)\r\n {\r\n this.frames.splice(index, 1);\r\n\r\n this.updateFrameSequence();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#repeatAnimation\r\n * @fires Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n repeatAnimation: function (component)\r\n {\r\n if (component._pendingStop === 2)\r\n {\r\n return this.completeAnimation(component);\r\n }\r\n\r\n if (component._repeatDelay > 0 && component.pendingRepeat === false)\r\n {\r\n component.pendingRepeat = true;\r\n component.accumulator -= component.nextTick;\r\n component.nextTick += component._repeatDelay;\r\n }\r\n else\r\n {\r\n component.repeatCounter--;\r\n\r\n component.updateFrame(component.currentFrame[(component.forward) ? 'nextFrame' : 'prevFrame']);\r\n\r\n if (component.isPlaying)\r\n {\r\n this.getNextTick(component);\r\n\r\n component.pendingRepeat = false;\r\n\r\n var frame = component.currentFrame;\r\n var parent = component.parent;\r\n\r\n this.emit(Events.ANIMATION_REPEAT, this, frame);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_KEY_REPEAT + this.key, this, frame, component.repeatCounter, parent);\r\n\r\n parent.emit(Events.SPRITE_ANIMATION_REPEAT, this, frame, component.repeatCounter, parent);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture frame the animation uses for rendering.\r\n *\r\n * @method Phaser.Animations.Animation#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.Animation} component - [description]\r\n */\r\n setFrame: function (component)\r\n {\r\n // Work out which frame should be set next on the child, and set it\r\n if (component.forward)\r\n {\r\n this.nextFrame(component);\r\n }\r\n else\r\n {\r\n this.previousFrame(component);\r\n }\r\n },\r\n\r\n /**\r\n * Converts the animation data to JSON.\r\n *\r\n * @method Phaser.Animations.Animation#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimation} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n key: this.key,\r\n type: this.type,\r\n frames: [],\r\n frameRate: this.frameRate,\r\n duration: this.duration,\r\n skipMissedFrames: this.skipMissedFrames,\r\n delay: this.delay,\r\n repeat: this.repeat,\r\n repeatDelay: this.repeatDelay,\r\n yoyo: this.yoyo,\r\n showOnStart: this.showOnStart,\r\n hideOnComplete: this.hideOnComplete\r\n };\r\n\r\n this.frames.forEach(function (frame)\r\n {\r\n output.frames.push(frame.toJSON());\r\n });\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#updateFrameSequence\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n updateFrameSequence: function ()\r\n {\r\n var len = this.frames.length;\r\n var slice = 1 / (len - 1);\r\n\r\n var frame;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n frame = this.frames[i];\r\n\r\n frame.index = i + 1;\r\n frame.isFirst = false;\r\n frame.isLast = false;\r\n frame.progress = i * slice;\r\n\r\n if (i === 0)\r\n {\r\n frame.isFirst = true;\r\n\r\n if (len === 1)\r\n {\r\n frame.isLast = true;\r\n frame.nextFrame = frame;\r\n frame.prevFrame = frame;\r\n }\r\n else\r\n {\r\n frame.isLast = false;\r\n frame.prevFrame = this.frames[len - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n else if (i === len - 1 && len > 1)\r\n {\r\n frame.isLast = true;\r\n frame.prevFrame = this.frames[len - 2];\r\n frame.nextFrame = this.frames[0];\r\n }\r\n else if (len > 1)\r\n {\r\n frame.prevFrame = this.frames[i - 1];\r\n frame.nextFrame = this.frames[i + 1];\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n pause: function ()\r\n {\r\n this.paused = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.Animation} This Animation object.\r\n */\r\n resume: function ()\r\n {\r\n this.paused = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager.off(Events.PAUSE_ALL, this.pause, this);\r\n this.manager.off(Events.RESUME_ALL, this.resume, this);\r\n\r\n this.manager.remove(this.key);\r\n\r\n for (var i = 0; i < this.frames.length; i++)\r\n {\r\n this.frames[i].destroy();\r\n }\r\n\r\n this.frames = [];\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/Animation.js?")},"./node_modules/phaser/src/animations/AnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single frame in an Animation sequence.\r\n *\r\n * An AnimationFrame consists of a reference to the Texture it uses for rendering, references to other\r\n * frames in the animation, and index data. It also has the ability to modify the animation timing.\r\n *\r\n * AnimationFrames are generated automatically by the Animation class.\r\n *\r\n * @class AnimationFrame\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} textureKey - The key of the Texture this AnimationFrame uses.\r\n * @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.\r\n * @param {integer} index - The index of this AnimationFrame within the Animation sequence.\r\n * @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n */\r\nvar AnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function AnimationFrame (textureKey, textureFrame, index, frame)\r\n {\r\n /**\r\n * The key of the Texture this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.textureKey = textureKey;\r\n\r\n /**\r\n * The key of the Frame within the Texture that this AnimationFrame uses.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#textureFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.textureFrame = textureFrame;\r\n\r\n /**\r\n * The index of this AnimationFrame within the Animation sequence.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * A reference to the Texture Frame this AnimationFrame uses for rendering.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * Is this the first frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isFirst\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isFirst = false;\r\n\r\n /**\r\n * Is this the last frame in an animation sequence?\r\n *\r\n * @name Phaser.Animations.AnimationFrame#isLast\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isLast = false;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes before this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#prevFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.prevFrame = null;\r\n\r\n /**\r\n * A reference to the AnimationFrame that comes after this one in the animation, if any.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#nextFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.nextFrame = null;\r\n\r\n /**\r\n * Additional time (in ms) that this frame should appear for during playback.\r\n * The value is added onto the msPerFrame set by the animation.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * What % through the animation does this frame come?\r\n * This value is generated when the animation is created and cached here.\r\n *\r\n * @name Phaser.Animations.AnimationFrame#progress\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n },\r\n\r\n /**\r\n * Generates a JavaScript object suitable for converting to JSON.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimationFrame} The AnimationFrame data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n key: this.textureKey,\r\n frame: this.textureFrame,\r\n duration: this.duration\r\n };\r\n },\r\n\r\n /**\r\n * Destroys this object by removing references to external resources and callbacks.\r\n *\r\n * @method Phaser.Animations.AnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.frame = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationFrame.js?')},"./node_modules/phaser/src/animations/AnimationManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Animation = __webpack_require__(/*! ./Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ \"./node_modules/phaser/src/structs/Map.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Pad = __webpack_require__(/*! ../utils/string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Animation Manager.\r\n *\r\n * Animations are managed by the global Animation Manager. This is a singleton class that is\r\n * responsible for creating and delivering animations and their corresponding data to all Game Objects.\r\n * Unlike plugins it is owned by the Game instance, not the Scene.\r\n *\r\n * Sprites and other Game Objects get the data they need from the AnimationManager.\r\n *\r\n * @class AnimationManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Animations\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar AnimationManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function AnimationManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Animations.AnimationManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.textureManager = null;\r\n\r\n /**\r\n * The global time scale of the Animation Manager.\r\n *\r\n * This scales the time delta between two frames, thus influencing the speed of time for the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#globalTimeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.globalTimeScale = 1;\r\n\r\n /**\r\n * The Animations registered in the Animation Manager.\r\n *\r\n * This map should be modified with the {@link #add} and {@link #create} methods of the Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#anims\r\n * @type {Phaser.Structs.Map.}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.anims = new CustomMap();\r\n\r\n /**\r\n * Whether the Animation Manager is paused along with all of its Animations.\r\n *\r\n * @name Phaser.Animations.AnimationManager#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * The name of this Animation Manager.\r\n *\r\n * @name Phaser.Animations.AnimationManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'AnimationManager';\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * Registers event listeners after the Game boots.\r\n *\r\n * @method Phaser.Animations.AnimationManager#boot\r\n * @listens Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.textureManager = this.game.textures;\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Animation to the Animation Manager.\r\n *\r\n * @method Phaser.Animations.AnimationManager#add\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique.\r\n * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n add: function (key, animation)\r\n {\r\n if (this.anims.has(key))\r\n {\r\n console.warn('Animation key exists: ' + key);\r\n\r\n return;\r\n }\r\n\r\n animation.key = key;\r\n\r\n this.anims.set(key, animation);\r\n\r\n this.emit(Events.ADD_ANIMATION, key, animation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the given key is already in use within the Animation Manager or not.\r\n * \r\n * Animations are global. Keys created in one scene can be used from any other Scene in your game. They are not Scene specific.\r\n *\r\n * @method Phaser.Animations.AnimationManager#exists\r\n * @since 3.16.0\r\n *\r\n * @param {string} key - The key of the Animation to check.\r\n *\r\n * @return {boolean} `true` if the Animation already exists in the Animation Manager, or `false` if the key is available.\r\n */\r\n exists: function (key)\r\n {\r\n return this.anims.has(key);\r\n },\r\n\r\n /**\r\n * Creates a new Animation and adds it to the Animation Manager.\r\n * \r\n * Animations are global. Once created, you can use them in any Scene in your game. They are not Scene specific.\r\n * \r\n * If an invalid key is given this method will return `false`.\r\n * \r\n * If you pass the key of an animation that already exists in the Animation Manager, that animation will be returned.\r\n * \r\n * A brand new animation is only created if the key is valid and not already in use.\r\n * \r\n * If you wish to re-use an existing key, call `AnimationManager.remove` first, then this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#create\r\n * @fires Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Animations.Animation} config - The configuration settings for the Animation.\r\n *\r\n * @return {(Phaser.Animations.Animation|false)} The Animation that was created, or `false` is the key is already in use.\r\n */\r\n create: function (config)\r\n {\r\n var key = config.key;\r\n\r\n var anim = false;\r\n\r\n if (key)\r\n {\r\n anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n anim = new Animation(this, key, config);\r\n\r\n this.anims.set(key, anim);\r\n \r\n this.emit(Events.ADD_ANIMATION, key, anim);\r\n }\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Loads this Animation Manager's Animations and settings from a JSON object.\r\n *\r\n * @method Phaser.Animations.AnimationManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Animations.JSONAnimations|Phaser.Types.Animations.JSONAnimation)} data - The JSON object to parse.\r\n * @param {boolean} [clearCurrentAnimations=false] - If set to `true`, the current animations will be removed (`anims.clear()`). If set to `false` (default), the animations in `data` will be added.\r\n *\r\n * @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.\r\n */\r\n fromJSON: function (data, clearCurrentAnimations)\r\n {\r\n if (clearCurrentAnimations === undefined) { clearCurrentAnimations = false; }\r\n\r\n if (clearCurrentAnimations)\r\n {\r\n this.anims.clear();\r\n }\r\n\r\n // Do we have a String (i.e. from JSON, or an Object?)\r\n if (typeof data === 'string')\r\n {\r\n data = JSON.parse(data);\r\n }\r\n\r\n var output = [];\r\n\r\n // Array of animations, or a single animation?\r\n if (data.hasOwnProperty('anims') && Array.isArray(data.anims))\r\n {\r\n for (var i = 0; i < data.anims.length; i++)\r\n {\r\n output.push(this.create(data.anims[i]));\r\n }\r\n\r\n if (data.hasOwnProperty('globalTimeScale'))\r\n {\r\n this.globalTimeScale = data.globalTimeScale;\r\n }\r\n }\r\n else if (data.hasOwnProperty('key') && data.type === 'frame')\r\n {\r\n output.push(this.create(data));\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNames} [config] - The configuration object for the animation frame names.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNames: function (key, config)\r\n {\r\n var prefix = GetValue(config, 'prefix', '');\r\n var start = GetValue(config, 'start', 0);\r\n var end = GetValue(config, 'end', 0);\r\n var suffix = GetValue(config, 'suffix', '');\r\n var zeroPad = GetValue(config, 'zeroPad', 0);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n var diff = (start < end) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n end += diff;\r\n\r\n var i;\r\n var frame;\r\n\r\n if (!config)\r\n {\r\n // Use every frame in the atlas?\r\n frames = texture.getFrameNames();\r\n\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n else if (Array.isArray(frames))\r\n {\r\n // Have they provided their own custom frame sequence array?\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n frame = prefix + Pad(frames[i], zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = start; i !== end; i += diff)\r\n {\r\n frame = prefix + Pad(i, zeroPad, '0', 1) + suffix;\r\n\r\n if (texture.has(frame))\r\n {\r\n out.push({ key: key, frame: frame });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object.\r\n *\r\n * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}.\r\n *\r\n * @method Phaser.Animations.AnimationManager#generateFrameNumbers\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key for the texture containing the animation frames.\r\n * @param {Phaser.Types.Animations.GenerateFrameNumbers} config - The configuration object for the animation frames.\r\n *\r\n * @return {Phaser.Types.Animations.AnimationFrame[]} The array of {@link Phaser.Types.Animations.AnimationFrame} objects.\r\n */\r\n generateFrameNumbers: function (key, config)\r\n {\r\n var startFrame = GetValue(config, 'start', 0);\r\n var endFrame = GetValue(config, 'end', -1);\r\n var firstFrame = GetValue(config, 'first', false);\r\n var out = GetValue(config, 'outputArray', []);\r\n var frames = GetValue(config, 'frames', false);\r\n\r\n var texture = this.textureManager.get(key);\r\n\r\n if (!texture)\r\n {\r\n return out;\r\n }\r\n\r\n if (firstFrame && texture.has(firstFrame))\r\n {\r\n out.push({ key: key, frame: firstFrame });\r\n }\r\n\r\n var i;\r\n\r\n // Have they provided their own custom frame sequence array?\r\n if (Array.isArray(frames))\r\n {\r\n for (i = 0; i < frames.length; i++)\r\n {\r\n if (texture.has(frames[i]))\r\n {\r\n out.push({ key: key, frame: frames[i] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // No endFrame then see if we can get it\r\n if (endFrame === -1)\r\n {\r\n endFrame = texture.frameTotal;\r\n }\r\n\r\n var diff = (startFrame < endFrame) ? 1 : -1;\r\n\r\n // Adjust because we use i !== end in the for loop\r\n endFrame += diff;\r\n\r\n for (i = startFrame; i !== endFrame; i += diff)\r\n {\r\n if (texture.has(i))\r\n {\r\n out.push({ key: key, frame: i });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Get an Animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Animation to retrieve.\r\n *\r\n * @return {Phaser.Animations.Animation} The Animation.\r\n */\r\n get: function (key)\r\n {\r\n return this.anims.get(key);\r\n },\r\n\r\n /**\r\n * Load an Animation into a Game Object's Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#load\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to load the animation into.\r\n * @param {string} key - The key of the animation to load.\r\n * @param {(string|integer)} [startFrame] - The name of a start frame to set on the loaded animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object with the animation loaded into it.\r\n */\r\n load: function (child, key, startFrame)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n anim.load(child, startFrame);\r\n }\r\n else\r\n {\r\n console.warn('Missing animation: ' + key);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Pause all animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#pauseAll\r\n * @fires Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n if (!this.paused)\r\n {\r\n this.paused = true;\r\n\r\n this.emit(Events.PAUSE_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Play an animation on the given Game Objects that have an Animation Component.\r\n *\r\n * @method Phaser.Animations.AnimationManager#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Object.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n play: function (key, child)\r\n {\r\n if (!Array.isArray(child))\r\n {\r\n child = [ child ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < child.length; i++)\r\n {\r\n child[i].anims.play(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove an animation.\r\n *\r\n * @method Phaser.Animations.AnimationManager#remove\r\n * @fires Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to remove.\r\n *\r\n * @return {Phaser.Animations.Animation} [description]\r\n */\r\n remove: function (key)\r\n {\r\n var anim = this.get(key);\r\n\r\n if (anim)\r\n {\r\n this.emit(Events.REMOVE_ANIMATION, key, anim);\r\n\r\n this.anims.delete(key);\r\n }\r\n\r\n return anim;\r\n },\r\n\r\n /**\r\n * Resume all paused animations.\r\n *\r\n * @method Phaser.Animations.AnimationManager#resumeAll\r\n * @fires Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.emit(Events.RESUME_ALL);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects that have an Animation Component and then\r\n * starts the given animation playing on them, each one offset by the\r\n * `stagger` amount given to this method.\r\n *\r\n * @method Phaser.Animations.AnimationManager#staggerPlay\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [items,$return]\r\n *\r\n * @param {string} key - The key of the animation to play on the Game Objects.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component.\r\n * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by.\r\n *\r\n * @return {Phaser.Animations.AnimationManager} This Animation Manager.\r\n */\r\n staggerPlay: function (key, children, stagger)\r\n {\r\n if (stagger === undefined) { stagger = 0; }\r\n\r\n if (!Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n\r\n var anim = this.get(key);\r\n\r\n if (!anim)\r\n {\r\n return;\r\n }\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n children[i].anims.delayedPlay(stagger * i, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided.\r\n *\r\n * @method Phaser.Animations.AnimationManager#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - [description]\r\n *\r\n * @return {Phaser.Types.Animations.JSONAnimations} [description]\r\n */\r\n toJSON: function (key)\r\n {\r\n if (key !== undefined && key !== '')\r\n {\r\n return this.anims.get(key).toJSON();\r\n }\r\n else\r\n {\r\n var output = {\r\n anims: [],\r\n globalTimeScale: this.globalTimeScale\r\n };\r\n\r\n this.anims.each(function (animationKey, animation)\r\n {\r\n output.anims.push(animation.toJSON());\r\n });\r\n\r\n return output;\r\n }\r\n },\r\n\r\n /**\r\n * Destroy this Animation Manager and clean up animation definitions and references to other objects.\r\n * This method should not be called directly. It will be called automatically as a response to a `destroy` event from the Phaser.Game instance.\r\n *\r\n * @method Phaser.Animations.AnimationManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.anims.clear();\r\n\r\n this.textureManager = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = AnimationManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/AnimationManager.js?")},"./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Add Animation Event.\r\n * \r\n * This event is dispatched when a new animation is added to the global Animation Manager.\r\n * \r\n * This can happen either as a result of an animation instance being added to the Animation Manager,\r\n * or the Animation Manager creating a new animation directly.\r\n *\r\n * @event Phaser.Animations.Events#ADD_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was added to the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the newly created Animation.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Complete Event.\r\n * \r\n * This event is dispatched by an Animation instance when it completes, i.e. finishes playing or is manually stopped.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all complete the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Repeat Event.\r\n * \r\n * This event is dispatched when a currently playing animation repeats.\r\n * \r\n * The event is dispatched directly from the Animation object itself. Which means that listeners\r\n * bound to this event will be invoked every time the Animation repeats, for every Game Object that may have it.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that repeated.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation was on when it repeated.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Restart Event.\r\n * \r\n * This event is dispatched by an Animation instance when it restarts.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all restart the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that restarted playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'restart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Animation Start Event.\r\n * \r\n * This event is dispatched by an Animation instance when it starts playing.\r\n * \r\n * Be careful with the volume of events this could generate. If a group of Sprites all play the same\r\n * animation at the same time, this event will invoke its handler for each one of them.\r\n *\r\n * @event Phaser.Animations.Events#ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that started playing.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager is told to pause.\r\n * \r\n * When this happens all current animations will stop updating, although it doesn't necessarily mean\r\n * that the game has paused as well.\r\n *\r\n * @event Phaser.Animations.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Animation Event.\r\n * \r\n * This event is dispatched when an animation is removed from the global Animation Manager.\r\n *\r\n * @event Phaser.Animations.Events#REMOVE_ANIMATION\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Animation that was removed from the global Animation Manager.\r\n * @param {Phaser.Animations.Animation} animation - An instance of the removed Animation.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js?")},"./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Animations Event.\r\n * \r\n * This event is dispatched when the global Animation Manager resumes, having been previously paused.\r\n * \r\n * When this happens all current animations will continue updating again.\r\n *\r\n * @event Phaser.Animations.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_COMPLETE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Complete Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation finishes playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationcomplete-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationcomplete-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that completed.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation completed on.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation completed.\r\n */\r\nmodule.exports = 'animationcomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrepeat-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationrestart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Start Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationstart-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Key Update Event.\r\n * \r\n * This event is dispatched by a Sprite when a specific animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate-key', listener)` where `key` is the key of\r\n * the animation. For example, if you had an animation with the key 'explode' you should listen for `animationupdate-explode`.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Repeat Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation repeats playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrepeat', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_REPEAT` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_REPEAT\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that is repeating on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {integer} repeatCount - The number of times the Animation has repeated so far.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation repeated playing.\r\n */\r\nmodule.exports = 'animationrepeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Restart Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation restarts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationrestart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_RESTART` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_RESTART\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was restarted on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation restarted with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation restarted playing.\r\n */\r\nmodule.exports = 'animationrestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Start Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation starts playing on it.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationstart', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_START` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_START\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that was started on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame that the Animation started with.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation started playing.\r\n */\r\nmodule.exports = 'animationstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js?")},"./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sprite Animation Update Event.\r\n * \r\n * This event is dispatched by a Sprite when an animation playing on it updates. This happens when the animation changes frame,\r\n * based on the animation frame rate and other factors like `timeScale` and `delay`.\r\n * \r\n * Listen for it on the Sprite using `sprite.on('animationupdate', listener)`\r\n * \r\n * This same event is dispatched for all animations. To listen for a specific animation, use the `SPRITE_ANIMATION_KEY_UPDATE` event.\r\n *\r\n * @event Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Animations.Animation} animation - A reference to the Animation that has updated on the Sprite.\r\n * @param {Phaser.Animations.AnimationFrame} frame - The current Animation Frame of the Animation.\r\n * @param {Phaser.GameObjects.Sprite} gameObject - A reference to the Game Object on which the animation updated.\r\n */\r\nmodule.exports = 'animationupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js?")},"./node_modules/phaser/src/animations/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD_ANIMATION: __webpack_require__(/*! ./ADD_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js"),\r\n ANIMATION_COMPLETE: __webpack_require__(/*! ./ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js"),\r\n ANIMATION_REPEAT: __webpack_require__(/*! ./ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js"),\r\n ANIMATION_RESTART: __webpack_require__(/*! ./ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js"),\r\n ANIMATION_START: __webpack_require__(/*! ./ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js"),\r\n REMOVE_ANIMATION: __webpack_require__(/*! ./REMOVE_ANIMATION_EVENT */ "./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js"),\r\n SPRITE_ANIMATION_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_START: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js"),\r\n SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_KEY_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js"),\r\n SPRITE_ANIMATION_REPEAT: __webpack_require__(/*! ./SPRITE_ANIMATION_REPEAT_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js"),\r\n SPRITE_ANIMATION_RESTART: __webpack_require__(/*! ./SPRITE_ANIMATION_RESTART_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js"),\r\n SPRITE_ANIMATION_START: __webpack_require__(/*! ./SPRITE_ANIMATION_START_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js"),\r\n SPRITE_ANIMATION_UPDATE: __webpack_require__(/*! ./SPRITE_ANIMATION_UPDATE_EVENT */ "./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/events/index.js?')},"./node_modules/phaser/src/animations/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Animations\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/animations/Animation.js"),\r\n AnimationFrame: __webpack_require__(/*! ./AnimationFrame */ "./node_modules/phaser/src/animations/AnimationFrame.js"),\r\n AnimationManager: __webpack_require__(/*! ./AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/animations/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/animations/index.js?')},"./node_modules/phaser/src/cache/BaseCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CustomMap = __webpack_require__(/*! ../structs/Map */ "./node_modules/phaser/src/structs/Map.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The BaseCache is a base Cache class that can be used for storing references to any kind of data.\r\n *\r\n * Data can be added, retrieved and removed based on the given keys.\r\n *\r\n * Keys are string-based.\r\n *\r\n * @class BaseCache\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar BaseCache = new Class({\r\n\r\n initialize:\r\n\r\n function BaseCache ()\r\n {\r\n /**\r\n * The Map in which the cache objects are stored.\r\n *\r\n * You can query the Map directly or use the BaseCache methods.\r\n *\r\n * @name Phaser.Cache.BaseCache#entries\r\n * @type {Phaser.Structs.Map.}\r\n * @since 3.0.0\r\n */\r\n this.entries = new CustomMap();\r\n\r\n /**\r\n * An instance of EventEmitter used by the cache to emit related events.\r\n *\r\n * @name Phaser.Cache.BaseCache#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n },\r\n\r\n /**\r\n * Adds an item to this cache. The item is referenced by a unique string, which you are responsible\r\n * for setting and keeping track of. The item can only be retrieved by using this string.\r\n *\r\n * @method Phaser.Cache.BaseCache#add\r\n * @fires Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key by which the data added to the cache will be referenced.\r\n * @param {*} data - The data to be stored in the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n add: function (key, data)\r\n {\r\n this.entries.set(key, data);\r\n\r\n this.events.emit(Events.ADD, this, key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.exists`.\r\n *\r\n * @method Phaser.Cache.BaseCache#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Checks if this cache contains an item matching the given key.\r\n * This performs the same action as `BaseCache.has` and is called directly by the Loader.\r\n *\r\n * @method Phaser.Cache.BaseCache#exists\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique key of the item to be checked in this cache.\r\n *\r\n * @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.\r\n */\r\n exists: function (key)\r\n {\r\n return this.entries.has(key);\r\n },\r\n\r\n /**\r\n * Gets an item from this cache based on the given key.\r\n *\r\n * @method Phaser.Cache.BaseCache#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to be retrieved from this cache.\r\n *\r\n * @return {*} The item in the cache, or `null` if no item matching the given key was found.\r\n */\r\n get: function (key)\r\n {\r\n return this.entries.get(key);\r\n },\r\n\r\n /**\r\n * Removes and item from this cache based on the given key.\r\n *\r\n * If an entry matching the key is found it is removed from the cache and a `remove` event emitted.\r\n * No additional checks are done on the item removed. If other systems or parts of your game code\r\n * are relying on this item, it is up to you to sever those relationships prior to removing the item.\r\n *\r\n * @method Phaser.Cache.BaseCache#remove\r\n * @fires Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of the item to remove from the cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} This BaseCache object.\r\n */\r\n remove: function (key)\r\n {\r\n var entry = this.get(key);\r\n\r\n if (entry)\r\n {\r\n this.entries.delete(key);\r\n\r\n this.events.emit(Events.REMOVE, this, key, entry.data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all keys in use in this cache.\r\n *\r\n * @method Phaser.Cache.BaseCache#getKeys\r\n * @since 3.17.0\r\n *\r\n * @return {string[]} Array containing all the keys.\r\n */\r\n getKeys: function ()\r\n {\r\n return this.entries.keys();\r\n },\r\n\r\n /**\r\n * Destroys this cache and all items within it.\r\n *\r\n * @method Phaser.Cache.BaseCache#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.entries.clear();\r\n this.events.removeAllListeners();\r\n\r\n this.entries = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/BaseCache.js?')},"./node_modules/phaser/src/cache/CacheManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCache = __webpack_require__(/*! ./BaseCache */ \"./node_modules/phaser/src/cache/BaseCache.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Cache Manager is the global cache owned and maintained by the Game instance.\r\n *\r\n * Various systems, such as the file Loader, rely on this cache in order to store the files\r\n * it has loaded. The manager itself doesn't store any files, but instead owns multiple BaseCache\r\n * instances, one per type of file. You can also add your own custom caches.\r\n *\r\n * @class CacheManager\r\n * @memberof Phaser.Cache\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this CacheManager.\r\n */\r\nvar CacheManager = new Class({\r\n\r\n initialize:\r\n\r\n function CacheManager (game)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance that owns this CacheManager.\r\n *\r\n * @name Phaser.Cache.CacheManager#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A Cache storing all binary files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#binary\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.binary = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all bitmap font data files, typically added via the Loader.\r\n * Only the font data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#bitmapFont\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.bitmapFont = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all JSON data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#json\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.json = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all physics data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#physics\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.physics = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all shader source files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#shader\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.shader = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all non-streaming audio files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#audio\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.audio = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all text files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#text\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.text = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all html files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#html\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.12.0\r\n */\r\n this.html = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all WaveFront OBJ files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#obj\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.obj = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all tilemap data files, typically added via the Loader.\r\n * Only the data is stored in this cache, the textures are part of the Texture Manager.\r\n *\r\n * @name Phaser.Cache.CacheManager#tilemap\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = new BaseCache();\r\n\r\n /**\r\n * A Cache storing all xml data files, typically added via the Loader.\r\n *\r\n * @name Phaser.Cache.CacheManager#xml\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.0.0\r\n */\r\n this.xml = new BaseCache();\r\n\r\n /**\r\n * An object that contains your own custom BaseCache entries.\r\n * Add to this via the `addCustom` method.\r\n *\r\n * @name Phaser.Cache.CacheManager#custom\r\n * @type {Object.}\r\n * @since 3.0.0\r\n */\r\n this.custom = {};\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Add your own custom Cache for storing your own files.\r\n * The cache will be available under `Cache.custom.key`.\r\n * The cache will only be created if the key is not already in use.\r\n *\r\n * @method Phaser.Cache.CacheManager#addCustom\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique key of your custom cache.\r\n *\r\n * @return {Phaser.Cache.BaseCache} A reference to the BaseCache that was created. If the key was already in use, a reference to the existing cache is returned instead.\r\n */\r\n addCustom: function (key)\r\n {\r\n if (!this.custom.hasOwnProperty(key))\r\n {\r\n this.custom[key] = new BaseCache();\r\n }\r\n\r\n return this.custom[key];\r\n },\r\n\r\n /**\r\n * Removes all entries from all BaseCaches and destroys all custom caches.\r\n *\r\n * @method Phaser.Cache.CacheManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var keys = [\r\n 'binary',\r\n 'bitmapFont',\r\n 'json',\r\n 'physics',\r\n 'shader',\r\n 'audio',\r\n 'text',\r\n 'html',\r\n 'obj',\r\n 'tilemap',\r\n 'xml'\r\n ];\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n this[keys[i]].destroy();\r\n this[keys[i]] = null;\r\n }\r\n\r\n for (var key in this.custom)\r\n {\r\n this.custom[key].destroy();\r\n }\r\n\r\n this.custom = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CacheManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/CacheManager.js?")},"./node_modules/phaser/src/cache/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Add Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time a new object is added to it.\r\n *\r\n * @event Phaser.Cache.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache to which the object was added.\r\n * @param {string} key - The key of the object added to the cache.\r\n * @param {*} object - A reference to the object that was added to the cache.\r\n */\r\nmodule.exports = 'add';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/ADD_EVENT.js?")},"./node_modules/phaser/src/cache/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Cache Remove Event.\r\n * \r\n * This event is dispatched by any Cache that extends the BaseCache each time an object is removed from it.\r\n *\r\n * @event Phaser.Cache.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cache.BaseCache} cache - The cache from which the object was removed.\r\n * @param {string} key - The key of the object removed from the cache.\r\n * @param {*} object - A reference to the object that was removed from the cache.\r\n */\r\nmodule.exports = 'remove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/cache/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/cache/events/ADD_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/cache/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/events/index.js?')},"./node_modules/phaser/src/cache/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cache\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BaseCache: __webpack_require__(/*! ./BaseCache */ "./node_modules/phaser/src/cache/BaseCache.js"),\r\n CacheManager: __webpack_require__(/*! ./CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cache/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cache/index.js?')},"./node_modules/phaser/src/cameras/2d/BaseCamera.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Camera class.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n * \r\n * The Base Camera is extended by the Camera class, which adds in special effects including Fade,\r\n * Flash and Camera Shake, as well as the ability to follow Game Objects.\r\n * \r\n * The Base Camera was introduced in Phaser 3.12. It was split off from the Camera class, to allow\r\n * you to isolate special effects as needed. Therefore the 'since' values for properties of this class relate\r\n * to when they were added to the Camera class.\r\n *\r\n * @class BaseCamera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.12.0\r\n * \r\n * @extends Phaser.Events.EventEmitter\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar BaseCamera = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function BaseCamera (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene this camera belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Game Scene Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.12.0\r\n */\r\n this.sceneManager;\r\n\r\n /**\r\n * A reference to the Game Scale Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager to which this Camera belongs.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#cameraManager\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.17.0\r\n */\r\n this.cameraManager;\r\n\r\n /**\r\n * The Camera ID. Assigned by the Camera Manager and used to handle camera exclusion.\r\n * This value is a bitmask.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.id = 0;\r\n\r\n /**\r\n * The name of the Camera. This is left empty for your own use.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * This property is un-used in v3.16.\r\n * \r\n * The resolution of the Game, used in most Camera calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#resolution\r\n * @type {number}\r\n * @readonly\r\n * @deprecated\r\n * @since 3.12.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Should this camera round its pixel values to integers?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#roundPixels\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.roundPixels = false;\r\n\r\n /**\r\n * Is this Camera visible or not?\r\n *\r\n * A visible camera will render and perform input tests.\r\n * An invisible camera will not render anything and will skip input tests.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n\r\n /**\r\n * Is this Camera using a bounds to restrict scrolling movement?\r\n *\r\n * Set this property along with the bounds via `Camera.setBounds`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#useBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useBounds = false;\r\n\r\n /**\r\n * The World View is a Rectangle that defines the area of the 'world' the Camera is currently looking at.\r\n * This factors in the Camera viewport size, zoom and scroll position and is updated in the Camera preRender step.\r\n * If you have enabled Camera bounds the worldview will be clamped to those bounds accordingly.\r\n * You can use it for culling or intersection checks.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#worldView\r\n * @type {Phaser.Geom.Rectangle}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.worldView = new Rectangle();\r\n\r\n /**\r\n * Is this Camera dirty?\r\n * \r\n * A dirty Camera has had either its viewport size, bounds, scroll, rotation or zoom levels changed since the last frame.\r\n * \r\n * This flag is cleared during the `postRenderCamera` method of the renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.11.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._x = x;\r\n\r\n /**\r\n * The y position of the Camera, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._y = y;\r\n\r\n /**\r\n * Internal Camera X value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cx\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cx = 0;\r\n\r\n /**\r\n * Internal Camera Y value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cy\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cy = 0;\r\n\r\n /**\r\n * Internal Camera Width value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_cw\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._cw = 0;\r\n\r\n /**\r\n * Internal Camera Height value multiplied by the resolution.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_ch\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._ch = 0;\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * The bounds the camera is restrained to during scrolling.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_scrollY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._scrollY = 0;\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this._zoom = 1;\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this._rotation = 0;\r\n\r\n /**\r\n * A local transform matrix used for internal calculations.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#matrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.matrix = new TransformMatrix();\r\n\r\n /**\r\n * Does this Camera have a transparent background?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#transparent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.transparent = true;\r\n\r\n /**\r\n * The background color of this Camera. Only used if `transparent` is `false`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#backgroundColor\r\n * @type {Phaser.Display.Color}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor = ValueToColor('rgba(0,0,0,0)');\r\n\r\n /**\r\n * The Camera alpha value. Setting this property impacts every single object that this Camera\r\n * renders. You can either set the property directly, i.e. via a Tween, to fade a Camera in or out,\r\n * or via the chainable `setAlpha` method instead.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n\r\n /**\r\n * Should the camera cull Game Objects before checking them for input hit tests?\r\n * In some special cases it may be beneficial to disable this.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#disableCull\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.disableCull = false;\r\n\r\n /**\r\n * A temporary array of culled objects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#culledObjects\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.culledObjects = [];\r\n\r\n /**\r\n * The mid-point of the Camera in 'world' coordinates.\r\n *\r\n * Use it to obtain exactly where in the world the center of the camera is currently looking.\r\n *\r\n * This value is updated in the preRender method, after the scroll values and follower\r\n * have been processed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.midPoint = new Vector2(width / 2, height / 2);\r\n\r\n /**\r\n * The horizontal origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originX = 0.5;\r\n\r\n /**\r\n * The vertical origin of rotation for this Camera.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * See `setOrigin` to set both origins in a single, chainable call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.11.0\r\n */\r\n this.originY = 0.5;\r\n\r\n /**\r\n * Does this Camera have a custom viewport?\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_customViewport\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.12.0\r\n */\r\n this._customViewport = false;\r\n\r\n /**\r\n * The Mask this Camera is using during render.\r\n * Set the mask using the `setMask` method. Remove the mask using the `clearMask` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#mask\r\n * @type {?(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)}\r\n * @since 3.17.0\r\n */\r\n this.mask = null;\r\n\r\n /**\r\n * The Camera that this Camera uses for translation during masking.\r\n * \r\n * If the mask is fixed in position this will be a reference to\r\n * the CameraManager.default instance. Otherwise, it'll be a reference\r\n * to itself.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#_maskCamera\r\n * @type {?Phaser.Cameras.Scene2D.BaseCamera}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._maskCamera = null;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Camera. The alpha controls the opacity of the Camera as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAlpha\r\n * @since 3.11.0\r\n *\r\n * @param {number} [value=1] - The Camera alpha value.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Sets the rotation origin of this Camera.\r\n *\r\n * The values are given in the range 0 to 1 and are only used when calculating Camera rotation.\r\n *\r\n * By default the camera rotates around the center of the viewport.\r\n *\r\n * Changing the origin allows you to adjust the point in the viewport from which rotation happens.\r\n * A value of 0 would rotate from the top-left of the viewport. A value of 1 from the bottom right.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setOrigin\r\n * @since 3.11.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates what the Camera.scrollX and scrollY values would need to be in order to move\r\n * the Camera so it is centered on the given x and y coordinates, without actually moving\r\n * the Camera there. The results are clamped based on the Camera bounds, if set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getScroll\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {Phaser.Math.Vector2} [out] - A Vec2 to store the values in. If not given a new Vec2 is created.\r\n *\r\n * @return {Phaser.Math.Vector2} The scroll coordinates stored in the `x` and `y` properties.\r\n */\r\n getScroll: function (x, y, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n out.x = x - originX;\r\n out.y = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n out.x = this.clampX(out.x);\r\n out.y = this.clampY(out.y);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Moves the Camera horizontally so that it is centered on the given x coordinate, bounds allowing.\r\n * Calling this does not change the scrollY value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnX\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnX: function (x)\r\n {\r\n var originX = this.width * 0.5;\r\n\r\n this.midPoint.x = x;\r\n\r\n this.scrollX = x - originX;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera vertically so that it is centered on the given y coordinate, bounds allowing.\r\n * Calling this does not change the scrollX value.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOnY\r\n * @since 3.16.0\r\n *\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOnY: function (y)\r\n {\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.y = y;\r\n\r\n this.scrollY = y - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is centered on the given coordinates, bounds allowing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerOn\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerOn: function (x, y)\r\n {\r\n this.centerOnX(x);\r\n this.centerOnY(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is looking at the center of the Camera Bounds, if enabled.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToBounds: function ()\r\n {\r\n if (this.useBounds)\r\n {\r\n var bounds = this._bounds;\r\n var originX = this.width * 0.5;\r\n var originY = this.height * 0.5;\r\n\r\n this.midPoint.set(bounds.centerX, bounds.centerY);\r\n\r\n this.scrollX = bounds.centerX - originX;\r\n this.scrollY = bounds.centerY - originY;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the Camera so that it is re-centered based on its viewport size.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n centerToSize: function ()\r\n {\r\n this.scrollX = this.width * 0.5;\r\n this.scrollY = this.height * 0.5;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes an array of Game Objects and returns a new array featuring only those objects\r\n * visible by this camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#cull\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject[]} G - [renderableObjects,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} renderableObjects - An array of Game Objects to cull.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of Game Objects visible to this Camera.\r\n */\r\n cull: function (renderableObjects)\r\n {\r\n if (this.disableCull)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n\r\n /* First Invert Matrix */\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n return renderableObjects;\r\n }\r\n\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n var cameraW = this.width;\r\n var cameraH = this.height;\r\n var culledObjects = this.culledObjects;\r\n var length = renderableObjects.length;\r\n\r\n determinant = 1 / determinant;\r\n\r\n culledObjects.length = 0;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n var object = renderableObjects[index];\r\n\r\n if (!object.hasOwnProperty('width') || object.parentContainer)\r\n {\r\n culledObjects.push(object);\r\n continue;\r\n }\r\n\r\n var objectW = object.width;\r\n var objectH = object.height;\r\n var objectX = (object.x - (scrollX * object.scrollFactorX)) - (objectW * object.originX);\r\n var objectY = (object.y - (scrollY * object.scrollFactorY)) - (objectH * object.originY);\r\n var tx = (objectX * mva + objectY * mvc + mve);\r\n var ty = (objectX * mvb + objectY * mvd + mvf);\r\n var tw = ((objectX + objectW) * mva + (objectY + objectH) * mvc + mve);\r\n var th = ((objectX + objectW) * mvb + (objectY + objectH) * mvd + mvf);\r\n var cullTop = this.y;\r\n var cullBottom = cullTop + cameraH;\r\n var cullLeft = this.x;\r\n var cullRight = cullLeft + cameraW;\r\n\r\n if ((tw > cullLeft && tx < cullRight) && (th > cullTop && ty < cullBottom))\r\n {\r\n culledObjects.push(object);\r\n }\r\n }\r\n\r\n return culledObjects;\r\n },\r\n\r\n /**\r\n * Converts the given `x` and `y` coordinates into World space, based on this Cameras transform.\r\n * You can optionally provide a Vector2, or similar object, to store the results in.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getWorldPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {number} x - The x position to convert to world space.\r\n * @param {number} y - The y position to convert to world space.\r\n * @param {(object|Phaser.Math.Vector2)} [output] - An optional object to store the results in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} An object holding the converted values in its `x` and `y` properties.\r\n */\r\n getWorldPoint: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var cameraMatrix = this.matrix.matrix;\r\n\r\n var mva = cameraMatrix[0];\r\n var mvb = cameraMatrix[1];\r\n var mvc = cameraMatrix[2];\r\n var mvd = cameraMatrix[3];\r\n var mve = cameraMatrix[4];\r\n var mvf = cameraMatrix[5];\r\n\r\n // Invert Matrix\r\n var determinant = (mva * mvd) - (mvb * mvc);\r\n\r\n if (!determinant)\r\n {\r\n output.x = x;\r\n output.y = y;\r\n\r\n return output;\r\n }\r\n\r\n determinant = 1 / determinant;\r\n\r\n var ima = mvd * determinant;\r\n var imb = -mvb * determinant;\r\n var imc = -mvc * determinant;\r\n var imd = mva * determinant;\r\n var ime = (mvc * mvf - mvd * mve) * determinant;\r\n var imf = (mvb * mve - mva * mvf) * determinant;\r\n\r\n var c = Math.cos(this.rotation);\r\n var s = Math.sin(this.rotation);\r\n\r\n var zoom = this.zoom;\r\n var res = this.resolution;\r\n\r\n var scrollX = this.scrollX;\r\n var scrollY = this.scrollY;\r\n\r\n // Works for zoom of 1 with any resolution, but resolution > 1 and zoom !== 1 breaks\r\n var sx = x + ((scrollX * c - scrollY * s) * zoom);\r\n var sy = y + ((scrollX * s + scrollY * c) * zoom);\r\n\r\n // Apply transform to point\r\n output.x = (sx * ima + sy * imc) * res + ime;\r\n output.y = (sx * imb + sy * imd) * res + imf;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Game Object, or an array of Game Objects, it will update all of their camera filter settings\r\n * so that they are ignored by this Camera. This means they will not be rendered by this Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#ignore\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n ignore: function (entries)\r\n {\r\n var id = this.id;\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n for (var i = 0; i < entries.length; i++)\r\n {\r\n var entry = entries[i];\r\n\r\n if (Array.isArray(entry))\r\n {\r\n this.ignore(entry);\r\n }\r\n else if (entry.isParent)\r\n {\r\n this.ignore(entry.getChildren());\r\n }\r\n else\r\n {\r\n entry.cameraFilter |= id;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it's looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n },\r\n\r\n /**\r\n * Takes an x value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampX\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The value to horizontally scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollX.\r\n */\r\n clampX: function (x)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dw = this.displayWidth;\r\n\r\n var bx = bounds.x + ((dw - this.width) / 2);\r\n var bw = Math.max(bx, bx + bounds.width - dw);\r\n\r\n if (x < bx)\r\n {\r\n x = bx;\r\n }\r\n else if (x > bw)\r\n {\r\n x = bw;\r\n }\r\n\r\n return x;\r\n },\r\n\r\n /**\r\n * Takes a y value and checks it's within the range of the Camera bounds, adjusting if required.\r\n * Do not call this method if you are not using camera bounds.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clampY\r\n * @since 3.11.0\r\n *\r\n * @param {number} y - The value to vertically scroll clamp.\r\n *\r\n * @return {number} The adjusted value to use as scrollY.\r\n */\r\n clampY: function (y)\r\n {\r\n var bounds = this._bounds;\r\n\r\n var dh = this.displayHeight;\r\n\r\n var by = bounds.y + ((dh - this.height) / 2);\r\n var bh = Math.max(by, by + bounds.height - dh);\r\n\r\n if (y < by)\r\n {\r\n y = by;\r\n }\r\n else if (y > bh)\r\n {\r\n y = bh;\r\n }\r\n\r\n return y;\r\n },\r\n\r\n /*\r\n var gap = this._zoomInversed;\r\n return gap * Math.round((src.x - this.scrollX * src.scrollFactorX) / gap);\r\n */\r\n\r\n /**\r\n * If this Camera has previously had movement bounds set on it, this will remove them.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n removeBounds: function ()\r\n {\r\n this.useBounds = false;\r\n\r\n this.dirty = true;\r\n\r\n this._bounds.setEmpty();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The cameras angle of rotation, given in degrees.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setAngle: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = DegToRad(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the background color for this Camera.\r\n *\r\n * By default a Camera has a transparent background but it can be given a solid color, with any level\r\n * of transparency, via this method.\r\n *\r\n * The color value can be specified using CSS color notation, hex or numbers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n if (color === undefined) { color = 'rgba(0,0,0,0)'; }\r\n\r\n this.backgroundColor = ValueToColor(color);\r\n\r\n this.transparent = (this.backgroundColor.alpha === 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the bounds of the Camera. The bounds are an axis-aligned rectangle.\r\n * \r\n * The Camera bounds controls where the Camera can scroll to, stopping it from scrolling off the\r\n * edges and into blank space. It does not limit the placement of Game Objects, or where\r\n * the Camera viewport can be positioned.\r\n * \r\n * Temporarily disable the bounds by changing the boolean `Camera.useBounds`.\r\n * \r\n * Clear the bounds entirely by calling `Camera.removeBounds`.\r\n * \r\n * If you set bounds that are smaller than the viewport it will stop the Camera from being\r\n * able to scroll. The bounds can be positioned where-ever you wish. By default they are from\r\n * 0x0 to the canvas width x height. This means that the coordinate 0x0 is the top left of\r\n * the Camera bounds. However, you can position them anywhere. So if you wanted a game world\r\n * that was 2048x2048 in size, with 0x0 being the center of it, you can set the bounds x/y\r\n * to be -1024, -1024, with a width and height of 2048. Depending on your game you may find\r\n * it easier for 0x0 to be the top-left of the bounds, or you may wish 0x0 to be the middle.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The top-left x coordinate of the bounds.\r\n * @param {integer} y - The top-left y coordinate of the bounds.\r\n * @param {integer} width - The width of the bounds, in pixels.\r\n * @param {integer} height - The height of the bounds, in pixels.\r\n * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setBounds: function (x, y, width, height, centerOn)\r\n {\r\n if (centerOn === undefined) { centerOn = false; }\r\n\r\n this._bounds.setTo(x, y, width, height);\r\n\r\n this.dirty = true;\r\n this.useBounds = true;\r\n\r\n if (centerOn)\r\n {\r\n this.centerToBounds();\r\n }\r\n else\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a rectangle containing the bounds of the Camera.\r\n * \r\n * If the Camera does not have any bounds the rectangle will be empty.\r\n * \r\n * The rectangle is a copy of the bounds, so is safe to modify.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#getBounds\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - An optional Rectangle to store the bounds in. If not given, a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle containing the bounds of this Camera.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var source = this._bounds;\r\n\r\n out.setTo(source.x, source.y, source.width, source.height);\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Sets the name of this Camera.\r\n * This value is for your own use and isn't used internally.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} [value=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setName: function (value)\r\n {\r\n if (value === undefined) { value = ''; }\r\n\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the Camera viewport within the game.\r\n *\r\n * This does not change where the camera is 'looking'. See `setScroll` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} [y=x] - The top-left y coordinate of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the rotation of this Camera. This causes everything it renders to appear rotated.\r\n *\r\n * Rotating a camera does not rotate the viewport itself, it is applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The rotation of the Camera, in radians.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRotation: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Should the Camera round pixel values to whole integers when rendering Game Objects?\r\n * \r\n * In some types of game, especially with pixel art, this is required to prevent sub-pixel aliasing.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setRoundPixels\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to round Camera pixels, `false` to not.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setRoundPixels: function (value)\r\n {\r\n this.roundPixels = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Scene the Camera is bound to.\r\n * \r\n * Also populates the `resolution` property and updates the internal size values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScene\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene the camera is bound to.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScene: function (scene)\r\n {\r\n if (this.scene && this._customViewport)\r\n {\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this.scene = scene;\r\n\r\n var sys = scene.sys;\r\n\r\n this.sceneManager = sys.game.scene;\r\n this.scaleManager = sys.scale;\r\n this.cameraManager = sys.cameras;\r\n\r\n var res = this.scaleManager.resolution;\r\n\r\n this.resolution = res;\r\n\r\n this._cx = this._x * res;\r\n this._cy = this._y * res;\r\n this._cw = this._width * res;\r\n this._ch = this._height * res;\r\n\r\n this.updateSystem();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of where the Camera is looking within the game.\r\n * You can also modify the properties `Camera.scrollX` and `Camera.scrollY` directly.\r\n * Use this method, or the scroll properties, to move your camera around the game world.\r\n *\r\n * This does not change where the camera viewport is placed. See `setPosition` to control that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setScroll\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the Camera in the game world.\r\n * @param {number} [y=x] - The y coordinate of the Camera in the game world.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setScroll: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollX = x;\r\n this.scrollY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the size of the Camera viewport.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method sets the position and size of the Camera viewport in a single call.\r\n *\r\n * If you're trying to change where the Camera is looking at in your game, then see\r\n * the method `Camera.setScroll` instead. This method is for changing the viewport\r\n * itself, not what the camera can see.\r\n *\r\n * By default a Camera is the same size as the game, but can be made smaller via this method,\r\n * allowing you to create mini-cam style effects by creating and positioning a smaller Camera\r\n * viewport within your game.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setViewport\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the Camera viewport.\r\n * @param {number} y - The top-left y coordinate of the Camera viewport.\r\n * @param {integer} width - The width of the Camera viewport.\r\n * @param {integer} [height=width] - The height of the Camera viewport.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setViewport: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the zoom value of the Camera.\r\n *\r\n * Changing to a smaller value, such as 0.5, will cause the camera to 'zoom out'.\r\n * Changing to a larger value, such as 2, will cause the camera to 'zoom in'.\r\n *\r\n * A value of 1 means 'no zoom' and is the default.\r\n *\r\n * Changing the zoom does not impact the Camera viewport in any way, it is only applied during rendering.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setZoom\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n if (value === 0)\r\n {\r\n value = 0.001;\r\n }\r\n\r\n this.zoom = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the mask to be applied to this Camera during rendering.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * \r\n * Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Camera it will be immediately replaced.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n * \r\n * Note: You cannot mask a Camera that has `renderToTexture` set.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setMask\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask)} mask - The mask this Camera will use when rendering.\r\n * @param {boolean} [fixedPosition=true] - Should the mask translate along with the Camera, or be fixed in place and not impacted by the Cameras transform?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setMask: function (mask, fixedPosition)\r\n {\r\n if (fixedPosition === undefined) { fixedPosition = true; }\r\n\r\n this.mask = mask;\r\n\r\n this._maskCamera = (fixedPosition) ? this.cameraManager.default : this;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Camera was using.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#clearMask\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Camera.\r\n *\r\n * An invisible Camera will skip rendering and input tests of everything it can see.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#setVisible\r\n * @since 3.10.0\r\n *\r\n * @param {boolean} value - The visible state of the Camera.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n\r\n /**\r\n * Returns an Object suitable for JSON storage containing all of the Camera viewport and rendering properties.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Cameras.Scene2D.JSONCamera} A well-formed object suitable for conversion to JSON.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n x: this.x,\r\n y: this.y,\r\n width: this.width,\r\n height: this.height,\r\n zoom: this.zoom,\r\n rotation: this.rotation,\r\n roundPixels: this.roundPixels,\r\n scrollX: this.scrollX,\r\n scrollY: this.scrollY,\r\n backgroundColor: this.backgroundColor.rgba\r\n };\r\n\r\n if (this.useBounds)\r\n {\r\n output['bounds'] = {\r\n x: this._bounds.x,\r\n y: this._bounds.y,\r\n width: this._bounds.width,\r\n height: this._bounds.height\r\n };\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Internal method called automatically when the viewport changes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#updateSystem\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateSystem: function ()\r\n {\r\n if (!this.scaleManager)\r\n {\r\n return;\r\n }\r\n\r\n var custom = (this._x !== 0 || this._y !== 0 || this.scaleManager.width !== this._width || this.scaleManager.height !== this._height);\r\n\r\n var sceneManager = this.sceneManager;\r\n\r\n if (custom && !this._customViewport)\r\n {\r\n // We need a custom viewport for this Camera\r\n sceneManager.customViewports++;\r\n }\r\n else if (!custom && this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n sceneManager.customViewports--;\r\n }\r\n\r\n this.dirty = true;\r\n this._customViewport = custom;\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance and its internal properties and references.\r\n * Once destroyed you cannot use this Camera again, even if re-added to a Camera Manager.\r\n * \r\n * This method is called automatically by `CameraManager.remove` if that methods `runDestroy` argument is `true`, which is the default.\r\n * \r\n * Unless you have a specific reason otherwise, always use `CameraManager.remove` and allow it to handle the camera destruction,\r\n * rather than calling this method directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.BaseCamera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.emit(Events.DESTROY, this);\r\n\r\n this.removeAllListeners();\r\n\r\n this.matrix.destroy();\r\n\r\n this.culledObjects = [];\r\n\r\n if (this._customViewport)\r\n {\r\n // We're turning off a custom viewport for this Camera\r\n this.sceneManager.customViewports--;\r\n }\r\n\r\n this._bounds = null;\r\n\r\n this.scene = null;\r\n this.scaleManager = null;\r\n this.sceneManager = null;\r\n this.cameraManager = null;\r\n },\r\n\r\n /**\r\n * The x position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollX` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this._x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._x = value;\r\n this._cx = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of the Camera viewport, relative to the top-left of the game canvas.\r\n * The viewport is the area into which the camera renders.\r\n * To adjust the position the camera is looking at in the game world, see the `scrollY` value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this._y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._y = value;\r\n this._cy = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._width = value;\r\n this._cw = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Camera viewport, in pixels.\r\n *\r\n * The viewport is the area into which the Camera renders. Setting the viewport does\r\n * not restrict where the Camera can scroll to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._height = value;\r\n this._ch = value * this.resolution;\r\n this.updateSystem();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollX: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollX = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of this Camera.\r\n *\r\n * Change this value to cause the Camera to scroll around your Scene.\r\n *\r\n * Alternatively, setting the Camera to follow a Game Object, via the `startFollow` method,\r\n * will automatically adjust the Camera scroll values accordingly.\r\n *\r\n * You can set the bounds within which the Camera can scroll via the `setBounds` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n scrollY: {\r\n\r\n get: function ()\r\n {\r\n return this._scrollY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scrollY = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Camera zoom value. Change this value to zoom in, or out of, a Scene.\r\n *\r\n * A value of 0.5 would zoom the Camera out, so you can now see twice as much\r\n * of the Scene as before. A value of 2 would zoom the Camera in, so every pixel\r\n * now takes up 2 pixels when rendered.\r\n *\r\n * Set to 1 to return to the default zoom level.\r\n *\r\n * Be careful to never set this value to zero.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#zoom\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n zoom: {\r\n\r\n get: function ()\r\n {\r\n return this._zoom;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._zoom = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Camera in radians.\r\n *\r\n * Camera rotation always takes place based on the Camera viewport. By default, rotation happens\r\n * in the center of the viewport. You can adjust this with the `originX` and `originY` properties.\r\n *\r\n * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not\r\n * rotate the Camera viewport itself, which always remains an axis-aligned rectangle.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal position of the center of the Camera's viewport, relative to the left of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (0.5 * this.width);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical position of the center of the Camera's viewport, relative to the top of the game canvas.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#centerY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (0.5 * this.height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed width of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport width of 800 and a zoom of 0.5 then its display width\r\n * would be 1600, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a width of 800 and zoom of 2 would have a display width\r\n * of 400 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.width / this.zoom;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of the camera viewport, factoring in the camera zoom level.\r\n *\r\n * If a camera has a viewport height of 600 and a zoom of 0.5 then its display height\r\n * would be 1200, as it's displaying twice as many pixels as zoom level 1.\r\n *\r\n * Equally, a camera with a height of 600 and zoom of 2 would have a display height\r\n * of 300 pixels.\r\n *\r\n * @name Phaser.Cameras.Scene2D.BaseCamera#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.height / this.zoom;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseCamera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/BaseCamera.js?")},"./node_modules/phaser/src/cameras/2d/Camera.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ./BaseCamera */ "./node_modules/phaser/src/cameras/2d/BaseCamera.js");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CenterOn = __webpack_require__(/*! ../../geom/rectangle/CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Effects = __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js");\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera.\r\n *\r\n * The Camera is the way in which all games are rendered in Phaser. They provide a view into your game world,\r\n * and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you\'d adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash and Camera Shake.\r\n *\r\n * @class Camera\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Cameras.Scene2D.BaseCamera\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Tint\r\n *\r\n * @param {number} x - The x position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} y - The y position of the Camera, relative to the top-left of the game canvas.\r\n * @param {number} width - The width of the Camera, in pixels.\r\n * @param {number} height - The height of the Camera, in pixels.\r\n */\r\nvar Camera = new Class({\r\n\r\n Extends: BaseCamera,\r\n\r\n Mixins: [\r\n Components.Flip,\r\n Components.Tint\r\n ],\r\n\r\n initialize:\r\n\r\n function Camera (x, y, width, height)\r\n {\r\n BaseCamera.call(this, x, y, width, height);\r\n\r\n /**\r\n * Does this Camera allow the Game Objects it renders to receive input events?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#inputEnabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inputEnabled = true;\r\n\r\n /**\r\n * The Camera Fade effect handler.\r\n * To fade this camera see the `Camera.fade` methods.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#fadeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Fade}\r\n * @since 3.5.0\r\n */\r\n this.fadeEffect = new Effects.Fade(this);\r\n\r\n /**\r\n * The Camera Flash effect handler.\r\n * To flash this camera see the `Camera.flash` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#flashEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Flash}\r\n * @since 3.5.0\r\n */\r\n this.flashEffect = new Effects.Flash(this);\r\n\r\n /**\r\n * The Camera Shake effect handler.\r\n * To shake this camera see the `Camera.shake` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#shakeEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Shake}\r\n * @since 3.5.0\r\n */\r\n this.shakeEffect = new Effects.Shake(this);\r\n\r\n /**\r\n * The Camera Pan effect handler.\r\n * To pan this camera see the `Camera.pan` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#panEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Pan}\r\n * @since 3.11.0\r\n */\r\n this.panEffect = new Effects.Pan(this);\r\n\r\n /**\r\n * The Camera Zoom effect handler.\r\n * To zoom this camera see the `Camera.zoom` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#zoomEffect\r\n * @type {Phaser.Cameras.Scene2D.Effects.Zoom}\r\n * @since 3.11.0\r\n */\r\n this.zoomEffect = new Effects.Zoom(this);\r\n\r\n /**\r\n * The linear interpolation value to use when following a target.\r\n *\r\n * Can also be set via `setLerp` or as part of the `startFollow` call.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#lerp\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.lerp = new Vector2(1, 1);\r\n\r\n /**\r\n * The values stored in this property are subtracted from the Camera targets position, allowing you to\r\n * offset the camera from the actual target x/y coordinates by this amount.\r\n * Can also be set via `setFollowOffset` or as part of the `startFollow` call.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.9.0\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * The Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * You can directly set this property to be an instance of a Rectangle. Or, you can use the\r\n * `setDeadzone` method for a chainable approach.\r\n *\r\n * The rectangle you provide can have its dimensions adjusted dynamically, however, please\r\n * note that its position is updated every frame, as it is constantly re-centered on the cameras mid point.\r\n *\r\n * Calling `setDeadzone` with no arguments will reset an active deadzone, as will setting this property\r\n * to `null`.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#deadzone\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @since 3.11.0\r\n */\r\n this.deadzone = null;\r\n\r\n /**\r\n * Internal follow target reference.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#_follow\r\n * @type {?any}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this._follow = null;\r\n\r\n /**\r\n * Is this Camera rendering directly to the canvas or to a texture?\r\n *\r\n * Enable rendering to texture with the method `setRenderToTexture` (just enabling this boolean won\'t be enough)\r\n *\r\n * Once enabled you can toggle it by switching this property.\r\n *\r\n * To properly remove a render texture you should call the `clearRenderToTexture()` method.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#renderToTexture\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the HTML Canvas Element that the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.13.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the Rendering Context belonging to the Canvas element the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only populated if Phaser is running with the Canvas Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.13.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Texture belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.13.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture then this holds a reference\r\n * to the GL Frame Buffer belonging the Camera is drawing to.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.13.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * If this Camera has been set to render to a texture and to use a custom pipeline,\r\n * then this holds a reference to the pipeline the Camera is drawing with.\r\n *\r\n * Enable texture rendering using the method `setRenderToTexture`.\r\n *\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Camera#pipeline\r\n * @type {any}\r\n * @since 3.13.0\r\n */\r\n this.pipeline = null;\r\n },\r\n\r\n /**\r\n * Sets the Camera to render to a texture instead of to the main canvas.\r\n *\r\n * The Camera will redirect all Game Objects it\'s asked to render to this texture.\r\n *\r\n * During the render sequence, the texture itself will then be rendered to the main canvas.\r\n *\r\n * Doing this gives you the ability to modify the texture before this happens,\r\n * allowing for special effects such as Camera specific shaders, or post-processing\r\n * on the texture.\r\n *\r\n * If running under Canvas the Camera will render to its `canvas` property.\r\n *\r\n * If running under WebGL the Camera will create a frame buffer, which is stored in its `framebuffer` and `glTexture` properties.\r\n *\r\n * If you set a camera to render to a texture then it will emit 2 events during the render loop:\r\n *\r\n * First, it will emit the event `prerender`. This happens right before any Game Object\'s are drawn to the Camera texture.\r\n *\r\n * Then, it will emit the event `postrender`. This happens after all Game Object\'s have been drawn, but right before the\r\n * Camera texture is rendered to the main game canvas. It\'s the final point at which you can manipulate the texture before\r\n * it appears in-game.\r\n *\r\n * You should not enable this unless you plan on actually using the texture it creates\r\n * somehow, otherwise you\'re just doubling the work required to render your game.\r\n *\r\n * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean.\r\n *\r\n * If you no longer require the Camera to render to a texture, call the `clearRenderToTexture` method,\r\n * which will delete the respective textures and free-up resources.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setRenderToTexture: function (pipeline)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl)\r\n {\r\n this.glTexture = renderer.createTextureFromSource(null, this.width, this.height, 0);\r\n this.framebuffer = renderer.createFramebuffer(this.width, this.height, this.glTexture, false);\r\n }\r\n else\r\n {\r\n this.canvas = CanvasPool.create2D(this, this.width, this.height);\r\n this.context = this.canvas.getContext(\'2d\');\r\n }\r\n\r\n this.renderToTexture = true;\r\n\r\n if (pipeline)\r\n {\r\n this.setPipeline(pipeline);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the WebGL pipeline this Camera is using when rendering to a texture.\r\n *\r\n * You can pass either the string-based name of the pipeline, or a reference to the pipeline itself.\r\n *\r\n * Call this method with no arguments to clear any previously set pipeline.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setPipeline\r\n * @since 3.13.0\r\n *\r\n * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setPipeline: function (pipeline)\r\n {\r\n if (typeof pipeline === \'string\')\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer.gl && renderer.hasPipeline(pipeline))\r\n {\r\n this.pipeline = renderer.getPipeline(pipeline);\r\n }\r\n }\r\n else\r\n {\r\n this.pipeline = pipeline;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Camera was set to render to a texture, this will clear the resources it was using and\r\n * redirect it to render back to the primary Canvas again.\r\n *\r\n * If you only wish to temporarily disable rendering to a texture then you can toggle the\r\n * property `renderToTexture` instead.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n clearRenderToTexture: function ()\r\n {\r\n if (!this.scene)\r\n {\r\n return;\r\n }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (!renderer)\r\n {\r\n return;\r\n }\r\n\r\n if (renderer.gl)\r\n {\r\n if (this.framebuffer)\r\n {\r\n renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n if (this.glTexture)\r\n {\r\n renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.pipeline = null;\r\n }\r\n else\r\n {\r\n CanvasPool.remove(this);\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n }\r\n\r\n this.renderToTexture = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera dead zone.\r\n *\r\n * The deadzone is only used when the camera is following a target.\r\n *\r\n * It defines a rectangular region within which if the target is present, the camera will not scroll.\r\n * If the target moves outside of this area, the camera will begin scrolling in order to follow it.\r\n *\r\n * The deadzone rectangle is re-positioned every frame so that it is centered on the mid-point\r\n * of the camera. This allows you to use the object for additional game related checks, such as\r\n * testing if an object is within it or not via a Rectangle.contains call.\r\n *\r\n * The `lerp` values that you can set for a follower target also apply when using a deadzone.\r\n *\r\n * Calling this method with no arguments will reset an active deadzone.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setDeadzone\r\n * @since 3.11.0\r\n *\r\n * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed.\r\n * @param {number} [height] - The height of the deadzone rectangle in pixels.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n setDeadzone: function (width, height)\r\n {\r\n if (width === undefined)\r\n {\r\n this.deadzone = null;\r\n }\r\n else\r\n {\r\n if (this.deadzone)\r\n {\r\n this.deadzone.width = width;\r\n this.deadzone.height = height;\r\n }\r\n else\r\n {\r\n this.deadzone = new Rectangle(0, 0, width, height);\r\n }\r\n\r\n if (this._follow)\r\n {\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = this._follow.x - this.followOffset.x;\r\n var fy = this._follow.y - this.followOffset.y;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n }\r\n\r\n CenterOn(this.deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fades the Camera in from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeIn\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeIn: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera out to the given color over the duration specified.\r\n * This is an alias for Camera.fade that forces the fade to start, regardless of existing fades.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeOut\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeOut: function (duration, red, green, blue, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, true, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from the given color to transparent over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fadeFrom\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fadeFrom: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(false, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Fades the Camera from transparent to the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#fade\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n fade: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.fadeEffect.start(true, duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Flashes the Camera by setting it to the given color immediately and then fading it away again quickly over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#flash\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n flash: function (duration, red, green, blue, force, callback, context)\r\n {\r\n return this.flashEffect.start(duration, red, green, blue, force, callback, context);\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#shake\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {function} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n shake: function (duration, intensity, force, callback, context)\r\n {\r\n return this.shakeEffect.start(duration, intensity, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#pan\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n pan: function (x, y, duration, ease, force, callback, context)\r\n {\r\n return this.panEffect.start(x, y, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#zoomTo\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n zoomTo: function (zoom, duration, ease, force, callback, context)\r\n {\r\n return this.zoomEffect.start(zoom, duration, ease, force, callback, context);\r\n },\r\n\r\n /**\r\n * Internal preRender step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#preRender\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} resolution - The game resolution, as set in the Scale Manager.\r\n */\r\n preRender: function (resolution)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n var halfWidth = width * 0.5;\r\n var halfHeight = height * 0.5;\r\n\r\n var zoom = this.zoom * resolution;\r\n var matrix = this.matrix;\r\n\r\n var originX = width * this.originX;\r\n var originY = height * this.originY;\r\n\r\n var follow = this._follow;\r\n var deadzone = this.deadzone;\r\n\r\n var sx = this.scrollX;\r\n var sy = this.scrollY;\r\n\r\n if (deadzone)\r\n {\r\n CenterOn(deadzone, this.midPoint.x, this.midPoint.y);\r\n }\r\n\r\n if (follow && !this.panEffect.isRunning)\r\n {\r\n var fx = (follow.x - this.followOffset.x);\r\n var fy = (follow.y - this.followOffset.y);\r\n\r\n if (deadzone)\r\n {\r\n if (fx < deadzone.x)\r\n {\r\n sx = Linear(sx, sx - (deadzone.x - fx), this.lerp.x);\r\n }\r\n else if (fx > deadzone.right)\r\n {\r\n sx = Linear(sx, sx + (fx - deadzone.right), this.lerp.x);\r\n }\r\n\r\n if (fy < deadzone.y)\r\n {\r\n sy = Linear(sy, sy - (deadzone.y - fy), this.lerp.y);\r\n }\r\n else if (fy > deadzone.bottom)\r\n {\r\n sy = Linear(sy, sy + (fy - deadzone.bottom), this.lerp.y);\r\n }\r\n }\r\n else\r\n {\r\n sx = Linear(sx, fx - originX, this.lerp.x);\r\n sy = Linear(sy, fy - originY, this.lerp.y);\r\n }\r\n }\r\n\r\n if (this.useBounds)\r\n {\r\n sx = this.clampX(sx);\r\n sy = this.clampY(sy);\r\n }\r\n\r\n if (this.roundPixels)\r\n {\r\n originX = Math.round(originX);\r\n originY = Math.round(originY);\r\n }\r\n\r\n // Values are in pixels and not impacted by zooming the Camera\r\n this.scrollX = sx;\r\n this.scrollY = sy;\r\n\r\n var midX = sx + halfWidth;\r\n var midY = sy + halfHeight;\r\n\r\n // The center of the camera, in world space, so taking zoom into account\r\n // Basically the pixel value of what it\'s looking at in the middle of the cam\r\n this.midPoint.set(midX, midY);\r\n\r\n var displayWidth = width / zoom;\r\n var displayHeight = height / zoom;\r\n\r\n this.worldView.setTo(\r\n midX - (displayWidth / 2),\r\n midY - (displayHeight / 2),\r\n displayWidth,\r\n displayHeight\r\n );\r\n\r\n matrix.applyITRS(this.x + originX, this.y + originY, this.rotation, zoom, zoom);\r\n matrix.translate(-originX, -originY);\r\n\r\n this.shakeEffect.preRender();\r\n },\r\n\r\n /**\r\n * Sets the linear interpolation value to use when following a target.\r\n *\r\n * The default values of 1 means the camera will instantly snap to the target coordinates.\r\n * A lower value, such as 0.1 means the camera will more slowly track the target, giving\r\n * a smooth transition. You can set the horizontal and vertical values independently, and also\r\n * adjust this value in real-time during your game.\r\n *\r\n * Be sure to keep the value between 0 and 1. A value of zero will disable tracking on that axis.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setLerp\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=1] - The amount added to the horizontal linear interpolation of the follow target.\r\n * @param {number} [y=1] - The amount added to the vertical linear interpolation of the follow target.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setLerp: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.lerp.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical offset of the camera from its follow target.\r\n * The values are subtracted from the targets position during the Cameras update step.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#setFollowOffset\r\n * @since 3.9.0\r\n *\r\n * @param {number} [x=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [y=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n setFollowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.followOffset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Camera to follow a Game Object.\r\n *\r\n * When enabled the Camera will automatically adjust its scroll position to keep the target Game Object\r\n * in its center.\r\n *\r\n * You can set the linear interpolation value used in the follow code.\r\n * Use low lerp values (such as 0.1) to automatically smooth the camera motion.\r\n *\r\n * If you find you\'re getting a slight "jitter" effect when following an object it\'s probably to do with sub-pixel\r\n * rendering of the targets position. This can be rounded by setting the `roundPixels` argument to `true` to\r\n * force full pixel rounding rendering. Note that this can still be broken if you have specified a non-integer zoom\r\n * value on the camera. So be sure to keep the camera zoom to integers.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|object)} target - The target for the Camera to follow.\r\n * @param {boolean} [roundPixels=false] - Round the camera position to whole integers to avoid sub-pixel rendering?\r\n * @param {number} [lerpX=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [lerpY=1] - A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track.\r\n * @param {number} [offsetX=0] - The horizontal offset from the camera follow target.x position.\r\n * @param {number} [offsetY=0] - The vertical offset from the camera follow target.y position.\r\n *\r\n * @return {this} This Camera instance.\r\n */\r\n startFollow: function (target, roundPixels, lerpX, lerpY, offsetX, offsetY)\r\n {\r\n if (roundPixels === undefined) { roundPixels = false; }\r\n if (lerpX === undefined) { lerpX = 1; }\r\n if (lerpY === undefined) { lerpY = lerpX; }\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = offsetX; }\r\n\r\n this._follow = target;\r\n\r\n this.roundPixels = roundPixels;\r\n\r\n lerpX = Clamp(lerpX, 0, 1);\r\n lerpY = Clamp(lerpY, 0, 1);\r\n\r\n this.lerp.set(lerpX, lerpY);\r\n\r\n this.followOffset.set(offsetX, offsetY);\r\n\r\n var originX = this.width / 2;\r\n var originY = this.height / 2;\r\n\r\n var fx = target.x - offsetX;\r\n var fy = target.y - offsetY;\r\n\r\n this.midPoint.set(fx, fy);\r\n\r\n this.scrollX = fx - originX;\r\n this.scrollY = fy - originY;\r\n\r\n if (this.useBounds)\r\n {\r\n this.scrollX = this.clampX(this.scrollX);\r\n this.scrollY = this.clampY(this.scrollY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops a Camera from following a Game Object, if previously set via `Camera.startFollow`.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n stopFollow: function ()\r\n {\r\n this._follow = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets any active FX, such as a fade, flash or shake. Useful to call after a fade in order to\r\n * remove the fade.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#resetFX\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.\r\n */\r\n resetFX: function ()\r\n {\r\n this.panEffect.reset();\r\n this.shakeEffect.reset();\r\n this.flashEffect.reset();\r\n this.fadeEffect.reset();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method called automatically by the Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.visible)\r\n {\r\n this.panEffect.update(time, delta);\r\n this.zoomEffect.update(time, delta);\r\n this.shakeEffect.update(time, delta);\r\n this.flashEffect.update(time, delta);\r\n this.fadeEffect.update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Camera instance. You rarely need to call this directly.\r\n *\r\n * Called by the Camera Manager. If you wish to destroy a Camera please use `CameraManager.remove` as\r\n * cameras are stored in a pool, ready for recycling later, and calling this directly will prevent that.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Camera#destroy\r\n * @fires Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.clearRenderToTexture();\r\n\r\n this.resetFX();\r\n\r\n BaseCamera.prototype.destroy.call(this);\r\n\r\n this._follow = null;\r\n\r\n this.deadzone = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Camera;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/Camera.js?')},"./node_modules/phaser/src/cameras/2d/CameraManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Camera = __webpack_require__(/*! ./Camera */ \"./node_modules/phaser/src/cameras/2d/Camera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Camera Manager is a plugin that belongs to a Scene and is responsible for managing all of the Scene Cameras.\r\n * \r\n * By default you can access the Camera Manager from within a Scene using `this.cameras`, although this can be changed\r\n * in your game config.\r\n * \r\n * Create new Cameras using the `add` method. Or extend the Camera class with your own addition code and then add\r\n * the new Camera in using the `addExisting` method.\r\n * \r\n * Cameras provide a view into your game world, and can be positioned, rotated, zoomed and scrolled accordingly.\r\n *\r\n * A Camera consists of two elements: The viewport and the scroll values.\r\n *\r\n * The viewport is the physical position and size of the Camera within your game. Cameras, by default, are\r\n * created the same size as your game, but their position and size can be set to anything. This means if you\r\n * wanted to create a camera that was 320x200 in size, positioned in the bottom-right corner of your game,\r\n * you'd adjust the viewport to do that (using methods like `setViewport` and `setSize`).\r\n *\r\n * If you wish to change where the Camera is looking in your game, then you scroll it. You can do this\r\n * via the properties `scrollX` and `scrollY` or the method `setScroll`. Scrolling has no impact on the\r\n * viewport, and changing the viewport has no impact on the scrolling.\r\n *\r\n * By default a Camera will render all Game Objects it can see. You can change this using the `ignore` method,\r\n * allowing you to filter Game Objects out on a per-Camera basis. The Camera Manager can manage up to 31 unique \r\n * 'Game Object ignore capable' Cameras. Any Cameras beyond 31 that you create will all be given a Camera ID of\r\n * zero, meaning that they cannot be used for Game Object exclusion. This means if you need your Camera to ignore\r\n * Game Objects, make sure it's one of the first 31 created.\r\n *\r\n * A Camera also has built-in special effects including Fade, Flash, Camera Shake, Pan and Zoom.\r\n *\r\n * @class CameraManager\r\n * @memberof Phaser.Cameras.Scene2D\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns the Camera Manager plugin.\r\n */\r\nvar CameraManager = new Class({\r\n\r\n initialize:\r\n\r\n function CameraManager (scene)\r\n {\r\n /**\r\n * The Scene that owns the Camera Manager plugin.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems handler for the Scene that owns the Camera Manager.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * All Cameras created by, or added to, this Camera Manager, will have their `roundPixels`\r\n * property set to match this value. By default it is set to match the value set in the\r\n * game configuration, but can be changed at any point. Equally, individual cameras can\r\n * also be changed as needed.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#roundPixels\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.roundPixels = scene.sys.game.config.roundPixels;\r\n\r\n /**\r\n * An Array of the Camera objects being managed by this Camera Manager.\r\n * The Cameras are updated and rendered in the same order in which they appear in this array.\r\n * Do not directly add or remove entries to this array. However, you can move the contents\r\n * around the array should you wish to adjust the display order.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#cameras\r\n * @type {Phaser.Cameras.Scene2D.Camera[]}\r\n * @since 3.0.0\r\n */\r\n this.cameras = [];\r\n\r\n /**\r\n * A handy reference to the 'main' camera. By default this is the first Camera the\r\n * Camera Manager creates. You can also set it directly, or use the `makeMain` argument\r\n * in the `add` and `addExisting` methods. It allows you to access it from your game:\r\n * \r\n * ```javascript\r\n * var cam = this.cameras.main;\r\n * ```\r\n * \r\n * Also see the properties `camera1`, `camera2` and so on.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#main\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.main;\r\n\r\n /**\r\n * A default un-transformed Camera that doesn't exist on the camera list and doesn't\r\n * count towards the total number of cameras being managed. It exists for other\r\n * systems, as well as your own code, should they require a basic un-transformed\r\n * camera instance from which to calculate a view matrix.\r\n *\r\n * @name Phaser.Cameras.Scene2D.CameraManager#default\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.17.0\r\n */\r\n this.default;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#boot\r\n * @private\r\n * @listens Phaser.Scenes.Events#DESTROY\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n\r\n this.main = this.cameras[0];\r\n\r\n // Create a default camera\r\n this.default = new Camera(0, 0, sys.scale.width, sys.scale.height).setScene(this.scene);\r\n\r\n sys.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#start\r\n * @private\r\n * @listens Phaser.Scenes.Events#UPDATE\r\n * @listens Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.main)\r\n {\r\n var sys = this.systems;\r\n\r\n if (sys.settings.cameras)\r\n {\r\n // We have cameras to create\r\n this.fromJSON(sys.settings.cameras);\r\n }\r\n else\r\n {\r\n // Make one\r\n this.add();\r\n }\r\n \r\n this.main = this.cameras[0];\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds a new Camera into the Camera Manager. The Camera Manager can support up to 31 different Cameras.\r\n * \r\n * Each Camera has its own viewport, which controls the size of the Camera and its position within the canvas.\r\n * \r\n * Use the `Camera.scrollX` and `Camera.scrollY` properties to change where the Camera is looking, or the\r\n * Camera methods such as `centerOn`. Cameras also have built in special effects, such as fade, flash, shake,\r\n * pan and zoom.\r\n * \r\n * By default Cameras are transparent and will render anything that they can see based on their `scrollX`\r\n * and `scrollY` values. Game Objects can be set to be ignored by a Camera by using the `Camera.ignore` method.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after creation if required.\r\n * \r\n * See the Camera class documentation for more details.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [x=0] - The horizontal position of the Camera viewport.\r\n * @param {integer} [y=0] - The vertical position of the Camera viewport.\r\n * @param {integer} [width] - The width of the Camera viewport. If not given it'll be the game config size.\r\n * @param {integer} [height] - The height of the Camera viewport. If not given it'll be the game config size.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n * @param {string} [name=''] - The name of the Camera.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The newly created Camera.\r\n */\r\n add: function (x, y, width, height, makeMain, name)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (makeMain === undefined) { makeMain = false; }\r\n if (name === undefined) { name = ''; }\r\n\r\n var camera = new Camera(x, y, width, height);\r\n\r\n camera.setName(name);\r\n camera.setScene(this.scene);\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n camera.id = this.getNextID();\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n\r\n return camera;\r\n },\r\n\r\n /**\r\n * Adds an existing Camera into the Camera Manager.\r\n * \r\n * The Camera should either be a `Phaser.Cameras.Scene2D.Camera` instance, or a class that extends from it.\r\n * \r\n * The Camera will have its `roundPixels` property set to whatever `CameraManager.roundPixels` is. You can change\r\n * it after addition if required.\r\n * \r\n * The Camera will be assigned an ID, which is used for Game Object exclusion and then added to the\r\n * manager. As long as it doesn't already exist in the manager it will be added then returned.\r\n * \r\n * If this method returns `null` then the Camera already exists in this Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#addExisting\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to be added to the Camera Manager.\r\n * @param {boolean} [makeMain=false] - Set this Camera as being the 'main' camera. This just makes the property `main` a reference to it.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The Camera that was added to the Camera Manager, or `null` if it couldn't be added.\r\n */\r\n addExisting: function (camera, makeMain)\r\n {\r\n if (makeMain === undefined) { makeMain = false; }\r\n\r\n var index = this.cameras.indexOf(camera);\r\n\r\n if (index === -1)\r\n {\r\n camera.id = this.getNextID();\r\n\r\n camera.setRoundPixels(this.roundPixels);\r\n\r\n this.cameras.push(camera);\r\n\r\n if (makeMain)\r\n {\r\n this.main = camera;\r\n }\r\n \r\n return camera;\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the next available Camera ID number.\r\n * \r\n * The Camera Manager supports up to 31 unique cameras, after which the ID returned will always be zero.\r\n * You can create additional cameras beyond 31, but they cannot be used for Game Object exclusion.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getNextID\r\n * @private\r\n * @since 3.11.0\r\n *\r\n * @return {number} The next available Camera ID, or 0 if they're all already in use.\r\n */\r\n getNextID: function ()\r\n {\r\n var cameras = this.cameras;\r\n\r\n var testID = 1;\r\n\r\n // Find the first free camera ID we can use\r\n\r\n for (var t = 0; t < 32; t++)\r\n {\r\n var found = false;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera && camera.id === testID)\r\n {\r\n found = true;\r\n continue;\r\n }\r\n }\r\n\r\n if (found)\r\n {\r\n testID = testID << 1;\r\n }\r\n else\r\n {\r\n return testID;\r\n }\r\n }\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * Gets the total number of Cameras in this Camera Manager.\r\n * \r\n * If the optional `isVisible` argument is set it will only count Cameras that are currently visible.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getTotal\r\n * @since 3.11.0\r\n * \r\n * @param {boolean} [isVisible=false] - Set the `true` to only include visible Cameras in the total.\r\n *\r\n * @return {integer} The total number of Cameras in this Camera Manager.\r\n */\r\n getTotal: function (isVisible)\r\n {\r\n if (isVisible === undefined) { isVisible = false; }\r\n\r\n var total = 0;\r\n\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (!isVisible || (isVisible && camera.visible))\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Populates this Camera Manager based on the given configuration object, or an array of config objects.\r\n * \r\n * See the `Phaser.Types.Cameras.Scene2D.CameraConfig` documentation for details of the object structure.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var gameWidth = this.scene.sys.scale.width;\r\n var gameHeight = this.scene.sys.scale.height;\r\n\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var cameraConfig = config[i];\r\n\r\n var x = GetFastValue(cameraConfig, 'x', 0);\r\n var y = GetFastValue(cameraConfig, 'y', 0);\r\n var width = GetFastValue(cameraConfig, 'width', gameWidth);\r\n var height = GetFastValue(cameraConfig, 'height', gameHeight);\r\n\r\n var camera = this.add(x, y, width, height);\r\n\r\n // Direct properties\r\n camera.name = GetFastValue(cameraConfig, 'name', '');\r\n camera.zoom = GetFastValue(cameraConfig, 'zoom', 1);\r\n camera.rotation = GetFastValue(cameraConfig, 'rotation', 0);\r\n camera.scrollX = GetFastValue(cameraConfig, 'scrollX', 0);\r\n camera.scrollY = GetFastValue(cameraConfig, 'scrollY', 0);\r\n camera.roundPixels = GetFastValue(cameraConfig, 'roundPixels', false);\r\n camera.visible = GetFastValue(cameraConfig, 'visible', true);\r\n\r\n // Background Color\r\n\r\n var backgroundColor = GetFastValue(cameraConfig, 'backgroundColor', false);\r\n\r\n if (backgroundColor)\r\n {\r\n camera.setBackgroundColor(backgroundColor);\r\n }\r\n\r\n // Bounds\r\n\r\n var boundsConfig = GetFastValue(cameraConfig, 'bounds', null);\r\n\r\n if (boundsConfig)\r\n {\r\n var bx = GetFastValue(boundsConfig, 'x', 0);\r\n var by = GetFastValue(boundsConfig, 'y', 0);\r\n var bwidth = GetFastValue(boundsConfig, 'width', gameWidth);\r\n var bheight = GetFastValue(boundsConfig, 'height', gameHeight);\r\n\r\n camera.setBounds(bx, by, bwidth, bheight);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a Camera based on its name.\r\n * \r\n * Camera names are optional and don't have to be set, so this method is only of any use if you\r\n * have given your Cameras unique names.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamera\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Camera.\r\n *\r\n * @return {?Phaser.Cameras.Scene2D.Camera} The first Camera with a name matching the given string, otherwise `null`.\r\n */\r\n getCamera: function (name)\r\n {\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n if (cameras[i].name === name)\r\n {\r\n return cameras[i];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns an array of all cameras below the given Pointer.\r\n * \r\n * The first camera in the array is the top-most camera in the camera list.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#getCamerasBelowPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera[]} An array of cameras below the Pointer.\r\n */\r\n getCamerasBelowPointer: function (pointer)\r\n {\r\n var cameras = this.cameras;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n var output = [];\r\n\r\n for (var i = 0; i < cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.inputEnabled && RectangleContains(camera, x, y))\r\n {\r\n // So the top-most camera is at the top of the search array\r\n output.unshift(camera);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Removes the given Camera, or an array of Cameras, from this Camera Manager.\r\n * \r\n * If found in the Camera Manager it will be immediately removed from the local cameras array.\r\n * If also currently the 'main' camera, 'main' will be reset to be camera 0.\r\n * \r\n * The removed Cameras are automatically destroyed if the `runDestroy` argument is `true`, which is the default.\r\n * If you wish to re-use the cameras then set this to `false`, but know that they will retain their references\r\n * and internal data until destroyed or re-added to a Camera Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Cameras.Scene2D.Camera|Phaser.Cameras.Scene2D.Camera[])} camera - The Camera, or an array of Cameras, to be removed from this Camera Manager.\r\n * @param {boolean} [runDestroy=true] - Automatically call `Camera.destroy` on each Camera removed from this Camera Manager.\r\n * \r\n * @return {integer} The total number of Cameras removed.\r\n */\r\n remove: function (camera, runDestroy)\r\n {\r\n if (runDestroy === undefined) { runDestroy = true; }\r\n\r\n if (!Array.isArray(camera))\r\n {\r\n camera = [ camera ];\r\n }\r\n\r\n var total = 0;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < camera.length; i++)\r\n {\r\n var index = cameras.indexOf(camera[i]);\r\n\r\n if (index !== -1)\r\n {\r\n if (runDestroy)\r\n {\r\n cameras[index].destroy();\r\n }\r\n\r\n cameras.splice(index, 1);\r\n\r\n total++;\r\n }\r\n }\r\n\r\n if (!this.main && cameras[0])\r\n {\r\n this.main = cameras[0];\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * The internal render method. This is called automatically by the Scene and should not be invoked directly.\r\n * \r\n * It will iterate through all local cameras and render them in turn, as long as they're visible and have\r\n * an alpha level > 0.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#render\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera.\r\n * @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.\r\n * @param {number} interpolation - Interpolation value. Reserved for future use.\r\n */\r\n render: function (renderer, children, interpolation)\r\n {\r\n var scene = this.scene;\r\n var cameras = this.cameras;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var camera = cameras[i];\r\n\r\n if (camera.visible && camera.alpha > 0)\r\n {\r\n // Hard-coded to 1 for now\r\n camera.preRender(1);\r\n\r\n renderer.render(scene, children, interpolation, camera);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets this Camera Manager.\r\n * \r\n * This will iterate through all current Cameras, destroying them all, then it will reset the\r\n * cameras array, reset the ID counter and create 1 new single camera using the default values.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resetAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The freshly created main Camera.\r\n */\r\n resetAll: function ()\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n this.main = this.add();\r\n\r\n return this.main;\r\n },\r\n\r\n /**\r\n * The main update loop. Called automatically when the Scene steps.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#update\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].update(time, delta);\r\n }\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#onResize\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution, previousWidth, previousHeight)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n var cam = this.cameras[i];\r\n\r\n // if camera is at 0x0 and was the size of the previous game size, then we can safely assume it\r\n // should be updated to match the new game size too\r\n\r\n if (cam._x === 0 && cam._y === 0 && cam._width === previousWidth && cam._height === previousHeight)\r\n {\r\n cam.setSize(baseSize.width, baseSize.height);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resizes all cameras to the given dimensions.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#resize\r\n * @since 3.2.0\r\n *\r\n * @param {number} width - The new width of the camera.\r\n * @param {number} height - The new height of the camera.\r\n */\r\n resize: function (width, height)\r\n {\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].setSize(width, height);\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.main = undefined;\r\n\r\n for (var i = 0; i < this.cameras.length; i++)\r\n {\r\n this.cameras[i].destroy();\r\n }\r\n\r\n this.cameras = [];\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Cameras.Scene2D.CameraManager#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.default.destroy();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('CameraManager', CameraManager, 'cameras');\r\n\r\nmodule.exports = CameraManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/CameraManager.js?")},"./node_modules/phaser/src/cameras/2d/effects/Fade.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Fade effect.\r\n *\r\n * This effect will fade the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is faded. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Fade\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Fade = new Class({\r\n\r\n initialize:\r\n\r\n function Fade (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * Has this effect finished running?\r\n *\r\n * This is different from `isRunning` because it remains set to `true` when the effect is over,\r\n * until the effect is either reset or started again.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#isComplete\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isComplete = false;\r\n\r\n /**\r\n * The direction of the fade.\r\n * `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#direction\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.direction = true;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFadeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Fade#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Fades the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.5.0\r\n *\r\n * @param {boolean} [direction=true] - The direction of the fade. `true` = fade out (transparent to color), `false` = fade in (color to transparent)\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=0] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=0] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=0] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFadeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (direction, duration, red, green, blue, force, callback, context)\r\n {\r\n if (direction === undefined) { direction = true; }\r\n if (duration === undefined) { duration = 1000; }\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.isComplete = false;\r\n this.duration = duration;\r\n this.direction = direction;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = (direction) ? Number.MIN_VALUE : 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n var eventName = (direction) ? Events.FADE_OUT_START : Events.FADE_IN_START;\r\n\r\n this.camera.emit(eventName, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = (this.direction) ? this.progress : 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.alpha = (this.direction) ? 1 : 0;\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning && !this.isComplete)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @fires Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n this.isComplete = true;\r\n\r\n var eventName = (this.direction) ? Events.FADE_OUT_COMPLETE : Events.FADE_IN_COMPLETE;\r\n\r\n this.camera.emit(eventName, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n this.isComplete = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Fade#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Fade;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Fade.js?")},"./node_modules/phaser/src/cameras/2d/effects/Flash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Flash effect.\r\n *\r\n * This effect will flash the camera viewport to the given color, over the duration specified.\r\n *\r\n * Only the camera viewport is flashed. None of the objects it is displaying are impacted, i.e. their colors do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect, if required.\r\n *\r\n * @class Flash\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Flash = new Class({\r\n\r\n initialize:\r\n\r\n function Flash (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The value of the red color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#red\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.red = 0;\r\n\r\n /**\r\n * The value of the green color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#green\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.green = 0;\r\n\r\n /**\r\n * The value of the blue color channel the camera will use for the fade effect.\r\n * A value between 0 and 255.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#blue\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.blue = 0;\r\n\r\n /**\r\n * The value of the alpha channel used during the fade effect.\r\n * A value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#alpha\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.alpha = 0;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraFlashCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Flash#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Flashes the Camera to or from the given color over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#start\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=250] - The duration of the effect in milliseconds.\r\n * @param {integer} [red=255] - The amount to fade the red channel towards. A value between 0 and 255.\r\n * @param {integer} [green=255] - The amount to fade the green channel towards. A value between 0 and 255.\r\n * @param {integer} [blue=255] - The amount to fade the blue channel towards. A value between 0 and 255.\r\n * @param {boolean} [force=false] - Force the effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraFlashCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, red, green, blue, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 250; }\r\n if (red === undefined) { red = 255; }\r\n if (green === undefined) { green = 255; }\r\n if (blue === undefined) { blue = 255; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = 1;\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.FLASH_START, this.camera, this, duration, red, green, blue);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.alpha = 1 - this.progress;\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally by the Canvas Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderCanvas\r\n * @since 3.5.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas context to render to.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderCanvas: function (ctx)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n\r\n ctx.fillStyle = 'rgba(' + this.red + ',' + this.green + ',' + this.blue + ',' + this.alpha + ')';\r\n ctx.fillRect(camera._cx, camera._cy, camera._cw, camera._ch);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally by the WebGL Renderer.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#postRenderWebGL\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} pipeline - The WebGL Pipeline to render to.\r\n * @param {function} getTintFunction - A function that will return the gl safe tint colors.\r\n *\r\n * @return {boolean} `true` if the effect drew to the renderer, otherwise `false`.\r\n */\r\n postRenderWebGL: function (pipeline, getTintFunction)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return false;\r\n }\r\n\r\n var camera = this.camera;\r\n var red = this.red / 255;\r\n var blue = this.blue / 255;\r\n var green = this.green / 255;\r\n\r\n pipeline.drawFillRect(\r\n camera._cx, camera._cy, camera._cw, camera._ch,\r\n getTintFunction(red, green, blue, 1),\r\n this.alpha\r\n );\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.FLASH_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Flash#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Flash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Flash.js?")},"./node_modules/phaser/src/cameras/2d/effects/Pan.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Pan effect.\r\n *\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * Only the camera scroll is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Pan\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Pan = new Class({\r\n\r\n initialize:\r\n\r\n function Pan (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting scroll coordinates to pan the camera from.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#source\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.source = new Vector2();\r\n\r\n /**\r\n * The constantly updated value based on zoom.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#current\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.current = new Vector2();\r\n\r\n /**\r\n * The destination scroll coordinates to pan the camera to.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#destination\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.11.0\r\n */\r\n this.destination = new Vector2();\r\n\r\n /**\r\n * The ease function to use during the pan.\r\n * \r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraPanCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Pan#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will scroll the Camera so that the center of its viewport finishes at the given destination,\r\n * over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#start\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The destination x coordinate to scroll the center of the Camera viewport to.\r\n * @param {number} y - The destination y coordinate to scroll the center of the Camera viewport to.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the pan. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the pan effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraPanCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * the current camera scroll x coordinate and the current camera scroll y coordinate.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (x, y, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source.set(cam.scrollX, cam.scrollY);\r\n\r\n // Destination\r\n this.destination.set(x, y);\r\n\r\n // Zoom factored version\r\n cam.getScroll(x, y, this.current);\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.PAN_START, this.camera, this, duration, x, y);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n var progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n this.progress = progress;\r\n\r\n var cam = this.camera;\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var v = this.ease(progress);\r\n\r\n cam.getScroll(this.destination.x, this.destination.y, this.current);\r\n\r\n var x = this.source.x + ((this.current.x - this.source.x) * v);\r\n var y = this.source.y + ((this.current.y - this.source.y) * v);\r\n\r\n cam.setScroll(x, y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, x, y);\r\n }\r\n }\r\n else\r\n {\r\n cam.centerOn(this.destination.x, this.destination.y);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, cam, progress, cam.scrollX, cam.scrollY);\r\n }\r\n \r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.PAN_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Pan#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.source = null;\r\n this.destination = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Pan.js?')},"./node_modules/phaser/src/cameras/2d/effects/Shake.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Shake effect.\r\n *\r\n * This effect will shake the camera viewport by a random amount, bounded by the specified intensity, each frame.\r\n *\r\n * Only the camera viewport is moved. None of the objects it is displaying are impacted, i.e. their positions do\r\n * not change.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Shake\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Shake = new Class({\r\n\r\n initialize:\r\n\r\n function Shake (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.5.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.5.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The intensity of the effect. Use small float values. The default when the effect starts is 0.05.\r\n * This is a Vector2 object, allowing you to control the shake intensity independently across x and y.\r\n * You can modify this value while the effect is active to create more varied shake effects.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#intensity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.5.0\r\n */\r\n this.intensity = new Vector2();\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#progress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * How much to offset the camera by horizontally.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetX = 0;\r\n\r\n /**\r\n * How much to offset the camera by vertically.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_offsetY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._offsetY = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraShakeCallback}\r\n * @private\r\n * @default null\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Shake#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * Shakes the Camera by the given intensity over the duration specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#start\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n *\r\n * @param {integer} [duration=100] - The duration of the effect in milliseconds.\r\n * @param {(number|Phaser.Math.Vector2)} [intensity=0.05] - The intensity of the shake.\r\n * @param {boolean} [force=false] - Force the shake effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraShakeCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (duration, intensity, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 100; }\r\n if (intensity === undefined) { intensity = 0.05; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return this.camera;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n if (typeof intensity === \'number\')\r\n {\r\n this.intensity.set(intensity);\r\n }\r\n else\r\n {\r\n this.intensity.set(intensity.x, intensity.y);\r\n }\r\n\r\n this._elapsed = 0;\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.SHAKE_START, this.camera, this, duration, intensity);\r\n\r\n return this.camera;\r\n },\r\n\r\n /**\r\n * The pre-render step for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#preRender\r\n * @since 3.5.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.isRunning)\r\n {\r\n this.camera.matrix.translate(this._offsetX, this._offsetY);\r\n }\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#update\r\n * @since 3.5.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress);\r\n }\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n var intensity = this.intensity;\r\n var width = this.camera._cw;\r\n var height = this.camera._ch;\r\n var zoom = this.camera.zoom;\r\n\r\n this._offsetX = (Math.random() * intensity.x * width * 2 - intensity.x * width) * zoom;\r\n this._offsetY = (Math.random() * intensity.y * height * 2 - intensity.y * height) * zoom;\r\n\r\n if (this.camera.roundPixels)\r\n {\r\n this._offsetX = Math.round(this._offsetX);\r\n this._offsetY = Math.round(this._offsetY);\r\n }\r\n }\r\n else\r\n {\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.5.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.SHAKE_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#reset\r\n * @since 3.5.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._offsetX = 0;\r\n this._offsetY = 0;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Shake#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n this.intensity = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shake;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Shake.js?')},"./node_modules/phaser/src/cameras/2d/effects/Zoom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EaseMap = __webpack_require__(/*! ../../../math/easing/EaseMap */ "./node_modules/phaser/src/math/easing/EaseMap.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/cameras/2d/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Camera Zoom effect.\r\n *\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback,\r\n * which is invoked each frame for the duration of the effect if required.\r\n *\r\n * @class Zoom\r\n * @memberof Phaser.Cameras.Scene2D.Effects\r\n * @constructor\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon.\r\n */\r\nvar Zoom = new Class({\r\n\r\n initialize:\r\n\r\n function Zoom (camera)\r\n {\r\n /**\r\n * The Camera this effect belongs to.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.camera = camera;\r\n\r\n /**\r\n * Is this effect actively running?\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The duration of the effect, in milliseconds.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#duration\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The starting zoom value;\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#source\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.source = 1;\r\n\r\n /**\r\n * The destination zoom value.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#destination\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.destination = 1;\r\n\r\n /**\r\n * The ease function to use during the zoom.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#ease\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * If this effect is running this holds the current percentage of the progress, a value between 0 and 1.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#progress\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Effect elapsed timer.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_elapsed\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * This callback is invoked every frame for the duration of the effect.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdate\r\n * @type {?Phaser.Types.Cameras.Scene2D.CameraZoomCallback}\r\n * @private\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * On Complete callback scope.\r\n *\r\n * @name Phaser.Cameras.Scene2D.Effects.Zoom#_onUpdateScope\r\n * @type {any}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._onUpdateScope;\r\n },\r\n\r\n /**\r\n * This effect will zoom the Camera to the given scale, over the duration and with the ease specified.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#start\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n *\r\n * @param {number} zoom - The target Camera zoom value.\r\n * @param {integer} [duration=1000] - The duration of the effect in milliseconds.\r\n * @param {(string|function)} [ease=\'Linear\'] - The ease to use for the Zoom. Can be any of the Phaser Easing constants or a custom function.\r\n * @param {boolean} [force=false] - Force the zoom effect to start immediately, even if already running.\r\n * @param {Phaser.Types.Cameras.Scene2D.CameraZoomCallback} [callback] - This callback will be invoked every frame for the duration of the effect.\r\n * It is sent three arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is,\r\n * and the current camera zoom value.\r\n * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs.\r\n *\r\n * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started.\r\n */\r\n start: function (zoom, duration, ease, force, callback, context)\r\n {\r\n if (duration === undefined) { duration = 1000; }\r\n if (ease === undefined) { ease = EaseMap.Linear; }\r\n if (force === undefined) { force = false; }\r\n if (callback === undefined) { callback = null; }\r\n if (context === undefined) { context = this.camera.scene; }\r\n\r\n var cam = this.camera;\r\n\r\n if (!force && this.isRunning)\r\n {\r\n return cam;\r\n }\r\n\r\n this.isRunning = true;\r\n this.duration = duration;\r\n this.progress = 0;\r\n\r\n // Starting from\r\n this.source = cam.zoom;\r\n\r\n // Zooming to\r\n this.destination = zoom;\r\n\r\n // Using this ease\r\n if (typeof ease === \'string\' && EaseMap.hasOwnProperty(ease))\r\n {\r\n this.ease = EaseMap[ease];\r\n }\r\n else if (typeof ease === \'function\')\r\n {\r\n this.ease = ease;\r\n }\r\n\r\n this._elapsed = 0;\r\n\r\n this._onUpdate = callback;\r\n this._onUpdateScope = context;\r\n\r\n this.camera.emit(Events.ZOOM_START, this.camera, this, duration, zoom);\r\n\r\n return cam;\r\n },\r\n\r\n /**\r\n * The main update loop for this effect. Called automatically by the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#update\r\n * @since 3.11.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this._elapsed += delta;\r\n\r\n this.progress = Clamp(this._elapsed / this.duration, 0, 1);\r\n\r\n if (this._elapsed < this.duration)\r\n {\r\n this.camera.zoom = this.source + ((this.destination - this.source) * this.ease(this.progress));\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.camera.zoom);\r\n }\r\n }\r\n else\r\n {\r\n this.camera.zoom = this.destination;\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.camera, this.progress, this.destination);\r\n }\r\n\r\n this.effectComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called internally when the effect completes.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#effectComplete\r\n * @fires Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.11.0\r\n */\r\n effectComplete: function ()\r\n {\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n this.isRunning = false;\r\n\r\n this.camera.emit(Events.ZOOM_COMPLETE, this.camera, this);\r\n },\r\n\r\n /**\r\n * Resets this camera effect.\r\n * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#reset\r\n * @since 3.11.0\r\n */\r\n reset: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n },\r\n\r\n /**\r\n * Destroys this effect, releasing it from the Camera.\r\n *\r\n * @method Phaser.Cameras.Scene2D.Effects.Zoom#destroy\r\n * @since 3.11.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.camera = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zoom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/Zoom.js?')},"./node_modules/phaser/src/cameras/2d/effects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Effects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Fade: __webpack_require__(/*! ./Fade */ "./node_modules/phaser/src/cameras/2d/effects/Fade.js"),\r\n Flash: __webpack_require__(/*! ./Flash */ "./node_modules/phaser/src/cameras/2d/effects/Flash.js"),\r\n Pan: __webpack_require__(/*! ./Pan */ "./node_modules/phaser/src/cameras/2d/effects/Pan.js"),\r\n Shake: __webpack_require__(/*! ./Shake */ "./node_modules/phaser/src/cameras/2d/effects/Shake.js"),\r\n Zoom: __webpack_require__(/*! ./Zoom */ "./node_modules/phaser/src/cameras/2d/effects/Zoom.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/effects/index.js?')},"./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Destroy Camera Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is destroyed by the Camera Manager.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that was destroyed.\r\n */\r\nmodule.exports = 'cameradestroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeincomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeincomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade In Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade In Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeinstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_IN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeinstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect completes.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutcomplete', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerafadeoutcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Fade Out Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Fade Out Effect starts.\r\n * \r\n * Listen to it from a Camera instance using `Camera.on('camerafadeoutstart', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FADE_OUT_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Fade} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'camerafadeoutstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'cameraflashcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Flash Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Flash Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#FLASH_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Flash} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {integer} red - The red color channel value.\r\n * @param {integer} green - The green color channel value.\r\n * @param {integer} blue - The blue color channel value.\r\n */\r\nmodule.exports = 'cameraflashstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerapancomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pan Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Pan Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PAN_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Pan} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} x - The destination scroll x coordinate.\r\n * @param {number} y - The destination scroll y coordinate.\r\n */\r\nmodule.exports = 'camerapanstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Post-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance after is has finished rendering.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('postrender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that has finished rendering to a texture.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Pre-Render Event.\r\n * \r\n * This event is dispatched by a Camera instance when it is about to render.\r\n * It is only dispatched if the Camera is rendering to a texture.\r\n * \r\n * Listen to it from a Camera instance using: `camera.on('prerender', listener)`.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.BaseCamera} camera - The camera that is about to render to a texture.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerashakecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Shake Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Shake Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#SHAKE_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Shake} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} intensity - The intensity of the effect.\r\n */\r\nmodule.exports = 'camerashakestart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Complete Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect completes.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_COMPLETE\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n */\r\nmodule.exports = 'camerazoomcomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Camera Zoom Start Event.\r\n * \r\n * This event is dispatched by a Camera instance when the Zoom Effect starts.\r\n *\r\n * @event Phaser.Cameras.Scene2D.Events#ZOOM_START\r\n * @since 3.3.0\r\n * \r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on.\r\n * @param {Phaser.Cameras.Scene2D.Effects.Zoom} effect - A reference to the effect instance.\r\n * @param {integer} duration - The duration of the effect.\r\n * @param {number} zoom - The destination zoom value.\r\n */\r\nmodule.exports = 'camerazoomstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js?")},"./node_modules/phaser/src/cameras/2d/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js"),\r\n FADE_IN_COMPLETE: __webpack_require__(/*! ./FADE_IN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js"),\r\n FADE_IN_START: __webpack_require__(/*! ./FADE_IN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js"),\r\n FADE_OUT_COMPLETE: __webpack_require__(/*! ./FADE_OUT_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js"),\r\n FADE_OUT_START: __webpack_require__(/*! ./FADE_OUT_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js"),\r\n FLASH_COMPLETE: __webpack_require__(/*! ./FLASH_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js"),\r\n FLASH_START: __webpack_require__(/*! ./FLASH_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js"),\r\n PAN_COMPLETE: __webpack_require__(/*! ./PAN_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js"),\r\n PAN_START: __webpack_require__(/*! ./PAN_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js"),\r\n SHAKE_COMPLETE: __webpack_require__(/*! ./SHAKE_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js"),\r\n SHAKE_START: __webpack_require__(/*! ./SHAKE_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js"),\r\n ZOOM_COMPLETE: __webpack_require__(/*! ./ZOOM_COMPLETE_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js"),\r\n ZOOM_START: __webpack_require__(/*! ./ZOOM_START_EVENT */ "./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/events/index.js?')},"./node_modules/phaser/src/cameras/2d/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Scene2D\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Camera: __webpack_require__(/*! ./Camera */ "./node_modules/phaser/src/cameras/2d/Camera.js"),\r\n CameraManager: __webpack_require__(/*! ./CameraManager */ "./node_modules/phaser/src/cameras/2d/CameraManager.js"),\r\n Effects: __webpack_require__(/*! ./effects */ "./node_modules/phaser/src/cameras/2d/effects/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/cameras/2d/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/2d/index.js?')},"./node_modules/phaser/src/cameras/controls/FixedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Fixed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n *\r\n * ```javascript\r\n * var camControl = new FixedKeyControl({\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * speed: float OR { x: 0, y: 0 }\r\n * });\r\n * ```\r\n *\r\n * Movement is precise and has no 'smoothing' applied to it.\r\n *\r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class FixedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.FixedKeyControlConfig} config - The Fixed Key Control configuration object.\r\n */\r\nvar FixedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function FixedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedX = 0;\r\n\r\n /**\r\n * The vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#speedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speedY = 0;\r\n\r\n var speed = GetValue(config, 'speed', null);\r\n\r\n if (typeof speed === 'number')\r\n {\r\n this.speedX = speed;\r\n this.speedY = speed;\r\n }\r\n else\r\n {\r\n this.speedX = GetValue(config, 'speed.x', 0);\r\n this.speedY = GetValue(config, 'speed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the current zoom level.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.FixedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n cam.scrollY -= ((this.speedY * delta) | 0);\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n cam.scrollY += ((this.speedY * delta) | 0);\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n cam.scrollX -= ((this.speedX * delta) | 0);\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n cam.scrollX += ((this.speedX * delta) | 0);\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n cam.zoom -= this.zoomSpeed;\r\n\r\n if (cam.zoom < 0.1)\r\n {\r\n cam.zoom = 0.1;\r\n }\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n cam.zoom += this.zoomSpeed;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.FixedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = FixedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/FixedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Smoothed Key Camera Control.\r\n *\r\n * This allows you to control the movement and zoom of a camera using the defined keys.\r\n * Unlike the Fixed Camera Control you can also provide physics values for acceleration, drag and maxSpeed for smoothing effects.\r\n *\r\n * ```javascript\r\n * var controlConfig = {\r\n * camera: this.cameras.main,\r\n * left: cursors.left,\r\n * right: cursors.right,\r\n * up: cursors.up,\r\n * down: cursors.down,\r\n * zoomIn: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.Q),\r\n * zoomOut: this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.E),\r\n * zoomSpeed: 0.02,\r\n * acceleration: 0.06,\r\n * drag: 0.0005,\r\n * maxSpeed: 1.0\r\n * };\r\n * ```\r\n * \r\n * You must call the `update` method of this controller every frame.\r\n *\r\n * @class SmoothedKeyControl\r\n * @memberof Phaser.Cameras.Controls\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Cameras.Controls.SmoothedKeyControlConfig} config - The Smoothed Key Control configuration object.\r\n */\r\nvar SmoothedKeyControl = new Class({\r\n\r\n initialize:\r\n\r\n function SmoothedKeyControl (config)\r\n {\r\n /**\r\n * The Camera that this Control will update.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#camera\r\n * @type {?Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = GetValue(config, 'camera', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera left.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#left\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.left = GetValue(config, 'left', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera right.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#right\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.right = GetValue(config, 'right', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera up.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#up\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.up = GetValue(config, 'up', null);\r\n\r\n /**\r\n * The Key to be pressed that will move the Camera down.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#down\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.down = GetValue(config, 'down', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera in.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomIn\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomIn = GetValue(config, 'zoomIn', null);\r\n\r\n /**\r\n * The Key to be pressed that will zoom the Camera out.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomOut\r\n * @type {?Phaser.Input.Keyboard.Key}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.zoomOut = GetValue(config, 'zoomOut', null);\r\n\r\n /**\r\n * The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#zoomSpeed\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.0.0\r\n */\r\n this.zoomSpeed = GetValue(config, 'zoomSpeed', 0.01);\r\n\r\n /**\r\n * The horizontal acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelX = 0;\r\n\r\n /**\r\n * The vertical acceleration the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#accelY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelY = 0;\r\n\r\n var accel = GetValue(config, 'acceleration', null);\r\n\r\n if (typeof accel === 'number')\r\n {\r\n this.accelX = accel;\r\n this.accelY = accel;\r\n }\r\n else\r\n {\r\n this.accelX = GetValue(config, 'acceleration.x', 0);\r\n this.accelY = GetValue(config, 'acceleration.y', 0);\r\n }\r\n\r\n /**\r\n * The horizontal drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragX = 0;\r\n\r\n /**\r\n * The vertical drag applied to the camera when it is moving.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#dragY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragY = 0;\r\n\r\n var drag = GetValue(config, 'drag', null);\r\n\r\n if (typeof drag === 'number')\r\n {\r\n this.dragX = drag;\r\n this.dragY = drag;\r\n }\r\n else\r\n {\r\n this.dragX = GetValue(config, 'drag.x', 0);\r\n this.dragY = GetValue(config, 'drag.y', 0);\r\n }\r\n\r\n /**\r\n * The maximum horizontal speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedX = 0;\r\n\r\n /**\r\n * The maximum vertical speed the camera will move.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#maxSpeedY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxSpeedY = 0;\r\n\r\n var maxSpeed = GetValue(config, 'maxSpeed', null);\r\n\r\n if (typeof maxSpeed === 'number')\r\n {\r\n this.maxSpeedX = maxSpeed;\r\n this.maxSpeedY = maxSpeed;\r\n }\r\n else\r\n {\r\n this.maxSpeedX = GetValue(config, 'maxSpeed.x', 0);\r\n this.maxSpeedY = GetValue(config, 'maxSpeed.y', 0);\r\n }\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedX\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedX = 0;\r\n\r\n /**\r\n * Internal property to track the speed of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_speedY\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._speedY = 0;\r\n\r\n /**\r\n * Internal property to track the zoom of the control.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#_zoom\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._zoom = 0;\r\n\r\n /**\r\n * A flag controlling if the Controls will update the Camera or not.\r\n *\r\n * @name Phaser.Cameras.Controls.SmoothedKeyControl#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = (this.camera !== null);\r\n },\r\n\r\n /**\r\n * Starts the Key Control running, providing it has been linked to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n start: function ()\r\n {\r\n this.active = (this.camera !== null);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this Key Control from running. Call `start` to start it again.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n stop: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds this Key Control to a camera.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#setCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to.\r\n *\r\n * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance.\r\n */\r\n setCamera: function (camera)\r\n {\r\n this.camera = camera;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies the results of pressing the control keys to the Camera.\r\n *\r\n * You must call this every step, it is not called automatically.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n if (delta === undefined) { delta = 1; }\r\n\r\n var cam = this.camera;\r\n\r\n // Apply Deceleration\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX -= this.dragX * delta;\r\n\r\n if (this._speedX < 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n else if (this._speedX < 0)\r\n {\r\n this._speedX += this.dragX * delta;\r\n\r\n if (this._speedX > 0)\r\n {\r\n this._speedX = 0;\r\n }\r\n }\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY -= this.dragY * delta;\r\n\r\n if (this._speedY < 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n else if (this._speedY < 0)\r\n {\r\n this._speedY += this.dragY * delta;\r\n\r\n if (this._speedY > 0)\r\n {\r\n this._speedY = 0;\r\n }\r\n }\r\n\r\n // Check for keys\r\n\r\n if (this.up && this.up.isDown)\r\n {\r\n this._speedY += this.accelY;\r\n\r\n if (this._speedY > this.maxSpeedY)\r\n {\r\n this._speedY = this.maxSpeedY;\r\n }\r\n }\r\n else if (this.down && this.down.isDown)\r\n {\r\n this._speedY -= this.accelY;\r\n\r\n if (this._speedY < -this.maxSpeedY)\r\n {\r\n this._speedY = -this.maxSpeedY;\r\n }\r\n }\r\n\r\n if (this.left && this.left.isDown)\r\n {\r\n this._speedX += this.accelX;\r\n\r\n if (this._speedX > this.maxSpeedX)\r\n {\r\n this._speedX = this.maxSpeedX;\r\n }\r\n }\r\n else if (this.right && this.right.isDown)\r\n {\r\n this._speedX -= this.accelX;\r\n\r\n if (this._speedX < -this.maxSpeedX)\r\n {\r\n this._speedX = -this.maxSpeedX;\r\n }\r\n }\r\n\r\n // Camera zoom\r\n\r\n if (this.zoomIn && this.zoomIn.isDown)\r\n {\r\n this._zoom = -this.zoomSpeed;\r\n }\r\n else if (this.zoomOut && this.zoomOut.isDown)\r\n {\r\n this._zoom = this.zoomSpeed;\r\n }\r\n else\r\n {\r\n this._zoom = 0;\r\n }\r\n\r\n // Apply to Camera\r\n\r\n if (this._speedX !== 0)\r\n {\r\n cam.scrollX -= ((this._speedX * delta) | 0);\r\n }\r\n\r\n if (this._speedY !== 0)\r\n {\r\n cam.scrollY -= ((this._speedY * delta) | 0);\r\n }\r\n\r\n if (this._zoom !== 0)\r\n {\r\n cam.zoom += this._zoom;\r\n\r\n if (cam.zoom < 0.001)\r\n {\r\n cam.zoom = 0.001;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Key Control.\r\n *\r\n * @method Phaser.Cameras.Controls.SmoothedKeyControl#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n\r\n this.left = null;\r\n this.right = null;\r\n this.up = null;\r\n this.down = null;\r\n\r\n this.zoomIn = null;\r\n this.zoomOut = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SmoothedKeyControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js?")},"./node_modules/phaser/src/cameras/controls/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras.Controls\r\n */\r\n\r\nmodule.exports = {\r\n\r\n FixedKeyControl: __webpack_require__(/*! ./FixedKeyControl */ "./node_modules/phaser/src/cameras/controls/FixedKeyControl.js"),\r\n SmoothedKeyControl: __webpack_require__(/*! ./SmoothedKeyControl */ "./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/controls/index.js?')},"./node_modules/phaser/src/cameras/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Cameras\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Cameras\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Controls: __webpack_require__(/*! ./controls */ "./node_modules/phaser/src/cameras/controls/index.js"),\r\n Scene2D: __webpack_require__(/*! ./2d */ "./node_modules/phaser/src/cameras/2d/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/cameras/index.js?')},"./node_modules/phaser/src/const.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Global constants.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Phaser Release Version\r\n * \r\n * @name Phaser.VERSION\r\n * @const\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n VERSION: '3.19.0',\r\n\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\"),\r\n\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\"),\r\n\r\n /**\r\n * AUTO Detect Renderer.\r\n * \r\n * @name Phaser.AUTO\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n AUTO: 0,\r\n\r\n /**\r\n * Canvas Renderer.\r\n * \r\n * @name Phaser.CANVAS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CANVAS: 1,\r\n\r\n /**\r\n * WebGL Renderer.\r\n * \r\n * @name Phaser.WEBGL\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n WEBGL: 2,\r\n\r\n /**\r\n * Headless Renderer.\r\n * \r\n * @name Phaser.HEADLESS\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HEADLESS: 3,\r\n\r\n /**\r\n * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead\r\n * to help you remember what the value is doing in your code.\r\n * \r\n * @name Phaser.FOREVER\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOREVER: -1,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.NONE\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NONE: 4,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.UP\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 5,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.DOWN\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 6,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.LEFT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 7,\r\n\r\n /**\r\n * Direction constant.\r\n * \r\n * @name Phaser.RIGHT\r\n * @const\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 8\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/const.js?")},"./node_modules/phaser/src/core/Config.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Device = __webpack_require__(/*! ../device */ \"./node_modules/phaser/src/device/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PhaserMath = __webpack_require__(/*! ../math/ */ \"./node_modules/phaser/src/math/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar ValueToColor = __webpack_require__(/*! ../display/color/ValueToColor */ \"./node_modules/phaser/src/display/color/ValueToColor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The active game configuration settings, parsed from a {@link Phaser.Types.Core.GameConfig} object.\r\n *\r\n * @class Config\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n *\r\n * @see Phaser.Game#config\r\n */\r\nvar Config = new Class({\r\n\r\n initialize:\r\n\r\n function Config (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var defaultBannerColor = [\r\n '#ff0000',\r\n '#ffff00',\r\n '#00ff00',\r\n '#00ffff',\r\n '#000000'\r\n ];\r\n\r\n var defaultBannerTextColor = '#ffffff';\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#width - The width of the underlying canvas, in pixels.\r\n */\r\n this.width = GetValue(config, 'width', 1024);\r\n\r\n /**\r\n * @const {(integer|string)} Phaser.Core.Config#height - The height of the underlying canvas, in pixels.\r\n */\r\n this.height = GetValue(config, 'height', 768);\r\n\r\n /**\r\n * @const {(Phaser.Scale.ZoomType|integer)} Phaser.Core.Config#zoom - The zoom factor, as used by the Scale Manager.\r\n */\r\n this.zoom = GetValue(config, 'zoom', 1);\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#resolution - The canvas device pixel resolution. Currently un-used.\r\n */\r\n this.resolution = GetValue(config, 'resolution', 1);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#parent - A parent DOM element into which the canvas created by the renderer will be injected.\r\n */\r\n this.parent = GetValue(config, 'parent', undefined);\r\n\r\n /**\r\n * @const {Phaser.Scale.ScaleModeType} Phaser.Core.Config#scaleMode - The scale mode as used by the Scale Manager. The default is zero, which is no scaling.\r\n */\r\n this.scaleMode = GetValue(config, 'scaleMode', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#expandParent - Is the Scale Manager allowed to adjust the CSS height property of the parent to be 100%?\r\n */\r\n this.expandParent = GetValue(config, 'expandParent', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#autoRound - Automatically round the display and style sizes of the canvas. This can help with performance in lower-powered devices.\r\n */\r\n this.autoRound = GetValue(config, 'autoRound', false);\r\n\r\n /**\r\n * @const {Phaser.Scale.CenterType} Phaser.Core.Config#autoCenter - Automatically center the canvas within the parent?\r\n */\r\n this.autoCenter = GetValue(config, 'autoCenter', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#resizeInterval - How many ms should elapse before checking if the browser size has changed?\r\n */\r\n this.resizeInterval = GetValue(config, 'resizeInterval', 500);\r\n\r\n /**\r\n * @const {?(HTMLElement|string)} Phaser.Core.Config#fullscreenTarget - The DOM element that will be sent into full screen mode, or its `id`. If undefined Phaser will create its own div and insert the canvas into it when entering fullscreen mode.\r\n */\r\n this.fullscreenTarget = GetValue(config, 'fullscreenTarget', null);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minWidth - The minimum width, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minWidth = GetValue(config, 'minWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxWidth - The maximum width, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxWidth = GetValue(config, 'maxWidth', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#minHeight - The minimum height, in pixels, the canvas will scale down to. A value of zero means no minimum.\r\n */\r\n this.minHeight = GetValue(config, 'minHeight', 0);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxHeight - The maximum height, in pixels, the canvas will scale up to. A value of zero means no maximum.\r\n */\r\n this.maxHeight = GetValue(config, 'maxHeight', 0);\r\n\r\n // Scale Manager - Anything set in here over-rides anything set above\r\n\r\n var scaleConfig = GetValue(config, 'scale', null);\r\n\r\n if (scaleConfig)\r\n {\r\n this.width = GetValue(scaleConfig, 'width', this.width);\r\n this.height = GetValue(scaleConfig, 'height', this.height);\r\n this.zoom = GetValue(scaleConfig, 'zoom', this.zoom);\r\n this.resolution = GetValue(scaleConfig, 'resolution', this.resolution);\r\n this.parent = GetValue(scaleConfig, 'parent', this.parent);\r\n this.scaleMode = GetValue(scaleConfig, 'mode', this.scaleMode);\r\n this.expandParent = GetValue(scaleConfig, 'expandParent', this.expandParent);\r\n this.autoRound = GetValue(scaleConfig, 'autoRound', this.autoRound);\r\n this.autoCenter = GetValue(scaleConfig, 'autoCenter', this.autoCenter);\r\n this.resizeInterval = GetValue(scaleConfig, 'resizeInterval', this.resizeInterval);\r\n this.fullscreenTarget = GetValue(scaleConfig, 'fullscreenTarget', this.fullscreenTarget);\r\n this.minWidth = GetValue(scaleConfig, 'min.width', this.minWidth);\r\n this.maxWidth = GetValue(scaleConfig, 'max.width', this.maxWidth);\r\n this.minHeight = GetValue(scaleConfig, 'min.height', this.minHeight);\r\n this.maxHeight = GetValue(scaleConfig, 'max.height', this.maxHeight);\r\n }\r\n\r\n /**\r\n * @const {number} Phaser.Core.Config#renderType - Force Phaser to use a specific renderer. Can be `CONST.CANVAS`, `CONST.WEBGL`, `CONST.HEADLESS` or `CONST.AUTO` (default)\r\n */\r\n this.renderType = GetValue(config, 'type', CONST.AUTO);\r\n\r\n /**\r\n * @const {?HTMLCanvasElement} Phaser.Core.Config#canvas - Force Phaser to use your own Canvas element instead of creating one.\r\n */\r\n this.canvas = GetValue(config, 'canvas', null);\r\n\r\n /**\r\n * @const {?(CanvasRenderingContext2D|WebGLRenderingContext)} Phaser.Core.Config#context - Force Phaser to use your own Canvas context instead of creating one.\r\n */\r\n this.context = GetValue(config, 'context', null);\r\n\r\n /**\r\n * @const {?string} Phaser.Core.Config#canvasStyle - Optional CSS attributes to be set on the canvas object created by the renderer.\r\n */\r\n this.canvasStyle = GetValue(config, 'canvasStyle', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#customEnvironment - Is Phaser running under a custom (non-native web) environment? If so, set this to `true` to skip internal Feature detection. If `true` the `renderType` cannot be left as `AUTO`.\r\n */\r\n this.customEnvironment = GetValue(config, 'customEnvironment', false);\r\n\r\n /**\r\n * @const {?object} Phaser.Core.Config#sceneConfig - The default Scene configuration object.\r\n */\r\n this.sceneConfig = GetValue(config, 'scene', null);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#seed - A seed which the Random Data Generator will use. If not given, a dynamic seed based on the time is used.\r\n */\r\n this.seed = GetValue(config, 'seed', [ (Date.now() * Math.random()).toString() ]);\r\n\r\n PhaserMath.RND = new PhaserMath.RandomDataGenerator(this.seed);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameTitle - The title of the game.\r\n */\r\n this.gameTitle = GetValue(config, 'title', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameURL - The URL of the game.\r\n */\r\n this.gameURL = GetValue(config, 'url', 'https://phaser.io');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#gameVersion - The version of the game.\r\n */\r\n this.gameVersion = GetValue(config, 'version', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#autoFocus - If `true` the window will automatically be given focus immediately and on any future mousedown event.\r\n */\r\n this.autoFocus = GetValue(config, 'autoFocus', true);\r\n\r\n // DOM Element Container\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domCreateContainer - Should the game create a div element to act as a DOM Container? Only enable if you're using DOM Element objects. You must provide a parent object if you use this feature.\r\n */\r\n this.domCreateContainer = GetValue(config, 'dom.createContainer', false);\r\n\r\n /**\r\n * @const {?boolean} Phaser.Core.Config#domBehindCanvas - Should the DOM Container that is created (if `dom.createContainer` is true) be positioned behind (true) or over the top (false, the default) of the game canvas?\r\n */\r\n this.domBehindCanvas = GetValue(config, 'dom.behindCanvas', false);\r\n\r\n // Input\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputKeyboard - Enable the Keyboard Plugin. This can be disabled in games that don't need keyboard input.\r\n */\r\n this.inputKeyboard = GetValue(config, 'input.keyboard', true);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputKeyboardEventTarget - The DOM Target to listen for keyboard events on. Defaults to `window` if not specified.\r\n */\r\n this.inputKeyboardEventTarget = GetValue(config, 'input.keyboard.target', window);\r\n\r\n /**\r\n * @const {?integer[]} Phaser.Core.Config#inputKeyboardCapture - `preventDefault` will be called on every non-modified key which has a key code in this array. By default, it is empty.\r\n */\r\n this.inputKeyboardCapture = GetValue(config, 'input.keyboard.capture', []);\r\n\r\n /**\r\n * @const {(boolean|object)} Phaser.Core.Config#inputMouse - Enable the Mouse Plugin. This can be disabled in games that don't need mouse input.\r\n */\r\n this.inputMouse = GetValue(config, 'input.mouse', true);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputMouseEventTarget - The DOM Target to listen for mouse events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputMouseEventTarget = GetValue(config, 'input.mouse.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputMouseCapture - Should mouse events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputMouseCapture = GetValue(config, 'input.mouse.capture', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouch - Enable the Touch Plugin. This can be disabled in games that don't need touch input.\r\n */\r\n this.inputTouch = GetValue(config, 'input.touch', Device.input.touch);\r\n\r\n /**\r\n * @const {?*} Phaser.Core.Config#inputTouchEventTarget - The DOM Target to listen for touch events on. Defaults to the game canvas if not specified.\r\n */\r\n this.inputTouchEventTarget = GetValue(config, 'input.touch.target', null);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputTouchCapture - Should touch events be captured? I.e. have prevent default called on them.\r\n */\r\n this.inputTouchCapture = GetValue(config, 'input.touch.capture', true);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputActivePointers - The number of Pointer objects created by default. In a mouse-only, or non-multi touch game, you can leave this as 1.\r\n */\r\n this.inputActivePointers = GetValue(config, 'input.activePointers', 1);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#inputSmoothFactor - The smoothing factor to apply during Pointer movement. See {@link Phaser.Input.Pointer#smoothFactor}.\r\n */\r\n this.inputSmoothFactor = GetValue(config, 'input.smoothFactor', 0);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputWindowEvents - Should Phaser listen for input events on the Window? If you disable this, events like 'POINTER_UP_OUTSIDE' will no longer fire.\r\n */\r\n this.inputWindowEvents = GetValue(config, 'input.windowEvents', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#inputGamepad - Enable the Gamepad Plugin. This can be disabled in games that don't need gamepad input.\r\n */\r\n this.inputGamepad = GetValue(config, 'input.gamepad', false);\r\n\r\n /**\r\n * @const {*} Phaser.Core.Config#inputGamepadEventTarget - The DOM Target to listen for gamepad events on. Defaults to `window` if not specified.\r\n */\r\n this.inputGamepadEventTarget = GetValue(config, 'input.gamepad.target', window);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#disableContextMenu - Set to `true` to disable the right-click context menu.\r\n */\r\n this.disableContextMenu = GetValue(config, 'disableContextMenu', false);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.AudioConfig} Phaser.Core.Config#audio - The Audio Configuration object.\r\n */\r\n this.audio = GetValue(config, 'audio');\r\n\r\n // If you do: { banner: false } it won't display any banner at all\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hideBanner - Don't write the banner line to the console.log.\r\n */\r\n this.hideBanner = (GetValue(config, 'banner', null) === false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#hidePhaser - Omit Phaser's name and version from the banner.\r\n */\r\n this.hidePhaser = GetValue(config, 'banner.hidePhaser', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#bannerTextColor - The color of the banner text.\r\n */\r\n this.bannerTextColor = GetValue(config, 'banner.text', defaultBannerTextColor);\r\n\r\n /**\r\n * @const {string[]} Phaser.Core.Config#bannerBackgroundColor - The background colors of the banner.\r\n */\r\n this.bannerBackgroundColor = GetValue(config, 'banner.background', defaultBannerColor);\r\n\r\n if (this.gameTitle === '' && this.hidePhaser)\r\n {\r\n this.hideBanner = true;\r\n }\r\n\r\n /**\r\n * @const {?Phaser.Types.Core.FPSConfig} Phaser.Core.Config#fps - The Frame Rate Configuration object, as parsed by the Timestep class.\r\n */\r\n this.fps = GetValue(config, 'fps', null);\r\n\r\n // Renderer Settings\r\n // These can either be in a `render` object within the Config, or specified on their own\r\n\r\n var renderConfig = GetValue(config, 'render', config);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#antialias - When set to `true`, WebGL uses linear interpolation to draw scaled or rotated textures, giving a smooth appearance. When set to `false`, WebGL uses nearest-neighbor interpolation, giving a crisper appearance. `false` also disables antialiasing of the game canvas itself, if the browser supports it, when the game canvas is scaled.\r\n */\r\n this.antialias = GetValue(renderConfig, 'antialias', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#desynchronized - When set to `true` it will create a desynchronized context for both 2D and WebGL. See https://developers.google.com/web/updates/2019/05/desynchronized for details.\r\n */\r\n this.desynchronized = GetValue(renderConfig, 'desynchronized', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#roundPixels - Draw texture-based Game Objects at only whole-integer positions. Game Objects without textures, like Graphics, ignore this property.\r\n */\r\n this.roundPixels = GetValue(renderConfig, 'roundPixels', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#pixelArt - Prevent pixel art from becoming blurred when scaled. It will remain crisp (tells the WebGL renderer to automatically create textures using a linear filter mode).\r\n */\r\n this.pixelArt = GetValue(renderConfig, 'pixelArt', this.zoom !== 1);\r\n\r\n if (this.pixelArt)\r\n {\r\n this.antialias = false;\r\n this.roundPixels = true;\r\n }\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#transparent - Whether the game canvas will have a transparent background.\r\n */\r\n this.transparent = GetValue(renderConfig, 'transparent', false);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#clearBeforeRender - Whether the game canvas will be cleared between each rendering frame. You can disable this if you have a full-screen background image or game object.\r\n */\r\n this.clearBeforeRender = GetValue(renderConfig, 'clearBeforeRender', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#premultipliedAlpha - In WebGL mode, sets the drawing buffer to contain colors with pre-multiplied alpha.\r\n */\r\n this.premultipliedAlpha = GetValue(renderConfig, 'premultipliedAlpha', true);\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#failIfMajorPerformanceCaveat - Let the browser abort creating a WebGL context if it judges performance would be unacceptable.\r\n */\r\n this.failIfMajorPerformanceCaveat = GetValue(renderConfig, 'failIfMajorPerformanceCaveat', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#powerPreference - \"high-performance\", \"low-power\" or \"default\". A hint to the browser on how much device power the game might use.\r\n */\r\n this.powerPreference = GetValue(renderConfig, 'powerPreference', 'default');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#batchSize - The default WebGL Batch size.\r\n */\r\n this.batchSize = GetValue(renderConfig, 'batchSize', 2000);\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#maxLights - The maximum number of lights allowed to be visible within range of a single Camera in the LightManager.\r\n */\r\n this.maxLights = GetValue(renderConfig, 'maxLights', 10);\r\n\r\n var bgc = GetValue(config, 'backgroundColor', 0);\r\n\r\n /**\r\n * @const {Phaser.Display.Color} Phaser.Core.Config#backgroundColor - The background color of the game canvas. The default is black. This value is ignored if `transparent` is set to `true`.\r\n */\r\n this.backgroundColor = ValueToColor(bgc);\r\n\r\n if (bgc === 0 && this.transparent)\r\n {\r\n this.backgroundColor.alpha = 0;\r\n }\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#preBoot - Called before Phaser boots. Useful for initializing anything not related to Phaser that Phaser may require while booting.\r\n */\r\n this.preBoot = GetValue(config, 'callbacks.preBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.BootCallback} Phaser.Core.Config#postBoot - A function to run at the end of the boot sequence. At this point, all the game systems have started and plugins have been loaded.\r\n */\r\n this.postBoot = GetValue(config, 'callbacks.postBoot', NOOP);\r\n\r\n /**\r\n * @const {Phaser.Types.Core.PhysicsConfig} Phaser.Core.Config#physics - The Physics Configuration object.\r\n */\r\n this.physics = GetValue(config, 'physics', {});\r\n\r\n /**\r\n * @const {(boolean|string)} Phaser.Core.Config#defaultPhysicsSystem - The default physics system. It will be started for each scene. Either 'arcade', 'impact' or 'matter'.\r\n */\r\n this.defaultPhysicsSystem = GetValue(this.physics, 'default', false);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderBaseURL - A URL used to resolve paths given to the loader. Example: 'http://labs.phaser.io/assets/'.\r\n */\r\n this.loaderBaseURL = GetValue(config, 'loader.baseURL', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPath - A URL path used to resolve relative paths given to the loader. Example: 'images/sprites/'.\r\n */\r\n this.loaderPath = GetValue(config, 'loader.path', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderMaxParallelDownloads - Maximum parallel downloads allowed for resources (Default to 32).\r\n */\r\n this.loaderMaxParallelDownloads = GetValue(config, 'loader.maxParallelDownloads', 32);\r\n\r\n /**\r\n * @const {(string|undefined)} Phaser.Core.Config#loaderCrossOrigin - 'anonymous', 'use-credentials', or `undefined`. If you're not making cross-origin requests, leave this as `undefined`. See {@link https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_settings_attributes}.\r\n */\r\n this.loaderCrossOrigin = GetValue(config, 'loader.crossOrigin', undefined);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderResponseType - The response type of the XHR request, e.g. `blob`, `text`, etc.\r\n */\r\n this.loaderResponseType = GetValue(config, 'loader.responseType', '');\r\n\r\n /**\r\n * @const {boolean} Phaser.Core.Config#loaderAsync - Should the XHR request use async or not?\r\n */\r\n this.loaderAsync = GetValue(config, 'loader.async', true);\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderUser - Optional username for all XHR requests.\r\n */\r\n this.loaderUser = GetValue(config, 'loader.user', '');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#loaderPassword - Optional password for all XHR requests.\r\n */\r\n this.loaderPassword = GetValue(config, 'loader.password', '');\r\n\r\n /**\r\n * @const {integer} Phaser.Core.Config#loaderTimeout - Optional XHR timeout value, in ms.\r\n */\r\n this.loaderTimeout = GetValue(config, 'loader.timeout', 0);\r\n\r\n /*\r\n * Allows `plugins` property to either be an array, in which case it just replaces\r\n * the default plugins like previously, or a config object.\r\n *\r\n * plugins: {\r\n * global: [\r\n * { key: 'TestPlugin', plugin: TestPlugin, start: true, data: { msg: 'The plugin is alive' } },\r\n * ],\r\n * scene: [\r\n * { key: 'WireFramePlugin', plugin: WireFramePlugin, systemKey: 'wireFramePlugin', sceneKey: 'wireframe' }\r\n * ],\r\n * default: [], OR\r\n * defaultMerge: [\r\n * 'ModPlayer'\r\n * ]\r\n * }\r\n */\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installGlobalPlugins - An array of global plugins to be installed.\r\n */\r\n this.installGlobalPlugins = [];\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#installScenePlugins - An array of Scene level plugins to be installed.\r\n */\r\n this.installScenePlugins = [];\r\n\r\n var plugins = GetValue(config, 'plugins', null);\r\n var defaultPlugins = DefaultPlugins.DefaultScene;\r\n\r\n if (plugins)\r\n {\r\n // Old 3.7 array format?\r\n if (Array.isArray(plugins))\r\n {\r\n this.defaultPlugins = plugins;\r\n }\r\n else if (IsPlainObject(plugins))\r\n {\r\n this.installGlobalPlugins = GetFastValue(plugins, 'global', []);\r\n this.installScenePlugins = GetFastValue(plugins, 'scene', []);\r\n\r\n if (Array.isArray(plugins.default))\r\n {\r\n defaultPlugins = plugins.default;\r\n }\r\n else if (Array.isArray(plugins.defaultMerge))\r\n {\r\n defaultPlugins = defaultPlugins.concat(plugins.defaultMerge);\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * @const {any} Phaser.Core.Config#defaultPlugins - The plugins installed into every Scene (in addition to CoreScene and Global).\r\n */\r\n this.defaultPlugins = defaultPlugins;\r\n\r\n // Default / Missing Images\r\n var pngPrefix = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAg';\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#defaultImage - A base64 encoded PNG that will be used as the default blank texture.\r\n */\r\n this.defaultImage = GetValue(config, 'images.default', pngPrefix + 'AQMAAABJtOi3AAAAA1BMVEX///+nxBvIAAAAAXRSTlMAQObYZgAAABVJREFUeF7NwIEAAAAAgKD9qdeocAMAoAABm3DkcAAAAABJRU5ErkJggg==');\r\n\r\n /**\r\n * @const {string} Phaser.Core.Config#missingImage - A base64 encoded PNG that will be used as the default texture when a texture is assigned that is missing or not loaded.\r\n */\r\n this.missingImage = GetValue(config, 'images.missing', pngPrefix + 'CAIAAAD8GO2jAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJ9JREFUeNq01ssOwyAMRFG46v//Mt1ESmgh+DFmE2GPOBARKb2NVjo+17PXLD8a1+pl5+A+wSgFygymWYHBb0FtsKhJDdZlncG2IzJ4ayoMDv20wTmSMzClEgbWYNTAkQ0Z+OJ+A/eWnAaR9+oxCF4Os0H8htsMUp+pwcgBBiMNnAwF8GqIgL2hAzaGFFgZauDPKABmowZ4GL369/0rwACp2yA/ttmvsQAAAABJRU5ErkJggg==');\r\n\r\n if (window)\r\n {\r\n if (window.FORCE_WEBGL)\r\n {\r\n this.renderType = CONST.WEBGL;\r\n }\r\n else if (window.FORCE_CANVAS)\r\n {\r\n this.renderType = CONST.CANVAS;\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Config;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Config.js?")},"./node_modules/phaser/src/core/CreateRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasInterpolation = __webpack_require__(/*! ../display/canvas/CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar Features = __webpack_require__(/*! ../device/Features */ "./node_modules/phaser/src/device/Features.js");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the renderer it will use.\r\n *\r\n * Relies upon two webpack global flags to be defined: `WEBGL_RENDERER` and `CANVAS_RENDERER` during build time, but not at run-time.\r\n *\r\n * @function Phaser.Core.CreateRenderer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance on which the renderer will be set.\r\n */\r\nvar CreateRenderer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if ((config.customEnvironment || config.canvas) && config.renderType === CONST.AUTO)\r\n {\r\n throw new Error(\'Must set explicit renderType in custom environment\');\r\n }\r\n\r\n // Not a custom environment, didn\'t provide their own canvas and not headless, so determine the renderer:\r\n if (!config.customEnvironment && !config.canvas && config.renderType !== CONST.HEADLESS)\r\n {\r\n if (config.renderType === CONST.CANVAS || (config.renderType !== CONST.CANVAS && !Features.webGL))\r\n {\r\n if (Features.canvas)\r\n {\r\n // They requested Canvas and their browser supports it\r\n config.renderType = CONST.CANVAS;\r\n }\r\n else\r\n {\r\n throw new Error(\'Cannot create Canvas or WebGL context, aborting.\');\r\n }\r\n }\r\n else\r\n {\r\n // Game requested WebGL and browser says it supports it\r\n config.renderType = CONST.WEBGL;\r\n }\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasPool.disableSmoothing();\r\n }\r\n\r\n var baseSize = game.scale.baseSize;\r\n\r\n var width = baseSize.width;\r\n var height = baseSize.height;\r\n\r\n // Does the game config provide its own canvas element to use?\r\n if (config.canvas)\r\n {\r\n game.canvas = config.canvas;\r\n\r\n game.canvas.width = width;\r\n game.canvas.height = height;\r\n }\r\n else\r\n {\r\n game.canvas = CanvasPool.create(game, width, height, config.renderType);\r\n }\r\n\r\n // Does the game config provide some canvas css styles to use?\r\n if (config.canvasStyle)\r\n {\r\n game.canvas.style = config.canvasStyle;\r\n }\r\n\r\n // Pixel Art mode?\r\n if (!config.antialias)\r\n {\r\n CanvasInterpolation.setCrisp(game.canvas);\r\n }\r\n\r\n if (config.renderType === CONST.HEADLESS)\r\n {\r\n // Nothing more to do here\r\n return;\r\n }\r\n\r\n var CanvasRenderer;\r\n var WebGLRenderer;\r\n\r\n if (typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Let the config pick the renderer type, as both are included\r\n if (config.renderType === CONST.WEBGL)\r\n {\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n else\r\n {\r\n game.renderer = new CanvasRenderer(game);\r\n game.context = game.renderer.gameContext;\r\n }\r\n }\r\n\r\n if (typeof WEBGL_RENDERER && !typeof CANVAS_RENDERER)\r\n {\r\n WebGLRenderer = __webpack_require__(/*! ../renderer/webgl/WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js");\r\n\r\n // Force the type to WebGL, regardless what was requested\r\n config.renderType = CONST.WEBGL;\r\n\r\n game.renderer = new WebGLRenderer(game);\r\n }\r\n\r\n if (!typeof WEBGL_RENDERER && typeof CANVAS_RENDERER)\r\n {\r\n CanvasRenderer = __webpack_require__(/*! ../renderer/canvas/CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js");\r\n\r\n // Force the type to Canvas, regardless what was requested\r\n config.renderType = CONST.CANVAS;\r\n\r\n game.renderer = new CanvasRenderer(game);\r\n\r\n game.context = game.renderer.gameContext;\r\n }\r\n};\r\n\r\nmodule.exports = CreateRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/CreateRenderer.js?')},"./node_modules/phaser/src/core/DebugHeader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\n\r\n/**\r\n * Called automatically by Phaser.Game and responsible for creating the console.log debug header.\r\n *\r\n * You can customize or disable the header via the Game Config object.\r\n *\r\n * @function Phaser.Core.DebugHeader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance which will output this debug header.\r\n */\r\nvar DebugHeader = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (config.hideBanner)\r\n {\r\n return;\r\n }\r\n\r\n var renderType = 'WebGL';\r\n\r\n if (config.renderType === CONST.CANVAS)\r\n {\r\n renderType = 'Canvas';\r\n }\r\n else if (config.renderType === CONST.HEADLESS)\r\n {\r\n renderType = 'Headless';\r\n }\r\n\r\n var audioConfig = config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n var audioType;\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n audioType = 'Web Audio';\r\n }\r\n else if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n audioType = 'No Audio';\r\n }\r\n else\r\n {\r\n audioType = 'HTML5 Audio';\r\n }\r\n\r\n if (!game.device.browser.ie)\r\n {\r\n var c = '';\r\n var args = [ c ];\r\n\r\n if (Array.isArray(config.bannerBackgroundColor))\r\n {\r\n var lastColor;\r\n\r\n config.bannerBackgroundColor.forEach(function (color)\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('background: ' + color);\r\n\r\n lastColor = color;\r\n\r\n });\r\n\r\n // inject the text color\r\n args[args.length - 1] = 'color: ' + config.bannerTextColor + '; background: ' + lastColor;\r\n }\r\n else\r\n {\r\n c = c.concat('%c ');\r\n\r\n args.push('color: ' + config.bannerTextColor + '; background: ' + config.bannerBackgroundColor);\r\n }\r\n\r\n // URL link background color (always white)\r\n args.push('background: #fff');\r\n\r\n if (config.gameTitle)\r\n {\r\n c = c.concat(config.gameTitle);\r\n\r\n if (config.gameVersion)\r\n {\r\n c = c.concat(' v' + config.gameVersion);\r\n }\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat(' / ');\r\n }\r\n }\r\n\r\n var fb = (typeof PLUGIN_FBINSTANT) ? '-FB' : '';\r\n\r\n if (!config.hidePhaser)\r\n {\r\n c = c.concat('Phaser v' + CONST.VERSION + fb + ' (' + renderType + ' | ' + audioType + ')');\r\n }\r\n\r\n c = c.concat(' %c ' + config.gameURL);\r\n\r\n // Inject the new string back into the args array\r\n args[0] = c;\r\n\r\n console.log.apply(console, args);\r\n }\r\n else if (window['console'])\r\n {\r\n console.log('Phaser v' + CONST.VERSION + ' / https://phaser.io');\r\n }\r\n};\r\n\r\nmodule.exports = DebugHeader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/DebugHeader.js?")},"./node_modules/phaser/src/core/Game.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js");\r\nvar AnimationManager = __webpack_require__(/*! ../animations/AnimationManager */ "./node_modules/phaser/src/animations/AnimationManager.js");\r\nvar CacheManager = __webpack_require__(/*! ../cache/CacheManager */ "./node_modules/phaser/src/cache/CacheManager.js");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Config = __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js");\r\nvar CreateDOMContainer = __webpack_require__(/*! ../dom/CreateDOMContainer */ "./node_modules/phaser/src/dom/CreateDOMContainer.js");\r\nvar CreateRenderer = __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar DebugHeader = __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js");\r\nvar Device = __webpack_require__(/*! ../device */ "./node_modules/phaser/src/device/index.js");\r\nvar DOMContentLoaded = __webpack_require__(/*! ../dom/DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar InputManager = __webpack_require__(/*! ../input/InputManager */ "./node_modules/phaser/src/input/InputManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar PluginManager = __webpack_require__(/*! ../plugins/PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js");\r\nvar ScaleManager = __webpack_require__(/*! ../scale/ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js");\r\nvar SceneManager = __webpack_require__(/*! ../scene/SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js");\r\nvar TextureEvents = __webpack_require__(/*! ../textures/events */ "./node_modules/phaser/src/textures/events/index.js");\r\nvar TextureManager = __webpack_require__(/*! ../textures/TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js");\r\nvar TimeStep = __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js");\r\nvar VisibilityHandler = __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js");\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n var SoundManagerCreator = __webpack_require__(/*! ../sound/SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n var FacebookInstantGamesPlugin = __webpack_require__(/*! ../../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n/**\r\n * @classdesc\r\n * The Phaser.Game instance is the main controller for the entire Phaser game. It is responsible\r\n * for handling the boot process, parsing the configuration values, creating the renderer,\r\n * and setting-up all of the global Phaser systems, such as sound and input.\r\n * Once that is complete it will start the Scene Manager and then begin the main game loop.\r\n *\r\n * You should generally avoid accessing any of the systems created by Game, and instead use those\r\n * made available to you via the Phaser.Scene Systems class instead.\r\n *\r\n * @class Game\r\n * @memberof Phaser\r\n * @constructor\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.GameConfig} [GameConfig] - The configuration object for your Phaser Game instance.\r\n */\r\nvar Game = new Class({\r\n\r\n initialize:\r\n\r\n function Game (config)\r\n {\r\n /**\r\n * The parsed Game Configuration object.\r\n *\r\n * The values stored within this object are read-only and should not be changed at run-time.\r\n *\r\n * @name Phaser.Game#config\r\n * @type {Phaser.Core.Config}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.config = new Config(config);\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Game#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = null;\r\n\r\n /**\r\n * A reference to an HTML Div Element used as the DOM Element Container.\r\n * \r\n * Only set if `createDOMContainer` is `true` in the game config (by default it is `false`) and\r\n * if you provide a parent element to insert the Phaser Game inside.\r\n *\r\n * See the DOM Element Game Object for more details.\r\n *\r\n * @name Phaser.Game#domContainer\r\n * @type {HTMLDivElement}\r\n * @since 3.17.0\r\n */\r\n this.domContainer = null;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n * This is created automatically by Phaser unless you provide a `canvas` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this game is rendering to.\r\n * If the game is running under Canvas it will be a 2d Canvas Rendering Context.\r\n * If the game is running under WebGL it will be a WebGL Rendering Context.\r\n * This context is created automatically by Phaser unless you provide a `context` property\r\n * in your Game Config.\r\n *\r\n * @name Phaser.Game#context\r\n * @type {(CanvasRenderingContext2D|WebGLRenderingContext)}\r\n * @since 3.0.0\r\n */\r\n this.context = null;\r\n\r\n /**\r\n * A flag indicating when this Game instance has finished its boot process.\r\n *\r\n * @name Phaser.Game#isBooted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * A flag indicating if this Game is currently running its game step or not.\r\n *\r\n * @name Phaser.Game#isRunning\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * An Event Emitter which is used to broadcast game-level events from the global systems.\r\n *\r\n * @name Phaser.Game#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * An instance of the Animation Manager.\r\n *\r\n * The Animation Manager is a global system responsible for managing all animations used within your game.\r\n *\r\n * @name Phaser.Game#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims = new AnimationManager(this);\r\n\r\n /**\r\n * An instance of the Texture Manager.\r\n *\r\n * The Texture Manager is a global system responsible for managing all textures being used by your game.\r\n *\r\n * @name Phaser.Game#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures = new TextureManager(this);\r\n\r\n /**\r\n * An instance of the Cache Manager.\r\n *\r\n * The Cache Manager is a global system responsible for caching, accessing and releasing external game assets.\r\n *\r\n * @name Phaser.Game#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache = new CacheManager(this);\r\n\r\n /**\r\n * An instance of the Data Manager\r\n *\r\n * @name Phaser.Game#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry = new DataManager(this);\r\n\r\n /**\r\n * An instance of the Input Manager.\r\n *\r\n * The Input Manager is a global system responsible for the capture of browser-level input events.\r\n *\r\n * @name Phaser.Game#input\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.input = new InputManager(this, this.config);\r\n\r\n /**\r\n * An instance of the Scene Manager.\r\n *\r\n * The Scene Manager is a global system responsible for creating, modifying and updating the Scenes in your game.\r\n *\r\n * @name Phaser.Game#scene\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.scene = new SceneManager(this, this.config.sceneConfig);\r\n\r\n /**\r\n * A reference to the Device inspector.\r\n *\r\n * Contains information about the device running this game, such as OS, browser vendor and feature support.\r\n * Used by various systems to determine capabilities and code paths.\r\n *\r\n * @name Phaser.Game#device\r\n * @type {Phaser.DeviceConf}\r\n * @since 3.0.0\r\n */\r\n this.device = Device;\r\n\r\n /**\r\n * An instance of the Scale Manager.\r\n *\r\n * The Scale Manager is a global system responsible for handling scaling of the game canvas.\r\n *\r\n * @name Phaser.Game#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scale = new ScaleManager(this, this.config);\r\n\r\n /**\r\n * An instance of the base Sound Manager.\r\n *\r\n * The Sound Manager is a global system responsible for the playback and updating of all audio in your game.\r\n * \r\n * You can disable the inclusion of the Sound Manager in your build by toggling the webpack `FEATURE_SOUND` flag.\r\n *\r\n * @name Phaser.Game#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound = null;\r\n\r\n if (typeof FEATURE_SOUND)\r\n {\r\n this.sound = SoundManagerCreator.create(this);\r\n }\r\n\r\n /**\r\n * An instance of the Time Step.\r\n *\r\n * The Time Step is a global system responsible for setting-up and responding to the browser frame events, processing\r\n * them and calculating delta values. It then automatically calls the game step.\r\n *\r\n * @name Phaser.Game#loop\r\n * @type {Phaser.Core.TimeStep}\r\n * @since 3.0.0\r\n */\r\n this.loop = new TimeStep(this, this.config.fps);\r\n\r\n /**\r\n * An instance of the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Game#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins = new PluginManager(this, this.config);\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * An instance of the Facebook Instant Games Plugin.\r\n * \r\n * This will only be available if the plugin has been built into Phaser,\r\n * or you\'re using the special Facebook Instant Games custom build.\r\n *\r\n * @name Phaser.Game#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.13.0\r\n */\r\n this.facebook = new FacebookInstantGamesPlugin(this);\r\n }\r\n\r\n /**\r\n * Is this Game pending destruction at the start of the next frame?\r\n *\r\n * @name Phaser.Game#pendingDestroy\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.pendingDestroy = false;\r\n\r\n /**\r\n * Remove the Canvas once the destroy is over?\r\n *\r\n * @name Phaser.Game#removeCanvas\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this.removeCanvas = false;\r\n\r\n /**\r\n * Remove everything when the game is destroyed.\r\n * You cannot create a new Phaser instance on the same web page after doing this.\r\n *\r\n * @name Phaser.Game#noReturn\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.noReturn = false;\r\n\r\n /**\r\n * Does the window the game is running in currently have focus or not?\r\n * This is modified by the VisibilityHandler.\r\n *\r\n * @name Phaser.Game#hasFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.9.0\r\n */\r\n this.hasFocus = false;\r\n\r\n // Wait for the DOM Ready event, then call boot.\r\n DOMContentLoaded(this.boot.bind(this));\r\n },\r\n\r\n /**\r\n * This method is called automatically when the DOM is ready. It is responsible for creating the renderer,\r\n * displaying the Debug Header, adding the game canvas to the DOM and emitting the \'boot\' event.\r\n * It listens for a \'ready\' event from the base systems and once received it will call `Game.start`.\r\n *\r\n * @method Phaser.Game#boot\r\n * @protected\r\n * @fires Phaser.Core.Events#BOOT\r\n * @listens Phaser.Textures.Events#READY\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n if (!PluginCache.hasCore(\'EventEmitter\'))\r\n {\r\n console.warn(\'Aborting. Core Plugins missing.\');\r\n return;\r\n }\r\n\r\n this.isBooted = true;\r\n\r\n this.config.preBoot(this);\r\n\r\n this.scale.preBoot();\r\n\r\n CreateRenderer(this);\r\n\r\n CreateDOMContainer(this);\r\n\r\n DebugHeader(this);\r\n\r\n AddToDOM(this.canvas, this.config.parent);\r\n\r\n // The Texture Manager has to wait on a couple of non-blocking events before it\'s fully ready.\r\n // So it will emit this internal event when done:\r\n this.textures.once(TextureEvents.READY, this.texturesReady, this);\r\n\r\n this.events.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * Called automatically when the Texture Manager has finished setting up and preparing the\r\n * default textures.\r\n *\r\n * @method Phaser.Game#texturesReady\r\n * @private\r\n * @fires Phaser.Game#ready\r\n * @since 3.12.0\r\n */\r\n texturesReady: function ()\r\n {\r\n // Start all the other systems\r\n this.events.emit(Events.READY);\r\n\r\n this.start();\r\n },\r\n\r\n /**\r\n * Called automatically by Game.boot once all of the global systems have finished setting themselves up.\r\n * By this point the Game is now ready to start the main loop running.\r\n * It will also enable the Visibility Handler.\r\n *\r\n * @method Phaser.Game#start\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n this.isRunning = true;\r\n\r\n this.config.postBoot(this);\r\n\r\n if (this.renderer)\r\n {\r\n this.loop.start(this.step.bind(this));\r\n }\r\n else\r\n {\r\n this.loop.start(this.headlessStep.bind(this));\r\n }\r\n\r\n VisibilityHandler(this);\r\n\r\n var eventEmitter = this.events;\r\n\r\n eventEmitter.on(Events.HIDDEN, this.onHidden, this);\r\n eventEmitter.on(Events.VISIBLE, this.onVisible, this);\r\n eventEmitter.on(Events.BLUR, this.onBlur, this);\r\n eventEmitter.on(Events.FOCUS, this.onFocus, this);\r\n },\r\n\r\n /**\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events.\r\n *\r\n * @method Phaser.Game#step\r\n * @fires Phaser.Core.Events#PRE_STEP_EVENT\r\n * @fires Phaser.Core.Events#STEP_EVENT\r\n * @fires Phaser.Core.Events#POST_STEP_EVENT\r\n * @fires Phaser.Core.Events#PRE_RENDER_EVENT\r\n * @fires Phaser.Core.Events#POST_RENDER_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (this.pendingDestroy)\r\n {\r\n return this.runDestroy();\r\n }\r\n\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers like Input and Sound update in the prestep\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n // This is mostly meant for user-land code and plugins\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Update the Scene Manager and all active Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n // Our final event before rendering starts\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n var renderer = this.renderer;\r\n\r\n // Run the Pre-render (clearing the canvas, setting background colors, etc)\r\n\r\n renderer.preRender();\r\n\r\n eventEmitter.emit(Events.PRE_RENDER, renderer, time, delta);\r\n\r\n // The main render loop. Iterates all Scenes and all Cameras in those scenes, rendering to the renderer instance.\r\n\r\n this.scene.render(renderer);\r\n\r\n // The Post-Render call. Tidies up loose end, takes snapshots, etc.\r\n\r\n renderer.postRender();\r\n\r\n // The final event before the step repeats. Your last chance to do anything to the canvas before it all starts again.\r\n\r\n eventEmitter.emit(Events.POST_RENDER, renderer, time, delta);\r\n },\r\n\r\n /**\r\n * A special version of the Game Step for the HEADLESS renderer only.\r\n *\r\n * The main Game Step. Called automatically by the Time Step, once per browser frame (typically as a result of\r\n * Request Animation Frame, or Set Timeout on very old browsers.)\r\n *\r\n * The step will update the global managers first, then proceed to update each Scene in turn, via the Scene Manager.\r\n *\r\n * This process emits `prerender` and `postrender` events, even though nothing actually displays.\r\n *\r\n * @method Phaser.Game#headlessStep\r\n * @fires Phaser.Game#prerenderEvent\r\n * @fires Phaser.Game#postrenderEvent\r\n * @since 3.2.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n headlessStep: function (time, delta)\r\n {\r\n var eventEmitter = this.events;\r\n\r\n // Global Managers\r\n\r\n eventEmitter.emit(Events.PRE_STEP, time, delta);\r\n\r\n eventEmitter.emit(Events.STEP, time, delta);\r\n\r\n // Scenes\r\n\r\n this.scene.update(time, delta);\r\n\r\n eventEmitter.emit(Events.POST_STEP, time, delta);\r\n\r\n // Render\r\n\r\n eventEmitter.emit(Events.PRE_RENDER);\r\n\r\n eventEmitter.emit(Events.POST_RENDER);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will pause the main loop and then emit a pause event.\r\n *\r\n * @method Phaser.Game#onHidden\r\n * @protected\r\n * @fires Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\n onHidden: function ()\r\n {\r\n this.loop.pause();\r\n\r\n this.events.emit(Events.PAUSE);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will resume the main loop and then emit a resume event.\r\n *\r\n * @method Phaser.Game#onVisible\r\n * @protected\r\n * @fires Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\n onVisible: function ()\r\n {\r\n this.loop.resume();\r\n\r\n this.events.emit(Events.RESUME);\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'blurred\' state, which pauses it.\r\n *\r\n * @method Phaser.Game#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.hasFocus = false;\r\n\r\n this.loop.blur();\r\n },\r\n\r\n /**\r\n * Called automatically by the Visibility Handler.\r\n * This will set the main loop into a \'focused\' state, which resumes it.\r\n *\r\n * @method Phaser.Game#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.hasFocus = true;\r\n\r\n this.loop.focus();\r\n },\r\n\r\n /**\r\n * Returns the current game frame.\r\n * \r\n * When the game starts running, the frame is incremented every time Request Animation Frame, or Set Timeout, fires.\r\n *\r\n * @method Phaser.Game#getFrame\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game frame.\r\n */\r\n getFrame: function ()\r\n {\r\n return this.loop.frame;\r\n },\r\n\r\n /**\r\n * Returns the time that the current game step started at, as based on `performance.now`.\r\n *\r\n * @method Phaser.Game#getTime\r\n * @since 3.16.0\r\n * \r\n * @return {number} The current game timestamp.\r\n */\r\n getTime: function ()\r\n {\r\n return this.loop.now;\r\n },\r\n\r\n /**\r\n * Flags this Game instance as needing to be destroyed on the _next frame_, making this an asynchronous operation.\r\n * \r\n * It will wait until the current frame has completed and then call `runDestroy` internally.\r\n * \r\n * If you need to react to the games eventual destruction, listen for the `DESTROY` event.\r\n * \r\n * If you **do not** need to run Phaser again on the same web page you can set the `noReturn` argument to `true` and it will free-up\r\n * memory being held by the core Phaser plugins. If you do need to create another game instance on the same page, leave this as `false`.\r\n *\r\n * @method Phaser.Game#destroy\r\n * @fires Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} removeCanvas - Set to `true` if you would like the parent canvas element removed from the DOM, or `false` to leave it in place.\r\n * @param {boolean} [noReturn=false] - If `true` all the core Phaser plugins are destroyed. You cannot create another instance of Phaser on the same web page if you do this.\r\n */\r\n destroy: function (removeCanvas, noReturn)\r\n {\r\n if (noReturn === undefined) { noReturn = false; }\r\n \r\n this.pendingDestroy = true;\r\n\r\n this.removeCanvas = removeCanvas;\r\n this.noReturn = noReturn;\r\n },\r\n\r\n /**\r\n * Destroys this Phaser.Game instance, all global systems, all sub-systems and all Scenes.\r\n *\r\n * @method Phaser.Game#runDestroy\r\n * @private\r\n * @since 3.5.0\r\n */\r\n runDestroy: function ()\r\n {\r\n this.events.emit(Events.DESTROY);\r\n\r\n this.events.removeAllListeners();\r\n\r\n this.scene.destroy();\r\n\r\n if (this.renderer)\r\n {\r\n this.renderer.destroy();\r\n }\r\n\r\n if (this.removeCanvas && this.canvas)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.canvas.parentNode)\r\n {\r\n this.canvas.parentNode.removeChild(this.canvas);\r\n }\r\n }\r\n\r\n if (this.domContainer)\r\n {\r\n this.domContainer.parentNode.removeChild(this.domContainer);\r\n }\r\n\r\n this.loop.destroy();\r\n \r\n this.pendingDestroy = false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Game;\r\n\r\n/**\r\n * "Computers are good at following instructions, but not at reading your mind." - Donald Knuth\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/Game.js?')},"./node_modules/phaser/src/core/TimeStep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar RequestAnimationFrame = __webpack_require__(/*! ../dom/RequestAnimationFrame */ \"./node_modules/phaser/src/dom/RequestAnimationFrame.js\");\r\n\r\n// Frame Rate config\r\n// fps: {\r\n// min: 10,\r\n// target: 60,\r\n// forceSetTimeOut: false,\r\n// deltaHistory: 10,\r\n// panicMax: 120\r\n// }\r\n\r\n// http://www.testufo.com/#test=animation-time-graph\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class TimeStep\r\n * @memberof Phaser.Core\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance that owns this Time Step.\r\n * @param {Phaser.Types.Core.FPSConfig} config\r\n */\r\nvar TimeStep = new Class({\r\n\r\n initialize:\r\n\r\n function TimeStep (game, config)\r\n {\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#raf\r\n * @type {Phaser.DOM.RequestAnimationFrame}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.raf = new RequestAnimationFrame();\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n *\r\n * @name Phaser.Core.TimeStep#started\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.started = false;\r\n\r\n /**\r\n * A flag that is set once the TimeStep has started running and toggled when it stops.\r\n * The difference between this value and `started` is that `running` is toggled when\r\n * the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if\r\n * the TimeStep is actually stopped, not just paused.\r\n *\r\n * @name Phaser.Core.TimeStep#running\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.running = false;\r\n\r\n /**\r\n * The minimum fps rate you want the Time Step to run at.\r\n *\r\n * @name Phaser.Core.TimeStep#minFps\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.minFps = GetValue(config, 'min', 5);\r\n\r\n /**\r\n * The target fps rate for the Time Step to run at.\r\n *\r\n * Setting this value will not actually change the speed at which the browser runs, that is beyond\r\n * the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step\r\n * is spiraling out of control.\r\n *\r\n * @name Phaser.Core.TimeStep#targetFps\r\n * @type {integer}\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.targetFps = GetValue(config, 'target', 60);\r\n\r\n /**\r\n * The minFps value in ms.\r\n * Defaults to 200ms between frames (i.e. super slow!)\r\n *\r\n * @name Phaser.Core.TimeStep#_min\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._min = 1000 / this.minFps;\r\n\r\n /**\r\n * The targetFps value in ms.\r\n * Defaults to 16.66ms between frames (i.e. normal)\r\n *\r\n * @name Phaser.Core.TimeStep#_target\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._target = 1000 / this.targetFps;\r\n\r\n /**\r\n * An exponential moving average of the frames per second.\r\n *\r\n * @name Phaser.Core.TimeStep#actualFps\r\n * @type {integer}\r\n * @readonly\r\n * @default 60\r\n * @since 3.0.0\r\n */\r\n this.actualFps = this.targetFps;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Core.TimeStep#nextFpsUpdate\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextFpsUpdate = 0;\r\n\r\n /**\r\n * The number of frames processed this second.\r\n *\r\n * @name Phaser.Core.TimeStep#framesThisSecond\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.framesThisSecond = 0;\r\n\r\n /**\r\n * A callback to be invoked each time the Time Step steps.\r\n *\r\n * @name Phaser.Core.TimeStep#callback\r\n * @type {Phaser.Types.Core.TimeStepCallback}\r\n * @default NOOP\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting\r\n * the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time.\r\n *\r\n * @name Phaser.Core.TimeStep#forceSetTimeOut\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceSetTimeOut = GetValue(config, 'forceSetTimeOut', false);\r\n\r\n /**\r\n * The time, calculated at the start of the current step, as smoothed by the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#time\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * The time at which the game started running. This value is adjusted if the game is then\r\n * paused and resumes.\r\n *\r\n * @name Phaser.Core.TimeStep#startTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` of the previous step.\r\n *\r\n * @name Phaser.Core.TimeStep#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n /**\r\n * The current frame the game is on. This counter is incremented once every game step, regardless of how much\r\n * time has passed and is unaffected by delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#frame\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frame = 0;\r\n\r\n /**\r\n * Is the browser currently considered in focus by the Page Visibility API?\r\n * This value is set in the `blur` method, which is called automatically by the Game instance.\r\n *\r\n * @name Phaser.Core.TimeStep#inFocus\r\n * @type {boolean}\r\n * @readonly\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.inFocus = true;\r\n\r\n /**\r\n * The timestamp at which the game became paused, as determined by the Page Visibility API.\r\n *\r\n * @name Phaser.Core.TimeStep#_pauseTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pauseTime = 0;\r\n\r\n /**\r\n * An internal counter to allow for the browser 'cooling down' after coming back into focus.\r\n *\r\n * @name Phaser.Core.TimeStep#_coolDown\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._coolDown = 0;\r\n\r\n /**\r\n * The delta time, in ms, since the last game step. This is a clamped and smoothed average value.\r\n *\r\n * @name Phaser.Core.TimeStep#delta\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * Internal index of the delta history position.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaIndex\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.deltaIndex = 0;\r\n\r\n /**\r\n * Internal array holding the previous delta values, used for delta smoothing.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaHistory\r\n * @type {integer[]}\r\n * @since 3.0.0\r\n */\r\n this.deltaHistory = [];\r\n\r\n /**\r\n * The maximum number of delta values that are retained in order to calculate a smoothed moving average.\r\n * \r\n * This can be changed in the Game Config via the `fps.deltaHistory` property. The default is 10.\r\n *\r\n * @name Phaser.Core.TimeStep#deltaSmoothingMax\r\n * @type {integer}\r\n * @default 10\r\n * @since 3.0.0\r\n */\r\n this.deltaSmoothingMax = GetValue(config, 'deltaHistory', 10);\r\n\r\n /**\r\n * The number of frames that the cooldown is set to after the browser panics over the FPS rate, usually\r\n * as a result of switching tabs and regaining focus.\r\n * \r\n * This can be changed in the Game Config via the `fps.panicMax` property. The default is 120.\r\n *\r\n * @name Phaser.Core.TimeStep#panicMax\r\n * @type {integer}\r\n * @default 120\r\n * @since 3.0.0\r\n */\r\n this.panicMax = GetValue(config, 'panicMax', 120);\r\n\r\n /**\r\n * The actual elapsed time in ms between one update and the next.\r\n * \r\n * Unlike with `delta`, no smoothing, capping, or averaging is applied to this value.\r\n * So please be careful when using this value in math calculations.\r\n *\r\n * @name Phaser.Core.TimeStep#rawDelta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rawDelta = 0;\r\n\r\n /**\r\n * The time, as returned by `performance.now` at the very start of the current step.\r\n * This can differ from the `time` value in that it isn't calculated based on the delta value.\r\n *\r\n * @name Phaser.Core.TimeStep#now\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.now = 0;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onBlur event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#blur\r\n * @since 3.0.0\r\n */\r\n blur: function ()\r\n {\r\n this.inFocus = false;\r\n },\r\n\r\n /**\r\n * Called by the Game instance when the DOM window.onFocus event triggers.\r\n *\r\n * @method Phaser.Core.TimeStep#focus\r\n * @since 3.0.0\r\n */\r\n focus: function ()\r\n {\r\n this.inFocus = true;\r\n\r\n this.resetDelta();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'hidden' (tab switch out of view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#pause\r\n * @since 3.0.0\r\n */\r\n pause: function ()\r\n {\r\n this._pauseTime = window.performance.now();\r\n },\r\n\r\n /**\r\n * Called when the visibility API says the game is 'visible' again (tab switch back into view, etc)\r\n *\r\n * @method Phaser.Core.TimeStep#resume\r\n * @since 3.0.0\r\n */\r\n resume: function ()\r\n {\r\n this.resetDelta();\r\n\r\n this.startTime += this.time - this._pauseTime;\r\n },\r\n\r\n /**\r\n * Resets the time, lastTime, fps averages and delta history.\r\n * Called automatically when a browser sleeps them resumes.\r\n *\r\n * @method Phaser.Core.TimeStep#resetDelta\r\n * @since 3.0.0\r\n */\r\n resetDelta: function ()\r\n {\r\n var now = window.performance.now();\r\n\r\n this.time = now;\r\n this.lastTime = now;\r\n this.nextFpsUpdate = now + 1000;\r\n this.framesThisSecond = 0;\r\n\r\n // Pre-populate smoothing array\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = Math.min(this._target, this.deltaHistory[i]);\r\n }\r\n\r\n this.delta = 0;\r\n this.deltaIndex = 0;\r\n\r\n this._coolDown = this.panicMax;\r\n },\r\n\r\n /**\r\n * Starts the Time Step running, if it is not already doing so.\r\n * Called automatically by the Game Boot process.\r\n *\r\n * @method Phaser.Core.TimeStep#start\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Core.TimeStepCallback} callback - The callback to be invoked each time the Time Step steps.\r\n */\r\n start: function (callback)\r\n {\r\n if (this.started)\r\n {\r\n return this;\r\n }\r\n\r\n this.started = true;\r\n this.running = true;\r\n\r\n for (var i = 0; i < this.deltaSmoothingMax; i++)\r\n {\r\n this.deltaHistory[i] = this._target;\r\n }\r\n\r\n this.resetDelta();\r\n\r\n this.startTime = window.performance.now();\r\n\r\n this.callback = callback;\r\n\r\n this.raf.start(this.step.bind(this), this.forceSetTimeOut);\r\n },\r\n\r\n /**\r\n * The main step method. This is called each time the browser updates, either by Request Animation Frame,\r\n * or by Set Timeout. It is responsible for calculating the delta values, frame totals, cool down history and more.\r\n * You generally should never call this method directly.\r\n *\r\n * @method Phaser.Core.TimeStep#step\r\n * @since 3.0.0\r\n */\r\n step: function ()\r\n {\r\n // Because the timestamp passed in from raf represents the beginning of the main thread frame that we’re currently in,\r\n // not the actual time now. As we want to compare this time value against Event timeStamps and the like, we need a\r\n // more accurate one:\r\n\r\n var time = window.performance.now();\r\n\r\n this.now = time;\r\n\r\n var before = time - this.lastTime;\r\n\r\n if (before < 0)\r\n {\r\n // Because, Chrome.\r\n before = 0;\r\n }\r\n\r\n this.rawDelta = before;\r\n\r\n var idx = this.deltaIndex;\r\n var history = this.deltaHistory;\r\n var max = this.deltaSmoothingMax;\r\n\r\n // delta time (time is in ms)\r\n var dt = before;\r\n\r\n // When a browser switches tab, then comes back again, it takes around 10 frames before\r\n // the delta time settles down so we employ a 'cooling down' period before we start\r\n // trusting the delta values again, to avoid spikes flooding through our delta average\r\n\r\n if (this._coolDown > 0 || !this.inFocus)\r\n {\r\n this._coolDown--;\r\n\r\n dt = Math.min(dt, this._target);\r\n }\r\n\r\n if (dt > this._min)\r\n {\r\n // Probably super bad start time or browser tab context loss,\r\n // so use the last 'sane' dt value\r\n\r\n dt = history[idx];\r\n\r\n // Clamp delta to min (in case history has become corrupted somehow)\r\n dt = Math.min(dt, this._min);\r\n }\r\n\r\n // Smooth out the delta over the previous X frames\r\n\r\n // add the delta to the smoothing array\r\n history[idx] = dt;\r\n\r\n // adjusts the delta history array index based on the smoothing count\r\n // this stops the array growing beyond the size of deltaSmoothingMax\r\n this.deltaIndex++;\r\n\r\n if (this.deltaIndex > max)\r\n {\r\n this.deltaIndex = 0;\r\n }\r\n\r\n // Delta Average\r\n var avg = 0;\r\n\r\n // Loop the history array, adding the delta values together\r\n\r\n for (var i = 0; i < max; i++)\r\n {\r\n avg += history[i];\r\n }\r\n\r\n // Then divide by the array length to get the average delta\r\n avg /= max;\r\n\r\n // Set as the world delta value\r\n this.delta = avg;\r\n\r\n // Real-world timer advance\r\n this.time += this.rawDelta;\r\n\r\n // Update the estimate of the frame rate, `fps`. Every second, the number\r\n // of frames that occurred in that second are included in an exponential\r\n // moving average of all frames per second, with an alpha of 0.25. This\r\n // means that more recent seconds affect the estimated frame rate more than\r\n // older seconds.\r\n //\r\n // When a browser window is NOT minimized, but is covered up (i.e. you're using\r\n // another app which has spawned a window over the top of the browser), then it\r\n // will start to throttle the raf callback time. It waits for a while, and then\r\n // starts to drop the frame rate at 1 frame per second until it's down to just over 1fps.\r\n // So if the game was running at 60fps, and the player opens a new window, then\r\n // after 60 seconds (+ the 'buffer time') it'll be down to 1fps, so rafin'g at 1Hz.\r\n //\r\n // When they make the game visible again, the frame rate is increased at a rate of\r\n // approx. 8fps, back up to 60fps (or the max it can obtain)\r\n //\r\n // There is no easy way to determine if this drop in frame rate is because the\r\n // browser is throttling raf, or because the game is struggling with performance\r\n // because you're asking it to do too much on the device.\r\n\r\n if (time > this.nextFpsUpdate)\r\n {\r\n // Compute the new exponential moving average with an alpha of 0.25.\r\n this.actualFps = 0.25 * this.framesThisSecond + 0.75 * this.actualFps;\r\n this.nextFpsUpdate = time + 1000;\r\n this.framesThisSecond = 0;\r\n }\r\n\r\n this.framesThisSecond++;\r\n\r\n // Interpolation - how far between what is expected and where we are?\r\n var interpolation = avg / this._target;\r\n\r\n this.callback(time, avg, interpolation);\r\n\r\n // Shift time value over\r\n this.lastTime = time;\r\n\r\n this.frame++;\r\n },\r\n\r\n /**\r\n * Manually calls `TimeStep.step`.\r\n *\r\n * @method Phaser.Core.TimeStep#tick\r\n * @since 3.0.0\r\n */\r\n tick: function ()\r\n {\r\n this.step();\r\n },\r\n\r\n /**\r\n * Sends the TimeStep to sleep, stopping Request Animation Frame (or SetTimeout) and toggling the `running` flag to false.\r\n *\r\n * @method Phaser.Core.TimeStep#sleep\r\n * @since 3.0.0\r\n */\r\n sleep: function ()\r\n {\r\n if (this.running)\r\n {\r\n this.raf.stop();\r\n\r\n this.running = false;\r\n }\r\n },\r\n\r\n /**\r\n * Wakes-up the TimeStep, restarting Request Animation Frame (or SetTimeout) and toggling the `running` flag to true.\r\n * The `seamless` argument controls if the wake-up should adjust the start time or not.\r\n *\r\n * @method Phaser.Core.TimeStep#wake\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [seamless=false] - Adjust the startTime based on the lastTime values.\r\n */\r\n wake: function (seamless)\r\n {\r\n if (this.running)\r\n {\r\n this.sleep();\r\n }\r\n else if (seamless)\r\n {\r\n this.startTime += -this.lastTime + (this.lastTime + window.performance.now());\r\n }\r\n\r\n this.raf.start(this.step.bind(this), this.useRAF);\r\n\r\n this.running = true;\r\n\r\n this.step();\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in seconds.\r\n *\r\n * @method Phaser.Core.TimeStep#getDuration\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in seconds.\r\n */\r\n getDuration: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime) / 1000;\r\n },\r\n\r\n /**\r\n * Gets the duration which the game has been running, in ms.\r\n *\r\n * @method Phaser.Core.TimeStep#getDurationMS\r\n * @since 3.17.0\r\n *\r\n * @return {number} The duration in ms.\r\n */\r\n getDurationMS: function ()\r\n {\r\n return Math.round(this.lastTime - this.startTime);\r\n },\r\n\r\n /**\r\n * Stops the TimeStep running.\r\n *\r\n * @method Phaser.Core.TimeStep#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Core.TimeStep} The TimeStep object.\r\n */\r\n stop: function ()\r\n {\r\n this.running = false;\r\n this.started = false;\r\n\r\n this.raf.stop();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys the TimeStep. This will stop Request Animation Frame, stop the step, clear the callbacks and null\r\n * any objects.\r\n *\r\n * @method Phaser.Core.TimeStep#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n\r\n this.raf = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimeStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/TimeStep.js?")},"./node_modules/phaser/src/core/VisibilityHandler.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * The Visibility Handler is responsible for listening out for document level visibility change events.\r\n * This includes `visibilitychange` if the browser supports it, and blur and focus events. It then uses\r\n * the provided Event Emitter and fires the related events.\r\n *\r\n * @function Phaser.Core.VisibilityHandler\r\n * @fires Phaser.Core.Events#BLUR\r\n * @fires Phaser.Core.Events#FOCUS\r\n * @fires Phaser.Core.Events#HIDDEN\r\n * @fires Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance this Visibility Handler is working on.\r\n */\r\nvar VisibilityHandler = function (game)\r\n{\r\n var hiddenVar;\r\n var eventEmitter = game.events;\r\n\r\n if (document.hidden !== undefined)\r\n {\r\n hiddenVar = 'visibilitychange';\r\n }\r\n else\r\n {\r\n var vendors = [ 'webkit', 'moz', 'ms' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n if (document[prefix + 'Hidden'] !== undefined)\r\n {\r\n document.hidden = function ()\r\n {\r\n return document[prefix + 'Hidden'];\r\n };\r\n\r\n hiddenVar = prefix + 'visibilitychange';\r\n }\r\n\r\n });\r\n }\r\n\r\n var onChange = function (event)\r\n {\r\n if (document.hidden || event.type === 'pause')\r\n {\r\n eventEmitter.emit(Events.HIDDEN);\r\n }\r\n else\r\n {\r\n eventEmitter.emit(Events.VISIBLE);\r\n }\r\n };\r\n\r\n if (hiddenVar)\r\n {\r\n document.addEventListener(hiddenVar, onChange, false);\r\n }\r\n\r\n window.onblur = function ()\r\n {\r\n eventEmitter.emit(Events.BLUR);\r\n };\r\n\r\n window.onfocus = function ()\r\n {\r\n eventEmitter.emit(Events.FOCUS);\r\n };\r\n\r\n // Automatically give the window focus unless config says otherwise\r\n if (window.focus && game.config.autoFocus)\r\n {\r\n window.focus();\r\n }\r\n};\r\n\r\nmodule.exports = VisibilityHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/VisibilityHandler.js?")},"./node_modules/phaser/src/core/events/BLUR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Blur Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a blurred state. The blur event is raised when the window loses focus. This can happen if a user swaps\r\n * tab, or if they simply remove focus from the browser to another app.\r\n *\r\n * @event Phaser.Core.Events#BLUR\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'blur';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BLUR_EVENT.js?")},"./node_modules/phaser/src/core/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Boot Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, but before it is ready to start running.\r\n * The global systems use this event to know when to set themselves up, dispatching their own `ready` events as required.\r\n *\r\n * @event Phaser.Core.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Lost Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Lost event from the browser.\r\n * \r\n * The partner event is `CONTEXT_RESTORED`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_LOST\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextlost';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js?")},"./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Context Restored Event.\r\n * \r\n * This event is dispatched by the Game if the WebGL Renderer it is using encounters a WebGL Context Restored event from the browser.\r\n * \r\n * The partner event is `CONTEXT_LOST`.\r\n *\r\n * @event Phaser.Core.Events#CONTEXT_RESTORED\r\n * @since 3.19.0\r\n */\r\nmodule.exports = 'contextrestored';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js?")},"./node_modules/phaser/src/core/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Destroy Event.\r\n * \r\n * This event is dispatched when the game instance has been told to destroy itself.\r\n * Lots of internal systems listen to this event in order to clear themselves out.\r\n * Custom plugins and game code should also do the same.\r\n *\r\n * @event Phaser.Core.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/core/events/FOCUS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Focus Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the window in which the Game instance is embedded\r\n * enters a focused state. The focus event is raised when the window re-gains focus, having previously lost it.\r\n *\r\n * @event Phaser.Core.Events#FOCUS\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'focus';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/FOCUS_EVENT.js?")},"./node_modules/phaser/src/core/events/HIDDEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Hidden Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a hidden state. Only browsers that support the Visibility API will cause this event to be emitted.\r\n * \r\n * In most modern browsers, when the document enters a hidden state, the Request Animation Frame and setTimeout, which\r\n * control the main game loop, will automatically pause. There is no way to stop this from happening. It is something\r\n * your game should account for in its own code, should the pause be an issue (i.e. for multiplayer games)\r\n *\r\n * @event Phaser.Core.Events#HIDDEN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'hidden';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/HIDDEN_EVENT.js?")},"./node_modules/phaser/src/core/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pause Event.\r\n * \r\n * This event is dispatched when the Game loop enters a paused state, usually as a result of the Visibility Handler.\r\n *\r\n * @event Phaser.Core.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Render Event.\r\n * \r\n * This event is dispatched right at the end of the render process.\r\n * \r\n * Every Scene will have rendered and been drawn to the canvas by the time this event is fired.\r\n * Use it for any last minute post-processing before the next game step begins.\r\n *\r\n * @event Phaser.Core.Events#POST_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'postrender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/POST_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Post-Step Event.\r\n * \r\n * This event is dispatched after the Scene Manager has updated.\r\n * Hook into it from plugins or systems that need to do things before the render starts.\r\n *\r\n * @event Phaser.Core.Events#POST_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'poststep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/POST_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Render Event.\r\n * \r\n * This event is dispatched immediately before any of the Scenes have started to render.\r\n * \r\n * The renderer will already have been initialized this frame, clearing itself and preparing to receive the Scenes for rendering, but it won't have actually drawn anything yet.\r\n *\r\n * @event Phaser.Core.Events#PRE_RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - A reference to the current renderer being used by the Game instance.\r\n */\r\nmodule.exports = 'prerender';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js?")},"./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Pre-Step Event.\r\n * \r\n * This event is dispatched before the main Game Step starts. By this point in the game cycle none of the Scene updates have yet happened.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does.\r\n *\r\n * @event Phaser.Core.Events#PRE_STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'prestep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Ready Event.\r\n * \r\n * This event is dispatched when the Phaser Game instance has finished booting, the Texture Manager is fully ready,\r\n * and all local systems are now able to start.\r\n *\r\n * @event Phaser.Core.Events#READY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/READY_EVENT.js?")},"./node_modules/phaser/src/core/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Resume Event.\r\n * \r\n * This event is dispatched when the game loop leaves a paused state and resumes running.\r\n *\r\n * @event Phaser.Core.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/core/events/STEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Step Event.\r\n * \r\n * This event is dispatched after the Game Pre-Step and before the Scene Manager steps.\r\n * Hook into it from plugins or systems that need to update before the Scene Manager does, but after the core Systems have.\r\n *\r\n * @event Phaser.Core.Events#STEP\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'step';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/STEP_EVENT.js?")},"./node_modules/phaser/src/core/events/VISIBLE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Visible Event.\r\n * \r\n * This event is dispatched by the Game Visibility Handler when the document in which the Game instance is embedded\r\n * enters a visible state, previously having been hidden.\r\n * \r\n * Only browsers that support the Visibility API will cause this event to be emitted.\r\n *\r\n * @event Phaser.Core.Events#VISIBLE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'visible';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/VISIBLE_EVENT.js?")},"./node_modules/phaser/src/core/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BLUR: __webpack_require__(/*! ./BLUR_EVENT */ "./node_modules/phaser/src/core/events/BLUR_EVENT.js"),\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/core/events/BOOT_EVENT.js"),\r\n CONTEXT_LOST: __webpack_require__(/*! ./CONTEXT_LOST_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js"),\r\n CONTEXT_RESTORED: __webpack_require__(/*! ./CONTEXT_RESTORED_EVENT */ "./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/core/events/DESTROY_EVENT.js"),\r\n FOCUS: __webpack_require__(/*! ./FOCUS_EVENT */ "./node_modules/phaser/src/core/events/FOCUS_EVENT.js"),\r\n HIDDEN: __webpack_require__(/*! ./HIDDEN_EVENT */ "./node_modules/phaser/src/core/events/HIDDEN_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/core/events/PAUSE_EVENT.js"),\r\n POST_RENDER: __webpack_require__(/*! ./POST_RENDER_EVENT */ "./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js"),\r\n POST_STEP: __webpack_require__(/*! ./POST_STEP_EVENT */ "./node_modules/phaser/src/core/events/POST_STEP_EVENT.js"),\r\n PRE_RENDER: __webpack_require__(/*! ./PRE_RENDER_EVENT */ "./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js"),\r\n PRE_STEP: __webpack_require__(/*! ./PRE_STEP_EVENT */ "./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/core/events/READY_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/core/events/RESUME_EVENT.js"),\r\n STEP: __webpack_require__(/*! ./STEP_EVENT */ "./node_modules/phaser/src/core/events/STEP_EVENT.js"),\r\n VISIBLE: __webpack_require__(/*! ./VISIBLE_EVENT */ "./node_modules/phaser/src/core/events/VISIBLE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/events/index.js?')},"./node_modules/phaser/src/core/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Core\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Config: __webpack_require__(/*! ./Config */ "./node_modules/phaser/src/core/Config.js"),\r\n CreateRenderer: __webpack_require__(/*! ./CreateRenderer */ "./node_modules/phaser/src/core/CreateRenderer.js"),\r\n DebugHeader: __webpack_require__(/*! ./DebugHeader */ "./node_modules/phaser/src/core/DebugHeader.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/core/events/index.js"),\r\n TimeStep: __webpack_require__(/*! ./TimeStep */ "./node_modules/phaser/src/core/TimeStep.js"),\r\n VisibilityHandler: __webpack_require__(/*! ./VisibilityHandler */ "./node_modules/phaser/src/core/VisibilityHandler.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/core/index.js?')},"./node_modules/phaser/src/create/GenerateTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arne16 = __webpack_require__(/*! ./palettes/Arne16 */ \"./node_modules/phaser/src/create/palettes/Arne16.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Create.GenerateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description]\r\n *\r\n * @return {HTMLCanvasElement} [description]\r\n */\r\nvar GenerateTexture = function (config)\r\n{\r\n var data = GetValue(config, 'data', []);\r\n var canvas = GetValue(config, 'canvas', null);\r\n var palette = GetValue(config, 'palette', Arne16);\r\n var pixelWidth = GetValue(config, 'pixelWidth', 1);\r\n var pixelHeight = GetValue(config, 'pixelHeight', pixelWidth);\r\n var resizeCanvas = GetValue(config, 'resizeCanvas', true);\r\n var clearCanvas = GetValue(config, 'clearCanvas', true);\r\n var preRender = GetValue(config, 'preRender', null);\r\n var postRender = GetValue(config, 'postRender', null);\r\n\r\n var width = Math.floor(Math.abs(data[0].length * pixelWidth));\r\n var height = Math.floor(Math.abs(data.length * pixelHeight));\r\n\r\n if (!canvas)\r\n {\r\n canvas = CanvasPool.create2D(this, width, height);\r\n resizeCanvas = false;\r\n clearCanvas = false;\r\n }\r\n\r\n if (resizeCanvas)\r\n {\r\n canvas.width = width;\r\n canvas.height = height;\r\n }\r\n\r\n var ctx = canvas.getContext('2d');\r\n\r\n if (clearCanvas)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n // preRender Callback?\r\n if (preRender)\r\n {\r\n preRender(canvas, ctx);\r\n }\r\n\r\n // Draw it\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var d = row[x];\r\n\r\n if (d !== '.' && d !== ' ')\r\n {\r\n ctx.fillStyle = palette[d];\r\n ctx.fillRect(x * pixelWidth, y * pixelHeight, pixelWidth, pixelHeight);\r\n }\r\n }\r\n }\r\n\r\n // postRender Callback?\r\n if (postRender)\r\n {\r\n postRender(canvas, ctx);\r\n }\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = GenerateTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/GenerateTexture.js?")},"./node_modules/phaser/src/create/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create\r\n */\r\n\r\nmodule.exports = {\r\n \r\n GenerateTexture: __webpack_require__(/*! ./GenerateTexture */ "./node_modules/phaser/src/create/GenerateTexture.js"),\r\n Palettes: __webpack_require__(/*! ./palettes */ "./node_modules/phaser/src/create/palettes/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/index.js?')},"./node_modules/phaser/src/create/palettes/Arne16.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.ARNE16\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#9D9D9D',\r\n 2: '#FFF',\r\n 3: '#BE2633',\r\n 4: '#E06F8B',\r\n 5: '#493C2B',\r\n 6: '#A46422',\r\n 7: '#EB8931',\r\n 8: '#F7E26B',\r\n 9: '#2F484E',\r\n A: '#44891A',\r\n B: '#A3CE27',\r\n C: '#1B2632',\r\n D: '#005784',\r\n E: '#31A2F2',\r\n F: '#B2DCEF'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/Arne16.js?")},"./node_modules/phaser/src/create/palettes/C64.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by the Commodore 64.\r\n *\r\n * @name Phaser.Create.Palettes.C64\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#fff',\r\n 2: '#8b4131',\r\n 3: '#7bbdc5',\r\n 4: '#8b41ac',\r\n 5: '#6aac41',\r\n 6: '#3931a4',\r\n 7: '#d5de73',\r\n 8: '#945a20',\r\n 9: '#5a4100',\r\n A: '#bd736a',\r\n B: '#525252',\r\n C: '#838383',\r\n D: '#acee8b',\r\n E: '#7b73de',\r\n F: '#acacac'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/C64.js?")},"./node_modules/phaser/src/create/palettes/CGA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color CGA inspired palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.CGA\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#2234d1',\r\n 2: '#0c7e45',\r\n 3: '#44aacc',\r\n 4: '#8a3622',\r\n 5: '#5c2e78',\r\n 6: '#aa5c3d',\r\n 7: '#b5b5b5',\r\n 8: '#5e606e',\r\n 9: '#4c81fb',\r\n A: '#6cd947',\r\n B: '#7be2f9',\r\n C: '#eb8a60',\r\n D: '#e23d69',\r\n E: '#ffd93f',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/CGA.js?")},"./node_modules/phaser/src/create/palettes/JMP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color JMP palette by [Arne](http://androidarts.com/palette/16pal.htm)\r\n *\r\n * @name Phaser.Create.Palettes.JMP\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#f5f4eb'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/JMP.js?")},"./node_modules/phaser/src/create/palettes/MSX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A 16 color palette inspired by Japanese computers like the MSX.\r\n *\r\n * @name Phaser.Create.Palettes.MSX\r\n * @since 3.0.0\r\n *\r\n * @type {Phaser.Types.Create.Palette}\r\n */\r\nmodule.exports = {\r\n 0: '#000',\r\n 1: '#191028',\r\n 2: '#46af45',\r\n 3: '#a1d685',\r\n 4: '#453e78',\r\n 5: '#7664fe',\r\n 6: '#833129',\r\n 7: '#9ec2e8',\r\n 8: '#dc534b',\r\n 9: '#e18d79',\r\n A: '#d6b97b',\r\n B: '#e9d8a1',\r\n C: '#216c4b',\r\n D: '#d365c8',\r\n E: '#afaab9',\r\n F: '#fff'\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/MSX.js?")},"./node_modules/phaser/src/create/palettes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Create.Palettes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARNE16: __webpack_require__(/*! ./Arne16 */ "./node_modules/phaser/src/create/palettes/Arne16.js"),\r\n C64: __webpack_require__(/*! ./C64 */ "./node_modules/phaser/src/create/palettes/C64.js"),\r\n CGA: __webpack_require__(/*! ./CGA */ "./node_modules/phaser/src/create/palettes/CGA.js"),\r\n JMP: __webpack_require__(/*! ./JMP */ "./node_modules/phaser/src/create/palettes/JMP.js"),\r\n MSX: __webpack_require__(/*! ./MSX */ "./node_modules/phaser/src/create/palettes/MSX.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/create/palettes/index.js?')},"./node_modules/phaser/src/curves/CubicBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CubicBezier = __webpack_require__(/*! ../math/interpolation/CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A higher-order Bézier curve constructed of four points.\r\n *\r\n * @class CubicBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector2[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n * @param {Phaser.Math.Vector2} p3 - End Point.\r\n */\r\nvar CubicBezierCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function CubicBezierCurve (p0, p1, p2, p3)\r\n {\r\n Curve.call(this, \'CubicBezierCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p3 = new Vector2(p0[6], p0[7]);\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The start point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The first control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * The second control point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p2 = p2;\r\n\r\n /**\r\n * The end point of this curve.\r\n *\r\n * @name Phaser.Curves.CubicBezier#p3\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p3 = p3;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Returns the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - The amount of divisions used by this curve.\r\n *\r\n * @return {number} The resolution of the curve.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.CubicBezier#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n var p3 = this.p3;\r\n\r\n return out.set(CubicBezier(t, p0.x, p1.x, p2.x, p3.x), CubicBezier(t, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * Draws this curve to the specified graphics object.\r\n *\r\n * @method Phaser.Curves.CubicBezier#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The graphics object this curve should be drawn to.\r\n * @param {integer} [pointsTotal=32] - The number of intermediary points that make up this curve. A higher number of points will result in a smoother curve.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The graphics object this curve was drawn to. Useful for method chaining.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Returns a JSON object that describes this curve.\r\n *\r\n * @method Phaser.Curves.CubicBezier#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y,\r\n this.p3.x, this.p3.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Generates a curve from a JSON object.\r\n *\r\n * @function Phaser.Curves.CubicBezier.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.CubicBezier} The curve generated from the JSON object.\r\n */\r\nCubicBezierCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n var p3 = new Vector2(points[6], points[7]);\r\n\r\n return new CubicBezierCurve(p0, p1, p2, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/CubicBezierCurve.js?')},"./node_modules/phaser/src/curves/Curve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ \"./node_modules/phaser/src/geom/rectangle/FromPoints.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Base Curve class, which all other curve types extend.\r\n *\r\n * Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n *\r\n * @class Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - [description]\r\n */\r\nvar Curve = new Class({\r\n\r\n initialize:\r\n\r\n function Curve (type)\r\n {\r\n /**\r\n * String based identifier for the type of curve.\r\n *\r\n * @name Phaser.Curves.Curve#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The default number of divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#defaultDivisions\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.0.0\r\n */\r\n this.defaultDivisions = 5;\r\n\r\n /**\r\n * The quantity of arc length divisions within the curve.\r\n *\r\n * @name Phaser.Curves.Curve#arcLengthDivisions\r\n * @type {integer}\r\n * @default 100\r\n * @since 3.0.0\r\n */\r\n this.arcLengthDivisions = 100;\r\n\r\n /**\r\n * An array of cached arc length values.\r\n *\r\n * @name Phaser.Curves.Curve#cacheArcLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheArcLengths = [];\r\n\r\n /**\r\n * Does the data of this curve need updating?\r\n *\r\n * @name Phaser.Curves.Curve#needsUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.needsUpdate = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Curve#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary calculation Vector.\r\n *\r\n * @name Phaser.Curves.Curve#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n },\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Curve#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n * @param {integer} [pointsTotal=32] - The resolution of the curve. The higher the value the smoother it will render, at the cost of rendering performance.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n // So you can chain graphics calls\r\n return graphics.strokePoints(this.getPoints(pointsTotal));\r\n },\r\n \r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * You can control the accuracy of the bounds. The value given is used to work out how many points\r\n * to plot across the curve. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @method Phaser.Curves.Curve#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in. If falsey a new object will be created.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (!out) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n var len = this.getLength();\r\n\r\n if (accuracy > len)\r\n {\r\n accuracy = len / 2;\r\n }\r\n\r\n // The length of the curve in pixels\r\n // So we'll have 1 spaced point per 'accuracy' pixels\r\n\r\n var spaced = Math.max(1, Math.round(len / accuracy));\r\n\r\n return FromPoints(this.getSpacedPoints(spaced), out);\r\n },\r\n\r\n /**\r\n * Returns an array of points, spaced out X distance pixels apart.\r\n * The smaller the distance, the larger the array will be.\r\n *\r\n * @method Phaser.Curves.Curve#getDistancePoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - The distance, in pixels, between each point along the curve.\r\n *\r\n * @return {Phaser.Geom.Point[]} An Array of Point objects.\r\n */\r\n getDistancePoints: function (distance)\r\n {\r\n var len = this.getLength();\r\n\r\n var spaced = Math.max(1, len / distance);\r\n\r\n return this.getSpacedPoints(spaced);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - Optional Vector object to store the result in.\r\n *\r\n * @return {Phaser.Math.Vector2} Vector2 containing the coordinates of the curves end point.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(1, out);\r\n },\r\n\r\n /**\r\n * Get total curve arc length\r\n *\r\n * @method Phaser.Curves.Curve#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getLength: function ()\r\n {\r\n var lengths = this.getLengths();\r\n\r\n return lengths[lengths.length - 1];\r\n },\r\n\r\n\r\n /**\r\n * Get list of cumulative segment lengths\r\n *\r\n * @method Phaser.Curves.Curve#getLengths\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number[]} [description]\r\n */\r\n getLengths: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.arcLengthDivisions; }\r\n\r\n if ((this.cacheArcLengths.length === divisions + 1) && !this.needsUpdate)\r\n {\r\n return this.cacheArcLengths;\r\n }\r\n\r\n this.needsUpdate = false;\r\n\r\n var cache = [];\r\n var current;\r\n var last = this.getPoint(0, this._tmpVec2A);\r\n var sum = 0;\r\n\r\n cache.push(0);\r\n\r\n for (var p = 1; p <= divisions; p++)\r\n {\r\n current = this.getPoint(p / divisions, this._tmpVec2B);\r\n\r\n sum += current.distance(last);\r\n\r\n cache.push(sum);\r\n\r\n last.copy(current);\r\n }\r\n\r\n this.cacheArcLengths = cache;\r\n\r\n return cache; // { sums: cache, sum:sum }; Sum is in the last element.\r\n },\r\n\r\n // Get point at relative position in curve according to arc length\r\n\r\n // - u [0 .. 1]\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getPoint(t, out);\r\n },\r\n\r\n // Get sequence of points using getPoint( t )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n points.push(this.getPoint(d / divisions));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n // Get sequence of points using getPointAt( u )\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = this.defaultDivisions; }\r\n\r\n var points = [];\r\n\r\n for (var d = 0; d <= divisions; d++)\r\n {\r\n var t = this.getUtoTmapping(d / divisions, null, divisions);\r\n\r\n points.push(this.getPoint(t));\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPointAt(0, out);\r\n },\r\n\r\n /**\r\n * Returns a unit vector tangent at t\r\n * In case any sub curve does not implement its tangent derivation,\r\n * 2 points a small delta apart will be used to find its gradient\r\n * which seems to give a reasonable approximation\r\n *\r\n * @method Phaser.Curves.Curve#getTangent\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} Vector approximating the tangent line at the point t (delta +/- 0.0001)\r\n */\r\n getTangent: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var delta = 0.0001;\r\n var t1 = t - delta;\r\n var t2 = t + delta;\r\n\r\n // Capping in case of danger\r\n\r\n if (t1 < 0)\r\n {\r\n t1 = 0;\r\n }\r\n\r\n if (t2 > 1)\r\n {\r\n t2 = 1;\r\n }\r\n\r\n this.getPoint(t1, this._tmpVec2A);\r\n this.getPoint(t2, out);\r\n\r\n return out.subtract(this._tmpVec2A).normalize();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTangentAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getTangentAt: function (u, out)\r\n {\r\n var t = this.getUtoTmapping(u);\r\n\r\n return this.getTangent(t, out);\r\n },\r\n\r\n // Given a distance in pixels, get a t to find p.\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getTFromDistance\r\n * @since 3.0.0\r\n *\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getTFromDistance: function (distance, divisions)\r\n {\r\n if (distance <= 0)\r\n {\r\n return 0;\r\n }\r\n\r\n return this.getUtoTmapping(0, distance, divisions);\r\n },\r\n\r\n // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#getUtoTmapping\r\n * @since 3.0.0\r\n *\r\n * @param {number} u - [description]\r\n * @param {integer} distance - [description]\r\n * @param {integer} [divisions] - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getUtoTmapping: function (u, distance, divisions)\r\n {\r\n var arcLengths = this.getLengths(divisions);\r\n\r\n var i = 0;\r\n var il = arcLengths.length;\r\n\r\n var targetArcLength; // The targeted u distance value to get\r\n\r\n if (distance)\r\n {\r\n // Cannot overshoot the curve\r\n targetArcLength = Math.min(distance, arcLengths[il - 1]);\r\n }\r\n else\r\n {\r\n targetArcLength = u * arcLengths[il - 1];\r\n }\r\n\r\n // binary search for the index with largest value smaller than target u distance\r\n\r\n var low = 0;\r\n var high = il - 1;\r\n var comparison;\r\n\r\n while (low <= high)\r\n {\r\n i = Math.floor(low + (high - low) / 2); // less likely to overflow, though probably not issue here, JS doesn't really have integers, all numbers are floats\r\n\r\n comparison = arcLengths[i] - targetArcLength;\r\n\r\n if (comparison < 0)\r\n {\r\n low = i + 1;\r\n }\r\n else if (comparison > 0)\r\n {\r\n high = i - 1;\r\n }\r\n else\r\n {\r\n high = i;\r\n break;\r\n }\r\n }\r\n\r\n i = high;\r\n\r\n if (arcLengths[i] === targetArcLength)\r\n {\r\n return i / (il - 1);\r\n }\r\n\r\n // we could get finer grain at lengths, or use simple interpolation between two points\r\n\r\n var lengthBefore = arcLengths[i];\r\n var lengthAfter = arcLengths[i + 1];\r\n\r\n var segmentLength = lengthAfter - lengthBefore;\r\n\r\n // determine where we are between the 'before' and 'after' points\r\n\r\n var segmentFraction = (targetArcLength - lengthBefore) / segmentLength;\r\n\r\n // add that fractional amount to t\r\n\r\n return (i + segmentFraction) / (il - 1);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Curve#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.needsUpdate = true;\r\n\r\n this.getLengths();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/Curve.js?")},"./node_modules/phaser/src/curves/EllipseCurve.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Curve = __webpack_require__(/*! ./Curve */ \"./node_modules/phaser/src/curves/Curve.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Elliptical Curve derived from the Base Curve class.\r\n * \r\n * See https://en.wikipedia.org/wiki/Elliptic_curve for more details.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.Curves.EllipseCurveConfig)} [x=0] - The x coordinate of the ellipse, or an Ellipse Curve configuration object.\r\n * @param {number} [y=0] - The y coordinate of the ellipse.\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {integer} [rotation=0] - The rotation of the ellipse, in degrees.\r\n */\r\nvar EllipseCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function EllipseCurve (x, y, xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetValue(config, 'x', 0);\r\n y = GetValue(config, 'y', 0);\r\n xRadius = GetValue(config, 'xRadius', 0);\r\n yRadius = GetValue(config, 'yRadius', xRadius);\r\n startAngle = GetValue(config, 'startAngle', 0);\r\n endAngle = GetValue(config, 'endAngle', 360);\r\n clockwise = GetValue(config, 'clockwise', false);\r\n rotation = GetValue(config, 'rotation', 0);\r\n }\r\n else\r\n {\r\n if (yRadius === undefined) { yRadius = xRadius; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (clockwise === undefined) { clockwise = false; }\r\n if (rotation === undefined) { rotation = 0; }\r\n }\r\n\r\n Curve.call(this, 'EllipseCurve');\r\n\r\n // Center point\r\n\r\n /**\r\n * The center point of the ellipse. Used for calculating rotation.\r\n *\r\n * @name Phaser.Curves.Ellipse#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_xRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._xRadius = xRadius;\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#_yRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._yRadius = yRadius;\r\n\r\n // Radians\r\n\r\n /**\r\n * The starting angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_startAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._startAngle = DegToRad(startAngle);\r\n\r\n /**\r\n * The end angle of the ellipse in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#_endAngle\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._endAngle = DegToRad(endAngle);\r\n\r\n /**\r\n * Anti-clockwise direction.\r\n *\r\n * @name Phaser.Curves.Ellipse#_clockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._clockwise = clockwise;\r\n\r\n /**\r\n * The rotation of the arc.\r\n *\r\n * @name Phaser.Curves.Ellipse#_rotation\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._rotation = DegToRad(rotation);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(0, out);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Ellipse#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * 2;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var twoPi = Math.PI * 2;\r\n var deltaAngle = this._endAngle - this._startAngle;\r\n var samePoints = Math.abs(deltaAngle) < Number.EPSILON;\r\n\r\n // ensures that deltaAngle is 0 .. 2 PI\r\n while (deltaAngle < 0)\r\n {\r\n deltaAngle += twoPi;\r\n }\r\n\r\n while (deltaAngle > twoPi)\r\n {\r\n deltaAngle -= twoPi;\r\n }\r\n\r\n if (deltaAngle < Number.EPSILON)\r\n {\r\n if (samePoints)\r\n {\r\n deltaAngle = 0;\r\n }\r\n else\r\n {\r\n deltaAngle = twoPi;\r\n }\r\n }\r\n\r\n if (this._clockwise && !samePoints)\r\n {\r\n if (deltaAngle === twoPi)\r\n {\r\n deltaAngle = - twoPi;\r\n }\r\n else\r\n {\r\n deltaAngle = deltaAngle - twoPi;\r\n }\r\n }\r\n\r\n var angle = this._startAngle + t * deltaAngle;\r\n var x = this.p0.x + this._xRadius * Math.cos(angle);\r\n var y = this.p0.y + this._yRadius * Math.sin(angle);\r\n\r\n if (this._rotation !== 0)\r\n {\r\n var cos = Math.cos(this._rotation);\r\n var sin = Math.sin(this._rotation);\r\n\r\n var tx = x - this.p0.x;\r\n var ty = y - this.p0.y;\r\n\r\n // Rotate the point about the center of the ellipse.\r\n x = tx * cos - ty * sin + this.p0.x;\r\n y = tx * sin + ty * cos + this.p0.y;\r\n }\r\n\r\n return out.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the horizontal radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setXRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setXRadius: function (value)\r\n {\r\n this.xRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical radius of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setYRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical radius of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setYRadius: function (value)\r\n {\r\n this.yRadius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The width of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setWidth: function (value)\r\n {\r\n this.xRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the height of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setHeight\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The height of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setHeight: function (value)\r\n {\r\n this.yRadius = value * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setStartAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The start angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setStartAngle: function (value)\r\n {\r\n this.startAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the end angle of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setEndAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The end angle of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setEndAngle: function (value)\r\n {\r\n this.endAngle = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this curve extends clockwise or anti-clockwise.\r\n *\r\n * @method Phaser.Curves.Ellipse#setClockwise\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The clockwise state of this curve.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setClockwise: function (value)\r\n {\r\n this.clockwise = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The rotation of this curve, in radians.\r\n *\r\n * @return {Phaser.Curves.Ellipse} This curve object.\r\n */\r\n setRotation: function (value)\r\n {\r\n this.rotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.p0.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.p0.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#xRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n xRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._xRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._xRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical radius of the ellipse.\r\n *\r\n * @name Phaser.Curves.Ellipse#yRadius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n yRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._yRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._yRadius = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#startAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._startAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the ellipse in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#endAngle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._endAngle);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * `true` if the ellipse rotation is clockwise or `false` if anti-clockwise.\r\n *\r\n * @name Phaser.Curves.Ellipse#clockwise\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n clockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._clockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._clockwise = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in degrees.\r\n *\r\n * @name Phaser.Curves.Ellipse#angle\r\n * @type {number}\r\n * @since 3.14.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return RadToDeg(this._rotation);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = DegToRad(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the ellipse, relative to the center, in radians.\r\n *\r\n * @name Phaser.Curves.Ellipse#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rotation = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * JSON serialization of the curve.\r\n *\r\n * @method Phaser.Curves.Ellipse#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONEllipseCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n x: this.p0.x,\r\n y: this.p0.y,\r\n xRadius: this._xRadius,\r\n yRadius: this._yRadius,\r\n startAngle: RadToDeg(this._startAngle),\r\n endAngle: RadToDeg(this._endAngle),\r\n clockwise: this._clockwise,\r\n rotation: RadToDeg(this._rotation)\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from the provided Ellipse Curve Configuration object.\r\n *\r\n * @function Phaser.Curves.Ellipse.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONEllipseCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Ellipse} The ellipse curve constructed from the configuration object.\r\n */\r\nEllipseCurve.fromJSON = function (data)\r\n{\r\n return new EllipseCurve(data);\r\n};\r\n\r\nmodule.exports = EllipseCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/EllipseCurve.js?")},"./node_modules/phaser/src/curves/LineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar FromPoints = __webpack_require__(/*! ../geom/rectangle/FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\nvar tmpVec2 = new Vector2();\r\n\r\n/**\r\n * @classdesc\r\n * A LineCurve is a "curve" comprising exactly two points (a line segment).\r\n *\r\n * @class Line\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - The first endpoint.\r\n * @param {Phaser.Math.Vector2} [p1] - The second endpoint.\r\n */\r\nvar LineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n // vec2s or array\r\n function LineCurve (p0, p1)\r\n {\r\n Curve.call(this, \'LineCurve\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * The first endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * The second endpoint.\r\n *\r\n * @name Phaser.Curves.Line#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p1 = p1;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle where the position and dimensions match the bounds of this Curve.\r\n *\r\n * @method Phaser.Curves.Line#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.\r\n */\r\n getBounds: function (out)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n return FromPoints([ this.p0, this.p1 ], out);\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Line#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Gets the resolution of the line.\r\n *\r\n * @method Phaser.Curves.Line#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} [divisions=1] - The number of divisions to consider.\r\n *\r\n * @return {number} The resolution. Equal to the number of divisions.\r\n */\r\n getResolution: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 1; }\r\n\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (t === 1)\r\n {\r\n return out.copy(this.p1);\r\n }\r\n\r\n out.copy(this.p1).subtract(this.p0).scale(t).add(this.p0);\r\n\r\n return out;\r\n },\r\n\r\n // Line curve is linear, so we can overwrite default getPointAt\r\n\r\n /**\r\n * Gets a point at a given position on the line.\r\n *\r\n * @method Phaser.Curves.Line#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the slope of the line as a unit vector.\r\n *\r\n * @method Phaser.Curves.Line#getTangent\r\n * @since 3.0.0\r\n * \r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @return {Phaser.Math.Vector2} The tangent vector.\r\n */\r\n getTangent: function ()\r\n {\r\n var tangent = tmpVec2.copy(this.p1).subtract(this.p0);\r\n\r\n return tangent.normalize();\r\n },\r\n\r\n // Override default Curve.draw because this is better than calling getPoints on a line!\r\n\r\n /**\r\n * Draws this curve on the given Graphics object.\r\n *\r\n * The curve is drawn using `Graphics.lineBetween` so will be drawn at whatever the present Graphics line color is.\r\n * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it.\r\n *\r\n * @method Phaser.Curves.Line#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics instance onto which this curve will be drawn.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object to which the curve was drawn.\r\n */\r\n draw: function (graphics)\r\n {\r\n graphics.lineBetween(this.p0.x, this.p0.y, this.p1.x, this.p1.y);\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Gets a JSON representation of the line.\r\n *\r\n * @method Phaser.Curves.Line#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Configures this line from a JSON representation.\r\n *\r\n * @function Phaser.Curves.Line.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Line} A new LineCurve object.\r\n */\r\nLineCurve.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n\r\n return new LineCurve(p0, p1);\r\n};\r\n\r\nmodule.exports = LineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/LineCurve.js?')},"./node_modules/phaser/src/curves/QuadraticBezierCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar QuadraticBezierInterpolation = __webpack_require__(/*! ../math/interpolation/QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class QuadraticBezier\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @param {(Phaser.Math.Vector2|number[])} p0 - Start point, or an array of point pairs.\r\n * @param {Phaser.Math.Vector2} p1 - Control Point 1.\r\n * @param {Phaser.Math.Vector2} p2 - Control Point 2.\r\n */\r\nvar QuadraticBezier = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function QuadraticBezier (p0, p1, p2)\r\n {\r\n Curve.call(this, \'QuadraticBezier\');\r\n\r\n if (Array.isArray(p0))\r\n {\r\n p2 = new Vector2(p0[4], p0[5]);\r\n p1 = new Vector2(p0[2], p0[3]);\r\n p0 = new Vector2(p0[0], p0[1]);\r\n }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p0 = p0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p1\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p1 = p1;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.QuadraticBezier#p2\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.2.0\r\n */\r\n this.p2 = p2;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getStartPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getResolution\r\n * @since 3.2.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#getPoint\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var p0 = this.p0;\r\n var p1 = this.p1;\r\n var p2 = this.p2;\r\n\r\n return out.set(\r\n QuadraticBezierInterpolation(t, p0.x, p1.x, p2.x),\r\n QuadraticBezierInterpolation(t, p0.y, p1.y, p2.y)\r\n );\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#draw\r\n * @since 3.2.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [graphics,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - `Graphics` object to draw onto.\r\n * @param {integer} [pointsTotal=32] - Number of points to be used for drawing the curve. Higher numbers result in smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} `Graphics` object that was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n if (pointsTotal === undefined) { pointsTotal = 32; }\r\n\r\n var points = this.getPoints(pointsTotal);\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(this.p0.x, this.p0.y);\r\n\r\n for (var i = 1; i < points.length; i++)\r\n {\r\n graphics.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n graphics.strokePath();\r\n\r\n // So you can chain graphics calls\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Converts the curve into a JSON compatible object.\r\n *\r\n * @method Phaser.Curves.QuadraticBezier#toJSON\r\n * @since 3.2.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: this.type,\r\n points: [\r\n this.p0.x, this.p0.y,\r\n this.p1.x, this.p1.y,\r\n this.p2.x, this.p2.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a curve from a JSON object, e. g. created by `toJSON`.\r\n *\r\n * @function Phaser.Curves.QuadraticBezier.fromJSON\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.QuadraticBezier} The created curve instance.\r\n */\r\nQuadraticBezier.fromJSON = function (data)\r\n{\r\n var points = data.points;\r\n\r\n var p0 = new Vector2(points[0], points[1]);\r\n var p1 = new Vector2(points[2], points[3]);\r\n var p2 = new Vector2(points[4], points[5]);\r\n\r\n return new QuadraticBezier(p0, p1, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezier;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/QuadraticBezierCurve.js?')},"./node_modules/phaser/src/curves/SplineCurve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../math/CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class Spline\r\n * @extends Phaser.Curves.Curve\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} [points] - [description]\r\n */\r\nvar SplineCurve = new Class({\r\n\r\n Extends: Curve,\r\n\r\n initialize:\r\n\r\n function SplineCurve (points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n Curve.call(this, \'SplineCurve\');\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Curves.Spline#points\r\n * @type {Phaser.Math.Vector2[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n this.addPoints(points);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description]\r\n *\r\n * @return {Phaser.Curves.Spline} This curve object.\r\n */\r\n addPoints: function (points)\r\n {\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var p = new Vector2();\r\n\r\n if (typeof points[i] === \'number\')\r\n {\r\n p.x = points[i];\r\n p.y = points[i + 1];\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#addPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n addPoint: function (x, y)\r\n {\r\n var vec = new Vector2(x, y);\r\n\r\n this.points.push(vec);\r\n\r\n return vec;\r\n },\r\n\r\n /**\r\n * Gets the starting point on the curve.\r\n *\r\n * @method Phaser.Curves.Spline#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.points[0]);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#getResolution\r\n * @since 3.0.0\r\n *\r\n * @param {number} divisions - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n getResolution: function (divisions)\r\n {\r\n return divisions * this.points.length;\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.Spline#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var points = this.points;\r\n\r\n var point = (points.length - 1) * t;\r\n\r\n var intPoint = Math.floor(point);\r\n\r\n var weight = point - intPoint;\r\n\r\n var p0 = points[(intPoint === 0) ? intPoint : intPoint - 1];\r\n var p1 = points[intPoint];\r\n var p2 = points[(intPoint > points.length - 2) ? points.length - 1 : intPoint + 1];\r\n var p3 = points[(intPoint > points.length - 3) ? points.length - 1 : intPoint + 2];\r\n\r\n return out.set(CatmullRom(weight, p0.x, p1.x, p2.x, p3.x), CatmullRom(weight, p0.y, p1.y, p2.y, p3.y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Spline#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} The JSON object containing this curve data.\r\n */\r\n toJSON: function ()\r\n {\r\n var points = [];\r\n\r\n for (var i = 0; i < this.points.length; i++)\r\n {\r\n points.push(this.points[i].x);\r\n points.push(this.points[i].y);\r\n }\r\n\r\n return {\r\n type: this.type,\r\n points: points\r\n };\r\n }\r\n\r\n});\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Curves.Spline.fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.\r\n *\r\n * @return {Phaser.Curves.Spline} [description]\r\n */\r\nSplineCurve.fromJSON = function (data)\r\n{\r\n return new SplineCurve(data.points);\r\n};\r\n\r\nmodule.exports = SplineCurve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/SplineCurve.js?')},"./node_modules/phaser/src/curves/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Curves\r\n */\r\n\r\nmodule.exports = {\r\n Path: __webpack_require__(/*! ./path/Path */ "./node_modules/phaser/src/curves/path/Path.js"),\r\n\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierCurve */ "./node_modules/phaser/src/curves/CubicBezierCurve.js"),\r\n Curve: __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/curves/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./EllipseCurve */ "./node_modules/phaser/src/curves/EllipseCurve.js"),\r\n Line: __webpack_require__(/*! ./LineCurve */ "./node_modules/phaser/src/curves/LineCurve.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierCurve */ "./node_modules/phaser/src/curves/QuadraticBezierCurve.js"),\r\n Spline: __webpack_require__(/*! ./SplineCurve */ "./node_modules/phaser/src/curves/SplineCurve.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/index.js?')},"./node_modules/phaser/src/curves/path/MoveTo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A MoveTo Curve is a very simple curve consisting of only a single point. Its intended use is to move the ending point in a Path.\r\n *\r\n * @class MoveTo\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - `x` pixel coordinate.\r\n * @param {number} [y] - `y` pixel coordinate.\r\n */\r\nvar MoveTo = new Class({\r\n\r\n initialize:\r\n\r\n function MoveTo (x, y)\r\n {\r\n // Skip length calcs in paths\r\n\r\n /**\r\n * Denotes that this Curve does not influence the bounds, points, and drawing of its parent Path. Must be `false` or some methods in the parent Path will throw errors.\r\n *\r\n * @name Phaser.Curves.MoveTo#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The lone point which this curve consists of.\r\n *\r\n * @name Phaser.Curves.MoveTo#p0\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.p0 = new Vector2(x, y);\r\n },\r\n\r\n /**\r\n * Get point at relative position in curve according to length.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The position along the curve to return. Where 0 is the start and 1 is the end.\r\n * @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.p0);\r\n },\r\n\r\n /**\r\n * Retrieves the point at given position in the curve. This will always return this curve's only point.\r\n *\r\n * @method Phaser.Curves.MoveTo#getPointAt\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} u - The position in the path to retrieve, between 0 and 1. Not used.\r\n * @param {Phaser.Math.Vector2} [out] - An optional vector in which to store the point.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` vector, or a new `Vector2` if none was provided.\r\n */\r\n getPointAt: function (u, out)\r\n {\r\n return this.getPoint(u, out);\r\n },\r\n\r\n /**\r\n * Gets the resolution of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getResolution\r\n * @since 3.0.0\r\n *\r\n * @return {number} The resolution of this curve. For a MoveTo the value is always 1.\r\n */\r\n getResolution: function ()\r\n {\r\n return 1;\r\n },\r\n\r\n /**\r\n * Gets the length of this curve.\r\n *\r\n * @method Phaser.Curves.MoveTo#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this curve. For a MoveTo the value is always 0.\r\n */\r\n getLength: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Converts this curve into a JSON-serializable object.\r\n *\r\n * @method Phaser.Curves.MoveTo#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONCurve} A primitive object with the curve's type and only point.\r\n */\r\n toJSON: function ()\r\n {\r\n return {\r\n type: 'MoveTo',\r\n points: [\r\n this.p0.x, this.p0.y\r\n ]\r\n };\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/MoveTo.js?")},"./node_modules/phaser/src/curves/path/Path.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog)\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CubicBezierCurve = __webpack_require__(/*! ../CubicBezierCurve */ \"./node_modules/phaser/src/curves/CubicBezierCurve.js\");\r\nvar EllipseCurve = __webpack_require__(/*! ../EllipseCurve */ \"./node_modules/phaser/src/curves/EllipseCurve.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar LineCurve = __webpack_require__(/*! ../LineCurve */ \"./node_modules/phaser/src/curves/LineCurve.js\");\r\nvar MovePathTo = __webpack_require__(/*! ./MoveTo */ \"./node_modules/phaser/src/curves/path/MoveTo.js\");\r\nvar QuadraticBezierCurve = __webpack_require__(/*! ../QuadraticBezierCurve */ \"./node_modules/phaser/src/curves/QuadraticBezierCurve.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar SplineCurve = __webpack_require__(/*! ../SplineCurve */ \"./node_modules/phaser/src/curves/SplineCurve.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Path combines multiple Curves into one continuous compound curve.\r\n * It does not matter how many Curves are in the Path or what type they are.\r\n *\r\n * A Curve in a Path does not have to start where the previous Curve ends - that is to say, a Path does not\r\n * have to be an uninterrupted curve. Only the order of the Curves influences the actual points on the Path.\r\n *\r\n * @class Path\r\n * @memberof Phaser.Curves\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the Path's starting point or a {@link Phaser.Types.Curves.JSONPath}.\r\n * @param {number} [y=0] - The Y coordinate of the Path's starting point.\r\n */\r\nvar Path = new Class({\r\n\r\n initialize:\r\n\r\n function Path (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n /**\r\n * The name of this Path.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.Curves.Path#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The list of Curves which make up this Path.\r\n *\r\n * @name Phaser.Curves.Path#curves\r\n * @type {Phaser.Curves.Curve[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.curves = [];\r\n\r\n /**\r\n * The cached length of each Curve in the Path.\r\n *\r\n * Used internally by {@link #getCurveLengths}.\r\n *\r\n * @name Phaser.Curves.Path#cacheLengths\r\n * @type {number[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.cacheLengths = [];\r\n\r\n /**\r\n * Automatically closes the path.\r\n *\r\n * @name Phaser.Curves.Path#autoClose\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.autoClose = false;\r\n\r\n /**\r\n * The starting point of the Path.\r\n *\r\n * This is not necessarily equivalent to the starting point of the first Curve in the Path. In an empty Path, it's also treated as the ending point.\r\n *\r\n * @name Phaser.Curves.Path#startPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.startPoint = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2A\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2A = new Vector2();\r\n\r\n /**\r\n * A temporary vector used to avoid object creation when adding a Curve to the Path.\r\n *\r\n * @name Phaser.Curves.Path#_tmpVec2B\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tmpVec2B = new Vector2();\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.fromJSON(x);\r\n }\r\n else\r\n {\r\n this.startPoint.set(x, y);\r\n }\r\n },\r\n\r\n /**\r\n * Appends a Curve to the end of the Path.\r\n *\r\n * The Curve does not have to start where the Path ends or, for an empty Path, at its defined starting point.\r\n *\r\n * @method Phaser.Curves.Path#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Curve} curve - The Curve to append.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n add: function (curve)\r\n {\r\n this.curves.push(curve);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a circular Ellipse Curve positioned at the end of the Path.\r\n *\r\n * @method Phaser.Curves.Path#circleTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the circle.\r\n * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle.\r\n * @param {number} [rotation=0] - The rotation of the circle in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n circleTo: function (radius, clockwise, rotation)\r\n {\r\n if (clockwise === undefined) { clockwise = false; }\r\n\r\n return this.ellipseTo(radius, radius, 0, 360, clockwise, rotation);\r\n },\r\n\r\n /**\r\n * Ensures that the Path is closed.\r\n *\r\n * A closed Path starts and ends at the same point. If the Path is not closed, a straight Line Curve will be created from the ending point directly to the starting point. During the check, the actual starting point of the Path, i.e. the starting point of the first Curve, will be used as opposed to the Path's defined {@link startPoint}, which could differ.\r\n *\r\n * Calling this method on an empty Path will result in an error.\r\n *\r\n * @method Phaser.Curves.Path#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n closePath: function ()\r\n {\r\n // Add a line curve if start and end of lines are not connected\r\n var startPoint = this.curves[0].getPoint(0);\r\n var endPoint = this.curves[this.curves.length - 1].getPoint(1);\r\n\r\n if (!startPoint.equals(endPoint))\r\n {\r\n // This will copy a reference to the vectors, which probably isn't sensible\r\n this.curves.push(new LineCurve(endPoint, startPoint));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a cubic bezier curve starting at the previous end point and ending at p3, using p1 and p2 as control points.\r\n *\r\n * @method Phaser.Curves.Path#cubicBezierTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - The x coordinate of the end point. Or, if a Vec2, the p1 value.\r\n * @param {(number|Phaser.Math.Vector2)} y - The y coordinate of the end point. Or, if a Vec2, the p2 value.\r\n * @param {(number|Phaser.Math.Vector2)} control1X - The x coordinate of the first control point. Or, if a Vec2, the p3 value.\r\n * @param {number} [control1Y] - The y coordinate of the first control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2X] - The x coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n * @param {number} [control2Y] - The y coordinate of the second control point. Not used if vec2s are provided as the first 3 arguments.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n var p3;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n p3 = control1X;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(control1X, control1Y);\r\n p2 = new Vector2(control2X, control2Y);\r\n p3 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new CubicBezierCurve(p0, p1, p2, p3));\r\n },\r\n\r\n // Creates a quadratic bezier curve starting at the previous end point and ending at p2, using p1 as a control point\r\n\r\n /**\r\n * Creates a Quadratic Bezier Curve starting at the ending point of the Path.\r\n *\r\n * @method Phaser.Curves.Path#quadraticBezierTo\r\n * @since 3.2.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2[])} x - The X coordinate of the second control point or, if it's a `Vector2`, the first control point.\r\n * @param {number} [y] - The Y coordinate of the second control point or, if `x` is a `Vector2`, the second control point.\r\n * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point.\r\n * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n quadraticBezierTo: function (x, y, controlX, controlY)\r\n {\r\n var p0 = this.getEndPoint();\r\n var p1;\r\n var p2;\r\n\r\n // Assume they're all vec2s\r\n if (x instanceof Vector2)\r\n {\r\n p1 = x;\r\n p2 = y;\r\n }\r\n else\r\n {\r\n p1 = new Vector2(controlX, controlY);\r\n p2 = new Vector2(x, y);\r\n }\r\n\r\n return this.add(new QuadraticBezierCurve(p0, p1, p2));\r\n },\r\n\r\n /**\r\n * Draws all Curves in the Path to a Graphics Game Object.\r\n *\r\n * @method Phaser.Curves.Path#draw\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.Graphics} G - [out,$return]\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The Graphics Game Object to draw to.\r\n * @param {integer} [pointsTotal=32] - The number of points to draw for each Curve. Higher numbers result in a smoother curve but require more processing.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object which was drawn to.\r\n */\r\n draw: function (graphics, pointsTotal)\r\n {\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.draw(graphics, pointsTotal);\r\n }\r\n\r\n return graphics;\r\n },\r\n\r\n /**\r\n * Creates an ellipse curve positioned at the previous end point, using the given parameters.\r\n *\r\n * @method Phaser.Curves.Path#ellipseTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [xRadius=0] - The horizontal radius of ellipse.\r\n * @param {number} [yRadius=0] - The vertical radius of ellipse.\r\n * @param {integer} [startAngle=0] - The start angle of the ellipse, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the ellipse, in degrees.\r\n * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`).\r\n * @param {number} [rotation=0] - The rotation of the ellipse, in degrees.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation)\r\n {\r\n var ellipse = new EllipseCurve(0, 0, xRadius, yRadius, startAngle, endAngle, clockwise, rotation);\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n // Calculate where to center the ellipse\r\n var start = ellipse.getStartPoint(this._tmpVec2B);\r\n\r\n end.subtract(start);\r\n\r\n ellipse.x = end.x;\r\n ellipse.y = end.y;\r\n\r\n return this.add(ellipse);\r\n },\r\n\r\n /**\r\n * Creates a Path from a Path Configuration object.\r\n *\r\n * The provided object should be a {@link Phaser.Types.Curves.JSONPath}, as returned by {@link #toJSON}. Providing a malformed object may cause errors.\r\n *\r\n * @method Phaser.Curves.Path#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data.\r\n *\r\n * @return {Phaser.Curves.Path} This Path object.\r\n */\r\n fromJSON: function (data)\r\n {\r\n // data should be an object matching the Path.toJSON object structure.\r\n\r\n this.curves = [];\r\n this.cacheLengths = [];\r\n\r\n this.startPoint.set(data.x, data.y);\r\n\r\n this.autoClose = data.autoClose;\r\n\r\n for (var i = 0; i < data.curves.length; i++)\r\n {\r\n var curve = data.curves[i];\r\n\r\n switch (curve.type)\r\n {\r\n case 'LineCurve':\r\n this.add(LineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'EllipseCurve':\r\n this.add(EllipseCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'SplineCurve':\r\n this.add(SplineCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'CubicBezierCurve':\r\n this.add(CubicBezierCurve.fromJSON(curve));\r\n break;\r\n\r\n case 'QuadraticBezierCurve':\r\n this.add(QuadraticBezierCurve.fromJSON(curve));\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Rectangle with a position and size matching the bounds of this Path.\r\n *\r\n * @method Phaser.Curves.Path#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in.\r\n * @param {integer} [accuracy=16] - The accuracy of the bounds calculations. Higher values are more accurate at the cost of calculation speed.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\n getBounds: function (out, accuracy)\r\n {\r\n if (out === undefined) { out = new Rectangle(); }\r\n if (accuracy === undefined) { accuracy = 16; }\r\n\r\n out.x = Number.MAX_VALUE;\r\n out.y = Number.MAX_VALUE;\r\n\r\n var bounds = new Rectangle();\r\n var maxRight = Number.MIN_SAFE_INTEGER;\r\n var maxBottom = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n var curve = this.curves[i];\r\n\r\n if (!curve.active)\r\n {\r\n continue;\r\n }\r\n\r\n curve.getBounds(bounds, accuracy);\r\n\r\n out.x = Math.min(out.x, bounds.x);\r\n out.y = Math.min(out.y, bounds.y);\r\n\r\n maxRight = Math.max(maxRight, bounds.right);\r\n maxBottom = Math.max(maxBottom, bounds.bottom);\r\n }\r\n\r\n out.right = maxRight;\r\n out.bottom = maxBottom;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing the length of the Path at the end of each Curve.\r\n *\r\n * The result of this method will be cached to avoid recalculating it in subsequent calls. The cache is only invalidated when the {@link #curves} array changes in length, leading to potential inaccuracies if a Curve in the Path is changed, or if a Curve is removed and another is added in its place.\r\n *\r\n * @method Phaser.Curves.Path#getCurveLengths\r\n * @since 3.0.0\r\n *\r\n * @return {number[]} An array containing the length of the Path at the end of each one of its Curves.\r\n */\r\n getCurveLengths: function ()\r\n {\r\n // We use cache values if curves and cache array are same length\r\n\r\n if (this.cacheLengths.length === this.curves.length)\r\n {\r\n return this.cacheLengths;\r\n }\r\n\r\n // Get length of sub-curve\r\n // Push sums into cached array\r\n\r\n var lengths = [];\r\n var sums = 0;\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n sums += this.curves[i].getLength();\r\n\r\n lengths.push(sums);\r\n }\r\n\r\n this.cacheLengths = lengths;\r\n\r\n return lengths;\r\n },\r\n\r\n /**\r\n * Returns the ending point of the Path.\r\n *\r\n * A Path's ending point is equivalent to the ending point of the last Curve in the Path. For an empty Path, the ending point is at the Path's defined {@link #startPoint}.\r\n *\r\n * @method Phaser.Curves.Path#getEndPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - The object to store the point in.\r\n *\r\n * @return {Phaser.Math.Vector2} The modified `out` object, or a new Vector2 if none was provided.\r\n */\r\n getEndPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n if (this.curves.length > 0)\r\n {\r\n this.curves[this.curves.length - 1].getPoint(1, out);\r\n }\r\n else\r\n {\r\n out.copy(this.startPoint);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the total length of the Path.\r\n *\r\n * @see {@link #getCurveLengths}\r\n *\r\n * @method Phaser.Curves.Path#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {number} The total length of the Path.\r\n */\r\n getLength: function ()\r\n {\r\n var lens = this.getCurveLengths();\r\n\r\n return lens[lens.length - 1];\r\n },\r\n\r\n // To get accurate point with reference to\r\n // entire path distance at time t,\r\n // following has to be done:\r\n\r\n // 1. Length of each sub path have to be known\r\n // 2. Locate and identify type of curve\r\n // 3. Get t for the curve\r\n // 4. Return curve.getPointAt(t')\r\n\r\n /**\r\n * Calculates the coordinates of the point at the given normalized location (between 0 and 1) on the Path.\r\n *\r\n * The location is relative to the entire Path, not to an individual Curve. A location of 0.5 is always in the middle of the Path and is thus an equal distance away from both its starting and ending points. In a Path with one Curve, it would be in the middle of the Curve; in a Path with two Curves, it could be anywhere on either one of them depending on their lengths.\r\n *\r\n * @method Phaser.Curves.Path#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {number} t - The location of the point to return, between 0 and 1.\r\n * @param {Phaser.Math.Vector2} [out] - The object in which to store the calculated point.\r\n *\r\n * @return {?Phaser.Math.Vector2} The modified `out` object, or a new `Vector2` if none was provided.\r\n */\r\n getPoint: function (t, out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var d = t * this.getLength();\r\n var curveLengths = this.getCurveLengths();\r\n var i = 0;\r\n\r\n while (i < curveLengths.length)\r\n {\r\n if (curveLengths[i] >= d)\r\n {\r\n var diff = curveLengths[i] - d;\r\n var curve = this.curves[i];\r\n\r\n var segmentLength = curve.getLength();\r\n var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength;\r\n\r\n return curve.getPointAt(u, out);\r\n }\r\n\r\n i++;\r\n }\r\n\r\n // loop where sum != 0, sum > d , sum+1 1 && !points[points.length - 1].equals(points[0]))\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - `Vector2` instance that should be used for storing the result. If `undefined` a new `Vector2` will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getRandomPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return this.getPoint(Math.random(), out);\r\n },\r\n\r\n /**\r\n * Creates a straight Line Curve from the ending point of the Path to the given coordinates.\r\n *\r\n * @method Phaser.Curves.Path#getSpacedPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [divisions=40] - The X coordinate of the line's ending point, or the line's ending point as a `Vector2`.\r\n *\r\n * @return {Phaser.Math.Vector2[]} [description]\r\n */\r\n getSpacedPoints: function (divisions)\r\n {\r\n if (divisions === undefined) { divisions = 40; }\r\n\r\n var points = [];\r\n\r\n for (var i = 0; i <= divisions; i++)\r\n {\r\n points.push(this.getPoint(i / divisions));\r\n }\r\n\r\n if (this.autoClose)\r\n {\r\n points.push(points[0]);\r\n }\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#getStartPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\n getStartPoint: function (out)\r\n {\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n return out.copy(this.startPoint);\r\n },\r\n\r\n /**\r\n * Creates a line curve from the previous end point to x/y\r\n *\r\n * @method Phaser.Curves.Path#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Math.Vector2)} x - [description]\r\n * @param {number} [y] - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n lineTo: function (x, y)\r\n {\r\n if (x instanceof Vector2)\r\n {\r\n this._tmpVec2B.copy(x);\r\n }\r\n else\r\n {\r\n this._tmpVec2B.set(x, y);\r\n }\r\n\r\n var end = this.getEndPoint(this._tmpVec2A);\r\n\r\n return this.add(new LineCurve([ end.x, end.y, this._tmpVec2B.x, this._tmpVec2B.y ]));\r\n },\r\n\r\n // Creates a spline curve starting at the previous end point, using the given parameters\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#splineTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2[]} points - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n splineTo: function (points)\r\n {\r\n points.unshift(this.getEndPoint());\r\n\r\n return this.add(new SplineCurve(points));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.Curves.Path} [description]\r\n */\r\n moveTo: function (x, y)\r\n {\r\n return this.add(new MovePathTo(x, y));\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Curves.JSONPath} [description]\r\n */\r\n toJSON: function ()\r\n {\r\n var out = [];\r\n\r\n for (var i = 0; i < this.curves.length; i++)\r\n {\r\n out.push(this.curves[i].toJSON());\r\n }\r\n\r\n return {\r\n type: 'Path',\r\n x: this.startPoint.x,\r\n y: this.startPoint.y,\r\n autoClose: this.autoClose,\r\n curves: out\r\n };\r\n },\r\n\r\n /**\r\n * cacheLengths must be recalculated.\r\n *\r\n * @method Phaser.Curves.Path#updateArcLengths\r\n * @since 3.0.0\r\n */\r\n updateArcLengths: function ()\r\n {\r\n this.cacheLengths = [];\r\n\r\n this.getCurveLengths();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Curves.Path#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.curves.length = 0;\r\n this.cacheLengths.length = 0;\r\n this.startPoint = undefined;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Creates a new Path Object.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#path\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Path.\r\n * @param {number} y - The vertical position of this Path.\r\n *\r\n * @return {Phaser.Curves.Path} The Path Object that was created.\r\n */\r\nGameObjectFactory.register('path', function (x, y)\r\n{\r\n return new Path(x, y);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\nmodule.exports = Path;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/curves/path/Path.js?")},"./node_modules/phaser/src/data/DataManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/data/events/index.js\");\r\n\r\n/**\r\n * @callback DataEachCallback\r\n *\r\n * @param {*} parent - The parent object of the DataManager.\r\n * @param {string} key - The key of the value.\r\n * @param {*} value - The value.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Data Manager Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} parent - The object that this DataManager belongs to.\r\n * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter.\r\n */\r\nvar DataManager = new Class({\r\n\r\n initialize:\r\n\r\n function DataManager (parent, eventEmitter)\r\n {\r\n /**\r\n * The object that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManager#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The DataManager's event emitter.\r\n *\r\n * @name Phaser.Data.DataManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = eventEmitter;\r\n\r\n if (!eventEmitter)\r\n {\r\n this.events = (parent.events) ? parent.events : parent;\r\n }\r\n\r\n /**\r\n * The data list.\r\n *\r\n * @name Phaser.Data.DataManager#list\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The public values list. You can use this to access anything you have stored\r\n * in this Data Manager. For example, if you set a value called `gold` you can\r\n * access it via:\r\n *\r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also modify it directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold += 1000;\r\n * ```\r\n *\r\n * Doing so will emit a `setdata` event from the parent of this Data Manager.\r\n * \r\n * Do not modify this object directly. Adding properties directly to this object will not\r\n * emit any events. Always use `DataManager.set` to create new items the first time around.\r\n *\r\n * @name Phaser.Data.DataManager#values\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.10.0\r\n */\r\n this.values = {};\r\n\r\n /**\r\n * Whether setting data is frozen for this DataManager.\r\n *\r\n * @name Phaser.Data.DataManager#_frozen\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._frozen = false;\r\n\r\n if (!parent.hasOwnProperty('sys') && this.events)\r\n {\r\n this.events.once('destroy', this.destroy, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n * \r\n * ```javascript\r\n * this.data.get('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n * \r\n * ```javascript\r\n * this.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n * \r\n * ```javascript\r\n * this.data.get([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.Data.DataManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n get: function (key)\r\n {\r\n var list = this.list;\r\n\r\n if (Array.isArray(key))\r\n {\r\n var output = [];\r\n\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n output.push(list[key[i]]);\r\n }\r\n\r\n return output;\r\n }\r\n else\r\n {\r\n return list[key];\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves all data values in a new object.\r\n *\r\n * @method Phaser.Data.DataManager#getAll\r\n * @since 3.0.0\r\n *\r\n * @return {Object.} All data values.\r\n */\r\n getAll: function ()\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Queries the DataManager for the values of keys matching the given regular expression.\r\n *\r\n * @method Phaser.Data.DataManager#query\r\n * @since 3.0.0\r\n *\r\n * @param {RegExp} search - A regular expression object. If a non-RegExp object obj is passed, it is implicitly converted to a RegExp by using new RegExp(obj).\r\n *\r\n * @return {Object.} The values of the keys matching the search string.\r\n */\r\n query: function (search)\r\n {\r\n var results = {};\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list.hasOwnProperty(key) && key.match(search))\r\n {\r\n results[key] = this.list[key];\r\n }\r\n }\r\n\r\n return results;\r\n },\r\n\r\n /**\r\n * Sets a value for the given key. If the key doesn't already exist in the Data Manager then it is created.\r\n * \r\n * ```javascript\r\n * data.set('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * data.set({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `get`:\r\n * \r\n * ```javascript\r\n * data.get('gold');\r\n * ```\r\n * \r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n * \r\n * ```javascript\r\n * data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#set\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object or key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} data - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n set: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n return this.setValue(key, data);\r\n }\r\n else\r\n {\r\n for (var entry in key)\r\n {\r\n this.setValue(entry, key[entry]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value setter, called automatically by the `set` method.\r\n *\r\n * @method Phaser.Data.DataManager#setValue\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n * @param {*} data - The value to set.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setValue: function (key, data)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.has(key))\r\n {\r\n // Hit the key getter, which will in turn emit the events.\r\n this.values[key] = data;\r\n }\r\n else\r\n {\r\n var _this = this;\r\n var list = this.list;\r\n var events = this.events;\r\n var parent = this.parent;\r\n\r\n Object.defineProperty(this.values, key, {\r\n\r\n enumerable: true,\r\n \r\n configurable: true,\r\n\r\n get: function ()\r\n {\r\n return list[key];\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (!_this._frozen)\r\n {\r\n var previousValue = list[key];\r\n list[key] = value;\r\n\r\n events.emit(Events.CHANGE_DATA, parent, key, value, previousValue);\r\n events.emit(Events.CHANGE_DATA_KEY + key, parent, value, previousValue);\r\n }\r\n }\r\n\r\n });\r\n\r\n list[key] = data;\r\n\r\n events.emit(Events.SET_DATA, parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all data entries to the given callback.\r\n *\r\n * @method Phaser.Data.DataManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {DataEachCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ this.parent, null, undefined ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var key in this.list)\r\n {\r\n args[1] = key;\r\n args[2] = this.list[key];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Merge the given object of key value pairs into this DataManager.\r\n *\r\n * Any newly created values will emit a `setdata` event. Any updated values (see the `overwrite` argument)\r\n * will emit a `changedata` event.\r\n *\r\n * @method Phaser.Data.DataManager#merge\r\n * @fires Phaser.Data.Events#SET_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA\r\n * @fires Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.0.0\r\n *\r\n * @param {Object.} data - The data to merge.\r\n * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n merge: function (data, overwrite)\r\n {\r\n if (overwrite === undefined) { overwrite = true; }\r\n\r\n // Merge data from another component into this one\r\n for (var key in data)\r\n {\r\n if (data.hasOwnProperty(key) && (overwrite || (!overwrite && !this.has(key))))\r\n {\r\n this.setValue(key, data[key]);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Remove the value for the given key.\r\n *\r\n * If the key is found in this Data Manager it is removed from the internal lists and a\r\n * `removedata` event is emitted.\r\n * \r\n * You can also pass in an array of keys, in which case all keys in the array will be removed:\r\n * \r\n * ```javascript\r\n * this.data.remove([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * @method Phaser.Data.DataManager#remove\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key to remove, or an array of keys to remove.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n remove: function (key)\r\n {\r\n if (this._frozen)\r\n {\r\n return this;\r\n }\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.removeValue(key[i]);\r\n }\r\n }\r\n else\r\n {\r\n return this.removeValue(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal value remover, called automatically by the `remove` method.\r\n *\r\n * @method Phaser.Data.DataManager#removeValue\r\n * @private\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The key to set the value for.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n removeValue: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n var data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the data associated with the given 'key', deletes it from this Data Manager, then returns it.\r\n *\r\n * @method Phaser.Data.DataManager#pop\r\n * @fires Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the value to retrieve and delete.\r\n *\r\n * @return {*} The value of the given key.\r\n */\r\n pop: function (key)\r\n {\r\n var data = undefined;\r\n\r\n if (!this._frozen && this.has(key))\r\n {\r\n data = this.list[key];\r\n\r\n delete this.list[key];\r\n delete this.values[key];\r\n\r\n this.events.emit(Events.REMOVE_DATA, this.parent, key, data);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Determines whether the given key is set in this Data Manager.\r\n * \r\n * Please note that the keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.Data.DataManager#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check.\r\n *\r\n * @return {boolean} Returns `true` if the key exists, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return this.list.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Freeze or unfreeze this Data Manager. A frozen Data Manager will block all attempts\r\n * to create new values or update existing ones.\r\n *\r\n * @method Phaser.Data.DataManager#setFreeze\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether to freeze or unfreeze the Data Manager.\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n setFreeze: function (value)\r\n {\r\n this._frozen = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all data in this Data Manager and unfreeze it.\r\n *\r\n * @method Phaser.Data.DataManager#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Data.DataManager} This DataManager object.\r\n */\r\n reset: function ()\r\n {\r\n for (var key in this.list)\r\n {\r\n delete this.list[key];\r\n delete this.values[key];\r\n }\r\n\r\n this._frozen = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroy this data manager.\r\n *\r\n * @method Phaser.Data.DataManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.reset();\r\n\r\n this.events.off(Events.CHANGE_DATA);\r\n this.events.off(Events.SET_DATA);\r\n this.events.off(Events.REMOVE_DATA);\r\n\r\n this.parent = null;\r\n },\r\n\r\n /**\r\n * Gets or sets the frozen state of this Data Manager.\r\n * A frozen Data Manager will block all attempts to create new values or update existing ones.\r\n *\r\n * @name Phaser.Data.DataManager#freeze\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n freeze: {\r\n\r\n get: function ()\r\n {\r\n return this._frozen;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._frozen = (value) ? true : false;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Return the total number of entries in this Data Manager.\r\n *\r\n * @name Phaser.Data.DataManager#count\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n count: {\r\n\r\n get: function ()\r\n {\r\n var i = 0;\r\n\r\n for (var key in this.list)\r\n {\r\n if (this.list[key] !== undefined)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n return i;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DataManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManager.js?")},"./node_modules/phaser/src/data/DataManagerPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DataManager = __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Data Component features a means to store pieces of data specific to a Game Object, System or Plugin.\r\n * You can then search, query it, and retrieve the data. The parent must either extend EventEmitter,\r\n * or have a property called `events` that is an instance of it.\r\n *\r\n * @class DataManagerPlugin\r\n * @extends Phaser.Data.DataManager\r\n * @memberof Phaser.Data\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this DataManager belongs to.\r\n */\r\nvar DataManagerPlugin = new Class({\r\n\r\n Extends: DataManager,\r\n\r\n initialize:\r\n\r\n function DataManagerPlugin (scene)\r\n {\r\n DataManager.call(this, scene, scene.sys.events);\r\n\r\n /**\r\n * A reference to the Scene that this DataManager belongs to.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s Systems.\r\n *\r\n * @name Phaser.Data.DataManagerPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.events = this.systems.events;\r\n\r\n this.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#shutdown\r\n * @private\r\n * @since 3.5.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Data.DataManagerPlugin#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n DataManager.prototype.destroy.call(this);\r\n\r\n this.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DataManagerPlugin\', DataManagerPlugin, \'data\');\r\n\r\nmodule.exports = DataManagerPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/DataManagerPlugin.js?')},"./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * a change data event from a Game Object you would use: `sprite.data.on('changedata', listener)`.\r\n * \r\n * This event is dispatched for all items that change in the Data Manager.\r\n * To listen for the change of a specific item, use the `CHANGE_DATA_KEY_EVENT` event.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that the Data Manager responsible for this event belongs to.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The new value of the item in the Data Manager.\r\n * @param {any} previousValue - The previous value of the item in the Data Manager.\r\n */\r\nmodule.exports = 'changedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Change Data Key Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item in the data store is changed.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the change of a specific data item from a Game Object you would use: `sprite.data.on('changedata-key', listener)`,\r\n * where `key` is the unique string key of the data item. For example, if you have a data item stored called `gold`\r\n * then you can listen for `sprite.data.on('changedata-gold')`.\r\n *\r\n * @event Phaser.Data.Events#CHANGE_DATA_KEY\r\n * @since 3.16.1\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} value - The item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n * @param {any} previousValue - The previous item that was updated in the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'changedata-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js?")},"./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Remove Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when an item is removed from it.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the removal of a data item on a Game Object you would use: `sprite.data.on('removedata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#REMOVE_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was removed from the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'removedata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/SET_DATA_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Set Data Event.\r\n * \r\n * This event is dispatched by a Data Manager when a new item is added to the data store.\r\n * \r\n * Game Objects with data enabled have an instance of a Data Manager under the `data` property. So, to listen for\r\n * the addition of a new data item on a Game Object you would use: `sprite.data.on('setdata', listener)`.\r\n *\r\n * @event Phaser.Data.Events#SET_DATA\r\n * @since 3.0.0\r\n * \r\n * @param {any} parent - A reference to the object that owns the instance of the Data Manager responsible for this event.\r\n * @param {string} key - The unique key of the data item within the Data Manager.\r\n * @param {any} data - The item that was added to the Data Manager. This can be of any data type, i.e. a string, boolean, number, object or instance.\r\n */\r\nmodule.exports = 'setdata';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/SET_DATA_EVENT.js?")},"./node_modules/phaser/src/data/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CHANGE_DATA: __webpack_require__(/*! ./CHANGE_DATA_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js"),\r\n CHANGE_DATA_KEY: __webpack_require__(/*! ./CHANGE_DATA_KEY_EVENT */ "./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js"),\r\n REMOVE_DATA: __webpack_require__(/*! ./REMOVE_DATA_EVENT */ "./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js"),\r\n SET_DATA: __webpack_require__(/*! ./SET_DATA_EVENT */ "./node_modules/phaser/src/data/events/SET_DATA_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/events/index.js?')},"./node_modules/phaser/src/data/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Data\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DataManager: __webpack_require__(/*! ./DataManager */ "./node_modules/phaser/src/data/DataManager.js"),\r\n DataManagerPlugin: __webpack_require__(/*! ./DataManagerPlugin */ "./node_modules/phaser/src/data/DataManagerPlugin.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/data/events/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/data/index.js?')},"./node_modules/phaser/src/device/Audio.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the audio playback capabilities of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.audio` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Audio\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} audioData - Can this device play HTML Audio tags?\r\n * @property {boolean} dolby - Can this device play EC-3 Dolby Digital Plus files?\r\n * @property {boolean} m4a - Can this device can play m4a files.\r\n * @property {boolean} mp3 - Can this device play mp3 files?\r\n * @property {boolean} ogg - Can this device play ogg files?\r\n * @property {boolean} opus - Can this device play opus files?\r\n * @property {boolean} wav - Can this device play wav files?\r\n * @property {boolean} webAudio - Does this device have the Web Audio API?\r\n * @property {boolean} webm - Can this device play webm files?\r\n */\r\nvar Audio = {\r\n\r\n audioData: false,\r\n dolby: false,\r\n m4a: false,\r\n mp3: false,\r\n ogg: false,\r\n opus: false,\r\n wav: false,\r\n webAudio: false,\r\n webm: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n Audio.audioData = !!(window['Audio']);\r\n\r\n Audio.webAudio = !!(window['AudioContext'] || window['webkitAudioContext']);\r\n\r\n var audioElement = document.createElement('audio');\r\n\r\n var result = !!audioElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.ogg = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/ogg; codecs=\"opus\"').replace(/^no$/, '') || audioElement.canPlayType('audio/opus;').replace(/^no$/, ''))\r\n {\r\n Audio.opus = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mpeg;').replace(/^no$/, ''))\r\n {\r\n Audio.mp3 = true;\r\n }\r\n\r\n // Mimetypes accepted:\r\n // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements\r\n // bit.ly/iphoneoscodecs\r\n if (audioElement.canPlayType('audio/wav; codecs=\"1\"').replace(/^no$/, ''))\r\n {\r\n Audio.wav = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/x-m4a;') || audioElement.canPlayType('audio/aac;').replace(/^no$/, ''))\r\n {\r\n Audio.m4a = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/webm; codecs=\"vorbis\"').replace(/^no$/, ''))\r\n {\r\n Audio.webm = true;\r\n }\r\n\r\n if (audioElement.canPlayType('audio/mp4;codecs=\"ec-3\"') !== '')\r\n {\r\n if (Browser.edge)\r\n {\r\n Audio.dolby = true;\r\n }\r\n else if (Browser.safari && Browser.safariVersion >= 9)\r\n {\r\n if ((/Mac OS X (\\d+)_(\\d+)/).test(navigator.userAgent))\r\n {\r\n var major = parseInt(RegExp.$1, 10);\r\n var minor = parseInt(RegExp.$2, 10);\r\n\r\n if ((major === 10 && minor >= 11) || major > 10)\r\n {\r\n Audio.dolby = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do here\r\n }\r\n\r\n return Audio;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Audio.js?")},"./node_modules/phaser/src/device/Browser.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * Determines the browser type and version running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.browser` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Browser\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} chrome - Set to true if running in Chrome.\r\n * @property {boolean} edge - Set to true if running in Microsoft Edge browser.\r\n * @property {boolean} firefox - Set to true if running in Firefox.\r\n * @property {boolean} ie - Set to true if running in Internet Explorer 11 or less (not Edge).\r\n * @property {boolean} mobileSafari - Set to true if running in Mobile Safari.\r\n * @property {boolean} opera - Set to true if running in Opera.\r\n * @property {boolean} safari - Set to true if running in Safari.\r\n * @property {boolean} silk - Set to true if running in the Silk browser (as used on the Amazon Kindle)\r\n * @property {boolean} trident - Set to true if running a Trident version of Internet Explorer (IE11+)\r\n * @property {number} chromeVersion - If running in Chrome this will contain the major version number.\r\n * @property {number} firefoxVersion - If running in Firefox this will contain the major version number.\r\n * @property {number} ieVersion - If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Browser.trident and Browser.tridentVersion.\r\n * @property {number} safariVersion - If running in Safari this will contain the major version number.\r\n * @property {number} tridentVersion - If running in Internet Explorer 11 this will contain the major version number. See {@link http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx}\r\n */\r\nvar Browser = {\r\n\r\n chrome: false,\r\n chromeVersion: 0,\r\n edge: false,\r\n firefox: false,\r\n firefoxVersion: 0,\r\n ie: false,\r\n ieVersion: 0,\r\n mobileSafari: false,\r\n opera: false,\r\n safari: false,\r\n safariVersion: 0,\r\n silk: false,\r\n trident: false,\r\n tridentVersion: 0\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Edge\\/\\d+/.test(ua))\r\n {\r\n Browser.edge = true;\r\n }\r\n else if ((/Chrome\\/(\\d+)/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.chrome = true;\r\n Browser.chromeVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Firefox\\D+(\\d+)/).test(ua))\r\n {\r\n Browser.firefox = true;\r\n Browser.firefoxVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/AppleWebKit/).test(ua) && OS.iOS)\r\n {\r\n Browser.mobileSafari = true;\r\n }\r\n else if ((/MSIE (\\d+\\.\\d+);/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.ieVersion = parseInt(RegExp.$1, 10);\r\n }\r\n else if ((/Opera/).test(ua))\r\n {\r\n Browser.opera = true;\r\n }\r\n else if ((/Safari/).test(ua) && !OS.windowsPhone)\r\n {\r\n Browser.safari = true;\r\n }\r\n else if ((/Trident\\/(\\d+\\.\\d+)(.*)rv:(\\d+\\.\\d+)/).test(ua))\r\n {\r\n Browser.ie = true;\r\n Browser.trident = true;\r\n Browser.tridentVersion = parseInt(RegExp.$1, 10);\r\n Browser.ieVersion = parseInt(RegExp.$3, 10);\r\n }\r\n\r\n // Silk gets its own if clause because its ua also contains 'Safari'\r\n if ((/Silk/).test(ua))\r\n {\r\n Browser.silk = true;\r\n }\r\n\r\n return Browser;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Browser.js?")},"./node_modules/phaser/src/device/CanvasFeatures.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the canvas features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.canvasFeatures` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.CanvasFeatures\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} supportInverseAlpha - Set to true if the browser supports inversed alpha.\r\n * @property {boolean} supportNewBlendModes - Set to true if the browser supports new canvas blend modes.\r\n */\r\nvar CanvasFeatures = {\r\n\r\n supportInverseAlpha: false,\r\n supportNewBlendModes: false\r\n\r\n};\r\n\r\nfunction checkBlendMode ()\r\n{\r\n var pngHead = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAABAQMAAADD8p2OAAAAA1BMVEX/';\r\n var pngEnd = 'AAAACklEQVQI12NgAAAAAgAB4iG8MwAAAABJRU5ErkJggg==';\r\n\r\n var magenta = new Image();\r\n\r\n magenta.onload = function ()\r\n {\r\n var yellow = new Image();\r\n\r\n yellow.onload = function ()\r\n {\r\n var canvas = CanvasPool.create(yellow, 6, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.globalCompositeOperation = 'multiply';\r\n\r\n context.drawImage(magenta, 0, 0);\r\n context.drawImage(yellow, 2, 0);\r\n\r\n if (!context.getImageData(2, 0, 1, 1))\r\n {\r\n return false;\r\n }\r\n\r\n var data = context.getImageData(2, 0, 1, 1).data;\r\n\r\n CanvasPool.remove(yellow);\r\n\r\n CanvasFeatures.supportNewBlendModes = (data[0] === 255 && data[1] === 0 && data[2] === 0);\r\n };\r\n\r\n yellow.src = pngHead + '/wCKxvRF' + pngEnd;\r\n };\r\n\r\n magenta.src = pngHead + 'AP804Oa6' + pngEnd;\r\n\r\n return false;\r\n}\r\n\r\nfunction checkInverseAlpha ()\r\n{\r\n var canvas = CanvasPool.create(this, 2, 1);\r\n var context = canvas.getContext('2d');\r\n\r\n context.fillStyle = 'rgba(10, 20, 30, 0.5)';\r\n\r\n // Draw a single pixel\r\n context.fillRect(0, 0, 1, 1);\r\n\r\n // Get the color values\r\n var s1 = context.getImageData(0, 0, 1, 1);\r\n\r\n if (s1 === null)\r\n {\r\n return false;\r\n }\r\n\r\n // Plot them to x2\r\n context.putImageData(s1, 1, 0);\r\n\r\n // Get those values\r\n var s2 = context.getImageData(1, 0, 1, 1);\r\n\r\n // Compare and return\r\n return (s2.data[0] === s1.data[0] && s2.data[1] === s1.data[1] && s2.data[2] === s1.data[2] && s2.data[3] === s1.data[3]);\r\n}\r\n\r\nfunction init ()\r\n{\r\n if (document !== undefined)\r\n {\r\n CanvasFeatures.supportNewBlendModes = checkBlendMode();\r\n CanvasFeatures.supportInverseAlpha = checkInverseAlpha();\r\n }\r\n\r\n return CanvasFeatures;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/CanvasFeatures.js?")},"./node_modules/phaser/src/device/Features.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ./OS */ \"./node_modules/phaser/src/device/OS.js\");\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Determines the features of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.features` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Features\r\n * @since 3.0.0\r\n * \r\n * @property {?boolean} canvasBitBltShift - True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.\r\n * @property {boolean} canvas - Is canvas available?\r\n * @property {boolean} file - Is file available?\r\n * @property {boolean} fileSystem - Is fileSystem available?\r\n * @property {boolean} getUserMedia - Does the device support the getUserMedia API?\r\n * @property {boolean} littleEndian - Is the device big or little endian? (only detected if the browser supports TypedArrays)\r\n * @property {boolean} localStorage - Is localStorage available?\r\n * @property {boolean} pointerLock - Is Pointer Lock available?\r\n * @property {boolean} support32bit - Does the device context support 32bit pixel manipulation using array buffer views?\r\n * @property {boolean} vibration - Does the device support the Vibration API?\r\n * @property {boolean} webGL - Is webGL available?\r\n * @property {boolean} worker - Is worker available?\r\n */\r\nvar Features = {\r\n\r\n canvas: false,\r\n canvasBitBltShift: null,\r\n file: false,\r\n fileSystem: false,\r\n getUserMedia: true,\r\n littleEndian: false,\r\n localStorage: false,\r\n pointerLock: false,\r\n support32bit: false,\r\n vibration: false,\r\n webGL: false,\r\n worker: false\r\n\r\n};\r\n\r\n// Check Little or Big Endian system.\r\n// @author Matt DesLauriers (@mattdesl)\r\nfunction checkIsLittleEndian ()\r\n{\r\n var a = new ArrayBuffer(4);\r\n var b = new Uint8Array(a);\r\n var c = new Uint32Array(a);\r\n\r\n b[0] = 0xa1;\r\n b[1] = 0xb2;\r\n b[2] = 0xc3;\r\n b[3] = 0xd4;\r\n\r\n if (c[0] === 0xd4c3b2a1)\r\n {\r\n return true;\r\n }\r\n\r\n if (c[0] === 0xa1b2c3d4)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n // Could not determine endianness\r\n return null;\r\n }\r\n}\r\n\r\nfunction init ()\r\n{\r\n Features.canvas = !!window['CanvasRenderingContext2D'];\r\n\r\n try\r\n {\r\n Features.localStorage = !!localStorage.getItem;\r\n }\r\n catch (error)\r\n {\r\n Features.localStorage = false;\r\n }\r\n\r\n Features.file = !!window['File'] && !!window['FileReader'] && !!window['FileList'] && !!window['Blob'];\r\n Features.fileSystem = !!window['requestFileSystem'];\r\n\r\n var isUint8 = false;\r\n\r\n var testWebGL = function ()\r\n {\r\n if (window['WebGLRenderingContext'])\r\n {\r\n try\r\n {\r\n var canvas = CanvasPool.createWebGL(this);\r\n\r\n var ctx = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');\r\n\r\n var canvas2D = CanvasPool.create2D(this);\r\n\r\n var ctx2D = canvas2D.getContext('2d');\r\n\r\n // Can't be done on a webgl context\r\n var image = ctx2D.createImageData(1, 1);\r\n\r\n // Test to see if ImageData uses CanvasPixelArray or Uint8ClampedArray.\r\n // @author Matt DesLauriers (@mattdesl)\r\n isUint8 = image.data instanceof Uint8ClampedArray;\r\n\r\n CanvasPool.remove(canvas);\r\n CanvasPool.remove(canvas2D);\r\n\r\n return !!ctx;\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return false;\r\n };\r\n\r\n Features.webGL = testWebGL();\r\n\r\n Features.worker = !!window['Worker'];\r\n\r\n Features.pointerLock = 'pointerLockElement' in document || 'mozPointerLockElement' in document || 'webkitPointerLockElement' in document;\r\n\r\n navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia || navigator.oGetUserMedia;\r\n\r\n window.URL = window.URL || window.webkitURL || window.mozURL || window.msURL;\r\n\r\n Features.getUserMedia = Features.getUserMedia && !!navigator.getUserMedia && !!window.URL;\r\n\r\n // Older versions of firefox (< 21) apparently claim support but user media does not actually work\r\n if (Browser.firefox && Browser.firefoxVersion < 21)\r\n {\r\n Features.getUserMedia = false;\r\n }\r\n\r\n // Excludes iOS versions as they generally wrap UIWebView (eg. Safari WebKit) and it\r\n // is safer to not try and use the fast copy-over method.\r\n if (!OS.iOS && (Browser.ie || Browser.firefox || Browser.chrome))\r\n {\r\n Features.canvasBitBltShift = true;\r\n }\r\n\r\n // Known not to work\r\n if (Browser.safari || Browser.mobileSafari)\r\n {\r\n Features.canvasBitBltShift = false;\r\n }\r\n\r\n navigator.vibrate = navigator.vibrate || navigator.webkitVibrate || navigator.mozVibrate || navigator.msVibrate;\r\n\r\n if (navigator.vibrate)\r\n {\r\n Features.vibration = true;\r\n }\r\n\r\n if (typeof ArrayBuffer !== 'undefined' && typeof Uint8Array !== 'undefined' && typeof Uint32Array !== 'undefined')\r\n {\r\n Features.littleEndian = checkIsLittleEndian();\r\n }\r\n\r\n Features.support32bit = (\r\n typeof ArrayBuffer !== 'undefined' &&\r\n typeof Uint8ClampedArray !== 'undefined' &&\r\n typeof Int32Array !== 'undefined' &&\r\n Features.littleEndian !== null &&\r\n isUint8\r\n );\r\n\r\n return Features;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Features.js?")},"./node_modules/phaser/src/device/Fullscreen.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the full screen support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.fullscreen` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Fullscreen\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} available - Does the browser support the Full Screen API?\r\n * @property {boolean} keyboard - Does the browser support access to the Keyboard during Full Screen mode?\r\n * @property {string} cancel - If the browser supports the Full Screen API this holds the call you need to use to cancel it.\r\n * @property {string} request - If the browser supports the Full Screen API this holds the call you need to use to activate it.\r\n */\r\nvar Fullscreen = {\r\n\r\n available: false,\r\n cancel: '',\r\n keyboard: false,\r\n request: ''\r\n\r\n};\r\n\r\n/**\r\n* Checks for support of the Full Screen API.\r\n* \r\n* @ignore\r\n*/\r\nfunction init ()\r\n{\r\n var i;\r\n\r\n var suffix1 = 'Fullscreen';\r\n var suffix2 = 'FullScreen';\r\n\r\n var fs = [\r\n 'request' + suffix1,\r\n 'request' + suffix2,\r\n 'webkitRequest' + suffix1,\r\n 'webkitRequest' + suffix2,\r\n 'msRequest' + suffix1,\r\n 'msRequest' + suffix2,\r\n 'mozRequest' + suffix2,\r\n 'mozRequest' + suffix1\r\n ];\r\n\r\n for (i = 0; i < fs.length; i++)\r\n {\r\n if (document.documentElement[fs[i]])\r\n {\r\n Fullscreen.available = true;\r\n Fullscreen.request = fs[i];\r\n break;\r\n }\r\n }\r\n\r\n var cfs = [\r\n 'cancel' + suffix2,\r\n 'exit' + suffix1,\r\n 'webkitCancel' + suffix2,\r\n 'webkitExit' + suffix1,\r\n 'msCancel' + suffix2,\r\n 'msExit' + suffix1,\r\n 'mozCancel' + suffix2,\r\n 'mozExit' + suffix1\r\n ];\r\n\r\n if (Fullscreen.available)\r\n {\r\n for (i = 0; i < cfs.length; i++)\r\n {\r\n if (document[cfs[i]])\r\n {\r\n Fullscreen.cancel = cfs[i];\r\n break;\r\n }\r\n }\r\n }\r\n\r\n // Keyboard Input?\r\n // Safari 5.1 says it supports fullscreen keyboard, but is lying.\r\n if (window['Element'] && Element['ALLOW_KEYBOARD_INPUT'] && !(/ Version\\/5\\.1(?:\\.\\d+)? Safari\\//).test(navigator.userAgent))\r\n {\r\n Fullscreen.keyboard = true;\r\n }\r\n\r\n Object.defineProperty(Fullscreen, 'active', { get: function () { return !!(document.fullscreenElement || document.webkitFullscreenElement || document.mozFullScreenElement || document.msFullscreenElement); } });\r\n\r\n return Fullscreen;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Fullscreen.js?")},"./node_modules/phaser/src/device/Input.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Browser = __webpack_require__(/*! ./Browser */ \"./node_modules/phaser/src/device/Browser.js\");\r\n\r\n/**\r\n * Determines the input support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.input` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Input\r\n * @since 3.0.0\r\n * \r\n * @property {?string} wheelType - The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll'\r\n * @property {boolean} gamepads - Is navigator.getGamepads available?\r\n * @property {boolean} mspointer - Is mspointer available?\r\n * @property {boolean} touch - Is touch available?\r\n */\r\nvar Input = {\r\n\r\n gamepads: false,\r\n mspointer: false,\r\n touch: false,\r\n wheelEvent: null\r\n \r\n};\r\n\r\nfunction init ()\r\n{\r\n if ('ontouchstart' in document.documentElement || (navigator.maxTouchPoints && navigator.maxTouchPoints >= 1))\r\n {\r\n Input.touch = true;\r\n }\r\n\r\n if (navigator.msPointerEnabled || navigator.pointerEnabled)\r\n {\r\n Input.mspointer = true;\r\n }\r\n\r\n if (navigator.getGamepads)\r\n {\r\n Input.gamepads = true;\r\n }\r\n\r\n // See https://developer.mozilla.org/en-US/docs/Web/Events/wheel\r\n if ('onwheel' in window || (Browser.ie && 'WheelEvent' in window))\r\n {\r\n // DOM3 Wheel Event: FF 17+, IE 9+, Chrome 31+, Safari 7+\r\n Input.wheelEvent = 'wheel';\r\n }\r\n else if ('onmousewheel' in window)\r\n {\r\n // Non-FF legacy: IE 6-9, Chrome 1-31, Safari 5-7.\r\n Input.wheelEvent = 'mousewheel';\r\n }\r\n else if (Browser.firefox && 'MouseScrollEvent' in window)\r\n {\r\n // FF prior to 17. This should probably be scrubbed.\r\n Input.wheelEvent = 'DOMMouseScroll';\r\n }\r\n\r\n return Input;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Input.js?")},"./node_modules/phaser/src/device/OS.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(process) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the operating system of the device running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.os` from within any Scene.\r\n *\r\n * @typedef {object} Phaser.Device.OS\r\n * @since 3.0.0\r\n *\r\n * @property {boolean} android - Is running on android?\r\n * @property {boolean} chromeOS - Is running on chromeOS?\r\n * @property {boolean} cordova - Is the game running under Apache Cordova?\r\n * @property {boolean} crosswalk - Is the game running under the Intel Crosswalk XDK?\r\n * @property {boolean} desktop - Is running on a desktop?\r\n * @property {boolean} ejecta - Is the game running under Ejecta?\r\n * @property {boolean} electron - Is the game running under GitHub Electron?\r\n * @property {boolean} iOS - Is running on iOS?\r\n * @property {boolean} iPad - Is running on iPad?\r\n * @property {boolean} iPhone - Is running on iPhone?\r\n * @property {boolean} kindle - Is running on an Amazon Kindle?\r\n * @property {boolean} linux - Is running on linux?\r\n * @property {boolean} macOS - Is running on macOS?\r\n * @property {boolean} node - Is the game running under Node.js?\r\n * @property {boolean} nodeWebkit - Is the game running under Node-Webkit?\r\n * @property {boolean} webApp - Set to true if running as a WebApp, i.e. within a WebView\r\n * @property {boolean} windows - Is running on windows?\r\n * @property {boolean} windowsPhone - Is running on a Windows Phone?\r\n * @property {number} iOSVersion - If running in iOS this will contain the major version number.\r\n * @property {number} pixelRatio - PixelRatio of the host device?\r\n */\r\nvar OS = {\r\n\r\n android: false,\r\n chromeOS: false,\r\n cordova: false,\r\n crosswalk: false,\r\n desktop: false,\r\n ejecta: false,\r\n electron: false,\r\n iOS: false,\r\n iOSVersion: 0,\r\n iPad: false,\r\n iPhone: false,\r\n kindle: false,\r\n linux: false,\r\n macOS: false,\r\n node: false,\r\n nodeWebkit: false,\r\n pixelRatio: 1,\r\n webApp: false,\r\n windows: false,\r\n windowsPhone: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var ua = navigator.userAgent;\r\n\r\n if (/Windows/.test(ua))\r\n {\r\n OS.windows = true;\r\n }\r\n else if (/Mac OS/.test(ua) && !(/like Mac OS/.test(ua)))\r\n {\r\n OS.macOS = true;\r\n }\r\n else if (/Android/.test(ua))\r\n {\r\n OS.android = true;\r\n }\r\n else if (/Linux/.test(ua))\r\n {\r\n OS.linux = true;\r\n }\r\n else if (/iP[ao]d|iPhone/i.test(ua))\r\n {\r\n OS.iOS = true;\r\n\r\n (navigator.appVersion).match(/OS (\\d+)/);\r\n\r\n OS.iOSVersion = parseInt(RegExp.$1, 10);\r\n\r\n OS.iPhone = ua.toLowerCase().indexOf('iphone') !== -1;\r\n OS.iPad = ua.toLowerCase().indexOf('ipad') !== -1;\r\n }\r\n else if (/Kindle/.test(ua) || (/\\bKF[A-Z][A-Z]+/).test(ua) || (/Silk.*Mobile Safari/).test(ua))\r\n {\r\n OS.kindle = true;\r\n\r\n // This will NOT detect early generations of Kindle Fire, I think there is no reliable way...\r\n // E.g. \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true\"\r\n }\r\n else if (/CrOS/.test(ua))\r\n {\r\n OS.chromeOS = true;\r\n }\r\n\r\n if (/Windows Phone/i.test(ua) || (/IEMobile/i).test(ua))\r\n {\r\n OS.android = false;\r\n OS.iOS = false;\r\n OS.macOS = false;\r\n OS.windows = true;\r\n OS.windowsPhone = true;\r\n }\r\n\r\n var silk = (/Silk/).test(ua);\r\n\r\n if (OS.windows || OS.macOS || (OS.linux && !silk) || OS.chromeOS)\r\n {\r\n OS.desktop = true;\r\n }\r\n\r\n // Windows Phone / Table reset\r\n if (OS.windowsPhone || ((/Windows NT/i.test(ua)) && (/Touch/i.test(ua))))\r\n {\r\n OS.desktop = false;\r\n }\r\n\r\n // WebApp mode in iOS\r\n if (navigator.standalone)\r\n {\r\n OS.webApp = true;\r\n }\r\n\r\n if (window.cordova !== undefined)\r\n {\r\n OS.cordova = true;\r\n }\r\n\r\n if (typeof process !== 'undefined' && process.versions && process.versions.node)\r\n {\r\n OS.node = true;\r\n }\r\n\r\n if (OS.node && typeof process.versions === 'object')\r\n {\r\n OS.nodeWebkit = !!process.versions['node-webkit'];\r\n\r\n OS.electron = !!process.versions.electron;\r\n }\r\n\r\n if (window.ejecta !== undefined)\r\n {\r\n OS.ejecta = true;\r\n }\r\n\r\n if ((/Crosswalk/).test(ua))\r\n {\r\n OS.crosswalk = true;\r\n }\r\n\r\n OS.pixelRatio = window['devicePixelRatio'] || 1;\r\n\r\n return OS;\r\n}\r\n\r\nmodule.exports = init();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/OS.js?")},"./node_modules/phaser/src/device/Video.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines the video support of the browser running this Phaser Game instance.\r\n * These values are read-only and populated during the boot sequence of the game.\r\n * They are then referenced by internal game systems and are available for you to access\r\n * via `this.sys.game.device.video` from within any Scene.\r\n * \r\n * @typedef {object} Phaser.Device.Video\r\n * @since 3.0.0\r\n * \r\n * @property {boolean} h264Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} hlsVideo - Can this device play hls video files?\r\n * @property {boolean} mp4Video - Can this device play h264 mp4 video files?\r\n * @property {boolean} oggVideo - Can this device play ogg video files?\r\n * @property {boolean} vp9Video - Can this device play vp9 video files?\r\n * @property {boolean} webmVideo - Can this device play webm video files?\r\n */\r\nvar Video = {\r\n\r\n h264Video: false,\r\n hlsVideo: false,\r\n mp4Video: false,\r\n oggVideo: false,\r\n vp9Video: false,\r\n webmVideo: false\r\n\r\n};\r\n\r\nfunction init ()\r\n{\r\n var videoElement = document.createElement('video');\r\n var result = !!videoElement.canPlayType;\r\n\r\n try\r\n {\r\n if (result)\r\n {\r\n if (videoElement.canPlayType('video/ogg; codecs=\"theora\"').replace(/^no$/, ''))\r\n {\r\n Video.oggVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/mp4; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n // Without QuickTime, this value will be `undefined`. github.com/Modernizr/Modernizr/issues/546\r\n Video.h264Video = true;\r\n Video.mp4Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp8, vorbis\"').replace(/^no$/, ''))\r\n {\r\n Video.webmVideo = true;\r\n }\r\n\r\n if (videoElement.canPlayType('video/webm; codecs=\"vp9\"').replace(/^no$/, ''))\r\n {\r\n Video.vp9Video = true;\r\n }\r\n\r\n if (videoElement.canPlayType('application/x-mpegURL; codecs=\"avc1.42E01E\"').replace(/^no$/, ''))\r\n {\r\n Video.hlsVideo = true;\r\n }\r\n }\r\n }\r\n catch (e)\r\n {\r\n // Nothing to do\r\n }\r\n\r\n return Video;\r\n}\r\n\r\nmodule.exports = init();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/Video.js?")},"./node_modules/phaser/src/device/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// This singleton is instantiated as soon as Phaser loads,\r\n// before a Phaser.Game instance has even been created.\r\n// Which means all instances of Phaser Games can share it,\r\n// without having to re-poll the device all over again\r\n\r\n/**\r\n * @namespace Phaser.Device\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.DeviceConf\r\n *\r\n * @property {Phaser.Device.OS} os - The OS Device functions.\r\n * @property {Phaser.Device.Browser} browser - The Browser Device functions.\r\n * @property {Phaser.Device.Features} features - The Features Device functions.\r\n * @property {Phaser.Device.Input} input - The Input Device functions.\r\n * @property {Phaser.Device.Audio} audio - The Audio Device functions.\r\n * @property {Phaser.Device.Video} video - The Video Device functions.\r\n * @property {Phaser.Device.Fullscreen} fullscreen - The Fullscreen Device functions.\r\n * @property {Phaser.Device.CanvasFeatures} canvasFeatures - The Canvas Device functions.\r\n */\r\n\r\nmodule.exports = {\r\n\r\n os: __webpack_require__(/*! ./OS */ "./node_modules/phaser/src/device/OS.js"),\r\n browser: __webpack_require__(/*! ./Browser */ "./node_modules/phaser/src/device/Browser.js"),\r\n features: __webpack_require__(/*! ./Features */ "./node_modules/phaser/src/device/Features.js"),\r\n input: __webpack_require__(/*! ./Input */ "./node_modules/phaser/src/device/Input.js"),\r\n audio: __webpack_require__(/*! ./Audio */ "./node_modules/phaser/src/device/Audio.js"),\r\n video: __webpack_require__(/*! ./Video */ "./node_modules/phaser/src/device/Video.js"),\r\n fullscreen: __webpack_require__(/*! ./Fullscreen */ "./node_modules/phaser/src/device/Fullscreen.js"),\r\n canvasFeatures: __webpack_require__(/*! ./CanvasFeatures */ "./node_modules/phaser/src/device/CanvasFeatures.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/device/index.js?')},"./node_modules/phaser/src/display/align/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = {\r\n\r\n /**\r\n * A constant representing a top-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_LEFT: 0,\r\n\r\n /**\r\n * A constant representing a top-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_CENTER: 1,\r\n\r\n /**\r\n * A constant representing a top-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.TOP_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n TOP_RIGHT: 2,\r\n\r\n /**\r\n * A constant representing a left-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_TOP: 3,\r\n\r\n /**\r\n * A constant representing a left-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_CENTER: 4,\r\n\r\n /**\r\n * A constant representing a left-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.LEFT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n LEFT_BOTTOM: 5,\r\n\r\n /**\r\n * A constant representing a center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n CENTER: 6,\r\n\r\n /**\r\n * A constant representing a right-top alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_TOP\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_TOP: 7,\r\n\r\n /**\r\n * A constant representing a right-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_CENTER: 8,\r\n\r\n /**\r\n * A constant representing a right-bottom alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.RIGHT_BOTTOM\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n RIGHT_BOTTOM: 9,\r\n\r\n /**\r\n * A constant representing a bottom-left alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_LEFT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_LEFT: 10,\r\n\r\n /**\r\n * A constant representing a bottom-center alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_CENTER\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_CENTER: 11,\r\n\r\n /**\r\n * A constant representing a bottom-right alignment or position.\r\n * @constant\r\n * @name Phaser.Display.Align.BOTTOM_RIGHT\r\n * @since 3.0.0\r\n * @type {integer}\r\n */\r\n BOTTOM_RIGHT: 12\r\n\r\n};\r\n\r\nmodule.exports = ALIGN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/const.js?")},"./node_modules/phaser/src/display/align/in/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomCenter.js?')},"./node_modules/phaser/src/display/align/in/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomLeft.js?')},"./node_modules/phaser/src/display/align/in/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/BottomRight.js?')},"./node_modules/phaser/src/display/align/in/Center.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ../../bounds/CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.Center\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar Center = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n CenterOn(gameObject, GetCenterX(alignIn) + offsetX, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = Center;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/Center.js?')},"./node_modules/phaser/src/display/align/in/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the left center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/LeftCenter.js?')},"./node_modules/phaser/src/display/align/in/QuickSet.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ALIGN_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/display/align/const.js");\r\n\r\nvar AlignInMap = [];\r\n\r\nAlignInMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js");\r\nAlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js");\r\nAlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js");\r\nAlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js");\r\nAlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js");\r\nAlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js");\r\nAlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned relative to the other.\r\n * The alignment used is based on the `position` argument, which is an `ALIGN_CONST` value, such as `LEFT_CENTER` or `TOP_RIGHT`.\r\n *\r\n * @function Phaser.Display.Align.In.QuickSet\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [child,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {integer} position - The position to align the Game Object with. This is an align constant, such as `ALIGN_CONST.LEFT_CENTER`.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar QuickSet = function (child, alignIn, position, offsetX, offsetY)\r\n{\r\n return AlignInMap[position](child, alignIn, offsetX, offsetY);\r\n};\r\n\r\nmodule.exports = QuickSet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/QuickSet.js?')},"./node_modules/phaser/src/display/align/in/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the right center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignIn) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/RightCenter.js?')},"./node_modules/phaser/src/display/align/in/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top center of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopCenter.js?')},"./node_modules/phaser/src/display/align/in/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top left of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignIn) - offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopLeft.js?')},"./node_modules/phaser/src/display/align/in/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned in the top right of the other.\r\n *\r\n * @function Phaser.Display.Align.In.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignIn - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignIn, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignIn) + offsetX);\r\n SetTop(gameObject, GetTop(alignIn) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/TopRight.js?')},"./node_modules/phaser/src/display/align/in/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.In\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/in/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/in/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/in/BottomRight.js"),\r\n Center: __webpack_require__(/*! ./Center */ "./node_modules/phaser/src/display/align/in/Center.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/in/LeftCenter.js"),\r\n QuickSet: __webpack_require__(/*! ./QuickSet */ "./node_modules/phaser/src/display/align/in/QuickSet.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/in/RightCenter.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/in/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/in/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/in/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/in/index.js?')},"./node_modules/phaser/src/display/align/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/display/align/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Align\r\n */\r\n\r\nvar Align = {\r\n\r\n In: __webpack_require__(/*! ./in */ "./node_modules/phaser/src/display/align/in/index.js"),\r\n To: __webpack_require__(/*! ./to */ "./node_modules/phaser/src/display/align/to/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nAlign = Extend(false, Align, CONST);\r\n\r\nmodule.exports = Align;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/index.js?')},"./node_modules/phaser/src/display/align/to/BottomCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomCenter.js?')},"./node_modules/phaser/src/display/align/to/BottomLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomLeft.js?')},"./node_modules/phaser/src/display/align/to/BottomRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.BottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar BottomRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BottomRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/BottomRight.js?')},"./node_modules/phaser/src/display/align/to/LeftBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftBottom.js?')},"./node_modules/phaser/src/display/align/to/LeftCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftCenter.js?')},"./node_modules/phaser/src/display/align/to/LeftTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.LeftTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar LeftTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetLeft(alignTo) - offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = LeftTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/LeftTop.js?')},"./node_modules/phaser/src/display/align/to/RightBottom.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetBottom = __webpack_require__(/*! ../../bounds/GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightBottom = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetBottom(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightBottom.js?')},"./node_modules/phaser/src/display/align/to/RightCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterY = __webpack_require__(/*! ../../bounds/GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js");\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar SetCenterY = __webpack_require__(/*! ../../bounds/SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetCenterY(gameObject, GetCenterY(alignTo) + offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightCenter.js?')},"./node_modules/phaser/src/display/align/to/RightTop.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\nvar SetTop = __webpack_require__(/*! ../../bounds/SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.RightTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar RightTop = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetRight(alignTo) + offsetX);\r\n SetTop(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = RightTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/RightTop.js?')},"./node_modules/phaser/src/display/align/to/TopCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetCenterX = __webpack_require__(/*! ../../bounds/GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetCenterX = __webpack_require__(/*! ../../bounds/SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopCenter = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetCenterX(gameObject, GetCenterX(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopCenter.js?')},"./node_modules/phaser/src/display/align/to/TopLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLeft = __webpack_require__(/*! ../../bounds/GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetLeft = __webpack_require__(/*! ../../bounds/SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopLeft = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetLeft(gameObject, GetLeft(alignTo) - offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopLeft.js?')},"./node_modules/phaser/src/display/align/to/TopRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetRight = __webpack_require__(/*! ../../bounds/GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js");\r\nvar GetTop = __webpack_require__(/*! ../../bounds/GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js");\r\nvar SetBottom = __webpack_require__(/*! ../../bounds/SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js");\r\nvar SetRight = __webpack_require__(/*! ../../bounds/SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js");\r\n\r\n/**\r\n * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other.\r\n *\r\n * @function Phaser.Display.Align.To.TopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be positioned.\r\n * @param {Phaser.GameObjects.GameObject} alignTo - The Game Object to base the alignment position on.\r\n * @param {number} [offsetX=0] - Optional horizontal offset from the position.\r\n * @param {number} [offsetY=0] - Optional vertical offset from the position.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was aligned.\r\n */\r\nvar TopRight = function (gameObject, alignTo, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n SetRight(gameObject, GetRight(alignTo) + offsetX);\r\n SetBottom(gameObject, GetTop(alignTo) - offsetY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = TopRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/TopRight.js?')},"./node_modules/phaser/src/display/align/to/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Align.To\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BottomCenter: __webpack_require__(/*! ./BottomCenter */ "./node_modules/phaser/src/display/align/to/BottomCenter.js"),\r\n BottomLeft: __webpack_require__(/*! ./BottomLeft */ "./node_modules/phaser/src/display/align/to/BottomLeft.js"),\r\n BottomRight: __webpack_require__(/*! ./BottomRight */ "./node_modules/phaser/src/display/align/to/BottomRight.js"),\r\n LeftBottom: __webpack_require__(/*! ./LeftBottom */ "./node_modules/phaser/src/display/align/to/LeftBottom.js"),\r\n LeftCenter: __webpack_require__(/*! ./LeftCenter */ "./node_modules/phaser/src/display/align/to/LeftCenter.js"),\r\n LeftTop: __webpack_require__(/*! ./LeftTop */ "./node_modules/phaser/src/display/align/to/LeftTop.js"),\r\n RightBottom: __webpack_require__(/*! ./RightBottom */ "./node_modules/phaser/src/display/align/to/RightBottom.js"),\r\n RightCenter: __webpack_require__(/*! ./RightCenter */ "./node_modules/phaser/src/display/align/to/RightCenter.js"),\r\n RightTop: __webpack_require__(/*! ./RightTop */ "./node_modules/phaser/src/display/align/to/RightTop.js"),\r\n TopCenter: __webpack_require__(/*! ./TopCenter */ "./node_modules/phaser/src/display/align/to/TopCenter.js"),\r\n TopLeft: __webpack_require__(/*! ./TopLeft */ "./node_modules/phaser/src/display/align/to/TopLeft.js"),\r\n TopRight: __webpack_require__(/*! ./TopRight */ "./node_modules/phaser/src/display/align/to/TopRight.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/align/to/index.js?')},"./node_modules/phaser/src/display/bounds/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetCenterX = __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js");\r\nvar SetCenterY = __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js");\r\n\r\n/**\r\n * Positions the Game Object so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Display.Bounds.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The horizontal coordinate to position the Game Object on.\r\n * @param {number} y - The vertical coordinate to position the Game Object on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar CenterOn = function (gameObject, x, y)\r\n{\r\n SetCenterX(gameObject, x);\r\n\r\n return SetCenterY(gameObject, y);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/CenterOn.js?')},"./node_modules/phaser/src/display/bounds/GetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the bottom coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The bottom coordinate of the bounds of the Game Object.\r\n */\r\nvar GetBottom = function (gameObject)\r\n{\r\n return (gameObject.y + gameObject.height) - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetBottom.js?")},"./node_modules/phaser/src/display/bounds/GetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center x coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center x coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterX = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX) + (gameObject.width * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterX.js?")},"./node_modules/phaser/src/display/bounds/GetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the center y coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The center y coordinate of the bounds of the Game Object.\r\n */\r\nvar GetCenterY = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY) + (gameObject.height * 0.5);\r\n};\r\n\r\nmodule.exports = GetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetCenterY.js?")},"./node_modules/phaser/src/display/bounds/GetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the left coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The left coordinate of the bounds of the Game Object.\r\n */\r\nvar GetLeft = function (gameObject)\r\n{\r\n return gameObject.x - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetLeft.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its x coordinate.\r\n * This is the same as `width * origin.x`.\r\n * This value will only be > 0 if `origin.x` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The horizontal offset of the Game Object.\r\n */\r\nvar GetOffsetX = function (gameObject)\r\n{\r\n return gameObject.width * gameObject.originX;\r\n};\r\n\r\nmodule.exports = GetOffsetX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetX.js?")},"./node_modules/phaser/src/display/bounds/GetOffsetY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the amount the Game Object is visually offset from its y coordinate.\r\n * This is the same as `width * origin.y`.\r\n * This value will only be > 0 if `origin.y` is not equal to zero.\r\n *\r\n * @function Phaser.Display.Bounds.GetOffsetY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The vertical offset of the Game Object.\r\n */\r\nvar GetOffsetY = function (gameObject)\r\n{\r\n return gameObject.height * gameObject.originY;\r\n};\r\n\r\nmodule.exports = GetOffsetY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetOffsetY.js?")},"./node_modules/phaser/src/display/bounds/GetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the right coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The right coordinate of the bounds of the Game Object.\r\n */\r\nvar GetRight = function (gameObject)\r\n{\r\n return (gameObject.x + gameObject.width) - (gameObject.width * gameObject.originX);\r\n};\r\n\r\nmodule.exports = GetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetRight.js?")},"./node_modules/phaser/src/display/bounds/GetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the top coordinate from the bounds of the Game Object.\r\n *\r\n * @function Phaser.Display.Bounds.GetTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to get the bounds value from.\r\n *\r\n * @return {number} The top coordinate of the bounds of the Game Object.\r\n */\r\nvar GetTop = function (gameObject)\r\n{\r\n return gameObject.y - (gameObject.height * gameObject.originY);\r\n};\r\n\r\nmodule.exports = GetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/GetTop.js?")},"./node_modules/phaser/src/display/bounds/SetBottom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the bottom of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetBottom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetBottom = function (gameObject, value)\r\n{\r\n gameObject.y = (value - gameObject.height) + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetBottom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetBottom.js?")},"./node_modules/phaser/src/display/bounds/SetCenterX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterX\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} x - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterX = function (gameObject, x)\r\n{\r\n var offsetX = gameObject.width * gameObject.originX;\r\n\r\n gameObject.x = (x + offsetX) - (gameObject.width * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterX.js?")},"./node_modules/phaser/src/display/bounds/SetCenterY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the center top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetCenterY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} y - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetCenterY = function (gameObject, y)\r\n{\r\n var offsetY = gameObject.height * gameObject.originY;\r\n\r\n gameObject.y = (y + offsetY) - (gameObject.height * 0.5);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetCenterY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetCenterY.js?")},"./node_modules/phaser/src/display/bounds/SetLeft.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetLeft = function (gameObject, value)\r\n{\r\n gameObject.x = value + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetLeft.js?")},"./node_modules/phaser/src/display/bounds/SetRight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the left of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetRight = function (gameObject, value)\r\n{\r\n gameObject.x = (value - gameObject.width) + (gameObject.width * gameObject.originX);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetRight.js?")},"./node_modules/phaser/src/display/bounds/SetTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Positions the Game Object so that the top of its bounds aligns with the given coordinate.\r\n *\r\n * @function Phaser.Display.Bounds.SetTop\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.GameObjects.GameObject} G - [gameObject,$return]\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will be re-positioned.\r\n * @param {number} value - The coordinate to position the Game Object bounds on.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was positioned.\r\n */\r\nvar SetTop = function (gameObject, value)\r\n{\r\n gameObject.y = value + (gameObject.height * gameObject.originY);\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = SetTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/SetTop.js?")},"./node_modules/phaser/src/display/bounds/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Bounds\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CenterOn: __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/display/bounds/CenterOn.js"),\r\n GetBottom: __webpack_require__(/*! ./GetBottom */ "./node_modules/phaser/src/display/bounds/GetBottom.js"),\r\n GetCenterX: __webpack_require__(/*! ./GetCenterX */ "./node_modules/phaser/src/display/bounds/GetCenterX.js"),\r\n GetCenterY: __webpack_require__(/*! ./GetCenterY */ "./node_modules/phaser/src/display/bounds/GetCenterY.js"),\r\n GetLeft: __webpack_require__(/*! ./GetLeft */ "./node_modules/phaser/src/display/bounds/GetLeft.js"),\r\n GetOffsetX: __webpack_require__(/*! ./GetOffsetX */ "./node_modules/phaser/src/display/bounds/GetOffsetX.js"),\r\n GetOffsetY: __webpack_require__(/*! ./GetOffsetY */ "./node_modules/phaser/src/display/bounds/GetOffsetY.js"),\r\n GetRight: __webpack_require__(/*! ./GetRight */ "./node_modules/phaser/src/display/bounds/GetRight.js"),\r\n GetTop: __webpack_require__(/*! ./GetTop */ "./node_modules/phaser/src/display/bounds/GetTop.js"),\r\n SetBottom: __webpack_require__(/*! ./SetBottom */ "./node_modules/phaser/src/display/bounds/SetBottom.js"),\r\n SetCenterX: __webpack_require__(/*! ./SetCenterX */ "./node_modules/phaser/src/display/bounds/SetCenterX.js"),\r\n SetCenterY: __webpack_require__(/*! ./SetCenterY */ "./node_modules/phaser/src/display/bounds/SetCenterY.js"),\r\n SetLeft: __webpack_require__(/*! ./SetLeft */ "./node_modules/phaser/src/display/bounds/SetLeft.js"),\r\n SetRight: __webpack_require__(/*! ./SetRight */ "./node_modules/phaser/src/display/bounds/SetRight.js"),\r\n SetTop: __webpack_require__(/*! ./SetTop */ "./node_modules/phaser/src/display/bounds/SetTop.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/bounds/index.js?')},"./node_modules/phaser/src/display/canvas/CanvasInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.CanvasInterpolation\r\n * @since 3.0.0\r\n */\r\nvar CanvasInterpolation = {\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit).\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setCrisp\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setCrisp: function (canvas)\r\n {\r\n var types = [ 'optimizeSpeed', 'crisp-edges', '-moz-crisp-edges', '-webkit-optimize-contrast', 'optimize-contrast', 'pixelated' ];\r\n\r\n types.forEach(function (type)\r\n {\r\n canvas.style['image-rendering'] = type;\r\n });\r\n\r\n canvas.style.msInterpolationMode = 'nearest-neighbor';\r\n\r\n return canvas;\r\n },\r\n\r\n /**\r\n * Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').\r\n *\r\n * @function Phaser.Display.Canvas.CanvasInterpolation.setBicubic\r\n * @since 3.0.0\r\n * \r\n * @param {HTMLCanvasElement} canvas - The canvas object to have the style set on.\r\n * \r\n * @return {HTMLCanvasElement} The canvas.\r\n */\r\n setBicubic: function (canvas)\r\n {\r\n canvas.style['image-rendering'] = 'auto';\r\n canvas.style.msInterpolationMode = 'bicubic';\r\n\r\n return canvas;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CanvasInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasInterpolation.js?")},"./node_modules/phaser/src/display/canvas/CanvasPool.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Smoothing = __webpack_require__(/*! ./Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\n\r\n// The pool into which the canvas elements are placed.\r\nvar pool = [];\r\n\r\n// Automatically apply smoothing(false) to created Canvas elements\r\nvar _disableContextSmoothing = false;\r\n\r\n/**\r\n * The CanvasPool is a global static object, that allows Phaser to recycle and pool 2D Context Canvas DOM elements.\r\n * It does not pool WebGL Contexts, because once the context options are set they cannot be modified again, \r\n * which is useless for some of the Phaser pipelines / renderer.\r\n *\r\n * This singleton is instantiated as soon as Phaser loads, before a Phaser.Game instance has even been created.\r\n * Which means all instances of Phaser Games on the same page can share the one single pool.\r\n *\r\n * @namespace Phaser.Display.Canvas.CanvasPool\r\n * @since 3.0.0\r\n */\r\nvar CanvasPool = function ()\r\n{\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n * @param {boolean} [selfParent=false] - Use the generated Canvas element as the parent?\r\n *\r\n * @return {HTMLCanvasElement} The canvas element that was created or pulled from the pool\r\n */\r\n var create = function (parent, width, height, canvasType, selfParent)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = 1; }\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n if (selfParent === undefined) { selfParent = false; }\r\n\r\n var canvas;\r\n var container = first(canvasType);\r\n\r\n if (container === null)\r\n {\r\n container = {\r\n parent: parent,\r\n canvas: document.createElement('canvas'),\r\n type: canvasType\r\n };\r\n\r\n if (canvasType === CONST.CANVAS)\r\n {\r\n pool.push(container);\r\n }\r\n\r\n canvas = container.canvas;\r\n }\r\n else\r\n {\r\n container.parent = parent;\r\n\r\n canvas = container.canvas;\r\n }\r\n\r\n if (selfParent)\r\n {\r\n container.parent = canvas;\r\n }\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n if (_disableContextSmoothing && canvasType === CONST.CANVAS)\r\n {\r\n Smoothing.disable(canvas.getContext('2d'));\r\n }\r\n\r\n return canvas;\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.create2D\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created canvas.\r\n */\r\n var create2D = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.CANVAS);\r\n };\r\n\r\n /**\r\n * Creates a new Canvas DOM element, or pulls one from the pool if free.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.createWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The parent of the Canvas object.\r\n * @param {integer} [width=1] - The width of the Canvas.\r\n * @param {integer} [height=1] - The height of the Canvas.\r\n *\r\n * @return {HTMLCanvasElement} The created WebGL canvas.\r\n */\r\n var createWebGL = function (parent, width, height)\r\n {\r\n return create(parent, width, height, CONST.WEBGL);\r\n };\r\n\r\n /**\r\n * Gets the first free canvas index from the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.first\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.\r\n *\r\n * @return {HTMLCanvasElement} The first free canvas, or `null` if a WebGL canvas was requested or if the pool doesn't have free canvases.\r\n */\r\n var first = function (canvasType)\r\n {\r\n if (canvasType === undefined) { canvasType = CONST.CANVAS; }\r\n\r\n if (canvasType === CONST.WEBGL)\r\n {\r\n return null;\r\n }\r\n\r\n for (var i = 0; i < pool.length; i++)\r\n {\r\n var container = pool[i];\r\n\r\n if (!container.parent && container.type === canvasType)\r\n {\r\n return container;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Looks up a canvas based on its parent, and if found puts it back in the pool, freeing it up for re-use.\r\n * The canvas has its width and height set to 1, and its parent attribute nulled.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.remove\r\n * @since 3.0.0\r\n *\r\n * @param {*} parent - The canvas or the parent of the canvas to free.\r\n */\r\n var remove = function (parent)\r\n {\r\n // Check to see if the parent is a canvas object\r\n var isCanvas = parent instanceof HTMLCanvasElement;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if ((isCanvas && container.canvas === parent) || (!isCanvas && container.parent === parent))\r\n {\r\n container.parent = null;\r\n container.canvas.width = 1;\r\n container.canvas.height = 1;\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Gets the total number of used canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.total\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of used canvases.\r\n */\r\n var total = function ()\r\n {\r\n var c = 0;\r\n\r\n pool.forEach(function (container)\r\n {\r\n if (container.parent)\r\n {\r\n c++;\r\n }\r\n });\r\n\r\n return c;\r\n };\r\n\r\n /**\r\n * Gets the total number of free canvas elements in the pool.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.free\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of free canvases.\r\n */\r\n var free = function ()\r\n {\r\n return pool.length - total();\r\n };\r\n\r\n /**\r\n * Disable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.disableSmoothing\r\n * @since 3.0.0\r\n */\r\n var disableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = true;\r\n };\r\n\r\n /**\r\n * Enable context smoothing on any new Canvas element created.\r\n *\r\n * @function Phaser.Display.Canvas.CanvasPool.enableSmoothing\r\n * @since 3.0.0\r\n */\r\n var enableSmoothing = function ()\r\n {\r\n _disableContextSmoothing = false;\r\n };\r\n\r\n return {\r\n create2D: create2D,\r\n create: create,\r\n createWebGL: createWebGL,\r\n disableSmoothing: disableSmoothing,\r\n enableSmoothing: enableSmoothing,\r\n first: first,\r\n free: free,\r\n pool: pool,\r\n remove: remove,\r\n total: total\r\n };\r\n};\r\n\r\n// If we export the called function here, it'll only be invoked once (not every time it's required).\r\nmodule.exports = CanvasPool();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/CanvasPool.js?")},"./node_modules/phaser/src/display/canvas/Smoothing.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Browser specific prefix, so not going to change between contexts, only between browsers\r\nvar prefix = '';\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas.Smoothing\r\n * @since 3.0.0\r\n */\r\nvar Smoothing = function ()\r\n{\r\n /**\r\n * Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.getPrefix\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The canvas context to check.\r\n *\r\n * @return {string} The name of the property on the context which controls image smoothing (either `imageSmoothingEnabled` or a vendor-prefixed version thereof), or `null` if not supported.\r\n */\r\n var getPrefix = function (context)\r\n {\r\n var vendors = [ 'i', 'webkitI', 'msI', 'mozI', 'oI' ];\r\n\r\n for (var i = 0; i < vendors.length; i++)\r\n {\r\n var s = vendors[i] + 'mageSmoothingEnabled';\r\n\r\n if (s in context)\r\n {\r\n return s;\r\n }\r\n }\r\n\r\n return null;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.enable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to enable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var enable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = true;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.\r\n * By default browsers have image smoothing enabled, which isn't always what you visually want, especially\r\n * when using pixel art in a game. Note that this sets the property on the context itself, so that any image\r\n * drawn to the context will be affected. This sets the property across all current browsers but support is\r\n * patchy on earlier browsers, especially on mobile.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.disable\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context on which to disable smoothing.\r\n *\r\n * @return {(CanvasRenderingContext2D|WebGLRenderingContext)} The provided context.\r\n */\r\n var disable = function (context)\r\n {\r\n if (prefix === '')\r\n {\r\n prefix = getPrefix(context);\r\n }\r\n\r\n if (prefix)\r\n {\r\n context[prefix] = false;\r\n }\r\n\r\n return context;\r\n };\r\n\r\n /**\r\n * Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.\r\n * Returns null if no smoothing prefix is available.\r\n *\r\n * @function Phaser.Display.Canvas.Smoothing.isEnabled\r\n * @since 3.0.0\r\n *\r\n * @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - The context to check.\r\n *\r\n * @return {?boolean} `true` if smoothing is enabled on the context, otherwise `false`. `null` if not supported.\r\n */\r\n var isEnabled = function (context)\r\n {\r\n return (prefix !== null) ? context[prefix] : null;\r\n };\r\n\r\n return {\r\n disable: disable,\r\n enable: enable,\r\n getPrefix: getPrefix,\r\n isEnabled: isEnabled\r\n };\r\n\r\n};\r\n\r\nmodule.exports = Smoothing();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/Smoothing.js?")},"./node_modules/phaser/src/display/canvas/TouchAction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.\r\n *\r\n * @function Phaser.Display.Canvas.TouchAction\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch action value to set on the canvas. Set to `none` to disable touch actions.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar TouchAction = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n canvas.style['msTouchAction'] = value;\r\n canvas.style['ms-touch-action'] = value;\r\n canvas.style['touch-action'] = value;\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = TouchAction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/TouchAction.js?")},"./node_modules/phaser/src/display/canvas/UserSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.\r\n *\r\n * @function Phaser.Display.Canvas.UserSelect\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas element to have the style applied to.\r\n * @param {string} [value='none'] - The touch callout value to set on the canvas. Set to `none` to disable touch callouts.\r\n *\r\n * @return {HTMLCanvasElement} The canvas element.\r\n */\r\nvar UserSelect = function (canvas, value)\r\n{\r\n if (value === undefined) { value = 'none'; }\r\n\r\n var vendors = [\r\n '-webkit-',\r\n '-khtml-',\r\n '-moz-',\r\n '-ms-',\r\n ''\r\n ];\r\n\r\n vendors.forEach(function (vendor)\r\n {\r\n canvas.style[vendor + 'user-select'] = value;\r\n });\r\n\r\n canvas.style['-webkit-touch-callout'] = value;\r\n canvas.style['-webkit-tap-highlight-color'] = 'rgba(0, 0, 0, 0)';\r\n\r\n return canvas;\r\n};\r\n\r\nmodule.exports = UserSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/UserSelect.js?")},"./node_modules/phaser/src/display/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasInterpolation: __webpack_require__(/*! ./CanvasInterpolation */ "./node_modules/phaser/src/display/canvas/CanvasInterpolation.js"),\r\n CanvasPool: __webpack_require__(/*! ./CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js"),\r\n Smoothing: __webpack_require__(/*! ./Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js"),\r\n TouchAction: __webpack_require__(/*! ./TouchAction */ "./node_modules/phaser/src/display/canvas/TouchAction.js"),\r\n UserSelect: __webpack_require__(/*! ./UserSelect */ "./node_modules/phaser/src/display/canvas/UserSelect.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/canvas/index.js?')},"./node_modules/phaser/src/display/color/Color.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ \"./node_modules/phaser/src/display/color/GetColor.js\");\r\nvar GetColor32 = __webpack_require__(/*! ./GetColor32 */ \"./node_modules/phaser/src/display/color/GetColor32.js\");\r\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ \"./node_modules/phaser/src/display/color/HSVToRGB.js\");\r\nvar RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ \"./node_modules/phaser/src/display/color/RGBToHSV.js\");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The Color class holds a single color value and allows for easy modification and reading of it.\r\n *\r\n * @class Color\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [red=0] - The red color value. A number between 0 and 255.\r\n * @param {integer} [green=0] - The green color value. A number between 0 and 255.\r\n * @param {integer} [blue=0] - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n */\r\nvar Color = new Class({\r\n\r\n initialize:\r\n\r\n function Color (red, green, blue, alpha)\r\n {\r\n if (red === undefined) { red = 0; }\r\n if (green === undefined) { green = 0; }\r\n if (blue === undefined) { blue = 0; }\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n /**\r\n * The internal red color value.\r\n *\r\n * @name Phaser.Display.Color#r\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.r = 0;\r\n\r\n /**\r\n * The internal green color value.\r\n *\r\n * @name Phaser.Display.Color#g\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.g = 0;\r\n\r\n /**\r\n * The internal blue color value.\r\n *\r\n * @name Phaser.Display.Color#b\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.b = 0;\r\n\r\n /**\r\n * The internal alpha color value.\r\n *\r\n * @name Phaser.Display.Color#a\r\n * @type {number}\r\n * @private\r\n * @default 255\r\n * @since 3.0.0\r\n */\r\n this.a = 255;\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#_h\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._h = 0;\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#_s\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._s = 0;\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#_v\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._v = 0;\r\n\r\n /**\r\n * Is this color update locked?\r\n *\r\n * @name Phaser.Display.Color#_locked\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._locked = false;\r\n\r\n /**\r\n * An array containing the calculated color values for WebGL use.\r\n *\r\n * @name Phaser.Display.Color#gl\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.gl = [ 0, 0, 0, 1 ];\r\n\r\n /**\r\n * Pre-calculated internal color value.\r\n *\r\n * @name Phaser.Display.Color#_color\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color = 0;\r\n\r\n /**\r\n * Pre-calculated internal color32 value.\r\n *\r\n * @name Phaser.Display.Color#_color32\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._color32 = 0;\r\n\r\n /**\r\n * Pre-calculated internal color rgb string value.\r\n *\r\n * @name Phaser.Display.Color#_rgba\r\n * @type {string}\r\n * @private\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this._rgba = '';\r\n\r\n this.setTo(red, green, blue, alpha);\r\n },\r\n\r\n /**\r\n * Sets this color to be transparent. Sets all values to zero.\r\n *\r\n * @method Phaser.Display.Color#transparent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n transparent: function ()\r\n {\r\n this._locked = true;\r\n\r\n this.red = 0;\r\n this.green = 0;\r\n this.blue = 0;\r\n this.alpha = 0;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * @param {boolean} [updateHSV=true] - Update the HSV values after setting the RGB values?\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setTo: function (red, green, blue, alpha, updateHSV)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n if (updateHSV === undefined) { updateHSV = true; }\r\n\r\n this._locked = true;\r\n\r\n this.red = red;\r\n this.green = green;\r\n this.blue = blue;\r\n this.alpha = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(updateHSV);\r\n },\r\n\r\n /**\r\n * Sets the red, green, blue and alpha GL values of this Color component.\r\n *\r\n * @method Phaser.Display.Color#setGLTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} red - The red color value. A number between 0 and 1.\r\n * @param {number} green - The green color value. A number between 0 and 1.\r\n * @param {number} blue - The blue color value. A number between 0 and 1.\r\n * @param {number} [alpha=1] - The alpha value. A number between 0 and 1.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setGLTo: function (red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this._locked = true;\r\n\r\n this.redGL = red;\r\n this.greenGL = green;\r\n this.blueGL = blue;\r\n this.alphaGL = alpha;\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the color object given.\r\n *\r\n * @method Phaser.Display.Color#setFromRGB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} color - An object containing `r`, `g`, `b` and optionally `a` values in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromRGB: function (color)\r\n {\r\n this._locked = true;\r\n\r\n this.red = color.r;\r\n this.green = color.g;\r\n this.blue = color.b;\r\n\r\n if (color.hasOwnProperty('a'))\r\n {\r\n this.alpha = color.a;\r\n }\r\n\r\n this._locked = false;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Sets the color based on the hue, saturation and lightness values given.\r\n *\r\n * @method Phaser.Display.Color#setFromHSV\r\n * @since 3.13.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n setFromHSV: function (h, s, v)\r\n {\r\n return HSVToRGB(h, s, v, this);\r\n },\r\n\r\n /**\r\n * Updates the internal cache values.\r\n *\r\n * @method Phaser.Display.Color#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n update: function (updateHSV)\r\n {\r\n if (updateHSV === undefined) { updateHSV = false; }\r\n\r\n if (this._locked)\r\n {\r\n return this;\r\n }\r\n\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n var a = this.a;\r\n\r\n this._color = GetColor(r, g, b);\r\n this._color32 = GetColor32(r, g, b, a);\r\n this._rgba = 'rgba(' + r + ',' + g + ',' + b + ',' + (a / 255) + ')';\r\n\r\n if (updateHSV)\r\n {\r\n RGBToHSV(r, g, b, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal hsv cache values.\r\n *\r\n * @method Phaser.Display.Color#updateHSV\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n updateHSV: function ()\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n RGBToHSV(r, g, b, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a new Color component using the values from this one.\r\n *\r\n * @method Phaser.Display.Color#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Display.Color} A new Color object.\r\n */\r\n clone: function ()\r\n {\r\n return new Color(this.r, this.g, this.b, this.a);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be grayscaled based on the shade value given.\r\n *\r\n * @method Phaser.Display.Color#gray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} shade - A value between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n gray: function (shade)\r\n {\r\n return this.setTo(shade, shade, shade);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#random\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n random: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var r = Math.floor(min + Math.random() * (max - min));\r\n var g = Math.floor(min + Math.random() * (max - min));\r\n var b = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * Sets this Color object to be a random grayscale color between the `min` and `max` values given.\r\n *\r\n * @method Phaser.Display.Color#randomGray\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [min=0] - The minimum random color value. Between 0 and 255.\r\n * @param {integer} [max=255] - The maximum random color value. Between 0 and 255.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n randomGray: function (min, max)\r\n {\r\n if (min === undefined) { min = 0; }\r\n if (max === undefined) { max = 255; }\r\n\r\n var s = Math.floor(min + Math.random() * (max - min));\r\n\r\n return this.setTo(s, s, s);\r\n },\r\n\r\n /**\r\n * Increase the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#saturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n saturate: function (amount)\r\n {\r\n this.s += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the saturation of this Color by the percentage amount given.\r\n * The saturation is the amount of the base color in the hue.\r\n *\r\n * @method Phaser.Display.Color#desaturate\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n desaturate: function (amount)\r\n {\r\n this.s -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Increase the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#lighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n lighten: function (amount)\r\n {\r\n this.v += amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decrease the lightness of this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#darken\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n darken: function (amount)\r\n {\r\n this.v -= amount / 100;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brighten this Color by the percentage amount given.\r\n *\r\n * @method Phaser.Display.Color#brighten\r\n * @since 3.13.0\r\n * \r\n * @param {integer} amount - The percentage amount to change this color by. A value between 0 and 100.\r\n *\r\n * @return {Phaser.Display.Color} This Color object.\r\n */\r\n brighten: function (amount)\r\n {\r\n var r = this.r;\r\n var g = this.g;\r\n var b = this.b;\r\n\r\n r = Math.max(0, Math.min(255, r - Math.round(255 * - (amount / 100))));\r\n g = Math.max(0, Math.min(255, g - Math.round(255 * - (amount / 100))));\r\n b = Math.max(0, Math.min(255, b - Math.round(255 * - (amount / 100))));\r\n\r\n return this.setTo(r, g, b);\r\n },\r\n\r\n /**\r\n * The color of this Color component, not including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color: {\r\n\r\n get: function ()\r\n {\r\n return this._color;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component, including the alpha channel.\r\n *\r\n * @name Phaser.Display.Color#color32\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n color32: {\r\n\r\n get: function ()\r\n {\r\n return this._color32;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The color of this Color component as a string which can be used in CSS color values.\r\n *\r\n * @name Phaser.Display.Color#rgba\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n rgba: {\r\n\r\n get: function ()\r\n {\r\n return this._rgba;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#redGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n redGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[0] = Math.min(Math.abs(value), 1);\r\n\r\n this.r = Math.floor(this.gl[0] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#greenGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n greenGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[1] = Math.min(Math.abs(value), 1);\r\n\r\n this.g = Math.floor(this.gl[1] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#blueGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blueGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[2] = Math.min(Math.abs(value), 1);\r\n\r\n this.b = Math.floor(this.gl[2] * 255);\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 1.\r\n *\r\n * @name Phaser.Display.Color#alphaGL\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alphaGL: {\r\n\r\n get: function ()\r\n {\r\n return this.gl[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.gl[3] = Math.min(Math.abs(value), 1);\r\n\r\n this.a = Math.floor(this.gl[3] * 255);\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The red color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#red\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n red: {\r\n\r\n get: function ()\r\n {\r\n return this.r;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.r = Math.min(value, 255);\r\n\r\n this.gl[0] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The green color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#green\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n green: {\r\n\r\n get: function ()\r\n {\r\n return this.g;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.g = Math.min(value, 255);\r\n\r\n this.gl[1] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The blue color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#blue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n blue: {\r\n\r\n get: function ()\r\n {\r\n return this.b;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.b = Math.min(value, 255);\r\n\r\n this.gl[2] = value / 255;\r\n\r\n this.update(true);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha color value, normalized to the range 0 to 255.\r\n *\r\n * @name Phaser.Display.Color#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this.a;\r\n },\r\n\r\n set: function (value)\r\n {\r\n value = Math.floor(Math.abs(value));\r\n\r\n this.a = Math.min(value, 255);\r\n\r\n this.gl[3] = value / 255;\r\n\r\n this.update();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The hue color value. A number between 0 and 1.\r\n * This is the base color.\r\n *\r\n * @name Phaser.Display.Color#h\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n h: {\r\n\r\n get: function ()\r\n {\r\n return this._h;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._h = value;\r\n\r\n HSVToRGB(value, this._s, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The saturation color value. A number between 0 and 1.\r\n * This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n *\r\n * @name Phaser.Display.Color#s\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n s: {\r\n\r\n get: function ()\r\n {\r\n return this._s;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._s = value;\r\n\r\n HSVToRGB(this._h, value, this._v, this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lightness color value. A number between 0 and 1.\r\n * This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n *\r\n * @name Phaser.Display.Color#v\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n v: {\r\n\r\n get: function ()\r\n {\r\n return this._v;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._v = value;\r\n\r\n HSVToRGB(this._h, this._s, value, this);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Color.js?")},"./node_modules/phaser/src/display/color/ColorToRGBA.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts the given color value into an Object containing r,g,b and a properties.\r\n *\r\n * @function Phaser.Display.Color.ColorToRGBA\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - A color value, optionally including the alpha value.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the parsed color values.\r\n */\r\nvar ColorToRGBA = function (color)\r\n{\r\n var output = {\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF,\r\n a: 255\r\n };\r\n\r\n if (color > 16777215)\r\n {\r\n output.a = color >>> 24;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = ColorToRGBA;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ColorToRGBA.js?")},"./node_modules/phaser/src/display/color/ComponentToHex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a string containing a hex representation of the given color component.\r\n *\r\n * @function Phaser.Display.Color.ComponentToHex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} color - The color channel to get the hex value for, must be a value between 0 and 255.\r\n *\r\n * @return {string} A string of length 2 characters, i.e. 255 = ff, 100 = 64.\r\n */\r\nvar ComponentToHex = function (color)\r\n{\r\n var hex = color.toString(16);\r\n\r\n return (hex.length === 1) ? '0' + hex : hex;\r\n};\r\n\r\nmodule.exports = ComponentToHex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ComponentToHex.js?")},"./node_modules/phaser/src/display/color/GetColor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given 3 separate color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor = function (red, green, blue)\r\n{\r\n return red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor.js?")},"./node_modules/phaser/src/display/color/GetColor32.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given an alpha and 3 color values this will return an integer representation of it.\r\n *\r\n * @function Phaser.Display.Color.GetColor32\r\n * @since 3.0.0\r\n *\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} alpha - The alpha color value. A number between 0 and 255.\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar GetColor32 = function (red, green, blue, alpha)\r\n{\r\n return alpha << 24 | red << 16 | green << 8 | blue;\r\n};\r\n\r\nmodule.exports = GetColor32;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/GetColor32.js?")},"./node_modules/phaser/src/display/color/HSLToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\n\n/**\n * Converts HSL (hue, saturation and lightness) values to a Phaser Color object.\n *\n * @function Phaser.Display.Color.HSLToColor\n * @since 3.0.0\n *\n * @param {number} h - The hue value in the range 0 to 1.\n * @param {number} s - The saturation value in the range 0 to 1.\n * @param {number} l - The lightness value in the range 0 to 1.\n *\n * @return {Phaser.Display.Color} A Color object created from the results of the h, s and l values.\n */\nvar HSLToColor = function (h, s, l)\n{\n // achromatic by default\n var r = l;\n var g = l;\n var b = l;\n\n if (s !== 0)\n {\n var q = (l < 0.5) ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n\n r = HueToComponent(p, q, h + 1 / 3);\n g = HueToComponent(p, q, h);\n b = HueToComponent(p, q, h - 1 / 3);\n }\n\n var color = new Color();\n\n return color.setGLTo(r, g, b, 1);\n};\n\nmodule.exports = HSLToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSLToColor.js?')},"./node_modules/phaser/src/display/color/HSVColorWheel.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\n\n/**\n * Get HSV color wheel values in an array which will be 360 elements in size.\n *\n * @function Phaser.Display.Color.HSVColorWheel\n * @since 3.0.0\n *\n * @param {number} [s=1] - The saturation, in the range 0 - 1.\n * @param {number} [v=1] - The value, in the range 0 - 1.\n *\n * @return {Phaser.Types.Display.ColorObject[]} An array containing 360 elements, where each contains a single numeric value corresponding to the color at that point in the HSV color wheel.\n */\nvar HSVColorWheel = function (s, v)\n{\n if (s === undefined) { s = 1; }\n if (v === undefined) { v = 1; }\n\n var colors = [];\n\n for (var c = 0; c <= 359; c++)\n {\n colors.push(HSVToRGB(c / 359, s, v));\n }\n\n return colors;\n};\n\nmodule.exports = HSVColorWheel;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVColorWheel.js?')},"./node_modules/phaser/src/display/color/HSVToRGB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\n\r\n/**\r\n * Converts an HSV (hue, saturation and value) color value to RGB.\r\n * Conversion formula from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes HSV values are contained in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HSVToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {number} h - The hue, in the range 0 - 1. This is the base color.\r\n * @param {number} s - The saturation, in the range 0 - 1. This controls how much of the hue will be in the final color, where 1 is fully saturated and 0 will give you white.\r\n * @param {number} v - The value, in the range 0 - 1. This controls how dark the color is. Where 1 is as bright as possible and 0 is black.\r\n * @param {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} [out] - A Color object to store the results in. If not given a new ColorObject will be created.\r\n *\r\n * @return {(Phaser.Types.Display.ColorObject|Phaser.Display.Color)} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar HSVToRGB = function (h, s, v, out)\r\n{\r\n if (s === undefined) { s = 1; }\r\n if (v === undefined) { v = 1; }\r\n\r\n var i = Math.floor(h * 6);\r\n var f = h * 6 - i;\r\n\r\n var p = Math.floor((v * (1 - s)) * 255);\r\n var q = Math.floor((v * (1 - f * s)) * 255);\r\n var t = Math.floor((v * (1 - (1 - f) * s)) * 255);\r\n\r\n v = Math.floor(v *= 255);\r\n\r\n var r = v;\r\n var g = v;\r\n var b = v;\r\n\r\n var c = i % 6;\r\n\r\n if (c === 0)\r\n {\r\n g = t;\r\n b = p;\r\n }\r\n else if (c === 1)\r\n {\r\n r = q;\r\n b = p;\r\n }\r\n else if (c === 2)\r\n {\r\n r = p;\r\n b = t;\r\n }\r\n else if (c === 3)\r\n {\r\n r = p;\r\n g = q;\r\n }\r\n else if (c === 4)\r\n {\r\n r = t;\r\n g = p;\r\n }\r\n else if (c === 5)\r\n {\r\n g = p;\r\n b = q;\r\n }\r\n\r\n if (!out)\r\n {\r\n return { r: r, g: g, b: b, color: GetColor(r, g, b) };\r\n }\r\n else if (out.setTo)\r\n {\r\n return out.setTo(r, g, b, out.alpha, false);\r\n }\r\n else\r\n {\r\n out.r = r;\r\n out.g = g;\r\n out.b = b;\r\n out.color = GetColor(r, g, b);\r\n\r\n return out;\r\n }\r\n};\r\n\r\nmodule.exports = HSVToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HSVToRGB.js?')},"./node_modules/phaser/src/display/color/HexStringToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts a hex string into a Phaser Color object.\r\n * \r\n * The hex string can supplied as `\'#0033ff\'` or the short-hand format of `\'#03f\'`; it can begin with an optional "#" or "0x", or be unprefixed.\r\n *\r\n * An alpha channel is _not_ supported.\r\n *\r\n * @function Phaser.Display.Color.HexStringToColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} hex - The hex color value to convert, such as `#0033ff` or the short-hand format: `#03f`.\r\n *\r\n * @return {Phaser.Display.Color} A Color object populated by the values of the given string.\r\n */\r\nvar HexStringToColor = function (hex)\r\n{\r\n var color = new Color();\r\n\r\n // Expand shorthand form (e.g. "03F") to full form (e.g. "0033FF")\r\n hex = hex.replace(/^(?:#|0x)?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b)\r\n {\r\n return r + r + g + g + b + b;\r\n });\r\n\r\n var result = (/^(?:#|0x)?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i).exec(hex);\r\n\r\n if (result)\r\n {\r\n var r = parseInt(result[1], 16);\r\n var g = parseInt(result[2], 16);\r\n var b = parseInt(result[3], 16);\r\n\r\n color.setTo(r, g, b);\r\n }\r\n\r\n return color;\r\n};\r\n\r\nmodule.exports = HexStringToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HexStringToColor.js?')},"./node_modules/phaser/src/display/color/HueToComponent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts a hue to an RGB color.\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.HueToComponent\r\n * @since 3.0.0\r\n *\r\n * @param {number} p\r\n * @param {number} q\r\n * @param {number} t\r\n *\r\n * @return {number} The combined color value.\r\n */\r\nvar HueToComponent = function (p, q, t)\r\n{\r\n if (t < 0)\r\n {\r\n t += 1;\r\n }\r\n\r\n if (t > 1)\r\n {\r\n t -= 1;\r\n }\r\n\r\n if (t < 1 / 6)\r\n {\r\n return p + (q - p) * 6 * t;\r\n }\r\n\r\n if (t < 1 / 2)\r\n {\r\n return q;\r\n }\r\n\r\n if (t < 2 / 3)\r\n {\r\n return p + (q - p) * (2 / 3 - t) * 6;\r\n }\r\n\r\n return p;\r\n};\r\n\r\nmodule.exports = HueToComponent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/HueToComponent.js?")},"./node_modules/phaser/src/display/color/IntegerToColor.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\nvar IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\n\n/**\n * Converts the given color value into an instance of a Color object.\n *\n * @function Phaser.Display.Color.IntegerToColor\n * @since 3.0.0\n *\n * @param {integer} input - The color value to convert into a Color object.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar IntegerToColor = function (input)\n{\n var rgb = IntegerToRGB(input);\n\n return new Color(rgb.r, rgb.g, rgb.b, rgb.a);\n};\n\nmodule.exports = IntegerToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToColor.js?')},"./node_modules/phaser/src/display/color/IntegerToRGB.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Return the component parts of a color as an Object with the properties alpha, red, green, blue.\r\n *\r\n * Alpha will only be set if it exists in the given color (0xAARRGGBB)\r\n *\r\n * @function Phaser.Display.Color.IntegerToRGB\r\n * @since 3.0.0\r\n *\r\n * @param {integer} input - The color value to convert into a Color object.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object with the red, green and blue values set in the r, g and b properties.\r\n */\r\nvar IntegerToRGB = function (color)\r\n{\r\n if (color > 16777215)\r\n {\r\n // The color value has an alpha component\r\n return {\r\n a: color >>> 24,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n else\r\n {\r\n return {\r\n a: 255,\r\n r: color >> 16 & 0xFF,\r\n g: color >> 8 & 0xFF,\r\n b: color & 0xFF\r\n };\r\n }\r\n};\r\n\r\nmodule.exports = IntegerToRGB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/IntegerToRGB.js?")},"./node_modules/phaser/src/display/color/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../../math/Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * @namespace Phaser.Display.Color.Interpolate\r\n * @memberof Phaser.Display.Color\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Interpolates between the two given color ranges over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.RGBWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {number} r1 - Red value.\r\n * @param {number} g1 - Blue value.\r\n * @param {number} b1 - Green value.\r\n * @param {number} r2 - Red value.\r\n * @param {number} g2 - Blue value.\r\n * @param {number} b2 - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar RGBWithRGB = function (r1, g1, b1, r2, g2, b2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n var t = index / length;\r\n\r\n return {\r\n r: Linear(r1, r2, t),\r\n g: Linear(g1, g2, t),\r\n b: Linear(b1, b2, t)\r\n };\r\n};\r\n\r\n/**\r\n * Interpolates between the two given color objects over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithColor\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {Phaser.Display.Color} color2 - The second Color object.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithColor = function (color1, color2, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color1.r, color1.g, color1.b, color2.r, color2.g, color2.b, length, index);\r\n};\r\n\r\n/**\r\n * Interpolates between the Color object and color values over the length supplied.\r\n *\r\n * @function Phaser.Display.Color.Interpolate.ColorWithRGB\r\n * @memberof Phaser.Display.Color.Interpolate\r\n * @static\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Display.Color} color1 - The first Color object.\r\n * @param {number} r - Red value.\r\n * @param {number} g - Blue value.\r\n * @param {number} b - Green value.\r\n * @param {number} [length=100] - Distance to interpolate over.\r\n * @param {number} [index=0] - Index to start from.\r\n *\r\n * @return {Phaser.Types.Display.ColorObject} An object containing the interpolated color values.\r\n */\r\nvar ColorWithRGB = function (color, r, g, b, length, index)\r\n{\r\n if (length === undefined) { length = 100; }\r\n if (index === undefined) { index = 0; }\r\n\r\n return RGBWithRGB(color.r, color.g, color.b, r, g, b, length, index);\r\n};\r\n\r\nmodule.exports = {\r\n\r\n RGBWithRGB: RGBWithRGB,\r\n ColorWithRGB: ColorWithRGB,\r\n ColorWithColor: ColorWithColor\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/Interpolate.js?')},"./node_modules/phaser/src/display/color/ObjectToColor.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\n/**\r\n * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance.\r\n *\r\n * @function Phaser.Display.Color.ObjectToColor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Display.InputColorObject} input - An object containing `r`, `g`, `b` and `a` properties in the range 0 to 255.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ObjectToColor = function (input)\r\n{\r\n return new Color(input.r, input.g, input.b, input.a);\r\n};\r\n\r\nmodule.exports = ObjectToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ObjectToColor.js?')},"./node_modules/phaser/src/display/color/RGBStringToColor.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Color = __webpack_require__(/*! ./Color */ \"./node_modules/phaser/src/display/color/Color.js\");\n\n/**\n * Converts a CSS 'web' string into a Phaser Color object.\n * \n * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].\n *\n * @function Phaser.Display.Color.RGBStringToColor\n * @since 3.0.0\n *\n * @param {string} rgb - The CSS format color string, using the `rgb` or `rgba` format.\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RGBStringToColor = function (rgb)\n{\n var color = new Color();\n\n var result = (/^rgba?\\(\\s*(\\d+)\\s*,\\s*(\\d+)\\s*,\\s*(\\d+)\\s*(?:,\\s*(\\d+(?:\\.\\d+)?))?\\s*\\)$/).exec(rgb.toLowerCase());\n\n if (result)\n {\n var r = parseInt(result[1], 10);\n var g = parseInt(result[2], 10);\n var b = parseInt(result[3], 10);\n var a = (result[4] !== undefined) ? parseFloat(result[4]) : 1;\n\n color.setTo(r, g, b, a * 255);\n }\n\n return color;\n};\n\nmodule.exports = RGBStringToColor;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBStringToColor.js?")},"./node_modules/phaser/src/display/color/RGBToHSV.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts an RGB color value to HSV (hue, saturation and value).\r\n * Conversion forumla from http://en.wikipedia.org/wiki/HSL_color_space.\r\n * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].\r\n * Based on code by Michael Jackson (https://github.com/mjijackson)\r\n *\r\n * @function Phaser.Display.Color.RGBToHSV\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} [out] - An object to store the color values in. If not given an HSV Color Object will be created.\r\n *\r\n * @return {(Phaser.Types.Display.HSVColorObject|Phaser.Display.Color)} An object with the properties `h`, `s` and `v` set.\r\n */\r\nvar RGBToHSV = function (r, g, b, out)\r\n{\r\n if (out === undefined) { out = { h: 0, s: 0, v: 0 }; }\r\n\r\n r /= 255;\r\n g /= 255;\r\n b /= 255;\r\n\r\n var min = Math.min(r, g, b);\r\n var max = Math.max(r, g, b);\r\n var d = max - min;\r\n\r\n // achromatic by default\r\n var h = 0;\r\n var s = (max === 0) ? 0 : d / max;\r\n var v = max;\r\n\r\n if (max !== min)\r\n {\r\n if (max === r)\r\n {\r\n h = (g - b) / d + ((g < b) ? 6 : 0);\r\n }\r\n else if (max === g)\r\n {\r\n h = (b - r) / d + 2;\r\n }\r\n else if (max === b)\r\n {\r\n h = (r - g) / d + 4;\r\n }\r\n\r\n h /= 6;\r\n }\r\n\r\n if (out.hasOwnProperty('_h'))\r\n {\r\n out._h = h;\r\n out._s = s;\r\n out._v = v;\r\n }\r\n else\r\n {\r\n out.h = h;\r\n out.s = s;\r\n out.v = v;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RGBToHSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToHSV.js?")},"./node_modules/phaser/src/display/color/RGBToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ \"./node_modules/phaser/src/display/color/ComponentToHex.js\");\r\n\r\n/**\r\n * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`.\r\n *\r\n * @function Phaser.Display.Color.RGBToString\r\n * @since 3.0.0\r\n *\r\n * @param {integer} r - The red color value. A number between 0 and 255.\r\n * @param {integer} g - The green color value. A number between 0 and 255.\r\n * @param {integer} b - The blue color value. A number between 0 and 255.\r\n * @param {integer} [a=255] - The alpha value. A number between 0 and 255.\r\n * @param {string} [prefix=#] - The prefix of the string. Either `#` or `0x`.\r\n *\r\n * @return {string} A string-based representation of the color values.\r\n */\r\nvar RGBToString = function (r, g, b, a, prefix)\r\n{\r\n if (a === undefined) { a = 255; }\r\n if (prefix === undefined) { prefix = '#'; }\r\n\r\n if (prefix === '#')\r\n {\r\n return '#' + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\r\n }\r\n else\r\n {\r\n return '0x' + ComponentToHex(a) + ComponentToHex(r) + ComponentToHex(g) + ComponentToHex(b);\r\n }\r\n};\r\n\r\nmodule.exports = RGBToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RGBToString.js?")},"./node_modules/phaser/src/display/color/RandomRGB.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\n\n/**\n * Creates a new Color object where the r, g, and b values have been set to random values\n * based on the given min max values.\n *\n * @function Phaser.Display.Color.RandomRGB\n * @since 3.0.0\n *\n * @param {integer} [min=0] - The minimum value to set the random range from (between 0 and 255)\n * @param {integer} [max=255] - The maximum value to set the random range from (between 0 and 255)\n *\n * @return {Phaser.Display.Color} A Color object.\n */\nvar RandomRGB = function (min, max)\n{\n if (min === undefined) { min = 0; }\n if (max === undefined) { max = 255; }\n\n return new Color(Between(min, max), Between(min, max), Between(min, max));\n};\n\nmodule.exports = RandomRGB;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/RandomRGB.js?')},"./node_modules/phaser/src/display/color/ValueToColor.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ \"./node_modules/phaser/src/display/color/HexStringToColor.js\");\r\nvar IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ \"./node_modules/phaser/src/display/color/IntegerToColor.js\");\r\nvar ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ \"./node_modules/phaser/src/display/color/ObjectToColor.js\");\r\nvar RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ \"./node_modules/phaser/src/display/color/RGBStringToColor.js\");\r\n\r\n/**\r\n * Converts the given source color value into an instance of a Color class.\r\n * The value can be either a string, prefixed with `rgb` or a hex string, a number or an Object.\r\n *\r\n * @function Phaser.Display.Color.ValueToColor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|number|Phaser.Types.Display.InputColorObject)} input - The source color value to convert.\r\n *\r\n * @return {Phaser.Display.Color} A Color object.\r\n */\r\nvar ValueToColor = function (input)\r\n{\r\n var t = typeof input;\r\n\r\n switch (t)\r\n {\r\n case 'string':\r\n\r\n if (input.substr(0, 3).toLowerCase() === 'rgb')\r\n {\r\n return RGBStringToColor(input);\r\n }\r\n else\r\n {\r\n return HexStringToColor(input);\r\n }\r\n\r\n case 'number':\r\n\r\n return IntegerToColor(input);\r\n\r\n case 'object':\r\n\r\n return ObjectToColor(input);\r\n }\r\n};\r\n\r\nmodule.exports = ValueToColor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/ValueToColor.js?")},"./node_modules/phaser/src/display/color/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Color = __webpack_require__(/*! ./Color */ "./node_modules/phaser/src/display/color/Color.js");\r\n\r\nColor.ColorToRGBA = __webpack_require__(/*! ./ColorToRGBA */ "./node_modules/phaser/src/display/color/ColorToRGBA.js");\r\nColor.ComponentToHex = __webpack_require__(/*! ./ComponentToHex */ "./node_modules/phaser/src/display/color/ComponentToHex.js");\r\nColor.GetColor = __webpack_require__(/*! ./GetColor */ "./node_modules/phaser/src/display/color/GetColor.js");\r\nColor.GetColor32 = __webpack_require__(/*! ./GetColor32 */ "./node_modules/phaser/src/display/color/GetColor32.js");\r\nColor.HexStringToColor = __webpack_require__(/*! ./HexStringToColor */ "./node_modules/phaser/src/display/color/HexStringToColor.js");\r\nColor.HSLToColor = __webpack_require__(/*! ./HSLToColor */ "./node_modules/phaser/src/display/color/HSLToColor.js");\r\nColor.HSVColorWheel = __webpack_require__(/*! ./HSVColorWheel */ "./node_modules/phaser/src/display/color/HSVColorWheel.js");\r\nColor.HSVToRGB = __webpack_require__(/*! ./HSVToRGB */ "./node_modules/phaser/src/display/color/HSVToRGB.js");\r\nColor.HueToComponent = __webpack_require__(/*! ./HueToComponent */ "./node_modules/phaser/src/display/color/HueToComponent.js");\r\nColor.IntegerToColor = __webpack_require__(/*! ./IntegerToColor */ "./node_modules/phaser/src/display/color/IntegerToColor.js");\r\nColor.IntegerToRGB = __webpack_require__(/*! ./IntegerToRGB */ "./node_modules/phaser/src/display/color/IntegerToRGB.js");\r\nColor.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/display/color/Interpolate.js");\r\nColor.ObjectToColor = __webpack_require__(/*! ./ObjectToColor */ "./node_modules/phaser/src/display/color/ObjectToColor.js");\r\nColor.RandomRGB = __webpack_require__(/*! ./RandomRGB */ "./node_modules/phaser/src/display/color/RandomRGB.js");\r\nColor.RGBStringToColor = __webpack_require__(/*! ./RGBStringToColor */ "./node_modules/phaser/src/display/color/RGBStringToColor.js");\r\nColor.RGBToHSV = __webpack_require__(/*! ./RGBToHSV */ "./node_modules/phaser/src/display/color/RGBToHSV.js");\r\nColor.RGBToString = __webpack_require__(/*! ./RGBToString */ "./node_modules/phaser/src/display/color/RGBToString.js");\r\nColor.ValueToColor = __webpack_require__(/*! ./ValueToColor */ "./node_modules/phaser/src/display/color/ValueToColor.js");\r\n\r\nmodule.exports = Color;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/color/index.js?')},"./node_modules/phaser/src/display/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Align: __webpack_require__(/*! ./align */ "./node_modules/phaser/src/display/align/index.js"),\r\n BaseShader: __webpack_require__(/*! ./shader/BaseShader */ "./node_modules/phaser/src/display/shader/BaseShader.js"),\r\n Bounds: __webpack_require__(/*! ./bounds */ "./node_modules/phaser/src/display/bounds/index.js"),\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/display/canvas/index.js"),\r\n Color: __webpack_require__(/*! ./color */ "./node_modules/phaser/src/display/color/index.js"),\r\n Masks: __webpack_require__(/*! ./mask */ "./node_modules/phaser/src/display/mask/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/index.js?')},"./node_modules/phaser/src/display/mask/BitmapMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Bitmap Mask combines the alpha (opacity) of a masked pixel with the alpha of another pixel.\r\n * Unlike the Geometry Mask, which is a clipping path, a Bitmap Mask behaves like an alpha mask,\r\n * not a clipping path. It is only available when using the WebGL Renderer.\r\n *\r\n * A Bitmap Mask can use any Game Object to determine the alpha of each pixel of the masked Game Object(s).\r\n * For any given point of a masked Game Object's texture, the pixel's alpha will be multiplied by the alpha\r\n * of the pixel at the same position in the Bitmap Mask's Game Object. The color of the pixel from the\r\n * Bitmap Mask doesn't matter.\r\n *\r\n * For example, if a pure blue pixel with an alpha of 0.95 is masked with a pure red pixel with an\r\n * alpha of 0.5, the resulting pixel will be pure blue with an alpha of 0.475. Naturally, this means\r\n * that a pixel in the mask with an alpha of 0 will hide the corresponding pixel in all masked Game Objects\r\n * A pixel with an alpha of 1 in the masked Game Object will receive the same alpha as the\r\n * corresponding pixel in the mask.\r\n *\r\n * The Bitmap Mask's location matches the location of its Game Object, not the location of the\r\n * masked objects. Moving or transforming the underlying Game Object will change the mask\r\n * (and affect the visibility of any masked objects), whereas moving or transforming a masked object\r\n * will not affect the mask.\r\n *\r\n * The Bitmap Mask will not render its Game Object by itself. If the Game Object is not in a\r\n * Scene's display list, it will only be used for the mask and its full texture will not be directly\r\n * visible. Adding the underlying Game Object to a Scene will not cause any problems - it will\r\n * render as a normal Game Object and will also serve as a mask.\r\n *\r\n * @class BitmapMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which this Bitmap Mask will be used in.\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\nvar BitmapMask = new Class({\r\n\r\n initialize:\r\n\r\n function BitmapMask (scene, renderable)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Mask is using.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.11.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#bitmapMask\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.bitmapMask = renderable;\r\n\r\n /**\r\n * The texture used for the mask's framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.maskTexture = null;\r\n\r\n /**\r\n * The texture used for the main framebuffer.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.mainTexture = null;\r\n\r\n /**\r\n * Whether the Bitmap Mask is dirty and needs to be updated.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#dirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.dirty = true;\r\n\r\n /**\r\n * The framebuffer to which a masked Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#mainFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.mainFramebuffer = null;\r\n\r\n /**\r\n * The framebuffer to which the Bitmap Mask's masking Game Object is rendered.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#maskFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.0.0\r\n */\r\n this.maskFramebuffer = null;\r\n\r\n /**\r\n * The previous framebuffer set in the renderer before this one was enabled.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#prevFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @since 3.17.0\r\n */\r\n this.prevFramebuffer = null;\r\n\r\n /**\r\n * Whether to invert the masks alpha.\r\n *\r\n * If `true`, the alpha of the masking pixel will be inverted before it's multiplied with the masked pixel. Essentially, this means that a masked area will be visible only if the corresponding area in the mask is invisible.\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.1.2\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.BitmapMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = false;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var width = renderer.width;\r\n var height = renderer.height;\r\n var pot = ((width & (width - 1)) === 0 && (height & (height - 1)) === 0);\r\n var gl = renderer.gl;\r\n var wrap = pot ? gl.REPEAT : gl.CLAMP_TO_EDGE;\r\n var filter = gl.LINEAR;\r\n\r\n this.mainTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.maskTexture = renderer.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n this.mainFramebuffer = renderer.createFramebuffer(width, height, this.mainTexture, true);\r\n this.maskFramebuffer = renderer.createFramebuffer(width, height, this.maskTexture, true);\r\n\r\n }, this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a new masking Game Object for the Bitmap Mask.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#setBitmap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} renderable - A renderable Game Object that uses a texture, such as a Sprite.\r\n */\r\n setBitmap: function (renderable)\r\n {\r\n this.bitmapMask = renderable;\r\n },\r\n\r\n /**\r\n * Prepares the WebGL Renderer to render a Game Object with this mask applied.\r\n *\r\n * This renders the masking Game Object to the mask framebuffer and switches to the main framebuffer so that the masked Game Object will be rendered to it instead of being rendered directly to the frame.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to prepare.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - The masked Game Object which will be drawn.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderWebGL: function (renderer, maskedObject, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.beginMask(this, maskedObject, camera);\r\n },\r\n\r\n /**\r\n * Finalizes rendering of a masked Game Object.\r\n *\r\n * This resets the previously bound framebuffer and switches the WebGL Renderer to the Bitmap Mask Pipeline, which uses a special fragment shader to apply the masking effect.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The WebGL Renderer to clean up.\r\n */\r\n postRenderWebGL: function (renderer, camera)\r\n {\r\n renderer.pipelines.BitmapMaskPipeline.endMask(this, camera);\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n * @param {Phaser.GameObjects.GameObject} mask - The masked Game Object which would be rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.\r\n */\r\n preRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * This is a NOOP method. Bitmap Masks are not supported by the Canvas Renderer.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Canvas Renderer which would be rendered to.\r\n */\r\n postRenderCanvas: function ()\r\n {\r\n // NOOP\r\n },\r\n\r\n /**\r\n * Destroys this BitmapMask and nulls any references it holds.\r\n * \r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.BitmapMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.bitmapMask = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer && renderer.gl)\r\n {\r\n renderer.deleteTexture(this.mainTexture);\r\n renderer.deleteTexture(this.maskTexture);\r\n renderer.deleteFramebuffer(this.mainFramebuffer);\r\n renderer.deleteFramebuffer(this.maskFramebuffer);\r\n }\r\n\r\n this.mainTexture = null;\r\n this.maskTexture = null;\r\n this.mainFramebuffer = null;\r\n this.maskFramebuffer = null;\r\n this.prevFramebuffer = null;\r\n this.renderer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/BitmapMask.js?")},"./node_modules/phaser/src/display/mask/GeometryMask.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Geometry Mask can be applied to a Game Object to hide any pixels of it which don't intersect\r\n * a visible pixel from the geometry mask. The mask is essentially a clipping path which can only\r\n * make a masked pixel fully visible or fully invisible without changing its alpha (opacity).\r\n *\r\n * A Geometry Mask uses a Graphics Game Object to determine which pixels of the masked Game Object(s)\r\n * should be clipped. For any given point of a masked Game Object's texture, the pixel will only be displayed\r\n * if the Graphics Game Object of the Geometry Mask has a visible pixel at the same position. The color and\r\n * alpha of the pixel from the Geometry Mask do not matter.\r\n *\r\n * The Geometry Mask's location matches the location of its Graphics object, not the location of the masked objects.\r\n * Moving or transforming the underlying Graphics object will change the mask (and affect the visibility\r\n * of any masked objects), whereas moving or transforming a masked object will not affect the mask.\r\n * You can think of the Geometry Mask (or rather, of its Graphics object) as an invisible curtain placed\r\n * in front of all masked objects which has its own visual properties and, naturally, respects the camera's\r\n * visual properties, but isn't affected by and doesn't follow the masked objects by itself.\r\n *\r\n * @class GeometryMask\r\n * @memberof Phaser.Display.Masks\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - This parameter is not used.\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics Game Object to use for the Geometry Mask. Doesn't have to be in the Display List.\r\n */\r\nvar GeometryMask = new Class({\r\n\r\n initialize:\r\n\r\n function GeometryMask (scene, graphicsGeometry)\r\n {\r\n /**\r\n * The Graphics object which describes the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#geometryMask\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.geometryMask = graphicsGeometry;\r\n\r\n /**\r\n * Similar to the BitmapMasks invertAlpha setting this to true will then hide all pixels\r\n * drawn to the Geometry Mask.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#invertAlpha\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.invertAlpha = false;\r\n\r\n /**\r\n * Is this mask a stencil mask?\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#isStencil\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.isStencil = true;\r\n\r\n /**\r\n * The current stencil level.\r\n *\r\n * @name Phaser.Display.Masks.GeometryMask#level\r\n * @type {boolean}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.level = 0;\r\n },\r\n\r\n /**\r\n * Sets a new Graphics object for the Geometry Mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphicsGeometry - The Graphics object which will be used for the Geometry Mask.\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setShape: function (graphicsGeometry)\r\n {\r\n this.geometryMask = graphicsGeometry;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `invertAlpha` property of this Geometry Mask.\r\n * Inverting the alpha essentially flips the way the mask works.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#setInvertAlpha\r\n * @since 3.17.0\r\n *\r\n * @param {boolean} [value=true] - Invert the alpha of this mask?\r\n * \r\n * @return {this} This Geometry Mask\r\n */\r\n setInvertAlpha: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.invertAlpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Renders the Geometry Mask's underlying Graphics object to the OpenGL stencil buffer and enables the stencil test, which clips rendered pixels according to the mask.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderWebGL: function (renderer, child, camera)\r\n {\r\n var gl = renderer.gl;\r\n\r\n // Force flushing before drawing to stencil buffer\r\n renderer.flush();\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n gl.clear(gl.STENCIL_BUFFER_BIT);\r\n\r\n renderer.maskCount = 0;\r\n }\r\n\r\n if (renderer.currentCameraMask.mask !== this)\r\n {\r\n renderer.currentMask.mask = this;\r\n }\r\n\r\n renderer.maskStack.push({ mask: this, camera: camera });\r\n\r\n this.applyStencil(renderer, camera, true);\r\n\r\n renderer.maskCount++;\r\n },\r\n\r\n /**\r\n * Applies the current stencil mask to the renderer.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#applyStencil\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw to.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n * @param {boolean} inc - Is this an INCR stencil or a DECR stencil?\r\n */\r\n applyStencil: function (renderer, camera, inc)\r\n {\r\n var gl = renderer.gl;\r\n var geometryMask = this.geometryMask;\r\n var level = renderer.maskCount;\r\n\r\n gl.colorMask(false, false, false, false);\r\n\r\n if (inc)\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.INCR);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.DECR);\r\n }\r\n\r\n // Write stencil buffer\r\n geometryMask.renderWebGL(renderer, geometryMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n gl.colorMask(true, true, true, true);\r\n gl.stencilOp(gl.KEEP, gl.KEEP, gl.KEEP);\r\n\r\n if (inc)\r\n {\r\n if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level + 1, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level + 1, 0xFF);\r\n }\r\n }\r\n else if (this.invertAlpha)\r\n {\r\n gl.stencilFunc(gl.NOTEQUAL, level, 0xFF);\r\n }\r\n else\r\n {\r\n gl.stencilFunc(gl.EQUAL, level, 0xFF);\r\n }\r\n },\r\n\r\n /**\r\n * Flushes all rendered pixels and disables the stencil test of a WebGL context, thus disabling the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderWebGL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer instance to draw flush.\r\n */\r\n postRenderWebGL: function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n renderer.maskStack.pop();\r\n\r\n renderer.maskCount--;\r\n\r\n if (renderer.maskStack.length === 0)\r\n {\r\n // If this is the only mask in the stack, flush and disable\r\n renderer.flush();\r\n\r\n renderer.currentMask.mask = null;\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n }\r\n else\r\n {\r\n // Force flush before disabling stencil test\r\n renderer.flush();\r\n\r\n var prev = renderer.maskStack[renderer.maskStack.length - 1];\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, false);\r\n\r\n if (renderer.currentCameraMask.mask !== prev.mask)\r\n {\r\n renderer.currentMask.mask = prev.mask;\r\n renderer.currentMask.camera = prev.camera;\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the clipping path of a 2D canvas context to the Geometry Mask's underlying Graphics object.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#preRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance to set the clipping path on.\r\n * @param {Phaser.GameObjects.GameObject} mask - The Game Object being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the Game Object is being rendered through.\r\n */\r\n preRenderCanvas: function (renderer, mask, camera)\r\n {\r\n var geometryMask = this.geometryMask;\r\n\r\n renderer.currentContext.save();\r\n\r\n geometryMask.renderCanvas(renderer, geometryMask, 0, camera, null, null, true);\r\n\r\n renderer.currentContext.clip();\r\n },\r\n\r\n /**\r\n * Restore the canvas context's previous clipping path, thus turning off the mask for it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#postRenderCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - The Canvas Renderer instance being restored.\r\n */\r\n postRenderCanvas: function (renderer)\r\n {\r\n renderer.currentContext.restore();\r\n },\r\n\r\n /**\r\n * Destroys this GeometryMask and nulls any references it holds.\r\n *\r\n * Note that if a Game Object is currently using this mask it will _not_ automatically detect you have destroyed it,\r\n * so be sure to call `clearMask` on any Game Object using it, before destroying it.\r\n *\r\n * @method Phaser.Display.Masks.GeometryMask#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.geometryMask = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GeometryMask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/GeometryMask.js?")},"./node_modules/phaser/src/display/mask/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Display.Masks\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMask: __webpack_require__(/*! ./BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js"),\r\n GeometryMask: __webpack_require__(/*! ./GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/mask/index.js?')},"./node_modules/phaser/src/display/shader/BaseShader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A BaseShader is a small resource class that contains the data required for a WebGL Shader to be created.\r\n * \r\n * It contains the raw source code to the fragment and vertex shader, as well as an object that defines\r\n * the uniforms the shader requires, if any.\r\n * \r\n * BaseShaders are stored in the Shader Cache, available in a Scene via `this.cache.shaders` and are referenced\r\n * by a unique key-based string. Retrieve them via `this.cache.shaders.get(key)`.\r\n * \r\n * BaseShaders are created automatically by the GLSL File Loader when loading an external shader resource.\r\n * They can also be created at runtime, allowing you to use dynamically generated shader source code.\r\n * \r\n * Default fragment and vertex source is used if not provided in the constructor, setting-up a basic shader,\r\n * suitable for debug rendering.\r\n *\r\n * @class BaseShader\r\n * @memberof Phaser.Display\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key of this shader. Must be unique within the shader cache.\r\n * @param {string} [fragmentSrc] - The fragment source for the shader.\r\n * @param {string} [vertexSrc] - The vertex source for the shader.\r\n * @param {any} [uniforms] - Optional object defining the uniforms the shader uses.\r\n */\r\nvar BaseShader = new Class({\r\n\r\n initialize:\r\n\r\n function BaseShader (key, fragmentSrc, vertexSrc, uniforms)\r\n {\r\n if (!fragmentSrc || fragmentSrc === '')\r\n {\r\n fragmentSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform vec2 resolution;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n ' vec2 uv = fragCoord / resolution.xy;',\r\n ' gl_FragColor = vec4(uv.xyx, 1.0);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (!vertexSrc || vertexSrc === '')\r\n {\r\n vertexSrc = [\r\n 'precision mediump float;',\r\n\r\n 'uniform mat4 uProjectionMatrix;',\r\n 'uniform mat4 uViewMatrix;',\r\n 'uniform vec2 uResolution;',\r\n\r\n 'attribute vec2 inPosition;',\r\n\r\n 'varying vec2 fragCoord;',\r\n\r\n 'void main () {',\r\n 'gl_Position = uProjectionMatrix * uViewMatrix * vec4(inPosition, 1.0, 1.0);',\r\n 'fragCoord = vec2(inPosition.x, uResolution.y - inPosition.y);',\r\n '}'\r\n ].join('\\n');\r\n }\r\n\r\n if (uniforms === undefined) { uniforms = null; }\r\n\r\n /**\r\n * The key of this shader, unique within the shader cache of this Phaser game instance.\r\n *\r\n * @name Phaser.Display.BaseShader#key\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * The source code, as a string, of the fragment shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#fragmentSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.fragmentSrc = fragmentSrc;\r\n\r\n /**\r\n * The source code, as a string, of the vertex shader being used.\r\n *\r\n * @name Phaser.Display.BaseShader#vertexSrc\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.vertexSrc = vertexSrc;\r\n\r\n /**\r\n * The default uniforms for this shader.\r\n *\r\n * @name Phaser.Display.BaseShader#uniforms\r\n * @type {?any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = uniforms;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseShader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/display/shader/BaseShader.js?")},"./node_modules/phaser/src/dom/AddToDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given element to the DOM. If a parent is provided the element is added as a child of the parent, providing it was able to access it.\r\n * If no parent was given it falls back to using `document.body`.\r\n *\r\n * @function Phaser.DOM.AddToDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The element to be added to the DOM. Usually a Canvas object.\r\n * @param {(string|HTMLElement)} [parent] - The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.\r\n *\r\n * @return {HTMLElement} The element that was added to the DOM.\r\n */\r\nvar AddToDOM = function (element, parent)\r\n{\r\n var target;\r\n\r\n if (parent)\r\n {\r\n if (typeof parent === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(parent);\r\n }\r\n else if (typeof parent === 'object' && parent.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = parent;\r\n }\r\n }\r\n else if (element.parentElement)\r\n {\r\n return element;\r\n }\r\n\r\n // Fallback, covers an invalid ID and a non HTMLElement object\r\n if (!target)\r\n {\r\n target = document.body;\r\n }\r\n\r\n target.appendChild(element);\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = AddToDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/AddToDOM.js?")},"./node_modules/phaser/src/dom/CreateDOMContainer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\n\r\nvar CreateDOMContainer = function (game)\r\n{\r\n var config = game.config;\r\n\r\n if (!config.parent || !config.domCreateContainer)\r\n {\r\n return;\r\n }\r\n\r\n // DOM Element Container\r\n var div = document.createElement('div');\r\n\r\n div.style.cssText = [\r\n 'display: block;',\r\n 'width: ' + game.scale.width + 'px;',\r\n 'height: ' + game.scale.height + 'px;',\r\n 'padding: 0; margin: 0;',\r\n 'position: absolute;',\r\n 'overflow: hidden;',\r\n 'pointer-events: none;',\r\n 'transform: scale(1);',\r\n 'transform-origin: left top;'\r\n ].join(' ');\r\n\r\n game.domContainer = div;\r\n\r\n AddToDOM(div, config.parent);\r\n};\r\n\r\nmodule.exports = CreateDOMContainer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/CreateDOMContainer.js?")},"./node_modules/phaser/src/dom/DOMContentLoaded.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar OS = __webpack_require__(/*! ../device/OS */ \"./node_modules/phaser/src/device/OS.js\");\r\n\r\n/**\r\n * @callback ContentLoadedCallback\r\n */\r\n\r\n/**\r\n * Inspects the readyState of the document. If the document is already complete then it invokes the given callback.\r\n * If not complete it sets up several event listeners such as `deviceready`, and once those fire, it invokes the callback.\r\n * Called automatically by the Phaser.Game instance. Should not usually be accessed directly.\r\n *\r\n * @function Phaser.DOM.DOMContentLoaded\r\n * @since 3.0.0\r\n *\r\n * @param {ContentLoadedCallback} callback - The callback to be invoked when the device is ready and the DOM content is loaded.\r\n */\r\nvar DOMContentLoaded = function (callback)\r\n{\r\n if (document.readyState === 'complete' || document.readyState === 'interactive')\r\n {\r\n callback();\r\n\r\n return;\r\n }\r\n\r\n var check = function ()\r\n {\r\n document.removeEventListener('deviceready', check, true);\r\n document.removeEventListener('DOMContentLoaded', check, true);\r\n window.removeEventListener('load', check, true);\r\n\r\n callback();\r\n };\r\n\r\n if (!document.body)\r\n {\r\n window.setTimeout(check, 20);\r\n }\r\n else if (OS.cordova)\r\n {\r\n // Ref. http://docs.phonegap.com/en/3.5.0/cordova_events_events.md.html#deviceready\r\n document.addEventListener('deviceready', check, false);\r\n }\r\n else\r\n {\r\n document.addEventListener('DOMContentLoaded', check, true);\r\n window.addEventListener('load', check, true);\r\n }\r\n};\r\n\r\nmodule.exports = DOMContentLoaded;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/DOMContentLoaded.js?")},"./node_modules/phaser/src/dom/GetInnerHeight.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to determine the document inner height across iOS and standard devices.\r\n * Based on code by @tylerjpeterson\r\n *\r\n * @function Phaser.DOM.GetInnerHeight\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} iOS - Is this running on iOS?\r\n *\r\n * @return {number} The inner height value.\r\n */\r\nvar GetInnerHeight = function (iOS)\r\n{\r\n\r\n if (!iOS)\r\n {\r\n return window.innerHeight;\r\n }\r\n\r\n var axis = Math.abs(window.orientation);\r\n\r\n var size = { w: 0, h: 0 };\r\n \r\n var ruler = document.createElement('div');\r\n\r\n ruler.setAttribute('style', 'position: fixed; height: 100vh; width: 0; top: 0');\r\n\r\n document.documentElement.appendChild(ruler);\r\n\r\n size.w = (axis === 90) ? ruler.offsetHeight : window.innerWidth;\r\n size.h = (axis === 90) ? window.innerWidth : ruler.offsetHeight;\r\n\r\n document.documentElement.removeChild(ruler);\r\n\r\n ruler = null;\r\n\r\n if (Math.abs(window.orientation) !== 90)\r\n {\r\n return size.h;\r\n }\r\n else\r\n {\r\n return size.w;\r\n }\r\n};\r\n\r\nmodule.exports = GetInnerHeight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetInnerHeight.js?")},"./node_modules/phaser/src/dom/GetScreenOrientation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../scale/const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\n\r\n/**\r\n * Attempts to determine the screen orientation using the Orientation API.\r\n *\r\n * @function Phaser.DOM.GetScreenOrientation\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The width of the viewport.\r\n * @param {number} height - The height of the viewport.\r\n *\r\n * @return {string} The orientation.\r\n */\r\nvar GetScreenOrientation = function (width, height)\r\n{\r\n var screen = window.screen;\r\n var orientation = (screen) ? screen.orientation || screen.mozOrientation || screen.msOrientation : false;\r\n\r\n if (orientation && typeof orientation.type === 'string')\r\n {\r\n // Screen Orientation API specification\r\n return orientation.type;\r\n }\r\n else if (typeof orientation === 'string')\r\n {\r\n // moz / ms-orientation are strings\r\n return orientation;\r\n }\r\n\r\n if (screen)\r\n {\r\n return (screen.height > screen.width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (typeof window.orientation === 'number')\r\n {\r\n // This may change by device based on \"natural\" orientation.\r\n return (window.orientation === 0 || window.orientation === 180) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n }\r\n else if (window.matchMedia)\r\n {\r\n if (window.matchMedia('(orientation: portrait)').matches)\r\n {\r\n return CONST.PORTRAIT;\r\n }\r\n else if (window.matchMedia('(orientation: landscape)').matches)\r\n {\r\n return CONST.LANDSCAPE;\r\n }\r\n }\r\n \r\n return (height > width) ? CONST.PORTRAIT : CONST.LANDSCAPE;\r\n};\r\n\r\nmodule.exports = GetScreenOrientation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetScreenOrientation.js?")},"./node_modules/phaser/src/dom/GetTarget.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to get the target DOM element based on the given value, which can be either\r\n * a string, in which case it will be looked-up by ID, or an element node. If nothing\r\n * can be found it will return a reference to the document.body.\r\n *\r\n * @function Phaser.DOM.GetTarget\r\n * @since 3.16.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to look-up.\r\n */\r\nvar GetTarget = function (element)\r\n{\r\n var target;\r\n\r\n if (element !== '')\r\n {\r\n if (typeof element === 'string')\r\n {\r\n // Hopefully an element ID\r\n target = document.getElementById(element);\r\n }\r\n else if (element && element.nodeType === 1)\r\n {\r\n // Quick test for a HTMLElement\r\n target = element;\r\n }\r\n }\r\n\r\n // Fallback to the document body. Covers an invalid ID and a non HTMLElement object.\r\n if (!target)\r\n {\r\n // Use the full window\r\n target = document.body;\r\n }\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = GetTarget;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/GetTarget.js?")},"./node_modules/phaser/src/dom/ParseXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given data string and parses it as XML.\r\n * First tries to use the window.DOMParser and reverts to the Microsoft.XMLDOM if that fails.\r\n * The parsed XML object is returned, or `null` if there was an error while parsing the data.\r\n *\r\n * @function Phaser.DOM.ParseXML\r\n * @since 3.0.0\r\n *\r\n * @param {string} data - The XML source stored in a string.\r\n *\r\n * @return {?(DOMParser|ActiveXObject)} The parsed XML data, or `null` if the data could not be parsed.\r\n */\r\nvar ParseXML = function (data)\r\n{\r\n var xml = '';\r\n\r\n try\r\n {\r\n if (window['DOMParser'])\r\n {\r\n var domparser = new DOMParser();\r\n xml = domparser.parseFromString(data, 'text/xml');\r\n }\r\n else\r\n {\r\n xml = new ActiveXObject('Microsoft.XMLDOM');\r\n xml.loadXML(data);\r\n }\r\n }\r\n catch (e)\r\n {\r\n xml = null;\r\n }\r\n\r\n if (!xml || !xml.documentElement || xml.getElementsByTagName('parsererror').length)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n return xml;\r\n }\r\n};\r\n\r\nmodule.exports = ParseXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/ParseXML.js?")},"./node_modules/phaser/src/dom/RemoveFromDOM.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Attempts to remove the element from its parentNode in the DOM.\r\n *\r\n * @function Phaser.DOM.RemoveFromDOM\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLElement} element - The DOM element to remove from its parent node.\r\n */\r\nvar RemoveFromDOM = function (element)\r\n{\r\n if (element.parentNode)\r\n {\r\n element.parentNode.removeChild(element);\r\n }\r\n};\r\n\r\nmodule.exports = RemoveFromDOM;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RemoveFromDOM.js?")},"./node_modules/phaser/src/dom/RequestAnimationFrame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * Abstracts away the use of RAF or setTimeOut for the core game update loop.\r\n * This is invoked automatically by the Phaser.Game instance.\r\n *\r\n * @class RequestAnimationFrame\r\n * @memberof Phaser.DOM\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar RequestAnimationFrame = new Class({\r\n\r\n initialize:\r\n\r\n function RequestAnimationFrame ()\r\n {\r\n /**\r\n * True if RequestAnimationFrame is running, otherwise false.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isRunning\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isRunning = false;\r\n\r\n /**\r\n * The callback to be invoked each step.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#callback\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.callback = NOOP;\r\n\r\n /**\r\n * The most recent timestamp. Either a DOMHighResTimeStamp under RAF or `Date.now` under SetTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#tick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.tick = 0;\r\n\r\n /**\r\n * True if the step is using setTimeout instead of RAF.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#isSetTimeOut\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isSetTimeOut = false;\r\n\r\n /**\r\n * The setTimeout or RAF callback ID used when canceling them.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#timeOutID\r\n * @type {?number}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.timeOutID = null;\r\n\r\n /**\r\n * The previous time the step was called.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#lastTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lastTime = 0;\r\n\r\n var _this = this;\r\n\r\n /**\r\n * The RAF step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to requestAnimationFrame.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#step\r\n * @type {FrameRequestCallback}\r\n * @since 3.0.0\r\n */\r\n this.step = function step ()\r\n {\r\n // Because we cannot trust the time passed to this callback from the browser and need it kept in sync with event times\r\n var timestamp = window.performance.now();\r\n\r\n // DOMHighResTimeStamp\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = timestamp;\r\n\r\n _this.callback(timestamp);\r\n\r\n _this.timeOutID = window.requestAnimationFrame(step);\r\n };\r\n\r\n /**\r\n * The SetTimeout step function.\r\n * Updates the local tick value, invokes the callback and schedules another call to setTimeout.\r\n *\r\n * @name Phaser.DOM.RequestAnimationFrame#stepTimeout\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.stepTimeout = function stepTimeout ()\r\n {\r\n var d = Date.now();\r\n\r\n var delay = Math.max(16 + _this.lastTime - d, 0);\r\n\r\n _this.lastTime = _this.tick;\r\n\r\n _this.tick = d;\r\n\r\n _this.callback(d);\r\n\r\n _this.timeOutID = window.setTimeout(stepTimeout, delay);\r\n };\r\n },\r\n\r\n /**\r\n * Starts the requestAnimationFrame or setTimeout process running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#start\r\n * @since 3.0.0\r\n *\r\n * @param {FrameRequestCallback} callback - The callback to invoke each step.\r\n * @param {boolean} forceSetTimeOut - Should it use SetTimeout, even if RAF is available?\r\n */\r\n start: function (callback, forceSetTimeOut)\r\n {\r\n if (this.isRunning)\r\n {\r\n return;\r\n }\r\n\r\n this.callback = callback;\r\n\r\n this.isSetTimeOut = forceSetTimeOut;\r\n\r\n this.isRunning = true;\r\n\r\n this.timeOutID = (forceSetTimeOut) ? window.setTimeout(this.stepTimeout, 0) : window.requestAnimationFrame(this.step);\r\n },\r\n\r\n /**\r\n * Stops the requestAnimationFrame or setTimeout from running.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.isRunning = false;\r\n\r\n if (this.isSetTimeOut)\r\n {\r\n clearTimeout(this.timeOutID);\r\n }\r\n else\r\n {\r\n window.cancelAnimationFrame(this.timeOutID);\r\n }\r\n },\r\n\r\n /**\r\n * Stops the step from running and clears the callback reference.\r\n *\r\n * @method Phaser.DOM.RequestAnimationFrame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stop();\r\n\r\n this.callback = NOOP;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RequestAnimationFrame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/RequestAnimationFrame.js?')},"./node_modules/phaser/src/dom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.DOM\r\n */\r\n\r\nvar Dom = {\r\n\r\n AddToDOM: __webpack_require__(/*! ./AddToDOM */ "./node_modules/phaser/src/dom/AddToDOM.js"),\r\n DOMContentLoaded: __webpack_require__(/*! ./DOMContentLoaded */ "./node_modules/phaser/src/dom/DOMContentLoaded.js"),\r\n GetScreenOrientation: __webpack_require__(/*! ./GetScreenOrientation */ "./node_modules/phaser/src/dom/GetScreenOrientation.js"),\r\n GetTarget: __webpack_require__(/*! ./GetTarget */ "./node_modules/phaser/src/dom/GetTarget.js"),\r\n ParseXML: __webpack_require__(/*! ./ParseXML */ "./node_modules/phaser/src/dom/ParseXML.js"),\r\n RemoveFromDOM: __webpack_require__(/*! ./RemoveFromDOM */ "./node_modules/phaser/src/dom/RemoveFromDOM.js"),\r\n RequestAnimationFrame: __webpack_require__(/*! ./RequestAnimationFrame */ "./node_modules/phaser/src/dom/RequestAnimationFrame.js")\r\n\r\n};\r\n\r\nmodule.exports = Dom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/dom/index.js?')},"./node_modules/phaser/src/events/EventEmitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EE = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\n\r\n/**\r\n * @classdesc\r\n * EventEmitter is a Scene Systems plugin compatible version of eventemitter3.\r\n *\r\n * @class EventEmitter\r\n * @memberof Phaser.Events\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar EventEmitter = new Class({\r\n\r\n Extends: EE,\r\n\r\n initialize:\r\n\r\n function EventEmitter ()\r\n {\r\n EE.call(this);\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Removes all listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Return an array listing the events for which the emitter has registered listeners.\r\n *\r\n * @method Phaser.Events.EventEmitter#eventNames\r\n * @since 3.0.0\r\n *\r\n * @return {array}\r\n */\r\n\r\n/**\r\n * Return the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {array} The registered listeners.\r\n */\r\n\r\n/**\r\n * Return the number of listeners listening to a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#listenerCount\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n *\r\n * @return {number} The number of listeners.\r\n */\r\n\r\n/**\r\n * Calls each of the listeners registered for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#emit\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {...*} [args] - Additional arguments that will be passed to the event handler.\r\n *\r\n * @return {boolean} `true` if the event had listeners, else `false`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#on\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#addListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Add a one-time listener for a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#once\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} fn - The listener function.\r\n * @param {*} [context=this] - The context to invoke the listener with.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeListener\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove the listeners of a given event.\r\n *\r\n * @method Phaser.Events.EventEmitter#off\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} event - The event name.\r\n * @param {function} [fn] - Only remove the listeners that match this function.\r\n * @param {*} [context] - Only remove the listeners that have this context.\r\n * @param {boolean} [once] - Only remove one-time listeners.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\n/**\r\n * Remove all listeners, or those of the specified event.\r\n *\r\n * @method Phaser.Events.EventEmitter#removeAllListeners\r\n * @since 3.0.0\r\n *\r\n * @param {(string|symbol)} [event] - The event name.\r\n *\r\n * @return {Phaser.Events.EventEmitter} `this`.\r\n */\r\n\r\nPluginCache.register(\'EventEmitter\', EventEmitter, \'events\');\r\n\r\nmodule.exports = EventEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/EventEmitter.js?')},"./node_modules/phaser/src/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Events\r\n */\r\n\r\nmodule.exports = { EventEmitter: __webpack_require__(/*! ./EventEmitter */ "./node_modules/phaser/src/events/EventEmitter.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/events/index.js?')},"./node_modules/phaser/src/gameobjects/BuildGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\n\r\n/**\r\n * Builds a Game Object using the provided configuration object.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The initial GameObject.\r\n * @param {Phaser.Types.GameObjects.GameObjectConfig} config - The config to build the GameObject with.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The built Game Object.\r\n */\r\nvar BuildGameObject = function (scene, gameObject, config)\r\n{\r\n // Position\r\n\r\n gameObject.x = GetAdvancedValue(config, 'x', 0);\r\n gameObject.y = GetAdvancedValue(config, 'y', 0);\r\n gameObject.depth = GetAdvancedValue(config, 'depth', 0);\r\n\r\n // Flip\r\n\r\n gameObject.flipX = GetAdvancedValue(config, 'flipX', false);\r\n gameObject.flipY = GetAdvancedValue(config, 'flipY', false);\r\n\r\n // Scale\r\n // Either: { scale: 2 } or { scale: { x: 2, y: 2 }}\r\n\r\n var scale = GetAdvancedValue(config, 'scale', null);\r\n\r\n if (typeof scale === 'number')\r\n {\r\n gameObject.setScale(scale);\r\n }\r\n else if (scale !== null)\r\n {\r\n gameObject.scaleX = GetAdvancedValue(scale, 'x', 1);\r\n gameObject.scaleY = GetAdvancedValue(scale, 'y', 1);\r\n }\r\n\r\n // ScrollFactor\r\n // Either: { scrollFactor: 2 } or { scrollFactor: { x: 2, y: 2 }}\r\n\r\n var scrollFactor = GetAdvancedValue(config, 'scrollFactor', null);\r\n\r\n if (typeof scrollFactor === 'number')\r\n {\r\n gameObject.setScrollFactor(scrollFactor);\r\n }\r\n else if (scrollFactor !== null)\r\n {\r\n gameObject.scrollFactorX = GetAdvancedValue(scrollFactor, 'x', 1);\r\n gameObject.scrollFactorY = GetAdvancedValue(scrollFactor, 'y', 1);\r\n }\r\n\r\n // Rotation\r\n\r\n gameObject.rotation = GetAdvancedValue(config, 'rotation', 0);\r\n\r\n var angle = GetAdvancedValue(config, 'angle', null);\r\n\r\n if (angle !== null)\r\n {\r\n gameObject.angle = angle;\r\n }\r\n\r\n // Alpha\r\n\r\n gameObject.alpha = GetAdvancedValue(config, 'alpha', 1);\r\n\r\n // Origin\r\n // Either: { origin: 0.5 } or { origin: { x: 0.5, y: 0.5 }}\r\n\r\n var origin = GetAdvancedValue(config, 'origin', null);\r\n\r\n if (typeof origin === 'number')\r\n {\r\n gameObject.setOrigin(origin);\r\n }\r\n else if (origin !== null)\r\n {\r\n var ox = GetAdvancedValue(origin, 'x', 0.5);\r\n var oy = GetAdvancedValue(origin, 'y', 0.5);\r\n\r\n gameObject.setOrigin(ox, oy);\r\n }\r\n\r\n // ScaleMode\r\n\r\n gameObject.scaleMode = GetAdvancedValue(config, 'scaleMode', ScaleModes.DEFAULT);\r\n\r\n // BlendMode\r\n\r\n gameObject.blendMode = GetAdvancedValue(config, 'blendMode', BlendModes.NORMAL);\r\n\r\n // Visible\r\n\r\n gameObject.visible = GetAdvancedValue(config, 'visible', true);\r\n\r\n // Add to Scene\r\n\r\n var add = GetAdvancedValue(config, 'add', true);\r\n\r\n if (add)\r\n {\r\n scene.sys.displayList.add(gameObject);\r\n }\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n scene.sys.updateList.add(gameObject);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = BuildGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObject.js?")},"./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAdvancedValue = __webpack_require__(/*! ../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Adds an Animation component to a Sprite and populates it based on the given config.\r\n *\r\n * @function Phaser.GameObjects.BuildGameObjectAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The sprite to add an Animation component to.\r\n * @param {object} config - The animation config.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The updated Sprite.\r\n */\r\nvar BuildGameObjectAnimation = function (sprite, config)\r\n{\r\n var animConfig = GetAdvancedValue(config, 'anims', null);\r\n\r\n if (animConfig === null)\r\n {\r\n return sprite;\r\n }\r\n\r\n if (typeof animConfig === 'string')\r\n {\r\n // { anims: 'key' }\r\n sprite.anims.play(animConfig);\r\n }\r\n else if (typeof animConfig === 'object')\r\n {\r\n // { anims: {\r\n // key: string\r\n // startFrame: [string|integer]\r\n // delay: [float]\r\n // repeat: [integer]\r\n // repeatDelay: [float]\r\n // yoyo: [boolean]\r\n // play: [boolean]\r\n // delayedPlay: [boolean]\r\n // }\r\n // }\r\n\r\n var anims = sprite.anims;\r\n\r\n var key = GetAdvancedValue(animConfig, 'key', undefined);\r\n var startFrame = GetAdvancedValue(animConfig, 'startFrame', undefined);\r\n\r\n var delay = GetAdvancedValue(animConfig, 'delay', 0);\r\n var repeat = GetAdvancedValue(animConfig, 'repeat', 0);\r\n var repeatDelay = GetAdvancedValue(animConfig, 'repeatDelay', 0);\r\n var yoyo = GetAdvancedValue(animConfig, 'yoyo', false);\r\n\r\n var play = GetAdvancedValue(animConfig, 'play', false);\r\n var delayedPlay = GetAdvancedValue(animConfig, 'delayedPlay', 0);\r\n\r\n anims.setDelay(delay);\r\n anims.setRepeat(repeat);\r\n anims.setRepeatDelay(repeatDelay);\r\n anims.setYoyo(yoyo);\r\n\r\n if (play)\r\n {\r\n anims.play(key, startFrame);\r\n }\r\n else if (delayedPlay > 0)\r\n {\r\n anims.delayedPlay(delayedPlay, key, startFrame);\r\n }\r\n else\r\n {\r\n anims.load(key);\r\n }\r\n }\r\n\r\n return sprite;\r\n};\r\n\r\nmodule.exports = BuildGameObjectAnimation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js?")},"./node_modules/phaser/src/gameobjects/DisplayList.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar List = __webpack_require__(/*! ../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Display List plugin.\r\n *\r\n * Display Lists belong to a Scene and maintain the list of Game Objects to render every frame.\r\n *\r\n * Some of these Game Objects may also be part of the Scene\'s [Update List]{@link Phaser.GameObjects.UpdateList}, for updating.\r\n *\r\n * @class DisplayList\r\n * @extends Phaser.Structs.List.\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Display List belongs to.\r\n */\r\nvar DisplayList = new Class({\r\n\r\n Extends: List,\r\n\r\n initialize:\r\n\r\n function DisplayList (scene)\r\n {\r\n List.call(this, scene);\r\n\r\n /**\r\n * The flag the determines whether Game Objects should be sorted when `depthSort()` is called.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#sortChildrenFlag\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.sortChildrenFlag = false;\r\n\r\n /**\r\n * The Scene that this Display List belongs to.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene\'s Systems.\r\n *\r\n * @name Phaser.GameObjects.DisplayList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next call to depthSort.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.sortChildrenFlag = true;\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n if (this.sortChildrenFlag)\r\n {\r\n StableSort.inplace(this.list, this.sortByDepth);\r\n\r\n this.sortChildrenFlag = false;\r\n }\r\n },\r\n\r\n /**\r\n * Compare the depth of two Game Objects.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#sortByDepth\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object.\r\n *\r\n * @return {integer} The difference between the depths of each Game Object.\r\n */\r\n sortByDepth: function (childA, childB)\r\n {\r\n return childA._depth - childB._depth;\r\n },\r\n\r\n /**\r\n * Returns an array which contains all objects currently on the Display List.\r\n * This is a reference to the main list array, not a copy of it, so be careful not to modify it.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#getChildren\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.list;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.list[i].destroy(true);\r\n }\r\n\r\n this.list.length = 0;\r\n\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.DisplayList#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'DisplayList\', DisplayList, \'displayList\');\r\n\r\nmodule.exports = DisplayList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/DisplayList.js?')},"./node_modules/phaser/src/gameobjects/GameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ComponentsToJSON = __webpack_require__(/*! ./components/ToJSON */ \"./node_modules/phaser/src/gameobjects/components/ToJSON.js\");\r\nvar DataManager = __webpack_require__(/*! ../data/DataManager */ \"./node_modules/phaser/src/data/DataManager.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base class that all Game Objects extend.\r\n * You don't create GameObjects directly and they cannot be added to the display list.\r\n * Instead, use them as the base for your own custom classes.\r\n *\r\n * @class GameObject\r\n * @memberof Phaser.GameObjects\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {string} type - A textual representation of the type of Game Object, i.e. `sprite`.\r\n */\r\nvar GameObject = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GameObject (scene, type)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Game Object belongs.\r\n * Game Objects can only belong to one Scene.\r\n *\r\n * @name Phaser.GameObjects.GameObject#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A textual representation of this Game Object, i.e. `sprite`.\r\n * Used internally by Phaser but is available for your own custom classes to populate.\r\n *\r\n * @name Phaser.GameObjects.GameObject#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * The current state of this Game Object.\r\n * \r\n * Phaser itself will never modify this value, although plugins may do so.\r\n * \r\n * Use this property to track the state of a Game Object during its lifetime. For example, it could move from\r\n * a state of 'moving', to 'attacking', to 'dead'. The state value should be an integer (ideally mapped to a constant\r\n * in your game code), or a string. These are recommended to keep it light and simple, with fast comparisons.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @name Phaser.GameObjects.GameObject#state\r\n * @type {(integer|string)}\r\n * @since 3.16.0\r\n */\r\n this.state = 0;\r\n\r\n /**\r\n * The parent Container of this Game Object, if it has one.\r\n *\r\n * @name Phaser.GameObjects.GameObject#parentContainer\r\n * @type {Phaser.GameObjects.Container}\r\n * @since 3.4.0\r\n */\r\n this.parentContainer = null;\r\n\r\n /**\r\n * The name of this Game Object.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.GameObject#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The active state of this Game Object.\r\n * A Game Object with an active state of `true` is processed by the Scenes UpdateList, if added to it.\r\n * An active object is one which is having its logic and internal systems updated.\r\n *\r\n * @name Phaser.GameObjects.GameObject#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The Tab Index of the Game Object.\r\n * Reserved for future use by plugins and the Input Manager.\r\n *\r\n * @name Phaser.GameObjects.GameObject#tabIndex\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.tabIndex = -1;\r\n\r\n /**\r\n * A Data Manager.\r\n * It allows you to store, query and get key/value paired information specific to this Game Object.\r\n * `null` by default. Automatically created if you use `getData` or `setData` or `setDataEnabled`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#data\r\n * @type {Phaser.Data.DataManager}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.data = null;\r\n\r\n /**\r\n * The flags that are compared against `RENDER_MASK` to determine if this Game Object will render or not.\r\n * The bits are 0001 | 0010 | 0100 | 1000 set by the components Visible, Alpha, Transform and Texture respectively.\r\n * If those components are not used by your custom class then you can use this bitmask as you wish.\r\n *\r\n * @name Phaser.GameObjects.GameObject#renderFlags\r\n * @type {integer}\r\n * @default 15\r\n * @since 3.0.0\r\n */\r\n this.renderFlags = 15;\r\n\r\n /**\r\n * A bitmask that controls if this Game Object is drawn by a Camera or not.\r\n * Not usually set directly, instead call `Camera.ignore`, however you can\r\n * set this property directly using the Camera.id property:\r\n *\r\n * @example\r\n * this.cameraFilter |= camera.id\r\n *\r\n * @name Phaser.GameObjects.GameObject#cameraFilter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cameraFilter = 0;\r\n\r\n /**\r\n * If this Game Object is enabled for input then this property will contain an InteractiveObject instance.\r\n * Not usually set directly. Instead call `GameObject.setInteractive()`.\r\n *\r\n * @name Phaser.GameObjects.GameObject#input\r\n * @type {?Phaser.Types.Input.InteractiveObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.input = null;\r\n\r\n /**\r\n * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body.\r\n *\r\n * @name Phaser.GameObjects.GameObject#body\r\n * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * This Game Object will ignore all calls made to its destroy method if this flag is set to `true`.\r\n * This includes calls that may come from a Group, Container or the Scene itself.\r\n * While it allows you to persist a Game Object across Scenes, please understand you are entirely\r\n * responsible for managing references to and from this Game Object.\r\n *\r\n * @name Phaser.GameObjects.GameObject#ignoreDestroy\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.5.0\r\n */\r\n this.ignoreDestroy = false;\r\n\r\n // Tell the Scene to re-sort the children\r\n scene.sys.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Sets the `active` property of this Game Object and returns this Game Object for further chaining.\r\n * A Game Object with its `active` property set to `true` will be updated by the Scenes UpdateList.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - True if this Game Object should be set as active, false if not.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setActive: function (value)\r\n {\r\n this.active = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `name` property of this Game Object and returns this Game Object for further chaining.\r\n * The `name` property is not populated by Phaser and is presented for your own use.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setName\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The name to be given to this Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setName: function (value)\r\n {\r\n this.name = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current state of this Game Object.\r\n * \r\n * Phaser itself will never modify the State of a Game Object, although plugins may do so.\r\n * \r\n * For example, a Game Object could change from a state of 'moving', to 'attacking', to 'dead'.\r\n * The state value should typically be an integer (ideally mapped to a constant\r\n * in your game code), but could also be a string. It is recommended to keep it light and simple.\r\n * If you need to store complex data about your Game Object, look at using the Data Component instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setState\r\n * @since 3.16.0\r\n *\r\n * @param {(integer|string)} value - The state of the Game Object.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setState: function (value)\r\n {\r\n this.state = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a Data Manager component to this Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setDataEnabled\r\n * @since 3.0.0\r\n * @see Phaser.Data.DataManager\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setDataEnabled: function ()\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Allows you to store a key value pair within this Game Objects Data Manager.\r\n *\r\n * If the Game Object has not been enabled for data (via `setDataEnabled`) then it will be enabled\r\n * before setting the value.\r\n *\r\n * If the key doesn't already exist in the Data Manager then it is created.\r\n *\r\n * ```javascript\r\n * sprite.setData('name', 'Red Gem Stone');\r\n * ```\r\n *\r\n * You can also pass in an object of key value pairs as the first argument:\r\n *\r\n * ```javascript\r\n * sprite.setData({ name: 'Red Gem Stone', level: 2, owner: 'Link', gold: 50 });\r\n * ```\r\n *\r\n * To get a value back again you can call `getData`:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or you can access the value directly via the `values` property, where it works like any other variable:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold += 50;\r\n * ```\r\n *\r\n * When the value is first set, a `setdata` event is emitted from this Game Object.\r\n *\r\n * If the key already exists, a `changedata` event is emitted instead, along an event named after the key.\r\n * For example, if you updated an existing key called `PlayerLives` then it would emit the event `changedata-PlayerLives`.\r\n * These events will be emitted regardless if you use this method to set the value, or the direct `values` setter.\r\n *\r\n * Please note that the data keys are case-sensitive and must be valid JavaScript Object property strings.\r\n * This means the keys `gold` and `Gold` are treated as two unique values within the Data Manager.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} key - The key to set the value for. Or an object of key value pairs. If an object the `data` argument is ignored.\r\n * @param {*} [data] - The value to set for the given key. If an object is provided as the key this argument is ignored.\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setData: function (key, value)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n this.data.set(key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist.\r\n *\r\n * You can also access values via the `values` object. For example, if you had a key called `gold` you can do either:\r\n *\r\n * ```javascript\r\n * sprite.getData('gold');\r\n * ```\r\n *\r\n * Or access the value directly:\r\n *\r\n * ```javascript\r\n * sprite.data.values.gold;\r\n * ```\r\n *\r\n * You can also pass in an array of keys, in which case an array of values will be returned:\r\n *\r\n * ```javascript\r\n * sprite.getData([ 'gold', 'armor', 'health' ]);\r\n * ```\r\n *\r\n * This approach is useful for destructuring arrays in ES6.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getData\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} key - The key of the value to retrieve, or an array of keys.\r\n *\r\n * @return {*} The value belonging to the given key, or an array of values, the order of which will match the input array.\r\n */\r\n getData: function (key)\r\n {\r\n if (!this.data)\r\n {\r\n this.data = new DataManager(this);\r\n }\r\n\r\n return this.data.get(key);\r\n },\r\n\r\n /**\r\n * Pass this Game Object to the Input Manager to enable it for Input.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.GameObjects.GameObject#setInteractive\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback.\r\n * @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n setInteractive: function (shape, callback, dropZone)\r\n {\r\n this.scene.sys.input.enable(this, shape, callback, dropZone);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will disable it.\r\n *\r\n * An object that is disabled for input stops processing or being considered for\r\n * input events, but can be turned back on again at any time by simply calling\r\n * `setInteractive()` with no arguments provided.\r\n *\r\n * If want to completely remove interaction from this Game Object then use `removeInteractive` instead.\r\n *\r\n * @method Phaser.GameObjects.GameObject#disableInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n disableInteractive: function ()\r\n {\r\n if (this.input)\r\n {\r\n this.input.enabled = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If this Game Object has previously been enabled for input, this will queue it\r\n * for removal, causing it to no longer be interactive. The removal happens on\r\n * the next game step, it is not immediate.\r\n *\r\n * The Interactive Object that was assigned to this Game Object will be destroyed,\r\n * removed from the Input Manager and cleared from this Game Object.\r\n *\r\n * If you wish to re-enable this Game Object at a later date you will need to\r\n * re-create its InteractiveObject by calling `setInteractive` again.\r\n *\r\n * If you wish to only temporarily stop an object from receiving input then use\r\n * `disableInteractive` instead, as that toggles the interactive state, where-as\r\n * this erases it completely.\r\n * \r\n * If you wish to resize a hit area, don't remove and then set it as being\r\n * interactive. Instead, access the hitarea object directly and resize the shape\r\n * being used. I.e.: `sprite.input.hitArea.setSize(width, height)` (assuming the\r\n * shape is a Rectangle, which it is by default.)\r\n *\r\n * @method Phaser.GameObjects.GameObject#removeInteractive\r\n * @since 3.7.0\r\n *\r\n * @return {this} This GameObject.\r\n */\r\n removeInteractive: function ()\r\n {\r\n this.scene.sys.input.clear(this);\r\n\r\n this.input = undefined;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * To be overridden by custom GameObjects. Allows base objects to be used in a Pool.\r\n *\r\n * @method Phaser.GameObjects.GameObject#update\r\n * @since 3.0.0\r\n *\r\n * @param {...*} [args] - args\r\n */\r\n update: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Returns a JSON representation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.GameObject#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n return ComponentsToJSON(this);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.GameObject#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n },\r\n\r\n /**\r\n * Returns an array containing the display list index of either this Game Object, or if it has one,\r\n * its parent Container. It then iterates up through all of the parent containers until it hits the\r\n * root of the display list (which is index 0 in the returned array).\r\n *\r\n * Used internally by the InputPlugin but also useful if you wish to find out the display depth of\r\n * this Game Object and all of its ancestors.\r\n *\r\n * @method Phaser.GameObjects.GameObject#getIndexList\r\n * @since 3.4.0\r\n *\r\n * @return {integer[]} An array of display list position indexes.\r\n */\r\n getIndexList: function ()\r\n {\r\n // eslint-disable-next-line consistent-this\r\n var child = this;\r\n var parent = this.parentContainer;\r\n\r\n var indexes = [];\r\n\r\n while (parent)\r\n {\r\n // indexes.unshift([parent.getIndex(child), parent.name]);\r\n indexes.unshift(parent.getIndex(child));\r\n\r\n child = parent;\r\n\r\n if (!parent.parentContainer)\r\n {\r\n break;\r\n }\r\n else\r\n {\r\n parent = parent.parentContainer;\r\n }\r\n }\r\n\r\n // indexes.unshift([this.scene.sys.displayList.getIndex(child), 'root']);\r\n indexes.unshift(this.scene.sys.displayList.getIndex(child));\r\n\r\n return indexes;\r\n },\r\n\r\n /**\r\n * Destroys this Game Object removing it from the Display List and Update List and\r\n * severing all ties to parent resources.\r\n *\r\n * Also removes itself from the Input Manager and Physics Manager if previously enabled.\r\n *\r\n * Use this to remove a Game Object from your game if you don't ever plan to use it again.\r\n * As long as no reference to it exists within your own code it should become free for\r\n * garbage collection by the browser.\r\n *\r\n * If you just want to temporarily disable an object then look at using the\r\n * Game Object Pool instead of destroying it, as destroyed objects cannot be resurrected.\r\n *\r\n * @method Phaser.GameObjects.GameObject#destroy\r\n * @fires Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [fromScene=false] - Is this Game Object being destroyed as the result of a Scene shutdown?\r\n */\r\n destroy: function (fromScene)\r\n {\r\n if (fromScene === undefined) { fromScene = false; }\r\n\r\n // This Game Object has already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n if (this.preDestroy)\r\n {\r\n this.preDestroy.call(this);\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n\r\n var sys = this.scene.sys;\r\n\r\n if (!fromScene)\r\n {\r\n sys.displayList.remove(this);\r\n sys.updateList.remove(this);\r\n }\r\n\r\n if (this.input)\r\n {\r\n sys.input.clear(this);\r\n this.input = undefined;\r\n }\r\n\r\n if (this.data)\r\n {\r\n this.data.destroy();\r\n\r\n this.data = undefined;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.body.destroy();\r\n this.body = undefined;\r\n }\r\n\r\n // Tell the Scene to re-sort the children\r\n if (!fromScene)\r\n {\r\n sys.queueDepthSort();\r\n }\r\n\r\n this.active = false;\r\n this.visible = false;\r\n\r\n this.scene = undefined;\r\n\r\n this.parentContainer = undefined;\r\n\r\n this.removeAllListeners();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * The bitmask that `GameObject.renderFlags` is compared against to determine if the Game Object will render or not.\r\n *\r\n * @constant {integer} RENDER_MASK\r\n * @memberof Phaser.GameObjects.GameObject\r\n * @default\r\n */\r\nGameObject.RENDER_MASK = 15;\r\n\r\nmodule.exports = GameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObject.js?")},"./node_modules/phaser/src/gameobjects/GameObjectCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Creator is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and return them. Unlike the Game Object Factory, they are not automatically\r\n * added to the Scene.\r\n *\r\n * Game Objects directly register themselves with the Creator and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectCreator\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectCreator = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectCreator (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Creator belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectCreator#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object creator functions\r\n\r\nGameObjectCreator.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectCreator.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectCreator.remove = function (factoryType)\r\n{\r\n if (GameObjectCreator.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectCreator.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectCreator\', GameObjectCreator, \'make\');\r\n\r\nmodule.exports = GameObjectCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectCreator.js?')},"./node_modules/phaser/src/gameobjects/GameObjectFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Game Object Factory is a Scene plugin that allows you to quickly create many common\r\n * types of Game Objects and have them automatically registered with the Scene.\r\n *\r\n * Game Objects directly register themselves with the Factory and inject their own creation\r\n * methods into the class.\r\n *\r\n * @class GameObjectFactory\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object Factory belongs.\r\n */\r\nvar GameObjectFactory = new Class({\r\n\r\n initialize:\r\n\r\n function GameObjectFactory (scene)\r\n {\r\n /**\r\n * The Scene to which this Game Object Factory belongs.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#scene\r\n * @type {Phaser.Scene}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Update List.\r\n *\r\n * @name Phaser.GameObjects.GameObjectFactory#updateList;\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.displayList = this.systems.displayList;\r\n this.updateList = this.systems.updateList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Adds an existing Game Object to this Scene.\r\n * \r\n * If the Game Object renders, it will be added to the Display List.\r\n * If it has a `preUpdate` method, it will be added to the Update List.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The child to be added to this Scene.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was added.\r\n */\r\n existing: function (child)\r\n {\r\n if (child.renderCanvas || child.renderWebGL)\r\n {\r\n this.displayList.add(child);\r\n }\r\n\r\n if (child.preUpdate)\r\n {\r\n this.updateList.add(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n\r\n this.displayList = null;\r\n this.updateList = null;\r\n }\r\n\r\n});\r\n\r\n// Static method called directly by the Game Object factory functions\r\n\r\nGameObjectFactory.register = function (factoryType, factoryFunction)\r\n{\r\n if (!GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n GameObjectFactory.prototype[factoryType] = factoryFunction;\r\n }\r\n};\r\n\r\nGameObjectFactory.remove = function (factoryType)\r\n{\r\n if (GameObjectFactory.prototype.hasOwnProperty(factoryType))\r\n {\r\n delete GameObjectFactory.prototype[factoryType];\r\n }\r\n};\r\n\r\nPluginCache.register(\'GameObjectFactory\', GameObjectFactory, \'add\');\r\n\r\nmodule.exports = GameObjectFactory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/GameObjectFactory.js?')},"./node_modules/phaser/src/gameobjects/UpdateList.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Update List plugin.\r\n *\r\n * Update Lists belong to a Scene and maintain the list Game Objects to be updated every frame.\r\n *\r\n * Some or all of these Game Objects may also be part of the Scene's [Display List]{@link Phaser.GameObjects.DisplayList}, for Rendering.\r\n *\r\n * @class UpdateList\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that the Update List belongs to.\r\n */\r\nvar UpdateList = new Class({\r\n\r\n initialize:\r\n\r\n function UpdateList (scene)\r\n {\r\n /**\r\n * The Scene that the Update List belongs to.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene's Systems.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The list of Game Objects.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_list\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Game Objects that are pending insertion into the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingInsertion\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Game Objects that are pending removal from the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#_pendingRemoval\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Add a Game Object to the Update List.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The added Game Object.\r\n */\r\n add: function (child)\r\n {\r\n // Is child already in this list?\r\n\r\n if (this._list.indexOf(child) === -1 && this._pendingInsertion.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * The pre-update step.\r\n *\r\n * Handles Game Objects that are pending insertion to and removal from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var gameObject;\r\n\r\n // Delete old gameObjects\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n gameObject = this._pendingRemoval[i];\r\n\r\n var index = this._list.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._list.splice(index, 1);\r\n }\r\n }\r\n\r\n // Move pending to active\r\n this._list = this._list.concat(this._pendingInsertion.splice(0));\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * The update step.\r\n *\r\n * Pre-updates every active Game Object in the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n var list = this._list;\r\n var length = list.length;\r\n\r\n for (var i = 0; i < length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n if (gameObject.active)\r\n {\r\n gameObject.preUpdate.call(gameObject, time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Remove a Game Object from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove from the list.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The removed Game Object.\r\n */\r\n remove: function (child)\r\n {\r\n if (this._list.indexOf(child) !== -1 && this._pendingRemoval.indexOf(child) === -1)\r\n {\r\n this._pendingRemoval.push(child);\r\n }\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Remove all Game Objects from the list.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#removeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.UpdateList} This UpdateList.\r\n */\r\n removeAll: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this._list[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i = this._list.length;\r\n\r\n while (i--)\r\n {\r\n this._list[i].destroy(true);\r\n }\r\n\r\n i = this._pendingRemoval.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingRemoval[i].destroy(true);\r\n }\r\n\r\n i = this._pendingInsertion.length;\r\n\r\n while (i--)\r\n {\r\n this._pendingInsertion[i].destroy(true);\r\n }\r\n\r\n this._list.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.GameObjects.UpdateList#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n },\r\n\r\n /**\r\n * The length of the list.\r\n *\r\n * @name Phaser.GameObjects.UpdateList#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this._list.length;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('UpdateList', UpdateList, 'updateList');\r\n\r\nmodule.exports = UpdateList;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/UpdateList.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the position, width and height of a BitmapText Game Object.\r\n *\r\n * Returns a BitmapTextSize object that contains global and local variants of the Game Objects x and y coordinates and\r\n * its width and height.\r\n *\r\n * The global position and size take into account the Game Object's position and scale.\r\n *\r\n * The local position and size just takes into account the font data.\r\n *\r\n * @function GetBitmapTextSize\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - The BitmapText to calculate the position, width and height of.\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n * @param {object} [out] - Optional object to store the results in, to save constant object creation.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} The calculated position, width and height of the BitmapText.\r\n */\r\nvar GetBitmapTextSize = function (src, round, out)\r\n{\r\n if (out === undefined)\r\n {\r\n out = {\r\n local: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n global: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n },\r\n lines: {\r\n shortest: 0,\r\n longest: 0,\r\n lengths: null\r\n }\r\n };\r\n }\r\n\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var bx = Number.MAX_VALUE;\r\n var by = Number.MAX_VALUE;\r\n var bw = 0;\r\n var bh = 0;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src.letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var scale = (src.fontSize / src.fontData.size);\r\n var sx = scale * src.scaleX;\r\n var sy = scale * src.scaleY;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n var lineWidths = [];\r\n var shortestLine = Number.MAX_VALUE;\r\n var longestLine = 0;\r\n var currentLine = 0;\r\n var currentLineWidth = 0;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n currentLine++;\r\n currentLineWidth = 0;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n x = xAdvance;\r\n y = yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (bx > x)\r\n {\r\n bx = x;\r\n }\r\n\r\n if (by > y)\r\n {\r\n by = y;\r\n }\r\n\r\n var gw = x + glyph.xAdvance;\r\n var gh = y + lineHeight;\r\n\r\n if (bw < gw)\r\n {\r\n bw = gw;\r\n }\r\n\r\n if (bh < gh)\r\n {\r\n bh = gh;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n currentLineWidth = gw * scale;\r\n }\r\n\r\n lineWidths[currentLine] = currentLineWidth;\r\n\r\n if (currentLineWidth > longestLine)\r\n {\r\n longestLine = currentLineWidth;\r\n }\r\n\r\n if (currentLineWidth < shortestLine)\r\n {\r\n shortestLine = currentLineWidth;\r\n }\r\n\r\n var local = out.local;\r\n var global = out.global;\r\n var lines = out.lines;\r\n\r\n local.x = bx * scale;\r\n local.y = by * scale;\r\n local.width = bw * scale;\r\n local.height = bh * scale;\r\n\r\n global.x = (src.x - src.displayOriginX) + (bx * sx);\r\n global.y = (src.y - src.displayOriginY) + (by * sy);\r\n global.width = bw * sx;\r\n global.height = bh * sy;\r\n\r\n lines.shortest = shortestLine;\r\n lines.longest = longestLine;\r\n lines.lengths = lineWidths;\r\n\r\n if (round)\r\n {\r\n local.x = Math.round(local.x);\r\n local.y = Math.round(local.y);\r\n local.width = Math.round(local.width);\r\n local.height = Math.round(local.height);\r\n\r\n global.x = Math.round(global.x);\r\n global.y = Math.round(global.y);\r\n global.width = Math.round(global.width);\r\n global.height = Math.round(global.height);\r\n\r\n lines.shortest = Math.round(shortestLine);\r\n lines.longest = Math.round(longestLine);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBitmapTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ./ParseXMLBitmapFont */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @function ParseFromAtlas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont's texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture's frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} xSpacing - The x-axis spacing to add between each letter.\r\n * @param {integer} ySpacing - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nvar ParseFromAtlas = function (scene, fontName, textureKey, frameKey, xmlKey, xSpacing, ySpacing)\r\n{\r\n var frame = scene.sys.textures.getFrame(textureKey, frameKey);\r\n var xml = scene.sys.cache.xml.get(xmlKey);\r\n\r\n if (frame && xml)\r\n {\r\n var data = ParseXMLBitmapFont(xml, xSpacing, ySpacing, frame);\r\n\r\n scene.sys.cache.bitmapFont.add(fontName, { data: data, texture: textureKey, frame: frameKey });\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = ParseFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Parses a Retro Font configuration object so you can pass it to the BitmapText constructor\r\n * and create a BitmapText object using a fixed-width retro font.\r\n *\r\n * @function Phaser.GameObjects.RetroFont.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Phaser Scene.\r\n * @param {Phaser.Types.GameObjects.BitmapText.RetroFontConfig} config - The font configuration object.\r\n *\r\n * @return {object} A parsed Bitmap Font data entry for the Bitmap Font cache.\r\n */\r\nvar ParseRetroFont = function (scene, config)\r\n{\r\n var w = config.width;\r\n var h = config.height;\r\n var cx = Math.floor(w / 2);\r\n var cy = Math.floor(h / 2);\r\n var letters = GetValue(config, 'chars', '');\r\n\r\n if (letters === '')\r\n {\r\n return;\r\n }\r\n\r\n var key = GetValue(config, 'image', '');\r\n var offsetX = GetValue(config, 'offset.x', 0);\r\n var offsetY = GetValue(config, 'offset.y', 0);\r\n var spacingX = GetValue(config, 'spacing.x', 0);\r\n var spacingY = GetValue(config, 'spacing.y', 0);\r\n var lineSpacing = GetValue(config, 'lineSpacing', 0);\r\n\r\n var charsPerRow = GetValue(config, 'charsPerRow', null);\r\n\r\n if (charsPerRow === null)\r\n {\r\n charsPerRow = scene.sys.textures.getFrame(key).width / w;\r\n\r\n if (charsPerRow > letters.length)\r\n {\r\n charsPerRow = letters.length;\r\n }\r\n }\r\n\r\n var x = offsetX;\r\n var y = offsetY;\r\n\r\n var data = {\r\n retroFont: true,\r\n font: key,\r\n size: w,\r\n lineHeight: h + lineSpacing,\r\n chars: {}\r\n };\r\n\r\n var r = 0;\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n // var node = letters[i];\r\n\r\n var charCode = letters.charCodeAt(i);\r\n\r\n data.chars[charCode] =\r\n {\r\n x: x,\r\n y: y,\r\n width: w,\r\n height: h,\r\n centerX: cx,\r\n centerY: cy,\r\n xOffset: 0,\r\n yOffset: 0,\r\n xAdvance: w,\r\n data: {},\r\n kerning: {}\r\n };\r\n\r\n r++;\r\n\r\n if (r === charsPerRow)\r\n {\r\n r = 0;\r\n x = offsetX;\r\n y += h + spacingY;\r\n }\r\n else\r\n {\r\n x += w + spacingX;\r\n }\r\n }\r\n\r\n var entry = {\r\n data: data,\r\n frame: null,\r\n texture: key\r\n };\r\n\r\n return entry;\r\n};\r\n\r\nmodule.exports = ParseRetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Read an integer value from an XML Node.\r\n *\r\n * @function getValue\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Node} node - The XML Node.\r\n * @param {string} attribute - The attribute to read.\r\n *\r\n * @return {integer} The parsed value.\r\n */\r\nfunction getValue (node, attribute)\r\n{\r\n return parseInt(node.getAttribute(attribute), 10);\r\n}\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @function ParseXMLBitmapFont\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nvar ParseXMLBitmapFont = function (xml, xSpacing, ySpacing, frame)\r\n{\r\n if (xSpacing === undefined) { xSpacing = 0; }\r\n if (ySpacing === undefined) { ySpacing = 0; }\r\n\r\n var data = {};\r\n var info = xml.getElementsByTagName('info')[0];\r\n var common = xml.getElementsByTagName('common')[0];\r\n\r\n data.font = info.getAttribute('face');\r\n data.size = getValue(info, 'size');\r\n data.lineHeight = getValue(common, 'lineHeight') + ySpacing;\r\n data.chars = {};\r\n\r\n var letters = xml.getElementsByTagName('char');\r\n\r\n var adjustForTrim = (frame !== undefined && frame.trimmed);\r\n\r\n if (adjustForTrim)\r\n {\r\n var top = frame.height;\r\n var left = frame.width;\r\n }\r\n\r\n for (var i = 0; i < letters.length; i++)\r\n {\r\n var node = letters[i];\r\n\r\n var charCode = getValue(node, 'id');\r\n var gx = getValue(node, 'x');\r\n var gy = getValue(node, 'y');\r\n var gw = getValue(node, 'width');\r\n var gh = getValue(node, 'height');\r\n\r\n // Handle frame trim issues\r\n\r\n if (adjustForTrim)\r\n {\r\n if (gx < left)\r\n {\r\n left = gx;\r\n }\r\n\r\n if (gy < top)\r\n {\r\n top = gy;\r\n }\r\n }\r\n\r\n data.chars[charCode] =\r\n {\r\n x: gx,\r\n y: gy,\r\n width: gw,\r\n height: gh,\r\n centerX: Math.floor(gw / 2),\r\n centerY: Math.floor(gh / 2),\r\n xOffset: getValue(node, 'xoffset'),\r\n yOffset: getValue(node, 'yoffset'),\r\n xAdvance: getValue(node, 'xadvance') + xSpacing,\r\n data: {},\r\n kerning: {}\r\n };\r\n }\r\n\r\n if (adjustForTrim && top !== 0 && left !== 0)\r\n {\r\n // console.log('top and left', top, left, frame.x, frame.y);\r\n\r\n // Now we know the top and left coordinates of the glyphs in the original data\r\n // so we can work out how much to adjust the glyphs by\r\n\r\n for (var code in data.chars)\r\n {\r\n var glyph = data.chars[code];\r\n\r\n glyph.x -= frame.x;\r\n glyph.y -= frame.y;\r\n }\r\n }\r\n\r\n var kernings = xml.getElementsByTagName('kerning');\r\n\r\n for (i = 0; i < kernings.length; i++)\r\n {\r\n var kern = kernings[i];\r\n\r\n var first = getValue(kern, 'first');\r\n var second = getValue(kern, 'second');\r\n var amount = getValue(kern, 'amount');\r\n\r\n data.chars[second].kerning[first] = amount;\r\n }\r\n\r\n return data;\r\n};\r\n\r\nmodule.exports = ParseXMLBitmapFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/gameobjects/bitmaptext/const.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.RetroFont\r\n * @since 3.6.0\r\n */\r\n\r\nvar RetroFont = { Parse: __webpack_require__(/*! ./ParseRetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js") };\r\n\r\n// Merge in the consts\r\nRetroFont = Extend(false, RetroFont, RETRO_FONT_CONST);\r\n\r\nmodule.exports = RetroFont;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RETRO_FONT_CONST = {\r\n\r\n /**\r\n * Text Set 1 = !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET1\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET1: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~',\r\n\r\n /**\r\n * Text Set 2 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET2\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET2: ' !\"#$%&\\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET3\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET3: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ',\r\n\r\n /**\r\n * Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET4\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET4: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789',\r\n\r\n /**\r\n * Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET5\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET5: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \\'!?-*:0123456789',\r\n\r\n /**\r\n * Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.' \r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET6\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET6: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789\"(),-.\\' ',\r\n\r\n /**\r\n * Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-'39\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET7\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET7: 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW\")28FLRX-\\'39',\r\n\r\n /**\r\n * Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET8\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET8: '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'\"?!\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET9\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET9: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\\'\"?!',\r\n\r\n /**\r\n * Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET10\r\n * @type {string}\r\n * @since 3.6.0\r\n */\r\n TEXT_SET10: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',\r\n\r\n /**\r\n * Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()':;0123456789\r\n * \r\n * @name Phaser.GameObjects.RetroFont.TEXT_SET11\r\n * @since 3.6.0\r\n * @type {string}\r\n */\r\n TEXT_SET11: 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,\"-+!?()\\':;0123456789'\r\n\r\n};\r\n\r\nmodule.exports = RETRO_FONT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/const.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ../static/BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Render = __webpack_require__(/*! ./DynamicBitmapTextRender */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * @class DynamicBitmapText\r\n * @extends Phaser.GameObjects.BitmapText\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar DynamicBitmapText = new Class({\r\n\r\n Extends: BitmapText,\r\n\r\n Mixins: [\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicBitmapText (scene, x, y, font, text, size, align)\r\n {\r\n BitmapText.call(this, scene, x, y, font, text, size, align);\r\n\r\n this.type = 'DynamicBitmapText';\r\n\r\n /**\r\n * The horizontal scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollX = 0;\r\n\r\n /**\r\n * The vertical scroll position of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#scrollY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.scrollY = 0;\r\n\r\n /**\r\n * The crop width of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropWidth = 0;\r\n\r\n /**\r\n * The crop height of the Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#cropHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.cropHeight = 0;\r\n\r\n /**\r\n * A callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#displayCallback\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallback}\r\n * @since 3.0.0\r\n */\r\n this.displayCallback;\r\n\r\n /**\r\n * The data object that is populated during rendering, then passed to the displayCallback.\r\n * You should modify this object then return it back from the callback. It's updated values\r\n * will be used to render the specific glyph.\r\n * \r\n * Please note that if you need a reference to this object locally in your game code then you\r\n * should shallow copy it, as it's updated and re-used for every glyph in the text.\r\n *\r\n * @name Phaser.GameObjects.DynamicBitmapText#callbackData\r\n * @type {Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig}\r\n * @since 3.11.0\r\n */\r\n this.callbackData = {\r\n parent: this,\r\n color: 0,\r\n tint: {\r\n topLeft: 0,\r\n topRight: 0,\r\n bottomLeft: 0,\r\n bottomRight: 0\r\n },\r\n index: 0,\r\n charCode: 0,\r\n x: 0,\r\n y: 0,\r\n scale: 0,\r\n rotation: 0,\r\n data: 0\r\n };\r\n },\r\n\r\n /**\r\n * Set the crop size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the crop.\r\n * @param {number} height - The height of the crop.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.cropWidth = width;\r\n this.cropHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback that alters how each character of the Bitmap Text is rendered.\r\n *\r\n * The callback receives a {@link Phaser.Types.GameObjects.BitmapText.DisplayCallbackConfig} object that contains information about the character that's\r\n * about to be rendered.\r\n *\r\n * It should return an object with `x`, `y`, `scale` and `rotation` properties that will be used instead of the\r\n * usual values when rendering.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setDisplayCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setDisplayCallback: function (callback)\r\n {\r\n this.displayCallback = callback;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the horizontal scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The horizontal scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollX: function (value)\r\n {\r\n this.scrollX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the vertical scroll position of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#setScrollY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The vertical scroll position to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.\r\n */\r\n setScrollY: function (value)\r\n {\r\n this.scrollY = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicBitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var indexCount = 0;\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var rotation = 0;\r\n var scale = (src.fontSize / src.fontData.size);\r\n\r\n if (src.cropWidth > 0 && src.cropHeight > 0)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(0, 0, src.cropWidth, src.cropHeight);\r\n ctx.clip();\r\n }\r\n\r\n for (var index = 0; index < textLength; ++index)\r\n {\r\n // Reset the scale (in case the callback changed it)\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n charCode = text.charCodeAt(index);\r\n\r\n if (charCode === 10)\r\n {\r\n xAdvance = 0;\r\n indexCount = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = (indexCount + glyph.xOffset + xAdvance) - src.scrollX;\r\n y = (glyph.yOffset + yAdvance) - src.scrollY;\r\n\r\n // This could be optimized so that it doesn\'t even bother drawing it if the x/y is out of range\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.index = index;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= cameraScrollX;\r\n y -= cameraScrollY;\r\n\r\n if (camera.roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.rotate(rotation);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n \r\n xAdvance += glyph.xAdvance;\r\n indexCount += 1;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#dynamicBitmapText\r\n * @since 3.0.0\r\n *²\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('dynamicBitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetAdvancedValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DynamicBitmapText = __webpack_require__(/*! ./DynamicBitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Dynamic Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * Dynamic Bitmap Text objects are different from Static Bitmap Text in that they invoke a callback for each\r\n * letter being rendered during the render pass. This callback allows you to manipulate the properties of\r\n * each letter being rendered, such as its position, scale or tint, allowing you to create interesting effects\r\n * like jiggling text, which can't be done with Static text. This means that Dynamic Text takes more processing\r\n * time, so only use them if you require the callback ability they have.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Dynamic Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dynamicBitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n *\r\n * @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size)\r\n{\r\n return this.displayList.add(new DynamicBitmapText(this.scene, x, y, font, text, size));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicBitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicBitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DynamicBitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.DynamicBitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicBitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src.text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var crop = (src.cropWidth > 0 || src.cropHeight > 0);\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.pushScissor(\r\n src.x,\r\n src.y,\r\n src.cropWidth * src.scaleX,\r\n src.cropHeight * src.scaleY\r\n );\r\n }\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n var fontMatrix = pipeline._tempMatrix4;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src.letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n var scrollX = src.scrollX;\r\n var scrollY = src.scrollY;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src.fontSize / fontData.size);\r\n var rotation = 0;\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n var displayCallback = src.displayCallback;\r\n var callbackData = src.callbackData;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = (glyph.xOffset + xAdvance) - scrollX;\r\n var y = (glyph.yOffset + yAdvance) - scrollY;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n scale = (src.fontSize / src.fontData.size);\r\n rotation = 0;\r\n\r\n if (displayCallback)\r\n {\r\n callbackData.color = 0;\r\n callbackData.tint.topLeft = tintTL;\r\n callbackData.tint.topRight = tintTR;\r\n callbackData.tint.bottomLeft = tintBL;\r\n callbackData.tint.bottomRight = tintBR;\r\n callbackData.index = i;\r\n callbackData.charCode = charCode;\r\n callbackData.x = x;\r\n callbackData.y = y;\r\n callbackData.scale = scale;\r\n callbackData.rotation = rotation;\r\n callbackData.data = glyph.data;\r\n\r\n var output = displayCallback(callbackData);\r\n\r\n x = output.x;\r\n y = output.y;\r\n scale = output.scale;\r\n rotation = output.rotation;\r\n\r\n if (output.color)\r\n {\r\n tintTL = output.color;\r\n tintTR = output.color;\r\n tintBL = output.color;\r\n tintBR = output.color;\r\n }\r\n else\r\n {\r\n tintTL = output.tint.topLeft;\r\n tintTR = output.tint.topRight;\r\n tintBL = output.tint.bottomLeft;\r\n tintBR = output.tint.bottomRight;\r\n }\r\n\r\n tintTL = Utils.getTintAppendFloatAlpha(tintTL, camera.alpha * src._alphaTL);\r\n tintTR = Utils.getTintAppendFloatAlpha(tintTR, camera.alpha * src._alphaTR);\r\n tintBL = Utils.getTintAppendFloatAlpha(tintBL, camera.alpha * src._alphaBL);\r\n tintBR = Utils.getTintAppendFloatAlpha(tintBR, camera.alpha * src._alphaBR);\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n fontMatrix.applyITRS(x, y, rotation, scale, scale);\r\n\r\n calcMatrix.multiply(fontMatrix, spriteMatrix);\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = glyphW;\r\n var yh = glyphH;\r\n\r\n var tx0 = spriteMatrix.e;\r\n var ty0 = spriteMatrix.f;\r\n\r\n var tx1 = yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty1 = yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx2 = xw * spriteMatrix.a + yh * spriteMatrix.c + spriteMatrix.e;\r\n var ty2 = xw * spriteMatrix.b + yh * spriteMatrix.d + spriteMatrix.f;\r\n\r\n var tx3 = xw * spriteMatrix.a + spriteMatrix.e;\r\n var ty3 = xw * spriteMatrix.b + spriteMatrix.f;\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n\r\n if (crop)\r\n {\r\n pipeline.flush();\r\n\r\n renderer.popScissor();\r\n }\r\n};\r\n\r\nmodule.exports = DynamicBitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetBitmapTextSize = __webpack_require__(/*! ../GetBitmapTextSize */ "./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js");\r\nvar ParseFromAtlas = __webpack_require__(/*! ../ParseFromAtlas */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../ParseXMLBitmapFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js");\r\nvar Render = __webpack_require__(/*! ./BitmapTextRender */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n *\r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}\r\n * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}\r\n * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}\r\n *\r\n * @class BitmapText\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} x - The x coordinate of this Game Object in world space.\r\n * @param {number} y - The y coordinate of this Game Object in world space.\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size of this Bitmap Text.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n */\r\nvar BitmapText = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function BitmapText (scene, x, y, font, text, size, align)\r\n {\r\n if (text === undefined) { text = \'\'; }\r\n if (align === undefined) { align = 0; }\r\n\r\n GameObject.call(this, scene, \'BitmapText\');\r\n\r\n /**\r\n * The key of the Bitmap Font used by this Bitmap Text.\r\n * To change the font after creation please use `setFont`.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#font\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.font = font;\r\n\r\n var entry = this.scene.sys.cache.bitmapFont.get(font);\r\n\r\n /**\r\n * The data of the Bitmap Font used by this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontData\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapFontData}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.fontData = entry.data;\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._text = \'\';\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_fontSize\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._fontSize = size || this.fontData.size;\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_letterSpacing\r\n * @type {number}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._letterSpacing = 0;\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_align\r\n * @type {integer}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._align = align;\r\n\r\n /**\r\n * An object that describes the size of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_bounds\r\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapTextSize}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = GetBitmapTextSize(this, false, this._bounds);\r\n\r\n /**\r\n * An internal dirty flag for bounds calculation.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#_dirty\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._dirty = false;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n this.setText(text);\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be left-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLeftAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLeftAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_LEFT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be center-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setCenterAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setCenterAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_CENTER;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the lines of text in this BitmapText to be right-aligned.\r\n * This only has any effect if this BitmapText contains more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setRightAlign\r\n * @since 3.11.0\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setRightAlign: function ()\r\n {\r\n this._align = BitmapText.ALIGN_RIGHT;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the font size of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size to set.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n this._fontSize = size;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the letter spacing between each character of this Bitmap Text.\r\n * Can be a positive value to increase the space, or negative to reduce it.\r\n * Spacing is applied after the kerning values have been set.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setLetterSpacing\r\n * @since 3.4.0\r\n *\r\n * @param {number} [spacing=0] - The amount of horizontal space to add between each character.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setLetterSpacing: function (spacing)\r\n {\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n this._letterSpacing = spacing;\r\n\r\n this._dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the textual content of this BitmapText.\r\n *\r\n * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = \'\';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join(\'\\n\');\r\n }\r\n\r\n if (value !== this.text)\r\n {\r\n this._text = value.toString();\r\n\r\n this._dirty = true;\r\n\r\n this.updateDisplayOrigin();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the bounds of this Bitmap Text.\r\n *\r\n * An object is returned that contains the position, width and height of the Bitmap Text in local and global\r\n * contexts.\r\n *\r\n * Local size is based on just the font size and a [0, 0] position.\r\n *\r\n * Global size takes into account the Game Object\'s scale, world position and display origin.\r\n *\r\n * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#getTextBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [round] - Whether to round the results to the nearest integer.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} An object that describes the size of this Bitmap Text.\r\n */\r\n getTextBounds: function (round)\r\n {\r\n // local = The BitmapText based on fontSize and 0x0 coords\r\n // global = The BitmapText, taking into account scale and world position\r\n // lines = The BitmapText line data\r\n\r\n if (this._dirty)\r\n {\r\n GetBitmapTextSize(this, round, this._bounds);\r\n }\r\n\r\n return this._bounds;\r\n },\r\n\r\n /**\r\n * Changes the font this BitmapText is using to render.\r\n *\r\n * The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved,\r\n * unless overridden via the arguments.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#setFont\r\n * @since 3.11.0\r\n *\r\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\r\n * @param {number} [size] - The font size of this Bitmap Text. If not specified the current size will be used.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used.\r\n *\r\n * @return {this} This BitmapText Object.\r\n */\r\n setFont: function (key, size, align)\r\n {\r\n if (size === undefined) { size = this._fontSize; }\r\n if (align === undefined) { align = this._align; }\r\n\r\n if (key !== this.font)\r\n {\r\n var entry = this.scene.sys.cache.bitmapFont.get(key);\r\n\r\n if (entry)\r\n {\r\n this.font = key;\r\n this.fontData = entry.data;\r\n this._fontSize = size;\r\n this._align = align;\r\n\r\n this.setTexture(entry.texture, entry.frame);\r\n\r\n GetBitmapTextSize(this, false, this._bounds);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the alignment of each line of text in this BitmapText object.\r\n *\r\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\r\n * Has no effect with single-lines of text.\r\n *\r\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\r\n *\r\n * 0 = Left aligned (default)\r\n * 1 = Middle aligned\r\n * 2 = Right aligned\r\n *\r\n * The alignment position is based on the longest line of text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#align\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\n align: {\r\n\r\n set: function (value)\r\n {\r\n this._align = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._align;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The text that this Bitmap Text object displays.\r\n *\r\n * You can also use the method `setText` if you want a chainable way to change the text content.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The font size of this Bitmap Text.\r\n *\r\n * You can also use the method `setFontSize` if you want a chainable way to change the font size.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#fontSize\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n fontSize: {\r\n\r\n set: function (value)\r\n {\r\n this._fontSize = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._fontSize;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds / Removes spacing between characters.\r\n *\r\n * Can be a negative or positive number.\r\n *\r\n * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#letterSpacing\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n letterSpacing: {\r\n\r\n set: function (value)\r\n {\r\n this._letterSpacing = value;\r\n this._dirty = true;\r\n },\r\n\r\n get: function ()\r\n {\r\n return this._letterSpacing;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The width of this Bitmap Text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this bitmap text.\r\n *\r\n * @name Phaser.GameObjects.BitmapText#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n this.getTextBounds(false);\r\n\r\n return this._bounds.global.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Bitmap Text.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.JSONBitmapText} A JSON representation of this Bitmap Text.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra data is added here\r\n\r\n var data = {\r\n font: this.font,\r\n text: this.text,\r\n fontSize: this.fontSize,\r\n letterSpacing: this.letterSpacing,\r\n align: this.align\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Left align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_LEFT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_LEFT = 0;\r\n\r\n/**\r\n * Center align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_CENTER\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_CENTER = 1;\r\n\r\n/**\r\n * Right align the text characters in a multi-line BitmapText object.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ALIGN_RIGHT\r\n * @type {integer}\r\n * @since 3.11.0\r\n */\r\nBitmapText.ALIGN_RIGHT = 2;\r\n\r\n/**\r\n * Parse an XML Bitmap Font from an Atlas.\r\n *\r\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseFromAtlas\r\n * @type {function}\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\r\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\r\n * @param {string} textureKey - The key of the BitmapFont\'s texture.\r\n * @param {string} frameKey - The key of the BitmapFont texture\'s frame.\r\n * @param {string} xmlKey - The key of the XML data of the font to parse.\r\n * @param {integer} [xSpacing] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing] - The y-axis spacing to add to the line height.\r\n *\r\n * @return {boolean} Whether the parsing was successful or not.\r\n */\r\nBitmapText.ParseFromAtlas = ParseFromAtlas;\r\n\r\n/**\r\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\r\n *\r\n * @name Phaser.GameObjects.BitmapText.ParseXMLBitmapFont\r\n * @type {function}\r\n * @since 3.17.0\r\n *\r\n * @param {XMLDocument} xml - The XML Document to parse the font from.\r\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\r\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\r\n * @param {Phaser.Textures.Frame} [frame] - The texture frame to take into account while parsing.\r\n *\r\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\r\n */\r\nBitmapText.ParseXMLBitmapFont = ParseXMLBitmapFont;\r\n\r\nmodule.exports = BitmapText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n if (textLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n \r\n var textureFrame = src.frame;\r\n\r\n var chars = src.fontData.chars;\r\n var lineHeight = src.fontData.lineHeight;\r\n var letterSpacing = src._letterSpacing;\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n\r\n var charCode = 0;\r\n\r\n var glyph = null;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n\r\n var x = 0;\r\n var y = 0;\r\n\r\n var lastGlyph = null;\r\n var lastCharCode = 0;\r\n\r\n var image = src.frame.source.image;\r\n\r\n var textureX = textureFrame.cutX;\r\n var textureY = textureFrame.cutY;\r\n\r\n var scale = (src._fontSize / src.fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n ctx.translate(-src.displayOriginX, -src.displayOriginY);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n\r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n\r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n x = glyph.xOffset + xAdvance;\r\n y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x += lineOffsetX;\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.save();\r\n\r\n ctx.translate(x, y);\r\n\r\n ctx.scale(scale, scale);\r\n\r\n ctx.drawImage(image, glyphX, glyphY, glyphW, glyphH, 0, 0, glyphW, glyphH);\r\n\r\n ctx.restore();\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BitmapTextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.BitmapText.BitmapTextConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n * \r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('bitmapText', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var font = GetValue(config, 'font', '');\r\n var text = GetAdvancedValue(config, 'text', '');\r\n var size = GetAdvancedValue(config, 'size', false);\r\n var align = GetValue(config, 'align', 0);\r\n\r\n var bitmapText = new BitmapText(this.scene, 0, 0, font, text, size, align);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, bitmapText, config);\r\n\r\n return bitmapText;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapText = __webpack_require__(/*! ./BitmapText */ \"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Bitmap Text Game Object and adds it to the Scene.\r\n * \r\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\r\n * \r\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\r\n * match the font structure.\r\n * \r\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\r\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\r\n * processing the font texture in an image editor, applying fills and any other effects required.\r\n *\r\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\r\n *\r\n * To create a BitmapText data files you need a 3rd party app such as:\r\n *\r\n * BMFont (Windows, free): http://www.angelcode.com/products/bmfont/\r\n * Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner\r\n * Littera (Web-based, free): http://kvazars.com/littera/\r\n *\r\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\r\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson\r\n *\r\n * Note: This method will only be available if the Bitmap Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#bitmapText\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} font - The key of the font to use from the BitmapFont cache.\r\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\r\n * @param {number} [size] - The font size to set.\r\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\r\n *\r\n * @return {Phaser.GameObjects.BitmapText} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('bitmapText', function (x, y, font, text, size, align)\r\n{\r\n return this.displayList.add(new BitmapText(this.scene, x, y, font, text, size, align));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js?")},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BitmapTextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BitmapTextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js?')},"./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.BitmapText#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.BitmapText} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var text = src._text;\r\n var textLength = text.length;\r\n\r\n if (textLength === 0)\r\n {\r\n return;\r\n }\r\n \r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n var textureX = frame.cutX;\r\n var textureY = frame.cutY;\r\n var textureWidth = texture.width;\r\n var textureHeight = texture.height;\r\n\r\n var tintEffect = (src._isTinted && src.tintFill);\r\n var tintTL = Utils.getTintAppendFloatAlpha(src._tintTL, camera.alpha * src._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(src._tintTR, camera.alpha * src._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(src._tintBL, camera.alpha * src._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(src._tintBR, camera.alpha * src._alphaBR);\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var xAdvance = 0;\r\n var yAdvance = 0;\r\n var charCode = 0;\r\n var lastCharCode = 0;\r\n var letterSpacing = src._letterSpacing;\r\n var glyph;\r\n var glyphX = 0;\r\n var glyphY = 0;\r\n var glyphW = 0;\r\n var glyphH = 0;\r\n var lastGlyph;\r\n\r\n var fontData = src.fontData;\r\n var chars = fontData.chars;\r\n var lineHeight = fontData.lineHeight;\r\n var scale = (src._fontSize / fontData.size);\r\n\r\n var align = src._align;\r\n var currentLine = 0;\r\n var lineOffsetX = 0;\r\n\r\n // Update the bounds - skipped internally if not dirty\r\n src.getTextBounds(false);\r\n\r\n var lineData = src._bounds.lines;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[0]);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var i = 0; i < textLength; i++)\r\n {\r\n charCode = text.charCodeAt(i);\r\n\r\n // Carriage-return\r\n if (charCode === 10)\r\n {\r\n currentLine++;\r\n\r\n if (align === 1)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]) / 2;\r\n }\r\n else if (align === 2)\r\n {\r\n lineOffsetX = (lineData.longest - lineData.lengths[currentLine]);\r\n }\r\n \r\n xAdvance = 0;\r\n yAdvance += lineHeight;\r\n lastGlyph = null;\r\n \r\n continue;\r\n }\r\n\r\n glyph = chars[charCode];\r\n\r\n if (!glyph)\r\n {\r\n continue;\r\n }\r\n\r\n glyphX = textureX + glyph.x;\r\n glyphY = textureY + glyph.y;\r\n\r\n glyphW = glyph.width;\r\n glyphH = glyph.height;\r\n\r\n var x = glyph.xOffset + xAdvance;\r\n var y = glyph.yOffset + yAdvance;\r\n\r\n if (lastGlyph !== null)\r\n {\r\n var kerningOffset = glyph.kerning[lastCharCode];\r\n x += (kerningOffset !== undefined) ? kerningOffset : 0;\r\n }\r\n\r\n xAdvance += glyph.xAdvance + letterSpacing;\r\n lastGlyph = glyph;\r\n lastCharCode = charCode;\r\n\r\n // Nothing to render or a space? Then skip to the next glyph\r\n if (glyphW === 0 || glyphH === 0 || charCode === 32)\r\n {\r\n continue;\r\n }\r\n\r\n x *= scale;\r\n y *= scale;\r\n\r\n x -= src.displayOriginX;\r\n y -= src.displayOriginY;\r\n\r\n x += lineOffsetX;\r\n\r\n var u0 = glyphX / textureWidth;\r\n var v0 = glyphY / textureHeight;\r\n var u1 = (glyphX + glyphW) / textureWidth;\r\n var v1 = (glyphY + glyphH) / textureHeight;\r\n\r\n var xw = x + (glyphW * scale);\r\n var yh = y + (glyphH * scale);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n }\r\n};\r\n\r\nmodule.exports = BitmapTextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Blitter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlitterRender = __webpack_require__(/*! ./BlitterRender */ "./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js");\r\nvar Bob = __webpack_require__(/*! ./Bob */ "./node_modules/phaser/src/gameobjects/blitter/Bob.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar List = __webpack_require__(/*! ../../structs/List */ "./node_modules/phaser/src/structs/List.js");\r\n\r\n/**\r\n * @callback CreateCallback\r\n *\r\n * @param {Phaser.GameObjects.Bob} bob - The Bob that was created by the Blitter.\r\n * @param {integer} index - The position of the Bob within the Blitter display list.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Blitter Game Object.\r\n *\r\n * The Blitter Game Object is a special kind of container that creates, updates and manages Bob objects.\r\n * Bobs are designed for rendering speed rather than flexibility. They consist of a texture, or frame from a texture,\r\n * a position and an alpha value. You cannot scale or rotate them. They use a batched drawing method for speed\r\n * during rendering.\r\n *\r\n * A Blitter Game Object has one texture bound to it. Bobs created by the Blitter can use any Frame from this\r\n * Texture to render with, but they cannot use any other Texture. It is this single texture-bind that allows\r\n * them their speed.\r\n *\r\n * If you have a need to blast a large volume of frames around the screen then Blitter objects are well worth\r\n * investigating. They are especially useful for using as a base for your own special effects systems.\r\n *\r\n * @class Blitter\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\r\n * @param {number} [x=0] - The x coordinate of this Game Object in world space.\r\n * @param {number} [y=0] - The y coordinate of this Game Object in world space.\r\n * @param {string} [texture=\'__DEFAULT\'] - The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager.\r\n * @param {(string|integer)} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.\r\n */\r\nvar Blitter = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n BlitterRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Blitter (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Blitter\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The children of this Blitter.\r\n * This List contains all of the Bob objects created by the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Blitter#children\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.children = new List();\r\n\r\n /**\r\n * A transient array that holds all of the Bobs that will be rendered this frame.\r\n * The array is re-populated whenever the dirty flag is set.\r\n *\r\n * @name Phaser.GameObjects.Blitter#renderList\r\n * @type {Phaser.GameObjects.Bob[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderList = [];\r\n\r\n /**\r\n * Is the Blitter considered dirty?\r\n * A \'dirty\' Blitter has had its child count changed since the last frame.\r\n *\r\n * @name Phaser.GameObjects.Blitter#dirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Creates a new Bob in this Blitter.\r\n *\r\n * The Bob is created at the given coordinates, relative to the Blitter and uses the given frame.\r\n * A Bob can use any frame belonging to the texture bound to the Blitter.\r\n *\r\n * @method Phaser.GameObjects.Blitter#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n * @param {integer} [index] - The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list.\r\n *\r\n * @return {Phaser.GameObjects.Bob} The newly created Bob object.\r\n */\r\n create: function (x, y, frame, visible, index)\r\n {\r\n if (visible === undefined) { visible = true; }\r\n if (index === undefined) { index = this.children.length; }\r\n\r\n if (frame === undefined)\r\n {\r\n frame = this.frame;\r\n }\r\n else if (!(frame instanceof Frame))\r\n {\r\n frame = this.texture.get(frame);\r\n }\r\n\r\n var bob = new Bob(this, x, y, frame, visible);\r\n\r\n this.children.addAt(bob, index, false);\r\n\r\n this.dirty = true;\r\n\r\n return bob;\r\n },\r\n\r\n /**\r\n * Creates multiple Bob objects within this Blitter and then passes each of them to the specified callback.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createFromCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CreateCallback} callback - The callback to invoke after creating a bob. It will be sent two arguments: The Bob and the index of the Bob.\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createFromCallback: function (callback, quantity, frame, visible)\r\n {\r\n var bobs = this.createMultiple(quantity, frame, visible);\r\n\r\n for (var i = 0; i < bobs.length; i++)\r\n {\r\n var bob = bobs[i];\r\n\r\n callback.call(this, bob, i);\r\n }\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Creates multiple Bobs in one call.\r\n *\r\n * The amount created is controlled by a combination of the `quantity` argument and the number of frames provided.\r\n *\r\n * If the quantity is set to 10 and you provide 2 frames, then 20 Bobs will be created. 10 with the first\r\n * frame and 10 with the second.\r\n *\r\n * @method Phaser.GameObjects.Blitter#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The quantity of Bob objects to create.\r\n * @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.\r\n * @param {boolean} [visible=true] - Should the created Bob render or not?\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.\r\n */\r\n createMultiple: function (quantity, frame, visible)\r\n {\r\n if (frame === undefined) { frame = this.frame.name; }\r\n if (visible === undefined) { visible = true; }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n\r\n var bobs = [];\r\n var _this = this;\r\n\r\n frame.forEach(function (singleFrame)\r\n {\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n bobs.push(_this.create(0, 0, singleFrame, visible));\r\n }\r\n });\r\n\r\n return bobs;\r\n },\r\n\r\n /**\r\n * Checks if the given child can render or not, by checking its `visible` and `alpha` values.\r\n *\r\n * @method Phaser.GameObjects.Blitter#childCanRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Bob} child - The Bob to check for rendering.\r\n *\r\n * @return {boolean} Returns `true` if the given child can render, otherwise `false`.\r\n */\r\n childCanRender: function (child)\r\n {\r\n return (child.visible && child.alpha > 0);\r\n },\r\n\r\n /**\r\n * Returns an array of Bobs to be rendered.\r\n * If the Blitter is dirty then a new list is generated and stored in `renderList`.\r\n *\r\n * @method Phaser.GameObjects.Blitter#getRenderList\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob[]} An array of Bob objects that will be rendered this frame.\r\n */\r\n getRenderList: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n this.renderList = this.children.list.filter(this.childCanRender, this);\r\n this.dirty = false;\r\n }\r\n\r\n return this.renderList;\r\n },\r\n\r\n /**\r\n * Removes all Bobs from the children List and clears the dirty flag.\r\n *\r\n * @method Phaser.GameObjects.Blitter#clear\r\n * @since 3.0.0\r\n */\r\n clear: function ()\r\n {\r\n this.children.removeAll();\r\n this.dirty = true;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Blitter#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.children.destroy();\r\n\r\n this.renderList = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Blitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Blitter.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n var cameraScrollX = src.x - camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = src.y - camera.scrollY * src.scrollFactorY;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n parentMatrix.copyToContext(ctx);\r\n }\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n // Render bobs\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var bob = list[i];\r\n var flip = (bob.flipX || bob.flipY);\r\n var frame = bob.frame;\r\n var cd = frame.canvasData;\r\n var dx = frame.x;\r\n var dy = frame.y;\r\n var fx = 1;\r\n var fy = 1;\r\n\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n ctx.globalAlpha = bobAlpha;\r\n \r\n if (!flip)\r\n {\r\n if (roundPixels)\r\n {\r\n dx = Math.round(dx);\r\n dy = Math.round(dy);\r\n }\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n dx + bob.x + cameraScrollX,\r\n dy + bob.y + cameraScrollY,\r\n cd.width,\r\n cd.height\r\n );\r\n }\r\n else\r\n {\r\n if (bob.flipX)\r\n {\r\n fx = -1;\r\n dx -= cd.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n fy = -1;\r\n dy -= cd.height;\r\n }\r\n\r\n ctx.save();\r\n ctx.translate(bob.x + cameraScrollX, bob.y + cameraScrollY);\r\n ctx.scale(fx, fy);\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, dx, dy, cd.width, cd.height);\r\n ctx.restore();\r\n }\r\n }\r\n \r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = BlitterCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('blitter', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var blitter = new Blitter(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, blitter, config);\r\n\r\n return blitter;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Blitter = __webpack_require__(/*! ./Blitter */ \"./node_modules/phaser/src/gameobjects/blitter/Blitter.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Blitter Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Blitter Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#blitter\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Game Object.\r\n * @param {number} y - The y position of the Game Object.\r\n * @param {string} key - The key of the Texture the Blitter object will use.\r\n * @param {(string|integer)} [frame] - The default Frame children of the Blitter will use.\r\n * \r\n * @return {Phaser.GameObjects.Blitter} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('blitter', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Blitter(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js?")},"./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./BlitterWebGLRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./BlitterCanvasRenderer */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js?')},"./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Blitter#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Blitter} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar BlitterWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var list = src.getRenderList();\r\n\r\n if (list.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var cameraScrollX = camera.scrollX * src.scrollFactorX;\r\n var cameraScrollY = camera.scrollY * src.scrollFactorY;\r\n\r\n var calcMatrix = pipeline._tempMatrix1;\r\n\r\n calcMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n calcMatrix.multiplyWithOffset(parentMatrix, -cameraScrollX, -cameraScrollY);\r\n\r\n cameraScrollX = 0;\r\n cameraScrollY = 0;\r\n }\r\n\r\n var blitterX = src.x - cameraScrollX;\r\n var blitterY = src.y - cameraScrollY;\r\n var prevTextureSourceIndex = -1;\r\n var tintEffect = false;\r\n var alpha = camera.alpha * src.alpha;\r\n var roundPixels = camera.roundPixels;\r\n\r\n for (var index = 0; index < list.length; index++)\r\n {\r\n var bob = list[index];\r\n var frame = bob.frame;\r\n var bobAlpha = bob.alpha * alpha;\r\n\r\n if (bobAlpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var width = frame.width;\r\n var height = frame.height;\r\n\r\n var x = blitterX + bob.x + frame.x;\r\n var y = blitterY + bob.y + frame.y;\r\n\r\n if (bob.flipX)\r\n {\r\n width *= -1;\r\n x += frame.width;\r\n }\r\n\r\n if (bob.flipY)\r\n {\r\n height *= -1;\r\n y += frame.height;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(xw, yh);\r\n var ty1 = calcMatrix.getY(xw, yh);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, bobAlpha);\r\n\r\n // Bind texture only if the Texture Source is different from before\r\n if (frame.sourceIndex !== prevTextureSourceIndex)\r\n {\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n\r\n prevTextureSourceIndex = frame.sourceIndex;\r\n }\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n }\r\n\r\n // TL x/y, BL x/y, BR x/y, TR x/y\r\n if (pipeline.batchQuad(tx0, ty0, tx0, ty1, tx1, ty1, tx1, ty0, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, frame.glTexture, 0))\r\n {\r\n prevTextureSourceIndex = -1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = BlitterWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/blitter/Bob.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ "./node_modules/phaser/src/textures/Frame.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Bob Game Object.\r\n *\r\n * A Bob belongs to a Blitter Game Object. The Blitter is responsible for managing and rendering this object.\r\n *\r\n * A Bob has a position, alpha value and a frame from a texture that it uses to render with. You can also toggle\r\n * the flipped and visible state of the Bob. The Frame the Bob uses to render can be changed dynamically, but it\r\n * must be a Frame within the Texture used by the parent Blitter.\r\n *\r\n * Bob positions are relative to the Blitter parent. So if you move the Blitter parent, all Bob children will\r\n * have their positions impacted by this change as well.\r\n *\r\n * You can manipulate Bob objects directly from your game code, but the creation and destruction of them should be\r\n * handled via the Blitter parent.\r\n *\r\n * @class Bob\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob.\r\n * @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position.\r\n * @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.\r\n * @param {boolean} visible - Should the Bob render visible or not to start with?\r\n */\r\nvar Bob = new Class({\r\n\r\n initialize:\r\n\r\n function Bob (blitter, x, y, frame, visible)\r\n {\r\n /**\r\n * The Blitter object that this Bob belongs to.\r\n *\r\n * @name Phaser.GameObjects.Bob#parent\r\n * @type {Phaser.GameObjects.Blitter}\r\n * @since 3.0.0\r\n */\r\n this.parent = blitter;\r\n\r\n /**\r\n * The x position of this Bob, relative to the x position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of this Bob, relative to the y position of the Blitter.\r\n *\r\n * @name Phaser.GameObjects.Bob#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The frame that the Bob uses to render with.\r\n * To change the frame use the `Bob.setFrame` method.\r\n *\r\n * @name Phaser.GameObjects.Bob#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n this.frame = frame;\r\n\r\n /**\r\n * A blank object which can be used to store data related to this Bob in.\r\n *\r\n * @name Phaser.GameObjects.Bob#data\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.data = {};\r\n\r\n /**\r\n * The visible state of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_visible\r\n * @type {boolean}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._visible = visible;\r\n\r\n /**\r\n * The alpha value of this Bob.\r\n *\r\n * @name Phaser.GameObjects.Bob#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._alpha = 1;\r\n\r\n /**\r\n * The horizontally flipped state of the Bob.\r\n * A Bob that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipX\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipX = false;\r\n\r\n /**\r\n * The vertically flipped state of the Bob.\r\n * A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture.\r\n *\r\n * @name Phaser.GameObjects.Bob#flipY\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.flipY = false;\r\n },\r\n\r\n /**\r\n * Changes the Texture Frame being used by this Bob.\r\n * The frame must be part of the Texture the parent Blitter is using.\r\n * If no value is given it will use the default frame of the Blitter parent.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFrame: function (frame)\r\n {\r\n if (frame === undefined)\r\n {\r\n this.frame = this.parent.frame;\r\n }\r\n else if (frame instanceof Frame && frame.texture === this.parent.texture)\r\n {\r\n this.frame = frame;\r\n }\r\n else\r\n {\r\n this.frame = this.parent.texture.get(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state.\r\n *\r\n * @method Phaser.GameObjects.Bob#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Bob.\r\n *\r\n * Changes the position to the values given, and optionally changes the frame.\r\n *\r\n * Also resets the flipX and flipY values, sets alpha back to 1 and visible to true.\r\n *\r\n * @method Phaser.GameObjects.Bob#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.\r\n * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n reset: function (x, y, frame)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n this._alpha = 1;\r\n this._visible = true;\r\n\r\n this.parent.dirty = true;\r\n\r\n if (frame)\r\n {\r\n this.setFrame(frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Bob.\r\n *\r\n * @method Phaser.GameObjects.Bob#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Bob. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @method Phaser.GameObjects.Bob#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The alpha value used for this Bob. Between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.Bob} This Bob Game Object.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Bob instance.\r\n * Removes itself from the Blitter and clears the parent, frame and data properties.\r\n *\r\n * @method Phaser.GameObjects.Bob#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent.dirty = true;\r\n\r\n this.parent.children.remove(this);\r\n\r\n this.parent = undefined;\r\n this.frame = undefined;\r\n this.data = undefined;\r\n },\r\n\r\n /**\r\n * The visible state of the Bob.\r\n * \r\n * An invisible Bob will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._visible = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value of the Bob, between 0 and 1.\r\n * \r\n * A Bob with alpha 0 will skip rendering.\r\n *\r\n * @name Phaser.GameObjects.Bob#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._alpha = value;\r\n this.parent.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Bob;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/blitter/Bob.js?')},"./node_modules/phaser/src/gameobjects/components/Alpha.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 2; // 0010\r\n\r\n/**\r\n * Provides methods used for setting the alpha properties of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Alpha\r\n * @since 3.0.0\r\n */\r\n\r\nvar Alpha = {\r\n\r\n /**\r\n * Private internal value. Holds the global alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alpha\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alpha: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the top-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaTR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaTR: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBL\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBL: 1,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right alpha value.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#_alphaBR\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _alphaBR: 1,\r\n\r\n /**\r\n * Clears all alpha values associated with this Game Object.\r\n *\r\n * Immediately sets the alpha levels back to 1 (fully opaque).\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#clearAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearAlpha: function ()\r\n {\r\n return this.setAlpha(1);\r\n },\r\n\r\n /**\r\n * Set the Alpha level of this Game Object. The alpha controls the opacity of the Game Object as it renders.\r\n * Alpha values are provided as a float between 0, fully transparent, and 1, fully opaque.\r\n *\r\n * If your game is running under WebGL you can optionally specify four different alpha values, each of which\r\n * correspond to the four corners of the Game Object. Under Canvas only the `topLeft` value given is used.\r\n *\r\n * @method Phaser.GameObjects.Components.Alpha#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} [topLeft=1] - The alpha value used for the top-left of the Game Object. If this is the only value given it\'s applied across the whole Game Object.\r\n * @param {number} [topRight] - The alpha value used for the top-right of the Game Object. WebGL only.\r\n * @param {number} [bottomLeft] - The alpha value used for the bottom-left of the Game Object. WebGL only.\r\n * @param {number} [bottomRight] - The alpha value used for the bottom-right of the Game Object. WebGL only.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAlpha: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 1; }\r\n\r\n // Treat as if there is only one alpha value for the whole Game Object\r\n if (topRight === undefined)\r\n {\r\n this.alpha = topLeft;\r\n }\r\n else\r\n {\r\n this._alphaTL = Clamp(topLeft, 0, 1);\r\n this._alphaTR = Clamp(topRight, 0, 1);\r\n this._alphaBL = Clamp(bottomLeft, 0, 1);\r\n this._alphaBR = Clamp(bottomRight, 0, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The alpha value of the Game Object.\r\n *\r\n * This is a global value, impacting the entire Game Object, not just a region of it.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n alpha: {\r\n\r\n get: function ()\r\n {\r\n return this._alpha;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alpha = v;\r\n this._alphaTL = v;\r\n this._alphaTR = v;\r\n this._alphaBL = v;\r\n this._alphaBR = v;\r\n\r\n if (v === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaTopRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaTR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomLeft\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBL = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The alpha value starting from the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Alpha#alphaBottomRight\r\n * @type {number}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n alphaBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._alphaBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var v = Clamp(value, 0, 1);\r\n\r\n this._alphaBR = v;\r\n\r\n if (v !== 0)\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Alpha;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Alpha.js?')},"./node_modules/phaser/src/gameobjects/components/Animation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseAnimation = __webpack_require__(/*! ../../animations/Animation */ \"./node_modules/phaser/src/animations/Animation.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../../animations/events */ \"./node_modules/phaser/src/animations/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Game Object Animation Controller.\r\n *\r\n * This controller lives as an instance within a Game Object, accessible as `sprite.anims`.\r\n *\r\n * @class Animation\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} parent - The Game Object to which this animation controller belongs.\r\n */\r\nvar Animation = new Class({\r\n\r\n initialize:\r\n\r\n function Animation (parent)\r\n {\r\n /**\r\n * The Game Object to which this animation controller belongs.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#parent\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#animationManager\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.animationManager = parent.scene.sys.anims;\r\n\r\n this.animationManager.once(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n /**\r\n * Is an animation currently playing or not?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * The current Animation loaded into this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentAnim\r\n * @type {?Phaser.Animations.Animation}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentAnim = null;\r\n\r\n /**\r\n * The current AnimationFrame being displayed by this Animation Controller.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#currentFrame\r\n * @type {?Phaser.Animations.AnimationFrame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFrame = null;\r\n\r\n /**\r\n * The key of the next Animation to be loaded into this Animation Controller when the current animation completes.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextAnim\r\n * @type {?string}\r\n * @default null\r\n * @since 3.16.0\r\n */\r\n this.nextAnim = null;\r\n\r\n /**\r\n * Time scale factor.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_timeScale\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._timeScale = 1;\r\n\r\n /**\r\n * The frame rate of playback in frames per second.\r\n * The default is 24 if the `duration` property is `null`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#frameRate\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameRate = 0;\r\n\r\n /**\r\n * How long the animation should play for, in milliseconds.\r\n * If the `frameRate` property has been set then it overrides this value,\r\n * otherwise the `frameRate` is derived from `duration`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * ms per frame, not including frame specific modifiers that may be present in the Animation data.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#msPerFrame\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.msPerFrame = 0;\r\n\r\n /**\r\n * Skip frames if the time lags, or always advanced anyway?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#skipMissedFrames\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.skipMissedFrames = true;\r\n\r\n /**\r\n * A delay before starting playback, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_delay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._delay = 0;\r\n\r\n /**\r\n * Number of times to repeat the animation (-1 for infinity)\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeat\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeat = 0;\r\n\r\n /**\r\n * Delay before the repeat starts, in milliseconds.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_repeatDelay\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._repeatDelay = 0;\r\n\r\n /**\r\n * Should the animation yoyo? (reverse back down to the start) before repeating?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_yoyo\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._yoyo = false;\r\n\r\n /**\r\n * Will the playhead move forwards (`true`) or in reverse (`false`).\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#forward\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.forward = true;\r\n\r\n /**\r\n * An Internal trigger that's play the animation in reverse mode ('true') or not ('false'),\r\n * needed because forward can be changed by yoyo feature.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_reverse\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._reverse = false;\r\n\r\n /**\r\n * Internal time overflow accumulator.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#accumulator\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accumulator = 0;\r\n\r\n /**\r\n * The time point at which the next animation frame will change.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#nextTick\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.nextTick = 0;\r\n\r\n /**\r\n * An internal counter keeping track of how many repeats are left to play.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#repeatCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCounter = 0;\r\n\r\n /**\r\n * An internal flag keeping track of pending repeats.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#pendingRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRepeat = false;\r\n\r\n /**\r\n * Is the Animation paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_paused\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._paused = false;\r\n\r\n /**\r\n * Was the animation previously playing before being paused?\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_wasPlaying\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._wasPlaying = false;\r\n\r\n /**\r\n * Internal property tracking if this Animation is waiting to stop.\r\n *\r\n * 0 = No\r\n * 1 = Waiting for ms to pass\r\n * 2 = Waiting for repeat\r\n * 3 = Waiting for specific frame\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStop\r\n * @type {integer}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStop = 0;\r\n\r\n /**\r\n * Internal property used by _pendingStop.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#_pendingStopValue\r\n * @type {any}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._pendingStopValue;\r\n },\r\n\r\n /**\r\n * Sets an animation to be played immediately after the current one completes.\r\n * \r\n * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it.\r\n * \r\n * An animation set to repeat forever will never enter a completed state.\r\n * \r\n * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback).\r\n * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing.\r\n * \r\n * Call this method with no arguments to reset the chained animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#chain\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} [key] - The string-based key of the animation to play next, as defined previously in the Animation Manager. Or an Animation instance.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n chain: function (key)\r\n {\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n this.nextAnim = key;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the amount of time, in milliseconds, that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setDelay\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [value=0] - The amount of time, in milliseconds, to wait before starting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setDelay: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this._delay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of time, in milliseconds that the animation will be delayed before starting playback.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getDelay\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The amount of time, in milliseconds, the Animation will wait before starting playback.\r\n */\r\n getDelay: function ()\r\n {\r\n return this._delay;\r\n },\r\n\r\n /**\r\n * Waits for the specified delay, in milliseconds, then starts playback of the requested animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#delayedPlay\r\n * @since 3.0.0\r\n *\r\n * @param {integer} delay - The delay, in milliseconds, to wait before starting the animation playing.\r\n * @param {string} key - The key of the animation to play.\r\n * @param {integer} [startFrame=0] - The frame of the animation to start from.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n delayedPlay: function (delay, key, startFrame)\r\n {\r\n this.play(key, true, startFrame);\r\n\r\n this.nextTick += delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns the key of the animation currently loaded into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getCurrentKey\r\n * @since 3.0.0\r\n *\r\n * @return {string} The key of the Animation loaded into this component.\r\n */\r\n getCurrentKey: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n return this.currentAnim.key;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used to load an animation into this component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#load\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the animation to load.\r\n * @param {integer} [startFrame=0] - The start frame of the animation to load.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n load: function (key, startFrame)\r\n {\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stop();\r\n }\r\n\r\n // Load the new animation in\r\n this.animationManager.load(this, key, startFrame);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Pause the current animation and set the `isPlaying` property to `false`.\r\n * You can optionally pause it at a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#pause\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [atFrame] - An optional frame to set after pausing the animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n pause: function (atFrame)\r\n {\r\n if (!this._paused)\r\n {\r\n this._paused = true;\r\n this._wasPlaying = this.isPlaying;\r\n this.isPlaying = false;\r\n }\r\n\r\n if (atFrame !== undefined)\r\n {\r\n this.updateFrame(atFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Resumes playback of a paused animation and sets the `isPlaying` property to `true`.\r\n * You can optionally tell it to start playback from a specific frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#resume\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} [fromFrame] - An optional frame to set before restarting playback.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n resume: function (fromFrame)\r\n {\r\n if (this._paused)\r\n {\r\n this._paused = false;\r\n this.isPlaying = this._wasPlaying;\r\n }\r\n\r\n if (fromFrame !== undefined)\r\n {\r\n this.updateFrame(fromFrame);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * `true` if the current animation is paused, otherwise `false`.\r\n *\r\n * @name Phaser.GameObjects.Components.Animation#isPaused\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.4.0\r\n */\r\n isPaused: {\r\n\r\n get: function ()\r\n {\r\n return this._paused;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Plays an Animation on a Game Object that has the Animation component, such as a Sprite.\r\n * \r\n * Animations are stored in the global Animation Manager and are referenced by a unique string-based key.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#play\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If this animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = true;\r\n this._reverse = false;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Plays an Animation (in reverse mode) on the Game Object that owns this Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#playReverse\r\n * @fires Phaser.GameObjects.Components.Animation#onStartEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Animations.Animation)} key - The string-based key of the animation to play, as defined previously in the Animation Manager. Or an Animation instance.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n playReverse: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n if (ignoreIfPlaying === undefined) { ignoreIfPlaying = false; }\r\n if (startFrame === undefined) { startFrame = 0; }\r\n\r\n if (key instanceof BaseAnimation)\r\n {\r\n key = key.key;\r\n }\r\n\r\n if (ignoreIfPlaying && this.isPlaying && this.currentAnim.key === key)\r\n {\r\n return this.parent;\r\n }\r\n\r\n this.forward = false;\r\n this._reverse = true;\r\n\r\n return this._startAnimation(key, startFrame);\r\n },\r\n\r\n /**\r\n * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#_startAnimation\r\n * @fires Phaser.Animations.Events#START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n _startAnimation: function (key, startFrame)\r\n {\r\n this.load(key, startFrame);\r\n\r\n var anim = this.currentAnim;\r\n var gameObject = this.parent;\r\n\r\n if (!anim)\r\n {\r\n return gameObject;\r\n }\r\n\r\n // Should give us 9,007,199,254,740,991 safe repeats\r\n this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;\r\n\r\n anim.getFirstTick(this);\r\n\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n\r\n if (anim.showOnStart)\r\n {\r\n gameObject.visible = true;\r\n }\r\n\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_START, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_START + key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_START, anim, frame, gameObject);\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Reverse the Animation that is already playing on the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#reverse\r\n * @since 3.12.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n reverse: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n this._reverse = !this._reverse;\r\n\r\n this.forward = !this.forward;\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Returns a value between 0 and 1 indicating how far this animation is through, ignoring repeats and yoyos.\r\n * If the animation has a non-zero repeat defined, `getProgress` and `getTotalProgress` will be different\r\n * because `getProgress` doesn't include any repeats or repeat delays, whereas `getTotalProgress` does.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getProgress\r\n * @since 3.4.0\r\n *\r\n * @return {number} The progress of the current animation, between 0 and 1.\r\n */\r\n getProgress: function ()\r\n {\r\n var p = this.currentFrame.progress;\r\n\r\n if (!this.forward)\r\n {\r\n p = 1 - p;\r\n }\r\n\r\n return p;\r\n },\r\n\r\n /**\r\n * Takes a value between 0 and 1 and uses it to set how far this animation is through playback.\r\n * Does not factor in repeats or yoyos, but does handle playing forwards or backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setProgress\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=0] - The progress value, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setProgress: function (value)\r\n {\r\n if (!this.forward)\r\n {\r\n value = 1 - value;\r\n }\r\n\r\n this.setCurrentFrame(this.currentAnim.getFrameByProgress(value));\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Handle the removal of an animation from the Animation Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#remove\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key of the removed Animation.\r\n * @param {Phaser.Animations.Animation} [animation] - The removed Animation.\r\n */\r\n remove: function (key, animation)\r\n {\r\n if (animation === undefined) { animation = this.currentAnim; }\r\n\r\n if (this.isPlaying && animation.key === this.currentAnim.key)\r\n {\r\n this.stop();\r\n\r\n this.setCurrentFrame(this.currentAnim.frames[0]);\r\n }\r\n },\r\n\r\n /**\r\n * Gets the number of times that the animation will repeat\r\n * after its first iteration. For example, if returns 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * A value of -1 means the animation will repeat indefinitely.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeat\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The number of times that the animation will repeat.\r\n */\r\n getRepeat: function ()\r\n {\r\n return this._repeat;\r\n },\r\n\r\n /**\r\n * Sets the number of times that the animation should repeat\r\n * after its first iteration. For example, if repeat is 1, the animation will\r\n * play a total of twice (the initial play plus 1 repeat).\r\n * To repeat indefinitely, use -1. repeat should always be an integer.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeat\r\n * @since 3.4.0\r\n *\r\n * @param {integer} value - The number of times that the animation should repeat.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeat: function (value)\r\n {\r\n this._repeat = value;\r\n\r\n this.repeatCounter = (value === -1) ? Number.MAX_VALUE : value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the amount of delay between repeats, if any.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delay between repeats.\r\n */\r\n getRepeatDelay: function ()\r\n {\r\n return this._repeatDelay;\r\n },\r\n\r\n /**\r\n * Sets the amount of time in seconds between repeats.\r\n * For example, if `repeat` is 2 and `repeatDelay` is 10, the animation will play initially,\r\n * then wait for 10 seconds before repeating, then play again, then wait another 10 seconds\r\n * before doing its final repeat.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setRepeatDelay\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The delay to wait between repeats, in seconds.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setRepeatDelay: function (value)\r\n {\r\n this._repeatDelay = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Restarts the current animation from its beginning, optionally including its delay value.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#restart\r\n * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n restart: function (includeDelay)\r\n {\r\n if (includeDelay === undefined) { includeDelay = false; }\r\n\r\n var anim = this.currentAnim;\r\n\r\n anim.getFirstTick(this, includeDelay);\r\n\r\n this.forward = true;\r\n this.isPlaying = true;\r\n this.pendingRepeat = false;\r\n this._paused = false;\r\n\r\n // Set frame\r\n this.updateFrame(anim.frames[0]);\r\n\r\n var gameObject = this.parent;\r\n var frame = this.currentFrame;\r\n\r\n anim.emit(Events.ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_RESTART + anim.key, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_RESTART, anim, frame, gameObject);\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Immediately stops the current animation from playing and dispatches the `animationcomplete` event.\r\n * \r\n * If no animation is set, no event will be dispatched.\r\n * \r\n * If there is another animation queued (via the `chain` method) then it will start playing immediately.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stop\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stop: function ()\r\n {\r\n this._pendingStop = 0;\r\n\r\n this.isPlaying = false;\r\n\r\n var gameObject = this.parent;\r\n var anim = this.currentAnim;\r\n var frame = this.currentFrame;\r\n\r\n if (anim)\r\n {\r\n anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject);\r\n \r\n gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject);\r\n }\r\n\r\n if (this.nextAnim)\r\n {\r\n var key = this.nextAnim;\r\n\r\n this.nextAnim = null;\r\n\r\n this.play(key);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing after the specified time delay, given in milliseconds.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopAfterDelay\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {integer} delay - The number of milliseconds to wait before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopAfterDelay: function (delay)\r\n {\r\n this._pendingStop = 1;\r\n this._pendingStopValue = delay;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next repeats.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnRepeat\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnRepeat: function ()\r\n {\r\n this._pendingStop = 2;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Stops the current animation from playing when it next sets the given frame.\r\n * If this frame doesn't exist within the animation it will not stop it from playing.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#stopOnFrame\r\n * @fires Phaser.GameObjects.Components.Animation#onCompleteEvent\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} frame - The frame to check before stopping this animation.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n stopOnFrame: function (frame)\r\n {\r\n this._pendingStop = 3;\r\n this._pendingStopValue = frame;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets the Time Scale factor, allowing you to make the animation go go faster or slower than default.\r\n * Where 1 = normal speed (the default), 0.5 = half speed, 2 = double speed, etc.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setTimeScale\r\n * @since 3.4.0\r\n *\r\n * @param {number} [value=1] - The time scale factor, where 1 is no change, 0.5 is half speed, etc.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that owns this Animation Component.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n if (value === undefined) { value = 1; }\r\n\r\n this._timeScale = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets the Time Scale factor.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTimeScale\r\n * @since 3.4.0\r\n *\r\n * @return {number} The Time Scale value.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this._timeScale;\r\n },\r\n\r\n /**\r\n * Returns the total number of frames in this animation.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getTotalFrames\r\n * @since 3.4.0\r\n *\r\n * @return {integer} The total number of frames in this animation.\r\n */\r\n getTotalFrames: function ()\r\n {\r\n return this.currentAnim.frames.length;\r\n },\r\n\r\n /**\r\n * The internal update loop for the Animation Component.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.currentAnim || !this.isPlaying || this.currentAnim.paused)\r\n {\r\n return;\r\n }\r\n\r\n this.accumulator += delta * this._timeScale;\r\n\r\n if (this._pendingStop === 1)\r\n {\r\n this._pendingStopValue -= delta;\r\n\r\n if (this._pendingStopValue <= 0)\r\n {\r\n return this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n\r\n if (this.accumulator >= this.nextTick)\r\n {\r\n this.currentAnim.setFrame(this);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the given Animation Frame as being the current frame\r\n * and applies it to the parent Game Object, adjusting its size and origin as needed.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setCurrentFrame\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The Animation Frame to set as being current.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setCurrentFrame: function (animationFrame)\r\n {\r\n var gameObject = this.parent;\r\n\r\n this.currentFrame = animationFrame;\r\n\r\n gameObject.texture = animationFrame.frame.texture;\r\n gameObject.frame = animationFrame.frame;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n gameObject.frame.updateCropUVs(gameObject._crop, gameObject.flipX, gameObject.flipY);\r\n }\r\n\r\n gameObject.setSizeToFrame();\r\n\r\n if (animationFrame.frame.customPivot)\r\n {\r\n gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY);\r\n }\r\n else\r\n {\r\n gameObject.updateDisplayOrigin();\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Internal frame change handler.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#updateFrame\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT\r\n * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Animations.AnimationFrame} animationFrame - The animation frame to change to.\r\n */\r\n updateFrame: function (animationFrame)\r\n {\r\n var gameObject = this.setCurrentFrame(animationFrame);\r\n\r\n if (this.isPlaying)\r\n {\r\n if (animationFrame.setAlpha)\r\n {\r\n gameObject.alpha = animationFrame.alpha;\r\n }\r\n\r\n var anim = this.currentAnim;\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_KEY_UPDATE + anim.key, anim, animationFrame, gameObject);\r\n\r\n gameObject.emit(Events.SPRITE_ANIMATION_UPDATE, anim, animationFrame, gameObject);\r\n\r\n if (this._pendingStop === 3 && this._pendingStopValue === animationFrame)\r\n {\r\n this.currentAnim.completeAnimation(this);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Advances the animation to the next frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in reverse, calling this method doesn't then change the direction to forwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#nextFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n nextFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.nextFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Advances the animation to the previous frame, regardless of the time or animation state.\r\n * If the animation is set to repeat, or yoyo, this will still take effect.\r\n * \r\n * Calling this does not change the direction of the animation. I.e. if it was currently\r\n * playing in forwards, calling this method doesn't then change the direction to backwards.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#previousFrame\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n previousFrame: function ()\r\n {\r\n if (this.currentAnim)\r\n {\r\n this.currentAnim.previousFrame(this);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Sets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#setYoyo\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=false] - `true` if the animation should yoyo, `false` to not.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object this Animation Component belongs to.\r\n */\r\n setYoyo: function (value)\r\n {\r\n if (value === undefined) { value = false; }\r\n\r\n this._yoyo = value;\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Gets if the current Animation will yoyo when it reaches the end.\r\n * A yoyo'ing animation will play through consecutively, and then reverse-play back to the start again.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#getYoyo\r\n * @since 3.4.0\r\n *\r\n * @return {boolean} `true` if the animation is set to yoyo, `false` if not.\r\n */\r\n getYoyo: function ()\r\n {\r\n return this._yoyo;\r\n },\r\n\r\n /**\r\n * Destroy this Animation component.\r\n *\r\n * Unregisters event listeners and cleans up its references.\r\n *\r\n * @method Phaser.GameObjects.Components.Animation#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.animationManager.off(Events.REMOVE_ANIMATION, this.remove, this);\r\n\r\n this.animationManager = null;\r\n this.parent = null;\r\n\r\n this.currentAnim = null;\r\n this.currentFrame = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Animation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Animation.js?")},"./node_modules/phaser/src/gameobjects/components/BlendMode.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\n\r\n/**\r\n * Provides methods used for setting the blend mode of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.BlendMode\r\n * @since 3.0.0\r\n */\r\n\r\nvar BlendMode = {\r\n\r\n /**\r\n * Private internal value. Holds the current blend mode.\r\n * \r\n * @name Phaser.GameObjects.Components.BlendMode#_blendMode\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _blendMode: BlendModes.NORMAL,\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency of which blend modes\r\n * are used.\r\n *\r\n * @name Phaser.GameObjects.Components.BlendMode#blendMode\r\n * @type {(Phaser.BlendModes|string)}\r\n * @since 3.0.0\r\n */\r\n blendMode: {\r\n\r\n get: function ()\r\n {\r\n return this._blendMode;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (typeof value === 'string')\r\n {\r\n value = BlendModes[value];\r\n }\r\n\r\n value |= 0;\r\n\r\n if (value >= -1)\r\n {\r\n this._blendMode = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the Blend Mode being used by this Game Object.\r\n *\r\n * This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)\r\n *\r\n * Under WebGL only the following Blend Modes are available:\r\n *\r\n * * ADD\r\n * * MULTIPLY\r\n * * SCREEN\r\n * * ERASE (only works when rendering to a framebuffer, like a Render Texture)\r\n *\r\n * Canvas has more available depending on browser support.\r\n *\r\n * You can also create your own custom Blend Modes in WebGL.\r\n *\r\n * Blend modes have different effects under Canvas and WebGL, and from browser to browser, depending\r\n * on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these\r\n * reasons try to be careful about the construction of your Scene and the frequency in which blend modes\r\n * are used.\r\n *\r\n * @method Phaser.GameObjects.Components.BlendMode#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.BlendModes)} value - The BlendMode value. Either a string or a CONST.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setBlendMode: function (value)\r\n {\r\n this.blendMode = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BlendMode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/BlendMode.js?")},"./node_modules/phaser/src/gameobjects/components/ComputedSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for calculating and setting the size of a non-Frame based Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.ComputedSize\r\n * @since 3.0.0\r\n */\r\n\r\nvar ComputedSize = {\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.ComputedSize#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setSize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.ComputedSize#setDisplaySize\r\n * @since 3.4.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ComputedSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ComputedSize.js?")},"./node_modules/phaser/src/gameobjects/components/Crop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Crop\r\n * @since 3.12.0\r\n */\r\n\r\nvar Crop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.Crop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Crop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Crop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Crop.js?")},"./node_modules/phaser/src/gameobjects/components/Depth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the depth of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Depth\r\n * @since 3.0.0\r\n */\r\n\r\nvar Depth = {\r\n\r\n /**\r\n * Private internal value. Holds the depth of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#_depth\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _depth: 0,\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @name Phaser.GameObjects.Components.Depth#depth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n depth: {\r\n\r\n get: function ()\r\n {\r\n return this._depth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scene.sys.queueDepthSort();\r\n this._depth = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The depth of this Game Object within the Scene.\r\n * \r\n * The depth is also known as the 'z-index' in some environments, and allows you to change the rendering order\r\n * of Game Objects, without actually moving their position in the display list.\r\n *\r\n * The depth starts from zero (the default value) and increases from that point. A Game Object with a higher depth\r\n * value will always render in front of one with a lower value.\r\n *\r\n * Setting the depth will queue a depth sort event within the Scene.\r\n * \r\n * @method Phaser.GameObjects.Components.Depth#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {integer} value - The depth of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDepth: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.depth = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Depth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Depth.js?")},"./node_modules/phaser/src/gameobjects/components/Flip.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for visually flipping a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Flip\r\n * @since 3.0.0\r\n */\r\n\r\nvar Flip = {\r\n\r\n /**\r\n * The horizontally flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipX: false,\r\n\r\n /**\r\n * The vertically flipped state of the Game Object.\r\n * \r\n * A Game Object that is flipped vertically will render inversed on the vertical axis (i.e. upside down)\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @name Phaser.GameObjects.Components.Flip#flipY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n flipY: false,\r\n\r\n /**\r\n * Toggles the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipX\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipX: function ()\r\n {\r\n this.flipX = !this.flipX;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Toggles the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#toggleFlipY\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n toggleFlipY: function ()\r\n {\r\n this.flipY = !this.flipY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped horizontally will render inversed on the horizontal axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipX\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipX: function (value)\r\n {\r\n this.flipX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical flipped state of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlipY\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlipY: function (value)\r\n {\r\n this.flipY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical flipped state of this Game Object.\r\n * \r\n * A Game Object that is flipped will render inversed on the flipped axis.\r\n * Flipping always takes place from the middle of the texture and does not impact the scale value.\r\n * If this Game Object has a physics body, it will not change the body. This is a rendering toggle only.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#setFlip\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setFlip: function (x, y)\r\n {\r\n this.flipX = x;\r\n this.flipY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the horizontal and vertical flipped state of this Game Object back to their default un-flipped state.\r\n * \r\n * @method Phaser.GameObjects.Components.Flip#resetFlip\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n resetFlip: function ()\r\n {\r\n this.flipX = false;\r\n this.flipY = false;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Flip;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Flip.js?")},"./node_modules/phaser/src/gameobjects/components/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RotateAround = __webpack_require__(/*! ../../math/RotateAround */ "./node_modules/phaser/src/math/RotateAround.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Provides methods used for obtaining the bounds of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.GetBounds\r\n * @since 3.0.0\r\n */\r\n\r\nvar GetBounds = {\r\n\r\n /**\r\n * Processes the bounds output vector before returning it.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#prepareBoundsOutput\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} output - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n prepareBoundsOutput: function (output, includeParent)\r\n {\r\n if (includeParent === undefined) { includeParent = false; }\r\n\r\n if (this.rotation !== 0)\r\n {\r\n RotateAround(output, this.x, this.y, this.rotation);\r\n }\r\n\r\n if (includeParent && this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getCenter: function (output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY) + (this.displayHeight / 2);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the top-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the top-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getTopRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getTopRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = this.y - (this.displayHeight * this.originY);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the left-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getLeftCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getLeftCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the right-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getRightCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getRightCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + (this.displayHeight / 2);\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-left corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomLeft: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = this.x - (this.displayWidth * this.originX);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-center coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomCenter\r\n * @since 3.18.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomCenter: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + (this.displayWidth / 2);\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bottom-right corner coordinate of this Game Object, regardless of origin.\r\n * The returned point is calculated in local space and does not factor in any parent containers\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBottomRight\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [output,$return]\r\n *\r\n * @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.\r\n * @param {boolean} [includeParent=false] - If this Game Object has a parent Container, include it (and all other ancestors) in the resulting vector?\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} The values stored in the output object.\r\n */\r\n getBottomRight: function (output, includeParent)\r\n {\r\n if (!output) { output = new Vector2(); }\r\n\r\n output.x = (this.x - (this.displayWidth * this.originX)) + this.displayWidth;\r\n output.y = (this.y - (this.displayHeight * this.originY)) + this.displayHeight;\r\n\r\n return this.prepareBoundsOutput(output, includeParent);\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Game Object, regardless of origin.\r\n * The values are stored and returned in a Rectangle, or Rectangle-like, object.\r\n *\r\n * @method Phaser.GameObjects.Components.GetBounds#getBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n // We can use the output object to temporarily store the x/y coords in:\r\n\r\n var TLx, TLy, TRx, TRy, BLx, BLy, BRx, BRy;\r\n\r\n // Instead of doing a check if parent container is \r\n // defined per corner we only do it once.\r\n if (this.parentContainer)\r\n {\r\n var parentMatrix = this.parentContainer.getBoundsTransformMatrix();\r\n\r\n this.getTopLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n parentMatrix.transformPoint(output.x, output.y, output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n else\r\n {\r\n this.getTopLeft(output);\r\n\r\n TLx = output.x;\r\n TLy = output.y;\r\n\r\n this.getTopRight(output);\r\n\r\n TRx = output.x;\r\n TRy = output.y;\r\n\r\n this.getBottomLeft(output);\r\n\r\n BLx = output.x;\r\n BLy = output.y;\r\n\r\n this.getBottomRight(output);\r\n\r\n BRx = output.x;\r\n BRy = output.y;\r\n }\r\n\r\n output.x = Math.min(TLx, TRx, BLx, BRx);\r\n output.y = Math.min(TLy, TRy, BLy, BRy);\r\n output.width = Math.max(TLx, TRx, BLx, BRx) - output.x;\r\n output.height = Math.max(TLy, TRy, BLy, BRy) - output.y;\r\n\r\n return output;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/GetBounds.js?')},"./node_modules/phaser/src/gameobjects/components/Mask.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BitmapMask = __webpack_require__(/*! ../../display/mask/BitmapMask */ "./node_modules/phaser/src/display/mask/BitmapMask.js");\r\nvar GeometryMask = __webpack_require__(/*! ../../display/mask/GeometryMask */ "./node_modules/phaser/src/display/mask/GeometryMask.js");\r\n\r\n/**\r\n * Provides methods used for getting and setting the mask of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Mask\r\n * @since 3.0.0\r\n */\r\n\r\nvar Mask = {\r\n\r\n /**\r\n * The Mask this Game Object is using during render.\r\n *\r\n * @name Phaser.GameObjects.Components.Mask#mask\r\n * @type {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask}\r\n * @since 3.0.0\r\n */\r\n mask: null,\r\n\r\n /**\r\n * Sets the mask that this Game Object will use to render with.\r\n *\r\n * The mask must have been previously created and can be either a GeometryMask or a BitmapMask.\r\n * Note: Bitmap Masks only work on WebGL. Geometry Masks work on both WebGL and Canvas.\r\n *\r\n * If a mask is already set on this Game Object it will be immediately replaced.\r\n * \r\n * Masks are positioned in global space and are not relative to the Game Object to which they\r\n * are applied. The reason for this is that multiple Game Objects can all share the same mask.\r\n * \r\n * Masks have no impact on physics or input detection. They are purely a rendering component\r\n * that allows you to limit what is visible during the render pass.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#setMask\r\n * @since 3.6.2\r\n *\r\n * @param {Phaser.Display.Masks.BitmapMask|Phaser.Display.Masks.GeometryMask} mask - The mask this Game Object will use when rendering.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setMask: function (mask)\r\n {\r\n this.mask = mask;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the mask that this Game Object was using.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#clearMask\r\n * @since 3.6.2\r\n *\r\n * @param {boolean} [destroyMask=false] - Destroy the mask before clearing it?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n clearMask: function (destroyMask)\r\n {\r\n if (destroyMask === undefined) { destroyMask = false; }\r\n\r\n if (destroyMask && this.mask)\r\n {\r\n this.mask.destroy();\r\n }\r\n\r\n this.mask = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns a Bitmap Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a renderable Game Object.\r\n * A renderable Game Object is one that uses a texture to render with, such as an\r\n * Image, Sprite, Render Texture or BitmapText.\r\n *\r\n * If you do not provide a renderable object, and this Game Object has a texture,\r\n * it will use itself as the object. This means you can call this method to create\r\n * a Bitmap Mask from any renderable Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createBitmapMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [renderable] - A renderable Game Object that uses a texture, such as a Sprite.\r\n *\r\n * @return {Phaser.Display.Masks.BitmapMask} This Bitmap Mask that was created.\r\n */\r\n createBitmapMask: function (renderable)\r\n {\r\n if (renderable === undefined && (this.texture || this.shader))\r\n {\r\n // eslint-disable-next-line consistent-this\r\n renderable = this;\r\n }\r\n\r\n return new BitmapMask(this.scene, renderable);\r\n },\r\n\r\n /**\r\n * Creates and returns a Geometry Mask. This mask can be used by any Game Object,\r\n * including this one.\r\n *\r\n * To create the mask you need to pass in a reference to a Graphics Game Object.\r\n *\r\n * If you do not provide a graphics object, and this Game Object is an instance\r\n * of a Graphics object, then it will use itself to create the mask.\r\n * \r\n * This means you can call this method to create a Geometry Mask from any Graphics Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Mask#createGeometryMask\r\n * @since 3.6.2\r\n * \r\n * @param {Phaser.GameObjects.Graphics} [graphics] - A Graphics Game Object. The geometry within it will be used as the mask.\r\n *\r\n * @return {Phaser.Display.Masks.GeometryMask} This Geometry Mask that was created.\r\n */\r\n createGeometryMask: function (graphics)\r\n {\r\n if (graphics === undefined && this.type === \'Graphics\')\r\n {\r\n // eslint-disable-next-line consistent-this\r\n graphics = this;\r\n }\r\n\r\n return new GeometryMask(this.scene, graphics);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mask;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Mask.js?')},"./node_modules/phaser/src/gameobjects/components/Origin.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the origin of a Game Object.\r\n * Values are normalized, given in the range 0 to 1.\r\n * Display values contain the calculated pixel values.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Origin\r\n * @since 3.0.0\r\n */\r\n\r\nvar Origin = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#_originComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _originComponent: true,\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originX\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originX: 0.5,\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#originY\r\n * @type {number}\r\n * @default 0.5\r\n * @since 3.0.0\r\n */\r\n originY: 0.5,\r\n\r\n // private + read only\r\n _displayOriginX: 0,\r\n _displayOriginY: 0,\r\n\r\n /**\r\n * The horizontal display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginX = value;\r\n this.originX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical display origin of this Game Object.\r\n * The origin is a normalized value between 0 and 1.\r\n * The displayOrigin is a pixel value, based on the size of the Game Object combined with the origin.\r\n *\r\n * @name Phaser.GameObjects.Components.Origin#displayOriginY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this._displayOriginY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._displayOriginY = value;\r\n this.originY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object.\r\n *\r\n * The values are given in the range 0 to 1.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0.5] - The horizontal origin value.\r\n * @param {number} [y=x] - The vertical origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0.5; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.originX = x;\r\n this.originY = y;\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the origin of this Game Object based on the Pivot values in its Frame.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setOriginFromFrame\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOriginFromFrame: function ()\r\n {\r\n if (!this.frame || !this.frame.customPivot)\r\n {\r\n return this.setOrigin();\r\n }\r\n else\r\n {\r\n this.originX = this.frame.pivotX;\r\n this.originY = this.frame.pivotY;\r\n }\r\n\r\n return this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the display origin of this Game Object.\r\n * The difference between this and setting the origin is that you can use pixel values for setting the display origin.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#setDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal display origin value.\r\n * @param {number} [y=x] - The vertical display origin value. If not defined it will be set to the value of `x`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplayOrigin: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.displayOriginX = x;\r\n this.displayOriginY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the Display Origin cached values internally stored on this Game Object.\r\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\r\n *\r\n * @method Phaser.GameObjects.Components.Origin#updateDisplayOrigin\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateDisplayOrigin: function ()\r\n {\r\n this._displayOriginX = this.originX * this.width;\r\n this._displayOriginY = this.originY * this.height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Origin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Origin.js?")},"./node_modules/phaser/src/gameobjects/components/PathFollower.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar GetBoolean = __webpack_require__(/*! ../../tweens/builders/GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ../../tweens/tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Provides methods used for managing a Game Object following a Path.\r\n * Should be applied as a mixin and not used directly.\r\n *\r\n * @namespace Phaser.GameObjects.Components.PathFollower\r\n * @since 3.17.0\r\n */\r\n\r\nvar PathFollower = {\r\n\r\n /**\r\n * The Path this PathFollower is following. It can only follow one Path at a time.\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#path\r\n * @type {Phaser.Curves.Path}\r\n * @since 3.0.0\r\n */\r\n path: null,\r\n\r\n /**\r\n * Should the PathFollower automatically rotate to point in the direction of the Path?\r\n *\r\n * @name Phaser.GameObjects.Components.PathFollower#rotateToPath\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n rotateToPath: false,\r\n\r\n /**\r\n * If the PathFollower is rotating to match the Path (@see Phaser.GameObjects.PathFollower#rotateToPath)\r\n * this value is added to the rotation value. This allows you to rotate objects to a path but control\r\n * the angle of the rotation as well.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathRotationOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n pathRotationOffset: 0,\r\n\r\n /**\r\n * An additional vector to add to the PathFollowers position, allowing you to offset it from the\r\n * Path coordinates.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathOffset: null,\r\n\r\n /**\r\n * A Vector2 that stores the current point of the path the follower is on.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathVector\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n pathVector: null,\r\n\r\n /**\r\n * The Tween used for following the Path.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathTween\r\n * @type {Phaser.Tweens.Tween}\r\n * @since 3.0.0\r\n */\r\n pathTween: null,\r\n\r\n /**\r\n * Settings for the PathFollower.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#pathConfig\r\n * @type {?Phaser.Types.GameObjects.PathFollower.PathConfig}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n pathConfig: null,\r\n\r\n /**\r\n * Records the direction of the follower so it can change direction.\r\n *\r\n * @name Phaser.GameObjects.PathFollower#_prevDirection\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n _prevDirection: TWEEN_CONST.PLAYING_FORWARD,\r\n\r\n /**\r\n * Set the Path that this PathFollower should follow.\r\n *\r\n * Optionally accepts {@link Phaser.Types.GameObjects.PathFollower.PathConfig} settings.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setPath: function (path, config)\r\n {\r\n if (config === undefined) { config = this.pathConfig; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n this.path = path;\r\n\r\n if (config)\r\n {\r\n this.startFollow(config);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#setRotateToPath\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path.\r\n * @param {number} [offset=0] - Rotation offset in degrees.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n setRotateToPath: function (value, offset)\r\n {\r\n if (offset === undefined) { offset = 0; }\r\n\r\n this.rotateToPath = value;\r\n\r\n this.pathRotationOffset = offset;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this PathFollower actively following a Path or not?\r\n *\r\n * To be considered as `isFollowing` it must be currently moving on a Path, and not paused.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#isFollowing\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` is this PathFollower is actively following a Path, otherwise `false`.\r\n */\r\n isFollowing: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n return (tween && tween.isPlaying());\r\n },\r\n\r\n /**\r\n * Starts this PathFollower following its given Path.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#startFollow\r\n * @since 3.3.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object.\r\n * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n startFollow: function (config, startAt)\r\n {\r\n if (config === undefined) { config = {}; }\r\n if (startAt === undefined) { startAt = 0; }\r\n\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n if (typeof config === 'number')\r\n {\r\n config = { duration: config };\r\n }\r\n\r\n // Override in case they've been specified in the config\r\n config.from = GetValue(config, 'from', 0);\r\n config.to = GetValue(config, 'to', 1);\r\n\r\n var positionOnPath = GetBoolean(config, 'positionOnPath', false);\r\n\r\n this.rotateToPath = GetBoolean(config, 'rotateToPath', false);\r\n this.pathRotationOffset = GetValue(config, 'rotationOffset', 0);\r\n\r\n // This works, but it's not an ideal way of doing it as the follower jumps position\r\n var seek = GetValue(config, 'startAt', startAt);\r\n\r\n if (seek)\r\n {\r\n config.onStart = function (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n tweenData.progress = seek;\r\n tweenData.elapsed = tweenData.duration * seek;\r\n var v = tweenData.ease(tweenData.progress);\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n };\r\n }\r\n\r\n if (!this.pathOffset)\r\n {\r\n this.pathOffset = new Vector2(this.x, this.y);\r\n }\r\n\r\n if (!this.pathVector)\r\n {\r\n this.pathVector = new Vector2();\r\n }\r\n\r\n this.pathTween = this.scene.sys.tweens.addCounter(config);\r\n\r\n // The starting point of the path, relative to this follower\r\n this.path.getStartPoint(this.pathOffset);\r\n\r\n if (positionOnPath)\r\n {\r\n this.x = this.pathOffset.x;\r\n this.y = this.pathOffset.y;\r\n }\r\n\r\n this.pathOffset.x = this.x - this.pathOffset.x;\r\n this.pathOffset.y = this.y - this.pathOffset.y;\r\n\r\n this._prevDirection = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n if (this.rotateToPath)\r\n {\r\n // Set the rotation now (in case the tween has a delay on it, etc)\r\n var nextPoint = this.path.getPoint(0.1);\r\n\r\n this.rotation = Math.atan2(nextPoint.y - this.y, nextPoint.x - this.x) + DegToRad(this.pathRotationOffset);\r\n }\r\n\r\n this.pathConfig = config;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses this PathFollower. It will still continue to render, but it will remain motionless at the\r\n * point on the Path at which you paused it.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pauseFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n pauseFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a previously paused PathFollower.\r\n *\r\n * If the PathFollower was not paused this has no effect.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#resumeFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n resumeFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPaused())\r\n {\r\n tween.resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops this PathFollower from following the path any longer.\r\n *\r\n * This will invoke any 'stop' conditions that may exist on the Path, or for the follower.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#stopFollow\r\n * @since 3.3.0\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} This Game Object.\r\n */\r\n stopFollow: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween && tween.isPlaying())\r\n {\r\n tween.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.Components.PathFollower#pathUpdate\r\n * @since 3.17.0\r\n */\r\n pathUpdate: function ()\r\n {\r\n var tween = this.pathTween;\r\n\r\n if (tween)\r\n {\r\n var tweenData = tween.data[0];\r\n\r\n if (tweenData.state !== TWEEN_CONST.PLAYING_FORWARD && tweenData.state !== TWEEN_CONST.PLAYING_BACKWARD)\r\n {\r\n // If delayed, etc then bail out\r\n return;\r\n }\r\n\r\n var pathVector = this.pathVector;\r\n\r\n this.path.getPoint(tween.getValue(), pathVector);\r\n\r\n pathVector.add(this.pathOffset);\r\n\r\n var oldX = this.x;\r\n var oldY = this.y;\r\n\r\n this.setPosition(pathVector.x, pathVector.y);\r\n\r\n var speedX = this.x - oldX;\r\n var speedY = this.y - oldY;\r\n\r\n if (speedX === 0 && speedY === 0)\r\n {\r\n // Bail out early\r\n return;\r\n }\r\n\r\n if (tweenData.state !== this._prevDirection)\r\n {\r\n // We've changed direction, so don't do a rotate this frame\r\n this._prevDirection = tweenData.state;\r\n\r\n return;\r\n }\r\n\r\n if (this.rotateToPath)\r\n {\r\n this.rotation = Math.atan2(speedY, speedX) + DegToRad(this.pathRotationOffset);\r\n }\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/PathFollower.js?")},"./node_modules/phaser/src/gameobjects/components/Pipeline.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for setting the WebGL rendering pipeline of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Pipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Pipeline = {\r\n\r\n /**\r\n * The initial WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#defaultPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n defaultPipeline: null,\r\n\r\n /**\r\n * The current WebGL pipeline of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Pipeline#pipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n pipeline: null,\r\n\r\n /**\r\n * Sets the initial WebGL Pipeline of this Game Object.\r\n * This should only be called during the instantiation of the Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#initPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} [pipelineName=TextureTintPipeline] - The name of the pipeline to set on this Game Object. Defaults to the Texture Tint Pipeline.\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n initPipeline: function (pipelineName)\r\n {\r\n if (pipelineName === undefined) { pipelineName = 'TextureTintPipeline'; }\r\n\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.defaultPipeline = renderer.getPipeline(pipelineName);\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the active WebGL Pipeline of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#setPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to set on this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPipeline: function (pipelineName)\r\n {\r\n var renderer = this.scene.sys.game.renderer;\r\n\r\n if (renderer && renderer.gl && renderer.hasPipeline(pipelineName))\r\n {\r\n this.pipeline = renderer.getPipeline(pipelineName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the WebGL Pipeline of this Game Object back to the default it was created with.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#resetPipeline\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the pipeline was set successfully, otherwise `false`.\r\n */\r\n resetPipeline: function ()\r\n {\r\n this.pipeline = this.defaultPipeline;\r\n\r\n return (this.pipeline !== null);\r\n },\r\n\r\n /**\r\n * Gets the name of the WebGL Pipeline this Game Object is currently using.\r\n *\r\n * @method Phaser.GameObjects.Components.Pipeline#getPipelineName\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @return {string} The string-based name of the pipeline being used by this Game Object.\r\n */\r\n getPipelineName: function ()\r\n {\r\n return this.pipeline.name;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Pipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Pipeline.js?")},"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the Scroll Factor of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.ScrollFactor\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScrollFactor = {\r\n\r\n /**\r\n * The horizontal scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorX: 1,\r\n\r\n /**\r\n * The vertical scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Components.ScrollFactor#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scrollFactorY: 1,\r\n\r\n /**\r\n * Sets the scroll factor of this Game Object.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Components.ScrollFactor#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = ScrollFactor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ScrollFactor.js?")},"./node_modules/phaser/src/gameobjects/components/Size.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Provides methods used for getting and setting the size of a Game Object.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Size\r\n * @since 3.0.0\r\n */\r\n\r\nvar Size = {\r\n\r\n /**\r\n * A property indicating that a Game Object has this component.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#_sizeComponent\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.2.0\r\n */\r\n _sizeComponent: true,\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayWidth` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n width: 0,\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * Changing this value will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or use\r\n * the `displayHeight` property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n height: 0,\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.frame.realWidth;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.frame.realWidth;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * \r\n * This value takes into account the scale factor.\r\n * \r\n * Setting this value will adjust the Game Object's scale property.\r\n * \r\n * @name Phaser.GameObjects.Components.Size#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.frame.realHeight;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.frame.realHeight;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object to be that of the given Frame.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSizeToFrame\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The frame to base the size of this Game Object on.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSizeToFrame: function (frame)\r\n {\r\n if (frame === undefined) { frame = this.frame; }\r\n\r\n this.width = frame.realWidth;\r\n this.height = frame.realHeight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the internal size of this Game Object, as used for frame or physics body creation.\r\n * \r\n * This will not change the size that the Game Object is rendered in-game.\r\n * For that you need to either set the scale of the Game Object (`setScale`) or call the\r\n * `setDisplaySize` method, which is the same thing as changing the scale but allows you\r\n * to do so by giving pixel values.\r\n * \r\n * If you have enabled this Game Object for input, changing the size will _not_ change the\r\n * size of the hit area. To do this you should adjust the `input.hitArea` object directly.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * \r\n * Calling this will adjust the scale.\r\n * \r\n * @method Phaser.GameObjects.Components.Size#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Size.js?")},"./node_modules/phaser/src/gameobjects/components/Texture.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Texture\r\n * @since 3.0.0\r\n */\r\n\r\nvar Texture = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * Internal flag. Not to be set by this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Texture#isCropped\r\n * @type {boolean}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.Texture#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Texture.js?")},"./node_modules/phaser/src/gameobjects/components/TextureCrop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * Provides methods used for getting and setting the texture of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.TextureCrop\r\n * @since 3.0.0\r\n */\r\n\r\nvar TextureCrop = {\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n texture: null,\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n frame: null,\r\n\r\n /**\r\n * A boolean flag indicating if this Game Object is being cropped or not.\r\n * You can toggle this at any time after `setCrop` has been called, to turn cropping on or off.\r\n * Equally, calling `setCrop` with no arguments will reset the crop and disable it.\r\n *\r\n * @name Phaser.GameObjects.Components.TextureCrop#isCropped\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n isCropped: false,\r\n\r\n /**\r\n * Applies a crop to a texture based Game Object, such as a Sprite or Image.\r\n * \r\n * The crop is a rectangle that limits the area of the texture frame that is visible during rendering.\r\n * \r\n * Cropping a Game Object does not change its size, dimensions, physics body or hit area, it just\r\n * changes what is shown when rendered.\r\n * \r\n * The crop coordinates are relative to the texture frame, not the Game Object, meaning 0 x 0 is the top-left.\r\n * \r\n * Therefore, if you had a Game Object that had an 800x600 sized texture, and you wanted to show only the left\r\n * half of it, you could call `setCrop(0, 0, 400, 600)`.\r\n * \r\n * It is also scaled to match the Game Object scale automatically. Therefore a crop rect of 100x50 would crop\r\n * an area of 200x100 when applied to a Game Object that had a scale factor of 2.\r\n * \r\n * You can either pass in numeric values directly, or you can provide a single Rectangle object as the first argument.\r\n * \r\n * Call this method with no arguments at all to reset the crop, or toggle the property `isCropped` to `false`.\r\n * \r\n * You should do this if the crop rectangle becomes the same size as the frame itself, as it will allow\r\n * the renderer to skip several internal calculations.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setCrop\r\n * @since 3.11.0\r\n *\r\n * @param {(number|Phaser.Geom.Rectangle)} [x] - The x coordinate to start the crop from. Or a Phaser.Geom.Rectangle object, in which case the rest of the arguments are ignored.\r\n * @param {number} [y] - The y coordinate to start the crop from.\r\n * @param {number} [width] - The width of the crop rectangle in pixels.\r\n * @param {number} [height] - The height of the crop rectangle in pixels.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setCrop: function (x, y, width, height)\r\n {\r\n if (x === undefined)\r\n {\r\n this.isCropped = false;\r\n }\r\n else if (this.frame)\r\n {\r\n if (typeof x === 'number')\r\n {\r\n this.frame.setCropUVs(this._crop, x, y, width, height, this.flipX, this.flipY);\r\n }\r\n else\r\n {\r\n var rect = x;\r\n\r\n this.frame.setCropUVs(this._crop, rect.x, rect.y, rect.width, rect.height, this.flipX, this.flipY);\r\n }\r\n\r\n this.isCropped = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n * @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?\r\n * @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame, updateSize, updateOrigin)\r\n {\r\n if (updateSize === undefined) { updateSize = true; }\r\n if (updateOrigin === undefined) { updateOrigin = true; }\r\n\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n if (this._sizeComponent && updateSize)\r\n {\r\n this.setSizeToFrame();\r\n }\r\n\r\n if (this._originComponent && updateOrigin)\r\n {\r\n if (this.frame.customPivot)\r\n {\r\n this.setOrigin(this.frame.pivotX, this.frame.pivotY);\r\n }\r\n else\r\n {\r\n this.updateDisplayOrigin();\r\n }\r\n }\r\n\r\n if (this.isCropped)\r\n {\r\n this.frame.updateCropUVs(this._crop, this.flipX, this.flipY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that returns a blank, well-formed crop object for use by a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.TextureCrop#resetCropObject\r\n * @private\r\n * @since 3.12.0\r\n * \r\n * @return {object} The crop object.\r\n */\r\n resetCropObject: function ()\r\n {\r\n return { u0: 0, v0: 0, u1: 0, v1: 0, width: 0, height: 0, x: 0, y: 0, flipX: false, flipY: false, cx: 0, cy: 0, cw: 0, ch: 0 };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = TextureCrop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TextureCrop.js?")},"./node_modules/phaser/src/gameobjects/components/Tint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @function GetColor\r\n * @since 3.0.0\r\n * @private\r\n */\r\nvar GetColor = function (value)\r\n{\r\n return (value >> 16) + (value & 0xff00) + ((value & 0xff) << 16);\r\n};\r\n\r\n/**\r\n * Provides methods used for setting the tint of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Tint\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n\r\nvar Tint = {\r\n\r\n /**\r\n * Private internal value. Holds the top-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the top-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintTR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintTR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-left tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBL\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBL: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds the bottom-right tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_tintBR\r\n * @type {number}\r\n * @private\r\n * @default 16777215\r\n * @since 3.0.0\r\n */\r\n _tintBR: 16777215,\r\n\r\n /**\r\n * Private internal value. Holds if the Game Object is tinted or not.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#_isTinted\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n _isTinted: false,\r\n\r\n /**\r\n * Fill or additive?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n tintFill: false,\r\n\r\n /**\r\n * Clears all tint values associated with this Game Object.\r\n * \r\n * Immediately sets the color values back to 0xffffff and the tint type to 'additive',\r\n * which results in no visible change to the texture.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#clearTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n clearTint: function ()\r\n {\r\n this.setTint(0xffffff);\r\n\r\n this._isTinted = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an additive tint on this Game Object.\r\n * \r\n * The tint works by taking the pixel color values from the Game Objects texture, and then\r\n * multiplying it by the color value of the tint. You can provide either one color value,\r\n * in which case the whole Game Object will be tinted in that color. Or you can provide a color\r\n * per corner. The colors are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being an additive tint to a fill based tint set the property `tintFill` to `true`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTint\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If no other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTint: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n if (topLeft === undefined) { topLeft = 0xffffff; }\r\n\r\n if (topRight === undefined)\r\n {\r\n topRight = topLeft;\r\n bottomLeft = topLeft;\r\n bottomRight = topLeft;\r\n }\r\n\r\n this._tintTL = GetColor(topLeft);\r\n this._tintTR = GetColor(topRight);\r\n this._tintBL = GetColor(bottomLeft);\r\n this._tintBR = GetColor(bottomRight);\r\n\r\n this._isTinted = true;\r\n\r\n this.tintFill = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a fill-based tint on this Game Object.\r\n * \r\n * Unlike an additive tint, a fill-tint literally replaces the pixel colors from the texture\r\n * with those in the tint. You can use this for effects such as making a player flash 'white'\r\n * if hit by something. You can provide either one color value, in which case the whole\r\n * Game Object will be rendered in that color. Or you can provide a color per corner. The colors\r\n * are blended together across the extent of the Game Object.\r\n * \r\n * To modify the tint color once set, either call this method again with new values or use the\r\n * `tint` property to set all colors at once. Or, use the properties `tintTopLeft`, `tintTopRight,\r\n * `tintBottomLeft` and `tintBottomRight` to set the corner color values independently.\r\n * \r\n * To remove a tint call `clearTint`.\r\n * \r\n * To swap this from being a fill-tint to an additive tint set the property `tintFill` to `false`.\r\n *\r\n * @method Phaser.GameObjects.Components.Tint#setTintFill\r\n * @webglOnly\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the Game Object. If not other values are given this value is applied evenly, tinting the whole Game Object.\r\n * @param {integer} [topRight] - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setTintFill: function (topLeft, topRight, bottomLeft, bottomRight)\r\n {\r\n this.setTint(topLeft, topRight, bottomLeft, bottomRight);\r\n\r\n this.tintFill = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the top-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintTopRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintTopRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintTR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintTR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-left of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomLeft\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomLeft: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBL;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBL = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the bottom-right of the Game Object.\r\n * This value is interpolated from the corner to the center of the Game Object.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tintBottomRight\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tintBottomRight: {\r\n\r\n get: function ()\r\n {\r\n return this._tintBR;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tintBR = GetColor(value);\r\n this._isTinted = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tint value being applied to the whole of the Game Object.\r\n * This property is a setter-only. Use the properties `tintTopLeft` etc to read the current tint value.\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n tint: {\r\n\r\n set: function (value)\r\n {\r\n this.setTint(value, value, value, value);\r\n }\r\n },\r\n\r\n /**\r\n * Does this Game Object have a tint applied to it or not?\r\n * \r\n * @name Phaser.GameObjects.Components.Tint#isTinted\r\n * @type {boolean}\r\n * @webglOnly\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n isTinted: {\r\n\r\n get: function ()\r\n {\r\n return this._isTinted;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Tint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Tint.js?")},"./node_modules/phaser/src/gameobjects/components/ToJSON.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Build a JSON representation of the given Game Object.\r\n *\r\n * This is typically extended further by Game Object specific implementations.\r\n *\r\n * @method Phaser.GameObjects.Components.ToJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to export as JSON.\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\nvar ToJSON = function (gameObject)\r\n{\r\n var out = {\r\n name: gameObject.name,\r\n type: gameObject.type,\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n depth: gameObject.depth,\r\n scale: {\r\n x: gameObject.scaleX,\r\n y: gameObject.scaleY\r\n },\r\n origin: {\r\n x: gameObject.originX,\r\n y: gameObject.originY\r\n },\r\n flipX: gameObject.flipX,\r\n flipY: gameObject.flipY,\r\n rotation: gameObject.rotation,\r\n alpha: gameObject.alpha,\r\n visible: gameObject.visible,\r\n scaleMode: gameObject.scaleMode,\r\n blendMode: gameObject.blendMode,\r\n textureKey: '',\r\n frameKey: '',\r\n data: {}\r\n };\r\n\r\n if (gameObject.texture)\r\n {\r\n out.textureKey = gameObject.texture.key;\r\n out.frameKey = gameObject.frame.name;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToJSON;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/ToJSON.js?")},"./node_modules/phaser/src/gameobjects/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar TransformMatrix = __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.GameObjects.Components.Transform\r\n * @since 3.0.0\r\n */\r\n\r\nvar Transform = {\r\n\r\n /**\r\n * Private internal value. Holds the horizontal scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleX\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleX: 1,\r\n\r\n /**\r\n * Private internal value. Holds the vertical scale value.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_scaleY\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n _scaleY: 1,\r\n\r\n /**\r\n * Private internal value. Holds the rotation value in radians.\r\n * \r\n * @name Phaser.GameObjects.Components.Transform#_rotation\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n _rotation: 0,\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n x: 0,\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n y: 0,\r\n\r\n /**\r\n * The z position of this Game Object.\r\n * Note: Do not use this value to set the z-index, instead see the `depth` property.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n z: 0,\r\n\r\n /**\r\n * The w position of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n w: 0,\r\n\r\n /**\r\n * This is a special setter that allows you to set both the horizontal and vertical scale of this Game Object\r\n * to the same value, at the same time. When reading this value the result returned is `(scaleX + scaleY) / 2`.\r\n * \r\n * Use of this property implies you wish the horizontal and vertical scales to be equal to each other. If this\r\n * isn\'t the case, use the `scaleX` or `scaleY` properties instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.18.0\r\n */\r\n scale: {\r\n\r\n get: function ()\r\n {\r\n return (this._scaleX + this._scaleY) / 2;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleX = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._scaleY = value;\r\n\r\n if (value === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The angle of this Game Object as expressed in degrees.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in radians, see the `rotation` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#angle\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this._rotation * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * The angle of this Game Object in radians.\r\n * \r\n * Phaser uses a right-hand clockwise rotation system, where 0 is right, 90 is down, 180/-180 is left\r\n * and -90 is up.\r\n *\r\n * If you prefer to work in degrees, see the `angle` property instead.\r\n *\r\n * @name Phaser.GameObjects.Components.Transform#rotation\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this._rotation;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of this Game Object.\r\n * @param {number} [y=x] - The y position of this Game Object. If not set it will use the `x` value.\r\n * @param {number} [z=0] - The z position of this Game Object.\r\n * @param {number} [w=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPosition: function (x, y, z, w)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n if (z === undefined) { z = 0; }\r\n if (w === undefined) { w = 0; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n this.z = z;\r\n this.w = w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Game Object to be a random position within the confines of\r\n * the given area.\r\n * \r\n * If no area is specified a random position between 0 x 0 and the game width x height is used instead.\r\n *\r\n * The position does not factor in the size of this Game Object, meaning that only the origin is\r\n * guaranteed to be within the area.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRandomPosition\r\n * @since 3.8.0\r\n *\r\n * @param {number} [x=0] - The x position of the top-left of the random area.\r\n * @param {number} [y=0] - The y position of the top-left of the random area.\r\n * @param {number} [width] - The width of the random area.\r\n * @param {number} [height] - The height of the random area.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRandomPosition: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n\r\n this.x = x + (Math.random() * width);\r\n this.y = y + (Math.random() * height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the rotation of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - The rotation of this Game Object, in radians.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this.rotation = radians;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - The rotation of this Game Object, in degrees.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the `x` value.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScale: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scaleX = x;\r\n this.scaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the x position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setX\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The x position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setX: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the y position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setY\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The y position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setY: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the z position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The z position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setZ: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.z = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the w position of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#setW\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=0] - The w position of this Game Object.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setW: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.w = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the local transform matrix for this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getLocalTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getLocalTransformMatrix: function (tempMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n\r\n return tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n },\r\n\r\n /**\r\n * Gets the world transform matrix for this Game Object, factoring in any parent Containers.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getWorldTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [tempMatrix] - The matrix to populate with the values from this Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A temporary matrix to hold parent values during the calculations.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The populated Transform Matrix.\r\n */\r\n getWorldTransformMatrix: function (tempMatrix, parentMatrix)\r\n {\r\n if (tempMatrix === undefined) { tempMatrix = new TransformMatrix(); }\r\n if (parentMatrix === undefined) { parentMatrix = new TransformMatrix(); }\r\n\r\n var parent = this.parentContainer;\r\n\r\n if (!parent)\r\n {\r\n return this.getLocalTransformMatrix(tempMatrix);\r\n }\r\n\r\n tempMatrix.applyITRS(this.x, this.y, this._rotation, this._scaleX, this._scaleY);\r\n\r\n while (parent)\r\n {\r\n parentMatrix.applyITRS(parent.x, parent.y, parent._rotation, parent._scaleX, parent._scaleY);\r\n\r\n parentMatrix.multiply(tempMatrix, tempMatrix);\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return tempMatrix;\r\n },\r\n\r\n /**\r\n * Gets the sum total rotation of all of this Game Objects parent Containers.\r\n * \r\n * The returned value is in radians and will be zero if this Game Object has no parent container.\r\n *\r\n * @method Phaser.GameObjects.Components.Transform#getParentRotation\r\n * @since 3.18.0\r\n *\r\n * @return {number} The sum total rotation, in radians, of all parent containers of this Game Object.\r\n */\r\n getParentRotation: function ()\r\n {\r\n var rotation = 0;\r\n\r\n var parent = this.parentContainer;\r\n\r\n while (parent)\r\n {\r\n rotation += parent.rotation;\r\n\r\n parent = parent.parentContainer;\r\n }\r\n\r\n return rotation;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Transform.js?')},"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Matrix used for display transformations for rendering.\r\n *\r\n * It is represented like so:\r\n *\r\n * ```\r\n * | a | c | tx |\r\n * | b | d | ty |\r\n * | 0 | 0 | 1 |\r\n * ```\r\n *\r\n * @class TransformMatrix\r\n * @memberof Phaser.GameObjects.Components\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [a=1] - The Scale X value.\r\n * @param {number} [b=0] - The Skew Y value.\r\n * @param {number} [c=0] - The Skew X value.\r\n * @param {number} [d=1] - The Scale Y value.\r\n * @param {number} [tx=0] - The Translate X value.\r\n * @param {number} [ty=0] - The Translate Y value.\r\n */\r\nvar TransformMatrix = new Class({\r\n\r\n initialize:\r\n\r\n function TransformMatrix (a, b, c, d, tx, ty)\r\n {\r\n if (a === undefined) { a = 1; }\r\n if (b === undefined) { b = 0; }\r\n if (c === undefined) { c = 0; }\r\n if (d === undefined) { d = 1; }\r\n if (tx === undefined) { tx = 0; }\r\n if (ty === undefined) { ty = 0; }\r\n\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#matrix\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.matrix = new Float32Array([ a, b, c, d, tx, ty, 0, 0, 1 ]);\r\n\r\n /**\r\n * The decomposed matrix.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#decomposedMatrix\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.decomposedMatrix = {\r\n translateX: 0,\r\n translateY: 0,\r\n scaleX: 1,\r\n scaleY: 1,\r\n rotation: 0\r\n };\r\n },\r\n\r\n /**\r\n * The Scale X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#a\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n a: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[0] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#b\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n b: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Skew X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#c\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n c: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[2] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Scale Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#d\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n d: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#e\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n e: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#f\r\n * @type {number}\r\n * @since 3.11.0\r\n */\r\n f: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate X value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#tx\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n tx: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Translate Y value.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#ty\r\n * @type {number}\r\n * @since 3.4.0\r\n */\r\n ty: {\r\n\r\n get: function ()\r\n {\r\n return this.matrix[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.matrix[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotation\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return Math.acos(this.a / this.scaleX) * ((Math.atan(-this.c / this.a) < 0) ? -1 : 1);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The rotation of the Matrix, normalized to be within the Phaser right-handed\r\n * clockwise rotation space. Value is in radians.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#rotationNormalized\r\n * @type {number}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n rotationNormalized: {\r\n\r\n get: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n if (a || b)\r\n {\r\n // var r = Math.sqrt(a * a + b * b);\r\n \r\n return (b > 0) ? Math.acos(a / this.scaleX) : -Math.acos(a / this.scaleX);\r\n }\r\n else if (c || d)\r\n {\r\n // var s = Math.sqrt(c * c + d * d);\r\n \r\n return MATH_CONST.TAU - ((d > 0) ? Math.acos(-c / this.scaleY) : -Math.acos(c / this.scaleY));\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed horizontal scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.a * this.a) + (this.b * this.b));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The decomposed vertical scale of the Matrix. This value is always positive.\r\n *\r\n * @name Phaser.GameObjects.Components.TransformMatrix#scaleY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt((this.c * this.c) + (this.d * this.d));\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Reset the Matrix to an identity matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#loadIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n loadIdentity: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = 1;\r\n matrix[1] = 0;\r\n matrix[2] = 0;\r\n matrix[3] = 1;\r\n matrix[4] = 0;\r\n matrix[5] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#translate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation value.\r\n * @param {number} y - The vertical translation value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n translate: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[4] = matrix[0] * x + matrix[2] * y + matrix[4];\r\n matrix[5] = matrix[1] * x + matrix[3] * y + matrix[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale value.\r\n * @param {number} y - The vertical scale value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n scale: function (x, y)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] *= x;\r\n matrix[1] *= x;\r\n matrix[2] *= y;\r\n matrix[3] *= y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n rotate: function (angle)\r\n {\r\n var sin = Math.sin(angle);\r\n var cos = Math.cos(angle);\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n matrix[0] = a * cos + c * sin;\r\n matrix[1] = b * cos + d * sin;\r\n matrix[2] = a * -sin + c * cos;\r\n matrix[3] = b * -sin + d * cos;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n * \r\n * If an `out` Matrix is given then the results will be stored in it.\r\n * If it is not given, this matrix will be updated in place instead.\r\n * Use an `out` Matrix if you do not wish to mutate this matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in.\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments.\r\n */\r\n multiply: function (rhs, out)\r\n {\r\n var matrix = this.matrix;\r\n var source = rhs.matrix;\r\n\r\n var localA = matrix[0];\r\n var localB = matrix[1];\r\n var localC = matrix[2];\r\n var localD = matrix[3];\r\n var localE = matrix[4];\r\n var localF = matrix[5];\r\n\r\n var sourceA = source[0];\r\n var sourceB = source[1];\r\n var sourceC = source[2];\r\n var sourceD = source[3];\r\n var sourceE = source[4];\r\n var sourceF = source[5];\r\n\r\n var destinationMatrix = (out === undefined) ? this : out;\r\n\r\n destinationMatrix.a = (sourceA * localA) + (sourceB * localC);\r\n destinationMatrix.b = (sourceA * localB) + (sourceB * localD);\r\n destinationMatrix.c = (sourceC * localA) + (sourceD * localC);\r\n destinationMatrix.d = (sourceC * localB) + (sourceD * localD);\r\n destinationMatrix.e = (sourceE * localA) + (sourceF * localC) + localE;\r\n destinationMatrix.f = (sourceE * localB) + (sourceF * localD) + localF;\r\n\r\n return destinationMatrix;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the matrix given, including the offset.\r\n * \r\n * The offsetX is added to the tx value: `offsetX * a + offsetY * c + tx`.\r\n * The offsetY is added to the ty value: `offsetY * b + offsetY * d + ty`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#multiplyWithOffset\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n * @param {number} offsetX - Horizontal offset to factor in to the multiplication.\r\n * @param {number} offsetY - Vertical offset to factor in to the multiplication.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n multiplyWithOffset: function (src, offsetX, offsetY)\r\n {\r\n var matrix = this.matrix;\r\n var otherMatrix = src.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n var pse = offsetX * a0 + offsetY * c0 + tx0;\r\n var psf = offsetX * b0 + offsetY * d0 + ty0;\r\n\r\n var a1 = otherMatrix[0];\r\n var b1 = otherMatrix[1];\r\n var c1 = otherMatrix[2];\r\n var d1 = otherMatrix[3];\r\n var tx1 = otherMatrix[4];\r\n var ty1 = otherMatrix[5];\r\n\r\n matrix[0] = a1 * a0 + b1 * c0;\r\n matrix[1] = a1 * b0 + b1 * d0;\r\n matrix[2] = c1 * a0 + d1 * c0;\r\n matrix[3] = c1 * b0 + d1 * d0;\r\n matrix[4] = tx1 * a0 + ty1 * c0 + pse;\r\n matrix[5] = tx1 * b0 + ty1 * d0 + psf;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n transform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a0 = matrix[0];\r\n var b0 = matrix[1];\r\n var c0 = matrix[2];\r\n var d0 = matrix[3];\r\n var tx0 = matrix[4];\r\n var ty0 = matrix[5];\r\n\r\n matrix[0] = a * a0 + b * c0;\r\n matrix[1] = a * b0 + b * d0;\r\n matrix[2] = c * a0 + d * c0;\r\n matrix[3] = c * b0 + d * d0;\r\n matrix[4] = tx * a0 + ty * c0 + tx0;\r\n matrix[5] = tx * b0 + ty * d0 + ty0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform a point using this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#transformPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to transform.\r\n * @param {number} y - The y coordinate of the point to transform.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The Point object to store the transformed coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} The Point containing the transformed coordinates.\r\n */\r\n transformPoint: function (x, y, point)\r\n {\r\n if (point === undefined) { point = { x: 0, y: 0 }; }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n point.x = x * a + y * c + tx;\r\n point.y = x * b + y * d + ty;\r\n\r\n return point;\r\n },\r\n\r\n /**\r\n * Invert the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#invert\r\n * @since 3.0.0\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n invert: function ()\r\n {\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var n = a * d - b * c;\r\n\r\n matrix[0] = d / n;\r\n matrix[1] = -b / n;\r\n matrix[2] = -c / n;\r\n matrix[3] = a / n;\r\n matrix[4] = (c * ty - d * tx) / n;\r\n matrix[5] = -(a * ty - b * tx) / n;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the matrix given.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFrom\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} src - The source Matrix to copy from.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFrom: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src.a;\r\n matrix[1] = src.b;\r\n matrix[2] = src.c;\r\n matrix[3] = src.d;\r\n matrix[4] = src.e;\r\n matrix[5] = src.f;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix to copy those of the array given.\r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyFromArray\r\n * @since 3.11.0\r\n *\r\n * @param {array} src - The array of values to set into this matrix.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n copyFromArray: function (src)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = src[0];\r\n matrix[1] = src[1];\r\n matrix[2] = src[2];\r\n matrix[3] = src[3];\r\n matrix[4] = src[4];\r\n matrix[5] = src[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.transform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n copyToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.transform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values from this Matrix to the given Canvas Rendering Context.\r\n * This will use the Context.setTransform method.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setToContext\r\n * @since 3.12.0\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The Canvas Rendering Context to copy the matrix values to.\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context.\r\n */\r\n setToContext: function (ctx)\r\n {\r\n var matrix = this.matrix;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n return ctx;\r\n },\r\n\r\n /**\r\n * Copy the values in this Matrix to the array given.\r\n * \r\n * Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#copyToArray\r\n * @since 3.12.0\r\n *\r\n * @param {array} [out] - The array to copy the matrix values in to.\r\n *\r\n * @return {array} An array where elements 0 to 5 contain the values from this matrix.\r\n */\r\n copyToArray: function (out)\r\n {\r\n var matrix = this.matrix;\r\n\r\n if (out === undefined)\r\n {\r\n out = [ matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5] ];\r\n }\r\n else\r\n {\r\n out[0] = matrix[0];\r\n out[1] = matrix[1];\r\n out[2] = matrix[2];\r\n out[3] = matrix[3];\r\n out[4] = matrix[4];\r\n out[5] = matrix[5];\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#setTransform\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The Scale X value.\r\n * @param {number} b - The Shear Y value.\r\n * @param {number} c - The Shear X value.\r\n * @param {number} d - The Scale Y value.\r\n * @param {number} tx - The Translate X value.\r\n * @param {number} ty - The Translate Y value.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n setTransform: function (a, b, c, d, tx, ty)\r\n {\r\n var matrix = this.matrix;\r\n\r\n matrix[0] = a;\r\n matrix[1] = b;\r\n matrix[2] = c;\r\n matrix[3] = d;\r\n matrix[4] = tx;\r\n matrix[5] = ty;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Decompose this Matrix into its translation, scale and rotation values using QR decomposition.\r\n * \r\n * The result must be applied in the following order to reproduce the current matrix:\r\n * \r\n * translate -> rotate -> scale\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#decomposeMatrix\r\n * @since 3.0.0\r\n *\r\n * @return {object} The decomposed Matrix.\r\n */\r\n decomposeMatrix: function ()\r\n {\r\n var decomposedMatrix = this.decomposedMatrix;\r\n\r\n var matrix = this.matrix;\r\n\r\n // a = scale X (1)\r\n // b = shear Y (0)\r\n // c = shear X (0)\r\n // d = scale Y (1)\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n\r\n var determ = a * d - b * c;\r\n\r\n decomposedMatrix.translateX = matrix[4];\r\n decomposedMatrix.translateY = matrix[5];\r\n\r\n if (a || b)\r\n {\r\n var r = Math.sqrt(a * a + b * b);\r\n\r\n decomposedMatrix.rotation = (b > 0) ? Math.acos(a / r) : -Math.acos(a / r);\r\n decomposedMatrix.scaleX = r;\r\n decomposedMatrix.scaleY = determ / r;\r\n }\r\n else if (c || d)\r\n {\r\n var s = Math.sqrt(c * c + d * d);\r\n\r\n decomposedMatrix.rotation = Math.PI * 0.5 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\r\n decomposedMatrix.scaleX = determ / s;\r\n decomposedMatrix.scaleY = s;\r\n }\r\n else\r\n {\r\n decomposedMatrix.rotation = 0;\r\n decomposedMatrix.scaleX = 0;\r\n decomposedMatrix.scaleY = 0;\r\n }\r\n\r\n return decomposedMatrix;\r\n },\r\n\r\n /**\r\n * Apply the identity, translate, rotate and scale operations on the Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyITRS\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation.\r\n * @param {number} y - The vertical translation.\r\n * @param {number} rotation - The angle of rotation in radians.\r\n * @param {number} scaleX - The horizontal scale.\r\n * @param {number} scaleY - The vertical scale.\r\n *\r\n * @return {this} This TransformMatrix.\r\n */\r\n applyITRS: function (x, y, rotation, scaleX, scaleY)\r\n {\r\n var matrix = this.matrix;\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Translate\r\n matrix[4] = x;\r\n matrix[5] = y;\r\n\r\n // Rotate and Scale\r\n matrix[0] = radianCos * scaleX;\r\n matrix[1] = radianSin * scaleX;\r\n matrix[2] = -radianSin * scaleY;\r\n matrix[3] = radianCos * scaleY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the `x` and `y` values and returns a new position in the `output` vector that is the inverse of\r\n * the current matrix with its transformation applied.\r\n * \r\n * Can be used to translate points from world to local space.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#applyInverse\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - The x position to translate.\r\n * @param {number} y - The y position to translate.\r\n * @param {Phaser.Math.Vector2} [output] - A Vector2, or point-like object, to store the results in.\r\n *\r\n * @return {Phaser.Math.Vector2} The coordinates, inverse-transformed through this matrix.\r\n */\r\n applyInverse: function (x, y, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var matrix = this.matrix;\r\n\r\n var a = matrix[0];\r\n var b = matrix[1];\r\n var c = matrix[2];\r\n var d = matrix[3];\r\n var tx = matrix[4];\r\n var ty = matrix[5];\r\n\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((ty * c) - (tx * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-ty * a) + (tx * b)) * id);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the X component of this matrix multiplied by the given values.\r\n * This is the same as `x * a + y * c + e`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getX\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated x value.\r\n */\r\n getX: function (x, y)\r\n {\r\n return x * this.a + y * this.c + this.e;\r\n },\r\n\r\n /**\r\n * Returns the Y component of this matrix multiplied by the given values.\r\n * This is the same as `x * b + y * d + f`.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getY\r\n * @since 3.12.0\r\n * \r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n *\r\n * @return {number} The calculated y value.\r\n */\r\n getY: function (x, y)\r\n {\r\n return x * this.b + y * this.d + this.f;\r\n },\r\n\r\n /**\r\n * Returns a string that can be used in a CSS Transform call as a `matrix` property.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#getCSSMatrix\r\n * @since 3.12.0\r\n *\r\n * @return {string} A string containing the CSS Transform matrix values.\r\n */\r\n getCSSMatrix: function ()\r\n {\r\n var m = this.matrix;\r\n\r\n return 'matrix(' + m[0] + ',' + m[1] + ',' + m[2] + ',' + m[3] + ',' + m[4] + ',' + m[5] + ')';\r\n },\r\n\r\n /**\r\n * Destroys this Transform Matrix.\r\n *\r\n * @method Phaser.GameObjects.Components.TransformMatrix#destroy\r\n * @since 3.4.0\r\n */\r\n destroy: function ()\r\n {\r\n this.matrix = null;\r\n this.decomposedMatrix = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TransformMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/TransformMatrix.js?")},"./node_modules/phaser/src/gameobjects/components/Visible.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 1; // 0001\r\n\r\n/**\r\n * Provides methods used for setting the visibility of a Game Object.\r\n * Should be applied as a mixin and not used directly.\r\n * \r\n * @namespace Phaser.GameObjects.Components.Visible\r\n * @since 3.0.0\r\n */\r\n\r\nvar Visible = {\r\n\r\n /**\r\n * Private internal value. Holds the visible value.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#_visible\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n _visible: true,\r\n\r\n /**\r\n * The visible state of the Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n * \r\n * @name Phaser.GameObjects.Components.Visible#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n visible: {\r\n\r\n get: function ()\r\n {\r\n return this._visible;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value)\r\n {\r\n this._visible = true;\r\n this.renderFlags |= _FLAG;\r\n }\r\n else\r\n {\r\n this._visible = false;\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the visibility of this Game Object.\r\n * \r\n * An invisible Game Object will skip rendering, but will still process update logic.\r\n *\r\n * @method Phaser.GameObjects.Components.Visible#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible state of the Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.visible = value;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = Visible;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/Visible.js?")},"./node_modules/phaser/src/gameobjects/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Alpha: __webpack_require__(/*! ./Alpha */ "./node_modules/phaser/src/gameobjects/components/Alpha.js"),\r\n Animation: __webpack_require__(/*! ./Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js"),\r\n BlendMode: __webpack_require__(/*! ./BlendMode */ "./node_modules/phaser/src/gameobjects/components/BlendMode.js"),\r\n ComputedSize: __webpack_require__(/*! ./ComputedSize */ "./node_modules/phaser/src/gameobjects/components/ComputedSize.js"),\r\n Crop: __webpack_require__(/*! ./Crop */ "./node_modules/phaser/src/gameobjects/components/Crop.js"),\r\n Depth: __webpack_require__(/*! ./Depth */ "./node_modules/phaser/src/gameobjects/components/Depth.js"),\r\n Flip: __webpack_require__(/*! ./Flip */ "./node_modules/phaser/src/gameobjects/components/Flip.js"),\r\n GetBounds: __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/gameobjects/components/GetBounds.js"),\r\n Mask: __webpack_require__(/*! ./Mask */ "./node_modules/phaser/src/gameobjects/components/Mask.js"),\r\n Origin: __webpack_require__(/*! ./Origin */ "./node_modules/phaser/src/gameobjects/components/Origin.js"),\r\n PathFollower: __webpack_require__(/*! ./PathFollower */ "./node_modules/phaser/src/gameobjects/components/PathFollower.js"),\r\n Pipeline: __webpack_require__(/*! ./Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js"),\r\n ScrollFactor: __webpack_require__(/*! ./ScrollFactor */ "./node_modules/phaser/src/gameobjects/components/ScrollFactor.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/gameobjects/components/Size.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/gameobjects/components/Texture.js"),\r\n TextureCrop: __webpack_require__(/*! ./TextureCrop */ "./node_modules/phaser/src/gameobjects/components/TextureCrop.js"),\r\n Tint: __webpack_require__(/*! ./Tint */ "./node_modules/phaser/src/gameobjects/components/Tint.js"),\r\n ToJSON: __webpack_require__(/*! ./ToJSON */ "./node_modules/phaser/src/gameobjects/components/ToJSON.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/gameobjects/components/Transform.js"),\r\n TransformMatrix: __webpack_require__(/*! ./TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js"),\r\n Visible: __webpack_require__(/*! ./Visible */ "./node_modules/phaser/src/gameobjects/components/Visible.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/components/index.js?')},"./node_modules/phaser/src/gameobjects/container/Container.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Render = __webpack_require__(/*! ./ContainerRender */ \"./node_modules/phaser/src/gameobjects/container/ContainerRender.js\");\r\nvar Union = __webpack_require__(/*! ../../geom/rectangle/Union */ \"./node_modules/phaser/src/geom/rectangle/Union.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Container Game Object.\r\n *\r\n * A Container, as the name implies, can 'contain' other types of Game Object.\r\n * When a Game Object is added to a Container, the Container becomes responsible for the rendering of it.\r\n * By default it will be removed from the Display List and instead added to the Containers own internal list.\r\n *\r\n * The position of the Game Object automatically becomes relative to the position of the Container.\r\n *\r\n * When the Container is rendered, all of its children are rendered as well, in the order in which they exist\r\n * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`.\r\n *\r\n * If you modify a transform property of the Container, such as `Container.x` or `Container.rotation` then it will\r\n * automatically influence all children as well.\r\n *\r\n * Containers can include other Containers for deeply nested transforms.\r\n *\r\n * Containers can have masks set on them and can be used as a mask too. However, Container children cannot be masked.\r\n * The masks do not 'stack up'. Only a Container on the root of the display list will use its mask.\r\n *\r\n * Containers can be enabled for input. Because they do not have a texture you need to provide a shape for them\r\n * to use as their hit area. Container children can also be enabled for input, independent of the Container.\r\n *\r\n * Containers can be given a physics body for either Arcade Physics, Impact Physics or Matter Physics. However,\r\n * if Container _children_ are enabled for physics you may get unexpected results, such as offset bodies,\r\n * if the Container itself, or any of its ancestors, is positioned anywhere other than at 0 x 0. Container children\r\n * with physics do not factor in the Container due to the excessive extra calculations needed. Please structure\r\n * your game to work around this.\r\n *\r\n * It's important to understand the impact of using Containers. They add additional processing overhead into\r\n * every one of their children. The deeper you nest them, the more the cost escalates. This is especially true\r\n * for input events. You also loose the ability to set the display depth of Container children in the same\r\n * flexible manner as those not within them. In short, don't use them for the sake of it. You pay a small cost\r\n * every time you create one, try to structure your game around avoiding that where possible.\r\n *\r\n * @class Container\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.4.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n */\r\nvar Container = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Container (scene, x, y, children)\r\n {\r\n GameObject.call(this, scene, 'Container');\r\n\r\n /**\r\n * An array holding the children of this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @since 3.4.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @name Phaser.GameObjects.Container#exclusive\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.exclusive = true;\r\n\r\n /**\r\n * Containers can have an optional maximum size. If set to anything above 0 it\r\n * will constrict the addition of new Game Objects into the Container, capping off\r\n * the maximum limit the Container can grow in size to.\r\n *\r\n * @name Phaser.GameObjects.Container#maxSize\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.4.0\r\n */\r\n this.maxSize = -1;\r\n\r\n /**\r\n * The cursor position.\r\n *\r\n * @name Phaser.GameObjects.Container#position\r\n * @type {integer}\r\n * @since 3.4.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * Internal Transform Matrix used for local space conversion.\r\n *\r\n * @name Phaser.GameObjects.Container#localTransform\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.4.0\r\n */\r\n this.localTransform = new Components.TransformMatrix();\r\n\r\n /**\r\n * Internal temporary Transform Matrix used to avoid object creation.\r\n *\r\n * @name Phaser.GameObjects.Container#tempTransformMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this.tempTransformMatrix = new Components.TransformMatrix();\r\n\r\n /**\r\n * A reference to the Scene Display List.\r\n *\r\n * @name Phaser.GameObjects.Container#_displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._displayList = scene.sys.displayList;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.GameObjects.Container#_sortKey\r\n * @type {string}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n\r\n /**\r\n * A reference to the Scene Systems Event Emitter.\r\n *\r\n * @name Phaser.GameObjects.Container#_sysEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.9.0\r\n */\r\n this._sysEvents = scene.sys.events;\r\n\r\n /**\r\n * The horizontal scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1;\r\n\r\n /**\r\n * The vertical scroll factor of this Container.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Container.\r\n *\r\n * When a camera scrolls it will change the location at which this Container is rendered on-screen.\r\n * It does not change the Containers actual position values.\r\n * \r\n * For a Container, setting this value will only update the Container itself, not its children.\r\n * If you wish to change the scrollFactor of the children as well, use the `setScrollFactor` method.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Container.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @name Phaser.GameObjects.Container#scrollFactorY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.clearAlpha();\r\n\r\n this.setBlendMode(BlendModes.SKIP_CHECK);\r\n\r\n if (children)\r\n {\r\n this.add(children);\r\n }\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originX: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#originY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n originY: {\r\n\r\n get: function ()\r\n {\r\n return 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginX\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginX: {\r\n\r\n get: function ()\r\n {\r\n return this.width * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal value to allow Containers to be used for input and physics.\r\n * Do not change this value. It has no effect other than to break things.\r\n *\r\n * @name Phaser.GameObjects.Container#displayOriginY\r\n * @type {number}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n displayOriginY: {\r\n\r\n get: function ()\r\n {\r\n return this.height * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Does this Container exclusively manage its children?\r\n *\r\n * The default is `true` which means a child added to this Container cannot\r\n * belong in another Container, which includes the Scene display list.\r\n *\r\n * If you disable this then this Container will no longer exclusively manage its children.\r\n * This allows you to create all kinds of interesting graphical effects, such as replicating\r\n * Game Objects without reparenting them all over the Scene.\r\n * However, doing so will prevent children from receiving any kind of input event or have\r\n * their physics bodies work by default, as they're no longer a single entity on the\r\n * display list, but are being replicated where-ever this Container is.\r\n *\r\n * @method Phaser.GameObjects.Container#setExclusive\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [value=true] - The exclusive state of this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container.\r\n */\r\n setExclusive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.exclusive = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the bounds of this Container. It works by iterating all children of the Container,\r\n * getting their respective bounds, and then working out a min-max rectangle from that.\r\n * It does not factor in if the children render or not, all are included.\r\n *\r\n * Some children are unable to return their bounds, such as Graphics objects, in which case\r\n * they are skipped.\r\n *\r\n * Depending on the quantity of children in this Container it could be a really expensive call,\r\n * so cache it and only poll it as needed.\r\n *\r\n * The values are stored and returned in a Rectangle object.\r\n *\r\n * @method Phaser.GameObjects.Container#getBounds\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} [output] - A Geom.Rectangle object to store the values in. If not provided a new Rectangle will be created.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The values stored in the output object.\r\n */\r\n getBounds: function (output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.setTo(this.x, this.y, 0, 0);\r\n\r\n if (this.list.length > 0)\r\n {\r\n var children = this.list;\r\n var tempRect = new Rectangle();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.getBounds)\r\n {\r\n entry.getBounds(tempRect);\r\n\r\n Union(tempRect, output, output);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal add handler.\r\n *\r\n * @method Phaser.GameObjects.Container#addHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just added to this Container.\r\n */\r\n addHandler: function (gameObject)\r\n {\r\n gameObject.once(Events.DESTROY, this.remove, this);\r\n\r\n if (this.exclusive)\r\n {\r\n this._displayList.remove(gameObject);\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.parentContainer.remove(gameObject);\r\n }\r\n\r\n gameObject.parentContainer = this;\r\n }\r\n },\r\n\r\n /**\r\n * Internal remove handler.\r\n *\r\n * @method Phaser.GameObjects.Container#removeHandler\r\n * @private\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that was just removed from this Container.\r\n */\r\n removeHandler: function (gameObject)\r\n {\r\n gameObject.off(Events.DESTROY, this.remove);\r\n\r\n if (this.exclusive)\r\n {\r\n gameObject.parentContainer = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Point-like object, such as a Vector2, Geom.Point or object with public x and y properties,\r\n * and transforms it into the space of this Container, then returns it in the output object.\r\n *\r\n * @method Phaser.GameObjects.Container#pointToContainer\r\n * @since 3.4.0\r\n *\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} source - The Source Point to be transformed.\r\n * @param {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} [output] - A destination object to store the transformed point in. If none given a Vector2 will be created and returned.\r\n *\r\n * @return {(object|Phaser.Geom.Point|Phaser.Math.Vector2)} The transformed point.\r\n */\r\n pointToContainer: function (source, output)\r\n {\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n if (this.parentContainer)\r\n {\r\n return this.parentContainer.pointToContainer(source, output);\r\n }\r\n\r\n var tempMatrix = this.tempTransformMatrix;\r\n\r\n // No need to loadIdentity because applyITRS overwrites every value anyway\r\n tempMatrix.applyITRS(this.x, this.y, this.rotation, this.scaleX, this.scaleY);\r\n\r\n tempMatrix.invert();\r\n\r\n tempMatrix.transformPoint(source.x, source.y, output);\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the world transform matrix as used for Bounds checks.\r\n * \r\n * The returned matrix is temporal and shouldn't be stored.\r\n *\r\n * @method Phaser.GameObjects.Container#getBoundsTransformMatrix\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Components.TransformMatrix} The world transform matrix.\r\n */\r\n getBoundsTransformMatrix: function ()\r\n {\r\n return this.getWorldTransformMatrix(this.tempTransformMatrix, this.localTransform);\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#add\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n add: function (child)\r\n {\r\n ArrayUtils.Add(this.list, child, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds the given Game Object, or array of Game Objects, to this Container at the specified position.\r\n *\r\n * Existing Game Objects in the Container are shifted up.\r\n *\r\n * Each Game Object must be unique within the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#addAt\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container.\r\n * @param {integer} [index=0] - The position to insert the Game Object/s at.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n addAt: function (child, index)\r\n {\r\n ArrayUtils.AddAt(this.list, child, index, this.maxSize, this.addHandler, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the Game Object at the given position in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The position to get the Game Object from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The Game Object at the specified index, or `null` if none found.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Returns the index of the given Game Object in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getIndex\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to search for in this Container.\r\n *\r\n * @return {integer} The index of the Game Object in this Container, or -1 if not found.\r\n */\r\n getIndex: function (child)\r\n {\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this Container so the items are in order based on the given property.\r\n * For example: `sort('alpha')` would sort the elements based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.GameObjects.Container#sort\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n ArrayUtils.StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name` property matching the given argument.\r\n * Should more than one child have the same name only the first is returned.\r\n *\r\n * @method Phaser.GameObjects.Container#getByName\r\n * @since 3.4.0\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first child with a matching name, or `null` if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random Game Object from this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#getRandom\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} A random child from the Container, or `null` if the Container is empty.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Gets the first Game Object in this Container.\r\n *\r\n * You can also specify a property and value to search for, in which case it will return the first\r\n * Game Object in this Container with a matching property and / or value.\r\n *\r\n * For example: `getFirst('visible', true)` would return the first Game Object that had its `visible` property set.\r\n *\r\n * You can limit the search to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#getFirst\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to test on each Game Object in the Container.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} The first matching Game Object, or `null` if none was found.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all Game Objects in this Container.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('body')` would return only Game Objects that have a body property.\r\n *\r\n * You can also specify a value to compare the property to:\r\n *\r\n * `getAll('visible', true)` would return only Game Objects that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#getAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} [property] - The property to test on each Game Object in the Container.\r\n * @param {any} [value] - If property is set then the `property` must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of matching Game Objects from this Container.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of Game Objects in this Container that have a property\r\n * matching the given value.\r\n *\r\n * For example: `count('visible', true)` would count all the elements that have their visible property set.\r\n *\r\n * You can optionally limit the operation to the `startIndex` - `endIndex` range.\r\n *\r\n * @method Phaser.GameObjects.Container#count\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property to check.\r\n * @param {any} value - The value to check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {integer} The total number of Game Objects in this Container with a property matching the given value.\r\n */\r\n count: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Swaps the position of two Game Objects in this Container.\r\n * Both Game Objects must belong to this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#swap\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap.\r\n * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Game Object to a new position within this Container.\r\n *\r\n * The Game Object must already be a child of this Container.\r\n *\r\n * The Game Object is removed from its old position and inserted into the new one.\r\n * Therefore the Container size does not change. Other children will change position accordingly.\r\n *\r\n * @method Phaser.GameObjects.Container#moveTo\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to move.\r\n * @param {integer} index - The new position of the Game Object in this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n ArrayUtils.MoveTo(this.list, child, index);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Game Object, or array of Game Objects, from this Container.\r\n *\r\n * The Game Objects must already be children of this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#remove\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n remove: function (child, destroyChild)\r\n {\r\n var removed = ArrayUtils.Remove(this.list, child, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n if (!Array.isArray(removed))\r\n {\r\n removed = [ removed ];\r\n }\r\n\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Object at the given position in this Container.\r\n *\r\n * You can also optionally call `destroy` on the Game Object, if one is found.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAt\r\n * @since 3.4.0\r\n *\r\n * @param {integer} index - The index of the Game Object to be removed.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAt: function (index, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveAt(this.list, index, this.removeHandler, this);\r\n\r\n if (destroyChild && removed)\r\n {\r\n removed.destroy();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the Game Objects between the given positions in this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeBetween\r\n * @since 3.4.0\r\n *\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeBetween: function (startIndex, endIndex, destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all Game Objects from this Container.\r\n *\r\n * You can also optionally call `destroy` on each Game Object that is removed from the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#removeAll\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n removeAll: function (destroyChild)\r\n {\r\n var removed = ArrayUtils.RemoveBetween(this.list, 0, this.list.length, this.removeHandler, this);\r\n\r\n if (destroyChild)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n removed[i].destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given Game Object to the top of this Container.\r\n * This will cause it to render on-top of any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#bringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n bringToTop: function (child)\r\n {\r\n ArrayUtils.BringToTop(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends the given Game Object to the bottom of this Container.\r\n * This will cause it to render below any other objects in the Container.\r\n *\r\n * @method Phaser.GameObjects.Container#sendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n sendToBack: function (child)\r\n {\r\n ArrayUtils.SendToBack(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object up one place in this Container, unless it's already at the top.\r\n *\r\n * @method Phaser.GameObjects.Container#moveUp\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves the given Game Object down one place in this Container, unless it's already at the bottom.\r\n *\r\n * @method Phaser.GameObjects.Container#moveDown\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reverses the order of all Game Objects in this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#reverse\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the all Game Objects in this Container using the Fisher-Yates implementation.\r\n *\r\n * @method Phaser.GameObjects.Container#shuffle\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a Game Object in this Container with the new Game Object.\r\n * The new Game Object cannot already be a child of this Container.\r\n *\r\n * @method Phaser.GameObjects.Container#replace\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} oldChild - The Game Object in this Container that will be replaced.\r\n * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container.\r\n * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n replace: function (oldChild, newChild, destroyChild)\r\n {\r\n var moved = ArrayUtils.Replace(this.list, oldChild, newChild);\r\n\r\n if (moved)\r\n {\r\n this.addHandler(newChild);\r\n this.removeHandler(oldChild);\r\n\r\n if (destroyChild)\r\n {\r\n oldChild.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the given Game Object is a direct child of this Container.\r\n *\r\n * This check does not scan nested Containers.\r\n *\r\n * @method Phaser.GameObjects.Container#exists\r\n * @since 3.4.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to check for within this Container.\r\n *\r\n * @return {boolean} True if the Game Object is an immediate child of this Container, otherwise false.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property to the given value on all Game Objects in this Container.\r\n *\r\n * Optionally you can specify a start and end index. For example if this Container had 100 Game Objects,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 Game Objects.\r\n *\r\n * @method Phaser.GameObjects.Container#setAll\r\n * @since 3.4.0\r\n *\r\n * @param {string} property - The property that must exist on the Game Object.\r\n * @param {any} value - The value to get the property to.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @callback EachContainerCallback\r\n * @generic I - [item]\r\n *\r\n * @param {*} item - The child Game Object of the Container.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * A copy of the Container is made before passing each entry to your callback.\r\n * This protects against the callback itself modifying the Container.\r\n *\r\n * If you know for sure that the callback will not change the size of this Container\r\n * then you can use the more performant `Container.iterate` method instead.\r\n *\r\n * @method Phaser.GameObjects.Container#each\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n var temp = this.list.slice();\r\n var len = temp.length;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n args[0] = temp[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Game Objects in this Container to the given callback.\r\n *\r\n * Only use this method when you absolutely know that the Container will not be modified during\r\n * the iteration, i.e. by removing or adding to its contents.\r\n *\r\n * @method Phaser.GameObjects.Container#iterate\r\n * @since 3.4.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.GameObjects.Container} This Container instance.\r\n */\r\n iterate: function (callback, context)\r\n {\r\n var args = [ null ];\r\n var i;\r\n\r\n for (i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scroll factor of this Container and optionally all of its children.\r\n *\r\n * The scroll factor controls the influence of the movement of a Camera upon this Game Object.\r\n *\r\n * When a camera scrolls it will change the location at which this Game Object is rendered on-screen.\r\n * It does not change the Game Objects actual position values.\r\n *\r\n * A value of 1 means it will move exactly in sync with a camera.\r\n * A value of 0 means it will not move at all, even if the camera moves.\r\n * Other values control the degree to which the camera movement is mapped to this Game Object.\r\n * \r\n * Please be aware that scroll factor values other than 1 are not taken in to consideration when\r\n * calculating physics collisions. Bodies always collide based on their world position, but changing\r\n * the scroll factor is a visual adjustment to where the textures are rendered, which can offset\r\n * them from physics bodies if not accounted for in your code.\r\n *\r\n * @method Phaser.GameObjects.Container#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of this Game Object.\r\n * @param {number} [y=x] - The vertical scroll factor of this Game Object. If not set it will use the `x` value.\r\n * @param {boolean} [updateChildren=false] - Apply this scrollFactor to all Container children as well?\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setScrollFactor: function (x, y, updateChildren)\r\n {\r\n if (y === undefined) { y = x; }\r\n if (updateChildren === undefined) { updateChildren = false; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n if (updateChildren)\r\n {\r\n ArrayUtils.SetAll(this.list, 'scrollFactorX', x);\r\n ArrayUtils.SetAll(this.list, 'scrollFactorY', y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The number of Game Objects inside this Container.\r\n *\r\n * @name Phaser.GameObjects.Container#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the first Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#first\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the last Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#last\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the next Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#next\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the previous Game Object within the Container, or `null` if it is empty.\r\n *\r\n * You can move the cursor by calling `Container.next` and `Container.previous`.\r\n *\r\n * @name Phaser.GameObjects.Container#previous\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Container#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeAll(!!this.exclusive);\r\n\r\n this.localTransform.destroy();\r\n this.tempTransformMatrix.destroy();\r\n\r\n this.list = [];\r\n this._displayList = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Container;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/Container.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderCanvas\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerCanvasRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childBlendMode = child._blendMode;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n if (containerHasBlendMode)\r\n {\r\n child.setBlendMode(container._blendMode);\r\n }\r\n\r\n // Render\r\n child.renderCanvas(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n child.setBlendMode(childBlendMode);\r\n }\r\n};\r\n\r\nmodule.exports = ContainerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/container/ContainerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#container\r\n * @since 3.4.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'container\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, \'x\', 0);\r\n var y = GetAdvancedValue(config, \'y\', 0);\r\n\r\n var container = new Container(this.scene, x, y);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, container, config);\r\n \r\n return container;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerCreator.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Container = __webpack_require__(/*! ./Container */ "./node_modules/phaser/src/gameobjects/container/Container.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Container Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Container Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#container\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} [children] - An optional array of Game Objects to add to this Container.\r\n *\r\n * @return {Phaser.GameObjects.Container} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'container\', function (x, y, children)\r\n{\r\n return this.displayList.add(new Container(this.scene, x, y, children));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerFactory.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ContainerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ContainerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerRender.js?')},"./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Container#renderWebGL\r\n * @since 3.4.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Container} container - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ContainerWebGLRenderer = function (renderer, container, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var children = container.list;\r\n\r\n if (children.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var transformMatrix = container.localTransform;\r\n \r\n if (parentMatrix)\r\n {\r\n transformMatrix.loadIdentity();\r\n transformMatrix.multiply(parentMatrix);\r\n transformMatrix.translate(container.x, container.y);\r\n transformMatrix.rotate(container.rotation);\r\n transformMatrix.scale(container.scaleX, container.scaleY);\r\n }\r\n else\r\n {\r\n transformMatrix.applyITRS(container.x, container.y, container.rotation, container.scaleX, container.scaleY);\r\n }\r\n\r\n var containerHasBlendMode = (container.blendMode !== -1);\r\n\r\n if (!containerHasBlendMode)\r\n {\r\n // If Container is SKIP_TEST then set blend mode to be Normal\r\n renderer.setBlendMode(0);\r\n }\r\n\r\n var alpha = container._alpha;\r\n var scrollFactorX = container.scrollFactorX;\r\n var scrollFactorY = container.scrollFactorY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var child = children[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n var childAlpha = child.alpha;\r\n var childScrollFactorX = child.scrollFactorX;\r\n var childScrollFactorY = child.scrollFactorY;\r\n\r\n if (!containerHasBlendMode && child.blendMode !== renderer.currentBlendMode)\r\n {\r\n // If Container doesn't have its own blend mode, then a child can have one\r\n renderer.setBlendMode(child.blendMode);\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderWebGL(renderer, child, camera);\r\n }\r\n\r\n // Set parent values\r\n child.setScrollFactor(childScrollFactorX * scrollFactorX, childScrollFactorY * scrollFactorY);\r\n child.setAlpha(childAlpha * alpha);\r\n\r\n // Render\r\n child.renderWebGL(renderer, child, interpolationPercentage, camera, transformMatrix);\r\n\r\n // Restore original values\r\n child.setAlpha(childAlpha);\r\n child.setScrollFactor(childScrollFactorX, childScrollFactorY);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderWebGL(renderer, camera);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ContainerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes to CSS Blend Modes Map.\r\n * \r\n * @name Phaser.CSSBlendModes\r\n * @enum {string}\r\n * @memberof Phaser\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n\r\nmodule.exports = [\r\n 'normal',\r\n 'multiply',\r\n 'multiply',\r\n 'screen',\r\n 'overlay',\r\n 'darken',\r\n 'lighten',\r\n 'color-dodge',\r\n 'color-burn',\r\n 'hard-light',\r\n 'soft-light',\r\n 'difference',\r\n 'exclusion',\r\n 'hue',\r\n 'saturation',\r\n 'color',\r\n 'luminosity'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DOMElementRender = __webpack_require__(/*! ./DOMElementRender */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar Vector4 = __webpack_require__(/*! ../../math/Vector4 */ \"./node_modules/phaser/src/math/Vector4.js\");\r\n\r\n/**\r\n * @classdesc\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * @class DOMElement\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this DOM Element in the world.\r\n * @param {number} [y=0] - The vertical position of this DOM Element in the world.\r\n * @param {(Element|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n */\r\nvar DOMElement = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n DOMElementRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DOMElement (scene, x, y, element, style, innerText)\r\n {\r\n GameObject.call(this, scene, 'DOMElement');\r\n\r\n /**\r\n * A reference to the parent DOM Container that the Game instance created when it started.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#parent\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.parent = scene.sys.game.domContainer;\r\n\r\n /**\r\n * A reference to the HTML Cache.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#cache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @since 3.17.0\r\n */\r\n this.cache = scene.sys.cache.html;\r\n\r\n /**\r\n * The actual DOM Element that this Game Object is bound to. For example, if you've created a `
`\r\n * then this property is a direct reference to that element within the dom.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#node\r\n * @type {Element}\r\n * @since 3.17.0\r\n */\r\n this.node;\r\n\r\n /**\r\n * By default a DOM Element will have its transform, display, opacity, zIndex and blend mode properties\r\n * updated when its rendered. If, for some reason, you don't want any of these changed other than the\r\n * CSS transform, then set this flag to `true`. When `true` only the CSS Transform is applied and it's\r\n * up to you to keep track of and set the other properties as required.\r\n * \r\n * This can be handy if, for example, you've a nested DOM Element and you don't want the opacity to be\r\n * picked-up by any of its children.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#transformOnly\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.transformOnly = false;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewX\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewX = 0;\r\n\r\n /**\r\n * The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n * \r\n * @name Phaser.GameObjects.DOMElement#skewY\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n this.skewY = 0;\r\n\r\n /**\r\n * A Vector4 that contains the 3D rotation of this DOM Element around a fixed axis in 3D space.\r\n * \r\n * All values in the Vector4 are treated as degrees, unless the `rotate3dAngle` property is changed.\r\n * \r\n * For more details see the following MDN page:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3d\r\n * @type {Phaser.Math.Vector4}\r\n * @since 3.17.0\r\n */\r\n this.rotate3d = new Vector4();\r\n\r\n /**\r\n * The unit that represents the 3D rotation values. By default this is `deg` for degrees, but can\r\n * be changed to any supported unit. See this page for further details:\r\n * \r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/rotate3d\r\n * \r\n * @name Phaser.GameObjects.DOMElement#rotate3dAngle\r\n * @type {string}\r\n * @since 3.17.0\r\n */\r\n this.rotate3dAngle = 'deg';\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayWidth` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n * \r\n * For a DOM Element this property is read-only.\r\n * \r\n * The property `displayHeight` holds the computed bounds of this DOM Element, factoring in scaling.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The computed display width of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `width` holds the un-scaled width of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayWidth = 0;\r\n\r\n /**\r\n * The computed display height of this Game Object, based on the `getBoundingClientRect` DOM call.\r\n * \r\n * The property `height` holds the un-scaled height of this DOM Element.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#displayHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.displayHeight = 0;\r\n\r\n /**\r\n * Internal native event handler.\r\n * \r\n * @name Phaser.GameObjects.DOMElement#handler\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.handler = this.dispatchNativeEvent.bind(this);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n this.setElement(element.substr(1), style, innerText);\r\n }\r\n else\r\n {\r\n this.createElement(element, style, innerText);\r\n }\r\n }\r\n else if (element)\r\n {\r\n this.setElement(element, style, innerText);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical skew values of this DOM Element.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setSkew\r\n * @since 3.17.0\r\n *\r\n * @param {number} [x=0] - The angle, in radians, by which to skew the DOM Element on the horizontal axis.\r\n * @param {number} [y=x] - The angle, in radians, by which to skew the DOM Element on the vertical axis.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setSkew: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.skewX = x;\r\n this.skewY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the perspective CSS property of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setPerspective\r\n * @since 3.17.0\r\n *\r\n * @param {number} value - The perspective value, in pixels, that determines the distance between the z plane and the user.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setPerspective: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The perspective CSS property value of the _parent DOM Container_. This determines the distance between the z=0\r\n * plane and the user in order to give a 3D-positioned element some perspective. Each 3D element with\r\n * z > 0 becomes larger; each 3D-element with z < 0 becomes smaller. The strength of the effect is determined\r\n * by the value of this property.\r\n * \r\n * For more information see: https://developer.mozilla.org/en-US/docs/Web/CSS/perspective\r\n * \r\n * **Changing this value changes it globally for all DOM Elements, as they all share the same parent container.**\r\n * \r\n * @name Phaser.GameObjects.DOMElement#perspective\r\n * @type {number}\r\n * @since 3.17.0\r\n */\r\n perspective: {\r\n\r\n get: function ()\r\n {\r\n return parseFloat(this.parent.style.perspective);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.parent.style.perspective = value + 'px';\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Adds one or more native DOM event listeners onto the underlying Element of this Game Object.\r\n * The event is then dispatched via this Game Objects standard event emitter.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var div = this.add.dom(x, y, element);\r\n * \r\n * div.addListener('click');\r\n * \r\n * div.on('click', handler);\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#addListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to listen for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n addListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.addEventListener(events[i], this.handler, false);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes one or more native DOM event listeners from the underlying Element of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeListener\r\n * @since 3.17.0\r\n *\r\n * @param {string} events - The DOM event/s to stop listening for. You can specify multiple events by separating them with spaces.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeListener: function (events)\r\n {\r\n if (this.node)\r\n {\r\n events = events.split(' ');\r\n\r\n for (var i = 0; i < events.length; i++)\r\n {\r\n this.node.removeEventListener(events[i], this.handler);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal event proxy to dispatch native DOM Events via this Game Object.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#dispatchNativeEvent\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {any} event - The native DOM event.\r\n */\r\n dispatchNativeEvent: function (event)\r\n {\r\n this.emit(event.type, event);\r\n },\r\n\r\n /**\r\n * Creates a native DOM Element, adds it to the parent DOM Container and then binds it to this Game Object,\r\n * so you can control it. The `tagName` should be a string and is passed to `document.createElement`:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div');\r\n * ```\r\n * \r\n * For more details on acceptable tag names see: https://developer.mozilla.org/en-US/docs/Web/API/Document/createElement\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().createElement('div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().createElement('div', style, 'Phaser');\r\n * ```\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createElement\r\n * @since 3.17.0\r\n *\r\n * @param {string} tagName - A string that specifies the type of element to be created. The nodeName of the created element is initialized with the value of tagName. Don't use qualified names (like \"html:a\") with this method.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createElement: function (tagName, style, innerText)\r\n {\r\n return this.setElement(document.createElement(tagName), style, innerText);\r\n },\r\n\r\n /**\r\n * Binds a new DOM Element to this Game Object. If this Game Object already has an Element it is removed from the DOM\r\n * entirely first. Any event listeners you may have previously created will need to be re-created on the new element.\r\n * \r\n * The `element` argument you pass to this method can be either a string tagName:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * this.add.dom().setElement('heading');\r\n * ```\r\n * \r\n * Or a reference to an Element instance:\r\n * \r\n * ```javascript\r\n *

Phaser

\r\n *\r\n * var h1 = document.getElementById('heading');\r\n * \r\n * this.add.dom().setElement(h1);\r\n * ```\r\n * \r\n * You can also pass in a DOMString or style object to set the CSS on the created element, and an optional `innerText`\r\n * value as well. Here is an example of a DOMString:\r\n * \r\n * ```javascript\r\n * this.add.dom().setElement(h1, 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * And using a style object:\r\n * \r\n * ```javascript\r\n * var style = {\r\n * 'background-color': 'lime';\r\n * 'width': '200px';\r\n * 'height': '100px';\r\n * 'font': '48px Arial';\r\n * };\r\n * \r\n * this.add.dom().setElement(h1, style, 'Phaser');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setElement\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Element)} element - If a string it is passed to `getElementById()`, or it should be a reference to an existing Element.\r\n * @param {(string|any)} [style] - Either a DOMString that holds the CSS styles to be applied to the created element, or an object the styles will be ready from.\r\n * @param {string} [innerText] - A DOMString that holds the text that will be set as the innerText of the created element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setElement: function (element, style, innerText)\r\n {\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var target;\r\n\r\n if (typeof element === 'string')\r\n {\r\n // hash?\r\n if (element[0] === '#')\r\n {\r\n element = element.substr(1);\r\n }\r\n\r\n target = document.getElementById(element);\r\n }\r\n else if (typeof element === 'object' && element.nodeType === 1)\r\n {\r\n target = element;\r\n }\r\n\r\n if (!target)\r\n {\r\n return this;\r\n }\r\n\r\n this.node = target;\r\n\r\n // style can be empty, a string or a plain object\r\n if (style && IsPlainObject(style))\r\n {\r\n for (var key in style)\r\n {\r\n target.style[key] = style[key];\r\n }\r\n }\r\n else if (typeof style === 'string')\r\n {\r\n target.style = style;\r\n }\r\n\r\n // Add / Override the values we need\r\n\r\n target.style.zIndex = '0';\r\n target.style.display = 'inline';\r\n target.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n target.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(target);\r\n }\r\n\r\n // InnerText\r\n\r\n if (innerText)\r\n {\r\n target.innerText = innerText;\r\n }\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Takes a block of html from the HTML Cache, that has previously been preloaded into the game, and then\r\n * creates a DOM Element from it. The loaded HTML is set as the `innerHTML` property of the created\r\n * element.\r\n * \r\n * Assume the following html is stored in a file called `loginform.html`:\r\n * \r\n * ```html\r\n * \r\n * \r\n * ```\r\n * \r\n * Which is loaded into your game using the cache key 'login':\r\n * \r\n * ```javascript\r\n * this.load.html('login', 'assets/loginform.html');\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the cache key:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromCache('login');\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the container that is created, into which the loaded html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromCache\r\n * @since 3.17.0\r\n * \r\n * @param {string} The key of the html cache entry to use for this DOM Element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the loaded html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromCache: function (key, tagName)\r\n {\r\n var html = this.cache.get(key);\r\n\r\n if (html)\r\n {\r\n this.createFromHTML(html, tagName);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a string of html and then creates a DOM Element from it. The HTML is set as the `innerHTML`\r\n * property of the created element.\r\n * \r\n * ```javascript\r\n * let form = `\r\n * \r\n * \r\n * `;\r\n * ```\r\n * \r\n * You can create a DOM Element from it using the string:\r\n * \r\n * ```javascript\r\n * this.add.dom().createFromHTML(form);\r\n * ```\r\n * \r\n * The optional `elementType` argument controls the type of container that is created, into which the html is inserted.\r\n * The default is a plain `div` object, but any valid tagName can be given.\r\n * \r\n * If this Game Object already has an Element, it is removed from the DOM entirely first.\r\n * Any event listeners you may have previously created will need to be re-created after this call.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#createFromHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} A string of html to be set as the `innerHTML` property of the created element.\r\n * @param {string} [tagName='div'] - The tag name of the element into which all of the html will be inserted. Defaults to a plain div tag.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n createFromHTML: function (html, tagName)\r\n {\r\n if (tagName === undefined) { tagName = 'div'; }\r\n\r\n // Already got an element? Remove it first\r\n this.removeElement();\r\n\r\n var element = document.createElement(tagName);\r\n\r\n this.node = element;\r\n\r\n element.style.zIndex = '0';\r\n element.style.display = 'inline';\r\n element.style.position = 'absolute';\r\n\r\n // Node handler\r\n\r\n element.phaser = this;\r\n\r\n if (this.parent)\r\n {\r\n this.parent.appendChild(element);\r\n }\r\n\r\n element.innerHTML = html;\r\n\r\n return this.updateSize();\r\n },\r\n\r\n /**\r\n * Removes the current DOM Element bound to this Game Object from the DOM entirely and resets the\r\n * `node` property of this Game Object to be `null`.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#removeElement\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n removeElement: function ()\r\n {\r\n if (this.node)\r\n {\r\n RemoveFromDOM(this.node);\r\n\r\n this.node = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that calls `getBoundingClientRect` on the `node` and then sets the bounds width\r\n * and height into the `displayWidth` and `displayHeight` properties, and the `clientWidth` and `clientHeight`\r\n * values into the `width` and `height` properties respectively.\r\n * \r\n * This is called automatically whenever a new element is created or set.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#updateSize\r\n * @since 3.17.0\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n updateSize: function ()\r\n {\r\n var node = this.node;\r\n\r\n var nodeBounds = node.getBoundingClientRect();\r\n\r\n this.width = node.clientWidth;\r\n this.height = node.clientHeight;\r\n\r\n this.displayWidth = nodeBounds.width || 0;\r\n this.displayHeight = nodeBounds.height || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a property matching the given key and value. It then returns this child\r\n * if found, or `null` if not.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByProperty\r\n * @since 3.17.0\r\n * \r\n * @param {string} property - The property to search the children for.\r\n * @param {string} value - The value the property must strictly equal.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByProperty: function (property, value)\r\n {\r\n if (this.node)\r\n {\r\n var children = this.node.querySelectorAll('*');\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i][property] === value)\r\n {\r\n return children[i];\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching id. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByID\r\n * @since 3.17.0\r\n * \r\n * @param {string} id - The id to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByID: function (id)\r\n {\r\n return this.getChildByProperty('id', id);\r\n },\r\n\r\n /**\r\n * Gets all children from this DOM Elements node, using `querySelectorAll('*')` and then iterates through\r\n * them, looking for the first one that has a matching name. It then returns this child if found, or `null` if not.\r\n * \r\n * Be aware that class and id names are case-sensitive.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#getChildByName\r\n * @since 3.17.0\r\n * \r\n * @param {string} name - The name to search the children for.\r\n * \r\n * @return {?Element} The first matching child DOM Element, or `null` if not found.\r\n */\r\n getChildByName: function (name)\r\n {\r\n return this.getChildByProperty('name', name);\r\n },\r\n\r\n /**\r\n * Sets the `className` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setClassName\r\n * @since 3.17.0\r\n * \r\n * @param {string} className - A string representing the class or space-separated classes of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setClassName: function (className)\r\n {\r\n if (this.node)\r\n {\r\n this.node.className = className;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerText` property of the DOM Element node and updates the internal sizes.\r\n * \r\n * Note that only certain types of Elements can have `innerText` set on them.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setText\r\n * @since 3.17.0\r\n * \r\n * @param {string} text - A DOMString representing the rendered text content of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setText: function (text)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerText = text;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the `innerHTML` property of the DOM Element node and updates the internal sizes.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#setHTML\r\n * @since 3.17.0\r\n * \r\n * @param {string} html - A DOMString of html to be set as the `innerHTML` property of the element.\r\n * \r\n * @return {this} This DOM Element instance.\r\n */\r\n setHTML: function (html)\r\n {\r\n if (this.node)\r\n {\r\n this.node.innerHTML = html;\r\n\r\n this.updateSize();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs internal update tasks.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preUpdate\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preUpdate: function ()\r\n {\r\n var parent = this.parentContainer;\r\n var node = this.node;\r\n\r\n if (node && parent && !parent.willRender())\r\n {\r\n node.style.display = 'none';\r\n }\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * \r\n * DOMElements always return `true` as they need to still set values during the render pass, even if not visible.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#willRender\r\n * @since 3.17.0\r\n *\r\n * @return {boolean} `true` if the Game Object should be rendered, otherwise `false`.\r\n */\r\n willRender: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the DOM Element, which removes the underlying node from the DOM.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#preDestroy\r\n * @private\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.removeElement();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DOMElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElement.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CSSBlendModes = __webpack_require__(/*! ./CSSBlendModes */ \"./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.DOMElement#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active renderer.\r\n * @param {Phaser.GameObjects.DOMElement} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DOMElementCSSRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var node = src.node;\r\n var style = node.style;\r\n\r\n if (!node || !style || GameObject.RENDER_MASK !== src.renderFlags || (src.cameraFilter !== 0 && (src.cameraFilter & camera.id)) || (src.parentContainer && !src.parentContainer.willRender()))\r\n {\r\n if (node)\r\n {\r\n style.display = 'none';\r\n }\r\n \r\n return;\r\n }\r\n\r\n var parent = src.parentContainer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (parent)\r\n {\r\n alpha *= parent.alpha;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var srcMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n var dx = 0;\r\n var dy = 0;\r\n\r\n var tx = '0%';\r\n var ty = '0%';\r\n\r\n if (parentMatrix)\r\n {\r\n dx = (src.width * src.scaleX) * src.originX;\r\n dy = (src.height * src.scaleY) * src.originY;\r\n\r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n srcMatrix.e = src.x - dx;\r\n srcMatrix.f = src.y - dy;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n dx = (src.width) * src.originX;\r\n dy = (src.height) * src.originY;\r\n \r\n srcMatrix.applyITRS(src.x - dx, src.y - dy, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n tx = (100 * src.originX) + '%';\r\n ty = (100 * src.originY) + '%';\r\n\r\n srcMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n srcMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the src matrix, store result in calcMatrix\r\n camMatrix.multiply(srcMatrix, calcMatrix);\r\n }\r\n\r\n if (!src.transformOnly)\r\n {\r\n style.display = 'block';\r\n style.opacity = alpha;\r\n style.zIndex = src._depth;\r\n style.pointerEvents = 'auto';\r\n style.mixBlendMode = CSSBlendModes[src._blendMode];\r\n }\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/CSS/transform\r\n\r\n style.transform =\r\n calcMatrix.getCSSMatrix() +\r\n ' skew(' + src.skewX + 'rad, ' + src.skewY + 'rad)' +\r\n ' rotate3d(' + src.rotate3d.x + ',' + src.rotate3d.y + ',' + src.rotate3d.z + ',' + src.rotate3d.w + src.rotate3dAngle + ')';\r\n\r\n style.transformOrigin = tx + ' ' + ty;\r\n};\r\n\r\nmodule.exports = DOMElementCSSRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DOMElement = __webpack_require__(/*! ./DOMElement */ \"./node_modules/phaser/src/gameobjects/domelement/DOMElement.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * DOM Element Game Objects are a way to control and manipulate HTML Elements over the top of your game.\r\n * \r\n * In order for DOM Elements to display you have to enable them by adding the following to your game\r\n * configuration object:\r\n * \r\n * ```javascript\r\n * dom {\r\n * createContainer: true\r\n * }\r\n * ```\r\n * \r\n * When this is added, Phaser will automatically create a DOM Container div that is positioned over the top\r\n * of the game canvas. This div is sized to match the canvas, and if the canvas size changes, as a result of\r\n * settings within the Scale Manager, the dom container is resized accordingly.\r\n * \r\n * You can create a DOM Element by either passing in DOMStrings, or by passing in a reference to an existing\r\n * Element that you wish to be placed under the control of Phaser. For example:\r\n * \r\n * ```javascript\r\n * this.add.dom(x, y, 'div', 'background-color: lime; width: 220px; height: 100px; font: 48px Arial', 'Phaser');\r\n * ```\r\n * \r\n * The above code will insert a div element into the DOM Container at the given x/y coordinate. The DOMString in\r\n * the 4th argument sets the initial CSS style of the div and the final argument is the inner text. In this case,\r\n * it will create a lime colored div that is 220px by 100px in size with the text Phaser in it, in an Arial font.\r\n * \r\n * You should nearly always, without exception, use explicitly sized HTML Elements, in order to fully control\r\n * alignment and positioning of the elements next to regular game content.\r\n * \r\n * Rather than specify the CSS and HTML directly you can use the `load.html` File Loader to load it into the\r\n * cache and then use the `createFromCache` method instead. You can also use `createFromHTML` and various other\r\n * methods available in this class to help construct your elements.\r\n * \r\n * Once the element has been created you can then control it like you would any other Game Object. You can set its\r\n * position, scale, rotation, alpha and other properties. It will move as the main Scene Camera moves and be clipped\r\n * at the edge of the canvas. It's important to remember some limitations of DOM Elements: The obvious one is that\r\n * they appear above or below your game canvas. You cannot blend them into the display list, meaning you cannot have\r\n * a DOM Element, then a Sprite, then another DOM Element behind it.\r\n * \r\n * They also cannot be enabled for input. To do that, you have to use the `addListener` method to add native event\r\n * listeners directly. The final limitation is to do with cameras. The DOM Container is sized to match the game canvas\r\n * entirely and clipped accordingly. DOM Elements respect camera scrolling and scrollFactor settings, but if you\r\n * change the size of the camera so it no longer matches the size of the canvas, they won't be clipped accordingly.\r\n * \r\n * Also, all DOM Elements are inserted into the same DOM Container, regardless of which Scene they are created in.\r\n * \r\n * DOM Elements are a powerful way to align native HTML with your Phaser Game Objects. For example, you can insert\r\n * a login form for a multiplayer game directly into your title screen. Or a text input box for a highscore table.\r\n * Or a banner ad from a 3rd party service. Or perhaps you'd like to use them for high resolution text display and\r\n * UI. The choice is up to you, just remember that you're dealing with standard HTML and CSS floating over the top\r\n * of your game, and should treat it accordingly.\r\n *\r\n * Note: This method will only be available if the DOM Element Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#dom\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The horizontal position of this DOM Element in the world.\r\n * @param {number} y - The vertical position of this DOM Element in the world.\r\n * @param {(HTMLElement|string)} [element] - An existing DOM element, or a string. If a string starting with a # it will do a `getElementById` look-up on the string (minus the hash). Without a hash, it represents the type of element to create, i.e. 'div'.\r\n * @param {(string|any)} [style] - If a string, will be set directly as the elements `style` property value. If a plain object, will be iterated and the values transferred. In both cases the values replacing whatever CSS styles may have been previously set.\r\n * @param {string} [innerText] - If given, will be set directly as the elements `innerText` property value, replacing whatever was there before.\r\n *\r\n * @return {Phaser.GameObjects.DOMElement} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('dom', function (x, y, element, style, innerText)\r\n{\r\n var gameObject = new DOMElement(this.scene, x, y, element, style, innerText);\r\n\r\n this.displayList.add(gameObject);\r\n this.updateList.add(gameObject);\r\n\r\n return gameObject;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js?")},"./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DOMElementCSSRenderer */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js?')},"./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Destroy Event.\r\n * \r\n * This event is dispatched when a Game Object instance is being destroyed.\r\n * \r\n * Listen for it on a Game Object instance using `GameObject.on('destroy', listener)`.\r\n *\r\n * @event Phaser.GameObjects.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object which is being destroyed.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/gameobjects/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Events\r\n */\r\n\r\nmodule.exports = { DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js") };\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/events/index.js?')},"./node_modules/phaser/src/gameobjects/extern/Extern.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ExternRender = __webpack_require__(/*! ./ExternRender */ "./node_modules/phaser/src/gameobjects/extern/ExternRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Extern Game Object is a special type of Game Object that allows you to pass\r\n * rendering off to a 3rd party.\r\n * \r\n * When you create an Extern and place it in the display list of a Scene, the renderer will\r\n * process the list as usual. When it finds an Extern it will flush the current batch,\r\n * clear down the pipeline and prepare a transform matrix which your render function can\r\n * take advantage of, if required.\r\n * \r\n * The WebGL context is then left is a \'clean\' state, ready for you to bind your own shaders,\r\n * or draw to it, whatever you wish to do. Once you\'ve finished, you should free-up any\r\n * of your resources. The Extern will then rebind the Phaser pipeline and carry on \r\n * rendering the display list.\r\n * \r\n * Although this object has lots of properties such as Alpha, Blend Mode and Tint, none of\r\n * them are used during rendering unless you take advantage of them in your own render code.\r\n *\r\n * @class Extern\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n */\r\nvar Extern = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ExternRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Extern (scene)\r\n {\r\n GameObject.call(this, scene, \'Extern\');\r\n },\r\n\r\n preUpdate: function ()\r\n {\r\n // override this!\r\n // Arguments: time, delta\r\n },\r\n\r\n render: function ()\r\n {\r\n // override this!\r\n // Arguments: renderer, camera, calcMatrix\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Extern;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/Extern.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js":function(module,exports){eval("\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extern = __webpack_require__(/*! ./Extern */ \"./node_modules/phaser/src/gameobjects/extern/Extern.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Extern Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Extern Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#extern\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Extern} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('extern', function ()\r\n{\r\n var extern = new Extern(this.scene);\r\n\r\n this.displayList.add(extern);\r\n this.updateList.add(extern);\r\n\r\n return extern;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternFactory.js?")},"./node_modules/phaser/src/gameobjects/extern/ExternRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ExternWebGLRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ExternCanvasRenderer */ "./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternRender.js?')},"./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Extern#renderWebGL\r\n * @since 3.16.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Extern} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ExternWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var spriteMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n // Callback\r\n src.render.call(src, renderer, camera, calcMatrix);\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ExternWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/Commands.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ARC: 0,\r\n BEGIN_PATH: 1,\r\n CLOSE_PATH: 2,\r\n FILL_RECT: 3,\r\n LINE_TO: 4,\r\n MOVE_TO: 5,\r\n LINE_STYLE: 6,\r\n FILL_STYLE: 7,\r\n FILL_PATH: 8,\r\n STROKE_PATH: 9,\r\n FILL_TRIANGLE: 10,\r\n STROKE_TRIANGLE: 11,\r\n SAVE: 14,\r\n RESTORE: 15,\r\n TRANSLATE: 16,\r\n SCALE: 17,\r\n ROTATE: 18,\r\n SET_TEXTURE: 19,\r\n CLEAR_TEXTURE: 20,\r\n GRADIENT_FILL_STYLE: 21,\r\n GRADIENT_LINE_STYLE: 22\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Commands.js?")},"./node_modules/phaser/src/gameobjects/graphics/Graphics.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera.js */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar ComponentsAlpha = __webpack_require__(/*! ../components/Alpha */ \"./node_modules/phaser/src/gameobjects/components/Alpha.js\");\r\nvar ComponentsBlendMode = __webpack_require__(/*! ../components/BlendMode */ \"./node_modules/phaser/src/gameobjects/components/BlendMode.js\");\r\nvar ComponentsDepth = __webpack_require__(/*! ../components/Depth */ \"./node_modules/phaser/src/gameobjects/components/Depth.js\");\r\nvar ComponentsMask = __webpack_require__(/*! ../components/Mask */ \"./node_modules/phaser/src/gameobjects/components/Mask.js\");\r\nvar ComponentsPipeline = __webpack_require__(/*! ../components/Pipeline */ \"./node_modules/phaser/src/gameobjects/components/Pipeline.js\");\r\nvar ComponentsTransform = __webpack_require__(/*! ../components/Transform */ \"./node_modules/phaser/src/gameobjects/components/Transform.js\");\r\nvar ComponentsVisible = __webpack_require__(/*! ../components/Visible */ \"./node_modules/phaser/src/gameobjects/components/Visible.js\");\r\nvar ComponentsScrollFactor = __webpack_require__(/*! ../components/ScrollFactor */ \"./node_modules/phaser/src/gameobjects/components/ScrollFactor.js\");\r\n\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\nvar Ellipse = __webpack_require__(/*! ../../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ \"./node_modules/phaser/src/math/const.js\");\r\nvar Render = __webpack_require__(/*! ./GraphicsRender */ \"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Graphics object is a way to draw primitive shapes to your game. Primitives include forms of geometry, such as\r\n * Rectangles, Circles, and Polygons. They also include lines, arcs and curves. When you initially create a Graphics\r\n * object it will be empty.\r\n *\r\n * To draw to it you must first specify a line style or fill style (or both), draw shapes using paths, and finally\r\n * fill or stroke them. For example:\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.beginPath();\r\n * graphics.moveTo(100, 100);\r\n * graphics.lineTo(200, 200);\r\n * graphics.closePath();\r\n * graphics.strokePath();\r\n * ```\r\n *\r\n * There are also many helpful methods that draw and fill/stroke common shapes for you.\r\n *\r\n * ```javascript\r\n * graphics.lineStyle(5, 0xFF00FF, 1.0);\r\n * graphics.fillStyle(0xFFFFFF, 1.0);\r\n * graphics.fillRect(50, 50, 400, 200);\r\n * graphics.strokeRect(50, 50, 400, 200);\r\n * ```\r\n *\r\n * When a Graphics object is rendered it will render differently based on if the game is running under Canvas or WebGL.\r\n * Under Canvas it will use the HTML Canvas context drawing operations to draw the path.\r\n * Under WebGL the graphics data is decomposed into polygons. Both of these are expensive processes, especially with\r\n * complex shapes.\r\n *\r\n * If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help\r\n * performance by calling {@link Phaser.GameObjects.Graphics#generateTexture}. This will 'bake' the Graphics object into\r\n * a Texture, and return it. You can then use this Texture for Sprites or other display objects. If your Graphics object\r\n * updates frequently then you should avoid doing this, as it will constantly generate new textures, which will consume\r\n * memory.\r\n *\r\n * As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful\r\n * in their complexity and quantity of them in your game.\r\n *\r\n * @class Graphics\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Graphics object belongs.\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [options] - Options that set the position and default style of this Graphics object.\r\n */\r\nvar Graphics = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n ComponentsAlpha,\r\n ComponentsBlendMode,\r\n ComponentsDepth,\r\n ComponentsMask,\r\n ComponentsPipeline,\r\n ComponentsTransform,\r\n ComponentsVisible,\r\n ComponentsScrollFactor,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function Graphics (scene, options)\r\n {\r\n var x = GetValue(options, 'x', 0);\r\n var y = GetValue(options, 'y', 0);\r\n\r\n GameObject.call(this, scene, 'Graphics');\r\n\r\n this.setPosition(x, y);\r\n this.initPipeline();\r\n\r\n /**\r\n * The horizontal display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginX = 0;\r\n\r\n /**\r\n * The vertical display origin of the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#displayOriginY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.displayOriginY = 0;\r\n\r\n /**\r\n * The array of commands used to render the Graphics.\r\n *\r\n * @name Phaser.GameObjects.Graphics#commandBuffer\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.commandBuffer = [];\r\n\r\n /**\r\n * The default fill color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillColor = -1;\r\n\r\n /**\r\n * The default fill alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultFillAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultFillAlpha = 1;\r\n\r\n /**\r\n * The default stroke width for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeWidth\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeWidth = 1;\r\n\r\n /**\r\n * The default stroke color for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeColor\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeColor = -1;\r\n\r\n /**\r\n * The default stroke alpha for shapes rendered by this Graphics object.\r\n *\r\n * @name Phaser.GameObjects.Graphics#defaultStrokeAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.defaultStrokeAlpha = 1;\r\n\r\n /**\r\n * Internal property that keeps track of the line width style setting.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_lineWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._lineWidth = 1.0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Graphics#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n this.setDefaultStyles(options);\r\n },\r\n\r\n /**\r\n * Set the default style settings for this Graphics object.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setDefaultStyles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n setDefaultStyles: function (options)\r\n {\r\n if (GetValue(options, 'lineStyle', null))\r\n {\r\n this.defaultStrokeWidth = GetValue(options, 'lineStyle.width', 1);\r\n this.defaultStrokeColor = GetValue(options, 'lineStyle.color', 0xffffff);\r\n this.defaultStrokeAlpha = GetValue(options, 'lineStyle.alpha', 1);\r\n\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n if (GetValue(options, 'fillStyle', null))\r\n {\r\n this.defaultFillColor = GetValue(options, 'fillStyle.color', 0xffffff);\r\n this.defaultFillAlpha = GetValue(options, 'fillStyle.alpha', 1);\r\n\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current line style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {number} color - The stroke color.\r\n * @param {number} [alpha=1] - The stroke alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.LINE_STYLE,\r\n lineWidth, color, alpha\r\n );\r\n\r\n this._lineWidth = lineWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the current fill style.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillStyle\r\n * @since 3.0.0\r\n *\r\n * @param {number} color - The fill color.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_STYLE,\r\n color, alpha\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient fill style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all filled shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `fillStyle` and provide a new single fill color.\r\n *\r\n * When filling a triangle only the first 3 color values provided are used for the 3 points of a triangle.\r\n *\r\n * This feature is best used only on rectangles and triangles. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient fill a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_FILL_STYLE,\r\n alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a gradient line style. This is a WebGL only feature.\r\n *\r\n * The gradient color values represent the 4 corners of an untransformed rectangle.\r\n * The gradient is used to color all stroked shapes and paths drawn after calling this method.\r\n * If you wish to turn a gradient off, call `lineStyle` and provide a new single line color.\r\n *\r\n * This feature is best used only on single lines. All other shapes will give strange results.\r\n *\r\n * Note that for objects such as arcs or ellipses, or anything which is made out of triangles, each triangle used\r\n * will be filled with a gradient on its own. There is no ability to gradient stroke a shape or path as a single\r\n * entity at this time.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineGradientStyle\r\n * @webglOnly\r\n * @since 3.12.0\r\n *\r\n * @param {number} lineWidth - The stroke width.\r\n * @param {integer} topLeft - The tint being applied to the top-left of the Game Object.\r\n * @param {integer} topRight - The tint being applied to the top-right of the Game Object.\r\n * @param {integer} bottomLeft - The tint being applied to the bottom-left of the Game Object.\r\n * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object.\r\n * @param {number} [alpha=1] - The fill alpha.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n this.commandBuffer.push(\r\n Commands.GRADIENT_LINE_STYLE,\r\n lineWidth, alpha, topLeft, topRight, bottomLeft, bottomRight\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the texture frame this Graphics Object will use when drawing all shapes defined after calling this.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * Once set, all shapes will use this texture. Call this method with no arguments to clear it.\r\n *\r\n * The textures are not tiled. They are stretched to the dimensions of the shapes being rendered. For this reason,\r\n * it works best with seamless / tileable textures.\r\n *\r\n * The mode argument controls how the textures are combined with the fill colors. The default value (0) will\r\n * multiply the texture by the fill color. A value of 1 will use just the fill color, but the alpha data from the texture,\r\n * and a value of 2 will use just the texture and no fill color at all.\r\n *\r\n * @method Phaser.GameObjects.Graphics#setTexture\r\n * @since 3.12.0\r\n * @webglOnly\r\n *\r\n * @param {string} [key] - The key of the texture to be used, as stored in the Texture Manager. Leave blank to clear a previously set texture.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [mode=0] - The texture tint mode. 0 is multiply, 1 is alpha only and 2 is texture only.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setTexture: function (key, frame, mode)\r\n {\r\n if (mode === undefined) { mode = 0; }\r\n\r\n if (key === undefined)\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLEAR_TEXTURE\r\n );\r\n }\r\n else\r\n {\r\n var textureFrame = this.scene.sys.textures.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n if (mode === 2)\r\n {\r\n mode = 3;\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.SET_TEXTURE,\r\n textureFrame,\r\n mode\r\n );\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Start a new shape path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#beginPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n beginPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.BEGIN_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Close the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#closePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n closePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.CLOSE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the current path.\r\n * \r\n * This is an alias for `Graphics.fillPath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fill\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fill: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePath\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePath: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the current path.\r\n * \r\n * This is an alias for `Graphics.strokePath` and does the same thing.\r\n * It was added to match the CanvasRenderingContext 2D API.\r\n *\r\n * @method Phaser.GameObjects.Graphics#stroke\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n stroke: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_PATH\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircleShape: function (circle)\r\n {\r\n return this.fillCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Stroke the given circle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircleShape: function (circle)\r\n {\r\n return this.strokeCircle(circle.x, circle.y, circle.radius);\r\n },\r\n\r\n /**\r\n * Fill a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a circle with the given position and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeCircle: function (x, y, radius)\r\n {\r\n this.beginPath();\r\n this.arc(x, y, radius, 0, MATH_CONST.PI2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRectShape: function (rect)\r\n {\r\n return this.fillRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Stroke the given rectangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRectShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRectShape: function (rect)\r\n {\r\n return this.strokeRect(rect.x, rect.y, rect.width, rect.height);\r\n },\r\n\r\n /**\r\n * Fill a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRect: function (x, y, width, height)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, width, height\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rectangle with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRect\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRect: function (x, y, width, height)\r\n {\r\n var lineWidthHalf = this._lineWidth / 2;\r\n var minx = x - lineWidthHalf;\r\n var maxx = x + lineWidthHalf;\r\n\r\n this.beginPath();\r\n this.moveTo(x, y);\r\n this.lineTo(x, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(x + width, y);\r\n this.lineTo(x + width, y + height);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y);\r\n this.lineTo(maxx + width, y);\r\n this.strokePath();\r\n\r\n this.beginPath();\r\n this.moveTo(minx, y + height);\r\n this.lineTo(maxx + width, y + height);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a rounded rectangle with the given position, size and radius.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeRoundedRect\r\n * @since 3.11.0\r\n *\r\n * @param {number} x - The x coordinate of the top-left of the rectangle.\r\n * @param {number} y - The y coordinate of the top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeRoundedRect: function (x, y, width, height, radius)\r\n {\r\n if (radius === undefined) { radius = 20; }\r\n\r\n var tl = radius;\r\n var tr = radius;\r\n var bl = radius;\r\n var br = radius;\r\n\r\n if (typeof radius !== 'number')\r\n {\r\n tl = GetFastValue(radius, 'tl', 20);\r\n tr = GetFastValue(radius, 'tr', 20);\r\n bl = GetFastValue(radius, 'bl', 20);\r\n br = GetFastValue(radius, 'br', 20);\r\n }\r\n\r\n this.beginPath();\r\n this.moveTo(x + tl, y);\r\n this.lineTo(x + width - tr, y);\r\n this.arc(x + width - tr, y + tr, tr, -MATH_CONST.TAU, 0);\r\n this.lineTo(x + width, y + height - br);\r\n this.arc(x + width - br, y + height - br, br, 0, MATH_CONST.TAU);\r\n this.lineTo(x + bl, y + height);\r\n this.arc(x + bl, y + height - bl, bl, MATH_CONST.TAU, Math.PI);\r\n this.lineTo(x, y + tl);\r\n this.arc(x + tl, y + tl, tl, -Math.PI, -MATH_CONST.TAU);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given point.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPointShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPointShape: function (point, size)\r\n {\r\n return this.fillPoint(point.x, point.y, size);\r\n },\r\n\r\n /**\r\n * Fill a point at the given position.\r\n *\r\n * Draws a square at the given position, 1 pixel in size by default.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point.\r\n * @param {number} y - The y coordinate of the point.\r\n * @param {number} [size=1] - The size of the square to draw.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoint: function (x, y, size)\r\n {\r\n if (!size || size < 1)\r\n {\r\n size = 1;\r\n }\r\n else\r\n {\r\n x -= (size / 2);\r\n y -= (size / 2);\r\n }\r\n\r\n this.commandBuffer.push(\r\n Commands.FILL_RECT,\r\n x, y, size, size\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to fill.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangleShape: function (triangle)\r\n {\r\n return this.fillTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Stroke the given triangle.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangleShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangleShape: function (triangle)\r\n {\r\n return this.strokeTriangle(triangle.x1, triangle.y1, triangle.x2, triangle.y2, triangle.x3, triangle.y3);\r\n },\r\n\r\n /**\r\n * Fill a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.FILL_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke a triangle with the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x0 - The x coordinate of the first point.\r\n * @param {number} y0 - The y coordinate of the first point.\r\n * @param {number} x1 - The x coordinate of the second point.\r\n * @param {number} y1 - The y coordinate of the second point.\r\n * @param {number} x2 - The x coordinate of the third point.\r\n * @param {number} y2 - The y coordinate of the third point.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeTriangle: function (x0, y0, x1, y1, x2, y2)\r\n {\r\n this.commandBuffer.push(\r\n Commands.STROKE_TRIANGLE,\r\n x0, y0, x1, y1, x2, y2\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw the given line.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeLineShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to stroke.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeLineShape: function (line)\r\n {\r\n return this.lineBetween(line.x1, line.y1, line.x2, line.y2);\r\n },\r\n\r\n /**\r\n * Draw a line between the given points.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the start point of the line.\r\n * @param {number} y1 - The y coordinate of the start point of the line.\r\n * @param {number} x2 - The x coordinate of the end point of the line.\r\n * @param {number} y2 - The y coordinate of the end point of the line.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineBetween: function (x1, y1, x2, y2)\r\n {\r\n this.beginPath();\r\n this.moveTo(x1, y1);\r\n this.lineTo(x2, y2);\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draw a line from the current drawing position to the given position.\r\n *\r\n * Moves the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#lineTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to draw the line to.\r\n * @param {number} y - The y coordinate to draw the line to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n lineTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.LINE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Move the current drawing position to the given position.\r\n *\r\n * @method Phaser.GameObjects.Graphics#moveTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to move to.\r\n * @param {number} y - The y coordinate to move to.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n moveTo: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.MOVE_TO,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is stroked.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokePoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to stroke.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokePoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.strokePath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Fill the shape represented by the given array of points.\r\n *\r\n * Pass `closeShape` to automatically close the shape by joining the last to the first point.\r\n * \r\n * Pass `closePath` to automatically close the path before it is filled.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(array|Phaser.Geom.Point[])} points - The points to fill.\r\n * @param {boolean} [closeShape=false] - When `true`, the shape is closed by joining the last point to the first point.\r\n * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked.\r\n * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillPoints: function (points, closeShape, closePath, endIndex)\r\n {\r\n if (closeShape === undefined) { closeShape = false; }\r\n if (closePath === undefined) { closePath = false; }\r\n if (endIndex === undefined) { endIndex = points.length; }\r\n\r\n this.beginPath();\r\n\r\n this.moveTo(points[0].x, points[0].y);\r\n\r\n for (var i = 1; i < endIndex; i++)\r\n {\r\n this.lineTo(points[i].x, points[i].y);\r\n }\r\n\r\n if (closeShape)\r\n {\r\n this.lineTo(points[0].x, points[0].y);\r\n }\r\n\r\n if (closePath)\r\n {\r\n this.closePath();\r\n }\r\n\r\n this.fillPath();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stroke the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Stroke an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#strokeEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n strokeEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.strokePoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill the given ellipse.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipseShape\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipseShape: function (ellipse, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Fill an ellipse with the given position and size.\r\n *\r\n * @method Phaser.GameObjects.Graphics#fillEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the ellipse.\r\n * @param {number} y - The y coordinate of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {integer} [smoothness=32] - The number of points to draw the ellipse with.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n fillEllipse: function (x, y, width, height, smoothness)\r\n {\r\n if (smoothness === undefined) { smoothness = 32; }\r\n\r\n var ellipse = new Ellipse(x, y, width, height);\r\n\r\n var points = ellipse.getPoints(smoothness);\r\n\r\n return this.fillPoints(points, true);\r\n },\r\n\r\n /**\r\n * Draw an arc.\r\n *\r\n * This method can be used to create circles, or parts of circles.\r\n * \r\n * Make sure you call `beginPath` before starting the arc unless you wish for the arc to automatically\r\n * close when filled or stroked.\r\n *\r\n * Use the optional `overshoot` argument increase the number of iterations that take place when\r\n * the arc is rendered in WebGL. This is useful if you're drawing an arc with an especially thick line,\r\n * as it will allow the arc to fully join-up. Try small values at first, i.e. 0.01.\r\n *\r\n * Call {@link Phaser.GameObjects.Graphics#fillPath} or {@link Phaser.GameObjects.Graphics#strokePath} after calling\r\n * this method to draw the arc.\r\n *\r\n * @method Phaser.GameObjects.Graphics#arc\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the center of the circle.\r\n * @param {number} y - The y coordinate of the center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {number} startAngle - The starting angle, in radians.\r\n * @param {number} endAngle - The ending angle, in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(\r\n Commands.ARC,\r\n x, y, radius, startAngle, endAngle, anticlockwise, overshoot\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a pie-chart slice shape centered at `x`, `y` with the given radius.\r\n * You must define the start and end angle of the slice.\r\n *\r\n * Setting the `anticlockwise` argument to `true` creates a shape similar to Pacman.\r\n * Setting it to `false` creates a shape like a slice of pie.\r\n *\r\n * This method will begin a new path and close the path at the end of it.\r\n * To display the actual slice you need to call either `strokePath` or `fillPath` after it.\r\n *\r\n * @method Phaser.GameObjects.Graphics#slice\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal center of the slice.\r\n * @param {number} y - The vertical center of the slice.\r\n * @param {number} radius - The radius of the slice.\r\n * @param {number} startAngle - The start angle of the slice, given in radians.\r\n * @param {number} endAngle - The end angle of the slice, given in radians.\r\n * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise.\r\n * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot)\r\n {\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n if (overshoot === undefined) { overshoot = 0; }\r\n\r\n this.commandBuffer.push(Commands.BEGIN_PATH);\r\n\r\n this.commandBuffer.push(Commands.MOVE_TO, x, y);\r\n\r\n this.commandBuffer.push(Commands.ARC, x, y, radius, startAngle, endAngle, anticlockwise, overshoot);\r\n\r\n this.commandBuffer.push(Commands.CLOSE_PATH);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Saves the state of the Graphics by pushing the current state onto a stack.\r\n *\r\n * The most recently saved state can then be restored with {@link Phaser.GameObjects.Graphics#restore}.\r\n *\r\n * @method Phaser.GameObjects.Graphics#save\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n save: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.SAVE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restores the most recently saved state of the Graphics by popping from the state stack.\r\n *\r\n * Use {@link Phaser.GameObjects.Graphics#save} to save the current state, and call this afterwards to restore that state.\r\n *\r\n * If there is no saved state, this command does nothing.\r\n *\r\n * @method Phaser.GameObjects.Graphics#restore\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n restore: function ()\r\n {\r\n this.commandBuffer.push(\r\n Commands.RESTORE\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a translation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be translated\r\n * by the given amount.\r\n * \r\n * This does not change the position of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#translateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal translation to apply.\r\n * @param {number} y - The vertical translation to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n translateCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.TRANSLATE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a scale command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be scaled\r\n * by the given amount.\r\n * \r\n * This does not change the scale of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#scaleCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scale to apply.\r\n * @param {number} y - The vertical scale to apply.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n scaleCanvas: function (x, y)\r\n {\r\n this.commandBuffer.push(\r\n Commands.SCALE,\r\n x, y\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Inserts a rotation command into this Graphics objects command buffer.\r\n * \r\n * All objects drawn _after_ calling this method will be rotated\r\n * by the given amount.\r\n * \r\n * This does not change the rotation of the Graphics object itself,\r\n * only of the objects drawn by it after calling this method.\r\n *\r\n * @method Phaser.GameObjects.Graphics#rotateCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The rotation angle, in radians.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n rotateCanvas: function (radians)\r\n {\r\n this.commandBuffer.push(\r\n Commands.ROTATE,\r\n radians\r\n );\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clear the command buffer and reset the fill style and line style to their defaults.\r\n *\r\n * @method Phaser.GameObjects.Graphics#clear\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n clear: function ()\r\n {\r\n this.commandBuffer.length = 0;\r\n\r\n if (this.defaultFillColor > -1)\r\n {\r\n this.fillStyle(this.defaultFillColor, this.defaultFillAlpha);\r\n }\r\n\r\n if (this.defaultStrokeColor > -1)\r\n {\r\n this.lineStyle(this.defaultStrokeWidth, this.defaultStrokeColor, this.defaultStrokeAlpha);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a texture from this Graphics object.\r\n *\r\n * If `key` is a string it'll generate a new texture using it and add it into the\r\n * Texture Manager (assuming no key conflict happens).\r\n *\r\n * If `key` is a Canvas it will draw the texture to that canvas context. Note that it will NOT\r\n * automatically upload it to the GPU in WebGL mode.\r\n *\r\n * @method Phaser.GameObjects.Graphics#generateTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(string|HTMLCanvasElement)} key - The key to store the texture with in the Texture Manager, or a Canvas to draw to.\r\n * @param {integer} [width] - The width of the graphics to generate.\r\n * @param {integer} [height] - The height of the graphics to generate.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} This Game Object.\r\n */\r\n generateTexture: function (key, width, height)\r\n {\r\n var sys = this.scene.sys;\r\n var renderer = sys.game.renderer;\r\n\r\n if (width === undefined) { width = sys.scale.width; }\r\n if (height === undefined) { height = sys.scale.height; }\r\n\r\n Graphics.TargetCamera.setScene(this.scene);\r\n Graphics.TargetCamera.setViewport(0, 0, width, height);\r\n Graphics.TargetCamera.scrollX = this.x;\r\n Graphics.TargetCamera.scrollY = this.y;\r\n\r\n var texture;\r\n var ctx;\r\n\r\n if (typeof key === 'string')\r\n {\r\n if (sys.textures.exists(key))\r\n {\r\n // Key is a string, it DOES exist in the Texture Manager AND is a canvas, so draw to it\r\n\r\n texture = sys.textures.get(key);\r\n\r\n var src = texture.getSourceImage();\r\n\r\n if (src instanceof HTMLCanvasElement)\r\n {\r\n ctx = src.getContext('2d');\r\n }\r\n }\r\n else\r\n {\r\n // Key is a string and doesn't exist in the Texture Manager, so generate and save it\r\n\r\n texture = sys.textures.createCanvas(key, width, height);\r\n\r\n ctx = texture.getSourceImage().getContext('2d');\r\n }\r\n }\r\n else if (key instanceof HTMLCanvasElement)\r\n {\r\n // Key is a Canvas, so draw to it\r\n\r\n ctx = key.getContext('2d');\r\n }\r\n\r\n if (ctx)\r\n {\r\n // var GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n this.renderCanvas(renderer, this, 0, Graphics.TargetCamera, null, ctx, false);\r\n\r\n if (texture)\r\n {\r\n texture.refresh();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Graphics#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.commandBuffer = [];\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A Camera used specifically by the Graphics system for rendering to textures.\r\n *\r\n * @name Phaser.GameObjects.Graphics.TargetCamera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.1.0\r\n */\r\nGraphics.TargetCamera = new BaseCamera();\r\n\r\nmodule.exports = Graphics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/Graphics.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ \"./node_modules/phaser/src/gameobjects/graphics/Commands.js\");\r\nvar SetTransform = __webpack_require__(/*! ../../renderer/canvas/utils/SetTransform */ \"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js\");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n * @param {CanvasRenderingContext2D} [renderTargetCtx] - The target rendering context.\r\n * @param {boolean} allowClip - If `true` then path operations will be used instead of fill operations.\r\n */\r\nvar GraphicsCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix, renderTargetCtx, allowClip)\r\n{\r\n var commandBuffer = src.commandBuffer;\r\n var commandBufferLength = commandBuffer.length;\r\n\r\n var ctx = renderTargetCtx || renderer.currentContext;\r\n\r\n if (commandBufferLength === 0 || !SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n return;\r\n }\r\n\r\n var lineAlpha = 1;\r\n var fillAlpha = 1;\r\n var lineColor = 0;\r\n var fillColor = 0;\r\n var lineWidth = 1;\r\n var red = 0;\r\n var green = 0;\r\n var blue = 0;\r\n\r\n // Reset any currently active paths\r\n ctx.beginPath();\r\n\r\n for (var index = 0; index < commandBufferLength; ++index)\r\n {\r\n var commandID = commandBuffer[index];\r\n\r\n switch (commandID)\r\n {\r\n case Commands.ARC:\r\n ctx.arc(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4],\r\n commandBuffer[index + 5],\r\n commandBuffer[index + 6]\r\n );\r\n\r\n // +7 because overshoot is the 7th value, not used in Canvas\r\n index += 7;\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commandBuffer[index + 1];\r\n lineColor = commandBuffer[index + 2];\r\n lineAlpha = commandBuffer[index + 3];\r\n red = ((lineColor & 0xFF0000) >>> 16);\r\n green = ((lineColor & 0xFF00) >>> 8);\r\n blue = (lineColor & 0xFF);\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + lineAlpha + ')';\r\n ctx.lineWidth = lineWidth;\r\n index += 3;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n fillColor = commandBuffer[index + 1];\r\n fillAlpha = commandBuffer[index + 2];\r\n red = ((fillColor & 0xFF0000) >>> 16);\r\n green = ((fillColor & 0xFF00) >>> 8);\r\n blue = (fillColor & 0xFF);\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n index += 2;\r\n break;\r\n\r\n case Commands.BEGIN_PATH:\r\n ctx.beginPath();\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n ctx.closePath();\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n if (!allowClip)\r\n {\r\n ctx.fillRect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n else\r\n {\r\n ctx.rect(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2],\r\n commandBuffer[index + 3],\r\n commandBuffer[index + 4]\r\n );\r\n }\r\n index += 4;\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.fill();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n ctx.beginPath();\r\n ctx.moveTo(commandBuffer[index + 1], commandBuffer[index + 2]);\r\n ctx.lineTo(commandBuffer[index + 3], commandBuffer[index + 4]);\r\n ctx.lineTo(commandBuffer[index + 5], commandBuffer[index + 6]);\r\n ctx.closePath();\r\n if (!allowClip)\r\n {\r\n ctx.stroke();\r\n }\r\n index += 6;\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.LINE_FX_TO:\r\n ctx.lineTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.MOVE_FX_TO:\r\n ctx.moveTo(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 5;\r\n break;\r\n\r\n case Commands.SAVE:\r\n ctx.save();\r\n break;\r\n\r\n case Commands.RESTORE:\r\n ctx.restore();\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n ctx.translate(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.SCALE:\r\n ctx.scale(\r\n commandBuffer[index + 1],\r\n commandBuffer[index + 2]\r\n );\r\n index += 2;\r\n break;\r\n\r\n case Commands.ROTATE:\r\n ctx.rotate(\r\n commandBuffer[index + 1]\r\n );\r\n index += 1;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n index += 5;\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n index += 6;\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n index += 2;\r\n break;\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = GraphicsCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('graphics', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var graphics = new Graphics(this.scene, config);\r\n\r\n if (config.add)\r\n {\r\n this.scene.sys.displayList.add(graphics);\r\n }\r\n \r\n return graphics;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Graphics = __webpack_require__(/*! ./Graphics */ \"./node_modules/phaser/src/gameobjects/graphics/Graphics.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Graphics Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Graphics Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#graphics\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Graphics.Options} [config] - The Graphics configuration.\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('graphics', function (config)\r\n{\r\n return this.displayList.add(new Graphics(this.scene, config));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js?")},"./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GraphicsWebGLRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js");\r\n\r\n // Needed for Graphics.generateTexture\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GraphicsCanvasRenderer */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js?')},"./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Commands = __webpack_require__(/*! ./Commands */ "./node_modules/phaser/src/gameobjects/graphics/Commands.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n// TODO: Remove the use of this\r\nvar Point = function (x, y, width)\r\n{\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n};\r\n\r\n// TODO: Remove the use of this\r\nvar Path = function (x, y, width)\r\n{\r\n this.points = [];\r\n this.pointsLength = 1;\r\n this.points[0] = new Point(x, y, width);\r\n};\r\n\r\nvar matrixStack = [];\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Graphics#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Graphics} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GraphicsWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (src.commandBuffer.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = src._tempMatrix1;\r\n var graphicsMatrix = src._tempMatrix2;\r\n var currentMatrix = src._tempMatrix3;\r\n\r\n currentMatrix.loadIdentity();\r\n\r\n graphicsMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n graphicsMatrix.e = src.x;\r\n graphicsMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n else\r\n {\r\n graphicsMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n graphicsMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(graphicsMatrix);\r\n }\r\n\r\n var commands = src.commandBuffer;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n var lineWidth = 1;\r\n var fillTint = pipeline.fillTint;\r\n var strokeTint = pipeline.strokeTint;\r\n\r\n var tx = 0;\r\n var ty = 0;\r\n var ta = 0;\r\n var iterStep = 0.01;\r\n var PI2 = Math.PI * 2;\r\n\r\n var cmd;\r\n\r\n var path = [];\r\n var pathIndex = 0;\r\n var pathOpen = false;\r\n var lastPath = null;\r\n\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n var currentTexture = renderer.blankTexture.glTexture;\r\n\r\n for (var cmdIndex = 0; cmdIndex < commands.length; cmdIndex++)\r\n {\r\n cmd = commands[cmdIndex];\r\n\r\n switch (cmd)\r\n {\r\n case Commands.BEGIN_PATH:\r\n\r\n path.length = 0;\r\n lastPath = null;\r\n pathOpen = true;\r\n break;\r\n\r\n case Commands.CLOSE_PATH:\r\n\r\n pathOpen = false;\r\n\r\n if (lastPath && lastPath.points.length)\r\n {\r\n lastPath.points.push(lastPath.points[0]);\r\n }\r\n break;\r\n\r\n case Commands.FILL_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchFillPath(\r\n path[pathIndex].points,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.STROKE_PATH:\r\n for (pathIndex = 0; pathIndex < path.length; pathIndex++)\r\n {\r\n pipeline.setTexture2D(currentTexture);\r\n\r\n pipeline.batchStrokePath(\r\n path[pathIndex].points,\r\n lineWidth,\r\n pathOpen,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n }\r\n break;\r\n\r\n case Commands.LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var strokeColor = commands[++cmdIndex];\r\n var strokeAlpha = commands[++cmdIndex] * alpha;\r\n var strokeTintColor = getTint(strokeColor, strokeAlpha);\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n break;\r\n\r\n case Commands.FILL_STYLE:\r\n var fillColor = commands[++cmdIndex];\r\n var fillAlpha = commands[++cmdIndex] * alpha;\r\n var fillTintColor = getTint(fillColor, fillAlpha);\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n break;\r\n\r\n case Commands.GRADIENT_FILL_STYLE:\r\n var gradientFillAlpha = commands[++cmdIndex] * alpha;\r\n fillTint.TL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.TR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BL = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n fillTint.BR = getTint(commands[++cmdIndex], gradientFillAlpha);\r\n break;\r\n\r\n case Commands.GRADIENT_LINE_STYLE:\r\n lineWidth = commands[++cmdIndex];\r\n var gradientLineAlpha = commands[++cmdIndex] * alpha;\r\n strokeTint.TL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.TR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BL = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n strokeTint.BR = getTint(commands[++cmdIndex], gradientLineAlpha);\r\n break;\r\n\r\n case Commands.ARC:\r\n var iteration = 0;\r\n var x = commands[++cmdIndex];\r\n var y = commands[++cmdIndex];\r\n var radius = commands[++cmdIndex];\r\n var startAngle = commands[++cmdIndex];\r\n var endAngle = commands[++cmdIndex];\r\n var anticlockwise = commands[++cmdIndex];\r\n var overshoot = commands[++cmdIndex];\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -PI2)\r\n {\r\n endAngle = -PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -PI2 + endAngle % PI2;\r\n }\r\n }\r\n else if (endAngle > PI2)\r\n {\r\n endAngle = PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = PI2 + endAngle % PI2;\r\n }\r\n\r\n if (lastPath === null)\r\n {\r\n lastPath = new Path(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius, lineWidth);\r\n path.push(lastPath);\r\n iteration += iterStep;\r\n }\r\n\r\n while (iteration < 1 + overshoot)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n iteration += iterStep;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n tx = x + Math.cos(ta) * radius;\r\n ty = y + Math.sin(ta) * radius;\r\n\r\n lastPath.points.push(new Point(tx, ty, lineWidth));\r\n\r\n break;\r\n\r\n case Commands.FILL_RECT:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillRect(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.FILL_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchFillTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.STROKE_TRIANGLE:\r\n pipeline.setTexture2D(currentTexture);\r\n pipeline.batchStrokeTriangle(\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n commands[++cmdIndex],\r\n lineWidth,\r\n currentMatrix,\r\n camMatrix\r\n );\r\n break;\r\n\r\n case Commands.LINE_TO:\r\n if (lastPath !== null)\r\n {\r\n lastPath.points.push(new Point(commands[++cmdIndex], commands[++cmdIndex], lineWidth));\r\n }\r\n else\r\n {\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n }\r\n break;\r\n\r\n case Commands.MOVE_TO:\r\n lastPath = new Path(commands[++cmdIndex], commands[++cmdIndex], lineWidth);\r\n path.push(lastPath);\r\n break;\r\n\r\n case Commands.SAVE:\r\n matrixStack.push(currentMatrix.copyToArray());\r\n break;\r\n\r\n case Commands.RESTORE:\r\n currentMatrix.copyFromArray(matrixStack.pop());\r\n break;\r\n\r\n case Commands.TRANSLATE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.translate(x, y);\r\n break;\r\n\r\n case Commands.SCALE:\r\n x = commands[++cmdIndex];\r\n y = commands[++cmdIndex];\r\n currentMatrix.scale(x, y);\r\n break;\r\n\r\n case Commands.ROTATE:\r\n currentMatrix.rotate(commands[++cmdIndex]);\r\n break;\r\n\r\n case Commands.SET_TEXTURE:\r\n var frame = commands[++cmdIndex];\r\n var mode = commands[++cmdIndex];\r\n\r\n pipeline.currentFrame = frame;\r\n pipeline.setTexture2D(frame.glTexture, 0);\r\n pipeline.tintEffect = mode;\r\n\r\n currentTexture = frame.glTexture;\r\n\r\n break;\r\n\r\n case Commands.CLEAR_TEXTURE:\r\n pipeline.currentFrame = renderer.blankTexture;\r\n pipeline.tintEffect = 2;\r\n currentTexture = renderer.blankTexture.glTexture;\r\n break;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GraphicsWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/group/Group.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Actions = __webpack_require__(/*! ../../actions/ */ \"./node_modules/phaser/src/actions/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/gameobjects/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Range = __webpack_require__(/*! ../../utils/array/Range */ \"./node_modules/phaser/src/utils/array/Range.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Group is a way for you to create, manipulate, or recycle similar Game Objects.\r\n *\r\n * Group membership is non-exclusive. A Game Object can belong to several groups, one group, or none.\r\n *\r\n * Groups themselves aren't displayable, and can't be positioned, rotated, scaled, or hidden.\r\n *\r\n * @class Group\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings.\r\n *\r\n * @see Phaser.Physics.Arcade.Group\r\n * @see Phaser.Physics.Arcade.StaticGroup\r\n */\r\nvar Group = new Class({\r\n\r\n initialize:\r\n\r\n function Group (scene, children, config)\r\n {\r\n // They can pass in any of the following as the first argument:\r\n\r\n // 1) A single child\r\n // 2) An array of children\r\n // 3) A config object\r\n // 4) An array of config objects\r\n\r\n // Or they can pass in a child, or array of children AND a config object\r\n\r\n if (config)\r\n {\r\n // config has been set, are the children an array?\r\n\r\n if (children && !Array.isArray(children))\r\n {\r\n children = [ children ];\r\n }\r\n }\r\n else if (Array.isArray(children))\r\n {\r\n // No config, so let's check the children argument\r\n\r\n if (IsPlainObject(children[0]))\r\n {\r\n // It's an array of plain config objects\r\n config = children;\r\n children = null;\r\n }\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // Children isn't an array. Is it a config object though?\r\n config = children;\r\n children = null;\r\n }\r\n\r\n /**\r\n * This scene this group belongs to.\r\n *\r\n * @name Phaser.GameObjects.Group#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Members of this group.\r\n *\r\n * @name Phaser.GameObjects.Group#children\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.children = new Set(children);\r\n\r\n /**\r\n * A flag identifying this object as a group.\r\n *\r\n * @name Phaser.GameObjects.Group#isParent\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isParent = true;\r\n\r\n /**\r\n * The class to create new group members from.\r\n *\r\n * @name Phaser.GameObjects.Group#classType\r\n * @type {Function}\r\n * @since 3.0.0\r\n * @default Phaser.GameObjects.Sprite\r\n */\r\n this.classType = GetFastValue(config, 'classType', Sprite);\r\n\r\n /**\r\n * The name of this group.\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Group#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.18.0\r\n */\r\n this.name = GetFastValue(config, 'name', '');\r\n\r\n /**\r\n * Whether this group runs its {@link Phaser.GameObjects.Group#preUpdate} method\r\n * (which may update any members).\r\n *\r\n * @name Phaser.GameObjects.Group#active\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.active = GetFastValue(config, 'active', true);\r\n\r\n /**\r\n * The maximum size of this group, if used as a pool. -1 is no limit.\r\n *\r\n * @name Phaser.GameObjects.Group#maxSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @default -1\r\n */\r\n this.maxSize = GetFastValue(config, 'maxSize', -1);\r\n\r\n /**\r\n * A default texture key to use when creating new group members.\r\n *\r\n * This is used in {@link Phaser.GameObjects.Group#create}\r\n * but not in {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.defaultKey = GetFastValue(config, 'defaultKey', null);\r\n\r\n /**\r\n * A default texture frame to use when creating new group members.\r\n *\r\n * @name Phaser.GameObjects.Group#defaultFrame\r\n * @type {(string|integer)}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = GetFastValue(config, 'defaultFrame', null);\r\n\r\n /**\r\n * Whether to call the update method of any members.\r\n *\r\n * @name Phaser.GameObjects.Group#runChildUpdate\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Group#preUpdate\r\n */\r\n this.runChildUpdate = GetFastValue(config, 'runChildUpdate', false);\r\n\r\n /**\r\n * A function to be called when adding or creating group members.\r\n *\r\n * @name Phaser.GameObjects.Group#createCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.createCallback = GetFastValue(config, 'createCallback', null);\r\n\r\n /**\r\n * A function to be called when removing group members.\r\n *\r\n * @name Phaser.GameObjects.Group#removeCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupCallback}\r\n * @since 3.0.0\r\n */\r\n this.removeCallback = GetFastValue(config, 'removeCallback', null);\r\n\r\n /**\r\n * A function to be called when creating several group members at once.\r\n *\r\n * @name Phaser.GameObjects.Group#createMultipleCallback\r\n * @type {?Phaser.Types.GameObjects.Group.GroupMultipleCreateCallback}\r\n * @since 3.0.0\r\n */\r\n this.createMultipleCallback = GetFastValue(config, 'createMultipleCallback', null);\r\n\r\n if (config)\r\n {\r\n this.createMultiple(config);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Game Object and adds it to this group, unless the group {@link Phaser.GameObjects.Group#isFull is full}.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the new Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of the new Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key of the new Game Object.\r\n * @param {(string|integer)} [frame=defaultFrame] - The texture frame of the new Game Object.\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of the new Game Object.\r\n * @param {boolean} [active=true] - The {@link Phaser.GameObjects.GameObject#active} state of the new Game Object.\r\n *\r\n * @return {any} The new Game Object (usually a Sprite, etc.).\r\n */\r\n create: function (x, y, key, frame, visible, active)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (key === undefined) { key = this.defaultKey; }\r\n if (frame === undefined) { frame = this.defaultFrame; }\r\n if (visible === undefined) { visible = true; }\r\n if (active === undefined) { active = true; }\r\n\r\n // Pool?\r\n if (this.isFull())\r\n {\r\n return null;\r\n }\r\n\r\n var child = new this.classType(this.scene, x, y, key, frame);\r\n\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n\r\n child.visible = visible;\r\n child.setActive(active);\r\n\r\n this.add(child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Creates several Game Objects and adds them to this group.\r\n *\r\n * If the group becomes {@link Phaser.GameObjects.Group#isFull}, no further Game Objects are created.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createMultipleCallback} and {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#createMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig[]} config - Creation settings. This can be a single configuration object or an array of such objects, which will be applied in turn.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createMultiple: function (config)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n if (!Array.isArray(config))\r\n {\r\n config = [ config ];\r\n }\r\n\r\n var output = [];\r\n\r\n if (config[0].key)\r\n {\r\n for (var i = 0; i < config.length; i++)\r\n {\r\n var entries = this.createFromConfig(config[i]);\r\n \r\n output = output.concat(entries);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * A helper for {@link Phaser.GameObjects.Group#createMultiple}.\r\n *\r\n * @method Phaser.GameObjects.Group#createFromConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupCreateConfig} options - Creation settings.\r\n *\r\n * @return {any[]} The newly created Game Objects.\r\n */\r\n createFromConfig: function (options)\r\n {\r\n if (this.isFull())\r\n {\r\n return [];\r\n }\r\n\r\n this.classType = GetFastValue(options, 'classType', this.classType);\r\n\r\n var key = GetFastValue(options, 'key', undefined);\r\n var frame = GetFastValue(options, 'frame', null);\r\n var visible = GetFastValue(options, 'visible', true);\r\n var active = GetFastValue(options, 'active', true);\r\n\r\n var entries = [];\r\n\r\n // Can't do anything without at least a key\r\n if (key === undefined)\r\n {\r\n return entries;\r\n }\r\n else\r\n {\r\n if (!Array.isArray(key))\r\n {\r\n key = [ key ];\r\n }\r\n\r\n if (!Array.isArray(frame))\r\n {\r\n frame = [ frame ];\r\n }\r\n }\r\n\r\n // Build an array of key frame pairs to loop through\r\n\r\n var repeat = GetFastValue(options, 'repeat', 0);\r\n var randomKey = GetFastValue(options, 'randomKey', false);\r\n var randomFrame = GetFastValue(options, 'randomFrame', false);\r\n var yoyo = GetFastValue(options, 'yoyo', false);\r\n var quantity = GetFastValue(options, 'quantity', false);\r\n var frameQuantity = GetFastValue(options, 'frameQuantity', 1);\r\n var max = GetFastValue(options, 'max', 0);\r\n\r\n // If a quantity value is set we use that to override the frameQuantity\r\n\r\n var range = Range(key, frame, {\r\n max: max,\r\n qty: (quantity) ? quantity : frameQuantity,\r\n random: randomKey,\r\n randomB: randomFrame,\r\n repeat: repeat,\r\n yoyo: yoyo\r\n });\r\n\r\n if (options.createCallback)\r\n {\r\n this.createCallback = options.createCallback;\r\n }\r\n\r\n if (options.removeCallback)\r\n {\r\n this.removeCallback = options.removeCallback;\r\n }\r\n\r\n for (var c = 0; c < range.length; c++)\r\n {\r\n var created = this.create(0, 0, range[c].a, range[c].b, visible, active);\r\n\r\n if (!created)\r\n {\r\n break;\r\n }\r\n\r\n entries.push(created);\r\n }\r\n\r\n // Post-creation options (applied only to those items created in this call):\r\n\r\n var x = GetValue(options, 'setXY.x', 0);\r\n var y = GetValue(options, 'setXY.y', 0);\r\n var stepX = GetValue(options, 'setXY.stepX', 0);\r\n var stepY = GetValue(options, 'setXY.stepY', 0);\r\n\r\n Actions.SetXY(entries, x, y, stepX, stepY);\r\n\r\n var rotation = GetValue(options, 'setRotation.value', 0);\r\n var stepRotation = GetValue(options, 'setRotation.step', 0);\r\n\r\n Actions.SetRotation(entries, rotation, stepRotation);\r\n\r\n var scaleX = GetValue(options, 'setScale.x', 1);\r\n var scaleY = GetValue(options, 'setScale.y', scaleX);\r\n var stepScaleX = GetValue(options, 'setScale.stepX', 0);\r\n var stepScaleY = GetValue(options, 'setScale.stepY', 0);\r\n\r\n Actions.SetScale(entries, scaleX, scaleY, stepScaleX, stepScaleY);\r\n\r\n var alpha = GetValue(options, 'setAlpha.value', 1);\r\n var stepAlpha = GetValue(options, 'setAlpha.step', 0);\r\n\r\n Actions.SetAlpha(entries, alpha, stepAlpha);\r\n\r\n var hitArea = GetFastValue(options, 'hitArea', null);\r\n var hitAreaCallback = GetFastValue(options, 'hitAreaCallback', null);\r\n\r\n if (hitArea)\r\n {\r\n Actions.SetHitArea(entries, hitArea, hitAreaCallback);\r\n }\r\n\r\n var grid = GetFastValue(options, 'gridAlign', false);\r\n\r\n if (grid)\r\n {\r\n Actions.GridAlign(entries, grid);\r\n }\r\n\r\n if (this.createMultipleCallback)\r\n {\r\n this.createMultipleCallback.call(this, entries);\r\n }\r\n\r\n return entries;\r\n },\r\n\r\n /**\r\n * Updates any group members, if {@link Phaser.GameObjects.Group#runChildUpdate} is enabled.\r\n *\r\n * @method Phaser.GameObjects.Group#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n if (!this.runChildUpdate || this.children.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Because a Group child may mess with the length of the Group during its update\r\n var temp = this.children.entries.slice();\r\n\r\n for (var i = 0; i < temp.length; i++)\r\n {\r\n var item = temp[i];\r\n\r\n if (item.active)\r\n {\r\n item.update(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Game Object to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Object to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n add: function (child, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (this.isFull())\r\n {\r\n return this;\r\n }\r\n\r\n this.children.set(child);\r\n\r\n if (this.createCallback)\r\n {\r\n this.createCallback.call(this, child);\r\n }\r\n\r\n if (addToScene)\r\n {\r\n this.scene.sys.displayList.add(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n this.scene.sys.updateList.add(child);\r\n }\r\n }\r\n\r\n child.on(Events.DESTROY, this.remove, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds several Game Objects to this group.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#createCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#addMultiple\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add.\r\n * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n addMultiple: function (children, addToScene)\r\n {\r\n if (addToScene === undefined) { addToScene = false; }\r\n\r\n if (Array.isArray(children))\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.add(children[i], addToScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a member of this Group and optionally removes it from the Scene and / or destroys it.\r\n *\r\n * Calls {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n remove: function (child, removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n if (!this.children.contains(child))\r\n {\r\n return this;\r\n }\r\n\r\n this.children.delete(child);\r\n\r\n if (this.removeCallback)\r\n {\r\n this.removeCallback.call(this, child);\r\n }\r\n\r\n child.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n child.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n child.scene.sys.displayList.remove(child);\r\n\r\n if (child.preUpdate)\r\n {\r\n child.scene.sys.updateList.remove(child);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all members of this Group and optionally removes them from the Scene and / or destroys them.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#clear\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene.\r\n * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members.\r\n *\r\n * @return {Phaser.GameObjects.Group} This group.\r\n */\r\n clear: function (removeFromScene, destroyChild)\r\n {\r\n if (removeFromScene === undefined) { removeFromScene = false; }\r\n if (destroyChild === undefined) { destroyChild = false; }\r\n\r\n var children = this.children;\r\n\r\n for (var i = 0; i < children.size; i++)\r\n {\r\n var gameObject = children.entries[i];\r\n\r\n gameObject.off(Events.DESTROY, this.remove, this);\r\n\r\n if (destroyChild)\r\n {\r\n gameObject.destroy();\r\n }\r\n else if (removeFromScene)\r\n {\r\n gameObject.scene.sys.displayList.remove(gameObject);\r\n\r\n if (gameObject.preUpdate)\r\n {\r\n gameObject.scene.sys.updateList.remove(gameObject);\r\n }\r\n }\r\n }\r\n\r\n this.children.clear();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Tests if a Game Object is a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - A Game Object.\r\n *\r\n * @return {boolean} True if the Game Object is a member of this group.\r\n */\r\n contains: function (child)\r\n {\r\n return this.children.contains(child);\r\n },\r\n\r\n /**\r\n * All members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getChildren\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The group members.\r\n */\r\n getChildren: function ()\r\n {\r\n return this.children.entries;\r\n },\r\n\r\n /**\r\n * The number of members of the group.\r\n *\r\n * @method Phaser.GameObjects.Group#getLength\r\n * @since 3.0.0\r\n *\r\n * @return {integer}\r\n */\r\n getLength: function ()\r\n {\r\n return this.children.size;\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the first member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirst\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirst: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group, from top to bottom, for the nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getFirstNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(true, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLast\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLast: function (state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, 1, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the Group for the last nth member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getLastNth\r\n * @since 3.6.0\r\n *\r\n * @param {integer} nth - The nth matching Group member to search for.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getLastNth: function (nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getHandler(false, nth, state, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the last member that has an {@link Phaser.GameObjects.GameObject#active} state matching the argument,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no matching member is found and `createIfNull` is true and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getHandler\r\n * @private\r\n * @since 3.6.0\r\n *\r\n * @param {boolean} forwards - Search front to back or back to front?\r\n * @param {integer} nth - Stop matching after nth successful matches.\r\n * @param {boolean} [state=false] - The {@link Phaser.GameObjects.GameObject#active} value to match.\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first matching group member, or a newly created member, or null.\r\n */\r\n getHandler: function (forwards, nth, state, createIfNull, x, y, key, frame, visible)\r\n {\r\n if (state === undefined) { state = false; }\r\n if (createIfNull === undefined) { createIfNull = false; }\r\n\r\n var gameObject;\r\n\r\n var i;\r\n var total = 0;\r\n var children = this.children.entries;\r\n\r\n if (forwards)\r\n {\r\n for (i = 0; i < children.length; i++)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = children.length - 1; i >= 0; i--)\r\n {\r\n gameObject = children[i];\r\n\r\n if (gameObject.active === state)\r\n {\r\n total++;\r\n\r\n if (total === nth)\r\n {\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n gameObject = null;\r\n }\r\n }\r\n }\r\n\r\n if (gameObject)\r\n {\r\n if (typeof(x) === 'number')\r\n {\r\n gameObject.x = x;\r\n }\r\n\r\n if (typeof(y) === 'number')\r\n {\r\n gameObject.y = y;\r\n }\r\n\r\n return gameObject;\r\n }\r\n\r\n // Got this far? We need to create or bail\r\n if (createIfNull)\r\n {\r\n return this.create(x, y, key, frame, visible);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and the group isn't full then it will create a new Game Object using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have its active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#get\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {?any} The first inactive group member, or a newly created member, or null.\r\n */\r\n get: function (x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, true, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `true`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no active member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstAlive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first active group member, or a newly created member, or null.\r\n */\r\n getFirstAlive: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(true, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * Scans the group for the first member that has an {@link Phaser.GameObjects.GameObject#active} state set to `false`,\r\n * assigns `x` and `y`, and returns the member.\r\n *\r\n * If no inactive member is found and `createIfNull` is `true` and the group isn't full then it will create a new one using `x`, `y`, `key`, `frame`, and `visible`.\r\n * The new Game Object will have an active state set to `true`.\r\n * Unless a new member is created, `key`, `frame`, and `visible` are ignored.\r\n *\r\n * @method Phaser.GameObjects.Group#getFirstDead\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [createIfNull=false] - Create a new Game Object if no matching members are found, using the following arguments.\r\n * @param {number} [x] - The horizontal position of the Game Object in the world.\r\n * @param {number} [y] - The vertical position of the Game Object in the world.\r\n * @param {string} [key=defaultKey] - The texture key assigned to a new Game Object (if one is created).\r\n * @param {(string|integer)} [frame=defaultFrame] - A texture frame assigned to a new Game Object (if one is created).\r\n * @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of a new Game Object (if one is created).\r\n *\r\n * @return {any} The first inactive group member, or a newly created member, or null.\r\n */\r\n getFirstDead: function (createIfNull, x, y, key, frame, visible)\r\n {\r\n return this.getFirst(false, createIfNull, x, y, key, frame, visible);\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Components.Animation#play Plays} an animation for all members of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#playAnimation\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n playAnimation: function (key, startFrame)\r\n {\r\n Actions.PlayAnimation(this.children.entries, key, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Whether this group's size at its {@link Phaser.GameObjects.Group#maxSize maximum}.\r\n *\r\n * @method Phaser.GameObjects.Group#isFull\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the number of members equals {@link Phaser.GameObjects.Group#maxSize}.\r\n */\r\n isFull: function ()\r\n {\r\n if (this.maxSize === -1)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return (this.children.size >= this.maxSize);\r\n }\r\n },\r\n\r\n /**\r\n * Counts the number of active (or inactive) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#countActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Count active (true) or inactive (false) group members.\r\n *\r\n * @return {integer} The number of group members with an active state matching the `active` argument.\r\n */\r\n countActive: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n var total = 0;\r\n\r\n for (var i = 0; i < this.children.size; i++)\r\n {\r\n if (this.children.entries[i].active === value)\r\n {\r\n total++;\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Counts the number of in-use (active) group members.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalUsed\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of group members with an active state of true.\r\n */\r\n getTotalUsed: function ()\r\n {\r\n return this.countActive();\r\n },\r\n\r\n /**\r\n * The difference of {@link Phaser.GameObjects.Group#maxSize} and the number of active group members.\r\n *\r\n * This represents the number of group members that could be created or reactivated before reaching the size limit.\r\n *\r\n * @method Phaser.GameObjects.Group#getTotalFree\r\n * @since 3.0.0\r\n *\r\n * @return {integer} maxSize minus the number of active group numbers; or a large number (if maxSize is -1).\r\n */\r\n getTotalFree: function ()\r\n {\r\n var used = this.getTotalUsed();\r\n var capacity = (this.maxSize === -1) ? 999999999999 : this.maxSize;\r\n\r\n return (capacity - used);\r\n },\r\n\r\n /**\r\n * Sets the depth of each group member.\r\n *\r\n * @method Phaser.GameObjects.Group#setDepth\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount to set the property to.\r\n * @param {number} step - This is added to the `value` amount, multiplied by the iteration counter.\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n setDepth: function (value, step)\r\n {\r\n Actions.SetDepth(this.children.entries, value, step);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#kill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n kill: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n }\r\n },\r\n\r\n /**\r\n * Deactivates and hides a member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#killAndHide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - A member of this group.\r\n */\r\n killAndHide: function (gameObject)\r\n {\r\n if (this.children.contains(gameObject))\r\n {\r\n gameObject.setActive(false);\r\n gameObject.setVisible(false);\r\n }\r\n },\r\n\r\n /**\r\n * Toggles (flips) the visible state of each member of this group.\r\n *\r\n * @method Phaser.GameObjects.Group#toggleVisible\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Group} This Group object.\r\n */\r\n toggleVisible: function ()\r\n {\r\n Actions.ToggleVisible(this.children.entries);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Empties this group and removes it from the Scene.\r\n *\r\n * Does not call {@link Phaser.GameObjects.Group#removeCallback}.\r\n *\r\n * @method Phaser.GameObjects.Group#destroy\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [destroyChildren=false] - Also {@link Phaser.GameObjects.GameObject#destroy} each group member.\r\n */\r\n destroy: function (destroyChildren)\r\n {\r\n if (destroyChildren === undefined) { destroyChildren = false; }\r\n\r\n // This Game Object had already been destroyed\r\n if (!this.scene || this.ignoreDestroy)\r\n {\r\n return;\r\n }\r\n\r\n this.clear(false, destroyChildren);\r\n\r\n this.scene = undefined;\r\n this.children = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Group;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/Group.js?")},"./node_modules/phaser/src/gameobjects/group/GroupCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar Group = __webpack_require__(/*! ./Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\n\r\n/**\r\n * Creates a new Group Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#group\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('group', function (config)\r\n{\r\n return new Group(this.scene, null, config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupCreator.js?")},"./node_modules/phaser/src/gameobjects/group/GroupFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Group = __webpack_require__(/*! ./Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Group Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Group Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#group\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupConfig[])} [children] - Game Objects to add to this Group; or the `config` argument.\r\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - A Group Configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Group} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'group\', function (children, config)\r\n{\r\n return this.updateList.add(new Group(this.scene, children, config));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/group/GroupFactory.js?')},"./node_modules/phaser/src/gameobjects/image/Image.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar ImageRender = __webpack_require__(/*! ./ImageRender */ "./node_modules/phaser/src/gameobjects/image/ImageRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Game Object.\r\n *\r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Image = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n ImageRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Image (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Image\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Image#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/Image.js?')},"./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/image/ImageCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#image\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('image', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var image = new Image(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, image, config);\r\n\r\n return image;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageCreator.js?")},"./node_modules/phaser/src/gameobjects/image/ImageFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Image = __webpack_require__(/*! ./Image */ \"./node_modules/phaser/src/gameobjects/image/Image.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Image Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Image Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Image} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('image', function (x, y, key, frame)\r\n{\r\n return this.displayList.add(new Image(this.scene, x, y, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageFactory.js?")},"./node_modules/phaser/src/gameobjects/image/ImageRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ImageWebGLRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ImageCanvasRenderer */ "./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageRender.js?')},"./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Image#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Image} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ImageWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = ImageWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects\r\n */\r\n\r\nvar GameObjects = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/gameobjects/events/index.js"),\r\n\r\n DisplayList: __webpack_require__(/*! ./DisplayList */ "./node_modules/phaser/src/gameobjects/DisplayList.js"),\r\n GameObjectCreator: __webpack_require__(/*! ./GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js"),\r\n GameObjectFactory: __webpack_require__(/*! ./GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js"),\r\n UpdateList: __webpack_require__(/*! ./UpdateList */ "./node_modules/phaser/src/gameobjects/UpdateList.js"),\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/gameobjects/components/index.js"),\r\n\r\n BuildGameObject: __webpack_require__(/*! ./BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js"),\r\n BuildGameObjectAnimation: __webpack_require__(/*! ./BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js"),\r\n GameObject: __webpack_require__(/*! ./GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js"),\r\n BitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js"),\r\n Blitter: __webpack_require__(/*! ./blitter/Blitter */ "./node_modules/phaser/src/gameobjects/blitter/Blitter.js"),\r\n Container: __webpack_require__(/*! ./container/Container */ "./node_modules/phaser/src/gameobjects/container/Container.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElement */ "./node_modules/phaser/src/gameobjects/domelement/DOMElement.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapText */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js"),\r\n Extern: __webpack_require__(/*! ./extern/Extern.js */ "./node_modules/phaser/src/gameobjects/extern/Extern.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/Graphics.js */ "./node_modules/phaser/src/gameobjects/graphics/Graphics.js"),\r\n Group: __webpack_require__(/*! ./group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js"),\r\n Image: __webpack_require__(/*! ./image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js"),\r\n Particles: __webpack_require__(/*! ./particles */ "./node_modules/phaser/src/gameobjects/particles/index.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollower */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTexture */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js"),\r\n RetroFont: __webpack_require__(/*! ./bitmaptext/RetroFont */ "./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js"),\r\n Text: __webpack_require__(/*! ./text/static/Text */ "./node_modules/phaser/src/gameobjects/text/static/Text.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSprite */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js"),\r\n Zone: __webpack_require__(/*! ./zone/Zone */ "./node_modules/phaser/src/gameobjects/zone/Zone.js"),\r\n\r\n // Shapes\r\n\r\n Shape: __webpack_require__(/*! ./shape/Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js"),\r\n Arc: __webpack_require__(/*! ./shape/arc/Arc */ "./node_modules/phaser/src/gameobjects/shape/arc/Arc.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBox */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangle */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js"),\r\n Line: __webpack_require__(/*! ./shape/line/Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js"),\r\n Star: __webpack_require__(/*! ./shape/star/Star */ "./node_modules/phaser/src/gameobjects/shape/star/Star.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js"),\r\n\r\n // Game Object Factories\r\n\r\n Factories: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterFactory */ "./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerFactory */ "./node_modules/phaser/src/gameobjects/container/ContainerFactory.js"),\r\n DOMElement: __webpack_require__(/*! ./domelement/DOMElementFactory */ "./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js"),\r\n Extern: __webpack_require__(/*! ./extern/ExternFactory */ "./node_modules/phaser/src/gameobjects/extern/ExternFactory.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsFactory */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js"),\r\n Group: __webpack_require__(/*! ./group/GroupFactory */ "./node_modules/phaser/src/gameobjects/group/GroupFactory.js"),\r\n Image: __webpack_require__(/*! ./image/ImageFactory */ "./node_modules/phaser/src/gameobjects/image/ImageFactory.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerFactory */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js"),\r\n PathFollower: __webpack_require__(/*! ./pathfollower/PathFollowerFactory */ "./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureFactory */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteFactory */ "./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextFactory */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextFactory */ "./node_modules/phaser/src/gameobjects/text/static/TextFactory.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteFactory */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneFactory */ "./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js"),\r\n\r\n // Shapes\r\n Arc: __webpack_require__(/*! ./shape/arc/ArcFactory */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js"),\r\n Curve: __webpack_require__(/*! ./shape/curve/CurveFactory */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js"),\r\n Ellipse: __webpack_require__(/*! ./shape/ellipse/EllipseFactory */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js"),\r\n Grid: __webpack_require__(/*! ./shape/grid/GridFactory */ "./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js"),\r\n IsoBox: __webpack_require__(/*! ./shape/isobox/IsoBoxFactory */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js"),\r\n IsoTriangle: __webpack_require__(/*! ./shape/isotriangle/IsoTriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js"),\r\n Line: __webpack_require__(/*! ./shape/line/LineFactory */ "./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js"),\r\n Polygon: __webpack_require__(/*! ./shape/polygon/PolygonFactory */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js"),\r\n Rectangle: __webpack_require__(/*! ./shape/rectangle/RectangleFactory */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js"),\r\n Star: __webpack_require__(/*! ./shape/star/StarFactory */ "./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js"),\r\n Triangle: __webpack_require__(/*! ./shape/triangle/TriangleFactory */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js")\r\n },\r\n\r\n Creators: {\r\n Blitter: __webpack_require__(/*! ./blitter/BlitterCreator */ "./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js"),\r\n Container: __webpack_require__(/*! ./container/ContainerCreator */ "./node_modules/phaser/src/gameobjects/container/ContainerCreator.js"),\r\n DynamicBitmapText: __webpack_require__(/*! ./bitmaptext/dynamic/DynamicBitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js"),\r\n Graphics: __webpack_require__(/*! ./graphics/GraphicsCreator */ "./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js"),\r\n Group: __webpack_require__(/*! ./group/GroupCreator */ "./node_modules/phaser/src/gameobjects/group/GroupCreator.js"),\r\n Image: __webpack_require__(/*! ./image/ImageCreator */ "./node_modules/phaser/src/gameobjects/image/ImageCreator.js"),\r\n Particles: __webpack_require__(/*! ./particles/ParticleManagerCreator */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js"),\r\n RenderTexture: __webpack_require__(/*! ./rendertexture/RenderTextureCreator */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js"),\r\n Sprite: __webpack_require__(/*! ./sprite/SpriteCreator */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js"),\r\n StaticBitmapText: __webpack_require__(/*! ./bitmaptext/static/BitmapTextCreator */ "./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js"),\r\n Text: __webpack_require__(/*! ./text/static/TextCreator */ "./node_modules/phaser/src/gameobjects/text/static/TextCreator.js"),\r\n TileSprite: __webpack_require__(/*! ./tilesprite/TileSpriteCreator */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js"),\r\n Zone: __webpack_require__(/*! ./zone/ZoneCreator */ "./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js")\r\n }\r\n\r\n};\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n // WebGL only Game Objects\r\n GameObjects.Mesh = __webpack_require__(/*! ./mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n GameObjects.Quad = __webpack_require__(/*! ./quad/Quad */ "./node_modules/phaser/src/gameobjects/quad/Quad.js");\r\n GameObjects.Shader = __webpack_require__(/*! ./shader/Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\n\r\n GameObjects.Factories.Mesh = __webpack_require__(/*! ./mesh/MeshFactory */ "./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js");\r\n GameObjects.Factories.Quad = __webpack_require__(/*! ./quad/QuadFactory */ "./node_modules/phaser/src/gameobjects/quad/QuadFactory.js");\r\n GameObjects.Factories.Shader = __webpack_require__(/*! ./shader/ShaderFactory */ "./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js");\r\n\r\n GameObjects.Creators.Mesh = __webpack_require__(/*! ./mesh/MeshCreator */ "./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js");\r\n GameObjects.Creators.Quad = __webpack_require__(/*! ./quad/QuadCreator */ "./node_modules/phaser/src/gameobjects/quad/QuadCreator.js");\r\n GameObjects.Creators.Shader = __webpack_require__(/*! ./shader/ShaderCreator */ "./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js");\r\n\r\n GameObjects.Light = __webpack_require__(/*! ./lights/Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\n\r\n __webpack_require__(/*! ./lights/LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\n __webpack_require__(/*! ./lights/LightsPlugin */ "./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js");\r\n}\r\n\r\nmodule.exports = GameObjects;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/index.js?')},"./node_modules/phaser/src/gameobjects/lights/Light.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @classdesc\r\n * A 2D point light.\r\n *\r\n * These are typically created by a {@link Phaser.GameObjects.LightsManager}, available from within a scene via `this.lights`.\r\n *\r\n * Any Game Objects using the Light2D pipeline will then be affected by these Lights.\r\n *\r\n * They can also simply be used to represent a point light for your own purposes.\r\n *\r\n * @class Light\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color of the light. A value between 0 and 1.\r\n * @param {number} g - The green color of the light. A value between 0 and 1.\r\n * @param {number} b - The blue color of the light. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n */\r\nvar Light = new Class({\r\n\r\n initialize:\r\n\r\n function Light (x, y, radius, r, g, b, intensity)\r\n {\r\n /**\r\n * The horizontal position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The vertical position of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The radius of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.radius = radius;\r\n\r\n /**\r\n * The red color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#r\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.r = r;\r\n\r\n /**\r\n * The green color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#g\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.g = g;\r\n\r\n /**\r\n * The blue color of the light. A value between 0 and 1.\r\n *\r\n * @name Phaser.GameObjects.Light#b\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.b = b;\r\n\r\n /**\r\n * The intensity of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#intensity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.intensity = intensity;\r\n\r\n /**\r\n * The horizontal scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorX = 1.0;\r\n\r\n /**\r\n * The vertical scroll factor of the light.\r\n *\r\n * @name Phaser.GameObjects.Light#scrollFactorY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scrollFactorY = 1.0;\r\n },\r\n\r\n /**\r\n * Set the properties of the light.\r\n *\r\n * Sets both horizontal and vertical scroll factor to 1. Use {@link Phaser.GameObjects.Light#setScrollFactor} to set\r\n * the scroll factor.\r\n *\r\n * @method Phaser.GameObjects.Light#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n * @param {number} radius - The radius of the light.\r\n * @param {number} r - The red color. A value between 0 and 1.\r\n * @param {number} g - The green color. A value between 0 and 1.\r\n * @param {number} b - The blue color. A value between 0 and 1.\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n set: function (x, y, radius, r, g, b, intensity)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n this.radius = radius;\r\n\r\n this.r = r;\r\n this.g = g;\r\n this.b = b;\r\n\r\n this.intensity = intensity;\r\n\r\n this.scrollFactorX = 1;\r\n this.scrollFactorY = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scroll factor of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setScrollFactor\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal scroll factor of the light.\r\n * @param {number} y - The vertical scroll factor of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setScrollFactor: function (x, y)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.scrollFactorX = x;\r\n this.scrollFactorY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the color of the light from a single integer RGB value.\r\n *\r\n * @method Phaser.GameObjects.Light#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.r = color[0];\r\n this.g = color[1];\r\n this.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the intensity of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setIntensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} intensity - The intensity of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setIntensity: function (intensity)\r\n {\r\n this.intensity = intensity;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the position of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the light.\r\n * @param {number} y - The vertical position of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the radius of the light.\r\n *\r\n * @method Phaser.GameObjects.Light#setRadius\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the light.\r\n *\r\n * @return {Phaser.GameObjects.Light} This Light object.\r\n */\r\n setRadius: function (radius)\r\n {\r\n this.radius = radius;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Light;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/Light.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Light = __webpack_require__(/*! ./Light */ "./node_modules/phaser/src/gameobjects/lights/Light.js");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * @callback LightForEach\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Manages Lights for a Scene.\r\n *\r\n * Affects the rendering of Game Objects using the `Light2D` pipeline.\r\n *\r\n * @class LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\nvar LightsManager = new Class({\r\n\r\n initialize:\r\n\r\n function LightsManager ()\r\n {\r\n /**\r\n * The pool of Lights.\r\n *\r\n * Used to recycle removed Lights for a more efficient use of memory.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lightPool\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lightPool = [];\r\n\r\n /**\r\n * The Lights in the Scene.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#lights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.lights = [];\r\n\r\n /**\r\n * Lights that have been culled from a Camera\'s viewport.\r\n *\r\n * Lights in this list will not be rendered.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#culledLights\r\n * @type {Phaser.GameObjects.Light[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.culledLights = [];\r\n\r\n /**\r\n * The ambient color.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#ambientColor\r\n * @type {{ r: number, g: number, b: number }}\r\n * @since 3.0.0\r\n */\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n\r\n /**\r\n * Whether the Lights Manager is enabled.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#active\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.active = false;\r\n\r\n /**\r\n * The maximum number of lights that a single Camera and the lights shader can process.\r\n * Change this via the `maxLights` property in your game config, as it cannot be changed at runtime.\r\n *\r\n * @name Phaser.GameObjects.LightsManager#maxLights\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.maxLights = -1;\r\n },\r\n\r\n /**\r\n * Enable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#enable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n enable: function ()\r\n {\r\n if (this.maxLights === -1)\r\n {\r\n this.maxLights = this.scene.sys.game.renderer.config.maxLights;\r\n }\r\n\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disable the Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#disable\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n disable: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Cull any Lights that aren\'t visible to the given Camera.\r\n *\r\n * Culling Lights improves performance by ensuring that only Lights within a Camera\'s viewport are rendered.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to cull Lights for.\r\n *\r\n * @return {Phaser.GameObjects.Light[]} The culled Lights.\r\n */\r\n cull: function (camera)\r\n {\r\n var lights = this.lights;\r\n var culledLights = this.culledLights;\r\n var length = lights.length;\r\n var cameraCenterX = camera.x + camera.width / 2.0;\r\n var cameraCenterY = camera.y + camera.height / 2.0;\r\n var cameraRadius = (camera.width + camera.height) / 2.0;\r\n var point = { x: 0, y: 0 };\r\n var cameraMatrix = camera.matrix;\r\n var viewportHeight = this.systems.game.config.height;\r\n\r\n culledLights.length = 0;\r\n\r\n for (var index = 0; index < length && culledLights.length < this.maxLights; index++)\r\n {\r\n var light = lights[index];\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n // We\'ll just use bounding spheres to test if lights should be rendered\r\n var dx = cameraCenterX - (point.x - (camera.scrollX * light.scrollFactorX * camera.zoom));\r\n var dy = cameraCenterY - (viewportHeight - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n var distance = Math.sqrt(dx * dx + dy * dy);\r\n\r\n if (distance < light.radius + cameraRadius)\r\n {\r\n culledLights.push(lights[index]);\r\n }\r\n }\r\n\r\n return culledLights;\r\n },\r\n\r\n /**\r\n * Iterate over each Light with a callback.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#forEachLight\r\n * @since 3.0.0\r\n *\r\n * @param {LightForEach} callback - The callback that is called with each Light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n forEachLight: function (callback)\r\n {\r\n if (!callback)\r\n {\r\n return;\r\n }\r\n\r\n var lights = this.lights;\r\n var length = lights.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n callback(lights[index]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the ambient light color.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#setAmbientColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} rgb - The integer RGB color of the ambient light.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n setAmbientColor: function (rgb)\r\n {\r\n var color = Utils.getFloatsFromUintRGB(rgb);\r\n\r\n this.ambientColor.r = color[0];\r\n this.ambientColor.g = color[1];\r\n this.ambientColor.b = color[2];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of Lights allowed to appear at once.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getMaxVisibleLights\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The maximum number of Lights allowed to appear at once.\r\n */\r\n getMaxVisibleLights: function ()\r\n {\r\n return 10;\r\n },\r\n\r\n /**\r\n * Get the number of Lights managed by this Lights Manager.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#getLightCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of Lights managed by this Lights Manager.\r\n */\r\n getLightCount: function ()\r\n {\r\n return this.lights.length;\r\n },\r\n\r\n /**\r\n * Add a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#addLight\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the Light.\r\n * @param {number} [y=0] - The vertical position of the Light.\r\n * @param {number} [radius=100] - The radius of the Light.\r\n * @param {number} [rgb=0xffffff] - The integer RGB color of the light.\r\n * @param {number} [intensity=1] - The intensity of the Light.\r\n *\r\n * @return {Phaser.GameObjects.Light} The Light that was added.\r\n */\r\n addLight: function (x, y, radius, rgb, intensity)\r\n {\r\n var color = null;\r\n var light = null;\r\n\r\n x = (x === undefined) ? 0.0 : x;\r\n y = (y === undefined) ? 0.0 : y;\r\n rgb = (rgb === undefined) ? 0xffffff : rgb;\r\n radius = (radius === undefined) ? 100.0 : radius;\r\n intensity = (intensity === undefined) ? 1.0 : intensity;\r\n\r\n color = Utils.getFloatsFromUintRGB(rgb);\r\n light = null;\r\n\r\n if (this.lightPool.length > 0)\r\n {\r\n light = this.lightPool.pop();\r\n light.set(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n else\r\n {\r\n light = new Light(x, y, radius, color[0], color[1], color[2], intensity);\r\n }\r\n\r\n this.lights.push(light);\r\n\r\n return light;\r\n },\r\n\r\n /**\r\n * Remove a Light.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#removeLight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Light} light - The Light to remove.\r\n *\r\n * @return {Phaser.GameObjects.LightsManager} This Lights Manager object.\r\n */\r\n removeLight: function (light)\r\n {\r\n var index = this.lights.indexOf(light);\r\n\r\n if (index >= 0)\r\n {\r\n this.lightPool.push(light);\r\n this.lights.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shut down the Lights Manager.\r\n *\r\n * Recycles all active Lights into the Light pool, resets ambient light color and clears the lists of Lights and\r\n * culled Lights.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n while (this.lights.length > 0)\r\n {\r\n this.lightPool.push(this.lights.pop());\r\n }\r\n\r\n this.ambientColor = { r: 0.1, g: 0.1, b: 0.1 };\r\n this.culledLights.length = 0;\r\n this.lights.length = 0;\r\n },\r\n\r\n /**\r\n * Destroy the Lights Manager.\r\n *\r\n * Cleans up all references by calling {@link Phaser.GameObjects.LightsManager#shutdown}.\r\n *\r\n * @method Phaser.GameObjects.LightsManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LightsManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsManager.js?')},"./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar LightsManager = __webpack_require__(/*! ./LightsManager */ "./node_modules/phaser/src/gameobjects/lights/LightsManager.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene plugin that provides a {@link Phaser.GameObjects.LightsManager} for the Light2D pipeline.\r\n *\r\n * Available from within a Scene via `this.lights`.\r\n *\r\n * Add Lights using the {@link Phaser.GameObjects.LightsManager#addLight} method:\r\n *\r\n * ```javascript\r\n * // Enable the Lights Manager because it is disabled by default\r\n * this.lights.enable();\r\n *\r\n * // Create a Light at [400, 300] with a radius of 200\r\n * this.lights.addLight(400, 300, 200);\r\n * ```\r\n *\r\n * For Game Objects to be affected by the Lights when rendered, you will need to set them to use the `Light2D` pipeline like so:\r\n *\r\n * ```javascript\r\n * sprite.setPipeline(\'Light2D\');\r\n * ```\r\n *\r\n * @class LightsPlugin\r\n * @extends Phaser.GameObjects.LightsManager\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this Lights Plugin belongs to.\r\n */\r\nvar LightsPlugin = new Class({\r\n\r\n Extends: LightsManager,\r\n\r\n initialize:\r\n\r\n function LightsPlugin (scene)\r\n {\r\n /**\r\n * A reference to the Scene that this Lights Plugin belongs to.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene\'s systems.\r\n *\r\n * @name Phaser.GameObjects.LightsPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n if (!scene.sys.settings.isBooted)\r\n {\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n }\r\n\r\n LightsManager.call(this);\r\n },\r\n\r\n /**\r\n * Boot the Lights Plugin.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#boot\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.on(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Destroy the Lights Plugin.\r\n *\r\n * Cleans up all references.\r\n *\r\n * @method Phaser.GameObjects.LightsPlugin#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = undefined;\r\n this.systems = undefined;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'LightsPlugin\', LightsPlugin, \'lights\');\r\n\r\nmodule.exports = LightsPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js?')},"./node_modules/phaser/src/gameobjects/mesh/Mesh.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar MeshRender = __webpack_require__(/*! ./MeshRender */ "./node_modules/phaser/src/gameobjects/mesh/MeshRender.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Mesh Game Object.\r\n *\r\n * @class Mesh\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Mesh = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Size,\r\n Components.Texture,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n MeshRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Mesh (scene, x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Mesh\');\r\n\r\n if (vertices.length !== uv.length)\r\n {\r\n throw new Error(\'Mesh Vertex count must match UV count\');\r\n }\r\n\r\n var verticesUB = (vertices.length / 2) | 0;\r\n\r\n if (colors.length > 0 && colors.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Color count must match Vertex count\');\r\n }\r\n\r\n if (alphas.length > 0 && alphas.length < verticesUB)\r\n {\r\n throw new Error(\'Mesh Alpha count must match Vertex count\');\r\n }\r\n\r\n var i;\r\n\r\n if (colors.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n colors[i] = 0xFFFFFF;\r\n }\r\n }\r\n\r\n if (alphas.length === 0)\r\n {\r\n for (i = 0; i < verticesUB; ++i)\r\n {\r\n alphas[i] = 1.0;\r\n }\r\n }\r\n\r\n /**\r\n * An array containing the vertices data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#vertices\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertices = new Float32Array(vertices);\r\n\r\n /**\r\n * An array containing the uv data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#uv\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.uv = new Float32Array(uv);\r\n\r\n /**\r\n * An array containing the color data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#colors\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.colors = new Uint32Array(colors);\r\n\r\n /**\r\n * An array containing the alpha data for this Mesh.\r\n *\r\n * @name Phaser.GameObjects.Mesh#alphas\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.alphas = new Float32Array(alphas);\r\n\r\n /**\r\n * Fill or additive mode used when blending the color values?\r\n * \r\n * @name Phaser.GameObjects.Mesh#tintFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.11.0\r\n */\r\n this.tintFill = false;\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * This method is left intentionally empty and does not do anything.\r\n * It is retained to allow a Mesh or Quad to be added to a Container.\r\n * \r\n * @method Phaser.GameObjects.Mesh#setAlpha\r\n * @since 3.17.0\r\n */\r\n setAlpha: NOOP\r\n\r\n});\r\n\r\nmodule.exports = Mesh;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/Mesh.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Mesh.Render. There is no Canvas renderer for Mesh objects.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar MeshCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = MeshCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('mesh', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var vertices = GetValue(config, 'vertices', []);\r\n var colors = GetValue(config, 'colors', []);\r\n var alphas = GetValue(config, 'alphas', []);\r\n var uv = GetValue(config, 'uv', []);\r\n\r\n var mesh = new Mesh(this.scene, 0, 0, vertices, uv, colors, alphas, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, mesh, config);\r\n\r\n return mesh;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Mesh = __webpack_require__(/*! ./Mesh */ \"./node_modules/phaser/src/gameobjects/mesh/Mesh.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Mesh Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Mesh Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#mesh\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number[]} vertices - An array containing the vertices data for this Mesh.\r\n * @param {number[]} uv - An array containing the uv data for this Mesh.\r\n * @param {number[]} colors - An array containing the color data for this Mesh.\r\n * @param {number[]} alphas - An array containing the alpha data for this Mesh.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Mesh} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('mesh', function (x, y, vertices, uv, colors, alphas, texture, frame)\r\n {\r\n return this.displayList.add(new Mesh(this.scene, x, y, vertices, uv, colors, alphas, texture, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js?")},"./node_modules/phaser/src/gameobjects/mesh/MeshRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./MeshWebGLRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./MeshCanvasRenderer */ "./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshRender.js?')},"./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Mesh#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Mesh} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar MeshWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n renderer.setPipeline(pipeline, src);\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var spriteMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n spriteMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = src.x;\r\n spriteMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var frame = src.frame;\r\n var texture = frame.glTexture;\r\n\r\n var vertices = src.vertices;\r\n var uvs = src.uv;\r\n var colors = src.colors;\r\n var alphas = src.alphas;\r\n\r\n var meshVerticesLength = vertices.length;\r\n var vertexCount = Math.floor(meshVerticesLength * 0.5);\r\n\r\n if (pipeline.vertexCount + vertexCount > pipeline.vertexCapacity)\r\n {\r\n pipeline.flush();\r\n }\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n var vertexViewF32 = pipeline.vertexViewF32;\r\n var vertexViewU32 = pipeline.vertexViewU32;\r\n\r\n var vertexOffset = (pipeline.vertexCount * pipeline.vertexComponentCount) - 1;\r\n\r\n var colorIndex = 0;\r\n var tintEffect = src.tintFill;\r\n\r\n for (var i = 0; i < meshVerticesLength; i += 2)\r\n {\r\n var x = vertices[i + 0];\r\n var y = vertices[i + 1];\r\n\r\n var tx = x * calcMatrix.a + y * calcMatrix.c + calcMatrix.e;\r\n var ty = x * calcMatrix.b + y * calcMatrix.d + calcMatrix.f;\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx = Math.round(tx);\r\n ty = Math.round(ty);\r\n }\r\n\r\n vertexViewF32[++vertexOffset] = tx;\r\n vertexViewF32[++vertexOffset] = ty;\r\n vertexViewF32[++vertexOffset] = uvs[i + 0];\r\n vertexViewF32[++vertexOffset] = uvs[i + 1];\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = Utils.getTintAppendFloatAlpha(colors[colorIndex], camera.alpha * alphas[colorIndex]);\r\n\r\n colorIndex++;\r\n }\r\n\r\n pipeline.vertexCount += vertexCount;\r\n};\r\n\r\nmodule.exports = MeshWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FloatBetween = __webpack_require__(/*! ../../math/FloatBetween */ \"./node_modules/phaser/src/math/FloatBetween.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ../../tweens/builders/GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter property.\r\n *\r\n * Facilitates changing Particle properties as they are emitted and throughout their lifetime.\r\n *\r\n * @class EmitterOp\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for the Particle Emitter that owns this property.\r\n * @param {string} key - The name of the property.\r\n * @param {number} defaultValue - The default value of the property.\r\n * @param {boolean} [emitOnly=false] - Whether the property can only be modified when a Particle is emitted.\r\n */\r\nvar EmitterOp = new Class({\r\n\r\n initialize:\r\n\r\n function EmitterOp (config, key, defaultValue, emitOnly)\r\n {\r\n if (emitOnly === undefined)\r\n {\r\n emitOnly = false;\r\n }\r\n\r\n /**\r\n * The name of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyKey\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.propertyKey = key;\r\n\r\n /**\r\n * The value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#propertyValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.propertyValue = defaultValue;\r\n\r\n /**\r\n * The default value of this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#defaultValue\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.defaultValue = defaultValue;\r\n\r\n /**\r\n * The number of steps for stepped easing between {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} values, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#steps\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.steps = 0;\r\n\r\n /**\r\n * The step counter for stepped easing, per emit.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#counter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.counter = 0;\r\n\r\n /**\r\n * The start value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#start\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.start = 0;\r\n\r\n /**\r\n * The end value for this property to ease between.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#end\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.end = 0;\r\n\r\n /**\r\n * The easing function to use for updating this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#ease\r\n * @type {?function}\r\n * @since 3.0.0\r\n */\r\n this.ease;\r\n\r\n /**\r\n * Whether this property can only be modified when a Particle is emitted.\r\n *\r\n * Set to `true` to allow only {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} callbacks to be set and\r\n * affect this property.\r\n *\r\n * Set to `false` to allow both {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks to be set and affect this property.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#emitOnly\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.emitOnly = emitOnly;\r\n\r\n /**\r\n * The callback to run for Particles when they are emitted from the Particle Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onEmit\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitCallback}\r\n * @since 3.0.0\r\n */\r\n this.onEmit = this.defaultEmit;\r\n\r\n /**\r\n * The callback to run for Particles when they are updated.\r\n *\r\n * @name Phaser.GameObjects.Particles.EmitterOp#onUpdate\r\n * @type {Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.onUpdate = this.defaultUpdate;\r\n\r\n this.loadConfig(config);\r\n },\r\n\r\n /**\r\n * Load the property from a Particle Emitter configuration object.\r\n *\r\n * Optionally accepts a new property key to use, replacing the current one.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#loadConfig\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} [config] - Settings for the Particle Emitter that owns this property.\r\n * @param {string} [newKey] - The new key to use for this property, if any.\r\n */\r\n loadConfig: function (config, newKey)\r\n {\r\n if (config === undefined)\r\n {\r\n config = {};\r\n }\r\n\r\n if (newKey)\r\n {\r\n this.propertyKey = newKey;\r\n }\r\n\r\n this.propertyValue = GetFastValue(\r\n config,\r\n this.propertyKey,\r\n this.defaultValue\r\n );\r\n\r\n this.setMethods();\r\n\r\n if (this.emitOnly)\r\n {\r\n // Reset it back again\r\n this.onUpdate = this.defaultUpdate;\r\n }\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Particle Emitter property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Particle Emitter property.\r\n */\r\n toJSON: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * Change the current value of the property and update its callback methods.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#onChange\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the property.\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n onChange: function (value)\r\n {\r\n this.propertyValue = value;\r\n\r\n return this.setMethods();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.EmitterOp#onEmit} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#onUpdate} callbacks based on the type of the current\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#propertyValue}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#setMethods\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object.\r\n */\r\n setMethods: function ()\r\n {\r\n var value = this.propertyValue;\r\n\r\n var t = typeof value;\r\n\r\n if (t === 'number')\r\n {\r\n // Explicit static value:\r\n // x: 400\r\n\r\n this.onEmit = this.staticValueEmit;\r\n this.onUpdate = this.staticValueUpdate; // How?\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n // Picks a random element from the array:\r\n // x: [ 100, 200, 300, 400 ]\r\n\r\n this.onEmit = this.randomStaticValueEmit;\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the onUpdate function and no onEmit (unless this op is an emitOnly one)\r\n // Custom callback, must return a value:\r\n\r\n /*\r\n x: function (particle, key, t, value)\r\n {\r\n return value + 50;\r\n }\r\n */\r\n\r\n if (this.emitOnly)\r\n {\r\n this.onEmit = value;\r\n }\r\n else\r\n {\r\n this.onUpdate = value;\r\n }\r\n }\r\n else if (t === 'object' && (this.has(value, 'random') || this.hasBoth(value, 'start', 'end') || this.hasBoth(value, 'min', 'max')))\r\n {\r\n this.start = this.has(value, 'start') ? value.start : value.min;\r\n this.end = this.has(value, 'end') ? value.end : value.max;\r\n\r\n var isRandom = (this.hasBoth(value, 'min', 'max') || !!value.random);\r\n\r\n // A random starting value (using 'min | max' instead of 'start | end' automatically implies a random value)\r\n\r\n // x: { start: 100, end: 400, random: true } OR { min: 100, max: 400 } OR { random: [ 100, 400 ] }\r\n\r\n if (isRandom)\r\n {\r\n var rnd = value.random;\r\n\r\n // x: { random: [ 100, 400 ] } = the same as doing: x: { start: 100, end: 400, random: true }\r\n if (Array.isArray(rnd))\r\n {\r\n this.start = rnd[0];\r\n this.end = rnd[1];\r\n }\r\n\r\n this.onEmit = this.randomRangedValueEmit;\r\n }\r\n\r\n if (this.has(value, 'steps'))\r\n {\r\n // A stepped (per emit) range\r\n\r\n // x: { start: 100, end: 400, steps: 64 }\r\n\r\n // Increments a value stored in the emitter\r\n\r\n this.steps = value.steps;\r\n this.counter = this.start;\r\n\r\n this.onEmit = this.steppedEmit;\r\n }\r\n else\r\n {\r\n // An eased range (defaults to Linear if not specified)\r\n\r\n // x: { start: 100, end: 400, [ ease: 'Linear' ] }\r\n\r\n var easeType = this.has(value, 'ease') ? value.ease : 'Linear';\r\n\r\n this.ease = GetEaseFunction(easeType);\r\n\r\n if (!isRandom)\r\n {\r\n this.onEmit = this.easedValueEmit;\r\n }\r\n\r\n // BUG: alpha, rotate, scaleX, scaleY, or tint are eased here if {min, max} is given.\r\n // Probably this branch should exclude isRandom entirely.\r\n\r\n this.onUpdate = this.easeValueUpdate;\r\n }\r\n }\r\n else if (t === 'object' && this.hasEither(value, 'onEmit', 'onUpdate'))\r\n {\r\n // Custom onEmit and onUpdate callbacks\r\n\r\n /*\r\n x: {\r\n // Called at the start of the particles life, when it is being created\r\n onEmit: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n // Called during the particles life on each update\r\n onUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (this.has(value, 'onEmit'))\r\n {\r\n this.onEmit = value.onEmit;\r\n }\r\n\r\n if (this.has(value, 'onUpdate'))\r\n {\r\n this.onUpdate = value.onUpdate;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether an object has the given property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#has\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key - The key of the property to look for in the object.\r\n *\r\n * @return {boolean} `true` if the property exists in the object, `false` otherwise.\r\n */\r\n has: function (object, key)\r\n {\r\n return object.hasOwnProperty(key);\r\n },\r\n\r\n /**\r\n * Check whether an object has both of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasBoth\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if both properties exist in the object, `false` otherwise.\r\n */\r\n hasBoth: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) && object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * Check whether an object has at least one of the given properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#hasEither\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to check.\r\n * @param {string} key1 - The key of the first property to check the object for.\r\n * @param {string} key2 - The key of the second property to check the object for.\r\n *\r\n * @return {boolean} `true` if at least one of the properties exists in the object, `false` if neither exist.\r\n */\r\n hasEither: function (object, key1, key2)\r\n {\r\n return object.hasOwnProperty(key1) || object.hasOwnProperty(key2);\r\n },\r\n\r\n /**\r\n * The returned value sets what the property will be at the START of the particles life, on emit.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} [value] - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultEmit: function (particle, key, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * The returned value updates the property for the duration of the particles life.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#defaultUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n * @param {number} value - The current value of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n defaultUpdate: function (particle, key, t, value)\r\n {\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueEmit: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns the current value of the property.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#staticValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @return {number} The current value of the property.\r\n */\r\n staticValueUpdate: function ()\r\n {\r\n return this.propertyValue;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a random value from the current value array.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomStaticValueEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomStaticValueEmit: function ()\r\n {\r\n var randomIndex = Math.floor(Math.random() * this.propertyValue.length);\r\n\r\n return this.propertyValue[randomIndex];\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a value between the {@link Phaser.GameObjects.Particles.EmitterOp#start} and\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#end} range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#randomRangedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The key of the property.\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n randomRangedValueEmit: function (particle, key)\r\n {\r\n var value = FloatBetween(this.start, this.end);\r\n\r\n if (particle && particle.data[key])\r\n {\r\n particle.data[key].min = value;\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback that returns a stepped value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#steppedEmit\r\n * @since 3.0.0\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n steppedEmit: function ()\r\n {\r\n var current = this.counter;\r\n\r\n var next = this.counter + (this.end - this.start) / this.steps;\r\n\r\n this.counter = Wrap(next, this.start, this.end);\r\n\r\n return current;\r\n },\r\n\r\n /**\r\n * An `onEmit` callback for an eased property.\r\n *\r\n * It prepares the particle for easing by {@link Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate}.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easedValueEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n *\r\n * @return {number} {@link Phaser.GameObjects.Particles.EmitterOp#start}, as the new value of the property.\r\n */\r\n easedValueEmit: function (particle, key)\r\n {\r\n if (particle && particle.data[key])\r\n {\r\n var data = particle.data[key];\r\n\r\n data.min = this.start;\r\n data.max = this.end;\r\n }\r\n\r\n return this.start;\r\n },\r\n\r\n /**\r\n * An `onUpdate` callback that returns an eased value between the\r\n * {@link Phaser.GameObjects.Particles.EmitterOp#start} and {@link Phaser.GameObjects.Particles.EmitterOp#end}\r\n * range.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterOp#easeValueUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The particle.\r\n * @param {string} key - The name of the property.\r\n * @param {number} t - The T value (between 0 and 1)\r\n *\r\n * @return {number} The new value of the property.\r\n */\r\n easeValueUpdate: function (particle, key, t)\r\n {\r\n var data = particle.data[key];\r\n\r\n return (data.max - data.min) * this.ease(t) + data.min;\r\n }\r\n});\r\n\r\nmodule.exports = EmitterOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/EmitterOp.js?")},"./node_modules/phaser/src/gameobjects/particles/GravityWell.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The GravityWell action applies a force on the particle to draw it towards, or repel it from, a single point.\r\n * \r\n * The force applied is inversely proportional to the square of the distance from the particle to the point, in accordance with Newton's law of gravity.\r\n * \r\n * This simulates the effect of gravity over large distances (as between planets, for example).\r\n *\r\n * @class GravityWell\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.GravityWellConfig)} [x=0] - The x coordinate of the Gravity Well, in world space.\r\n * @param {number} [y=0] - The y coordinate of the Gravity Well, in world space.\r\n * @param {number} [power=0] - The strength of the gravity force - larger numbers produce a stronger force.\r\n * @param {number} [epsilon=100] - The minimum distance for which the gravity force is calculated.\r\n * @param {number} [gravity=50] - The gravitational force of this Gravity Well.\r\n */\r\nvar GravityWell = new Class({\r\n\r\n initialize:\r\n\r\n function GravityWell (x, y, power, epsilon, gravity)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var config = x;\r\n\r\n x = GetFastValue(config, 'x', 0);\r\n y = GetFastValue(config, 'y', 0);\r\n power = GetFastValue(config, 'power', 0);\r\n epsilon = GetFastValue(config, 'epsilon', 100);\r\n gravity = GetFastValue(config, 'gravity', 50);\r\n }\r\n else\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (power === undefined) { power = 0; }\r\n if (epsilon === undefined) { epsilon = 100; }\r\n if (gravity === undefined) { gravity = 50; }\r\n }\r\n\r\n /**\r\n * The x coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of the Gravity Well, in world space.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The active state of the Gravity Well. An inactive Gravity Well will not influence any particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Internal gravity value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_gravity\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._gravity = gravity;\r\n\r\n /**\r\n * Internal power value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_power\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._power = 0;\r\n\r\n /**\r\n * Internal epsilon value.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#_epsilon\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._epsilon = 0;\r\n\r\n /**\r\n * The strength of the gravity force - larger numbers produce a stronger force.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#power\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.power = power;\r\n\r\n /**\r\n * The minimum distance for which the gravity force is calculated.\r\n *\r\n * @name Phaser.GameObjects.Particles.GravityWell#epsilon\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.epsilon = epsilon;\r\n },\r\n\r\n /**\r\n * Takes a Particle and updates it based on the properties of this Gravity Well.\r\n *\r\n * @method Phaser.GameObjects.Particles.GravityWell#update\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to update.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n */\r\n update: function (particle, delta)\r\n {\r\n var x = this.x - particle.x;\r\n var y = this.y - particle.y;\r\n var dSq = x * x + y * y;\r\n\r\n if (dSq === 0)\r\n {\r\n return;\r\n }\r\n\r\n var d = Math.sqrt(dSq);\r\n\r\n if (dSq < this._epsilon)\r\n {\r\n dSq = this._epsilon;\r\n }\r\n\r\n var factor = ((this._power * delta) / (dSq * d)) * 100;\r\n\r\n particle.velocityX += x * factor;\r\n particle.velocityY += y * factor;\r\n },\r\n\r\n epsilon: {\r\n\r\n get: function ()\r\n {\r\n return Math.sqrt(this._epsilon);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._epsilon = value * value;\r\n }\r\n\r\n },\r\n\r\n power: {\r\n\r\n get: function ()\r\n {\r\n return this._power / this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._power = value * this._gravity;\r\n }\r\n\r\n },\r\n\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this._gravity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var pwr = this.power;\r\n this._gravity = value;\r\n this.power = pwr;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = GravityWell;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/GravityWell.js?")},"./node_modules/phaser/src/gameobjects/particles/Particle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle is a simple Game Object controlled by a Particle Emitter and Manager, and rendered by the Manager.\r\n * It uses its own lightweight physics system, and can interact only with its Emitter's bounds and zones.\r\n *\r\n * @class Particle\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to which this Particle belongs.\r\n */\r\nvar Particle = new Class({\r\n\r\n initialize:\r\n\r\n function Particle (emitter)\r\n {\r\n /**\r\n * The Emitter to which this Particle belongs.\r\n *\r\n * A Particle can only belong to a single Emitter and is created, updated and destroyed via it.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#emitter\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitter}\r\n * @since 3.0.0\r\n */\r\n this.emitter = emitter;\r\n\r\n /**\r\n * The texture frame used to render this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * The x coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y coordinate of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The x velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityX = 0;\r\n\r\n /**\r\n * The y velocity of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#velocityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.velocityY = 0;\r\n\r\n /**\r\n * The x acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = 0;\r\n\r\n /**\r\n * The y acceleration of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#accelerationY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = 0;\r\n\r\n /**\r\n * The maximum horizontal velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityX\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = 10000;\r\n\r\n /**\r\n * The maximum vertical velocity this Particle can travel at.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#maxVelocityY\r\n * @type {number}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = 10000;\r\n\r\n /**\r\n * The bounciness, or restitution, of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#bounce\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = 0;\r\n\r\n /**\r\n * The horizontal scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleX = 1;\r\n\r\n /**\r\n * The vertical scale of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#scaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.scaleY = 1;\r\n\r\n /**\r\n * The alpha value of this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#alpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.alpha = 1;\r\n\r\n /**\r\n * The angle of this Particle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The angle of this Particle in radians.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#rotation\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * The tint applied to this Particle.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#tint\r\n * @type {integer}\r\n * @webglOnly\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * The lifespan of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#life\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.life = 1000;\r\n\r\n /**\r\n * The current life of this Particle in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeCurrent\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.lifeCurrent = 1000;\r\n\r\n /**\r\n * The delay applied to this Particle upon emission, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#delayCurrent\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delayCurrent = 0;\r\n\r\n /**\r\n * The normalized lifespan T value, where 0 is the start and 1 is the end.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#lifeT\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.lifeT = 0;\r\n\r\n /**\r\n * The data used by the ease equation.\r\n *\r\n * @name Phaser.GameObjects.Particles.Particle#data\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n tint: { min: 0xffffff, max: 0xffffff, current: 0xffffff },\r\n alpha: { min: 1, max: 1 },\r\n rotate: { min: 0, max: 0 },\r\n scaleX: { min: 1, max: 1 },\r\n scaleY: { min: 1, max: 1 }\r\n };\r\n },\r\n\r\n /**\r\n * Checks to see if this Particle is alive and updating.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#isAlive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Particle is alive and updating, otherwise `false`.\r\n */\r\n isAlive: function ()\r\n {\r\n return (this.lifeCurrent > 0);\r\n },\r\n\r\n /**\r\n * Resets the position of this particle back to zero.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#resetPosition\r\n * @since 3.16.0\r\n */\r\n resetPosition: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n },\r\n\r\n /**\r\n * Starts this Particle from the given coordinates.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#fire\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to launch this Particle from.\r\n * @param {number} y - The y coordinate to launch this Particle from.\r\n */\r\n fire: function (x, y)\r\n {\r\n var emitter = this.emitter;\r\n\r\n this.frame = emitter.getFrame();\r\n\r\n if (emitter.emitZone)\r\n {\r\n // Updates particle.x and particle.y during this call\r\n emitter.emitZone.getPoint(this);\r\n }\r\n\r\n if (x === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.x += emitter.follow.x + emitter.followOffset.x;\r\n }\r\n\r\n this.x += emitter.x.onEmit(this, 'x');\r\n }\r\n else\r\n {\r\n this.x += x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n if (emitter.follow)\r\n {\r\n this.y += emitter.follow.y + emitter.followOffset.y;\r\n }\r\n\r\n this.y += emitter.y.onEmit(this, 'y');\r\n }\r\n else\r\n {\r\n this.y += y;\r\n }\r\n\r\n this.life = emitter.lifespan.onEmit(this, 'lifespan');\r\n this.lifeCurrent = this.life;\r\n this.lifeT = 0;\r\n\r\n var sx = emitter.speedX.onEmit(this, 'speedX');\r\n var sy = (emitter.speedY) ? emitter.speedY.onEmit(this, 'speedY') : sx;\r\n\r\n if (emitter.radial)\r\n {\r\n var rad = DegToRad(emitter.angle.onEmit(this, 'angle'));\r\n\r\n this.velocityX = Math.cos(rad) * Math.abs(sx);\r\n this.velocityY = Math.sin(rad) * Math.abs(sy);\r\n }\r\n else if (emitter.moveTo)\r\n {\r\n var mx = emitter.moveToX.onEmit(this, 'moveToX');\r\n var my = (emitter.moveToY) ? emitter.moveToY.onEmit(this, 'moveToY') : mx;\r\n\r\n var angle = Math.atan2(my - this.y, mx - this.x);\r\n\r\n var speed = DistanceBetween(this.x, this.y, mx, my) / (this.life / 1000);\r\n\r\n // We know how many pixels we need to move, but how fast?\r\n // var speed = this.distanceToXY(displayObject, x, y) / (maxTime / 1000);\r\n\r\n this.velocityX = Math.cos(angle) * speed;\r\n this.velocityY = Math.sin(angle) * speed;\r\n }\r\n else\r\n {\r\n this.velocityX = sx;\r\n this.velocityY = sy;\r\n }\r\n\r\n if (emitter.acceleration)\r\n {\r\n this.accelerationX = emitter.accelerationX.onEmit(this, 'accelerationX');\r\n this.accelerationY = emitter.accelerationY.onEmit(this, 'accelerationY');\r\n }\r\n\r\n this.maxVelocityX = emitter.maxVelocityX.onEmit(this, 'maxVelocityX');\r\n this.maxVelocityY = emitter.maxVelocityY.onEmit(this, 'maxVelocityY');\r\n\r\n this.delayCurrent = emitter.delay.onEmit(this, 'delay');\r\n\r\n this.scaleX = emitter.scaleX.onEmit(this, 'scaleX');\r\n this.scaleY = (emitter.scaleY) ? emitter.scaleY.onEmit(this, 'scaleY') : this.scaleX;\r\n\r\n this.angle = emitter.rotate.onEmit(this, 'rotate');\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.bounce = emitter.bounce.onEmit(this, 'bounce');\r\n\r\n this.alpha = emitter.alpha.onEmit(this, 'alpha');\r\n\r\n this.tint = emitter.tint.onEmit(this, 'tint');\r\n },\r\n\r\n /**\r\n * An internal method that calculates the velocity of the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter that is updating this Particle.\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - Particle processors (gravity wells).\r\n */\r\n computeVelocity: function (emitter, delta, step, processors)\r\n {\r\n var vx = this.velocityX;\r\n var vy = this.velocityY;\r\n\r\n var ax = this.accelerationX;\r\n var ay = this.accelerationY;\r\n\r\n var mx = this.maxVelocityX;\r\n var my = this.maxVelocityY;\r\n\r\n vx += (emitter.gravityX * step);\r\n vy += (emitter.gravityY * step);\r\n\r\n if (ax)\r\n {\r\n vx += (ax * step);\r\n }\r\n\r\n if (ay)\r\n {\r\n vy += (ay * step);\r\n }\r\n\r\n if (vx > mx)\r\n {\r\n vx = mx;\r\n }\r\n else if (vx < -mx)\r\n {\r\n vx = -mx;\r\n }\r\n\r\n if (vy > my)\r\n {\r\n vy = my;\r\n }\r\n else if (vy < -my)\r\n {\r\n vy = -my;\r\n }\r\n\r\n this.velocityX = vx;\r\n this.velocityY = vy;\r\n\r\n // Apply any additional processors\r\n for (var i = 0; i < processors.length; i++)\r\n {\r\n processors[i].update(this, delta, step);\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this Particle is still within the bounds defined by the given Emitter.\r\n *\r\n * If not, and depending on the Emitter collision flags, the Particle may either stop or rebound.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#checkBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Emitter to check the bounds against.\r\n */\r\n checkBounds: function (emitter)\r\n {\r\n var bounds = emitter.bounds;\r\n var bounce = -this.bounce;\r\n\r\n if (this.x < bounds.x && emitter.collideLeft)\r\n {\r\n this.x = bounds.x;\r\n this.velocityX *= bounce;\r\n }\r\n else if (this.x > bounds.right && emitter.collideRight)\r\n {\r\n this.x = bounds.right;\r\n this.velocityX *= bounce;\r\n }\r\n\r\n if (this.y < bounds.y && emitter.collideTop)\r\n {\r\n this.y = bounds.y;\r\n this.velocityY *= bounce;\r\n }\r\n else if (this.y > bounds.bottom && emitter.collideBottom)\r\n {\r\n this.y = bounds.bottom;\r\n this.velocityY *= bounce;\r\n }\r\n },\r\n\r\n /**\r\n * The main update method for this Particle.\r\n *\r\n * Updates its life values, computes the velocity and repositions the Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Particle#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms.\r\n * @param {number} step - The delta value divided by 1000.\r\n * @param {array} processors - An optional array of update processors.\r\n *\r\n * @return {boolean} Returns `true` if this Particle has now expired and should be removed, otherwise `false` if still active.\r\n */\r\n update: function (delta, step, processors)\r\n {\r\n if (this.delayCurrent > 0)\r\n {\r\n this.delayCurrent -= delta;\r\n\r\n return false;\r\n }\r\n\r\n var emitter = this.emitter;\r\n\r\n // How far along in life is this particle? (t = 0 to 1)\r\n var t = 1 - (this.lifeCurrent / this.life);\r\n\r\n this.lifeT = t;\r\n\r\n this.computeVelocity(emitter, delta, step, processors);\r\n\r\n this.x += this.velocityX * step;\r\n this.y += this.velocityY * step;\r\n\r\n if (emitter.bounds)\r\n {\r\n this.checkBounds(emitter);\r\n }\r\n\r\n if (emitter.deathZone && emitter.deathZone.willKill(this))\r\n {\r\n this.lifeCurrent = 0;\r\n\r\n // No need to go any further, particle has been killed\r\n return true;\r\n }\r\n\r\n this.scaleX = emitter.scaleX.onUpdate(this, 'scaleX', t, this.scaleX);\r\n\r\n if (emitter.scaleY)\r\n {\r\n this.scaleY = emitter.scaleY.onUpdate(this, 'scaleY', t, this.scaleY);\r\n }\r\n else\r\n {\r\n this.scaleY = this.scaleX;\r\n }\r\n\r\n this.angle = emitter.rotate.onUpdate(this, 'rotate', t, this.angle);\r\n this.rotation = DegToRad(this.angle);\r\n\r\n this.alpha = emitter.alpha.onUpdate(this, 'alpha', t, this.alpha);\r\n\r\n this.tint = emitter.tint.onUpdate(this, 'tint', t, this.tint);\r\n\r\n this.lifeCurrent -= delta;\r\n\r\n return (this.lifeCurrent <= 0);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Particle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/Particle.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DeathZone = __webpack_require__(/*! ./zones/DeathZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js\");\r\nvar EdgeZone = __webpack_require__(/*! ./zones/EdgeZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js\");\r\nvar EmitterOp = __webpack_require__(/*! ./EmitterOp */ \"./node_modules/phaser/src/gameobjects/particles/EmitterOp.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ \"./node_modules/phaser/src/utils/array/GetRandom.js\");\r\nvar HasAny = __webpack_require__(/*! ../../utils/object/HasAny */ \"./node_modules/phaser/src/utils/object/HasAny.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Particle = __webpack_require__(/*! ./Particle */ \"./node_modules/phaser/src/gameobjects/particles/Particle.js\");\r\nvar RandomZone = __webpack_require__(/*! ./zones/RandomZone */ \"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar StableSort = __webpack_require__(/*! ../../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A particle emitter represents a single particle stream.\r\n * It controls a pool of {@link Phaser.GameObjects.Particles.Particle Particles} and is controlled by a {@link Phaser.GameObjects.Particles.ParticleEmitterManager Particle Emitter Manager}.\r\n *\r\n * @class ParticleEmitter\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} manager - The Emitter Manager this Emitter belongs to.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n */\r\nvar ParticleEmitter = new Class({\r\n\r\n Mixins: [\r\n Components.BlendMode,\r\n Components.Mask,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function ParticleEmitter (manager, config)\r\n {\r\n /**\r\n * The Emitter Manager this Emitter belongs to.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#manager\r\n * @type {Phaser.GameObjects.Particles.ParticleEmitterManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The texture assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = manager.texture;\r\n\r\n /**\r\n * The texture frames assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frames\r\n * @type {Phaser.Textures.Frame[]}\r\n * @since 3.0.0\r\n */\r\n this.frames = [ manager.defaultFrame ];\r\n\r\n /**\r\n * The default texture frame assigned to particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#defaultFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.defaultFrame = manager.defaultFrame;\r\n\r\n /**\r\n * Names of simple configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configFastMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configFastMap = [\r\n 'active',\r\n 'blendMode',\r\n 'collideBottom',\r\n 'collideLeft',\r\n 'collideRight',\r\n 'collideTop',\r\n 'deathCallback',\r\n 'deathCallbackScope',\r\n 'emitCallback',\r\n 'emitCallbackScope',\r\n 'follow',\r\n 'frequency',\r\n 'gravityX',\r\n 'gravityY',\r\n 'maxParticles',\r\n 'name',\r\n 'on',\r\n 'particleBringToTop',\r\n 'particleClass',\r\n 'radial',\r\n 'timeScale',\r\n 'trackVisible',\r\n 'visible'\r\n ];\r\n\r\n /**\r\n * Names of complex configuration properties.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#configOpMap\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.configOpMap = [\r\n 'accelerationX',\r\n 'accelerationY',\r\n 'angle',\r\n 'alpha',\r\n 'bounce',\r\n 'delay',\r\n 'lifespan',\r\n 'maxVelocityX',\r\n 'maxVelocityY',\r\n 'moveToX',\r\n 'moveToY',\r\n 'quantity',\r\n 'rotate',\r\n 'scaleX',\r\n 'scaleY',\r\n 'speedX',\r\n 'speedY',\r\n 'tint',\r\n 'x',\r\n 'y'\r\n ];\r\n\r\n /**\r\n * The name of this Particle Emitter.\r\n *\r\n * Empty by default and never populated by Phaser, this is left for developers to use.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#name\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.name = '';\r\n\r\n /**\r\n * The Particle Class which will be emitted by this Emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleClass\r\n * @type {Phaser.GameObjects.Particles.Particle}\r\n * @default Phaser.GameObjects.Particles.Particle\r\n * @since 3.0.0\r\n */\r\n this.particleClass = Particle;\r\n\r\n /**\r\n * The x-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#x\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.x = new EmitterOp(config, 'x', 0, true);\r\n\r\n /**\r\n * The y-coordinate of the particle origin (where particles will be emitted).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#y\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n */\r\n this.y = new EmitterOp(config, 'y', 0, true);\r\n\r\n /**\r\n * A radial emitter will emit particles in all directions between angle min and max,\r\n * using {@link Phaser.GameObjects.Particles.ParticleEmitter#speed} as the value. If set to false then this acts as a point Emitter.\r\n * A point emitter will emit particles only in the direction derived from the speedX and speedY values.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#radial\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n */\r\n this.radial = true;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityX = 0;\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#gravityY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n */\r\n this.gravityY = 0;\r\n\r\n /**\r\n * Whether accelerationX and accelerationY are non-zero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#acceleration\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.acceleration = false;\r\n\r\n /**\r\n * Horizontal acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationX = new EmitterOp(config, 'accelerationX', 0, true);\r\n\r\n /**\r\n * Vertical acceleration applied to emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#accelerationY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelerationY = new EmitterOp(config, 'accelerationY', 0, true);\r\n\r\n /**\r\n * The maximum horizontal velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityX = new EmitterOp(config, 'maxVelocityX', 10000, true);\r\n\r\n /**\r\n * The maximum vertical velocity of emitted particles, in pixels per second squared.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxVelocityY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 10000\r\n * @since 3.0.0\r\n */\r\n this.maxVelocityY = new EmitterOp(config, 'maxVelocityY', 10000, true);\r\n\r\n /**\r\n * The initial horizontal speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n */\r\n this.speedX = new EmitterOp(config, 'speedX', 0, true);\r\n\r\n /**\r\n * The initial vertical speed of emitted particles, in pixels per second.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#speedY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n */\r\n this.speedY = new EmitterOp(config, 'speedY', 0, true);\r\n\r\n /**\r\n * Whether moveToX and moveToY are nonzero. Set automatically during configuration.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveTo\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.moveTo = false;\r\n\r\n /**\r\n * The x-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToX = new EmitterOp(config, 'moveToX', 0, true);\r\n\r\n /**\r\n * The y-coordinate emitted particles move toward, when {@link Phaser.GameObjects.Particles.ParticleEmitter#moveTo} is true.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#moveToY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveToY = new EmitterOp(config, 'moveToY', 0, true);\r\n\r\n /**\r\n * Whether particles will rebound when they meet the emitter bounds.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounce\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bounce = new EmitterOp(config, 'bounce', 0, true);\r\n\r\n /**\r\n * The horizontal scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleX\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n */\r\n this.scaleX = new EmitterOp(config, 'scaleX', 1);\r\n\r\n /**\r\n * The vertical scale of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#scaleY\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n */\r\n this.scaleY = new EmitterOp(config, 'scaleY', 1);\r\n\r\n /**\r\n * Color tint applied to emitted particles. Any alpha component (0xAA000000) is ignored.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#tint\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0xffffffff\r\n * @since 3.0.0\r\n */\r\n this.tint = new EmitterOp(config, 'tint', 0xffffffff);\r\n\r\n /**\r\n * The alpha (transparency) of emitted particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alpha\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n */\r\n this.alpha = new EmitterOp(config, 'alpha', 1);\r\n\r\n /**\r\n * The lifespan of emitted particles, in ms.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#lifespan\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1000\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n */\r\n this.lifespan = new EmitterOp(config, 'lifespan', 1000, true);\r\n\r\n /**\r\n * The angle of the initial velocity of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#angle\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default { min: 0, max: 360 }\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n */\r\n this.angle = new EmitterOp(config, 'angle', { min: 0, max: 360 }, true);\r\n\r\n /**\r\n * The rotation of emitted particles, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#rotate\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.rotate = new EmitterOp(config, 'rotate', 0);\r\n\r\n /**\r\n * A function to call when a particle is emitted.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleEmitterCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#emitCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.emitCallbackScope = null;\r\n\r\n /**\r\n * A function to call when a particle dies.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallback\r\n * @type {?Phaser.Types.GameObjects.Particles.ParticleDeathCallback}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallback = null;\r\n\r\n /**\r\n * The calling context for {@link Phaser.GameObjects.Particles.ParticleEmitter#deathCallback}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope\r\n * @type {?*}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.deathCallbackScope = null;\r\n\r\n /**\r\n * Set to hard limit the amount of particle objects this emitter is allowed to create.\r\n * 0 means unlimited.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#maxParticles\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxParticles = 0;\r\n\r\n /**\r\n * How many particles are emitted each time particles are emitted (one explosion or one flow cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#quantity\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n */\r\n this.quantity = new EmitterOp(config, 'quantity', 1, true);\r\n\r\n /**\r\n * How many ms to wait after emission before the particles start updating.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#delay\r\n * @type {Phaser.GameObjects.Particles.EmitterOp}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delay = new EmitterOp(config, 'delay', 0, true);\r\n\r\n /**\r\n * For a flow emitter, the time interval (>= 0) between particle flow cycles in ms.\r\n * A value of 0 means there is one particle flow cycle for each logic update (the maximum flow frequency). This is the default setting.\r\n * For an exploding emitter, this value will be -1.\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} also puts the emitter in flow mode (frequency >= 0).\r\n * Calling {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} also puts the emitter in explode mode (frequency = -1).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frequency\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n */\r\n this.frequency = 0;\r\n\r\n /**\r\n * Controls if the emitter is currently emitting a particle flow (when frequency >= 0).\r\n * Already alive particles will continue to update until they expire.\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#start} and {@link Phaser.GameObjects.Particles.ParticleEmitter#stop}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#on\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.on = true;\r\n\r\n /**\r\n * Newly emitted particles are added to the top of the particle list, i.e. rendered above those already alive.\r\n * Set to false to send them to the back.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#particleBringToTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.particleBringToTop = true;\r\n\r\n /**\r\n * The time rate applied to active particles, affecting lifespan, movement, and tweens. Values larger than 1 are faster than normal.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An object describing a shape to emit particles from.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#emitZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.EdgeZone|Phaser.GameObjects.Particles.Zones.RandomZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n */\r\n this.emitZone = null;\r\n\r\n /**\r\n * An object describing a shape that deactivates particles when they interact with it.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#deathZone\r\n * @type {?Phaser.GameObjects.Particles.Zones.DeathZone}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n */\r\n this.deathZone = null;\r\n\r\n /**\r\n * A rectangular boundary constraining particle movement.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#bounds\r\n * @type {?Phaser.Geom.Rectangle}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n */\r\n this.bounds = null;\r\n\r\n /**\r\n * Whether particles interact with the left edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = true;\r\n\r\n /**\r\n * Whether particles interact with the right edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideRight = true;\r\n\r\n /**\r\n * Whether particles interact with the top edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideTop = true;\r\n\r\n /**\r\n * Whether particles interact with the bottom edge of the emitter {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#collideBottom\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.collideBottom = true;\r\n\r\n /**\r\n * Whether this emitter updates itself and its particles.\r\n *\r\n * Controlled by {@link Phaser.GameObjects.Particles.ParticleEmitter#pause}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#resume}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * Set this to false to hide any active particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#visible\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setVisible\r\n */\r\n this.visible = true;\r\n\r\n /**\r\n * The blend mode of this emitter's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setBlendMode\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n /**\r\n * A Game Object whose position is used as the particle origin.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#follow\r\n * @type {?Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n */\r\n this.follow = null;\r\n\r\n /**\r\n * The offset of the particle origin from the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#followOffset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.followOffset = new Vector2();\r\n\r\n /**\r\n * Whether the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#visible} state will track\r\n * the {@link Phaser.GameObjects.Particles.ParticleEmitter#follow} target's visibility state.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#trackVisible\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n */\r\n this.trackVisible = false;\r\n\r\n /**\r\n * The current texture frame, as an index of {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#currentFrame\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.currentFrame = 0;\r\n\r\n /**\r\n * Whether texture {@link Phaser.GameObjects.Particles.ParticleEmitter#frames} are selected at random.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#randomFrame\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.randomFrame = true;\r\n\r\n /**\r\n * The number of consecutive particles that receive a single texture frame (per frame cycle).\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n */\r\n this.frameQuantity = 1;\r\n\r\n /**\r\n * Inactive particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#dead\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dead = [];\r\n\r\n /**\r\n * Active particles\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#alive\r\n * @type {Phaser.GameObjects.Particles.Particle[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.alive = [];\r\n\r\n /**\r\n * The time until the next flow cycle.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_counter\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._counter = 0;\r\n\r\n /**\r\n * Counts up to {@link Phaser.GameObjects.Particles.ParticleEmitter#frameQuantity}.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitter#_frameCounter\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._frameCounter = 0;\r\n\r\n if (config)\r\n {\r\n this.fromJSON(config);\r\n }\r\n },\r\n\r\n /**\r\n * Merges configuration settings into the emitter's current settings.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#fromJSON\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n fromJSON: function (config)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n // Only update properties from their current state if they exist in the given config\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key] = GetFastValue(config, key);\r\n }\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (HasValue(config, key))\r\n {\r\n this[key].loadConfig(config);\r\n }\r\n }\r\n\r\n this.acceleration = (this.accelerationX.propertyValue !== 0 || this.accelerationY.propertyValue !== 0);\r\n\r\n this.moveTo = (this.moveToX.propertyValue !== 0 || this.moveToY.propertyValue !== 0);\r\n\r\n // Special 'speed' override\r\n\r\n if (HasValue(config, 'speed'))\r\n {\r\n this.speedX.loadConfig(config, 'speed');\r\n this.speedY = null;\r\n }\r\n\r\n // If you specify speedX, speedY or moveTo then it changes the emitter from radial to a point emitter\r\n if (HasAny(config, [ 'speedX', 'speedY' ]) || this.moveTo)\r\n {\r\n this.radial = false;\r\n }\r\n\r\n // Special 'scale' override\r\n\r\n if (HasValue(config, 'scale'))\r\n {\r\n this.scaleX.loadConfig(config, 'scale');\r\n this.scaleY = null;\r\n }\r\n\r\n if (HasValue(config, 'callbackScope'))\r\n {\r\n var callbackScope = GetFastValue(config, 'callbackScope', null);\r\n\r\n this.emitCallbackScope = callbackScope;\r\n this.deathCallbackScope = callbackScope;\r\n }\r\n\r\n if (HasValue(config, 'emitZone'))\r\n {\r\n this.setEmitZone(config.emitZone);\r\n }\r\n\r\n if (HasValue(config, 'deathZone'))\r\n {\r\n this.setDeathZone(config.deathZone);\r\n }\r\n\r\n if (HasValue(config, 'bounds'))\r\n {\r\n this.setBounds(config.bounds);\r\n }\r\n\r\n if (HasValue(config, 'followOffset'))\r\n {\r\n this.followOffset.setFromObject(GetFastValue(config, 'followOffset', 0));\r\n }\r\n\r\n if (HasValue(config, 'frame'))\r\n {\r\n this.setFrame(config.frame);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a description of this emitter suitable for JSON serialization.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#toJSON\r\n * @since 3.0.0\r\n *\r\n * @param {object} [output] - An object to copy output into.\r\n *\r\n * @return {object} - The output object.\r\n */\r\n toJSON: function (output)\r\n {\r\n if (output === undefined) { output = {}; }\r\n\r\n var i = 0;\r\n var key = '';\r\n\r\n for (i = 0; i < this.configFastMap.length; i++)\r\n {\r\n key = this.configFastMap[i];\r\n\r\n output[key] = this[key];\r\n }\r\n\r\n for (i = 0; i < this.configOpMap.length; i++)\r\n {\r\n key = this.configOpMap[i];\r\n\r\n if (this[key])\r\n {\r\n output[key] = this[key].toJSON();\r\n }\r\n }\r\n\r\n // special handlers\r\n if (!this.speedY)\r\n {\r\n delete output.speedX;\r\n output.speed = this.speedX.toJSON();\r\n }\r\n\r\n if (!this.scaleY)\r\n {\r\n delete output.scaleX;\r\n output.scale = this.scaleX.toJSON();\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Continuously moves the particle origin to follow a Game Object's position.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#startFollow\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} target - The Game Object to follow.\r\n * @param {number} [offsetX=0] - Horizontal offset of the particle origin from the Game Object.\r\n * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object.\r\n * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n startFollow: function (target, offsetX, offsetY, trackVisible)\r\n {\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n if (trackVisible === undefined) { trackVisible = false; }\r\n\r\n this.follow = target;\r\n this.followOffset.set(offsetX, offsetY);\r\n this.trackVisible = trackVisible;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops following a Game Object.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stopFollow: function ()\r\n {\r\n this.follow = null;\r\n this.followOffset.set(0, 0);\r\n this.trackVisible = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Chooses a texture frame from {@link Phaser.GameObjects.Particles.ParticleEmitter#frames}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getFrame\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} The texture frame.\r\n */\r\n getFrame: function ()\r\n {\r\n if (this.frames.length === 1)\r\n {\r\n return this.defaultFrame;\r\n }\r\n else if (this.randomFrame)\r\n {\r\n return GetRandom(this.frames);\r\n }\r\n else\r\n {\r\n var frame = this.frames[this.currentFrame];\r\n\r\n this._frameCounter++;\r\n\r\n if (this._frameCounter === this.frameQuantity)\r\n {\r\n this._frameCounter = 0;\r\n this.currentFrame = Wrap(this.currentFrame + 1, 0, this._frameLength);\r\n }\r\n\r\n return frame;\r\n }\r\n },\r\n\r\n // frame: 0\r\n // frame: 'red'\r\n // frame: [ 0, 1, 2, 3 ]\r\n // frame: [ 'red', 'green', 'blue', 'pink', 'white' ]\r\n // frame: { frames: [ 'red', 'green', 'blue', 'pink', 'white' ], [cycle: bool], [quantity: int] }\r\n\r\n /**\r\n * Sets a pattern for assigning texture frames to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(array|string|integer|Phaser.Types.GameObjects.Particles.ParticleEmitterFrameConfig)} frames - One or more texture frames, or a configuration object.\r\n * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`.\r\n * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrame: function (frames, pickRandom, quantity)\r\n {\r\n if (pickRandom === undefined) { pickRandom = true; }\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n this.randomFrame = pickRandom;\r\n this.frameQuantity = quantity;\r\n this.currentFrame = 0;\r\n this._frameCounter = 0;\r\n\r\n var t = typeof (frames);\r\n\r\n if (Array.isArray(frames) || t === 'string' || t === 'number')\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n else if (t === 'object')\r\n {\r\n var frameConfig = frames;\r\n\r\n frames = GetFastValue(frameConfig, 'frames', null);\r\n\r\n if (frames)\r\n {\r\n this.manager.setEmitterFrames(frames, this);\r\n }\r\n\r\n var isCycle = GetFastValue(frameConfig, 'cycle', false);\r\n\r\n this.randomFrame = (isCycle) ? false : true;\r\n\r\n this.frameQuantity = GetFastValue(frameConfig, 'quantity', quantity);\r\n }\r\n\r\n this._frameLength = this.frames.length;\r\n\r\n if (this._frameLength === 1)\r\n {\r\n this.frameQuantity = 1;\r\n this.randomFrame = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle movement on or off.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setRadial\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - Radial mode (true) or point mode (true).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setRadial: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.radial = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of the emitter's particle origin.\r\n * New particles will be emitted here.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n this.x.onChange(x);\r\n this.y.onChange(y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or modifies a rectangular boundary constraining the particles.\r\n *\r\n * To remove the boundary, set {@link Phaser.GameObjects.Particles.ParticleEmitter#bounds} to null.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Particles.ParticleEmitterBounds|Phaser.Types.GameObjects.Particles.ParticleEmitterBoundsAlt)} x - The x-coordinate of the left edge of the boundary, or an object representing a rectangle.\r\n * @param {number} y - The y-coordinate of the top edge of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setBounds: function (x, y, width, height)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n var obj = x;\r\n\r\n x = obj.x;\r\n y = obj.y;\r\n width = (HasValue(obj, 'w')) ? obj.w : obj.width;\r\n height = (HasValue(obj, 'h')) ? obj.h : obj.height;\r\n }\r\n\r\n if (this.bounds)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.bounds = new Rectangle(x, y, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial horizontal speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedX: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial vertical speed of emitted particles.\r\n * Changes the emitter to point mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeedY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeedY: function (value)\r\n {\r\n if (this.speedY)\r\n {\r\n this.speedY.onChange(value);\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the initial radial speed of emitted particles.\r\n * Changes the emitter to radial mode.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setSpeed: function (value)\r\n {\r\n this.speedX.onChange(value);\r\n this.speedY = null;\r\n\r\n // If you specify speedX and Y then it changes the emitter from radial to a point emitter\r\n this.radial = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleX\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleX: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScaleY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScaleY: function (value)\r\n {\r\n this.scaleY.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setScale: function (value)\r\n {\r\n this.scaleX.onChange(value);\r\n this.scaleY = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravityX = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravityY = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the gravity applied to emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared.\r\n * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravityX = x;\r\n this.gravityY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the opacity of emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque).\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAlpha: function (value)\r\n {\r\n this.alpha.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitterAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitterAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the angle of a {@link Phaser.GameObjects.Particles.ParticleEmitter#radial} particle stream.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setAngle: function (value)\r\n {\r\n this.angle.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the lifespan of newly emitted particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setLifespan\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setLifespan: function (value)\r\n {\r\n this.lifespan.onChange(value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of particles released at each flow cycle or explosion.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setQuantity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setQuantity: function (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the emitter's {@link Phaser.GameObjects.Particles.ParticleEmitter#frequency}\r\n * and {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setFrequency\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setFrequency: function (frequency, quantity)\r\n {\r\n this.frequency = frequency;\r\n\r\n this._counter = 0;\r\n\r\n if (quantity)\r\n {\r\n this.quantity.onChange(quantity);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#emitZone}.\r\n *\r\n * An {@link Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig EdgeZone} places particles on its edges. Its {@link Phaser.Types.GameObjects.Particles.EdgeZoneSource source} can be a Curve, Path, Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.EdgeZoneSourceCallback getPoints} method.\r\n *\r\n * A {@link Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig RandomZone} places randomly within its interior. Its {@link RandomZoneSource source} can be a Circle, Ellipse, Line, Polygon, Rectangle, or Triangle; or any object with a suitable {@link Phaser.Types.GameObjects.Particles.RandomZoneSourceCallback getRandomPoint} method.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setEmitZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.emitZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle, or a Path or Curve\r\n // emitZone: { type: 'random', source: X }\r\n // emitZone: { type: 'edge', source: X, quantity: 32, [stepRate=0], [yoyo=false], [seamless=true] }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'random');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n switch (type)\r\n {\r\n case 'random':\r\n\r\n this.emitZone = new RandomZone(source);\r\n\r\n break;\r\n\r\n case 'edge':\r\n\r\n var quantity = GetFastValue(zoneConfig, 'quantity', 1);\r\n var stepRate = GetFastValue(zoneConfig, 'stepRate', 0);\r\n var yoyo = GetFastValue(zoneConfig, 'yoyo', false);\r\n var seamless = GetFastValue(zoneConfig, 'seamless', true);\r\n\r\n this.emitZone = new EdgeZone(source, quantity, stepRate, yoyo, seamless);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets or removes the {@link Phaser.GameObjects.Particles.ParticleEmitter#deathZone}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n setDeathZone: function (zoneConfig)\r\n {\r\n if (zoneConfig === undefined)\r\n {\r\n this.deathZone = null;\r\n }\r\n else\r\n {\r\n // Where source = Geom like Circle or Rect that supports a 'contains' function\r\n // deathZone: { type: 'onEnter', source: X }\r\n // deathZone: { type: 'onLeave', source: X }\r\n\r\n var type = GetFastValue(zoneConfig, 'type', 'onEnter');\r\n var source = GetFastValue(zoneConfig, 'source', null);\r\n\r\n if (source && typeof source.contains === 'function')\r\n {\r\n var killOnEnter = (type === 'onEnter') ? true : false;\r\n\r\n this.deathZone = new DeathZone(source, killOnEnter);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates inactive particles and adds them to this emitter's pool.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#reserve\r\n * @since 3.0.0\r\n *\r\n * @param {integer} particleCount - The number of particles to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n reserve: function (particleCount)\r\n {\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n dead.push(new this.particleClass(this));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the number of active (in-use) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getAliveParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=true`.\r\n */\r\n getAliveParticleCount: function ()\r\n {\r\n return this.alive.length;\r\n },\r\n\r\n /**\r\n * Gets the number of inactive (available) particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getDeadParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles with `active=false`.\r\n */\r\n getDeadParticleCount: function ()\r\n {\r\n return this.dead.length;\r\n },\r\n\r\n /**\r\n * Gets the total number of particles in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#getParticleCount\r\n * @since 3.0.0\r\n *\r\n * @return {integer} The number of particles, including both alive and dead.\r\n */\r\n getParticleCount: function ()\r\n {\r\n return this.getAliveParticleCount() + this.getDeadParticleCount();\r\n },\r\n\r\n /**\r\n * Whether this emitter is at its limit (if set).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#atLimit\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Emitter is at its limit, or `false` if no limit, or below the `maxParticles` level.\r\n */\r\n atLimit: function ()\r\n {\r\n return (this.maxParticles > 0 && this.getParticleCount() === this.maxParticles);\r\n },\r\n\r\n /**\r\n * Sets a function to call for each newly emitted particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleEmit\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} [context] - The calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleEmit: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.emitCallback = null;\r\n this.emitCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.emitCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.emitCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a function to call for each particle death.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleDeath\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function.\r\n * @param {*} [context] - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n onParticleDeath: function (callback, context)\r\n {\r\n if (callback === undefined)\r\n {\r\n // Clear any previously set callback\r\n this.deathCallback = null;\r\n this.deathCallbackScope = null;\r\n }\r\n else if (typeof callback === 'function')\r\n {\r\n this.deathCallback = callback;\r\n\r\n if (context)\r\n {\r\n this.deathCallbackScope = context;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deactivates every particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n killAll: function ()\r\n {\r\n var dead = this.dead;\r\n var alive = this.alive;\r\n\r\n while (alive.length > 0)\r\n {\r\n dead.push(alive.pop());\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each active particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachAlive: function (callback, context)\r\n {\r\n var alive = this.alive;\r\n var length = alive.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, alive[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calls a function for each inactive particle in this emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#forEachDead\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function.\r\n * @param {*} context - The function's calling context.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n forEachDead: function (callback, context)\r\n {\r\n var dead = this.dead;\r\n var length = dead.length;\r\n\r\n for (var index = 0; index < length; ++index)\r\n {\r\n // Sends the Particle and the Emitter\r\n callback.call(context, dead[index], this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on} the emitter and resets the flow counter.\r\n *\r\n * If this emitter is in flow mode (frequency >= 0; the default), the particle flow will start (or restart).\r\n *\r\n * If this emitter is in explode mode (frequency = -1), nothing will happen.\r\n * Use {@link Phaser.GameObjects.Particles.ParticleEmitter#explode} or {@link Phaser.GameObjects.Particles.ParticleEmitter#flow} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#start\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n start: function ()\r\n {\r\n this.on = true;\r\n\r\n this._counter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Turns {@link Phaser.GameObjects.Particles.ParticleEmitter#on off} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#stop\r\n * @since 3.11.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n stop: function ()\r\n {\r\n this.on = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Deactivates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * {@link Phaser.GameObjects.Particles.ParticleEmitter#active Activates} the emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sorts active particles with {@link Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback}.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n depthSort: function ()\r\n {\r\n StableSort.inplace(this.alive, this.depthSortCallback);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the emitter in flow mode (frequency >= 0) and starts (or restarts) a particle flow.\r\n *\r\n * To resume a flow at the current frequency and quantity, use {@link Phaser.GameObjects.Particles.ParticleEmitter#start} instead.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#flow\r\n * @since 3.0.0\r\n *\r\n * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms.\r\n * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.\r\n */\r\n flow: function (frequency, count)\r\n {\r\n if (count === undefined) { count = 1; }\r\n\r\n this.frequency = frequency;\r\n\r\n this.quantity.onChange(count);\r\n\r\n return this.start();\r\n },\r\n\r\n /**\r\n * Puts the emitter in explode mode (frequency = -1), stopping any current particle flow, and emits several particles all at once.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#explode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} count - The amount of Particles to emit.\r\n * @param {number} x - The x coordinate to emit the Particles from.\r\n * @param {number} y - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n explode: function (count, x, y)\r\n {\r\n this.frequency = -1;\r\n\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Emits particles at a given position (or the emitter's current position).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count=this.quantity] - The number of Particles to emit.\r\n * @param {number} [x=this.x] - The x coordinate to emit the Particles from.\r\n * @param {number} [y=this.x] - The y coordinate to emit the Particles from.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Particle} The most recently emitted Particle.\r\n *\r\n * @see Phaser.GameObjects.Particles.Particle#fire\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n if (this.atLimit())\r\n {\r\n return;\r\n }\r\n\r\n if (count === undefined)\r\n {\r\n count = this.quantity.onEmit();\r\n }\r\n\r\n var dead = this.dead;\r\n\r\n for (var i = 0; i < count; i++)\r\n {\r\n var particle = dead.pop();\r\n\r\n if (!particle)\r\n {\r\n particle = new this.particleClass(this);\r\n }\r\n\r\n particle.fire(x, y);\r\n\r\n if (this.particleBringToTop)\r\n {\r\n this.alive.push(particle);\r\n }\r\n else\r\n {\r\n this.alive.unshift(particle);\r\n }\r\n\r\n if (this.emitCallback)\r\n {\r\n this.emitCallback.call(this.emitCallbackScope, particle, this);\r\n }\r\n\r\n if (this.atLimit())\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return particle;\r\n },\r\n\r\n /**\r\n * Updates this emitter and its particles.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var step = (delta / 1000);\r\n\r\n if (this.trackVisible)\r\n {\r\n this.visible = this.follow.visible;\r\n }\r\n\r\n // Any particle processors?\r\n var processors = this.manager.getProcessors();\r\n\r\n var particles = this.alive;\r\n var dead = this.dead;\r\n\r\n var i = 0;\r\n var rip = [];\r\n var length = particles.length;\r\n\r\n for (i = 0; i < length; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n // update returns `true` if the particle is now dead (lifeCurrent <= 0)\r\n if (particle.update(delta, step, processors))\r\n {\r\n rip.push({ index: i, particle: particle });\r\n }\r\n }\r\n\r\n // Move dead particles to the dead array\r\n length = rip.length;\r\n\r\n if (length > 0)\r\n {\r\n var deathCallback = this.deathCallback;\r\n var deathCallbackScope = this.deathCallbackScope;\r\n\r\n for (i = length - 1; i >= 0; i--)\r\n {\r\n var entry = rip[i];\r\n\r\n // Remove from particles array\r\n particles.splice(entry.index, 1);\r\n\r\n // Add to dead array\r\n dead.push(entry.particle);\r\n\r\n // Callback\r\n if (deathCallback)\r\n {\r\n deathCallback.call(deathCallbackScope, entry.particle);\r\n }\r\n\r\n entry.particle.resetPosition();\r\n }\r\n }\r\n\r\n if (!this.on)\r\n {\r\n return;\r\n }\r\n\r\n if (this.frequency === 0)\r\n {\r\n this.emitParticle();\r\n }\r\n else if (this.frequency > 0)\r\n {\r\n this._counter -= delta;\r\n\r\n if (this._counter <= 0)\r\n {\r\n this.emitParticle();\r\n\r\n // counter = frequency - remained from previous delta\r\n this._counter = (this.frequency - Math.abs(this._counter));\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the difference of two particles, for sorting them by depth.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSortCallback\r\n * @since 3.0.0\r\n *\r\n * @param {object} a - The first particle.\r\n * @param {object} b - The second particle.\r\n *\r\n * @return {integer} The difference of a and b's y coordinates.\r\n */\r\n depthSortCallback: function (a, b)\r\n {\r\n return a.y - b.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GravityWell = __webpack_require__(/*! ./GravityWell */ \"./node_modules/phaser/src/gameobjects/particles/GravityWell.js\");\r\nvar List = __webpack_require__(/*! ../../structs/List */ \"./node_modules/phaser/src/structs/List.js\");\r\nvar ParticleEmitter = __webpack_require__(/*! ./ParticleEmitter */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js\");\r\nvar Render = __webpack_require__(/*! ./ParticleManagerRender */ \"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Particle Emitter Manager creates and controls {@link Phaser.GameObjects.Particles.ParticleEmitter Particle Emitters} and {@link Phaser.GameObjects.Particles.GravityWell Gravity Wells}.\r\n *\r\n * @class ParticleEmitterManager\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects.Particles\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Emitter Manager belongs.\r\n * @param {string} texture - The key of the Texture this Emitter Manager will use to render particles, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Emitter Manager will use to render particles.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n */\r\nvar ParticleEmitterManager = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.Mask,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n function ParticleEmitterManager (scene, texture, frame, emitters)\r\n {\r\n GameObject.call(this, scene, 'ParticleEmitterManager');\r\n\r\n /**\r\n * The blend mode applied to all emitters and particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#blendMode\r\n * @type {integer}\r\n * @default -1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The time scale applied to all emitters and particles, affecting flow rate, lifespan, and movement.\r\n * Values larger than 1 are faster than normal.\r\n * This is multiplied with any timeScale set on each individual emitter.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * The texture used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The texture frame used to render this Emitter Manager's particles.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Names of this Emitter Manager's texture frames.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames\r\n * @type {string[]}\r\n * @since 3.0.0\r\n */\r\n this.frameNames = [];\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n if (frame !== null && (typeof frame === 'object' || Array.isArray(frame)))\r\n {\r\n emitters = frame;\r\n frame = null;\r\n }\r\n\r\n this.setTexture(texture, frame);\r\n\r\n this.initPipeline();\r\n\r\n /**\r\n * A list of Emitters being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#emitters\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.emitters = new List(this);\r\n\r\n /**\r\n * A list of Gravity Wells being managed by this Emitter Manager.\r\n *\r\n * @name Phaser.GameObjects.Particles.ParticleEmitterManager#wells\r\n * @type {Phaser.Structs.List.}\r\n * @since 3.0.0\r\n */\r\n this.wells = new List(this);\r\n\r\n if (emitters)\r\n {\r\n // An array of emitter configs?\r\n if (!Array.isArray(emitters))\r\n {\r\n emitters = [ emitters ];\r\n }\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n this.createEmitter(emitters[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Emitter Manager will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.texture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Emitter Manager will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n var frames = this.texture.getFramesFromTextureSource(this.frame.sourceIndex);\r\n\r\n var names = [];\r\n\r\n frames.forEach(function (sourceFrame)\r\n {\r\n names.push(sourceFrame.name);\r\n });\r\n\r\n this.frameNames = names;\r\n\r\n this.defaultFrame = this.frame;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns texture frames to an emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n setEmitterFrames: function (frames, emitter)\r\n {\r\n if (!Array.isArray(frames))\r\n {\r\n frames = [ frames ];\r\n }\r\n\r\n var out = emitter.frames;\r\n\r\n out.length = 0;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i];\r\n\r\n if (this.frameNames.indexOf(frame) !== -1)\r\n {\r\n out.push(this.texture.get(frame));\r\n }\r\n }\r\n\r\n if (out.length > 0)\r\n {\r\n emitter.defaultFrame = out[0];\r\n }\r\n else\r\n {\r\n emitter.defaultFrame = this.defaultFrame;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an existing Particle Emitter to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The Particle Emitter to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was added to this Emitter Manager.\r\n */\r\n addEmitter: function (emitter)\r\n {\r\n return this.emitters.add(emitter);\r\n },\r\n\r\n /**\r\n * Creates a new Particle Emitter object, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createEmitter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Configuration settings for the Particle Emitter to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitter} The Particle Emitter that was created.\r\n */\r\n createEmitter: function (config)\r\n {\r\n return this.addEmitter(new ParticleEmitter(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Gravity Well object to this Emitter Manager.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#addGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.GravityWell} well - The Gravity Well to add to this Emitter Manager.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was added to this Emitter Manager.\r\n */\r\n addGravityWell: function (well)\r\n {\r\n return this.wells.add(well);\r\n },\r\n\r\n /**\r\n * Creates a new Gravity Well, adds it to this Emitter Manager and returns a reference to it.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#createGravityWell\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.GravityWellConfig} config - Configuration settings for the Gravity Well to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell} The Gravity Well that was created.\r\n */\r\n createGravityWell: function (config)\r\n {\r\n return this.addGravityWell(new GravityWell(config));\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticle: function (count, x, y)\r\n {\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.emitParticle(count, x, y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Emits particles from each active emitter.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#emitParticleAt\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location.\r\n * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location.\r\n * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n emitParticleAt: function (x, y, count)\r\n {\r\n return this.emitParticle(count, x, y);\r\n },\r\n\r\n /**\r\n * Pauses this Emitter Manager.\r\n *\r\n * This has the effect of pausing all emitters, and all particles of those emitters, currently under its control.\r\n *\r\n * The particles will still render, but they will not have any of their logic updated.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n pause: function ()\r\n {\r\n this.active = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes this Emitter Manager, should it have been previously paused.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager.\r\n */\r\n resume: function ()\r\n {\r\n this.active = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets all active particle processors (gravity wells).\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.GravityWell[]} - The active gravity wells.\r\n */\r\n getProcessors: function ()\r\n {\r\n return this.wells.getAll('active', true);\r\n },\r\n\r\n /**\r\n * Updates all active emitters.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n var emitters = this.emitters.list;\r\n\r\n for (var i = 0; i < emitters.length; i++)\r\n {\r\n var emitter = emitters[i];\r\n\r\n if (emitter.active)\r\n {\r\n emitter.preUpdate(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setAlpha\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setScrollFactor\r\n * @private\r\n * @since 3.10.0\r\n */\r\n setScrollFactor: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass an EmitterManager to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Particles.ParticleEmitterManager#setBlendMode\r\n * @private\r\n * @since 3.15.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ParticleEmitterManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerCanvasRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = renderer._tempMatrix2;\r\n var particleMatrix = renderer._tempMatrix3;\r\n var managerMatrix = renderer._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n var roundPixels = camera.roundPixels;\r\n\r\n var ctx = renderer.currentContext;\r\n\r\n ctx.save();\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n ctx.globalCompositeOperation = renderer.blendModes[emitter.blendMode];\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n var cd = frame.canvasData;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n ctx.globalAlpha = alpha;\r\n \r\n ctx.save();\r\n\r\n calcMatrix.copyToContext(ctx);\r\n\r\n if (roundPixels)\r\n {\r\n x = Math.round(x);\r\n y = Math.round(y);\r\n }\r\n\r\n ctx.drawImage(frame.source.image, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n\r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = ParticleManagerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#particles\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('particles', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n var emitters = GetFastValue(config, 'emitters', null);\r\n\r\n // frame is optional and can contain the emitters array or object if skipped\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n var add = GetFastValue(config, 'add', false);\r\n\r\n if (add)\r\n {\r\n this.displayList.add(manager);\r\n }\r\n\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParticleEmitterManager = __webpack_require__(/*! ./ParticleEmitterManager */ \"./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js\");\r\n\r\n/**\r\n * Creates a new Particle Emitter Manager Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Particles Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#particles\r\n * @since 3.0.0\r\n *\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer|object)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterConfig[]} [emitters] - Configuration settings for one or more emitters to create.\r\n *\r\n * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('particles', function (key, frame, emitters)\r\n{\r\n var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);\r\n\r\n this.displayList.add(manager);\r\n this.updateList.add(manager);\r\n\r\n return manager;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js?")},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ParticleManagerWebGLRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ParticleManagerCanvasRenderer */ "./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js?')},"./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Particles.EmitterManager#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Particles.ParticleEmitterManager} emitterManager - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ParticleManagerWebGLRenderer = function (renderer, emitterManager, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var emitters = emitterManager.emitters.list;\r\n var emittersLength = emitters.length;\r\n\r\n if (emittersLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1.copyFrom(camera.matrix);\r\n var calcMatrix = pipeline._tempMatrix2;\r\n var particleMatrix = pipeline._tempMatrix3;\r\n var managerMatrix = pipeline._tempMatrix4.applyITRS(emitterManager.x, emitterManager.y, emitterManager.rotation, emitterManager.scaleX, emitterManager.scaleY);\r\n\r\n camMatrix.multiply(managerMatrix);\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n var roundPixels = camera.roundPixels;\r\n var texture = emitterManager.defaultFrame.glTexture;\r\n var getTint = Utils.getTintAppendFloatAlphaAndSwap;\r\n\r\n pipeline.setTexture2D(texture, 0);\r\n\r\n for (var e = 0; e < emittersLength; e++)\r\n {\r\n var emitter = emitters[e];\r\n var particles = emitter.alive;\r\n var particleCount = particles.length;\r\n\r\n if (!emitter.visible || particleCount === 0)\r\n {\r\n continue;\r\n }\r\n\r\n var scrollX = camera.scrollX * emitter.scrollFactorX;\r\n var scrollY = camera.scrollY * emitter.scrollFactorY;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -scrollX, -scrollY);\r\n\r\n scrollX = 0;\r\n scrollY = 0;\r\n }\r\n\r\n if (renderer.setBlendMode(emitter.blendMode))\r\n {\r\n // Rebind the texture if we\'ve flushed\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.preRenderWebGL(renderer, emitter, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n \r\n var tintEffect = 0;\r\n\r\n for (var i = 0; i < particleCount; i++)\r\n {\r\n var particle = particles[i];\r\n\r\n var alpha = particle.alpha * camera.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = particle.frame;\r\n\r\n var x = -(frame.halfWidth);\r\n var y = -(frame.halfHeight);\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n particleMatrix.applyITRS(0, 0, particle.rotation, particle.scaleX, particle.scaleY);\r\n\r\n particleMatrix.e = particle.x - scrollX;\r\n particleMatrix.f = particle.y - scrollY;\r\n\r\n camMatrix.multiply(particleMatrix, calcMatrix);\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n \r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n \r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n \r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n \r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n \r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n \r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var tint = getTint(particle.tint, alpha);\r\n\r\n pipeline.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, tintEffect, texture, 0);\r\n }\r\n\r\n if (emitter.mask)\r\n {\r\n emitter.mask.postRenderWebGL(renderer, camera);\r\n pipeline.setTexture2D(texture, 0);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ParticleManagerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/particles/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GravityWell: __webpack_require__(/*! ./GravityWell */ "./node_modules/phaser/src/gameobjects/particles/GravityWell.js"),\r\n Particle: __webpack_require__(/*! ./Particle */ "./node_modules/phaser/src/gameobjects/particles/Particle.js"),\r\n ParticleEmitter: __webpack_require__(/*! ./ParticleEmitter */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js"),\r\n ParticleEmitterManager: __webpack_require__(/*! ./ParticleEmitterManager */ "./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js"),\r\n Zones: __webpack_require__(/*! ./zones */ "./node_modules/phaser/src/gameobjects/particles/zones/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/index.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Death Zone.\r\n *\r\n * A Death Zone is a special type of zone that will kill a Particle as soon as it either enters, or leaves, the zone.\r\n *\r\n * The zone consists of a `source` which could be a Geometric shape, such as a Rectangle or Ellipse, or your own\r\n * object as long as it includes a `contains` method for which the Particles can be tested against.\r\n *\r\n * @class DeathZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.DeathZoneSource} source - An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * @param {boolean} killOnEnter - Should the Particle be killed when it enters the zone? `true` or leaves it? `false`\r\n */\r\nvar DeathZone = new Class({\r\n\r\n initialize:\r\n\r\n function DeathZone (source, killOnEnter)\r\n {\r\n /**\r\n * An object instance that has a `contains` method that returns a boolean when given `x` and `y` arguments.\r\n * This could be a Geometry shape, such as `Phaser.Geom.Circle`, or your own custom object.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.DeathZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Set to `true` if the Particle should be killed if it enters this zone.\r\n * Set to `false` to kill the Particle if it leaves this zone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.DeathZone#killOnEnter\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.killOnEnter = killOnEnter;\r\n },\r\n\r\n /**\r\n * Checks if the given Particle will be killed or not by this zone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.DeathZone#willKill\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle to be checked against this zone.\r\n *\r\n * @return {boolean} Return `true` if the Particle is to be killed, otherwise return `false`.\r\n */\r\n willKill: function (particle)\r\n {\r\n var withinZone = this.source.contains(particle.x, particle.y);\r\n\r\n return (withinZone && this.killOnEnter || !withinZone && !this.killOnEnter);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DeathZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles on a shape's edges.\r\n *\r\n * @class EdgeZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n * @param {integer} quantity - The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n * @param {number} stepRate - The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n * @param {boolean} [yoyo=false] - Whether particles are placed from start to end and then end to start.\r\n * @param {boolean} [seamless=true] - Whether one endpoint will be removed if it's identical to the other.\r\n */\r\nvar EdgeZone = new Class({\r\n\r\n initialize:\r\n\r\n function EdgeZone (source, quantity, stepRate, yoyo, seamless)\r\n {\r\n if (yoyo === undefined) { yoyo = false; }\r\n if (seamless === undefined) { seamless = true; }\r\n\r\n /**\r\n * An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.EdgeZoneSource|Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The points placed on the source edge.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n /**\r\n * The number of particles to place on the source edge. Set to 0 to use `stepRate` instead.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#quantity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.quantity = quantity;\r\n\r\n /**\r\n * The distance between each particle. When set, `quantity` is implied and should be set to 0.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#stepRate\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.stepRate = stepRate;\r\n\r\n /**\r\n * Whether particles are placed from start to end and then end to start.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#yoyo\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.yoyo = yoyo;\r\n\r\n /**\r\n * The counter used for iterating the EdgeZone's points.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#counter\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.counter = -1;\r\n\r\n /**\r\n * Whether one endpoint will be removed if it's identical to the other.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#seamless\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.seamless = seamless;\r\n\r\n /**\r\n * An internal count of the points belonging to this EdgeZone.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_length\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._length = 0;\r\n\r\n /**\r\n * An internal value used to keep track of the current iteration direction for the EdgeZone's points.\r\n *\r\n * 0 = forwards, 1 = backwards\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.EdgeZone#_direction\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._direction = 0;\r\n\r\n this.updateSource();\r\n },\r\n\r\n /**\r\n * Update the {@link Phaser.GameObjects.Particles.Zones.EdgeZone#points} from the EdgeZone's\r\n * {@link Phaser.GameObjects.Particles.Zones.EdgeZone#source}.\r\n *\r\n * Also updates internal properties.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n updateSource: function ()\r\n {\r\n this.points = this.source.getPoints(this.quantity, this.stepRate);\r\n\r\n // Remove ends?\r\n if (this.seamless)\r\n {\r\n var a = this.points[0];\r\n var b = this.points[this.points.length - 1];\r\n\r\n if (a.x === b.x && a.y === b.y)\r\n {\r\n this.points.pop();\r\n }\r\n }\r\n\r\n var oldLength = this._length;\r\n\r\n this._length = this.points.length;\r\n\r\n // Adjust counter if we now have less points than before\r\n if (this._length < oldLength && this.counter > this._length)\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Change the source of the EdgeZone.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#changeSource\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points.\r\n *\r\n * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone.\r\n */\r\n changeSource: function (source)\r\n {\r\n this.source = source;\r\n\r\n return this.updateSource();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.EdgeZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n if (this._direction === 0)\r\n {\r\n this.counter++;\r\n\r\n if (this.counter >= this._length)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 1;\r\n this.counter = this._length - 1;\r\n }\r\n else\r\n {\r\n this.counter = 0;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.counter--;\r\n\r\n if (this.counter === -1)\r\n {\r\n if (this.yoyo)\r\n {\r\n this._direction = 0;\r\n this.counter = 0;\r\n }\r\n else\r\n {\r\n this.counter = this._length - 1;\r\n }\r\n }\r\n }\r\n\r\n var point = this.points[this.counter];\r\n\r\n if (point)\r\n {\r\n particle.x = point.x;\r\n particle.y = point.y;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = EdgeZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js?")},"./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A zone that places particles randomly within a shape\'s area.\r\n *\r\n * @class RandomZone\r\n * @memberof Phaser.GameObjects.Particles.Zones\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Particles.RandomZoneSource} source - An object instance with a `getRandomPoint(point)` method.\r\n */\r\nvar RandomZone = new Class({\r\n\r\n initialize:\r\n\r\n function RandomZone (source)\r\n {\r\n /**\r\n * An object instance with a `getRandomPoint(point)` method.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#source\r\n * @type {Phaser.Types.GameObjects.Particles.RandomZoneSource}\r\n * @since 3.0.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * Internal calculation vector.\r\n *\r\n * @name Phaser.GameObjects.Particles.Zones.RandomZone#_tempVec\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec = new Vector2();\r\n },\r\n\r\n /**\r\n * Get the next point in the Zone and set its coordinates on the given Particle.\r\n *\r\n * @method Phaser.GameObjects.Particles.Zones.RandomZone#getPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Particles.Particle} particle - The Particle.\r\n */\r\n getPoint: function (particle)\r\n {\r\n var vec = this._tempVec;\r\n\r\n this.source.getRandomPoint(vec);\r\n\r\n particle.x = vec.x;\r\n particle.y = vec.y;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomZone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js?')},"./node_modules/phaser/src/gameobjects/particles/zones/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.GameObjects.Particles.Zones\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DeathZone: __webpack_require__(/*! ./DeathZone */ "./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js"),\r\n EdgeZone: __webpack_require__(/*! ./EdgeZone */ "./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js"),\r\n RandomZone: __webpack_require__(/*! ./RandomZone */ "./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/particles/zones/index.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * A PathFollower Game Object.\r\n *\r\n * A PathFollower is a Sprite Game Object with some extra helpers to allow it to follow a Path automatically.\r\n *\r\n * Anything you can do with a standard Sprite can be done with this PathFollower, such as animate it, tint it,\r\n * scale it and so on.\r\n *\r\n * PathFollowers are bound to a single Path at any one time and can traverse the length of the Path, from start\r\n * to finish, forwards or backwards, or from any given point on the Path to its end. They can optionally rotate\r\n * to face the direction of the path, be offset from the path coordinates or rotate independently of the Path.\r\n *\r\n * @class PathFollower\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @extends Phaser.GameObjects.Components.PathFollower\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this PathFollower belongs.\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar PathFollower = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.PathFollower\r\n ],\r\n\r\n initialize:\r\n\r\n function PathFollower (scene, path, x, y, texture, frame)\r\n {\r\n Sprite.call(this, scene, x, y, texture, frame);\r\n\r\n this.path = path;\r\n },\r\n\r\n /**\r\n * Internal update handler that advances this PathFollower along the path.\r\n *\r\n * Called automatically by the Scene step, should not typically be called directly.\r\n *\r\n * @method Phaser.GameObjects.PathFollower#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n this.pathUpdate(time);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PathFollower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js?')},"./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar PathFollower = __webpack_require__(/*! ./PathFollower */ \"./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js\");\r\n\r\n/**\r\n * Creates a new PathFollower Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the PathFollower Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#follower\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Curves.Path} path - The Path this PathFollower is connected to.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.PathFollower} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('follower', function (path, x, y, key, frame)\r\n{\r\n var sprite = new PathFollower(this.scene, path, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js?")},"./node_modules/phaser/src/gameobjects/quad/Quad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Mesh = __webpack_require__(/*! ../mesh/Mesh */ "./node_modules/phaser/src/gameobjects/mesh/Mesh.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Quad Game Object.\r\n *\r\n * A Quad is a Mesh Game Object pre-configured with two triangles arranged into a rectangle, with a single\r\n * texture spread across them.\r\n *\r\n * You can manipulate the corner points of the quad via the getters and setters such as `topLeftX`, and also\r\n * change their alpha and color values. The quad itself can be moved by adjusting the `x` and `y` properties.\r\n *\r\n * @class Quad\r\n * @extends Phaser.GameObjects.Mesh\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Quad belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Quad = new Class({\r\n\r\n Extends: Mesh,\r\n\r\n initialize:\r\n\r\n function Quad (scene, x, y, texture, frame)\r\n {\r\n // 0----3\r\n // |\\ B|\r\n // | \\ |\r\n // | \\ |\r\n // | A \\|\r\n // | \\\r\n // 1----2\r\n\r\n var vertices = [\r\n 0, 0, // tl\r\n 0, 0, // bl\r\n 0, 0, // br\r\n 0, 0, // tl\r\n 0, 0, // br\r\n 0, 0 // tr\r\n ];\r\n\r\n var uv = [\r\n 0, 0, // tl\r\n 0, 1, // bl\r\n 1, 1, // br\r\n 0, 0, // tl\r\n 1, 1, // br\r\n 1, 0 // tr\r\n ];\r\n\r\n var colors = [\r\n 0xffffff, // tl\r\n 0xffffff, // bl\r\n 0xffffff, // br\r\n 0xffffff, // tl\r\n 0xffffff, // br\r\n 0xffffff // tr\r\n ];\r\n\r\n var alphas = [\r\n 1, // tl\r\n 1, // bl\r\n 1, // br\r\n 1, // tl\r\n 1, // br\r\n 1 // tr\r\n ];\r\n\r\n Mesh.call(this, scene, x, y, vertices, uv, colors, alphas, texture, frame);\r\n\r\n this.resetPosition();\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * Calling `setFrame` will modify the `width` and `height` properties of your Game Object.\r\n * It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.\r\n *\r\n * @method Phaser.GameObjects.Quad#setFrame\r\n * @since 3.11.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.frame = this.texture.get(frame);\r\n\r\n if (!this.frame.cutWidth || !this.frame.cutHeight)\r\n {\r\n this.renderFlags &= ~8;\r\n }\r\n else\r\n {\r\n this.renderFlags |= 8;\r\n }\r\n\r\n frame = this.frame;\r\n\r\n // TL\r\n this.uv[0] = frame.u0;\r\n this.uv[1] = frame.v0;\r\n\r\n // BL\r\n this.uv[2] = frame.u0;\r\n this.uv[3] = frame.v1;\r\n\r\n // BR\r\n this.uv[4] = frame.u1;\r\n this.uv[5] = frame.v1;\r\n\r\n // TL\r\n this.uv[6] = frame.u0;\r\n this.uv[7] = frame.v0;\r\n\r\n // BR\r\n this.uv[8] = frame.u1;\r\n this.uv[9] = frame.v1;\r\n\r\n // TR\r\n this.uv[10] = frame.u1;\r\n this.uv[11] = frame.v0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The top-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[0] = value - this.x;\r\n this.vertices[6] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[1] = value - this.y;\r\n this.vertices[7] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[10];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[10] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[11];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[11] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[2] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[3];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[3] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right x vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.vertices[4];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[4] = value - this.x;\r\n this.vertices[8] = value - this.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right y vertex of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.vertices[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.vertices[5] = value - this.y;\r\n this.vertices[9] = value - this.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[0] = value;\r\n this.alphas[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right alpha value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightAlpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightAlpha: {\r\n\r\n get: function ()\r\n {\r\n return this.alphas[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.alphas[2] = value;\r\n this.alphas[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[0];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[0] = value;\r\n this.colors[3] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#topRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n topRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[5];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[5] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-left color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomLeftColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomLeftColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[1];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[1] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom-right color value of this Quad.\r\n *\r\n * @name Phaser.GameObjects.Quad#bottomRightColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottomRightColor: {\r\n\r\n get: function ()\r\n {\r\n return this.colors[2];\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.colors[2] = value;\r\n this.colors[4] = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the top-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopLeft: function (x, y)\r\n {\r\n this.topLeftX = x;\r\n this.topLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the top-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setTopRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setTopRight: function (x, y)\r\n {\r\n this.topRightX = x;\r\n this.topRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-left vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomLeft: function (x, y)\r\n {\r\n this.bottomLeftX = x;\r\n this.bottomLeftY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the bottom-right vertex position of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#setBottomRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate of the vertex.\r\n * @param {number} y - The vertical coordinate of the vertex.\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n setBottomRight: function (x, y)\r\n {\r\n this.bottomRightX = x;\r\n this.bottomRightY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the positions of the four corner vertices of this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetPosition\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetPosition: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var halfWidth = Math.floor(this.width / 2);\r\n var halfHeight = Math.floor(this.height / 2);\r\n\r\n this.setTopLeft(x - halfWidth, y - halfHeight);\r\n this.setTopRight(x + halfWidth, y - halfHeight);\r\n this.setBottomLeft(x - halfWidth, y + halfHeight);\r\n this.setBottomRight(x + halfWidth, y + halfHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the alpha values used by this Quad back to 1.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetAlpha\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetAlpha: function ()\r\n {\r\n var alphas = this.alphas;\r\n\r\n alphas[0] = 1;\r\n alphas[1] = 1;\r\n alphas[2] = 1;\r\n alphas[3] = 1;\r\n alphas[4] = 1;\r\n alphas[5] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the color values used by this Quad back to 0xffffff.\r\n *\r\n * @method Phaser.GameObjects.Quad#resetColors\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n resetColors: function ()\r\n {\r\n var colors = this.colors;\r\n\r\n colors[0] = 0xffffff;\r\n colors[1] = 0xffffff;\r\n colors[2] = 0xffffff;\r\n colors[3] = 0xffffff;\r\n colors[4] = 0xffffff;\r\n colors[5] = 0xffffff;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, alpha and color values used by this Quad.\r\n *\r\n * @method Phaser.GameObjects.Quad#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Quad} This Game Object.\r\n */\r\n reset: function ()\r\n {\r\n this.resetPosition();\r\n\r\n this.resetAlpha();\r\n\r\n return this.resetColors();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/Quad.js?')},"./node_modules/phaser/src/gameobjects/quad/QuadCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#quad\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('quad', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var frame = GetAdvancedValue(config, 'frame', null);\r\n\r\n var quad = new Quad(this.scene, x, y, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, quad, config);\r\n\r\n return quad;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadCreator.js?")},"./node_modules/phaser/src/gameobjects/quad/QuadFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Quad = __webpack_require__(/*! ./Quad */ \"./node_modules/phaser/src/gameobjects/quad/Quad.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Quad Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Quad Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#quad\r\n * @webglOnly\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * \r\n * @return {Phaser.GameObjects.Quad} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register('quad', function (x, y, key, frame)\r\n {\r\n return this.displayList.add(new Quad(this.scene, x, y, key, frame));\r\n });\r\n}\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/quad/QuadFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar Camera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar Frame = __webpack_require__(/*! ../../textures/Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar Render = __webpack_require__(/*! ./RenderTextureRender */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar UUID = __webpack_require__(/*! ../../utils/string/UUID */ \"./node_modules/phaser/src/utils/string/UUID.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Render Texture.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n * \r\n * Note that under WebGL a FrameBuffer, which is what the Render Texture uses internally, cannot be anti-aliased. This means\r\n * that when drawing objects such as Shapes to a Render Texture they will appear to be drawn with no aliasing, however this\r\n * is a technical limitation of WebGL. To get around it, create your shape as a texture in an art package, then draw that\r\n * to the Render Texture.\r\n *\r\n * @class RenderTexture\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.2.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n */\r\nvar RenderTexture = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n Render\r\n ],\r\n\r\n initialize:\r\n\r\n function RenderTexture (scene, x, y, width, height, key, frame)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 32; }\r\n if (height === undefined) { height = 32; }\r\n\r\n GameObject.call(this, scene, 'RenderTexture');\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that the Game instance is using.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.2.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.12.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * The tint of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalTint\r\n * @type {number}\r\n * @default 0xffffff\r\n * @since 3.2.0\r\n */\r\n this.globalTint = 0xffffff;\r\n\r\n /**\r\n * The alpha of the Render Texture when rendered.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#globalAlpha\r\n * @type {number}\r\n * @default 1\r\n * @since 3.2.0\r\n */\r\n this.globalAlpha = 1;\r\n\r\n /**\r\n * The HTML Canvas Element that the Render Texture is drawing to when using the Canvas Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.2.0\r\n */\r\n this.canvas = null;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Render Texture is drawing to.\r\n * This is only set if Phaser is running with the WebGL Renderer.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.2.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * Is this Render Texture dirty or not? If not it won't spend time clearing or filling itself.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#dirty\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.12.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * The Frame corresponding to this Render Texture.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.12.0\r\n */\r\n this.frame = null;\r\n\r\n /**\r\n * Internal saved texture flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_saved\r\n * @type {boolean}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._saved = false;\r\n\r\n if (key === undefined)\r\n {\r\n this.canvas = CanvasPool.create2D(this, width, height);\r\n\r\n // Create a new Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(UUID(), this.canvas);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get();\r\n }\r\n else\r\n {\r\n this.texture = scene.sys.textures.get(key);\r\n \r\n // Get the frame\r\n this.frame = this.texture.get(frame);\r\n\r\n this.canvas = this.frame.source.image;\r\n this._saved = true;\r\n\r\n this.dirty = true;\r\n\r\n this.width = this.frame.cutWidth;\r\n this.height = this.frame.cutHeight;\r\n }\r\n\r\n /**\r\n * A reference to the Rendering Context belonging to the Canvas Element this Render Texture is drawing to.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.2.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * Internal erase mode flag.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#_eraseMode\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._eraseMode = false;\r\n\r\n /**\r\n * An internal Camera that can be used to move around the Render Texture.\r\n * Control it just like you would any Scene Camera. The difference is that it only impacts the placement of what\r\n * is drawn to the Render Texture. You can scroll, zoom and rotate this Camera.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#camera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.camera = new Camera(0, 0, width, height);\r\n\r\n /**\r\n * A reference to the WebGL Rendering Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture that is being rendered to in a WebGL Context.\r\n *\r\n * @name Phaser.GameObjects.RenderTexture#glTexture\r\n * @type {WebGLTexture}\r\n * @default null\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n var renderer = this.renderer;\r\n\r\n if (renderer.type === CONST.WEBGL)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.gl = gl;\r\n this.glTexture = this.frame.source.glTexture;\r\n this.drawGameObject = this.batchGameObjectWebGL;\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n }\r\n else if (renderer.type === CONST.CANVAS)\r\n {\r\n this.drawGameObject = this.batchGameObjectCanvas;\r\n }\r\n\r\n this.camera.setScene(scene);\r\n\r\n this.setPosition(x, y);\r\n\r\n if (key === undefined)\r\n {\r\n this.setSize(width, height);\r\n }\r\n\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n * \r\n * @method Phaser.GameObjects.RenderTexture#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * \r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n return this.resize(width, height);\r\n },\r\n\r\n /**\r\n * Resizes the Render Texture to the new dimensions given.\r\n * \r\n * If Render Texture was created from specific frame, only the size of the frame will be changed. The size of the source\r\n * texture will not change.\r\n *\r\n * If Render Texture was not created from specific frame, the following will happen:\r\n * In WebGL it will destroy and then re-create the frame buffer being used by the Render Texture.\r\n * In Canvas it will resize the underlying canvas element.\r\n * Both approaches will erase everything currently drawn to the Render Texture.\r\n *\r\n * If the dimensions given are the same as those already being used, calling this method will do nothing.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#resize\r\n * @since 3.10.0\r\n *\r\n * @param {number} width - The new width of the Render Texture.\r\n * @param {number} [height=width] - The new height of the Render Texture. If not specified, will be set the same as the `width`.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n resize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n if (this.frame.name === '__BASE')\r\n {\r\n // Resize the texture\r\n\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n if (this.gl)\r\n {\r\n var gl = this.gl;\r\n\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n var glTexture = this.renderer.createTexture2D(0, gl.NEAREST, gl.NEAREST, gl.CLAMP_TO_EDGE, gl.CLAMP_TO_EDGE, gl.RGBA, null, width, height, false);\r\n\r\n this.framebuffer = this.renderer.createFramebuffer(width, height, glTexture, false);\r\n\r\n this.frame.source.isRenderTexture = true;\r\n\r\n this.frame.glTexture = glTexture;\r\n this.glTexture = glTexture;\r\n }\r\n\r\n this.frame.source.width = width;\r\n this.frame.source.height = height;\r\n\r\n this.camera.setSize(width, height);\r\n\r\n this.frame.setSize(width, height);\r\n\r\n this.width = width;\r\n this.height = height;\r\n }\r\n }\r\n else\r\n {\r\n // Resize the frame\r\n\r\n var baseFrame = this.texture.getSourceImage();\r\n\r\n if (this.frame.cutX + width > baseFrame.width)\r\n {\r\n width = baseFrame.width - this.frame.cutX;\r\n }\r\n\r\n if (this.frame.cutY + height > baseFrame.height)\r\n {\r\n height = baseFrame.height - this.frame.cutY;\r\n }\r\n\r\n this.frame.setSize(width, height, this.frame.cutX, this.frame.cutY);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the tint to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalTint\r\n * @since 3.2.0\r\n *\r\n * @param {integer} tint - The tint value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalTint: function (tint)\r\n {\r\n this.globalTint = tint;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the alpha to use when rendering this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#setGlobalAlpha\r\n * @since 3.2.0\r\n *\r\n * @param {number} alpha - The alpha value.\r\n *\r\n * @return {this} This Render Texture.\r\n */\r\n setGlobalAlpha: function (alpha)\r\n {\r\n this.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stores a copy of this Render Texture in the Texture Manager using the given key.\r\n * \r\n * After doing this, any texture based Game Object, such as a Sprite, can use the contents of this\r\n * Render Texture by using the texture key:\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 128, 128);\r\n * \r\n * // Draw something to the Render Texture\r\n * \r\n * rt.saveTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Updating the contents of this Render Texture will automatically update _any_ Game Object\r\n * that is using it as a texture. Calling `saveTexture` again will not save another copy\r\n * of the same texture, it will just rename the key of the existing copy.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#saveTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique key to store the texture as within the global Texture Manager.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was saved.\r\n */\r\n saveTexture: function (key)\r\n {\r\n this.textureManager.renameTexture(this.texture.key, key);\r\n \r\n this._saved = true;\r\n\r\n return this.texture;\r\n },\r\n\r\n /**\r\n * Fills the Render Texture with the given color.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#fill\r\n * @since 3.2.0\r\n *\r\n * @param {number} rgb - The color to fill the Render Texture with.\r\n * @param {number} [alpha=1] - The alpha value used by the fill.\r\n * @param {number} [x=0] - The left coordinate of the fill rectangle.\r\n * @param {number} [y=0] - The top coordinate of the fill rectangle.\r\n * @param {number} [width=this.frame.cutWidth] - The width of the fill rectangle.\r\n * @param {number} [height=this.frame.cutHeight] - The height of the fill rectangle.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n fill: function (rgb, alpha, x, y, width, height)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.frame.cutWidth; }\r\n if (height === undefined) { height = this.frame.cutHeight; }\r\n\r\n var r = ((rgb >> 16) | 0) & 0xff;\r\n var g = ((rgb >> 8) | 0) & 0xff;\r\n var b = (rgb | 0) & 0xff;\r\n\r\n var gl = this.gl;\r\n var frame = this.frame;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n \r\n var bounds = this.getBounds();\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n this.pipeline.drawFillRect(\r\n bounds.x, bounds.y, bounds.right, bounds.bottom,\r\n Utils.getTintFromFloats(r / 255, g / 255, b / 255, 1),\r\n alpha\r\n );\r\n\r\n if (width !== frame.source.width || height !== frame.source.height)\r\n {\r\n gl.scissor(0, 0, frame.source.width, frame.source.height);\r\n }\r\n \r\n this.renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n this.context.fillStyle = 'rgba(' + r + ',' + g + ',' + b + ',' + alpha + ')';\r\n this.context.fillRect(x + frame.cutX, y + frame.cutY, width, height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears the Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#clear\r\n * @since 3.2.0\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n clear: function ()\r\n {\r\n if (this.dirty)\r\n {\r\n var gl = this.gl;\r\n\r\n if (gl)\r\n {\r\n var renderer = this.renderer;\r\n\r\n renderer.setFramebuffer(this.framebuffer, true);\r\n \r\n if (this.frame.cutWidth !== this.canvas.width || this.frame.cutHeight !== this.canvas.height)\r\n {\r\n gl.scissor(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n }\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setFramebuffer(null, true);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n\r\n ctx.save();\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.clearRect(this.frame.cutX, this.frame.cutY, this.frame.cutWidth, this.frame.cutHeight);\r\n ctx.restore();\r\n }\r\n\r\n this.dirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture using a blend mode of ERASE.\r\n * This has the effect of erasing any filled pixels in the objects from this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot erase a Render Texture from itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#erase\r\n * @since 3.16.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n erase: function (entries, x, y)\r\n {\r\n this._eraseMode = true;\r\n\r\n var blendMode = this.renderer.currentBlendMode;\r\n\r\n this.renderer.setBlendMode(BlendModes.ERASE);\r\n\r\n this.draw(entries, x, y, 1, 16777215);\r\n\r\n this.renderer.setBlendMode(blendMode);\r\n\r\n this._eraseMode = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given object, or an array of objects, to this Render Texture.\r\n * \r\n * It can accept any of the following:\r\n * \r\n * * Any renderable Game Object, such as a Sprite, Text, Graphics or TileSprite.\r\n * * Dynamic and Static Tilemap Layers.\r\n * * A Group. The contents of which will be iterated and drawn in turn.\r\n * * A Container. The contents of which will be iterated fully, and drawn in turn.\r\n * * A Scene's Display List. Pass in `Scene.children` to draw the whole list.\r\n * * Another Render Texture.\r\n * * A Texture Frame instance.\r\n * * A string. This is used to look-up a texture from the Texture Manager.\r\n * \r\n * Note: You cannot draw a Render Texture to itself.\r\n * \r\n * If passing in a Group or Container it will only draw children that return `true`\r\n * when their `willRender()` method is called. I.e. a Container with 10 children,\r\n * 5 of which have `visible=false` will only draw the 5 visible ones.\r\n * \r\n * If passing in an array of Game Objects it will draw them all, regardless if\r\n * they pass a `willRender` check or not.\r\n * \r\n * You can pass in a string in which case it will look for a texture in the Texture\r\n * Manager matching that string, and draw the base frame. If you need to specify\r\n * exactly which frame to draw then use the method `drawFrame` instead.\r\n * \r\n * You can pass in the `x` and `y` coordinates to draw the objects at. The use of\r\n * the coordinates differ based on what objects are being drawn. If the object is\r\n * a Group, Container or Display List, the coordinates are _added_ to the positions\r\n * of the children. For all other types of object, the coordinates are exact.\r\n * \r\n * The `alpha` and `tint` values are only used by Texture Frames.\r\n * Game Objects use their own alpha and tint values when being drawn.\r\n * \r\n * Calling this method causes the WebGL batch to flush, so it can write the texture\r\n * data to the framebuffer being used internally. The batch is flushed at the end,\r\n * after the entries have been iterated. So if you've a bunch of objects to draw,\r\n * try and pass them in an array in one single call, rather than making lots of\r\n * separate calls.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#draw\r\n * @since 3.2.0\r\n *\r\n * @param {any} entries - Any renderable Game Object, or Group, Container, Display List, other Render Texture, Texture Frame or an array of any of these.\r\n * @param {number} [x] - The x position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [y] - The y position to draw the Frame at, or the offset applied to the object.\r\n * @param {number} [alpha] - The alpha value. Only used for Texture Frames and if not specified defaults to the `globalAlpha` property. Game Objects use their own current alpha value.\r\n * @param {number} [tint] - WebGL only. The tint color value. Only used for Texture Frames and if not specified defaults to the `globalTint` property. Game Objects use their own current tint value.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n draw: function (entries, x, y, alpha, tint)\r\n {\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n if (!Array.isArray(entries))\r\n {\r\n entries = [ entries ];\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n\r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n\r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n\r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n pipeline.flush();\r\n\r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n\r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.renderer.setContext(this.context);\r\n\r\n this.batchList(entries, x, y, alpha, tint);\r\n\r\n this.renderer.setContext();\r\n }\r\n\r\n this.dirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the Texture Frame to the Render Texture at the given position.\r\n * \r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n * \r\n * ```javascript\r\n * var rt = this.add.renderTexture(0, 0, 800, 600);\r\n * rt.drawFrame(key, frame);\r\n * ```\r\n * \r\n * You can optionally provide a position, alpha and tint value to apply to the frame\r\n * before it is drawn.\r\n * \r\n * Calling this method will cause a batch flush, so if you've got a stack of things to draw\r\n * in a tight loop, try using the `draw` method instead.\r\n * \r\n * If you need to draw a Sprite to this Render Texture, use the `draw` method instead.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#drawFrame\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to draw the frame at.\r\n * @param {number} [y=0] - The y position to draw the frame at.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - WebGL only. The tint color to use. If not specified it uses the `globalTint` property.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n drawFrame: function (key, frame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (alpha === undefined) { alpha = this.globalAlpha; }\r\n\r\n if (tint === undefined)\r\n {\r\n tint = (this.globalTint >> 16) + (this.globalTint & 0xff00) + ((this.globalTint & 0xff) << 16);\r\n }\r\n else\r\n {\r\n tint = (tint >> 16) + (tint & 0xff00) + ((tint & 0xff) << 16);\r\n }\r\n\r\n var gl = this.gl;\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.camera.preRender(1, 1);\r\n\r\n if (gl)\r\n {\r\n var cx = this.camera._cx;\r\n var cy = this.camera._cy;\r\n var cw = this.camera._cw;\r\n var ch = this.camera._ch;\r\n \r\n this.renderer.setFramebuffer(this.framebuffer, false);\r\n \r\n this.renderer.pushScissor(cx, cy, cw, ch, ch);\r\n \r\n var pipeline = this.pipeline;\r\n \r\n pipeline.projOrtho(0, this.texture.width, 0, this.texture.height, -1000.0, 1000.0);\r\n \r\n pipeline.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, tint, alpha, this.camera.matrix, null);\r\n \r\n pipeline.flush();\r\n \r\n this.renderer.setFramebuffer(null, false);\r\n\r\n this.renderer.popScissor();\r\n \r\n pipeline.projOrtho(0, pipeline.width, pipeline.height, 0, -1000.0, 1000.0);\r\n }\r\n else\r\n {\r\n this.batchTextureFrame(textureFrame, x + this.frame.cutX, y + this.frame.cutY, alpha, tint);\r\n }\r\n\r\n this.dirty = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchList\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x] - The x position to offset the Game Object by.\r\n * @param {number} [y] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchList: function (children, x, y, alpha, tint)\r\n {\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (!entry || entry === this)\r\n {\r\n continue;\r\n }\r\n\r\n if (entry.renderWebGL || entry.renderCanvas)\r\n {\r\n // Game Objects\r\n this.drawGameObject(entry, x, y);\r\n }\r\n else if (entry.isParent || entry.list)\r\n {\r\n // Groups / Display Lists\r\n this.batchGroup(entry.getChildren(), x, y);\r\n }\r\n else if (typeof entry === 'string')\r\n {\r\n // Texture key\r\n this.batchTextureFrameKey(entry, null, x, y, alpha, tint);\r\n }\r\n else if (entry instanceof Frame)\r\n {\r\n // Texture Frame instance\r\n this.batchTextureFrame(entry, x, y, alpha, tint);\r\n }\r\n else if (Array.isArray(entry))\r\n {\r\n // Another Array\r\n this.batchList(entry, x, y, alpha, tint);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing a Phaser Group contents.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGroup\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {array} children - The array of Game Objects to draw.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n */\r\n batchGroup: function (children, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n var entry = children[i];\r\n\r\n if (entry.willRender())\r\n {\r\n var tx = entry.x + x;\r\n var ty = entry.y + y;\r\n\r\n this.drawGameObject(entry, tx, ty);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using WebGL.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectWebGL\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectWebGL: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (!this._eraseMode)\r\n {\r\n this.renderer.setBlendMode(gameObject.blendMode);\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n \r\n gameObject.renderWebGL(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n },\r\n\r\n /**\r\n * Internal method that handles drawing a single Phaser Game Object to this Render Texture using Canvas.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchGameObjectCanvas\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to draw.\r\n * @param {number} [x] - The x position to draw the Game Object at.\r\n * @param {number} [y] - The y position to draw the Game Object at.\r\n */\r\n batchGameObjectCanvas: function (gameObject, x, y)\r\n {\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n var prevX = gameObject.x;\r\n var prevY = gameObject.y;\r\n\r\n if (this._eraseMode)\r\n {\r\n var blendMode = gameObject.blendMode;\r\n\r\n gameObject.blendMode = BlendModes.ERASE;\r\n }\r\n\r\n gameObject.setPosition(x + this.frame.cutX, y + this.frame.cutY);\r\n\r\n gameObject.renderCanvas(this.renderer, gameObject, 0, this.camera, null);\r\n\r\n gameObject.setPosition(prevX, prevY);\r\n\r\n if (this._eraseMode)\r\n {\r\n gameObject.blendMode = blendMode;\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of an array of children.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrameKey\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n * @param {number} [x=0] - The x position to offset the Game Object by.\r\n * @param {number} [y=0] - The y position to offset the Game Object by.\r\n * @param {number} [alpha] - The alpha to use. If not specified it uses the `globalAlpha` property.\r\n * @param {number} [tint] - The tint color to use. If not specified it uses the `globalTint` property.\r\n */\r\n batchTextureFrameKey: function (key, frame, x, y, alpha, tint)\r\n {\r\n var textureFrame = this.textureManager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n this.batchTextureFrame(textureFrame, x, y, alpha, tint);\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that handles the drawing of a Texture Frame to this Render Texture.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#batchTextureFrame\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} textureFrame - The Texture Frame to draw.\r\n * @param {number} [x=0] - The x position to draw the Frame at.\r\n * @param {number} [y=0] - The y position to draw the Frame at.\r\n * @param {number} [tint] - A tint color to be applied to the frame drawn to the Render Texture.\r\n */\r\n batchTextureFrame: function (textureFrame, x, y, alpha, tint)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n x += this.frame.cutX;\r\n y += this.frame.cutY;\r\n\r\n if (this.gl)\r\n {\r\n this.pipeline.batchTextureFrame(textureFrame, x, y, tint, alpha, this.camera.matrix, null);\r\n }\r\n else\r\n {\r\n var ctx = this.context;\r\n var cd = textureFrame.canvasData;\r\n var source = textureFrame.source.image;\r\n \r\n var matrix = this.camera.matrix;\r\n \r\n ctx.globalAlpha = this.globalAlpha;\r\n\r\n ctx.setTransform(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]);\r\n\r\n ctx.drawImage(source, cd.x, cd.y, cd.width, cd.height, x, y, cd.width, cd.height);\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotArea\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, x, y, width, height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the whole of this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture just a portion of the Render Texture see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshot\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, false, 0, 0, this.width, this.height, type, encoderOptions);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given pixel from this Render Texture.\r\n * \r\n * The snapshot is taken immediately.\r\n * \r\n * To capture the whole Render Texture see the `snapshot` method. To capture a specific portion, see `snapshotArea`.\r\n * \r\n * Unlike the other two snapshot methods, this one will send your callback a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory, than the other snapshot methods.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#snapshotPixel\r\n * @since 3.19.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This Render Texture instance.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n if (this.gl)\r\n {\r\n this.renderer.snapshotFramebuffer(this.framebuffer, this.width, this.height, callback, true, x, y);\r\n }\r\n else\r\n {\r\n this.renderer.snapshotCanvas(this.canvas, callback, true, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (!this._saved)\r\n {\r\n CanvasPool.remove(this.canvas);\r\n\r\n if (this.gl)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n }\r\n\r\n this.texture.destroy();\r\n this.camera.destroy();\r\n\r\n this.canvas = null;\r\n this.context = null;\r\n this.framebuffer = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RenderTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderCanvas\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = RenderTextureCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {Phaser.Types.GameObjects.RenderTexture.RenderTextureConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('renderTexture', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 32);\r\n var height = GetAdvancedValue(config, 'height', 32);\r\n var key = GetAdvancedValue(config, 'key', undefined);\r\n var frame = GetAdvancedValue(config, 'frame', undefined);\r\n\r\n var renderTexture = new RenderTexture(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, renderTexture, config);\r\n\r\n return renderTexture;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar RenderTexture = __webpack_require__(/*! ./RenderTexture */ \"./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js\");\r\n\r\n/**\r\n * Creates a new Render Texture Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Render Texture Game Object has been built into Phaser.\r\n * \r\n * A Render Texture is a special texture that allows any number of Game Objects to be drawn to it. You can take many complex objects and\r\n * draw them all to this one texture, which can they be used as the texture for other Game Object's. It's a way to generate dynamic\r\n * textures at run-time that are WebGL friendly and don't invoke expensive GPU uploads.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#renderTexture\r\n * @since 3.2.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} [width=32] - The width of the Render Texture.\r\n * @param {integer} [height=32] - The height of the Render Texture.\r\n * @property {string} [key] - The texture key to make the RenderTexture from.\r\n * @property {string} [frame] - the frame to make the RenderTexture from.\r\n * \r\n * @return {Phaser.GameObjects.RenderTexture} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('renderTexture', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new RenderTexture(this.scene, x, y, width, height, key, frame));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js?")},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RenderTextureWebGLRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RenderTextureCanvasRenderer */ "./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js?')},"./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.RenderTexture#renderWebGL\r\n * @since 3.2.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.RenderTexture} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RenderTextureWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width, height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, !src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don\'t try and use it\r\n renderer.setBlankTexture(true);\r\n};\r\n\r\nmodule.exports = RenderTextureWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shader/Shader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar SetValue = __webpack_require__(/*! ../../utils/object/SetValue */ \"./node_modules/phaser/src/utils/object/SetValue.js\");\r\nvar ShaderRender = __webpack_require__(/*! ./ShaderRender */ \"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Shader Game Object.\r\n * \r\n * This Game Object allows you to easily add a quad with its own shader into the display list, and manipulate it\r\n * as you would any other Game Object, including scaling, rotating, positioning and adding to Containers. Shaders\r\n * can be masked with either Bitmap or Geometry masks and can also be used as a Bitmap Mask for a Camera or other\r\n * Game Object. They can also be made interactive and used for input events.\r\n * \r\n * It works by taking a reference to a `Phaser.Display.BaseShader` instance, as found in the Shader Cache. These can\r\n * be created dynamically at runtime, or loaded in via the GLSL File Loader:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('fire', 'shaders/fire.glsl.js');\r\n * }\r\n * \r\n * function create ()\r\n * {\r\n * this.add.shader('fire', 400, 300, 512, 512);\r\n * }\r\n * ```\r\n * \r\n * Please see the Phaser 3 Examples GitHub repo for examples of loading and creating shaders dynamically.\r\n * \r\n * Due to the way in which they work, you cannot directly change the alpha or blend mode of a Shader. This should\r\n * be handled via exposed uniforms in the shader code itself.\r\n * \r\n * By default a Shader will be created with a standard set of uniforms. These were added to match those\r\n * found on sites such as ShaderToy or GLSLSandbox, and provide common functionality a shader may need,\r\n * such as the timestamp, resolution or pointer position. You can replace them by specifying your own uniforms\r\n * in the Base Shader.\r\n * \r\n * These Shaders work by halting the current pipeline during rendering, creating a viewport matched to the\r\n * size of this Game Object and then renders a quad using the bound shader. At the end, the pipeline is restored.\r\n * \r\n * Because it blocks the pipeline it means it will interrupt any batching that is currently going on, so you should\r\n * use these Game Objects sparingly. If you need to have a fully batched custom shader, then please look at using\r\n * a custom pipeline instead. However, for background or special masking effects, they are extremely effective.\r\n * \r\n * @class Shader\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n */\r\nvar Shader = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible,\r\n ShaderRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Shader (scene, key, x, y, width, height, textures)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n GameObject.call(this, scene, 'Shader');\r\n\r\n /**\r\n * This Game Object cannot have a blend mode, so skip all checks.\r\n * \r\n * @name Phaser.GameObjects.Shader#blendMode\r\n * @type {integer}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this.blendMode = -1;\r\n\r\n /**\r\n * The underlying shader object being used.\r\n * Empty by default and set during a call to the `setShader` method.\r\n * \r\n * @name Phaser.GameObjects.Shader#shader\r\n * @type {Phaser.Display.BaseShader}\r\n * @since 3.17.0\r\n */\r\n this.shader;\r\n\r\n var renderer = scene.sys.renderer;\r\n\r\n /**\r\n * A reference to the current renderer.\r\n * Shaders only work with the WebGL Renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The WebGL context belonging to the renderer.\r\n *\r\n * @name Phaser.GameObjects.Shader#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.17.0\r\n */\r\n this.gl = renderer.gl;\r\n\r\n /**\r\n * Raw byte buffer of vertices this Shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexData = new ArrayBuffer(6 * (Float32Array.BYTES_PER_ELEMENT * 2));\r\n\r\n /**\r\n * The WebGL vertex buffer object this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.17.0\r\n */\r\n this.vertexBuffer = renderer.createVertexBuffer(this.vertexData.byteLength, this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The WebGL shader program this shader uses.\r\n *\r\n * @name Phaser.GameObjects.Shader#program\r\n * @type {WebGLProgram}\r\n * @since 3.17.0\r\n */\r\n this.program = null;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources to the GPU.\r\n *\r\n * @name Phaser.GameObjects.Shader#bytes\r\n * @type {Uint8Array}\r\n * @since 3.17.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * Float32 view of the array buffer containing the shaders vertices.\r\n *\r\n * @name Phaser.GameObjects.Shader#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.17.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.GameObjects.Shader#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.17.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * The view matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#viewMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.viewMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The projection matrix the shader uses during rendering.\r\n * \r\n * @name Phaser.GameObjects.Shader#projectionMatrix\r\n * @type {Float32Array}\r\n * @readonly\r\n * @since 3.17.0\r\n */\r\n this.projectionMatrix = new Float32Array([ 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1 ]);\r\n\r\n /**\r\n * The default uniform mappings. These can be added to (or replaced) by specifying your own uniforms when\r\n * creating this shader game object. The uniforms are updated automatically during the render step.\r\n * \r\n * The defaults are:\r\n * \r\n * `resolution` (2f) - Set to the size of this shader.\r\n * `time` (1f) - The elapsed game time, in seconds.\r\n * `mouse` (2f) - If a pointer has been bound (with `setPointer`), this uniform contains its position each frame.\r\n * `date` (4fv) - A vec4 containing the year, month, day and time in seconds.\r\n * `sampleRate` (1f) - Sound sample rate. 44100 by default.\r\n * `iChannel0...3` (sampler2D) - Input channels 0 to 3. `null` by default.\r\n * \r\n * @name Phaser.GameObjects.Shader#uniforms\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.uniforms = {};\r\n\r\n /**\r\n * The pointer bound to this shader, if any.\r\n * Set via the chainable `setPointer` method, or by modifying this property directly.\r\n * \r\n * @name Phaser.GameObjects.Shader#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.17.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * The cached width of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererWidth = renderer.width;\r\n\r\n /**\r\n * The cached height of the renderer.\r\n * \r\n * @name Phaser.GameObjects.Shader#_rendererHeight\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._rendererHeight = renderer.height;\r\n\r\n /**\r\n * Internal texture count tracker.\r\n * \r\n * @name Phaser.GameObjects.Shader#_textureCount\r\n * @type {number}\r\n * @private\r\n * @since 3.17.0\r\n */\r\n this._textureCount = 0;\r\n\r\n /**\r\n * A reference to the GL Frame Buffer this Shader is drawing to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#framebuffer\r\n * @type {?WebGLFramebuffer}\r\n * @since 3.19.0\r\n */\r\n this.framebuffer = null;\r\n\r\n /**\r\n * A reference to the WebGLTexture this Shader is rendering to.\r\n * This property is only set if you have called `Shader.setRenderToTexture`.\r\n *\r\n * @name Phaser.GameObjects.Shader#glTexture\r\n * @type {?WebGLTexture}\r\n * @since 3.19.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * A flag that indicates if this Shader has been set to render to a texture instead of the display list.\r\n * \r\n * This property is `true` if you have called `Shader.setRenderToTexture`, otherwise it's `false`.\r\n * \r\n * A Shader that is rendering to a texture _does not_ appear on the display list.\r\n *\r\n * @name Phaser.GameObjects.Shader#renderToTexture\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.renderToTexture = false;\r\n\r\n /**\r\n * A reference to the Phaser.Textures.Texture that has been stored in the Texture Manager for this Shader.\r\n * \r\n * This property is only set if you have called `Shader.setRenderToTexture`, otherwise it is `null`.\r\n *\r\n * @name Phaser.GameObjects.Shader#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.19.0\r\n */\r\n this.texture = null;\r\n\r\n /**\r\n * Internal saved texture key.\r\n *\r\n * @name Phaser.GameObjects.Shader#_savedKey\r\n * @type {boolean}\r\n * @private\r\n * @since 3.19.0\r\n */\r\n this._savedKey = '';\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setOrigin(0.5, 0.5);\r\n this.setShader(key, textures);\r\n },\r\n\r\n /**\r\n * Compares the renderMask with the renderFlags to see if this Game Object will render or not.\r\n * Also checks the Game Object against the given Cameras exclusion list.\r\n *\r\n * @method Phaser.GameObjects.Shader#willRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to check against this Game Object.\r\n *\r\n * @return {boolean} True if the Game Object should be rendered, otherwise false.\r\n */\r\n willRender: function (camera)\r\n {\r\n if (this.renderToTexture)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return !(GameObject.RENDER_MASK !== this.renderFlags || (this.cameraFilter !== 0 && (this.cameraFilter & camera.id)));\r\n }\r\n },\r\n\r\n /**\r\n * Changes this Shader so instead of rendering to the display list it renders to a\r\n * WebGL Framebuffer and WebGL Texture instead. This allows you to use the output\r\n * of this shader as an input for another shader, by mapping a sampler2D uniform\r\n * to it.\r\n * \r\n * After calling this method the `Shader.framebuffer` and `Shader.glTexture` properties\r\n * are populated.\r\n * \r\n * Additionally, you can provide a key to this method. Doing so will create a Phaser Texture\r\n * from this Shader and save it into the Texture Manager, allowing you to then use it for\r\n * any texture-based Game Object, such as a Sprite or Image:\r\n * \r\n * ```javascript\r\n * var shader = this.add.shader('myShader', x, y, width, height);\r\n * \r\n * shader.setRenderToTexture('doodle');\r\n * \r\n * this.add.image(400, 300, 'doodle');\r\n * ```\r\n * \r\n * Note that it stores an active reference to this Shader. That means as this shader updates,\r\n * so does the texture and any object using it to render with. Also, if you destroy this\r\n * shader, be sure to clear any objects that may have been using it as a texture too.\r\n * \r\n * You can access the Phaser Texture that is created via the `Shader.texture` property.\r\n * \r\n * By default it will create a single base texture. You can add frames to the texture\r\n * by using the `Texture.add` method. After doing this, you can then allow Game Objects\r\n * to use a specific frame from a Render Texture.\r\n *\r\n * @method Phaser.GameObjects.Shader#setRenderToTexture\r\n * @since 3.19.0\r\n *\r\n * @param {string} [key] - The unique key to store the texture as within the global Texture Manager.\r\n * @param {boolean} [flipY=false] - Does this texture need vertically flipping before rendering? This should usually be set to `true` if being fed from a buffer.\r\n *\r\n * @return {this} This Shader instance.\r\n */\r\n setRenderToTexture: function (key, flipY)\r\n {\r\n if (flipY === undefined) { flipY = false; }\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n\r\n this.glTexture = renderer.createTextureFromSource(null, width, height, 0);\r\n\r\n this.glTexture.flipY = flipY;\r\n\r\n this.framebuffer = renderer.createFramebuffer(width, height, this.glTexture, false);\r\n\r\n this._rendererWidth = width;\r\n this._rendererHeight = height;\r\n\r\n this.renderToTexture = true;\r\n\r\n this.projOrtho(0, this.width, this.height, 0);\r\n\r\n if (key)\r\n {\r\n this._savedKey = key;\r\n\r\n this.texture = this.scene.sys.textures.addGLTexture(key, this.glTexture, width, height);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fragment and, optionally, the vertex shader source code that this Shader will use.\r\n * This will immediately delete the active shader program, if set, and then create a new one\r\n * with the given source. Finally, the shader uniforms are initialized.\r\n *\r\n * @method Phaser.GameObjects.Shader#setShader\r\n * @since 3.17.0\r\n * \r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setShader: function (key, textures)\r\n {\r\n if (textures === undefined) { textures = []; }\r\n\r\n if (typeof key === 'string')\r\n {\r\n var cache = this.scene.sys.cache.shader;\r\n\r\n if (!cache.has(key))\r\n {\r\n console.warn('Shader missing: ' + key);\r\n return this;\r\n }\r\n \r\n this.shader = cache.get(key);\r\n }\r\n else\r\n {\r\n this.shader = key;\r\n }\r\n\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n if (this.program)\r\n {\r\n gl.deleteProgram(this.program);\r\n }\r\n\r\n var program = renderer.createProgram(this.shader.vertexSrc, this.shader.fragmentSrc);\r\n\r\n // The default uniforms available within the vertex shader\r\n renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n this.program = program;\r\n\r\n var d = new Date();\r\n\r\n // The default uniforms available within the fragment shader\r\n var defaultUniforms = {\r\n resolution: { type: '2f', value: { x: this.width, y: this.height } },\r\n time: { type: '1f', value: 0 },\r\n mouse: { type: '2f', value: { x: this.width / 2, y: this.height / 2 } },\r\n date: { type: '4fv', value: [ d.getFullYear(), d.getMonth(), d.getDate(), d.getHours() * 60 * 60 + d.getMinutes() * 60 + d.getSeconds() ] },\r\n sampleRate: { type: '1f', value: 44100.0 },\r\n iChannel0: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel1: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel2: { type: 'sampler2D', value: null, textureData: { repeat: true } },\r\n iChannel3: { type: 'sampler2D', value: null, textureData: { repeat: true } }\r\n };\r\n \r\n if (this.shader.uniforms)\r\n {\r\n this.uniforms = Extend(true, {}, this.shader.uniforms, defaultUniforms);\r\n }\r\n else\r\n {\r\n this.uniforms = defaultUniforms;\r\n }\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (textures[i])\r\n {\r\n this.setSampler2D('iChannel' + i, textures[i], i);\r\n }\r\n }\r\n\r\n this.initUniforms();\r\n\r\n this.projOrtho(0, this._rendererWidth, this._rendererHeight, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a Phaser Pointer object to this Shader.\r\n * \r\n * The screen position of the pointer will be set in to the shaders `mouse` uniform\r\n * automatically every frame. Call this method with no arguments to unbind the pointer.\r\n *\r\n * @method Phaser.GameObjects.Shader#setPointer\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Input.Pointer} [pointer] - The Pointer to bind to this shader.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setPointer: function (pointer)\r\n {\r\n this.pointer = pointer;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this shader to use an orthographic projection matrix.\r\n * This matrix is stored locally in the `projectionMatrix` property,\r\n * as well as being bound to the `uProjectionMatrix` uniform.\r\n * \r\n * @method Phaser.GameObjects.Shader#projOrtho\r\n * @since 3.17.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n */\r\n projOrtho: function (left, right, bottom, top)\r\n {\r\n var near = -1000;\r\n var far = 1000;\r\n\r\n var leftRight = 1 / (left - right);\r\n var bottomTop = 1 / (bottom - top);\r\n var nearFar = 1 / (near - far);\r\n\r\n var pm = this.projectionMatrix;\r\n\r\n pm[0] = -2 * leftRight;\r\n pm[5] = -2 * bottomTop;\r\n pm[10] = 2 * nearFar;\r\n pm[12] = (left + right) * leftRight;\r\n pm[13] = (top + bottom) * bottomTop;\r\n pm[14] = (far + near) * nearFar;\r\n\r\n var program = this.program;\r\n\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n\r\n this._rendererWidth = right;\r\n this._rendererHeight = bottom;\r\n },\r\n\r\n // Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/\r\n // http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf\r\n\r\n /**\r\n * Initializes all of the uniforms this shader uses.\r\n * \r\n * @method Phaser.GameObjects.Shader#initUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n initUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n var map = this.renderer.glFuncMap;\r\n var program = this.program;\r\n\r\n this._textureCount = 0;\r\n\r\n for (var key in this.uniforms)\r\n {\r\n var uniform = this.uniforms[key];\r\n\r\n var type = uniform.type;\r\n var data = map[type];\r\n\r\n uniform.uniformLocation = gl.getUniformLocation(program, key);\r\n\r\n if (type !== 'sampler2D')\r\n {\r\n uniform.glMatrix = data.matrix;\r\n uniform.glValueLength = data.length;\r\n uniform.glFunc = data.func;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader where the source texture is a WebGLTexture.\r\n * \r\n * This allows you to feed the output from one Shader into another:\r\n * \r\n * ```javascript\r\n * let shader1 = this.add.shader(baseShader1, 0, 0, 512, 512).setRenderToTexture();\r\n * let shader2 = this.add.shader(baseShader2, 0, 0, 512, 512).setRenderToTexture('output');\r\n * \r\n * shader1.setSampler2DBuffer('iChannel0', shader2.glTexture, 512, 512);\r\n * shader2.setSampler2DBuffer('iChannel0', shader1.glTexture, 512, 512);\r\n * ```\r\n * \r\n * In the above code, the result of baseShader1 is fed into Shader2 as the `iChannel0` sampler2D uniform.\r\n * The result of baseShader2 is then fed back into shader1 again, creating a feedback loop.\r\n * \r\n * If you wish to use an image from the Texture Manager as a sampler2D input for this shader,\r\n * see the `Shader.setSampler2D` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2DBuffer\r\n * @since 3.19.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {WebGLTexture} texture - A WebGLTexture reference.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2DBuffer: function (uniformKey, texture, width, height, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n if (textureData === undefined) { textureData = {}; }\r\n\r\n var uniform = this.uniforms[uniformKey];\r\n\r\n uniform.value = texture;\r\n\r\n textureData.width = width;\r\n textureData.height = height;\r\n\r\n uniform.textureData = textureData;\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a sampler2D uniform on this shader.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * If you wish to use another Shader as a sampler2D input for this shader, see the `Shader.setSampler2DBuffer` method.\r\n * \r\n * @method Phaser.GameObjects.Shader#setSampler2D\r\n * @since 3.17.0\r\n * \r\n * @param {string} uniformKey - The key of the sampler2D uniform to be updated, i.e. `iChannel0`.\r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {integer} [textureIndex=0] - The texture index.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setSampler2D: function (uniformKey, textureKey, textureIndex, textureData)\r\n {\r\n if (textureIndex === undefined) { textureIndex = 0; }\r\n\r\n var textureManager = this.scene.sys.textures;\r\n\r\n if (textureManager.exists(textureKey))\r\n {\r\n var frame = textureManager.getFrame(textureKey);\r\n var uniform = this.uniforms[uniformKey];\r\n var source = frame.source;\r\n\r\n uniform.textureKey = textureKey;\r\n uniform.source = source.image;\r\n uniform.value = frame.glTexture;\r\n\r\n if (source.isGLTexture)\r\n {\r\n if (!textureData)\r\n {\r\n textureData = {};\r\n }\r\n\r\n textureData.width = source.width;\r\n textureData.height = source.height;\r\n }\r\n\r\n if (textureData)\r\n {\r\n uniform.textureData = textureData;\r\n }\r\n\r\n this._textureCount = textureIndex;\r\n\r\n this.initSampler2D(uniform);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a property of a uniform already present on this shader.\r\n * \r\n * To modify the value of a uniform such as a 1f or 1i use the `value` property directly:\r\n * \r\n * ```javascript\r\n * shader.setUniform('size.value', 16);\r\n * ```\r\n * \r\n * You can use dot notation to access deeper values, for example:\r\n * \r\n * ```javascript\r\n * shader.setUniform('resolution.value.x', 512);\r\n * ```\r\n * \r\n * The change to the uniform will take effect the next time the shader is rendered.\r\n * \r\n * @method Phaser.GameObjects.Shader#setUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to modify. Use dots for deep properties, i.e. `resolution.value.x`.\r\n * @param {any} value - The value to set into the uniform.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setUniform: function (key, value)\r\n {\r\n SetValue(this.uniforms, key, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the uniform object for the given key, or `null` if the uniform couldn't be found.\r\n * \r\n * @method Phaser.GameObjects.Shader#getUniform\r\n * @since 3.17.0\r\n * \r\n * @param {string} key - The key of the uniform to return the value for.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n getUniform: function (key)\r\n {\r\n return GetFastValue(this.uniforms, key, null);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel0` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel0\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel0: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel0', textureKey, 0, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel1` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel1\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel1: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel1', textureKey, 1, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel2` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel2\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel2: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel2', textureKey, 2, textureData);\r\n },\r\n\r\n /**\r\n * A short-cut method that will directly set the texture being used by the `iChannel3` sampler2D uniform.\r\n * \r\n * The textureKey given is the key from the Texture Manager cache. You cannot use a single frame\r\n * from a texture, only the full image. Also, lots of shaders expect textures to be power-of-two sized.\r\n * \r\n * @method Phaser.GameObjects.Shader#setChannel3\r\n * @since 3.17.0\r\n * \r\n * @param {string} textureKey - The key of the texture, as stored in the Texture Manager. Must already be loaded.\r\n * @param {any} [textureData] - Additional texture data.\r\n * \r\n * @return {this} This Shader instance.\r\n */\r\n setChannel3: function (textureKey, textureData)\r\n {\r\n return this.setSampler2D('iChannel3', textureKey, 3, textureData);\r\n },\r\n\r\n /**\r\n * Internal method that takes a sampler2D uniform and prepares it for use by setting the\r\n * gl texture parameters.\r\n * \r\n * @method Phaser.GameObjects.Shader#initSampler2D\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {any} uniform - The sampler2D uniform to process.\r\n */\r\n initSampler2D: function (uniform)\r\n {\r\n if (!uniform.value)\r\n {\r\n return;\r\n }\r\n\r\n var gl = this.gl;\r\n\r\n gl.activeTexture(gl.TEXTURE0 + this._textureCount);\r\n gl.bindTexture(gl.TEXTURE_2D, uniform.value);\r\n \r\n // Extended texture data\r\n\r\n var data = uniform.textureData;\r\n\r\n if (data)\r\n {\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D\r\n \r\n // mag / minFilter can be: gl.LINEAR, gl.LINEAR_MIPMAP_LINEAR or gl.NEAREST\r\n // wrapS/T can be: gl.CLAMP_TO_EDGE or gl.REPEAT\r\n // format can be: gl.LUMINANCE or gl.RGBA\r\n \r\n var magFilter = gl[GetFastValue(data, 'magFilter', 'linear').toUpperCase()];\r\n var minFilter = gl[GetFastValue(data, 'minFilter', 'linear').toUpperCase()];\r\n var wrapS = gl[GetFastValue(data, 'wrapS', 'repeat').toUpperCase()];\r\n var wrapT = gl[GetFastValue(data, 'wrapT', 'repeat').toUpperCase()];\r\n var format = gl[GetFastValue(data, 'format', 'rgba').toUpperCase()];\r\n\r\n if (data.repeat)\r\n {\r\n wrapS = gl.REPEAT;\r\n wrapT = gl.REPEAT;\r\n }\r\n\r\n gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, !!data.flipY);\r\n\r\n if (data.width)\r\n {\r\n var width = GetFastValue(data, 'width', 512);\r\n var height = GetFastValue(data, 'height', 2);\r\n var border = GetFastValue(data, 'border', 0);\r\n \r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, ArrayBufferView? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, width, height, border, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n // texImage2D(GLenum target, GLint level, GLenum internalformat, GLenum format, GLenum type, ImageData? pixels)\r\n gl.texImage2D(gl.TEXTURE_2D, 0, format, gl.RGBA, gl.UNSIGNED_BYTE, uniform.source);\r\n }\r\n \r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n }\r\n\r\n this.renderer.setProgram(this.program);\r\n \r\n gl.uniform1i(uniform.uniformLocation, this._textureCount);\r\n \r\n this._textureCount++;\r\n },\r\n\r\n /**\r\n * Synchronizes all of the uniforms this shader uses.\r\n * Each uniforms gl function is called in turn.\r\n * \r\n * @method Phaser.GameObjects.Shader#syncUniforms\r\n * @private\r\n * @since 3.17.0\r\n */\r\n syncUniforms: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n var uniforms = this.uniforms;\r\n var uniform;\r\n var length;\r\n var glFunc;\r\n var location;\r\n var value;\r\n var textureCount = 0;\r\n \r\n for (var key in uniforms)\r\n {\r\n uniform = uniforms[key];\r\n\r\n glFunc = uniform.glFunc;\r\n length = uniform.glValueLength;\r\n location = uniform.uniformLocation;\r\n value = uniform.value;\r\n\r\n if (value === null)\r\n {\r\n continue;\r\n }\r\n\r\n if (length === 1)\r\n {\r\n if (uniform.glMatrix)\r\n {\r\n glFunc.call(gl, location, uniform.transpose, value);\r\n }\r\n else\r\n {\r\n glFunc.call(gl, location, value);\r\n }\r\n }\r\n else if (length === 2)\r\n {\r\n glFunc.call(gl, location, value.x, value.y);\r\n }\r\n else if (length === 3)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z);\r\n }\r\n else if (length === 4)\r\n {\r\n glFunc.call(gl, location, value.x, value.y, value.z, value.w);\r\n }\r\n else if (uniform.type === 'sampler2D')\r\n {\r\n gl.activeTexture(gl['TEXTURE' + textureCount]);\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, value);\r\n\r\n gl.uniform1i(location, textureCount);\r\n\r\n textureCount++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * This method performs matrix ITRS and then stores the resulting value in the `uViewMatrix` uniform.\r\n * It then sets up the vertex buffer and shader, updates and syncs the uniforms ready\r\n * for flush to be called.\r\n * \r\n * @method Phaser.GameObjects.Shader#load\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [matrix2D] - The transform matrix to use during rendering.\r\n */\r\n load: function (matrix2D)\r\n {\r\n // ITRS\r\n\r\n var gl = this.gl;\r\n var width = this.width;\r\n var height = this.height;\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var vm = this.viewMatrix;\r\n\r\n if (!this.renderToTexture)\r\n {\r\n var x = -this._displayOriginX;\r\n var y = -this._displayOriginY;\r\n \r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[12] = vm[0] * x + vm[4] * y;\r\n vm[13] = vm[1] * x + vm[5] * y;\r\n }\r\n\r\n // Update vertex shader uniforms\r\n\r\n gl.useProgram(program);\r\n\r\n gl.uniformMatrix4fv(gl.getUniformLocation(program, 'uViewMatrix'), false, vm);\r\n gl.uniform2f(gl.getUniformLocation(program, 'uResolution'), this.width, this.height);\r\n\r\n // Update fragment shader uniforms\r\n\r\n var uniforms = this.uniforms;\r\n var res = uniforms.resolution;\r\n\r\n res.value.x = width;\r\n res.value.y = height;\r\n\r\n uniforms.time.value = renderer.game.loop.getDuration();\r\n\r\n var pointer = this.pointer;\r\n\r\n if (pointer)\r\n {\r\n var mouse = uniforms.mouse;\r\n\r\n var px = pointer.x / width;\r\n var py = 1 - pointer.y / height;\r\n \r\n mouse.value.x = px.toFixed(2);\r\n mouse.value.y = py.toFixed(2);\r\n }\r\n\r\n this.syncUniforms();\r\n },\r\n\r\n /**\r\n * Called automatically during render.\r\n * \r\n * Sets the active shader, loads the vertex buffer and then draws.\r\n * \r\n * @method Phaser.GameObjects.Shader#flush\r\n * @since 3.17.0\r\n */\r\n flush: function ()\r\n {\r\n // Bind\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n var program = this.program;\r\n\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var renderer = this.renderer;\r\n var vertexSize = Float32Array.BYTES_PER_ELEMENT * 2;\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(this.framebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n }\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n var location = gl.getAttribLocation(program, 'inPosition');\r\n\r\n if (location !== -1)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n\r\n gl.vertexAttribPointer(location, 2, gl.FLOAT, false, vertexSize, 0);\r\n }\r\n\r\n // Draw\r\n\r\n var vf = this.vertexViewF32;\r\n\r\n vf[3] = height;\r\n vf[4] = width;\r\n vf[5] = height;\r\n vf[8] = width;\r\n vf[9] = height;\r\n vf[10] = width;\r\n\r\n // Flush\r\n\r\n var vertexCount = 6;\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n gl.drawArrays(gl.TRIANGLES, 0, vertexCount);\r\n\r\n if (this.renderToTexture)\r\n {\r\n renderer.setFramebuffer(null, false);\r\n }\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setAlpha\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Shader to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Shader#setBlendMode\r\n * @private\r\n * @since 3.17.0\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shader#preDestroy\r\n * @protected\r\n * @since 3.17.0\r\n */\r\n preDestroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n if (this.renderToTexture)\r\n {\r\n this.renderer.deleteFramebuffer(this.framebuffer);\r\n\r\n this.texture.destroy();\r\n\r\n this.framebuffer = null;\r\n this.glTexture = null;\r\n this.texture = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/Shader.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a stub function for Shader.Render. There is no Canvas renderer for Shader objects.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderCanvas\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar ShaderCanvasRenderer = function ()\r\n{\r\n};\r\n\r\nmodule.exports = ShaderCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Shader = __webpack_require__(/*! ./Shader */ \"./node_modules/phaser/src/gameobjects/shader/Shader.js\");\r\n\r\n/**\r\n * Creates a new Shader Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#shader\r\n * @since 3.17.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('shader', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, 'key', null);\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 128);\r\n var height = GetAdvancedValue(config, 'height', 128);\r\n\r\n var shader = new Shader(this.scene, key, x, y, width, height);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, shader, config);\r\n\r\n return shader;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js?")},"./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Shader = __webpack_require__(/*! ./Shader */ "./node_modules/phaser/src/gameobjects/shader/Shader.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Shader Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Shader Game Object and WebGL support have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#shader\r\n * @webglOnly\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Display.BaseShader)} key - The key of the shader to use from the shader cache, or a BaseShader instance.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the Game Object.\r\n * @param {number} [height=128] - The height of the Game Object.\r\n * @param {string[]} [textures] - Optional array of texture keys to bind to the iChannel0...3 uniforms. The textures must already exist in the Texture Manager.\r\n *\r\n * @return {Phaser.GameObjects.Shader} The Game Object that was created.\r\n */\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n GameObjectFactory.register(\'shader\', function (key, x, y, width, height, textures)\r\n {\r\n return this.displayList.add(new Shader(this.scene, key, x, y, width, height, textures));\r\n });\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ShaderWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ShaderCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderRender.js?')},"./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Shader#renderWebGL\r\n * @since 3.17.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Shader} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ShaderWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if (!src.shader)\r\n {\r\n return;\r\n }\r\n\r\n var pipeline = renderer.currentPipeline;\r\n\r\n renderer.clearPipeline();\r\n\r\n if (src.renderToTexture)\r\n {\r\n src.load();\r\n src.flush();\r\n }\r\n else\r\n {\r\n var camMatrix = src._tempMatrix1;\r\n var shapeMatrix = src._tempMatrix2;\r\n var calcMatrix = src._tempMatrix3;\r\n \r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n \r\n camMatrix.copyFrom(camera.matrix);\r\n \r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n \r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n \r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n \r\n // Renderer size changed?\r\n if (renderer.width !== src._rendererWidth || renderer.height !== src._rendererHeight)\r\n {\r\n src.projOrtho(0, renderer.width, renderer.height, 0);\r\n }\r\n \r\n src.load(calcMatrix.matrix);\r\n src.flush();\r\n }\r\n\r\n renderer.rebindPipeline(pipeline);\r\n};\r\n\r\nmodule.exports = ShaderWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a filled path for the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillPathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} calcMatrix - The transform matrix used to get the position values.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar FillPathWebGL = function (pipeline, calcMatrix, src, alpha, dx, dy)\r\n{\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n var path = src.pathData;\r\n var pathIndexes = src.pathIndexes;\r\n\r\n for (var i = 0; i < pathIndexes.length; i += 3)\r\n {\r\n var p0 = pathIndexes[i] * 2;\r\n var p1 = pathIndexes[i + 1] * 2;\r\n var p2 = pathIndexes[i + 2] * 2;\r\n\r\n var x0 = path[p0 + 0] - dx;\r\n var y0 = path[p0 + 1] - dy;\r\n var x1 = path[p1 + 0] - dx;\r\n var y1 = path[p1 + 1] - dy;\r\n var x2 = path[p2 + 0] - dx;\r\n var y2 = path[p2 + 1] - dy;\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n \r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, 0, 0, 1, 1, fillTintColor, fillTintColor, fillTintColor, pipeline.tintEffect);\r\n }\r\n};\r\n\r\nmodule.exports = FillPathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the fillStyle on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#FillStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the fill style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the fill style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar FillStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var fillColor = (altColor) ? altColor : src.fillColor;\r\n var fillAlpha = (altAlpha) ? altAlpha : src.fillAlpha;\r\n\r\n var red = ((fillColor & 0xFF0000) >>> 16);\r\n var green = ((fillColor & 0xFF00) >>> 8);\r\n var blue = (fillColor & 0xFF);\r\n\r\n ctx.fillStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + fillAlpha + ')';\r\n};\r\n\r\nmodule.exports = FillStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets the strokeStyle and lineWidth on the target context based on the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#LineStyleCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {CanvasRenderingContext2D} ctx - The context to set the stroke style on.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object to set the stroke style from.\r\n * @param {number} [altColor] - An alternative color to render with.\r\n * @param {number} [altAlpha] - An alternative alpha to render with.\r\n */\r\nvar LineStyleCanvas = function (ctx, src, altColor, altAlpha)\r\n{\r\n var strokeColor = (altColor) ? altColor : src.strokeColor;\r\n var strokeAlpha = (altAlpha) ? altAlpha : src.strokeAlpha;\r\n\r\n var red = ((strokeColor & 0xFF0000) >>> 16);\r\n var green = ((strokeColor & 0xFF00) >>> 8);\r\n var blue = (strokeColor & 0xFF);\r\n\r\n ctx.strokeStyle = 'rgba(' + red + ',' + green + ',' + blue + ',' + strokeAlpha + ')';\r\n ctx.lineWidth = src.lineWidth;\r\n};\r\n\r\nmodule.exports = LineStyleCanvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js?")},"./node_modules/phaser/src/gameobjects/shape/Shape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Line = __webpack_require__(/*! ../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Shape Game Object is a base class for the various different shapes, such as the Arc, Star or Polygon.\r\n * You cannot add a Shape directly to your Scene, it is meant as a base for your own custom Shape classes.\r\n *\r\n * @class Shape\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {string} [type] - The internal type of the Shape.\r\n * @param {any} [data] - The data of the source shape geometry, if any.\r\n */\r\nvar Shape = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Transform,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Shape (scene, type, data)\r\n {\r\n if (type === undefined) { type = \'Shape\'; }\r\n\r\n GameObject.call(this, scene, type);\r\n\r\n /**\r\n * The source Shape data. Typically a geometry object.\r\n * You should not manipulate this directly.\r\n *\r\n * @name Phaser.GameObjects.Shape#data\r\n * @type {any}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.geom = data;\r\n\r\n /**\r\n * Holds the polygon path data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathData\r\n * @type {number[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathData = [];\r\n\r\n /**\r\n * Holds the earcut polygon path index data for filled rendering.\r\n *\r\n * @name Phaser.GameObjects.Shape#pathIndexes\r\n * @type {integer[]}\r\n * @readonly\r\n * @since 3.13.0\r\n */\r\n this.pathIndexes = [];\r\n\r\n /**\r\n * The fill color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillColor = 0xffffff;\r\n\r\n /**\r\n * The fill alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#fillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillAlpha = 1;\r\n\r\n /**\r\n * The stroke color used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeColor = 0xffffff;\r\n\r\n /**\r\n * The stroke alpha value used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#strokeAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.strokeAlpha = 1;\r\n\r\n /**\r\n * The stroke line width used by this Shape.\r\n *\r\n * @name Phaser.GameObjects.Shape#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Controls if this Shape is filled or not.\r\n * Note that some Shapes do not support being filled (such as Line shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isFilled\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isFilled = false;\r\n\r\n /**\r\n * Controls if this Shape is stroked or not.\r\n * Note that some Shapes do not support being stroked (such as Iso Box shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#isStroked\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.isStroked = false;\r\n\r\n /**\r\n * Controls if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n *\r\n * @name Phaser.GameObjects.Shape#closePath\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.closePath = true;\r\n\r\n /**\r\n * Private internal value.\r\n * A Line used when parsing internal path data to avoid constant object re-creation.\r\n *\r\n * @name Phaser.GameObjects.Curve#_tempLine\r\n * @type {Phaser.Geom.Line}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._tempLine = new Line();\r\n\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be filled then call this method with no arguments, or just set `isFilled` to `false`.\r\n * \r\n * Note that some Shapes do not support fill colors, such as the Line shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled.\r\n * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (color === undefined)\r\n {\r\n this.isFilled = false;\r\n }\r\n else\r\n {\r\n this.fillColor = color;\r\n this.fillAlpha = alpha;\r\n this.isFilled = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the stroke color and alpha for this Shape.\r\n * \r\n * If you wish for the Shape to not be stroked then call this method with no arguments, or just set `isStroked` to `false`.\r\n * \r\n * Note that some Shapes do not support being stroked, such as the Iso Box shape.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setStrokeStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked.\r\n * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked.\r\n * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStrokeStyle: function (lineWidth, color, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 1; }\r\n\r\n if (lineWidth === undefined)\r\n {\r\n this.isStroked = false;\r\n }\r\n else\r\n {\r\n this.lineWidth = lineWidth;\r\n this.strokeColor = color;\r\n this.strokeAlpha = alpha;\r\n this.isStroked = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if this Shape path is closed during rendering when stroked.\r\n * Note that some Shapes are always closed when stroked (such as Ellipse shapes)\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Shape#setClosePath\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setClosePath: function (value)\r\n {\r\n this.closePath = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Shape#preDestroy\r\n * @protected\r\n * @since 3.13.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.geom = null;\r\n this._tempLine = null;\r\n this.pathData = [];\r\n this.pathIndexes = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Shape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/Shape.js?')},"./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders a stroke outline around the given Shape.\r\n *\r\n * @method Phaser.GameObjects.Shape#StrokePathWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipeline - The WebGL Pipeline used to render this Shape.\r\n * @param {Phaser.GameObjects.Shape} src - The Game Object shape being rendered in this call.\r\n * @param {number} alpha - The base alpha value.\r\n * @param {number} dx - The source displayOriginX.\r\n * @param {number} dy - The source displayOriginY.\r\n */\r\nvar StrokePathWebGL = function (pipeline, src, alpha, dx, dy)\r\n{\r\n var strokeTint = pipeline.strokeTint;\r\n var strokeTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = strokeTintColor;\r\n strokeTint.TR = strokeTintColor;\r\n strokeTint.BL = strokeTintColor;\r\n strokeTint.BR = strokeTintColor;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n var lineWidth = src.lineWidth;\r\n var halfLineWidth = lineWidth / 2;\r\n\r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n\r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n px1,\r\n py1,\r\n px2,\r\n py2,\r\n halfLineWidth,\r\n halfLineWidth,\r\n lineWidth,\r\n i - 2,\r\n (src.closePath) ? (i === pathLength - 1) : false\r\n );\r\n\r\n px1 = px2;\r\n py1 = py2;\r\n }\r\n};\r\n\r\nmodule.exports = StrokePathWebGL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcRender = __webpack_require__(/*! ./ArcRender */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GeomCircle = __webpack_require__(/*! ../../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n * \r\n * Arcs also have an `iterations` property and corresponding `setIterations` method. This allows\r\n * you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction.\r\n *\r\n * @class Arc\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Arc = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n ArcRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Arc (scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 128; }\r\n if (startAngle === undefined) { startAngle = 0; }\r\n if (endAngle === undefined) { endAngle = 360; }\r\n if (anticlockwise === undefined) { anticlockwise = false; }\r\n\r\n Shape.call(this, scene, \'Arc\', new GeomCircle(0, 0, radius));\r\n\r\n /**\r\n * Private internal value. Holds the start angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_startAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startAngle = startAngle;\r\n\r\n /**\r\n * Private internal value. Holds the end angle in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#_endAngle\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endAngle = endAngle;\r\n\r\n /**\r\n * Private internal value. Holds the winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#_anticlockwise\r\n * @type {boolean}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._anticlockwise = anticlockwise;\r\n\r\n /**\r\n * Private internal value. Holds the number of iterations used when drawing the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#_iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._iterations = 0.01;\r\n\r\n this.setPosition(x, y);\r\n\r\n var diameter = this.geom.radius * 2;\r\n this.setSize(diameter, diameter);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n *\r\n * @name Phaser.GameObjects.Arc#iterations\r\n * @type {number}\r\n * @default 0.01\r\n * @since 3.13.0\r\n */\r\n iterations: {\r\n\r\n get: function ()\r\n {\r\n return this._iterations;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._iterations = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the arc.\r\n *\r\n * @name Phaser.GameObjects.Arc#radius\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.geom.radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.geom.radius = value;\r\n\r\n var diameter = value * 2;\r\n this.setSize(diameter, diameter);\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The start angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#startAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n startAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._startAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._startAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The end angle of the arc, in degrees.\r\n *\r\n * @name Phaser.GameObjects.Arc#endAngle\r\n * @type {integer}\r\n * @since 3.13.0\r\n */\r\n endAngle: {\r\n\r\n get: function ()\r\n {\r\n return this._endAngle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._endAngle = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The winding order of the start and end angles.\r\n *\r\n * @name Phaser.GameObjects.Arc#anticlockwise\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n anticlockwise: {\r\n\r\n get: function ()\r\n {\r\n return this._anticlockwise;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._anticlockwise = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the radius of the arc.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setRadius: function (value)\r\n {\r\n this.radius = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the number of iterations used when drawing the arc.\r\n * Increase this value for smoother arcs, at the cost of more polygons being rendered.\r\n * Modify this value by small amounts, such as 0.01.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setIterations\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The value to set the iterations to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setIterations: function (value)\r\n {\r\n if (value === undefined) { value = 0.01; }\r\n\r\n this.iterations = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the starting angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setStartAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the starting angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setStartAngle: function (angle, anticlockwise)\r\n {\r\n this._startAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the ending angle of the arc, in degrees.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Arc#setEndAngle\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the ending angle to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setEndAngle: function (angle, anticlockwise)\r\n {\r\n this._endAngle = angle;\r\n\r\n if (anticlockwise !== undefined)\r\n {\r\n this._anticlockwise = anticlockwise;\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Arc#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var step = this._iterations;\r\n var iteration = step;\r\n\r\n var radius = this.geom.radius;\r\n var startAngle = DegToRad(this._startAngle);\r\n var endAngle = DegToRad(this._endAngle);\r\n var anticlockwise = this._anticlockwise;\r\n\r\n var x = radius;\r\n var y = radius;\r\n\r\n endAngle -= startAngle;\r\n\r\n if (anticlockwise)\r\n {\r\n if (endAngle < -MATH_CONST.PI2)\r\n {\r\n endAngle = -MATH_CONST.PI2;\r\n }\r\n else if (endAngle > 0)\r\n {\r\n endAngle = -MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n }\r\n else if (endAngle > MATH_CONST.PI2)\r\n {\r\n endAngle = MATH_CONST.PI2;\r\n }\r\n else if (endAngle < 0)\r\n {\r\n endAngle = MATH_CONST.PI2 + endAngle % MATH_CONST.PI2;\r\n }\r\n\r\n var path = [ x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius ];\r\n\r\n var ta;\r\n\r\n while (iteration < 1)\r\n {\r\n ta = endAngle * iteration + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n iteration += step;\r\n }\r\n\r\n ta = endAngle + startAngle;\r\n\r\n path.push(x + Math.cos(ta) * radius, y + Math.sin(ta) * radius);\r\n\r\n path.push(x + Math.cos(startAngle) * radius, y + Math.sin(startAngle) * radius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Arc;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/Arc.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DegToRad = __webpack_require__(/*! ../../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var radius = src.radius;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.arc(\r\n (radius) - src.originX * (radius * 2),\r\n (radius) - src.originY * (radius * 2),\r\n radius,\r\n DegToRad(src._startAngle),\r\n DegToRad(src._endAngle),\r\n src.anticlockwise\r\n );\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = ArcCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Arc = __webpack_require__(/*! ./Arc */ \"./node_modules/phaser/src/gameobjects/shape/arc/Arc.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Arc Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n * \r\n * The Arc Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an arc shape. You can control the start and end angles of the arc,\r\n * as well as if the angles are winding clockwise or anti-clockwise. With the default settings\r\n * it renders as a complete circle. By changing the angles you can create other arc shapes,\r\n * such as half-circles.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#arc\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the arc.\r\n * @param {integer} [startAngle=0] - The start angle of the arc, in degrees.\r\n * @param {integer} [endAngle=360] - The end angle of the arc, in degrees.\r\n * @param {boolean} [anticlockwise=false] - The winding order of the start and end angles.\r\n * @param {number} [fillColor] - The color the arc will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the arc will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('arc', function (x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, startAngle, endAngle, anticlockwise, fillColor, fillAlpha));\r\n});\r\n\r\n/**\r\n * Creates a new Circle Shape Game Object and adds it to the Scene.\r\n * \r\n * A Circle is an Arc with no defined start and end angle, making it render as a complete circle.\r\n *\r\n * Note: This method will only be available if the Arc Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#circle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [radius=128] - The radius of the circle.\r\n * @param {number} [fillColor] - The color the circle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the circle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Arc} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Arc(this.scene, x, y, radius, 0, 360, false, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./ArcWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./ArcCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js?')},"./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Arc#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Arc} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar ArcWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = ArcWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/Curve.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CurveRender = __webpack_require__(/*! ./CurveRender */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Rectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Curve\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Curve = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n CurveRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Curve (scene, x, y, curve, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Curve\', curve);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Curve#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 32;\r\n\r\n /**\r\n * Private internal value.\r\n * The Curve bounds rectangle.\r\n *\r\n * @name Phaser.GameObjects.Curve#_curveBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._curveBounds = new Rectangle();\r\n\r\n this.closePath = false;\r\n\r\n this.setPosition(x, y);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Curve#smoothness\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the curve. The number of points used when rendering it.\r\n * Increase this value for smoother curves, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Curve#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Curve#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var bounds = this._curveBounds;\r\n var smoothness = this._smoothness;\r\n\r\n // Update the bounds in case the underlying data has changed\r\n this.geom.getBounds(bounds, smoothness);\r\n\r\n this.setSize(bounds.width, bounds.height);\r\n this.updateDisplayOrigin();\r\n\r\n var path = [];\r\n var points = this.geom.getPoints(smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Curve;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/Curve.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n \r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n if (src.closePath)\r\n {\r\n ctx.closePath();\r\n }\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = CurveCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Curve = __webpack_require__(/*! ./Curve */ "./node_modules/phaser/src/gameobjects/shape/curve/Curve.js");\r\n\r\n/**\r\n * Creates a new Curve Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Curve Game Object has been built into Phaser.\r\n * \r\n * The Curve Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * To render a Curve Shape you must first create a `Phaser.Curves.Curve` object, then pass it to\r\n * the Curve Shape in the constructor.\r\n * \r\n * The Curve shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#curve\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {Phaser.Curves.Curve} [curve] - The Curve object to use to create the Shape.\r\n * @param {number} [fillColor] - The color the curve will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the curve will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Curve} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'curve\', function (x, y, curve, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Curve(this.scene, x, y, curve, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./CurveWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./CurveCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js?')},"./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Curve#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Curve} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar CurveWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX + src._curveBounds.x;\r\n var dy = src._displayOriginY + src._curveBounds.y;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = CurveWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar EllipseRender = __webpack_require__(/*! ./EllipseRender */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js");\r\nvar GeomEllipse = __webpack_require__(/*! ../../../geom/ellipse/Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @class Ellipse\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n EllipseRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Ellipse (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Ellipse\', new GeomEllipse(width / 2, height / 2, width, height));\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points used to draw the curve. Higher values create smoother renders at the cost of more triangles being drawn.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#_smoothness\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._smoothness = 64;\r\n\r\n this.setPosition(x, y);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * The smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n *\r\n * @name Phaser.GameObjects.Ellipse#smoothness\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n smoothness: {\r\n\r\n get: function ()\r\n {\r\n return this._smoothness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of the ellipse by changing the underlying geometry data, rather than scaling the object.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSize\r\n * @since 3.13.0\r\n * \r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n this.geom.setSize(width, height);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the smoothness of the ellipse. The number of points used when rendering it.\r\n * Increase this value for a smoother ellipse, at the cost of more polygons being rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#setSmoothness\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the smoothness to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setSmoothness: function (value)\r\n {\r\n this._smoothness = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.getPoints(this._smoothness);\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = EllipseCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\n\r\n/**\r\n * Creates a new Ellipse Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Ellipse Game Object has been built into Phaser.\r\n * \r\n * The Ellipse Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * When it renders it displays an ellipse shape. You can control the width and height of the ellipse.\r\n * If the width and height match it will render as a circle. If the width is less than the height,\r\n * it will look more like an egg shape.\r\n * \r\n * The Ellipse shape also has a `smoothness` property and corresponding `setSmoothness` method.\r\n * This allows you to control how smooth the shape renders in WebGL, by controlling the number of iterations\r\n * that take place during construction. Increase and decrease the default value for smoother, or more\r\n * jagged, shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#ellipse\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [height=128] - The height of the ellipse. An ellipse with equal width and height renders as a circle.\r\n * @param {number} [fillColor] - The color the ellipse will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the ellipse will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Ellipse} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'ellipse\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Ellipse(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./EllipseWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./EllipseCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js?')},"./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Ellipse#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Ellipse} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar EllipseWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = EllipseWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/Grid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GridRender = __webpack_require__(/*! ./GridRender */ "./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @class Grid\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells. See the `setOutline` method.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n */\r\nvar Grid = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n GridRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Grid (scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n if (cellWidth === undefined) { cellWidth = 32; }\r\n if (cellHeight === undefined) { cellHeight = 32; }\r\n\r\n Shape.call(this, scene, \'Grid\', null);\r\n\r\n /**\r\n * The width of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellWidth = cellWidth;\r\n\r\n /**\r\n * The height of each grid cell.\r\n * Must be a positive value.\r\n *\r\n * @name Phaser.GameObjects.Grid#cellHeight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.cellHeight = cellHeight;\r\n\r\n /**\r\n * Will the grid render its cells in the `fillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showCells = true;\r\n\r\n /**\r\n * The color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillColor = 0;\r\n\r\n /**\r\n * The alpha value for the color of the lines between each grid cell.\r\n *\r\n * @name Phaser.GameObjects.Grid#outlineFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.outlineFillAlpha = 0;\r\n\r\n /**\r\n * Will the grid display the lines between each cell when it renders?\r\n *\r\n * @name Phaser.GameObjects.Grid#showOutline\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showOutline = true;\r\n\r\n /**\r\n * Will the grid render the alternating cells in the `altFillColor`?\r\n *\r\n * @name Phaser.GameObjects.Grid#showAltCells\r\n * @type {boolean}\r\n * @since 3.13.0\r\n */\r\n this.showAltCells = false;\r\n\r\n /**\r\n * The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillColor\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillColor;\r\n\r\n /**\r\n * The alpha the alternating grid cells will be filled with.\r\n * You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @name Phaser.GameObjects.Grid#altFillAlpha\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.altFillAlpha;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n if (outlineFillColor !== undefined)\r\n {\r\n this.setOutlineStyle(outlineFillColor, outlineFillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level the grid cells will use when rendering.\r\n * \r\n * If this method is called with no values then the grid cells will not be rendered, \r\n * however the grid lines and alternating cells may still be.\r\n * \r\n * Also see the `setOutlineStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showCells = false;\r\n }\r\n else\r\n {\r\n this.fillColor = fillColor;\r\n this.fillAlpha = fillAlpha;\r\n this.showCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the alternating grid cells will use.\r\n * \r\n * If this method is called with no values then alternating grid cells will not be rendered in a different color.\r\n * \r\n * Also see the `setOutlineStyle` and `setFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setAltFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the alternating grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the alternating grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setAltFillStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showAltCells = false;\r\n }\r\n else\r\n {\r\n this.altFillColor = fillColor;\r\n this.altFillAlpha = fillAlpha;\r\n this.showAltCells = true;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill color and alpha level that the lines between each grid cell will use.\r\n * \r\n * If this method is called with no values then the grid lines will not be rendered at all, however\r\n * the cells themselves may still be if they have colors set.\r\n * \r\n * Also see the `setFillStyle` and `setAltFillStyle` methods.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Grid#setOutlineStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillColor] - The color the lines between the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha=1] - The alpha the lines between the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOutlineStyle: function (fillColor, fillAlpha)\r\n {\r\n if (fillAlpha === undefined) { fillAlpha = 1; }\r\n\r\n if (fillColor === undefined)\r\n {\r\n this.showOutline = false;\r\n }\r\n else\r\n {\r\n this.outlineFillColor = fillColor;\r\n this.outlineFillAlpha = fillAlpha;\r\n this.showOutline = true;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Grid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/Grid.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = -src._displayOriginX;\r\n var dy = -src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n FillStyleCanvas(ctx, src, src.altFillColor, src.altFillAlpha * alpha);\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n ctx.fillRect(\r\n dx + x * cellWidth,\r\n dy + y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n LineStyleCanvas(ctx, src, src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1 + dx, dy);\r\n ctx.lineTo(x1 + dx, height + dy);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(dx, y1 + dy);\r\n ctx.lineTo(dx + width, y1 + dy);\r\n\r\n ctx.stroke();\r\n }\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = GridCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Grid = __webpack_require__(/*! ./Grid */ "./node_modules/phaser/src/gameobjects/shape/grid/Grid.js");\r\n\r\n/**\r\n * Creates a new Grid Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Grid Game Object has been built into Phaser.\r\n * \r\n * The Grid Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * A Grid Shape allows you to display a grid in your game, where you can control the size of the\r\n * grid as well as the width and height of the grid cells. You can set a fill color for each grid\r\n * cell as well as an alternate fill color. When the alternate fill color is set then the grid\r\n * cells will alternate the fill colors as they render, creating a chess-board effect. You can\r\n * also optionally have an outline fill color. If set, this draws lines between the grid cells\r\n * in the given color. If you specify an outline color with an alpha of zero, then it will draw\r\n * the cells spaced out, but without the lines between them.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#grid\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the grid.\r\n * @param {number} [height=128] - The height of the grid.\r\n * @param {number} [cellWidth=32] - The width of one cell in the grid.\r\n * @param {number} [cellHeight=32] - The height of one cell in the grid.\r\n * @param {number} [fillColor] - The color the grid cells will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the grid cells will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n * @param {number} [outlineFillColor] - The color of the lines between the grid cells.\r\n * @param {number} [outlineFillAlpha] - The alpha of the lines between the grid cells.\r\n *\r\n * @return {Phaser.GameObjects.Grid} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'grid\', function (x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha)\r\n{\r\n return this.displayList.add(new Grid(this.scene, x, y, width, height, cellWidth, cellHeight, fillColor, fillAlpha, outlineFillColor, outlineFillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./GridWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./GridCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js?')},"./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Grid#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Grid} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar GridWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n calcMatrix.translate(-src._displayOriginX, -src._displayOriginY);\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n // Work out the grid size\r\n\r\n var width = src.width;\r\n var height = src.height;\r\n\r\n var cellWidth = src.cellWidth;\r\n var cellHeight = src.cellHeight;\r\n\r\n var gridWidth = Math.ceil(width / cellWidth);\r\n var gridHeight = Math.ceil(height / cellHeight);\r\n\r\n var cellWidthA = cellWidth;\r\n var cellHeightA = cellHeight;\r\n\r\n var cellWidthB = cellWidth - ((gridWidth * cellWidth) - width);\r\n var cellHeightB = cellHeight - ((gridHeight * cellHeight) - height);\r\n\r\n var fillTint;\r\n var fillTintColor;\r\n\r\n var showCells = src.showCells;\r\n var showAltCells = src.showAltCells;\r\n var showOutline = src.showOutline;\r\n\r\n var x = 0;\r\n var y = 0;\r\n var r = 0;\r\n var cw = 0;\r\n var ch = 0;\r\n\r\n if (showOutline)\r\n {\r\n // To make room for the grid lines (in case alpha < 1)\r\n cellWidthA--;\r\n cellHeightA--;\r\n\r\n if (cellWidthB === cellWidth)\r\n {\r\n cellWidthB--;\r\n }\r\n\r\n if (cellHeightB === cellHeight)\r\n {\r\n cellHeightB--;\r\n }\r\n }\r\n\r\n if (showCells && src.fillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && r)\r\n {\r\n r = 0;\r\n continue;\r\n }\r\n\r\n r++;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showAltCells && src.altFillAlpha > 0)\r\n {\r\n fillTint = pipeline.fillTint;\r\n fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.altFillColor, src.altFillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n for (y = 0; y < gridHeight; y++)\r\n {\r\n if (showAltCells)\r\n {\r\n r = y % 2;\r\n }\r\n\r\n for (x = 0; x < gridWidth; x++)\r\n {\r\n if (showAltCells && !r)\r\n {\r\n r = 1;\r\n continue;\r\n }\r\n\r\n r = 0;\r\n\r\n cw = (x < gridWidth - 1) ? cellWidthA : cellWidthB;\r\n ch = (y < gridHeight - 1) ? cellHeightA : cellHeightB;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n x * cellWidth,\r\n y * cellHeight,\r\n cw,\r\n ch\r\n );\r\n }\r\n }\r\n }\r\n\r\n if (showOutline && src.outlineFillAlpha > 0)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.outlineFillColor, src.outlineFillAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n for (x = 1; x < gridWidth; x++)\r\n {\r\n var x1 = x * cellWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(x1, 0, x1, height, 1, 1, 1, 0, false);\r\n }\r\n\r\n for (y = 1; y < gridHeight; y++)\r\n {\r\n var y1 = y * cellHeight;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(0, y1, width, y1, 1, 1, 1, 0, false);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = GridWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsoBoxRender = __webpack_require__(/*! ./IsoBoxRender */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @class IsoBox\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n */\r\nvar IsoBox = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoBoxRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoBox (scene, x, y, size, height, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoBox', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso box be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoBox#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso box will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso box.\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso box.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso box.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso box.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso box.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso box.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoBox;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, -1);\r\n ctx.lineTo(0, sizeB - 1);\r\n ctx.lineTo(-sizeA, -1);\r\n ctx.lineTo(-sizeA, -height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n \r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(-sizeA, -height);\r\n ctx.lineTo(-sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(sizeA, 0);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoBox = __webpack_require__(/*! ./IsoBox */ \"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js\");\r\n\r\n/**\r\n * Creates a new IsoBox Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoBox Game Object has been built into Phaser.\r\n * \r\n * The IsoBox Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoBox is an 'isometric' rectangle. Each face of it has a different fill color. You can set\r\n * the color of the top, left and right faces of the rectangle respectively. You can also choose\r\n * which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoBox from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isobox\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso box in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso box. The left and right faces will be this tall. The overall height of the isobox will be this value plus half the `size` value.\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso box.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso box.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso box.\r\n *\r\n * @return {Phaser.GameObjects.IsoBox} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoBox(this.scene, x, y, size, height, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoBoxWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoBoxCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoBox#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoBox} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoBoxWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n // Top Face\r\n\r\n if (src.showTop)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n x3 = calcMatrix.getX(0, sizeB - height);\r\n y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(-sizeA, -height);\r\n y3 = calcMatrix.getY(-sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n \r\n x3 = calcMatrix.getX(sizeA, -height);\r\n y3 = calcMatrix.getY(sizeA, -height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoBoxWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar IsoTriangleRender = __webpack_require__(/*! ./IsoTriangleRender */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js\");\r\nvar Shape = __webpack_require__(/*! ../Shape */ \"./node_modules/phaser/src/gameobjects/shape/Shape.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @class IsoTriangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n */\r\nvar IsoTriangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n IsoTriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function IsoTriangle (scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (size === undefined) { size = 48; }\r\n if (height === undefined) { height = 32; }\r\n if (reversed === undefined) { reversed = false; }\r\n if (fillTop === undefined) { fillTop = 0xeeeeee; }\r\n if (fillLeft === undefined) { fillLeft = 0x999999; }\r\n if (fillRight === undefined) { fillRight = 0xcccccc; }\r\n\r\n Shape.call(this, scene, 'IsoTriangle', null);\r\n\r\n /**\r\n * The projection level of the iso box. Change this to change the 'angle' at which you are looking at the box.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#projection\r\n * @type {integer}\r\n * @default 4\r\n * @since 3.13.0\r\n */\r\n this.projection = 4;\r\n\r\n /**\r\n * The color used to fill in the top of the iso triangle. This is only used if the triangle is reversed.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillTop\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillTop = fillTop;\r\n\r\n /**\r\n * The color used to fill in the left-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillLeft\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillLeft = fillLeft;\r\n\r\n /**\r\n * The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#fillRight\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.fillRight = fillRight;\r\n\r\n /**\r\n * Controls if the top-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showTop\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showTop = true;\r\n\r\n /**\r\n * Controls if the left-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showLeft\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showLeft = true;\r\n\r\n /**\r\n * Controls if the right-face of the iso triangle be rendered.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#showRight\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.13.0\r\n */\r\n this.showRight = true;\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @name Phaser.GameObjects.IsoTriangle#isReversed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.13.0\r\n */\r\n this.isReversed = reversed;\r\n\r\n this.isFilled = true;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(size, height);\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the projection level of the iso triangle. Change this to change the 'angle' at which you are looking at the pyramid.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setProjection\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The value to set the projection to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setProjection: function (value)\r\n {\r\n this.projection = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets if the iso triangle will be rendered upside down or not.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setReversed\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} reversed - Sets if the iso triangle will be rendered upside down or not.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setReversed: function (reversed)\r\n {\r\n this.isReversed = reversed;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets which faces of the iso triangle will be rendered.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFaces\r\n * @since 3.13.0\r\n * \r\n * @param {boolean} [showTop=true] - Show the top-face of the iso triangle (only if `reversed` is true)\r\n * @param {boolean} [showLeft=true] - Show the left-face of the iso triangle.\r\n * @param {boolean} [showRight=true] - Show the right-face of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFaces: function (showTop, showLeft, showRight)\r\n {\r\n if (showTop === undefined) { showTop = true; }\r\n if (showLeft === undefined) { showLeft = true; }\r\n if (showRight === undefined) { showRight = true; }\r\n\r\n this.showTop = showTop;\r\n this.showLeft = showLeft;\r\n this.showRight = showRight;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the fill colors for each face of the iso triangle.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#setFillStyle\r\n * @since 3.13.0\r\n * \r\n * @param {number} [fillTop] - The color used to fill the top of the iso triangle.\r\n * @param {number} [fillLeft] - The color used to fill in the left-facing side of the iso triangle.\r\n * @param {number} [fillRight] - The color used to fill in the right-facing side of the iso triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFillStyle: function (fillTop, fillLeft, fillRight)\r\n {\r\n this.fillTop = fillTop;\r\n this.fillLeft = fillLeft;\r\n this.fillRight = fillRight;\r\n\r\n this.isFilled = true;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = IsoTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix) && src.isFilled)\r\n {\r\n var size = src.width;\r\n var height = src.height;\r\n \r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillTop);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, -sizeB - height);\r\n ctx.lineTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB - height);\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillLeft);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(-sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(-sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n FillStyleCanvas(ctx, src, src.fillRight);\r\n\r\n ctx.beginPath();\r\n\r\n if (reversed)\r\n {\r\n ctx.moveTo(sizeA, -height);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n else\r\n {\r\n ctx.moveTo(sizeA, 0);\r\n ctx.lineTo(0, sizeB);\r\n ctx.lineTo(0, sizeB - height);\r\n }\r\n\r\n ctx.fill();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar IsoTriangle = __webpack_require__(/*! ./IsoTriangle */ \"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js\");\r\n\r\n/**\r\n * Creates a new IsoTriangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the IsoTriangle Game Object has been built into Phaser.\r\n * \r\n * The IsoTriangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only fill colors and cannot be stroked.\r\n * \r\n * An IsoTriangle is an 'isometric' triangle. Think of it like a pyramid. Each face has a different\r\n * fill color. You can set the color of the top, left and right faces of the triangle respectively\r\n * You can also choose which of the faces are rendered via the `showTop`, `showLeft` and `showRight` properties.\r\n * \r\n * You cannot view an IsoTriangle from under-neath, however you can change the 'angle' by setting\r\n * the `projection` property. The `reversed` property controls if the IsoTriangle is rendered upside\r\n * down or not.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#isotriangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [size=48] - The width of the iso triangle in pixels. The left and right faces will be exactly half this value.\r\n * @param {number} [height=32] - The height of the iso triangle. The left and right faces will be this tall. The overall height of the iso triangle will be this value plus half the `size` value.\r\n * @param {boolean} [reversed=false] - Is the iso triangle upside down?\r\n * @param {number} [fillTop=0xeeeeee] - The fill color of the top face of the iso triangle.\r\n * @param {number} [fillLeft=0x999999] - The fill color of the left face of the iso triangle.\r\n * @param {number} [fillRight=0xcccccc] - The fill color of the right face of the iso triangle.\r\n *\r\n * @return {Phaser.GameObjects.IsoTriangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('isotriangle', function (x, y, size, height, reversed, fillTop, fillLeft, fillRight)\r\n{\r\n return this.displayList.add(new IsoTriangle(this.scene, x, y, size, height, reversed, fillTop, fillLeft, fillRight));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./IsoTriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./IsoTriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.IsoTriangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.IsoTriangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar IsoTriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var size = src.width;\r\n var height = src.height;\r\n\r\n var sizeA = size / 2;\r\n var sizeB = size / src.projection;\r\n\r\n var reversed = src.isReversed;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (!src.isFilled)\r\n {\r\n return;\r\n }\r\n\r\n var tint;\r\n\r\n var x0;\r\n var y0;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n // Top Face\r\n\r\n if (src.showTop && reversed)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillTop, alpha);\r\n\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, -sizeB - height);\r\n y1 = calcMatrix.getY(0, -sizeB - height);\r\n \r\n x2 = calcMatrix.getX(sizeA, -height);\r\n y2 = calcMatrix.getY(sizeA, -height);\r\n \r\n var x3 = calcMatrix.getX(0, sizeB - height);\r\n var y3 = calcMatrix.getY(0, sizeB - height);\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n }\r\n\r\n // Left Face\r\n\r\n if (src.showLeft)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillLeft, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(-sizeA, -height);\r\n y0 = calcMatrix.getY(-sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(-sizeA, 0);\r\n y0 = calcMatrix.getY(-sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n\r\n // Right Face\r\n\r\n if (src.showRight)\r\n {\r\n tint = Utils.getTintAppendFloatAlphaAndSwap(src.fillRight, alpha);\r\n\r\n if (reversed)\r\n {\r\n x0 = calcMatrix.getX(sizeA, -height);\r\n y0 = calcMatrix.getY(sizeA, -height);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n else\r\n {\r\n x0 = calcMatrix.getX(sizeA, 0);\r\n y0 = calcMatrix.getY(sizeA, 0);\r\n \r\n x1 = calcMatrix.getX(0, sizeB);\r\n y1 = calcMatrix.getY(0, sizeB);\r\n \r\n x2 = calcMatrix.getX(0, sizeB - height);\r\n y2 = calcMatrix.getY(0, sizeB - height);\r\n }\r\n\r\n pipeline.setTexture2D();\r\n \r\n pipeline.batchTri(x0, y0, x1, y1, x2, y2, 0, 0, 1, 1, tint, tint, tint, 2);\r\n }\r\n};\r\n\r\nmodule.exports = IsoTriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomLine = __webpack_require__(/*! ../../../geom/line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar LineRender = __webpack_require__(/*! ./LineRender */ "./node_modules/phaser/src/gameobjects/shape/line/LineRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * Be aware that as with all Game Objects the default origin is 0.5. If you need to draw a Line\r\n * between two points and want the x1/y1 values to match the x/y values, then set the origin to 0.\r\n *\r\n * @class Line\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Line = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n LineRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Line (scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 128; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n Shape.call(this, scene, \'Line\', new GeomLine(x1, y1, x2, y2));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n /**\r\n * The width (or thickness) of the line.\r\n * See the setLineWidth method for extra details on changing this on WebGL.\r\n *\r\n * @name Phaser.GameObjects.Line#lineWidth\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the start width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_startWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._startWidth = 1;\r\n\r\n /**\r\n * Private internal value. Holds the end width of the line.\r\n *\r\n * @name Phaser.GameObjects.Line#_endWidth\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._endWidth = 1;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (strokeColor !== undefined)\r\n {\r\n this.setStrokeStyle(1, strokeColor, strokeAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * Sets the width of the line.\r\n * \r\n * When using the WebGL renderer you can have different start and end widths.\r\n * When using the Canvas renderer only the `startWidth` value is used. The `endWidth` is ignored.\r\n * \r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Line#setLineWidth\r\n * @since 3.13.0\r\n * \r\n * @param {number} startWidth - The start width of the line.\r\n * @param {number} [endWidth] - The end width of the line. Only used in WebGL.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setLineWidth: function (startWidth, endWidth)\r\n {\r\n if (endWidth === undefined) { endWidth = startWidth; }\r\n\r\n this._startWidth = startWidth;\r\n this._endWidth = endWidth;\r\n\r\n this.lineWidth = startWidth;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the start and end coordinates of this Line.\r\n *\r\n * @method Phaser.GameObjects.Line#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=0] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n *\r\n * @return {this} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/Line.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(src.geom.x1 - dx, src.geom.y1 - dy);\r\n ctx.lineTo(src.geom.x2 - dx, src.geom.y2 - dy);\r\n \r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = LineCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/gameobjects/shape/line/Line.js");\r\n\r\n/**\r\n * Creates a new Line Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Line Game Object has been built into Phaser.\r\n * \r\n * The Line Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports only stroke colors and cannot be filled.\r\n * \r\n * A Line Shape allows you to draw a line between two points in your game. You can control the\r\n * stroke color and thickness of the line. In WebGL only you can also specify a different\r\n * thickness for the start and end of the line, allowing you to render lines that taper-off.\r\n * \r\n * If you need to draw multiple lines in a sequence you may wish to use the Polygon Shape instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#line\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the start of the line.\r\n * @param {number} [y1=0] - The vertical position of the start of the line.\r\n * @param {number} [x2=128] - The horizontal position of the end of the line.\r\n * @param {number} [y2=0] - The vertical position of the end of the line.\r\n * @param {number} [strokeColor] - The color the line will be drawn in, i.e. 0xff0000 for red.\r\n * @param {number} [strokeAlpha] - The alpha the line will be drawn in. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Line} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'line\', function (x, y, x1, y1, x2, y2, strokeColor, strokeAlpha)\r\n{\r\n return this.displayList.add(new Line(this.scene, x, y, x1, y1, x2, y2, strokeColor, strokeAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./LineWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./LineCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineRender.js?')},"./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Line#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Line} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar LineWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isStroked)\r\n {\r\n var strokeTint = pipeline.strokeTint;\r\n var color = Utils.getTintAppendFloatAlphaAndSwap(src.strokeColor, src.strokeAlpha * alpha);\r\n\r\n strokeTint.TL = color;\r\n strokeTint.TR = color;\r\n strokeTint.BL = color;\r\n strokeTint.BR = color;\r\n\r\n var startWidth = src._startWidth;\r\n var endWidth = src._endWidth;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchLine(\r\n src.geom.x1 - dx,\r\n src.geom.y1 - dy,\r\n src.geom.x2 - dx,\r\n src.geom.y2 - dy,\r\n startWidth,\r\n endWidth,\r\n 1,\r\n 0,\r\n false,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n};\r\n\r\nmodule.exports = LineWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PolygonRender = __webpack_require__(/*! ./PolygonRender */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar GetAABB = __webpack_require__(/*! ../../../geom/polygon/GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nvar GeomPolygon = __webpack_require__(/*! ../../../geom/polygon/Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar Smooth = __webpack_require__(/*! ../../../geom/polygon/Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `\'40 0 40 20 100 20 100 80 40 80 40 100 0 50\'`\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @class Polygon\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Polygon = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n PolygonRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Polygon (scene, x, y, points, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n Shape.call(this, scene, \'Polygon\', new GeomPolygon(points));\r\n\r\n var bounds = GetAABB(this.geom);\r\n\r\n this.setPosition(x, y);\r\n this.setSize(bounds.width, bounds.height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Smooths the polygon over the number of iterations specified.\r\n * The base polygon data will be updated and replaced with the smoothed values.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Polygon#smooth\r\n * @since 3.13.0\r\n * \r\n * @param {integer} [iterations=1] - The number of times to apply the polygon smoothing.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n smooth: function (iterations)\r\n {\r\n if (iterations === undefined) { iterations = 1; }\r\n\r\n for (var i = 0; i < iterations; i++)\r\n {\r\n Smooth(this.geom);\r\n }\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Polygon#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var points = this.geom.points;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n path.push(points[i].x, points[i].y);\r\n }\r\n\r\n path.push(points[0].x, points[0].y);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = PolygonCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js");\r\n\r\n/**\r\n * Creates a new Polygon Shape Game Object and adds it to the Scene.\r\n * \r\n * Note: This method will only be available if the Polygon Game Object has been built into Phaser.\r\n * \r\n * The Polygon Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Polygon Shape is created by providing a list of points, which are then used to create an\r\n * internal Polygon geometry object. The points can be set from a variety of formats:\r\n *\r\n * - An array of Point or Vector2 objects: `[new Phaser.Math.Vec2(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n * \r\n * By default the `x` and `y` coordinates of this Shape refer to the center of it. However, depending\r\n * on the coordinates of the points provided, the final shape may be rendered offset from its origin.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#polygon\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {any} [points] - The points that make up the polygon.\r\n * @param {number} [fillColor] - The color the polygon will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the polygon will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Polygon} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'polygon\', function (x, y, points, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Polygon(this.scene, x, y, points, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./PolygonWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./PolygonCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js?')},"./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Polygon#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Polygon} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar PolygonWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = PolygonWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GeomRectangle = __webpack_require__(/*! ../../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar RectangleRender = __webpack_require__(/*! ./RectangleRender */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @class Rectangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n RectangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Rectangle (scene, x, y, width, height, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 128; }\r\n if (height === undefined) { height = 128; }\r\n\r\n Shape.call(this, scene, \'Rectangle\', new GeomRectangle(0, 0, width, height));\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var rect = this.geom;\r\n var line = this._tempLine;\r\n\r\n rect.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n rect.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n rect.getLineD(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n \r\n ctx.fillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.beginPath();\r\n\r\n ctx.rect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = RectangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Rectangle Game Object has been built into Phaser.\r\n * \r\n * The Rectangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * You can change the size of the rectangle by changing the `width` and `height` properties.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#rectangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [width=128] - The width of the rectangle.\r\n * @param {number} [height=128] - The height of the rectangle.\r\n * @param {number} [fillColor] - The color the rectangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the rectangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Rectangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'rectangle\', function (x, y, width, height, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Rectangle(this.scene, x, y, width, height, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./RectangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./RectangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Rectangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Rectangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar RectangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n \r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillRect(\r\n -dx,\r\n -dy,\r\n src.width,\r\n src.height\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = RectangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/Star.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StarRender = __webpack_require__(/*! ./StarRender */ "./node_modules/phaser/src/gameobjects/shape/star/StarRender.js");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you\'ll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how \'long\' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @class Star\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Star = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n StarRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Star (scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (points === undefined) { points = 5; }\r\n if (innerRadius === undefined) { innerRadius = 32; }\r\n if (outerRadius === undefined) { outerRadius = 64; }\r\n\r\n Shape.call(this, scene, \'Star\', null);\r\n\r\n /**\r\n * Private internal value.\r\n * The number of points in the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_points\r\n * @type {integer}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._points = points;\r\n\r\n /**\r\n * Private internal value.\r\n * The inner radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_innerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._innerRadius = innerRadius;\r\n\r\n /**\r\n * Private internal value.\r\n * The outer radius of the star.\r\n *\r\n * @name Phaser.GameObjects.Star#_outerRadius\r\n * @type {number}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._outerRadius = outerRadius;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(outerRadius * 2, outerRadius * 2);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the number of points that make up the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setPoints\r\n * @since 3.13.0\r\n * \r\n * @param {integer} value - The amount of points the Star will have.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setPoints: function (value)\r\n {\r\n this._points = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the inner radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setInnerRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the inner radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setInnerRadius: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the outer radius of the Star shape.\r\n * This call can be chained.\r\n *\r\n * @method Phaser.GameObjects.Star#setOuterRadius\r\n * @since 3.13.0\r\n * \r\n * @param {number} value - The amount to set the outer radius to.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setOuterRadius: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * The number of points that make up the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#points\r\n * @type {integer}\r\n * @default 5\r\n * @since 3.13.0\r\n */\r\n points: {\r\n\r\n get: function ()\r\n {\r\n return this._points;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._points = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The inner radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#innerRadius\r\n * @type {number}\r\n * @default 32\r\n * @since 3.13.0\r\n */\r\n innerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._innerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._innerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The outer radius of the Star shape.\r\n *\r\n * @name Phaser.GameObjects.Star#outerRadius\r\n * @type {number}\r\n * @default 64\r\n * @since 3.13.0\r\n */\r\n outerRadius: {\r\n\r\n get: function ()\r\n {\r\n return this._outerRadius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._outerRadius = value;\r\n\r\n this.updateData();\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Star#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n\r\n var points = this._points;\r\n var innerRadius = this._innerRadius;\r\n var outerRadius = this._outerRadius;\r\n\r\n var rot = Math.PI / 2 * 3;\r\n var step = Math.PI / points;\r\n\r\n // So origin 0.5 = the center of the star\r\n var x = outerRadius;\r\n var y = outerRadius;\r\n \r\n path.push(x, y + -outerRadius);\r\n\r\n for (var i = 0; i < points; i++)\r\n {\r\n path.push(x + Math.cos(rot) * outerRadius, y + Math.sin(rot) * outerRadius);\r\n\r\n rot += step;\r\n\r\n path.push(x + Math.cos(rot) * innerRadius, y + Math.sin(rot) * innerRadius);\r\n \r\n rot += step;\r\n }\r\n\r\n path.push(x, y + -outerRadius);\r\n\r\n this.pathIndexes = Earcut(path);\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Star;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/Star.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var path = src.pathData;\r\n var pathLength = path.length - 1;\r\n \r\n var px1 = path[0] - dx;\r\n var py1 = path[1] - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(px1, py1);\r\n \r\n if (!src.closePath)\r\n {\r\n pathLength -= 2;\r\n }\r\n \r\n for (var i = 2; i < pathLength; i += 2)\r\n {\r\n var px2 = path[i] - dx;\r\n var py2 = path[i + 1] - dy;\r\n \r\n ctx.lineTo(px2, py2);\r\n }\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = StarCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Star = __webpack_require__(/*! ./Star */ \"./node_modules/phaser/src/gameobjects/shape/star/Star.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Star Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Star Game Object has been built into Phaser.\r\n * \r\n * The Star Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * As the name implies, the Star shape will display a star in your game. You can control several\r\n * aspects of it including the number of points that constitute the star. The default is 5. If\r\n * you change it to 4 it will render as a diamond. If you increase them, you'll get a more spiky\r\n * star shape.\r\n * \r\n * You can also control the inner and outer radius, which is how 'long' each point of the star is.\r\n * Modify these values to create more interesting shapes.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#star\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [points=5] - The number of points on the star.\r\n * @param {number} [innerRadius=32] - The inner radius of the star.\r\n * @param {number} [outerRadius=64] - The outer radius of the star.\r\n * @param {number} [fillColor] - The color the star will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the star will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Star} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('star', function (x, y, points, innerRadius, outerRadius, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Star(this.scene, x, y, points, innerRadius, outerRadius, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js?")},"./node_modules/phaser/src/gameobjects/shape/star/StarRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StarWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StarCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarRender.js?')},"./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillPathWebGL = __webpack_require__(/*! ../FillPathWebGL */ "./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js");\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Star#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Star} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StarWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n FillPathWebGL(pipeline, calcMatrix, src, alpha, dx, dy);\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = StarWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Shape = __webpack_require__(/*! ../Shape */ "./node_modules/phaser/src/gameobjects/shape/Shape.js");\r\nvar GeomTriangle = __webpack_require__(/*! ../../../geom/triangle/Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\nvar TriangleRender = __webpack_require__(/*! ./TriangleRender */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @class Triangle\r\n * @extends Phaser.GameObjects.Shape\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.13.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n */\r\nvar Triangle = new Class({\r\n\r\n Extends: Shape,\r\n\r\n Mixins: [\r\n TriangleRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Triangle (scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 128; }\r\n if (x2 === undefined) { x2 = 64; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 128; }\r\n if (y3 === undefined) { y3 = 128; }\r\n\r\n Shape.call(this, scene, \'Triangle\', new GeomTriangle(x1, y1, x2, y2, x3, y3));\r\n\r\n var width = this.geom.right - this.geom.left;\r\n var height = this.geom.bottom - this.geom.top;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n\r\n if (fillColor !== undefined)\r\n {\r\n this.setFillStyle(fillColor, fillAlpha);\r\n }\r\n\r\n this.updateDisplayOrigin();\r\n this.updateData();\r\n },\r\n\r\n /**\r\n * Sets the data for the lines that make up this Triangle shape.\r\n *\r\n * @method Phaser.GameObjects.Triangle#setTo\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=0] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=0] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=0] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=0] - The vertical position of the third point in the triangle.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n this.geom.setTo(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.updateData();\r\n },\r\n\r\n /**\r\n * Internal method that updates the data and path values.\r\n *\r\n * @method Phaser.GameObjects.Triangle#updateData\r\n * @private\r\n * @since 3.13.0\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n updateData: function ()\r\n {\r\n var path = [];\r\n var tri = this.geom;\r\n var line = this._tempLine;\r\n\r\n tri.getLineA(line);\r\n\r\n path.push(line.x1, line.y1, line.x2, line.y2);\r\n\r\n tri.getLineB(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n tri.getLineC(line);\r\n\r\n path.push(line.x2, line.y2);\r\n\r\n this.pathData = path;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FillStyleCanvas = __webpack_require__(/*! ../FillStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js");\r\nvar LineStyleCanvas = __webpack_require__(/*! ../LineStyleCanvas */ "./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js");\r\nvar SetTransform = __webpack_require__(/*! ../../../renderer/canvas/utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js");\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderCanvas\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var ctx = renderer.currentContext;\r\n\r\n if (SetTransform(renderer, ctx, src, camera, parentMatrix))\r\n {\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n ctx.beginPath();\r\n\r\n ctx.moveTo(x1, y1);\r\n ctx.lineTo(x2, y2);\r\n ctx.lineTo(x3, y3);\r\n\r\n ctx.closePath();\r\n\r\n if (src.isFilled)\r\n {\r\n FillStyleCanvas(ctx, src);\r\n\r\n ctx.fill();\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n LineStyleCanvas(ctx, src);\r\n\r\n ctx.stroke();\r\n }\r\n\r\n // Restore the context saved in SetTransform\r\n ctx.restore();\r\n }\r\n};\r\n\r\nmodule.exports = TriangleCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ "./node_modules/phaser/src/gameobjects/GameObjectFactory.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js");\r\n\r\n/**\r\n * Creates a new Triangle Shape Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Triangle Game Object has been built into Phaser.\r\n * \r\n * The Triangle Shape is a Game Object that can be added to a Scene, Group or Container. You can\r\n * treat it like any other Game Object in your game, such as tweening it, scaling it, or enabling\r\n * it for input or physics. It provides a quick and easy way for you to render this shape in your\r\n * game without using a texture, while still taking advantage of being fully batched in WebGL.\r\n * \r\n * This shape supports both fill and stroke colors.\r\n * \r\n * The Triangle consists of 3 lines, joining up to form a triangular shape. You can control the\r\n * position of each point of these lines. The triangle is always closed and cannot have an open\r\n * face. If you require that, consider using a Polygon instead.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#triangle\r\n * @since 3.13.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of this Game Object in the world.\r\n * @param {number} [y=0] - The vertical position of this Game Object in the world.\r\n * @param {number} [x1=0] - The horizontal position of the first point in the triangle.\r\n * @param {number} [y1=128] - The vertical position of the first point in the triangle.\r\n * @param {number} [x2=64] - The horizontal position of the second point in the triangle.\r\n * @param {number} [y2=0] - The vertical position of the second point in the triangle.\r\n * @param {number} [x3=128] - The horizontal position of the third point in the triangle.\r\n * @param {number} [y3=128] - The vertical position of the third point in the triangle.\r\n * @param {number} [fillColor] - The color the triangle will be filled with, i.e. 0xff0000 for red.\r\n * @param {number} [fillAlpha] - The alpha the triangle will be filled with. You can also set the alpha of the overall Shape using its `alpha` property.\r\n *\r\n * @return {Phaser.GameObjects.Triangle} The Game Object that was created.\r\n */\r\nGameObjectFactory.register(\'triangle\', function (x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha)\r\n{\r\n return this.displayList.add(new Triangle(this.scene, x, y, x1, y1, x2, y2, x3, y3, fillColor, fillAlpha));\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TriangleWebGLRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TriangleCanvasRenderer */ "./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js?')},"./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar StrokePathWebGL = __webpack_require__(/*! ../StrokePathWebGL */ "./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js");\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Triangle#renderWebGL\r\n * @since 3.13.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Triangle} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TriangleWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n var pipeline = this.pipeline;\r\n\r\n var camMatrix = pipeline._tempMatrix1;\r\n var shapeMatrix = pipeline._tempMatrix2;\r\n var calcMatrix = pipeline._tempMatrix3;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n shapeMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n shapeMatrix.e = src.x;\r\n shapeMatrix.f = src.y;\r\n }\r\n else\r\n {\r\n shapeMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n shapeMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n }\r\n\r\n camMatrix.multiply(shapeMatrix, calcMatrix);\r\n\r\n var dx = src._displayOriginX;\r\n var dy = src._displayOriginY;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (src.isFilled)\r\n {\r\n var fillTint = pipeline.fillTint;\r\n var fillTintColor = Utils.getTintAppendFloatAlphaAndSwap(src.fillColor, src.fillAlpha * alpha);\r\n\r\n fillTint.TL = fillTintColor;\r\n fillTint.TR = fillTintColor;\r\n fillTint.BL = fillTintColor;\r\n fillTint.BR = fillTintColor;\r\n\r\n var x1 = src.geom.x1 - dx;\r\n var y1 = src.geom.y1 - dy;\r\n var x2 = src.geom.x2 - dx;\r\n var y2 = src.geom.y2 - dy;\r\n var x3 = src.geom.x3 - dx;\r\n var y3 = src.geom.y3 - dy;\r\n\r\n pipeline.setTexture2D();\r\n\r\n pipeline.batchFillTriangle(\r\n x1,\r\n y1,\r\n x2,\r\n y2,\r\n x3,\r\n y3,\r\n shapeMatrix,\r\n camMatrix\r\n );\r\n }\r\n\r\n if (src.isStroked)\r\n {\r\n StrokePathWebGL(pipeline, src, alpha, dx, dy);\r\n }\r\n};\r\n\r\nmodule.exports = TriangleWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/sprite/Sprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar SpriteRender = __webpack_require__(/*! ./SpriteRender */ "./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.TextureCrop\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar Sprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Size,\r\n Components.TextureCrop,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n SpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Sprite (scene, x, y, texture, frame)\r\n {\r\n GameObject.call(this, scene, \'Sprite\');\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Sprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Animation Controller of this Sprite.\r\n *\r\n * @name Phaser.GameObjects.Sprite#anims\r\n * @type {Phaser.GameObjects.Components.Animation}\r\n * @since 3.0.0\r\n */\r\n this.anims = new Components.Animation(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setPosition(x, y);\r\n this.setSizeToFrame();\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n },\r\n\r\n /**\r\n * Update this Sprite\'s animations.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preUpdate\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n preUpdate: function (time, delta)\r\n {\r\n this.anims.update(time, delta);\r\n },\r\n\r\n /**\r\n * Start playing the given animation.\r\n *\r\n * @method Phaser.GameObjects.Sprite#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The string-based key of the animation to play.\r\n * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call.\r\n * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} This Game Object.\r\n */\r\n play: function (key, ignoreIfPlaying, startFrame)\r\n {\r\n this.anims.play(key, ignoreIfPlaying, startFrame);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Sprite.\r\n *\r\n * @method Phaser.GameObjects.Sprite#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object.\r\n */\r\n toJSON: function ()\r\n {\r\n var data = Components.ToJSON(this);\r\n\r\n // Extra Sprite data is added here\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Handles the pre-destroy step for the Sprite, which removes the Animation component.\r\n *\r\n * @method Phaser.GameObjects.Sprite#preDestroy\r\n * @private\r\n * @since 3.14.0\r\n */\r\n preDestroy: function ()\r\n {\r\n this.anims.destroy();\r\n\r\n this.anims = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Sprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/Sprite.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ "./node_modules/phaser/src/gameobjects/BuildGameObject.js");\r\nvar BuildGameObjectAnimation = __webpack_require__(/*! ../BuildGameObjectAnimation */ "./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register(\'sprite\', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetAdvancedValue(config, \'key\', null);\r\n var frame = GetAdvancedValue(config, \'frame\', null);\r\n\r\n var sprite = new Sprite(this.scene, 0, 0, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, sprite, config);\r\n\r\n // Sprite specific config options:\r\n\r\n BuildGameObjectAnimation(sprite, config);\r\n\r\n return sprite;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar Sprite = __webpack_require__(/*! ./Sprite */ \"./node_modules/phaser/src/gameobjects/sprite/Sprite.js\");\r\n\r\n/**\r\n * Creates a new Sprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Sprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.Sprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('sprite', function (x, y, key, frame)\r\n{\r\n var sprite = new Sprite(this.scene, x, y, key, frame);\r\n\r\n this.displayList.add(sprite);\r\n this.updateList.add(sprite);\r\n\r\n return sprite;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./SpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./SpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js?')},"./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Sprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Sprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar SpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n this.pipeline.batchSprite(src, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = SpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/GetTextSize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns an object containing dimensions of the Text object.\r\n *\r\n * @function Phaser.GameObjects.Text.GetTextSize\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object to calculate the size from.\r\n * @param {Phaser.Types.GameObjects.Text.TextMetrics} size - The Text metrics to use when calculating the size.\r\n * @param {array} lines - The lines of text to calculate the size from.\r\n *\r\n * @return {object} An object containing dimensions of the Text object.\r\n */\r\nvar GetTextSize = function (text, size, lines)\r\n{\r\n var canvas = text.canvas;\r\n var context = text.context;\r\n var style = text.style;\r\n\r\n var lineWidths = [];\r\n var maxLineWidth = 0;\r\n var drawnLines = lines.length;\r\n\r\n if (style.maxLines > 0 && style.maxLines < lines.length)\r\n {\r\n drawnLines = style.maxLines;\r\n }\r\n\r\n style.syncFont(canvas, context);\r\n\r\n // Text Width\r\n\r\n for (var i = 0; i < drawnLines; i++)\r\n {\r\n var lineWidth = style.strokeThickness;\r\n\r\n lineWidth += context.measureText(lines[i]).width;\r\n\r\n // Adjust for wrapped text\r\n if (style.wordWrap)\r\n {\r\n lineWidth -= context.measureText(' ').width;\r\n }\r\n\r\n lineWidths[i] = Math.ceil(lineWidth);\r\n maxLineWidth = Math.max(maxLineWidth, lineWidths[i]);\r\n }\r\n\r\n // Text Height\r\n\r\n var lineHeight = size.fontSize + style.strokeThickness;\r\n var height = lineHeight * drawnLines;\r\n var lineSpacing = text.lineSpacing;\r\n\r\n // Adjust for line spacing\r\n if (drawnLines > 1)\r\n {\r\n height += lineSpacing * (drawnLines - 1);\r\n }\r\n\r\n return {\r\n width: maxLineWidth,\r\n height: height,\r\n lines: drawnLines,\r\n lineWidths: lineWidths,\r\n lineSpacing: lineSpacing,\r\n lineHeight: lineHeight\r\n };\r\n};\r\n\r\nmodule.exports = GetTextSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/GetTextSize.js?")},"./node_modules/phaser/src/gameobjects/text/MeasureText.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\n\r\n/**\r\n * Calculates the ascent, descent and fontSize of a given font style.\r\n *\r\n * @function Phaser.GameObjects.Text.MeasureText\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure.\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} An object containing the ascent, descent and fontSize of the TextStyle.\r\n */\r\nvar MeasureText = function (textStyle)\r\n{\r\n // @property {HTMLCanvasElement} canvas - The canvas element that the text is rendered.\r\n var canvas = CanvasPool.create(this);\r\n\r\n // @property {HTMLCanvasElement} context - The context of the canvas element that the text is rendered to.\r\n var context = canvas.getContext('2d');\r\n\r\n textStyle.syncFont(canvas, context);\r\n\r\n var width = Math.ceil(context.measureText(textStyle.testString).width * textStyle.baselineX);\r\n var baseline = width;\r\n var height = 2 * baseline;\r\n\r\n baseline = baseline * textStyle.baselineY | 0;\r\n\r\n canvas.width = width;\r\n canvas.height = height;\r\n\r\n context.fillStyle = '#f00';\r\n context.fillRect(0, 0, width, height);\r\n\r\n context.font = textStyle._font;\r\n\r\n context.textBaseline = 'alphabetic';\r\n context.fillStyle = '#000';\r\n context.fillText(textStyle.testString, 0, baseline);\r\n\r\n var output = {\r\n ascent: 0,\r\n descent: 0,\r\n fontSize: 0\r\n };\r\n\r\n if (!context.getImageData(0, 0, width, height))\r\n {\r\n output.ascent = baseline;\r\n output.descent = baseline + 6;\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n }\r\n\r\n var imagedata = context.getImageData(0, 0, width, height).data;\r\n var pixels = imagedata.length;\r\n var line = width * 4;\r\n var i;\r\n var j;\r\n var idx = 0;\r\n var stop = false;\r\n\r\n // ascent. scan from top to bottom until we find a non red pixel\r\n for (i = 0; i < baseline; i++)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx += line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.ascent = baseline - i;\r\n\r\n idx = pixels - line;\r\n stop = false;\r\n\r\n // descent. scan from bottom to top until we find a non red pixel\r\n for (i = height; i > baseline; i--)\r\n {\r\n for (j = 0; j < line; j += 4)\r\n {\r\n if (imagedata[idx + j] !== 255)\r\n {\r\n stop = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!stop)\r\n {\r\n idx -= line;\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n\r\n output.descent = (i - baseline);\r\n output.fontSize = output.ascent + output.descent;\r\n\r\n CanvasPool.remove(canvas);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MeasureText;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/MeasureText.js?")},"./node_modules/phaser/src/gameobjects/text/TextStyle.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MeasureText = __webpack_require__(/*! ./MeasureText */ \"./node_modules/phaser/src/gameobjects/text/MeasureText.js\");\r\n\r\n// Key: [ Object Key, Default Value ]\r\n\r\nvar propertyMap = {\r\n fontFamily: [ 'fontFamily', 'Courier' ],\r\n fontSize: [ 'fontSize', '16px' ],\r\n fontStyle: [ 'fontStyle', '' ],\r\n backgroundColor: [ 'backgroundColor', null ],\r\n color: [ 'color', '#fff' ],\r\n stroke: [ 'stroke', '#fff' ],\r\n strokeThickness: [ 'strokeThickness', 0 ],\r\n shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n shadowColor: [ 'shadow.color', '#000' ],\r\n shadowBlur: [ 'shadow.blur', 0 ],\r\n shadowStroke: [ 'shadow.stroke', false ],\r\n shadowFill: [ 'shadow.fill', false ],\r\n align: [ 'align', 'left' ],\r\n maxLines: [ 'maxLines', 0 ],\r\n fixedWidth: [ 'fixedWidth', 0 ],\r\n fixedHeight: [ 'fixedHeight', 0 ],\r\n resolution: [ 'resolution', 0 ],\r\n rtl: [ 'rtl', false ],\r\n testString: [ 'testString', '|MÉqgy' ],\r\n baselineX: [ 'baselineX', 1.2 ],\r\n baselineY: [ 'baselineY', 1.4 ],\r\n wordWrapWidth: [ 'wordWrap.width', null ],\r\n wordWrapCallback: [ 'wordWrap.callback', null ],\r\n wordWrapCallbackScope: [ 'wordWrap.callbackScope', null ],\r\n wordWrapUseAdvanced: [ 'wordWrap.useAdvancedWrap', false ]\r\n};\r\n\r\n/**\r\n * @classdesc\r\n * A TextStyle class manages all of the style settings for a Text object.\r\n * \r\n * Text Game Objects create a TextStyle instance automatically, which is\r\n * accessed via the `Text.style` property. You do not normally need to\r\n * instantiate one yourself.\r\n *\r\n * @class TextStyle\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Text} text - The Text object that this TextStyle is styling.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n */\r\nvar TextStyle = new Class({\r\n\r\n initialize:\r\n\r\n function TextStyle (text, style)\r\n {\r\n /**\r\n * The Text object that this TextStyle is styling.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#parent\r\n * @type {Phaser.GameObjects.Text}\r\n * @since 3.0.0\r\n */\r\n this.parent = text;\r\n\r\n /**\r\n * The font family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontFamily\r\n * @type {string}\r\n * @default 'Courier'\r\n * @since 3.0.0\r\n */\r\n this.fontFamily;\r\n\r\n /**\r\n * The font size.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontSize\r\n * @type {string}\r\n * @default '16px'\r\n * @since 3.0.0\r\n */\r\n this.fontSize;\r\n\r\n /**\r\n * The font style.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fontStyle\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.fontStyle;\r\n\r\n /**\r\n * The background color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#backgroundColor\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.backgroundColor;\r\n\r\n /**\r\n * The text fill color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#color\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.color;\r\n\r\n /**\r\n * The text stroke color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#stroke\r\n * @type {string}\r\n * @default '#fff'\r\n * @since 3.0.0\r\n */\r\n this.stroke;\r\n\r\n /**\r\n * The text stroke thickness.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#strokeThickness\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.strokeThickness;\r\n\r\n /**\r\n * The horizontal shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetX;\r\n\r\n /**\r\n * The vertical shadow offset.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowOffsetY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowOffsetY;\r\n\r\n /**\r\n * The shadow color.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowColor\r\n * @type {string}\r\n * @default '#000'\r\n * @since 3.0.0\r\n */\r\n this.shadowColor;\r\n\r\n /**\r\n * The shadow blur radius.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowBlur\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.shadowBlur;\r\n\r\n /**\r\n * Whether shadow stroke is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowStroke\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowStroke;\r\n\r\n /**\r\n * Whether shadow fill is enabled or not.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#shadowFill\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shadowFill;\r\n\r\n /**\r\n * The text alignment.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#align\r\n * @type {string}\r\n * @default 'left'\r\n * @since 3.0.0\r\n */\r\n this.align;\r\n\r\n /**\r\n * The maximum number of lines to draw.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#maxLines\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxLines;\r\n\r\n /**\r\n * The fixed width of the text.\r\n *\r\n * `0` means no fixed with.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedWidth\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedWidth;\r\n\r\n /**\r\n * The fixed height of the text.\r\n *\r\n * `0` means no fixed height.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#fixedHeight\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.fixedHeight;\r\n\r\n /**\r\n * The resolution the text is rendered to its internal canvas at.\r\n * The default is 0, which means it will use the resolution set in the Game Config.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#resolution\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.resolution;\r\n\r\n /**\r\n * Whether the text should render right to left.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#rtl\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rtl;\r\n\r\n /**\r\n * The test string to use when measuring the font.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#testString\r\n * @type {string}\r\n * @default '|MÉqgy'\r\n * @since 3.0.0\r\n */\r\n this.testString;\r\n\r\n /**\r\n * The amount of horizontal padding added to the width of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineX\r\n * @type {number}\r\n * @default 1.2\r\n * @since 3.3.0\r\n */\r\n this.baselineX;\r\n\r\n /**\r\n * The amount of vertical padding added to the height of the text when calculating the font metrics.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#baselineY\r\n * @type {number}\r\n * @default 1.4\r\n * @since 3.3.0\r\n */\r\n this.baselineY;\r\n\r\n /**\r\n * The font style, size and family.\r\n *\r\n * @name Phaser.GameObjects.TextStyle#_font\r\n * @type {string}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._font;\r\n\r\n // Set to defaults + user style\r\n this.setStyle(style, false, true);\r\n\r\n var metrics = GetValue(style, 'metrics', false);\r\n\r\n // Provide optional TextMetrics in the style object to avoid the canvas look-up / scanning\r\n // Doing this is reset if you then change the font of this TextStyle after creation\r\n if (metrics)\r\n {\r\n this.metrics = {\r\n ascent: GetValue(metrics, 'ascent', 0),\r\n descent: GetValue(metrics, 'descent', 0),\r\n fontSize: GetValue(metrics, 'fontSize', 0)\r\n };\r\n }\r\n else\r\n {\r\n this.metrics = MeasureText(this);\r\n }\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The style settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n * @param {boolean} [setDefaults=false] - Use the default values is not set, or the local values.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStyle: function (style, updateText, setDefaults)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n if (setDefaults === undefined) { setDefaults = false; }\r\n\r\n // Avoid type mutation\r\n if (style && style.hasOwnProperty('fontSize') && typeof style.fontSize === 'number')\r\n {\r\n style.fontSize = style.fontSize.toString() + 'px';\r\n }\r\n\r\n for (var key in propertyMap)\r\n {\r\n var value = (setDefaults) ? propertyMap[key][1] : this[key];\r\n\r\n if (key === 'wordWrapCallback' || key === 'wordWrapCallbackScope')\r\n {\r\n // Callback & scope should be set without processing the values\r\n this[key] = GetValue(style, propertyMap[key][0], value);\r\n }\r\n else\r\n {\r\n this[key] = GetAdvancedValue(style, propertyMap[key][0], value);\r\n }\r\n }\r\n\r\n // Allow for 'font' override\r\n var font = GetValue(style, 'font', null);\r\n\r\n if (font !== null)\r\n {\r\n this.setFont(font, false);\r\n }\r\n\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n // Allow for 'fill' to be used in place of 'color'\r\n var fill = GetValue(style, 'fill', null);\r\n\r\n if (fill !== null)\r\n {\r\n this.color = fill;\r\n }\r\n\r\n if (updateText)\r\n {\r\n return this.update(true);\r\n }\r\n else\r\n {\r\n return this.parent;\r\n }\r\n },\r\n\r\n /**\r\n * Synchronize the font settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncFont\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncFont: function (canvas, context)\r\n {\r\n context.font = this._font;\r\n },\r\n\r\n /**\r\n * Synchronize the text style settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncStyle\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The Canvas Element.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n */\r\n syncStyle: function (canvas, context)\r\n {\r\n context.textBaseline = 'alphabetic';\r\n\r\n context.fillStyle = this.color;\r\n context.strokeStyle = this.stroke;\r\n\r\n context.lineWidth = this.strokeThickness;\r\n context.lineCap = 'round';\r\n context.lineJoin = 'round';\r\n },\r\n\r\n /**\r\n * Synchronize the shadow settings to the given Canvas Rendering Context.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#syncShadow\r\n * @since 3.0.0\r\n *\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {boolean} enabled - Whether shadows are enabled or not.\r\n */\r\n syncShadow: function (context, enabled)\r\n {\r\n if (enabled)\r\n {\r\n context.shadowOffsetX = this.shadowOffsetX;\r\n context.shadowOffsetY = this.shadowOffsetY;\r\n context.shadowColor = this.shadowColor;\r\n context.shadowBlur = this.shadowBlur;\r\n }\r\n else\r\n {\r\n context.shadowOffsetX = 0;\r\n context.shadowOffsetY = 0;\r\n context.shadowColor = 0;\r\n context.shadowBlur = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Update the style settings for the parent Text object.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#update\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n update: function (recalculateMetrics)\r\n {\r\n if (recalculateMetrics)\r\n {\r\n this._font = [ this.fontStyle, this.fontSize, this.fontFamily ].join(' ').trim();\r\n\r\n this.metrics = MeasureText(this);\r\n }\r\n\r\n return this.parent.updateText();\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {(string|object)} font - The font family or font settings to set.\r\n * @param {boolean} [updateText=true] - Whether to update the text immediately.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFont: function (font, updateText)\r\n {\r\n if (updateText === undefined) { updateText = true; }\r\n\r\n var fontFamily = font;\r\n var fontSize = '';\r\n var fontStyle = '';\r\n\r\n if (typeof font !== 'string')\r\n {\r\n fontFamily = GetValue(font, 'fontFamily', 'Courier');\r\n fontSize = GetValue(font, 'fontSize', '16px');\r\n fontStyle = GetValue(font, 'fontStyle', '');\r\n }\r\n else\r\n {\r\n var fontSplit = font.split(' ');\r\n\r\n var i = 0;\r\n\r\n fontStyle = (fontSplit.length > 2) ? fontSplit[i++] : '';\r\n fontSize = fontSplit[i++] || '16px';\r\n fontFamily = fontSplit[i++] || 'Courier';\r\n }\r\n\r\n if (fontFamily !== this.fontFamily || fontSize !== this.fontSize || fontStyle !== this.fontStyle)\r\n {\r\n this.fontFamily = fontFamily;\r\n this.fontSize = fontSize;\r\n this.fontStyle = fontStyle;\r\n\r\n if (updateText)\r\n {\r\n this.update(true);\r\n }\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n if (this.fontFamily !== family)\r\n {\r\n this.fontFamily = family;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n if (this.fontStyle !== style)\r\n {\r\n this.fontStyle = style;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {(number|string)} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n if (typeof size === 'number')\r\n {\r\n size = size.toString() + 'px';\r\n }\r\n\r\n if (this.fontSize !== size)\r\n {\r\n this.fontSize = size;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the test string to use when measuring the font.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setTestString\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The test string to use when measuring the font.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setTestString: function (string)\r\n {\r\n this.testString = string;\r\n\r\n return this.update(true);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set.\r\n * @param {number} height - The fixed height to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n this.fixedWidth = width;\r\n this.fixedHeight = height;\r\n\r\n if (width)\r\n {\r\n this.parent.width = width;\r\n }\r\n\r\n if (height)\r\n {\r\n this.parent.height = height;\r\n }\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n this.backgroundColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setFill: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n this.color = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the resolution used by the Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method. It allows for much clearer text on High DPI devices,\r\n * at the cost of memory because it uses larger internal Canvas textures for the Text.\r\n * \r\n * Please use with caution, as the more high res Text you have, the more memory it uses up.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n this.resolution = value;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n if (thickness === undefined) { thickness = this.strokeThickness; }\r\n\r\n if (color === undefined && this.strokeThickness !== 0)\r\n {\r\n // Reset the stroke to zero (disabling it)\r\n this.strokeThickness = 0;\r\n\r\n this.update(true);\r\n }\r\n else if (this.stroke !== color || this.strokeThickness !== thickness)\r\n {\r\n this.stroke = color;\r\n this.strokeThickness = thickness;\r\n\r\n this.update(true);\r\n }\r\n\r\n return this.parent;\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n * \r\n * Calling this method always re-measures the parent Text object,\r\n * so only call it when you actually change the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (color === undefined) { color = '#000'; }\r\n if (blur === undefined) { blur = 0; }\r\n if (shadowStroke === undefined) { shadowStroke = false; }\r\n if (shadowFill === undefined) { shadowFill = true; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n this.shadowColor = color;\r\n this.shadowBlur = blur;\r\n this.shadowStroke = shadowStroke;\r\n this.shadowFill = shadowFill;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.shadowOffsetX = x;\r\n this.shadowOffsetY = y;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} [color='#000'] - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n if (color === undefined) { color = '#000'; }\r\n\r\n this.shadowColor = color;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n if (blur === undefined) { blur = 0; }\r\n\r\n this.shadowBlur = blur;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n this.shadowStroke = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n this.shadowFill = enabled;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n if (useAdvancedWrap === undefined) { useAdvancedWrap = false; }\r\n\r\n this.wordWrapWidth = width;\r\n this.wordWrapUseAdvanced = useAdvancedWrap;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines.\r\n *\r\n * Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n if (scope === undefined) { scope = null; }\r\n\r\n this.wordWrapCallback = callback;\r\n this.wordWrapCallbackScope = scope;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n if (align === undefined) { align = 'left'; }\r\n\r\n this.align = align;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} The parent Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n if (max === undefined) { max = 0; }\r\n\r\n this.maxLines = max;\r\n\r\n return this.update(false);\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.Text.TextMetrics} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n var metrics = this.metrics;\r\n\r\n return {\r\n ascent: metrics.ascent,\r\n descent: metrics.descent,\r\n fontSize: metrics.fontSize\r\n };\r\n },\r\n\r\n /**\r\n * Build a JSON representation of this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {object} A JSON representation of this Text Style.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {};\r\n\r\n for (var key in propertyMap)\r\n {\r\n output[key] = this[key];\r\n }\r\n\r\n output.metrics = this.getTextMetrics();\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Destroy this Text Style.\r\n *\r\n * @method Phaser.GameObjects.TextStyle#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.parent = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextStyle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/TextStyle.js?")},"./node_modules/phaser/src/gameobjects/text/static/Text.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AddToDOM = __webpack_require__(/*! ../../../dom/AddToDOM */ \"./node_modules/phaser/src/dom/AddToDOM.js\");\r\nvar CanvasPool = __webpack_require__(/*! ../../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar GetTextSize = __webpack_require__(/*! ../GetTextSize */ \"./node_modules/phaser/src/gameobjects/text/GetTextSize.js\");\r\nvar GetValue = __webpack_require__(/*! ../../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar RemoveFromDOM = __webpack_require__(/*! ../../../dom/RemoveFromDOM */ \"./node_modules/phaser/src/dom/RemoveFromDOM.js\");\r\nvar TextRender = __webpack_require__(/*! ./TextRender */ \"./node_modules/phaser/src/gameobjects/text/static/TextRender.js\");\r\nvar TextStyle = __webpack_require__(/*! ../TextStyle */ \"./node_modules/phaser/src/gameobjects/text/TextStyle.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either\r\n * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: '\"Roboto Condensed\"' });\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, \"Times New Roman\", Tahoma, serif' });\r\n * ```\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * @class Text\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object.\r\n */\r\nvar Text = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TextRender\r\n ],\r\n\r\n initialize:\r\n\r\n function Text (scene, x, y, text, style)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n GameObject.call(this, scene, 'Text');\r\n\r\n /**\r\n * The renderer in use by this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.12.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n this.setPosition(x, y);\r\n this.setOrigin(0, 0);\r\n this.initPipeline();\r\n\r\n /**\r\n * The canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = CanvasPool.create(this);\r\n\r\n /**\r\n * The context of the canvas element that the text is rendered to.\r\n *\r\n * @name Phaser.GameObjects.Text#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context = this.canvas.getContext('2d');\r\n\r\n /**\r\n * The Text Style object.\r\n *\r\n * Manages the style of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#style\r\n * @type {Phaser.GameObjects.TextStyle}\r\n * @since 3.0.0\r\n */\r\n this.style = new TextStyle(this, style);\r\n\r\n /**\r\n * Whether to automatically round line positions.\r\n *\r\n * @name Phaser.GameObjects.Text#autoRound\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.autoRound = true;\r\n\r\n /**\r\n * The Regular Expression that is used to split the text up into lines, in\r\n * multi-line text. By default this is `/(?:\\r\\n|\\r|\\n)/`.\r\n * You can change this RegExp to be anything else that you may need.\r\n *\r\n * @name Phaser.GameObjects.Text#splitRegExp\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.splitRegExp = /(?:\\r\\n|\\r|\\n)/;\r\n\r\n /**\r\n * The text to display.\r\n *\r\n * @name Phaser.GameObjects.Text#_text\r\n * @type {string}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._text = undefined;\r\n\r\n /**\r\n * Specify a padding value which is added to the line width and height when calculating the Text size.\r\n * Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions.\r\n *\r\n * @name Phaser.GameObjects.Text#padding\r\n * @type {{left:number,right:number,top:number,bottom:number}}\r\n * @since 3.0.0\r\n */\r\n this.padding = { left: 0, right: 0, top: 0, bottom: 0 };\r\n\r\n /**\r\n * The width of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#width\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.width = 1;\r\n\r\n /**\r\n * The height of this Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#height\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.height = 1;\r\n\r\n /**\r\n * The line spacing value.\r\n * This value is added to the font height to calculate the overall line height.\r\n * Only has an effect if this Text object contains multiple lines of text.\r\n * \r\n * If you update this property directly, instead of using the `setLineSpacing` method, then\r\n * be sure to call `updateText` after, or you won't see the change reflected in the Text object.\r\n *\r\n * @name Phaser.GameObjects.Text#lineSpacing\r\n * @type {number}\r\n * @since 3.13.0\r\n */\r\n this.lineSpacing = 0;\r\n\r\n /**\r\n * Whether the text or its settings have changed and need updating.\r\n *\r\n * @name Phaser.GameObjects.Text#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n // If resolution wasn't set, then we get it from the game config\r\n if (this.style.resolution === 0)\r\n {\r\n this.style.resolution = scene.sys.game.config.resolution;\r\n }\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.Text#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n // Create a Texture for this Text object\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n // Get the frame\r\n this.frame = this.texture.get();\r\n\r\n // Set the resolution\r\n this.frame.source.resolution = this.style.resolution;\r\n\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n // Clear the default 1x1 glTexture, as we override it later\r\n this.renderer.deleteTexture(this.frame.source.glTexture);\r\n\r\n this.frame.source.glTexture = null;\r\n }\r\n\r\n this.initRTL();\r\n\r\n this.setText(text);\r\n\r\n if (style && style.padding)\r\n {\r\n this.setPadding(style.padding);\r\n }\r\n\r\n if (style && style.lineSpacing)\r\n {\r\n this.lineSpacing = style.lineSpacing;\r\n }\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.dirty = true;\r\n }, this);\r\n },\r\n\r\n /**\r\n * Initialize right to left text.\r\n *\r\n * @method Phaser.GameObjects.Text#initRTL\r\n * @since 3.0.0\r\n */\r\n initRTL: function ()\r\n {\r\n if (!this.style.rtl)\r\n {\r\n return;\r\n }\r\n\r\n // Here is where the crazy starts.\r\n //\r\n // Due to browser implementation issues, you cannot fillText BiDi text to a canvas\r\n // that is not part of the DOM. It just completely ignores the direction property.\r\n\r\n this.canvas.dir = 'rtl';\r\n\r\n // Experimental atm, but one day ...\r\n this.context.direction = 'rtl';\r\n\r\n // Add it to the DOM, but hidden within the parent canvas.\r\n this.canvas.style.display = 'none';\r\n\r\n AddToDOM(this.canvas, this.scene.sys.canvas);\r\n\r\n // And finally we set the x origin\r\n this.originX = 1;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds.\r\n *\r\n * @method Phaser.GameObjects.Text#runWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n *\r\n * @return {string} The text after wrapping has been applied.\r\n */\r\n runWordWrap: function (text)\r\n {\r\n var style = this.style;\r\n\r\n if (style.wordWrapCallback)\r\n {\r\n var wrappedLines = style.wordWrapCallback.call(style.wordWrapCallbackScope, text, this);\r\n\r\n if (Array.isArray(wrappedLines))\r\n {\r\n wrappedLines = wrappedLines.join('\\n');\r\n }\r\n\r\n return wrappedLines;\r\n }\r\n else if (style.wordWrapWidth)\r\n {\r\n if (style.wordWrapUseAdvanced)\r\n {\r\n return this.advancedWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n else\r\n {\r\n return this.basicWordWrap(text, this.context, this.style.wordWrapWidth);\r\n }\r\n }\r\n else\r\n {\r\n return text;\r\n }\r\n },\r\n\r\n /**\r\n * Advanced wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Consecutive spaces will be collapsed and replaced with a single space. Lines will be\r\n * trimmed of white space before processing. Throws an error if wordWrapWidth is less than a\r\n * single character.\r\n *\r\n * @method Phaser.GameObjects.Text#advancedWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n advancedWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var output = '';\r\n\r\n // Condense consecutive spaces and split into lines\r\n var lines = text\r\n .replace(/ +/gi, ' ')\r\n .split(this.splitRegExp);\r\n\r\n var linesCount = lines.length;\r\n\r\n for (var i = 0; i < linesCount; i++)\r\n {\r\n var line = lines[i];\r\n var out = '';\r\n\r\n // Trim whitespace\r\n line = line.replace(/^ *|\\s*$/gi, '');\r\n\r\n // If entire line is less than wordWrapWidth append the entire line and exit early\r\n var lineWidth = context.measureText(line).width;\r\n\r\n if (lineWidth < wordWrapWidth)\r\n {\r\n output += line + '\\n';\r\n continue;\r\n }\r\n\r\n // Otherwise, calculate new lines\r\n var currentLineWidth = wordWrapWidth;\r\n\r\n // Split into words\r\n var words = line.split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var word = words[j];\r\n var wordWithSpace = word + ' ';\r\n var wordWidth = context.measureText(wordWithSpace).width;\r\n\r\n if (wordWidth > currentLineWidth)\r\n {\r\n // Break word\r\n if (j === 0)\r\n {\r\n // Shave off letters from word until it's small enough\r\n var newWord = wordWithSpace;\r\n\r\n while (newWord.length)\r\n {\r\n newWord = newWord.slice(0, -1);\r\n wordWidth = context.measureText(newWord).width;\r\n\r\n if (wordWidth <= currentLineWidth)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n // If wordWrapWidth is too small for even a single letter, shame user\r\n // failure with a fatal error\r\n if (!newWord.length)\r\n {\r\n throw new Error('This text\\'s wordWrapWidth setting is less than a single character!');\r\n }\r\n\r\n // Replace current word in array with remainder\r\n var secondPart = word.substr(newWord.length);\r\n\r\n words[j] = secondPart;\r\n\r\n // Append first piece to output\r\n out += newWord;\r\n }\r\n\r\n // If existing word length is 0, don't include it\r\n var offset = (words[j].length) ? j : j + 1;\r\n\r\n // Collapse rest of sentence and remove any trailing white space\r\n var remainder = words.slice(offset).join(' ')\r\n .replace(/[ \\n]*$/gi, '');\r\n\r\n // Prepend remainder to next line\r\n lines[i + 1] = remainder + ' ' + (lines[i + 1] || '');\r\n linesCount = lines.length;\r\n\r\n break; // Processing on this line\r\n\r\n // Append word with space to output\r\n }\r\n else\r\n {\r\n out += wordWithSpace;\r\n currentLineWidth -= wordWidth;\r\n }\r\n }\r\n\r\n // Append processed line to output\r\n output += out.replace(/[ \\n]*$/gi, '') + '\\n';\r\n }\r\n\r\n // Trim the end of the string\r\n output = output.replace(/[\\s|\\n]*$/gi, '');\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal\r\n * bounds. Spaces are not collapsed and whitespace is not trimmed.\r\n *\r\n * @method Phaser.GameObjects.Text#basicWordWrap\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text to perform word wrap detection against.\r\n * @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.\r\n * @param {number} wordWrapWidth - The word wrap width.\r\n *\r\n * @return {string} The wrapped text.\r\n */\r\n basicWordWrap: function (text, context, wordWrapWidth)\r\n {\r\n var result = '';\r\n var lines = text.split(this.splitRegExp);\r\n\r\n for (var i = 0; i < lines.length; i++)\r\n {\r\n var spaceLeft = wordWrapWidth;\r\n var words = lines[i].split(' ');\r\n\r\n for (var j = 0; j < words.length; j++)\r\n {\r\n var wordWidth = context.measureText(words[j]).width;\r\n var wordWidthWithSpace = wordWidth + context.measureText(' ').width;\r\n\r\n if (wordWidthWithSpace > spaceLeft)\r\n {\r\n // Skip printing the newline if it's the first word of the line that is greater\r\n // than the word wrap width.\r\n if (j > 0)\r\n {\r\n result += '\\n';\r\n }\r\n\r\n result += words[j] + ' ';\r\n spaceLeft = wordWrapWidth - wordWidthWithSpace;\r\n }\r\n else\r\n {\r\n spaceLeft -= wordWidthWithSpace;\r\n result += words[j];\r\n\r\n if (j < (words.length - 1))\r\n {\r\n result += ' ';\r\n }\r\n }\r\n }\r\n\r\n if (i < lines.length - 1)\r\n {\r\n result += '\\n';\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Runs the given text through this Text objects word wrapping and returns the results as an\r\n * array, where each element of the array corresponds to a wrapped line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#getWrappedText\r\n * @since 3.0.0\r\n *\r\n * @param {string} text - The text for which the wrapping will be calculated. If unspecified, the Text objects current text will be used.\r\n *\r\n * @return {string[]} An array of strings with the pieces of wrapped text.\r\n */\r\n getWrappedText: function (text)\r\n {\r\n if (text === undefined) { text = this._text; }\r\n\r\n this.style.syncFont(this.canvas, this.context);\r\n\r\n var wrappedLines = this.runWordWrap(text);\r\n\r\n return wrappedLines.split(this.splitRegExp);\r\n },\r\n\r\n /**\r\n * Set the text to display.\r\n *\r\n * An array of strings will be joined with `\\n` line breaks.\r\n *\r\n * @method Phaser.GameObjects.Text#setText\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setText: function (value)\r\n {\r\n if (!value && value !== 0)\r\n {\r\n value = '';\r\n }\r\n\r\n if (Array.isArray(value))\r\n {\r\n value = value.join('\\n');\r\n }\r\n\r\n if (value !== this._text)\r\n {\r\n this._text = value.toString();\r\n\r\n this.updateText();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the text style.\r\n *\r\n * @example\r\n * text.setStyle({\r\n * fontSize: '64px',\r\n * fontFamily: 'Arial',\r\n * color: '#ffffff',\r\n * align: 'center',\r\n * backgroundColor: '#ff00ff'\r\n * });\r\n *\r\n * @method Phaser.GameObjects.Text#setStyle\r\n * @since 3.0.0\r\n *\r\n * @param {object} style - The style settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStyle: function (style)\r\n {\r\n return this.style.setStyle(style);\r\n },\r\n\r\n /**\r\n * Set the font.\r\n *\r\n * If a string is given, the font family is set.\r\n *\r\n * If an object is given, the `fontFamily`, `fontSize` and `fontStyle`\r\n * properties of that object are set.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFont\r\n * @since 3.0.0\r\n *\r\n * @param {string} font - The font family or font settings to set.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFont: function (font)\r\n {\r\n return this.style.setFont(font);\r\n },\r\n\r\n /**\r\n * Set the font family.\r\n * \r\n * **Important:** If the font you wish to use has a space or digit in its name, such as\r\n * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes:\r\n * \r\n * ```javascript\r\n * Text.setFont('\"Roboto Condensed\"');\r\n * ```\r\n * \r\n * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all\r\n * quoted properly, too:\r\n * \r\n * ```javascript\r\n * Text.setFont('Verdana, \"Times New Roman\", Tahoma, serif');\r\n * ```\r\n *\r\n * @method Phaser.GameObjects.Text#setFontFamily\r\n * @since 3.0.0\r\n *\r\n * @param {string} family - The font family.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontFamily: function (family)\r\n {\r\n return this.style.setFontFamily(family);\r\n },\r\n\r\n /**\r\n * Set the font size.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} size - The font size.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontSize: function (size)\r\n {\r\n return this.style.setFontSize(size);\r\n },\r\n\r\n /**\r\n * Set the font style.\r\n *\r\n * @method Phaser.GameObjects.Text#setFontStyle\r\n * @since 3.0.0\r\n *\r\n * @param {string} style - The font style.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFontStyle: function (style)\r\n {\r\n return this.style.setFontStyle(style);\r\n },\r\n\r\n /**\r\n * Set a fixed width and height for the text.\r\n *\r\n * Pass in `0` for either of these parameters to disable fixed width or height respectively.\r\n *\r\n * @method Phaser.GameObjects.Text#setFixedSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The fixed width to set. `0` disables fixed width.\r\n * @param {number} height - The fixed height to set. `0` disables fixed height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFixedSize: function (width, height)\r\n {\r\n return this.style.setFixedSize(width, height);\r\n },\r\n\r\n /**\r\n * Set the background color.\r\n *\r\n * @method Phaser.GameObjects.Text#setBackgroundColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The background color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setBackgroundColor: function (color)\r\n {\r\n return this.style.setBackgroundColor(color);\r\n },\r\n\r\n /**\r\n * Set the fill style to be used by the Text object.\r\n *\r\n * This can be any valid CanvasRenderingContext2D fillStyle value, such as\r\n * a color (in hex, rgb, rgba, hsl or named values), a gradient or a pattern.\r\n *\r\n * See the [MDN fillStyle docs](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillStyle) for more details.\r\n *\r\n * @method Phaser.GameObjects.Text#setFill\r\n * @since 3.0.0\r\n *\r\n * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setFill: function (fillStyle)\r\n {\r\n return this.style.setFill(fillStyle);\r\n },\r\n\r\n /**\r\n * Set the text fill color.\r\n *\r\n * @method Phaser.GameObjects.Text#setColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The text fill color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setColor: function (color)\r\n {\r\n return this.style.setColor(color);\r\n },\r\n\r\n /**\r\n * Set the stroke settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setStroke\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The stroke color.\r\n * @param {number} thickness - The stroke thickness.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setStroke: function (color, thickness)\r\n {\r\n return this.style.setStroke(color, thickness);\r\n },\r\n\r\n /**\r\n * Set the shadow settings.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadow\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal shadow offset.\r\n * @param {number} [y=0] - The vertical shadow offset.\r\n * @param {string} [color='#000'] - The shadow color.\r\n * @param {number} [blur=0] - The shadow blur radius.\r\n * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow.\r\n * @param {boolean} [shadowFill=true] - Whether to fill the shadow.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadow: function (x, y, color, blur, shadowStroke, shadowFill)\r\n {\r\n return this.style.setShadow(x, y, color, blur, shadowStroke, shadowFill);\r\n },\r\n\r\n /**\r\n * Set the shadow offset.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal shadow offset.\r\n * @param {number} y - The vertical shadow offset.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowOffset: function (x, y)\r\n {\r\n return this.style.setShadowOffset(x, y);\r\n },\r\n\r\n /**\r\n * Set the shadow color.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowColor\r\n * @since 3.0.0\r\n *\r\n * @param {string} color - The shadow color.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowColor: function (color)\r\n {\r\n return this.style.setShadowColor(color);\r\n },\r\n\r\n /**\r\n * Set the shadow blur radius.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowBlur\r\n * @since 3.0.0\r\n *\r\n * @param {number} blur - The shadow blur radius.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowBlur: function (blur)\r\n {\r\n return this.style.setShadowBlur(blur);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow stroke.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowStroke\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow stroke is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowStroke: function (enabled)\r\n {\r\n return this.style.setShadowStroke(enabled);\r\n },\r\n\r\n /**\r\n * Enable or disable shadow fill.\r\n *\r\n * @method Phaser.GameObjects.Text#setShadowFill\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} enabled - Whether shadow fill is enabled or not.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setShadowFill: function (enabled)\r\n {\r\n return this.style.setShadowFill(enabled);\r\n },\r\n\r\n /**\r\n * Set the width (in pixels) to use for wrapping lines. Pass in null to remove wrapping by width.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapWidth\r\n * @since 3.0.0\r\n *\r\n * @param {?number} width - The maximum width of a line in pixels. Set to null to remove wrapping.\r\n * @param {boolean} [useAdvancedWrap=false] - Whether or not to use the advanced wrapping\r\n * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false,\r\n * spaces and whitespace are left as is.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapWidth: function (width, useAdvancedWrap)\r\n {\r\n return this.style.setWordWrapWidth(width, useAdvancedWrap);\r\n },\r\n\r\n /**\r\n * Set a custom callback for wrapping lines. Pass in null to remove wrapping by callback.\r\n *\r\n * @method Phaser.GameObjects.Text#setWordWrapCallback\r\n * @since 3.0.0\r\n *\r\n * @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the\r\n * text. It will receive two arguments: text (the string to wrap), textObject (this Text\r\n * instance). It should return the wrapped lines either as an array of lines or as a string with\r\n * newline characters in place to indicate where breaks should happen.\r\n * @param {object} [scope=null] - The scope that will be applied when the callback is invoked.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setWordWrapCallback: function (callback, scope)\r\n {\r\n return this.style.setWordWrapCallback(callback, scope);\r\n },\r\n\r\n /**\r\n * Set the alignment of the text in this Text object.\r\n * \r\n * The argument can be one of: `left`, `right`, `center` or `justify`.\r\n * \r\n * Alignment only works if the Text object has more than one line of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setAlign\r\n * @since 3.0.0\r\n *\r\n * @param {string} [align='left'] - The text alignment for multi-line text.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setAlign: function (align)\r\n {\r\n return this.style.setAlign(align);\r\n },\r\n\r\n /**\r\n * Set the resolution used by this Text object.\r\n *\r\n * By default it will be set to match the resolution set in the Game Config,\r\n * but you can override it via this method, or by specifying it in the Text style configuration object.\r\n * \r\n * It allows for much clearer text on High DPI devices, at the cost of memory because it uses larger\r\n * internal Canvas textures for the Text.\r\n * \r\n * Therefore, please use with caution, as the more high res Text you have, the more memory it uses.\r\n *\r\n * @method Phaser.GameObjects.Text#setResolution\r\n * @since 3.12.0\r\n *\r\n * @param {number} value - The resolution for this Text object to use.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setResolution: function (value)\r\n {\r\n return this.style.setResolution(value);\r\n },\r\n\r\n /**\r\n * Sets the line spacing value.\r\n *\r\n * This value is _added_ to the height of the font when calculating the overall line height.\r\n * This only has an effect if this Text object consists of multiple lines of text.\r\n *\r\n * @method Phaser.GameObjects.Text#setLineSpacing\r\n * @since 3.13.0\r\n *\r\n * @param {number} value - The amount to add to the font height to achieve the overall line height.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setLineSpacing: function (value)\r\n {\r\n this.lineSpacing = value;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the text padding.\r\n *\r\n * 'left' can be an object.\r\n *\r\n * If only 'left' and 'top' are given they are treated as 'x' and 'y'.\r\n *\r\n * @method Phaser.GameObjects.Text#setPadding\r\n * @since 3.0.0\r\n *\r\n * @param {(number|Phaser.Types.GameObjects.Text.TextPadding)} left - The left padding value, or a padding config object.\r\n * @param {number} top - The top padding value.\r\n * @param {number} right - The right padding value.\r\n * @param {number} bottom - The bottom padding value.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setPadding: function (left, top, right, bottom)\r\n {\r\n if (typeof left === 'object')\r\n {\r\n var config = left;\r\n\r\n // If they specify x and/or y this applies to all\r\n var x = GetValue(config, 'x', null);\r\n\r\n if (x !== null)\r\n {\r\n left = x;\r\n right = x;\r\n }\r\n else\r\n {\r\n left = GetValue(config, 'left', 0);\r\n right = GetValue(config, 'right', left);\r\n }\r\n\r\n var y = GetValue(config, 'y', null);\r\n\r\n if (y !== null)\r\n {\r\n top = y;\r\n bottom = y;\r\n }\r\n else\r\n {\r\n top = GetValue(config, 'top', 0);\r\n bottom = GetValue(config, 'bottom', top);\r\n }\r\n }\r\n else\r\n {\r\n if (left === undefined) { left = 0; }\r\n if (top === undefined) { top = left; }\r\n if (right === undefined) { right = left; }\r\n if (bottom === undefined) { bottom = top; }\r\n }\r\n\r\n this.padding.left = left;\r\n this.padding.top = top;\r\n this.padding.right = right;\r\n this.padding.bottom = bottom;\r\n\r\n return this.updateText();\r\n },\r\n\r\n /**\r\n * Set the maximum number of lines to draw.\r\n *\r\n * @method Phaser.GameObjects.Text#setMaxLines\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [max=0] - The maximum number of lines to draw.\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n setMaxLines: function (max)\r\n {\r\n return this.style.setMaxLines(max);\r\n },\r\n\r\n /**\r\n * Update the displayed text.\r\n *\r\n * @method Phaser.GameObjects.Text#updateText\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Text} This Text object.\r\n */\r\n updateText: function ()\r\n {\r\n var canvas = this.canvas;\r\n var context = this.context;\r\n var style = this.style;\r\n var resolution = style.resolution;\r\n var size = style.metrics;\r\n\r\n style.syncFont(canvas, context);\r\n\r\n var outputText = this._text;\r\n\r\n if (style.wordWrapWidth || style.wordWrapCallback)\r\n {\r\n outputText = this.runWordWrap(this._text);\r\n }\r\n\r\n // Split text into lines\r\n var lines = outputText.split(this.splitRegExp);\r\n\r\n var textSize = GetTextSize(this, size, lines);\r\n\r\n var padding = this.padding;\r\n\r\n var textWidth;\r\n\r\n if (style.fixedWidth === 0)\r\n {\r\n this.width = textSize.width + padding.left + padding.right;\r\n\r\n textWidth = textSize.width;\r\n }\r\n else\r\n {\r\n this.width = style.fixedWidth;\r\n\r\n textWidth = this.width - padding.left - padding.right;\r\n\r\n if (textWidth < textSize.width)\r\n {\r\n textWidth = textSize.width;\r\n }\r\n }\r\n\r\n if (style.fixedHeight === 0)\r\n {\r\n this.height = textSize.height + padding.top + padding.bottom;\r\n }\r\n else\r\n {\r\n this.height = style.fixedHeight;\r\n }\r\n\r\n var w = this.width;\r\n var h = this.height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n w *= resolution;\r\n h *= resolution;\r\n\r\n w = Math.max(w, 1);\r\n h = Math.max(h, 1);\r\n\r\n if (canvas.width !== w || canvas.height !== h)\r\n {\r\n canvas.width = w;\r\n canvas.height = h;\r\n\r\n this.frame.setSize(w, h);\r\n\r\n // Because resizing the canvas resets the context\r\n style.syncFont(canvas, context);\r\n }\r\n else\r\n {\r\n context.clearRect(0, 0, w, h);\r\n }\r\n\r\n context.save();\r\n\r\n context.scale(resolution, resolution);\r\n\r\n if (style.backgroundColor)\r\n {\r\n context.fillStyle = style.backgroundColor;\r\n context.fillRect(0, 0, w, h);\r\n }\r\n\r\n style.syncStyle(canvas, context);\r\n\r\n context.textBaseline = 'alphabetic';\r\n\r\n // Apply padding\r\n context.translate(padding.left, padding.top);\r\n\r\n var linePositionX;\r\n var linePositionY;\r\n\r\n // Draw text line by line\r\n for (var i = 0; i < textSize.lines; i++)\r\n {\r\n linePositionX = style.strokeThickness / 2;\r\n linePositionY = (style.strokeThickness / 2 + i * textSize.lineHeight) + size.ascent;\r\n\r\n if (i > 0)\r\n {\r\n linePositionY += (textSize.lineSpacing * i);\r\n }\r\n\r\n if (style.rtl)\r\n {\r\n linePositionX = w - linePositionX;\r\n }\r\n else if (style.align === 'right')\r\n {\r\n linePositionX += textWidth - textSize.lineWidths[i];\r\n }\r\n else if (style.align === 'center')\r\n {\r\n linePositionX += (textWidth - textSize.lineWidths[i]) / 2;\r\n }\r\n else if (style.align === 'justify')\r\n {\r\n // To justify text line its width must be no less than 85% of defined width\r\n var minimumLengthToApplyJustification = 0.85;\r\n\r\n if (textSize.lineWidths[i] / textSize.width >= minimumLengthToApplyJustification)\r\n {\r\n var extraSpace = textSize.width - textSize.lineWidths[i];\r\n var spaceSize = context.measureText(' ').width;\r\n var trimmedLine = lines[i].trim();\r\n var array = trimmedLine.split(' ');\r\n \r\n extraSpace += (lines[i].length - trimmedLine.length) * spaceSize;\r\n \r\n var extraSpaceCharacters = Math.floor(extraSpace / spaceSize);\r\n var idx = 0;\r\n\r\n while (extraSpaceCharacters > 0)\r\n {\r\n array[idx] += ' ';\r\n idx = (idx + 1) % (array.length - 1 || 1);\r\n --extraSpaceCharacters;\r\n }\r\n \r\n lines[i] = array.join(' ');\r\n }\r\n }\r\n\r\n if (this.autoRound)\r\n {\r\n linePositionX = Math.round(linePositionX);\r\n linePositionY = Math.round(linePositionY);\r\n }\r\n\r\n if (style.strokeThickness)\r\n {\r\n this.style.syncShadow(context, style.shadowStroke);\r\n\r\n context.strokeText(lines[i], linePositionX, linePositionY);\r\n }\r\n\r\n if (style.color)\r\n {\r\n this.style.syncShadow(context, style.shadowFill);\r\n\r\n context.fillText(lines[i], linePositionX, linePositionY);\r\n }\r\n }\r\n\r\n context.restore();\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true);\r\n\r\n this.frame.glTexture = this.frame.source.glTexture;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n var input = this.input;\r\n\r\n if (input && !input.customHitArea)\r\n {\r\n input.hitArea.width = this.width;\r\n input.hitArea.height = this.height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get the current text metrics.\r\n *\r\n * @method Phaser.GameObjects.Text#getTextMetrics\r\n * @since 3.0.0\r\n *\r\n * @return {object} The text metrics.\r\n */\r\n getTextMetrics: function ()\r\n {\r\n return this.style.getTextMetrics();\r\n },\r\n\r\n /**\r\n * The text string being rendered by this Text Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#text\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n text: {\r\n\r\n get: function ()\r\n {\r\n return this._text;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setText(value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Build a JSON representation of the Text object.\r\n *\r\n * @method Phaser.GameObjects.Text#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Text object.\r\n */\r\n toJSON: function ()\r\n {\r\n var out = Components.ToJSON(this);\r\n\r\n // Extra Text data is added here\r\n\r\n var data = {\r\n autoRound: this.autoRound,\r\n text: this._text,\r\n style: this.style.toJSON(),\r\n padding: {\r\n left: this.padding.left,\r\n right: this.padding.right,\r\n top: this.padding.top,\r\n bottom: this.padding.bottom\r\n }\r\n };\r\n\r\n out.data = data;\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.Text#preDestroy\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.style.rtl)\r\n {\r\n RemoveFromDOM(this.canvas);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n\r\n this.texture.destroy();\r\n }\r\n\r\n /**\r\n * The horizontal origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the left of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The vertical origin of this Game Object.\r\n * The origin maps the relationship between the size and position of the Game Object.\r\n * The default value is 0.5, meaning all Game Objects are positioned based on their center.\r\n * Setting the value to 0 means the position now relates to the top of the Game Object.\r\n *\r\n * @name Phaser.GameObjects.Text#originY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n});\r\n\r\nmodule.exports = Text;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/Text.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TextCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#text\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('text', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n // style Object = {\r\n // font: [ 'font', '16px Courier' ],\r\n // backgroundColor: [ 'backgroundColor', null ],\r\n // fill: [ 'fill', '#fff' ],\r\n // stroke: [ 'stroke', '#fff' ],\r\n // strokeThickness: [ 'strokeThickness', 0 ],\r\n // shadowOffsetX: [ 'shadow.offsetX', 0 ],\r\n // shadowOffsetY: [ 'shadow.offsetY', 0 ],\r\n // shadowColor: [ 'shadow.color', '#000' ],\r\n // shadowBlur: [ 'shadow.blur', 0 ],\r\n // shadowStroke: [ 'shadow.stroke', false ],\r\n // shadowFill: [ 'shadow.fill', false ],\r\n // align: [ 'align', 'left' ],\r\n // maxLines: [ 'maxLines', 0 ],\r\n // fixedWidth: [ 'fixedWidth', false ],\r\n // fixedHeight: [ 'fixedHeight', false ],\r\n // rtl: [ 'rtl', false ]\r\n // }\r\n\r\n var content = GetAdvancedValue(config, 'text', '');\r\n var style = GetAdvancedValue(config, 'style', null);\r\n\r\n // Padding\r\n // { padding: 2 }\r\n // { padding: { x: , y: }}\r\n // { padding: { left: , top: }}\r\n // { padding: { left: , right: , top: , bottom: }}\r\n\r\n var padding = GetAdvancedValue(config, 'padding', null);\r\n\r\n if (padding !== null)\r\n {\r\n style.padding = padding;\r\n }\r\n\r\n var text = new Text(this.scene, 0, 0, content, style);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, text, config);\r\n\r\n // Text specific config options:\r\n\r\n text.autoRound = GetAdvancedValue(config, 'autoRound', true);\r\n text.resolution = GetAdvancedValue(config, 'resolution', 1);\r\n\r\n return text;\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextCreator.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Text = __webpack_require__(/*! ./Text */ \"./node_modules/phaser/src/gameobjects/text/static/Text.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Text Game Object and adds it to the Scene.\r\n * \r\n * A Text Game Object.\r\n * \r\n * Text objects work by creating their own internal hidden Canvas and then renders text to it using\r\n * the standard Canvas `fillText` API. It then creates a texture from this canvas which is rendered\r\n * to your game during the render pass.\r\n * \r\n * Because it uses the Canvas API you can take advantage of all the features this offers, such as\r\n * applying gradient fills to the text, or strokes, shadows and more. You can also use custom fonts\r\n * loaded externally, such as Google or TypeKit Web fonts.\r\n *\r\n * You can only display fonts that are currently loaded and available to the browser: therefore fonts must\r\n * be pre-loaded. Phaser does not do ths for you, so you will require the use of a 3rd party font loader,\r\n * or have the fonts ready available in the CSS on the page in which your Phaser game resides.\r\n *\r\n * See {@link http://www.jordanm.co.uk/tinytype this compatibility table} for the available default fonts\r\n * across mobile browsers.\r\n * \r\n * A note on performance: Every time the contents of a Text object changes, i.e. changing the text being\r\n * displayed, or the style of the text, it needs to remake the Text canvas, and if on WebGL, re-upload the\r\n * new texture to the GPU. This can be an expensive operation if used often, or with large quantities of\r\n * Text objects in your game. If you run into performance issues you would be better off using Bitmap Text\r\n * instead, as it benefits from batching and avoids expensive Canvas API calls.\r\n *\r\n * Note: This method will only be available if the Text Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#text\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {(string|string[])} text - The text this Text object will display.\r\n * @param {object} [style] - The Text style configuration object.\r\n *\r\n * @return {Phaser.GameObjects.Text} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('text', function (x, y, text, style)\r\n{\r\n return this.displayList.add(new Text(this.scene, x, y, text, style));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextFactory.js?")},"./node_modules/phaser/src/gameobjects/text/static/TextRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TextWebGLRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TextCanvasRenderer */ "./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextRender.js?')},"./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.Text#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.Text} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TextWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n if ((src.width === 0) || (src.height === 0))\r\n {\r\n return;\r\n }\r\n\r\n var frame = src.frame;\r\n var width = frame.width;\r\n var height = frame.height;\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n frame.glTexture,\r\n width, height,\r\n src.x, src.y,\r\n width / src.style.resolution, height / src.style.resolution,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.displayOriginX, src.displayOriginY,\r\n 0, 0, width, height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n 0, 0,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TextWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetPowerOfTwo = __webpack_require__(/*! ../../math/pow2/GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ "./node_modules/phaser/src/display/canvas/Smoothing.js");\r\nvar TileSpriteRender = __webpack_require__(/*! ./TileSpriteRender */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// bitmask flag for GameObject.renderMask\r\nvar _FLAG = 8; // 1000\r\n\r\n/**\r\n * @classdesc\r\n * A TileSprite is a Sprite that has a repeating texture.\r\n *\r\n * The texture can be scrolled and scaled independently of the TileSprite itself. Textures will automatically wrap and\r\n * are designed so that you can create game backdrops using seamless textures as a source.\r\n *\r\n * You shouldn\'t ever create a TileSprite any larger than your actual canvas size. If you want to create a large repeating background\r\n * that scrolls across the whole map of your game, then you create a TileSprite that fits the canvas size and then use the `tilePosition`\r\n * property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will \r\n * consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to\r\n * adjust the scale of the texture - don\'t resize the sprite itself or make it larger than it needs.\r\n * \r\n * An important note about Tile Sprites and NPOT textures: Internally, TileSprite textures use GL_REPEAT to provide\r\n * seamless repeating of the textures. This, combined with the way in which the textures are handled in WebGL, means\r\n * they need to be POT (power-of-two) sizes in order to wrap. If you provide a NPOT (non power-of-two) texture to a\r\n * TileSprite it will generate a POT sized canvas and draw your texture to it, scaled up to the POT size. It\'s then\r\n * scaled back down again during rendering to the original dimensions. While this works, in that it allows you to use\r\n * any size texture for a Tile Sprite, it does mean that NPOT textures are going to appear anti-aliased when rendered,\r\n * due to the interpolation that took place when it was resized into a POT texture. This is especially visible in\r\n * pixel art graphics. If you notice it and it becomes an issue, the only way to avoid it is to ensure that you\r\n * provide POT textures for Tile Sprites.\r\n *\r\n * @class TileSprite\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Crop\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Mask\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} textureKey - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frameKey] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar TileSprite = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Crop,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Mask,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.ScrollFactor,\r\n Components.Tint,\r\n Components.Transform,\r\n Components.Visible,\r\n TileSpriteRender\r\n ],\r\n\r\n initialize:\r\n\r\n function TileSprite (scene, x, y, width, height, textureKey, frameKey)\r\n {\r\n var renderer = scene.sys.game.renderer;\r\n\r\n GameObject.call(this, scene, \'TileSprite\');\r\n\r\n var displayTexture = scene.sys.textures.get(textureKey);\r\n var displayFrame = displayTexture.get(frameKey);\r\n\r\n if (!width || !height)\r\n {\r\n width = displayFrame.width;\r\n height = displayFrame.height;\r\n }\r\n else\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n /**\r\n * Internal tile position vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tilePosition\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tilePosition = new Vector2();\r\n\r\n /**\r\n * Internal tile scale vector.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_tileScale\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tileScale = new Vector2(1, 1);\r\n\r\n /**\r\n * Whether the Tile Sprite has changed in some way, requiring an re-render of its tile texture.\r\n *\r\n * Such changes include the texture frame and scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#dirty\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * The renderer in use by this Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.0.0\r\n */\r\n this.renderer = renderer;\r\n\r\n /**\r\n * The Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#canvas\r\n * @type {?HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.canvas = CanvasPool.create(this, width, height);\r\n\r\n /**\r\n * The Context of the Canvas element that the TileSprite renders its fill pattern in to.\r\n * Only used in Canvas mode.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The Texture the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayTexture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayTexture = displayTexture;\r\n\r\n /**\r\n * The Frame the TileSprite is using as its fill pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#displayFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.displayFrame = displayFrame;\r\n\r\n /**\r\n * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#_crop\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._crop = this.resetCropObject();\r\n\r\n /**\r\n * The Texture this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#texture\r\n * @type {Phaser.Textures.Texture|Phaser.Textures.CanvasTexture}\r\n * @since 3.0.0\r\n */\r\n this.texture = scene.sys.textures.addCanvas(null, this.canvas, true);\r\n\r\n /**\r\n * The Texture Frame this Game Object is using to render with.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#frame\r\n * @type {Phaser.Textures.Frame}\r\n * @since 3.0.0\r\n */\r\n this.frame = this.texture.get();\r\n\r\n /**\r\n * The next power of two value from the width of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potWidth = GetPowerOfTwo(displayFrame.width);\r\n\r\n /**\r\n * The next power of two value from the height of the Fill Pattern frame.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#potHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.potHeight = GetPowerOfTwo(displayFrame.height);\r\n\r\n /**\r\n * The Canvas that the TileSprites texture is rendered to.\r\n * This is used to create a WebGL texture from.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.12.0\r\n */\r\n this.fillCanvas = CanvasPool.create2D(this, this.potWidth, this.potHeight);\r\n\r\n /**\r\n * The Canvas Context used to render the TileSprites texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.12.0\r\n */\r\n this.fillContext = this.fillCanvas.getContext(\'2d\');\r\n\r\n /**\r\n * The texture that the Tile Sprite is rendered to, which is then rendered to a Scene.\r\n * In WebGL this is a WebGLTexture. In Canvas it\'s a Canvas Fill Pattern.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#fillPattern\r\n * @type {?(WebGLTexture|CanvasPattern)}\r\n * @since 3.12.0\r\n */\r\n this.fillPattern = null;\r\n\r\n this.setPosition(x, y);\r\n this.setSize(width, height);\r\n this.setFrame(frameKey);\r\n this.setOriginFromFrame();\r\n this.initPipeline();\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function (renderer)\r\n {\r\n var gl = renderer.gl;\r\n\r\n this.dirty = true;\r\n this.fillPattern = null;\r\n this.fillPattern = renderer.createTexture2D(0, gl.LINEAR, gl.LINEAR, gl.REPEAT, gl.REPEAT, gl.RGBA, this.fillCanvas, this.potWidth, this.potHeight);\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * Sets the texture and frame this Game Object will use to render with.\r\n *\r\n * Textures are referenced by their string-based keys, as stored in the Texture Manager.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the texture to be used, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setTexture: function (key, frame)\r\n {\r\n this.displayTexture = this.scene.sys.textures.get(key);\r\n\r\n return this.setFrame(frame);\r\n },\r\n\r\n /**\r\n * Sets the frame this Game Object will use to render with.\r\n *\r\n * The Frame has to belong to the current Texture being used.\r\n *\r\n * It can be either a string or an index.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setFrame\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} frame - The name or index of the frame within the Texture.\r\n *\r\n * @return {this} This Game Object instance.\r\n */\r\n setFrame: function (frame)\r\n {\r\n this.displayFrame = this.displayTexture.get(frame);\r\n\r\n if (!this.displayFrame.cutWidth || !this.displayFrame.cutHeight)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n this.dirty = true;\r\n\r\n this.updateTileTexture();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tilePositionX} and {@link Phaser.GameObjects.TileSprite#tilePositionY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTilePosition\r\n * @since 3.3.0\r\n *\r\n * @param {number} [x] - The x position of this sprite\'s tiling texture.\r\n * @param {number} [y] - The y position of this sprite\'s tiling texture.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTilePosition: function (x, y)\r\n {\r\n if (x !== undefined)\r\n {\r\n this.tilePositionX = x;\r\n }\r\n\r\n if (y !== undefined)\r\n {\r\n this.tilePositionY = y;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets {@link Phaser.GameObjects.TileSprite#tileScaleX} and {@link Phaser.GameObjects.TileSprite#tileScaleY}.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#setTileScale\r\n * @since 3.12.0\r\n *\r\n * @param {number} [x] - The horizontal scale of the tiling texture. If not given it will use the current `tileScaleX` value.\r\n * @param {number} [y=x] - The vertical scale of the tiling texture. If not given it will use the `x` value.\r\n *\r\n * @return {this} This Tile Sprite instance.\r\n */\r\n setTileScale: function (x, y)\r\n {\r\n if (x === undefined) { x = this.tileScaleX; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.tileScaleX = x;\r\n this.tileScaleY = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Render the tile texture if it is dirty, or if the frame has changed.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateTileTexture\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateTileTexture: function ()\r\n {\r\n if (!this.dirty || !this.renderer)\r\n {\r\n return;\r\n }\r\n\r\n // Draw the displayTexture to our fillCanvas\r\n\r\n var frame = this.displayFrame;\r\n\r\n var ctx = this.fillContext;\r\n var canvas = this.fillCanvas;\r\n\r\n var fw = this.potWidth;\r\n var fh = this.potHeight;\r\n\r\n if (!this.renderer.gl)\r\n {\r\n fw = frame.cutWidth;\r\n fh = frame.cutHeight;\r\n }\r\n\r\n ctx.clearRect(0, 0, fw, fh);\r\n\r\n canvas.width = fw;\r\n canvas.height = fh;\r\n\r\n ctx.drawImage(\r\n frame.source.image,\r\n frame.cutX, frame.cutY,\r\n frame.cutWidth, frame.cutHeight,\r\n 0, 0,\r\n fw, fh\r\n );\r\n\r\n if (this.renderer.gl)\r\n {\r\n this.fillPattern = this.renderer.canvasToTexture(canvas, this.fillPattern);\r\n }\r\n else\r\n {\r\n this.fillPattern = ctx.createPattern(canvas, \'repeat\');\r\n }\r\n\r\n this.updateCanvas();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Draw the fill pattern to the internal canvas.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#updateCanvas\r\n * @private\r\n * @since 3.12.0\r\n */\r\n updateCanvas: function ()\r\n {\r\n var canvas = this.canvas;\r\n\r\n if (canvas.width !== this.width || canvas.height !== this.height)\r\n {\r\n canvas.width = this.width;\r\n canvas.height = this.height;\r\n\r\n this.frame.setSize(this.width, this.height);\r\n this.updateDisplayOrigin();\r\n\r\n this.dirty = true;\r\n }\r\n\r\n if (!this.dirty || this.renderer && this.renderer.gl)\r\n {\r\n this.dirty = false;\r\n return;\r\n }\r\n\r\n var ctx = this.context;\r\n\r\n if (!this.scene.sys.game.config.antialias)\r\n {\r\n Smoothing.disable(ctx);\r\n }\r\n\r\n var scaleX = this._tileScale.x;\r\n var scaleY = this._tileScale.y;\r\n\r\n var positionX = this._tilePosition.x;\r\n var positionY = this._tilePosition.y;\r\n\r\n ctx.clearRect(0, 0, this.width, this.height);\r\n\r\n ctx.save();\r\n\r\n ctx.scale(scaleX, scaleY);\r\n\r\n ctx.translate(-positionX, -positionY);\r\n\r\n ctx.fillStyle = this.fillPattern;\r\n\r\n ctx.fillRect(positionX, positionY, this.width / scaleX, this.height / scaleY);\r\n\r\n ctx.restore();\r\n\r\n this.dirty = false;\r\n },\r\n\r\n /**\r\n * Internal destroy handler, called as part of the destroy process.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#preDestroy\r\n * @protected\r\n * @since 3.9.0\r\n */\r\n preDestroy: function ()\r\n {\r\n if (this.renderer && this.renderer.gl)\r\n {\r\n this.renderer.deleteTexture(this.fillPattern);\r\n }\r\n\r\n CanvasPool.remove(this.canvas);\r\n CanvasPool.remove(this.fillCanvas);\r\n\r\n this.fillPattern = null;\r\n this.fillContext = null;\r\n this.fillCanvas = null;\r\n\r\n this.displayTexture = null;\r\n this.displayFrame = null;\r\n\r\n this.texture.destroy();\r\n\r\n this.renderer = null;\r\n },\r\n\r\n /**\r\n * The horizontal scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionX: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scroll position of the Tile Sprite.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tilePositionY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n tilePositionY: {\r\n\r\n get: function ()\r\n {\r\n return this._tilePosition.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tilePosition.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleX\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.x = value;\r\n this.dirty = true;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of the Tile Sprite texture.\r\n *\r\n * @name Phaser.GameObjects.TileSprite#tileScaleY\r\n * @type {number}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n tileScaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._tileScale.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tileScale.y = value;\r\n this.dirty = true;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TileSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n renderer.batchSprite(src, src.frame, camera, parentMatrix);\r\n};\r\n\r\nmodule.exports = TileSpriteCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BuildGameObject = __webpack_require__(/*! ../BuildGameObject */ \"./node_modules/phaser/src/gameobjects/BuildGameObject.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.GameObjects.TileSprite.TileSpriteConfig} config - The configuration object this Game Object will use to create itself.\r\n * @param {boolean} [addToScene] - Add this Game Object to the Scene after creating it? If set this argument overrides the `add` property in the config object.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('tileSprite', function (config, addToScene)\r\n{\r\n if (config === undefined) { config = {}; }\r\n\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 512);\r\n var height = GetAdvancedValue(config, 'height', 512);\r\n var key = GetAdvancedValue(config, 'key', '');\r\n var frame = GetAdvancedValue(config, 'frame', '');\r\n\r\n var tile = new TileSprite(this.scene, x, y, width, height, key, frame);\r\n\r\n if (addToScene !== undefined)\r\n {\r\n config.add = addToScene;\r\n }\r\n\r\n BuildGameObject(this.scene, tile, config);\r\n\r\n return tile;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileSprite = __webpack_require__(/*! ./TileSprite */ \"./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new TileSprite Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the TileSprite Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tileSprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {integer} width - The width of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {integer} height - The height of the Game Object. If zero it will use the size of the texture frame.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.GameObjects.TileSprite} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame)\r\n{\r\n return this.displayList.add(new TileSprite(this.scene, x, y, width, height, key, frame));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js?")},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./TileSpriteWebGLRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./TileSpriteCanvasRenderer */ "./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js?')},"./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.GameObjects.TileSprite#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.GameObjects.TileSprite} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar TileSpriteWebGLRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.updateCanvas();\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n this.pipeline.batchTexture(\r\n src,\r\n src.fillPattern,\r\n src.displayFrame.width * src.tileScaleX, src.displayFrame.height * src.tileScaleY,\r\n src.x, src.y,\r\n src.width, src.height,\r\n src.scaleX, src.scaleY,\r\n src.rotation,\r\n src.flipX, src.flipY,\r\n src.scrollFactorX, src.scrollFactorY,\r\n src.originX * src.width, src.originY * src.height,\r\n 0, 0, src.width, src.height,\r\n getTint(src._tintTL, camera.alpha * src._alphaTL),\r\n getTint(src._tintTR, camera.alpha * src._alphaTR),\r\n getTint(src._tintBL, camera.alpha * src._alphaBL),\r\n getTint(src._tintBR, camera.alpha * src._alphaBR),\r\n (src._isTinted && src.tintFill),\r\n (src.tilePositionX % src.displayFrame.width) / src.displayFrame.width,\r\n (src.tilePositionY % src.displayFrame.height) / src.displayFrame.height,\r\n camera,\r\n parentMatrix\r\n );\r\n};\r\n\r\nmodule.exports = TileSpriteWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js?')},"./node_modules/phaser/src/gameobjects/zone/Zone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BlendModes = __webpack_require__(/*! ../../renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js");\r\nvar Circle = __webpack_require__(/*! ../../geom/circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ../components */ "./node_modules/phaser/src/gameobjects/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Zone Game Object.\r\n *\r\n * A Zone is a non-rendering rectangular Game Object that has a position and size.\r\n * It has no texture and never displays, but does live on the display list and\r\n * can be moved, scaled and rotated like any other Game Object.\r\n *\r\n * Its primary use is for creating Drop Zones and Input Hit Areas and it has a couple of helper methods\r\n * specifically for this. It is also useful for object overlap checks, or as a base for your own\r\n * non-displaying Game Objects.\r\n\r\n * The default origin is 0.5, the center of the Zone, the same as with Game Objects.\r\n *\r\n * @class Zone\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.GameObjects\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} [width=1] - The width of the Game Object.\r\n * @param {number} [height=1] - The height of the Game Object.\r\n */\r\nvar Zone = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Depth,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Transform,\r\n Components.ScrollFactor,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Zone (scene, x, y, width, height)\r\n {\r\n if (width === undefined) { width = 1; }\r\n if (height === undefined) { height = width; }\r\n\r\n GameObject.call(this, scene, \'Zone\');\r\n\r\n this.setPosition(x, y);\r\n\r\n /**\r\n * The native (un-scaled) width of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The native (un-scaled) height of this Game Object.\r\n *\r\n * @name Phaser.GameObjects.Zone#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The Blend Mode of the Game Object.\r\n * Although a Zone never renders, it still has a blend mode to allow it to fit seamlessly into\r\n * display lists without causing a batch flush.\r\n *\r\n * @name Phaser.GameObjects.Zone#blendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.blendMode = BlendModes.NORMAL;\r\n\r\n this.updateDisplayOrigin();\r\n },\r\n\r\n /**\r\n * The displayed width of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleX * this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleX = value / this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The displayed height of this Game Object.\r\n * This value takes into account the scale factor.\r\n *\r\n * @name Phaser.GameObjects.Zone#displayHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n displayHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.scaleY * this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.scaleY = value / this.height;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the size of this Game Object.\r\n *\r\n * @method Phaser.GameObjects.Zone#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setSize: function (width, height, resizeInput)\r\n {\r\n if (resizeInput === undefined) { resizeInput = true; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.updateDisplayOrigin();\r\n\r\n var input = this.input;\r\n\r\n if (resizeInput && input && !input.customHitArea)\r\n {\r\n input.hitArea.width = width;\r\n input.hitArea.height = height;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the display size of this Game Object.\r\n * Calling this will adjust the scale.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDisplaySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of this Game Object.\r\n * @param {number} height - The height of this Game Object.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDisplaySize: function (width, height)\r\n {\r\n this.displayWidth = width;\r\n this.displayHeight = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Circular Drop Zone.\r\n * The circle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setCircleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Circle that will form the Drop Zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setCircleDropZone: function (radius)\r\n {\r\n return this.setDropZone(new Circle(0, 0, radius), CircleContains);\r\n },\r\n\r\n /**\r\n * Sets this Zone to be a Rectangle Drop Zone.\r\n * The rectangle is centered on this Zones `x` and `y` coordinates.\r\n *\r\n * @method Phaser.GameObjects.Zone#setRectangleDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the rectangle drop zone.\r\n * @param {number} height - The height of the rectangle drop zone.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setRectangleDropZone: function (width, height)\r\n {\r\n return this.setDropZone(new Rectangle(0, 0, width, height), RectangleContains);\r\n },\r\n\r\n /**\r\n * Allows you to define your own Geometry shape to be used as a Drop Zone.\r\n *\r\n * @method Phaser.GameObjects.Zone#setDropZone\r\n * @since 3.0.0\r\n *\r\n * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape.\r\n * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape.\r\n *\r\n * @return {Phaser.GameObjects.Zone} This Game Object.\r\n */\r\n setDropZone: function (shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n this.setRectangleDropZone(this.width, this.height);\r\n }\r\n else if (!this.input)\r\n {\r\n this.setInteractive(shape, callback, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * A NOOP method so you can pass a Zone to a Container.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setAlpha\r\n * @private\r\n * @since 3.11.0\r\n */\r\n setAlpha: function ()\r\n {\r\n },\r\n \r\n /**\r\n * A NOOP method so you can pass a Zone to a Container in Canvas.\r\n * Calling this method will do nothing. It is intentionally empty.\r\n *\r\n * @method Phaser.GameObjects.Zone#setBlendMode\r\n * @private\r\n * @since 3.16.2\r\n */\r\n setBlendMode: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderCanvas\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderCanvas: function ()\r\n {\r\n },\r\n\r\n /**\r\n * A Zone does not render.\r\n *\r\n * @method Phaser.GameObjects.Zone#renderWebGL\r\n * @private\r\n * @since 3.0.0\r\n */\r\n renderWebGL: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Zone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/Zone.js?')},"./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and returns it.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#zone\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object this Game Object will use to create itself.\r\n *\r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectCreator.register('zone', function (config)\r\n{\r\n var x = GetAdvancedValue(config, 'x', 0);\r\n var y = GetAdvancedValue(config, 'y', 0);\r\n var width = GetAdvancedValue(config, 'width', 1);\r\n var height = GetAdvancedValue(config, 'height', width);\r\n\r\n return new Zone(this.scene, x, y, width, height);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js?")},"./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Zone = __webpack_require__(/*! ./Zone */ \"./node_modules/phaser/src/gameobjects/zone/Zone.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\n\r\n/**\r\n * Creates a new Zone Game Object and adds it to the Scene.\r\n *\r\n * Note: This method will only be available if the Zone Game Object has been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#zone\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {number} width - The width of the Game Object.\r\n * @param {number} height - The height of the Game Object.\r\n * \r\n * @return {Phaser.GameObjects.Zone} The Game Object that was created.\r\n */\r\nGameObjectFactory.register('zone', function (x, y, width, height)\r\n{\r\n return this.displayList.add(new Zone(this.scene, x, y, width, height));\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n// \r\n// There are several properties available to use:\r\n// \r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js?")},"./node_modules/phaser/src/geom/circle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the circle.\r\n *\r\n * @function Phaser.Geom.Circle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the area of.\r\n *\r\n * @return {number} The area of the Circle.\r\n */\r\nvar Area = function (circle)\r\n{\r\n return (circle.radius > 0) ? Math.PI * circle.radius * circle.radius : 0;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Area.js?")},"./node_modules/phaser/src/geom/circle/Circle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Circle object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Circle you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Circle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n */\r\nvar Circle = new Class({\r\n\r\n initialize:\r\n\r\n function Circle (x, y, radius)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (radius === undefined) { radius = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.CIRCLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Circle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.CIRCLE;\r\n\r\n /**\r\n * The x position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The internal radius of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_radius\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._radius = radius;\r\n\r\n /**\r\n * The internal diameter of the circle.\r\n *\r\n * @name Phaser.Geom.Circle#_diameter\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._diameter = radius * 2;\r\n },\r\n\r\n /**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Circle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Circle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Circle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the Circle.\r\n *\r\n * @method Phaser.Geom.Circle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y and radius of this circle.\r\n *\r\n * @method Phaser.Geom.Circle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n * @param {number} [radius=0] - The radius of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setTo: function (x, y, radius)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this._radius = radius;\r\n this._diameter = radius * 2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Circle to be empty with a radius of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Circle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this._radius = 0;\r\n this._diameter = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Circle.\r\n *\r\n * @method Phaser.Geom.Circle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the circle.\r\n * @param {number} [y=0] - The y position of the center of the circle.\r\n *\r\n * @return {Phaser.Geom.Circle} This Circle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Circle is empty: has a radius of zero.\r\n *\r\n * @method Phaser.Geom.Circle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Circle is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this._radius <= 0);\r\n },\r\n\r\n /**\r\n * The radius of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#radius\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._radius = value;\r\n this._diameter = value * 2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The diameter of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#diameter\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n diameter: {\r\n\r\n get: function ()\r\n {\r\n return this._diameter;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._diameter = value;\r\n this._radius = value * 0.5;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + this._radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Circle.\r\n *\r\n * @name Phaser.Geom.Circle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this._radius;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - this._radius;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circle.js?')},"./node_modules/phaser/src/geom/circle/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference of.\r\n *\r\n * @return {number} The circumference of the Circle.\r\n */\r\nvar Circumference = function (circle)\r\n{\r\n return 2 * (Math.PI * circle.radius);\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Circumference.js?")},"./node_modules/phaser/src/geom/circle/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.\r\n *\r\n * @function Phaser.Geom.Circle.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Circle to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (circle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = circle.x + (circle.radius * Math.cos(angle));\r\n out.y = circle.y + (circle.radius * Math.sin(angle));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/circle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n/**\r\n * Creates a new Circle instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Circle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|object)} source - The Circle to be cloned. Can be an instance of a Circle or a circle-like object, with x, y and radius properties.\r\n *\r\n * @return {Phaser.Geom.Circle} A clone of the source Circle.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Circle(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Clone.js?')},"./node_modules/phaser/src/geom/circle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Circle contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Circle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {number} x - The x coordinate to check within the circle.\r\n * @param {number} y - The y coordinate to check within the circle.\r\n *\r\n * @return {boolean} True if the coordinates are within the circle, otherwise false.\r\n */\r\nvar Contains = function (circle, x, y)\r\n{\r\n // Check if x/y are within the bounds first\r\n if (circle.radius > 0 && x >= circle.left && x <= circle.right && y >= circle.top && y <= circle.bottom)\r\n {\r\n var dx = (circle.x - x) * (circle.x - x);\r\n var dy = (circle.y - y) * (circle.y - y);\r\n\r\n return (dx + dy) <= (circle.radius * circle.radius);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Contains.js?")},"./node_modules/phaser/src/geom/circle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (circle, point)\r\n{\r\n return Contains(circle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/circle/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\n\r\n/**\r\n * Check to see if the Circle contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Circle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsRect = function (circle, rect)\r\n{\r\n return (\r\n Contains(circle, rect.x, rect.y) &&\r\n Contains(circle, rect.right, rect.y) &&\r\n Contains(circle, rect.x, rect.bottom) &&\r\n Contains(circle, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/ContainsRect.js?')},"./node_modules/phaser/src/geom/circle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y` and `radius` properties from the `source` Circle\r\n * into the given `dest` Circle, then returns the `dest` Circle.\r\n *\r\n * @function Phaser.Geom.Circle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} source - The source Circle to copy the values from.\r\n * @param {Phaser.Geom.Circle} dest - The destination Circle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Circle} The destination Circle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.radius);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/CopyFrom.js?")},"./node_modules/phaser/src/geom/circle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y` and `radius` properties of the two given Circles.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Circle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The first Circle to compare.\r\n * @param {Phaser.Geom.Circle} toCompare - The second Circle to compare.\r\n *\r\n * @return {boolean} `true` if the two Circles equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (circle, toCompare)\r\n{\r\n return (\r\n circle.x === toCompare.x &&\r\n circle.y === toCompare.y &&\r\n circle.radius === toCompare.radius\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Equals.js?")},"./node_modules/phaser/src/geom/circle/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Circle object.\r\n *\r\n * @function Phaser.Geom.Circle.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the circle bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Circles bounds.\r\n */\r\nvar GetBounds = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = circle.left;\r\n out.y = circle.top;\r\n out.width = circle.diameter;\r\n out.height = circle.diameter;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetBounds.js?')},"./node_modules/phaser/src/geom/circle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Circle\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the circle.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the circle.\r\n */\r\nvar GetPoint = function (circle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(circle, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoint.js?')},"./node_modules/phaser/src/geom/circle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Circle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the circle and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the circle.\r\n */\r\nvar GetPoints = function (circle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(circle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(circle, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/GetPoints.js?')},"./node_modules/phaser/src/geom/circle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given.\r\n *\r\n * @function Phaser.Geom.Circle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Circle by.\r\n * @param {number} y - The amount to vertically offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar Offset = function (circle, x, y)\r\n{\r\n circle.x += x;\r\n circle.y += y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Offset.js?")},"./node_modules/phaser/src/geom/circle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Circle by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Circle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [circle,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Circle by.\r\n *\r\n * @return {Phaser.Geom.Circle} The Circle that was offset.\r\n */\r\nvar OffsetPoint = function (circle, point)\r\n{\r\n circle.x += point.x;\r\n circle.y += point.y;\r\n\r\n return circle;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/circle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Circle.\r\n *\r\n * @function Phaser.Geom.Circle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The Circle to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (circle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = 2 * Math.PI * Math.random();\r\n var u = Math.random() + Math.random();\r\n var r = (u > 1) ? 2 - u : u;\r\n var x = r * Math.cos(t);\r\n var y = r * Math.sin(t);\r\n\r\n out.x = circle.x + (x * circle.radius);\r\n out.y = circle.y + (y * circle.radius);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/Random.js?')},"./node_modules/phaser/src/geom/circle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ./Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\nCircle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/circle/Area.js");\r\nCircle.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/circle/Circumference.js");\r\nCircle.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/circle/CircumferencePoint.js");\r\nCircle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/circle/Clone.js");\r\nCircle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nCircle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/circle/ContainsPoint.js");\r\nCircle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/circle/ContainsRect.js");\r\nCircle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/circle/CopyFrom.js");\r\nCircle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/circle/Equals.js");\r\nCircle.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/circle/GetBounds.js");\r\nCircle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/circle/GetPoint.js");\r\nCircle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/circle/GetPoints.js");\r\nCircle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/circle/Offset.js");\r\nCircle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/circle/OffsetPoint.js");\r\nCircle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/circle/Random.js");\r\n\r\nmodule.exports = Circle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/circle/index.js?')},"./node_modules/phaser/src/geom/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GEOM_CONST = {\r\n\r\n /**\r\n * A Circle Geometry object type.\r\n * \r\n * @name Phaser.Geom.CIRCLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n CIRCLE: 0,\r\n\r\n /**\r\n * An Ellipse Geometry object type.\r\n * \r\n * @name Phaser.Geom.ELLIPSE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n ELLIPSE: 1,\r\n\r\n /**\r\n * A Line Geometry object type.\r\n * \r\n * @name Phaser.Geom.LINE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n LINE: 2,\r\n\r\n /**\r\n * A Point Geometry object type.\r\n * \r\n * @name Phaser.Geom.POINT\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POINT: 3,\r\n\r\n /**\r\n * A Polygon Geometry object type.\r\n * \r\n * @name Phaser.Geom.POLYGON\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n POLYGON: 4,\r\n\r\n /**\r\n * A Rectangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.RECTANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n RECTANGLE: 5,\r\n\r\n /**\r\n * A Triangle Geometry object type.\r\n * \r\n * @name Phaser.Geom.TRIANGLE\r\n * @type {integer}\r\n * @since 3.19.0\r\n */\r\n TRIANGLE: 6\r\n\r\n};\r\n\r\nmodule.exports = GEOM_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/const.js?")},"./node_modules/phaser/src/geom/ellipse/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the area of.\r\n *\r\n * @return {number} The area of the Ellipse.\r\n */\r\nvar Area = function (ellipse)\r\n{\r\n if (ellipse.isEmpty())\r\n {\r\n return 0;\r\n }\r\n\r\n // units squared\r\n return (ellipse.getMajorRadius() * ellipse.getMinorRadius() * Math.PI);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Area.js?")},"./node_modules/phaser/src/geom/ellipse/Circumference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the circumference of the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Circumference\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference of.\r\n *\r\n * @return {number} The circumference of th Ellipse.\r\n */\r\nvar Circumference = function (ellipse)\r\n{\r\n var rx = ellipse.width / 2;\r\n var ry = ellipse.height / 2;\r\n var h = Math.pow((rx - ry), 2) / Math.pow((rx + ry), 2);\r\n\r\n return (Math.PI * (rx + ry)) * (1 + ((3 * h) / (10 + Math.sqrt(4 - (3 * h)))));\r\n};\r\n\r\nmodule.exports = Circumference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Circumference.js?")},"./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse based on the given angle.\r\n *\r\n * @function Phaser.Geom.Ellipse.CircumferencePoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} angle - The angle from the center of the Ellipse to the circumference to return the point from. Given in radians.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point, or point-like object, to store the results in. If not given a Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object where the `x` and `y` properties are the point on the circumference.\r\n */\r\nvar CircumferencePoint = function (ellipse, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var halfWidth = ellipse.width / 2;\r\n var halfHeight = ellipse.height / 2;\r\n\r\n out.x = ellipse.x + halfWidth * Math.cos(angle);\r\n out.y = ellipse.y + halfHeight * Math.sin(angle);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumferencePoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js?')},"./node_modules/phaser/src/geom/ellipse/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\n/**\r\n * Creates a new Ellipse instance based on the values contained in the given source.\r\n *\r\n * @function Phaser.Geom.Ellipse.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The Ellipse to be cloned. Can be an instance of an Ellipse or a ellipse-like object, with x, y, width and height properties.\r\n *\r\n * @return {Phaser.Geom.Ellipse} A clone of the source Ellipse.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Ellipse(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Clone.js?')},"./node_modules/phaser/src/geom/ellipse/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @function Phaser.Geom.Ellipse.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\nvar Contains = function (ellipse, x, y)\r\n{\r\n if (ellipse.width <= 0 || ellipse.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the coords to an ellipse with center 0,0 and a radius of 0.5\r\n var normx = ((x - ellipse.x) / ellipse.width);\r\n var normy = ((y - ellipse.y) / ellipse.height);\r\n\r\n normx *= normx;\r\n normy *= normy;\r\n\r\n return (normx + normy < 0.25);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Contains.js?")},"./node_modules/phaser/src/geom/ellipse/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains the given Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object to check if it\'s within the Circle or not.\r\n *\r\n * @return {boolean} True if the Point coordinates are within the circle, otherwise false.\r\n */\r\nvar ContainsPoint = function (ellipse, point)\r\n{\r\n return Contains(ellipse, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsPoint.js?')},"./node_modules/phaser/src/geom/ellipse/ContainsRect.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\n\r\n/**\r\n * Check to see if the Ellipse contains all four points of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Ellipse.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to check.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle object to check if it\'s within the Ellipse or not.\r\n *\r\n * @return {boolean} True if all of the Rectangle coordinates are within the ellipse, otherwise false.\r\n */\r\nvar ContainsRect = function (ellipse, rect)\r\n{\r\n return (\r\n Contains(ellipse, rect.x, rect.y) &&\r\n Contains(ellipse, rect.right, rect.y) &&\r\n Contains(ellipse, rect.x, rect.bottom) &&\r\n Contains(ellipse, rect.right, rect.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/ContainsRect.js?')},"./node_modules/phaser/src/geom/ellipse/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copies the `x`, `y`, `width` and `height` properties from the `source` Ellipse\r\n * into the given `dest` Ellipse, then returns the `dest` Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} source - The source Ellipse to copy the values from.\r\n * @param {Phaser.Geom.Ellipse} dest - The destination Ellipse to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The destination Ellipse.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/CopyFrom.js?")},"./node_modules/phaser/src/geom/ellipse/Ellipse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Ellipse object.\r\n *\r\n * This is a geometry object, containing numerical values and related methods to inspect and modify them.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render an Ellipse you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Ellipse\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x position of the center of the ellipse.\r\n * @param {number} [y=0] - The y position of the center of the ellipse.\r\n * @param {number} [width=0] - The width of the ellipse.\r\n * @param {number} [height=0] - The height of the ellipse.\r\n */\r\nvar Ellipse = new Class({\r\n\r\n initialize:\r\n\r\n function Ellipse (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.ELLIPSE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Ellipse#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.ELLIPSE;\r\n\r\n /**\r\n * The x position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y position of the center of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Check to see if the Ellipse contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Ellipse#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the ellipse.\r\n * @param {number} y - The y coordinate to check within the ellipse.\r\n *\r\n * @return {boolean} True if the coordinates are within the ellipse, otherwise false.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\n getPoint: function (position, point)\r\n {\r\n return GetPoint(this, position, point);\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Ellipse#getPoints\r\n * @since 3.0.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the x, y, width and height of this ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Ellipse to be empty with a width and height of zero.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setEmpty: function ()\r\n {\r\n this.width = 0;\r\n this.height = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the position of this Ellipse.\r\n *\r\n * @method Phaser.Geom.Ellipse#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x position of the center of the ellipse.\r\n * @param {number} y - The y position of the center of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of this Ellipse.\r\n * Does not change its position.\r\n *\r\n * @method Phaser.Geom.Ellipse#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} [height=width] - The height of the ellipse.\r\n *\r\n * @return {Phaser.Geom.Ellipse} This Ellipse object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks to see if the Ellipse is empty: has a width or height equal to zero.\r\n *\r\n * @method Phaser.Geom.Ellipse#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if the Ellipse is empty, otherwise false.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns the minor radius of the ellipse. Also known as the Semi Minor Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMinorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The minor radius.\r\n */\r\n getMinorRadius: function ()\r\n {\r\n return Math.min(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * Returns the major radius of the ellipse. Also known as the Semi Major Axis.\r\n *\r\n * @method Phaser.Geom.Ellipse#getMajorRadius\r\n * @since 3.0.0\r\n *\r\n * @return {number} The major radius.\r\n */\r\n getMajorRadius: function ()\r\n {\r\n return Math.max(this.width, this.height) / 2;\r\n },\r\n\r\n /**\r\n * The left position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x - (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value + (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y - (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value + (this.height / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Ellipse.\r\n *\r\n * @name Phaser.Geom.Ellipse#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Ellipse.js?')},"./node_modules/phaser/src/geom/ellipse/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of the two given Ellipses.\r\n * Returns `true` if they all match, otherwise returns `false`.\r\n *\r\n * @function Phaser.Geom.Ellipse.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The first Ellipse to compare.\r\n * @param {Phaser.Geom.Ellipse} toCompare - The second Ellipse to compare.\r\n *\r\n * @return {boolean} `true` if the two Ellipse equal each other, otherwise `false`.\r\n */\r\nvar Equals = function (ellipse, toCompare)\r\n{\r\n return (\r\n ellipse.x === toCompare.x &&\r\n ellipse.y === toCompare.y &&\r\n ellipse.width === toCompare.width &&\r\n ellipse.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Equals.js?")},"./node_modules/phaser/src/geom/ellipse/GetBounds.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Returns the bounds of the Ellipse object.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetBounds\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the bounds from.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - A Rectangle, or rectangle-like object, to store the ellipse bounds in. If not given a new Rectangle will be created.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The Rectangle object containing the Ellipse bounds.\r\n */\r\nvar GetBounds = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n out.x = ellipse.left;\r\n out.y = ellipse.top;\r\n out.width = ellipse.width;\r\n out.height = ellipse.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetBounds.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a Point object containing the coordinates of a point on the circumference of the Ellipse\r\n * based on the given angle normalized to the range 0 to 1. I.e. a value of 0.5 will give the point\r\n * at 180 degrees around the circle.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the circumference point on.\r\n * @param {number} position - A value between 0 and 1, where 0 equals 0 degrees, 0.5 equals 180 degrees and 1 equals 360 around the ellipse.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the return values in. If not given a Point object will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point around the ellipse.\r\n */\r\nvar GetPoint = function (ellipse, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var angle = FromPercent(position, 0, MATH_CONST.PI2);\r\n\r\n return CircumferencePoint(ellipse, angle, out);\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoint.js?')},"./node_modules/phaser/src/geom/ellipse/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nvar CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nvar FromPercent = __webpack_require__(/*! ../../math/FromPercent */ "./node_modules/phaser/src/math/FromPercent.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Ellipse.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the circumference of the ellipse and dividing it by the stepRate.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Point objects pertaining to the points around the circumference of the ellipse.\r\n */\r\nvar GetPoints = function (ellipse, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Circumference(ellipse) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var angle = FromPercent(i / quantity, 0, MATH_CONST.PI2);\r\n\r\n out.push(CircumferencePoint(ellipse, angle));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/GetPoints.js?')},"./node_modules/phaser/src/geom/ellipse/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given.\r\n *\r\n * @function Phaser.Geom.Ellipse.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {number} x - The amount to horizontally offset the Ellipse by.\r\n * @param {number} y - The amount to vertically offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar Offset = function (ellipse, x, y)\r\n{\r\n ellipse.x += x;\r\n ellipse.y += y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Offset.js?")},"./node_modules/phaser/src/geom/ellipse/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offsets the Ellipse by the values given in the `x` and `y` properties of the Point object.\r\n *\r\n * @function Phaser.Geom.Ellipse.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Ellipse} O - [ellipse,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to be offset (translated.)\r\n * @param {(Phaser.Geom.Point|object)} point - The Point object containing the values to offset the Ellipse by.\r\n *\r\n * @return {Phaser.Geom.Ellipse} The Ellipse that was offset.\r\n */\r\nvar OffsetPoint = function (ellipse, point)\r\n{\r\n ellipse.x += point.x;\r\n ellipse.y += point.y;\r\n\r\n return ellipse;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/OffsetPoint.js?")},"./node_modules/phaser/src/geom/ellipse/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a uniformly distributed random point from anywhere within the given Ellipse.\r\n *\r\n * @function Phaser.Geom.Ellipse.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Ellipse} ellipse - The Ellipse to get a random point from.\r\n * @param {(Phaser.Geom.Point|object)} [out] - A Point or point-like object to set the random `x` and `y` values in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object with the random values set in the `x` and `y` properties.\r\n */\r\nvar Random = function (ellipse, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var p = Math.random() * Math.PI * 2;\r\n var s = Math.sqrt(Math.random());\r\n\r\n out.x = ellipse.x + ((s * Math.cos(p)) * ellipse.width / 2);\r\n out.y = ellipse.y + ((s * Math.sin(p)) * ellipse.height / 2);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/Random.js?')},"./node_modules/phaser/src/geom/ellipse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Ellipse = __webpack_require__(/*! ./Ellipse */ "./node_modules/phaser/src/geom/ellipse/Ellipse.js");\r\n\r\nEllipse.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/ellipse/Area.js");\r\nEllipse.Circumference = __webpack_require__(/*! ./Circumference */ "./node_modules/phaser/src/geom/ellipse/Circumference.js");\r\nEllipse.CircumferencePoint = __webpack_require__(/*! ./CircumferencePoint */ "./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js");\r\nEllipse.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/ellipse/Clone.js");\r\nEllipse.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/ellipse/Contains.js");\r\nEllipse.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/ellipse/ContainsPoint.js");\r\nEllipse.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/ellipse/ContainsRect.js");\r\nEllipse.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/ellipse/CopyFrom.js");\r\nEllipse.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/ellipse/Equals.js");\r\nEllipse.GetBounds = __webpack_require__(/*! ./GetBounds */ "./node_modules/phaser/src/geom/ellipse/GetBounds.js");\r\nEllipse.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/ellipse/GetPoint.js");\r\nEllipse.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/ellipse/GetPoints.js");\r\nEllipse.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/ellipse/Offset.js");\r\nEllipse.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/ellipse/OffsetPoint.js");\r\nEllipse.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/ellipse/Random.js");\r\n\r\nmodule.exports = Ellipse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/ellipse/index.js?')},"./node_modules/phaser/src/geom/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Geom\r\n */\r\n\r\nvar Geom = {\r\n \r\n Circle: __webpack_require__(/*! ./circle */ "./node_modules/phaser/src/geom/circle/index.js"),\r\n Ellipse: __webpack_require__(/*! ./ellipse */ "./node_modules/phaser/src/geom/ellipse/index.js"),\r\n Intersects: __webpack_require__(/*! ./intersects */ "./node_modules/phaser/src/geom/intersects/index.js"),\r\n Line: __webpack_require__(/*! ./line */ "./node_modules/phaser/src/geom/line/index.js"),\r\n Point: __webpack_require__(/*! ./point */ "./node_modules/phaser/src/geom/point/index.js"),\r\n Polygon: __webpack_require__(/*! ./polygon */ "./node_modules/phaser/src/geom/polygon/index.js"),\r\n Rectangle: __webpack_require__(/*! ./rectangle */ "./node_modules/phaser/src/geom/rectangle/index.js"),\r\n Triangle: __webpack_require__(/*! ./triangle */ "./node_modules/phaser/src/geom/triangle/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nGeom = Extend(false, Geom, CONST);\r\n\r\nmodule.exports = Geom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/index.js?')},"./node_modules/phaser/src/geom/intersects/CircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js");\r\n\r\n/**\r\n * Checks if two Circles intersect.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Circles intersect, otherwise `false`.\r\n */\r\nvar CircleToCircle = function (circleA, circleB)\r\n{\r\n return (DistanceBetween(circleA.x, circleA.y, circleB.x, circleB.y) <= (circleA.radius + circleB.radius));\r\n};\r\n\r\nmodule.exports = CircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/CircleToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.CircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar CircleToRectangle = function (circle, rect)\r\n{\r\n var halfWidth = rect.width / 2;\r\n var halfHeight = rect.height / 2;\r\n\r\n var cx = Math.abs(circle.x - rect.x - halfWidth);\r\n var cy = Math.abs(circle.y - rect.y - halfHeight);\r\n var xDist = halfWidth + circle.radius;\r\n var yDist = halfHeight + circle.radius;\r\n\r\n if (cx > xDist || cy > yDist)\r\n {\r\n return false;\r\n }\r\n else if (cx <= halfWidth || cy <= halfHeight)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n var xCornerDist = cx - halfWidth;\r\n var yCornerDist = cy - halfHeight;\r\n var xCornerDistSq = xCornerDist * xCornerDist;\r\n var yCornerDistSq = yCornerDist * yCornerDist;\r\n var maxCornerDistSq = circle.radius * circle.radius;\r\n\r\n return (xCornerDistSq + yCornerDistSq <= maxCornerDistSq);\r\n }\r\n};\r\n\r\nmodule.exports = CircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/CircleToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar CircleToCircle = __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js");\r\n\r\n/**\r\n * Checks if two Circles intersect and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circleA - The first Circle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circleB - The second Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToCircle = function (circleA, circleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToCircle(circleA, circleB))\r\n {\r\n var x0 = circleA.x;\r\n var y0 = circleA.y;\r\n var r0 = circleA.radius;\r\n\r\n var x1 = circleB.x;\r\n var y1 = circleB.y;\r\n var r1 = circleB.radius;\r\n\r\n var coefficientA, coefficientB, coefficientC, lambda, x;\r\n\r\n if (y0 === y1)\r\n {\r\n x = ((r1 * r1) - (r0 * r0) - (x1 * x1) + (x0 * x0)) / (2 * (x0 - x1));\r\n\r\n coefficientA = 1;\r\n coefficientB = -2 * y1;\r\n coefficientC = (x1 * x1) + (x * x) - (2 * x1 * x) + (y1 * y1) - (r1 * r1);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n out.push(new Point(x, (-coefficientB / (2 * coefficientA))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n out.push(new Point(x, (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA)));\r\n out.push(new Point(x, (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA)));\r\n }\r\n }\r\n else\r\n {\r\n var v1 = (x0 - x1) / (y0 - y1);\r\n var n = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\r\n\r\n coefficientA = (v1 * v1) + 1;\r\n coefficientB = (2 * y0 * v1) - (2 * n * v1) - (2 * x0);\r\n coefficientC = (x0 * x0) + (y0 * y0) + (n * n) - (r0 * r0) - (2 * y0 * n);\r\n\r\n lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n if (lambda === 0)\r\n {\r\n x = (-coefficientB / (2 * coefficientA));\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n else if (lambda > 0)\r\n {\r\n x = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n x = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n out.push(new Point(x, (n - (x * v1))));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar CircleToRectangle = __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between a circle and a rectangle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetCircleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Circle} circle - The circle to be checked.\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to be checked.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetCircleToRectangle = function (circle, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (CircleToRectangle(circle, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n GetLineToCircle(lineD, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCircleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToCircle = function (line, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToCircle(line, circle))\r\n {\r\n var lx1 = line.x1;\r\n var ly1 = line.y1;\r\n\r\n var lx2 = line.x2;\r\n var ly2 = line.y2;\r\n\r\n var cx = circle.x;\r\n var cy = circle.y;\r\n var cr = circle.radius;\r\n\r\n var lDirX = lx2 - lx1;\r\n var lDirY = ly2 - ly1;\r\n var oDirX = lx1 - cx;\r\n var oDirY = ly1 - cy;\r\n\r\n var coefficientA = lDirX * lDirX + lDirY * lDirY;\r\n var coefficientB = 2 * (lDirX * oDirX + lDirY * oDirY);\r\n var coefficientC = oDirX * oDirX + oDirY * oDirY - cr * cr;\r\n\r\n var lambda = (coefficientB * coefficientB) - (4 * coefficientA * coefficientC);\r\n\r\n var x, y;\r\n\r\n if (lambda === 0)\r\n {\r\n var root = -coefficientB / (2 * coefficientA);\r\n x = lx1 + root * lDirX;\r\n y = ly1 + root * lDirY;\r\n if (root >= 0 && root <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n else if (lambda > 0)\r\n {\r\n var root1 = (-coefficientB - Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root1 * lDirX;\r\n y = ly1 + root1 * lDirY;\r\n if (root1 >= 0 && root1 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n\r\n var root2 = (-coefficientB + Math.sqrt(lambda)) / (2 * coefficientA);\r\n x = lx1 + root2 * lDirX;\r\n y = ly1 + root2 * lDirY;\r\n if (root2 >= 0 && root2 <= 1)\r\n {\r\n out.push(new Point(x, y));\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar LineToRectangle = __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetLineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetLineToRectangle = function (line, rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (LineToRectangle(line, rect))\r\n {\r\n var lineA = rect.getLineA();\r\n var lineB = rect.getLineB();\r\n var lineC = rect.getLineC();\r\n var lineD = rect.getLineD();\r\n\r\n var output = [ new Point(), new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2]),\r\n LineToLine(lineD, line, output[3])\r\n ];\r\n\r\n for (var i = 0; i < 4; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetLineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object.\r\n * \r\n * If optional `output` parameter is omitted, new Rectangle object is created and returned. If there is intersection, it will contain intersection area. If there is no intersection, it wil be empty Rectangle (all values set to zero).\r\n * \r\n * If Rectangle object is passed as `output` and there is intersection, then intersection area data will be loaded into it and it will be returned. If there is no intersetion, it will be returned without any change.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleIntersection\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object. If given, the intersection data will be loaded into it (in case of no intersection, it will be left unchanged). Otherwise, new Rectangle object will be created and returned with either intersection data or empty (all values set to zero), if there is no intersection.\r\n *\r\n * @return {Phaser.Geom.Rectangle} A rectangle object with intersection data.\r\n */\r\nvar GetRectangleIntersection = function (rectA, rectB, output)\r\n{\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n output.x = Math.max(rectA.x, rectB.x);\r\n output.y = Math.max(rectA.y, rectB.y);\r\n output.width = Math.min(rectA.right, rectB.right) - output.x;\r\n output.height = Math.min(rectA.bottom, rectB.bottom) - output.y;\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetRectangleIntersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\nvar RectangleToRectangle = __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Checks if two Rectangles intersect and returns the intersection points as a Point object array.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToRectangle = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToRectangle(rectA, rectB))\r\n {\r\n var lineA = rectA.getLineA();\r\n var lineB = rectA.getLineB();\r\n var lineC = rectA.getLineC();\r\n var lineD = rectA.getLineD();\r\n\r\n GetLineToRectangle(lineA, rectB, out);\r\n GetLineToRectangle(lineB, rectB, out);\r\n GetLineToRectangle(lineC, rectB, out);\r\n GetLineToRectangle(lineD, rectB, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RectangleToTriangle = __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js");\r\nvar GetLineToRectangle = __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape,\r\n * and returns the intersection points as a Point object array.\r\n *\r\n * @function Phaser.Geom.Intersects.GetRectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetRectangleToTriangle = function (rect, triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (RectangleToTriangle(rect, triangle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToRectangle(lineA, rect, out);\r\n GetLineToRectangle(lineB, rect, out);\r\n GetLineToRectangle(lineC, rect, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetLineToCircle = __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js");\r\nvar TriangleToCircle = __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToCircle = function (triangle, circle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToCircle(triangle, circle))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n GetLineToCircle(lineA, circle, out);\r\n GetLineToCircle(lineB, circle, out);\r\n GetLineToCircle(lineC, circle, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar TriangleToLine = __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array.\r\n *\r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToLine = function (triangle, line, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToLine(triangle, line))\r\n {\r\n var lineA = triangle.getLineA();\r\n var lineB = triangle.getLineB();\r\n var lineC = triangle.getLineC();\r\n\r\n var output = [ new Point(), new Point(), new Point() ];\r\n\r\n var result = [\r\n LineToLine(lineA, line, output[0]),\r\n LineToLine(lineB, line, output[1]),\r\n LineToLine(lineC, line, output[2])\r\n ];\r\n\r\n for (var i = 0; i < 3; i++)\r\n {\r\n if (result[i]) { out.push(output[i]); }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Florian Vazelle\r\n * @author Geoffrey Glaive\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TriangleToTriangle = __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js");\r\nvar GetTriangleToLine = __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect, and returns the intersection points as a Point object array.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.GetTriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n * @param {array} [out] - An optional array in which to store the points of intersection.\r\n *\r\n * @return {array} An array with the points of intersection if objects intersect, otherwise an empty array.\r\n */\r\nvar GetTriangleToTriangle = function (triangleA, triangleB, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (TriangleToTriangle(triangleA, triangleB))\r\n {\r\n var lineA = triangleB.getLineA();\r\n var lineB = triangleB.getLineB();\r\n var lineC = triangleB.getLineC();\r\n\r\n GetTriangleToLine(triangleA, lineA, out);\r\n GetTriangleToLine(triangleA, lineB, out);\r\n GetTriangleToLine(triangleA, lineC, out);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetTriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/LineToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../circle/Contains */ "./node_modules/phaser/src/geom/circle/Contains.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nvar tmp = new Point();\r\n\r\n/**\r\n * Checks for intersection between the line segment and circle.\r\n *\r\n * Based on code by [Matt DesLauriers](https://github.com/mattdesl/line-circle-collision/blob/master/LICENSE.md).\r\n *\r\n * @function Phaser.Geom.Intersects.LineToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line segment to check.\r\n * @param {Phaser.Geom.Circle} circle - The circle to check against the line.\r\n * @param {(Phaser.Geom.Point|any)} [nearest] - An optional Point-like object. If given the closest point on the Line where the circle intersects will be stored in this object.\r\n *\r\n * @return {boolean} `true` if the two objects intersect, otherwise `false`.\r\n */\r\nvar LineToCircle = function (line, circle, nearest)\r\n{\r\n if (nearest === undefined) { nearest = tmp; }\r\n\r\n if (Contains(circle, line.x1, line.y1))\r\n {\r\n nearest.x = line.x1;\r\n nearest.y = line.y1;\r\n\r\n return true;\r\n }\r\n\r\n if (Contains(circle, line.x2, line.y2))\r\n {\r\n nearest.x = line.x2;\r\n nearest.y = line.y2;\r\n\r\n return true;\r\n }\r\n\r\n var dx = line.x2 - line.x1;\r\n var dy = line.y2 - line.y1;\r\n\r\n var lcx = circle.x - line.x1;\r\n var lcy = circle.y - line.y1;\r\n\r\n // project lc onto d, resulting in vector p\r\n var dLen2 = (dx * dx) + (dy * dy);\r\n var px = dx;\r\n var py = dy;\r\n\r\n if (dLen2 > 0)\r\n {\r\n var dp = ((lcx * dx) + (lcy * dy)) / dLen2;\r\n\r\n px *= dp;\r\n py *= dp;\r\n }\r\n\r\n nearest.x = line.x1 + px;\r\n nearest.y = line.y1 + py;\r\n \r\n // len2 of p\r\n var pLen2 = (px * px) + (py * py);\r\n \r\n return (\r\n pLen2 <= dLen2 &&\r\n ((px * dx) + (py * dy)) >= 0 &&\r\n Contains(circle, nearest.x, nearest.y)\r\n );\r\n};\r\n\r\nmodule.exports = LineToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToCircle.js?')},"./node_modules/phaser/src/geom/intersects/LineToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// This is based off an explanation and expanded math presented by Paul Bourke:\r\n// See http:\'local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/\r\n\r\n/**\r\n * Checks if two Lines intersect. If the Lines are identical, they will be treated as parallel and thus non-intersecting.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line1 - The first Line to check.\r\n * @param {Phaser.Geom.Line} line2 - The second Line to check.\r\n * @param {Phaser.Geom.Point} [out] - A Point in which to optionally store the point of intersection.\r\n *\r\n * @return {boolean} `true` if the two Lines intersect, and the `out` object will be populated, if given. Otherwise, `false`.\r\n */\r\nvar LineToLine = function (line1, line2, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line1.x1;\r\n var y1 = line1.y1;\r\n var x2 = line1.x2;\r\n var y2 = line1.y2;\r\n\r\n var x3 = line2.x1;\r\n var y3 = line2.y1;\r\n var x4 = line2.x2;\r\n var y4 = line2.y2;\r\n\r\n var numA = (x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3);\r\n var numB = (x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3);\r\n var deNom = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);\r\n\r\n // Make sure there is not a division by zero - this also indicates that the lines are parallel.\r\n // If numA and numB were both equal to zero the lines would be on top of each other (coincidental).\r\n // This check is not done because it is not necessary for this implementation (the parallel check accounts for this).\r\n\r\n if (deNom === 0)\r\n {\r\n return false;\r\n }\r\n\r\n // Calculate the intermediate fractional point that the lines potentially intersect.\r\n\r\n var uA = numA / deNom;\r\n var uB = numB / deNom;\r\n\r\n // The fractional point will be between 0 and 1 inclusive if the lines intersect.\r\n // If the fractional calculation is larger than 1 or smaller than 0 the lines would need to be longer to intersect.\r\n\r\n if (uA >= 0 && uA <= 1 && uB >= 0 && uB <= 1)\r\n {\r\n out.x = x1 + (uA * (x2 - x1));\r\n out.y = y1 + (uA * (y2 - y1));\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToLine.js?')},"./node_modules/phaser/src/geom/intersects/LineToRectangle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks for intersection between the Line and a Rectangle shape, or a rectangle-like\r\n * object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.\r\n *\r\n * An intersection is considered valid if:\r\n *\r\n * The line starts within, or ends within, the Rectangle.\r\n * The line segment intersects one of the 4 rectangle edges.\r\n *\r\n * The for the purposes of this function rectangles are considered 'solid'.\r\n *\r\n * @function Phaser.Geom.Intersects.LineToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to check for intersection.\r\n * @param {(Phaser.Geom.Rectangle|object)} rect - The Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Line and the Rectangle intersect, `false` otherwise.\r\n */\r\nvar LineToRectangle = function (line, rect)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var bx1 = rect.x;\r\n var by1 = rect.y;\r\n var bx2 = rect.right;\r\n var by2 = rect.bottom;\r\n\r\n var t = 0;\r\n\r\n // If the start or end of the line is inside the rect then we assume\r\n // collision, as rects are solid for our use-case.\r\n\r\n if ((x1 >= bx1 && x1 <= bx2 && y1 >= by1 && y1 <= by2) ||\r\n (x2 >= bx1 && x2 <= bx2 && y2 >= by1 && y2 <= by2))\r\n {\r\n return true;\r\n }\r\n\r\n if (x1 < bx1 && x2 >= bx1)\r\n {\r\n // Left edge\r\n t = y1 + (y2 - y1) * (bx1 - x1) / (x2 - x1);\r\n\r\n if (t > by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (x1 > bx2 && x2 <= bx2)\r\n {\r\n // Right edge\r\n t = y1 + (y2 - y1) * (bx2 - x1) / (x2 - x1);\r\n\r\n if (t >= by1 && t <= by2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n if (y1 < by1 && y2 >= by1)\r\n {\r\n // Top edge\r\n t = x1 + (x2 - x1) * (by1 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n else if (y1 > by2 && y2 <= by2)\r\n {\r\n // Bottom edge\r\n t = x1 + (x2 - x1) * (by2 - y1) / (y2 - y1);\r\n\r\n if (t >= bx1 && t <= bx2)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = LineToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/LineToRectangle.js?")},"./node_modules/phaser/src/geom/intersects/PointToLine.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the a Point falls between the two end-points of a Line, based on the given line thickness.\r\n * \r\n * Assumes that the line end points are circular, not square.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLine\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|any)} point - The point, or point-like object to check.\r\n * @param {Phaser.Geom.Line} line - The line segment to test for intersection on.\r\n * @param {number} [lineThickness=1] - The line thickness. Assumes that the line end points are circular.\r\n *\r\n * @return {boolean} `true` if the Point falls on the Line, otherwise `false`.\r\n */\r\nvar PointToLine = function (point, line, lineThickness)\r\n{\r\n if (lineThickness === undefined) { lineThickness = 1; }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var px = point.x;\r\n var py = point.y;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var r = (((px - x1) * (x2 - x1)) + ((py - y1) * (y2 - y1))) / L2;\r\n\r\n // Assume line thickness is circular\r\n if (r < 0)\r\n {\r\n // Outside line1\r\n return (Math.sqrt(((x1 - px) * (x1 - px)) + ((y1 - py) * (y1 - py))) <= lineThickness);\r\n }\r\n else if ((r >= 0) && (r <= 1))\r\n {\r\n // On the line segment\r\n var s = (((y1 - py) * (x2 - x1)) - ((x1 - px) * (y2 - y1))) / L2;\r\n\r\n return (Math.abs(s) * Math.sqrt(L2) <= lineThickness);\r\n }\r\n else\r\n {\r\n // Outside line2\r\n return (Math.sqrt(((x2 - px) * (x2 - px)) + ((y2 - py) * (y2 - py))) <= lineThickness);\r\n }\r\n};\r\n\r\nmodule.exports = PointToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLine.js?")},"./node_modules/phaser/src/geom/intersects/PointToLineSegment.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PointToLine = __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js");\r\n\r\n/**\r\n * Checks if a Point is located on the given line segment.\r\n *\r\n * @function Phaser.Geom.Intersects.PointToLineSegment\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to check for intersection.\r\n * @param {Phaser.Geom.Line} line - The line segment to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Point is on the given line segment, otherwise `false`.\r\n */\r\nvar PointToLineSegment = function (point, line)\r\n{\r\n if (!PointToLine(point, line))\r\n {\r\n return false;\r\n }\r\n\r\n var xMin = Math.min(line.x1, line.x2);\r\n var xMax = Math.max(line.x1, line.x2);\r\n var yMin = Math.min(line.y1, line.y2);\r\n var yMax = Math.max(line.y1, line.y2);\r\n\r\n return ((point.x >= xMin && point.x <= xMax) && (point.y >= yMin && point.y <= yMax));\r\n};\r\n\r\nmodule.exports = PointToLineSegment;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/PointToLineSegment.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles intersect.\r\n *\r\n * A Rectangle intersects another Rectangle if any part of its bounds is within the other Rectangle\'s bounds. As such, the two Rectangles are considered "solid". A Rectangle with no width or no height will never intersect another Rectangle.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check for intersection.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the two Rectangles intersect, otherwise `false`.\r\n */\r\nvar RectangleToRectangle = function (rectA, rectB)\r\n{\r\n if (rectA.width <= 0 || rectA.height <= 0 || rectB.width <= 0 || rectB.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return !(rectA.right < rectB.x || rectA.bottom < rectB.y || rectA.x > rectB.right || rectA.y > rectB.bottom);\r\n};\r\n\r\nmodule.exports = RectangleToRectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\nvar Contains = __webpack_require__(/*! ../rectangle/Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../rectangle/Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\n\r\n/**\r\n * Checks for intersection between Rectangle shape and Triangle shape.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle object to test.\r\n * @param {Phaser.Geom.Triangle} triangle - Triangle object to test.\r\n *\r\n * @return {boolean} A value of `true` if objects intersect; otherwise `false`.\r\n */\r\nvar RectangleToTriangle = function (rect, triangle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > rect.right ||\r\n triangle.right < rect.left ||\r\n triangle.top > rect.bottom ||\r\n triangle.bottom < rect.top)\r\n {\r\n return false;\r\n }\r\n\r\n var triA = triangle.getLineA();\r\n var triB = triangle.getLineB();\r\n var triC = triangle.getLineC();\r\n\r\n // Are any of the triangle points within the rectangle?\r\n\r\n if (Contains(rect, triA.x1, triA.y1) || Contains(rect, triA.x2, triA.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triB.x1, triB.y1) || Contains(rect, triB.x2, triB.y2))\r\n {\r\n return true;\r\n }\r\n\r\n if (Contains(rect, triC.x1, triC.y1) || Contains(rect, triC.x2, triC.y2))\r\n {\r\n return true;\r\n }\r\n\r\n // Cheap tests over, now to see if any of the lines intersect ...\r\n\r\n var rectA = rect.getLineA();\r\n var rectB = rect.getLineB();\r\n var rectC = rect.getLineC();\r\n var rectD = rect.getLineD();\r\n\r\n if (LineToLine(triA, rectA) || LineToLine(triA, rectB) || LineToLine(triA, rectC) || LineToLine(triA, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triB, rectA) || LineToLine(triB, rectB) || LineToLine(triB, rectC) || LineToLine(triB, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triC, rectA) || LineToLine(triC, rectB) || LineToLine(triC, rectC) || LineToLine(triC, rectD))\r\n {\r\n return true;\r\n }\r\n\r\n // None of the lines intersect, so are any rectangle points within the triangle?\r\n\r\n var points = Decompose(rect);\r\n var within = ContainsArray(triangle, points, true);\r\n\r\n return (within.length > 0);\r\n};\r\n\r\nmodule.exports = RectangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/RectangleToValues.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if rectangle intersects with values.\r\n *\r\n * @function Phaser.Geom.Intersects.RectangleToValues\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle object\r\n * @param {number} left - The x coordinate of the left of the Rectangle.\r\n * @param {number} right - The x coordinate of the right of the Rectangle.\r\n * @param {number} top - The y coordinate of the top of the Rectangle.\r\n * @param {number} bottom - The y coordinate of the bottom of the Rectangle.\r\n * @param {number} [tolerance=0] - Tolerance allowed in the calculation, expressed in pixels.\r\n *\r\n * @return {boolean} Returns true if there is an intersection.\r\n */\r\nvar RectangleToValues = function (rect, left, right, top, bottom, tolerance)\r\n{\r\n if (tolerance === undefined) { tolerance = 0; }\r\n\r\n return !(\r\n left > rect.right + tolerance ||\r\n right < rect.left - tolerance ||\r\n top > rect.bottom + tolerance ||\r\n bottom < rect.top - tolerance\r\n );\r\n};\r\n\r\nmodule.exports = RectangleToValues;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/RectangleToValues.js?")},"./node_modules/phaser/src/geom/intersects/TriangleToCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LineToCircle = __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js");\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Circle intersect.\r\n *\r\n * A Circle intersects a Triangle if its center is located within it or if any of the Triangle\'s sides intersect the Circle. As such, the Triangle and the Circle are considered "solid" for the intersection.\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToCircle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check for intersection.\r\n * @param {Phaser.Geom.Circle} circle - The Circle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangle and the `Circle` intersect, otherwise `false`.\r\n */\r\nvar TriangleToCircle = function (triangle, circle)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangle.left > circle.right ||\r\n triangle.right < circle.left ||\r\n triangle.top > circle.bottom ||\r\n triangle.bottom < circle.top)\r\n {\r\n return false;\r\n }\r\n\r\n if (Contains(triangle, circle.x, circle.y))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineA(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineB(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToCircle(triangle.getLineC(), circle))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToCircle.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToLine.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ../triangle/Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if a Triangle and a Line intersect.\r\n * \r\n * The Line intersects the Triangle if it starts inside of it, ends inside of it, or crosses any of the Triangle\'s sides. Thus, the Triangle is considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToLine\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check with.\r\n * @param {Phaser.Geom.Line} line - The Line to check with.\r\n *\r\n * @return {boolean} `true` if the Triangle and the Line intersect, otherwise `false`.\r\n */\r\nvar TriangleToLine = function (triangle, line)\r\n{\r\n // If the Triangle contains either the start or end point of the line, it intersects\r\n if (Contains(triangle, line.getPointA()) || Contains(triangle, line.getPointB()))\r\n {\r\n return true;\r\n }\r\n\r\n // Now check the line against each line of the Triangle\r\n if (LineToLine(triangle.getLineA(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineB(), line))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(triangle.getLineC(), line))\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToLine;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToLine.js?')},"./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ContainsArray = __webpack_require__(/*! ../triangle/ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nvar Decompose = __webpack_require__(/*! ../triangle/Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nvar LineToLine = __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js");\r\n\r\n/**\r\n * Checks if two Triangles intersect.\r\n *\r\n * A Triangle intersects another Triangle if any pair of their lines intersects or if any point of one Triangle is within the other Triangle. Thus, the Triangles are considered "solid".\r\n *\r\n * @function Phaser.Geom.Intersects.TriangleToTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangleA - The first Triangle to check for intersection.\r\n * @param {Phaser.Geom.Triangle} triangleB - The second Triangle to check for intersection.\r\n *\r\n * @return {boolean} `true` if the Triangles intersect, otherwise `false`.\r\n */\r\nvar TriangleToTriangle = function (triangleA, triangleB)\r\n{\r\n // First the cheapest ones:\r\n\r\n if (\r\n triangleA.left > triangleB.right ||\r\n triangleA.right < triangleB.left ||\r\n triangleA.top > triangleB.bottom ||\r\n triangleA.bottom < triangleB.top)\r\n {\r\n return false;\r\n }\r\n\r\n var lineAA = triangleA.getLineA();\r\n var lineAB = triangleA.getLineB();\r\n var lineAC = triangleA.getLineC();\r\n\r\n var lineBA = triangleB.getLineA();\r\n var lineBB = triangleB.getLineB();\r\n var lineBC = triangleB.getLineC();\r\n\r\n // Now check the lines against each line of TriangleB\r\n if (LineToLine(lineAA, lineBA) || LineToLine(lineAA, lineBB) || LineToLine(lineAA, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAB, lineBA) || LineToLine(lineAB, lineBB) || LineToLine(lineAB, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n if (LineToLine(lineAC, lineBA) || LineToLine(lineAC, lineBB) || LineToLine(lineAC, lineBC))\r\n {\r\n return true;\r\n }\r\n\r\n // Nope, so check to see if any of the points of triangleA are within triangleB\r\n\r\n var points = Decompose(triangleA);\r\n var within = ContainsArray(triangleB, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n // Finally check to see if any of the points of triangleB are within triangleA\r\n\r\n points = Decompose(triangleB);\r\n within = ContainsArray(triangleA, points, true);\r\n\r\n if (within.length > 0)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = TriangleToTriangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js?')},"./node_modules/phaser/src/geom/intersects/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Geom.Intersects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CircleToCircle: __webpack_require__(/*! ./CircleToCircle */ "./node_modules/phaser/src/geom/intersects/CircleToCircle.js"),\r\n CircleToRectangle: __webpack_require__(/*! ./CircleToRectangle */ "./node_modules/phaser/src/geom/intersects/CircleToRectangle.js"),\r\n GetCircleToCircle: __webpack_require__(/*! ./GetCircleToCircle */ "./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js"),\r\n GetCircleToRectangle: __webpack_require__(/*! ./GetCircleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js"),\r\n GetLineToCircle: __webpack_require__(/*! ./GetLineToCircle */ "./node_modules/phaser/src/geom/intersects/GetLineToCircle.js"),\r\n GetLineToRectangle: __webpack_require__(/*! ./GetLineToRectangle */ "./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js"),\r\n GetRectangleIntersection: __webpack_require__(/*! ./GetRectangleIntersection */ "./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js"),\r\n GetRectangleToRectangle: __webpack_require__(/*! ./GetRectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js"),\r\n GetRectangleToTriangle: __webpack_require__(/*! ./GetRectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js"),\r\n GetTriangleToCircle: __webpack_require__(/*! ./GetTriangleToCircle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js"),\r\n GetTriangleToLine: __webpack_require__(/*! ./GetTriangleToLine */ "./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js"),\r\n GetTriangleToTriangle: __webpack_require__(/*! ./GetTriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js"),\r\n LineToCircle: __webpack_require__(/*! ./LineToCircle */ "./node_modules/phaser/src/geom/intersects/LineToCircle.js"),\r\n LineToLine: __webpack_require__(/*! ./LineToLine */ "./node_modules/phaser/src/geom/intersects/LineToLine.js"),\r\n LineToRectangle: __webpack_require__(/*! ./LineToRectangle */ "./node_modules/phaser/src/geom/intersects/LineToRectangle.js"),\r\n PointToLine: __webpack_require__(/*! ./PointToLine */ "./node_modules/phaser/src/geom/intersects/PointToLine.js"),\r\n PointToLineSegment: __webpack_require__(/*! ./PointToLineSegment */ "./node_modules/phaser/src/geom/intersects/PointToLineSegment.js"),\r\n RectangleToRectangle: __webpack_require__(/*! ./RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js"),\r\n RectangleToTriangle: __webpack_require__(/*! ./RectangleToTriangle */ "./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js"),\r\n RectangleToValues: __webpack_require__(/*! ./RectangleToValues */ "./node_modules/phaser/src/geom/intersects/RectangleToValues.js"),\r\n TriangleToCircle: __webpack_require__(/*! ./TriangleToCircle */ "./node_modules/phaser/src/geom/intersects/TriangleToCircle.js"),\r\n TriangleToLine: __webpack_require__(/*! ./TriangleToLine */ "./node_modules/phaser/src/geom/intersects/TriangleToLine.js"),\r\n TriangleToTriangle: __webpack_require__(/*! ./TriangleToTriangle */ "./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/intersects/index.js?')},"./node_modules/phaser/src/geom/line/Angle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the angle of the line in radians.\r\n *\r\n * @function Phaser.Geom.Line.Angle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of.\r\n *\r\n * @return {number} The angle of the line, in radians.\r\n */\r\nvar Angle = function (line)\r\n{\r\n return Math.atan2(line.y2 - line.y1, line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Angle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Angle.js?")},"./node_modules/phaser/src/geom/line/BresenhamPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Using Bresenham's line algorithm this will return an array of all coordinates on this line.\r\n *\r\n * The `start` and `end` points are rounded before this runs as the algorithm works on integers.\r\n *\r\n * @function Phaser.Geom.Line.BresenhamPoints\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} [stepRate=1] - The optional step rate for the points on the line.\r\n * @param {array} [results] - An optional array to push the resulting coordinates into.\r\n *\r\n * @return {object[]} The array of coordinates on the line.\r\n */\r\nvar BresenhamPoints = function (line, stepRate, results)\r\n{\r\n if (stepRate === undefined) { stepRate = 1; }\r\n if (results === undefined) { results = []; }\r\n\r\n var x1 = Math.round(line.x1);\r\n var y1 = Math.round(line.y1);\r\n var x2 = Math.round(line.x2);\r\n var y2 = Math.round(line.y2);\r\n\r\n var dx = Math.abs(x2 - x1);\r\n var dy = Math.abs(y2 - y1);\r\n var sx = (x1 < x2) ? 1 : -1;\r\n var sy = (y1 < y2) ? 1 : -1;\r\n var err = dx - dy;\r\n\r\n results.push({ x: x1, y: y1 });\r\n\r\n var i = 1;\r\n\r\n while (!((x1 === x2) && (y1 === y2)))\r\n {\r\n var e2 = err << 1;\r\n\r\n if (e2 > -dy)\r\n {\r\n err -= dy;\r\n x1 += sx;\r\n }\r\n\r\n if (e2 < dx)\r\n {\r\n err += dx;\r\n y1 += sy;\r\n }\r\n\r\n if (i % stepRate === 0)\r\n {\r\n results.push({ x: x1, y: y1 });\r\n }\r\n\r\n i++;\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = BresenhamPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/BresenhamPoints.js?")},"./node_modules/phaser/src/geom/line/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n\r\n/**\r\n * Center a line on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Line.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to center.\r\n * @param {number} x - The horizontal coordinate to center the line on.\r\n * @param {number} y - The vertical coordinate to center the line on.\r\n *\r\n * @return {Phaser.Geom.Line} The centered line.\r\n */\r\nvar CenterOn = function (line, x, y)\r\n{\r\n var tx = x - ((line.x1 + line.x2) / 2);\r\n var ty = y - ((line.y1 + line.y2) / 2);\r\n\r\n line.x1 += tx;\r\n line.y1 += ty;\r\n\r\n line.x2 += tx;\r\n line.y2 += ty;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CenterOn.js?")},"./node_modules/phaser/src/geom/line/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Clone the given line.\r\n *\r\n * @function Phaser.Geom.Line.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to clone.\r\n *\r\n * @return {Phaser.Geom.Line} The cloned line.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Line(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Clone.js?')},"./node_modules/phaser/src/geom/line/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one line to a destination line.\r\n *\r\n * @function Phaser.Geom.Line.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Line} source - The source line to copy the values from.\r\n * @param {Phaser.Geom.Line} dest - The destination line to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Line} The destination line.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/CopyFrom.js?")},"./node_modules/phaser/src/geom/line/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compare two lines for strict equality.\r\n *\r\n * @function Phaser.Geom.Line.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The first line to compare.\r\n * @param {Phaser.Geom.Line} toCompare - The second line to compare.\r\n *\r\n * @return {boolean} Whether the two lines are equal.\r\n */\r\nvar Equals = function (line, toCompare)\r\n{\r\n return (\r\n line.x1 === toCompare.x1 &&\r\n line.y1 === toCompare.y1 &&\r\n line.x2 === toCompare.x2 &&\r\n line.y2 === toCompare.y2\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Equals.js?")},"./node_modules/phaser/src/geom/line/Extend.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Extends the start and end points of a Line by the given amounts.\r\n *\r\n * The amounts can be positive or negative. Positive points will increase the length of the line,\r\n * while negative ones will decrease it.\r\n *\r\n * If no `right` value is provided it will extend the length of the line equally in both directions.\r\n *\r\n * Pass a value of zero to leave the start or end point unchanged.\r\n *\r\n * @function Phaser.Geom.Line.Extend\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line instance to extend.\r\n * @param {number} left - The amount to extend the start of the line by.\r\n * @param {number} [right] - The amount to extend the end of the line by. If not given it will be set to the `left` value.\r\n *\r\n * @return {Phaser.Geom.Line} The modified Line instance.\r\n */\r\nvar Extend = function (line, left, right)\r\n{\r\n if (right === undefined) { right = left; }\r\n\r\n var length = Length(line);\r\n\r\n var slopX = line.x2 - line.x1;\r\n var slopY = line.y2 - line.y1;\r\n\r\n if (left)\r\n {\r\n line.x1 = line.x1 - slopX / length * left;\r\n line.y1 = line.y1 - slopY / length * left;\r\n }\r\n\r\n if (right)\r\n {\r\n line.x2 = line.x2 + slopX / length * right;\r\n line.y2 = line.y2 + slopY / length * right;\r\n }\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Extend.js?')},"./node_modules/phaser/src/geom/line/GetMidPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the midpoint of the given line.\r\n *\r\n * @function Phaser.Geom.Line.GetMidPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the midpoint of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the midpoint in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The midpoint of the Line.\r\n */\r\nvar GetMidPoint = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (line.x1 + line.x2) / 2;\r\n out.y = (line.y1 + line.y2) / 2;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetMidPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetMidPoint.js?')},"./node_modules/phaser/src/geom/line/GetNearestPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get the nearest point on a line perpendicular to the given point.\r\n *\r\n * @function Phaser.Geom.Line.GetNearestPoint\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the nearest point on.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the nearest point to.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the nearest point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The nearest point on the line.\r\n */\r\nvar GetNearestPoint = function (line, point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var r = (((point.x - x1) * (x2 - x1)) + ((point.y - y1) * (y2 - y1))) / L2;\r\n\r\n out.x = x1 + (r * (x2 - x1));\r\n out.y = y1 + (r * (y2 - y1));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNearestPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNearestPoint.js?')},"./node_modules/phaser/src/geom/line/GetNormal.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculate the normal of the given line.\r\n *\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.GetNormal\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point object to store the normal in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The normal of the Line.\r\n */\r\nvar GetNormal = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var a = Angle(line) - MATH_CONST.TAU;\r\n\r\n out.x = Math.cos(a);\r\n out.y = Math.sin(a);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetNormal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetNormal.js?')},"./node_modules/phaser/src/geom/line/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @function Phaser.Geom.Line.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The point on the line.\r\n */\r\nvar GetPoint = function (line, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = line.x1 + (line.x2 - line.x1) * position;\r\n out.y = line.y1 + (line.y2 - line.y1) * position;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoint.js?')},"./node_modules/phaser/src/geom/line/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @function Phaser.Geom.Line.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line.\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {number} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\nvar GetPoints = function (line, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Length(line) / stepRate;\r\n }\r\n\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n var x = x1 + (x2 - x1) * position;\r\n var y = y1 + (y2 - y1) * position;\r\n\r\n out.push(new Point(x, y));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetPoints.js?')},"./node_modules/phaser/src/geom/line/GetShortestDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Florian Mertens\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Get the shortest distance from a Line to the given Point.\r\n *\r\n * @function Phaser.Geom.Line.GetShortestDistance\r\n * @since 3.16.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to get the distance from.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to get the shortest distance to.\r\n *\r\n * @return {number} The shortest distance from the line to the point.\r\n */\r\nvar GetShortestDistance = function (line, point)\r\n{\r\n var x1 = line.x1;\r\n var y1 = line.y1;\r\n\r\n var x2 = line.x2;\r\n var y2 = line.y2;\r\n\r\n var L2 = (((x2 - x1) * (x2 - x1)) + ((y2 - y1) * (y2 - y1)));\r\n\r\n if (L2 === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var s = (((y1 - point.y) * (x2 - x1)) - ((x1 - point.x) * (y2 - y1))) / L2;\r\n\r\n return Math.abs(s) * Math.sqrt(L2);\r\n};\r\n\r\nmodule.exports = GetShortestDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/GetShortestDistance.js?")},"./node_modules/phaser/src/geom/line/Height.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the height of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Height\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the height of.\r\n *\r\n * @return {number} The height of the line.\r\n */\r\nvar Height = function (line)\r\n{\r\n return Math.abs(line.y1 - line.y2);\r\n};\r\n\r\nmodule.exports = Height;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Height.js?")},"./node_modules/phaser/src/geom/line/Length.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the length of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Length\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the length of.\r\n *\r\n * @return {number} The length of the line.\r\n */\r\nvar Length = function (line)\r\n{\r\n return Math.sqrt((line.x2 - line.x1) * (line.x2 - line.x1) + (line.y2 - line.y1) * (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = Length;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Length.js?")},"./node_modules/phaser/src/geom/line/Line.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Line segment, a part of a line between two endpoints.\r\n *\r\n * @class Line\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n */\r\nvar Line = new Class({\r\n\r\n initialize:\r\n\r\n function Line (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.LINE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Line#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.LINE;\r\n\r\n /**\r\n * The x coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#x1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * The y coordinate of the lines starting point.\r\n *\r\n * @name Phaser.Geom.Line#y1\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * The x coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#x2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * The y coordinate of the lines ending point.\r\n *\r\n * @name Phaser.Geom.Line#y2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n },\r\n\r\n /**\r\n * Get a point on a line that\'s a given percentage along its length.\r\n *\r\n * @method Phaser.Geom.Line#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - A value between 0 and 1, where 0 is the start, 0.5 is the middle and 1 is the end of the line.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An optional point, or point-like object, to store the coordinates of the point on the line.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point, or point-like object, containing the coordinates of the point on the line.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Get a number of points along a line\'s length.\r\n *\r\n * Provide a `quantity` to get an exact number of points along the line.\r\n *\r\n * Provide a `stepRate` to ensure a specific distance between each point on the line. Set `quantity` to `0` when\r\n * providing a `stepRate`.\r\n *\r\n * @method Phaser.Geom.Line#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to place on the line. Set to `0` to use `stepRate` instead.\r\n * @param {integer} [stepRate] - The distance between each point on the line. When set, `quantity` is implied and should be set to `0`.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An optional array of Points, or point-like objects, to store the coordinates of the points on the line.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points, or point-like objects, containing the coordinates of the points on the line.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Get a random Point on the Line.\r\n *\r\n * @method Phaser.Geom.Line#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {(Phaser.Geom.Point|object)} [point] - An instance of a Point to be modified.\r\n *\r\n * @return {Phaser.Geom.Point} A random Point on the Line.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Set new coordinates for the line endpoints.\r\n *\r\n * @method Phaser.Geom.Line#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - The x coordinate of the lines starting point.\r\n * @param {number} [y1=0] - The y coordinate of the lines starting point.\r\n * @param {number} [x2=0] - The x coordinate of the lines ending point.\r\n * @param {number} [y2=0] - The y coordinate of the lines ending point.\r\n *\r\n * @return {Phaser.Geom.Line} This Line object.\r\n */\r\n setTo: function (x1, y1, x2, y2)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the start of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the start of this Line.\r\n */\r\n getPointA: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x1, this.y1);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * Returns a Vector2 object that corresponds to the end of this Line.\r\n *\r\n * @method Phaser.Geom.Line#getPointB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [vec2,$return]\r\n *\r\n * @param {Phaser.Math.Vector2} [vec2] - A Vector2 object to set the results in. If `undefined` a new Vector2 will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 object that corresponds to the end of this Line.\r\n */\r\n getPointB: function (vec2)\r\n {\r\n if (vec2 === undefined) { vec2 = new Vector2(); }\r\n\r\n vec2.set(this.x2, this.y2);\r\n\r\n return vec2;\r\n },\r\n\r\n /**\r\n * The left position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 <= this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.x1 > this.x2)\r\n {\r\n this.x1 = value;\r\n }\r\n else\r\n {\r\n this.x2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 <= this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom position of the Line.\r\n *\r\n * @name Phaser.Geom.Line#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.y1 > this.y2)\r\n {\r\n this.y1 = value;\r\n }\r\n else\r\n {\r\n this.y2 = value;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Line.js?')},"./node_modules/phaser/src/geom/line/NormalAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * Get the angle of the normal of the given line in radians.\r\n *\r\n * @function Phaser.Geom.Line.NormalAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the angle of the normal of.\r\n *\r\n * @return {number} The angle of the normal of the line in radians.\r\n */\r\nvar NormalAngle = function (line)\r\n{\r\n var angle = Angle(line) - MATH_CONST.TAU;\r\n\r\n return Wrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = NormalAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalAngle.js?')},"./node_modules/phaser/src/geom/line/NormalX.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Line.NormalX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line object to get the normal value from.\r\n *\r\n * @return {number} [description]\r\n */\r\nvar NormalX = function (line)\r\n{\r\n return Math.cos(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalX.js?')},"./node_modules/phaser/src/geom/line/NormalY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\n\r\n/**\r\n * The Y value of the normal of the given line.\r\n * The normal of a line is a vector that points perpendicular from it.\r\n *\r\n * @function Phaser.Geom.Line.NormalY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the normal of.\r\n *\r\n * @return {number} The Y value of the normal of the Line.\r\n */\r\nvar NormalY = function (line)\r\n{\r\n return Math.sin(Angle(line) - MATH_CONST.TAU);\r\n};\r\n\r\nmodule.exports = NormalY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/NormalY.js?')},"./node_modules/phaser/src/geom/line/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Offset a line by the given amount.\r\n *\r\n * @function Phaser.Geom.Line.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to offset.\r\n * @param {number} x - The horizontal offset to add to the line.\r\n * @param {number} y - The vertical offset to add to the line.\r\n *\r\n * @return {Phaser.Geom.Line} The offset line.\r\n */\r\nvar Offset = function (line, x, y)\r\n{\r\n line.x1 += x;\r\n line.y1 += y;\r\n\r\n line.x2 += x;\r\n line.y2 += y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Offset.js?")},"./node_modules/phaser/src/geom/line/PerpSlope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the perpendicular slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.PerpSlope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the perpendicular slope of.\r\n *\r\n * @return {number} The perpendicular slope of the line.\r\n */\r\nvar PerpSlope = function (line)\r\n{\r\n return -((line.x2 - line.x1) / (line.y2 - line.y1));\r\n};\r\n\r\nmodule.exports = PerpSlope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/PerpSlope.js?")},"./node_modules/phaser/src/geom/line/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point on a given Line.\r\n *\r\n * @function Phaser.Geom.Line.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The Line to calculate the random Point on.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An instance of a Point to be modified.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A random Point on the Line.\r\n */\r\nvar Random = function (line, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var t = Math.random();\r\n\r\n out.x = line.x1 + t * (line.x2 - line.x1);\r\n out.y = line.y1 + t * (line.y2 - line.y1);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Random.js?')},"./node_modules/phaser/src/geom/line/ReflectAngle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nvar NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\n\r\n/**\r\n * Calculate the reflected angle between two lines.\r\n *\r\n * This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.\r\n *\r\n * @function Phaser.Geom.Line.ReflectAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} lineA - The first line.\r\n * @param {Phaser.Geom.Line} lineB - The second line.\r\n *\r\n * @return {number} The reflected angle between each line.\r\n */\r\nvar ReflectAngle = function (lineA, lineB)\r\n{\r\n return (2 * NormalAngle(lineB) - Math.PI - Angle(lineA));\r\n};\r\n\r\nmodule.exports = ReflectAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/ReflectAngle.js?')},"./node_modules/phaser/src/geom/line/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around its midpoint by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar Rotate = function (line, angle)\r\n{\r\n var x = (line.x1 + line.x2) / 2;\r\n var y = (line.y1 + line.y2) / 2;\r\n\r\n return RotateAroundXY(line, x, y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Rotate.js?')},"./node_modules/phaser/src/geom/line/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotate a line around a point by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {(Phaser.Geom.Point|object)} point - The point to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundPoint = function (line, point, angle)\r\n{\r\n return RotateAroundXY(line, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/line/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a line around the given coordinates by the given angle in radians.\r\n *\r\n * @function Phaser.Geom.Line.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to rotate.\r\n * @param {number} x - The horizontal coordinate to rotate the line around.\r\n * @param {number} y - The vertical coordinate to rotate the line around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Line} The rotated line.\r\n */\r\nvar RotateAroundXY = function (line, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = line.x1 - x;\r\n var ty = line.y1 - y;\r\n\r\n line.x1 = tx * c - ty * s + x;\r\n line.y1 = tx * s + ty * c + y;\r\n\r\n tx = line.x2 - x;\r\n ty = line.y2 - y;\r\n\r\n line.x2 = tx * c - ty * s + x;\r\n line.y2 = tx * s + ty * c + y;\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/line/SetToAngle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set a line to a given position, angle and length.\r\n *\r\n * @function Phaser.Geom.Line.SetToAngle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to set.\r\n * @param {number} x - The horizontal start position of the line.\r\n * @param {number} y - The vertical start position of the line.\r\n * @param {number} angle - The angle of the line in radians.\r\n * @param {number} length - The length of the line.\r\n *\r\n * @return {Phaser.Geom.Line} The updated line.\r\n */\r\nvar SetToAngle = function (line, x, y, angle, length)\r\n{\r\n line.x1 = x;\r\n line.y1 = y;\r\n\r\n line.x2 = x + (Math.cos(angle) * length);\r\n line.y2 = y + (Math.sin(angle) * length);\r\n\r\n return line;\r\n};\r\n\r\nmodule.exports = SetToAngle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/SetToAngle.js?")},"./node_modules/phaser/src/geom/line/Slope.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the slope of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Slope\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the slope of.\r\n *\r\n * @return {number} The slope of the line.\r\n */\r\nvar Slope = function (line)\r\n{\r\n return (line.y2 - line.y1) / (line.x2 - line.x1);\r\n};\r\n\r\nmodule.exports = Slope;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Slope.js?")},"./node_modules/phaser/src/geom/line/Width.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the width of the given line.\r\n *\r\n * @function Phaser.Geom.Line.Width\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Line} line - The line to calculate the width of.\r\n *\r\n * @return {number} The width of the line.\r\n */\r\nvar Width = function (line)\r\n{\r\n return Math.abs(line.x1 - line.x2);\r\n};\r\n\r\nmodule.exports = Width;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/Width.js?")},"./node_modules/phaser/src/geom/line/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Line = __webpack_require__(/*! ./Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\nLine.Angle = __webpack_require__(/*! ./Angle */ "./node_modules/phaser/src/geom/line/Angle.js");\r\nLine.BresenhamPoints = __webpack_require__(/*! ./BresenhamPoints */ "./node_modules/phaser/src/geom/line/BresenhamPoints.js");\r\nLine.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/line/CenterOn.js");\r\nLine.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/line/Clone.js");\r\nLine.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/line/CopyFrom.js");\r\nLine.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/line/Equals.js");\r\nLine.Extend = __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/geom/line/Extend.js");\r\nLine.GetMidPoint = __webpack_require__(/*! ./GetMidPoint */ "./node_modules/phaser/src/geom/line/GetMidPoint.js");\r\nLine.GetNearestPoint = __webpack_require__(/*! ./GetNearestPoint */ "./node_modules/phaser/src/geom/line/GetNearestPoint.js");\r\nLine.GetNormal = __webpack_require__(/*! ./GetNormal */ "./node_modules/phaser/src/geom/line/GetNormal.js");\r\nLine.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/line/GetPoint.js");\r\nLine.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/line/GetPoints.js");\r\nLine.GetShortestDistance = __webpack_require__(/*! ./GetShortestDistance */ "./node_modules/phaser/src/geom/line/GetShortestDistance.js");\r\nLine.Height = __webpack_require__(/*! ./Height */ "./node_modules/phaser/src/geom/line/Height.js");\r\nLine.Length = __webpack_require__(/*! ./Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nLine.NormalAngle = __webpack_require__(/*! ./NormalAngle */ "./node_modules/phaser/src/geom/line/NormalAngle.js");\r\nLine.NormalX = __webpack_require__(/*! ./NormalX */ "./node_modules/phaser/src/geom/line/NormalX.js");\r\nLine.NormalY = __webpack_require__(/*! ./NormalY */ "./node_modules/phaser/src/geom/line/NormalY.js");\r\nLine.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/line/Offset.js");\r\nLine.PerpSlope = __webpack_require__(/*! ./PerpSlope */ "./node_modules/phaser/src/geom/line/PerpSlope.js");\r\nLine.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/line/Random.js");\r\nLine.ReflectAngle = __webpack_require__(/*! ./ReflectAngle */ "./node_modules/phaser/src/geom/line/ReflectAngle.js");\r\nLine.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/line/Rotate.js");\r\nLine.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/line/RotateAroundPoint.js");\r\nLine.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/line/RotateAroundXY.js");\r\nLine.SetToAngle = __webpack_require__(/*! ./SetToAngle */ "./node_modules/phaser/src/geom/line/SetToAngle.js");\r\nLine.Slope = __webpack_require__(/*! ./Slope */ "./node_modules/phaser/src/geom/line/Slope.js");\r\nLine.Width = __webpack_require__(/*! ./Width */ "./node_modules/phaser/src/geom/line/Width.js");\r\n\r\nmodule.exports = Line;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/line/index.js?')},"./node_modules/phaser/src/geom/point/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to ceil.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.ceil()` applied to its coordinates.\r\n */\r\nvar Ceil = function (point)\r\n{\r\n return point.setTo(Math.ceil(point.x), Math.ceil(point.y));\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Ceil.js?")},"./node_modules/phaser/src/geom/point/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Clone the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to clone.\r\n *\r\n * @return {Phaser.Geom.Point} The cloned Point.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Point(source.x, source.y);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Clone.js?')},"./node_modules/phaser/src/geom/point/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Point to a destination Point.\r\n *\r\n * @function Phaser.Geom.Point.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Point} source - The source Point to copy the values from.\r\n * @param {Phaser.Geom.Point} dest - The destination Point to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Point} The destination Point.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/CopyFrom.js?")},"./node_modules/phaser/src/geom/point/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A comparison of two `Point` objects to see if they are equal.\r\n *\r\n * @function Phaser.Geom.Point.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The original `Point` to compare against.\r\n * @param {Phaser.Geom.Point} toCompare - The second `Point` to compare.\r\n *\r\n * @return {boolean} Returns true if the both `Point` objects are equal.\r\n */\r\nvar Equals = function (point, toCompare)\r\n{\r\n return (point.x === toCompare.x && point.y === toCompare.y);\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Equals.js?")},"./node_modules/phaser/src/geom/point/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Apply `Math.ceil()` to each coordinate of the given Point.\r\n *\r\n * @function Phaser.Geom.Point.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to floor.\r\n *\r\n * @return {Phaser.Geom.Point} The Point with `Math.floor()` applied to its coordinates.\r\n */\r\nvar Floor = function (point)\r\n{\r\n return point.setTo(Math.floor(point.x), Math.floor(point.y));\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Floor.js?")},"./node_modules/phaser/src/geom/point/GetCentroid.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ \"./node_modules/phaser/src/geom/point/Point.js\");\r\n\r\n/**\r\n * Get the centroid or geometric center of a plane figure (the arithmetic mean position of all the points in the figure).\r\n * Informally, it is the point at which a cutout of the shape could be perfectly balanced on the tip of a pin.\r\n *\r\n * @function Phaser.Geom.Point.GetCentroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetCentroid = function (points, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n throw new Error('GetCentroid points argument must be an array');\r\n }\r\n\r\n var len = points.length;\r\n\r\n if (len < 1)\r\n {\r\n throw new Error('GetCentroid points array must not be empty');\r\n }\r\n else if (len === 1)\r\n {\r\n out.x = points[0].x;\r\n out.y = points[0].y;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < len; i++)\r\n {\r\n out.x += points[i].x;\r\n out.y += points[i].y;\r\n }\r\n\r\n out.x /= len;\r\n out.y /= len;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCentroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetCentroid.js?")},"./node_modules/phaser/src/geom/point/GetMagnitude.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the magnitude of the point, which equivalent to the length of the line from the origin to this point.\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - The point to calculate the magnitude for\r\n *\r\n * @return {number} The resulting magnitude\r\n */\r\nvar GetMagnitude = function (point)\r\n{\r\n return Math.sqrt((point.x * point.x) + (point.y * point.y));\r\n};\r\n\r\nmodule.exports = GetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitude.js?")},"./node_modules/phaser/src/geom/point/GetMagnitudeSq.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the square of magnitude of given point.(Can be used for fast magnitude calculation of point)\r\n *\r\n * @function Phaser.Geom.Point.GetMagnitudeSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point} point - Returns square of the magnitude/length of given point.\r\n *\r\n * @return {number} Returns square of the magnitude of given point.\r\n */\r\nvar GetMagnitudeSq = function (point)\r\n{\r\n return (point.x * point.x) + (point.y * point.y);\r\n};\r\n\r\nmodule.exports = GetMagnitudeSq;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetMagnitudeSq.js?")},"./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.\r\n *\r\n * @function Phaser.Geom.Point.GetRectangleFromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point[]} points - [description]\r\n * @param {Phaser.Geom.Rectangle} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Rectangle} [description]\r\n */\r\nvar GetRectangleFromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var xMax = Number.NEGATIVE_INFINITY;\r\n var xMin = Number.POSITIVE_INFINITY;\r\n var yMax = Number.NEGATIVE_INFINITY;\r\n var yMin = Number.POSITIVE_INFINITY;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var point = points[i];\r\n\r\n if (point.x > xMax)\r\n {\r\n xMax = point.x;\r\n }\r\n\r\n if (point.x < xMin)\r\n {\r\n xMin = point.x;\r\n }\r\n\r\n if (point.y > yMax)\r\n {\r\n yMax = point.y;\r\n }\r\n\r\n if (point.y < yMin)\r\n {\r\n yMin = point.y;\r\n }\r\n }\r\n\r\n out.x = xMin;\r\n out.y = yMin;\r\n out.width = xMax - xMin;\r\n out.height = yMax - yMin;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetRectangleFromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js?')},"./node_modules/phaser/src/geom/point/Interpolate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Interpolate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - The starting `Point` for the interpolation.\r\n * @param {Phaser.Geom.Point} pointB - The target `Point` for the interpolation.\r\n * @param {number} [t=0] - The amount to interpolate between the two points. Generally, a value between 0 (returns the starting `Point`) and 1 (returns the target `Point`). If omitted, 0 is used.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An optional `Point` object whose `x` and `y` values will be set to the result of the interpolation (can also be any object with `x` and `y` properties). If omitted, a new `Point` created and returned.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Either the object from the `out` argument with the properties `x` and `y` set to the result of the interpolation or a newly created `Point` object.\r\n */\r\nvar Interpolate = function (pointA, pointB, t, out)\r\n{\r\n if (t === undefined) { t = 0; }\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = pointA.x + ((pointB.x - pointA.x) * t);\r\n out.y = pointA.y + ((pointB.y - pointA.y) * t);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Interpolate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Interpolate.js?')},"./node_modules/phaser/src/geom/point/Invert.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the X and the Y coordinate of a point.\r\n *\r\n * @function Phaser.Geom.Point.Invert\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to modify.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `point`.\r\n */\r\nvar Invert = function (point)\r\n{\r\n return point.setTo(point.y, point.x);\r\n};\r\n\r\nmodule.exports = Invert;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Invert.js?")},"./node_modules/phaser/src/geom/point/Negative.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Inverts a Point\'s coordinates.\r\n *\r\n * @function Phaser.Geom.Point.Negative\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to invert.\r\n * @param {Phaser.Geom.Point} [out] - The Point to return the inverted coordinates in.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` Point, or a new Point if none was provided.\r\n */\r\nvar Negative = function (point, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n return out.setTo(-point.x, -point.y);\r\n};\r\n\r\nmodule.exports = Negative;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Negative.js?')},"./node_modules/phaser/src/geom/point/Point.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\n\r\n/**\r\n * @classdesc\r\n * Defines a Point in 2D space, with an x and y component.\r\n *\r\n * @class Point\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n */\r\nvar Point = new Class({\r\n\r\n initialize:\r\n\r\n function Point (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POINT`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Point#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POINT;\r\n\r\n /**\r\n * The x coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y coordinate of this Point.\r\n *\r\n * @name Phaser.Geom.Point#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n },\r\n\r\n /**\r\n * Set the x and y coordinates of the point to the given values.\r\n *\r\n * @method Phaser.Geom.Point#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of this Point.\r\n * @param {number} [y=x] - The y coordinate of this Point.\r\n *\r\n * @return {Phaser.Geom.Point} This Point object.\r\n */\r\n setTo: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Point.js?')},"./node_modules/phaser/src/geom/point/Project.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.Project\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Project = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var dot = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n var amt = dot / GetMagnitudeSq(pointB);\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Project;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/Project.js?')},"./node_modules/phaser/src/geom/point/ProjectUnit.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Point.ProjectUnit\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Point} pointA - [description]\r\n * @param {Phaser.Geom.Point} pointB - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar ProjectUnit = function (pointA, pointB, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var amt = ((pointA.x * pointB.x) + (pointA.y * pointB.y));\r\n\r\n if (amt !== 0)\r\n {\r\n out.x = amt * pointB.x;\r\n out.y = amt * pointB.y;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ProjectUnit;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/ProjectUnit.js?')},"./node_modules/phaser/src/geom/point/SetMagnitude.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\n\r\n/**\r\n * Changes the magnitude (length) of a two-dimensional vector without changing its direction.\r\n *\r\n * @function Phaser.Geom.Point.SetMagnitude\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} point - The Point to treat as the end point of the vector.\r\n * @param {number} magnitude - The new magnitude of the vector.\r\n *\r\n * @return {Phaser.Geom.Point} The modified Point.\r\n */\r\nvar SetMagnitude = function (point, magnitude)\r\n{\r\n if (point.x !== 0 || point.y !== 0)\r\n {\r\n var m = GetMagnitude(point);\r\n\r\n point.x /= m;\r\n point.y /= m;\r\n }\r\n\r\n point.x *= magnitude;\r\n point.y *= magnitude;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = SetMagnitude;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/SetMagnitude.js?')},"./node_modules/phaser/src/geom/point/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ./Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\nPoint.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/point/Ceil.js");\r\nPoint.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/point/Clone.js");\r\nPoint.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/point/CopyFrom.js");\r\nPoint.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/point/Equals.js");\r\nPoint.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/point/Floor.js");\r\nPoint.GetCentroid = __webpack_require__(/*! ./GetCentroid */ "./node_modules/phaser/src/geom/point/GetCentroid.js");\r\nPoint.GetMagnitude = __webpack_require__(/*! ./GetMagnitude */ "./node_modules/phaser/src/geom/point/GetMagnitude.js");\r\nPoint.GetMagnitudeSq = __webpack_require__(/*! ./GetMagnitudeSq */ "./node_modules/phaser/src/geom/point/GetMagnitudeSq.js");\r\nPoint.GetRectangleFromPoints = __webpack_require__(/*! ./GetRectangleFromPoints */ "./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js");\r\nPoint.Interpolate = __webpack_require__(/*! ./Interpolate */ "./node_modules/phaser/src/geom/point/Interpolate.js");\r\nPoint.Invert = __webpack_require__(/*! ./Invert */ "./node_modules/phaser/src/geom/point/Invert.js");\r\nPoint.Negative = __webpack_require__(/*! ./Negative */ "./node_modules/phaser/src/geom/point/Negative.js");\r\nPoint.Project = __webpack_require__(/*! ./Project */ "./node_modules/phaser/src/geom/point/Project.js");\r\nPoint.ProjectUnit = __webpack_require__(/*! ./ProjectUnit */ "./node_modules/phaser/src/geom/point/ProjectUnit.js");\r\nPoint.SetMagnitude = __webpack_require__(/*! ./SetMagnitude */ "./node_modules/phaser/src/geom/point/SetMagnitude.js");\r\n\r\nmodule.exports = Point;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/point/index.js?')},"./node_modules/phaser/src/geom/polygon/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\n/**\r\n * Create a new polygon which is a copy of the specified polygon\r\n *\r\n * @function Phaser.Geom.Polygon.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to create a clone of\r\n *\r\n * @return {Phaser.Geom.Polygon} A new separate Polygon cloned from the specified polygon, based on the same points.\r\n */\r\nvar Clone = function (polygon)\r\n{\r\n return new Polygon(polygon.points);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Clone.js?')},"./node_modules/phaser/src/geom/polygon/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Checks whether the x and y coordinates are contained within this polygon.\r\n// Adapted from http://www.ecse.rpi.edu/Homepages/wrf/Research/Short_Notes/pnpoly.html by Jonas Raoni Soares Silva\r\n\r\n/**\r\n * Checks if a point is within the bounds of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to check against.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the bounds of the Polygon, otherwise `false`.\r\n */\r\nvar Contains = function (polygon, x, y)\r\n{\r\n var inside = false;\r\n\r\n for (var i = -1, j = polygon.points.length - 1; ++i < polygon.points.length; j = i)\r\n {\r\n var ix = polygon.points[i].x;\r\n var iy = polygon.points[i].y;\r\n\r\n var jx = polygon.points[j].x;\r\n var jy = polygon.points[j].y;\r\n\r\n if (((iy <= y && y < jy) || (jy <= y && y < iy)) && (x < (jx - ix) * (y - iy) / (jy - iy) + ix))\r\n {\r\n inside = !inside;\r\n }\r\n }\r\n\r\n return inside;\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Contains.js?")},"./node_modules/phaser/src/geom/polygon/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Polygon.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - [description]\r\n * @param {Phaser.Geom.Point} point - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\nvar ContainsPoint = function (polygon, point)\r\n{\r\n return Contains(polygon, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/ContainsPoint.js?')},"./node_modules/phaser/src/geom/polygon/Earcut.js":function(module,exports,__webpack_require__){"use strict";eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Earcut 2.1.4 (December 4th 2018)\r\n\r\n/*\r\n * ISC License\r\n * \r\n * Copyright (c) 2016, Mapbox\r\n * \r\n * Permission to use, copy, modify, and/or distribute this software for any purpose\r\n * with or without fee is hereby granted, provided that the above copyright notice\r\n * and this permission notice appear in all copies.\r\n * \r\n * THE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\n * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND\r\n * FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\n * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\r\n * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER\r\n * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\r\n * THIS SOFTWARE.\r\n */\r\n\r\n\r\n\r\nmodule.exports = earcut;\r\n\r\nfunction earcut(data, holeIndices, dim) {\r\n\r\n dim = dim || 2;\r\n\r\n var hasHoles = holeIndices && holeIndices.length,\r\n outerLen = hasHoles ? holeIndices[0] * dim : data.length,\r\n outerNode = linkedList(data, 0, outerLen, dim, true),\r\n triangles = [];\r\n\r\n if (!outerNode || outerNode.next === outerNode.prev) return triangles;\r\n\r\n var minX, minY, maxX, maxY, x, y, invSize;\r\n\r\n if (hasHoles) outerNode = eliminateHoles(data, holeIndices, outerNode, dim);\r\n\r\n // if the shape is not too simple, we'll use z-order curve hash later; calculate polygon bbox\r\n if (data.length > 80 * dim) {\r\n minX = maxX = data[0];\r\n minY = maxY = data[1];\r\n\r\n for (var i = dim; i < outerLen; i += dim) {\r\n x = data[i];\r\n y = data[i + 1];\r\n if (x < minX) minX = x;\r\n if (y < minY) minY = y;\r\n if (x > maxX) maxX = x;\r\n if (y > maxY) maxY = y;\r\n }\r\n\r\n // minX, minY and invSize are later used to transform coords into integers for z-order calculation\r\n invSize = Math.max(maxX - minX, maxY - minY);\r\n invSize = invSize !== 0 ? 1 / invSize : 0;\r\n }\r\n\r\n earcutLinked(outerNode, triangles, dim, minX, minY, invSize);\r\n\r\n return triangles;\r\n}\r\n\r\n// create a circular doubly linked list from polygon points in the specified winding order\r\nfunction linkedList(data, start, end, dim, clockwise) {\r\n var i, last;\r\n\r\n if (clockwise === (signedArea(data, start, end, dim) > 0)) {\r\n for (i = start; i < end; i += dim) last = insertNode(i, data[i], data[i + 1], last);\r\n } else {\r\n for (i = end - dim; i >= start; i -= dim) last = insertNode(i, data[i], data[i + 1], last);\r\n }\r\n\r\n if (last && equals(last, last.next)) {\r\n removeNode(last);\r\n last = last.next;\r\n }\r\n\r\n return last;\r\n}\r\n\r\n// eliminate colinear or duplicate points\r\nfunction filterPoints(start, end) {\r\n if (!start) return start;\r\n if (!end) end = start;\r\n\r\n var p = start,\r\n again;\r\n do {\r\n again = false;\r\n\r\n if (!p.steiner && (equals(p, p.next) || area(p.prev, p, p.next) === 0)) {\r\n removeNode(p);\r\n p = end = p.prev;\r\n if (p === p.next) break;\r\n again = true;\r\n\r\n } else {\r\n p = p.next;\r\n }\r\n } while (again || p !== end);\r\n\r\n return end;\r\n}\r\n\r\n// main ear slicing loop which triangulates a polygon (given as a linked list)\r\nfunction earcutLinked(ear, triangles, dim, minX, minY, invSize, pass) {\r\n if (!ear) return;\r\n\r\n // interlink polygon nodes in z-order\r\n if (!pass && invSize) indexCurve(ear, minX, minY, invSize);\r\n\r\n var stop = ear,\r\n prev, next;\r\n\r\n // iterate through ears, slicing them one by one\r\n while (ear.prev !== ear.next) {\r\n prev = ear.prev;\r\n next = ear.next;\r\n\r\n if (invSize ? isEarHashed(ear, minX, minY, invSize) : isEar(ear)) {\r\n // cut off the triangle\r\n triangles.push(prev.i / dim);\r\n triangles.push(ear.i / dim);\r\n triangles.push(next.i / dim);\r\n\r\n removeNode(ear);\r\n\r\n // skipping the next vertex leads to less sliver triangles\r\n ear = next.next;\r\n stop = next.next;\r\n\r\n continue;\r\n }\r\n\r\n ear = next;\r\n\r\n // if we looped through the whole remaining polygon and can't find any more ears\r\n if (ear === stop) {\r\n // try filtering points and slicing again\r\n if (!pass) {\r\n earcutLinked(filterPoints(ear), triangles, dim, minX, minY, invSize, 1);\r\n\r\n // if this didn't work, try curing all small self-intersections locally\r\n } else if (pass === 1) {\r\n ear = cureLocalIntersections(ear, triangles, dim);\r\n earcutLinked(ear, triangles, dim, minX, minY, invSize, 2);\r\n\r\n // as a last resort, try splitting the remaining polygon into two\r\n } else if (pass === 2) {\r\n splitEarcut(ear, triangles, dim, minX, minY, invSize);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n}\r\n\r\n// check whether a polygon node forms a valid ear with adjacent nodes\r\nfunction isEar(ear) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // now make sure we don't have other points inside the potential ear\r\n var p = ear.next.next;\r\n\r\n while (p !== ear.prev) {\r\n if (pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.next;\r\n }\r\n\r\n return true;\r\n}\r\n\r\nfunction isEarHashed(ear, minX, minY, invSize) {\r\n var a = ear.prev,\r\n b = ear,\r\n c = ear.next;\r\n\r\n if (area(a, b, c) >= 0) return false; // reflex, can't be an ear\r\n\r\n // triangle bbox; min & max are calculated like this for speed\r\n var minTX = a.x < b.x ? (a.x < c.x ? a.x : c.x) : (b.x < c.x ? b.x : c.x),\r\n minTY = a.y < b.y ? (a.y < c.y ? a.y : c.y) : (b.y < c.y ? b.y : c.y),\r\n maxTX = a.x > b.x ? (a.x > c.x ? a.x : c.x) : (b.x > c.x ? b.x : c.x),\r\n maxTY = a.y > b.y ? (a.y > c.y ? a.y : c.y) : (b.y > c.y ? b.y : c.y);\r\n\r\n // z-order range for the current triangle bbox;\r\n var minZ = zOrder(minTX, minTY, minX, minY, invSize),\r\n maxZ = zOrder(maxTX, maxTY, minX, minY, invSize);\r\n\r\n var p = ear.prevZ,\r\n n = ear.nextZ;\r\n\r\n // look for points inside the triangle in both directions\r\n while (p && p.z >= minZ && n && n.z <= maxZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n // look for remaining points in decreasing z-order\r\n while (p && p.z >= minZ) {\r\n if (p !== ear.prev && p !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, p.x, p.y) &&\r\n area(p.prev, p, p.next) >= 0) return false;\r\n p = p.prevZ;\r\n }\r\n\r\n // look for remaining points in increasing z-order\r\n while (n && n.z <= maxZ) {\r\n if (n !== ear.prev && n !== ear.next &&\r\n pointInTriangle(a.x, a.y, b.x, b.y, c.x, c.y, n.x, n.y) &&\r\n area(n.prev, n, n.next) >= 0) return false;\r\n n = n.nextZ;\r\n }\r\n\r\n return true;\r\n}\r\n\r\n// go through all polygon nodes and cure small local self-intersections\r\nfunction cureLocalIntersections(start, triangles, dim) {\r\n var p = start;\r\n do {\r\n var a = p.prev,\r\n b = p.next.next;\r\n\r\n if (!equals(a, b) && intersects(a, p, p.next, b) && locallyInside(a, b) && locallyInside(b, a)) {\r\n\r\n triangles.push(a.i / dim);\r\n triangles.push(p.i / dim);\r\n triangles.push(b.i / dim);\r\n\r\n // remove two nodes involved\r\n removeNode(p);\r\n removeNode(p.next);\r\n\r\n p = start = b;\r\n }\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return p;\r\n}\r\n\r\n// try splitting polygon into two and triangulate them independently\r\nfunction splitEarcut(start, triangles, dim, minX, minY, invSize) {\r\n // look for a valid diagonal that divides the polygon into two\r\n var a = start;\r\n do {\r\n var b = a.next.next;\r\n while (b !== a.prev) {\r\n if (a.i !== b.i && isValidDiagonal(a, b)) {\r\n // split the polygon in two by the diagonal\r\n var c = splitPolygon(a, b);\r\n\r\n // filter colinear points around the cuts\r\n a = filterPoints(a, a.next);\r\n c = filterPoints(c, c.next);\r\n\r\n // run earcut on each half\r\n earcutLinked(a, triangles, dim, minX, minY, invSize);\r\n earcutLinked(c, triangles, dim, minX, minY, invSize);\r\n return;\r\n }\r\n b = b.next;\r\n }\r\n a = a.next;\r\n } while (a !== start);\r\n}\r\n\r\n// link every hole into the outer loop, producing a single-ring polygon without holes\r\nfunction eliminateHoles(data, holeIndices, outerNode, dim) {\r\n var queue = [],\r\n i, len, start, end, list;\r\n\r\n for (i = 0, len = holeIndices.length; i < len; i++) {\r\n start = holeIndices[i] * dim;\r\n end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n list = linkedList(data, start, end, dim, false);\r\n if (list === list.next) list.steiner = true;\r\n queue.push(getLeftmost(list));\r\n }\r\n\r\n queue.sort(compareX);\r\n\r\n // process holes from left to right\r\n for (i = 0; i < queue.length; i++) {\r\n eliminateHole(queue[i], outerNode);\r\n outerNode = filterPoints(outerNode, outerNode.next);\r\n }\r\n\r\n return outerNode;\r\n}\r\n\r\nfunction compareX(a, b) {\r\n return a.x - b.x;\r\n}\r\n\r\n// find a bridge between vertices that connects hole with an outer ring and and link it\r\nfunction eliminateHole(hole, outerNode) {\r\n outerNode = findHoleBridge(hole, outerNode);\r\n if (outerNode) {\r\n var b = splitPolygon(outerNode, hole);\r\n filterPoints(b, b.next);\r\n }\r\n}\r\n\r\n// David Eberly's algorithm for finding a bridge between hole and outer polygon\r\nfunction findHoleBridge(hole, outerNode) {\r\n var p = outerNode,\r\n hx = hole.x,\r\n hy = hole.y,\r\n qx = -Infinity,\r\n m;\r\n\r\n // find a segment intersected by a ray from the hole's leftmost point to the left;\r\n // segment's endpoint with lesser x will be potential connection point\r\n do {\r\n if (hy <= p.y && hy >= p.next.y && p.next.y !== p.y) {\r\n var x = p.x + (hy - p.y) * (p.next.x - p.x) / (p.next.y - p.y);\r\n if (x <= hx && x > qx) {\r\n qx = x;\r\n if (x === hx) {\r\n if (hy === p.y) return p;\r\n if (hy === p.next.y) return p.next;\r\n }\r\n m = p.x < p.next.x ? p : p.next;\r\n }\r\n }\r\n p = p.next;\r\n } while (p !== outerNode);\r\n\r\n if (!m) return null;\r\n\r\n if (hx === qx) return m.prev; // hole touches outer segment; pick lower endpoint\r\n\r\n // look for points inside the triangle of hole point, segment intersection and endpoint;\r\n // if there are no points found, we have a valid connection;\r\n // otherwise choose the point of the minimum angle with the ray as connection point\r\n\r\n var stop = m,\r\n mx = m.x,\r\n my = m.y,\r\n tanMin = Infinity,\r\n tan;\r\n\r\n p = m.next;\r\n\r\n while (p !== stop) {\r\n if (hx >= p.x && p.x >= mx && hx !== p.x &&\r\n pointInTriangle(hy < my ? hx : qx, hy, mx, my, hy < my ? qx : hx, hy, p.x, p.y)) {\r\n\r\n tan = Math.abs(hy - p.y) / (hx - p.x); // tangential\r\n\r\n if ((tan < tanMin || (tan === tanMin && p.x > m.x)) && locallyInside(p, hole)) {\r\n m = p;\r\n tanMin = tan;\r\n }\r\n }\r\n\r\n p = p.next;\r\n }\r\n\r\n return m;\r\n}\r\n\r\n// interlink polygon nodes in z-order\r\nfunction indexCurve(start, minX, minY, invSize) {\r\n var p = start;\r\n do {\r\n if (p.z === null) p.z = zOrder(p.x, p.y, minX, minY, invSize);\r\n p.prevZ = p.prev;\r\n p.nextZ = p.next;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n p.prevZ.nextZ = null;\r\n p.prevZ = null;\r\n\r\n sortLinked(p);\r\n}\r\n\r\n// Simon Tatham's linked list merge sort algorithm\r\n// http://www.chiark.greenend.org.uk/~sgtatham/algorithms/listsort.html\r\nfunction sortLinked(list) {\r\n var i, p, q, e, tail, numMerges, pSize, qSize,\r\n inSize = 1;\r\n\r\n do {\r\n p = list;\r\n list = null;\r\n tail = null;\r\n numMerges = 0;\r\n\r\n while (p) {\r\n numMerges++;\r\n q = p;\r\n pSize = 0;\r\n for (i = 0; i < inSize; i++) {\r\n pSize++;\r\n q = q.nextZ;\r\n if (!q) break;\r\n }\r\n qSize = inSize;\r\n\r\n while (pSize > 0 || (qSize > 0 && q)) {\r\n\r\n if (pSize !== 0 && (qSize === 0 || !q || p.z <= q.z)) {\r\n e = p;\r\n p = p.nextZ;\r\n pSize--;\r\n } else {\r\n e = q;\r\n q = q.nextZ;\r\n qSize--;\r\n }\r\n\r\n if (tail) tail.nextZ = e;\r\n else list = e;\r\n\r\n e.prevZ = tail;\r\n tail = e;\r\n }\r\n\r\n p = q;\r\n }\r\n\r\n tail.nextZ = null;\r\n inSize *= 2;\r\n\r\n } while (numMerges > 1);\r\n\r\n return list;\r\n}\r\n\r\n// z-order of a point given coords and inverse of the longer side of data bbox\r\nfunction zOrder(x, y, minX, minY, invSize) {\r\n // coords are transformed into non-negative 15-bit integer range\r\n x = 32767 * (x - minX) * invSize;\r\n y = 32767 * (y - minY) * invSize;\r\n\r\n x = (x | (x << 8)) & 0x00FF00FF;\r\n x = (x | (x << 4)) & 0x0F0F0F0F;\r\n x = (x | (x << 2)) & 0x33333333;\r\n x = (x | (x << 1)) & 0x55555555;\r\n\r\n y = (y | (y << 8)) & 0x00FF00FF;\r\n y = (y | (y << 4)) & 0x0F0F0F0F;\r\n y = (y | (y << 2)) & 0x33333333;\r\n y = (y | (y << 1)) & 0x55555555;\r\n\r\n return x | (y << 1);\r\n}\r\n\r\n// find the leftmost node of a polygon ring\r\nfunction getLeftmost(start) {\r\n var p = start,\r\n leftmost = start;\r\n do {\r\n if (p.x < leftmost.x) leftmost = p;\r\n p = p.next;\r\n } while (p !== start);\r\n\r\n return leftmost;\r\n}\r\n\r\n// check if a point lies within a convex triangle\r\nfunction pointInTriangle(ax, ay, bx, by, cx, cy, px, py) {\r\n return (cx - px) * (ay - py) - (ax - px) * (cy - py) >= 0 &&\r\n (ax - px) * (by - py) - (bx - px) * (ay - py) >= 0 &&\r\n (bx - px) * (cy - py) - (cx - px) * (by - py) >= 0;\r\n}\r\n\r\n// check if a diagonal between two polygon nodes is valid (lies in polygon interior)\r\nfunction isValidDiagonal(a, b) {\r\n return a.next.i !== b.i && a.prev.i !== b.i && !intersectsPolygon(a, b) &&\r\n locallyInside(a, b) && locallyInside(b, a) && middleInside(a, b);\r\n}\r\n\r\n// signed area of a triangle\r\nfunction area(p, q, r) {\r\n return (q.y - p.y) * (r.x - q.x) - (q.x - p.x) * (r.y - q.y);\r\n}\r\n\r\n// check if two points are equal\r\nfunction equals(p1, p2) {\r\n return p1.x === p2.x && p1.y === p2.y;\r\n}\r\n\r\n// check if two segments intersect\r\nfunction intersects(p1, q1, p2, q2) {\r\n if ((equals(p1, q1) && equals(p2, q2)) ||\r\n (equals(p1, q2) && equals(p2, q1))) return true;\r\n return area(p1, q1, p2) > 0 !== area(p1, q1, q2) > 0 &&\r\n area(p2, q2, p1) > 0 !== area(p2, q2, q1) > 0;\r\n}\r\n\r\n// check if a polygon diagonal intersects any polygon segments\r\nfunction intersectsPolygon(a, b) {\r\n var p = a;\r\n do {\r\n if (p.i !== a.i && p.next.i !== a.i && p.i !== b.i && p.next.i !== b.i &&\r\n intersects(p, p.next, a, b)) return true;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return false;\r\n}\r\n\r\n// check if a polygon diagonal is locally inside the polygon\r\nfunction locallyInside(a, b) {\r\n return area(a.prev, a, a.next) < 0 ?\r\n area(a, b, a.next) >= 0 && area(a, a.prev, b) >= 0 :\r\n area(a, b, a.prev) < 0 || area(a, a.next, b) < 0;\r\n}\r\n\r\n// check if the middle point of a polygon diagonal is inside the polygon\r\nfunction middleInside(a, b) {\r\n var p = a,\r\n inside = false,\r\n px = (a.x + b.x) / 2,\r\n py = (a.y + b.y) / 2;\r\n do {\r\n if (((p.y > py) !== (p.next.y > py)) && p.next.y !== p.y &&\r\n (px < (p.next.x - p.x) * (py - p.y) / (p.next.y - p.y) + p.x))\r\n inside = !inside;\r\n p = p.next;\r\n } while (p !== a);\r\n\r\n return inside;\r\n}\r\n\r\n// link two polygon vertices with a bridge; if the vertices belong to the same ring, it splits polygon into two;\r\n// if one belongs to the outer ring and another to a hole, it merges it into a single ring\r\nfunction splitPolygon(a, b) {\r\n var a2 = new Node(a.i, a.x, a.y),\r\n b2 = new Node(b.i, b.x, b.y),\r\n an = a.next,\r\n bp = b.prev;\r\n\r\n a.next = b;\r\n b.prev = a;\r\n\r\n a2.next = an;\r\n an.prev = a2;\r\n\r\n b2.next = a2;\r\n a2.prev = b2;\r\n\r\n bp.next = b2;\r\n b2.prev = bp;\r\n\r\n return b2;\r\n}\r\n\r\n// create a node and optionally link it with previous one (in a circular doubly linked list)\r\nfunction insertNode(i, x, y, last) {\r\n var p = new Node(i, x, y);\r\n\r\n if (!last) {\r\n p.prev = p;\r\n p.next = p;\r\n\r\n } else {\r\n p.next = last.next;\r\n p.prev = last;\r\n last.next.prev = p;\r\n last.next = p;\r\n }\r\n return p;\r\n}\r\n\r\nfunction removeNode(p) {\r\n p.next.prev = p.prev;\r\n p.prev.next = p.next;\r\n\r\n if (p.prevZ) p.prevZ.nextZ = p.nextZ;\r\n if (p.nextZ) p.nextZ.prevZ = p.prevZ;\r\n}\r\n\r\nfunction Node(i, x, y) {\r\n // vertex index in coordinates array\r\n this.i = i;\r\n\r\n // vertex coordinates\r\n this.x = x;\r\n this.y = y;\r\n\r\n // previous and next vertex nodes in a polygon ring\r\n this.prev = null;\r\n this.next = null;\r\n\r\n // z-order curve value\r\n this.z = null;\r\n\r\n // previous and next nodes in z-order\r\n this.prevZ = null;\r\n this.nextZ = null;\r\n\r\n // indicates whether this is a steiner point\r\n this.steiner = false;\r\n}\r\n\r\n// return a percentage difference between the polygon area and its triangulation area;\r\n// used to verify correctness of triangulation\r\nearcut.deviation = function (data, holeIndices, dim, triangles) {\r\n var hasHoles = holeIndices && holeIndices.length;\r\n var outerLen = hasHoles ? holeIndices[0] * dim : data.length;\r\n\r\n var polygonArea = Math.abs(signedArea(data, 0, outerLen, dim));\r\n if (hasHoles) {\r\n for (var i = 0, len = holeIndices.length; i < len; i++) {\r\n var start = holeIndices[i] * dim;\r\n var end = i < len - 1 ? holeIndices[i + 1] * dim : data.length;\r\n polygonArea -= Math.abs(signedArea(data, start, end, dim));\r\n }\r\n }\r\n\r\n var trianglesArea = 0;\r\n for (i = 0; i < triangles.length; i += 3) {\r\n var a = triangles[i] * dim;\r\n var b = triangles[i + 1] * dim;\r\n var c = triangles[i + 2] * dim;\r\n trianglesArea += Math.abs(\r\n (data[a] - data[c]) * (data[b + 1] - data[a + 1]) -\r\n (data[a] - data[b]) * (data[c + 1] - data[a + 1]));\r\n }\r\n\r\n return polygonArea === 0 && trianglesArea === 0 ? 0 :\r\n Math.abs((trianglesArea - polygonArea) / polygonArea);\r\n};\r\n\r\nfunction signedArea(data, start, end, dim) {\r\n var sum = 0;\r\n for (var i = start, j = end - dim; i < end; i += dim) {\r\n sum += (data[j] - data[i]) * (data[i + 1] + data[j + 1]);\r\n j = i;\r\n }\r\n return sum;\r\n}\r\n\r\n// turn a polygon in a multi-dimensional array form (e.g. as in GeoJSON) into a form Earcut accepts\r\nearcut.flatten = function (data) {\r\n var dim = data[0][0].length,\r\n result = {vertices: [], holes: [], dimensions: dim},\r\n holeIndex = 0;\r\n\r\n for (var i = 0; i < data.length; i++) {\r\n for (var j = 0; j < data[i].length; j++) {\r\n for (var d = 0; d < dim; d++) result.vertices.push(data[i][j][d]);\r\n }\r\n if (i > 0) {\r\n holeIndex += data[i - 1].length;\r\n result.holes.push(holeIndex);\r\n }\r\n }\r\n return result;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Earcut.js?")},"./node_modules/phaser/src/geom/polygon/GetAABB.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ../rectangle/Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Calculates the bounding AABB rectangle of a polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.GetAABB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon that should be calculated.\r\n * @param {(Phaser.Geom.Rectangle|object)} [out] - The rectangle or object that has x, y, width, and height properties to store the result. Optional.\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)} The resulting rectangle or object that is passed in with position and dimensions of the polygon\'s AABB.\r\n */\r\nvar GetAABB = function (polygon, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n var minX = Infinity;\r\n var minY = Infinity;\r\n var maxX = -minX;\r\n var maxY = -minY;\r\n var p;\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n p = polygon.points[i];\r\n\r\n minX = Math.min(minX, p.x);\r\n minY = Math.min(minY, p.y);\r\n maxX = Math.max(maxX, p.x);\r\n maxY = Math.max(maxY, p.y);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetAABB;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetAABB.js?')},"./node_modules/phaser/src/geom/polygon/GetNumberArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]\r\n\r\n/**\r\n * Stores all of the points of a Polygon into a flat array of numbers following the sequence [ x,y, x,y, x,y ],\r\n * i.e. each point of the Polygon, in the order it's defined, corresponds to two elements of the resultant\r\n * array for the point's X and Y coordinate.\r\n *\r\n * @function Phaser.Geom.Polygon.GetNumberArray\r\n * @since 3.0.0\r\n *\r\n * @generic {number[]} O - [output,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon whose points to export.\r\n * @param {(array|number[])} [output] - An array to which the points' coordinates should be appended.\r\n *\r\n * @return {(array|number[])} The modified `output` array, or a new array if none was given.\r\n */\r\nvar GetNumberArray = function (polygon, output)\r\n{\r\n if (output === undefined) { output = []; }\r\n\r\n for (var i = 0; i < polygon.points.length; i++)\r\n {\r\n output.push(polygon.points[i].x);\r\n output.push(polygon.points[i].y);\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetNumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetNumberArray.js?")},"./node_modules/phaser/src/geom/polygon/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\n\r\n/**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @function Phaser.Geom.Polygon.GetPoints\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the points from.\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\nvar GetPoints = function (polygon, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var points = polygon.points;\r\n var perimeter = Perimeter(polygon);\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = perimeter * (i / quantity);\r\n var accumulatedPerimeter = 0;\r\n\r\n for (var j = 0; j < points.length; j++)\r\n {\r\n var pointA = points[j];\r\n var pointB = points[(j + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n var length = Length(line);\r\n\r\n if (position < accumulatedPerimeter || position > accumulatedPerimeter + length)\r\n {\r\n accumulatedPerimeter += length;\r\n continue;\r\n }\r\n\r\n var point = line.getPoint((position - accumulatedPerimeter) / length);\r\n out.push(point);\r\n\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/GetPoints.js?')},"./node_modules/phaser/src/geom/polygon/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\n\r\n/**\r\n * Returns the perimeter of the given Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Perimeter\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to get the perimeter of.\r\n *\r\n * @return {number} The perimeter of the Polygon.\r\n */\r\nvar Perimeter = function (polygon)\r\n{\r\n var points = polygon.points;\r\n var perimeter = 0;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n var pointA = points[i];\r\n var pointB = points[(i + 1) % points.length];\r\n var line = new Line(\r\n pointA.x,\r\n pointA.y,\r\n pointB.x,\r\n pointB.y\r\n );\r\n\r\n perimeter += Length(line);\r\n }\r\n\r\n return perimeter;\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Perimeter.js?')},"./node_modules/phaser/src/geom/polygon/Polygon.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Contains = __webpack_require__(/*! ./Contains */ \"./node_modules/phaser/src/geom/polygon/Contains.js\");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ \"./node_modules/phaser/src/geom/polygon/GetPoints.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/geom/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Polygon object\r\n *\r\n\r\n * The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.\r\n * Several formats are supported to define the list of points, check the setTo method for details. \r\n * This is a geometry object allowing you to define and inspect the shape.\r\n * It is not a Game Object, in that you cannot add it to the display list, and it has no texture.\r\n * To render a Polygon you should look at the capabilities of the Graphics class.\r\n *\r\n * @class Polygon\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported: \r\n * - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n */\r\nvar Polygon = new Class({\r\n\r\n initialize:\r\n\r\n function Polygon (points)\r\n {\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.POLYGON`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Polygon#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.POLYGON;\r\n\r\n /**\r\n * The area of this Polygon.\r\n *\r\n * @name Phaser.Geom.Polygon#area\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.area = 0;\r\n\r\n /**\r\n * An array of number pair objects that make up this polygon. I.e. [ {x,y}, {x,y}, {x,y} ]\r\n *\r\n * @name Phaser.Geom.Polygon#points\r\n * @type {Phaser.Geom.Point[]}\r\n * @since 3.0.0\r\n */\r\n this.points = [];\r\n\r\n if (points)\r\n {\r\n this.setTo(points);\r\n }\r\n },\r\n\r\n /**\r\n * Check to see if the Polygon contains the given x / y coordinates.\r\n *\r\n * @method Phaser.Geom.Polygon#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check within the polygon.\r\n * @param {number} y - The y coordinate to check within the polygon.\r\n *\r\n * @return {boolean} `true` if the coordinates are within the polygon, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Sets this Polygon to the given points.\r\n *\r\n * The points can be set from a variety of formats:\r\n *\r\n * - A string containing paired values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`\r\n * - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`\r\n * - An array of objects with public x/y properties: `[obj1, obj2, ...]`\r\n * - An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`\r\n * - An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`\r\n *\r\n * `setTo` may also be called without any arguments to remove all points.\r\n *\r\n * @method Phaser.Geom.Polygon#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.\r\n *\r\n * @return {Phaser.Geom.Polygon} This Polygon object.\r\n */\r\n setTo: function (points)\r\n {\r\n this.area = 0;\r\n this.points = [];\r\n\r\n if (typeof points === 'string')\r\n {\r\n points = points.split(' ');\r\n }\r\n\r\n if (!Array.isArray(points))\r\n {\r\n return this;\r\n }\r\n\r\n var p;\r\n var y0 = Number.MAX_VALUE;\r\n\r\n // The points argument is an array, so iterate through it\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = { x: 0, y: 0 };\r\n\r\n if (typeof points[i] === 'number' || typeof points[i] === 'string')\r\n {\r\n p.x = parseFloat(points[i]);\r\n p.y = parseFloat(points[i + 1]);\r\n i++;\r\n }\r\n else if (Array.isArray(points[i]))\r\n {\r\n // An array of arrays?\r\n p.x = points[i][0];\r\n p.y = points[i][1];\r\n }\r\n else\r\n {\r\n p.x = points[i].x;\r\n p.y = points[i].y;\r\n }\r\n\r\n this.points.push(p);\r\n\r\n // Lowest boundary\r\n if (p.y < y0)\r\n {\r\n y0 = p.y;\r\n }\r\n }\r\n\r\n this.calculateArea(y0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates the area of the Polygon. This is available in the property Polygon.area\r\n *\r\n * @method Phaser.Geom.Polygon#calculateArea\r\n * @since 3.0.0\r\n *\r\n * @return {number} The area of the polygon.\r\n */\r\n calculateArea: function ()\r\n {\r\n if (this.points.length < 3)\r\n {\r\n this.area = 0;\r\n\r\n return this.area;\r\n }\r\n\r\n var sum = 0;\r\n var p1;\r\n var p2;\r\n\r\n for (var i = 0; i < this.points.length - 1; i++)\r\n {\r\n p1 = this.points[i];\r\n p2 = this.points[i + 1];\r\n\r\n sum += (p2.x - p1.x) * (p1.y + p2.y);\r\n }\r\n\r\n p1 = this.points[0];\r\n p2 = this.points[this.points.length - 1];\r\n\r\n sum += (p1.x - p2.x) * (p2.y + p1.y);\r\n\r\n this.area = -sum * 0.5;\r\n\r\n return this.area;\r\n },\r\n\r\n /**\r\n * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon,\r\n * based on the given quantity or stepRate values.\r\n *\r\n * @method Phaser.Geom.Polygon#getPoints\r\n * @since 3.12.0\r\n *\r\n * @param {integer} quantity - The amount of points to return. If a falsey value the quantity will be derived from the `stepRate` instead.\r\n * @param {number} [stepRate] - Sets the quantity by getting the perimeter of the Polygon and dividing it by the stepRate.\r\n * @param {array} [output] - An array to insert the points in to. If not provided a new array will be created.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array of Point objects pertaining to the points around the perimeter of the Polygon.\r\n */\r\n getPoints: function (quantity, step, output)\r\n {\r\n return GetPoints(this, quantity, step, output);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Polygon.js?")},"./node_modules/phaser/src/geom/polygon/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the order of the points of a Polygon.\r\n *\r\n * @function Phaser.Geom.Polygon.Reverse\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The Polygon to modify.\r\n *\r\n * @return {Phaser.Geom.Polygon} The modified Polygon.\r\n */\r\nvar Reverse = function (polygon)\r\n{\r\n polygon.points.reverse();\r\n\r\n return polygon;\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Reverse.js?")},"./node_modules/phaser/src/geom/polygon/Smooth.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Igor Ognichenko \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nvar copy = function (out, a)\r\n{\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n \r\n return out;\r\n};\r\n\r\n/**\r\n * Takes a Polygon object and applies Chaikin's smoothing algorithm on its points.\r\n *\r\n * @function Phaser.Geom.Polygon.Smooth\r\n * @since 3.13.0\r\n *\r\n * @generic {Phaser.Geom.Polygon} O - [polygon,$return]\r\n *\r\n * @param {Phaser.Geom.Polygon} polygon - The polygon to be smoothed. The polygon will be modified in-place and returned.\r\n *\r\n * @return {Phaser.Geom.Polygon} The input polygon.\r\n */\r\nvar Smooth = function (polygon)\r\n{\r\n var i;\r\n var points = [];\r\n var data = polygon.points;\r\n\r\n for (i = 0; i < data.length; i++)\r\n {\r\n points.push([ data[i].x, data[i].y ]);\r\n }\r\n\r\n var output = [];\r\n \r\n if (points.length > 0)\r\n {\r\n output.push(copy([ 0, 0 ], points[0]));\r\n }\r\n \r\n for (i = 0; i < points.length - 1; i++)\r\n {\r\n var p0 = points[i];\r\n var p1 = points[i + 1];\r\n var p0x = p0[0];\r\n var p0y = p0[1];\r\n var p1x = p1[0];\r\n var p1y = p1[1];\r\n\r\n output.push([ 0.85 * p0x + 0.15 * p1x, 0.85 * p0y + 0.15 * p1y ]);\r\n output.push([ 0.15 * p0x + 0.85 * p1x, 0.15 * p0y + 0.85 * p1y ]);\r\n }\r\n \r\n if (points.length > 1)\r\n {\r\n output.push(copy([ 0, 0 ], points[points.length - 1]));\r\n }\r\n \r\n return polygon.setTo(output);\r\n};\r\n\r\nmodule.exports = Smooth;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/Smooth.js?")},"./node_modules/phaser/src/geom/polygon/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Polygon = __webpack_require__(/*! ./Polygon */ "./node_modules/phaser/src/geom/polygon/Polygon.js");\r\n\r\nPolygon.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/polygon/Clone.js");\r\nPolygon.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/polygon/Contains.js");\r\nPolygon.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/polygon/ContainsPoint.js");\r\nPolygon.GetAABB = __webpack_require__(/*! ./GetAABB */ "./node_modules/phaser/src/geom/polygon/GetAABB.js");\r\nPolygon.GetNumberArray = __webpack_require__(/*! ./GetNumberArray */ "./node_modules/phaser/src/geom/polygon/GetNumberArray.js");\r\nPolygon.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/polygon/GetPoints.js");\r\nPolygon.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/polygon/Perimeter.js");\r\nPolygon.Reverse = __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/geom/polygon/Reverse.js");\r\nPolygon.Smooth = __webpack_require__(/*! ./Smooth */ "./node_modules/phaser/src/geom/polygon/Smooth.js");\r\n\r\nmodule.exports = Polygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/polygon/index.js?')},"./node_modules/phaser/src/geom/rectangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the area of the given Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to calculate the area of.\r\n *\r\n * @return {number} The area of the Rectangle object.\r\n */\r\nvar Area = function (rect)\r\n{\r\n return rect.width * rect.height;\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Area.js?")},"./node_modules/phaser/src/geom/rectangle/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position up to the smallest integer greater than or equal to each current coordinate.\r\n *\r\n * @function Phaser.Geom.Rectangle.Ceil\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Ceil = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Ceil.js?")},"./node_modules/phaser/src/geom/rectangle/CeilAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size up to the smallest integer greater than or equal to each respective value.\r\n *\r\n * @function Phaser.Geom.Rectangle.CeilAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to modify.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar CeilAll = function (rect)\r\n{\r\n rect.x = Math.ceil(rect.x);\r\n rect.y = Math.ceil(rect.y);\r\n rect.width = Math.ceil(rect.width);\r\n rect.height = Math.ceil(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CeilAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CeilAll.js?")},"./node_modules/phaser/src/geom/rectangle/CenterOn.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Centers this Rectangle so that the center coordinates match the given x and y values.\r\n\r\n/**\r\n * Moves the top-left corner of a Rectangle so that its center is at the given coordinates.\r\n *\r\n * @function Phaser.Geom.Rectangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to be centered.\r\n * @param {number} x - The X coordinate of the Rectangle's center.\r\n * @param {number} y - The Y coordinate of the Rectangle's center.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The centered rectangle.\r\n */\r\nvar CenterOn = function (rect, x, y)\r\n{\r\n rect.x = x - (rect.width / 2);\r\n rect.y = y - (rect.height / 2);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CenterOn.js?")},"./node_modules/phaser/src/geom/rectangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle which is identical to the given one.\r\n *\r\n * @function Phaser.Geom.Rectangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The Rectangle to clone.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The newly created Rectangle, which is separate from the given one.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Rectangle(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Clone.js?')},"./node_modules/phaser/src/geom/rectangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if a given point is inside a Rectangle's bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle's bounds, otherwise `false`.\r\n */\r\nvar Contains = function (rect, x, y)\r\n{\r\n if (rect.width <= 0 || rect.height <= 0)\r\n {\r\n return false;\r\n }\r\n\r\n return (rect.x <= x && rect.x + rect.width >= x && rect.y <= y && rect.y + rect.height >= y);\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Contains.js?")},"./node_modules/phaser/src/geom/rectangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\n\r\n/**\r\n * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object.\r\n * @param {Phaser.Geom.Point} point - The point object to be checked. Can be a Phaser Point object or any object with x and y values.\r\n *\r\n * @return {boolean} A value of true if the Rectangle object contains the specified point, otherwise false.\r\n */\r\nvar ContainsPoint = function (rect, point)\r\n{\r\n return Contains(rect, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/rectangle/ContainsRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if one rectangle fully contains another.\r\n *\r\n * @function Phaser.Geom.Rectangle.ContainsRect\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first rectangle.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second rectangle.\r\n *\r\n * @return {boolean} True only if rectA fully contains rectB.\r\n */\r\nvar ContainsRect = function (rectA, rectB)\r\n{\r\n // Volume check (if rectB volume > rectA then rectA cannot contain it)\r\n if ((rectB.width * rectB.height) > (rectA.width * rectA.height))\r\n {\r\n return false;\r\n }\r\n\r\n return (\r\n (rectB.x > rectA.x && rectB.x < rectA.right) &&\r\n (rectB.right > rectA.x && rectB.right < rectA.right) &&\r\n (rectB.y > rectA.y && rectB.y < rectA.bottom) &&\r\n (rectB.bottom > rectA.y && rectB.bottom < rectA.bottom)\r\n );\r\n};\r\n\r\nmodule.exports = ContainsRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/ContainsRect.js?")},"./node_modules/phaser/src/geom/rectangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Rectangle to a destination Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} source - The source Rectangle to copy the values from.\r\n * @param {Phaser.Geom.Rectangle} dest - The destination Rectangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The destination Rectangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x, source.y, source.width, source.height);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/rectangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array of points for each corner of a Rectangle\r\n * If an array is specified, each point object will be added to the end of the array, otherwise a new array will be created.\r\n *\r\n * @function Phaser.Geom.Rectangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle object to be decomposed.\r\n * @param {array} [out] - If provided, each point will be added to this array.\r\n *\r\n * @return {array} Will return the array you specified or a new array containing the points of the Rectangle.\r\n */\r\nvar Decompose = function (rect, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: rect.x, y: rect.y });\r\n out.push({ x: rect.right, y: rect.y });\r\n out.push({ x: rect.right, y: rect.bottom });\r\n out.push({ x: rect.x, y: rect.bottom });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Decompose.js?")},"./node_modules/phaser/src/geom/rectangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compares the `x`, `y`, `width` and `height` properties of two rectangles.\r\n *\r\n * @function Phaser.Geom.Rectangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - Rectangle A\r\n * @param {Phaser.Geom.Rectangle} toCompare - Rectangle B\r\n *\r\n * @return {boolean} `true` if the rectangles' properties are an exact match, otherwise `false`.\r\n */\r\nvar Equals = function (rect, toCompare)\r\n{\r\n return (\r\n rect.x === toCompare.x &&\r\n rect.y === toCompare.y &&\r\n rect.width === toCompare.width &&\r\n rect.height === toCompare.height\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Equals.js?")},"./node_modules/phaser/src/geom/rectangle/FitInside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fits inside the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitOutside` function, there may be some space inside the source area not covered.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitInside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envelop the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitInside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio < GetAspectRatio(source))\r\n {\r\n // Taller than Wide\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Wider than Tall\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - (target.width / 2),\r\n source.centerY - (target.height / 2)\r\n );\r\n};\r\n\r\nmodule.exports = FitInside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitInside.js?')},"./node_modules/phaser/src/geom/rectangle/FitOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\n\r\n/**\r\n * Adjusts the target rectangle, changing its width, height and position,\r\n * so that it fully covers the area of the source rectangle, while maintaining its original\r\n * aspect ratio.\r\n * \r\n * Unlike the `FitInside` function, the target rectangle may extend further out than the source.\r\n *\r\n * @function Phaser.Geom.Rectangle.FitOutside\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The target rectangle to adjust.\r\n * @param {Phaser.Geom.Rectangle} source - The source rectangle to envlope the target in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified target rectangle instance.\r\n */\r\nvar FitOutside = function (target, source)\r\n{\r\n var ratio = GetAspectRatio(target);\r\n\r\n if (ratio > GetAspectRatio(source))\r\n {\r\n // Wider than Tall\r\n target.setSize(source.height * ratio, source.height);\r\n }\r\n else\r\n {\r\n // Taller than Wide\r\n target.setSize(source.width, source.width / ratio);\r\n }\r\n\r\n return target.setPosition(\r\n source.centerX - target.width / 2,\r\n source.centerY - target.height / 2\r\n );\r\n};\r\n\r\nmodule.exports = FitOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FitOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds down (floors) the top left X and Y co-ordinates of the given Rectangle to the largest integer less than or equal to them\r\n *\r\n * @function Phaser.Geom.Rectangle.Floor\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle to floor the top left X and Y co-ordinates of\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle that was passed to this function with its co-ordinates floored.\r\n */\r\nvar Floor = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Floor.js?")},"./node_modules/phaser/src/geom/rectangle/FloorAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rounds a Rectangle's position and size down to the largest integer less than or equal to each current coordinate or dimension.\r\n *\r\n * @function Phaser.Geom.Rectangle.FloorAll\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar FloorAll = function (rect)\r\n{\r\n rect.x = Math.floor(rect.x);\r\n rect.y = Math.floor(rect.y);\r\n rect.width = Math.floor(rect.width);\r\n rect.height = Math.floor(rect.height);\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = FloorAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FloorAll.js?")},"./node_modules/phaser/src/geom/rectangle/FromPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n// points is an array of Point-like objects,\r\n// either 2 dimensional arrays, or objects with public x/y properties:\r\n// var points = [\r\n// [100, 200],\r\n// [200, 400],\r\n// { x: 30, y: 60 }\r\n// ]\r\n\r\n/**\r\n * Constructs new Rectangle or repositions and resizes an existing Rectangle so that all of the given points are on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.FromPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {array} points - An array of points (either arrays with two elements corresponding to the X and Y coordinate or an object with public `x` and `y` properties) which should be surrounded by the Rectangle.\r\n * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar FromPoints = function (points, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (points.length === 0)\r\n {\r\n return out;\r\n }\r\n\r\n var minX = Number.MAX_VALUE;\r\n var minY = Number.MAX_VALUE;\r\n\r\n var maxX = Number.MIN_SAFE_INTEGER;\r\n var maxY = Number.MIN_SAFE_INTEGER;\r\n\r\n var p;\r\n var px;\r\n var py;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n p = points[i];\r\n\r\n if (Array.isArray(p))\r\n {\r\n px = p[0];\r\n py = p[1];\r\n }\r\n else\r\n {\r\n px = p.x;\r\n py = p.y;\r\n }\r\n\r\n minX = Math.min(minX, px);\r\n minY = Math.min(minY, py);\r\n\r\n maxX = Math.max(maxX, px);\r\n maxY = Math.max(maxY, py);\r\n }\r\n\r\n out.x = minX;\r\n out.y = minY;\r\n out.width = maxX - minX;\r\n out.height = maxY - minY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = FromPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/FromPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the width/height ratio of a rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetAspectRatio\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The rectangle.\r\n *\r\n * @return {number} The width/height ratio of the rectangle.\r\n */\r\nvar GetAspectRatio = function (rect)\r\n{\r\n return (rect.height === 0) ? NaN : rect.width / rect.height;\r\n};\r\n\r\nmodule.exports = GetAspectRatio;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js?")},"./node_modules/phaser/src/geom/rectangle/GetCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns the center of a Rectangle as a Point.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the center of.\r\n * @param {(Phaser.Geom.Point|object)} [out] - Optional point-like object to update with the center coordinates.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar GetCenter = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.centerX;\r\n out.y = rect.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetCenter.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {number} position - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar GetPoint = function (rectangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = rectangle.x;\r\n out.y = rectangle.y;\r\n\r\n return out;\r\n }\r\n\r\n var p = Perimeter(rectangle) * position;\r\n\r\n if (position > 0.5)\r\n {\r\n p -= (rectangle.width + rectangle.height);\r\n\r\n if (p <= rectangle.width)\r\n {\r\n // Face 3\r\n out.x = rectangle.right - p;\r\n out.y = rectangle.bottom;\r\n }\r\n else\r\n {\r\n // Face 4\r\n out.x = rectangle.x;\r\n out.y = rectangle.bottom - (p - rectangle.width);\r\n }\r\n }\r\n else if (p <= rectangle.width)\r\n {\r\n // Face 1\r\n out.x = rectangle.x + p;\r\n out.y = rectangle.y;\r\n }\r\n else\r\n {\r\n // Face 2\r\n out.x = rectangle.right;\r\n out.y = rectangle.y + (p - rectangle.width);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoint.js?')},"./node_modules/phaser/src/geom/rectangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\n\r\n// Return an array of points from the perimeter of the rectangle\r\n// each spaced out based on the quantity or step required\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle object to get the points from.\r\n * @param {number} step - Step between points. Used to calculate the number of points to return when quantity is falsy. Ignored if quantity is positive.\r\n * @param {integer} quantity - The number of evenly spaced points from the rectangles perimeter to return. If falsy, step param will be used to calculate the number of points.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An optional array to store the points in.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} An array of Points from the perimeter of the rectangle.\r\n */\r\nvar GetPoints = function (rectangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = Perimeter(rectangle) / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var position = i / quantity;\r\n\r\n out.push(GetPoint(rectangle, position));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetPoints.js?')},"./node_modules/phaser/src/geom/rectangle/GetSize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * The size of the Rectangle object, expressed as a Point object\r\n * with the values of the width and height properties.\r\n *\r\n * @function Phaser.Geom.Rectangle.GetSize\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {(Phaser.Geom.Point|object)} [out] - [description]\r\n *\r\n * @return {(Phaser.Geom.Point|object)} [description]\r\n */\r\nvar GetSize = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.width;\r\n out.y = rect.height;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetSize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/GetSize.js?')},"./node_modules/phaser/src/geom/rectangle/Inflate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\n\r\n\r\n/**\r\n * Increases the size of a Rectangle by a specified amount.\r\n *\r\n * The center of the Rectangle stays the same. The amounts are added to each side, so the actual increase in width or height is two times bigger than the respective argument.\r\n *\r\n * @function Phaser.Geom.Rectangle.Inflate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to inflate.\r\n * @param {number} x - How many pixels the left and the right side should be moved by horizontally.\r\n * @param {number} y - How many pixels the top and the bottom side should be moved by vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The inflated Rectangle.\r\n */\r\nvar Inflate = function (rect, x, y)\r\n{\r\n var cx = rect.centerX;\r\n var cy = rect.centerY;\r\n\r\n rect.setSize(rect.width + (x * 2), rect.height + (y * 2));\r\n\r\n return CenterOn(rect, cx, cy);\r\n};\r\n\r\nmodule.exports = Inflate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Inflate.js?')},"./node_modules/phaser/src/geom/rectangle/Intersection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\nvar Intersects = __webpack_require__(/*! ../intersects/RectangleToRectangle */ "./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js");\r\n\r\n/**\r\n * Takes two Rectangles and first checks to see if they intersect.\r\n * If they intersect it will return the area of intersection in the `out` Rectangle.\r\n * If they do not intersect, the `out` Rectangle will have a width and height of zero.\r\n *\r\n * @function Phaser.Geom.Rectangle.Intersection\r\n * @since 3.11.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to get the intersection from.\r\n * @param {Phaser.Geom.Rectangle} [out] - A Rectangle to store the intersection results in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The intersection result. If the width and height are zero, no intersection occurred.\r\n */\r\nvar Intersection = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n if (Intersects(rectA, rectB))\r\n {\r\n out.x = Math.max(rectA.x, rectB.x);\r\n out.y = Math.max(rectA.y, rectB.y);\r\n out.width = Math.min(rectA.right, rectB.right) - out.x;\r\n out.height = Math.min(rectA.bottom, rectB.bottom) - out.y;\r\n }\r\n else\r\n {\r\n out.setEmpty();\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Intersection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Intersection.js?')},"./node_modules/phaser/src/geom/rectangle/MarchingAnts.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n\r\n/**\r\n * Return an array of points from the perimeter of the rectangle\r\n * each spaced out based on the quantity or step required\r\n *\r\n * @function Phaser.Geom.Rectangle.MarchingAnts\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - [description]\r\n * @param {number} step - [description]\r\n * @param {integer} quantity - [description]\r\n * @param {(array|Phaser.Geom.Point[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} [description]\r\n */\r\nvar MarchingAnts = function (rect, step, quantity, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n if (!step && !quantity)\r\n {\r\n // Bail out\r\n return out;\r\n }\r\n\r\n // If step is a falsey value (false, null, 0, undefined, etc) then we calculate\r\n // it based on the quantity instead, otherwise we always use the step value\r\n if (!step)\r\n {\r\n step = Perimeter(rect) / quantity;\r\n }\r\n else\r\n {\r\n quantity = Math.round(Perimeter(rect) / step);\r\n }\r\n\r\n var x = rect.x;\r\n var y = rect.y;\r\n var face = 0;\r\n\r\n // Loop across each face of the rectangle\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n out.push(new Point(x, y));\r\n\r\n switch (face)\r\n {\r\n\r\n // Top face\r\n case 0:\r\n x += step;\r\n\r\n if (x >= rect.right)\r\n {\r\n face = 1;\r\n y += (x - rect.right);\r\n x = rect.right;\r\n }\r\n break;\r\n\r\n // Right face\r\n case 1:\r\n y += step;\r\n\r\n if (y >= rect.bottom)\r\n {\r\n face = 2;\r\n x -= (y - rect.bottom);\r\n y = rect.bottom;\r\n }\r\n break;\r\n\r\n // Bottom face\r\n case 2:\r\n x -= step;\r\n\r\n if (x <= rect.left)\r\n {\r\n face = 3;\r\n y -= (rect.left - x);\r\n x = rect.left;\r\n }\r\n break;\r\n\r\n // Left face\r\n case 3:\r\n y -= step;\r\n\r\n if (y <= rect.top)\r\n {\r\n face = 0;\r\n y = rect.top;\r\n }\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = MarchingAnts;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MarchingAnts.js?')},"./node_modules/phaser/src/geom/rectangle/MergePoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a list of points by repositioning and/or resizing it such that all points are located on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergePoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged.\r\n * @param {Phaser.Geom.Point[]} points - An array of Points (or any object with public `x` and `y` properties) which should be merged with the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified Rectangle.\r\n */\r\nvar MergePoints = function (target, points)\r\n{\r\n var minX = target.x;\r\n var maxX = target.right;\r\n var minY = target.y;\r\n var maxY = target.bottom;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n minX = Math.min(minX, points[i].x);\r\n maxX = Math.max(maxX, points[i].x);\r\n minY = Math.min(minY, points[i].y);\r\n maxY = Math.max(maxY, points[i].y);\r\n }\r\n\r\n target.x = minX;\r\n target.y = minY;\r\n target.width = maxX - minX;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergePoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergePoints.js?")},"./node_modules/phaser/src/geom/rectangle/MergeRect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Merges source rectangle into target rectangle and returns target\r\n// Neither rect should have negative widths or heights\r\n\r\n/**\r\n * Merges the source rectangle into the target rectangle and returns the target.\r\n * Neither rectangle should have a negative width or height.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeRect\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - Target rectangle. Will be modified to include source rectangle.\r\n * @param {Phaser.Geom.Rectangle} source - Rectangle that will be merged into target rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} Modified target rectangle that contains source rectangle.\r\n */\r\nvar MergeRect = function (target, source)\r\n{\r\n var minX = Math.min(target.x, source.x);\r\n var maxX = Math.max(target.right, source.right);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, source.y);\r\n var maxY = Math.max(target.bottom, source.bottom);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeRect.js?")},"./node_modules/phaser/src/geom/rectangle/MergeXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Merges a Rectangle with a point by repositioning and/or resizing it so that the point is on or within its bounds.\r\n *\r\n * @function Phaser.Geom.Rectangle.MergeXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [target,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} target - The Rectangle which should be merged and modified.\r\n * @param {number} x - The X coordinate of the point which should be merged.\r\n * @param {number} y - The Y coordinate of the point which should be merged.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `target` Rectangle.\r\n */\r\nvar MergeXY = function (target, x, y)\r\n{\r\n var minX = Math.min(target.x, x);\r\n var maxX = Math.max(target.right, x);\r\n\r\n target.x = minX;\r\n target.width = maxX - minX;\r\n\r\n var minY = Math.min(target.y, y);\r\n var maxY = Math.max(target.bottom, y);\r\n\r\n target.y = minY;\r\n target.height = maxY - minY;\r\n\r\n return target;\r\n};\r\n\r\nmodule.exports = MergeXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/MergeXY.js?")},"./node_modules/phaser/src/geom/rectangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top left corner of a Rectangle by a given offset.\r\n *\r\n * @function Phaser.Geom.Rectangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {number} x - The distance to move the Rectangle horizontally.\r\n * @param {number} y - The distance to move the Rectangle vertically.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar Offset = function (rect, x, y)\r\n{\r\n rect.x += x;\r\n rect.y += y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Offset.js?")},"./node_modules/phaser/src/geom/rectangle/OffsetPoint.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Nudges (translates) the top-left corner of a Rectangle by the coordinates of a point (translation vector).\r\n *\r\n * @function Phaser.Geom.Rectangle.OffsetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to adjust.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2)} point - The point whose coordinates should be used as an offset.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The adjusted Rectangle.\r\n */\r\nvar OffsetPoint = function (rect, point)\r\n{\r\n rect.x += point.x;\r\n rect.y += point.y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = OffsetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/OffsetPoint.js?")},"./node_modules/phaser/src/geom/rectangle/Overlaps.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if two Rectangles overlap. If a Rectangle is within another Rectangle, the two will be considered overlapping. Thus, the Rectangles are treated as "solid".\r\n *\r\n * @function Phaser.Geom.Rectangle.Overlaps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to check.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to check.\r\n *\r\n * @return {boolean} `true` if the two Rectangles overlap, `false` otherwise.\r\n */\r\nvar Overlaps = function (rectA, rectB)\r\n{\r\n return (\r\n rectA.x < rectB.right &&\r\n rectA.right > rectB.x &&\r\n rectA.y < rectB.bottom &&\r\n rectA.bottom > rectB.y\r\n );\r\n};\r\n\r\nmodule.exports = Overlaps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Overlaps.js?')},"./node_modules/phaser/src/geom/rectangle/Perimeter.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the perimeter of a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to use.\r\n *\r\n * @return {number} The perimeter of the Rectangle, equal to `(width * 2) + (height * 2)`.\r\n */\r\nvar Perimeter = function (rect)\r\n{\r\n return 2 * (rect.width + rect.height);\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Perimeter.js?")},"./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ "./node_modules/phaser/src/math/DegToRad.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Rectangle.PerimeterPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectangle - [description]\r\n * @param {integer} angle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar PerimeterPoint = function (rectangle, angle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n angle = DegToRad(angle);\r\n\r\n var s = Math.sin(angle);\r\n var c = Math.cos(angle);\r\n\r\n var dx = (c > 0) ? rectangle.width / 2 : rectangle.width / -2;\r\n var dy = (s > 0) ? rectangle.height / 2 : rectangle.height / -2;\r\n\r\n if (Math.abs(dx * s) < Math.abs(dy * c))\r\n {\r\n dy = (dx * s) / c;\r\n }\r\n else\r\n {\r\n dx = (dy * c) / s;\r\n }\r\n\r\n out.x = dx + rectangle.centerX;\r\n out.y = dy + rectangle.centerY;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = PerimeterPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js?')},"./node_modules/phaser/src/geom/rectangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns a random point within a Rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The Rectangle to return a point from.\r\n * @param {Phaser.Geom.Point} out - The object to update with the point\'s coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} The modified `out` object, or a new Point if none was provided.\r\n */\r\nvar Random = function (rect, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = rect.x + (Math.random() * rect.width);\r\n out.y = rect.y + (Math.random() * rect.height);\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Random.js?')},"./node_modules/phaser/src/geom/rectangle/RandomOutside.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Between = __webpack_require__(/*! ../../math/Between */ "./node_modules/phaser/src/math/Between.js");\r\nvar ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Calculates a random point that lies within the `outer` Rectangle, but outside of the `inner` Rectangle.\r\n * The inner Rectangle must be fully contained within the outer rectangle.\r\n *\r\n * @function Phaser.Geom.Rectangle.RandomOutside\r\n * @since 3.10.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} outer - The outer Rectangle to get the random point within.\r\n * @param {Phaser.Geom.Rectangle} inner - The inner Rectangle to exclude from the returned point.\r\n * @param {Phaser.Geom.Point} [out] - A Point, or Point-like object to store the result in. If not specified, a new Point will be created.\r\n *\r\n * @return {Phaser.Geom.Point} A Point object containing the random values in its `x` and `y` properties.\r\n */\r\nvar RandomOutside = function (outer, inner, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n if (ContainsRect(outer, inner))\r\n {\r\n // Pick a random quadrant\r\n //\r\n // The quadrants don\'t extend the full widths / heights of the outer rect to give\r\n // us a better uniformed distribution, otherwise you get clumping in the corners where\r\n // the 4 quads would overlap\r\n\r\n switch (Between(0, 3))\r\n {\r\n case 0: // Top\r\n out.x = outer.x + (Math.random() * (inner.right - outer.x));\r\n out.y = outer.y + (Math.random() * (inner.top - outer.y));\r\n break;\r\n\r\n case 1: // Bottom\r\n out.x = inner.x + (Math.random() * (outer.right - inner.x));\r\n out.y = inner.bottom + (Math.random() * (outer.bottom - inner.bottom));\r\n break;\r\n\r\n case 2: // Left\r\n out.x = outer.x + (Math.random() * (inner.x - outer.x));\r\n out.y = inner.y + (Math.random() * (outer.bottom - inner.y));\r\n break;\r\n\r\n case 3: // Right\r\n out.x = inner.right + (Math.random() * (outer.right - inner.right));\r\n out.y = outer.y + (Math.random() * (inner.bottom - outer.y));\r\n break;\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = RandomOutside;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/RandomOutside.js?')},"./node_modules/phaser/src/geom/rectangle/Rectangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * Encapsulates a 2D rectangle defined by its corner point in the top-left and its extends in x (width) and y (height)\r\n *\r\n * @class Rectangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=0] - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} [width=0] - The width of the Rectangle.\r\n * @param {number} [height=0] - The height of the Rectangle.\r\n */\r\nvar Rectangle = new Class({\r\n\r\n initialize:\r\n\r\n function Rectangle (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.RECTANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Rectangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.RECTANGLE;\r\n\r\n /**\r\n * The X coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the Rectangle, i.e. the distance between its left side (defined by `x`) and its right side.\r\n *\r\n * @name Phaser.Geom.Rectangle#width\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Rectangle, i.e. the distance between its top side (defined by `y`) and its bottom side.\r\n *\r\n * @name Phaser.Geom.Rectangle#height\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n },\r\n\r\n /**\r\n * Checks if the given point is inside the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is within the Rectangle\'s bounds, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Calculates the coordinates of a point at a certain `position` on the Rectangle\'s perimeter.\r\n * \r\n * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is.\r\n * \r\n * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - The normalized distance into the Rectangle\'s perimeter to return.\r\n * @param {(Phaser.Geom.Point|object)} [output] - An object to update with the `x` and `y` coordinates of the point.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The updated `output` object, or a new Point if no `output` object was given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Returns an array of points from the perimeter of the Rectangle, each spaced out based on the quantity or step required.\r\n *\r\n * @method Phaser.Geom.Rectangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - The number of points to return. Set to `false` or 0 to return an arbitrary number of points (`perimeter / stepRate`) evenly spaced around the Rectangle based on the `stepRate`.\r\n * @param {number} [stepRate] - If `quantity` is 0, determines the normalized distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - An array to which to append the points.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `output` array, or a new array if none was provided.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point within the Rectangle\'s bounds.\r\n *\r\n * @method Phaser.Geom.Rectangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - The object in which to store the `x` and `y` coordinates of the point.\r\n *\r\n * @return {Phaser.Geom.Point} The updated `point`, or a new Point if none was provided.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets the position, width, and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} y - The Y coordinate of the top left corner of the Rectangle.\r\n * @param {number} width - The width of the Rectangle.\r\n * @param {number} height - The height of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setTo: function (x, y, width, height)\r\n {\r\n this.x = x;\r\n this.y = y;\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the position, width, and height of the Rectangle to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#setEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setEmpty: function ()\r\n {\r\n return this.setTo(0, 0, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the position of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the top left corner of the Rectangle.\r\n * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the width and height of the Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width to set the Rectangle to.\r\n * @param {number} [height=width] - The height to set the Rectangle to.\r\n *\r\n * @return {Phaser.Geom.Rectangle} This Rectangle object.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Determines if the Rectangle is empty. A Rectangle is empty if its width or height is less than or equal to 0.\r\n *\r\n * @method Phaser.Geom.Rectangle#isEmpty\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Rectangle is empty. A Rectangle object is empty if its width or height is less than or equal to 0.\r\n */\r\n isEmpty: function ()\r\n {\r\n return (this.width <= 0 || this.height <= 0);\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the top of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the top of this Rectangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.y, this.right, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the right of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the right of this Rectangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.y, this.right, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the bottom of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the bottom of this Rectangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.right, this.bottom, this.x, this.bottom);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to the left of this Rectangle.\r\n *\r\n * @method Phaser.Geom.Rectangle#getLineD\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to the left of this Rectangle.\r\n */\r\n getLineD: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x, this.bottom, this.x, this.y);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * The x coordinate of the left of the Rectangle.\r\n * Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.right)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = this.right - value;\r\n }\r\n\r\n this.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the x and width properties.\r\n * Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.\r\n *\r\n * @name Phaser.Geom.Rectangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.x + this.width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.x)\r\n {\r\n this.width = 0;\r\n }\r\n else\r\n {\r\n this.width = value - this.x;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.\r\n * However it does affect the height property, whereas changing the y value does not affect the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value >= this.bottom)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = (this.bottom - value);\r\n }\r\n\r\n this.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The sum of the y and height properties.\r\n * Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.\r\n *\r\n * @name Phaser.Geom.Rectangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.y + this.height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value <= this.y)\r\n {\r\n this.height = 0;\r\n }\r\n else\r\n {\r\n this.height = value - this.y;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The x coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerX: {\r\n\r\n get: function ()\r\n {\r\n return this.x + (this.width / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.x = value - (this.width / 2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the center of the Rectangle.\r\n *\r\n * @name Phaser.Geom.Rectangle#centerY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n centerY: {\r\n\r\n get: function ()\r\n {\r\n return this.y + (this.height / 2);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.y = value - (this.height / 2);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Rectangle.js?')},"./node_modules/phaser/src/geom/rectangle/SameDimensions.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.\r\n *\r\n * @function Phaser.Geom.Rectangle.SameDimensions\r\n * @since 3.15.0\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The first Rectangle object.\r\n * @param {Phaser.Geom.Rectangle} toCompare - The second Rectangle object.\r\n *\r\n * @return {boolean} `true` if the objects have equivalent values for the `width` and `height` properties, otherwise `false`.\r\n */\r\nvar SameDimensions = function (rect, toCompare)\r\n{\r\n return (rect.width === toCompare.width && rect.height === toCompare.height);\r\n};\r\n\r\nmodule.exports = SameDimensions;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/SameDimensions.js?")},"./node_modules/phaser/src/geom/rectangle/Scale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Scales the width and height of this Rectangle by the given amounts.\r\n\r\n/**\r\n * Scales the width and height of this Rectangle by the given amounts.\r\n *\r\n * @function Phaser.Geom.Rectangle.Scale\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [rect,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rect - The `Rectangle` object that will be scaled by the specified amount(s).\r\n * @param {number} x - The factor by which to scale the rectangle horizontally.\r\n * @param {number} y - The amount by which to scale the rectangle vertically. If this is not specified, the rectangle will be scaled by the factor `x` in both directions.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The rectangle object with updated `width` and `height` properties as calculated from the scaling factor(s).\r\n */\r\nvar Scale = function (rect, x, y)\r\n{\r\n if (y === undefined) { y = x; }\r\n\r\n rect.width *= x;\r\n rect.height *= y;\r\n\r\n return rect;\r\n};\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Scale.js?")},"./node_modules/phaser/src/geom/rectangle/Union.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\n/**\r\n * Creates a new Rectangle or repositions and/or resizes an existing Rectangle so that it encompasses the two given Rectangles, i.e. calculates their union.\r\n *\r\n * @function Phaser.Geom.Rectangle.Union\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Rectangle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Rectangle} rectA - The first Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} rectB - The second Rectangle to use.\r\n * @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the union in.\r\n *\r\n * @return {Phaser.Geom.Rectangle} The modified `out` Rectangle, or a new Rectangle if none was provided.\r\n */\r\nvar Union = function (rectA, rectB, out)\r\n{\r\n if (out === undefined) { out = new Rectangle(); }\r\n\r\n // Cache vars so we can use one of the input rects as the output rect\r\n var x = Math.min(rectA.x, rectB.x);\r\n var y = Math.min(rectA.y, rectB.y);\r\n var w = Math.max(rectA.right, rectB.right) - x;\r\n var h = Math.max(rectA.bottom, rectB.bottom) - y;\r\n\r\n return out.setTo(x, y, w, h);\r\n};\r\n\r\nmodule.exports = Union;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/Union.js?')},"./node_modules/phaser/src/geom/rectangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Rectangle = __webpack_require__(/*! ./Rectangle */ "./node_modules/phaser/src/geom/rectangle/Rectangle.js");\r\n\r\nRectangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/rectangle/Area.js");\r\nRectangle.Ceil = __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/geom/rectangle/Ceil.js");\r\nRectangle.CeilAll = __webpack_require__(/*! ./CeilAll */ "./node_modules/phaser/src/geom/rectangle/CeilAll.js");\r\nRectangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/rectangle/CenterOn.js");\r\nRectangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/rectangle/Clone.js");\r\nRectangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/rectangle/Contains.js");\r\nRectangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/rectangle/ContainsPoint.js");\r\nRectangle.ContainsRect = __webpack_require__(/*! ./ContainsRect */ "./node_modules/phaser/src/geom/rectangle/ContainsRect.js");\r\nRectangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/rectangle/CopyFrom.js");\r\nRectangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/rectangle/Decompose.js");\r\nRectangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/rectangle/Equals.js");\r\nRectangle.FitInside = __webpack_require__(/*! ./FitInside */ "./node_modules/phaser/src/geom/rectangle/FitInside.js");\r\nRectangle.FitOutside = __webpack_require__(/*! ./FitOutside */ "./node_modules/phaser/src/geom/rectangle/FitOutside.js");\r\nRectangle.Floor = __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/geom/rectangle/Floor.js");\r\nRectangle.FloorAll = __webpack_require__(/*! ./FloorAll */ "./node_modules/phaser/src/geom/rectangle/FloorAll.js");\r\nRectangle.FromPoints = __webpack_require__(/*! ./FromPoints */ "./node_modules/phaser/src/geom/rectangle/FromPoints.js");\r\nRectangle.GetAspectRatio = __webpack_require__(/*! ./GetAspectRatio */ "./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js");\r\nRectangle.GetCenter = __webpack_require__(/*! ./GetCenter */ "./node_modules/phaser/src/geom/rectangle/GetCenter.js");\r\nRectangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/rectangle/GetPoint.js");\r\nRectangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/rectangle/GetPoints.js");\r\nRectangle.GetSize = __webpack_require__(/*! ./GetSize */ "./node_modules/phaser/src/geom/rectangle/GetSize.js");\r\nRectangle.Inflate = __webpack_require__(/*! ./Inflate */ "./node_modules/phaser/src/geom/rectangle/Inflate.js");\r\nRectangle.Intersection = __webpack_require__(/*! ./Intersection */ "./node_modules/phaser/src/geom/rectangle/Intersection.js");\r\nRectangle.MarchingAnts = __webpack_require__(/*! ./MarchingAnts */ "./node_modules/phaser/src/geom/rectangle/MarchingAnts.js");\r\nRectangle.MergePoints = __webpack_require__(/*! ./MergePoints */ "./node_modules/phaser/src/geom/rectangle/MergePoints.js");\r\nRectangle.MergeRect = __webpack_require__(/*! ./MergeRect */ "./node_modules/phaser/src/geom/rectangle/MergeRect.js");\r\nRectangle.MergeXY = __webpack_require__(/*! ./MergeXY */ "./node_modules/phaser/src/geom/rectangle/MergeXY.js");\r\nRectangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/rectangle/Offset.js");\r\nRectangle.OffsetPoint = __webpack_require__(/*! ./OffsetPoint */ "./node_modules/phaser/src/geom/rectangle/OffsetPoint.js");\r\nRectangle.Overlaps = __webpack_require__(/*! ./Overlaps */ "./node_modules/phaser/src/geom/rectangle/Overlaps.js");\r\nRectangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/rectangle/Perimeter.js");\r\nRectangle.PerimeterPoint = __webpack_require__(/*! ./PerimeterPoint */ "./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js");\r\nRectangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/rectangle/Random.js");\r\nRectangle.RandomOutside = __webpack_require__(/*! ./RandomOutside */ "./node_modules/phaser/src/geom/rectangle/RandomOutside.js");\r\nRectangle.SameDimensions = __webpack_require__(/*! ./SameDimensions */ "./node_modules/phaser/src/geom/rectangle/SameDimensions.js");\r\nRectangle.Scale = __webpack_require__(/*! ./Scale */ "./node_modules/phaser/src/geom/rectangle/Scale.js");\r\nRectangle.Union = __webpack_require__(/*! ./Union */ "./node_modules/phaser/src/geom/rectangle/Union.js");\r\n\r\nmodule.exports = Rectangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/rectangle/index.js?')},"./node_modules/phaser/src/geom/triangle/Area.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Returns the area of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Area\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n *\r\n * @return {number} The area of the Triangle, always non-negative.\r\n */\r\nvar Area = function (triangle)\r\n{\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n return Math.abs(((x3 - x1) * (y2 - y1) - (x2 - x1) * (y3 - y1)) / 2);\r\n};\r\n\r\nmodule.exports = Area;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Area.js?")},"./node_modules/phaser/src/geom/triangle/BuildEquilateral.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Builds an equilateral triangle. In the equilateral triangle, all the sides are the same length (congruent) and all the angles are the same size (congruent).\r\n * The x/y specifies the top-middle of the triangle (x1/y1) and length is the length of each side.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildEquilateral\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - x coordinate of the top point of the triangle.\r\n * @param {number} y - y coordinate of the top point of the triangle.\r\n * @param {number} length - Length of each side of the triangle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle object of the given size.\r\n */\r\nvar BuildEquilateral = function (x, y, length)\r\n{\r\n var height = length * (Math.sqrt(3) / 2);\r\n\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x + (length / 2);\r\n var y2 = y + height;\r\n\r\n var x3 = x - (length / 2);\r\n var y3 = y + height;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildEquilateral;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildEquilateral.js?')},"./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EarCut = __webpack_require__(/*! ../polygon/Earcut */ "./node_modules/phaser/src/geom/polygon/Earcut.js");\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.BuildFromPolygon\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle[]} O - [out,$return]\r\n *\r\n * @param {array} data - A flat array of vertice coordinates like [x0,y0, x1,y1, x2,y2, ...]\r\n * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertice input would mean one hole with vertices 5–7 and another with 8–11).\r\n * @param {number} [scaleX=1] - [description]\r\n * @param {number} [scaleY=1] - [description]\r\n * @param {(array|Phaser.Geom.Triangle[])} [out] - [description]\r\n *\r\n * @return {(array|Phaser.Geom.Triangle[])} [description]\r\n */\r\nvar BuildFromPolygon = function (data, holes, scaleX, scaleY, out)\r\n{\r\n if (holes === undefined) { holes = null; }\r\n if (scaleX === undefined) { scaleX = 1; }\r\n if (scaleY === undefined) { scaleY = 1; }\r\n if (out === undefined) { out = []; }\r\n\r\n var tris = EarCut(data, holes);\r\n\r\n var a;\r\n var b;\r\n var c;\r\n\r\n var x1;\r\n var y1;\r\n\r\n var x2;\r\n var y2;\r\n\r\n var x3;\r\n var y3;\r\n\r\n for (var i = 0; i < tris.length; i += 3)\r\n {\r\n a = tris[i];\r\n b = tris[i + 1];\r\n c = tris[i + 2];\r\n\r\n x1 = data[a * 2] * scaleX;\r\n y1 = data[(a * 2) + 1] * scaleY;\r\n\r\n x2 = data[b * 2] * scaleX;\r\n y2 = data[(b * 2) + 1] * scaleY;\r\n\r\n x3 = data[c * 2] * scaleX;\r\n y3 = data[(c * 2) + 1] * scaleY;\r\n\r\n out.push(new Triangle(x1, y1, x2, y2, x3, y3));\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = BuildFromPolygon;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js?')},"./node_modules/phaser/src/geom/triangle/BuildRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n// Builds a right triangle, with one 90 degree angle and two acute angles\r\n// The x/y is the coordinate of the 90 degree angle (and will map to x1/y1 in the resulting Triangle)\r\n// w/h can be positive or negative and represent the length of each side\r\n\r\n/**\r\n * Builds a right triangle, i.e. one which has a 90-degree angle and two acute angles.\r\n *\r\n * @function Phaser.Geom.Triangle.BuildRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the right angle, which will also be the first X coordinate of the constructed Triangle.\r\n * @param {number} y - The Y coordinate of the right angle, which will also be the first Y coordinate of the constructed Triangle.\r\n * @param {number} width - The length of the side which is to the left or to the right of the right angle.\r\n * @param {number} height - The length of the side which is above or below the right angle.\r\n *\r\n * @return {Phaser.Geom.Triangle} The constructed right Triangle.\r\n */\r\nvar BuildRight = function (x, y, width, height)\r\n{\r\n if (height === undefined) { height = width; }\r\n\r\n // 90 degree angle\r\n var x1 = x;\r\n var y1 = y;\r\n\r\n var x2 = x;\r\n var y2 = y - height;\r\n\r\n var x3 = x + width;\r\n var y3 = y;\r\n\r\n return new Triangle(x1, y1, x2, y2, x3, y3);\r\n};\r\n\r\nmodule.exports = BuildRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/BuildRight.js?')},"./node_modules/phaser/src/geom/triangle/CenterOn.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nvar Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\n\r\n/**\r\n * @callback CenterFunction\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to return the center coordinates of.\r\n *\r\n * @return {Phaser.Math.Vector2} The center point of the Triangle according to the function.\r\n */\r\n\r\n/**\r\n * Positions the Triangle so that it is centered on the given coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.CenterOn\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle to be positioned.\r\n * @param {number} x - The horizontal coordinate to center on.\r\n * @param {number} y - The vertical coordinate to center on.\r\n * @param {CenterFunction} [centerFunc] - The function used to center the triangle. Defaults to Centroid centering.\r\n *\r\n * @return {Phaser.Geom.Triangle} The Triangle that was centered.\r\n */\r\nvar CenterOn = function (triangle, x, y, centerFunc)\r\n{\r\n if (centerFunc === undefined) { centerFunc = Centroid; }\r\n\r\n // Get the center of the triangle\r\n var center = centerFunc(triangle);\r\n\r\n // Difference\r\n var diffX = x - center.x;\r\n var diffY = y - center.y;\r\n\r\n return Offset(triangle, diffX, diffY);\r\n};\r\n\r\nmodule.exports = CenterOn;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CenterOn.js?')},"./node_modules/phaser/src/geom/triangle/Centroid.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three medians (the lines drawn from the vertices to the bisectors of the opposite sides)\r\n// meet in the centroid or center of mass (center of gravity).\r\n// The centroid divides each median in a ratio of 2:1\r\n\r\n/**\r\n * Calculates the position of a Triangle\'s centroid, which is also its center of mass (center of gravity).\r\n *\r\n * The centroid is the point in a Triangle at which its three medians (the lines drawn from the vertices to the bisectors of the opposite sides) meet. It divides each one in a 2:1 ratio.\r\n *\r\n * @function Phaser.Geom.Triangle.Centroid\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An object to store the coordinates in.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} The `out` object with modified `x` and `y` properties, or a new Point if none was provided.\r\n */\r\nvar Centroid = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n out.x = (triangle.x1 + triangle.x2 + triangle.x3) / 3;\r\n out.y = (triangle.y1 + triangle.y2 + triangle.y3) / 3;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Centroid;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Centroid.js?')},"./node_modules/phaser/src/geom/triangle/CircumCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n// Adapted from http://bjornharrtell.github.io/jsts/doc/api/jsts_geom_Triangle.js.html\r\n\r\n/**\r\n * Computes the determinant of a 2x2 matrix. Uses standard double-precision arithmetic, so is susceptible to round-off error.\r\n *\r\n * @function det\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} m00 - The [0,0] entry of the matrix.\r\n * @param {number} m01 - The [0,1] entry of the matrix.\r\n * @param {number} m10 - The [1,0] entry of the matrix.\r\n * @param {number} m11 - The [1,1] entry of the matrix.\r\n *\r\n * @return {number} the determinant.\r\n */\r\nfunction det (m00, m01, m10, m11)\r\n{\r\n return (m00 * m11) - (m01 * m10);\r\n}\r\n\r\n/**\r\n * Computes the circumcentre of a triangle. The circumcentre is the centre of\r\n * the circumcircle, the smallest circle which encloses the triangle. It is also\r\n * the common intersection point of the perpendicular bisectors of the sides of\r\n * the triangle, and is the only point which has equal distance to all three\r\n * vertices of the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Math.Vector2} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Math.Vector2} [out] - [description]\r\n *\r\n * @return {Phaser.Math.Vector2} [description]\r\n */\r\nvar CircumCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var cx = triangle.x3;\r\n var cy = triangle.y3;\r\n\r\n var ax = triangle.x1 - cx;\r\n var ay = triangle.y1 - cy;\r\n\r\n var bx = triangle.x2 - cx;\r\n var by = triangle.y2 - cy;\r\n\r\n var denom = 2 * det(ax, ay, bx, by);\r\n var numx = det(ay, ax * ax + ay * ay, by, bx * bx + by * by);\r\n var numy = det(ax, ax * ax + ay * ay, bx, bx * bx + by * by);\r\n\r\n out.x = cx - numx / denom;\r\n out.y = cy + numy / denom;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCenter.js?')},"./node_modules/phaser/src/geom/triangle/CircumCircle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../circle/Circle */ "./node_modules/phaser/src/geom/circle/Circle.js");\r\n\r\n// Adapted from https://gist.github.com/mutoo/5617691\r\n\r\n/**\r\n * Finds the circumscribed circle (circumcircle) of a Triangle object. The circumcircle is the circle which touches all of the triangle\'s vertices.\r\n *\r\n * @function Phaser.Geom.Triangle.CircumCircle\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Circle} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to use as input.\r\n * @param {Phaser.Geom.Circle} [out] - An optional Circle to store the result in.\r\n *\r\n * @return {Phaser.Geom.Circle} The updated `out` Circle, or a new Circle if none was provided.\r\n */\r\nvar CircumCircle = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Circle(); }\r\n\r\n // A\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n // B\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n // C\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var A = x2 - x1;\r\n var B = y2 - y1;\r\n var C = x3 - x1;\r\n var D = y3 - y1;\r\n var E = A * (x1 + x2) + B * (y1 + y2);\r\n var F = C * (x1 + x3) + D * (y1 + y3);\r\n var G = 2 * (A * (y3 - y2) - B * (x3 - x2));\r\n\r\n var dx;\r\n var dy;\r\n\r\n // If the points of the triangle are collinear, then just find the\r\n // extremes and use the midpoint as the center of the circumcircle.\r\n\r\n if (Math.abs(G) < 0.000001)\r\n {\r\n var minX = Math.min(x1, x2, x3);\r\n var minY = Math.min(y1, y2, y3);\r\n dx = (Math.max(x1, x2, x3) - minX) * 0.5;\r\n dy = (Math.max(y1, y2, y3) - minY) * 0.5;\r\n\r\n out.x = minX + dx;\r\n out.y = minY + dy;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n else\r\n {\r\n out.x = (D * E - B * F) / G;\r\n out.y = (A * F - C * E) / G;\r\n dx = out.x - x1;\r\n dy = out.y - y1;\r\n out.radius = Math.sqrt(dx * dx + dy * dy);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = CircumCircle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CircumCircle.js?')},"./node_modules/phaser/src/geom/triangle/Clone.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\n/**\r\n * Clones a Triangle object.\r\n *\r\n * @function Phaser.Geom.Triangle.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The Triangle to clone.\r\n *\r\n * @return {Phaser.Geom.Triangle} A new Triangle identical to the given one but separate from it.\r\n */\r\nvar Clone = function (source)\r\n{\r\n return new Triangle(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Clone.js?')},"./node_modules/phaser/src/geom/triangle/Contains.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n/**\r\n * Checks if a point (as a pair of coordinates) is inside a Triangle's bounds.\r\n *\r\n * @function Phaser.Geom.Triangle.Contains\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to check.\r\n * @param {number} x - The X coordinate of the point to check.\r\n * @param {number} y - The Y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the point is inside the Triangle, otherwise `false`.\r\n */\r\nvar Contains = function (triangle, x, y)\r\n{\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var v2x = x - triangle.x1;\r\n var v2y = y - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot02 = (v0x * v2x) + (v0y * v2y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n var dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n var u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n var v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n\r\n return (u >= 0 && v >= 0 && (u + v < 1));\r\n};\r\n\r\nmodule.exports = Contains;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Contains.js?")},"./node_modules/phaser/src/geom/triangle/ContainsArray.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// http://www.blackpawn.com/texts/pointinpoly/\r\n\r\n// points is an array of Point-like objects with public x/y properties\r\n// returns an array containing all points that are within the triangle, or an empty array if none\r\n// if 'returnFirst' is true it will return after the first point within the triangle is found\r\n\r\n/**\r\n * Filters an array of point-like objects to only those contained within a triangle.\r\n * If `returnFirst` is true, will return an array containing only the first point in the provided array that is within the triangle (or an empty array if there are no such points).\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsArray\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle that the points are being checked in.\r\n * @param {Phaser.Geom.Point[]} points - An array of point-like objects (objects that have an `x` and `y` property)\r\n * @param {boolean} [returnFirst=false] - If `true`, return an array containing only the first point found that is within the triangle.\r\n * @param {array} [out] - If provided, the points that are within the triangle will be appended to this array instead of being added to a new array. If `returnFirst` is true, only the first point found within the triangle will be appended. This array will also be returned by this function.\r\n *\r\n * @return {Phaser.Geom.Point[]} An array containing all the points from `points` that are within the triangle, if an array was provided as `out`, points will be appended to that array and it will also be returned here.\r\n */\r\nvar ContainsArray = function (triangle, points, returnFirst, out)\r\n{\r\n if (returnFirst === undefined) { returnFirst = false; }\r\n if (out === undefined) { out = []; }\r\n\r\n var v0x = triangle.x3 - triangle.x1;\r\n var v0y = triangle.y3 - triangle.y1;\r\n\r\n var v1x = triangle.x2 - triangle.x1;\r\n var v1y = triangle.y2 - triangle.y1;\r\n\r\n var dot00 = (v0x * v0x) + (v0y * v0y);\r\n var dot01 = (v0x * v1x) + (v0y * v1y);\r\n var dot11 = (v1x * v1x) + (v1y * v1y);\r\n\r\n // Compute barycentric coordinates\r\n var b = ((dot00 * dot11) - (dot01 * dot01));\r\n var inv = (b === 0) ? 0 : (1 / b);\r\n\r\n var u;\r\n var v;\r\n var v2x;\r\n var v2y;\r\n var dot02;\r\n var dot12;\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n for (var i = 0; i < points.length; i++)\r\n {\r\n v2x = points[i].x - x1;\r\n v2y = points[i].y - y1;\r\n\r\n dot02 = (v0x * v2x) + (v0y * v2y);\r\n dot12 = (v1x * v2x) + (v1y * v2y);\r\n\r\n u = ((dot11 * dot02) - (dot01 * dot12)) * inv;\r\n v = ((dot00 * dot12) - (dot01 * dot02)) * inv;\r\n \r\n if (u >= 0 && v >= 0 && (u + v < 1))\r\n {\r\n out.push({ x: points[i].x, y: points[i].y });\r\n\r\n if (returnFirst)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ContainsArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsArray.js?")},"./node_modules/phaser/src/geom/triangle/ContainsPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\n\r\n/**\r\n * Tests if a triangle contains a point.\r\n *\r\n * @function Phaser.Geom.Triangle.ContainsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The triangle.\r\n * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|any)} point - The point to test, or any point-like object with public `x` and `y` properties.\r\n *\r\n * @return {boolean} `true` if the point is within the triangle, otherwise `false`.\r\n */\r\nvar ContainsPoint = function (triangle, point)\r\n{\r\n return Contains(triangle, point.x, point.y);\r\n};\r\n\r\nmodule.exports = ContainsPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/ContainsPoint.js?')},"./node_modules/phaser/src/geom/triangle/CopyFrom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Copy the values of one Triangle to a destination Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.CopyFrom\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [dest,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} source - The source Triangle to copy the values from.\r\n * @param {Phaser.Geom.Triangle} dest - The destination Triangle to copy the values to.\r\n *\r\n * @return {Phaser.Geom.Triangle} The destination Triangle.\r\n */\r\nvar CopyFrom = function (source, dest)\r\n{\r\n return dest.setTo(source.x1, source.y1, source.x2, source.y2, source.x3, source.y3);\r\n};\r\n\r\nmodule.exports = CopyFrom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/CopyFrom.js?")},"./node_modules/phaser/src/geom/triangle/Decompose.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decomposes a Triangle into an array of its points.\r\n *\r\n * @function Phaser.Geom.Triangle.Decompose\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to decompose.\r\n * @param {array} [out] - An array to store the points into.\r\n *\r\n * @return {array} The provided `out` array, or a new array if none was provided, with three objects with `x` and `y` properties representing each point of the Triangle appended to it.\r\n */\r\nvar Decompose = function (triangle, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n out.push({ x: triangle.x1, y: triangle.y1 });\r\n out.push({ x: triangle.x2, y: triangle.y2 });\r\n out.push({ x: triangle.x3, y: triangle.y3 });\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Decompose;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Decompose.js?")},"./node_modules/phaser/src/geom/triangle/Equals.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns true if two triangles have the same coordinates.\r\n *\r\n * @function Phaser.Geom.Triangle.Equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The first triangle to check.\r\n * @param {Phaser.Geom.Triangle} toCompare - The second triangle to check.\r\n *\r\n * @return {boolean} `true` if the two given triangles have the exact same coordinates, otherwise `false`.\r\n */\r\nvar Equals = function (triangle, toCompare)\r\n{\r\n return (\r\n triangle.x1 === toCompare.x1 &&\r\n triangle.y1 === toCompare.y1 &&\r\n triangle.x2 === toCompare.x2 &&\r\n triangle.y2 === toCompare.y2 &&\r\n triangle.x3 === toCompare.x3 &&\r\n triangle.y3 === toCompare.y3\r\n );\r\n};\r\n\r\nmodule.exports = Equals;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Equals.js?")},"./node_modules/phaser/src/geom/triangle/GetPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n/**\r\n * Returns a Point from around the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the point on its perimeter from.\r\n * @param {number} position - The position along the perimeter of the triangle. A value between 0 and 1.\r\n * @param {(Phaser.Geom.Point|object)} [out] - An option Point, or Point-like object to store the value in. If not given a new Point will be created.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} A Point object containing the given position from the perimeter of the triangle.\r\n */\r\nvar GetPoint = function (triangle, position, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n if (position <= 0 || position >= 1)\r\n {\r\n out.x = line1.x1;\r\n out.y = line1.y1;\r\n\r\n return out;\r\n }\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n var p = perimeter * position;\r\n var localPosition = 0;\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n out.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n out.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n out.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n out.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n out.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n out.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoint.js?')},"./node_modules/phaser/src/geom/triangle/GetPoints.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * Returns an array of evenly spaced points on the perimeter of a Triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.GetPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the points from.\r\n * @param {integer} quantity - The number of evenly spaced points to return. Set to 0 to return an arbitrary number of points based on the `stepRate`.\r\n * @param {number} stepRate - If `quantity` is 0, the distance between each returned point.\r\n * @param {(array|Phaser.Geom.Point[])} [out] - An array to which the points should be appended.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} The modified `out` array, or a new array if none was provided.\r\n */\r\nvar GetPoints = function (triangle, quantity, stepRate, out)\r\n{\r\n if (out === undefined) { out = []; }\r\n\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n var length1 = Length(line1);\r\n var length2 = Length(line2);\r\n var length3 = Length(line3);\r\n\r\n var perimeter = length1 + length2 + length3;\r\n\r\n // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead.\r\n if (!quantity)\r\n {\r\n quantity = perimeter / stepRate;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var p = perimeter * (i / quantity);\r\n var localPosition = 0;\r\n\r\n var point = new Point();\r\n\r\n // Which line is it on?\r\n\r\n if (p < length1)\r\n {\r\n // Line 1\r\n localPosition = p / length1;\r\n\r\n point.x = line1.x1 + (line1.x2 - line1.x1) * localPosition;\r\n point.y = line1.y1 + (line1.y2 - line1.y1) * localPosition;\r\n }\r\n else if (p > length1 + length2)\r\n {\r\n // Line 3\r\n p -= length1 + length2;\r\n localPosition = p / length3;\r\n\r\n point.x = line3.x1 + (line3.x2 - line3.x1) * localPosition;\r\n point.y = line3.y1 + (line3.y2 - line3.y1) * localPosition;\r\n }\r\n else\r\n {\r\n // Line 2\r\n p -= length1;\r\n localPosition = p / length2;\r\n\r\n point.x = line2.x1 + (line2.x2 - line2.x1) * localPosition;\r\n point.y = line2.y1 + (line2.y2 - line2.y1) * localPosition;\r\n }\r\n\r\n out.push(point);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = GetPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/GetPoints.js?')},"./node_modules/phaser/src/geom/triangle/InCenter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n// The three angle bisectors of a triangle meet in one point called the incenter.\r\n// It is the center of the incircle, the circle inscribed in the triangle.\r\n\r\nfunction getLength (x1, y1, x2, y2)\r\n{\r\n var x = x1 - x2;\r\n var y = y1 - y2;\r\n var magnitude = (x * x) + (y * y);\r\n\r\n return Math.sqrt(magnitude);\r\n}\r\n\r\n/**\r\n * Calculates the position of the incenter of a Triangle object. This is the point where its three angle bisectors meet and it\'s also the center of the incircle, which is the circle inscribed in the triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.InCenter\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to find the incenter of.\r\n * @param {Phaser.Geom.Point} [out] - An optional Point in which to store the coordinates.\r\n *\r\n * @return {Phaser.Geom.Point} Point (x, y) of the center pixel of the triangle.\r\n */\r\nvar InCenter = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n var x1 = triangle.x1;\r\n var y1 = triangle.y1;\r\n\r\n var x2 = triangle.x2;\r\n var y2 = triangle.y2;\r\n\r\n var x3 = triangle.x3;\r\n var y3 = triangle.y3;\r\n\r\n var d1 = getLength(x3, y3, x2, y2);\r\n var d2 = getLength(x1, y1, x3, y3);\r\n var d3 = getLength(x2, y2, x1, y1);\r\n\r\n var p = d1 + d2 + d3;\r\n\r\n out.x = (x1 * d1 + x2 * d2 + x3 * d3) / p;\r\n out.y = (y1 * d1 + y2 * d2 + y3 * d3) / p;\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = InCenter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/InCenter.js?')},"./node_modules/phaser/src/geom/triangle/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves each point (vertex) of a Triangle by a given offset, thus moving the entire Triangle by that offset.\r\n *\r\n * @function Phaser.Geom.Triangle.Offset\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to move.\r\n * @param {number} x - The horizontal offset (distance) by which to move each point. Can be positive or negative.\r\n * @param {number} y - The vertical offset (distance) by which to move each point. Can be positive or negative.\r\n *\r\n * @return {Phaser.Geom.Triangle} The modified Triangle.\r\n */\r\nvar Offset = function (triangle, x, y)\r\n{\r\n triangle.x1 += x;\r\n triangle.y1 += y;\r\n\r\n triangle.x2 += x;\r\n triangle.y2 += y;\r\n\r\n triangle.x3 += x;\r\n triangle.y3 += y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Offset.js?")},"./node_modules/phaser/src/geom/triangle/Perimeter.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Length = __webpack_require__(/*! ../line/Length */ "./node_modules/phaser/src/geom/line/Length.js");\r\n\r\n// The 2D area of a triangle. The area value is always non-negative.\r\n\r\n/**\r\n * Gets the length of the perimeter of the given triangle.\r\n *\r\n * @function Phaser.Geom.Triangle.Perimeter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Perimeter = function (triangle)\r\n{\r\n var line1 = triangle.getLineA();\r\n var line2 = triangle.getLineB();\r\n var line3 = triangle.getLineC();\r\n\r\n return (Length(line1) + Length(line2) + Length(line3));\r\n};\r\n\r\nmodule.exports = Perimeter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Perimeter.js?')},"./node_modules/phaser/src/geom/triangle/Random.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Point = __webpack_require__(/*! ../point/Point */ "./node_modules/phaser/src/geom/point/Point.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Geom.Triangle.Random\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [out,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - [description]\r\n * @param {Phaser.Geom.Point} [out] - [description]\r\n *\r\n * @return {Phaser.Geom.Point} [description]\r\n */\r\nvar Random = function (triangle, out)\r\n{\r\n if (out === undefined) { out = new Point(); }\r\n\r\n // Basis vectors\r\n var ux = triangle.x2 - triangle.x1;\r\n var uy = triangle.y2 - triangle.y1;\r\n\r\n var vx = triangle.x3 - triangle.x1;\r\n var vy = triangle.y3 - triangle.y1;\r\n\r\n // Random point within the unit square\r\n var r = Math.random();\r\n var s = Math.random();\r\n\r\n // Point outside the triangle? Remap it.\r\n if (r + s >= 1)\r\n {\r\n r = 1 - r;\r\n s = 1 - s;\r\n }\r\n\r\n out.x = triangle.x1 + ((ux * r) + (vx * s));\r\n out.y = triangle.y1 + ((uy * r) + (vy * s));\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Random;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Random.js?')},"./node_modules/phaser/src/geom/triangle/Rotate.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\nvar InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\n\r\n/**\r\n * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet.\r\n *\r\n * @function Phaser.Geom.Triangle.Rotate\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar Rotate = function (triangle, angle)\r\n{\r\n var point = InCenter(triangle);\r\n\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Rotate.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\n/**\r\n * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {Phaser.Geom.Point} point - The Point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundPoint = function (triangle, point, angle)\r\n{\r\n return RotateAroundXY(triangle, point.x, point.y, angle);\r\n};\r\n\r\nmodule.exports = RotateAroundPoint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js?')},"./node_modules/phaser/src/geom/triangle/RotateAroundXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotates an entire Triangle at a given angle about a specific point.\r\n *\r\n * @function Phaser.Geom.Triangle.RotateAroundXY\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Triangle} O - [triangle,$return]\r\n *\r\n * @param {Phaser.Geom.Triangle} triangle - The Triangle to rotate.\r\n * @param {number} x - The X coordinate of the point to rotate the Triangle about.\r\n * @param {number} y - The Y coordinate of the point to rotate the Triangle about.\r\n * @param {number} angle - The angle by which to rotate the Triangle, in radians.\r\n *\r\n * @return {Phaser.Geom.Triangle} The rotated Triangle.\r\n */\r\nvar RotateAroundXY = function (triangle, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = triangle.x1 - x;\r\n var ty = triangle.y1 - y;\r\n\r\n triangle.x1 = tx * c - ty * s + x;\r\n triangle.y1 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x2 - x;\r\n ty = triangle.y2 - y;\r\n\r\n triangle.x2 = tx * c - ty * s + x;\r\n triangle.y2 = tx * s + ty * c + y;\r\n\r\n tx = triangle.x3 - x;\r\n ty = triangle.y3 - y;\r\n\r\n triangle.x3 = tx * c - ty * s + x;\r\n triangle.y3 = tx * s + ty * c + y;\r\n\r\n return triangle;\r\n};\r\n\r\nmodule.exports = RotateAroundXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/RotateAroundXY.js?")},"./node_modules/phaser/src/geom/triangle/Triangle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nvar GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nvar GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nvar GEOM_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/geom/const.js");\r\nvar Line = __webpack_require__(/*! ../line/Line */ "./node_modules/phaser/src/geom/line/Line.js");\r\nvar Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\n\r\n/**\r\n * @classdesc\r\n * A triangle is a plane created by connecting three points.\r\n * The first two arguments specify the first point, the middle two arguments\r\n * specify the second point, and the last two arguments specify the third point.\r\n *\r\n * @class Triangle\r\n * @memberof Phaser.Geom\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n */\r\nvar Triangle = new Class({\r\n\r\n initialize:\r\n\r\n function Triangle (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n /**\r\n * The geometry constant type of this object: `GEOM_CONST.TRIANGLE`.\r\n * Used for fast type comparisons.\r\n *\r\n * @name Phaser.Geom.Triangle#type\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.type = GEOM_CONST.TRIANGLE;\r\n\r\n /**\r\n * `x` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#x1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x1 = x1;\r\n\r\n /**\r\n * `y` coordinate of the first point.\r\n *\r\n * @name Phaser.Geom.Triangle#y1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y1 = y1;\r\n\r\n /**\r\n * `x` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#x2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x2 = x2;\r\n\r\n /**\r\n * `y` coordinate of the second point.\r\n *\r\n * @name Phaser.Geom.Triangle#y2\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y2 = y2;\r\n\r\n /**\r\n * `x` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#x3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x3 = x3;\r\n\r\n /**\r\n * `y` coordinate of the third point.\r\n *\r\n * @name Phaser.Geom.Triangle#y3\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y3 = y3;\r\n },\r\n\r\n /**\r\n * Checks whether a given points lies within the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#contains\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate of the point to check.\r\n * @param {number} y - The y coordinate of the point to check.\r\n *\r\n * @return {boolean} `true` if the coordinate pair is within the triangle, otherwise `false`.\r\n */\r\n contains: function (x, y)\r\n {\r\n return Contains(this, x, y);\r\n },\r\n\r\n /**\r\n * Returns a specific point on the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [output,$return]\r\n *\r\n * @param {number} position - Position as float within `0` and `1`. `0` equals the first point.\r\n * @param {(Phaser.Geom.Point|object)} [output] - Optional Point, or point-like object, that the calculated point will be written to.\r\n *\r\n * @return {(Phaser.Geom.Point|object)} Calculated `Point` that represents the requested position. It is the same as `output` when this parameter has been given.\r\n */\r\n getPoint: function (position, output)\r\n {\r\n return GetPoint(this, position, output);\r\n },\r\n\r\n /**\r\n * Calculates a list of evenly distributed points on the triangle. It is either possible to pass an amount of points to be generated (`quantity`) or the distance between two points (`stepRate`).\r\n *\r\n * @method Phaser.Geom.Triangle#getPoints\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point[]} O - [output,$return]\r\n *\r\n * @param {integer} quantity - Number of points to be generated. Can be falsey when `stepRate` should be used. All points have the same distance along the triangle.\r\n * @param {number} [stepRate] - Distance between two points. Will only be used when `quantity` is falsey.\r\n * @param {(array|Phaser.Geom.Point[])} [output] - Optional Array for writing the calculated points into. Otherwise a new array will be created.\r\n *\r\n * @return {(array|Phaser.Geom.Point[])} Returns a list of calculated `Point` instances or the filled array passed as parameter `output`.\r\n */\r\n getPoints: function (quantity, stepRate, output)\r\n {\r\n return GetPoints(this, quantity, stepRate, output);\r\n },\r\n\r\n /**\r\n * Returns a random point along the triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getRandomPoint\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Point} O - [point,$return]\r\n *\r\n * @param {Phaser.Geom.Point} [point] - Optional `Point` that should be modified. Otherwise a new one will be created.\r\n *\r\n * @return {Phaser.Geom.Point} Random `Point`. When parameter `point` has been provided it will be returned.\r\n */\r\n getRandomPoint: function (point)\r\n {\r\n return Random(this, point);\r\n },\r\n\r\n /**\r\n * Sets all three points of the triangle. Leaving out any coordinate sets it to be `0`.\r\n *\r\n * @method Phaser.Geom.Triangle#setTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x1=0] - `x` coordinate of the first point.\r\n * @param {number} [y1=0] - `y` coordinate of the first point.\r\n * @param {number} [x2=0] - `x` coordinate of the second point.\r\n * @param {number} [y2=0] - `y` coordinate of the second point.\r\n * @param {number} [x3=0] - `x` coordinate of the third point.\r\n * @param {number} [y3=0] - `y` coordinate of the third point.\r\n *\r\n * @return {Phaser.Geom.Triangle} This Triangle object.\r\n */\r\n setTo: function (x1, y1, x2, y2, x3, y3)\r\n {\r\n if (x1 === undefined) { x1 = 0; }\r\n if (y1 === undefined) { y1 = 0; }\r\n if (x2 === undefined) { x2 = 0; }\r\n if (y2 === undefined) { y2 = 0; }\r\n if (x3 === undefined) { x3 = 0; }\r\n if (y3 === undefined) { y3 = 0; }\r\n\r\n this.x1 = x1;\r\n this.y1 = y1;\r\n\r\n this.x2 = x2;\r\n this.y2 = y2;\r\n\r\n this.x3 = x3;\r\n this.y3 = y3;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line A of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineA\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line A of this Triangle.\r\n */\r\n getLineA: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x1, this.y1, this.x2, this.y2);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line B of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineB\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line B of this Triangle.\r\n */\r\n getLineB: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x2, this.y2, this.x3, this.y3);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Returns a Line object that corresponds to Line C of this Triangle.\r\n *\r\n * @method Phaser.Geom.Triangle#getLineC\r\n * @since 3.0.0\r\n *\r\n * @generic {Phaser.Geom.Line} O - [line,$return]\r\n *\r\n * @param {Phaser.Geom.Line} [line] - A Line object to set the results in. If `undefined` a new Line will be created.\r\n *\r\n * @return {Phaser.Geom.Line} A Line object that corresponds to line C of this Triangle.\r\n */\r\n getLineC: function (line)\r\n {\r\n if (line === undefined) { line = new Line(); }\r\n\r\n line.setTo(this.x3, this.y3, this.x1, this.y1);\r\n\r\n return line;\r\n },\r\n\r\n /**\r\n * Left most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#left\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 <= this.x2 && this.x1 <= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 <= this.x1 && this.x2 <= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Right most X coordinate of the triangle. Setting it moves the triangle on the X axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#right\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.x1, this.x2, this.x3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.x1 >= this.x2 && this.x1 >= this.x3)\r\n {\r\n diff = this.x1 - value;\r\n }\r\n else if (this.x2 >= this.x1 && this.x2 >= this.x3)\r\n {\r\n diff = this.x2 - value;\r\n }\r\n else\r\n {\r\n diff = this.x3 - value;\r\n }\r\n\r\n this.x1 -= diff;\r\n this.x2 -= diff;\r\n this.x3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Top most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#top\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return Math.min(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 <= this.y2 && this.y1 <= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 <= this.y1 && this.y2 <= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Bottom most Y coordinate of the triangle. Setting it moves the triangle on the Y axis accordingly.\r\n *\r\n * @name Phaser.Geom.Triangle#bottom\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return Math.max(this.y1, this.y2, this.y3);\r\n },\r\n\r\n set: function (value)\r\n {\r\n var diff = 0;\r\n\r\n if (this.y1 >= this.y2 && this.y1 >= this.y3)\r\n {\r\n diff = this.y1 - value;\r\n }\r\n else if (this.y2 >= this.y1 && this.y2 >= this.y3)\r\n {\r\n diff = this.y2 - value;\r\n }\r\n else\r\n {\r\n diff = this.y3 - value;\r\n }\r\n\r\n this.y1 -= diff;\r\n this.y2 -= diff;\r\n this.y3 -= diff;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/Triangle.js?')},"./node_modules/phaser/src/geom/triangle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Triangle = __webpack_require__(/*! ./Triangle */ "./node_modules/phaser/src/geom/triangle/Triangle.js");\r\n\r\nTriangle.Area = __webpack_require__(/*! ./Area */ "./node_modules/phaser/src/geom/triangle/Area.js");\r\nTriangle.BuildEquilateral = __webpack_require__(/*! ./BuildEquilateral */ "./node_modules/phaser/src/geom/triangle/BuildEquilateral.js");\r\nTriangle.BuildFromPolygon = __webpack_require__(/*! ./BuildFromPolygon */ "./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js");\r\nTriangle.BuildRight = __webpack_require__(/*! ./BuildRight */ "./node_modules/phaser/src/geom/triangle/BuildRight.js");\r\nTriangle.CenterOn = __webpack_require__(/*! ./CenterOn */ "./node_modules/phaser/src/geom/triangle/CenterOn.js");\r\nTriangle.Centroid = __webpack_require__(/*! ./Centroid */ "./node_modules/phaser/src/geom/triangle/Centroid.js");\r\nTriangle.CircumCenter = __webpack_require__(/*! ./CircumCenter */ "./node_modules/phaser/src/geom/triangle/CircumCenter.js");\r\nTriangle.CircumCircle = __webpack_require__(/*! ./CircumCircle */ "./node_modules/phaser/src/geom/triangle/CircumCircle.js");\r\nTriangle.Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/geom/triangle/Clone.js");\r\nTriangle.Contains = __webpack_require__(/*! ./Contains */ "./node_modules/phaser/src/geom/triangle/Contains.js");\r\nTriangle.ContainsArray = __webpack_require__(/*! ./ContainsArray */ "./node_modules/phaser/src/geom/triangle/ContainsArray.js");\r\nTriangle.ContainsPoint = __webpack_require__(/*! ./ContainsPoint */ "./node_modules/phaser/src/geom/triangle/ContainsPoint.js");\r\nTriangle.CopyFrom = __webpack_require__(/*! ./CopyFrom */ "./node_modules/phaser/src/geom/triangle/CopyFrom.js");\r\nTriangle.Decompose = __webpack_require__(/*! ./Decompose */ "./node_modules/phaser/src/geom/triangle/Decompose.js");\r\nTriangle.Equals = __webpack_require__(/*! ./Equals */ "./node_modules/phaser/src/geom/triangle/Equals.js");\r\nTriangle.GetPoint = __webpack_require__(/*! ./GetPoint */ "./node_modules/phaser/src/geom/triangle/GetPoint.js");\r\nTriangle.GetPoints = __webpack_require__(/*! ./GetPoints */ "./node_modules/phaser/src/geom/triangle/GetPoints.js");\r\nTriangle.InCenter = __webpack_require__(/*! ./InCenter */ "./node_modules/phaser/src/geom/triangle/InCenter.js");\r\nTriangle.Perimeter = __webpack_require__(/*! ./Perimeter */ "./node_modules/phaser/src/geom/triangle/Perimeter.js");\r\nTriangle.Offset = __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/geom/triangle/Offset.js");\r\nTriangle.Random = __webpack_require__(/*! ./Random */ "./node_modules/phaser/src/geom/triangle/Random.js");\r\nTriangle.Rotate = __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/geom/triangle/Rotate.js");\r\nTriangle.RotateAroundPoint = __webpack_require__(/*! ./RotateAroundPoint */ "./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js");\r\nTriangle.RotateAroundXY = __webpack_require__(/*! ./RotateAroundXY */ "./node_modules/phaser/src/geom/triangle/RotateAroundXY.js");\r\n\r\nmodule.exports = Triangle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/geom/triangle/index.js?')},"./node_modules/phaser/src/input/CreateInteractiveObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Interactive Object.\r\n * \r\n * This is called automatically by the Input Manager when you enable a Game Object for input.\r\n *\r\n * The resulting Interactive Object is mapped to the Game Object's `input` property.\r\n *\r\n * @function Phaser.Input.CreateInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to which this Interactive Object is bound.\r\n * @param {any} hitArea - The hit area for this Interactive Object. Typically a geometry shape, like a Rectangle or Circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - The 'contains' check callback that the hit area shape will use for all hit tests.\r\n *\r\n * @return {Phaser.Types.Input.InteractiveObject} The new Interactive Object.\r\n */\r\nvar CreateInteractiveObject = function (gameObject, hitArea, hitAreaCallback)\r\n{\r\n return {\r\n\r\n gameObject: gameObject,\r\n\r\n enabled: true,\r\n draggable: false,\r\n dropZone: false,\r\n cursor: false,\r\n\r\n target: null,\r\n\r\n camera: null,\r\n\r\n hitArea: hitArea,\r\n hitAreaCallback: hitAreaCallback,\r\n hitAreaDebug: null,\r\n\r\n // Has the dev specified their own shape, or is this bound to the texture size?\r\n customHitArea: false,\r\n\r\n localX: 0,\r\n localY: 0,\r\n\r\n // 0 = Not being dragged\r\n // 1 = Being checked for dragging\r\n // 2 = Being dragged\r\n dragState: 0,\r\n\r\n dragStartX: 0,\r\n dragStartY: 0,\r\n dragStartXGlobal: 0,\r\n dragStartYGlobal: 0,\r\n\r\n dragX: 0,\r\n dragY: 0\r\n\r\n };\r\n};\r\n\r\nmodule.exports = CreateInteractiveObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreateInteractiveObject.js?")},"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates a new Pixel Perfect Handler function.\r\n *\r\n * Access via `InputPlugin.makePixelPerfect` rather than calling it directly.\r\n *\r\n * @function Phaser.Input.CreatePixelPerfectHandler\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} textureManager - A reference to the Texture Manager.\r\n * @param {integer} alphaTolerance - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} The new Pixel Perfect Handler function.\r\n */\r\nvar CreatePixelPerfectHandler = function (textureManager, alphaTolerance)\r\n{\r\n return function (hitArea, x, y, gameObject)\r\n {\r\n var alpha = textureManager.getPixelAlpha(x, y, gameObject.texture.key, gameObject.frame.name);\r\n\r\n return (alpha && alpha >= alphaTolerance);\r\n };\r\n};\r\n\r\nmodule.exports = CreatePixelPerfectHandler;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/CreatePixelPerfectHandler.js?")},"./node_modules/phaser/src/input/InputManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar Keyboard = __webpack_require__(/*! ./keyboard/KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js");\r\nvar Mouse = __webpack_require__(/*! ./mouse/MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js");\r\nvar Pointer = __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js");\r\nvar Touch = __webpack_require__(/*! ./touch/TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js");\r\nvar TransformMatrix = __webpack_require__(/*! ../gameobjects/components/TransformMatrix */ "./node_modules/phaser/src/gameobjects/components/TransformMatrix.js");\r\nvar TransformXY = __webpack_require__(/*! ../math/TransformXY */ "./node_modules/phaser/src/math/TransformXY.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Manager is responsible for handling the pointer related systems in a single Phaser Game instance.\r\n *\r\n * Based on the Game Config it will create handlers for mouse and touch support.\r\n *\r\n * Keyboard and Gamepad are plugins, handled directly by the InputPlugin class.\r\n *\r\n * It then manages the events, pointer creation and general hit test related operations.\r\n *\r\n * You rarely need to interact with the Input Manager directly, and as such, all of its properties and methods\r\n * should be considered private. Instead, you should use the Input Plugin, which is a Scene level system, responsible\r\n * for dealing with all input events for a Scene.\r\n *\r\n * @class InputManager\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance that owns the Input Manager.\r\n * @param {object} config - The Input Configuration object, as set in the Game Config.\r\n */\r\nvar InputManager = new Class({\r\n\r\n initialize:\r\n\r\n function InputManager (game, config)\r\n {\r\n /**\r\n * The Game instance that owns the Input Manager.\r\n * A Game only maintains on instance of the Input Manager at any time.\r\n *\r\n * @name Phaser.Input.InputManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the global Game Scale Manager.\r\n * Used for all bounds checks and pointer scaling.\r\n *\r\n * @name Phaser.Input.InputManager#scaleManager\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.0\r\n */\r\n this.scaleManager;\r\n\r\n /**\r\n * The Canvas that is used for all DOM event input listeners.\r\n *\r\n * @name Phaser.Input.InputManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The Game Configuration object, as set during the game boot.\r\n *\r\n * @name Phaser.Input.InputManager#config\r\n * @type {Phaser.Core.Config}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * If set, the Input Manager will run its update loop every frame.\r\n *\r\n * @name Phaser.Input.InputManager#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Event Emitter instance that the Input Manager uses to emit events from.\r\n *\r\n * @name Phaser.Input.InputManager#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = new EventEmitter();\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n * This is updated automatically by the canvas over and out handlers.\r\n *\r\n * @name Phaser.Input.InputManager#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.isOver = true;\r\n\r\n /**\r\n * The default CSS cursor to be used when interacting with your game.\r\n *\r\n * See the `setDefaultCursor` method for more details.\r\n *\r\n * @name Phaser.Input.InputManager#defaultCursor\r\n * @type {string}\r\n * @since 3.10.0\r\n */\r\n this.defaultCursor = \'\';\r\n\r\n /**\r\n * A reference to the Keyboard Manager class, if enabled via the `input.keyboard` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardManager}\r\n * @since 3.16.0\r\n */\r\n this.keyboard = (config.inputKeyboard) ? new Keyboard(this) : null;\r\n\r\n /**\r\n * A reference to the Mouse Manager class, if enabled via the `input.mouse` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = (config.inputMouse) ? new Mouse(this) : null;\r\n\r\n /**\r\n * A reference to the Touch Manager class, if enabled via the `input.touch` Game Config property.\r\n *\r\n * @name Phaser.Input.InputManager#touch\r\n * @type {Phaser.Input.Touch.TouchManager}\r\n * @since 3.0.0\r\n */\r\n this.touch = (config.inputTouch) ? new Touch(this) : null;\r\n\r\n /**\r\n * An array of Pointers that have been added to the game.\r\n * The first entry is reserved for the Mouse Pointer, the rest are Touch Pointers.\r\n *\r\n * By default there is 1 touch pointer enabled. If you need more use the `addPointer` method to start them,\r\n * or set the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointers\r\n * @type {Phaser.Input.Pointer[]}\r\n * @since 3.10.0\r\n */\r\n this.pointers = [];\r\n\r\n /**\r\n * The number of touch objects activated and being processed each update.\r\n *\r\n * You can change this by either calling `addPointer` at run-time, or by\r\n * setting the `input.activePointers` property in the Game Config.\r\n *\r\n * @name Phaser.Input.InputManager#pointersTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n this.pointersTotal = config.inputActivePointers;\r\n\r\n if (config.inputTouch && this.pointersTotal === 1)\r\n {\r\n this.pointersTotal = 2;\r\n }\r\n\r\n for (var i = 0; i <= this.pointersTotal; i++)\r\n {\r\n var pointer = new Pointer(this, i);\r\n\r\n pointer.smoothFactor = config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n }\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointer\r\n * @type {?Phaser.Input.Pointer}\r\n * @since 3.10.0\r\n */\r\n this.mousePointer = (config.inputMouse) ? this.pointers[0] : null;\r\n\r\n /**\r\n * The most recently active Pointer object.\r\n *\r\n * If you\'ve only 1 Pointer in your game then this will accurately be either the first finger touched, or the mouse.\r\n *\r\n * If your game doesn\'t need to support multi-touch then you can safely use this property in all of your game\r\n * code and it will adapt to be either the mouse or the touch, based on device.\r\n *\r\n * @name Phaser.Input.InputManager#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @since 3.0.0\r\n */\r\n this.activePointer = this.pointers[0];\r\n\r\n /**\r\n * If the top-most Scene in the Scene List receives an input it will stop input from\r\n * propagating any lower down the scene list, i.e. if you have a UI Scene at the top\r\n * and click something on it, that click will not then be passed down to any other\r\n * Scene below. Disable this to have input events passed through all Scenes, all the time.\r\n *\r\n * @name Phaser.Input.InputManager#globalTopOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.globalTopOnly = true;\r\n\r\n /**\r\n * The time this Input Manager was last updated.\r\n * This value is populated by the Game Step each frame.\r\n *\r\n * @name Phaser.Input.InputManager#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.2\r\n */\r\n this.time = 0;\r\n\r\n /**\r\n * A re-cycled point-like object to store hit test values in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempPoint\r\n * @type {{x:number, y:number}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempPoint = { x: 0, y: 0 };\r\n\r\n /**\r\n * A re-cycled array to store hit results in.\r\n *\r\n * @name Phaser.Input.InputManager#_tempHitTest\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempHitTest = [];\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A re-cycled matrix used in hit test calculations.\r\n *\r\n * @name Phaser.Input.InputManager#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * An internal private var that records Scenes aborting event processing.\r\n *\r\n * @name Phaser.Input.InputManager#_tempSkip\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._tempSkip = false;\r\n\r\n /**\r\n * An internal private array that avoids needing to create a new array on every DOM mouse event.\r\n *\r\n * @name Phaser.Input.InputManager#mousePointerContainer\r\n * @type {Phaser.Input.Pointer[]}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this.mousePointerContainer = [ this.mousePointer ];\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now.\r\n *\r\n * @method Phaser.Input.InputManager#boot\r\n * @protected\r\n * @fires Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.canvas = this.game.canvas;\r\n\r\n this.scaleManager = this.game.scale;\r\n\r\n this.events.emit(Events.MANAGER_BOOT);\r\n\r\n this.game.events.on(GameEvents.PRE_RENDER, this.preRender, this);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOver: function (event)\r\n {\r\n this.isOver = true;\r\n\r\n this.events.emit(Events.GAME_OVER, event);\r\n },\r\n\r\n /**\r\n * Internal canvas state change, called automatically by the Mouse Manager.\r\n *\r\n * @method Phaser.Input.InputManager#setCanvasOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.0\r\n *\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event.\r\n */\r\n setCanvasOut: function (event)\r\n {\r\n this.isOver = false;\r\n\r\n this.events.emit(Events.GAME_OUT, event);\r\n },\r\n\r\n /**\r\n * Internal update, called automatically by the Game Step right at the start.\r\n *\r\n * @method Phaser.Input.InputManager#preRender\r\n * @private\r\n * @since 3.18.0\r\n */\r\n preRender: function ()\r\n {\r\n var time = this.game.loop.now;\r\n var delta = this.game.loop.delta;\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this.time = time;\r\n\r\n this.events.emit(Events.MANAGER_UPDATE);\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input && scene.sys.input.updatePoll(time, delta) && this.globalTopOnly)\r\n {\r\n // If the Scene returns true, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor(\'url(assets/cursors/sword.cur), pointer\');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It\'s up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputManager#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.defaultCursor = cursor;\r\n\r\n if (this.canvas.style.cursor !== cursor)\r\n {\r\n this.canvas.style.cursor = cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to set a custom cursor during its postUpdate step.\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n *\r\n * @method Phaser.Input.InputManager#setCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n setCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor)\r\n {\r\n this.canvas.style.cursor = interactiveObject.cursor;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the InputPlugin when processing over and out events.\r\n * \r\n * Tells the Input Manager to clear the hand cursor, if set, during its postUpdate step.\r\n *\r\n * @method Phaser.Input.InputManager#resetCursor\r\n * @private\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Types.Input.InteractiveObject} interactiveObject - The Interactive Object that called this method.\r\n */\r\n resetCursor: function (interactiveObject)\r\n {\r\n if (interactiveObject.cursor && this.canvas)\r\n {\r\n this.canvas.style.cursor = this.defaultCursor;\r\n }\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputManager#addPointer\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n if (quantity === undefined) { quantity = 1; }\r\n\r\n var output = [];\r\n\r\n if (this.pointersTotal + quantity > 10)\r\n {\r\n quantity = 10 - this.pointersTotal;\r\n }\r\n\r\n for (var i = 0; i < quantity; i++)\r\n {\r\n var id = this.pointers.length;\r\n\r\n var pointer = new Pointer(this, id);\r\n\r\n pointer.smoothFactor = this.config.inputSmoothFactor;\r\n\r\n this.pointers.push(pointer);\r\n\r\n this.pointersTotal++;\r\n\r\n output.push(pointer);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Internal method that gets a list of all the active Input Plugins in the game\r\n * and updates each of them in turn, in reverse order (top to bottom), to allow\r\n * for DOM top-level event handling simulation.\r\n *\r\n * @method Phaser.Input.InputManager#updateInputPlugins\r\n * @since 3.16.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n */\r\n updateInputPlugins: function (type, pointers)\r\n {\r\n var scenes = this.game.scene.getScenes(true, true);\r\n\r\n this._tempSkip = false;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene.sys.input)\r\n {\r\n var capture = scene.sys.input.update(type, pointers);\r\n\r\n if ((capture && this.globalTopOnly) || this._tempSkip)\r\n {\r\n // If the Scene returns true, or called stopPropagation, it means it captured some input that no other Scene should get, so we bail out\r\n return;\r\n }\r\n }\r\n }\r\n },\r\n\r\n // event.targetTouches = list of all touches on the TARGET ELEMENT (i.e. game dom element)\r\n // event.touches = list of all touches on the ENTIRE DOCUMENT, not just the target element\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch start event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchStart\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchStart: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (!pointer.active)\r\n {\r\n pointer.touchstart(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_START, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch move event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchMove: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchmove(changedTouch, event);\r\n\r\n this.activePointer = pointer;\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_MOVE, changed);\r\n },\r\n\r\n // For touch end its a list of the touch points that have been removed from the surface\r\n // https://developer.mozilla.org/en-US/docs/DOM/TouchList\r\n // event.changedTouches = the touches that CHANGED in this event, not the total number of them\r\n\r\n /**\r\n * Processes a touch end event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchEnd\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchEnd: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchend(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_END, changed);\r\n },\r\n\r\n /**\r\n * Processes a touch cancel event, as passed in by the TouchManager.\r\n *\r\n * @method Phaser.Input.InputManager#onTouchCancel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {TouchEvent} event - The native DOM Touch event.\r\n */\r\n onTouchCancel: function (event)\r\n {\r\n var pointers = this.pointers;\r\n var changed = [];\r\n\r\n for (var c = 0; c < event.changedTouches.length; c++)\r\n {\r\n var changedTouch = event.changedTouches[c];\r\n\r\n for (var i = 1; i < this.pointersTotal; i++)\r\n {\r\n var pointer = pointers[i];\r\n\r\n if (pointer.active && pointer.identifier === changedTouch.identifier)\r\n {\r\n pointer.touchcancel(changedTouch, event);\r\n\r\n changed.push(pointer);\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n this.updateInputPlugins(CONST.TOUCH_CANCEL, changed);\r\n },\r\n\r\n /**\r\n * Processes a mouse down event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseDown\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseDown: function (event)\r\n {\r\n this.mousePointer.down(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_DOWN, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse move event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseMove\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseMove: function (event)\r\n {\r\n this.mousePointer.move(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_MOVE, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse up event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseUp\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onMouseUp: function (event)\r\n {\r\n this.mousePointer.up(event);\r\n\r\n this.mousePointer.updateMotion();\r\n\r\n this.updateInputPlugins(CONST.MOUSE_UP, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a mouse wheel event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onMouseWheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The native DOM Wheel event.\r\n */\r\n onMouseWheel: function (event)\r\n {\r\n this.mousePointer.wheel(event);\r\n\r\n this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer);\r\n },\r\n\r\n /**\r\n * Processes a pointer lock change event, as passed in by the MouseManager.\r\n *\r\n * @method Phaser.Input.InputManager#onPointerLockChange\r\n * @fires Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @private\r\n * @since 3.19.0\r\n *\r\n * @param {MouseEvent} event - The native DOM Mouse event.\r\n */\r\n onPointerLockChange: function (event)\r\n {\r\n var isLocked = this.mouse.locked;\r\n\r\n this.mousePointer.locked = isLocked;\r\n\r\n this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked);\r\n },\r\n\r\n /**\r\n * Checks if the given Game Object should be considered as a candidate for input or not.\r\n *\r\n * Checks if the Game Object has an input component that is enabled, that it will render,\r\n * and finally, if it has a parent, that the parent parent, or any ancestor, is visible or not.\r\n *\r\n * @method Phaser.Input.InputManager#inputCandidate\r\n * @private\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to test.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {boolean} `true` if the Game Object should be considered for input, otherwise `false`.\r\n */\r\n inputCandidate: function (gameObject, camera)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.enabled || !gameObject.willRender(camera))\r\n {\r\n return false;\r\n }\r\n\r\n var visible = true;\r\n var parent = gameObject.parentContainer;\r\n\r\n if (parent)\r\n {\r\n do\r\n {\r\n if (!parent.willRender(camera))\r\n {\r\n visible = false;\r\n break;\r\n }\r\n\r\n parent = parent.parentContainer;\r\n\r\n } while (parent);\r\n }\r\n\r\n return visible;\r\n },\r\n\r\n /**\r\n * Performs a hit test using the given Pointer and camera, against an array of interactive Game Objects.\r\n *\r\n * The Game Objects are culled against the camera, and then the coordinates are translated into the local camera space\r\n * and used to determine if they fall within the remaining Game Objects hit areas or not.\r\n *\r\n * If nothing is matched an empty array is returned.\r\n *\r\n * This method is called automatically by InputPlugin.hitTestPointer and doesn\'t usually need to be invoked directly.\r\n *\r\n * @method Phaser.Input.InputManager#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to test against.\r\n * @param {array} gameObjects - An array of interactive Game Objects to check.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n * @param {array} [output] - An array to store the results in. If not given, a new empty array is created.\r\n *\r\n * @return {array} An array of the Game Objects that were hit during this hit test.\r\n */\r\n hitTest: function (pointer, gameObjects, camera, output)\r\n {\r\n if (output === undefined) { output = this._tempHitTest; }\r\n\r\n var tempPoint = this._tempPoint;\r\n\r\n var csx = camera.scrollX;\r\n var csy = camera.scrollY;\r\n\r\n output.length = 0;\r\n\r\n var x = pointer.x;\r\n var y = pointer.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n camera.getWorldPoint(x, y, tempPoint);\r\n\r\n pointer.worldX = tempPoint.x;\r\n pointer.worldY = tempPoint.y;\r\n\r\n var point = { x: 0, y: 0 };\r\n\r\n var matrix = this._tempMatrix;\r\n var parentMatrix = this._tempMatrix2;\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n // Checks if the Game Object can receive input (isn\'t being ignored by the camera, invisible, etc)\r\n // and also checks all of its parents, if any\r\n if (!this.inputCandidate(gameObject, camera))\r\n {\r\n continue;\r\n }\r\n\r\n var px = tempPoint.x + (csx * gameObject.scrollFactorX) - csx;\r\n var py = tempPoint.y + (csy * gameObject.scrollFactorY) - csy;\r\n\r\n if (gameObject.parentContainer)\r\n {\r\n gameObject.getWorldTransformMatrix(matrix, parentMatrix);\r\n\r\n matrix.applyInverse(px, py, point);\r\n }\r\n else\r\n {\r\n TransformXY(px, py, gameObject.x, gameObject.y, gameObject.rotation, gameObject.scaleX, gameObject.scaleY, point);\r\n }\r\n \r\n if (this.pointWithinHitArea(gameObject, point.x, point.y))\r\n {\r\n output.push(gameObject);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Game Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Game Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Game Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinHitArea: function (gameObject, x, y)\r\n {\r\n // Normalize the origin\r\n x += gameObject.displayOriginX;\r\n y += gameObject.displayOriginY;\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaCallback(input.hitArea, x, y, gameObject))\r\n {\r\n input.localX = x;\r\n input.localY = y;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given x and y coordinate are within the hit area of the Interactive Object.\r\n *\r\n * This method assumes that the coordinate values have already been translated into the space of the Interactive Object.\r\n *\r\n * If the coordinates are within the hit area they are set into the Interactive Objects Input `localX` and `localY` properties.\r\n *\r\n * @method Phaser.Input.InputManager#pointWithinInteractiveObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Input.InteractiveObject} object - The Interactive Object to check against.\r\n * @param {number} x - The translated x coordinate for the hit test.\r\n * @param {number} y - The translated y coordinate for the hit test.\r\n *\r\n * @return {boolean} `true` if the coordinates were inside the Game Objects hit area, otherwise `false`.\r\n */\r\n pointWithinInteractiveObject: function (object, x, y)\r\n {\r\n if (!object.hitArea)\r\n {\r\n return false;\r\n }\r\n\r\n // Normalize the origin\r\n x += object.gameObject.displayOriginX;\r\n y += object.gameObject.displayOriginY;\r\n\r\n object.localX = x;\r\n object.localY = y;\r\n\r\n return object.hitAreaCallback(object.hitArea, x, y, object);\r\n },\r\n\r\n /**\r\n * Transforms the pageX and pageY values of a Pointer into the scaled coordinate space of the Input Manager.\r\n *\r\n * @method Phaser.Input.InputManager#transformPointer\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to transform the values for.\r\n * @param {number} pageX - The Page X value.\r\n * @param {number} pageY - The Page Y value.\r\n * @param {boolean} wasMove - Are we transforming the Pointer from a move event, or an up / down event?\r\n */\r\n transformPointer: function (pointer, pageX, pageY, wasMove)\r\n {\r\n var p0 = pointer.position;\r\n var p1 = pointer.prevPosition;\r\n\r\n // Store previous position\r\n p1.x = p0.x;\r\n p1.y = p0.y;\r\n\r\n // Translate coordinates\r\n var x = this.scaleManager.transformX(pageX);\r\n var y = this.scaleManager.transformY(pageY);\r\n\r\n var a = pointer.smoothFactor;\r\n\r\n if (!wasMove || a === 0)\r\n {\r\n // Set immediately\r\n p0.x = x;\r\n p0.y = y;\r\n }\r\n else\r\n {\r\n // Apply smoothing\r\n p0.x = x * a + p1.x * (1 - a);\r\n p0.y = y * a + p1.y * (1 - a);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Input Manager and all of its systems.\r\n *\r\n * There is no way to recover from doing this.\r\n *\r\n * @method Phaser.Input.InputManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.events.removeAllListeners();\r\n\r\n this.game.events.off(GameEvents.PRE_RENDER);\r\n\r\n if (this.keyboard)\r\n {\r\n this.keyboard.destroy();\r\n }\r\n\r\n if (this.mouse)\r\n {\r\n this.mouse.destroy();\r\n }\r\n\r\n if (this.touch)\r\n {\r\n this.touch.destroy();\r\n }\r\n\r\n for (var i = 0; i < this.pointers.length; i++)\r\n {\r\n this.pointers[i].destroy();\r\n }\r\n\r\n this.pointers = [];\r\n this._tempHitTest = [];\r\n this._tempMatrix.destroy();\r\n this.canvas = null;\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = InputManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputManager.js?')},"./node_modules/phaser/src/input/InputPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Circle = __webpack_require__(/*! ../geom/circle/Circle */ \"./node_modules/phaser/src/geom/circle/Circle.js\");\r\nvar CircleContains = __webpack_require__(/*! ../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/input/const.js\");\r\nvar CreateInteractiveObject = __webpack_require__(/*! ./CreateInteractiveObject */ \"./node_modules/phaser/src/input/CreateInteractiveObject.js\");\r\nvar CreatePixelPerfectHandler = __webpack_require__(/*! ./CreatePixelPerfectHandler */ \"./node_modules/phaser/src/input/CreatePixelPerfectHandler.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar Ellipse = __webpack_require__(/*! ../geom/ellipse/Ellipse */ \"./node_modules/phaser/src/geom/ellipse/Ellipse.js\");\r\nvar EllipseContains = __webpack_require__(/*! ../geom/ellipse/Contains */ \"./node_modules/phaser/src/geom/ellipse/Contains.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GEOM_CONST = __webpack_require__(/*! ../geom/const */ \"./node_modules/phaser/src/geom/const.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ./InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar Triangle = __webpack_require__(/*! ../geom/triangle/Triangle */ \"./node_modules/phaser/src/geom/triangle/Triangle.js\");\r\nvar TriangleContains = __webpack_require__(/*! ../geom/triangle/Contains */ \"./node_modules/phaser/src/geom/triangle/Contains.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Input Plugin belongs to a Scene and handles all input related events and operations for it.\r\n *\r\n * You can access it from within a Scene using `this.input`.\r\n *\r\n * It emits events directly. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.on('pointerdown', callback, context);\r\n * ```\r\n *\r\n * To listen for a pointer down event anywhere on the game canvas.\r\n *\r\n * Game Objects can be enabled for input by calling their `setInteractive` method. After which they\r\n * will directly emit input events:\r\n *\r\n * ```javascript\r\n * var sprite = this.add.sprite(x, y, texture);\r\n * sprite.setInteractive();\r\n * sprite.on('pointerdown', callback, context);\r\n * ```\r\n * \r\n * There are lots of game configuration options available relating to input.\r\n * See the [Input Config object]{@linkcode Phaser.Types.Core.InputConfig} for more details, including how to deal with Phaser\r\n * listening for input events outside of the canvas, how to set a default number of pointers, input\r\n * capture settings and more.\r\n *\r\n * Please also see the Input examples and tutorials for further information.\r\n *\r\n * @class InputPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that this Input Plugin is responsible for.\r\n */\r\nvar InputPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function InputPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.InputPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems class.\r\n *\r\n * @name Phaser.Input.InputPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.InputPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.5.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Game Input Manager.\r\n *\r\n * @name Phaser.Input.InputPlugin#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.input;\r\n\r\n /**\r\n * Internal event queue used for plugins only.\r\n *\r\n * @name Phaser.Input.InputPlugin#pluginEvents\r\n * @type {Phaser.Events.EventEmitter}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.pluginEvents = new EventEmitter();\r\n\r\n /**\r\n * If `true` this Input Plugin will process DOM input events.\r\n *\r\n * @name Phaser.Input.InputPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.5.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * A reference to the Scene Display List. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene Cameras Manager. This property is set during the `boot` method.\r\n *\r\n * @name Phaser.Input.InputPlugin#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n // Inject the available input plugins into this class\r\n InputPluginCache.install(this);\r\n\r\n /**\r\n * A reference to the Mouse Manager.\r\n * \r\n * This property is only set if Mouse support has been enabled in your Game Configuration file.\r\n * \r\n * If you just wish to get access to the mouse pointer, use the `mousePointer` property instead.\r\n *\r\n * @name Phaser.Input.InputPlugin#mouse\r\n * @type {?Phaser.Input.Mouse.MouseManager}\r\n * @since 3.0.0\r\n */\r\n this.mouse = this.manager.mouse;\r\n\r\n /**\r\n * When set to `true` (the default) the Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @name Phaser.Input.InputPlugin#topOnly\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.topOnly = true;\r\n\r\n /**\r\n * How often should the Pointers be checked?\r\n * \r\n * The value is a time, given in ms, and is the time that must have elapsed between game steps before\r\n * the Pointers will be polled again. When a pointer is polled it runs a hit test to see which Game\r\n * Objects are currently below it, or being interacted with it.\r\n * \r\n * Pointers will *always* be checked if they have been moved by the user, or press or released.\r\n * \r\n * This property only controls how often they will be polled if they have not been updated.\r\n * You should set this if you want to have Game Objects constantly check against the pointers, even\r\n * if the pointer didn't itself move.\r\n * \r\n * Set to 0 to poll constantly. Set to -1 to only poll on user movement.\r\n *\r\n * @name Phaser.Input.InputPlugin#pollRate\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.pollRate = -1;\r\n\r\n /**\r\n * Internal poll timer value.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pollTimer\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pollTimer = 0;\r\n\r\n var _eventData = { cancelled: false };\r\n\r\n /**\r\n * Internal event propagation callback container.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventContainer\r\n * @type {Phaser.Types.Input.EventData}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventContainer = {\r\n stopPropagation: function ()\r\n {\r\n _eventData.cancelled = true;\r\n }\r\n };\r\n\r\n /**\r\n * Internal event propagation data object.\r\n *\r\n * @name Phaser.Input.InputPlugin#_eventData\r\n * @type {object}\r\n * @private\r\n * @since 3.13.0\r\n */\r\n this._eventData = _eventData;\r\n\r\n /**\r\n * The distance, in pixels, a pointer has to move while being held down, before it thinks it is being dragged.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragDistanceThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragDistanceThreshold = 0;\r\n\r\n /**\r\n * The amount of time, in ms, a pointer has to be held down before it thinks it is dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#dragTimeThreshold\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.dragTimeThreshold = 0;\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test\r\n *\r\n * @name Phaser.Input.InputPlugin#_temp\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._temp = [];\r\n\r\n /**\r\n * Used to temporarily store the results of the Hit Test dropZones\r\n *\r\n * @name Phaser.Input.InputPlugin#_tempZones\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._tempZones = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been set to be interactive in the Scene this Input Plugin is managing.\r\n *\r\n * @name Phaser.Input.InputPlugin#_list\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._list = [];\r\n\r\n /**\r\n * Objects waiting to be inserted to the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingInsertion\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * Objects waiting to be removed from the list on the next call to 'begin'.\r\n *\r\n * @name Phaser.Input.InputPlugin#_pendingRemoval\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n /**\r\n * A list of all Game Objects that have been enabled for dragging.\r\n *\r\n * @name Phaser.Input.InputPlugin#_draggable\r\n * @type {Phaser.GameObjects.GameObject[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._draggable = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'draggable' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_drag\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._drag = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A array containing the dragStates, for this Scene, index by the Pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_dragState\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._dragState = [];\r\n\r\n /**\r\n * A list of all Interactive Objects currently considered as being 'over' by any pointer, indexed by pointer ID.\r\n *\r\n * @name Phaser.Input.InputPlugin#_over\r\n * @type {{0:Array,1:Array,2:Array,3:Array,4:Array,5:Array,6:Array,7:Array,8:Array,9:Array,10:Array}}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._over = { 0: [], 1: [], 2: [], 3: [], 4: [], 5: [], 6: [], 7: [], 8: [], 9: [], 10: [] };\r\n\r\n /**\r\n * A list of valid DOM event types.\r\n *\r\n * @name Phaser.Input.InputPlugin#_validTypes\r\n * @type {string[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._validTypes = [ 'onDown', 'onUp', 'onOver', 'onOut', 'onMove', 'onDragStart', 'onDrag', 'onDragEnd', 'onDragEnter', 'onDragLeave', 'onDragOver', 'onDrop' ];\r\n\r\n /**\r\n * Internal property that tracks frame event state.\r\n *\r\n * @name Phaser.Input.InputPlugin#_updatedThisFrame\r\n * @type {boolean}\r\n * @private\r\n * @since 3.18.0\r\n */\r\n this._updatedThisFrame = false;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#boot\r\n * @fires Phaser.Input.Events#BOOT\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.cameras = this.systems.cameras;\r\n\r\n this.displayList = this.systems.displayList;\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.BOOT);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.InputPlugin#start\r\n * @fires Phaser.Input.Events#START\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.on(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.manager.events.on(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.on(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n this.enabled = true;\r\n\r\n // Populate the pointer drag states\r\n this._dragState = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.START);\r\n },\r\n\r\n /**\r\n * Game Over handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOver\r\n * @fires Phaser.Input.Events#GAME_OVER\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOver: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OVER, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * Game Out handler.\r\n *\r\n * @method Phaser.Input.InputPlugin#onGameOut\r\n * @fires Phaser.Input.Events#GAME_OUT\r\n * @private\r\n * @since 3.16.2\r\n */\r\n onGameOut: function (event)\r\n {\r\n if (this.isActive())\r\n {\r\n this.emit(Events.GAME_OUT, event.timeStamp, event);\r\n }\r\n },\r\n\r\n /**\r\n * The pre-update handler is responsible for checking the pending removal and insertion lists and\r\n * deleting old Game Objects.\r\n *\r\n * @method Phaser.Input.InputPlugin#preUpdate\r\n * @private\r\n * @fires Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.PRE_UPDATE);\r\n\r\n var removeList = this._pendingRemoval;\r\n var insertList = this._pendingInsertion;\r\n\r\n var toRemove = removeList.length;\r\n var toInsert = insertList.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var current = this._list;\r\n\r\n // Delete old gameObjects\r\n for (var i = 0; i < toRemove; i++)\r\n {\r\n var gameObject = removeList[i];\r\n\r\n var index = current.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n current.splice(index, 1);\r\n\r\n this.clear(gameObject, true);\r\n }\r\n }\r\n\r\n // Clear the removal list\r\n removeList.length = 0;\r\n this._pendingRemoval.length = 0;\r\n\r\n // Move pendingInsertion to list (also clears pendingInsertion at the same time)\r\n this._list = current.concat(insertList.splice(0));\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.InputPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * This is called automatically by the Input Manager.\r\n * It emits events for plugins to listen to and also handles polling updates, if enabled.\r\n *\r\n * @method Phaser.Input.InputPlugin#updatePoll\r\n * @since 3.18.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n updatePoll: function (time, delta)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n // The plugins should update every frame, regardless if there has been\r\n // any DOM input events or not (such as the Gamepad and Keyboard)\r\n this.pluginEvents.emit(Events.UPDATE, time, delta);\r\n\r\n // We can leave now if we've already updated once this frame via the immediate DOM event handlers\r\n if (this._updatedThisFrame)\r\n {\r\n this._updatedThisFrame = false;\r\n\r\n return false;\r\n }\r\n\r\n var i;\r\n var manager = this.manager;\r\n\r\n var pointers = manager.pointers;\r\n var pointersTotal = manager.pointersTotal;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n pointers[i].updateMotion();\r\n }\r\n\r\n // No point going any further if there aren't any interactive objects\r\n if (this._list.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var rate = this.pollRate;\r\n\r\n if (rate === -1)\r\n {\r\n return false;\r\n }\r\n else if (rate > 0)\r\n {\r\n this._pollTimer -= delta;\r\n\r\n if (this._pollTimer < 0)\r\n {\r\n // Discard timer diff, we're ready to poll again\r\n this._pollTimer = this.pollRate;\r\n }\r\n else\r\n {\r\n // Not enough time has elapsed since the last poll, so abort now\r\n return false;\r\n }\r\n }\r\n\r\n // We got this far? Then we should poll for movement\r\n var captured = false;\r\n\r\n for (i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n total += this.processOverOutEvents(pointer);\r\n\r\n this.processDragThresholdEvent(pointer);\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * This method is called when a DOM Event is received by the Input Manager. It handles dispatching the events\r\n * to relevant input enabled Game Objects in this scene.\r\n *\r\n * @method Phaser.Input.InputPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {integer} type - The type of event to process.\r\n * @param {Phaser.Input.Pointer[]} pointers - An array of Pointers on which the event occurred.\r\n * \r\n * @return {boolean} `true` if this Scene has captured the input events from all other Scenes, otherwise `false`.\r\n */\r\n update: function (type, pointers)\r\n {\r\n if (!this.isActive())\r\n {\r\n return false;\r\n }\r\n\r\n var pointersTotal = pointers.length;\r\n var captured = false;\r\n\r\n for (var i = 0; i < pointersTotal; i++)\r\n {\r\n var total = 0;\r\n var pointer = pointers[i];\r\n\r\n // Always reset this array\r\n this._tempZones = [];\r\n\r\n // _temp contains a hit tested and camera culled list of IO objects\r\n this._temp = this.hitTestPointer(pointer);\r\n\r\n this.sortGameObjects(this._temp);\r\n this.sortGameObjects(this._tempZones);\r\n\r\n if (this.topOnly)\r\n {\r\n // Only the top-most one counts now, so safely ignore the rest\r\n if (this._temp.length)\r\n {\r\n this._temp.splice(1);\r\n }\r\n\r\n if (this._tempZones.length)\r\n {\r\n this._tempZones.splice(1);\r\n }\r\n }\r\n\r\n switch (type)\r\n {\r\n case CONST.MOUSE_DOWN:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_UP:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_START:\r\n total += this.processDragDownEvent(pointer);\r\n total += this.processDownEvents(pointer);\r\n total += this.processOverEvents(pointer);\r\n break;\r\n\r\n case CONST.TOUCH_END:\r\n case CONST.TOUCH_CANCEL:\r\n total += this.processDragUpEvent(pointer);\r\n total += this.processUpEvents(pointer);\r\n total += this.processOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_MOVE:\r\n case CONST.TOUCH_MOVE:\r\n total += this.processDragMoveEvent(pointer);\r\n total += this.processMoveEvents(pointer);\r\n total += this.processOverOutEvents(pointer);\r\n break;\r\n\r\n case CONST.MOUSE_WHEEL:\r\n total += this.processWheelEvent(pointer);\r\n break;\r\n }\r\n\r\n if (total > 0)\r\n {\r\n // We interacted with an event in this Scene, so block any Scenes below us from doing the same this frame\r\n captured = true;\r\n }\r\n }\r\n\r\n this._updatedThisFrame = true;\r\n\r\n return captured;\r\n },\r\n\r\n /**\r\n * Clears a Game Object so it no longer has an Interactive Object associated with it.\r\n * The Game Object is then queued for removal from the Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#clear\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have its Interactive Object removed.\r\n * @param {boolean} [skipQueue=false] - Skip adding this Game Object into the removal queue?\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had its Interactive Object removed.\r\n */\r\n clear: function (gameObject, skipQueue)\r\n {\r\n if (skipQueue === undefined) { skipQueue = false; }\r\n\r\n var input = gameObject.input;\r\n\r\n // If GameObject.input already cleared from higher class\r\n if (!input)\r\n {\r\n return;\r\n }\r\n\r\n if (!skipQueue)\r\n {\r\n this.queueForRemoval(gameObject);\r\n }\r\n\r\n input.gameObject = undefined;\r\n input.target = undefined;\r\n input.hitArea = undefined;\r\n input.hitAreaCallback = undefined;\r\n input.callbackContext = undefined;\r\n\r\n this.manager.resetCursor(input);\r\n\r\n gameObject.input = null;\r\n\r\n // Clear from _draggable, _drag and _over\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n\r\n index = this._drag[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._drag[0].splice(index, 1);\r\n }\r\n\r\n index = this._over[0].indexOf(gameObject);\r\n\r\n if (index > -1)\r\n {\r\n this._over[0].splice(index, 1);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Disables Input on a single Game Object.\r\n *\r\n * An input disabled Game Object still retains its Interactive Object component and can be re-enabled\r\n * at any time, by passing it to `InputPlugin.enable`.\r\n *\r\n * @method Phaser.Input.InputPlugin#disable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to have its input system disabled.\r\n */\r\n disable: function (gameObject)\r\n {\r\n gameObject.input.enabled = false;\r\n },\r\n\r\n /**\r\n * Enable a Game Object for interaction.\r\n *\r\n * If the Game Object already has an Interactive Object component, it is enabled and returned.\r\n *\r\n * Otherwise, a new Interactive Object component is created and assigned to the Game Object's `input` property.\r\n *\r\n * Input works by using hit areas, these are nearly always geometric shapes, such as rectangles or circles, that act as the hit area\r\n * for the Game Object. However, you can provide your own hit area shape and callback, should you wish to handle some more advanced\r\n * input detection.\r\n *\r\n * If no arguments are provided it will try and create a rectangle hit area based on the texture frame the Game Object is using. If\r\n * this isn't a texture-bound object, such as a Graphics or BitmapText object, this will fail, and you'll need to provide a specific\r\n * shape for it to use.\r\n *\r\n * You can also provide an Input Configuration Object as the only argument to this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#enable\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to be enabled for input.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not?\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enable: function (gameObject, shape, callback, dropZone)\r\n {\r\n if (dropZone === undefined) { dropZone = false; }\r\n\r\n if (gameObject.input)\r\n {\r\n // If it is already has an InteractiveObject then just enable it and return\r\n gameObject.input.enabled = true;\r\n }\r\n else\r\n {\r\n // Create an InteractiveObject and enable it\r\n this.setHitArea(gameObject, shape, callback);\r\n }\r\n\r\n if (gameObject.input && dropZone && !gameObject.input.dropZone)\r\n {\r\n gameObject.input.dropZone = dropZone;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes the given Pointer and performs a hit test against it, to see which interactive Game Objects\r\n * it is currently above.\r\n *\r\n * The hit test is performed against which-ever Camera the Pointer is over. If it is over multiple\r\n * cameras, it starts checking the camera at the top of the camera list, and if nothing is found, iterates down the list.\r\n *\r\n * @method Phaser.Input.InputPlugin#hitTestPointer\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check against the Game Objects.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} An array of all the interactive Game Objects the Pointer was above.\r\n */\r\n hitTestPointer: function (pointer)\r\n {\r\n var cameras = this.cameras.getCamerasBelowPointer(pointer);\r\n\r\n for (var c = 0; c < cameras.length; c++)\r\n {\r\n var camera = cameras[c];\r\n\r\n // Get a list of all objects that can be seen by the camera below the pointer in the scene and store in 'over' array.\r\n // All objects in this array are input enabled, as checked by the hitTest method, so we don't need to check later on as well.\r\n var over = this.manager.hitTest(pointer, this._list, camera);\r\n\r\n // Filter out the drop zones\r\n for (var i = 0; i < over.length; i++)\r\n {\r\n var obj = over[i];\r\n\r\n if (obj.input.dropZone)\r\n {\r\n this._tempZones.push(obj);\r\n }\r\n }\r\n\r\n if (over.length > 0)\r\n {\r\n pointer.camera = camera;\r\n\r\n return over;\r\n }\r\n }\r\n\r\n // If we got this far then there were no Game Objects below the pointer, but it was still over\r\n // a camera, so set that the top-most one into the pointer\r\n\r\n pointer.camera = cameras[0];\r\n\r\n return [];\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer down event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDownEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN\r\n * @fires Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer being tested.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processDownEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_DOWN, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_DOWN, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.downElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_DOWN, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_DOWN_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * Returns the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state will be one of the following:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#getDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to get the drag state for.\r\n *\r\n * @return {integer} The drag state of the given Pointer.\r\n */\r\n getDragState: function (pointer)\r\n {\r\n return this._dragState[pointer.id];\r\n },\r\n\r\n /**\r\n * Sets the drag state of the given Pointer for this Input Plugin.\r\n * \r\n * The state must be one of the following values:\r\n * \r\n * 0 = Not dragging anything\r\n * 1 = Primary button down and objects below, so collect a draglist\r\n * 2 = Pointer being checked if meets drag criteria\r\n * 3 = Pointer meets criteria, notify the draglist\r\n * 4 = Pointer actively dragging the draglist and has moved\r\n * 5 = Pointer actively dragging but has been released, notify draglist\r\n *\r\n * @method Phaser.Input.InputPlugin#setDragState\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to set the drag state for.\r\n * @param {integer} state - The drag state value. An integer between 0 and 5.\r\n */\r\n setDragState: function (pointer, state)\r\n {\r\n this._dragState[pointer.id] = state;\r\n },\r\n\r\n /**\r\n * Checks to see if a Pointer is ready to drag the objects below it, based on either a distance\r\n * or time threshold.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragThresholdEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to check the drag thresholds on.\r\n * @param {number} time - The current time.\r\n */\r\n processDragThresholdEvent: function (pointer, time)\r\n {\r\n var passed = false;\r\n var timeThreshold = this.dragTimeThreshold;\r\n var distanceThreshold = this.dragDistanceThreshold;\r\n\r\n if (distanceThreshold > 0 && DistanceBetween(pointer.x, pointer.y, pointer.downX, pointer.downY) >= distanceThreshold)\r\n {\r\n // It has moved far enough to be considered a drag\r\n passed = true;\r\n }\r\n else if (timeThreshold > 0 && (time >= pointer.downTime + timeThreshold))\r\n {\r\n // It has been held down long enough to be considered a drag\r\n passed = true;\r\n }\r\n\r\n if (passed)\r\n {\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the drag list for the given pointer and dispatches the start events for each object on it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragStartList\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_START\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that DRAG_START was called on.\r\n */\r\n processDragStartList: function (pointer)\r\n {\r\n // 3 = Pointer meets criteria and is freshly down, notify the draglist\r\n if (this.getDragState(pointer) !== 3)\r\n {\r\n return 0;\r\n }\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n input.dragState = 2;\r\n\r\n input.dragStartX = gameObject.x;\r\n input.dragStartY = gameObject.y;\r\n\r\n input.dragStartXGlobal = pointer.x;\r\n input.dragStartYGlobal = pointer.y;\r\n\r\n input.dragX = input.dragStartXGlobal - input.dragStartX;\r\n input.dragY = input.dragStartYGlobal - input.dragStartY;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_START, pointer, input.dragX, input.dragY);\r\n\r\n this.emit(Events.DRAG_START, pointer, gameObject);\r\n }\r\n\r\n this.setDragState(pointer, 4);\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragDownEvent\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were collected on the drag list.\r\n */\r\n processDragDownEvent: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n if (this._draggable.length === 0 || currentlyOver.length === 0 || !pointer.primaryDown || this.getDragState(pointer) !== 0)\r\n {\r\n // There are no draggable items, no over items or the pointer isn't down, so let's not even bother going further\r\n return 0;\r\n }\r\n\r\n // 1 = Primary button down and objects below, so collect a draglist\r\n this.setDragState(pointer, 1);\r\n\r\n // Get draggable objects, sort them, pick the top (or all) and store them somewhere\r\n var draglist = [];\r\n\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (gameObject.input.draggable && (gameObject.input.dragState === 0))\r\n {\r\n draglist.push(gameObject);\r\n }\r\n }\r\n\r\n if (draglist.length === 0)\r\n {\r\n this.setDragState(pointer, 0);\r\n\r\n return 0;\r\n }\r\n else if (draglist.length > 1)\r\n {\r\n this.sortGameObjects(draglist);\r\n\r\n if (this.topOnly)\r\n {\r\n draglist.splice(1);\r\n }\r\n }\r\n\r\n // draglist now contains all potential candidates for dragging\r\n this._drag[pointer.id] = draglist;\r\n\r\n if (this.dragDistanceThreshold === 0 || this.dragTimeThreshold === 0)\r\n {\r\n // No drag criteria, so snap immediately to mode 3\r\n this.setDragState(pointer, 3);\r\n\r\n return this.processDragStartList(pointer);\r\n }\r\n else\r\n {\r\n // Check the distance / time on the next event\r\n this.setDragState(pointer, 2);\r\n\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Processes a 'drag move' event for the given pointer. \r\n *\r\n * @method Phaser.Input.InputPlugin#processDragMoveEvent\r\n * @private\r\n * @fires Phaser.Input.Events#DRAG_ENTER\r\n * @fires Phaser.Input.Events#DRAG\r\n * @fires Phaser.Input.Events#DRAG_LEAVE\r\n * @fires Phaser.Input.Events#DRAG_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragMoveEvent: function (pointer)\r\n {\r\n if (this.getDragState(pointer) !== 4)\r\n {\r\n return 0;\r\n }\r\n\r\n // 4 = Pointer actively dragging the draglist and has moved\r\n var dropZones = this._tempZones;\r\n\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n var target = input.target;\r\n\r\n // If this GO has a target then let's check it\r\n if (target)\r\n {\r\n var index = dropZones.indexOf(target);\r\n\r\n // Got a target, are we still over it?\r\n if (index === 0)\r\n {\r\n // We're still over it, and it's still the top of the display list, phew ...\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_OVER, pointer, target);\r\n\r\n this.emit(Events.DRAG_OVER, pointer, gameObject, target);\r\n }\r\n else if (index > 0)\r\n {\r\n // Still over it but it's no longer top of the display list (targets must always be at the top)\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope, we've moved on (or the target has!), leave the old target\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_LEAVE, pointer, target);\r\n\r\n this.emit(Events.DRAG_LEAVE, pointer, gameObject, target);\r\n\r\n // Anything new to replace it?\r\n // Yup!\r\n if (dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n else\r\n {\r\n // Nope\r\n input.target = null;\r\n }\r\n }\r\n }\r\n else if (!target && dropZones[0])\r\n {\r\n input.target = dropZones[0];\r\n\r\n target = input.target;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_ENTER, pointer, target);\r\n\r\n this.emit(Events.DRAG_ENTER, pointer, gameObject, target);\r\n }\r\n\r\n var dragX;\r\n var dragY;\r\n\r\n if (!gameObject.parentContainer)\r\n {\r\n dragX = pointer.x - input.dragX;\r\n dragY = pointer.y - input.dragY;\r\n }\r\n else\r\n {\r\n var dx = pointer.x - input.dragStartXGlobal;\r\n var dy = pointer.y - input.dragStartYGlobal;\r\n\r\n var rotation = gameObject.getParentRotation();\r\n \r\n var dxRotated = dx * Math.cos(rotation) + dy * Math.sin(rotation);\r\n var dyRotated = dy * Math.cos(rotation) - dx * Math.sin(rotation);\r\n\r\n dragX = dxRotated + input.dragStartX;\r\n dragY = dyRotated + input.dragStartY;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_DRAG, pointer, dragX, dragY);\r\n\r\n this.emit(Events.DRAG, pointer, gameObject, dragX, dragY);\r\n }\r\n\r\n return list.length;\r\n },\r\n\r\n /**\r\n * Processes a 'drag down' event for the given pointer. Checks the pointer state, builds-up the drag list\r\n * and prepares them all for interaction.\r\n *\r\n * @method Phaser.Input.InputPlugin#processDragUpEvent\r\n * @fires Phaser.Input.Events#DRAG_END\r\n * @fires Phaser.Input.Events#DROP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @fires Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The Pointer to process the drag event on.\r\n * \r\n * @return {integer} The number of items that were updated by this drag event.\r\n */\r\n processDragUpEvent: function (pointer)\r\n {\r\n // 5 = Pointer was actively dragging but has been released, notify draglist\r\n var list = this._drag[pointer.id];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var gameObject = list[i];\r\n\r\n var input = gameObject.input;\r\n\r\n if (input && input.dragState === 2)\r\n {\r\n input.dragState = 0;\r\n\r\n input.dragX = input.localX - gameObject.displayOriginX;\r\n input.dragY = input.localY - gameObject.displayOriginY;\r\n\r\n var dropped = false;\r\n\r\n var target = input.target;\r\n\r\n if (target)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DROP, pointer, target);\r\n\r\n this.emit(Events.DROP, pointer, gameObject, target);\r\n\r\n input.target = null;\r\n\r\n dropped = true;\r\n }\r\n\r\n // And finally the dragend event\r\n\r\n if (gameObject.input)\r\n {\r\n gameObject.emit(Events.GAMEOBJECT_DRAG_END, pointer, input.dragX, input.dragY, dropped);\r\n\r\n this.emit(Events.DRAG_END, pointer, gameObject, dropped);\r\n }\r\n }\r\n }\r\n\r\n this.setDragState(pointer, 0);\r\n\r\n list.splice(0);\r\n\r\n return 0;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer movement event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processMoveEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @fires Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @fires Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processMoveEvents: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_MOVE, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_MOVE, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n if (this.topOnly)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_MOVE, pointer, currentlyOver);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles a mouse wheel event.\r\n *\r\n * @method Phaser.Input.InputPlugin#processWheelEvent\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @fires Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @fires Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processWheelEvent: function (pointer)\r\n {\r\n var total = 0;\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n var dx = pointer.deltaX;\r\n var dy = pointer.deltaY;\r\n var dz = pointer.deltaZ;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n total++;\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_WHEEL, pointer, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_WHEEL, pointer, gameObject, dx, dy, dz, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_WHEEL, pointer, currentlyOver, dx, dy, dz);\r\n }\r\n\r\n return total;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over events.\r\n * This is called when a touch input hits the canvas, having previously been off of it.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = currentlyOver.length;\r\n\r\n var justOver = [];\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n \r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n justOver.push(gameObject);\r\n\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = justOver;\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer out events.\r\n * This is called when a touch input leaves the canvas, as it can never be 'over' in this case.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.18.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOutEvents: function (pointer)\r\n {\r\n var previouslyOver = this._over[pointer.id];\r\n\r\n var totalInteracted = 0;\r\n\r\n var total = previouslyOver.length;\r\n\r\n if (total > 0)\r\n {\r\n var manager = this.manager;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n \r\n _eventData.cancelled = false;\r\n \r\n var aborted = false;\r\n\r\n this.sortGameObjects(previouslyOver);\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var gameObject = previouslyOver[i];\r\n \r\n // Call onOut for everything in the previouslyOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n \r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n \r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n \r\n totalInteracted++;\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n \r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n \r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n \r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, previouslyOver);\r\n }\r\n }\r\n\r\n this._over[pointer.id] = [];\r\n }\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer over and out events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processOverOutEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @fires Phaser.Input.Events#POINTER_OVER\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @fires Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @fires Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processOverOutEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var i;\r\n var gameObject;\r\n var justOut = [];\r\n var justOver = [];\r\n var stillOver = [];\r\n var previouslyOver = this._over[pointer.id];\r\n var currentlyDragging = this._drag[pointer.id];\r\n\r\n var manager = this.manager;\r\n\r\n // Go through all objects the pointer was previously over, and see if it still is.\r\n // Splits the previouslyOver array into two parts: justOut and stillOver\r\n\r\n for (i = 0; i < previouslyOver.length; i++)\r\n {\r\n gameObject = previouslyOver[i];\r\n\r\n if (currentlyOver.indexOf(gameObject) === -1 && currentlyDragging.indexOf(gameObject) === -1)\r\n {\r\n // Not in the currentlyOver array, so must be outside of this object now\r\n justOut.push(gameObject);\r\n }\r\n else\r\n {\r\n // In the currentlyOver array\r\n stillOver.push(gameObject);\r\n }\r\n }\r\n\r\n // Go through all objects the pointer is currently over (the hit test results)\r\n // and if not in the previouslyOver array we know it's a new entry, so add to justOver\r\n for (i = 0; i < currentlyOver.length; i++)\r\n {\r\n gameObject = currentlyOver[i];\r\n\r\n // Is this newly over?\r\n\r\n if (previouslyOver.indexOf(gameObject) === -1)\r\n {\r\n justOver.push(gameObject);\r\n }\r\n }\r\n\r\n // By this point the arrays are filled, so now we can process what happened...\r\n\r\n // Process the Just Out objects\r\n var total = justOut.length;\r\n\r\n var totalInteracted = 0;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOut);\r\n\r\n // Call onOut for everything in the justOut array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOut[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Reset cursor before we emit the event, in case they want to change it during the event\r\n manager.resetCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OUT, pointer, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OUT, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OUT, pointer, justOut);\r\n }\r\n }\r\n\r\n // Process the Just Over objects\r\n total = justOver.length;\r\n\r\n _eventData.cancelled = false;\r\n\r\n aborted = false;\r\n\r\n if (total > 0)\r\n {\r\n this.sortGameObjects(justOver);\r\n\r\n // Call onOver for everything in the justOver array\r\n for (i = 0; i < total; i++)\r\n {\r\n gameObject = justOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n // Set cursor before we emit the event, in case they want to change it during the event\r\n manager.setCursor(gameObject.input);\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_OVER, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n totalInteracted++;\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_OVER, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n if (!aborted)\r\n {\r\n this.emit(Events.POINTER_OVER, pointer, justOver);\r\n }\r\n }\r\n\r\n // Add the contents of justOver to the previously over array\r\n previouslyOver = stillOver.concat(justOver);\r\n\r\n // Then sort it into display list order\r\n this._over[pointer.id] = this.sortGameObjects(previouslyOver);\r\n\r\n return totalInteracted;\r\n },\r\n\r\n /**\r\n * An internal method that handles the Pointer up events.\r\n *\r\n * @method Phaser.Input.InputPlugin#processUpEvents\r\n * @private\r\n * @fires Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @fires Phaser.Input.Events#GAMEOBJECT_UP\r\n * @fires Phaser.Input.Events#POINTER_UP\r\n * @fires Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - The pointer to check for events against.\r\n *\r\n * @return {integer} The total number of objects interacted with.\r\n */\r\n processUpEvents: function (pointer)\r\n {\r\n var currentlyOver = this._temp;\r\n\r\n var _eventData = this._eventData;\r\n var _eventContainer = this._eventContainer;\r\n\r\n _eventData.cancelled = false;\r\n\r\n var aborted = false;\r\n\r\n // Go through all objects the pointer was over and fire their events / callbacks\r\n for (var i = 0; i < currentlyOver.length; i++)\r\n {\r\n var gameObject = currentlyOver[i];\r\n\r\n if (!gameObject.input)\r\n {\r\n continue;\r\n }\r\n\r\n gameObject.emit(Events.GAMEOBJECT_POINTER_UP, pointer, gameObject.input.localX, gameObject.input.localY, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n\r\n this.emit(Events.GAMEOBJECT_UP, pointer, gameObject, _eventContainer);\r\n\r\n if (_eventData.cancelled || !gameObject.input)\r\n {\r\n aborted = true;\r\n break;\r\n }\r\n }\r\n\r\n // If they released outside the canvas, but pressed down inside it, we'll still dispatch the event.\r\n if (!aborted && this.manager)\r\n {\r\n if (pointer.upElement === this.manager.game.canvas)\r\n {\r\n this.emit(Events.POINTER_UP, pointer, currentlyOver);\r\n }\r\n else\r\n {\r\n this.emit(Events.POINTER_UP_OUTSIDE, pointer);\r\n }\r\n }\r\n\r\n return currentlyOver.length;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for insertion into this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForInsertion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to add.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForInsertion: function (child)\r\n {\r\n if (this._pendingInsertion.indexOf(child) === -1 && this._list.indexOf(child) === -1)\r\n {\r\n this._pendingInsertion.push(child);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queues a Game Object for removal from this Input Plugin on the next update.\r\n *\r\n * @method Phaser.Input.InputPlugin#queueForRemoval\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n queueForRemoval: function (child)\r\n {\r\n this._pendingRemoval.push(child);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the draggable state of the given array of Game Objects.\r\n *\r\n * They can either be set to be draggable, or can have their draggable state removed by passing `false`.\r\n *\r\n * A Game Object will not fire drag events unless it has been specifically enabled for drag.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDraggable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on.\r\n * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setDraggable: function (gameObjects, value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n gameObject.input.draggable = value;\r\n\r\n var index = this._draggable.indexOf(gameObject);\r\n\r\n if (value && index === -1)\r\n {\r\n this._draggable.push(gameObject);\r\n }\r\n else if (!value && index > -1)\r\n {\r\n this._draggable.splice(index, 1);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a function that can be passed to `setInteractive`, `enable` or `setHitArea` that will handle\r\n * pixel-perfect input detection on an Image or Sprite based Game Object, or any custom class that extends them.\r\n *\r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 1.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect());\r\n * ```\r\n * \r\n * The following will create a sprite that is clickable on any pixel that has an alpha value >= 150.\r\n *\r\n * ```javascript\r\n * this.add.sprite(x, y, key).setInteractive(this.input.makePixelPerfect(150));\r\n * ```\r\n *\r\n * Once you have made an Interactive Object pixel perfect it impacts all input related events for it: down, up,\r\n * dragstart, drag, etc.\r\n *\r\n * As a pointer interacts with the Game Object it will constantly poll the texture, extracting a single pixel from\r\n * the given coordinates and checking its color values. This is an expensive process, so should only be enabled on\r\n * Game Objects that really need it.\r\n * \r\n * You cannot make non-texture based Game Objects pixel perfect. So this will not work on Graphics, BitmapText,\r\n * Render Textures, Text, Tilemaps, Containers or Particles.\r\n *\r\n * @method Phaser.Input.InputPlugin#makePixelPerfect\r\n * @since 3.10.0\r\n *\r\n * @param {integer} [alphaTolerance=1] - The alpha level that the pixel should be above to be included as a successful interaction.\r\n *\r\n * @return {function} A Pixel Perfect Handler for use as a hitArea shape callback.\r\n */\r\n makePixelPerfect: function (alphaTolerance)\r\n {\r\n if (alphaTolerance === undefined) { alphaTolerance = 1; }\r\n\r\n var textureManager = this.systems.textures;\r\n\r\n return CreatePixelPerfectHandler(textureManager, alphaTolerance);\r\n },\r\n\r\n /**\r\n * Sets the hit area for the given array of Game Objects.\r\n *\r\n * A hit area is typically one of the geometric shapes Phaser provides, such as a `Phaser.Geom.Rectangle`\r\n * or `Phaser.Geom.Circle`. However, it can be any object as long as it works with the provided callback.\r\n *\r\n * If no hit area is provided a Rectangle is created based on the size of the Game Object, if possible\r\n * to calculate.\r\n *\r\n * The hit area callback is the function that takes an `x` and `y` coordinate and returns a boolean if\r\n * those values fall within the area of the shape or not. All of the Phaser geometry objects provide this,\r\n * such as `Phaser.Geom.Rectangle.Contains`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitArea\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set the hit area on.\r\n * @param {(Phaser.Types.Input.InputConfiguration|any)} [shape] - Either an input configuration object, or a geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitArea: function (gameObjects, shape, callback)\r\n {\r\n if (shape === undefined)\r\n {\r\n return this.setHitAreaFromTexture(gameObjects);\r\n }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n var draggable = false;\r\n var dropZone = false;\r\n var cursor = false;\r\n var useHandCursor = false;\r\n var pixelPerfect = false;\r\n var customHitArea = true;\r\n\r\n // Config object?\r\n if (IsPlainObject(shape))\r\n {\r\n var config = shape;\r\n\r\n shape = GetFastValue(config, 'hitArea', null);\r\n callback = GetFastValue(config, 'hitAreaCallback', null);\r\n draggable = GetFastValue(config, 'draggable', false);\r\n dropZone = GetFastValue(config, 'dropZone', false);\r\n cursor = GetFastValue(config, 'cursor', false);\r\n useHandCursor = GetFastValue(config, 'useHandCursor', false);\r\n\r\n pixelPerfect = GetFastValue(config, 'pixelPerfect', false);\r\n var alphaTolerance = GetFastValue(config, 'alphaTolerance', 1);\r\n\r\n if (pixelPerfect)\r\n {\r\n shape = {};\r\n callback = this.makePixelPerfect(alphaTolerance);\r\n }\r\n\r\n // Still no hitArea or callback?\r\n if (!shape || !callback)\r\n {\r\n this.setHitAreaFromTexture(gameObjects);\r\n customHitArea = false;\r\n }\r\n }\r\n else if (typeof shape === 'function' && !callback)\r\n {\r\n callback = shape;\r\n shape = {};\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n if (pixelPerfect && gameObject.type === 'Container')\r\n {\r\n console.warn('Cannot pixelPerfect test a Container. Use a custom callback.');\r\n continue;\r\n }\r\n\r\n var io = (!gameObject.input) ? CreateInteractiveObject(gameObject, shape, callback) : gameObject.input;\r\n\r\n io.customHitArea = customHitArea;\r\n io.dropZone = dropZone;\r\n io.cursor = (useHandCursor) ? 'pointer' : cursor;\r\n\r\n gameObject.input = io;\r\n\r\n if (draggable)\r\n {\r\n this.setDraggable(gameObject);\r\n }\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Circle` shape, using\r\n * the given coordinates and radius to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaCircle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a circle hit area.\r\n * @param {number} x - The center of the circle.\r\n * @param {number} y - The center of the circle.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaCircle: function (gameObjects, x, y, radius, callback)\r\n {\r\n if (callback === undefined) { callback = CircleContains; }\r\n\r\n var shape = new Circle(x, y, radius);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Ellipse` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaEllipse\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {number} x - The center of the ellipse.\r\n * @param {number} y - The center of the ellipse.\r\n * @param {number} width - The width of the ellipse.\r\n * @param {number} height - The height of the ellipse.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaEllipse: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = EllipseContains; }\r\n\r\n var shape = new Ellipse(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the Game Objects texture frame to define the position and size of the hit area.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaFromTexture\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaFromTexture: function (gameObjects, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n if (!Array.isArray(gameObjects))\r\n {\r\n gameObjects = [ gameObjects ];\r\n }\r\n\r\n for (var i = 0; i < gameObjects.length; i++)\r\n {\r\n var gameObject = gameObjects[i];\r\n\r\n var frame = gameObject.frame;\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n if (gameObject.width)\r\n {\r\n width = gameObject.width;\r\n height = gameObject.height;\r\n }\r\n else if (frame)\r\n {\r\n width = frame.realWidth;\r\n height = frame.realHeight;\r\n }\r\n\r\n if (gameObject.type === 'Container' && (width === 0 || height === 0))\r\n {\r\n console.warn('Container.setInteractive must specify a Shape or call setSize() first');\r\n continue;\r\n }\r\n\r\n if (width !== 0 && height !== 0)\r\n {\r\n gameObject.input = CreateInteractiveObject(gameObject, new Rectangle(0, 0, width, height), callback);\r\n\r\n this.queueForInsertion(gameObject);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Rectangle` shape, using\r\n * the given coordinates and dimensions to control its position and size.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a rectangular hit area.\r\n * @param {number} x - The top-left of the rectangle.\r\n * @param {number} y - The top-left of the rectangle.\r\n * @param {number} width - The width of the rectangle.\r\n * @param {number} height - The height of the rectangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaRectangle: function (gameObjects, x, y, width, height, callback)\r\n {\r\n if (callback === undefined) { callback = RectangleContains; }\r\n\r\n var shape = new Rectangle(x, y, width, height);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Sets the hit area for an array of Game Objects to be a `Phaser.Geom.Triangle` shape, using\r\n * the given coordinates to control the position of its points.\r\n *\r\n * @method Phaser.Input.InputPlugin#setHitAreaTriangle\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having a triangular hit area.\r\n * @param {number} x1 - The x coordinate of the first point of the triangle.\r\n * @param {number} y1 - The y coordinate of the first point of the triangle.\r\n * @param {number} x2 - The x coordinate of the second point of the triangle.\r\n * @param {number} y2 - The y coordinate of the second point of the triangle.\r\n * @param {number} x3 - The x coordinate of the third point of the triangle.\r\n * @param {number} y3 - The y coordinate of the third point of the triangle.\r\n * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback)\r\n {\r\n if (callback === undefined) { callback = TriangleContains; }\r\n\r\n var shape = new Triangle(x1, y1, x2, y2, x3, y3);\r\n\r\n return this.setHitArea(gameObjects, shape, callback);\r\n },\r\n\r\n /**\r\n * Creates an Input Debug Shape for the given Game Object.\r\n * \r\n * The Game Object must have _already_ been enabled for input prior to calling this method.\r\n * \r\n * This is intended to assist you during development and debugging.\r\n * \r\n * Debug Shapes can only be created for Game Objects that are using standard Phaser Geometry for input,\r\n * including: Circle, Ellipse, Line, Polygon, Rectangle and Triangle.\r\n * \r\n * Game Objects that are using their automatic hit areas are using Rectangles by default, so will also work.\r\n * \r\n * The Debug Shape is created and added to the display list and is then kept in sync with the Game Object\r\n * it is connected with. Should you need to modify it yourself, such as to hide it, you can access it via\r\n * the Game Object property: `GameObject.input.hitAreaDebug`.\r\n * \r\n * Calling this method on a Game Object that already has a Debug Shape will first destroy the old shape,\r\n * before creating a new one. If you wish to remove the Debug Shape entirely, you should call the\r\n * method `InputPlugin.removeDebug`.\r\n * \r\n * Note that the debug shape will only show the outline of the input area. If the input test is using a\r\n * pixel perfect check, for example, then this is not displayed. If you are using a custom shape, that\r\n * doesn't extend one of the base Phaser Geometry objects, as your hit area, then this method will not\r\n * work.\r\n *\r\n * @method Phaser.Input.InputPlugin#enableDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for.\r\n * @param {number} [color=0x00ff00] - The outline color of the debug shape.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n enableDebug: function (gameObject, color)\r\n {\r\n if (color === undefined) { color = 0x00ff00; }\r\n\r\n var input = gameObject.input;\r\n\r\n if (!input || !input.hitArea)\r\n {\r\n return this;\r\n }\r\n\r\n var shape = input.hitArea;\r\n var shapeType = shape.type;\r\n var debug = input.hitAreaDebug;\r\n var factory = this.systems.add;\r\n var updateList = this.systems.updateList;\r\n\r\n if (debug)\r\n {\r\n updateList.remove(debug);\r\n\r\n debug.destroy();\r\n\r\n debug = null;\r\n }\r\n\r\n switch (shapeType)\r\n {\r\n case GEOM_CONST.CIRCLE:\r\n debug = factory.arc(0, 0, shape.radius);\r\n break;\r\n\r\n case GEOM_CONST.ELLIPSE:\r\n debug = factory.ellipse(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.LINE:\r\n debug = factory.line(0, 0, shape.x1, shape.y1, shape.x2, shape.y2);\r\n break;\r\n\r\n case GEOM_CONST.POLYGON:\r\n debug = factory.polygon(0, 0, shape.points);\r\n break;\r\n\r\n case GEOM_CONST.RECTANGLE:\r\n debug = factory.rectangle(0, 0, shape.width, shape.height);\r\n break;\r\n\r\n case GEOM_CONST.TRIANGLE:\r\n debug = factory.triangle(0, 0, shape.x1, shape.y1, shape.x2, shape.y2, shape.x3, shape.y3);\r\n break;\r\n }\r\n\r\n if (debug)\r\n {\r\n debug.isFilled = false;\r\n\r\n debug.preUpdate = function ()\r\n {\r\n debug.setStrokeStyle(1 / gameObject.scale, color);\r\n \r\n debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY);\r\n debug.setRotation(gameObject.rotation);\r\n debug.setScale(gameObject.scaleX, gameObject.scaleY);\r\n debug.setPosition(gameObject.x, gameObject.y);\r\n debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY);\r\n };\r\n \r\n updateList.add(debug);\r\n \r\n input.hitAreaDebug = debug;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an Input Debug Shape from the given Game Object.\r\n * \r\n * The shape is destroyed immediately and the `hitAreaDebug` property is set to `null`.\r\n *\r\n * @method Phaser.Input.InputPlugin#removeDebug\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input Plugin.\r\n */\r\n removeDebug: function (gameObject)\r\n {\r\n var input = gameObject.input;\r\n\r\n if (input && input.hitAreaDebug)\r\n {\r\n var debug = input.hitAreaDebug;\r\n\r\n this.systems.updateList.remove(debug);\r\n \r\n debug.destroy();\r\n\r\n input.hitAreaDebug = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Pointers to always poll.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it, regardless if the Pointer has actually moved or not.\r\n *\r\n * You should enable this if you want objects in your game to fire over / out events, and the objects\r\n * are constantly moving, but the pointer may not have. Polling every frame has additional computation\r\n * costs, especially if there are a large number of interactive objects in your game.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollAlways\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollAlways: function ()\r\n {\r\n return this.setPollRate(0);\r\n },\r\n\r\n /**\r\n * Sets the Pointers to only poll when they are moved or updated.\r\n * \r\n * When a pointer is polled it runs a hit test to see which Game Objects are currently below it,\r\n * or being interacted with it.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollOnMove\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollOnMove: function ()\r\n {\r\n return this.setPollRate(-1);\r\n },\r\n\r\n /**\r\n * Sets the poll rate value. This is the amount of time that should have elapsed before a pointer\r\n * will be polled again. See the `setPollAlways` and `setPollOnMove` methods.\r\n *\r\n * @method Phaser.Input.InputPlugin#setPollRate\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setPollRate: function (value)\r\n {\r\n this.pollRate = value;\r\n this._pollTimer = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` the global Input Manager will emulate DOM behavior by only emitting events from\r\n * the top-most Scene in the Scene List. By default, if a Scene receives an input event it will then stop the event\r\n * from flowing down to any Scenes below it in the Scene list. To disable this behavior call this method with `false`.\r\n *\r\n * @method Phaser.Input.InputPlugin#setGlobalTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to `true` to stop processing input events on the Scene that receives it, or `false` to let the event continue down the Scene list.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setGlobalTopOnly: function (value)\r\n {\r\n this.manager.globalTopOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When set to `true` this Input Plugin will emulate DOM behavior by only emitting events from\r\n * the top-most Game Objects in the Display List.\r\n *\r\n * If set to `false` it will emit events from all Game Objects below a Pointer, not just the top one.\r\n *\r\n * @method Phaser.Input.InputPlugin#setTopOnly\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n setTopOnly: function (value)\r\n {\r\n this.topOnly = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Given an array of Game Objects, sort the array and return it, so that the objects are in depth index order\r\n * with the lowest at the bottom.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortGameObjects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject[]} gameObjects - An array of Game Objects to be sorted.\r\n *\r\n * @return {Phaser.GameObjects.GameObject[]} The sorted array of Game Objects.\r\n */\r\n sortGameObjects: function (gameObjects)\r\n {\r\n if (gameObjects.length < 2)\r\n {\r\n return gameObjects;\r\n }\r\n\r\n this.scene.sys.depthSort();\r\n\r\n return gameObjects.sort(this.sortHandlerGO.bind(this));\r\n },\r\n\r\n /**\r\n * Return the child lowest down the display list (with the smallest index)\r\n * Will iterate through all parent containers, if present.\r\n *\r\n * @method Phaser.Input.InputPlugin#sortHandlerGO\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} childA - The first Game Object to compare.\r\n * @param {Phaser.GameObjects.GameObject} childB - The second Game Object to compare.\r\n *\r\n * @return {integer} Returns either a negative or positive integer, or zero if they match.\r\n */\r\n sortHandlerGO: function (childA, childB)\r\n {\r\n if (!childA.parentContainer && !childB.parentContainer)\r\n {\r\n // Quick bail out when neither child has a container\r\n return this.displayList.getIndex(childB) - this.displayList.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB.parentContainer)\r\n {\r\n // Quick bail out when both children have the same container\r\n return childB.parentContainer.getIndex(childB) - childA.parentContainer.getIndex(childA);\r\n }\r\n else if (childA.parentContainer === childB)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return -1;\r\n }\r\n else if (childB.parentContainer === childA)\r\n {\r\n // Quick bail out when childA is a child of childB\r\n return 1;\r\n }\r\n else\r\n {\r\n // Container index check\r\n var listA = childA.getIndexList();\r\n var listB = childB.getIndexList();\r\n var len = Math.min(listA.length, listB.length);\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n var indexA = listA[i];\r\n var indexB = listB[i];\r\n\r\n if (indexA === indexB)\r\n {\r\n // Go to the next level down\r\n continue;\r\n }\r\n else\r\n {\r\n // Non-matching parents, so return\r\n return indexB - indexA;\r\n }\r\n }\r\n }\r\n\r\n // Technically this shouldn't happen, but ...\r\n return 0;\r\n },\r\n\r\n /**\r\n * This method should be called from within an input event handler, such as `pointerdown`.\r\n * \r\n * When called, it stops the Input Manager from allowing _this specific event_ to be processed by any other Scene\r\n * not yet handled in the scene list.\r\n *\r\n * @method Phaser.Input.InputPlugin#stopPropagation\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.InputPlugin} This InputPlugin object.\r\n */\r\n stopPropagation: function ()\r\n {\r\n this.manager._tempSkip = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds new Pointer objects to the Input Manager.\r\n *\r\n * By default Phaser creates 2 pointer objects: `mousePointer` and `pointer1`.\r\n *\r\n * You can create more either by calling this method, or by setting the `input.activePointers` property\r\n * in the Game Config, up to a maximum of 10 pointers.\r\n *\r\n * The first 10 pointers are available via the `InputPlugin.pointerX` properties, once they have been added\r\n * via this method.\r\n *\r\n * @method Phaser.Input.InputPlugin#addPointer\r\n * @since 3.10.0\r\n * \r\n * @param {integer} [quantity=1] The number of new Pointers to create. A maximum of 10 is allowed in total.\r\n *\r\n * @return {Phaser.Input.Pointer[]} An array containing all of the new Pointer objects that were created.\r\n */\r\n addPointer: function (quantity)\r\n {\r\n return this.manager.addPointer(quantity);\r\n },\r\n\r\n /**\r\n * Tells the Input system to set a custom cursor.\r\n * \r\n * This cursor will be the default cursor used when interacting with the game canvas.\r\n *\r\n * If an Interactive Object also sets a custom cursor, this is the cursor that is reset after its use.\r\n *\r\n * Any valid CSS cursor value is allowed, including paths to image files, i.e.:\r\n *\r\n * ```javascript\r\n * this.input.setDefaultCursor('url(assets/cursors/sword.cur), pointer');\r\n * ```\r\n * \r\n * Please read about the differences between browsers when it comes to the file formats and sizes they support:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/cursor\r\n * https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_User_Interface/Using_URL_values_for_the_cursor_property\r\n *\r\n * It's up to you to pick a suitable cursor format that works across the range of browsers you need to support.\r\n *\r\n * @method Phaser.Input.InputPlugin#setDefaultCursor\r\n * @since 3.10.0\r\n * \r\n * @param {string} cursor - The CSS to be used when setting the default cursor.\r\n *\r\n * @return {Phaser.Input.InputPlugin} This Input instance.\r\n */\r\n setDefaultCursor: function (cursor)\r\n {\r\n this.manager.setDefaultCursor(cursor);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionIn\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionIn: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin has finished transitioning in.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionComplete\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n if (!this.settings.transitionAllowInput)\r\n {\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is transitioning out.\r\n *\r\n * @method Phaser.Input.InputPlugin#transitionOut\r\n * @private\r\n * @since 3.5.0\r\n */\r\n transitionOut: function ()\r\n {\r\n this.enabled = this.settings.transitionAllowInput;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Input.InputPlugin#shutdown\r\n * @fires Phaser.Input.Events#SHUTDOWN\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.SHUTDOWN);\r\n\r\n this._temp.length = 0;\r\n this._list.length = 0;\r\n this._draggable.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n this._dragState.length = 0;\r\n\r\n for (var i = 0; i < 10; i++)\r\n {\r\n this._drag[i] = [];\r\n this._over[i] = [];\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.TRANSITION_START, this.transitionIn, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_OUT, this.transitionOut, this);\r\n eventEmitter.off(SceneEvents.TRANSITION_COMPLETE, this.transitionComplete, this);\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n\r\n this.manager.events.off(Events.GAME_OUT, this.onGameOut, this);\r\n this.manager.events.off(Events.GAME_OVER, this.onGameOver, this);\r\n\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed. \r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Input.InputPlugin#destroy\r\n * @fires Phaser.Input.Events#DESTROY\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n // Registered input plugins listen for this\r\n this.pluginEvents.emit(Events.DESTROY);\r\n\r\n this.pluginEvents.removeAllListeners();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.cameras = null;\r\n this.manager = null;\r\n this.events = null;\r\n this.mouse = null;\r\n },\r\n\r\n /**\r\n * The x coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#x\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinates of the ActivePointer based on the first camera in the camera list.\r\n * This is only safe to use if your game has just 1 non-transformed camera and doesn't use multi-touch.\r\n *\r\n * @name Phaser.Input.InputPlugin#y\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Are any mouse or touch pointers currently over the game canvas?\r\n *\r\n * @name Phaser.Input.InputPlugin#isOver\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isOver: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.isOver;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The mouse has its own unique Pointer object, which you can reference directly if making a _desktop specific game_.\r\n * If you are supporting both desktop and touch devices then do not use this property, instead use `activePointer`\r\n * which will always map to the most recently interacted pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#mousePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n mousePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.mousePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The current active input Pointer.\r\n *\r\n * @name Phaser.Input.InputPlugin#activePointer\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n activePointer: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.activePointer;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer1\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer1: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[1];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer2\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer2: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[2];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer3\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer3: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[3];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer4\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer4: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[4];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer5\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer5: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[5];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer6\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer6: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[6];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer7\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer7: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[7];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer8\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer8: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[8];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer9\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer9: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[9];\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A touch-based Pointer object.\r\n * This will be `undefined` by default unless you add a new Pointer using `addPointer`.\r\n *\r\n * @name Phaser.Input.InputPlugin#pointer10\r\n * @type {Phaser.Input.Pointer}\r\n * @readonly\r\n * @since 3.10.0\r\n */\r\n pointer10: {\r\n\r\n get: function ()\r\n {\r\n return this.manager.pointers[10];\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('InputPlugin', InputPlugin, 'input');\r\n\r\nmodule.exports = InputPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPlugin.js?")},"./node_modules/phaser/src/input/InputPluginCache.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar inputPlugins = {};\r\n\r\n/**\r\n * @namespace Phaser.Input.InputPluginCache\r\n */\r\n\r\nvar InputPluginCache = {};\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @name Phaser.Input.InputPluginCache.register\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Input Plugin, this is the property key used.\r\n * @param {string} settingsKey - The key in the Scene Settings to check to see if this plugin should install or not.\r\n * @param {string} configKey - The key in the Game Config to check to see if this plugin should install or not.\r\n */\r\nInputPluginCache.register = function (key, plugin, mapping, settingsKey, configKey)\r\n{\r\n inputPlugins[key] = { plugin: plugin, mapping: mapping, settingsKey: settingsKey, configKey: configKey };\r\n};\r\n\r\n/**\r\n * Returns the input plugin object from the cache based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.getCore\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to get.\r\n *\r\n * @return {Phaser.Types.Input.InputPluginContainer} The input plugin object.\r\n */\r\nInputPluginCache.getPlugin = function (key)\r\n{\r\n return inputPlugins[key];\r\n};\r\n\r\n/**\r\n * Installs all of the registered Input Plugins into the given target.\r\n *\r\n * @name Phaser.Input.InputPluginCache.install\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.InputPlugin} target - The target InputPlugin to install the plugins into.\r\n */\r\nInputPluginCache.install = function (target)\r\n{\r\n var sys = target.scene.sys;\r\n var settings = sys.settings.input;\r\n var config = sys.game.config;\r\n\r\n for (var key in inputPlugins)\r\n {\r\n var source = inputPlugins[key].plugin;\r\n var mapping = inputPlugins[key].mapping;\r\n var settingsKey = inputPlugins[key].settingsKey;\r\n var configKey = inputPlugins[key].configKey;\r\n\r\n if (GetValue(settings, settingsKey, config[configKey]))\r\n {\r\n target[mapping] = new source(target);\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes an input plugin based on the given key.\r\n *\r\n * @name Phaser.Input.InputPluginCache.remove\r\n * @type {function}\r\n * @static\r\n * @since 3.10.0\r\n * \r\n * @param {string} key - The key of the input plugin to remove.\r\n */\r\nInputPluginCache.remove = function (key)\r\n{\r\n if (inputPlugins.hasOwnProperty(key))\r\n {\r\n delete inputPlugins[key];\r\n }\r\n};\r\n\r\nmodule.exports = InputPluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/InputPluginCache.js?')},"./node_modules/phaser/src/input/Pointer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Angle = __webpack_require__(/*! ../math/angle/Between */ \"./node_modules/phaser/src/math/angle/Between.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Distance = __webpack_require__(/*! ../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar SmoothStepInterpolation = __webpack_require__(/*! ../math/interpolation/SmoothStepInterpolation */ \"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer object encapsulates both mouse and touch input within Phaser.\r\n *\r\n * By default, Phaser will create 2 pointers for your game to use. If you require more, i.e. for a multi-touch\r\n * game, then use the `InputPlugin.addPointer` method to do so, rather than instantiating this class directly,\r\n * otherwise it won't be managed by the input system.\r\n *\r\n * You can reference the current active pointer via `InputPlugin.activePointer`. You can also use the properties\r\n * `InputPlugin.pointer1` through to `pointer10`, for each pointer you have enabled in your game.\r\n *\r\n * The properties of this object are set by the Input Plugin during processing. This object is then sent in all\r\n * input related events that the Input Plugin emits, so you can reference properties from it directly in your\r\n * callbacks.\r\n *\r\n * @class Pointer\r\n * @memberof Phaser.Input\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} manager - A reference to the Input Manager.\r\n * @param {integer} id - The internal ID of this Pointer.\r\n */\r\nvar Pointer = new Class({\r\n\r\n initialize:\r\n\r\n function Pointer (manager, id)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Pointer#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The internal ID of this Pointer.\r\n *\r\n * @name Phaser.Input.Pointer#id\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.id = id;\r\n\r\n /**\r\n * The most recent native DOM Event this Pointer has processed.\r\n *\r\n * @name Phaser.Input.Pointer#event\r\n * @type {(TouchEvent|MouseEvent)}\r\n * @since 3.0.0\r\n */\r\n this.event;\r\n\r\n /**\r\n * The DOM element the Pointer was pressed down on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#downElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.downElement;\r\n\r\n /**\r\n * The DOM element the Pointer was released on, taken from the DOM event.\r\n * In a default set-up this will be the Canvas that Phaser is rendering to, or the Window element.\r\n *\r\n * @name Phaser.Input.Pointer#upElement\r\n * @type {any}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.upElement;\r\n\r\n /**\r\n * The camera the Pointer interacted with during its last update.\r\n * \r\n * A Pointer can only ever interact with one camera at once, which will be the top-most camera\r\n * in the list should multiple cameras be positioned on-top of each other.\r\n *\r\n * @name Phaser.Input.Pointer#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A read-only property that indicates which button was pressed, or released, on the pointer\r\n * during the most recent event. It is only set during `up` and `down` events.\r\n * \r\n * On Touch devices the value is always 0.\r\n * \r\n * Users may change the configuration of buttons on their pointing device so that if an event's button property\r\n * is zero, it may not have been caused by the button that is physically left–most on the pointing device;\r\n * however, it should behave as if the left button was clicked in the standard button layout.\r\n *\r\n * @name Phaser.Input.Pointer#button\r\n * @type {integer}\r\n * @readonly\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.button = 0;\r\n\r\n /**\r\n * 0: No button or un-initialized\r\n * 1: Left button\r\n * 2: Right button\r\n * 4: Wheel button or middle button\r\n * 8: 4th button (typically the \"Browser Back\" button)\r\n * 16: 5th button (typically the \"Browser Forward\" button)\r\n * \r\n * For a mouse configured for left-handed use, the button actions are reversed.\r\n * In this case, the values are read from right to left.\r\n *\r\n * @name Phaser.Input.Pointer#buttons\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.buttons = 0;\r\n\r\n /**\r\n * The position of the Pointer in screen space.\r\n *\r\n * @name Phaser.Input.Pointer#position\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The previous position of the Pointer in screen space.\r\n * \r\n * The old x and y values are stored in here during the InputManager.transformPointer call.\r\n * \r\n * Use the properties `velocity`, `angle` and `distance` to create your own gesture recognition.\r\n *\r\n * @name Phaser.Input.Pointer#prevPosition\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.prevPosition = new Vector2();\r\n\r\n /**\r\n * An internal vector used for calculations of the pointer speed and angle.\r\n *\r\n * @name Phaser.Input.Pointer#midPoint\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.midPoint = new Vector2(-1, -1);\r\n\r\n /**\r\n * The current velocity of the Pointer, based on its current and previous positions.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The current angle the Pointer is moving, in radians, based on its previous and current position.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n *\r\n * @name Phaser.Input.Pointer#angle\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The distance the Pointer has moved, based on its previous and current position.\r\n * \r\n * This value is smoothed out each frame, according to the `motionFactor` property.\r\n * \r\n * This property is updated whenever the Pointer moves, regardless of any button states. In other words,\r\n * it changes based on movement alone - a button doesn't have to be pressed first.\r\n * \r\n * If you need the total distance travelled since the primary buttons was pressed down,\r\n * then use the `Pointer.getDistance` method.\r\n *\r\n * @name Phaser.Input.Pointer#distance\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.distance = 0;\r\n\r\n /**\r\n * The smoothing factor to apply to the Pointer position.\r\n * \r\n * Due to their nature, pointer positions are inherently noisy. While this is fine for lots of games, if you need cleaner positions\r\n * then you can set this value to apply an automatic smoothing to the positions as they are recorded.\r\n * \r\n * The default value of zero means 'no smoothing'.\r\n * Set to a small value, such as 0.2, to apply an average level of smoothing between positions. You can do this by changing this\r\n * value directly, or by setting the `input.smoothFactor` property in the Game Config.\r\n * \r\n * Positions are only smoothed when the pointer moves. If the primary button on this Pointer enters an Up or Down state, then the position\r\n * is always precise, and not smoothed.\r\n *\r\n * @name Phaser.Input.Pointer#smoothFactor\r\n * @type {number}\r\n * @default 0\r\n * @since 3.16.0\r\n */\r\n this.smoothFactor = 0;\r\n\r\n /**\r\n * The factor applied to the motion smoothing each frame.\r\n * \r\n * This value is passed to the Smooth Step Interpolation that is used to calculate the velocity,\r\n * angle and distance of the Pointer. It's applied every frame, until the midPoint reaches the current\r\n * position of the Pointer. 0.2 provides a good average but can be increased if you need a\r\n * quicker update and are working in a high performance environment. Never set this value to\r\n * zero.\r\n *\r\n * @name Phaser.Input.Pointer#motionFactor\r\n * @type {number}\r\n * @default 0.2\r\n * @since 3.16.0\r\n */\r\n this.motionFactor = 0.2;\r\n\r\n /**\r\n * The x position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldX = 0;\r\n\r\n /**\r\n * The y position of this Pointer, translated into the coordinate space of the most recent Camera it interacted with.\r\n * \r\n * If you wish to use this value _outside_ of an input event handler then you should update it first by calling\r\n * the `Pointer.updateWorldPoint` method.\r\n *\r\n * @name Phaser.Input.Pointer#worldY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this.worldY = 0;\r\n\r\n /**\r\n * Time when this Pointer was most recently moved (regardless of the state of its buttons, if any)\r\n *\r\n * @name Phaser.Input.Pointer#moveTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.moveTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was pressed, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#downTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.downTime = 0;\r\n\r\n /**\r\n * X coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upX = 0;\r\n\r\n /**\r\n * Y coordinate of the Pointer when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upY = 0;\r\n\r\n /**\r\n * Time when Button 1 (left button), or Touch, was released, used for dragging objects.\r\n *\r\n * @name Phaser.Input.Pointer#upTime\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.upTime = 0;\r\n\r\n /**\r\n * Is the primary button down? (usually button 0, the left mouse button)\r\n *\r\n * @name Phaser.Input.Pointer#primaryDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.primaryDown = false;\r\n\r\n /**\r\n * Is _any_ button on this pointer considered as being down?\r\n *\r\n * @name Phaser.Input.Pointer#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * Did the previous input event come from a Touch input (true) or Mouse? (false)\r\n *\r\n * @name Phaser.Input.Pointer#wasTouch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.wasTouch = false;\r\n\r\n /**\r\n * Did this Pointer get canceled by a touchcancel event?\r\n * \r\n * Note: \"canceled\" is the American-English spelling of \"cancelled\". Please don't submit PRs correcting it!\r\n *\r\n * @name Phaser.Input.Pointer#wasCanceled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.15.0\r\n */\r\n this.wasCanceled = false;\r\n\r\n /**\r\n * If the mouse is locked, the horizontal relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementX = 0;\r\n\r\n /**\r\n * If the mouse is locked, the vertical relative movement of the Pointer in pixels since last frame.\r\n *\r\n * @name Phaser.Input.Pointer#movementY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.movementY = 0;\r\n\r\n /**\r\n * The identifier property of the Pointer as set by the DOM event when this Pointer is started.\r\n *\r\n * @name Phaser.Input.Pointer#identifier\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.identifier = 0;\r\n\r\n /**\r\n * The pointerId property of the Pointer as set by the DOM event when this Pointer is started.\r\n * The browser can and will recycle this value.\r\n *\r\n * @name Phaser.Input.Pointer#pointerId\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.pointerId = null;\r\n\r\n /**\r\n * An active Pointer is one that is currently pressed down on the display.\r\n * A Mouse is always considered as active.\r\n *\r\n * @name Phaser.Input.Pointer#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = (id === 0) ? true : false;\r\n\r\n /**\r\n * Is this pointer Pointer Locked?\r\n * \r\n * Only a mouse pointer can be locked and it only becomes locked when requested via\r\n * the browsers Pointer Lock API.\r\n * \r\n * You can request this by calling the `this.input.mouse.requestPointerLock()` method from\r\n * a `pointerdown` or `pointerup` event handler.\r\n *\r\n * @name Phaser.Input.Pointer#locked\r\n * @readonly\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaX = 0;\r\n\r\n /**\r\n * The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n *\r\n * @name Phaser.Input.Pointer#deltaY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaY = 0;\r\n\r\n /**\r\n * The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n *\r\n * @name Phaser.Input.Pointer#deltaZ\r\n * @type {number}\r\n * @default 0\r\n * @since 3.18.0\r\n */\r\n this.deltaZ = 0;\r\n },\r\n\r\n /**\r\n * Takes a Camera and updates this Pointer's `worldX` and `worldY` values so they are\r\n * the result of a translation through the given Camera.\r\n * \r\n * Note that the values will be automatically replaced the moment the Pointer is\r\n * updated by an input event, such as a mouse move, so should be used immediately.\r\n *\r\n * @method Phaser.Input.Pointer#updateWorldPoint\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera which is being tested against.\r\n *\r\n * @return {this} This Pointer object.\r\n */\r\n updateWorldPoint: function (camera)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n if (camera.resolution !== 1)\r\n {\r\n x += camera._x;\r\n y += camera._y;\r\n }\r\n\r\n // Stores the world point inside of tempPoint\r\n var temp = camera.getWorldPoint(x, y);\r\n\r\n this.worldX = temp.x;\r\n this.worldY = temp.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Camera and returns a Vector2 containing the translated position of this Pointer\r\n * within that Camera. This can be used to convert this Pointers position into camera space.\r\n *\r\n * @method Phaser.Input.Pointer#positionToCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the translation.\r\n * @param {(Phaser.Math.Vector2|object)} [output] - A Vector2-like object in which to store the translated position.\r\n *\r\n * @return {(Phaser.Math.Vector2|object)} A Vector2 containing the translated coordinates of this Pointer, based on the given camera.\r\n */\r\n positionToCamera: function (camera, output)\r\n {\r\n return camera.getWorldPoint(this.x, this.y, output);\r\n },\r\n\r\n /**\r\n * Calculates the motion of this Pointer, including its velocity and angle of movement.\r\n * This method is called automatically each frame by the Input Manager.\r\n *\r\n * @method Phaser.Input.Pointer#updateMotion\r\n * @private\r\n * @since 3.16.0\r\n */\r\n updateMotion: function ()\r\n {\r\n var cx = this.position.x;\r\n var cy = this.position.y;\r\n\r\n var mx = this.midPoint.x;\r\n var my = this.midPoint.y;\r\n\r\n if (cx === mx && cy === my)\r\n {\r\n // Nothing to do here\r\n return;\r\n }\r\n\r\n // Moving towards our goal ...\r\n var vx = SmoothStepInterpolation(this.motionFactor, mx, cx);\r\n var vy = SmoothStepInterpolation(this.motionFactor, my, cy);\r\n\r\n if (FuzzyEqual(vx, cx, 0.1))\r\n {\r\n vx = cx;\r\n }\r\n\r\n if (FuzzyEqual(vy, cy, 0.1))\r\n {\r\n vy = cy;\r\n }\r\n\r\n this.midPoint.set(vx, vy);\r\n\r\n var dx = cx - vx;\r\n var dy = cy - vy;\r\n\r\n this.velocity.set(dx, dy);\r\n\r\n this.angle = Angle(vx, vy, cx, cy);\r\n\r\n this.distance = Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Up Event.\r\n *\r\n * @method Phaser.Input.Pointer#up\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n up: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.upElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Down Event.\r\n *\r\n * @method Phaser.Input.Pointer#down\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n down: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n this.button = event.button;\r\n\r\n this.downElement = event.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n // 0: Main button pressed, usually the left button or the un-initialized state\r\n if (event.button === 0)\r\n {\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n }\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#move\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {MouseEvent} event - The Mouse Event to process.\r\n */\r\n move: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, true);\r\n\r\n if (this.locked)\r\n {\r\n // Multiple DOM events may occur within one frame, but only one Phaser event will fire\r\n this.movementX = event.movementX || event.mozMovementX || event.webkitMovementX || 0;\r\n this.movementY = event.movementY || event.mozMovementY || event.webkitMovementY || 0;\r\n }\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Mouse Wheel Event.\r\n *\r\n * @method Phaser.Input.Pointer#wheel\r\n * @private\r\n * @since 3.18.0\r\n *\r\n * @param {WheelEvent} event - The Wheel Event to process.\r\n */\r\n wheel: function (event)\r\n {\r\n if ('buttons' in event)\r\n {\r\n this.buttons = event.buttons;\r\n }\r\n\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, event.pageX, event.pageY, false);\r\n\r\n this.deltaX = event.deltaX;\r\n this.deltaY = event.deltaY;\r\n this.deltaZ = event.deltaZ;\r\n\r\n this.wasTouch = false;\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Start Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchstart\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchstart: function (touch, event)\r\n {\r\n if (touch['pointerId'])\r\n {\r\n this.pointerId = touch.pointerId;\r\n }\r\n\r\n this.identifier = touch.identifier;\r\n this.target = touch.target;\r\n this.active = true;\r\n\r\n this.buttons = 1;\r\n\r\n this.event = event;\r\n\r\n this.downElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = true;\r\n this.downX = this.x;\r\n this.downY = this.y;\r\n this.downTime = event.timeStamp;\r\n\r\n this.isDown = true;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Move Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchmove\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchmove: function (touch, event)\r\n {\r\n this.event = event;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, true);\r\n\r\n this.moveTime = event.timeStamp;\r\n\r\n this.wasTouch = true;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch End Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchend\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchend: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = false;\r\n \r\n this.active = false;\r\n\r\n this.updateMotion();\r\n },\r\n\r\n /**\r\n * Internal method to handle a Touch Cancel Event.\r\n *\r\n * @method Phaser.Input.Pointer#touchcancel\r\n * @private\r\n * @since 3.15.0\r\n *\r\n * @param {Touch} touch - The Changed Touch from the Touch Event.\r\n * @param {TouchEvent} event - The full Touch Event.\r\n */\r\n touchcancel: function (touch, event)\r\n {\r\n this.buttons = 0;\r\n\r\n this.event = event;\r\n\r\n this.upElement = touch.target;\r\n\r\n // Sets the local x/y properties\r\n this.manager.transformPointer(this, touch.pageX, touch.pageY, false);\r\n\r\n this.primaryDown = false;\r\n this.upX = this.x;\r\n this.upY = this.y;\r\n this.upTime = event.timeStamp;\r\n\r\n this.isDown = false;\r\n\r\n this.wasTouch = true;\r\n this.wasCanceled = true;\r\n \r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Checks to see if any buttons are being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#noButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if no buttons are being held down.\r\n */\r\n noButtonDown: function ()\r\n {\r\n return (this.buttons === 0);\r\n },\r\n\r\n /**\r\n * Checks to see if the left button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the left button is being held down.\r\n */\r\n leftButtonDown: function ()\r\n {\r\n return (this.buttons & 1) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the right button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the right button is being held down.\r\n */\r\n rightButtonDown: function ()\r\n {\r\n return (this.buttons & 2) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the middle button is being held down.\r\n */\r\n middleButtonDown: function ()\r\n {\r\n return (this.buttons & 4) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the back button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the back button is being held down.\r\n */\r\n backButtonDown: function ()\r\n {\r\n return (this.buttons & 8) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button is being held down on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonDown\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the forward button is being held down.\r\n */\r\n forwardButtonDown: function ()\r\n {\r\n return (this.buttons & 16) ? true : false;\r\n },\r\n\r\n /**\r\n * Checks to see if the left button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#leftButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the left button was just released.\r\n */\r\n leftButtonReleased: function ()\r\n {\r\n return (this.button === 0 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the right button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#rightButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the right button was just released.\r\n */\r\n rightButtonReleased: function ()\r\n {\r\n return (this.button === 2 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the middle button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#middleButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the middle button was just released.\r\n */\r\n middleButtonReleased: function ()\r\n {\r\n return (this.button === 1 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the back button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#backButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the back button was just released.\r\n */\r\n backButtonReleased: function ()\r\n {\r\n return (this.button === 3 && !this.isDown);\r\n },\r\n\r\n /**\r\n * Checks to see if the forward button was just released on this Pointer.\r\n *\r\n * @method Phaser.Input.Pointer#forwardButtonReleased\r\n * @since 3.18.0\r\n *\r\n * @return {boolean} `true` if the forward button was just released.\r\n */\r\n forwardButtonReleased: function ()\r\n {\r\n return (this.button === 4 && !this.isDown);\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded distance, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * If you wish to get the distance being travelled currently, based on the velocity of the Pointer,\r\n * then see the `Pointer.distance` property.\r\n *\r\n * @method Phaser.Input.Pointer#getDistance\r\n * @since 3.13.0\r\n *\r\n * @return {number} The distance the Pointer moved.\r\n */\r\n getDistance: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Distance(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Distance(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * horizontal distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded horizontal distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceX\r\n * @since 3.16.0\r\n *\r\n * @return {number} The horizontal distance the Pointer moved.\r\n */\r\n getDistanceX: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downX - this.x);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downX - this.upX);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * vertical distance between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded vertical distance, based on where\r\n * the Pointer was when the button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDistanceY\r\n * @since 3.16.0\r\n *\r\n * @return {number} The vertical distance the Pointer moved.\r\n */\r\n getDistanceY: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Math.abs(this.downY - this.y);\r\n }\r\n else\r\n {\r\n return Math.abs(this.downY - this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * duration since the button was pressed down.\r\n * \r\n * If no button is held down, it will return the last recorded duration, based on the time\r\n * the Pointer button was released.\r\n *\r\n * @method Phaser.Input.Pointer#getDuration\r\n * @since 3.16.0\r\n *\r\n * @return {number} The duration the Pointer was held down for in milliseconds.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.manager.time - this.downTime);\r\n }\r\n else\r\n {\r\n return (this.upTime - this.downTime);\r\n }\r\n },\r\n\r\n /**\r\n * If the Pointer has a button pressed down at the time this method is called, it will return the\r\n * angle between the Pointer's `downX` and `downY` values and the current position.\r\n * \r\n * If no button is held down, it will return the last recorded angle, based on where\r\n * the Pointer was when the button was released.\r\n * \r\n * The angle is based on the old position facing to the current position.\r\n * \r\n * If you wish to get the current angle, based on the velocity of the Pointer, then\r\n * see the `Pointer.angle` property.\r\n *\r\n * @method Phaser.Input.Pointer#getAngle\r\n * @since 3.16.0\r\n *\r\n * @return {number} The angle between the Pointer's coordinates in radians.\r\n */\r\n getAngle: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return Angle(this.downX, this.downY, this.x, this.y);\r\n }\r\n else\r\n {\r\n return Angle(this.downX, this.downY, this.upX, this.upY);\r\n }\r\n },\r\n\r\n /**\r\n * Takes the previous and current Pointer positions and then generates an array of interpolated values between\r\n * the two. The array will be populated up to the size of the `steps` argument.\r\n * \r\n * ```javaScript\r\n * var points = pointer.getInterpolatedPosition(4);\r\n * \r\n * // points[0] = { x: 0, y: 0 }\r\n * // points[1] = { x: 2, y: 1 }\r\n * // points[2] = { x: 3, y: 2 }\r\n * // points[3] = { x: 6, y: 3 }\r\n * ```\r\n * \r\n * Use this if you need to get smoothed values between the previous and current pointer positions. DOM pointer\r\n * events can often fire faster than the main browser loop, and this will help you avoid janky movement\r\n * especially if you have an object following a Pointer.\r\n * \r\n * Note that if you provide an output array it will only be populated up to the number of steps provided.\r\n * It will not clear any previous data that may have existed beyond the range of the steps count.\r\n * \r\n * Internally it uses the Smooth Step interpolation calculation.\r\n *\r\n * @method Phaser.Input.Pointer#getInterpolatedPosition\r\n * @since 3.11.0\r\n * \r\n * @param {integer} [steps=10] - The number of interpolation steps to use.\r\n * @param {array} [out] - An array to store the results in. If not provided a new one will be created.\r\n * \r\n * @return {array} An array of interpolated values.\r\n */\r\n getInterpolatedPosition: function (steps, out)\r\n {\r\n if (steps === undefined) { steps = 10; }\r\n if (out === undefined) { out = []; }\r\n\r\n var prevX = this.prevPosition.x;\r\n var prevY = this.prevPosition.y;\r\n\r\n var curX = this.position.x;\r\n var curY = this.position.y;\r\n\r\n for (var i = 0; i < steps; i++)\r\n {\r\n var t = (1 / steps) * i;\r\n\r\n out[i] = { x: SmoothStepInterpolation(t, prevX, curX), y: SmoothStepInterpolation(t, prevY, curY) };\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Destroys this Pointer instance and resets its external references.\r\n *\r\n * @method Phaser.Input.Pointer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.camera = null;\r\n this.manager = null;\r\n this.position = null;\r\n },\r\n\r\n /**\r\n * The x position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldX` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Pointer.\r\n * The value is in screen space.\r\n * See `worldY` to get a camera converted position.\r\n *\r\n * @name Phaser.Input.Pointer#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Time when this Pointer was most recently updated by a DOM Event.\r\n * This comes directly from the `event.timeStamp` property.\r\n * If no event has yet taken place, it will return zero.\r\n *\r\n * @name Phaser.Input.Pointer#time\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return (this.event) ? this.event.timeStamp : 0;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Pointer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/Pointer.js?")},"./node_modules/phaser/src/input/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar INPUT_CONST = {\r\n\r\n /**\r\n * The mouse pointer is being held down.\r\n * \r\n * @name Phaser.Input.MOUSE_DOWN\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_DOWN: 0,\r\n\r\n /**\r\n * The mouse pointer is being moved.\r\n * \r\n * @name Phaser.Input.MOUSE_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_MOVE: 1,\r\n\r\n /**\r\n * The mouse pointer is released.\r\n * \r\n * @name Phaser.Input.MOUSE_UP\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n MOUSE_UP: 2,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_START\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_START: 3,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_MOVE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_MOVE: 4,\r\n\r\n /**\r\n * A touch pointer has been started.\r\n * \r\n * @name Phaser.Input.TOUCH_END\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n TOUCH_END: 5,\r\n\r\n /**\r\n * The pointer lock has changed.\r\n * \r\n * @name Phaser.Input.POINTER_LOCK_CHANGE\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n POINTER_LOCK_CHANGE: 6,\r\n\r\n /**\r\n * A touch pointer has been been cancelled by the browser.\r\n * \r\n * @name Phaser.Input.TOUCH_CANCEL\r\n * @type {integer}\r\n * @since 3.15.0\r\n */\r\n TOUCH_CANCEL: 7,\r\n\r\n /**\r\n * The mouse wheel changes.\r\n * \r\n * @name Phaser.Input.MOUSE_WHEEL\r\n * @type {integer}\r\n * @since 3.18.0\r\n */\r\n MOUSE_WHEEL: 8\r\n\r\n};\r\n\r\nmodule.exports = INPUT_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/const.js?")},"./node_modules/phaser/src/input/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it boots, signalling to all of its systems to create themselves.\r\n *\r\n * @event Phaser.Input.Events#BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Destroy Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it is destroyed, signalling to all of its systems to destroy themselves.\r\n *\r\n * @event Phaser.Input.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag End Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer stops dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragend', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_END]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_END} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer stopped dragging.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Enter Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object into a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragenter', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_ENTER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_ENTER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves while dragging a Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drag', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Leave Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object out of a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragleave', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_LEAVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_LEAVE} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drags a Game Object over a Drag Target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragover', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_OVER} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drag Start Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer starts to drag any Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('dragstart', listener)`.\r\n * \r\n * A Pointer can only drag a single Game Object at once.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DRAG_START]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DRAG_START} event instead.\r\n *\r\n * @event Phaser.Input.Events#DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer is dragging.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Drop Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer drops a Game Object on a Drag Target.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('drop', listener)`.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_DROP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DROP} event instead.\r\n *\r\n * @event Phaser.Input.Events#DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The interactive Game Object that this pointer was dragging.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down on _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectdown', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was pressed down on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag End Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer stops dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragend', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive](Phaser.GameObjects.GameObject#setInteractive) for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer stopped dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Enter Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it into a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragenter', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_ENTER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved into.\r\n */\r\nmodule.exports = 'dragenter';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves while dragging it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drag', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Leave Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it out of a drag target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragleave', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_LEAVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has left.\r\n */\r\nmodule.exports = 'dragleave';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drags it over a drag target.\r\n * \r\n * When the Game Object first enters the drag target it will emit a `dragenter` event. If it then moves while within\r\n * the drag target, it will emit this event instead.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The drag target that this pointer has moved over.\r\n */\r\nmodule.exports = 'dragover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drag Start Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer starts to drag it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('dragstart', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * There are lots of useful drag related properties that are set within the Game Object when dragging occurs.\r\n * For example, `gameObject.input.dragStartX`, `dragStartY` and so on.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DRAG_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} dragX - The x coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n * @param {number} dragY - The y coordinate where the Pointer is currently dragging the Game Object, in world space.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Drop Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer drops it on a Drag Target.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('drop', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive and enabled for drag.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_DROP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} target - The Drag Target the `gameObject` has been dropped on.\r\n */\r\nmodule.exports = 'drop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved across _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectmove', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was moved on.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectmove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectout', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved out of.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectover', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer moved over.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Down Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is pressed down on it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerdown', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Move Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointermove', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Out Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves out of it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerout', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Over Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer moves over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerover', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Up Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer is released while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('pointerup', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} localX - The x coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {number} localY - The y coordinate that the Pointer interacted with this object on, relative to the Game Object's top-left position.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Pointer Wheel Event.\r\n * \r\n * This event is dispatched by an interactive Game Object if a pointer has its wheel moved while over it.\r\n * \r\n * Listen to this event from a Game Object using: `gameObject.on('wheel', listener)`.\r\n * Note that the scope of the listener is automatically set to be the Game Object instance itself.\r\n * \r\n * To receive this event, the Game Object must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectup', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when released.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Game Object Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel moved while over _any_ interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameobjectwheel', listener)`.\r\n * \r\n * To receive this event, the Game Objects must have been set as interactive.\r\n * See [GameObject.setInteractive]{@link Phaser.GameObjects.GameObject#setInteractive} for more details.\r\n * \r\n * To listen for this event from a _specific_ Game Object, use the [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL} event instead.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#GAMEOBJECT_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the pointer was over when the wheel changed.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {Phaser.Types.Input.EventData} event - The Phaser input event. You can call `stopPropagation()` to halt it from going any further in the event flow.\r\n */\r\nmodule.exports = 'gameobjectwheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Out Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer leaves the game canvas and is now\r\n * outside of it, elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameout', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OUT\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas out.\r\n */\r\nmodule.exports = 'gameout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Game Over Event.\r\n * \r\n * This event is dispatched by the Input Plugin if the active pointer enters the game canvas and is now\r\n * over of it, having previously been elsewhere on the web page.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('gameover', listener)`.\r\n *\r\n * @event Phaser.Input.Events#GAME_OVER\r\n * @since 3.16.1\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {(MouseEvent|TouchEvent)} event - The DOM Event that triggered the canvas over.\r\n */\r\nmodule.exports = 'gameover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Boot Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when it boots.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_BOOT\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Process Event.\r\n * \r\n * This internal event is dispatched by the Input Manager when not using the legacy queue system,\r\n * and it wants the Input Plugins to update themselves.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'process';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js?")},"./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Update Event.\r\n * \r\n * This internal event is dispatched by the Input Manager as part of its update step.\r\n *\r\n * @event Phaser.Input.Events#MANAGER_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Manager Pointer Lock Change Event.\r\n * \r\n * This event is dispatched by the Input Manager when it is processing a native Pointer Lock Change DOM Event.\r\n *\r\n * @event Phaser.Input.Events#POINTERLOCK_CHANGE\r\n * @since 3.0.0\r\n * \r\n * @param {Event} event - The native DOM Event.\r\n * @param {boolean} locked - The locked state of the Mouse Pointer.\r\n */\r\nmodule.exports = 'pointerlockchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdown', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Down Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is pressed down anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerdownoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_DOWN}\r\n * 2. [GAMEOBJECT_DOWN]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_DOWN}\r\n * 3. [POINTER_DOWN]{@linkcode Phaser.Input.Events#event:POINTER_DOWN} or [POINTER_DOWN_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_DOWN_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_DOWN_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerdownoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Move Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is moved anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointermove', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_MOVE}\r\n * 2. [GAMEOBJECT_MOVE]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_MOVE}\r\n * 3. [POINTER_MOVE]{@linkcode Phaser.Input.Events#event:POINTER_MOVE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_MOVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointermove';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Out Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves out of any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OUT}\r\n * 2. [GAMEOBJECT_OUT]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OUT}\r\n * 3. [POINTER_OUT]{@linkcode Phaser.Input.Events#event:POINTER_OUT}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OUT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOut - An array containing all interactive Game Objects that the pointer moved out of when the event was created.\r\n */\r\nmodule.exports = 'pointerout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Over Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer moves over any interactive Game Object.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerover', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_OVER}\r\n * 2. [GAMEOBJECT_OVER]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_OVER}\r\n * 3. [POINTER_OVER]{@linkcode Phaser.Input.Events#event:POINTER_OVER}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_OVER\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} justOver - An array containing all interactive Game Objects that the pointer moved over when the event was created.\r\n */\r\nmodule.exports = 'pointerover';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerup', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n */\r\nmodule.exports = 'pointerup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Up Outside Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer is released anywhere outside of the game canvas.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('pointerupoutside', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_UP}\r\n * 2. [GAMEOBJECT_UP]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_UP}\r\n * 3. [POINTER_UP]{@linkcode Phaser.Input.Events#event:POINTER_UP} or [POINTER_UP_OUTSIDE]{@linkcode Phaser.Input.Events#event:POINTER_UP_OUTSIDE}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_UP_OUTSIDE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n */\r\nmodule.exports = 'pointerupoutside';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js?")},"./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pointer Wheel Input Event.\r\n * \r\n * This event is dispatched by the Input Plugin belonging to a Scene if a pointer has its wheel updated.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.on('wheel', listener)`.\r\n * \r\n * The event hierarchy is as follows:\r\n * \r\n * 1. [GAMEOBJECT_POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_POINTER_WHEEL}\r\n * 2. [GAMEOBJECT_WHEEL]{@linkcode Phaser.Input.Events#event:GAMEOBJECT_WHEEL}\r\n * 3. [POINTER_WHEEL]{@linkcode Phaser.Input.Events#event:POINTER_WHEEL}\r\n * \r\n * With the top event being dispatched first and then flowing down the list. Note that higher-up event handlers can stop\r\n * the propagation of this event.\r\n *\r\n * @event Phaser.Input.Events#POINTER_WHEEL\r\n * @since 3.18.0\r\n * \r\n * @param {Phaser.Input.Pointer} pointer - The Pointer responsible for triggering this event.\r\n * @param {Phaser.GameObjects.GameObject[]} currentlyOver - An array containing all interactive Game Objects that the pointer was over when the event was created.\r\n * @param {number} deltaX - The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n * @param {number} deltaY - The vertical scroll amount that occurred due to the user moving a mouse wheel or similar input device. This value will typically be less than 0 if the user scrolls up and greater than zero if scrolling down.\r\n * @param {number} deltaZ - The z-axis scroll amount that occurred due to the user moving a mouse wheel or similar input device.\r\n */\r\nmodule.exports = 'wheel';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js?")},"./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Pre-Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `preUpdate` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Shutdown Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it shuts down, signalling to all of its systems to shut themselves down.\r\n *\r\n * @event Phaser.Input.Events#SHUTDOWN\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/input/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Start Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin when it has finished setting-up,\r\n * signalling to all of its internal systems to start.\r\n *\r\n * @event Phaser.Input.Events#START\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/START_EVENT.js?")},"./node_modules/phaser/src/input/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Input Plugin Update Event.\r\n * \r\n * This internal event is dispatched by the Input Plugin at the start of its `update` method.\r\n * This hook is designed specifically for input plugins, but can also be listened to from user-land code.\r\n *\r\n * @event Phaser.Input.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/input/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/input/events/BOOT_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/input/events/DESTROY_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/DRAG_END_EVENT.js"),\r\n DRAG_ENTER: __webpack_require__(/*! ./DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/input/events/DRAG_EVENT.js"),\r\n DRAG_LEAVE: __webpack_require__(/*! ./DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js"),\r\n DRAG_OVER: __webpack_require__(/*! ./DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/DRAG_START_EVENT.js"),\r\n DROP: __webpack_require__(/*! ./DROP_EVENT */ "./node_modules/phaser/src/input/events/DROP_EVENT.js"),\r\n GAME_OUT: __webpack_require__(/*! ./GAME_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js"),\r\n GAME_OVER: __webpack_require__(/*! ./GAME_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js"),\r\n GAMEOBJECT_DOWN: __webpack_require__(/*! ./GAMEOBJECT_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js"),\r\n GAMEOBJECT_DRAG_END: __webpack_require__(/*! ./GAMEOBJECT_DRAG_END_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js"),\r\n GAMEOBJECT_DRAG_ENTER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_ENTER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js"),\r\n GAMEOBJECT_DRAG: __webpack_require__(/*! ./GAMEOBJECT_DRAG_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js"),\r\n GAMEOBJECT_DRAG_LEAVE: __webpack_require__(/*! ./GAMEOBJECT_DRAG_LEAVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js"),\r\n GAMEOBJECT_DRAG_OVER: __webpack_require__(/*! ./GAMEOBJECT_DRAG_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js"),\r\n GAMEOBJECT_DRAG_START: __webpack_require__(/*! ./GAMEOBJECT_DRAG_START_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js"),\r\n GAMEOBJECT_DROP: __webpack_require__(/*! ./GAMEOBJECT_DROP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js"),\r\n GAMEOBJECT_MOVE: __webpack_require__(/*! ./GAMEOBJECT_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js"),\r\n GAMEOBJECT_OUT: __webpack_require__(/*! ./GAMEOBJECT_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js"),\r\n GAMEOBJECT_OVER: __webpack_require__(/*! ./GAMEOBJECT_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_DOWN: __webpack_require__(/*! ./GAMEOBJECT_POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js"),\r\n GAMEOBJECT_POINTER_MOVE: __webpack_require__(/*! ./GAMEOBJECT_POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js"),\r\n GAMEOBJECT_POINTER_OUT: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js"),\r\n GAMEOBJECT_POINTER_OVER: __webpack_require__(/*! ./GAMEOBJECT_POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js"),\r\n GAMEOBJECT_POINTER_UP: __webpack_require__(/*! ./GAMEOBJECT_POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js"),\r\n GAMEOBJECT_POINTER_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js"),\r\n GAMEOBJECT_UP: __webpack_require__(/*! ./GAMEOBJECT_UP_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js"),\r\n GAMEOBJECT_WHEEL: __webpack_require__(/*! ./GAMEOBJECT_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js"),\r\n MANAGER_BOOT: __webpack_require__(/*! ./MANAGER_BOOT_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js"),\r\n MANAGER_PROCESS: __webpack_require__(/*! ./MANAGER_PROCESS_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js"),\r\n MANAGER_UPDATE: __webpack_require__(/*! ./MANAGER_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js"),\r\n POINTER_DOWN: __webpack_require__(/*! ./POINTER_DOWN_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js"),\r\n POINTER_DOWN_OUTSIDE: __webpack_require__(/*! ./POINTER_DOWN_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js"),\r\n POINTER_MOVE: __webpack_require__(/*! ./POINTER_MOVE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js"),\r\n POINTER_OUT: __webpack_require__(/*! ./POINTER_OUT_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js"),\r\n POINTER_OVER: __webpack_require__(/*! ./POINTER_OVER_EVENT */ "./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js"),\r\n POINTER_UP: __webpack_require__(/*! ./POINTER_UP_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js"),\r\n POINTER_UP_OUTSIDE: __webpack_require__(/*! ./POINTER_UP_OUTSIDE_EVENT */ "./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js"),\r\n POINTER_WHEEL: __webpack_require__(/*! ./POINTER_WHEEL_EVENT */ "./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js"),\r\n POINTERLOCK_CHANGE: __webpack_require__(/*! ./POINTERLOCK_CHANGE_EVENT */ "./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/input/events/START_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/input/events/UPDATE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/events/index.js?')},"./node_modules/phaser/src/input/gamepad/Axis.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific Gamepad Axis.\r\n * Axis objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Axis\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Axis belongs to.\r\n * @param {integer} index - The index of this Axis.\r\n */\r\nvar Axis = new Class({\r\n\r\n initialize:\r\n\r\n function Axis (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Axis belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the axis events.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.events;\r\n\r\n /**\r\n * The index of this Axis.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The raw axis value, between -1 and 1 with 0 being dead center.\r\n * Use the method `getValue` to get a normalized value with the threshold applied.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Movement tolerance threshold below which axis values are ignored in `getValue`.\r\n *\r\n * @name Phaser.Input.Gamepad.Axis#threshold\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 0.1;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Axis.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#update\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the axis movement.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n },\r\n\r\n /**\r\n * Applies the `threshold` value to the axis and returns it.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The axis value, adjusted for the movement threshold.\r\n */\r\n getValue: function ()\r\n {\r\n return (Math.abs(this.value) < this.threshold) ? 0 : this.value;\r\n },\r\n\r\n /**\r\n * Destroys this Axis instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Axis#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Axis;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Axis.js?')},"./node_modules/phaser/src/input/gamepad/Button.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Contains information about a specific button on a Gamepad.\r\n * Button objects are created automatically by the Gamepad as they are needed.\r\n *\r\n * @class Button\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.Gamepad} pad - A reference to the Gamepad that this Button belongs to.\r\n * @param {integer} index - The index of this Button.\r\n */\r\nvar Button = new Class({\r\n\r\n initialize:\r\n\r\n function Button (pad, index)\r\n {\r\n /**\r\n * A reference to the Gamepad that this Button belongs to.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pad\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.0.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * An event emitter to use to emit the button events.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events = pad.manager;\r\n\r\n /**\r\n * The index of this Button.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * Between 0 and 1.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#value\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.value = 0;\r\n\r\n /**\r\n * Can be set for analogue buttons to enable a 'pressure' threshold,\r\n * before a button is considered as being 'pressed'.\r\n *\r\n * @name Phaser.Input.Gamepad.Button#threshold\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.threshold = 1;\r\n\r\n /**\r\n * Is the Button being pressed down or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Button#pressed\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pressed = false;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Button.\r\n * Called automatically by the Gamepad as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#update\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @fires Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value of the button. Between 0 and 1.\r\n */\r\n update: function (value)\r\n {\r\n this.value = value;\r\n\r\n var pad = this.pad;\r\n var index = this.index;\r\n\r\n if (value >= this.threshold)\r\n {\r\n if (!this.pressed)\r\n {\r\n this.pressed = true;\r\n this.events.emit(Events.BUTTON_DOWN, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_DOWN, index, value, this);\r\n }\r\n }\r\n else if (this.pressed)\r\n {\r\n this.pressed = false;\r\n this.events.emit(Events.BUTTON_UP, pad, this, value);\r\n this.pad.emit(Events.GAMEPAD_BUTTON_UP, index, value, this);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Button instance and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Button#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pad = null;\r\n this.events = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Button;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Button.js?")},"./node_modules/phaser/src/input/gamepad/Gamepad.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Axis = __webpack_require__(/*! ./Axis */ \"./node_modules/phaser/src/input/gamepad/Axis.js\");\r\nvar Button = __webpack_require__(/*! ./Button */ \"./node_modules/phaser/src/input/gamepad/Button.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Gamepad.\r\n *\r\n * These are created, updated and managed by the Gamepad Plugin.\r\n *\r\n * @class Gamepad\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Gamepad.GamepadPlugin} manager - A reference to the Gamepad Plugin.\r\n * @param {Phaser.Types.Input.Gamepad.Pad} pad - The Gamepad object, as extracted from GamepadEvent.\r\n */\r\nvar Gamepad = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Gamepad (manager, pad)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Gamepad Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#manager\r\n * @type {Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A reference to the native Gamepad object that is connected to the browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#pad\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.pad = pad;\r\n\r\n /**\r\n * A string containing some information about the controller.\r\n *\r\n * This is not strictly specified, but in Firefox it will contain three pieces of information\r\n * separated by dashes (-): two 4-digit hexadecimal strings containing the USB vendor and\r\n * product id of the controller, and the name of the controller as provided by the driver.\r\n * In Chrome it will contain the name of the controller as provided by the driver,\r\n * followed by vendor and product 4-digit hexadecimal strings.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#id\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.id = pad.id;\r\n\r\n /**\r\n * An integer that is unique for each Gamepad currently connected to the system.\r\n * This can be used to distinguish multiple controllers.\r\n * Note that disconnecting a device and then connecting a new device may reuse the previous index.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#index\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.index = pad.index;\r\n\r\n var buttons = [];\r\n\r\n for (var i = 0; i < pad.buttons.length; i++)\r\n {\r\n buttons.push(new Button(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Button objects, corresponding to the different buttons available on the Gamepad.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#buttons\r\n * @type {Phaser.Input.Gamepad.Button[]}\r\n * @since 3.0.0\r\n */\r\n this.buttons = buttons;\r\n\r\n var axes = [];\r\n\r\n for (i = 0; i < pad.axes.length; i++)\r\n {\r\n axes.push(new Axis(this, i));\r\n }\r\n\r\n /**\r\n * An array of Gamepad Axis objects, corresponding to the different axes available on the Gamepad, if any.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#axes\r\n * @type {Phaser.Input.Gamepad.Axis[]}\r\n * @since 3.0.0\r\n */\r\n this.axes = axes;\r\n\r\n /**\r\n * The Gamepad's Haptic Actuator (Vibration / Rumble support).\r\n * This is highly experimental and only set if both present on the device,\r\n * and exposed by both the hardware and browser.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#vibration\r\n * @type {GamepadHapticActuator}\r\n * @since 3.10.0\r\n */\r\n this.vibration = pad.vibrationActuator;\r\n\r\n // https://w3c.github.io/gamepad/#remapping\r\n\r\n var _noButton = { value: 0, pressed: false };\r\n\r\n /**\r\n * A reference to the Left Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCLeft = (buttons[14]) ? buttons[14] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCRight = (buttons[15]) ? buttons[15] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCTop = (buttons[12]) ? buttons[12] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Left Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_LCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._LCBottom = (buttons[13]) ? buttons[13] : _noButton;\r\n\r\n /**\r\n * A reference to the Left Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCLeft = (buttons[2]) ? buttons[2] : _noButton;\r\n\r\n /**\r\n * A reference to the Right Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCRight = (buttons[1]) ? buttons[1] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCTop = (buttons[3]) ? buttons[3] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Button in the Right Cluster.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_RCBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._RCBottom = (buttons[0]) ? buttons[0] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Left Front Button (L1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftTop = (buttons[4]) ? buttons[4] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Left Front Button (L2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBLeftBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBLeftBottom = (buttons[6]) ? buttons[6] : _noButton;\r\n\r\n /**\r\n * A reference to the Top Right Front Button (R1 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightTop\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightTop = (buttons[5]) ? buttons[5] : _noButton;\r\n\r\n /**\r\n * A reference to the Bottom Right Front Button (R2 Shoulder Button)\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_FBRightBottom\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._FBRightBottom = (buttons[7]) ? buttons[7] : _noButton;\r\n\r\n var _noAxis = { value: 0 };\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisLeft = (axes[0]) ? axes[0] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Left Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisLeft\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisLeft = (axes[1]) ? axes[1] : _noAxis;\r\n\r\n /**\r\n * A reference to the Horizontal Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_HAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._HAxisRight = (axes[2]) ? axes[2] : _noAxis;\r\n\r\n /**\r\n * A reference to the Vertical Axis for the Right Stick.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#_VAxisRight\r\n * @type {Phaser.Input.Gamepad.Button}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._VAxisRight = (axes[3]) ? axes[3] : _noAxis;\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's left axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a left axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#leftStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.leftStick = new Vector2();\r\n\r\n /**\r\n * A Vector2 containing the most recent values from the Gamepad's right axis stick.\r\n * This is updated automatically as part of the Gamepad.update cycle.\r\n * The H Axis is mapped to the `Vector2.x` property, and the V Axis to the `Vector2.y` property.\r\n * The values are based on the Axis thresholds.\r\n * If the Gamepad does not have a right axis stick, the values will always be zero.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#rightStick\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.10.0\r\n */\r\n this.rightStick = new Vector2();\r\n },\r\n\r\n /**\r\n * Gets the total number of axis this Gamepad claims to support.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of axes this Gamepad claims to support.\r\n */\r\n getAxisTotal: function ()\r\n {\r\n return this.axes.length;\r\n },\r\n\r\n /**\r\n * Gets the value of an axis based on the given index.\r\n * The index must be valid within the range of axes supported by this Gamepad.\r\n * The return value will be a float between 0 and 1.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getAxisValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the axes to get the value for.\r\n *\r\n * @return {number} The value of the axis, between 0 and 1.\r\n */\r\n getAxisValue: function (index)\r\n {\r\n return this.axes[index].getValue();\r\n },\r\n\r\n /**\r\n * Sets the threshold value of all axis on this Gamepad.\r\n * The value is a float between 0 and 1 and is the amount below which the axis is considered as not having been moved.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#setAxisThreshold\r\n * @since 3.10.0\r\n *\r\n * @param {number} value - A value between 0 and 1.\r\n */\r\n setAxisThreshold: function (value)\r\n {\r\n for (var i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].threshold = value;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the total number of buttons this Gamepad claims to have.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonTotal\r\n * @since 3.10.0\r\n *\r\n * @return {integer} The total number of buttons this Gamepad claims to have.\r\n */\r\n getButtonTotal: function ()\r\n {\r\n return this.buttons.length;\r\n },\r\n\r\n /**\r\n * Gets the value of a button based on the given index.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * The return value will be either 0 or 1 for an analogue button, or a float between 0 and 1\r\n * for a pressure-sensitive digital button, such as the shoulder buttons on a Dual Shock.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#getButtonValue\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {number} The value of the button, between 0 and 1.\r\n */\r\n getButtonValue: function (index)\r\n {\r\n return this.buttons[index].value;\r\n },\r\n\r\n /**\r\n * Returns if the button is pressed down or not.\r\n * The index must be valid within the range of buttons supported by this Gamepad.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#isButtonDown\r\n * @since 3.10.0\r\n *\r\n * @param {integer} index - The index of the button to get the value for.\r\n *\r\n * @return {boolean} `true` if the button is considered as being pressed down, otherwise `false`.\r\n */\r\n isButtonDown: function (index)\r\n {\r\n return this.buttons[index].pressed;\r\n },\r\n\r\n /**\r\n * Internal update handler for this Gamepad.\r\n * Called automatically by the Gamepad Manager as part of its update.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#update\r\n * @private\r\n * @since 3.0.0\r\n */\r\n update: function (pad)\r\n {\r\n var i;\r\n\r\n // Sync the button values\r\n\r\n var localButtons = this.buttons;\r\n var gamepadButtons = pad.buttons;\r\n\r\n var len = localButtons.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localButtons[i].update(gamepadButtons[i].value);\r\n }\r\n\r\n // Sync the axis values\r\n\r\n var localAxes = this.axes;\r\n var gamepadAxes = pad.axes;\r\n\r\n len = localAxes.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n localAxes[i].update(gamepadAxes[i]);\r\n }\r\n\r\n if (len >= 2)\r\n {\r\n this.leftStick.set(localAxes[0].getValue(), localAxes[1].getValue());\r\n\r\n if (len >= 4)\r\n {\r\n this.rightStick.set(localAxes[2].getValue(), localAxes[3].getValue());\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad instance, its buttons and axes, and releases external references it holds.\r\n *\r\n * @method Phaser.Input.Gamepad.Gamepad#destroy\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.manager = null;\r\n this.pad = null;\r\n\r\n var i;\r\n\r\n for (i = 0; i < this.buttons.length; i++)\r\n {\r\n this.buttons[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.axes.length; i++)\r\n {\r\n this.axes[i].destroy();\r\n }\r\n\r\n this.buttons = [];\r\n this.axes = [];\r\n },\r\n\r\n /**\r\n * Is this Gamepad currently connected or not?\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#connected\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n connected: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.connected;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A timestamp containing the most recent time this Gamepad was updated.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#timestamp\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n timestamp: {\r\n\r\n get: function ()\r\n {\r\n return this.pad.timestamp;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Left button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad left button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#left\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this._LCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Right button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad right button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#right\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this._LCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Up button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad up button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#up\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n up: {\r\n\r\n get: function ()\r\n {\r\n return this._LCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's Down button being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * This is the d-pad down button under standard Gamepad mapping.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#down\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n down: {\r\n\r\n get: function ()\r\n {\r\n return this._LCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's bottom button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the X button.\r\n * On an XBox controller it's the A button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#A\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n A: {\r\n\r\n get: function ()\r\n {\r\n return this._RCBottom.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's top button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Triangle button.\r\n * On an XBox controller it's the Y button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#Y\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n Y: {\r\n\r\n get: function ()\r\n {\r\n return this._RCTop.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's left button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Square button.\r\n * On an XBox controller it's the X button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#X\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n X: {\r\n\r\n get: function ()\r\n {\r\n return this._RCLeft.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Gamepad's right button in the right button cluster being pressed?\r\n * If the Gamepad doesn't have this button it will always return false.\r\n * On a Dual Shock controller it's the Circle button.\r\n * On an XBox controller it's the B button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#B\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n B: {\r\n\r\n get: function ()\r\n {\r\n return this._RCRight.pressed;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L1 button.\r\n * On an XBox controller it's the LB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom left shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the L2 button.\r\n * On an XBox controller it's the LT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#L2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n L2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBLeftBottom.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's top right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R1 button.\r\n * On an XBox controller it's the RB button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R1\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R1: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightTop.value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the value of the Gamepad's bottom right shoulder button.\r\n * If the Gamepad doesn't have this button it will always return zero.\r\n * The value is a float between 0 and 1, corresponding to how depressed the button is.\r\n * On a Dual Shock controller it's the R2 button.\r\n * On an XBox controller it's the RT button.\r\n *\r\n * @name Phaser.Input.Gamepad.Gamepad#R2\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n R2: {\r\n\r\n get: function ()\r\n {\r\n return this._FBRightBottom.value;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Gamepad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/Gamepad.js?")},"./node_modules/phaser/src/input/gamepad/GamepadPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/gamepad/events/index.js\");\r\nvar Gamepad = __webpack_require__(/*! ./Gamepad */ \"./node_modules/phaser/src/input/gamepad/Gamepad.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Gamepad Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n *\r\n * Its role is to listen for native DOM Gamepad Events and then process them.\r\n *\r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n *\r\n * You can access it from within a Scene using `this.input.gamepad`.\r\n *\r\n * To listen for a gamepad being connected:\r\n *\r\n * ```javascript\r\n * this.input.gamepad.once('connected', function (pad) {\r\n * // 'pad' is a reference to the gamepad that was just connected\r\n * });\r\n * ```\r\n *\r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * Once you have received the connected event, or polled the gamepads and found them enabled, you can access\r\n * them via the built-in properties `GamepadPlugin.pad1` to `pad4`, for up to 4 game pads. With a reference\r\n * to the gamepads you can poll its buttons and axis sticks. See the properties and methods available on\r\n * the `Gamepad` class for more details.\r\n *\r\n * For more information about Gamepad support in browsers see the following resources:\r\n *\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API\r\n * https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API/Using_the_Gamepad_API\r\n * https://www.smashingmagazine.com/2015/11/gamepad-api-in-web-games/\r\n * http://html5gamepad.com/\r\n *\r\n * @class GamepadPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Gamepad\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar GamepadPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function GamepadPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A boolean that controls if the Gamepad Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The Gamepad Event target, as defined in the Game Config.\r\n * Typically the browser window, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#target\r\n * @type {any}\r\n * @since 3.10.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * An array of the connected Gamepads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#gamepads\r\n * @type {Phaser.Input.Gamepad.Gamepad[]}\r\n * @default []\r\n * @since 3.10.0\r\n */\r\n this.gamepads = [];\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#queue\r\n * @type {GamepadEvent[]}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * Internal event handler.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#onGamepadHandler\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.onGamepadHandler;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad1;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad2;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad3;\r\n\r\n /**\r\n * Internal Gamepad reference.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#_pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this._pad4;\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.scene.sys.game;\r\n var settings = this.settings.input;\r\n var config = game.config;\r\n\r\n this.enabled = GetValue(settings, 'gamepad', config.inputGamepad) && game.device.input.gamepads;\r\n this.target = GetValue(settings, 'gamepad.target', config.inputGamepadEventTarget);\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.enabled)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * Starts the Gamepad Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#startListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var target = this.target;\r\n\r\n var handler = function (event)\r\n {\r\n // console.log(event);\r\n\r\n if (event.defaultPrevented || !_this.isActive())\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.refreshPads();\r\n\r\n _this.queue.push(event);\r\n };\r\n\r\n this.onGamepadHandler = handler;\r\n\r\n target.addEventListener('gamepadconnected', handler, false);\r\n target.addEventListener('gamepaddisconnected', handler, false);\r\n\r\n // FF also supports gamepadbuttondown, gamepadbuttonup and gamepadaxismove but\r\n // nothing else does, and we can get those values via the gamepads anyway, so we will\r\n // until more browsers support this\r\n\r\n // Finally, listen for an update event from the Input Plugin\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n },\r\n\r\n /**\r\n * Stops the Gamepad Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#stopListeners\r\n * @private\r\n * @since 3.10.0\r\n */\r\n stopListeners: function ()\r\n {\r\n this.target.removeEventListener('gamepadconnected', this.onGamepadHandler);\r\n this.target.removeEventListener('gamepaddisconnected', this.onGamepadHandler);\r\n\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update);\r\n },\r\n\r\n /**\r\n * Disconnects all current Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#disconnectAll\r\n * @since 3.10.0\r\n */\r\n disconnectAll: function ()\r\n {\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n this.gamepads.connected = false;\r\n }\r\n },\r\n\r\n /**\r\n * Refreshes the list of connected Gamepads.\r\n *\r\n * This is called automatically when a gamepad is connected or disconnected,\r\n * and during the update loop.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#refreshPads\r\n * @private\r\n * @since 3.10.0\r\n */\r\n refreshPads: function ()\r\n {\r\n var connectedPads = navigator.getGamepads();\r\n\r\n if (!connectedPads)\r\n {\r\n this.disconnectAll();\r\n }\r\n else\r\n {\r\n var currentPads = this.gamepads;\r\n\r\n for (var i = 0; i < connectedPads.length; i++)\r\n {\r\n var livePad = connectedPads[i];\r\n\r\n // Because sometimes they're null (yes, really)\r\n if (!livePad)\r\n {\r\n continue;\r\n }\r\n\r\n var id = livePad.id;\r\n var index = livePad.index;\r\n var currentPad = currentPads[index];\r\n\r\n if (!currentPad)\r\n {\r\n // A new Gamepad, not currently stored locally\r\n var newPad = new Gamepad(this, livePad);\r\n\r\n currentPads[index] = newPad;\r\n\r\n if (!this._pad1)\r\n {\r\n this._pad1 = newPad;\r\n }\r\n else if (!this._pad2)\r\n {\r\n this._pad2 = newPad;\r\n }\r\n else if (!this._pad3)\r\n {\r\n this._pad3 = newPad;\r\n }\r\n else if (!this._pad4)\r\n {\r\n this._pad4 = newPad;\r\n }\r\n }\r\n else if (currentPad.id !== id)\r\n {\r\n // A new Gamepad with a different vendor string, but it has got the same index as an old one\r\n currentPad.destroy();\r\n\r\n currentPads[index] = new Gamepad(this, livePad);\r\n }\r\n else\r\n {\r\n // If neither of these, it's a pad we've already got, so update it\r\n currentPad.update(livePad);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all currently connected Gamepads.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getAll\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad[]} An array of all currently connected Gamepads.\r\n */\r\n getAll: function ()\r\n {\r\n var out = [];\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i])\r\n {\r\n out.push(pads[i]);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Looks-up a single Gamepad based on the given index value.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#getPad\r\n * @since 3.10.0\r\n *\r\n * @param {number} index - The index of the Gamepad to get.\r\n *\r\n * @return {Phaser.Input.Gamepad.Gamepad} The Gamepad matching the given index, or undefined if none were found.\r\n */\r\n getPad: function (index)\r\n {\r\n var pads = this.gamepads;\r\n\r\n for (var i = 0; i < pads.length; i++)\r\n {\r\n if (pads[i] && pads[i].index === index)\r\n {\r\n return pads[i];\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The internal update loop. Refreshes all connected gamepads and processes their events.\r\n *\r\n * Called automatically by the Input Manager, invoked from the Game step.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#update\r\n * @private\r\n * @fires Phaser.Input.Gamepad.Events#CONNECTED\r\n * @fires Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.refreshPads();\r\n\r\n var len = this.queue.length;\r\n\r\n if (len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var queue = this.queue.splice(0, len);\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var pad = this.getPad(event.gamepad.index);\r\n\r\n if (event.type === 'gamepadconnected')\r\n {\r\n this.emit(Events.CONNECTED, pad, event);\r\n }\r\n else if (event.type === 'gamepaddisconnected')\r\n {\r\n this.emit(Events.DISCONNECTED, pad, event);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Shuts the Gamepad Plugin down.\r\n * All this does is remove any listeners bound to it.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.disconnectAll();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Destroys this Gamepad Plugin, disconnecting all Gamepads and releasing internal references.\r\n *\r\n * @method Phaser.Input.Gamepad.GamepadPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n for (var i = 0; i < this.gamepads.length; i++)\r\n {\r\n if (this.gamepads[i])\r\n {\r\n this.gamepads[i].destroy();\r\n }\r\n }\r\n\r\n this.gamepads = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.target = null;\r\n },\r\n\r\n /**\r\n * The total number of connected game pads.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#total\r\n * @type {integer}\r\n * @since 3.10.0\r\n */\r\n total: {\r\n\r\n get: function ()\r\n {\r\n return this.gamepads.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the first connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad1\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad1: {\r\n\r\n get: function ()\r\n {\r\n return this._pad1;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the second connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad2\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad2: {\r\n\r\n get: function ()\r\n {\r\n return this._pad2;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the third connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad3\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad3: {\r\n\r\n get: function ()\r\n {\r\n return this._pad3;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * A reference to the fourth connected Gamepad.\r\n *\r\n * This will be undefined if either no pads are connected, or the browser\r\n * has not yet issued a gamepadconnect, which can happen even if a Gamepad\r\n * is plugged in, but hasn't yet had any buttons pressed on it.\r\n *\r\n * @name Phaser.Input.Gamepad.GamepadPlugin#pad4\r\n * @type {Phaser.Input.Gamepad.Gamepad}\r\n * @since 3.10.0\r\n */\r\n pad4: {\r\n\r\n get: function ()\r\n {\r\n return this._pad4;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Gamepad Plugin class, if enabled via the `input.gamepad` Scene or Game Config property.\r\n * Use this to create access Gamepads connected to the browser and respond to gamepad buttons.\r\n *\r\n * @name Phaser.Input.InputPlugin#gamepad\r\n * @type {?Phaser.Input.Gamepad.GamepadPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('GamepadPlugin', GamepadPlugin, 'gamepad', 'gamepad', 'inputGamepad');\r\n\r\nmodule.exports = GamepadPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/GamepadPlugin.js?")},"./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tatar SNES USB Controller Gamepad Configuration.\r\n * USB Gamepad (STANDARD GAMEPAD Vendor: 0079 Product: 0011)\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.SNES_USB\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SELECT: 8,\r\n START: 9,\r\n\r\n B: 0,\r\n A: 1,\r\n Y: 2,\r\n X: 3,\r\n\r\n LEFT_SHOULDER: 4,\r\n RIGHT_SHOULDER: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * PlayStation DualShock 4 Gamepad Configuration.\r\n * Sony PlayStation DualShock 4 (v2) wireless controller\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.DUALSHOCK_4\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n SHARE: 8,\r\n OPTIONS: 9,\r\n PS: 16,\r\n TOUCHBAR: 17,\r\n\r\n X: 0,\r\n CIRCLE: 1,\r\n SQUARE: 2,\r\n TRIANGLE: 3,\r\n\r\n L1: 4,\r\n R1: 5,\r\n L2: 6,\r\n R2: 7,\r\n L3: 10,\r\n R3: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js?")},"./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * XBox 360 Gamepad Configuration.\r\n *\r\n * @name Phaser.Input.Gamepad.Configs.XBOX_360\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n UP: 12,\r\n DOWN: 13,\r\n LEFT: 14,\r\n RIGHT: 15,\r\n\r\n MENU: 16,\r\n\r\n A: 0,\r\n B: 1,\r\n X: 2,\r\n Y: 3,\r\n\r\n LB: 4,\r\n RB: 5,\r\n\r\n LT: 6,\r\n RT: 7,\r\n\r\n BACK: 8,\r\n START: 9,\r\n\r\n LS: 10,\r\n RS: 11,\r\n\r\n LEFT_STICK_H: 0,\r\n LEFT_STICK_V: 1,\r\n RIGHT_STICK_H: 2,\r\n RIGHT_STICK_V: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js?")},"./node_modules/phaser/src/input/gamepad/configs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Configs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n DUALSHOCK_4: __webpack_require__(/*! ./Sony_PlayStation_DualShock_4 */ "./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js"),\r\n SNES_USB: __webpack_require__(/*! ./SNES_USB_Controller */ "./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js"),\r\n XBOX_360: __webpack_require__(/*! ./XBox360_Controller */ "./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/configs/index.js?')},"./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been pressed on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('down', listener)`.\r\n * \r\n * You can also listen for a DOWN event from a Gamepad instance. See the [GAMEPAD_BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was pressed.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a button has been released on any active Gamepad.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.on('up', listener)`.\r\n * \r\n * You can also listen for an UP event from a Gamepad instance. See the [GAMEPAD_BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:GAMEPAD_BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad on which the button was released.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Connected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been connected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('connected', listener)`.\r\n * \r\n * Note that the browser may require you to press a button on a gamepad before it will allow you to access it,\r\n * this is for security reasons. However, it may also trust the page already, in which case you won't get the\r\n * 'connected' event and instead should check `GamepadPlugin.total` to see if it thinks there are any gamepads\r\n * already connected.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#CONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was connected.\r\n * @param {Event} event - The native DOM Event that triggered the connection.\r\n */\r\nmodule.exports = 'connected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Disconnected Event.\r\n * \r\n * This event is dispatched by the Gamepad Plugin when a Gamepad has been disconnected.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.gamepad.once('disconnected', listener)`.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#DISCONNECTED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Gamepad} pad - A reference to the Gamepad which was disconnected.\r\n * @param {Event} event - The native DOM Event that triggered the disconnection.\r\n */\r\nmodule.exports = 'disconnected';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Down Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been pressed on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('down', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for a DOWN event from the Gamepad Plugin. See the [BUTTON_DOWN]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_DOWN} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_DOWN\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was pressed.\r\n * @param {number} value - The value of the button at the time it was pressed. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was pressed.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Gamepad Button Up Event.\r\n * \r\n * This event is dispatched by a Gamepad instance when a button has been released on it.\r\n * \r\n * Listen to this event from a Gamepad instance. Once way to get this is from the `pad1`, `pad2`, etc properties on the Gamepad Plugin:\r\n * `this.input.gamepad.pad1.on('up', listener)`.\r\n * \r\n * Note that you will not receive any Gamepad button events until the browser considers the Gamepad as being 'connected'.\r\n * \r\n * You can also listen for an UP event from the Gamepad Plugin. See the [BUTTON_UP]{@linkcode Phaser.Input.Gamepad.Events#event:BUTTON_UP} event for details.\r\n *\r\n * @event Phaser.Input.Gamepad.Events#GAMEPAD_BUTTON_UP\r\n * @since 3.10.0\r\n * \r\n * @param {integer} index - The index of the button that was released.\r\n * @param {number} value - The value of the button at the time it was released. Between 0 and 1. Some Gamepads have pressure-sensitive buttons.\r\n * @param {Phaser.Input.Gamepad.Button} button - A reference to the Button which was released.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js?")},"./node_modules/phaser/src/input/gamepad/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BUTTON_DOWN: __webpack_require__(/*! ./BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js"),\r\n BUTTON_UP: __webpack_require__(/*! ./BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js"),\r\n CONNECTED: __webpack_require__(/*! ./CONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js"),\r\n DISCONNECTED: __webpack_require__(/*! ./DISCONNECTED_EVENT */ "./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js"),\r\n GAMEPAD_BUTTON_DOWN: __webpack_require__(/*! ./GAMEPAD_BUTTON_DOWN_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js"),\r\n GAMEPAD_BUTTON_UP: __webpack_require__(/*! ./GAMEPAD_BUTTON_UP_EVENT */ "./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/events/index.js?')},"./node_modules/phaser/src/input/gamepad/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Gamepad\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Axis: __webpack_require__(/*! ./Axis */ "./node_modules/phaser/src/input/gamepad/Axis.js"),\r\n Button: __webpack_require__(/*! ./Button */ "./node_modules/phaser/src/input/gamepad/Button.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/gamepad/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./Gamepad */ "./node_modules/phaser/src/input/gamepad/Gamepad.js"),\r\n GamepadPlugin: __webpack_require__(/*! ./GamepadPlugin */ "./node_modules/phaser/src/input/gamepad/GamepadPlugin.js"),\r\n \r\n Configs: __webpack_require__(/*! ./configs/ */ "./node_modules/phaser/src/input/gamepad/configs/index.js")\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/gamepad/index.js?')},"./node_modules/phaser/src/input/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/input/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Input\r\n */\r\n\r\nvar Input = {\r\n\r\n CreateInteractiveObject: __webpack_require__(/*! ./CreateInteractiveObject */ "./node_modules/phaser/src/input/CreateInteractiveObject.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/events/index.js"),\r\n Gamepad: __webpack_require__(/*! ./gamepad */ "./node_modules/phaser/src/input/gamepad/index.js"),\r\n InputManager: __webpack_require__(/*! ./InputManager */ "./node_modules/phaser/src/input/InputManager.js"),\r\n InputPlugin: __webpack_require__(/*! ./InputPlugin */ "./node_modules/phaser/src/input/InputPlugin.js"),\r\n InputPluginCache: __webpack_require__(/*! ./InputPluginCache */ "./node_modules/phaser/src/input/InputPluginCache.js"),\r\n Keyboard: __webpack_require__(/*! ./keyboard */ "./node_modules/phaser/src/input/keyboard/index.js"),\r\n Mouse: __webpack_require__(/*! ./mouse */ "./node_modules/phaser/src/input/mouse/index.js"),\r\n Pointer: __webpack_require__(/*! ./Pointer */ "./node_modules/phaser/src/input/Pointer.js"),\r\n Touch: __webpack_require__(/*! ./touch */ "./node_modules/phaser/src/input/touch/index.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nInput = Extend(false, Input, CONST);\r\n\r\nmodule.exports = Input;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/index.js?')},"./node_modules/phaser/src/input/keyboard/KeyboardManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar KeyCodes = __webpack_require__(/*! ../../input/keyboard/keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Manager is a helper class that belongs to the global Input Manager.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then store them for further processing by the Keyboard Plugin.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically if keyboard\r\n * input has been enabled in the Game Config.\r\n *\r\n * @class KeyboardManager\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar KeyboardManager = new Class({\r\n\r\n initialize:\r\n\r\n function KeyboardManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.16.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * An internal event queue.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#queue\r\n * @type {KeyboardEvent[]}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.queue = [];\r\n\r\n /**\r\n * A flag that controls if the non-modified keys, matching those stored in the `captures` array,\r\n * have `preventDefault` called on them or not.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle this property at run-time.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#preventDefault\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.preventDefault = true;\r\n\r\n /**\r\n * An array of Key Code values that will automatically have `preventDefault` called on them,\r\n * as long as the `KeyboardManager.preventDefault` boolean is set to `true`.\r\n * \r\n * By default the array is empty.\r\n * \r\n * The key must be non-modified when pressed in order to be captured.\r\n * \r\n * A non-modified key is one that doesn't have a modifier key held down with it. The modifier keys are\r\n * shift, control, alt and the meta key (Command on a Mac, the Windows Key on Windows).\r\n * Therefore, if the user presses shift + r, it won't prevent this combination, because of the modifier.\r\n * However, if the user presses just the r key on its own, it will have its event prevented.\r\n * \r\n * If you wish to stop capturing the keys, for example switching out to a DOM based element, then\r\n * you can toggle the `KeyboardManager.preventDefault` boolean at run-time.\r\n * \r\n * If you need more specific control, you can create Key objects and set the flag on each of those instead.\r\n * \r\n * This array can be populated via the Game Config by setting the `input.keyboard.capture` array, or you\r\n * can call the `addCapture` method. See also `removeCapture` and `clearCaptures`.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#captures\r\n * @type {integer[]}\r\n * @since 3.16.0\r\n */\r\n this.captures = [];\r\n\r\n /**\r\n * A boolean that controls if the Keyboard Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Keyboard Event target, as defined in the Game Config.\r\n * Typically the window in which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#target\r\n * @type {any}\r\n * @since 3.16.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Key Down Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyDown\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyDown = NOOP;\r\n\r\n /**\r\n * The Key Up Event handler.\r\n * This function is sent the native DOM KeyEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardManager#onKeyUp\r\n * @type {function}\r\n * @since 3.16.00\r\n */\r\n this.onKeyUp = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Keyboard Manager boot process.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#boot\r\n * @private\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputKeyboard;\r\n this.target = config.inputKeyboardEventTarget;\r\n\r\n this.addCapture(config.inputKeyboardCapture);\r\n\r\n if (!this.target && window)\r\n {\r\n this.target = window;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n\r\n this.manager.game.events.on(GameEvents.POST_STEP, this.postUpdate, this);\r\n },\r\n\r\n /**\r\n * Starts the Keyboard Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n\r\n this.onKeyDown = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n this.onKeyUp = function (event)\r\n {\r\n if (event.defaultPrevented || !_this.enabled || !_this.manager)\r\n {\r\n // Do nothing if event already handled\r\n return;\r\n }\r\n\r\n _this.queue.push(event);\r\n\r\n if (!_this.manager.useQueue)\r\n {\r\n _this.manager.events.emit(InputEvents.MANAGER_PROCESS);\r\n }\r\n \r\n var modified = (event.altKey || event.ctrlKey || event.shiftKey || event.metaKey);\r\n\r\n if (_this.preventDefault && !modified && _this.captures.indexOf(event.keyCode) > -1)\r\n {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (target)\r\n {\r\n target.addEventListener('keydown', this.onKeyDown, false);\r\n target.addEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = true;\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Key Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('keydown', this.onKeyDown, false);\r\n target.removeEventListener('keyup', this.onKeyUp, false);\r\n\r\n this.enabled = false;\r\n },\r\n\r\n /**\r\n * Clears the event queue.\r\n * Called automatically by the Input Manager.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#postUpdate\r\n * @private\r\n * @since 3.16.0\r\n */\r\n postUpdate: function ()\r\n {\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser\r\n * and cause the default browser behavior.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are active captures after calling this method, the `preventDefault` property is set to `true`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable capture for, preventing them reaching the browser.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.trim().toUpperCase()];\r\n }\r\n\r\n if (captures.indexOf(code) === -1)\r\n {\r\n captures.push(code);\r\n }\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass in a single key code value, or an array of key codes, or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or a string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n * \r\n * If there are no captures left after calling this method, the `preventDefault` property is set to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable capture for, allowing them reaching the browser again.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n if (typeof keycode === 'string')\r\n {\r\n keycode = keycode.split(',');\r\n }\r\n\r\n if (!Array.isArray(keycode))\r\n {\r\n keycode = [ keycode ];\r\n }\r\n\r\n var captures = this.captures;\r\n\r\n for (var i = 0; i < keycode.length; i++)\r\n {\r\n var code = keycode[i];\r\n\r\n if (typeof code === 'string')\r\n {\r\n code = KeyCodes[code.toUpperCase()];\r\n }\r\n\r\n ArrayRemove(captures, code);\r\n }\r\n\r\n this.preventDefault = captures.length > 0;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures and sets the `preventDefault` property to `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#clearCaptures\r\n * @since 3.16.0\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.captures = [];\r\n\r\n this.preventDefault = false;\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Manager instance.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.clearCaptures();\r\n\r\n this.queue = [];\r\n\r\n this.manager.game.events.off(GameEvents.POST_RENDER, this.postUpdate, this);\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyboardManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardManager.js?")},"./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar InputPluginCache = __webpack_require__(/*! ../InputPluginCache */ \"./node_modules/phaser/src/input/InputPluginCache.js\");\r\nvar Key = __webpack_require__(/*! ./keys/Key */ \"./node_modules/phaser/src/input/keyboard/keys/Key.js\");\r\nvar KeyCodes = __webpack_require__(/*! ./keys/KeyCodes */ \"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js\");\r\nvar KeyCombo = __webpack_require__(/*! ./combo/KeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js\");\r\nvar KeyMap = __webpack_require__(/*! ./keys/KeyMap */ \"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Keyboard Plugin is an input plugin that belongs to the Scene-owned Input system.\r\n * \r\n * Its role is to listen for native DOM Keyboard Events and then process them.\r\n * \r\n * You do not need to create this class directly, the Input system will create an instance of it automatically.\r\n * \r\n * You can access it from within a Scene using `this.input.keyboard`. For example, you can do:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.on('keydown', callback, context);\r\n * ```\r\n *\r\n * Or, to listen for a specific key:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.on('keydown-A', callback, context);\r\n * ```\r\n *\r\n * You can also create Key objects, which you can then poll in your game loop:\r\n *\r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * ```\r\n * \r\n * If you have multiple parallel Scenes, each trying to get keyboard input, be sure to disable capture on them to stop them from\r\n * stealing input from another Scene in the list. You can do this with `this.input.keyboard.enabled = false` within the\r\n * Scene to stop all input, or `this.input.keyboard.preventDefault = false` to stop a Scene halting input on another Scene.\r\n *\r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.\r\n *\r\n * Also please be aware that certain browser extensions can disable or override Phaser keyboard handling.\r\n * For example the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * And there are others. So, please check your extensions before opening Phaser issues about keys that don't work.\r\n *\r\n * @class KeyboardPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Input.InputPlugin} sceneInputPlugin - A reference to the Scene Input Plugin that the KeyboardPlugin belongs to.\r\n */\r\nvar KeyboardPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function KeyboardPlugin (sceneInputPlugin)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the core game, so we can listen for visibility events.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#game\r\n * @type {Phaser.Game}\r\n * @since 3.16.0\r\n */\r\n this.game = sceneInputPlugin.systems.game;\r\n\r\n /**\r\n * A reference to the Scene that this Input Plugin is responsible for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.10.0\r\n */\r\n this.scene = sceneInputPlugin.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems Settings.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.10.0\r\n */\r\n this.settings = this.scene.sys.settings;\r\n\r\n /**\r\n * A reference to the Scene Input Plugin that created this Keyboard Plugin.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#sceneInputPlugin\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.10.0\r\n */\r\n this.sceneInputPlugin = sceneInputPlugin;\r\n\r\n /**\r\n * A reference to the global Keyboard Manager.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#manager\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.16.0\r\n */\r\n this.manager = sceneInputPlugin.manager.keyboard;\r\n\r\n /**\r\n * A boolean that controls if this Keyboard Plugin is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of Key objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#keys\r\n * @type {Phaser.Input.Keyboard.Key[]}\r\n * @since 3.10.0\r\n */\r\n this.keys = [];\r\n\r\n /**\r\n * An array of KeyCombo objects to process.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#combos\r\n * @type {Phaser.Input.Keyboard.KeyCombo[]}\r\n * @since 3.10.0\r\n */\r\n this.combos = [];\r\n\r\n sceneInputPlugin.pluginEvents.once(InputEvents.BOOT, this.boot, this);\r\n sceneInputPlugin.pluginEvents.on(InputEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#boot\r\n * @private\r\n * @since 3.10.0\r\n */\r\n boot: function ()\r\n {\r\n var settings = this.settings.input;\r\n\r\n this.enabled = GetValue(settings, 'keyboard', true);\r\n\r\n var captures = GetValue(settings, 'keyboard.capture', null);\r\n\r\n if (captures)\r\n {\r\n this.addCaptures(captures);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#start\r\n * @private\r\n * @since 3.10.0\r\n */\r\n start: function ()\r\n {\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.on(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.on(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.sceneInputPlugin.pluginEvents.once(InputEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.game.events.on(GameEvents.BLUR, this.resetKeys, this);\r\n },\r\n\r\n /**\r\n * Checks to see if both this plugin and the Scene to which it belongs is active.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#isActive\r\n * @since 3.10.0\r\n *\r\n * @return {boolean} `true` if the plugin and the Scene it belongs to is active.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.enabled && this.scene.sys.isActive());\r\n },\r\n\r\n /**\r\n * By default when a key is pressed Phaser will not stop the event from propagating up to the browser.\r\n * There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.\r\n *\r\n * This `addCapture` method enables consuming keyboard events for specific keys, so they don't bubble up the browser\r\n * and cause the default behaviors.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to say prevent\r\n * the SPACE BAR from triggering a page scroll, then it will prevent it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n addCapture: function (keycode)\r\n {\r\n this.manager.addCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an existing key capture.\r\n * \r\n * Please note that keyboard captures are global. This means that if you call this method from within a Scene, to remove\r\n * the capture of a key, then it will remove it for any Scene in your game, not just the calling one.\r\n * \r\n * You can pass a single key code value:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture(62);\r\n * ```\r\n * \r\n * An array of key codes:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture([ 62, 63, 64 ]);\r\n * ```\r\n * \r\n * Or, a comma-delimited string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.removeCapture('W,S,A,D');\r\n * ```\r\n * \r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n * \r\n * You can also provide an array mixing both strings and key code integers.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeCapture\r\n * @since 3.16.0\r\n * \r\n * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeCapture: function (keycode)\r\n {\r\n this.manager.removeCapture(keycode);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns an array that contains all of the keyboard captures currently enabled.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#getCaptures\r\n * @since 3.16.0\r\n * \r\n * @return {integer[]} An array of all the currently capturing key codes.\r\n */\r\n getCaptures: function ()\r\n {\r\n return this.manager.captures;\r\n },\r\n\r\n /**\r\n * Allows Phaser to prevent any key captures you may have defined from bubbling up the browser.\r\n * You can use this to re-enable event capturing if you had paused it via `disableGlobalCapture`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n enableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Disables Phaser from preventing any key captures you may have defined, without actually removing them.\r\n * You can use this to temporarily disable event capturing if, for example, you swap to a DOM element.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n disableGlobalCapture: function ()\r\n {\r\n this.manager.preventDefault = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all keyboard captures.\r\n * \r\n * Note that this is a global change. It will clear all event captures across your game, not just for this specific Scene.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures\r\n * @since 3.16.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n clearCaptures: function ()\r\n {\r\n this.manager.clearCaptures();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right, and also Space Bar and shift.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCursorKeys\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Types.Input.Keyboard.CursorKeys} An object containing the properties: `up`, `down`, `left`, `right`, `space` and `shift`.\r\n */\r\n createCursorKeys: function ()\r\n {\r\n return this.addKeys({\r\n up: KeyCodes.UP,\r\n down: KeyCodes.DOWN,\r\n left: KeyCodes.LEFT,\r\n right: KeyCodes.RIGHT,\r\n space: KeyCodes.SPACE,\r\n shift: KeyCodes.SHIFT\r\n });\r\n },\r\n\r\n /**\r\n * A practical way to create an object containing user selected hotkeys.\r\n *\r\n * For example:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.addKeys({ 'up': Phaser.Input.Keyboard.KeyCodes.W, 'down': Phaser.Input.Keyboard.KeyCodes.S });\r\n * ```\r\n * \r\n * would return an object containing the properties (`up` and `down`) mapped to W and S {@link Phaser.Input.Keyboard.Key} objects.\r\n *\r\n * You can also pass in a comma-separated string:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.addKeys('W,S,A,D');\r\n * ```\r\n *\r\n * Which will return an object with the properties W, S, A and D mapped to the relevant Key objects.\r\n *\r\n * To use non-alpha numeric keys, use a string, such as 'UP', 'SPACE' or 'LEFT'.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKeys\r\n * @since 3.10.0\r\n *\r\n * @param {(object|string)} keys - An object containing Key Codes, or a comma-separated string.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {object} An object containing Key objects mapped to the input properties.\r\n */\r\n addKeys: function (keys, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var output = {};\r\n\r\n if (typeof keys === 'string')\r\n {\r\n keys = keys.split(',');\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var currentKey = keys[i].trim();\r\n\r\n if (currentKey)\r\n {\r\n output[currentKey] = this.addKey(currentKey, enableCapture, emitOnRepeat);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (var key in keys)\r\n {\r\n output[key] = this.addKey(keys[key], enableCapture, emitOnRepeat);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Adds a Key object to this Keyboard Plugin.\r\n *\r\n * The given argument can be either an existing Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * If a Key object is given, and one already exists matching the same key code, the existing one is replaced with the new one.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#addKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [enableCapture=true] - Automatically call `preventDefault` on the native DOM browser event for the key codes being added.\r\n * @param {boolean} [emitOnRepeat=false] - Controls if the Key will continuously emit a 'down' event while being held down (true), or emit the event just once (false, the default).\r\n *\r\n * @return {Phaser.Input.Keyboard.Key} The newly created Key object, or a reference to it if it already existed in the keys array.\r\n */\r\n addKey: function (key, enableCapture, emitOnRepeat)\r\n {\r\n if (enableCapture === undefined) { enableCapture = true; }\r\n if (emitOnRepeat === undefined) { emitOnRepeat = false; }\r\n\r\n var keys = this.keys;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n keys[idx] = key;\r\n }\r\n else\r\n {\r\n keys[key.keyCode] = key;\r\n }\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key.keyCode);\r\n }\r\n\r\n key.setEmitOnRepeat(emitOnRepeat);\r\n\r\n return key;\r\n }\r\n\r\n if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (!keys[key])\r\n {\r\n keys[key] = new Key(this, key);\r\n\r\n if (enableCapture)\r\n {\r\n this.addCapture(key);\r\n }\r\n\r\n keys[key].setEmitOnRepeat(emitOnRepeat);\r\n }\r\n\r\n return keys[key];\r\n },\r\n\r\n /**\r\n * Removes a Key object from this Keyboard Plugin.\r\n *\r\n * The given argument can be either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#removeKey\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value.\r\n * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object?\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n removeKey: function (key, destroy)\r\n {\r\n if (destroy === undefined) { destroy = false; }\r\n\r\n var keys = this.keys;\r\n var ref;\r\n\r\n if (key instanceof Key)\r\n {\r\n var idx = keys.indexOf(key);\r\n\r\n if (idx > -1)\r\n {\r\n ref = this.keys[idx];\r\n\r\n this.keys[idx] = undefined;\r\n }\r\n }\r\n else if (typeof key === 'string')\r\n {\r\n key = KeyCodes[key.toUpperCase()];\r\n }\r\n\r\n if (keys[key])\r\n {\r\n ref = keys[key];\r\n\r\n keys[key] = undefined;\r\n }\r\n\r\n if (ref)\r\n {\r\n ref.plugin = null;\r\n\r\n if (destroy)\r\n {\r\n ref.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new KeyCombo.\r\n * \r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from this Keyboard Plugin.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#createCombo\r\n * @since 3.10.0\r\n *\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The new KeyCombo object.\r\n */\r\n createCombo: function (keys, config)\r\n {\r\n return new KeyCombo(this, keys, config);\r\n },\r\n\r\n /**\r\n * Checks if the given Key object is currently being held down.\r\n * \r\n * The difference between this method and checking the `Key.isDown` property directly is that you can provide\r\n * a duration to this method. For example, if you wanted a key press to fire a bullet, but you only wanted\r\n * it to be able to fire every 100ms, then you can call this method with a `duration` of 100 and it\r\n * will only return `true` every 100ms.\r\n * \r\n * If the Keyboard Plugin has been disabled, this method will always return `false`.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#checkDown\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - A Key object.\r\n * @param {number} [duration=0] - The duration which must have elapsed before this Key is considered as being down.\r\n * \r\n * @return {boolean} `true` if the Key is down within the duration specified, otherwise `false`.\r\n */\r\n checkDown: function (key, duration)\r\n {\r\n if (this.enabled && key.isDown)\r\n {\r\n var t = SnapFloor(this.time - key.timeDown, duration);\r\n\r\n if (t > key._tick)\r\n {\r\n key._tick = t;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler called by the Input Plugin, which is in turn invoked by the Game step.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#update\r\n * @private\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n var queue = this.manager.queue;\r\n var len = queue.length;\r\n\r\n if (!this.isActive() || len === 0)\r\n {\r\n return;\r\n }\r\n\r\n var keys = this.keys;\r\n\r\n // Process the event queue, dispatching all of the events that have stored up\r\n for (var i = 0; i < len; i++)\r\n {\r\n var event = queue[i];\r\n var code = event.keyCode;\r\n var key = keys[code];\r\n var repeat = false;\r\n\r\n // Override the default functions (it's too late for the browser to use them anyway, so we may as well)\r\n if (event.cancelled === undefined)\r\n {\r\n // Event allowed to flow across all handlers in this Scene, and any other Scene in the Scene list\r\n event.cancelled = 0;\r\n\r\n // Won't reach any more local (Scene level) handlers\r\n event.stopImmediatePropagation = function ()\r\n {\r\n event.cancelled = 1;\r\n };\r\n \r\n // Won't reach any more handlers in any Scene further down the Scene list\r\n event.stopPropagation = function ()\r\n {\r\n event.cancelled = -1;\r\n };\r\n }\r\n\r\n if (event.cancelled === -1)\r\n {\r\n // This event has been stopped from broadcasting to any other Scene, so abort.\r\n continue;\r\n }\r\n\r\n if (event.type === 'keydown')\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n repeat = key.isDown;\r\n\r\n key.onDown(event);\r\n }\r\n\r\n if (!event.cancelled && (!key || !repeat))\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_DOWN + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keydown_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_DOWN, event);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // Key specific callback first\r\n if (key)\r\n {\r\n key.onUp(event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n if (KeyMap[code])\r\n {\r\n this.emit(Events.KEY_UP + KeyMap[code], event);\r\n\r\n // Deprecated, kept in for compatibility with 3.15\r\n // To be removed by 3.20.\r\n this.emit('keyup_' + KeyMap[code], event);\r\n }\r\n\r\n if (!event.cancelled)\r\n {\r\n this.emit(Events.ANY_KEY_UP, event);\r\n }\r\n }\r\n }\r\n\r\n // Reset the cancel state for other Scenes to use\r\n if (event.cancelled === 1)\r\n {\r\n event.cancelled = 0;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resets all Key objects created by _this_ Keyboard Plugin back to their default un-pressed states.\r\n * This can only reset keys created via the `addKey`, `addKeys` or `createCursorKeys` methods.\r\n * If you have created a Key object directly you'll need to reset it yourself.\r\n * \r\n * This method is called automatically when the Keyboard Plugin shuts down, but can be\r\n * invoked directly at any time you require.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys\r\n * @since 3.15.0\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object.\r\n */\r\n resetKeys: function ()\r\n {\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].reset();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuts this Keyboard Plugin down. This performs the following tasks:\r\n * \r\n * 1 - Resets all keys created by this Keyboard plugin.\r\n * 2 - Stops and removes the keyboard event listeners.\r\n * 3 - Clears out any pending requests in the queue, without processing them.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#shutdown\r\n * @private\r\n * @since 3.10.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.resetKeys();\r\n\r\n if (this.sceneInputPlugin.manager.useQueue)\r\n {\r\n this.sceneInputPlugin.pluginEvents.off(InputEvents.UPDATE, this.update, this);\r\n }\r\n else\r\n {\r\n this.sceneInputPlugin.manager.events.off(InputEvents.MANAGER_PROCESS, this.update, this);\r\n }\r\n\r\n this.game.events.off(GameEvents.BLUR, this.resetKeys);\r\n\r\n this.removeAllListeners();\r\n\r\n this.queue = [];\r\n },\r\n\r\n /**\r\n * Destroys this Keyboard Plugin instance and all references it holds, plus clears out local arrays.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyboardPlugin#destroy\r\n * @private\r\n * @since 3.10.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n var keys = this.keys;\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n // Because it's a sparsely populated array\r\n if (keys[i])\r\n {\r\n keys[i].destroy();\r\n }\r\n }\r\n\r\n this.keys = [];\r\n this.combos = [];\r\n this.queue = [];\r\n\r\n this.scene = null;\r\n this.settings = null;\r\n this.sceneInputPlugin = null;\r\n this.manager = null;\r\n },\r\n\r\n /**\r\n * Internal time value.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyboardPlugin#time\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n time: {\r\n\r\n get: function ()\r\n {\r\n return this.sceneInputPlugin.manager.time;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * An instance of the Keyboard Plugin class, if enabled via the `input.keyboard` Scene or Game Config property.\r\n * Use this to create Key objects and listen for keyboard specific events.\r\n *\r\n * @name Phaser.Input.InputPlugin#keyboard\r\n * @type {?Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.10.0\r\n */\r\nInputPluginCache.register('KeyboardPlugin', KeyboardPlugin, 'keyboard', 'keyboard', 'inputKeyboard');\r\n\r\nmodule.exports = KeyboardPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js?")},"./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n * Return `true` if it reached the end of the combo, `false` if not.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.AdvanceKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to advance.\r\n *\r\n * @return {boolean} `true` if it reached the end of the combo, `false` if not.\r\n */\r\nvar AdvanceKeyCombo = function (event, combo)\r\n{\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.index++;\r\n\r\n if (combo.index === combo.size)\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n combo.current = combo.keyCodes[combo.index];\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = AdvanceKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/keyboard/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ProcessKeyCombo = __webpack_require__(/*! ./ProcessKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js\");\r\nvar ResetKeyCombo = __webpack_require__(/*! ./ResetKeyCombo */ \"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A KeyCombo will listen for a specific string of keys from the Keyboard, and when it receives them\r\n * it will emit a `keycombomatch` event from the Keyboard Manager.\r\n *\r\n * The keys to be listened for can be defined as:\r\n *\r\n * A string (i.e. 'ATARI')\r\n * An array of either integers (key codes) or strings, or a mixture of both\r\n * An array of objects (such as Key objects) with a public 'keyCode' property\r\n *\r\n * For example, to listen for the Konami code (up, up, down, down, left, right, left, right, b, a, enter)\r\n * you could pass the following array of key codes:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * Or, to listen for the user entering the word PHASER:\r\n *\r\n * ```javascript\r\n * this.input.keyboard.createCombo('PHASER');\r\n * ```\r\n *\r\n * @class KeyCombo\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @listens Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} keyboardPlugin - A reference to the Keyboard Plugin.\r\n * @param {(string|integer[]|object[])} keys - The keys that comprise this combo.\r\n * @param {Phaser.Types.Input.Keyboard.KeyComboConfig} [config] - A Key Combo configuration object.\r\n */\r\nvar KeyCombo = new Class({\r\n\r\n initialize:\r\n\r\n function KeyCombo (keyboardPlugin, keys, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n // Can't have a zero or single length combo (string or array based)\r\n if (keys.length < 2)\r\n {\r\n return false;\r\n }\r\n\r\n /**\r\n * A reference to the Keyboard Manager\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#manager\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.0.0\r\n */\r\n this.manager = keyboardPlugin;\r\n\r\n /**\r\n * A flag that controls if this Key Combo is actively processing keys or not.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * An array of the keycodes that comprise this combo.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#keyCodes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.keyCodes = [];\r\n\r\n // if 'keys' is a string we need to get the keycode of each character in it\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var char = keys[i];\r\n\r\n if (typeof char === 'string')\r\n {\r\n this.keyCodes.push(char.toUpperCase().charCodeAt(0));\r\n }\r\n else if (typeof char === 'number')\r\n {\r\n this.keyCodes.push(char);\r\n }\r\n else if (char.hasOwnProperty('keyCode'))\r\n {\r\n this.keyCodes.push(char.keyCode);\r\n }\r\n }\r\n\r\n /**\r\n * The current keyCode the combo is waiting for.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#current\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.current = this.keyCodes[0];\r\n\r\n /**\r\n * The current index of the key being waited for in the 'keys' string.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#index\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.index = 0;\r\n\r\n /**\r\n * The length of this combo (in keycodes)\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#size\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.size = this.keyCodes.length;\r\n\r\n /**\r\n * The time the previous key in the combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeLastMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeLastMatched = 0;\r\n\r\n /**\r\n * Has this Key Combo been matched yet?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#matched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.matched = false;\r\n\r\n /**\r\n * The time the entire combo was matched.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#timeMatched\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeMatched = 0;\r\n\r\n /**\r\n * If they press the wrong key do we reset the combo?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnWrongKey\r\n * @type {boolean}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.resetOnWrongKey = GetFastValue(config, 'resetOnWrongKey', true);\r\n\r\n /**\r\n * The max delay in ms between each key press. Above this the combo is reset. 0 means disabled.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#maxKeyDelay\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.maxKeyDelay = GetFastValue(config, 'maxKeyDelay', 0);\r\n\r\n /**\r\n * If previously matched and they press the first key of the combo again, will it reset?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#resetOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.resetOnMatch = GetFastValue(config, 'resetOnMatch', false);\r\n\r\n /**\r\n * If the combo matches, will it delete itself?\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#deleteOnMatch\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.deleteOnMatch = GetFastValue(config, 'deleteOnMatch', false);\r\n\r\n var _this = this;\r\n\r\n var onKeyDownHandler = function (event)\r\n {\r\n if (_this.matched || !_this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n var matched = ProcessKeyCombo(event, _this);\r\n\r\n if (matched)\r\n {\r\n _this.manager.emit(Events.COMBO_MATCH, _this, event);\r\n\r\n if (_this.resetOnMatch)\r\n {\r\n ResetKeyCombo(_this);\r\n }\r\n else if (_this.deleteOnMatch)\r\n {\r\n _this.destroy();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * The internal Key Down handler.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#onKeyDown\r\n * @private\r\n * @type {KeyboardKeydownCallback}\r\n * @fires Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n */\r\n this.onKeyDown = onKeyDownHandler;\r\n\r\n this.manager.on(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n },\r\n\r\n /**\r\n * How far complete is this combo? A value between 0 and 1.\r\n *\r\n * @name Phaser.Input.Keyboard.KeyCombo#progress\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n progress: {\r\n\r\n get: function ()\r\n {\r\n return this.index / this.size;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Destroys this Key Combo and all of its references.\r\n *\r\n * @method Phaser.Input.Keyboard.KeyCombo#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enabled = false;\r\n this.keyCodes = [];\r\n\r\n this.manager.off(Events.ANY_KEY_DOWN, this.onKeyDown);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = KeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AdvanceKeyCombo = __webpack_require__(/*! ./AdvanceKeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js");\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ProcessKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {KeyboardEvent} event - The native Keyboard Event.\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo object to be processed.\r\n *\r\n * @return {boolean} `true` if the combo was matched, otherwise `false`.\r\n */\r\nvar ProcessKeyCombo = function (event, combo)\r\n{\r\n if (combo.matched)\r\n {\r\n return true;\r\n }\r\n\r\n var comboMatched = false;\r\n var keyMatched = false;\r\n\r\n if (event.keyCode === combo.current)\r\n {\r\n // Key was correct\r\n\r\n if (combo.index > 0 && combo.maxKeyDelay > 0)\r\n {\r\n // We have to check to see if the delay between\r\n // the new key and the old one was too long (if enabled)\r\n\r\n var timeLimit = combo.timeLastMatched + combo.maxKeyDelay;\r\n\r\n // Check if they pressed it in time or not\r\n if (event.timeStamp <= timeLimit)\r\n {\r\n keyMatched = true;\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n else\r\n {\r\n keyMatched = true;\r\n\r\n // We don\'t check the time for the first key pressed, so just advance it\r\n comboMatched = AdvanceKeyCombo(event, combo);\r\n }\r\n }\r\n\r\n if (!keyMatched && combo.resetOnWrongKey)\r\n {\r\n // Wrong key was pressed\r\n combo.index = 0;\r\n combo.current = combo.keyCodes[0];\r\n }\r\n\r\n if (comboMatched)\r\n {\r\n combo.timeLastMatched = event.timeStamp;\r\n combo.matched = true;\r\n combo.timeMatched = event.timeStamp;\r\n }\r\n\r\n return comboMatched;\r\n};\r\n\r\nmodule.exports = ProcessKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js?')},"./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Used internally by the KeyCombo class.\r\n *\r\n * @function Phaser.Input.Keyboard.KeyCombo.ResetKeyCombo\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyCombo} combo - The KeyCombo to reset.\r\n *\r\n * @return {Phaser.Input.Keyboard.KeyCombo} The KeyCombo.\r\n */\r\nvar ResetKeyCombo = function (combo)\r\n{\r\n combo.current = combo.keyCodes[0];\r\n combo.index = 0;\r\n combo.timeLastMatched = 0;\r\n combo.matched = false;\r\n combo.timeMatched = 0;\r\n\r\n return combo;\r\n};\r\n\r\nmodule.exports = ResetKeyCombo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keydown', listener)`.\r\n * \r\n * You can also listen for a specific key being pressed. See [Keyboard.Events.KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Global Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Listen to this event from within a Scene using: `this.input.keyboard.on('keyup', listener)`.\r\n * \r\n * You can also listen for a specific key being released. See [Keyboard.Events.KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#ANY_KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Combo Match Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when a [Key Combo]{@link Phaser.Input.Keyboard.KeyCombo} is matched.\r\n * \r\n * Listen for this event from the Key Plugin after a combo has been created:\r\n * \r\n * ```javascript\r\n * this.input.keyboard.createCombo([ 38, 38, 40, 40, 37, 39, 37, 39, 66, 65, 13 ], { resetOnMatch: true });\r\n *\r\n * this.input.keyboard.on('keycombomatch', function (event) {\r\n * console.log('Konami Code entered!');\r\n * });\r\n * ```\r\n *\r\n * @event Phaser.Input.Keyboard.Events#COMBO_MATCH\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.KeyCombo} keycombo - The Key Combo object that was matched.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event of the final key in the combo. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'keycombomatch';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is pressed.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('down', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was pressed.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'down';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Down Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is pressed down.\r\n * \r\n * Unlike the `ANY_KEY_DOWN` event, this one has a special dynamic event name. For example, to listen for the `A` key being pressed\r\n * use the following from within a Scene: `this.input.keyboard.on('keydown-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keydown-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_DOWN} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.DOWN]{@linkcode Phaser.Input.Keyboard.Events#event:DOWN} for details.\r\n * \r\n * _Note_: Many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.\r\n * Read [this article on ghosting]{@link http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/} for details.\r\n *\r\n * Also, please be aware that some browser extensions can disable or override Phaser keyboard handling.\r\n * For example, the Chrome extension vimium is known to disable Phaser from using the D key, while EverNote disables the backtick key.\r\n * There are others. So, please check your extensions if you find you have specific keys that don't work.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_DOWN\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was pressed, any modifiers, etc.\r\n */\r\nmodule.exports = 'keydown-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by the Keyboard Plugin when any key on the keyboard is released.\r\n * \r\n * Unlike the `ANY_KEY_UP` event, this one has a special dynamic event name. For example, to listen for the `A` key being released\r\n * use the following from within a Scene: `this.input.keyboard.on('keyup-A', listener)`. You can replace the `-A` part of the event\r\n * name with any valid [Key Code string]{@link Phaser.Input.Keyboard.KeyCodes}. For example, this will listen for the space bar: \r\n * `this.input.keyboard.on('keyup-SPACE', listener)`.\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n * \r\n * Finally, you can create Key objects, which you can also listen for events from. See [Keyboard.Events.UP]{@linkcode Phaser.Input.Keyboard.Events#event:UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#KEY_UP\r\n * @since 3.0.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about the key that was released, any modifiers, etc.\r\n */\r\nmodule.exports = 'keyup-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Key Up Event.\r\n * \r\n * This event is dispatched by a [Key]{@link Phaser.Input.Keyboard.Key} object when it is released.\r\n * \r\n * Listen for this event from the Key object instance directly:\r\n * \r\n * ```javascript\r\n * var spaceBar = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE);\r\n * \r\n * spaceBar.on('up', listener)\r\n * ```\r\n * \r\n * You can also create a generic 'global' listener. See [Keyboard.Events.ANY_KEY_UP]{@linkcode Phaser.Input.Keyboard.Events#event:ANY_KEY_UP} for details.\r\n *\r\n * @event Phaser.Input.Keyboard.Events#UP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object that was released.\r\n * @param {KeyboardEvent} event - The native DOM Keyboard Event. You can inspect this to learn more about any modifiers, etc.\r\n */\r\nmodule.exports = 'up';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js?")},"./node_modules/phaser/src/input/keyboard/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ANY_KEY_DOWN: __webpack_require__(/*! ./ANY_KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js"),\r\n ANY_KEY_UP: __webpack_require__(/*! ./ANY_KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js"),\r\n COMBO_MATCH: __webpack_require__(/*! ./COMBO_MATCH_EVENT */ "./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js"),\r\n DOWN: __webpack_require__(/*! ./DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js"),\r\n KEY_DOWN: __webpack_require__(/*! ./KEY_DOWN_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js"),\r\n KEY_UP: __webpack_require__(/*! ./KEY_UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js"),\r\n UP: __webpack_require__(/*! ./UP_EVENT */ "./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/events/index.js?')},"./node_modules/phaser/src/input/keyboard/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Keyboard\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/input/keyboard/events/index.js"),\r\n\r\n KeyboardManager: __webpack_require__(/*! ./KeyboardManager */ "./node_modules/phaser/src/input/keyboard/KeyboardManager.js"),\r\n KeyboardPlugin: __webpack_require__(/*! ./KeyboardPlugin */ "./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js"),\r\n\r\n Key: __webpack_require__(/*! ./keys/Key */ "./node_modules/phaser/src/input/keyboard/keys/Key.js"),\r\n KeyCodes: __webpack_require__(/*! ./keys/KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js"),\r\n\r\n KeyCombo: __webpack_require__(/*! ./combo/KeyCombo */ "./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js"),\r\n\r\n JustDown: __webpack_require__(/*! ./keys/JustDown */ "./node_modules/phaser/src/input/keyboard/keys/JustDown.js"),\r\n JustUp: __webpack_require__(/*! ./keys/JustUp */ "./node_modules/phaser/src/input/keyboard/keys/JustUp.js"),\r\n DownDuration: __webpack_require__(/*! ./keys/DownDuration */ "./node_modules/phaser/src/input/keyboard/keys/DownDuration.js"),\r\n UpDuration: __webpack_require__(/*! ./keys/UpDuration */ "./node_modules/phaser/src/input/keyboard/keys/UpDuration.js")\r\n \r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/index.js?')},"./node_modules/phaser/src/input/keyboard/keys/DownDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was pressed down within the `duration` value given, based on the current\r\n * game clock time. Or `false` if it either isn't down, or was pressed down longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.DownDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been pressed down.\r\n *\r\n * @return {boolean} `true` if the Key was pressed down within `duration` ms ago, otherwise `false`.\r\n */\r\nvar DownDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeDown;\r\n\r\n return (key.isDown && current < duration);\r\n};\r\n\r\nmodule.exports = DownDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/DownDuration.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justDown value allows you to test if this Key has just been pressed down or not.\r\n * \r\n * When you check this value it will return `true` if the Key is down, otherwise `false`.\r\n * \r\n * You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again.\r\n * This allows you to use it in situations where you want to check if this key is down without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustDown\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just down or not.\r\n *\r\n * @return {boolean} `true` if the Key was just pressed, otherwise `false`.\r\n */\r\nvar JustDown = function (key)\r\n{\r\n if (key._justDown)\r\n {\r\n key._justDown = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustDown.js?")},"./node_modules/phaser/src/input/keyboard/keys/JustUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The justUp value allows you to test if this Key has just been released or not.\r\n * \r\n * When you check this value it will return `true` if the Key is up, otherwise `false`.\r\n * \r\n * You can only call JustUp once per key release. It will only return `true` once, until the Key is pressed down and released again.\r\n * This allows you to use it in situations where you want to check if this key is up without using an event, such as in a core game loop.\r\n *\r\n * @function Phaser.Input.Keyboard.JustUp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key to check to see if it's just up or not.\r\n *\r\n * @return {boolean} `true` if the Key was just released, otherwise `false`.\r\n */\r\nvar JustUp = function (key)\r\n{\r\n if (key._justUp)\r\n {\r\n key._justUp = false;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = JustUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/JustUp.js?")},"./node_modules/phaser/src/input/keyboard/keys/Key.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/input/keyboard/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A generic Key object which can be passed to the Process functions (and so on)\r\n * keycode must be an integer\r\n *\r\n * @class Key\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Input.Keyboard\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.KeyboardPlugin} plugin - The Keyboard Plugin instance that owns this Key object.\r\n * @param {integer} keyCode - The keycode of this key.\r\n */\r\nvar Key = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Key (plugin, keyCode)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Keyboard Plugin instance that owns this Key object.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#plugin\r\n * @type {Phaser.Input.Keyboard.KeyboardPlugin}\r\n * @since 3.17.0\r\n */\r\n this.plugin = plugin;\r\n\r\n /**\r\n * The keycode of this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#keyCode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.keyCode = keyCode;\r\n\r\n /**\r\n * The original DOM event.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#originalEvent\r\n * @type {KeyboardEvent}\r\n * @since 3.0.0\r\n */\r\n this.originalEvent = undefined;\r\n\r\n /**\r\n * Can this Key be processed?\r\n *\r\n * @name Phaser.Input.Keyboard.Key#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isDown\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isDown = false;\r\n\r\n /**\r\n * The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#isUp\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isUp = true;\r\n\r\n /**\r\n * The down state of the ALT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#altKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.altKey = false;\r\n\r\n /**\r\n * The down state of the CTRL key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#ctrlKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.ctrlKey = false;\r\n\r\n /**\r\n * The down state of the SHIFT key, if pressed at the same time as this key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#shiftKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.shiftKey = false;\r\n\r\n /**\r\n * The down state of the Meta key, if pressed at the same time as this key.\r\n * On a Mac the Meta Key is the Command key. On Windows keyboards, it\'s the Windows key.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#metaKey\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.metaKey = false;\r\n\r\n /**\r\n * The location of the modifier key. 0 for standard (or unknown), 1 for left, 2 for right, 3 for numpad.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#location\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.location = 0;\r\n\r\n /**\r\n * The timestamp when the key was last pressed down.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeDown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeDown = 0;\r\n\r\n /**\r\n * The number of milliseconds this key was held down for in the previous down - up sequence.\r\n * This value isn\'t updated every game step, only when the Key changes state.\r\n * To get the current duration use the `getDuration` method.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * The timestamp when the key was last released.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#timeUp\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.timeUp = 0;\r\n\r\n /**\r\n * When a key is held down should it continuously fire the `down` event each time it repeats?\r\n * \r\n * By default it will emit the `down` event just once, but if you wish to receive the event\r\n * for each repeat as well, enable this property.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#emitOnRepeat\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.16.0\r\n */\r\n this.emitOnRepeat = false;\r\n\r\n /**\r\n * If a key is held down this holds down the number of times the key has \'repeated\'.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#repeats\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeats = 0;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justDown\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justDown = false;\r\n\r\n /**\r\n * True if the key has just been pressed (NOTE: requires to be reset, see justDown getter)\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_justUp\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._justUp = false;\r\n\r\n /**\r\n * Internal tick counter.\r\n *\r\n * @name Phaser.Input.Keyboard.Key#_tick\r\n * @type {number}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this._tick = -1;\r\n },\r\n\r\n /**\r\n * Controls if this Key will continuously emit a `down` event while being held down (true),\r\n * or emit the event just once, on first press, and then skip future events (false).\r\n *\r\n * @method Phaser.Input.Keyboard.Key#setEmitOnRepeat\r\n * @since 3.16.0\r\n * \r\n * @param {boolean} value - Emit `down` events on repeated key down actions, or just once?\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n setEmitOnRepeat: function (value)\r\n {\r\n this.emitOnRepeat = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Processes the Key Down action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onDown\r\n * @fires Phaser.Input.Keyboard.Events#DOWN\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onDown: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n\r\n this.altKey = event.altKey;\r\n this.ctrlKey = event.ctrlKey;\r\n this.shiftKey = event.shiftKey;\r\n this.metaKey = event.metaKey;\r\n this.location = event.location;\r\n \r\n this.repeats++;\r\n\r\n if (!this.isDown)\r\n {\r\n this.isDown = true;\r\n this.isUp = false;\r\n this.timeDown = event.timeStamp;\r\n this.duration = 0;\r\n this._justDown = true;\r\n this._justUp = false;\r\n\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n else if (this.emitOnRepeat)\r\n {\r\n this.emit(Events.DOWN, this, event);\r\n }\r\n },\r\n\r\n /**\r\n * Processes the Key Up action for this Key.\r\n * Called automatically by the Keyboard Plugin.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#onUp\r\n * @fires Phaser.Input.Keyboard.Events#UP\r\n * @since 3.16.0\r\n * \r\n * @param {KeyboardEvent} event - The native DOM Keyboard event.\r\n */\r\n onUp: function (event)\r\n {\r\n this.originalEvent = event;\r\n\r\n if (!this.enabled)\r\n {\r\n return;\r\n }\r\n \r\n this.isDown = false;\r\n this.isUp = true;\r\n this.timeUp = event.timeStamp;\r\n this.duration = this.timeUp - this.timeDown;\r\n this.repeats = 0;\r\n \r\n this._justDown = false;\r\n this._justUp = true;\r\n this._tick = -1;\r\n \r\n this.emit(Events.UP, this, event);\r\n },\r\n\r\n /**\r\n * Resets this Key object back to its default un-pressed state.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#reset\r\n * @since 3.6.0\r\n * \r\n * @return {Phaser.Input.Keyboard.Key} This Key instance.\r\n */\r\n reset: function ()\r\n {\r\n this.preventDefault = true;\r\n this.enabled = true;\r\n this.isDown = false;\r\n this.isUp = true;\r\n this.altKey = false;\r\n this.ctrlKey = false;\r\n this.shiftKey = false;\r\n this.metaKey = false;\r\n this.timeDown = 0;\r\n this.duration = 0;\r\n this.timeUp = 0;\r\n this.repeats = 0;\r\n this._justDown = false;\r\n this._justUp = false;\r\n this._tick = -1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the duration, in ms, that the Key has been held down for.\r\n * \r\n * If the key is not currently down it will return zero.\r\n * \r\n * The get the duration the Key was held down for in the previous up-down cycle,\r\n * use the `Key.duration` property value instead.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#getDuration\r\n * @since 3.17.0\r\n * \r\n * @return {number} The duration, in ms, that the Key has been held down for if currently down.\r\n */\r\n getDuration: function ()\r\n {\r\n if (this.isDown)\r\n {\r\n return (this.plugin.game.loop.time - this.timeDown);\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n /**\r\n * Removes any bound event handlers and removes local references.\r\n *\r\n * @method Phaser.Input.Keyboard.Key#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.originalEvent = null;\r\n\r\n this.plugin = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Key;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/Key.js?')},"./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Keyboard Codes.\r\n *\r\n * @namespace Phaser.Input.Keyboard.KeyCodes\r\n * @memberof Phaser.Input.Keyboard\r\n * @since 3.0.0\r\n */\r\n\r\nvar KeyCodes = {\r\n\r\n /**\r\n * The BACKSPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKSPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKSPACE: 8,\r\n\r\n /**\r\n * The TAB key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TAB\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TAB: 9,\r\n\r\n /**\r\n * The ENTER key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ENTER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ENTER: 13,\r\n\r\n /**\r\n * The SHIFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SHIFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHIFT: 16,\r\n\r\n /**\r\n * The CTRL key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CTRL\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CTRL: 17,\r\n\r\n /**\r\n * The ALT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ALT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ALT: 18,\r\n\r\n /**\r\n * The PAUSE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAUSE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSE: 19,\r\n\r\n /**\r\n * The CAPS_LOCK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CAPS_LOCK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CAPS_LOCK: 20,\r\n\r\n /**\r\n * The ESC key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ESC\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ESC: 27,\r\n\r\n /**\r\n * The SPACE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SPACE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SPACE: 32,\r\n\r\n /**\r\n * The PAGE_UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_UP: 33,\r\n\r\n /**\r\n * The PAGE_DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PAGE_DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAGE_DOWN: 34,\r\n\r\n /**\r\n * The END key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.END\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n END: 35,\r\n\r\n /**\r\n * The HOME key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.HOME\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOME: 36,\r\n\r\n /**\r\n * The LEFT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.LEFT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LEFT: 37,\r\n\r\n /**\r\n * The UP key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.UP\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n UP: 38,\r\n\r\n /**\r\n * The RIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.RIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RIGHT: 39,\r\n\r\n /**\r\n * The DOWN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DOWN: 40,\r\n\r\n /**\r\n * The PRINT_SCREEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PRINT_SCREEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PRINT_SCREEN: 42,\r\n\r\n /**\r\n * The INSERT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.INSERT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INSERT: 45,\r\n\r\n /**\r\n * The DELETE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.DELETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELETE: 46,\r\n\r\n /**\r\n * The ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ZERO: 48,\r\n\r\n /**\r\n * The ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ONE: 49,\r\n\r\n /**\r\n * The TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n TWO: 50,\r\n\r\n /**\r\n * The THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n THREE: 51,\r\n\r\n /**\r\n * The FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FOUR: 52,\r\n\r\n /**\r\n * The FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FIVE: 53,\r\n\r\n /**\r\n * The SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SIX: 54,\r\n\r\n /**\r\n * The SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEVEN: 55,\r\n\r\n /**\r\n * The EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n EIGHT: 56,\r\n\r\n /**\r\n * The NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NINE: 57,\r\n\r\n /**\r\n * The NUMPAD_ZERO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ZERO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ZERO: 96,\r\n\r\n /**\r\n * The NUMPAD_ONE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_ONE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_ONE: 97,\r\n\r\n /**\r\n * The NUMPAD_TWO key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_TWO\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_TWO: 98,\r\n\r\n /**\r\n * The NUMPAD_THREE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_THREE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_THREE: 99,\r\n\r\n /**\r\n * The NUMPAD_FOUR key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FOUR\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FOUR: 100,\r\n\r\n /**\r\n * The NUMPAD_FIVE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_FIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_FIVE: 101,\r\n\r\n /**\r\n * The NUMPAD_SIX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SIX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SIX: 102,\r\n\r\n /**\r\n * The NUMPAD_SEVEN key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_SEVEN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_SEVEN: 103,\r\n\r\n /**\r\n * The NUMPAD_EIGHT key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_EIGHT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_EIGHT: 104,\r\n\r\n /**\r\n * The NUMPAD_NINE key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.NUMPAD_NINE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n NUMPAD_NINE: 105,\r\n\r\n /**\r\n * The A key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.A\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n A: 65,\r\n\r\n /**\r\n * The B key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.B\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n B: 66,\r\n\r\n /**\r\n * The C key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.C\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n C: 67,\r\n\r\n /**\r\n * The D key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.D\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n D: 68,\r\n\r\n /**\r\n * The E key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.E\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n E: 69,\r\n\r\n /**\r\n * The F key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F: 70,\r\n\r\n /**\r\n * The G key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.G\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n G: 71,\r\n\r\n /**\r\n * The H key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.H\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n H: 72,\r\n\r\n /**\r\n * The I key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.I\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n I: 73,\r\n\r\n /**\r\n * The J key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.J\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n J: 74,\r\n\r\n /**\r\n * The K key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.K\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n K: 75,\r\n\r\n /**\r\n * The L key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.L\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n L: 76,\r\n\r\n /**\r\n * The M key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.M\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n M: 77,\r\n\r\n /**\r\n * The N key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.N\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n N: 78,\r\n\r\n /**\r\n * The O key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.O\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n O: 79,\r\n\r\n /**\r\n * The P key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.P\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n P: 80,\r\n\r\n /**\r\n * The Q key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Q\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Q: 81,\r\n\r\n /**\r\n * The R key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.R\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n R: 82,\r\n\r\n /**\r\n * The S key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.S\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n S: 83,\r\n\r\n /**\r\n * The T key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.T\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n T: 84,\r\n\r\n /**\r\n * The U key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.U\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n U: 85,\r\n\r\n /**\r\n * The V key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.V\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n V: 86,\r\n\r\n /**\r\n * The W key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.W\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n W: 87,\r\n\r\n /**\r\n * The X key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.X\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n X: 88,\r\n\r\n /**\r\n * The Y key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Y: 89,\r\n\r\n /**\r\n * The Z key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.Z\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n Z: 90,\r\n\r\n /**\r\n * The F1 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F1\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F1: 112,\r\n\r\n /**\r\n * The F2 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F2\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F2: 113,\r\n\r\n /**\r\n * The F3 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F3\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F3: 114,\r\n\r\n /**\r\n * The F4 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F4\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F4: 115,\r\n\r\n /**\r\n * The F5 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F5\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F5: 116,\r\n\r\n /**\r\n * The F6 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F6\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F6: 117,\r\n\r\n /**\r\n * The F7 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F7\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F7: 118,\r\n\r\n /**\r\n * The F8 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F8\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F8: 119,\r\n\r\n /**\r\n * The F9 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F9\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F9: 120,\r\n\r\n /**\r\n * The F10 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F10\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F10: 121,\r\n\r\n /**\r\n * The F11 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F11\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F11: 122,\r\n\r\n /**\r\n * The F12 key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.F12\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n F12: 123,\r\n\r\n /**\r\n * The SEMICOLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON: 186,\r\n\r\n /**\r\n * The PLUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PLUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLUS: 187,\r\n\r\n /**\r\n * The COMMA key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA: 188,\r\n\r\n /**\r\n * The MINUS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.MINUS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n MINUS: 189,\r\n\r\n /**\r\n * The PERIOD key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.PERIOD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PERIOD: 190,\r\n\r\n /**\r\n * The FORWARD_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.FORWARD_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FORWARD_SLASH: 191,\r\n\r\n /**\r\n * The BACK_SLASH key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACK_SLASH\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACK_SLASH: 220,\r\n\r\n /**\r\n * The QUOTES key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.QUOTES\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n QUOTES: 222,\r\n\r\n /**\r\n * The BACKTICK key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BACKTICK\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BACKTICK: 192,\r\n\r\n /**\r\n * The OPEN_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.OPEN_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OPEN_BRACKET: 219,\r\n\r\n /**\r\n * The CLOSED_BRACKET key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.CLOSED_BRACKET\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CLOSED_BRACKET: 221,\r\n\r\n /**\r\n * The SEMICOLON_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.SEMICOLON_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SEMICOLON_FIREFOX: 59,\r\n\r\n /**\r\n * The COLON key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COLON\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COLON: 58,\r\n\r\n /**\r\n * The COMMA_FIREFOX_WINDOWS key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX_WINDOWS\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX_WINDOWS: 60,\r\n\r\n /**\r\n * The COMMA_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.COMMA_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMMA_FIREFOX: 62,\r\n\r\n /**\r\n * The BRACKET_RIGHT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_RIGHT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_RIGHT_FIREFOX: 174,\r\n\r\n /**\r\n * The BRACKET_LEFT_FIREFOX key.\r\n * \r\n * @name Phaser.Input.Keyboard.KeyCodes.BRACKET_LEFT_FIREFOX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n BRACKET_LEFT_FIREFOX: 175\r\n};\r\n\r\nmodule.exports = KeyCodes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js?")},"./node_modules/phaser/src/input/keyboard/keys/KeyMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar KeyCodes = __webpack_require__(/*! ./KeyCodes */ "./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js");\r\n\r\nvar KeyMap = {};\r\n\r\nfor (var key in KeyCodes)\r\n{\r\n KeyMap[KeyCodes[key]] = key;\r\n}\r\n\r\nmodule.exports = KeyMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/KeyMap.js?')},"./node_modules/phaser/src/input/keyboard/keys/UpDuration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns `true` if the Key was released within the `duration` value given, based on the current\r\n * game clock time. Or returns `false` if it either isn't up, or was released longer ago than the given duration.\r\n *\r\n * @function Phaser.Input.Keyboard.UpDuration\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Keyboard.Key} key - The Key object to test.\r\n * @param {integer} [duration=50] - The duration, in ms, within which the key must have been released.\r\n *\r\n * @return {boolean} `true` if the Key was released within `duration` ms ago, otherwise `false`.\r\n */\r\nvar UpDuration = function (key, duration)\r\n{\r\n if (duration === undefined) { duration = 50; }\r\n\r\n var current = key.plugin.game.loop.time - key.timeUp;\r\n\r\n return (key.isUp && current < duration);\r\n};\r\n\r\nmodule.exports = UpDuration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/keyboard/keys/UpDuration.js?")},"./node_modules/phaser/src/input/mouse/MouseManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Features = __webpack_require__(/*! ../../device/Features */ \"./node_modules/phaser/src/device/Features.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent\r\n// https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n\r\n/**\r\n * @classdesc\r\n * The Mouse Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Mouse Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class MouseManager\r\n * @memberof Phaser.Input.Mouse\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar MouseManager = new Class({\r\n\r\n initialize:\r\n\r\n function MouseManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Mouse Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * If the mouse has been pointer locked successfully this will be set to true.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#locked\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.locked = false;\r\n\r\n /**\r\n * The Mouse Move Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseMove\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseMove = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDown\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseDown = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUp\r\n * @type {function}\r\n * @since 3.10.0\r\n */\r\n this.onMouseUp = NOOP;\r\n\r\n /**\r\n * The Mouse Down Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseDownWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseDownWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Up Event handler specifically for events on the Window.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseUpWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onMouseUpWindow = NOOP;\r\n\r\n /**\r\n * The Mouse Over Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOver = NOOP;\r\n\r\n /**\r\n * The Mouse Out Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onMouseOut = NOOP;\r\n\r\n /**\r\n * The Mouse Wheel Event handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#onMouseWheel\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onMouseWheel = NOOP;\r\n\r\n /**\r\n * Internal pointerLockChange handler.\r\n * This function is sent the native DOM MouseEvent.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Mouse.MouseManager#pointerLockChange\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.pointerLockChange = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputMouse;\r\n this.target = config.inputMouseEventTarget;\r\n this.capture = config.inputMouseCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (config.disableContextMenu)\r\n {\r\n this.disableContextMenu();\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to disable the context menu from appearing if you right-click on the browser.\r\n * \r\n * Works by listening for the `contextmenu` event and prevent defaulting it.\r\n * \r\n * Use this if you need to enable right-button mouse support in your game, and the browser\r\n * menu keeps getting in the way.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#disableContextMenu\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance.\r\n */\r\n disableContextMenu: function ()\r\n {\r\n document.body.addEventListener('contextmenu', function (event)\r\n {\r\n event.preventDefault();\r\n return false;\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * If the browser supports it, you can request that the pointer be locked to the browser window.\r\n *\r\n * This is classically known as 'FPS controls', where the pointer can't leave the browser until\r\n * the user presses an exit key.\r\n *\r\n * If the browser successfully enters a locked state, a `POINTER_LOCK_CHANGE_EVENT` will be dispatched,\r\n * from the games Input Manager, with an `isPointerLocked` property.\r\n *\r\n * It is important to note that pointer lock can only be enabled after an 'engagement gesture',\r\n * see: https://w3c.github.io/pointerlock/#dfn-engagement-gesture.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#requestPointerLock\r\n * @since 3.0.0\r\n */\r\n requestPointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n var element = this.target;\r\n\r\n element.requestPointerLock = element.requestPointerLock || element.mozRequestPointerLock || element.webkitRequestPointerLock;\r\n\r\n element.requestPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * If the browser supports pointer lock, this will request that the pointer lock is released. If\r\n * the browser successfully enters a locked state, a 'POINTER_LOCK_CHANGE_EVENT' will be\r\n * dispatched - from the game's input manager - with an `isPointerLocked` property.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#releasePointerLock\r\n * @since 3.0.0\r\n */\r\n releasePointerLock: function ()\r\n {\r\n if (Features.pointerLock)\r\n {\r\n document.exitPointerLock = document.exitPointerLock || document.mozExitPointerLock || document.webkitExitPointerLock;\r\n document.exitPointerLock();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Mouse Event listeners running.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onMouseMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDown = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseDown(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseDownWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseDown(event);\r\n }\r\n };\r\n\r\n this.onMouseUp = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseUp(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onMouseUpWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onMouseUp(event);\r\n }\r\n };\r\n\r\n this.onMouseOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onMouseOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n this.onMouseWheel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onMouseWheel(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('mousemove', this.onMouseMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mousedown', this.onMouseDown, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseup', this.onMouseUp, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseover', this.onMouseOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('mouseout', this.onMouseOut, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('wheel', this.onMouseWheel, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('mousedown', this.onMouseDownWindow, nonPassive);\r\n window.addEventListener('mouseup', this.onMouseUpWindow, nonPassive);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n this.pointerLockChange = function (event)\r\n {\r\n var element = _this.target;\r\n\r\n _this.locked = (document.pointerLockElement === element || document.mozPointerLockElement === element || document.webkitPointerLockElement === element) ? true : false;\r\n\r\n _this.manager.onPointerLockChange(event);\r\n };\r\n\r\n document.addEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.addEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Mouse Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('mousemove', this.onMouseMove);\r\n target.removeEventListener('mousedown', this.onMouseDown);\r\n target.removeEventListener('mouseup', this.onMouseUp);\r\n target.removeEventListener('mouseover', this.onMouseOver);\r\n target.removeEventListener('mouseout', this.onMouseOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('mousedown', this.onMouseDownWindow);\r\n window.removeEventListener('mouseup', this.onMouseUpWindow);\r\n }\r\n\r\n if (Features.pointerLock)\r\n {\r\n document.removeEventListener('pointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('mozpointerlockchange', this.pointerLockChange, true);\r\n document.removeEventListener('webkitpointerlockchange', this.pointerLockChange, true);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Mouse Manager instance.\r\n *\r\n * @method Phaser.Input.Mouse.MouseManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MouseManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/MouseManager.js?")},"./node_modules/phaser/src/input/mouse/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Mouse\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n MouseManager: __webpack_require__(/*! ./MouseManager */ "./node_modules/phaser/src/input/mouse/MouseManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/mouse/index.js?')},"./node_modules/phaser/src/input/touch/TouchManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar InputEvents = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/input/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n// https://developer.mozilla.org/en-US/docs/Web/API/Touch_events\r\n// https://patrickhlauke.github.io/touch/tests/results/\r\n// https://www.html5rocks.com/en/mobile/touch/\r\n\r\n/**\r\n * @classdesc\r\n * The Touch Manager is a helper class that belongs to the Input Manager.\r\n * \r\n * Its role is to listen for native DOM Touch Events and then pass them onto the Input Manager for further processing.\r\n * \r\n * You do not need to create this class directly, the Input Manager will create an instance of it automatically.\r\n *\r\n * @class TouchManager\r\n * @memberof Phaser.Input.Touch\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.InputManager} inputManager - A reference to the Input Manager.\r\n */\r\nvar TouchManager = new Class({\r\n\r\n initialize:\r\n\r\n function TouchManager (inputManager)\r\n {\r\n /**\r\n * A reference to the Input Manager.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#manager\r\n * @type {Phaser.Input.InputManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = inputManager;\r\n\r\n /**\r\n * If true the DOM events will have event.preventDefault applied to them, if false they will propagate fully.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#capture\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.capture = true;\r\n\r\n /**\r\n * A boolean that controls if the Touch Manager is enabled or not.\r\n * Can be toggled on the fly.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#enabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.enabled = false;\r\n\r\n /**\r\n * The Touch Event target, as defined in the Game Config.\r\n * Typically the canvas to which the game is rendering, but can be any interactive DOM element.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#target\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.target;\r\n\r\n /**\r\n * The Touch Start event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStart\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchStart = NOOP;\r\n\r\n /**\r\n * The Touch Start event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchStartWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchStartWindow = NOOP;\r\n\r\n /**\r\n * The Touch Move event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchMove\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchMove = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEnd\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.onTouchEnd = NOOP;\r\n\r\n /**\r\n * The Touch End event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchEndWindow\r\n * @type {function}\r\n * @since 3.17.0\r\n */\r\n this.onTouchEndWindow = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancel\r\n * @type {function}\r\n * @since 3.15.0\r\n */\r\n this.onTouchCancel = NOOP;\r\n\r\n /**\r\n * The Touch Cancel event handler function specifically for events on the Window.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchCancelWindow\r\n * @type {function}\r\n * @since 3.18.0\r\n */\r\n this.onTouchCancelWindow = NOOP;\r\n\r\n /**\r\n * The Touch Over event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOver\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOver = NOOP;\r\n\r\n /**\r\n * The Touch Out event handler function.\r\n * Initially empty and bound in the `startListeners` method.\r\n *\r\n * @name Phaser.Input.Touch.TouchManager#onTouchOut\r\n * @type {function}\r\n * @since 3.16.0\r\n */\r\n this.onTouchOut = NOOP;\r\n\r\n inputManager.events.once(InputEvents.MANAGER_BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Touch Manager boot process.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var config = this.manager.config;\r\n\r\n this.enabled = config.inputTouch;\r\n this.target = config.inputTouchEventTarget;\r\n this.capture = config.inputTouchCapture;\r\n\r\n if (!this.target)\r\n {\r\n this.target = this.manager.game.canvas;\r\n }\r\n\r\n if (this.enabled && this.target)\r\n {\r\n this.startListeners();\r\n }\r\n },\r\n\r\n /**\r\n * Starts the Touch Event listeners running as long as an input target is set.\r\n * \r\n * This method is called automatically if Touch Input is enabled in the game config,\r\n * which it is by default. However, you can call it manually should you need to\r\n * delay input capturing until later in the game.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#startListeners\r\n * @since 3.0.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var canvas = this.manager.canvas;\r\n var autoFocus = (window && window.focus && this.manager.game.config.autoFocus);\r\n\r\n this.onTouchStart = function (event)\r\n {\r\n if (autoFocus)\r\n {\r\n window.focus();\r\n }\r\n\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchStart(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchStartWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchStart(event);\r\n }\r\n };\r\n\r\n this.onTouchMove = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchMove(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEnd = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchEnd(event);\r\n \r\n if (_this.capture && event.target === canvas)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchEndWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled && event.target !== canvas)\r\n {\r\n // Only process the event if the target isn't the canvas\r\n _this.manager.onTouchEnd(event);\r\n }\r\n };\r\n\r\n this.onTouchCancel = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n \r\n if (_this.capture)\r\n {\r\n event.preventDefault();\r\n }\r\n }\r\n };\r\n\r\n this.onTouchCancelWindow = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.onTouchCancel(event);\r\n }\r\n };\r\n\r\n this.onTouchOver = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOver(event);\r\n }\r\n };\r\n\r\n this.onTouchOut = function (event)\r\n {\r\n if (!event.defaultPrevented && _this.enabled && _this.manager && _this.manager.enabled)\r\n {\r\n _this.manager.setCanvasOut(event);\r\n }\r\n };\r\n\r\n var target = this.target;\r\n\r\n if (!target)\r\n {\r\n return;\r\n }\r\n\r\n var passive = { passive: true };\r\n var nonPassive = { passive: false };\r\n\r\n target.addEventListener('touchstart', this.onTouchStart, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchmove', this.onTouchMove, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchend', this.onTouchEnd, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchcancel', this.onTouchCancel, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchover', this.onTouchOver, (this.capture) ? nonPassive : passive);\r\n target.addEventListener('touchout', this.onTouchOut, (this.capture) ? nonPassive : passive);\r\n\r\n if (window && this.manager.game.config.inputWindowEvents)\r\n {\r\n window.addEventListener('touchstart', this.onTouchStartWindow, nonPassive);\r\n window.addEventListener('touchend', this.onTouchEndWindow, nonPassive);\r\n window.addEventListener('touchcancel', this.onTouchCancelWindow, nonPassive);\r\n }\r\n\r\n this.enabled = true;\r\n },\r\n\r\n /**\r\n * Stops the Touch Event listeners.\r\n * This is called automatically and does not need to be manually invoked.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#stopListeners\r\n * @since 3.0.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var target = this.target;\r\n\r\n target.removeEventListener('touchstart', this.onTouchStart);\r\n target.removeEventListener('touchmove', this.onTouchMove);\r\n target.removeEventListener('touchend', this.onTouchEnd);\r\n target.removeEventListener('touchcancel', this.onTouchCancel);\r\n target.removeEventListener('touchover', this.onTouchOver);\r\n target.removeEventListener('touchout', this.onTouchOut);\r\n\r\n if (window)\r\n {\r\n window.removeEventListener('touchstart', this.onTouchStartWindow);\r\n window.removeEventListener('touchend', this.onTouchEndWindow);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Touch Manager instance.\r\n *\r\n * @method Phaser.Input.Touch.TouchManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.stopListeners();\r\n\r\n this.target = null;\r\n this.enabled = false;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TouchManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/TouchManager.js?")},"./node_modules/phaser/src/input/touch/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Input.Touch\r\n */\r\n\r\n/* eslint-disable */\r\nmodule.exports = {\r\n\r\n TouchManager: __webpack_require__(/*! ./TouchManager */ "./node_modules/phaser/src/input/touch/TouchManager.js")\r\n \r\n};\r\n/* eslint-enable */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/input/touch/index.js?')},"./node_modules/phaser/src/loader/File.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ./GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\nvar XHRLoader = __webpack_require__(/*! ./XHRLoader */ \"./node_modules/phaser/src/loader/XHRLoader.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The base File class used by all File Types that the Loader can support.\r\n * You shouldn't create an instance of a File directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class File\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {Phaser.Types.Loader.FileConfig} fileConfig - The file configuration object, as created by the file type.\r\n */\r\nvar File = new Class({\r\n\r\n initialize:\r\n\r\n function File (loader, fileConfig)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.File#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * A reference to the Cache, or Texture Manager, that is going to store this file if it loads.\r\n *\r\n * @name Phaser.Loader.File#cache\r\n * @type {(Phaser.Cache.BaseCache|Phaser.Textures.TextureManager)}\r\n * @since 3.7.0\r\n */\r\n this.cache = GetFastValue(fileConfig, 'cache', false);\r\n\r\n /**\r\n * The file type string (image, json, etc) for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.File#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(fileConfig, 'type', false);\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.File#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = GetFastValue(fileConfig, 'key', false);\r\n\r\n var loadKey = this.key;\r\n\r\n if (loader.prefix && loader.prefix !== '')\r\n {\r\n this.key = loader.prefix + loadKey;\r\n }\r\n\r\n if (!this.type || !this.key)\r\n {\r\n throw new Error('Error calling \\'Loader.' + this.type + '\\' invalid key provided.');\r\n }\r\n\r\n /**\r\n * The URL of the file, not including baseURL.\r\n * Automatically has Loader.path prepended to it.\r\n *\r\n * @name Phaser.Loader.File#url\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.url = GetFastValue(fileConfig, 'url');\r\n\r\n if (this.url === undefined)\r\n {\r\n this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', '');\r\n }\r\n else if (typeof(this.url) !== 'function')\r\n {\r\n this.url = loader.path + this.url;\r\n }\r\n\r\n /**\r\n * The final URL this file will load from, including baseURL and path.\r\n * Set automatically when the Loader calls 'load' on this file.\r\n *\r\n * @name Phaser.Loader.File#src\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.src = '';\r\n\r\n /**\r\n * The merged XHRSettings for this file.\r\n *\r\n * @name Phaser.Loader.File#xhrSettings\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhrSettings = XHRSettings(GetFastValue(fileConfig, 'responseType', undefined));\r\n\r\n if (GetFastValue(fileConfig, 'xhrSettings', false))\r\n {\r\n this.xhrSettings = MergeXHRSettings(this.xhrSettings, GetFastValue(fileConfig, 'xhrSettings', {}));\r\n }\r\n\r\n /**\r\n * The XMLHttpRequest instance (as created by XHR Loader) that is loading this File.\r\n *\r\n * @name Phaser.Loader.File#xhrLoader\r\n * @type {?XMLHttpRequest}\r\n * @since 3.0.0\r\n */\r\n this.xhrLoader = null;\r\n\r\n /**\r\n * The current state of the file. One of the FILE_CONST values.\r\n *\r\n * @name Phaser.Loader.File#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = (typeof(this.url) === 'function') ? CONST.FILE_POPULATED : CONST.FILE_PENDING;\r\n\r\n /**\r\n * The total size of this file.\r\n * Set by onProgress and only if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesTotal\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.bytesTotal = 0;\r\n\r\n /**\r\n * Updated as the file loads.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#bytesLoaded\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.bytesLoaded = -1;\r\n\r\n /**\r\n * A percentage value between 0 and 1 indicating how much of this file has loaded.\r\n * Only set if loading via XHR.\r\n *\r\n * @name Phaser.Loader.File#percentComplete\r\n * @type {number}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.percentComplete = -1;\r\n\r\n /**\r\n * For CORs based loading.\r\n * If this is undefined then the File will check BaseLoader.crossOrigin and use that (if set)\r\n *\r\n * @name Phaser.Loader.File#crossOrigin\r\n * @type {(string|undefined)}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = undefined;\r\n\r\n /**\r\n * The processed file data, stored here after the file has loaded.\r\n *\r\n * @name Phaser.Loader.File#data\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.data = undefined;\r\n\r\n /**\r\n * A config object that can be used by file types to store transitional data.\r\n *\r\n * @name Phaser.Loader.File#config\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.config = GetFastValue(fileConfig, 'config', {});\r\n\r\n /**\r\n * If this is a multipart file, i.e. an atlas and its json together, then this is a reference\r\n * to the parent MultiFile. Set and used internally by the Loader or specific file types.\r\n *\r\n * @name Phaser.Loader.File#multiFile\r\n * @type {?Phaser.Loader.MultiFile}\r\n * @since 3.7.0\r\n */\r\n this.multiFile;\r\n\r\n /**\r\n * Does this file have an associated linked file? Such as an image and a normal map.\r\n * Atlases and Bitmap Fonts use the multiFile, because those files need loading together but aren't\r\n * actually bound by data, where-as a linkFile is.\r\n *\r\n * @name Phaser.Loader.File#linkFile\r\n * @type {?Phaser.Loader.File}\r\n * @since 3.7.0\r\n */\r\n this.linkFile;\r\n },\r\n\r\n /**\r\n * Links this File with another, so they depend upon each other for loading and processing.\r\n *\r\n * @method Phaser.Loader.File#setLink\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} fileB - The file to link to this one.\r\n */\r\n setLink: function (fileB)\r\n {\r\n this.linkFile = fileB;\r\n\r\n fileB.linkFile = this;\r\n },\r\n\r\n /**\r\n * Resets the XHRLoader instance this file is using.\r\n *\r\n * @method Phaser.Loader.File#resetXHR\r\n * @since 3.0.0\r\n */\r\n resetXHR: function ()\r\n {\r\n if (this.xhrLoader)\r\n {\r\n this.xhrLoader.onload = undefined;\r\n this.xhrLoader.onerror = undefined;\r\n this.xhrLoader.onprogress = undefined;\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.File#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n // Can happen for example in a JSONFile if they've provided a JSON object instead of a URL\r\n this.loader.nextFile(this, true);\r\n }\r\n else\r\n {\r\n this.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (this.src.indexOf('data:') === 0)\r\n {\r\n console.warn('Local data URIs are not supported: ' + this.key);\r\n }\r\n else\r\n {\r\n // The creation of this XHRLoader starts the load process going.\r\n // It will automatically call the following, based on the load outcome:\r\n // \r\n // xhr.onload = this.onLoad\r\n // xhr.onerror = this.onError\r\n // xhr.onprogress = this.onProgress\r\n\r\n this.xhrLoader = XHRLoader(this, this.loader.xhr);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onLoad\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this load.\r\n */\r\n onLoad: function (xhr, event)\r\n {\r\n var localFileOk = ((xhr.responseURL && xhr.responseURL.indexOf('file://') === 0 && event.target.status === 0));\r\n\r\n var success = !(event.target && event.target.status !== 200) || localFileOk;\r\n\r\n // Handle HTTP status codes of 4xx and 5xx as errors, even if xhr.onerror was not called.\r\n if (xhr.readyState === 4 && xhr.status >= 400 && xhr.status <= 599)\r\n {\r\n success = false;\r\n }\r\n\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, success);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading, is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onError\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequest} xhr - The XMLHttpRequest that caused this onload event.\r\n * @param {ProgressEvent} event - The DOM ProgressEvent that resulted from this error.\r\n */\r\n onError: function ()\r\n {\r\n this.resetXHR();\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.File#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n *\r\n * @param {ProgressEvent} event - The DOM ProgressEvent.\r\n */\r\n onProgress: function (event)\r\n {\r\n if (event.lengthComputable)\r\n {\r\n this.bytesLoaded = event.loaded;\r\n this.bytesTotal = event.total;\r\n\r\n this.percentComplete = Math.min((this.bytesLoaded / this.bytesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Usually overridden by the FileTypes and is called by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data, for example a JSON file will parse itself during this stage.\r\n *\r\n * @method Phaser.Loader.File#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessComplete\r\n * @since 3.7.0\r\n */\r\n onProcessComplete: function ()\r\n {\r\n this.state = CONST.FILE_COMPLETE;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileComplete(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Called when the File has completed processing but it generated an error.\r\n * Checks on the state of its multifile, if set.\r\n *\r\n * @method Phaser.Loader.File#onProcessError\r\n * @since 3.7.0\r\n */\r\n onProcessError: function ()\r\n {\r\n this.state = CONST.FILE_ERRORED;\r\n\r\n if (this.multiFile)\r\n {\r\n this.multiFile.onFileFailed(this);\r\n }\r\n\r\n this.loader.fileProcessComplete(this);\r\n },\r\n\r\n /**\r\n * Checks if a key matching the one used by this file exists in the target Cache or not.\r\n * This is called automatically by the LoaderPlugin to decide if the file can be safely\r\n * loaded or will conflict.\r\n *\r\n * @method Phaser.Loader.File#hasCacheConflict\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if adding this file will cause a conflict, otherwise `false`.\r\n */\r\n hasCacheConflict: function ()\r\n {\r\n return (this.cache && this.cache.exists(this.key));\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n * This method is often overridden by specific file types.\r\n *\r\n * @method Phaser.Loader.File#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.cache)\r\n {\r\n this.cache.add(this.key, this.data);\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Called once the file has been added to its cache and is now ready for deletion from the Loader.\r\n * It will emit a `filecomplete` event from the LoaderPlugin.\r\n *\r\n * @method Phaser.Loader.File#pendingDestroy\r\n * @fires Phaser.Loader.Events#FILE_COMPLETE\r\n * @fires Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.7.0\r\n */\r\n pendingDestroy: function (data)\r\n {\r\n if (data === undefined) { data = this.data; }\r\n\r\n var key = this.key;\r\n var type = this.type;\r\n\r\n this.loader.emit(Events.FILE_COMPLETE, key, type, data);\r\n this.loader.emit(Events.FILE_KEY_COMPLETE + type + '-' + key, key, type, data);\r\n\r\n this.loader.flagForRemoval(this);\r\n },\r\n\r\n /**\r\n * Destroy this File and any references it holds.\r\n *\r\n * @method Phaser.Loader.File#destroy\r\n * @since 3.7.0\r\n */\r\n destroy: function ()\r\n {\r\n this.loader = null;\r\n this.cache = null;\r\n this.xhrSettings = null;\r\n this.multiFile = null;\r\n this.linkFile = null;\r\n this.data = null;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Static method for creating object URL using URL API and setting it as image 'src' attribute.\r\n * If URL API is not supported (usually on old browsers) it falls back to creating Base64 encoded url using FileReader.\r\n *\r\n * @method Phaser.Loader.File.createObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be set to object URL.\r\n * @param {Blob} blob - A Blob object to create an object URL for.\r\n * @param {string} defaultType - Default mime type used if blob type is not available.\r\n */\r\nFile.createObjectURL = function (image, blob, defaultType)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n image.src = URL.createObjectURL(blob);\r\n }\r\n else\r\n {\r\n var reader = new FileReader();\r\n\r\n reader.onload = function ()\r\n {\r\n image.removeAttribute('crossOrigin');\r\n image.src = 'data:' + (blob.type || defaultType) + ';base64,' + reader.result.split(',')[1];\r\n };\r\n\r\n reader.onerror = image.onerror;\r\n\r\n reader.readAsDataURL(blob);\r\n }\r\n};\r\n\r\n/**\r\n * Static method for releasing an existing object URL which was previously created\r\n * by calling {@link File#createObjectURL} method.\r\n *\r\n * @method Phaser.Loader.File.revokeObjectURL\r\n * @static\r\n * @since 3.7.0\r\n * \r\n * @param {HTMLImageElement} image - Image object which 'src' attribute should be revoked.\r\n */\r\nFile.revokeObjectURL = function (image)\r\n{\r\n if (typeof URL === 'function')\r\n {\r\n URL.revokeObjectURL(image.src);\r\n }\r\n};\r\n\r\nmodule.exports = File;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/File.js?")},"./node_modules/phaser/src/loader/FileTypesManager.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar types = {};\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypesManager\r\n */\r\n\r\nvar FileTypesManager = {\r\n\r\n /**\r\n * Static method called when a LoaderPlugin is created.\r\n * \r\n * Loops through the local types object and injects all of them as\r\n * properties into the LoaderPlugin instance.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.install\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - The LoaderPlugin to install the types into.\r\n */\r\n install: function (loader)\r\n {\r\n for (var key in types)\r\n {\r\n loader[key] = types[key];\r\n }\r\n },\r\n\r\n /**\r\n * Static method called directly by the File Types.\r\n * \r\n * The key is a reference to the function used to load the files via the Loader, i.e. `image`.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.register\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key that will be used as the method name in the LoaderPlugin.\r\n * @param {function} factoryFunction - The function that will be called when LoaderPlugin.key is invoked.\r\n */\r\n register: function (key, factoryFunction)\r\n {\r\n types[key] = factoryFunction;\r\n },\r\n\r\n /**\r\n * Removed all associated file types.\r\n *\r\n * @method Phaser.Loader.FileTypesManager.destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n types = {};\r\n }\r\n\r\n};\r\n\r\nmodule.exports = FileTypesManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/FileTypesManager.js?")},"./node_modules/phaser/src/loader/GetURL.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Given a File and a baseURL value this returns the URL the File will use to download from.\r\n *\r\n * @function Phaser.Loader.GetURL\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File object.\r\n * @param {string} baseURL - A default base URL.\r\n *\r\n * @return {string} The URL the File will use.\r\n */\r\nvar GetURL = function (file, baseURL)\r\n{\r\n if (!file.url)\r\n {\r\n return false;\r\n }\r\n\r\n if (file.url.match(/^(?:blob:|data:|http:\\/\\/|https:\\/\\/|\\/\\/)/))\r\n {\r\n return file.url;\r\n }\r\n else\r\n {\r\n return baseURL + file.url;\r\n }\r\n};\r\n\r\nmodule.exports = GetURL;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/GetURL.js?")},"./node_modules/phaser/src/loader/LoaderPlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar CustomSet = __webpack_require__(/*! ../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ./FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ \"./node_modules/phaser/src/loader/XHRSettings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.\r\n * You typically interact with it via `this.load` in your Scene. Scenes can have a `preload` method, which is always\r\n * called before the Scenes `create` method, allowing you to preload assets that the Scene may need.\r\n *\r\n * If you call any `this.load` methods from outside of `Scene.preload` then you need to start the Loader going\r\n * yourself by calling `Loader.start()`. It's only automatically started during the Scene preload.\r\n *\r\n * The Loader uses a combination of tag loading (eg. Audio elements) and XHR and provides progress and completion events.\r\n * Files are loaded in parallel by default. The amount of concurrent connections can be controlled in your Game Configuration.\r\n *\r\n * Once the Loader has started loading you are still able to add files to it. These can be injected as a result of a loader\r\n * event, the type of file being loaded (such as a pack file) or other external events. As long as the Loader hasn't finished\r\n * simply adding a new file to it, while running, will ensure it's added into the current queue.\r\n *\r\n * Every Scene has its own instance of the Loader and they are bound to the Scene in which they are created. However,\r\n * assets loaded by the Loader are placed into global game-level caches. For example, loading an XML file will place that\r\n * file inside `Game.cache.xml`, which is accessible from every Scene in your game, no matter who was responsible\r\n * for loading it. The same is true of Textures. A texture loaded in one Scene is instantly available to all other Scenes\r\n * in your game.\r\n *\r\n * The Loader works by using custom File Types. These are stored in the FileTypesManager, which injects them into the Loader\r\n * when it's instantiated. You can create your own custom file types by extending either the File or MultiFile classes.\r\n * See those files for more details.\r\n *\r\n * @class LoaderPlugin\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Loader instance.\r\n */\r\nvar LoaderPlugin = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function LoaderPlugin (scene)\r\n {\r\n EventEmitter.call(this);\r\n\r\n var gameConfig = scene.sys.game.config;\r\n var sceneConfig = scene.sys.settings.loader;\r\n\r\n /**\r\n * The Scene which owns this Loader instance.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Scene Systems.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * A reference to the global Cache Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#cacheManager\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.7.0\r\n */\r\n this.cacheManager = scene.sys.cache;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#textureManager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.7.0\r\n */\r\n this.textureManager = scene.sys.textures;\r\n\r\n /**\r\n * A reference to the global Scene Manager.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#sceneManager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @protected\r\n * @since 3.16.0\r\n */\r\n this.sceneManager = scene.sys.game.scene;\r\n\r\n // Inject the available filetypes into the Loader\r\n FileTypesManager.install(this);\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * You can set this directly, or call `Loader.setPrefix()`. It will then affect every file added to the Loader\r\n * from that point on. It does _not_ change any file already in the load queue.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#prefix\r\n * @type {string}\r\n * @default ''\r\n * @since 3.7.0\r\n */\r\n this.prefix = '';\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.path = \"images/sprites/\";\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n *\r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setPath()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#path\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.path = '';\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * If you set this property directly then it _must_ end with a \"/\". Alternatively, call `setBaseURL()` and it'll do it for you.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#baseURL\r\n * @type {string}\r\n * @default ''\r\n * @since 3.0.0\r\n */\r\n this.baseURL = '';\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n /**\r\n * The number of concurrent / parallel resources to try and fetch at once.\r\n *\r\n * Old browsers limit 6 requests per domain; modern ones, especially those with HTTP/2 don't limit it at all.\r\n *\r\n * The default is 32 but you can change this in your Game Config, or by changing this property before the Loader starts.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#maxParallelDownloads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxParallelDownloads = GetFastValue(sceneConfig, 'maxParallelDownloads', gameConfig.loaderMaxParallelDownloads);\r\n\r\n /**\r\n * xhr specific global settings (can be overridden on a per-file basis)\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#xhr\r\n * @type {Phaser.Types.Loader.XHRSettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.xhr = XHRSettings(\r\n GetFastValue(sceneConfig, 'responseType', gameConfig.loaderResponseType),\r\n GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync),\r\n GetFastValue(sceneConfig, 'user', gameConfig.loaderUser),\r\n GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword),\r\n GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout)\r\n );\r\n\r\n /**\r\n * The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#crossOrigin\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.crossOrigin = GetFastValue(sceneConfig, 'crossOrigin', gameConfig.loaderCrossOrigin);\r\n\r\n /**\r\n * The total number of files to load. It may not always be accurate because you may add to the Loader during the process\r\n * of loading, especially if you load a Pack File. Therefore this value can change, but in most cases remains static.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalToLoad\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalToLoad = 0;\r\n\r\n /**\r\n * The progress of the current load queue, as a float value between 0 and 1.\r\n * This is updated automatically as files complete loading.\r\n * Note that it is possible for this value to go down again if you add content to the current load queue during a load.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Files are placed in this Set when they're added to the Loader via `addFile`.\r\n * \r\n * They are moved to the `inflight` Set when they start loading, and assuming a successful\r\n * load, to the `queue` Set for further processing.\r\n *\r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#list\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.list = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're in the process of being loaded.\r\n * \r\n * Upon a successful load they are moved to the `queue` Set.\r\n * \r\n * By the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#inflight\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.inflight = new CustomSet();\r\n\r\n /**\r\n * Files are stored in this Set while they're being processed.\r\n * \r\n * If the process is successful they are moved to their final destination, which could be\r\n * a Cache or the Texture Manager.\r\n * \r\n * At the end of the load process this Set will be empty.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#queue\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.queue = new CustomSet();\r\n\r\n /**\r\n * A temporary Set in which files are stored after processing,\r\n * awaiting destruction at the end of the load process.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#_deleteQueue\r\n * @type {Phaser.Structs.Set.}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._deleteQueue = new CustomSet();\r\n\r\n /**\r\n * The total number of files that failed to load during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalFailed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalFailed = 0;\r\n\r\n /**\r\n * The total number of files that successfully loaded during the most recent load.\r\n * This value is reset when you call `Loader.start`.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#totalComplete\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.totalComplete = 0;\r\n\r\n /**\r\n * The current state of the Loader.\r\n *\r\n * @name Phaser.Loader.LoaderPlugin#state\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.state = CONST.LOADER_IDLE;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pluginStart\r\n * @private\r\n * @since 3.5.1\r\n */\r\n pluginStart: function ()\r\n {\r\n this.systems.events.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * If you want to append a URL before the path of any asset you can set this here.\r\n * \r\n * Useful if allowing the asset base url to be configured outside of the game code.\r\n * \r\n * Once a base URL is set it will affect every file loaded by the Loader from that point on. It does _not_ change any\r\n * file _already_ being loaded. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setBaseURL\r\n * @since 3.0.0\r\n *\r\n * @param {string} [url] - The URL to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setBaseURL: function (url)\r\n {\r\n if (url === undefined) { url = ''; }\r\n\r\n if (url !== '' && url.substr(-1) !== '/')\r\n {\r\n url = url.concat('/');\r\n }\r\n\r\n this.baseURL = url;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The value of `path`, if set, is placed before any _relative_ file path given. For example:\r\n *\r\n * ```javascript\r\n * this.load.setPath(\"images/sprites/\");\r\n * this.load.image(\"ball\", \"ball.png\");\r\n * this.load.image(\"tree\", \"level1/oaktree.png\");\r\n * this.load.image(\"boom\", \"http://server.com/explode.png\");\r\n * ```\r\n *\r\n * Would load the `ball` file from `images/sprites/ball.png` and the tree from\r\n * `images/sprites/level1/oaktree.png` but the file `boom` would load from the URL\r\n * given as it's an absolute URL.\r\n *\r\n * Please note that the path is added before the filename but *after* the baseURL (if set.)\r\n * \r\n * Once a path is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} [path] - The path to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPath: function (path)\r\n {\r\n if (path === undefined) { path = ''; }\r\n\r\n if (path !== '' && path.substr(-1) !== '/')\r\n {\r\n path = path.concat('/');\r\n }\r\n\r\n this.path = path;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * An optional prefix that is automatically prepended to the start of every file key.\r\n * \r\n * If prefix was `MENU.` and you load an image with the key 'Background' the resulting key would be `MENU.Background`.\r\n * \r\n * Once a prefix is set it will then affect every file added to the Loader from that point on. It does _not_ change any\r\n * file _already_ in the load queue. To reset it, call this method with no arguments.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setPrefix\r\n * @since 3.7.0\r\n *\r\n * @param {string} [prefix] - The prefix to use. Leave empty to reset.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setPrefix: function (prefix)\r\n {\r\n if (prefix === undefined) { prefix = ''; }\r\n\r\n this.prefix = prefix;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Cross Origin Resource Sharing value used when loading files.\r\n * \r\n * Files can override this value on a per-file basis by specifying an alternative `crossOrigin` value in their file config.\r\n * \r\n * Once CORs is set it will then affect every file loaded by the Loader from that point on, as long as they don't have\r\n * their own CORs setting. To reset it, call this method with no arguments.\r\n *\r\n * For more details about CORs see https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#setCORS\r\n * @since 3.0.0\r\n *\r\n * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader object.\r\n */\r\n setCORS: function (crossOrigin)\r\n {\r\n this.crossOrigin = crossOrigin;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a file, or array of files, into the load queue.\r\n *\r\n * The file must be an instance of `Phaser.Loader.File`, or a class that extends it. The Loader will check that the key\r\n * used by the file won't conflict with any other key either in the loader, the inflight queue or the target cache.\r\n * If allowed it will then add the file into the pending list, read for the load to start. Or, if the load has already\r\n * started, ready for the next batch of files to be pulled from the list to the inflight queue.\r\n *\r\n * You should not normally call this method directly, but rather use one of the Loader methods like `image` or `atlas`,\r\n * however you can call this as long as the file given to it is well formed.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addFile\r\n * @fires Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Loader.File|Phaser.Loader.File[])} file - The file, or array of files, to be added to the load queue.\r\n */\r\n addFile: function (file)\r\n {\r\n if (!Array.isArray(file))\r\n {\r\n file = [ file ];\r\n }\r\n\r\n for (var i = 0; i < file.length; i++)\r\n {\r\n var item = file[i];\r\n\r\n // Does the file already exist in the cache or texture manager?\r\n // Or will it conflict with a file already in the queue or inflight?\r\n if (!this.keyExists(item))\r\n {\r\n this.list.set(item);\r\n\r\n this.emit(Events.ADD, item.key, item.type, this, item);\r\n\r\n if (this.isLoading())\r\n {\r\n this.totalToLoad++;\r\n this.updateProgress();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Checks the key and type of the given file to see if it will conflict with anything already\r\n * in a Cache, the Texture Manager, or the list or inflight queues.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#keyExists\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file to check the key of.\r\n *\r\n * @return {boolean} `true` if adding this file will cause a cache or queue conflict, otherwise `false`.\r\n */\r\n keyExists: function (file)\r\n {\r\n var keyConflict = file.hasCacheConflict();\r\n\r\n if (!keyConflict)\r\n {\r\n this.list.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n if (!keyConflict && this.isLoading())\r\n {\r\n this.inflight.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n\r\n this.queue.iterate(function (item)\r\n {\r\n if (item.type === file.type && item.key === file.key)\r\n {\r\n keyConflict = true;\r\n\r\n return false;\r\n }\r\n\r\n });\r\n }\r\n\r\n return keyConflict;\r\n },\r\n\r\n /**\r\n * Takes a well formed, fully parsed pack file object and adds its entries into the load queue. Usually you do not call\r\n * this method directly, but instead use `Loader.pack` and supply a path to a JSON file that holds the\r\n * pack data. However, if you've got the data prepared you can pass it to this method.\r\n *\r\n * You can also provide an optional key. If you do then it will only add the entries from that part of the pack into\r\n * to the load queue. If not specified it will add all entries it finds. For more details about the pack file format\r\n * see the `LoaderPlugin.pack` method.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#addPack\r\n * @since 3.7.0\r\n *\r\n * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue.\r\n * @param {string} [packKey] - An optional key to use from the pack file data.\r\n *\r\n * @return {boolean} `true` if any files were added to the queue, otherwise `false`.\r\n */\r\n addPack: function (pack, packKey)\r\n {\r\n // if no packKey provided we'll add everything to the queue\r\n if (packKey && pack.hasOwnProperty(packKey))\r\n {\r\n pack = { packKey: pack[packKey] };\r\n }\r\n\r\n var total = 0;\r\n\r\n // Store the loader settings in case this pack replaces them\r\n var currentBaseURL = this.baseURL;\r\n var currentPath = this.path;\r\n var currentPrefix = this.prefix;\r\n\r\n // Here we go ...\r\n for (var key in pack)\r\n {\r\n var config = pack[key];\r\n\r\n // Any meta data to process?\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var files = GetFastValue(config, 'files', null);\r\n var defaultType = GetFastValue(config, 'defaultType', 'void');\r\n\r\n if (Array.isArray(files))\r\n {\r\n this.setBaseURL(baseURL);\r\n this.setPath(path);\r\n this.setPrefix(prefix);\r\n\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n var file = files[i];\r\n var type = (file.hasOwnProperty('type')) ? file.type : defaultType;\r\n\r\n if (this[type])\r\n {\r\n this[type](file);\r\n total++;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n this.setBaseURL(currentBaseURL);\r\n this.setPath(currentPath);\r\n this.setPrefix(currentPrefix);\r\n\r\n return (total > 0);\r\n },\r\n\r\n /**\r\n * Is the Loader actively loading, or processing loaded files?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isLoading\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is busy loading or processing, otherwise `false`.\r\n */\r\n isLoading: function ()\r\n {\r\n return (this.state === CONST.LOADER_LOADING || this.state === CONST.LOADER_PROCESSING);\r\n },\r\n\r\n /**\r\n * Is the Loader ready to start a new load?\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#isReady\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Loader is ready to start a new load, otherwise `false`.\r\n */\r\n isReady: function ()\r\n {\r\n return (this.state === CONST.LOADER_IDLE || this.state === CONST.LOADER_COMPLETE);\r\n },\r\n\r\n /**\r\n * Starts the Loader running. This will reset the progress and totals and then emit a `start` event.\r\n * If there is nothing in the queue the Loader will immediately complete, otherwise it will start\r\n * loading the first batch of files.\r\n *\r\n * The Loader is started automatically if the queue is populated within your Scenes `preload` method.\r\n *\r\n * However, outside of this, you need to call this method to start it.\r\n *\r\n * If the Loader is already running this method will simply return.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#start\r\n * @fires Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.isReady())\r\n {\r\n return;\r\n }\r\n\r\n this.progress = 0;\r\n\r\n this.totalFailed = 0;\r\n this.totalComplete = 0;\r\n this.totalToLoad = this.list.size;\r\n\r\n this.emit(Events.START, this);\r\n\r\n if (this.list.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n else\r\n {\r\n this.state = CONST.LOADER_LOADING;\r\n\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.updateProgress();\r\n\r\n this.checkLoadQueue();\r\n\r\n this.systems.events.on(SceneEvents.UPDATE, this.update, this);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n * It updates the `progress` value and then emits a progress event, which you can use to\r\n * display a loading bar in your game.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#updateProgress\r\n * @fires Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n */\r\n updateProgress: function ()\r\n {\r\n this.progress = 1 - ((this.list.size + this.inflight.size) / this.totalToLoad);\r\n\r\n this.emit(Events.PROGRESS, this.progress);\r\n },\r\n\r\n /**\r\n * Called automatically during the load process.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#update\r\n * @since 3.10.0\r\n */\r\n update: function ()\r\n {\r\n if (this.state === CONST.LOADER_LOADING && this.list.size > 0 && this.inflight.size < this.maxParallelDownloads)\r\n {\r\n this.checkLoadQueue();\r\n }\r\n },\r\n\r\n /**\r\n * An internal method called by the Loader.\r\n * \r\n * It will check to see if there are any more files in the pending list that need loading, and if so it will move\r\n * them from the list Set into the inflight Set, set their CORs flag and start them loading.\r\n * \r\n * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#checkLoadQueue\r\n * @private\r\n * @since 3.7.0\r\n */\r\n checkLoadQueue: function ()\r\n {\r\n this.list.each(function (file)\r\n {\r\n if (file.state === CONST.FILE_POPULATED || (file.state === CONST.FILE_PENDING && this.inflight.size < this.maxParallelDownloads))\r\n {\r\n this.inflight.set(file);\r\n\r\n this.list.delete(file);\r\n\r\n // If the file doesn't have its own crossOrigin set, we'll use the Loaders (which is undefined by default)\r\n if (!file.crossOrigin)\r\n {\r\n file.crossOrigin = this.crossOrigin;\r\n }\r\n\r\n file.load();\r\n }\r\n\r\n if (this.inflight.size === this.maxParallelDownloads)\r\n {\r\n // Tells the Set iterator to abort\r\n return false;\r\n }\r\n\r\n }, this);\r\n },\r\n\r\n /**\r\n * An internal method called automatically by the XHRLoader belong to a File.\r\n * \r\n * This method will remove the given file from the inflight Set and update the load progress.\r\n * If the file was successful its `onProcess` method is called, otherwise it is added to the delete queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#nextFile\r\n * @fires Phaser.Loader.Events#FILE_LOAD\r\n * @fires Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that just finished loading, or errored during load.\r\n * @param {boolean} success - `true` if the file loaded successfully, otherwise `false`.\r\n */\r\n nextFile: function (file, success)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.inflight)\r\n {\r\n return;\r\n }\r\n\r\n this.inflight.delete(file);\r\n\r\n this.updateProgress();\r\n\r\n if (success)\r\n {\r\n this.totalComplete++;\r\n\r\n this.queue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD, file);\r\n\r\n file.onProcess();\r\n }\r\n else\r\n {\r\n this.totalFailed++;\r\n\r\n this._deleteQueue.set(file);\r\n\r\n this.emit(Events.FILE_LOAD_ERROR, file);\r\n\r\n this.fileProcessComplete(file);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that is called automatically by the File when it has finished processing.\r\n *\r\n * If the process was successful, and the File isn't part of a MultiFile, its `addToCache` method is called.\r\n *\r\n * It this then removed from the queue. If there are no more files to load `loadComplete` is called.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#fileProcessComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The file that has finished processing.\r\n */\r\n fileProcessComplete: function (file)\r\n {\r\n // Has the game been destroyed during load? If so, bail out now.\r\n if (!this.scene || !this.systems || !this.systems.game || this.systems.game.pendingDestroy)\r\n {\r\n return;\r\n }\r\n\r\n // This file has failed, so move it to the failed Set\r\n if (file.state === CONST.FILE_ERRORED)\r\n {\r\n if (file.multiFile)\r\n {\r\n file.multiFile.onFileFailed(file);\r\n }\r\n }\r\n else if (file.state === CONST.FILE_COMPLETE)\r\n {\r\n if (file.multiFile)\r\n {\r\n if (file.multiFile.isReadyToProcess())\r\n {\r\n // If we got here then all files the link file needs are ready to add to the cache\r\n file.multiFile.addToCache();\r\n }\r\n }\r\n else\r\n {\r\n // If we got here, then the file processed, so let it add itself to its cache\r\n file.addToCache();\r\n }\r\n }\r\n\r\n // Remove it from the queue\r\n this.queue.delete(file);\r\n\r\n // Nothing left to do?\r\n\r\n if (this.list.size === 0 && this.inflight.size === 0 && this.queue.size === 0)\r\n {\r\n this.loadComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called at the end when the load queue is exhausted and all files have either loaded or errored.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n *\r\n * Also clears down the Sets, puts progress to 1 and clears the deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#loadComplete\r\n * @fires Phaser.Loader.Events#COMPLETE\r\n * @fires Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.7.0\r\n */\r\n loadComplete: function ()\r\n {\r\n this.emit(Events.POST_PROCESS, this);\r\n\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n this.progress = 1;\r\n\r\n this.state = CONST.LOADER_COMPLETE;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n\r\n // Call 'destroy' on each file ready for deletion\r\n this._deleteQueue.iterateLocal('destroy');\r\n\r\n this._deleteQueue.clear();\r\n\r\n this.emit(Events.COMPLETE, this, this.totalComplete, this.totalFailed);\r\n },\r\n\r\n /**\r\n * Adds a File into the pending-deletion queue.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#flagForRemoval\r\n * @since 3.7.0\r\n * \r\n * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes.\r\n */\r\n flagForRemoval: function (file)\r\n {\r\n this._deleteQueue.set(file);\r\n },\r\n\r\n /**\r\n * Converts the given JSON data into a file that the browser then prompts you to download so you can save it locally.\r\n *\r\n * The data must be well formed JSON and ready-parsed, not a JavaScript object.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#saveJSON\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The JSON data, ready parsed.\r\n * @param {string} [filename=file.json] - The name to save the JSON file as.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n saveJSON: function (data, filename)\r\n {\r\n return this.save(JSON.stringify(data), filename);\r\n },\r\n\r\n /**\r\n * Causes the browser to save the given data as a file to its default Downloads folder.\r\n * \r\n * Creates a DOM level anchor link, assigns it as being a `download` anchor, sets the href\r\n * to be an ObjectURL based on the given data, and then invokes a click event.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#save\r\n * @since 3.0.0\r\n *\r\n * @param {*} data - The data to be saved. Will be passed through URL.createObjectURL.\r\n * @param {string} [filename=file.json] - The filename to save the file as.\r\n * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} This Loader plugin.\r\n */\r\n save: function (data, filename, filetype)\r\n {\r\n if (filename === undefined) { filename = 'file.json'; }\r\n if (filetype === undefined) { filetype = 'application/json'; }\r\n\r\n var blob = new Blob([ data ], { type: filetype });\r\n\r\n var url = URL.createObjectURL(blob);\r\n\r\n var a = document.createElement('a');\r\n\r\n a.download = filename;\r\n a.textContent = 'Download ' + filename;\r\n a.href = url;\r\n a.click();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets the Loader.\r\n *\r\n * This will clear all lists and reset the base URL, path and prefix.\r\n *\r\n * Warning: If the Loader is currently downloading files, or has files in its queue, they will be aborted.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#reset\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n this.list.clear();\r\n this.inflight.clear();\r\n this.queue.clear();\r\n\r\n var gameConfig = this.systems.game.config;\r\n var sceneConfig = this.systems.settings.loader;\r\n\r\n this.setBaseURL(GetFastValue(sceneConfig, 'baseURL', gameConfig.loaderBaseURL));\r\n this.setPath(GetFastValue(sceneConfig, 'path', gameConfig.loaderPath));\r\n this.setPrefix(GetFastValue(sceneConfig, 'prefix', gameConfig.loaderPrefix));\r\n\r\n this.state = CONST.LOADER_IDLE;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.reset();\r\n\r\n this.state = CONST.LOADER_SHUTDOWN;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.state = CONST.LOADER_DESTROYED;\r\n\r\n this.systems.events.off(SceneEvents.UPDATE, this.update, this);\r\n this.systems.events.off(SceneEvents.START, this.pluginStart, this);\r\n\r\n this.list = null;\r\n this.inflight = null;\r\n this.queue = null;\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.textureManager = null;\r\n this.cacheManager = null;\r\n this.sceneManager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Loader', LoaderPlugin, 'load');\r\n\r\nmodule.exports = LoaderPlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/LoaderPlugin.js?")},"./node_modules/phaser/src/loader/MergeXHRSettings.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar XHRSettings = __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js");\r\n\r\n/**\r\n * Takes two XHRSettings Objects and creates a new XHRSettings object from them.\r\n *\r\n * The new object is seeded by the values given in the global settings, but any setting in\r\n * the local object overrides the global ones.\r\n *\r\n * @function Phaser.Loader.MergeXHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} global - The global XHRSettings object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} local - The local XHRSettings object.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} A newly formed XHRSettings object.\r\n */\r\nvar MergeXHRSettings = function (global, local)\r\n{\r\n var output = (global === undefined) ? XHRSettings() : Extend({}, global);\r\n\r\n if (local)\r\n {\r\n for (var setting in local)\r\n {\r\n if (local[setting] !== undefined)\r\n {\r\n output[setting] = local[setting];\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = MergeXHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MergeXHRSettings.js?')},"./node_modules/phaser/src/loader/MultiFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A MultiFile is a special kind of parent that contains two, or more, Files as children and looks after\r\n * the loading and processing of them all. It is commonly extended and used as a base class for file types such as AtlasJSON or BitmapFont.\r\n * \r\n * You shouldn\'t create an instance of a MultiFile directly, but should extend it with your own class, setting a custom type and processing methods.\r\n *\r\n * @class MultiFile\r\n * @memberof Phaser.Loader\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The Loader that is going to load this File.\r\n * @param {string} type - The file type string for sorting within the Loader.\r\n * @param {string} key - The key of the file within the loader.\r\n * @param {Phaser.Loader.File[]} files - An array of Files that make-up this MultiFile.\r\n */\r\nvar MultiFile = new Class({\r\n\r\n initialize:\r\n\r\n function MultiFile (loader, type, key, files)\r\n {\r\n /**\r\n * A reference to the Loader that is going to load this file.\r\n *\r\n * @name Phaser.Loader.MultiFile#loader\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.7.0\r\n */\r\n this.loader = loader;\r\n\r\n /**\r\n * The file type string for sorting within the Loader.\r\n *\r\n * @name Phaser.Loader.MultiFile#type\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.type = type;\r\n\r\n /**\r\n * Unique cache key (unique within its file type)\r\n *\r\n * @name Phaser.Loader.MultiFile#key\r\n * @type {string}\r\n * @since 3.7.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Array of files that make up this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#files\r\n * @type {Phaser.Loader.File[]}\r\n * @since 3.7.0\r\n */\r\n this.files = files;\r\n\r\n /**\r\n * The completion status of this MultiFile.\r\n *\r\n * @name Phaser.Loader.MultiFile#complete\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.7.0\r\n */\r\n this.complete = false;\r\n\r\n /**\r\n * The number of files to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#pending\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n\r\n this.pending = files.length;\r\n\r\n /**\r\n * The number of files that failed to load.\r\n *\r\n * @name Phaser.Loader.MultiFile#failed\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.7.0\r\n */\r\n this.failed = 0;\r\n\r\n /**\r\n * A storage container for transient data that the loading files need.\r\n *\r\n * @name Phaser.Loader.MultiFile#config\r\n * @type {any}\r\n * @since 3.7.0\r\n */\r\n this.config = {};\r\n\r\n // Link the files\r\n for (var i = 0; i < files.length; i++)\r\n {\r\n files[i].multiFile = this;\r\n }\r\n },\r\n\r\n /**\r\n * Checks if this MultiFile is ready to process its children or not.\r\n *\r\n * @method Phaser.Loader.MultiFile#isReadyToProcess\r\n * @since 3.7.0\r\n *\r\n * @return {boolean} `true` if all children of this MultiFile have loaded, otherwise `false`.\r\n */\r\n isReadyToProcess: function ()\r\n {\r\n return (this.pending === 0 && this.failed === 0 && !this.complete);\r\n },\r\n\r\n /**\r\n * Adds another child to this MultiFile, increases the pending count and resets the completion status.\r\n *\r\n * @method Phaser.Loader.MultiFile#addToMultiFile\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} files - The File to add to this MultiFile.\r\n *\r\n * @return {Phaser.Loader.MultiFile} This MultiFile instance.\r\n */\r\n addToMultiFile: function (file)\r\n {\r\n this.files.push(file);\r\n\r\n file.multiFile = this;\r\n\r\n this.pending++;\r\n\r\n this.complete = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File that fails to load.\r\n *\r\n * @method Phaser.Loader.MultiFile#onFileFailed\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has failed to load.\r\n */\r\n onFileFailed: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.failed++;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MultiFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/MultiFile.js?')},"./node_modules/phaser/src/loader/XHRLoader.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MergeXHRSettings = __webpack_require__(/*! ./MergeXHRSettings */ \"./node_modules/phaser/src/loader/MergeXHRSettings.js\");\r\n\r\n/**\r\n * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings\r\n * and starts the download of it. It uses the Files own XHRSettings and merges them\r\n * with the global XHRSettings object to set the xhr values before download.\r\n *\r\n * @function Phaser.Loader.XHRLoader\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File to download.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} globalXHRSettings - The global XHRSettings object.\r\n *\r\n * @return {XMLHttpRequest} The XHR object.\r\n */\r\nvar XHRLoader = function (file, globalXHRSettings)\r\n{\r\n var config = MergeXHRSettings(globalXHRSettings, file.xhrSettings);\r\n\r\n var xhr = new XMLHttpRequest();\r\n\r\n xhr.open('GET', file.src, config.async, config.user, config.password);\r\n\r\n xhr.responseType = file.xhrSettings.responseType;\r\n xhr.timeout = config.timeout;\r\n\r\n if (config.header && config.headerValue)\r\n {\r\n xhr.setRequestHeader(config.header, config.headerValue);\r\n }\r\n\r\n if (config.requestedWith)\r\n {\r\n xhr.setRequestHeader('X-Requested-With', config.requestedWith);\r\n }\r\n\r\n if (config.overrideMimeType)\r\n {\r\n xhr.overrideMimeType(config.overrideMimeType);\r\n }\r\n\r\n // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.)\r\n\r\n xhr.onload = file.onLoad.bind(file, xhr);\r\n xhr.onerror = file.onError.bind(file, xhr);\r\n xhr.onprogress = file.onProgress.bind(file);\r\n\r\n // This is the only standard method, the ones above are browser additions (maybe not universal?)\r\n // xhr.onreadystatechange\r\n\r\n xhr.send();\r\n\r\n return xhr;\r\n};\r\n\r\nmodule.exports = XHRLoader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRLoader.js?")},"./node_modules/phaser/src/loader/XHRSettings.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates an XHRSettings Object with default values.\r\n *\r\n * @function Phaser.Loader.XHRSettings\r\n * @since 3.0.0\r\n *\r\n * @param {XMLHttpRequestResponseType} [responseType=''] - The responseType, such as 'text'.\r\n * @param {boolean} [async=true] - Should the XHR request use async or not?\r\n * @param {string} [user=''] - Optional username for the XHR request.\r\n * @param {string} [password=''] - Optional password for the XHR request.\r\n * @param {integer} [timeout=0] - Optional XHR timeout value.\r\n *\r\n * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader.\r\n */\r\nvar XHRSettings = function (responseType, async, user, password, timeout)\r\n{\r\n if (responseType === undefined) { responseType = ''; }\r\n if (async === undefined) { async = true; }\r\n if (user === undefined) { user = ''; }\r\n if (password === undefined) { password = ''; }\r\n if (timeout === undefined) { timeout = 0; }\r\n\r\n // Before sending a request, set the xhr.responseType to \"text\",\r\n // \"arraybuffer\", \"blob\", or \"document\", depending on your data needs.\r\n // Note, setting xhr.responseType = '' (or omitting) will default the response to \"text\".\r\n\r\n return {\r\n\r\n // Ignored by the Loader, only used by File.\r\n responseType: responseType,\r\n\r\n async: async,\r\n\r\n // credentials\r\n user: user,\r\n password: password,\r\n\r\n // timeout in ms (0 = no timeout)\r\n timeout: timeout,\r\n\r\n // setRequestHeader\r\n header: undefined,\r\n headerValue: undefined,\r\n requestedWith: false,\r\n\r\n // overrideMimeType\r\n overrideMimeType: undefined\r\n\r\n };\r\n};\r\n\r\nmodule.exports = XHRSettings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/XHRSettings.js?")},"./node_modules/phaser/src/loader/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FILE_CONST = {\r\n\r\n /**\r\n * The Loader is idle.\r\n * \r\n * @name Phaser.Loader.LOADER_IDLE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_IDLE: 0,\r\n\r\n /**\r\n * The Loader is actively loading.\r\n * \r\n * @name Phaser.Loader.LOADER_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_LOADING: 1,\r\n\r\n /**\r\n * The Loader is processing files is has loaded.\r\n * \r\n * @name Phaser.Loader.LOADER_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_PROCESSING: 2,\r\n\r\n /**\r\n * The Loader has completed loading and processing.\r\n * \r\n * @name Phaser.Loader.LOADER_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_COMPLETE: 3,\r\n\r\n /**\r\n * The Loader is shutting down.\r\n * \r\n * @name Phaser.Loader.LOADER_SHUTDOWN\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_SHUTDOWN: 4,\r\n\r\n /**\r\n * The Loader has been destroyed.\r\n * \r\n * @name Phaser.Loader.LOADER_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADER_DESTROYED: 5,\r\n\r\n /**\r\n * File is in the load queue but not yet started\r\n * \r\n * @name Phaser.Loader.FILE_PENDING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PENDING: 10,\r\n\r\n /**\r\n * File has been started to load by the loader (onLoad called)\r\n * \r\n * @name Phaser.Loader.FILE_LOADING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADING: 11,\r\n\r\n /**\r\n * File has loaded successfully, awaiting processing \r\n * \r\n * @name Phaser.Loader.FILE_LOADED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_LOADED: 12,\r\n\r\n /**\r\n * File failed to load\r\n * \r\n * @name Phaser.Loader.FILE_FAILED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_FAILED: 13,\r\n\r\n /**\r\n * File is being processed (onProcess callback)\r\n * \r\n * @name Phaser.Loader.FILE_PROCESSING\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_PROCESSING: 14,\r\n\r\n /**\r\n * The File has errored somehow during processing.\r\n * \r\n * @name Phaser.Loader.FILE_ERRORED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_ERRORED: 16,\r\n\r\n /**\r\n * File has finished processing.\r\n * \r\n * @name Phaser.Loader.FILE_COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_COMPLETE: 17,\r\n\r\n /**\r\n * File has been destroyed\r\n * \r\n * @name Phaser.Loader.FILE_DESTROYED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_DESTROYED: 18,\r\n\r\n /**\r\n * File was populated from local data and doesn't need an HTTP request\r\n * \r\n * @name Phaser.Loader.FILE_POPULATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n FILE_POPULATED: 19\r\n\r\n};\r\n\r\nmodule.exports = FILE_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/const.js?")},"./node_modules/phaser/src/loader/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Add File Event.\r\n * \r\n * This event is dispatched when a new file is successfully added to the Loader and placed into the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('addfile', listener)`.\r\n * \r\n * If you add lots of files to a Loader from a `preload` method, it will dispatch this event for each one of them.\r\n *\r\n * @event Phaser.Loader.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The unique key of the file that was added to the Loader.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} string of the file that was added to the Loader, i.e. `image`.\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {Phaser.Loader.File} file - A reference to the File which was added to the Loader.\r\n */\r\nmodule.exports = 'addfile';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/ADD_EVENT.js?")},"./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Complete Event.\r\n * \r\n * This event is dispatched when the Loader has fully processed everything in the load queue.\r\n * By this point every loaded file will now be in its associated cache and ready for use.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('complete', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n * @param {integer} totalComplete - The total number of files that successfully loaded.\r\n * @param {integer} totalFailed - The total number of files that failed to load.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('filecomplete', listener)`.\r\n * \r\n * You can also listen for the completion of a specific file. See the [FILE_KEY_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_KEY_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Complete Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when any file in the queue finishes loading.\r\n * \r\n * It uses a special dynamic event name constructed from the key and type of the file.\r\n * \r\n * For example, if you have loaded an `image` with a key of `monster`, you can listen for it\r\n * using the following:\r\n *\r\n * ```javascript\r\n * this.load.on('filecomplete-image-monster', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n *\r\n * Or, if you have loaded a texture `atlas` with a key of `Level1`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-atlas-Level1', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * Or, if you have loaded a sprite sheet with a key of `Explosion` and a prefix of `GAMEOVER`:\r\n * \r\n * ```javascript\r\n * this.load.on('filecomplete-spritesheet-GAMEOVERExplosion', function (key, type, data) {\r\n * // Your handler code\r\n * });\r\n * ```\r\n * \r\n * You can also listen for the generic completion of files. See the [FILE_COMPLETE]{@linkcode Phaser.Loader.Events#event:FILE_COMPLETE} event.\r\n *\r\n * @event Phaser.Loader.Events#FILE_KEY_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the file that just loaded and finished processing.\r\n * @param {string} type - The [file type]{@link Phaser.Loader.File#type} of the file that just loaded, i.e. `image`.\r\n * @param {any} data - The raw data the file contained.\r\n */\r\nmodule.exports = 'filecomplete-';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Error Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file fails to load.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('loaderror', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD_ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n */\r\nmodule.exports = 'loaderror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when a file finishes loading,\r\n * but _before_ it is processed and added to the internal Phaser caches.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('load', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which just finished loading.\r\n */\r\nmodule.exports = 'load';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js?")},"./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The File Load Progress Event.\r\n * \r\n * This event is dispatched by the Loader Plugin during the load of a file, if the browser receives a DOM ProgressEvent and\r\n * the `lengthComputable` event property is true. Depending on the size of the file and browser in use, this may, or may not happen.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('fileprogress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.File} file - A reference to the File which errored during load.\r\n * @param {number} percentComplete - A value between 0 and 1 indicating how 'complete' this file is.\r\n */\r\nmodule.exports = 'fileprogress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Post Process Event.\r\n * \r\n * This event is dispatched by the Loader Plugin when the Loader has finished loading everything in the load queue.\r\n * It is dispatched before the internal lists are cleared and each File is destroyed.\r\n * \r\n * Use this hook to perform any last minute processing of files that can only happen once the\r\n * Loader has completed, but prior to it emitting the `complete` event.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('postprocess', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#POST_PROCESS\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'postprocess';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Progress Event.\r\n * \r\n * This event is dispatched when the Loader updates its load progress, typically as a result of a file having completed loading.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('progress', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#PROGRESS\r\n * @since 3.0.0\r\n * \r\n * @param {number} progress - The current progress of the load. A value between 0 and 1.\r\n */\r\nmodule.exports = 'progress';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js?")},"./node_modules/phaser/src/loader/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Loader Plugin Start Event.\r\n * \r\n * This event is dispatched when the Loader starts running. At this point load progress is zero.\r\n * \r\n * This event is dispatched even if there aren't any files in the load queue.\r\n * \r\n * Listen to it from a Scene using: `this.load.on('start', listener)`.\r\n *\r\n * @event Phaser.Loader.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader Plugin that dispatched this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/START_EVENT.js?")},"./node_modules/phaser/src/loader/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/loader/events/ADD_EVENT.js"),\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js"),\r\n FILE_COMPLETE: __webpack_require__(/*! ./FILE_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js"),\r\n FILE_KEY_COMPLETE: __webpack_require__(/*! ./FILE_KEY_COMPLETE_EVENT */ "./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js"),\r\n FILE_LOAD_ERROR: __webpack_require__(/*! ./FILE_LOAD_ERROR_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js"),\r\n FILE_LOAD: __webpack_require__(/*! ./FILE_LOAD_EVENT */ "./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js"),\r\n FILE_PROGRESS: __webpack_require__(/*! ./FILE_PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js"),\r\n POST_PROCESS: __webpack_require__(/*! ./POST_PROCESS_EVENT */ "./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js"),\r\n PROGRESS: __webpack_require__(/*! ./PROGRESS_EVENT */ "./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/loader/events/START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/events/index.js?')},"./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\nvar LoaderEvents = __webpack_require__(/*! ../events */ "./node_modules/phaser/src/loader/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single Animation JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#animation method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#animation.\r\n *\r\n * @class AnimationJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar AnimationJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function AnimationJSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'animationJSON\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n // We need to hook into this event:\r\n this.loader.once(LoaderEvents.POST_PROCESS, this.onLoadComplete, this);\r\n\r\n // But the rest is the same as a normal JSON file\r\n JSONFile.prototype.onProcess.call(this);\r\n },\r\n\r\n /**\r\n * Called at the end of the load process, after the Loader has finished all files in its queue.\r\n *\r\n * @method Phaser.Loader.FileTypes.AnimationJSONFile#onLoadComplete\r\n * @since 3.7.0\r\n */\r\n onLoadComplete: function ()\r\n {\r\n this.loader.systems.anims.fromJSON(this.data);\r\n\r\n this.pendingDestroy();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.animation({\r\n * key: \'baddieAnims\',\r\n * url: \'files/BaddieAnims.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be passed to the global Animation Managers `fromJSON` method.\r\n * This will parse all of the JSON data and create animation data from it. This process happens at the very end\r\n * of the Loader, once every other file in the load queue has finished. The reason for this is to allow you to load\r\n * both animation data and the images it relies upon in the same load call.\r\n *\r\n * Once the animation data has been parsed you will be able to play animations using that data.\r\n * Please see the Animation Manager `fromJSON` method for more details about the format and playback.\r\n * \r\n * You can also access the raw animation data from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.animation(\'baddieAnims\', \'files/BaddieAnims.json\');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get(\'baddieAnims\');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And if you only wanted to create animations from the `boss` data, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#animation\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'animation\', function (key, url, dataKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new AnimationJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new AnimationJSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AnimationJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js?')},"./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlas.\r\n * \r\n * https://www.codeandweb.com/texturepacker/tutorials/how-to-create-sprite-sheets-for-phaser3?source=photonstorm\r\n *\r\n * @class AtlasJSONFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasJSONFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasJSONFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new JSONFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'json'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasjson', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var json = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlas(image.key, image.data, json.data, normalMap);\r\n\r\n json.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file, using either the JSON Hash or JSON Array format.\r\n * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate.\r\n * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader\r\n * instead of this one.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.json'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasJSONFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasJSONFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML based Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#atlasXML method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#atlasXML.\r\n *\r\n * @class AtlasXMLFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AtlasXMLFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AtlasXMLFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'atlasxml', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AtlasXMLFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addAtlasXML(image.key, image.data, xml.data, normalMap);\r\n\r\n xml.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in an XML file format.\r\n * These files are created by software such as Shoebox and Adobe Flash / Animate.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.atlasXML({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Atlas XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#atlasXML\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AtlasXMLFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AtlasXMLFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AtlasXMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HTML5AudioFile = __webpack_require__(/*! ./HTML5AudioFile */ \"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {any} [urlConfig] - The absolute or relative URL to load this file from in a config object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {AudioContext} [audioContext] - The AudioContext this file will use to process itself.\r\n */\r\nvar AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // URL is an object created by AudioFile.findAudioURL\r\n function AudioFile (loader, key, urlConfig, xhrSettings, audioContext)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n audioContext = GetFastValue(config, 'context', audioContext);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: urlConfig.url,\r\n xhrSettings: xhrSettings,\r\n config: { context: audioContext }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioFile#onProcess\r\n * @since 3.0.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var _this = this;\r\n\r\n // interesting read https://github.com/WebAudio/web-audio-api/issues/1305\r\n this.config.context.decodeAudioData(this.xhrLoader.response,\r\n function (audioBuffer)\r\n {\r\n _this.data = audioBuffer;\r\n\r\n _this.onProcessComplete();\r\n },\r\n function (e)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + this.key + ' - ', e ? e.message : null);\r\n\r\n _this.onProcessError();\r\n }\r\n );\r\n\r\n this.config.context = null;\r\n }\r\n\r\n});\r\n\r\nAudioFile.create = function (loader, key, urls, config, xhrSettings)\r\n{\r\n var game = loader.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n // url may be inside key, which may be an object\r\n if (IsPlainObject(key))\r\n {\r\n urls = GetFastValue(key, 'url', []);\r\n config = GetFastValue(key, 'config', {});\r\n }\r\n\r\n var urlConfig = AudioFile.getAudioURL(game, urls);\r\n\r\n if (!urlConfig)\r\n {\r\n return null;\r\n }\r\n\r\n // https://developers.google.com/web/updates/2012/02/HTML5-audio-and-the-Web-Audio-API-are-BFFs\r\n // var stream = GetFastValue(config, 'stream', false);\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new AudioFile(loader, key, urlConfig, xhrSettings, game.sound.context);\r\n }\r\n else\r\n {\r\n return new HTML5AudioFile(loader, key, urlConfig, config);\r\n }\r\n};\r\n\r\nAudioFile.getAudioURL = function (game, urls)\r\n{\r\n if (!Array.isArray(urls))\r\n {\r\n urls = [ urls ];\r\n }\r\n\r\n for (var i = 0; i < urls.length; i++)\r\n {\r\n var url = GetFastValue(urls[i], 'url', urls[i]);\r\n\r\n if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0)\r\n {\r\n return url;\r\n }\r\n\r\n var audioType = url.match(/\\.([a-zA-Z0-9]+)($|\\?)/);\r\n\r\n audioType = GetFastValue(urls[i], 'type', (audioType) ? audioType[1] : '').toLowerCase();\r\n\r\n if (game.device.audio[audioType])\r\n {\r\n return {\r\n url: url,\r\n type: audioType\r\n };\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\n/**\r\n * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audio('title', [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audio({\r\n * key: 'title',\r\n * url: [ 'music/Title.ogg', 'music/Title.mp3', 'music/Title.m4a' ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioFileConfig` for more details.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Audio File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audio\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|string[])} [urls] - The absolute or relative URL to load the audio files from.\r\n * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('audio', function (key, urls, config, xhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var audioFile;\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n audioFile = AudioFile.create(this, key[i]);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n audioFile = AudioFile.create(this, key, urls, config, xhrSettings);\r\n\r\n if (audioFile)\r\n {\r\n this.addFile(audioFile);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AudioFile = __webpack_require__(/*! ./AudioFile.js */ \"./node_modules/phaser/src/loader/filetypes/AudioFile.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Audio Sprite File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audioSprite method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audioSprite.\r\n *\r\n * @class AudioSpriteFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {{(string|string[])}} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar AudioSpriteFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function AudioSpriteFile (loader, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n jsonURL = GetFastValue(config, 'jsonURL');\r\n audioURL = GetFastValue(config, 'audioURL');\r\n audioConfig = GetFastValue(config, 'audioConfig');\r\n audioXhrSettings = GetFastValue(config, 'audioXhrSettings');\r\n jsonXhrSettings = GetFastValue(config, 'jsonXhrSettings');\r\n }\r\n\r\n var data;\r\n\r\n // No url? then we're going to do a json load and parse it from that\r\n if (!audioURL)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n \r\n MultiFile.call(this, loader, 'audiosprite', key, [ data ]);\r\n\r\n this.config.resourceLoad = true;\r\n this.config.audioConfig = audioConfig;\r\n this.config.audioXhrSettings = audioXhrSettings;\r\n }\r\n else\r\n {\r\n var audio = AudioFile.create(loader, key, audioURL, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n data = new JSONFile(loader, key, jsonURL, jsonXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'audiosprite', key, [ audio, data ]);\r\n\r\n this.config.resourceLoad = false;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (this.config.resourceLoad && file.type === 'json' && file.data.hasOwnProperty('resources'))\r\n {\r\n // Inspect the data for the files to now load\r\n var urls = file.data.resources;\r\n\r\n var audioConfig = GetFastValue(this.config, 'audioConfig');\r\n var audioXhrSettings = GetFastValue(this.config, 'audioXhrSettings');\r\n\r\n var audio = AudioFile.create(this.loader, file.key, urls, audioConfig, audioXhrSettings);\r\n\r\n if (audio)\r\n {\r\n this.addToMultiFile(audio);\r\n\r\n this.loader.addFile(audio);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.AudioSpriteFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileA = this.files[0];\r\n var fileB = this.files[1];\r\n\r\n fileA.addToCache();\r\n fileB.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json', [\r\n * 'kyobi.ogg',\r\n * 'kyobi.mp3',\r\n * 'kyobi.m4a'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio\r\n * files automatically based on its content. To do this exclude the audio URLs from the load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Audio Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Audio Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Audio Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite({\r\n * key: 'kyobi',\r\n * jsonURL: 'audio/Kyobi.json',\r\n * audioURL: [\r\n * 'audio/Kyobi.ogg',\r\n * 'audio/Kyobi.mp3',\r\n * 'audio/Kyobi.m4a'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.audioSprite('kyobi', 'kyobi.json');\r\n * // and later in your game ...\r\n * var music = this.sound.addAudioSprite('kyobi');\r\n * music.play('title');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * Due to different browsers supporting different audio file types you should usually provide your audio files in a variety of formats.\r\n * ogg, mp3 and m4a are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on\r\n * browser support.\r\n *\r\n * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#audioSprite\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects.\r\n * @param {string} jsonURL - The absolute or relative URL to load the json file from. Or a well formed JSON object to use instead.\r\n * @param {(string|string[])} [audioURL] - The absolute or relative URL to load the audio file from. If empty it will be obtained by parsing the JSON file.\r\n * @param {any} [audioConfig] - The audio configuration options.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader.\r\n */\r\nFileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings)\r\n{\r\n var game = this.systems.game;\r\n var gameAudioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((gameAudioConfig && gameAudioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n // Sounds are disabled, so skip loading audio\r\n return this;\r\n }\r\n\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new AudioSpriteFile(this, key[i]);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n multifile = new AudioSpriteFile(this, key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings);\r\n\r\n if (multifile.files)\r\n {\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n\r\n return this;\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js?")},"./node_modules/phaser/src/loader/filetypes/BinaryFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Binary File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#binary method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#binary.\r\n *\r\n * @class BinaryFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n */\r\nvar BinaryFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function BinaryFile (loader, key, url, xhrSettings, dataType)\r\n {\r\n var extension = 'bin';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataType = GetFastValue(config, 'dataType', dataType);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'binary',\r\n cache: loader.cacheManager.binary,\r\n extension: extension,\r\n responseType: 'arraybuffer',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: { dataType: dataType }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.BinaryFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var ctor = this.config.dataType;\r\n\r\n this.data = (ctor) ? new ctor(this.xhrLoader.response) : this.xhrLoader.response;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Binary file, or array of Binary files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Binary Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Binary Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Binary Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.binary({\r\n * key: 'doom',\r\n * url: 'files/Doom.wad',\r\n * dataType: Uint8Array\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.binary('doom', 'files/Doom.wad');\r\n * // and later in your game ...\r\n * var data = this.cache.binary.get('doom');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Data` the final key will be `LEVEL1.Data` and\r\n * this is what you would use to retrieve the text from the Binary Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"doom\"\r\n * and no URL is given then the Loader will set the URL to be \"doom.bin\". It will always add `.bin` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Binary File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#binary\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.bin`, i.e. if `key` was \"alien\" then the URL will be \"alien.bin\".\r\n * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('binary', function (key, url, dataType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new BinaryFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new BinaryFile(this, key, url, xhrSettings, dataType));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BinaryFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BinaryFile.js?")},"./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ParseXMLBitmapFont = __webpack_require__(/*! ../../gameobjects/bitmaptext/ParseXMLBitmapFont.js */ \"./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js\");\r\nvar XMLFile = __webpack_require__(/*! ./XMLFile.js */ \"./node_modules/phaser/src/loader/filetypes/XMLFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Bitmap Font based File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#bitmapFont method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#bitmapFont.\r\n *\r\n * @class BitmapFontFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar BitmapFontFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function BitmapFontFile (loader, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new XMLFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'fontDataURL'),\r\n extension: GetFastValue(config, 'fontDataExtension', 'xml'),\r\n xhrSettings: GetFastValue(config, 'fontDataXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new XMLFile(loader, key, fontDataURL, fontDataXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'bitmapfont', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.BitmapFontFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var xml = this.files[1];\r\n\r\n image.addToCache();\r\n xml.addToCache();\r\n\r\n this.loader.cacheManager.bitmapFont.add(image.key, { data: ParseXMLBitmapFont(xml.data), texture: image.key, frame: null });\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML based Bitmap Font, or array of fonts, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the font data to be provided in an XML file format.\r\n * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/),\r\n * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner)\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml');\r\n * // and later in your game ...\r\n * this.add.bitmapText(x, y, 'goldenFont', 'Hello World');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use when creating a Bitmap Text object.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.bitmapFont({\r\n * key: 'goldenFont',\r\n * textureURL: 'images/GoldFont.png',\r\n * normalMap: 'images/GoldFont-n.png',\r\n * fontDataURL: 'images/GoldFont.xml'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Bitmap Font File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#bitmapFont\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the font image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [fontDataURL] - The absolute or relative URL to load the font xml data file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new BitmapFontFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new BitmapFontFile(this, key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = BitmapFontFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js?")},"./node_modules/phaser/src/loader/filetypes/CSSFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single CSS File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#css method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#css.\r\n *\r\n * @class CSSFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar CSSFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function CSSFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'css';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.CSSFile#onProcess\r\n * @since 3.17.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('style');\r\n this.data.defer = false;\r\n this.data.innerHTML = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSS file, or array of CSS files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.css('headers', 'styles/headers.css');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.css({\r\n * key: 'headers',\r\n * url: 'styles/headers.css'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.CSSFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a style DOM element\r\n * via `document.createElement('style')`. It will have its `defer` property set to false and then the\r\n * resulting element will be appended to `document.head`. The CSS styles are then applied to the current document.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.css\". It will always add `.css` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the CSS File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#css\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was \"alien\" then the URL will be \"alien.css\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('css', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new CSSFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new CSSFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = CSSFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/CSSFile.js?")},"./node_modules/phaser/src/loader/filetypes/GLSLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar Shader = __webpack_require__(/*! ../../display/shader/BaseShader */ \"./node_modules/phaser/src/display/shader/BaseShader.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single GLSL File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#glsl method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#glsl.\r\n *\r\n * @class GLSLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar GLSLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function GLSLFile (loader, key, url, shaderType, xhrSettings)\r\n {\r\n var extension = 'glsl';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n shaderType = GetFastValue(config, 'shaderType', 'fragment');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n else if (shaderType === undefined)\r\n {\r\n shaderType = 'fragment';\r\n }\r\n\r\n var fileConfig = {\r\n type: 'glsl',\r\n cache: loader.cacheManager.shader,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n config: {\r\n shaderType: shaderType\r\n },\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n var data = this.data.split('\\n');\r\n\r\n // Check to see if this is a shader bundle, or raw glsl file.\r\n var block = this.extractBlock(data, 0);\r\n\r\n if (block)\r\n {\r\n while (block)\r\n {\r\n var key = this.getShaderName(block.header);\r\n var shaderType = this.getShaderType(block.header);\r\n var uniforms = this.getShaderUniforms(block.header);\r\n var shaderSrc = block.shader;\r\n\r\n if (this.cache.has(key))\r\n {\r\n var shader = this.cache.get(key);\r\n\r\n if (shaderType === 'fragment')\r\n {\r\n shader.fragmentSrc = shaderSrc;\r\n }\r\n else\r\n {\r\n shader.vertexSrc = shaderSrc;\r\n }\r\n\r\n if (!shader.uniforms)\r\n {\r\n shader.uniforms = uniforms;\r\n }\r\n }\r\n else if (shaderType === 'fragment')\r\n {\r\n this.cache.add(key, new Shader(key, shaderSrc, '', uniforms));\r\n }\r\n else\r\n {\r\n this.cache.add(key, new Shader(key, '', shaderSrc, uniforms));\r\n }\r\n\r\n block = this.extractBlock(data, block.offset);\r\n }\r\n }\r\n else if (this.config.shaderType === 'fragment')\r\n {\r\n // Single shader\r\n this.cache.add(this.key, new Shader(this.key, this.data));\r\n }\r\n else\r\n {\r\n this.cache.add(this.key, new Shader(this.key, '', this.data));\r\n }\r\n\r\n this.pendingDestroy();\r\n },\r\n\r\n /**\r\n * Returns the name of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader name.\r\n */\r\n getShaderName: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'name:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.key;\r\n },\r\n\r\n /**\r\n * Returns the type of the shader from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {string} The shader type. Either 'fragment' or 'vertex'.\r\n */\r\n getShaderType: function (headerSource)\r\n {\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 5) === 'type:')\r\n {\r\n return line.substring(5).trim();\r\n }\r\n }\r\n\r\n return this.config.shaderType;\r\n },\r\n\r\n /**\r\n * Returns the shader uniforms from the header block.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} headerSource - The header data.\r\n * \r\n * @return {any} The shader uniforms object.\r\n */\r\n getShaderUniforms: function (headerSource)\r\n {\r\n var uniforms = {};\r\n\r\n for (var i = 0; i < headerSource.length; i++)\r\n {\r\n var line = headerSource[i].trim();\r\n\r\n if (line.substring(0, 8) === 'uniform.')\r\n {\r\n var pos = line.indexOf(':');\r\n\r\n if (pos)\r\n {\r\n var key = line.substring(8, pos);\r\n\r\n try\r\n {\r\n uniforms[key] = JSON.parse(line.substring(pos + 1));\r\n }\r\n catch (e)\r\n {\r\n console.warn('Invalid uniform JSON: ' + key);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return uniforms;\r\n },\r\n\r\n /**\r\n * Processes the shader file and extracts the relevant data.\r\n *\r\n * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock\r\n * @private\r\n * @since 3.17.0\r\n * \r\n * @param {string[]} data - The array of shader data to process.\r\n * @param {integer} offset - The offset to start processing from.\r\n * \r\n * @return {any} The processed shader block, or null.\r\n */\r\n extractBlock: function (data, offset)\r\n {\r\n var headerStart = -1;\r\n var headerEnd = -1;\r\n var blockEnd = -1;\r\n var headerOpen = false;\r\n var captureSource = false;\r\n var headerSource = [];\r\n var shaderSource = [];\r\n\r\n for (var i = offset; i < data.length; i++)\r\n {\r\n var line = data[i].trim();\r\n\r\n if (line === '---')\r\n {\r\n if (headerStart === -1)\r\n {\r\n headerStart = i;\r\n headerOpen = true;\r\n }\r\n else if (headerOpen)\r\n {\r\n headerEnd = i;\r\n headerOpen = false;\r\n captureSource = true;\r\n }\r\n else\r\n {\r\n // We've hit another --- delimeter, break out\r\n captureSource = false;\r\n break;\r\n }\r\n }\r\n else if (headerOpen)\r\n {\r\n headerSource.push(line);\r\n }\r\n else if (captureSource)\r\n {\r\n shaderSource.push(line);\r\n blockEnd = i;\r\n }\r\n }\r\n\r\n if (!headerOpen && headerEnd !== -1)\r\n {\r\n return { header: headerSource, shader: shaderSource.join('\\n'), offset: blockEnd };\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a GLSL file, or array of GLSL files, to the current load queue.\r\n * In Phaser 3 GLSL files are just plain Text files at the current moment in time.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Shader Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Shader Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Shader Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.glsl({\r\n * key: 'plasma',\r\n * shaderType: 'fragment',\r\n * url: 'shaders/Plasma.glsl'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.glsl('plasma', 'shaders/Plasma.glsl');\r\n * // and later in your game ...\r\n * var data = this.cache.shader.get('plasma');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `FX.` and the key was `Plasma` the final key will be `FX.Plasma` and\r\n * this is what you would use to retrieve the text from the Shader Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"plasma\"\r\n * and no URL is given then the Loader will set the URL to be \"plasma.glsl\". It will always add `.glsl` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the GLSL File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#glsl\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.glsl`, i.e. if `key` was \"alien\" then the URL will be \"alien.glsl\".\r\n * @param {string} [shaderType='fragment'] - The type of shader. Either `fragment` for a fragment shader, or `vertex` for a vertex shader. This is ignored if you load a shader bundle.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new GLSLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new GLSLFile(this, key, url, shaderType, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = GLSLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/GLSLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetURL = __webpack_require__(/*! ../GetURL */ \"./node_modules/phaser/src/loader/GetURL.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Audio File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#audio method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#audio.\r\n *\r\n * @class HTML5AudioFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [urlConfig] - The absolute or relative URL to load this file from.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTML5AudioFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTML5AudioFile (loader, key, urlConfig, audioConfig)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n audioConfig = GetFastValue(config, 'config', audioConfig);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'audio',\r\n cache: loader.cacheManager.audio,\r\n extension: urlConfig.type,\r\n key: key,\r\n url: urlConfig.url,\r\n config: audioConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // New properties specific to this class\r\n this.locked = 'ontouchstart' in window;\r\n this.loaded = false;\r\n this.filesLoaded = 0;\r\n this.filesTotal = 0;\r\n },\r\n\r\n /**\r\n * Called when the file finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onLoad\r\n * @since 3.0.0\r\n */\r\n onLoad: function ()\r\n {\r\n if (this.loaded)\r\n {\r\n return;\r\n }\r\n\r\n this.loaded = true;\r\n\r\n this.loader.nextFile(this, true);\r\n },\r\n\r\n /**\r\n * Called if the file errors while loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onError\r\n * @since 3.0.0\r\n */\r\n onError: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n var audio = this.data[i];\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n }\r\n\r\n this.loader.nextFile(this, false);\r\n },\r\n\r\n /**\r\n * Called during the file load progress. Is sent a DOM ProgressEvent.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#onProgress\r\n * @fires Phaser.Loader.Events#FILE_PROGRESS\r\n * @since 3.0.0\r\n */\r\n onProgress: function (event)\r\n {\r\n var audio = event.target;\r\n\r\n audio.oncanplaythrough = null;\r\n audio.onerror = null;\r\n\r\n this.filesLoaded++;\r\n\r\n this.percentComplete = Math.min((this.filesLoaded / this.filesTotal), 1);\r\n\r\n this.loader.emit(Events.FILE_PROGRESS, this, this.percentComplete);\r\n\r\n if (this.filesLoaded === this.filesTotal)\r\n {\r\n this.onLoad();\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Loader, starts the actual file downloading.\r\n * During the load the methods onLoad, onError and onProgress are called, based on the XHR events.\r\n * You shouldn't normally call this method directly, it's meant to be invoked by the Loader.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTML5AudioFile#load\r\n * @since 3.0.0\r\n */\r\n load: function ()\r\n {\r\n this.data = [];\r\n\r\n var instances = (this.config && this.config.instances) || 1;\r\n\r\n this.filesTotal = instances;\r\n this.filesLoaded = 0;\r\n this.percentComplete = 0;\r\n\r\n for (var i = 0; i < instances; i++)\r\n {\r\n var audio = new Audio();\r\n audio.dataset = {};\r\n audio.dataset.name = this.key + ('0' + i).slice(-2);\r\n audio.dataset.used = 'false';\r\n\r\n if (this.locked)\r\n {\r\n audio.dataset.locked = 'true';\r\n }\r\n else\r\n {\r\n audio.dataset.locked = 'false';\r\n\r\n audio.preload = 'auto';\r\n audio.oncanplaythrough = this.onProgress.bind(this);\r\n audio.onerror = this.onError.bind(this);\r\n }\r\n\r\n this.data.push(audio);\r\n }\r\n\r\n for (i = 0; i < this.data.length; i++)\r\n {\r\n audio = this.data[i];\r\n audio.src = GetURL(this, this.loader.baseURL);\r\n\r\n if (!this.locked)\r\n {\r\n audio.load();\r\n }\r\n }\r\n\r\n if (this.locked)\r\n {\r\n // This is super-dangerous but works. Race condition potential high.\r\n // Is there another way?\r\n setTimeout(this.onLoad.bind(this));\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#html method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#html.\r\n *\r\n * @class HTMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.html,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML file, or array of HTML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.html('story', 'files/LoginForm.html');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global HTML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the HTML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the HTML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.html({\r\n * key: 'login',\r\n * url: 'files/LoginForm.html'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.html('login', 'files/LoginForm.html');\r\n * // and later in your game ...\r\n * var data = this.cache.html.get('login');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the html from the HTML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#html\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('html', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single HTML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#htmlTexture method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#htmlTexture.\r\n *\r\n * @class HTMLTextureFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {integer} [width] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar HTMLTextureFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function HTMLTextureFile (loader, key, url, width, height, xhrSettings)\r\n {\r\n if (width === undefined) { width = 512; }\r\n if (height === undefined) { height = 512; }\r\n\r\n var extension = 'html';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n width = GetFastValue(config, 'width', width);\r\n height = GetFastValue(config, 'height', height);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'html',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: width,\r\n height: height\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var w = this.config.width;\r\n var h = this.config.height;\r\n\r\n var data = [];\r\n\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n data.push(this.xhrLoader.responseText);\r\n data.push('');\r\n data.push('');\r\n data.push('');\r\n\r\n var svg = [ data.join('\\n') ];\r\n var _this = this;\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n _this.state = CONST.FILE_ERRORED;\r\n\r\n _this.onProcessComplete();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.HTMLTextureFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an HTML File, or array of HTML Files, to the current load queue. When the files are loaded they\r\n * will be rendered to textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture({\r\n * key: 'instructions',\r\n * url: 'content/intro.html',\r\n * width: 256,\r\n * height: 512\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.htmlTexture('instructions', 'content/intro.html', 256, 512);\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'instructions');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * The width and height are the size of the texture to which the HTML will be rendered. It's not possible to determine these\r\n * automatically, so you will need to provide them, either as arguments or in the file config object.\r\n * When the HTML file has loaded a new SVG element is created with a size and viewbox set to the width and height given.\r\n * The SVG file has a body tag added to it, with the HTML file contents included. It then calls `window.Blob` on the SVG,\r\n * and if successful is added to the Texture Manager, otherwise it fails processing. The overall quality of the rendered\r\n * HTML depends on your browser, and some of them may not even support the svg / blob process used. Be aware that there are\r\n * limitations on what HTML can be inside an SVG. You can find out more details in this\r\n * [Mozilla MDN entry](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas).\r\n *\r\n * Note: The ability to load this type of file will only be available if the HTMLTextureFile File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#htmlTexture\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.12.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was \"alien\" then the URL will be \"alien.html\".\r\n * @param {integer} [width=512] - The width of the texture the HTML will be rendered to.\r\n * @param {integer} [height=512] - The height of the texture the HTML will be rendered to.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new HTMLTextureFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new HTMLTextureFile(this, key, url, width, height, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = HTMLTextureFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js?")},"./node_modules/phaser/src/loader/filetypes/ImageFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#image method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#image.\r\n *\r\n * @class ImageFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. Only provided for, and used by, Sprite Sheets.\r\n */\r\nvar ImageFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ImageFile (loader, key, url, xhrSettings, frameConfig)\r\n {\r\n var extension = 'png';\r\n var normalMapURL;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n normalMapURL = GetFastValue(config, 'normalMap');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n frameConfig = GetFastValue(config, 'frameConfig');\r\n }\r\n\r\n if (Array.isArray(url))\r\n {\r\n normalMapURL = url[1];\r\n url = url[0];\r\n }\r\n\r\n var fileConfig = {\r\n type: 'image',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'blob',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: frameConfig\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // Do we have a normal map to load as well?\r\n if (normalMapURL)\r\n {\r\n var normalMap = new ImageFile(loader, this.key, normalMapURL, xhrSettings, frameConfig);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n this.setLink(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n\r\n this.data.onload = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.onProcessError();\r\n };\r\n\r\n File.createObjectURL(this.data, this.xhrLoader.response, 'image/png');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.ImageFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture;\r\n var linkFile = this.linkFile;\r\n\r\n if (linkFile && linkFile.state === CONST.FILE_COMPLETE)\r\n {\r\n if (this.type === 'image')\r\n {\r\n texture = this.cache.addImage(this.key, this.data, linkFile.data);\r\n }\r\n else\r\n {\r\n texture = this.cache.addImage(linkFile.key, linkFile.data, this.data);\r\n }\r\n\r\n this.pendingDestroy(texture);\r\n\r\n linkFile.pendingDestroy(texture);\r\n }\r\n else if (!linkFile)\r\n {\r\n texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Image, or array of Images, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.image('logo', 'images/phaserLogo.png');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', 'images/AtariLogo.png');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'logo');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]);\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.image({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Image File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#image\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('image', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ImageFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ImageFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ImageFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ImageFile.js?")},"./node_modules/phaser/src/loader/filetypes/JSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#json method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#json.\r\n *\r\n * @class JSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar JSONFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function JSONFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n var extension = 'json';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n dataKey = GetFastValue(config, 'dataKey', dataKey);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'json',\r\n cache: loader.cacheManager.json,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: dataKey\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n if (IsPlainObject(url))\r\n {\r\n // Object provided instead of a URL, so no need to actually load it (populate data with value)\r\n if (dataKey)\r\n {\r\n this.data = GetValue(url, dataKey);\r\n }\r\n else\r\n {\r\n this.data = url;\r\n }\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.JSONFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var json = JSON.parse(this.xhrLoader.responseText);\r\n\r\n var key = this.config;\r\n\r\n if (typeof key === 'string')\r\n {\r\n this.data = GetValue(json, key, json);\r\n }\r\n else\r\n {\r\n this.data = json;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON file, or array of JSON files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.json({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.json('wavedata', 'files/AlienWaveData.json');\r\n * // and later in your game ...\r\n * var data = this.cache.json.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * \"level1\": {\r\n * \"baddies\": {\r\n * \"aliens\": {},\r\n * \"boss\": {}\r\n * }\r\n * },\r\n * \"level2\": {},\r\n * \"level3\": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#json\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('json', function (key, url, dataKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new JSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new JSONFile(this, key, url, xhrSettings, dataKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = JSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/JSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Multi Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#multiatlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#multiatlas.\r\n *\r\n * @class MultiAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {string} key - The key of the file. Must be unique within both the Loader and the Texture Manager.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the multi atlas json file from.\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - Extra XHR Settings specifically for the atlas json file.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - Extra XHR Settings specifically for the texture files.\r\n */\r\nvar MultiAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiAtlasFile (loader, key, atlasURL, path, baseURL, atlasXhrSettings, textureXhrSettings)\r\n {\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n atlasURL = GetFastValue(config, 'url');\r\n atlasXhrSettings = GetFastValue(config, 'xhrSettings');\r\n path = GetFastValue(config, 'path');\r\n baseURL = GetFastValue(config, 'baseURL');\r\n textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n }\r\n\r\n var data = new JSONFile(loader, key, atlasURL, atlasXhrSettings);\r\n\r\n MultiFile.call(this, loader, 'multiatlas', key, [ data ]);\r\n\r\n this.config.path = path;\r\n this.config.baseURL = baseURL;\r\n this.config.textureXhrSettings = textureXhrSettings;\r\n },\r\n\r\n /**\r\n * Called by each File when it finishes loading.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#onFileComplete\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.File} file - The File that has completed processing.\r\n */\r\n onFileComplete: function (file)\r\n {\r\n var index = this.files.indexOf(file);\r\n\r\n if (index !== -1)\r\n {\r\n this.pending--;\r\n\r\n if (file.type === 'json' && file.data.hasOwnProperty('textures'))\r\n {\r\n // Inspect the data for the files to now load\r\n var textures = file.data.textures;\r\n\r\n var config = this.config;\r\n var loader = this.loader;\r\n\r\n var currentBaseURL = loader.baseURL;\r\n var currentPath = loader.path;\r\n var currentPrefix = loader.prefix;\r\n\r\n var baseURL = GetFastValue(config, 'baseURL', currentBaseURL);\r\n var path = GetFastValue(config, 'path', currentPath);\r\n var prefix = GetFastValue(config, 'prefix', currentPrefix);\r\n var textureXhrSettings = GetFastValue(config, 'textureXhrSettings');\r\n\r\n loader.setBaseURL(baseURL);\r\n loader.setPath(path);\r\n loader.setPrefix(prefix);\r\n\r\n for (var i = 0; i < textures.length; i++)\r\n {\r\n // \"image\": \"texture-packer-multi-atlas-0.png\",\r\n var textureURL = textures[i].image;\r\n\r\n var key = '_MA_' + textureURL;\r\n\r\n var image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n\r\n this.addToMultiFile(image);\r\n\r\n loader.addFile(image);\r\n\r\n // \"normalMap\": \"texture-packer-multi-atlas-0_n.png\",\r\n if (textures[i].normalMap)\r\n {\r\n var normalMap = new ImageFile(loader, key, textures[i].normalMap, textureXhrSettings);\r\n\r\n normalMap.type = 'normalMap';\r\n\r\n image.setLink(normalMap);\r\n\r\n this.addToMultiFile(normalMap);\r\n\r\n loader.addFile(normalMap);\r\n }\r\n }\r\n\r\n // Reset the loader settings\r\n loader.setBaseURL(currentBaseURL);\r\n loader.setPath(currentPath);\r\n loader.setPrefix(currentPrefix);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var fileJSON = this.files[0];\r\n\r\n fileJSON.addToCache();\r\n\r\n var data = [];\r\n var images = [];\r\n var normalMaps = [];\r\n\r\n for (var i = 1; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n if (file.type === 'normalMap')\r\n {\r\n continue;\r\n }\r\n\r\n var key = file.key.substr(4);\r\n var image = file.data;\r\n\r\n // Now we need to find out which json entry this mapped to\r\n for (var t = 0; t < fileJSON.data.textures.length; t++)\r\n {\r\n var item = fileJSON.data.textures[t];\r\n\r\n if (item.image === key)\r\n {\r\n images.push(image);\r\n \r\n data.push(item);\r\n\r\n if (file.linkFile)\r\n {\r\n normalMaps.push(file.linkFile.data);\r\n }\r\n\r\n break;\r\n }\r\n }\r\n }\r\n\r\n if (normalMaps.length === 0)\r\n {\r\n normalMaps = undefined;\r\n }\r\n\r\n this.loader.textureManager.addAtlasJSONArray(this.key, images, data, normalMaps);\r\n\r\n this.complete = true;\r\n\r\n for (i = 0; i < this.files.length; i++)\r\n {\r\n this.files[i].pendingDestroy();\r\n }\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a JSON file as exported from the application Texture Packer,\r\n * version 4.6.3 or above, where you have made sure to use the Phaser 3 Export option.\r\n *\r\n * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and\r\n * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps,\r\n * Phaser will load those as well.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas({\r\n * key: 'level1',\r\n * atlasURL: 'images/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig` for more details.\r\n *\r\n * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.multiatlas('level1', 'images/Level1.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'level1', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Multi Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#multiatlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas json data file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {string} [path] - Optional path to use when loading the textures defined in the atlas data.\r\n * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiAtlasFile(this, key, atlasURL, path, baseURL, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar ScriptFile = __webpack_require__(/*! ./ScriptFile.js */ \"./node_modules/phaser/src/loader/filetypes/ScriptFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Multi Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scripts method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scripts.\r\n *\r\n * @class MultiScriptFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object for the script files. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar MultiScriptFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function MultiScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n var files = [];\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n if (!Array.isArray(url))\r\n {\r\n url = [ url ];\r\n }\r\n\r\n for (var i = 0; i < url.length; i++)\r\n {\r\n var scriptFile = new ScriptFile(loader, {\r\n key: key + '_' + i.toString(),\r\n url: url[i],\r\n extension: extension,\r\n xhrSettings: xhrSettings\r\n });\r\n\r\n // Override the default onProcess function\r\n scriptFile.onProcess = function ()\r\n {\r\n this.onProcessComplete();\r\n };\r\n\r\n files.push(scriptFile);\r\n }\r\n\r\n MultiFile.call(this, loader, 'scripts', key, files);\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.MultiScriptFile#addToCache\r\n * @since 3.17.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n for (var i = 0; i < this.files.length; i++)\r\n {\r\n var file = this.files[i];\r\n\r\n file.data = document.createElement('script');\r\n file.data.language = 'javascript';\r\n file.data.type = 'text/javascript';\r\n file.data.defer = false;\r\n file.data.text = file.xhrLoader.responseText;\r\n \r\n document.head.appendChild(file.data);\r\n }\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an array of Script files to the current load queue.\r\n * \r\n * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method,\r\n * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that\r\n * may have dependancies on each other without worrying about the async nature of traditional script loading.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scripts('PostProcess', [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]);\r\n * }\r\n * ```\r\n * \r\n * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact\r\n * order given in the array.\r\n *\r\n * The files are **not** loaded right away. They are added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the files are queued\r\n * it means you cannot use the files immediately after calling this method, but must wait for the files to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scripts({\r\n * key: 'PostProcess',\r\n * url: [\r\n * 'libs/shaders/CopyShader.js',\r\n * 'libs/postprocessing/EffectComposer.js',\r\n * 'libs/postprocessing/RenderPass.js',\r\n * 'libs/postprocessing/MaskPass.js',\r\n * 'libs/postprocessing/ShaderPass.js',\r\n * 'libs/postprocessing/AfterimagePass.js'\r\n * ]\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.MultiScriptFileConfig` for more details.\r\n *\r\n * Once all the files have finished loading they will automatically be converted into a script element\r\n * via `document.createElement('script')`. They will have their language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. This is done in the exact order the files are specified in the url array.\r\n *\r\n * The URLs can be relative or absolute. If the URLs are relative the `Loader.baseURL` and `Loader.path` values will be prepended to them.\r\n *\r\n * Note: The ability to load this type of file will only be available if the MultiScript File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scripts\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.17.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string[]} [url] - An array of absolute or relative URLs to load the script files from. They are processed in the order given in the array.\r\n * @param {string} [extension='js'] - The default file extension to use if no url is provided.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scripts', function (key, url, xhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new MultiScriptFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new MultiScriptFile(this, key, url, xhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = MultiScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/PackFile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/loader/const.js");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js");\r\n\r\n/**\r\n * @classdesc\r\n * A single JSON Pack File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#pack method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#pack.\r\n *\r\n * @class PackFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n */\r\nvar PackFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n // url can either be a string, in which case it is treated like a proper url, or an object, in which case it is treated as a ready-made JS Object\r\n // dataKey allows you to pluck a specific object out of the JSON and put just that into the cache, rather than the whole thing\r\n\r\n function PackFile (loader, key, url, xhrSettings, dataKey)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings, dataKey);\r\n\r\n this.type = \'packfile\';\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PackFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n if (this.state !== CONST.FILE_POPULATED)\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = JSON.parse(this.xhrLoader.responseText);\r\n }\r\n\r\n // Let\'s pass the pack file data over to the Loader ...\r\n this.loader.addPack(this.data, this.config);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a JSON File Pack, or array of packs, to the current load queue.\r\n *\r\n * You can call this method from within your Scene\'s `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.pack(\'level1\', \'data/Level1Files.json\');\r\n * }\r\n * ```\r\n *\r\n * A File Pack is a JSON file (or object) that contains details about other files that should be added into the Loader.\r\n * Here is a small example:\r\n *\r\n * ```json\r\n * { \r\n * "test1": {\r\n * "files": [\r\n * {\r\n * "type": "image",\r\n * "key": "taikodrummaster",\r\n * "url": "assets/pics/taikodrummaster.jpg"\r\n * },\r\n * {\r\n * "type": "image",\r\n * "key": "sukasuka-chtholly",\r\n * "url": "assets/pics/sukasuka-chtholly.png"\r\n * }\r\n * ]\r\n * },\r\n * "meta": {\r\n * "generated": "1401380327373",\r\n * "app": "Phaser 3 Asset Packer",\r\n * "url": "https://phaser.io",\r\n * "version": "1.0",\r\n * "copyright": "Photon Storm Ltd. 2018"\r\n * }\r\n * }\r\n * ```\r\n *\r\n * The pack can be split into sections. In the example above you\'ll see a section called `test1. You can tell\r\n * the `load.pack` method to parse only a particular section of a pack. The pack is stored in the JSON Cache,\r\n * so you can pass it to the Loader to process additional sections as needed in your game, or you can just load\r\n * them all at once without specifying anything.\r\n *\r\n * The pack file can contain an entry for any type of file that Phaser can load. The object structures exactly\r\n * match that of the file type configs, and all properties available within the file type configs can be used\r\n * in the pack file too.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it\'s already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene\'s `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene\'s `preload` method and then when the\r\n * Scene\'s `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it\'s safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the JSON Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the JSON Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.pack({\r\n * key: \'level1\',\r\n * url: \'data/Level1Files.json\'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PackFileConfig` for more details.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the JSON Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn\'t specified the Loader will take the key and create a filename from that. For example if the key is "data"\r\n * and no URL is given then the Loader will set the URL to be "data.json". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache,\r\n * rather than the whole file. For example, if your JSON data had a structure like this:\r\n * \r\n * ```json\r\n * {\r\n * "level1": {\r\n * "baddies": {\r\n * "aliens": {},\r\n * "boss": {}\r\n * }\r\n * },\r\n * "level2": {},\r\n * "level3": {}\r\n * }\r\n * ```\r\n *\r\n * And you only wanted to store the `boss` data in the Cache, then you could pass `level1.baddies.boss`as the `dataKey`.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Pack File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#pack\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was "alien" then the URL will be "alien.json".\r\n * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register(\'pack\', function (key, url, packKey, xhrSettings)\r\n{\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n this.addFile(new PackFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PackFile(this, key, url, xhrSettings, packKey));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PackFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PackFile.js?')},"./node_modules/phaser/src/loader/filetypes/PluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#plugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#plugin.\r\n *\r\n * @class PluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {boolean} [start=false] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar PluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function PluginFile (loader, key, url, start, mapping, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n start = GetFastValue(config, 'start');\r\n mapping = GetFastValue(config, 'mapping');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'plugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n start: start,\r\n mapping: mapping\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.PluginFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var start = GetFastValue(config, 'start', false);\r\n var mapping = GetFastValue(config, 'mapping', null);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.install(this.key, this.data, start, mapping);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n var plugin = pluginManager.install(this.key, window[this.key], start, mapping);\r\n\r\n if (start || mapping)\r\n {\r\n // Install into the current Scene Systems and Scene\r\n this.loader.systems[mapping] = plugin;\r\n this.loader.scene[mapping] = plugin;\r\n }\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.plugin('modplayer', 'plugins/ModPlayer.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.plugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.PluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Plugin File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#plugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, a plugin function.\r\n * @param {boolean} [start] - Automatically start the plugin after loading?\r\n * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new PluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new PluginFile(this, key, url, start, mapping, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = PluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/PluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/SVGFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single SVG File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#svg method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#svg.\r\n *\r\n * @class SVGFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SVGFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SVGFile (loader, key, url, svgConfig, xhrSettings)\r\n {\r\n var extension = 'svg';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n svgConfig = GetFastValue(config, 'svgConfig', {});\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'svg',\r\n cache: loader.textureManager,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n width: GetFastValue(svgConfig, 'width'),\r\n height: GetFastValue(svgConfig, 'height'),\r\n scale: GetFastValue(svgConfig, 'scale')\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n var text = this.xhrLoader.responseText;\r\n var svg = [ text ];\r\n var width = this.config.width;\r\n var height = this.config.height;\r\n var scale = this.config.scale;\r\n\r\n resize: if (width && height || scale)\r\n {\r\n var xml = null;\r\n var parser = new DOMParser();\r\n xml = parser.parseFromString(text, 'text/xml');\r\n var svgXML = xml.getElementsByTagName('svg')[0];\r\n\r\n var hasViewBox = svgXML.hasAttribute('viewBox');\r\n var svgWidth = parseFloat(svgXML.getAttribute('width'));\r\n var svgHeight = parseFloat(svgXML.getAttribute('height'));\r\n\r\n if (!hasViewBox && svgWidth && svgHeight)\r\n {\r\n // If there's no viewBox attribute, set one\r\n svgXML.setAttribute('viewBox', '0 0 ' + svgWidth + ' ' + svgHeight);\r\n }\r\n else if (hasViewBox && !svgWidth && !svgHeight)\r\n {\r\n // Get the w/h from the viewbox\r\n var viewBox = svgXML.getAttribute('viewBox').split(/\\s+|,/);\r\n\r\n svgWidth = viewBox[2];\r\n svgHeight = viewBox[3];\r\n }\r\n\r\n if (scale)\r\n {\r\n if (svgWidth && svgHeight)\r\n {\r\n width = svgWidth * scale;\r\n height = svgHeight * scale;\r\n }\r\n else\r\n {\r\n break resize;\r\n }\r\n }\r\n\r\n svgXML.setAttribute('width', width.toString() + 'px');\r\n svgXML.setAttribute('height', height.toString() + 'px');\r\n\r\n svg = [ (new XMLSerializer()).serializeToString(svgXML) ];\r\n }\r\n\r\n try\r\n {\r\n var blob = new window.Blob(svg, { type: 'image/svg+xml;charset=utf-8' });\r\n }\r\n catch (e)\r\n {\r\n this.onProcessError();\r\n\r\n return;\r\n }\r\n\r\n this.data = new Image();\r\n\r\n this.data.crossOrigin = this.crossOrigin;\r\n\r\n var _this = this;\r\n var retry = false;\r\n\r\n this.data.onload = function ()\r\n {\r\n if (!retry)\r\n {\r\n File.revokeObjectURL(_this.data);\r\n }\r\n\r\n _this.onProcessComplete();\r\n };\r\n\r\n this.data.onerror = function ()\r\n {\r\n // Safari 8 re-try\r\n if (!retry)\r\n {\r\n retry = true;\r\n\r\n File.revokeObjectURL(_this.data);\r\n\r\n _this.data.src = 'data:image/svg+xml,' + encodeURIComponent(svg.join(''));\r\n }\r\n else\r\n {\r\n _this.onProcessError();\r\n }\r\n };\r\n\r\n File.createObjectURL(this.data, blob, 'image/svg+xml');\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SVGFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addImage(this.key, this.data);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an SVG File, or array of SVG Files, to the current load queue. When the files are loaded they\r\n * will be rendered to bitmap textures and stored in the Texture Manager.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SVGFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n *\r\n * ```javascript\r\n * this.load.svg('morty', 'images/Morty.svg');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'morty');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.html\". It will always add `.html` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n * \r\n * You can optionally pass an SVG Resize Configuration object when you load an SVG file. By default the SVG will be rendered to a texture\r\n * at the same size defined in the SVG file attributes. However, this isn't always desirable. You may wish to resize the SVG (either down\r\n * or up) to improve texture clarity, or reduce texture memory consumption. You can either specify an exact width and height to resize\r\n * the SVG to:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { width: 300, height: 600 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * width: 300,\r\n * height: 600\r\n * }\r\n * });\r\n * ```\r\n * \r\n * Alternatively, you can just provide a scale factor instead:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.svg('morty', 'images/Morty.svg', { scale: 2.5 });\r\n * }\r\n * ```\r\n * \r\n * Or when using a configuration object:\r\n * \r\n * ```javascript\r\n * this.load.svg({\r\n * key: 'morty',\r\n * url: 'images/Morty.svg',\r\n * svgConfig: {\r\n * scale: 2.5\r\n * }\r\n * });\r\n * ```\r\n * \r\n * If scale, width and height values are all given, the scale has priority and the width and height values are ignored.\r\n *\r\n * Note: The ability to load this type of file will only be available if the SVG File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#svg\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.svg`, i.e. if `key` was \"alien\" then the URL will be \"alien.svg\".\r\n * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SVGFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SVGFile(this, key, url, svgConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SVGFile;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SVGFile.js?")},"./node_modules/phaser/src/loader/filetypes/SceneFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An external Scene JavaScript File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#sceneFile method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#sceneFile.\r\n *\r\n * @class SceneFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SceneFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function SceneFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#onProcess\r\n * @since 3.16.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SceneFile#addToCache\r\n * @since 3.16.0\r\n */\r\n addToCache: function ()\r\n {\r\n var code = this.data.concat('(function(){\\n' + 'return new ' + this.key + '();\\n' + '}).call(this);');\r\n\r\n this.loader.sceneManager.add(this.key, eval(code));\r\n\r\n this.complete = true;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an external Scene file, or array of Scene files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load.\r\n * \r\n * For a Scene File it's vitally important that the key matches the class name in the JavaScript file.\r\n * \r\n * For example here is the source file:\r\n * \r\n * ```javascript\r\n * class ExternalScene extends Phaser.Scene {\r\n * \r\n * constructor ()\r\n * {\r\n * super('myScene');\r\n * }\r\n * \r\n * }\r\n * ```\r\n * \r\n * Because the class is called `ExternalScene` that is the exact same key you must use when loading it:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.sceneFile('ExternalScene', 'src/yourScene.js');\r\n * }\r\n * ```\r\n * \r\n * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene\r\n * constructor, as we've done in the example above, where the Scene key was changed to `myScene`.\r\n * \r\n * The key should be unique both in terms of files being loaded and Scenes already present in the Scene Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Scene Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.sceneFile({\r\n * key: 'Level1',\r\n * url: 'src/Level1.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SceneFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will be added to the Scene Manager.\r\n *\r\n * ```javascript\r\n * this.load.sceneFile('Level1', 'src/Level1.js');\r\n * // and later in your game ...\r\n * this.scene.start('Level1');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `WORLD1.` and the key was `Story` the final key will be `WORLD1.Story` and\r\n * this is what you would use to retrieve the text from the Scene Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Scene File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#sceneFile\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.16.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('sceneFile', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SceneFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SceneFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SceneFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SceneFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Scene Plugin Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#scenePlugin method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#scenePlugin.\r\n *\r\n * @class ScenePluginFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScenePluginFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScenePluginFile (loader, key, url, systemKey, sceneKey, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n systemKey = GetFastValue(config, 'systemKey');\r\n sceneKey = GetFastValue(config, 'sceneKey');\r\n }\r\n\r\n var fileConfig = {\r\n type: 'scenePlugin',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings,\r\n config: {\r\n systemKey: systemKey,\r\n sceneKey: sceneKey\r\n }\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n // If the url variable refers to a class, add the plugin directly\r\n if (typeof url === 'function')\r\n {\r\n this.data = url;\r\n\r\n this.state = CONST.FILE_POPULATED;\r\n }\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScenePluginFile#onProcess\r\n * @since 3.8.0\r\n */\r\n onProcess: function ()\r\n {\r\n var pluginManager = this.loader.systems.plugins;\r\n var config = this.config;\r\n\r\n var key = this.key;\r\n var systemKey = GetFastValue(config, 'systemKey', key);\r\n var sceneKey = GetFastValue(config, 'sceneKey', key);\r\n\r\n if (this.state === CONST.FILE_POPULATED)\r\n {\r\n pluginManager.installScenePlugin(systemKey, this.data, sceneKey, this.loader.scene, true);\r\n }\r\n else\r\n {\r\n // Plugin added via a js file\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n pluginManager.installScenePlugin(systemKey, window[this.key], sceneKey, this.loader.scene, true);\r\n }\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.scenePlugin('ModPlayer', 'plugins/ModPlayer.js', 'modPlayer', 'mods');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.scenePlugin({\r\n * key: 'modplayer',\r\n * url: 'plugins/ModPlayer.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScenePluginFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed. It will then be passed to the Phaser PluginCache.register method.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#scenePlugin\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.8.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {(string|function)} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\". Or, set to a plugin function.\r\n * @param {string} [systemKey] - If this plugin is to be added to Scene.Systems, this is the property key for it.\r\n * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScenePluginFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScenePluginFile(this, key, url, systemKey, sceneKey, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScenePluginFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js?")},"./node_modules/phaser/src/loader/filetypes/ScriptFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Script File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#script method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#script.\r\n *\r\n * @class ScriptFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar ScriptFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function ScriptFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'js';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'script',\r\n cache: false,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.ScriptFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = document.createElement('script');\r\n this.data.language = 'javascript';\r\n this.data.type = 'text/javascript';\r\n this.data.defer = false;\r\n this.data.text = this.xhrLoader.responseText;\r\n\r\n document.head.appendChild(this.data);\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Script file, or array of Script files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.script('aliens', 'lib/aliens.js');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String and not already in-use by another file in the Loader.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.script({\r\n * key: 'aliens',\r\n * url: 'lib/aliens.js'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.ScriptFileConfig` for more details.\r\n *\r\n * Once the file has finished loading it will automatically be converted into a script element\r\n * via `document.createElement('script')`. It will have its language set to JavaScript, `defer` set to\r\n * false and then the resulting element will be appended to `document.head`. Any code then in the\r\n * script will be executed.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.js\". It will always add `.js` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Script File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#script\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.js`, i.e. if `key` was \"alien\" then the URL will be \"alien.js\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('script', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new ScriptFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new ScriptFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = ScriptFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/ScriptFile.js?")},"./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Sprite Sheet Image File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#spritesheet method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#spritesheet.\r\n *\r\n * @class SpriteSheetFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar SpriteSheetFile = new Class({\r\n\r\n Extends: ImageFile,\r\n\r\n initialize:\r\n\r\n function SpriteSheetFile (loader, key, url, frameConfig, xhrSettings)\r\n {\r\n ImageFile.call(this, loader, key, url, xhrSettings, frameConfig);\r\n\r\n this.type = 'spritesheet';\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.SpriteSheetFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var texture = this.cache.addSpriteSheet(this.key, this.data, this.config);\r\n\r\n this.pendingDestroy(texture);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Sprite Sheet Image, or array of Sprite Sheet Images, to the current load queue.\r\n *\r\n * The term 'Sprite Sheet' in Phaser means a fixed-size sheet. Where every frame in the sheet is the exact same size,\r\n * and you reference those frames using numbers, not frame names. This is not the same thing as a Texture Atlas, where\r\n * the frames are packed in a way where they take up the least amount of space, and are referenced by their names,\r\n * not numbers. Some articles and software use the term 'Sprite Sheet' to mean Texture Atlas, so please be aware of\r\n * what sort of file you're actually trying to load.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback\r\n * of animated gifs to Canvas elements.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'bot',\r\n * url: 'images/robot.png',\r\n * frameConfig: {\r\n * frameWidth: 32,\r\n * frameHeight: 38,\r\n * startFrame: 0,\r\n * endFrame: 8\r\n * }\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can use it as a texture for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('bot', 'images/robot.png', { frameWidth: 32, frameHeight: 38 });\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'bot', 0);\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `PLAYER.` and the key was `Running` the final key will be `PLAYER.Running` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ], { frameWidth: 256, frameHeight: 80 });\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.spritesheet({\r\n * key: 'logo',\r\n * url: 'images/AtariLogo.png',\r\n * normalMap: 'images/AtariLogo-n.png',\r\n * frameConfig: {\r\n * frameWidth: 256,\r\n * frameHeight: 80\r\n * }\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n * \r\n * Note: The ability to load this type of file will only be available if the Sprite Sheet File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#spritesheet\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new SpriteSheetFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new SpriteSheetFile(this, key, url, frameConfig, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = SpriteSheetFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js?")},"./node_modules/phaser/src/loader/filetypes/TextFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Text File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#text method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#text.\r\n *\r\n * @class TextFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TextFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TextFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'txt';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'text',\r\n cache: loader.cacheManager.text,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TextFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Text file, or array of Text files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Text Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Text Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.text({\r\n * key: 'story',\r\n * url: 'files/IntroStory.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TextFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.text('story', 'files/IntroStory.txt');\r\n * // and later in your game ...\r\n * var data = this.cache.text.get('story');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Text Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"story\"\r\n * and no URL is given then the Loader will set the URL to be \"story.txt\". It will always add `.txt` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Text File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#text\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('text', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TextFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TextFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TextFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TextFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tilemap CSV File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapCSV method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapCSV.\r\n *\r\n * @class TilemapCSVFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapCSVFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function TilemapCSVFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'csv';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'tilemapCSV',\r\n cache: loader.cacheManager.tilemap,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n\r\n this.tilemapFormat = TILEMAP_FORMATS.CSV;\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = this.xhrLoader.responseText;\r\n\r\n this.onProcessComplete();\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapCSVFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: this.tilemapFormat, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a CSV Tilemap file, or array of CSV files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * }\r\n * ```\r\n *\r\n * Tilemap CSV data can be created in a text editor, or a 3rd party app that exports as CSV.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV({\r\n * key: 'level1',\r\n * url: 'maps/Level1.csv'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapCSV('level1', 'maps/Level1.csv');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.csv\". It will always add `.csv` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap CSV File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapCSV\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.csv`, i.e. if `key` was \"alien\" then the URL will be \"alien.csv\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapCSV', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapCSVFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapCSVFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapCSVFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Impact.js Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapImpact method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapImpact.\r\n *\r\n * @class TilemapImpactFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapImpactFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapImpactFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapImpactFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.WELTMEISTER, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an Impact.js Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * Impact Tilemap data is created the Impact.js Map Editor called Weltmeister.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapImpact('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap Impact File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapImpact\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapImpact', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapImpactFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapImpactFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapImpactFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js?")},"./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar JSONFile = __webpack_require__(/*! ./JSONFile.js */ \"./node_modules/phaser/src/loader/filetypes/JSONFile.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single Tiled Tilemap JSON File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#tilemapTiledJSON method and are not typically created directly.\r\n *\r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#tilemapTiledJSON.\r\n *\r\n * @class TilemapJSONFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar TilemapJSONFile = new Class({\r\n\r\n Extends: JSONFile,\r\n\r\n initialize:\r\n\r\n function TilemapJSONFile (loader, key, url, xhrSettings)\r\n {\r\n JSONFile.call(this, loader, key, url, xhrSettings);\r\n\r\n this.type = 'tilemapJSON';\r\n\r\n this.cache = loader.cacheManager.tilemap;\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.TilemapJSONFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n var tiledata = { format: TILEMAP_FORMATS.TILED_JSON, data: this.data };\r\n\r\n this.cache.add(this.key, tiledata);\r\n\r\n this.pendingDestroy(tiledata);\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Tiled JSON Tilemap file, or array of map files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n *\r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * }\r\n * ```\r\n *\r\n * The Tilemap data is created using the Tiled Map Editor and selecting JSON as the export format.\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Tilemap Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Tilemap Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Text Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON({\r\n * key: 'level1',\r\n * url: 'maps/Level1.json'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n *\r\n * ```javascript\r\n * this.load.tilemapTiledJSON('level1', 'maps/Level1.json');\r\n * // and later in your game ...\r\n * var map = this.make.tilemap({ key: 'level1' });\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Story` the final key will be `LEVEL1.Story` and\r\n * this is what you would use to retrieve the text from the Tilemap Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"level\"\r\n * and no URL is given then the Loader will set the URL to be \"level.json\". It will always add `.json` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Tilemap JSON File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.json`, i.e. if `key` was \"alien\" then the URL will be \"alien.json\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new TilemapJSONFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new TilemapJSONFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = TilemapJSONFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js?")},"./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ImageFile = __webpack_require__(/*! ./ImageFile.js */ \"./node_modules/phaser/src/loader/filetypes/ImageFile.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar MultiFile = __webpack_require__(/*! ../MultiFile.js */ \"./node_modules/phaser/src/loader/MultiFile.js\");\r\nvar TextFile = __webpack_require__(/*! ./TextFile.js */ \"./node_modules/phaser/src/loader/filetypes/TextFile.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single text file based Unity Texture Atlas File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#unityAtlas method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#unityAtlas.\r\n *\r\n * @class UnityAtlasFile\r\n * @extends Phaser.Loader.MultiFile\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n */\r\nvar UnityAtlasFile = new Class({\r\n\r\n Extends: MultiFile,\r\n\r\n initialize:\r\n\r\n function UnityAtlasFile (loader, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n {\r\n var image;\r\n var data;\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n\r\n image = new ImageFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'textureURL'),\r\n extension: GetFastValue(config, 'textureExtension', 'png'),\r\n normalMap: GetFastValue(config, 'normalMap'),\r\n xhrSettings: GetFastValue(config, 'textureXhrSettings')\r\n });\r\n\r\n data = new TextFile(loader, {\r\n key: key,\r\n url: GetFastValue(config, 'atlasURL'),\r\n extension: GetFastValue(config, 'atlasExtension', 'txt'),\r\n xhrSettings: GetFastValue(config, 'atlasXhrSettings')\r\n });\r\n }\r\n else\r\n {\r\n image = new ImageFile(loader, key, textureURL, textureXhrSettings);\r\n data = new TextFile(loader, key, atlasURL, atlasXhrSettings);\r\n }\r\n\r\n if (image.linkFile)\r\n {\r\n // Image has a normal map\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data, image.linkFile ]);\r\n }\r\n else\r\n {\r\n MultiFile.call(this, loader, 'unityatlas', key, [ image, data ]);\r\n }\r\n },\r\n\r\n /**\r\n * Adds this file to its target cache upon successful loading and processing.\r\n *\r\n * @method Phaser.Loader.FileTypes.UnityAtlasFile#addToCache\r\n * @since 3.7.0\r\n */\r\n addToCache: function ()\r\n {\r\n if (this.isReadyToProcess())\r\n {\r\n var image = this.files[0];\r\n var text = this.files[1];\r\n var normalMap = (this.files[2]) ? this.files[2].data : null;\r\n\r\n this.loader.textureManager.addUnityAtlas(image.key, image.data, text.data, normalMap);\r\n\r\n text.addToCache();\r\n\r\n this.complete = true;\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.txt');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring\r\n * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details.\r\n *\r\n * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity.\r\n * \r\n * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.\r\n *\r\n * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the Texture Manager.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the Texture Manager first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details.\r\n *\r\n * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json');\r\n * // and later in your game ...\r\n * this.add.image(x, y, 'mainmenu', 'background');\r\n * ```\r\n *\r\n * To get a list of all available frames within an atlas please consult your Texture Atlas software.\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `MENU.` and the key was `Background` the final key will be `MENU.Background` and\r\n * this is what you would use to retrieve the image from the Texture Manager.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"alien\"\r\n * and no URL is given then the Loader will set the URL to be \"alien.png\". It will always add `.png` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image,\r\n * then you can specify it by providing an array as the `url` where the second element is the normal map:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt');\r\n * ```\r\n *\r\n * Or, if you are using a config object use the `normalMap` property:\r\n * \r\n * ```javascript\r\n * this.load.unityAtlas({\r\n * key: 'mainmenu',\r\n * textureURL: 'images/MainMenu.png',\r\n * normalMap: 'images/MainMenu-n.png',\r\n * atlasURL: 'images/MainMenu.txt'\r\n * });\r\n * ```\r\n *\r\n * The normal map file is subject to the same conditions as the image file with regard to the path, baseURL, CORs and XHR Settings.\r\n * Normal maps are a WebGL only feature.\r\n *\r\n * Note: The ability to load this type of file will only be available if the Unity Atlas File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#unityAtlas\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string|string[]} [textureURL] - The absolute or relative URL to load the texture image file from. If undefined or `null` it will be set to `.png`, i.e. if `key` was \"alien\" then the URL will be \"alien.png\".\r\n * @param {string} [atlasURL] - The absolute or relative URL to load the texture atlas data file from. If undefined or `null` it will be set to `.txt`, i.e. if `key` was \"alien\" then the URL will be \"alien.txt\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings.\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings)\r\n{\r\n var multifile;\r\n\r\n // Supports an Object file definition in the key argument\r\n // Or an array of objects in the key argument\r\n // Or a single entry where all arguments have been defined\r\n\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n multifile = new UnityAtlasFile(this, key[i]);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n }\r\n else\r\n {\r\n multifile = new UnityAtlasFile(this, key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings);\r\n\r\n this.addFile(multifile.files);\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = UnityAtlasFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js?")},"./node_modules/phaser/src/loader/filetypes/XMLFile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/loader/const.js\");\r\nvar File = __webpack_require__(/*! ../File */ \"./node_modules/phaser/src/loader/File.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\nvar ParseXML = __webpack_require__(/*! ../../dom/ParseXML */ \"./node_modules/phaser/src/dom/ParseXML.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A single XML File suitable for loading by the Loader.\r\n *\r\n * These are created when you use the Phaser.Loader.LoaderPlugin#xml method and are not typically created directly.\r\n * \r\n * For documentation about what all the arguments and configuration options mean please see Phaser.Loader.LoaderPlugin#xml.\r\n *\r\n * @class XMLFile\r\n * @extends Phaser.Loader.File\r\n * @memberof Phaser.Loader.FileTypes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - A reference to the Loader that is responsible for this file.\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig)} key - The key to use for this file, or a file configuration object.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for this file.\r\n */\r\nvar XMLFile = new Class({\r\n\r\n Extends: File,\r\n\r\n initialize:\r\n\r\n function XMLFile (loader, key, url, xhrSettings)\r\n {\r\n var extension = 'xml';\r\n\r\n if (IsPlainObject(key))\r\n {\r\n var config = key;\r\n\r\n key = GetFastValue(config, 'key');\r\n url = GetFastValue(config, 'url');\r\n xhrSettings = GetFastValue(config, 'xhrSettings');\r\n extension = GetFastValue(config, 'extension', extension);\r\n }\r\n\r\n var fileConfig = {\r\n type: 'xml',\r\n cache: loader.cacheManager.xml,\r\n extension: extension,\r\n responseType: 'text',\r\n key: key,\r\n url: url,\r\n xhrSettings: xhrSettings\r\n };\r\n\r\n File.call(this, loader, fileConfig);\r\n },\r\n\r\n /**\r\n * Called automatically by Loader.nextFile.\r\n * This method controls what extra work this File does with its loaded data.\r\n *\r\n * @method Phaser.Loader.FileTypes.XMLFile#onProcess\r\n * @since 3.7.0\r\n */\r\n onProcess: function ()\r\n {\r\n this.state = CONST.FILE_PROCESSING;\r\n\r\n this.data = ParseXML(this.xhrLoader.responseText);\r\n\r\n if (this.data)\r\n {\r\n this.onProcessComplete();\r\n }\r\n else\r\n {\r\n console.warn('Invalid XMLFile: ' + this.key);\r\n \r\n this.onProcessError();\r\n }\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Adds an XML file, or array of XML files, to the current load queue.\r\n *\r\n * You can call this method from within your Scene's `preload`, along with any other files you wish to load:\r\n * \r\n * ```javascript\r\n * function preload ()\r\n * {\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * }\r\n * ```\r\n *\r\n * The file is **not** loaded right away. It is added to a queue ready to be loaded either when the loader starts,\r\n * or if it's already running, when the next free load slot becomes available. This happens automatically if you\r\n * are calling this from within the Scene's `preload` method, or a related callback. Because the file is queued\r\n * it means you cannot use the file immediately after calling this method, but must wait for the file to complete.\r\n * The typical flow for a Phaser Scene is that you load assets in the Scene's `preload` method and then when the\r\n * Scene's `create` method is called you are guaranteed that all of those assets are ready for use and have been\r\n * loaded.\r\n * \r\n * The key must be a unique String. It is used to add the file to the global XML Cache upon a successful load.\r\n * The key should be unique both in terms of files being loaded and files already present in the XML Cache.\r\n * Loading a file using a key that is already taken will result in a warning. If you wish to replace an existing file\r\n * then remove it from the XML Cache first, before loading a new one.\r\n *\r\n * Instead of passing arguments you can pass a configuration object, such as:\r\n * \r\n * ```javascript\r\n * this.load.xml({\r\n * key: 'wavedata',\r\n * url: 'files/AlienWaveData.xml'\r\n * });\r\n * ```\r\n *\r\n * See the documentation for `Phaser.Types.Loader.FileTypes.XMLFileConfig` for more details.\r\n *\r\n * Once the file has finished loading you can access it from its Cache using its key:\r\n * \r\n * ```javascript\r\n * this.load.xml('wavedata', 'files/AlienWaveData.xml');\r\n * // and later in your game ...\r\n * var data = this.cache.xml.get('wavedata');\r\n * ```\r\n *\r\n * If you have specified a prefix in the loader, via `Loader.setPrefix` then this value will be prepended to this files\r\n * key. For example, if the prefix was `LEVEL1.` and the key was `Waves` the final key will be `LEVEL1.Waves` and\r\n * this is what you would use to retrieve the text from the XML Cache.\r\n *\r\n * The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.\r\n *\r\n * If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is \"data\"\r\n * and no URL is given then the Loader will set the URL to be \"data.xml\". It will always add `.xml` as the extension, although\r\n * this can be overridden if using an object instead of method arguments. If you do not desire this action then provide a URL.\r\n *\r\n * Note: The ability to load this type of file will only be available if the XML File type has been built into Phaser.\r\n * It is available in the default build but can be excluded from custom builds.\r\n *\r\n * @method Phaser.Loader.LoaderPlugin#xml\r\n * @fires Phaser.Loader.LoaderPlugin#addFileEvent\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them.\r\n * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.xml`, i.e. if `key` was \"alien\" then the URL will be \"alien.xml\".\r\n * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings.\r\n *\r\n * @return {Phaser.Loader.LoaderPlugin} The Loader instance.\r\n */\r\nFileTypesManager.register('xml', function (key, url, xhrSettings)\r\n{\r\n if (Array.isArray(key))\r\n {\r\n for (var i = 0; i < key.length; i++)\r\n {\r\n // If it's an array it has to be an array of Objects, so we get everything out of the 'key' object\r\n this.addFile(new XMLFile(this, key[i]));\r\n }\r\n }\r\n else\r\n {\r\n this.addFile(new XMLFile(this, key, url, xhrSettings));\r\n }\r\n\r\n return this;\r\n});\r\n\r\nmodule.exports = XMLFile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/XMLFile.js?")},"./node_modules/phaser/src/loader/filetypes/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Loader.FileTypes\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AnimationJSONFile: __webpack_require__(/*! ./AnimationJSONFile */ "./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js"),\r\n AtlasJSONFile: __webpack_require__(/*! ./AtlasJSONFile */ "./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js"),\r\n AtlasXMLFile: __webpack_require__(/*! ./AtlasXMLFile */ "./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js"),\r\n AudioFile: __webpack_require__(/*! ./AudioFile */ "./node_modules/phaser/src/loader/filetypes/AudioFile.js"),\r\n AudioSpriteFile: __webpack_require__(/*! ./AudioSpriteFile */ "./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js"),\r\n BinaryFile: __webpack_require__(/*! ./BinaryFile */ "./node_modules/phaser/src/loader/filetypes/BinaryFile.js"),\r\n BitmapFontFile: __webpack_require__(/*! ./BitmapFontFile */ "./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js"),\r\n CSSFile: __webpack_require__(/*! ./CSSFile */ "./node_modules/phaser/src/loader/filetypes/CSSFile.js"),\r\n GLSLFile: __webpack_require__(/*! ./GLSLFile */ "./node_modules/phaser/src/loader/filetypes/GLSLFile.js"),\r\n HTML5AudioFile: __webpack_require__(/*! ./HTML5AudioFile */ "./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js"),\r\n HTMLFile: __webpack_require__(/*! ./HTMLFile */ "./node_modules/phaser/src/loader/filetypes/HTMLFile.js"),\r\n HTMLTextureFile: __webpack_require__(/*! ./HTMLTextureFile */ "./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js"),\r\n ImageFile: __webpack_require__(/*! ./ImageFile */ "./node_modules/phaser/src/loader/filetypes/ImageFile.js"),\r\n JSONFile: __webpack_require__(/*! ./JSONFile */ "./node_modules/phaser/src/loader/filetypes/JSONFile.js"),\r\n MultiAtlasFile: __webpack_require__(/*! ./MultiAtlasFile */ "./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js"),\r\n MultiScriptFile: __webpack_require__(/*! ./MultiScriptFile */ "./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js"),\r\n PackFile: __webpack_require__(/*! ./PackFile */ "./node_modules/phaser/src/loader/filetypes/PackFile.js"),\r\n PluginFile: __webpack_require__(/*! ./PluginFile */ "./node_modules/phaser/src/loader/filetypes/PluginFile.js"),\r\n SceneFile: __webpack_require__(/*! ./SceneFile */ "./node_modules/phaser/src/loader/filetypes/SceneFile.js"),\r\n ScenePluginFile: __webpack_require__(/*! ./ScenePluginFile */ "./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js"),\r\n ScriptFile: __webpack_require__(/*! ./ScriptFile */ "./node_modules/phaser/src/loader/filetypes/ScriptFile.js"),\r\n SpriteSheetFile: __webpack_require__(/*! ./SpriteSheetFile */ "./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js"),\r\n SVGFile: __webpack_require__(/*! ./SVGFile */ "./node_modules/phaser/src/loader/filetypes/SVGFile.js"),\r\n TextFile: __webpack_require__(/*! ./TextFile */ "./node_modules/phaser/src/loader/filetypes/TextFile.js"),\r\n TilemapCSVFile: __webpack_require__(/*! ./TilemapCSVFile */ "./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js"),\r\n TilemapImpactFile: __webpack_require__(/*! ./TilemapImpactFile */ "./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js"),\r\n TilemapJSONFile: __webpack_require__(/*! ./TilemapJSONFile */ "./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js"),\r\n UnityAtlasFile: __webpack_require__(/*! ./UnityAtlasFile */ "./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js"),\r\n XMLFile: __webpack_require__(/*! ./XMLFile */ "./node_modules/phaser/src/loader/filetypes/XMLFile.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/filetypes/index.js?')},"./node_modules/phaser/src/loader/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/loader/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Loader\r\n */\r\n\r\nvar Loader = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/loader/events/index.js"),\r\n\r\n FileTypes: __webpack_require__(/*! ./filetypes */ "./node_modules/phaser/src/loader/filetypes/index.js"),\r\n\r\n File: __webpack_require__(/*! ./File */ "./node_modules/phaser/src/loader/File.js"),\r\n FileTypesManager: __webpack_require__(/*! ./FileTypesManager */ "./node_modules/phaser/src/loader/FileTypesManager.js"),\r\n GetURL: __webpack_require__(/*! ./GetURL */ "./node_modules/phaser/src/loader/GetURL.js"),\r\n LoaderPlugin: __webpack_require__(/*! ./LoaderPlugin */ "./node_modules/phaser/src/loader/LoaderPlugin.js"),\r\n MergeXHRSettings: __webpack_require__(/*! ./MergeXHRSettings */ "./node_modules/phaser/src/loader/MergeXHRSettings.js"),\r\n MultiFile: __webpack_require__(/*! ./MultiFile */ "./node_modules/phaser/src/loader/MultiFile.js"),\r\n XHRLoader: __webpack_require__(/*! ./XHRLoader */ "./node_modules/phaser/src/loader/XHRLoader.js"),\r\n XHRSettings: __webpack_require__(/*! ./XHRSettings */ "./node_modules/phaser/src/loader/XHRSettings.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nLoader = Extend(false, Loader, CONST);\r\n\r\nmodule.exports = Loader;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/loader/index.js?')},"./node_modules/phaser/src/math/Average.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the mean average of the given values.\r\n *\r\n * @function Phaser.Math.Average\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} values - The values to average.\r\n *\r\n * @return {number} The average value.\r\n */\r\nvar Average = function (values)\r\n{\r\n var sum = 0;\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n sum += (+values[i]);\r\n }\r\n\r\n return sum / values.length;\r\n};\r\n\r\nmodule.exports = Average;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Average.js?")},"./node_modules/phaser/src/math/Bernstein.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Factorial = __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Math.Bernstein\r\n * @since 3.0.0\r\n *\r\n * @param {number} n - [description]\r\n * @param {number} i - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar Bernstein = function (n, i)\r\n{\r\n return Factorial(n) / Factorial(i) / Factorial(n - i);\r\n};\r\n\r\nmodule.exports = Bernstein;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Bernstein.js?')},"./node_modules/phaser/src/math/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random integer between the `min` and `max` values, inclusive.\r\n *\r\n * @function Phaser.Math.Between\r\n * @since 3.0.0\r\n *\r\n * @param {integer} min - The minimum value.\r\n * @param {integer} max - The maximum value.\r\n *\r\n * @return {integer} The random integer.\r\n */\r\nvar Between = function (min, max)\r\n{\r\n return Math.floor(Math.random() * (max - min + 1) + min);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Between.js?")},"./node_modules/phaser/src/math/CatmullRom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a Catmull-Rom value.\r\n *\r\n * @function Phaser.Math.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - [description]\r\n * @param {number} p0 - [description]\r\n * @param {number} p1 - [description]\r\n * @param {number} p2 - [description]\r\n * @param {number} p3 - [description]\r\n *\r\n * @return {number} The Catmull-Rom value.\r\n */\r\nvar CatmullRom = function (t, p0, p1, p2, p3)\r\n{\r\n var v0 = (p2 - p0) * 0.5;\r\n var v1 = (p3 - p1) * 0.5;\r\n var t2 = t * t;\r\n var t3 = t * t2;\r\n\r\n return (2 * p1 - 2 * p2 + v0 + v1) * t3 + (-3 * p1 + 3 * p2 - 2 * v0 - v1) * t2 + v0 * t + p1;\r\n};\r\n\r\nmodule.exports = CatmullRom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CatmullRom.js?")},"./node_modules/phaser/src/math/CeilTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Ceils to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.CeilTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {number} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar CeilTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.ceil(value * p) / p;\r\n};\r\n\r\nmodule.exports = CeilTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/CeilTo.js?")},"./node_modules/phaser/src/math/Clamp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Force a value within the boundaries by clamping it to the range `min`, `max`.\r\n *\r\n * @function Phaser.Math.Clamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to be clamped.\r\n * @param {number} min - The minimum bounds.\r\n * @param {number} max - The maximum bounds.\r\n *\r\n * @return {number} The clamped value.\r\n */\r\nvar Clamp = function (value, min, max)\r\n{\r\n return Math.max(min, Math.min(max, value));\r\n};\r\n\r\nmodule.exports = Clamp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Clamp.js?")},"./node_modules/phaser/src/math/DegToRad.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle from degrees, to the equivalent angle in radians.\r\n *\r\n * @function Phaser.Math.DegToRad\r\n * @since 3.0.0\r\n *\r\n * @param {integer} degrees - The angle (in degrees) to convert to radians.\r\n *\r\n * @return {number} The given angle converted to radians.\r\n */\r\nvar DegToRad = function (degrees)\r\n{\r\n return degrees * CONST.DEG_TO_RAD;\r\n};\r\n\r\nmodule.exports = DegToRad;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/DegToRad.js?')},"./node_modules/phaser/src/math/Difference.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the positive difference of two given numbers.\r\n *\r\n * @function Phaser.Math.Difference\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first number in the calculation.\r\n * @param {number} b - The second number in the calculation.\r\n *\r\n * @return {number} The positive difference of the two given numbers.\r\n */\r\nvar Difference = function (a, b)\r\n{\r\n return Math.abs(a - b);\r\n};\r\n\r\nmodule.exports = Difference;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Difference.js?")},"./node_modules/phaser/src/math/Factorial.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates the factorial of a given number for integer values greater than 0.\r\n *\r\n * @function Phaser.Math.Factorial\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A positive integer to calculate the factorial of.\r\n *\r\n * @return {number} The factorial of the given number.\r\n */\r\nvar Factorial = function (value)\r\n{\r\n if (value === 0)\r\n {\r\n return 1;\r\n }\r\n\r\n var res = value;\r\n\r\n while (--value)\r\n {\r\n res *= value;\r\n }\r\n\r\n return res;\r\n};\r\n\r\nmodule.exports = Factorial;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Factorial.js?")},"./node_modules/phaser/src/math/FloatBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive.\r\n *\r\n * @function Phaser.Math.FloatBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The lower bound for the float, inclusive.\r\n * @param {number} max - The upper bound for the float exclusive.\r\n *\r\n * @return {number} A random float within the given range.\r\n */\r\nvar FloatBetween = function (min, max)\r\n{\r\n return Math.random() * (max - min) + min;\r\n};\r\n\r\nmodule.exports = FloatBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloatBetween.js?")},"./node_modules/phaser/src/math/FloorTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Floors to some place comparative to a `base`, default is 10 for decimal place.\r\n *\r\n * The `place` is represented by the power applied to `base` to get that place.\r\n *\r\n * @function Phaser.Math.FloorTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar FloorTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.floor(value * p) / p;\r\n};\r\n\r\nmodule.exports = FloorTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FloorTo.js?")},"./node_modules/phaser/src/math/FromPercent.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Return a value based on the range between `min` and `max` and the percentage given.\r\n *\r\n * @function Phaser.Math.FromPercent\r\n * @since 3.0.0\r\n *\r\n * @param {number} percent - A value between 0 and 1 representing the percentage.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n *\r\n * @return {number} The value that is `percent` percent between `min` and `max`.\r\n */\r\nvar FromPercent = function (percent, min, max)\r\n{\r\n percent = Clamp(percent, 0, 1);\r\n\r\n return (max - min) * percent;\r\n};\r\n\r\nmodule.exports = FromPercent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/FromPercent.js?')},"./node_modules/phaser/src/math/GetSpeed.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the speed required to cover a distance in the time given.\r\n *\r\n * @function Phaser.Math.GetSpeed\r\n * @since 3.0.0\r\n *\r\n * @param {number} distance - The distance to travel in pixels.\r\n * @param {integer} time - The time, in ms, to cover the distance in.\r\n *\r\n * @return {number} The amount you will need to increment the position by each step in order to cover the distance in the time given.\r\n */\r\nvar GetSpeed = function (distance, time)\r\n{\r\n return (distance / time) / 1000;\r\n};\r\n\r\nmodule.exports = GetSpeed;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/GetSpeed.js?")},"./node_modules/phaser/src/math/IsEven.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number.\r\n *\r\n * @function Phaser.Math.IsEven\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEven = function (value)\r\n{\r\n // Use abstract equality == for "is number" test\r\n\r\n // eslint-disable-next-line eqeqeq\r\n return (value == parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEven;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEven.js?')},"./node_modules/phaser/src/math/IsEvenStrict.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check if a given value is an even number using a strict type check.\r\n *\r\n * @function Phaser.Math.IsEvenStrict\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to perform the check with.\r\n *\r\n * @return {boolean} Whether the number is even or not.\r\n */\r\nvar IsEvenStrict = function (value)\r\n{\r\n // Use strict equality === for "is number" test\r\n return (value === parseFloat(value)) ? !(value % 2) : void 0;\r\n};\r\n\r\nmodule.exports = IsEvenStrict;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/IsEvenStrict.js?')},"./node_modules/phaser/src/math/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculates a linear (interpolation) value over t.\r\n *\r\n * @function Phaser.Math.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} p0 - The first point.\r\n * @param {number} p1 - The second point.\r\n * @param {number} t - The percentage between p0 and p1 to return, represented as a number between 0 and 1.\r\n *\r\n * @return {number} The step t% of the way between p0 and p1.\r\n */\r\nvar Linear = function (p0, p1, t)\r\n{\r\n return (p1 - p0) * t + p0;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Linear.js?")},"./node_modules/phaser/src/math/Matrix3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * A three-dimensional matrix.\r\n *\r\n * Defaults to the identity matrix when instantiated.\r\n *\r\n * @class Matrix3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} [m] - Optional Matrix3 to copy values from.\r\n */\r\nvar Matrix3 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix3 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix3#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(9);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix3 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} A clone of this Matrix3.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix3(this);\r\n },\r\n\r\n /**\r\n * This method is an alias for `Matrix3.copy`.\r\n *\r\n * @method Phaser.Math.Matrix3#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix4 into this Matrix3.\r\n *\r\n * @method Phaser.Math.Matrix3#fromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - The Matrix4 to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[4];\r\n out[4] = a[5];\r\n out[5] = a[6];\r\n out[6] = a[8];\r\n out[7] = a[9];\r\n out[8] = a[10];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix3#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 1;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a12 = a[5];\r\n\r\n a[1] = a[3];\r\n a[2] = a[6];\r\n a[3] = a01;\r\n a[5] = a[7];\r\n a[6] = a02;\r\n a[7] = a12;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b01 = a22 * a11 - a12 * a21;\r\n var b11 = -a22 * a10 + a12 * a20;\r\n var b21 = a21 * a10 - a11 * a20;\r\n\r\n // Calculate the determinant\r\n var det = a00 * b01 + a01 * b11 + a02 * b21;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = b01 * det;\r\n a[1] = (-a22 * a01 + a02 * a21) * det;\r\n a[2] = (a12 * a01 - a02 * a11) * det;\r\n a[3] = b11 * det;\r\n a[4] = (a22 * a00 - a02 * a20) * det;\r\n a[5] = (-a12 * a00 + a02 * a10) * det;\r\n a[6] = b21 * det;\r\n a[7] = (-a21 * a00 + a01 * a20) * det;\r\n a[8] = (a11 * a00 - a01 * a10) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n a[0] = (a11 * a22 - a12 * a21);\r\n a[1] = (a02 * a21 - a01 * a22);\r\n a[2] = (a01 * a12 - a02 * a11);\r\n a[3] = (a12 * a20 - a10 * a22);\r\n a[4] = (a00 * a22 - a02 * a20);\r\n a[5] = (a02 * a10 - a00 * a12);\r\n a[6] = (a10 * a21 - a11 * a20);\r\n a[7] = (a01 * a20 - a00 * a21);\r\n a[8] = (a00 * a11 - a01 * a10);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n var a20 = a[6];\r\n var a21 = a[7];\r\n var a22 = a[8];\r\n\r\n var b = src.val;\r\n\r\n var b00 = b[0];\r\n var b01 = b[1];\r\n var b02 = b[2];\r\n var b10 = b[3];\r\n var b11 = b[4];\r\n var b12 = b[5];\r\n var b20 = b[6];\r\n var b21 = b[7];\r\n var b22 = b[8];\r\n\r\n a[0] = b00 * a00 + b01 * a10 + b02 * a20;\r\n a[1] = b00 * a01 + b01 * a11 + b02 * a21;\r\n a[2] = b00 * a02 + b01 * a12 + b02 * a22;\r\n\r\n a[3] = b10 * a00 + b11 * a10 + b12 * a20;\r\n a[4] = b10 * a01 + b11 * a11 + b12 * a21;\r\n a[5] = b10 * a02 + b11 * a12 + b12 * a22;\r\n\r\n a[6] = b20 * a00 + b21 * a10 + b22 * a20;\r\n a[7] = b20 * a01 + b21 * a11 + b22 * a21;\r\n a[8] = b20 * a02 + b21 * a12 + b22 * a22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix3#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n translate: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[6] = x * a[0] + y * a[3] + a[6];\r\n a[7] = x * a[1] + y * a[4] + a[7];\r\n a[8] = x * a[2] + y * a[5] + a[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n rotate: function (rad)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a10 = a[3];\r\n var a11 = a[4];\r\n var a12 = a[5];\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n a[0] = c * a00 + s * a10;\r\n a[1] = c * a01 + s * a11;\r\n a[2] = c * a02 + s * a12;\r\n\r\n a[3] = c * a10 - s * a00;\r\n a[4] = c * a11 - s * a01;\r\n a[5] = c * a12 - s * a02;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x` and `y` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n scale: function (v)\r\n {\r\n var a = this.val;\r\n var x = v.x;\r\n var y = v.y;\r\n\r\n a[0] = x * a[0];\r\n a[1] = x * a[1];\r\n a[2] = x * a[2];\r\n\r\n a[3] = y * a[3];\r\n a[4] = y * a[4];\r\n a[5] = y * a[5];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix3#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n var out = this.val;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[3] = xy + wz;\r\n out[6] = xz - wy;\r\n\r\n out[1] = xy - wz;\r\n out[4] = 1 - (xx + zz);\r\n out[7] = yz + wx;\r\n\r\n out[2] = xz + wy;\r\n out[5] = yz - wx;\r\n out[8] = 1 - (xx + yy);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix3#normalFromMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} m - [description]\r\n *\r\n * @return {Phaser.Math.Matrix3} This Matrix3.\r\n */\r\n normalFromMat4: function (m)\r\n {\r\n var a = m.val;\r\n var out = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n\r\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n\r\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Matrix3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix3.js?')},"./node_modules/phaser/src/math/Matrix4.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n/**\r\n * @classdesc\r\n * A four-dimensional matrix.\r\n *\r\n * @class Matrix4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} [m] - Optional Matrix4 to copy values from.\r\n */\r\nvar Matrix4 = new Class({\r\n\r\n initialize:\r\n\r\n function Matrix4 (m)\r\n {\r\n /**\r\n * The matrix values.\r\n *\r\n * @name Phaser.Math.Matrix4#val\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.val = new Float32Array(16);\r\n\r\n if (m)\r\n {\r\n // Assume Matrix4 with val:\r\n this.copy(m);\r\n }\r\n else\r\n {\r\n // Default to identity\r\n this.identity();\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Matrix4.\r\n *\r\n * @method Phaser.Math.Matrix4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} A clone of this Matrix4.\r\n */\r\n clone: function ()\r\n {\r\n return new Matrix4(this);\r\n },\r\n\r\n // TODO - Should work with basic values\r\n\r\n /**\r\n * This method is an alias for `Matrix4.copy`.\r\n *\r\n * @method Phaser.Math.Matrix4#set\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to set the values of this Matrix\'s from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n set: function (src)\r\n {\r\n return this.copy(src);\r\n },\r\n\r\n /**\r\n * Copy the values of a given Matrix into this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n copy: function (src)\r\n {\r\n var out = this.val;\r\n var a = src.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given array.\r\n *\r\n * @method Phaser.Math.Matrix4#fromArray\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The array to copy the values from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromArray: function (a)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = a[0];\r\n out[1] = a[1];\r\n out[2] = a[2];\r\n out[3] = a[3];\r\n out[4] = a[4];\r\n out[5] = a[5];\r\n out[6] = a[6];\r\n out[7] = a[7];\r\n out[8] = a[8];\r\n out[9] = a[9];\r\n out[10] = a[10];\r\n out[11] = a[11];\r\n out[12] = a[12];\r\n out[13] = a[13];\r\n out[14] = a[14];\r\n out[15] = a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix.\r\n *\r\n * Sets all values to `0`.\r\n *\r\n * @method Phaser.Math.Matrix4#zero\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n zero: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 0;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 0;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 0;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y` and `z` values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#xyz\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value.\r\n * @param {number} y - The y value.\r\n * @param {number} z - The z value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n xyz: function (x, y, z)\r\n {\r\n this.identity();\r\n\r\n var out = this.val;\r\n\r\n out[12] = x;\r\n out[13] = y;\r\n out[14] = z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the scaling values of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaling\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x scaling value.\r\n * @param {number} y - The y scaling value.\r\n * @param {number} z - The z scaling value.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaling: function (x, y, z)\r\n {\r\n this.zero();\r\n\r\n var out = this.val;\r\n\r\n out[0] = x;\r\n out[5] = y;\r\n out[10] = z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n identity: function ()\r\n {\r\n var out = this.val;\r\n\r\n out[0] = 1;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n out[4] = 0;\r\n out[5] = 1;\r\n out[6] = 0;\r\n out[7] = 0;\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 1;\r\n out[11] = 0;\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transpose this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#transpose\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n transpose: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n var a23 = a[11];\r\n\r\n a[1] = a[4];\r\n a[2] = a[8];\r\n a[3] = a[12];\r\n a[4] = a01;\r\n a[6] = a[9];\r\n a[7] = a[13];\r\n a[8] = a02;\r\n a[9] = a12;\r\n a[11] = a[14];\r\n a[12] = a03;\r\n a[13] = a13;\r\n a[14] = a23;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n invert: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n\r\n if (!det)\r\n {\r\n return null;\r\n }\r\n\r\n det = 1 / det;\r\n\r\n a[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\r\n a[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\r\n a[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\r\n a[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\r\n a[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\r\n a[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\r\n a[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\r\n a[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\r\n a[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\r\n a[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\r\n a[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\r\n a[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\r\n a[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\r\n a[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\r\n a[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\r\n a[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the adjoint, or adjugate, of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#adjoint\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n adjoint: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n a[0] = (a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22));\r\n a[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\r\n a[2] = (a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12));\r\n a[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\r\n a[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\r\n a[5] = (a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22));\r\n a[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\r\n a[7] = (a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12));\r\n a[8] = (a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21));\r\n a[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\r\n a[10] = (a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11));\r\n a[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\r\n a[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\r\n a[13] = (a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21));\r\n a[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\r\n a[15] = (a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11));\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the determinant of this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#determinant\r\n * @since 3.0.0\r\n *\r\n * @return {number} The determinant of this Matrix.\r\n */\r\n determinant: function ()\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b00 = a00 * a11 - a01 * a10;\r\n var b01 = a00 * a12 - a02 * a10;\r\n var b02 = a00 * a13 - a03 * a10;\r\n var b03 = a01 * a12 - a02 * a11;\r\n var b04 = a01 * a13 - a03 * a11;\r\n var b05 = a02 * a13 - a03 * a12;\r\n var b06 = a20 * a31 - a21 * a30;\r\n var b07 = a20 * a32 - a22 * a30;\r\n var b08 = a20 * a33 - a23 * a30;\r\n var b09 = a21 * a32 - a22 * a31;\r\n var b10 = a21 * a33 - a23 * a31;\r\n var b11 = a22 * a33 - a23 * a32;\r\n\r\n // Calculate the determinant\r\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\r\n },\r\n\r\n /**\r\n * Multiply this Matrix by the given Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - The Matrix to multiply this Matrix by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiply: function (src)\r\n {\r\n var a = this.val;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n var a30 = a[12];\r\n var a31 = a[13];\r\n var a32 = a[14];\r\n var a33 = a[15];\r\n\r\n var b = src.val;\r\n\r\n // Cache only the current line of the second matrix\r\n var b0 = b[0];\r\n var b1 = b[1];\r\n var b2 = b[2];\r\n var b3 = b[3];\r\n\r\n a[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[4];\r\n b1 = b[5];\r\n b2 = b[6];\r\n b3 = b[7];\r\n\r\n a[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[8];\r\n b1 = b[9];\r\n b2 = b[10];\r\n b3 = b[11];\r\n\r\n a[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n b0 = b[12];\r\n b1 = b[13];\r\n b2 = b[14];\r\n b3 = b[15];\r\n\r\n a[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\r\n a[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\r\n a[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\r\n a[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Matrix4#multiplyLocal\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} src - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n multiplyLocal: function (src)\r\n {\r\n var a = [];\r\n var m1 = this.val;\r\n var m2 = src.val;\r\n\r\n a[0] = m1[0] * m2[0] + m1[1] * m2[4] + m1[2] * m2[8] + m1[3] * m2[12];\r\n a[1] = m1[0] * m2[1] + m1[1] * m2[5] + m1[2] * m2[9] + m1[3] * m2[13];\r\n a[2] = m1[0] * m2[2] + m1[1] * m2[6] + m1[2] * m2[10] + m1[3] * m2[14];\r\n a[3] = m1[0] * m2[3] + m1[1] * m2[7] + m1[2] * m2[11] + m1[3] * m2[15];\r\n\r\n a[4] = m1[4] * m2[0] + m1[5] * m2[4] + m1[6] * m2[8] + m1[7] * m2[12];\r\n a[5] = m1[4] * m2[1] + m1[5] * m2[5] + m1[6] * m2[9] + m1[7] * m2[13];\r\n a[6] = m1[4] * m2[2] + m1[5] * m2[6] + m1[6] * m2[10] + m1[7] * m2[14];\r\n a[7] = m1[4] * m2[3] + m1[5] * m2[7] + m1[6] * m2[11] + m1[7] * m2[15];\r\n\r\n a[8] = m1[8] * m2[0] + m1[9] * m2[4] + m1[10] * m2[8] + m1[11] * m2[12];\r\n a[9] = m1[8] * m2[1] + m1[9] * m2[5] + m1[10] * m2[9] + m1[11] * m2[13];\r\n a[10] = m1[8] * m2[2] + m1[9] * m2[6] + m1[10] * m2[10] + m1[11] * m2[14];\r\n a[11] = m1[8] * m2[3] + m1[9] * m2[7] + m1[10] * m2[11] + m1[11] * m2[15];\r\n\r\n a[12] = m1[12] * m2[0] + m1[13] * m2[4] + m1[14] * m2[8] + m1[15] * m2[12];\r\n a[13] = m1[12] * m2[1] + m1[13] * m2[5] + m1[14] * m2[9] + m1[15] * m2[13];\r\n a[14] = m1[12] * m2[2] + m1[13] * m2[6] + m1[14] * m2[10] + m1[15] * m2[14];\r\n a[15] = m1[12] * m2[3] + m1[13] * m2[7] + m1[14] * m2[11] + m1[15] * m2[15];\r\n\r\n return this.fromArray(a);\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#translate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to translate this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translate: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate this Matrix using the given values.\r\n *\r\n * @method Phaser.Math.Matrix4#translateXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n translateXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\r\n a[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\r\n a[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\r\n a[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * Uses the `x`, `y` and `z` components of the given Vector to scale the Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to scale this Matrix with.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scale: function (v)\r\n {\r\n var x = v.x;\r\n var y = v.y;\r\n var z = v.z;\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a scale transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#scaleXYZ\r\n * @since 3.16.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n scaleXYZ: function (x, y, z)\r\n {\r\n var a = this.val;\r\n\r\n a[0] = a[0] * x;\r\n a[1] = a[1] * x;\r\n a[2] = a[2] * x;\r\n a[3] = a[3] * x;\r\n\r\n a[4] = a[4] * y;\r\n a[5] = a[5] * y;\r\n a[6] = a[6] * y;\r\n a[7] = a[7] * y;\r\n\r\n a[8] = a[8] * z;\r\n a[9] = a[9] * z;\r\n a[10] = a[10] * z;\r\n a[11] = a[11] * z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Derive a rotation matrix around the given axis.\r\n *\r\n * @method Phaser.Math.Matrix4#makeRotationAxis\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector3|Phaser.Math.Vector4)} axis - The rotation axis.\r\n * @param {number} angle - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n makeRotationAxis: function (axis, angle)\r\n {\r\n // Based on http://www.gamedev.net/reference/articles/article1199.asp\r\n\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n var t = 1 - c;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var tx = t * x;\r\n var ty = t * y;\r\n\r\n this.fromArray([\r\n tx * x + c, tx * y - s * z, tx * z + s * y, 0,\r\n tx * y + s * z, ty * y + c, ty * z - s * x, 0,\r\n tx * z - s * y, ty * z + s * x, t * z * z + c, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply a rotation transformation to this Matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#rotate\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate upon.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotate: function (rad, axis)\r\n {\r\n var a = this.val;\r\n var x = axis.x;\r\n var y = axis.y;\r\n var z = axis.z;\r\n var len = Math.sqrt(x * x + y * y + z * z);\r\n\r\n if (Math.abs(len) < EPSILON)\r\n {\r\n return null;\r\n }\r\n\r\n len = 1 / len;\r\n x *= len;\r\n y *= len;\r\n z *= len;\r\n\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n var t = 1 - c;\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Construct the elements of the rotation matrix\r\n var b00 = x * x * t + c;\r\n var b01 = y * x * t + z * s;\r\n var b02 = z * x * t - y * s;\r\n\r\n var b10 = x * y * t - z * s;\r\n var b11 = y * y * t + c;\r\n var b12 = z * y * t + x * s;\r\n\r\n var b20 = x * z * t + y * s;\r\n var b21 = y * z * t - x * s;\r\n var b22 = z * z * t + c;\r\n\r\n // Perform rotation-specific matrix multiplication\r\n a[0] = a00 * b00 + a10 * b01 + a20 * b02;\r\n a[1] = a01 * b00 + a11 * b01 + a21 * b02;\r\n a[2] = a02 * b00 + a12 * b01 + a22 * b02;\r\n a[3] = a03 * b00 + a13 * b01 + a23 * b02;\r\n a[4] = a00 * b10 + a10 * b11 + a20 * b12;\r\n a[5] = a01 * b10 + a11 * b11 + a21 * b12;\r\n a[6] = a02 * b10 + a12 * b11 + a22 * b12;\r\n a[7] = a03 * b10 + a13 * b11 + a23 * b12;\r\n a[8] = a00 * b20 + a10 * b21 + a20 * b22;\r\n a[9] = a01 * b20 + a11 * b21 + a21 * b22;\r\n a[10] = a02 * b20 + a12 * b21 + a22 * b22;\r\n a[11] = a03 * b20 + a13 * b21 + a23 * b22;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its X axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle in radians to rotate by.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateX: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[4] = a10 * c + a20 * s;\r\n a[5] = a11 * c + a21 * s;\r\n a[6] = a12 * c + a22 * s;\r\n a[7] = a13 * c + a23 * s;\r\n a[8] = a20 * c - a10 * s;\r\n a[9] = a21 * c - a11 * s;\r\n a[10] = a22 * c - a12 * s;\r\n a[11] = a23 * c - a13 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Y axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateY: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a20 = a[8];\r\n var a21 = a[9];\r\n var a22 = a[10];\r\n var a23 = a[11];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c - a20 * s;\r\n a[1] = a01 * c - a21 * s;\r\n a[2] = a02 * c - a22 * s;\r\n a[3] = a03 * c - a23 * s;\r\n a[8] = a00 * s + a20 * c;\r\n a[9] = a01 * s + a21 * c;\r\n a[10] = a02 * s + a22 * c;\r\n a[11] = a03 * s + a23 * c;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this matrix on its Z axis.\r\n *\r\n * @method Phaser.Math.Matrix4#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The angle to rotate by, in radians.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n var a = this.val;\r\n var s = Math.sin(rad);\r\n var c = Math.cos(rad);\r\n\r\n var a00 = a[0];\r\n var a01 = a[1];\r\n var a02 = a[2];\r\n var a03 = a[3];\r\n\r\n var a10 = a[4];\r\n var a11 = a[5];\r\n var a12 = a[6];\r\n var a13 = a[7];\r\n\r\n // Perform axis-specific matrix multiplication\r\n a[0] = a00 * c + a10 * s;\r\n a[1] = a01 * c + a11 * s;\r\n a[2] = a02 * c + a12 * s;\r\n a[3] = a03 * c + a13 * s;\r\n a[4] = a10 * c - a00 * s;\r\n a[5] = a11 * c - a01 * s;\r\n a[6] = a12 * c - a02 * s;\r\n a[7] = a13 * c - a03 * s;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given rotation Quaternion and translation Vector.\r\n *\r\n * @method Phaser.Math.Matrix4#fromRotationTranslation\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set rotation from.\r\n * @param {Phaser.Math.Vector3} v - The Vector to set translation from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromRotationTranslation: function (q, v)\r\n {\r\n // Quaternion math\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = v.x;\r\n out[13] = v.y;\r\n out[14] = v.z;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this Matrix from the given Quaternion.\r\n *\r\n * @method Phaser.Math.Matrix4#fromQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to set the values of this Matrix from.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n fromQuat: function (q)\r\n {\r\n var out = this.val;\r\n\r\n var x = q.x;\r\n var y = q.y;\r\n var z = q.z;\r\n var w = q.w;\r\n\r\n var x2 = x + x;\r\n var y2 = y + y;\r\n var z2 = z + z;\r\n\r\n var xx = x * x2;\r\n var xy = x * y2;\r\n var xz = x * z2;\r\n\r\n var yy = y * y2;\r\n var yz = y * z2;\r\n var zz = z * z2;\r\n\r\n var wx = w * x2;\r\n var wy = w * y2;\r\n var wz = w * z2;\r\n\r\n out[0] = 1 - (yy + zz);\r\n out[1] = xy + wz;\r\n out[2] = xz - wy;\r\n out[3] = 0;\r\n\r\n out[4] = xy - wz;\r\n out[5] = 1 - (xx + zz);\r\n out[6] = yz + wx;\r\n out[7] = 0;\r\n\r\n out[8] = xz + wy;\r\n out[9] = yz - wx;\r\n out[10] = 1 - (xx + yy);\r\n out[11] = 0;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = 0;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a frustum matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#frustum\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n frustum: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n\r\n var rl = 1 / (right - left);\r\n var tb = 1 / (top - bottom);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = (near * 2) * rl;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (near * 2) * tb;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = (right + left) * rl;\r\n out[9] = (top + bottom) * tb;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (far * near * 2) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspective\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovy - Vertical field of view in radians\r\n * @param {number} aspect - Aspect ratio. Typically viewport width /height.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspective: function (fovy, aspect, near, far)\r\n {\r\n var out = this.val;\r\n var f = 1.0 / Math.tan(fovy / 2);\r\n var nf = 1 / (near - far);\r\n\r\n out[0] = f / aspect;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = f;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = (far + near) * nf;\r\n out[11] = -1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (2 * far * near) * nf;\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a perspective projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#perspectiveLH\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the frustum.\r\n * @param {number} height - The height of the frustum.\r\n * @param {number} near - Near bound of the frustum.\r\n * @param {number} far - Far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n perspectiveLH: function (width, height, near, far)\r\n {\r\n var out = this.val;\r\n\r\n out[0] = (2 * near) / width;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = (2 * near) / height;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = -far / (near - far);\r\n out[11] = 1;\r\n\r\n out[12] = 0;\r\n out[13] = 0;\r\n out[14] = (near * far) / (near - far);\r\n out[15] = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate an orthogonal projection matrix with the given bounds.\r\n *\r\n * @method Phaser.Math.Matrix4#ortho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left bound of the frustum.\r\n * @param {number} right - The right bound of the frustum.\r\n * @param {number} bottom - The bottom bound of the frustum.\r\n * @param {number} top - The top bound of the frustum.\r\n * @param {number} near - The near bound of the frustum.\r\n * @param {number} far - The far bound of the frustum.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n ortho: function (left, right, bottom, top, near, far)\r\n {\r\n var out = this.val;\r\n var lr = left - right;\r\n var bt = bottom - top;\r\n var nf = near - far;\r\n\r\n // Avoid division by zero\r\n lr = (lr === 0) ? lr : 1 / lr;\r\n bt = (bt === 0) ? bt : 1 / bt;\r\n nf = (nf === 0) ? nf : 1 / nf;\r\n\r\n out[0] = -2 * lr;\r\n out[1] = 0;\r\n out[2] = 0;\r\n out[3] = 0;\r\n\r\n out[4] = 0;\r\n out[5] = -2 * bt;\r\n out[6] = 0;\r\n out[7] = 0;\r\n\r\n out[8] = 0;\r\n out[9] = 0;\r\n out[10] = 2 * nf;\r\n out[11] = 0;\r\n\r\n out[12] = (left + right) * lr;\r\n out[13] = (top + bottom) * bt;\r\n out[14] = (far + near) * nf;\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a look-at matrix with the given eye position, focal point, and up axis.\r\n *\r\n * @method Phaser.Math.Matrix4#lookAt\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} eye - Position of the viewer\r\n * @param {Phaser.Math.Vector3} center - Point the viewer is looking at\r\n * @param {Phaser.Math.Vector3} up - vec3 pointing up.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n lookAt: function (eye, center, up)\r\n {\r\n var out = this.val;\r\n\r\n var eyex = eye.x;\r\n var eyey = eye.y;\r\n var eyez = eye.z;\r\n\r\n var upx = up.x;\r\n var upy = up.y;\r\n var upz = up.z;\r\n\r\n var centerx = center.x;\r\n var centery = center.y;\r\n var centerz = center.z;\r\n\r\n if (Math.abs(eyex - centerx) < EPSILON &&\r\n Math.abs(eyey - centery) < EPSILON &&\r\n Math.abs(eyez - centerz) < EPSILON)\r\n {\r\n return this.identity();\r\n }\r\n\r\n var z0 = eyex - centerx;\r\n var z1 = eyey - centery;\r\n var z2 = eyez - centerz;\r\n\r\n var len = 1 / Math.sqrt(z0 * z0 + z1 * z1 + z2 * z2);\r\n\r\n z0 *= len;\r\n z1 *= len;\r\n z2 *= len;\r\n\r\n var x0 = upy * z2 - upz * z1;\r\n var x1 = upz * z0 - upx * z2;\r\n var x2 = upx * z1 - upy * z0;\r\n\r\n len = Math.sqrt(x0 * x0 + x1 * x1 + x2 * x2);\r\n\r\n if (!len)\r\n {\r\n x0 = 0;\r\n x1 = 0;\r\n x2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n x0 *= len;\r\n x1 *= len;\r\n x2 *= len;\r\n }\r\n\r\n var y0 = z1 * x2 - z2 * x1;\r\n var y1 = z2 * x0 - z0 * x2;\r\n var y2 = z0 * x1 - z1 * x0;\r\n\r\n len = Math.sqrt(y0 * y0 + y1 * y1 + y2 * y2);\r\n\r\n if (!len)\r\n {\r\n y0 = 0;\r\n y1 = 0;\r\n y2 = 0;\r\n }\r\n else\r\n {\r\n len = 1 / len;\r\n y0 *= len;\r\n y1 *= len;\r\n y2 *= len;\r\n }\r\n\r\n out[0] = x0;\r\n out[1] = y0;\r\n out[2] = z0;\r\n out[3] = 0;\r\n\r\n out[4] = x1;\r\n out[5] = y1;\r\n out[6] = z1;\r\n out[7] = 0;\r\n\r\n out[8] = x2;\r\n out[9] = y2;\r\n out[10] = z2;\r\n out[11] = 0;\r\n\r\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\r\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\r\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\r\n out[15] = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the values of this matrix from the given `yaw`, `pitch` and `roll` values.\r\n *\r\n * @method Phaser.Math.Matrix4#yawPitchRoll\r\n * @since 3.0.0\r\n *\r\n * @param {number} yaw - [description]\r\n * @param {number} pitch - [description]\r\n * @param {number} roll - [description]\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n yawPitchRoll: function (yaw, pitch, roll)\r\n {\r\n this.zero();\r\n _tempMat1.zero();\r\n _tempMat2.zero();\r\n\r\n var m0 = this.val;\r\n var m1 = _tempMat1.val;\r\n var m2 = _tempMat2.val;\r\n\r\n // Rotate Z\r\n var s = Math.sin(roll);\r\n var c = Math.cos(roll);\r\n\r\n m0[10] = 1;\r\n m0[15] = 1;\r\n m0[0] = c;\r\n m0[1] = s;\r\n m0[4] = -s;\r\n m0[5] = c;\r\n\r\n // Rotate X\r\n s = Math.sin(pitch);\r\n c = Math.cos(pitch);\r\n\r\n m1[0] = 1;\r\n m1[15] = 1;\r\n m1[5] = c;\r\n m1[10] = c;\r\n m1[9] = -s;\r\n m1[6] = s;\r\n\r\n // Rotate Y\r\n s = Math.sin(yaw);\r\n c = Math.cos(yaw);\r\n\r\n m2[5] = 1;\r\n m2[15] = 1;\r\n m2[0] = c;\r\n m2[2] = -s;\r\n m2[8] = s;\r\n m2[10] = c;\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Generate a world matrix from the given rotation, position, scale, view matrix and projection matrix.\r\n *\r\n * @method Phaser.Math.Matrix4#setWorldMatrix\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} rotation - The rotation of the world matrix.\r\n * @param {Phaser.Math.Vector3} position - The position of the world matrix.\r\n * @param {Phaser.Math.Vector3} scale - The scale of the world matrix.\r\n * @param {Phaser.Math.Matrix4} [viewMatrix] - The view matrix.\r\n * @param {Phaser.Math.Matrix4} [projectionMatrix] - The projection matrix.\r\n *\r\n * @return {Phaser.Math.Matrix4} This Matrix4.\r\n */\r\n setWorldMatrix: function (rotation, position, scale, viewMatrix, projectionMatrix)\r\n {\r\n this.yawPitchRoll(rotation.y, rotation.x, rotation.z);\r\n\r\n _tempMat1.scaling(scale.x, scale.y, scale.z);\r\n _tempMat2.xyz(position.x, position.y, position.z);\r\n\r\n this.multiplyLocal(_tempMat1);\r\n this.multiplyLocal(_tempMat2);\r\n\r\n if (viewMatrix !== undefined)\r\n {\r\n this.multiplyLocal(viewMatrix);\r\n }\r\n\r\n if (projectionMatrix !== undefined)\r\n {\r\n this.multiplyLocal(projectionMatrix);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nvar _tempMat1 = new Matrix4();\r\nvar _tempMat2 = new Matrix4();\r\n\r\nmodule.exports = Matrix4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Matrix4.js?')},"./node_modules/phaser/src/math/MaxAdd.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Add an `amount` to a `value`, limiting the maximum result to `max`.\r\n *\r\n * @function Phaser.Math.MaxAdd\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to add to.\r\n * @param {number} amount - The amount to add.\r\n * @param {number} max - The maximum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MaxAdd = function (value, amount, max)\r\n{\r\n return Math.min(value + amount, max);\r\n};\r\n\r\nmodule.exports = MaxAdd;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MaxAdd.js?")},"./node_modules/phaser/src/math/MinSub.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Subtract an `amount` from `value`, limiting the minimum result to `min`.\r\n *\r\n * @function Phaser.Math.MinSub\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to subtract from.\r\n * @param {number} amount - The amount to subtract.\r\n * @param {number} min - The minimum value to return.\r\n *\r\n * @return {number} The resulting value.\r\n */\r\nvar MinSub = function (value, amount, min)\r\n{\r\n return Math.max(value - amount, min);\r\n};\r\n\r\nmodule.exports = MinSub;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/MinSub.js?")},"./node_modules/phaser/src/math/Percent.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Work out what percentage `value` is of the range between `min` and `max`.\r\n * If `max` isn't given then it will return the percentage of `value` to `min`.\r\n *\r\n * You can optionally specify an `upperMax` value, which is a mid-way point in the range that represents 100%, after which the % starts to go down to zero again.\r\n *\r\n * @function Phaser.Math.Percent\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to determine the percentage of.\r\n * @param {number} min - The minimum value.\r\n * @param {number} [max] - The maximum value.\r\n * @param {number} [upperMax] - The mid-way point in the range that represents 100%.\r\n *\r\n * @return {number} A value between 0 and 1 representing the percentage.\r\n */\r\nvar Percent = function (value, min, max, upperMax)\r\n{\r\n if (max === undefined) { max = min + 1; }\r\n\r\n var percentage = (value - min) / (max - min);\r\n\r\n if (percentage > 1)\r\n {\r\n if (upperMax !== undefined)\r\n {\r\n percentage = ((upperMax - value)) / (upperMax - max);\r\n\r\n if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n }\r\n else\r\n {\r\n percentage = 1;\r\n }\r\n }\r\n else if (percentage < 0)\r\n {\r\n percentage = 0;\r\n }\r\n\r\n return percentage;\r\n};\r\n\r\nmodule.exports = Percent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Percent.js?")},"./node_modules/phaser/src/math/Quaternion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Vector3 = __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix3 = __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js");\r\n\r\nvar EPSILON = 0.000001;\r\n\r\n// Some shared \'private\' arrays\r\nvar siNext = new Int8Array([ 1, 2, 0 ]);\r\nvar tmp = new Float32Array([ 0, 0, 0 ]);\r\n\r\nvar xUnitVec3 = new Vector3(1, 0, 0);\r\nvar yUnitVec3 = new Vector3(0, 1, 0);\r\n\r\nvar tmpvec = new Vector3();\r\nvar tmpMat3 = new Matrix3();\r\n\r\n/**\r\n * @classdesc\r\n * A quaternion.\r\n *\r\n * @class Quaternion\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Quaternion = new Class({\r\n\r\n initialize:\r\n\r\n function Quaternion (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The y component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The z component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n /**\r\n * The w component of this Quaternion.\r\n *\r\n * @name Phaser.Math.Quaternion#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Copy the components of a given Quaternion or Vector into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} src - The Quaternion or Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z;\r\n this.w = src.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the components of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} [x=0] - The x component, or an object containing x, y, z, and w components.\r\n * @param {number} [y=0] - The y component.\r\n * @param {number} [z=0] - The z component.\r\n * @param {number} [w=0] - The w component.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === \'object\')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Quaternion or Vector to this Quaternion. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to add to this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z;\r\n this.w += v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract a given Quaternion or Vector from this Quaternion. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Quaternion#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to subtract from this Quaternion.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z;\r\n this.w -= v.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Quaternion by the given value.\r\n *\r\n * @method Phaser.Math.Quaternion#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Quaternion squared.\r\n *\r\n * @method Phaser.Math.Quaternion#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Quaternion, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Quaternion and the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#dot\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to dot product with this Quaternion.\r\n *\r\n * @return {number} The dot product of this Quaternion and the given Quaternion or Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} v - The Quaternion or Vector to interpolate towards.\r\n * @param {number} [t=0] - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Math.Quaternion#rotationTo\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - [description]\r\n * @param {Phaser.Math.Vector3} b - [description]\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotationTo: function (a, b)\r\n {\r\n var dot = a.x * b.x + a.y * b.y + a.z * b.z;\r\n\r\n if (dot < -0.999999)\r\n {\r\n if (tmpvec.copy(xUnitVec3).cross(a).length() < EPSILON)\r\n {\r\n tmpvec.copy(yUnitVec3).cross(a);\r\n }\r\n\r\n tmpvec.normalize();\r\n\r\n return this.setAxisAngle(tmpvec, Math.PI);\r\n\r\n }\r\n else if (dot > 0.999999)\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n tmpvec.copy(a).cross(b);\r\n\r\n this.x = tmpvec.x;\r\n this.y = tmpvec.y;\r\n this.z = tmpvec.z;\r\n this.w = 1 + dot;\r\n\r\n return this.normalize();\r\n }\r\n },\r\n\r\n /**\r\n * Set the axes of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxes\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} view - The view axis.\r\n * @param {Phaser.Math.Vector3} right - The right axis.\r\n * @param {Phaser.Math.Vector3} up - The upwards axis.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxes: function (view, right, up)\r\n {\r\n var m = tmpMat3.val;\r\n\r\n m[0] = right.x;\r\n m[3] = right.y;\r\n m[6] = right.z;\r\n\r\n m[1] = up.x;\r\n m[4] = up.y;\r\n m[7] = up.z;\r\n\r\n m[2] = -view.x;\r\n m[5] = -view.y;\r\n m[8] = -view.z;\r\n\r\n return this.fromMat3(tmpMat3).normalize();\r\n },\r\n\r\n /**\r\n * Reset this Matrix to an identity (default) Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#identity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n identity: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the axis angle of this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#setAxisAngle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} axis - The axis.\r\n * @param {number} rad - The angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n setAxisAngle: function (axis, rad)\r\n {\r\n rad = rad * 0.5;\r\n\r\n var s = Math.sin(rad);\r\n\r\n this.x = s * axis.x;\r\n this.y = s * axis.y;\r\n this.z = s * axis.z;\r\n this.w = Math.cos(rad);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiply this Quaternion by the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to multiply this Quaternion by.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n multiply: function (b)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n this.x = ax * bw + aw * bx + ay * bz - az * by;\r\n this.y = ay * bw + aw * by + az * bx - ax * bz;\r\n this.z = az * bw + aw * bz + ax * by - ay * bx;\r\n this.w = aw * bw - ax * bx - ay * by - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Smoothly linearly interpolate this Quaternion towards the given Quaternion or Vector.\r\n *\r\n * @method Phaser.Math.Quaternion#slerp\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Quaternion|Phaser.Math.Vector4)} b - The Quaternion or Vector to interpolate towards.\r\n * @param {number} t - The percentage of interpolation.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n slerp: function (b, t)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-slerp-implementations\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n var bw = b.w;\r\n\r\n // calc cosine\r\n var cosom = ax * bx + ay * by + az * bz + aw * bw;\r\n\r\n // adjust signs (if necessary)\r\n if (cosom < 0)\r\n {\r\n cosom = -cosom;\r\n bx = - bx;\r\n by = - by;\r\n bz = - bz;\r\n bw = - bw;\r\n }\r\n\r\n // "from" and "to" quaternions are very close\r\n // ... so we can do a linear interpolation\r\n var scale0 = 1 - t;\r\n var scale1 = t;\r\n\r\n // calculate coefficients\r\n if ((1 - cosom) > EPSILON)\r\n {\r\n // standard case (slerp)\r\n var omega = Math.acos(cosom);\r\n var sinom = Math.sin(omega);\r\n\r\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\r\n scale1 = Math.sin(t * omega) / sinom;\r\n }\r\n\r\n // calculate final values\r\n this.x = scale0 * ax + scale1 * bx;\r\n this.y = scale0 * ay + scale1 * by;\r\n this.z = scale0 * az + scale1 * bz;\r\n this.w = scale0 * aw + scale1 * bw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Invert this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#invert\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n invert: function ()\r\n {\r\n var a0 = this.x;\r\n var a1 = this.y;\r\n var a2 = this.z;\r\n var a3 = this.w;\r\n\r\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\r\n var invDot = (dot) ? 1 / dot : 0;\r\n\r\n // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\r\n\r\n this.x = -a0 * invDot;\r\n this.y = -a1 * invDot;\r\n this.z = -a2 * invDot;\r\n this.w = a3 * invDot;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert this Quaternion into its conjugate.\r\n *\r\n * Sets the x, y and z components.\r\n *\r\n * @method Phaser.Math.Quaternion#conjugate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n conjugate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the X axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateX: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bx = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + aw * bx;\r\n this.y = ay * bw + az * bx;\r\n this.z = az * bw - ay * bx;\r\n this.w = aw * bw - ax * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Y axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateY: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var by = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw - az * by;\r\n this.y = ay * bw + aw * by;\r\n this.z = az * bw + ax * by;\r\n this.w = aw * bw - ay * by;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotate this Quaternion on the Z axis.\r\n *\r\n * @method Phaser.Math.Quaternion#rotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} rad - The rotation angle in radians.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n rotateZ: function (rad)\r\n {\r\n rad *= 0.5;\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n var bz = Math.sin(rad);\r\n var bw = Math.cos(rad);\r\n\r\n this.x = ax * bw + ay * bz;\r\n this.y = ay * bw - ax * bz;\r\n this.z = az * bw + aw * bz;\r\n this.w = aw * bw - az * bz;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a unit (or rotation) Quaternion from its x, y, and z components.\r\n *\r\n * Sets the w component.\r\n *\r\n * @method Phaser.Math.Quaternion#calculateW\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n calculateW: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n this.w = -Math.sqrt(1.0 - x * x - y * y - z * z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Convert the given Matrix into this Quaternion.\r\n *\r\n * @method Phaser.Math.Quaternion#fromMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix to convert from.\r\n *\r\n * @return {Phaser.Math.Quaternion} This Quaternion.\r\n */\r\n fromMat3: function (mat)\r\n {\r\n // benchmarks:\r\n // http://jsperf.com/typed-array-access-speed\r\n // http://jsperf.com/conversion-of-3x3-matrix-to-quaternion\r\n\r\n // Algorithm in Ken Shoemake\'s article in 1987 SIGGRAPH course notes\r\n // article "Quaternion Calculus and Fast Animation".\r\n var m = mat.val;\r\n var fTrace = m[0] + m[4] + m[8];\r\n var fRoot;\r\n\r\n if (fTrace > 0)\r\n {\r\n // |w| > 1/2, may as well choose w > 1/2\r\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\r\n\r\n this.w = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot; // 1/(4w)\r\n\r\n this.x = (m[7] - m[5]) * fRoot;\r\n this.y = (m[2] - m[6]) * fRoot;\r\n this.z = (m[3] - m[1]) * fRoot;\r\n }\r\n else\r\n {\r\n // |w| <= 1/2\r\n var i = 0;\r\n\r\n if (m[4] > m[0])\r\n {\r\n i = 1;\r\n }\r\n\r\n if (m[8] > m[i * 3 + i])\r\n {\r\n i = 2;\r\n }\r\n\r\n var j = siNext[i];\r\n var k = siNext[j];\r\n\r\n // This isn\'t quite as clean without array access\r\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1);\r\n tmp[i] = 0.5 * fRoot;\r\n\r\n fRoot = 0.5 / fRoot;\r\n\r\n tmp[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\r\n tmp[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\r\n\r\n this.x = tmp[0];\r\n this.y = tmp[1];\r\n this.z = tmp[2];\r\n this.w = (m[k * 3 + j] - m[j * 3 + k]) * fRoot;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Quaternion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Quaternion.js?')},"./node_modules/phaser/src/math/RadToDeg.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Convert the given angle in radians, to the equivalent angle in degrees.\r\n *\r\n * @function Phaser.Math.RadToDeg\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The angle in radians to convert ot degrees.\r\n *\r\n * @return {integer} The given angle converted to degrees.\r\n */\r\nvar RadToDeg = function (radians)\r\n{\r\n return radians * CONST.RAD_TO_DEG;\r\n};\r\n\r\nmodule.exports = RadToDeg;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RadToDeg.js?')},"./node_modules/phaser/src/math/RandomXY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random unit vector.\r\n *\r\n * Computes random values for the given vector between -1 and 1 that can be used to represent a direction.\r\n *\r\n * Optionally accepts a scale value to scale the resulting vector by.\r\n *\r\n * @function Phaser.Math.RandomXY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} vector - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector2} The given Vector.\r\n */\r\nvar RandomXY = function (vector, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n\r\n vector.x = Math.cos(r) * scale;\r\n vector.y = Math.sin(r) * scale;\r\n\r\n return vector;\r\n};\r\n\r\nmodule.exports = RandomXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXY.js?")},"./node_modules/phaser/src/math/RandomXYZ.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random position vector in a spherical area, optionally defined by the given radius.\r\n *\r\n * @function Phaser.Math.RandomXYZ\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec3 - The Vector to compute random values for.\r\n * @param {number} [radius=1] - The radius.\r\n *\r\n * @return {Phaser.Math.Vector3} The given Vector.\r\n */\r\nvar RandomXYZ = function (vec3, radius)\r\n{\r\n if (radius === undefined) { radius = 1; }\r\n\r\n var r = Math.random() * 2 * Math.PI;\r\n var z = (Math.random() * 2) - 1;\r\n var zScale = Math.sqrt(1 - z * z) * radius;\r\n\r\n vec3.x = Math.cos(r) * zScale;\r\n vec3.y = Math.sin(r) * zScale;\r\n vec3.z = z * radius;\r\n\r\n return vec3;\r\n};\r\n\r\nmodule.exports = RandomXYZ;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZ.js?")},"./node_modules/phaser/src/math/RandomXYZW.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Compute a random four-dimensional vector.\r\n *\r\n * @function Phaser.Math.RandomXYZW\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} vec4 - The Vector to compute random values for.\r\n * @param {number} [scale=1] - The scale of the random values.\r\n *\r\n * @return {Phaser.Math.Vector4} The given Vector.\r\n */\r\nvar RandomXYZW = function (vec4, scale)\r\n{\r\n if (scale === undefined) { scale = 1; }\r\n\r\n // TODO: Not spherical; should fix this for more uniform distribution\r\n vec4.x = (Math.random() * 2 - 1) * scale;\r\n vec4.y = (Math.random() * 2 - 1) * scale;\r\n vec4.z = (Math.random() * 2 - 1) * scale;\r\n vec4.w = (Math.random() * 2 - 1) * scale;\r\n\r\n return vec4;\r\n};\r\n\r\nmodule.exports = RandomXYZW;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RandomXYZW.js?")},"./node_modules/phaser/src/math/Rotate.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a given point by a given angle around the origin (0, 0), in an anti-clockwise direction.\r\n *\r\n * @function Phaser.Math.Rotate\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} angle - The angle to be rotated by in an anticlockwise direction.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle in an anticlockwise direction.\r\n */\r\nvar Rotate = function (point, angle)\r\n{\r\n var x = point.x;\r\n var y = point.y;\r\n\r\n point.x = (x * Math.cos(angle)) - (y * Math.sin(angle));\r\n point.y = (x * Math.sin(angle)) + (y * Math.cos(angle));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = Rotate;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Rotate.js?")},"./node_modules/phaser/src/math/RotateAround.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle`.\r\n *\r\n * @function Phaser.Math.RotateAround\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates.\r\n */\r\nvar RotateAround = function (point, x, y, angle)\r\n{\r\n var c = Math.cos(angle);\r\n var s = Math.sin(angle);\r\n\r\n var tx = point.x - x;\r\n var ty = point.y - y;\r\n\r\n point.x = tx * c - ty * s + x;\r\n point.y = tx * s + ty * c + y;\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAround;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAround.js?")},"./node_modules/phaser/src/math/RotateAroundDistance.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Rotate a `point` around `x` and `y` by the given `angle` and `distance`.\r\n *\r\n * @function Phaser.Math.RotateAroundDistance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point - The point to be rotated.\r\n * @param {number} x - The horizontal coordinate to rotate around.\r\n * @param {number} y - The vertical coordinate to rotate around.\r\n * @param {number} angle - The angle of rotation in radians.\r\n * @param {number} distance - The distance from (x, y) to place the point at.\r\n *\r\n * @return {Phaser.Geom.Point} The given point.\r\n */\r\nvar RotateAroundDistance = function (point, x, y, angle, distance)\r\n{\r\n var t = angle + Math.atan2(point.y - y, point.x - x);\r\n\r\n point.x = x + (distance * Math.cos(t));\r\n point.y = y + (distance * Math.sin(t));\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = RotateAroundDistance;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateAroundDistance.js?")},"./node_modules/phaser/src/math/RotateVec3.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector3 = __webpack_require__(/*! ../math/Vector3 */ "./node_modules/phaser/src/math/Vector3.js");\r\nvar Matrix4 = __webpack_require__(/*! ../math/Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js");\r\nvar Quaternion = __webpack_require__(/*! ../math/Quaternion */ "./node_modules/phaser/src/math/Quaternion.js");\r\n\r\nvar tmpMat4 = new Matrix4();\r\nvar tmpQuat = new Quaternion();\r\nvar tmpVec3 = new Vector3();\r\n\r\n/**\r\n * Rotates a vector in place by axis angle.\r\n *\r\n * This is the same as transforming a point by an\r\n * axis-angle quaternion, but it has higher precision.\r\n *\r\n * @function Phaser.Math.RotateVec3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} vec - The vector to be rotated.\r\n * @param {Phaser.Math.Vector3} axis - The axis to rotate around.\r\n * @param {number} radians - The angle of rotation in radians.\r\n *\r\n * @return {Phaser.Math.Vector3} The given vector.\r\n */\r\nvar RotateVec3 = function (vec, axis, radians)\r\n{\r\n // Set the quaternion to our axis angle\r\n tmpQuat.setAxisAngle(axis, radians);\r\n\r\n // Create a rotation matrix from the axis angle\r\n tmpMat4.fromRotationTranslation(tmpQuat, tmpVec3.set(0, 0, 0));\r\n\r\n // Multiply our vector by the rotation matrix\r\n return vec.transformMat4(tmpMat4);\r\n};\r\n\r\nmodule.exports = RotateVec3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RotateVec3.js?')},"./node_modules/phaser/src/math/RoundAwayFromZero.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.\r\n *\r\n * @function Phaser.Math.RoundAwayFromZero\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The number to round.\r\n *\r\n * @return {number} The rounded number, rounded away from zero.\r\n */\r\nvar RoundAwayFromZero = function (value)\r\n{\r\n // "Opposite" of truncate.\r\n return (value > 0) ? Math.ceil(value) : Math.floor(value);\r\n};\r\n\r\nmodule.exports = RoundAwayFromZero;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundAwayFromZero.js?')},"./node_modules/phaser/src/math/RoundTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Round a value to the given precision.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456, 0) = 123\r\n * RoundTo(123.456, 1) = 120\r\n * RoundTo(123.456, 2) = 100\r\n * ```\r\n * \r\n * To round the decimal, i.e. to round to precision, pass in a negative `place`:\r\n * \r\n * ```javascript\r\n * RoundTo(123.456789, 0) = 123\r\n * RoundTo(123.456789, -1) = 123.5\r\n * RoundTo(123.456789, -2) = 123.46\r\n * RoundTo(123.456789, -3) = 123.457\r\n * ```\r\n *\r\n * @function Phaser.Math.RoundTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to round.\r\n * @param {integer} [place=0] - The place to round to. Positive to round the units, negative to round the decimal.\r\n * @param {integer} [base=10] - The base to round in. Default is 10 for decimal.\r\n *\r\n * @return {number} The rounded value.\r\n */\r\nvar RoundTo = function (value, place, base)\r\n{\r\n if (place === undefined) { place = 0; }\r\n if (base === undefined) { base = 10; }\r\n\r\n var p = Math.pow(base, -place);\r\n\r\n return Math.round(value * p) / p;\r\n};\r\n\r\nmodule.exports = RoundTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/RoundTo.js?")},"./node_modules/phaser/src/math/SinCosTableGenerator.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Generate a series of sine and cosine values.\r\n *\r\n * @function Phaser.Math.SinCosTableGenerator\r\n * @since 3.0.0\r\n *\r\n * @param {number} length - The number of values to generate.\r\n * @param {number} [sinAmp=1] - The sine value amplitude.\r\n * @param {number} [cosAmp=1] - The cosine value amplitude.\r\n * @param {number} [frequency=1] - The frequency of the values.\r\n *\r\n * @return {Phaser.Types.Math.SinCosTable} The generated values.\r\n */\r\nvar SinCosTableGenerator = function (length, sinAmp, cosAmp, frequency)\r\n{\r\n if (sinAmp === undefined) { sinAmp = 1; }\r\n if (cosAmp === undefined) { cosAmp = 1; }\r\n if (frequency === undefined) { frequency = 1; }\r\n\r\n frequency *= Math.PI / length;\r\n\r\n var cos = [];\r\n var sin = [];\r\n\r\n for (var c = 0; c < length; c++)\r\n {\r\n cosAmp -= sinAmp * frequency;\r\n sinAmp += cosAmp * frequency;\r\n\r\n cos[c] = cosAmp;\r\n sin[c] = sinAmp;\r\n }\r\n\r\n return {\r\n sin: sin,\r\n cos: cos,\r\n length: length\r\n };\r\n};\r\n\r\nmodule.exports = SinCosTableGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SinCosTableGenerator.js?")},"./node_modules/phaser/src/math/SmoothStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smooth interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * @function Phaser.Math.SmoothStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmoothStep = function (x, min, max)\r\n{\r\n if (x <= min)\r\n {\r\n return 0;\r\n }\r\n\r\n if (x >= max)\r\n {\r\n return 1;\r\n }\r\n\r\n x = (x - min) / (max - min);\r\n\r\n return x * x * (3 - 2 * x);\r\n};\r\n\r\nmodule.exports = SmoothStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmoothStep.js?")},"./node_modules/phaser/src/math/SmootherStep.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate a smoother interpolation percentage of `x` between `min` and `max`.\r\n *\r\n * The function receives the number `x` as an argument and returns 0 if `x` is less than or equal to the left edge,\r\n * 1 if `x` is greater than or equal to the right edge, and smoothly interpolates, using a Hermite polynomial,\r\n * between 0 and 1 otherwise.\r\n *\r\n * Produces an even smoother interpolation than {@link Phaser.Math.SmoothStep}.\r\n *\r\n * @function Phaser.Math.SmootherStep\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} x - The input value.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The percentage of interpolation, between 0 and 1.\r\n */\r\nvar SmootherStep = function (x, min, max)\r\n{\r\n x = Math.max(0, Math.min(1, (x - min) / (max - min)));\r\n\r\n return x * x * x * (x * (x * 6 - 15) + 10);\r\n};\r\n\r\nmodule.exports = SmootherStep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/SmootherStep.js?")},"./node_modules/phaser/src/math/ToXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Returns a Vec2 containing the x and y position of the given index in a `width` x `height` sized grid.\r\n * \r\n * For example, in a 6 x 4 grid, index 16 would equal x: 4 y: 2.\r\n * \r\n * If the given index is out of range an empty Vec2 is returned.\r\n *\r\n * @function Phaser.Math.ToXY\r\n * @since 3.19.0\r\n *\r\n * @param {integer} index - The position within the grid to get the x/y value for.\r\n * @param {integer} width - The width of the grid.\r\n * @param {integer} height - The height of the grid.\r\n * @param {Phaser.Math.Vector2} [out] - An optional Vector2 to store the result in. If not given, a new Vector2 instance will be created.\r\n *\r\n * @return {Phaser.Math.Vector2} A Vector2 where the x and y properties contain the given grid index.\r\n */\r\nvar ToXY = function (index, width, height, out)\r\n{\r\n if (out === undefined) { out = new Vector2(); }\r\n\r\n var x = 0;\r\n var y = 0;\r\n var total = width * height;\r\n\r\n if (index > 0 && index <= total)\r\n {\r\n if (index > width - 1)\r\n {\r\n y = Math.floor(index / width);\r\n x = index - (y * width);\r\n }\r\n else\r\n {\r\n x = index;\r\n }\r\n\r\n out.set(x, y);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = ToXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/ToXY.js?')},"./node_modules/phaser/src/math/TransformXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Vector2 = __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Takes the `x` and `y` coordinates and transforms them into the same space as\r\n * defined by the position, rotation and scale values.\r\n *\r\n * @function Phaser.Math.TransformXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to be transformed.\r\n * @param {number} y - The y coordinate to be transformed.\r\n * @param {number} positionX - Horizontal position of the transform point.\r\n * @param {number} positionY - Vertical position of the transform point.\r\n * @param {number} rotation - Rotation of the transform point, in radians.\r\n * @param {number} scaleX - Horizontal scale of the transform point.\r\n * @param {number} scaleY - Vertical scale of the transform point.\r\n * @param {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} [output] - The output vector, point or object for the translated coordinates.\r\n *\r\n * @return {(Phaser.Math.Vector2|Phaser.Geom.Point|object)} The translated point.\r\n */\r\nvar TransformXY = function (x, y, positionX, positionY, rotation, scaleX, scaleY, output)\r\n{\r\n if (output === undefined) { output = new Vector2(); }\r\n\r\n var radianSin = Math.sin(rotation);\r\n var radianCos = Math.cos(rotation);\r\n\r\n // Rotate and Scale\r\n var a = radianCos * scaleX;\r\n var b = radianSin * scaleX;\r\n var c = -radianSin * scaleY;\r\n var d = radianCos * scaleY;\r\n\r\n // Invert\r\n var id = 1 / ((a * d) + (c * -b));\r\n\r\n output.x = (d * id * x) + (-c * id * y) + (((positionY * c) - (positionX * d)) * id);\r\n output.y = (a * id * y) + (-b * id * x) + (((-positionY * a) + (positionX * b)) * id);\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = TransformXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/TransformXY.js?')},"./node_modules/phaser/src/math/Vector2.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 2D space.\r\n *\r\n * A two-component vector.\r\n *\r\n * @class Vector2\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number|Phaser.Types.Math.Vector2Like} [x] - The x component, or an object with `x` and `y` properties.\r\n * @param {number} [y] - The y component.\r\n */\r\nvar Vector2 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector2 (x, y)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector2#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n }\r\n else\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector2.\r\n *\r\n * @method Phaser.Math.Vector2#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} A clone of this Vector2.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector2(this.x, this.y);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x || 0;\r\n this.y = src.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the component values of this Vector from a given Vector2Like object.\r\n *\r\n * @method Phaser.Math.Vector2#setFromObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Math.Vector2Like} obj - The object containing the component values to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setFromObject: function (obj)\r\n {\r\n this.x = obj.x || 0;\r\n this.y = obj.y || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x` and `y` components of the this Vector to the given `x` and `y` values.\r\n *\r\n * @method Phaser.Math.Vector2#set\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n set: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.x = x;\r\n this.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This method is an alias for `Vector2.set`.\r\n *\r\n * @method Phaser.Math.Vector2#setTo\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The x value to set for this Vector.\r\n * @param {number} [y=x] - The y value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setTo: function (x, y)\r\n {\r\n return this.set(x, y);\r\n },\r\n\r\n /**\r\n * Sets the `x` and `y` values of this object from a given polar coordinate.\r\n *\r\n * @method Phaser.Math.Vector2#setToPolar\r\n * @since 3.0.0\r\n *\r\n * @param {number} azimuth - The angular coordinate, in radians.\r\n * @param {number} [radius=1] - The radial coordinate (length).\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n setToPolar: function (azimuth, radius)\r\n {\r\n if (radius == null) { radius = 1; }\r\n\r\n this.x = Math.cos(azimuth) * radius;\r\n this.y = Math.sin(azimuth) * radius;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector2#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector.\r\n *\r\n * @return {boolean} Whether the given Vector is equal to this Vector.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y));\r\n },\r\n\r\n /**\r\n * Calculate the angle between this Vector and the positive x-axis, in radians.\r\n *\r\n * @method Phaser.Math.Vector2#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} The angle between this Vector, and the positive x-axis, given in radians.\r\n */\r\n angle: function ()\r\n {\r\n // computes the angle in radians with respect to the positive x-axis\r\n\r\n var angle = Math.atan2(this.y, this.x);\r\n\r\n if (angle < 0)\r\n {\r\n angle += 2 * Math.PI;\r\n }\r\n\r\n return angle;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n add: function (src)\r\n {\r\n this.x += src.x;\r\n this.y += src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector2#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n subtract: function (src)\r\n {\r\n this.x -= src.x;\r\n this.y -= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n multiply: function (src)\r\n {\r\n this.x *= src.x;\r\n this.y *= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector2#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n scale: function (value)\r\n {\r\n if (isFinite(value))\r\n {\r\n this.x *= value;\r\n this.y *= value;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#divide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n divide: function (src)\r\n {\r\n this.x /= src.x;\r\n this.y /= src.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x` and `y` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#distance\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector2#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (src)\r\n {\r\n var dx = src.x - this.x;\r\n var dy = src.y - this.y;\r\n\r\n return dx * dx + dy * dy;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return Math.sqrt(x * x + y * y);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector2#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n\r\n return x * x + y * y;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector2#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var len = x * x + y * y;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Right-hand normalize (make unit length) this Vector.\r\n *\r\n * @method Phaser.Math.Vector2#normalizeRightHand\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n normalizeRightHand: function ()\r\n {\r\n var x = this.x;\r\n\r\n this.x = this.y * -1;\r\n this.y = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to dot product with this Vector2.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (src)\r\n {\r\n return this.x * src.x + this.y * src.y;\r\n },\r\n\r\n /**\r\n * Calculate the cross product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to cross with this Vector2.\r\n *\r\n * @return {number} The cross product of this Vector and the given Vector.\r\n */\r\n cross: function (src)\r\n {\r\n return this.x * src.y - this.y * src.x;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector2#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} src - The Vector2 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n lerp: function (src, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n\r\n this.x = ax + t * (src.x - ax);\r\n this.y = ay + t * (src.y - ay);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[3] * y + m[6];\r\n this.y = m[1] * x + m[4] * y + m[7];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector2#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector2 with.\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[12];\r\n this.y = m[1] * x + m[5] * y + m[13];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0).\r\n *\r\n * @method Phaser.Math.Vector2#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector2} This Vector2.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ZERO\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.1.0\r\n */\r\nVector2.ZERO = new Vector2();\r\n\r\n/**\r\n * A static right Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.RIGHT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.RIGHT = new Vector2(1, 0);\r\n\r\n/**\r\n * A static left Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.LEFT\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.LEFT = new Vector2(-1, 0);\r\n\r\n/**\r\n * A static up Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.UP\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.UP = new Vector2(0, -1);\r\n\r\n/**\r\n * A static down Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.DOWN\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.DOWN = new Vector2(0, 1);\r\n\r\n/**\r\n * A static one Vector2 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector2.ONE\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\nVector2.ONE = new Vector2(1, 1);\r\n\r\nmodule.exports = Vector2;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector2.js?")},"./node_modules/phaser/src/math/Vector3.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 3D space.\r\n *\r\n * A three-component vector.\r\n *\r\n * @class Vector3\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n */\r\nvar Vector3 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector3 (x, y, z)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector3#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Set this Vector to point up.\r\n *\r\n * Sets the y component of the vector to 1, and the others to 0.\r\n *\r\n * @method Phaser.Math.Vector3#up\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n up: function ()\r\n {\r\n this.x = 0;\r\n this.y = 1;\r\n this.z = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector3.\r\n *\r\n * @method Phaser.Math.Vector3#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} A new Vector3 object containing this Vectors values.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector3(this.x, this.y, this.z);\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of two given Vectors.\r\n *\r\n * @method Phaser.Math.Vector3#crossVectors\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} a - The first Vector to multiply.\r\n * @param {Phaser.Math.Vector3} b - The second Vector to multiply.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n crossVectors: function (a, b)\r\n {\r\n var ax = a.x;\r\n var ay = a.y;\r\n var az = a.z;\r\n var bx = b.x;\r\n var by = b.y;\r\n var bz = b.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict equality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector3#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to compare against.\r\n *\r\n * @return {boolean} True if the two vectors strictly match, otherwise false.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z));\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#copy\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, and `z` components of this Vector to the given `x`, `y`, and `z` values.\r\n *\r\n * @method Phaser.Math.Vector3#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y and z components.\r\n * @param {number} [y] - The y value to set for this Vector.\r\n * @param {number} [z] - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n set: function (x, y, z)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector3#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector3#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n scale: function (scale)\r\n {\r\n if (isFinite(scale))\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n }\r\n else\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y` and `z` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector3#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector3#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return Math.sqrt(x * x + y * y + z * z);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector3#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n\r\n return x * x + y * y + z * z;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector3#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var len = x * x + y * y + z * z;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to dot product with this Vector3.\r\n *\r\n * @return {number} The dot product of this Vector and `v`.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z;\r\n },\r\n\r\n /**\r\n * Calculate the cross (vector) product of this Vector (which will be modified) and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#cross\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector to cross product with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n cross: function (v)\r\n {\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var bx = v.x;\r\n var by = v.y;\r\n var bz = v.z;\r\n\r\n this.x = ay * bz - az * by;\r\n this.y = az * bx - ax * bz;\r\n this.z = ax * by - ay * bx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector3#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector3} v - The Vector3 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat3\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix3} mat - The Matrix3 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat3: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = x * m[0] + y * m[3] + z * m[6];\r\n this.y = x * m[1] + y * m[4] + z * m[7];\r\n this.z = x * m[2] + y * m[5] + z * m[8];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector3#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12];\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13];\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transforms the coordinates of this Vector3 with the given Matrix4.\r\n *\r\n * @method Phaser.Math.Vector3#transformCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformCoordinates: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var tx = (x * m[0]) + (y * m[4]) + (z * m[8]) + m[12];\r\n var ty = (x * m[1]) + (y * m[5]) + (z * m[9]) + m[13];\r\n var tz = (x * m[2]) + (y * m[6]) + (z * m[10]) + m[14];\r\n var tw = (x * m[3]) + (y * m[7]) + (z * m[11]) + m[15];\r\n\r\n this.x = tx / tw;\r\n this.y = ty / tw;\r\n this.z = tz / tw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector3#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Multiplies this Vector3 by the specified matrix, applying a W divide. This is useful for projection,\r\n * e.g. unprojecting a 2D point into 3D space.\r\n *\r\n * @method Phaser.Math.Vector3#project\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to multiply this Vector3 with.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n project: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var m = mat.val;\r\n\r\n var a00 = m[0];\r\n var a01 = m[1];\r\n var a02 = m[2];\r\n var a03 = m[3];\r\n var a10 = m[4];\r\n var a11 = m[5];\r\n var a12 = m[6];\r\n var a13 = m[7];\r\n var a20 = m[8];\r\n var a21 = m[9];\r\n var a22 = m[10];\r\n var a23 = m[11];\r\n var a30 = m[12];\r\n var a31 = m[13];\r\n var a32 = m[14];\r\n var a33 = m[15];\r\n\r\n var lw = 1 / (x * a03 + y * a13 + z * a23 + a33);\r\n\r\n this.x = (x * a00 + y * a10 + z * a20 + a30) * lw;\r\n this.y = (x * a01 + y * a11 + z * a21 + a31) * lw;\r\n this.z = (x * a02 + y * a12 + z * a22 + a32) * lw;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Unproject this point from 2D space to 3D space.\r\n * The point should have its x and y properties set to\r\n * 2D screen space, and the z either at 0 (near plane)\r\n * or 1 (far plane). The provided matrix is assumed to already\r\n * be combined, i.e. projection * view * model.\r\n *\r\n * After this operation, this vector's (x, y, z) components will\r\n * represent the unprojected 3D coordinate.\r\n *\r\n * @method Phaser.Math.Vector3#unproject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} viewport - Screen x, y, width and height in pixels.\r\n * @param {Phaser.Math.Matrix4} invProjectionView - Combined projection and view matrix.\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n unproject: function (viewport, invProjectionView)\r\n {\r\n var viewX = viewport.x;\r\n var viewY = viewport.y;\r\n var viewWidth = viewport.z;\r\n var viewHeight = viewport.w;\r\n\r\n var x = this.x - viewX;\r\n var y = (viewHeight - this.y - 1) - viewY;\r\n var z = this.z;\r\n\r\n this.x = (2 * x) / viewWidth - 1;\r\n this.y = (2 * y) / viewHeight - 1;\r\n this.z = 2 * z - 1;\r\n\r\n return this.project(invProjectionView);\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector3#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector3} This Vector3.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n/**\r\n * A static zero Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ZERO\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ZERO = new Vector3();\r\n\r\n/**\r\n * A static right Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.RIGHT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.RIGHT = new Vector3(1, 0, 0);\r\n\r\n/**\r\n * A static left Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.LEFT\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.LEFT = new Vector3(-1, 0, 0);\r\n\r\n/**\r\n * A static up Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.UP\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.UP = new Vector3(0, -1, 0);\r\n\r\n/**\r\n * A static down Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.DOWN\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.DOWN = new Vector3(0, 1, 0);\r\n\r\n/**\r\n * A static forward Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.FORWARD\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.FORWARD = new Vector3(0, 0, 1);\r\n\r\n/**\r\n * A static back Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.BACK\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.BACK = new Vector3(0, 0, -1);\r\n\r\n/**\r\n * A static one Vector3 for use by reference.\r\n * \r\n * This constant is meant for comparison operations and should not be modified directly.\r\n *\r\n * @constant\r\n * @name Phaser.Math.Vector3.ONE\r\n * @type {Phaser.Math.Vector3}\r\n * @since 3.16.0\r\n */\r\nVector3.ONE = new Vector3(1, 1, 1);\r\n\r\nmodule.exports = Vector3;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector3.js?")},"./node_modules/phaser/src/math/Vector4.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Adapted from [gl-matrix](https://github.com/toji/gl-matrix) by toji\r\n// and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A representation of a vector in 4D space.\r\n *\r\n * A four-component vector.\r\n *\r\n * @class Vector4\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x component.\r\n * @param {number} [y] - The y component.\r\n * @param {number} [z] - The z component.\r\n * @param {number} [w] - The w component.\r\n */\r\nvar Vector4 = new Class({\r\n\r\n initialize:\r\n\r\n function Vector4 (x, y, z, w)\r\n {\r\n /**\r\n * The x component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#x\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The y component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#y\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The z component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#z\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.z = 0;\r\n\r\n /**\r\n * The w component of this Vector.\r\n *\r\n * @name Phaser.Math.Vector4#w\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.w = 0;\r\n\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n },\r\n\r\n /**\r\n * Make a clone of this Vector4.\r\n *\r\n * @method Phaser.Math.Vector4#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} A clone of this Vector4.\r\n */\r\n clone: function ()\r\n {\r\n return new Vector4(this.x, this.y, this.z, this.w);\r\n },\r\n\r\n /**\r\n * Copy the components of a given Vector into this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} src - The Vector to copy the components from.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n copy: function (src)\r\n {\r\n this.x = src.x;\r\n this.y = src.y;\r\n this.z = src.z || 0;\r\n this.w = src.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check whether this Vector is equal to a given Vector.\r\n *\r\n * Performs a strict quality check against each Vector's components.\r\n *\r\n * @method Phaser.Math.Vector4#equals\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The vector to check equality with.\r\n *\r\n * @return {boolean} A boolean indicating whether the two Vectors are equal or not.\r\n */\r\n equals: function (v)\r\n {\r\n return ((this.x === v.x) && (this.y === v.y) && (this.z === v.z) && (this.w === v.w));\r\n },\r\n\r\n /**\r\n * Set the `x`, `y`, `z` and `w` components of the this Vector to the given `x`, `y`, `z` and `w` values.\r\n *\r\n * @method Phaser.Math.Vector4#set\r\n * @since 3.0.0\r\n *\r\n * @param {(number|object)} x - The x value to set for this Vector, or an object containing x, y, z and w components.\r\n * @param {number} y - The y value to set for this Vector.\r\n * @param {number} z - The z value to set for this Vector.\r\n * @param {number} w - The z value to set for this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n set: function (x, y, z, w)\r\n {\r\n if (typeof x === 'object')\r\n {\r\n this.x = x.x || 0;\r\n this.y = x.y || 0;\r\n this.z = x.z || 0;\r\n this.w = x.w || 0;\r\n }\r\n else\r\n {\r\n this.x = x || 0;\r\n this.y = y || 0;\r\n this.z = z || 0;\r\n this.w = w || 0;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a given Vector to this Vector. Addition is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to add to this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n add: function (v)\r\n {\r\n this.x += v.x;\r\n this.y += v.y;\r\n this.z += v.z || 0;\r\n this.w += v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Subtract the given Vector from this Vector. Subtraction is component-wise.\r\n *\r\n * @method Phaser.Math.Vector4#subtract\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to subtract from this Vector.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n subtract: function (v)\r\n {\r\n this.x -= v.x;\r\n this.y -= v.y;\r\n this.z -= v.z || 0;\r\n this.w -= v.w || 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scale this Vector by the given value.\r\n *\r\n * @method Phaser.Math.Vector4#scale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scale - The value to scale this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n scale: function (scale)\r\n {\r\n this.x *= scale;\r\n this.y *= scale;\r\n this.z *= scale;\r\n this.w *= scale;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the length (or magnitude) of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#length\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector.\r\n */\r\n length: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return Math.sqrt(x * x + y * y + z * z + w * w);\r\n },\r\n\r\n /**\r\n * Calculate the length of this Vector squared.\r\n *\r\n * @method Phaser.Math.Vector4#lengthSq\r\n * @since 3.0.0\r\n *\r\n * @return {number} The length of this Vector, squared.\r\n */\r\n lengthSq: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n\r\n return x * x + y * y + z * z + w * w;\r\n },\r\n\r\n /**\r\n * Normalize this Vector.\r\n *\r\n * Makes the vector a unit length vector (magnitude of 1) in the same direction.\r\n *\r\n * @method Phaser.Math.Vector4#normalize\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n normalize: function ()\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var len = x * x + y * y + z * z + w * w;\r\n\r\n if (len > 0)\r\n {\r\n len = 1 / Math.sqrt(len);\r\n\r\n this.x = x * len;\r\n this.y = y * len;\r\n this.z = z * len;\r\n this.w = w * len;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the dot product of this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#dot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to dot product with this Vector4.\r\n *\r\n * @return {number} The dot product of this Vector and the given Vector.\r\n */\r\n dot: function (v)\r\n {\r\n return this.x * v.x + this.y * v.y + this.z * v.z + this.w * v.w;\r\n },\r\n\r\n /**\r\n * Linearly interpolate between this Vector and the given Vector.\r\n *\r\n * Interpolates this Vector towards the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#lerp\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector4} v - The Vector4 to interpolate towards.\r\n * @param {number} [t=0] - The interpolation percentage, between 0 and 1.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n lerp: function (v, t)\r\n {\r\n if (t === undefined) { t = 0; }\r\n\r\n var ax = this.x;\r\n var ay = this.y;\r\n var az = this.z;\r\n var aw = this.w;\r\n\r\n this.x = ax + t * (v.x - ax);\r\n this.y = ay + t * (v.y - ay);\r\n this.z = az + t * (v.z - az);\r\n this.w = aw + t * (v.w - aw);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise multiplication between this Vector and the given Vector.\r\n *\r\n * Multiplies this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#multiply\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to multiply this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n multiply: function (v)\r\n {\r\n this.x *= v.x;\r\n this.y *= v.y;\r\n this.z *= v.z || 1;\r\n this.w *= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Perform a component-wise division between this Vector and the given Vector.\r\n *\r\n * Divides this Vector by the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#divide\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to divide this Vector by.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n divide: function (v)\r\n {\r\n this.x /= v.x;\r\n this.y /= v.y;\r\n this.z /= v.z || 1;\r\n this.w /= v.w || 1;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector.\r\n *\r\n * @method Phaser.Math.Vector4#distance\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector.\r\n */\r\n distance: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return Math.sqrt(dx * dx + dy * dy + dz * dz + dw * dw);\r\n },\r\n\r\n /**\r\n * Calculate the distance between this Vector and the given Vector, squared.\r\n *\r\n * @method Phaser.Math.Vector4#distanceSq\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Math.Vector2|Phaser.Math.Vector3|Phaser.Math.Vector4)} v - The Vector to calculate the distance to.\r\n *\r\n * @return {number} The distance from this Vector to the given Vector, squared.\r\n */\r\n distanceSq: function (v)\r\n {\r\n var dx = v.x - this.x;\r\n var dy = v.y - this.y;\r\n var dz = v.z - this.z || 0;\r\n var dw = v.w - this.w || 0;\r\n\r\n return dx * dx + dy * dy + dz * dz + dw * dw;\r\n },\r\n\r\n /**\r\n * Negate the `x`, `y`, `z` and `w` components of this Vector.\r\n *\r\n * @method Phaser.Math.Vector4#negate\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n negate: function ()\r\n {\r\n this.x = -this.x;\r\n this.y = -this.y;\r\n this.z = -this.z;\r\n this.w = -this.w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Matrix.\r\n *\r\n * @method Phaser.Math.Vector4#transformMat4\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Matrix4} mat - The Matrix4 to transform this Vector4 with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformMat4: function (mat)\r\n {\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var w = this.w;\r\n var m = mat.val;\r\n\r\n this.x = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\r\n this.y = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\r\n this.z = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\r\n this.w = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Transform this Vector with the given Quaternion.\r\n *\r\n * @method Phaser.Math.Vector4#transformQuat\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Quaternion} q - The Quaternion to transform this Vector with.\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n transformQuat: function (q)\r\n {\r\n // TODO: is this really the same as Vector3?\r\n // Also, what about this: http://molecularmusings.wordpress.com/2013/05/24/a-faster-quaternion-vector-multiplication/\r\n // benchmarks: http://jsperf.com/quaternion-transform-vec3-implementations\r\n var x = this.x;\r\n var y = this.y;\r\n var z = this.z;\r\n var qx = q.x;\r\n var qy = q.y;\r\n var qz = q.z;\r\n var qw = q.w;\r\n\r\n // calculate quat * vec\r\n var ix = qw * x + qy * z - qz * y;\r\n var iy = qw * y + qz * x - qx * z;\r\n var iz = qw * z + qx * y - qy * x;\r\n var iw = -qx * x - qy * y - qz * z;\r\n\r\n // calculate result * inverse quat\r\n this.x = ix * qw + iw * -qx + iy * -qz - iz * -qy;\r\n this.y = iy * qw + iw * -qy + iz * -qx - ix * -qz;\r\n this.z = iz * qw + iw * -qz + ix * -qy - iy * -qx;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Make this Vector the zero vector (0, 0, 0, 0).\r\n *\r\n * @method Phaser.Math.Vector4#reset\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Math.Vector4} This Vector4.\r\n */\r\n reset: function ()\r\n {\r\n this.x = 0;\r\n this.y = 0;\r\n this.z = 0;\r\n this.w = 0;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\n// TODO: Check if these are required internally, if not, remove.\r\nVector4.prototype.sub = Vector4.prototype.subtract;\r\nVector4.prototype.mul = Vector4.prototype.multiply;\r\nVector4.prototype.div = Vector4.prototype.divide;\r\nVector4.prototype.dist = Vector4.prototype.distance;\r\nVector4.prototype.distSq = Vector4.prototype.distanceSq;\r\nVector4.prototype.len = Vector4.prototype.length;\r\nVector4.prototype.lenSq = Vector4.prototype.lengthSq;\r\n\r\nmodule.exports = Vector4;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Vector4.js?")},"./node_modules/phaser/src/math/Within.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the two values are within the given `tolerance` of each other.\r\n *\r\n * @function Phaser.Math.Within\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value to use in the calculation.\r\n * @param {number} b - The second value to use in the calculation.\r\n * @param {number} tolerance - The tolerance. Anything equal to or less than this value is considered as being within range.\r\n *\r\n * @return {boolean} Returns `true` if `a` is less than or equal to the tolerance of `b`.\r\n */\r\nvar Within = function (a, b, tolerance)\r\n{\r\n return (Math.abs(a - b) <= tolerance);\r\n};\r\n\r\nmodule.exports = Within;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Within.js?")},"./node_modules/phaser/src/math/Wrap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Wrap the given `value` between `min` and `max.\r\n *\r\n * @function Phaser.Math.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to wrap.\r\n * @param {number} min - The minimum value.\r\n * @param {number} max - The maximum value.\r\n *\r\n * @return {number} The wrapped value.\r\n */\r\nvar Wrap = function (value, min, max)\r\n{\r\n var range = max - min;\r\n\r\n return (min + ((((value - min) % range) + range) % range));\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/Wrap.js?")},"./node_modules/phaser/src/math/angle/Between.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * @function Phaser.Math.Angle.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar Between = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(y2 - y1, x2 - x1);\r\n};\r\n\r\nmodule.exports = Between;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Between.js?")},"./node_modules/phaser/src/math/angle/BetweenPoints.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * Calculates the angle of the vector from the first point to the second point.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPoints\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPoints = function (point1, point2)\r\n{\r\n return Math.atan2(point2.y - point1.y, point2.x - point1.x);\r\n};\r\n\r\nmodule.exports = BetweenPoints;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPoints.js?")},"./node_modules/phaser/src/math/angle/BetweenPointsY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.BetweenPoints} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenPointsY\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Point|object)} point1 - The first point.\r\n * @param {(Phaser.Geom.Point|object)} point2 - The second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenPointsY = function (point1, point2)\r\n{\r\n return Math.atan2(point2.x - point1.x, point2.y - point1.y);\r\n};\r\n\r\nmodule.exports = BetweenPointsY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenPointsY.js?")},"./node_modules/phaser/src/math/angle/BetweenY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Find the angle of a segment from (x1, y1) -> (x2, y2).\r\n *\r\n * The difference between this method and {@link Phaser.Math.Angle.Between} is that this assumes the y coordinate\r\n * travels down the screen.\r\n *\r\n * @function Phaser.Math.Angle.BetweenY\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The angle in radians.\r\n */\r\nvar BetweenY = function (x1, y1, x2, y2)\r\n{\r\n return Math.atan2(x2 - x1, y2 - y1);\r\n};\r\n\r\nmodule.exports = BetweenY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/BetweenY.js?")},"./node_modules/phaser/src/math/angle/CounterClockwise.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Takes an angle in Phasers default clockwise format and converts it so that\r\n * 0 is North, 90 is West, 180 is South and 270 is East,\r\n * therefore running counter-clockwise instead of clockwise.\r\n * \r\n * You can pass in the angle from a Game Object using:\r\n * \r\n * ```javascript\r\n * var converted = CounterClockwise(gameobject.rotation);\r\n * ```\r\n * \r\n * All values for this function are in radians.\r\n *\r\n * @function Phaser.Math.Angle.CounterClockwise\r\n * @since 3.16.0\r\n *\r\n * @param {number} angle - The angle to convert, in radians.\r\n *\r\n * @return {number} The converted angle, in radians.\r\n */\r\nvar CounterClockwise = function (angle)\r\n{\r\n if (angle > Math.PI)\r\n {\r\n angle -= CONST.PI2;\r\n }\r\n\r\n return Math.abs((((angle + CONST.TAU) % CONST.PI2) - CONST.PI2) % CONST.PI2);\r\n};\r\n\r\nmodule.exports = CounterClockwise;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/CounterClockwise.js?')},"./node_modules/phaser/src/math/angle/Normalize.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Normalize an angle to the [0, 2pi] range.\r\n *\r\n * @function Phaser.Math.Angle.Normalize\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to normalize, in radians.\r\n *\r\n * @return {number} The normalized angle, in radians.\r\n */\r\nvar Normalize = function (angle)\r\n{\r\n angle = angle % (2 * Math.PI);\r\n\r\n if (angle >= 0)\r\n {\r\n return angle;\r\n }\r\n else\r\n {\r\n return angle + 2 * Math.PI;\r\n }\r\n};\r\n\r\nmodule.exports = Normalize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Normalize.js?")},"./node_modules/phaser/src/math/angle/Reverse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Normalize = __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js");\r\n\r\n/**\r\n * Reverse the given angle.\r\n *\r\n * @function Phaser.Math.Angle.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to reverse, in radians.\r\n *\r\n * @return {number} The reversed angle, in radians.\r\n */\r\nvar Reverse = function (angle)\r\n{\r\n return Normalize(angle + Math.PI);\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Reverse.js?')},"./node_modules/phaser/src/math/angle/RotateTo.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/math/const.js");\r\n\r\n/**\r\n * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call.\r\n *\r\n * @function Phaser.Math.Angle.RotateTo\r\n * @since 3.0.0\r\n *\r\n * @param {number} currentAngle - The current angle, in radians.\r\n * @param {number} targetAngle - The target angle to rotate to, in radians.\r\n * @param {number} [lerp=0.05] - The lerp value to add to the current angle.\r\n *\r\n * @return {number} The adjusted angle.\r\n */\r\nvar RotateTo = function (currentAngle, targetAngle, lerp)\r\n{\r\n if (lerp === undefined) { lerp = 0.05; }\r\n\r\n if (currentAngle === targetAngle)\r\n {\r\n return currentAngle;\r\n }\r\n\r\n if (Math.abs(targetAngle - currentAngle) <= lerp || Math.abs(targetAngle - currentAngle) >= (MATH_CONST.PI2 - lerp))\r\n {\r\n currentAngle = targetAngle;\r\n }\r\n else\r\n {\r\n if (Math.abs(targetAngle - currentAngle) > Math.PI)\r\n {\r\n if (targetAngle < currentAngle)\r\n {\r\n targetAngle += MATH_CONST.PI2;\r\n }\r\n else\r\n {\r\n targetAngle -= MATH_CONST.PI2;\r\n }\r\n }\r\n\r\n if (targetAngle > currentAngle)\r\n {\r\n currentAngle += lerp;\r\n }\r\n else if (targetAngle < currentAngle)\r\n {\r\n currentAngle -= lerp;\r\n }\r\n }\r\n\r\n return currentAngle;\r\n};\r\n\r\nmodule.exports = RotateTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/RotateTo.js?')},"./node_modules/phaser/src/math/angle/ShortestBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Gets the shortest angle between `angle1` and `angle2`.\r\n *\r\n * Both angles must be in the range -180 to 180, which is the same clamped\r\n * range that `sprite.angle` uses, so you can pass in two sprite angles to\r\n * this method and get the shortest angle back between the two of them.\r\n *\r\n * The angle returned will be in the same range. If the returned angle is\r\n * greater than 0 then it's a counter-clockwise rotation, if < 0 then it's\r\n * a clockwise rotation.\r\n *\r\n * TODO: Wrap the angles in this function?\r\n *\r\n * @function Phaser.Math.Angle.ShortestBetween\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle1 - The first angle in the range -180 to 180.\r\n * @param {number} angle2 - The second angle in the range -180 to 180.\r\n *\r\n * @return {number} The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.\r\n */\r\nvar ShortestBetween = function (angle1, angle2)\r\n{\r\n var difference = angle2 - angle1;\r\n\r\n if (difference === 0)\r\n {\r\n return 0;\r\n }\r\n\r\n var times = Math.floor((difference - (-180)) / 360);\r\n\r\n return difference - (times * 360);\r\n\r\n};\r\n\r\nmodule.exports = ShortestBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/ShortestBetween.js?")},"./node_modules/phaser/src/math/angle/Wrap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MathWrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle.\r\n *\r\n * Wraps the angle to a value in the range of -PI to PI.\r\n *\r\n * @function Phaser.Math.Angle.Wrap\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in radians.\r\n *\r\n * @return {number} The wrapped angle, in radians.\r\n */\r\nvar Wrap = function (angle)\r\n{\r\n return MathWrap(angle, -Math.PI, Math.PI);\r\n};\r\n\r\nmodule.exports = Wrap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/Wrap.js?')},"./node_modules/phaser/src/math/angle/WrapDegrees.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Wrap = __webpack_require__(/*! ../Wrap */ "./node_modules/phaser/src/math/Wrap.js");\r\n\r\n/**\r\n * Wrap an angle in degrees.\r\n *\r\n * Wraps the angle to a value in the range of -180 to 180.\r\n *\r\n * @function Phaser.Math.Angle.WrapDegrees\r\n * @since 3.0.0\r\n *\r\n * @param {number} angle - The angle to wrap, in degrees.\r\n *\r\n * @return {number} The wrapped angle, in degrees.\r\n */\r\nvar WrapDegrees = function (angle)\r\n{\r\n return Wrap(angle, -180, 180);\r\n};\r\n\r\nmodule.exports = WrapDegrees;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/WrapDegrees.js?')},"./node_modules/phaser/src/math/angle/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Angle\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/angle/Between.js"),\r\n BetweenPoints: __webpack_require__(/*! ./BetweenPoints */ "./node_modules/phaser/src/math/angle/BetweenPoints.js"),\r\n BetweenPointsY: __webpack_require__(/*! ./BetweenPointsY */ "./node_modules/phaser/src/math/angle/BetweenPointsY.js"),\r\n BetweenY: __webpack_require__(/*! ./BetweenY */ "./node_modules/phaser/src/math/angle/BetweenY.js"),\r\n CounterClockwise: __webpack_require__(/*! ./CounterClockwise */ "./node_modules/phaser/src/math/angle/CounterClockwise.js"),\r\n Normalize: __webpack_require__(/*! ./Normalize */ "./node_modules/phaser/src/math/angle/Normalize.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/math/angle/Reverse.js"),\r\n RotateTo: __webpack_require__(/*! ./RotateTo */ "./node_modules/phaser/src/math/angle/RotateTo.js"),\r\n ShortestBetween: __webpack_require__(/*! ./ShortestBetween */ "./node_modules/phaser/src/math/angle/ShortestBetween.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js"),\r\n WrapDegrees: __webpack_require__(/*! ./WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/angle/index.js?')},"./node_modules/phaser/src/math/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH_CONST = {\r\n\r\n /**\r\n * The value of PI * 2.\r\n * \r\n * @name Phaser.Math.PI2\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n PI2: Math.PI * 2,\r\n\r\n /**\r\n * The value of PI * 0.5.\r\n * \r\n * @name Phaser.Math.TAU\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TAU: Math.PI * 0.5,\r\n\r\n /**\r\n * An epsilon value (1.0e-6)\r\n * \r\n * @name Phaser.Math.EPSILON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n EPSILON: 1.0e-6,\r\n\r\n /**\r\n * For converting degrees to radians (PI / 180)\r\n * \r\n * @name Phaser.Math.DEG_TO_RAD\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n DEG_TO_RAD: Math.PI / 180,\r\n\r\n /**\r\n * For converting radians to degrees (180 / PI)\r\n * \r\n * @name Phaser.Math.RAD_TO_DEG\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n RAD_TO_DEG: 180 / Math.PI,\r\n\r\n /**\r\n * An instance of the Random Number Generator.\r\n * This is not set until the Game boots.\r\n * \r\n * @name Phaser.Math.RND\r\n * @type {Phaser.Math.RandomDataGenerator}\r\n * @since 3.0.0\r\n */\r\n RND: null\r\n\r\n};\r\n\r\nmodule.exports = MATH_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/const.js?")},"./node_modules/phaser/src/math/distance/DistanceBetween.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points).\r\n *\r\n * @function Phaser.Math.Distance.Between\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistanceBetween = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return Math.sqrt(dx * dx + dy * dy);\r\n};\r\n\r\nmodule.exports = DistanceBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceBetween.js?")},"./node_modules/phaser/src/math/distance/DistancePower.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points) to the power of `pow`.\r\n *\r\n * @function Phaser.Math.Distance.Power\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n * @param {number} pow - The exponent.\r\n *\r\n * @return {number} The distance between each point.\r\n */\r\nvar DistancePower = function (x1, y1, x2, y2, pow)\r\n{\r\n if (pow === undefined) { pow = 2; }\r\n\r\n return Math.sqrt(Math.pow(x2 - x1, pow) + Math.pow(y2 - y1, pow));\r\n};\r\n\r\nmodule.exports = DistancePower;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistancePower.js?")},"./node_modules/phaser/src/math/distance/DistanceSquared.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the distance between two sets of coordinates (points), squared.\r\n *\r\n * @function Phaser.Math.Distance.Squared\r\n * @since 3.0.0\r\n *\r\n * @param {number} x1 - The x coordinate of the first point.\r\n * @param {number} y1 - The y coordinate of the first point.\r\n * @param {number} x2 - The x coordinate of the second point.\r\n * @param {number} y2 - The y coordinate of the second point.\r\n *\r\n * @return {number} The distance between each point, squared.\r\n */\r\nvar DistanceSquared = function (x1, y1, x2, y2)\r\n{\r\n var dx = x1 - x2;\r\n var dy = y1 - y2;\r\n\r\n return dx * dx + dy * dy;\r\n};\r\n\r\nmodule.exports = DistanceSquared;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/DistanceSquared.js?")},"./node_modules/phaser/src/math/distance/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Distance\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Between: __webpack_require__(/*! ./DistanceBetween */ "./node_modules/phaser/src/math/distance/DistanceBetween.js"),\r\n Power: __webpack_require__(/*! ./DistancePower */ "./node_modules/phaser/src/math/distance/DistancePower.js"),\r\n Squared: __webpack_require__(/*! ./DistanceSquared */ "./node_modules/phaser/src/math/distance/DistanceSquared.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/distance/index.js?')},"./node_modules/phaser/src/math/easing/EaseMap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Back = __webpack_require__(/*! ./back */ \"./node_modules/phaser/src/math/easing/back/index.js\");\r\nvar Bounce = __webpack_require__(/*! ./bounce */ \"./node_modules/phaser/src/math/easing/bounce/index.js\");\r\nvar Circular = __webpack_require__(/*! ./circular */ \"./node_modules/phaser/src/math/easing/circular/index.js\");\r\nvar Cubic = __webpack_require__(/*! ./cubic */ \"./node_modules/phaser/src/math/easing/cubic/index.js\");\r\nvar Elastic = __webpack_require__(/*! ./elastic */ \"./node_modules/phaser/src/math/easing/elastic/index.js\");\r\nvar Expo = __webpack_require__(/*! ./expo */ \"./node_modules/phaser/src/math/easing/expo/index.js\");\r\nvar Linear = __webpack_require__(/*! ./linear */ \"./node_modules/phaser/src/math/easing/linear/index.js\");\r\nvar Quadratic = __webpack_require__(/*! ./quadratic */ \"./node_modules/phaser/src/math/easing/quadratic/index.js\");\r\nvar Quartic = __webpack_require__(/*! ./quartic */ \"./node_modules/phaser/src/math/easing/quartic/index.js\");\r\nvar Quintic = __webpack_require__(/*! ./quintic */ \"./node_modules/phaser/src/math/easing/quintic/index.js\");\r\nvar Sine = __webpack_require__(/*! ./sine */ \"./node_modules/phaser/src/math/easing/sine/index.js\");\r\nvar Stepped = __webpack_require__(/*! ./stepped */ \"./node_modules/phaser/src/math/easing/stepped/index.js\");\r\n\r\n// EaseMap\r\nmodule.exports = {\r\n\r\n Power0: Linear,\r\n Power1: Quadratic.Out,\r\n Power2: Cubic.Out,\r\n Power3: Quartic.Out,\r\n Power4: Quintic.Out,\r\n\r\n Linear: Linear,\r\n Quad: Quadratic.Out,\r\n Cubic: Cubic.Out,\r\n Quart: Quartic.Out,\r\n Quint: Quintic.Out,\r\n Sine: Sine.Out,\r\n Expo: Expo.Out,\r\n Circ: Circular.Out,\r\n Elastic: Elastic.Out,\r\n Back: Back.Out,\r\n Bounce: Bounce.Out,\r\n Stepped: Stepped,\r\n\r\n 'Quad.easeIn': Quadratic.In,\r\n 'Cubic.easeIn': Cubic.In,\r\n 'Quart.easeIn': Quartic.In,\r\n 'Quint.easeIn': Quintic.In,\r\n 'Sine.easeIn': Sine.In,\r\n 'Expo.easeIn': Expo.In,\r\n 'Circ.easeIn': Circular.In,\r\n 'Elastic.easeIn': Elastic.In,\r\n 'Back.easeIn': Back.In,\r\n 'Bounce.easeIn': Bounce.In,\r\n\r\n 'Quad.easeOut': Quadratic.Out,\r\n 'Cubic.easeOut': Cubic.Out,\r\n 'Quart.easeOut': Quartic.Out,\r\n 'Quint.easeOut': Quintic.Out,\r\n 'Sine.easeOut': Sine.Out,\r\n 'Expo.easeOut': Expo.Out,\r\n 'Circ.easeOut': Circular.Out,\r\n 'Elastic.easeOut': Elastic.Out,\r\n 'Back.easeOut': Back.Out,\r\n 'Bounce.easeOut': Bounce.Out,\r\n\r\n 'Quad.easeInOut': Quadratic.InOut,\r\n 'Cubic.easeInOut': Cubic.InOut,\r\n 'Quart.easeInOut': Quartic.InOut,\r\n 'Quint.easeInOut': Quintic.InOut,\r\n 'Sine.easeInOut': Sine.InOut,\r\n 'Expo.easeInOut': Expo.InOut,\r\n 'Circ.easeInOut': Circular.InOut,\r\n 'Elastic.easeInOut': Elastic.InOut,\r\n 'Back.easeInOut': Back.InOut,\r\n 'Bounce.easeInOut': Bounce.InOut\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/EaseMap.js?")},"./node_modules/phaser/src/math/easing/back/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Back.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return v * v * ((overshoot + 1) * v - overshoot);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/In.js?")},"./node_modules/phaser/src/math/easing/back/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Back.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n var s = overshoot * 1.525;\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * (v * v * ((s + 1) * v - s));\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * ((s + 1) * v + s) + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/InOut.js?")},"./node_modules/phaser/src/math/easing/back/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Back ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Back.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [overshoot=1.70158] - The overshoot amount.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, overshoot)\r\n{\r\n if (overshoot === undefined) { overshoot = 1.70158; }\r\n\r\n return --v * v * ((overshoot + 1) * v + overshoot) + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/Out.js?")},"./node_modules/phaser/src/math/easing/back/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Back\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/back/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/back/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/back/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/back/index.js?')},"./node_modules/phaser/src/math/easing/bounce/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n v = 1 - v;\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n return 1 - (7.5625 * v * v);\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 1.5 / 2.75) * v + 0.75);\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 1 - (7.5625 * (v -= 2.25 / 2.75) * v + 0.9375);\r\n }\r\n else\r\n {\r\n return 1 - (7.5625 * (v -= 2.625 / 2.75) * v + 0.984375);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/In.js?")},"./node_modules/phaser/src/math/easing/bounce/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n var reverse = false;\r\n\r\n if (v < 0.5)\r\n {\r\n v = 1 - (v * 2);\r\n reverse = true;\r\n }\r\n else\r\n {\r\n v = (v * 2) - 1;\r\n }\r\n\r\n if (v < 1 / 2.75)\r\n {\r\n v = 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n v = 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n v = 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n\r\n if (reverse)\r\n {\r\n return (1 - v) * 0.5;\r\n }\r\n else\r\n {\r\n return v * 0.5 + 0.5;\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/InOut.js?")},"./node_modules/phaser/src/math/easing/bounce/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Bounce ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Bounce.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v < 1 / 2.75)\r\n {\r\n return 7.5625 * v * v;\r\n }\r\n else if (v < 2 / 2.75)\r\n {\r\n return 7.5625 * (v -= 1.5 / 2.75) * v + 0.75;\r\n }\r\n else if (v < 2.5 / 2.75)\r\n {\r\n return 7.5625 * (v -= 2.25 / 2.75) * v + 0.9375;\r\n }\r\n else\r\n {\r\n return 7.5625 * (v -= 2.625 / 2.75) * v + 0.984375;\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/Out.js?")},"./node_modules/phaser/src/math/easing/bounce/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Bounce\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/bounce/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/bounce/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/bounce/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/bounce/index.js?')},"./node_modules/phaser/src/math/easing/circular/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Circular.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return 1 - Math.sqrt(1 - v * v);\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/In.js?")},"./node_modules/phaser/src/math/easing/circular/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (Math.sqrt(1 - v * v) - 1);\r\n }\r\n else\r\n {\r\n return 0.5 * (Math.sqrt(1 - (v -= 2) * v) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/InOut.js?")},"./node_modules/phaser/src/math/easing/circular/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Circular ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Circular.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return Math.sqrt(1 - (--v * v));\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/Out.js?")},"./node_modules/phaser/src/math/easing/circular/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Circular\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/circular/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/circular/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/circular/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/circular/index.js?')},"./node_modules/phaser/src/math/easing/cubic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/In.js?")},"./node_modules/phaser/src/math/easing/cubic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/InOut.js?")},"./node_modules/phaser/src/math/easing/cubic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Cubic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Cubic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/Out.js?")},"./node_modules/phaser/src/math/easing/cubic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Cubic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/cubic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/cubic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/cubic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/cubic/index.js?')},"./node_modules/phaser/src/math/easing/elastic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return -(amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/In.js?")},"./node_modules/phaser/src/math/easing/elastic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n if ((v *= 2) < 1)\r\n {\r\n return -0.5 * (amplitude * Math.pow(2, 10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period));\r\n }\r\n else\r\n {\r\n return amplitude * Math.pow(2, -10 * (v -= 1)) * Math.sin((v - s) * (2 * Math.PI) / period) * 0.5 + 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/InOut.js?")},"./node_modules/phaser/src/math/easing/elastic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Elastic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Elastic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [amplitude=0.1] - The amplitude of the elastic ease.\r\n * @param {number} [period=0.1] - Sets how tight the sine-wave is, where smaller values are tighter waves, which result in more cycles.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v, amplitude, period)\r\n{\r\n if (amplitude === undefined) { amplitude = 0.1; }\r\n if (period === undefined) { period = 0.1; }\r\n\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n var s = period / 4;\r\n\r\n if (amplitude < 1)\r\n {\r\n amplitude = 1;\r\n }\r\n else\r\n {\r\n s = period * Math.asin(1 / amplitude) / (2 * Math.PI);\r\n }\r\n\r\n return (amplitude * Math.pow(2, -10 * v) * Math.sin((v - s) * (2 * Math.PI) / period) + 1);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/Out.js?")},"./node_modules/phaser/src/math/easing/elastic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Elastic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/elastic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/elastic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/elastic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/elastic/index.js?')},"./node_modules/phaser/src/math/easing/expo/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Expo.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return Math.pow(2, 10 * (v - 1)) - 0.001;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/In.js?")},"./node_modules/phaser/src/math/easing/expo/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * Math.pow(2, 10 * (v - 1));\r\n }\r\n else\r\n {\r\n return 0.5 * (2 - Math.pow(2, -10 * (v - 1)));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/InOut.js?")},"./node_modules/phaser/src/math/easing/expo/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Exponential ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Expo.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - Math.pow(2, -10 * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/Out.js?")},"./node_modules/phaser/src/math/easing/expo/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Expo\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/expo/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/expo/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/expo/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/expo/index.js?')},"./node_modules/phaser/src/math/easing/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Back: __webpack_require__(/*! ./back */ "./node_modules/phaser/src/math/easing/back/index.js"),\r\n Bounce: __webpack_require__(/*! ./bounce */ "./node_modules/phaser/src/math/easing/bounce/index.js"),\r\n Circular: __webpack_require__(/*! ./circular */ "./node_modules/phaser/src/math/easing/circular/index.js"),\r\n Cubic: __webpack_require__(/*! ./cubic */ "./node_modules/phaser/src/math/easing/cubic/index.js"),\r\n Elastic: __webpack_require__(/*! ./elastic */ "./node_modules/phaser/src/math/easing/elastic/index.js"),\r\n Expo: __webpack_require__(/*! ./expo */ "./node_modules/phaser/src/math/easing/expo/index.js"),\r\n Linear: __webpack_require__(/*! ./linear */ "./node_modules/phaser/src/math/easing/linear/index.js"),\r\n Quadratic: __webpack_require__(/*! ./quadratic */ "./node_modules/phaser/src/math/easing/quadratic/index.js"),\r\n Quartic: __webpack_require__(/*! ./quartic */ "./node_modules/phaser/src/math/easing/quartic/index.js"),\r\n Quintic: __webpack_require__(/*! ./quintic */ "./node_modules/phaser/src/math/easing/quintic/index.js"),\r\n Sine: __webpack_require__(/*! ./sine */ "./node_modules/phaser/src/math/easing/sine/index.js"),\r\n Stepped: __webpack_require__(/*! ./stepped */ "./node_modules/phaser/src/math/easing/stepped/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/index.js?')},"./node_modules/phaser/src/math/easing/linear/Linear.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Linear easing (no variation).\r\n *\r\n * @function Phaser.Math.Easing.Linear.Linear\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Linear = function (v)\r\n{\r\n return v;\r\n};\r\n\r\nmodule.exports = Linear;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/Linear.js?")},"./node_modules/phaser/src/math/easing/linear/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Linear\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/easing/linear/Linear.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/linear/index.js?')},"./node_modules/phaser/src/math/easing/quadratic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/In.js?")},"./node_modules/phaser/src/math/easing/quadratic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * (--v * (v - 2) - 1);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/InOut.js?")},"./node_modules/phaser/src/math/easing/quadratic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quadratic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quadratic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return v * (2 - v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/Out.js?")},"./node_modules/phaser/src/math/easing/quadratic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quadratic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quadratic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quadratic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quadratic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quadratic/index.js?')},"./node_modules/phaser/src/math/easing/quartic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/In.js?")},"./node_modules/phaser/src/math/easing/quartic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v;\r\n }\r\n else\r\n {\r\n return -0.5 * ((v -= 2) * v * v * v - 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/InOut.js?")},"./node_modules/phaser/src/math/easing/quartic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quartic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quartic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return 1 - (--v * v * v * v);\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/Out.js?")},"./node_modules/phaser/src/math/easing/quartic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quartic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quartic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quartic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quartic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quartic/index.js?')},"./node_modules/phaser/src/math/easing/quintic/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n return v * v * v * v * v;\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/In.js?")},"./node_modules/phaser/src/math/easing/quintic/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if ((v *= 2) < 1)\r\n {\r\n return 0.5 * v * v * v * v * v;\r\n }\r\n else\r\n {\r\n return 0.5 * ((v -= 2) * v * v * v * v + 2);\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/InOut.js?")},"./node_modules/phaser/src/math/easing/quintic/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Quintic ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Quintic.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n return --v * v * v * v * v + 1;\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/Out.js?")},"./node_modules/phaser/src/math/easing/quintic/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Quintic\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/quintic/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/quintic/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/quintic/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/quintic/index.js?')},"./node_modules/phaser/src/math/easing/sine/In.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in.\r\n *\r\n * @function Phaser.Math.Easing.Sine.In\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar In = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 1 - Math.cos(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = In;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/In.js?")},"./node_modules/phaser/src/math/easing/sine/InOut.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-in/out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.InOut\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar InOut = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return 0.5 * (1 - Math.cos(Math.PI * v));\r\n }\r\n};\r\n\r\nmodule.exports = InOut;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/InOut.js?")},"./node_modules/phaser/src/math/easing/sine/Out.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sinusoidal ease-out.\r\n *\r\n * @function Phaser.Math.Easing.Sine.Out\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Out = function (v)\r\n{\r\n if (v === 0)\r\n {\r\n return 0;\r\n }\r\n else if (v === 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return Math.sin(v * Math.PI / 2);\r\n }\r\n};\r\n\r\nmodule.exports = Out;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/Out.js?")},"./node_modules/phaser/src/math/easing/sine/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Sine\r\n */\r\n\r\nmodule.exports = {\r\n\r\n In: __webpack_require__(/*! ./In */ "./node_modules/phaser/src/math/easing/sine/In.js"),\r\n Out: __webpack_require__(/*! ./Out */ "./node_modules/phaser/src/math/easing/sine/Out.js"),\r\n InOut: __webpack_require__(/*! ./InOut */ "./node_modules/phaser/src/math/easing/sine/InOut.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/sine/index.js?')},"./node_modules/phaser/src/math/easing/stepped/Stepped.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Stepped easing.\r\n *\r\n * @function Phaser.Math.Easing.Stepped.Stepped\r\n * @since 3.0.0\r\n *\r\n * @param {number} v - The value to be tweened.\r\n * @param {number} [steps=1] - The number of steps in the ease.\r\n *\r\n * @return {number} The tweened value.\r\n */\r\nvar Stepped = function (v, steps)\r\n{\r\n if (steps === undefined) { steps = 1; }\r\n\r\n if (v <= 0)\r\n {\r\n return 0;\r\n }\r\n else if (v >= 1)\r\n {\r\n return 1;\r\n }\r\n else\r\n {\r\n return (((steps * v) | 0) + 1) * (1 / steps);\r\n }\r\n};\r\n\r\nmodule.exports = Stepped;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/Stepped.js?")},"./node_modules/phaser/src/math/easing/stepped/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Easing.Stepped\r\n */\r\n\r\nmodule.exports = __webpack_require__(/*! ./Stepped */ "./node_modules/phaser/src/math/easing/stepped/Stepped.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/easing/stepped/index.js?')},"./node_modules/phaser/src/math/fuzzy/Ceil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy ceiling of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The fuzzy ceiling of the value.\r\n */\r\nvar Ceil = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.ceil(value - epsilon);\r\n};\r\n\r\nmodule.exports = Ceil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Ceil.js?")},"./node_modules/phaser/src/math/fuzzy/Equal.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether the given values are fuzzily equal.\r\n *\r\n * Two numbers are fuzzily equal if their difference is less than `epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.Equal\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`.\r\n */\r\nvar Equal = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.abs(a - b) < epsilon;\r\n};\r\n\r\nmodule.exports = Equal;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Equal.js?")},"./node_modules/phaser/src/math/fuzzy/Floor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Calculate the fuzzy floor of the given value.\r\n *\r\n * @function Phaser.Math.Fuzzy.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {number} The floor of the value.\r\n */\r\nvar Floor = function (value, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return Math.floor(value + epsilon);\r\n};\r\n\r\nmodule.exports = Floor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/Floor.js?")},"./node_modules/phaser/src/math/fuzzy/GreaterThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily greater than `b`.\r\n *\r\n * `a` is fuzzily greater than `b` if it is more than `b - epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.GreaterThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily greater than than `b`, otherwise `false`.\r\n */\r\nvar GreaterThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a > b - epsilon;\r\n};\r\n\r\nmodule.exports = GreaterThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/GreaterThan.js?")},"./node_modules/phaser/src/math/fuzzy/LessThan.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Check whether `a` is fuzzily less than `b`.\r\n *\r\n * `a` is fuzzily less than `b` if it is less than `b + epsilon`.\r\n *\r\n * @function Phaser.Math.Fuzzy.LessThan\r\n * @since 3.0.0\r\n *\r\n * @param {number} a - The first value.\r\n * @param {number} b - The second value.\r\n * @param {number} [epsilon=0.0001] - The epsilon.\r\n *\r\n * @return {boolean} `true` if `a` is fuzzily less than `b`, otherwise `false`.\r\n */\r\nvar LessThan = function (a, b, epsilon)\r\n{\r\n if (epsilon === undefined) { epsilon = 0.0001; }\r\n\r\n return a < b + epsilon;\r\n};\r\n\r\nmodule.exports = LessThan;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/LessThan.js?")},"./node_modules/phaser/src/math/fuzzy/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Fuzzy\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./Ceil */ "./node_modules/phaser/src/math/fuzzy/Ceil.js"),\r\n Equal: __webpack_require__(/*! ./Equal */ "./node_modules/phaser/src/math/fuzzy/Equal.js"),\r\n Floor: __webpack_require__(/*! ./Floor */ "./node_modules/phaser/src/math/fuzzy/Floor.js"),\r\n GreaterThan: __webpack_require__(/*! ./GreaterThan */ "./node_modules/phaser/src/math/fuzzy/GreaterThan.js"),\r\n LessThan: __webpack_require__(/*! ./LessThan */ "./node_modules/phaser/src/math/fuzzy/LessThan.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/fuzzy/index.js?')},"./node_modules/phaser/src/math/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/math/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Math\r\n */\r\n\r\nvar PhaserMath = {\r\n\r\n // Collections of functions\r\n Angle: __webpack_require__(/*! ./angle/ */ "./node_modules/phaser/src/math/angle/index.js"),\r\n Distance: __webpack_require__(/*! ./distance/ */ "./node_modules/phaser/src/math/distance/index.js"),\r\n Easing: __webpack_require__(/*! ./easing/ */ "./node_modules/phaser/src/math/easing/index.js"),\r\n Fuzzy: __webpack_require__(/*! ./fuzzy/ */ "./node_modules/phaser/src/math/fuzzy/index.js"),\r\n Interpolation: __webpack_require__(/*! ./interpolation/ */ "./node_modules/phaser/src/math/interpolation/index.js"),\r\n Pow2: __webpack_require__(/*! ./pow2/ */ "./node_modules/phaser/src/math/pow2/index.js"),\r\n Snap: __webpack_require__(/*! ./snap/ */ "./node_modules/phaser/src/math/snap/index.js"),\r\n\r\n // Expose the RNG Class\r\n RandomDataGenerator: __webpack_require__(/*! ./random-data-generator/RandomDataGenerator */ "./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js"),\r\n\r\n // Single functions\r\n Average: __webpack_require__(/*! ./Average */ "./node_modules/phaser/src/math/Average.js"),\r\n Bernstein: __webpack_require__(/*! ./Bernstein */ "./node_modules/phaser/src/math/Bernstein.js"),\r\n Between: __webpack_require__(/*! ./Between */ "./node_modules/phaser/src/math/Between.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js"),\r\n CeilTo: __webpack_require__(/*! ./CeilTo */ "./node_modules/phaser/src/math/CeilTo.js"),\r\n Clamp: __webpack_require__(/*! ./Clamp */ "./node_modules/phaser/src/math/Clamp.js"),\r\n DegToRad: __webpack_require__(/*! ./DegToRad */ "./node_modules/phaser/src/math/DegToRad.js"),\r\n Difference: __webpack_require__(/*! ./Difference */ "./node_modules/phaser/src/math/Difference.js"),\r\n Factorial: __webpack_require__(/*! ./Factorial */ "./node_modules/phaser/src/math/Factorial.js"),\r\n FloatBetween: __webpack_require__(/*! ./FloatBetween */ "./node_modules/phaser/src/math/FloatBetween.js"),\r\n FloorTo: __webpack_require__(/*! ./FloorTo */ "./node_modules/phaser/src/math/FloorTo.js"),\r\n FromPercent: __webpack_require__(/*! ./FromPercent */ "./node_modules/phaser/src/math/FromPercent.js"),\r\n GetSpeed: __webpack_require__(/*! ./GetSpeed */ "./node_modules/phaser/src/math/GetSpeed.js"),\r\n IsEven: __webpack_require__(/*! ./IsEven */ "./node_modules/phaser/src/math/IsEven.js"),\r\n IsEvenStrict: __webpack_require__(/*! ./IsEvenStrict */ "./node_modules/phaser/src/math/IsEvenStrict.js"),\r\n Linear: __webpack_require__(/*! ./Linear */ "./node_modules/phaser/src/math/Linear.js"),\r\n MaxAdd: __webpack_require__(/*! ./MaxAdd */ "./node_modules/phaser/src/math/MaxAdd.js"),\r\n MinSub: __webpack_require__(/*! ./MinSub */ "./node_modules/phaser/src/math/MinSub.js"),\r\n Percent: __webpack_require__(/*! ./Percent */ "./node_modules/phaser/src/math/Percent.js"),\r\n RadToDeg: __webpack_require__(/*! ./RadToDeg */ "./node_modules/phaser/src/math/RadToDeg.js"),\r\n RandomXY: __webpack_require__(/*! ./RandomXY */ "./node_modules/phaser/src/math/RandomXY.js"),\r\n RandomXYZ: __webpack_require__(/*! ./RandomXYZ */ "./node_modules/phaser/src/math/RandomXYZ.js"),\r\n RandomXYZW: __webpack_require__(/*! ./RandomXYZW */ "./node_modules/phaser/src/math/RandomXYZW.js"),\r\n Rotate: __webpack_require__(/*! ./Rotate */ "./node_modules/phaser/src/math/Rotate.js"),\r\n RotateAround: __webpack_require__(/*! ./RotateAround */ "./node_modules/phaser/src/math/RotateAround.js"),\r\n RotateAroundDistance: __webpack_require__(/*! ./RotateAroundDistance */ "./node_modules/phaser/src/math/RotateAroundDistance.js"),\r\n RoundAwayFromZero: __webpack_require__(/*! ./RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js"),\r\n RoundTo: __webpack_require__(/*! ./RoundTo */ "./node_modules/phaser/src/math/RoundTo.js"),\r\n SinCosTableGenerator: __webpack_require__(/*! ./SinCosTableGenerator */ "./node_modules/phaser/src/math/SinCosTableGenerator.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStep */ "./node_modules/phaser/src/math/SmootherStep.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStep */ "./node_modules/phaser/src/math/SmoothStep.js"),\r\n ToXY: __webpack_require__(/*! ./ToXY */ "./node_modules/phaser/src/math/ToXY.js"),\r\n TransformXY: __webpack_require__(/*! ./TransformXY */ "./node_modules/phaser/src/math/TransformXY.js"),\r\n Within: __webpack_require__(/*! ./Within */ "./node_modules/phaser/src/math/Within.js"),\r\n Wrap: __webpack_require__(/*! ./Wrap */ "./node_modules/phaser/src/math/Wrap.js"),\r\n\r\n // Vector classes\r\n Vector2: __webpack_require__(/*! ./Vector2 */ "./node_modules/phaser/src/math/Vector2.js"),\r\n Vector3: __webpack_require__(/*! ./Vector3 */ "./node_modules/phaser/src/math/Vector3.js"),\r\n Vector4: __webpack_require__(/*! ./Vector4 */ "./node_modules/phaser/src/math/Vector4.js"),\r\n Matrix3: __webpack_require__(/*! ./Matrix3 */ "./node_modules/phaser/src/math/Matrix3.js"),\r\n Matrix4: __webpack_require__(/*! ./Matrix4 */ "./node_modules/phaser/src/math/Matrix4.js"),\r\n Quaternion: __webpack_require__(/*! ./Quaternion */ "./node_modules/phaser/src/math/Quaternion.js"),\r\n RotateVec3: __webpack_require__(/*! ./RotateVec3 */ "./node_modules/phaser/src/math/RotateVec3.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\n\r\nPhaserMath = Extend(false, PhaserMath, CONST);\r\n\r\n// Export it\r\n\r\nmodule.exports = PhaserMath;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/index.js?')},"./node_modules/phaser/src/math/interpolation/BezierInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bernstein = __webpack_require__(/*! ../Bernstein */ "./node_modules/phaser/src/math/Bernstein.js");\r\n\r\n/**\r\n * A bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Bezier\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar BezierInterpolation = function (v, k)\r\n{\r\n var b = 0;\r\n var n = v.length - 1;\r\n\r\n for (var i = 0; i <= n; i++)\r\n {\r\n b += Math.pow(1 - k, n - i) * Math.pow(k, i) * v[i] * Bernstein(n, i);\r\n }\r\n\r\n return b;\r\n};\r\n\r\nmodule.exports = BezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/BezierInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CatmullRom = __webpack_require__(/*! ../CatmullRom */ "./node_modules/phaser/src/math/CatmullRom.js");\r\n\r\n/**\r\n * A Catmull-Rom interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.CatmullRom\r\n * @since 3.0.0\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CatmullRomInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (v[0] === v[m])\r\n {\r\n if (k < 0)\r\n {\r\n i = Math.floor(f = m * (1 + k));\r\n }\r\n\r\n return CatmullRom(f - i, v[(i - 1 + m) % m], v[i], v[(i + 1) % m], v[(i + 2) % m]);\r\n }\r\n else\r\n {\r\n if (k < 0)\r\n {\r\n return v[0] - (CatmullRom(-f, v[0], v[0], v[1], v[1]) - v[0]);\r\n }\r\n\r\n if (k > 1)\r\n {\r\n return v[m] - (CatmullRom(f - m, v[m], v[m], v[m - 1], v[m - 1]) - v[m]);\r\n }\r\n\r\n return CatmullRom(f - i, v[i ? i - 1 : 0], v[i], v[m < i + 1 ? m : i + 1], v[m < i + 2 ? m : i + 2]);\r\n }\r\n};\r\n\r\nmodule.exports = CatmullRomInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return 3 * k * k * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return 3 * (1 - t) * t * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P3 (t, p)\r\n{\r\n return t * t * t * p;\r\n}\r\n\r\n/**\r\n * A cubic bezier interpolation method.\r\n *\r\n * https://medium.com/@adrian_cooney/bezier-interpolation-13b68563313a\r\n *\r\n * @function Phaser.Math.Interpolation.CubicBezier\r\n * @since 3.0.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The first control point.\r\n * @param {number} p2 - The second control point.\r\n * @param {number} p3 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar CubicBezierInterpolation = function (t, p0, p1, p2, p3)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2) + P3(t, p3);\r\n};\r\n\r\nmodule.exports = CubicBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/LinearInterpolation.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Linear = __webpack_require__(/*! ../Linear */ "./node_modules/phaser/src/math/Linear.js");\r\n\r\n/**\r\n * A linear interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.Linear\r\n * @since 3.0.0\r\n * @see {@link https://en.wikipedia.org/wiki/Linear_interpolation}\r\n *\r\n * @param {number[]} v - The input array of values to interpolate between.\r\n * @param {!number} k - The percentage of interpolation, between 0 and 1.\r\n *\r\n * @return {!number} The interpolated value.\r\n */\r\nvar LinearInterpolation = function (v, k)\r\n{\r\n var m = v.length - 1;\r\n var f = m * k;\r\n var i = Math.floor(f);\r\n\r\n if (k < 0)\r\n {\r\n return Linear(v[0], v[1], f);\r\n }\r\n else if (k > 1)\r\n {\r\n return Linear(v[m], v[m - 1], m - f);\r\n }\r\n else\r\n {\r\n return Linear(v[i], v[(i + 1 > m) ? m : i + 1], f - i);\r\n }\r\n};\r\n\r\nmodule.exports = LinearInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/LinearInterpolation.js?')},"./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P0 (t, p)\r\n{\r\n var k = 1 - t;\r\n\r\n return k * k * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P1 (t, p)\r\n{\r\n return 2 * (1 - t) * t * p;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction P2 (t, p)\r\n{\r\n return t * t * p;\r\n}\r\n\r\n// https://github.com/mrdoob/three.js/blob/master/src/extras/core/Interpolations.js\r\n\r\n/**\r\n * A quadratic bezier interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.QuadraticBezier\r\n * @since 3.2.0\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} p0 - The start point.\r\n * @param {number} p1 - The control point.\r\n * @param {number} p2 - The end point.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar QuadraticBezierInterpolation = function (t, p0, p1, p2)\r\n{\r\n return P0(t, p0) + P1(t, p1) + P2(t, p2);\r\n};\r\n\r\nmodule.exports = QuadraticBezierInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmoothStep = __webpack_require__(/*! ../SmoothStep */ \"./node_modules/phaser/src/math/SmoothStep.js\");\r\n\r\n/**\r\n * A Smooth Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmoothStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmoothStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmoothStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmoothStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SmootherStep = __webpack_require__(/*! ../SmootherStep */ \"./node_modules/phaser/src/math/SmootherStep.js\");\r\n\r\n/**\r\n * A Smoother Step interpolation method.\r\n *\r\n * @function Phaser.Math.Interpolation.SmootherStep\r\n * @since 3.9.0\r\n * @see {@link https://en.wikipedia.org/wiki/Smoothstep#Variations}\r\n *\r\n * @param {number} t - The percentage of interpolation, between 0 and 1.\r\n * @param {number} min - The minimum value, also known as the 'left edge', assumed smaller than the 'right edge'.\r\n * @param {number} max - The maximum value, also known as the 'right edge', assumed greater than the 'left edge'.\r\n *\r\n * @return {number} The interpolated value.\r\n */\r\nvar SmootherStepInterpolation = function (t, min, max)\r\n{\r\n return min + (max - min) * SmootherStep(t, 0, 1);\r\n};\r\n\r\nmodule.exports = SmootherStepInterpolation;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js?")},"./node_modules/phaser/src/math/interpolation/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Interpolation\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bezier: __webpack_require__(/*! ./BezierInterpolation */ "./node_modules/phaser/src/math/interpolation/BezierInterpolation.js"),\r\n CatmullRom: __webpack_require__(/*! ./CatmullRomInterpolation */ "./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js"),\r\n CubicBezier: __webpack_require__(/*! ./CubicBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js"),\r\n Linear: __webpack_require__(/*! ./LinearInterpolation */ "./node_modules/phaser/src/math/interpolation/LinearInterpolation.js"),\r\n QuadraticBezier: __webpack_require__(/*! ./QuadraticBezierInterpolation */ "./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js"),\r\n SmoothStep: __webpack_require__(/*! ./SmoothStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js"),\r\n SmootherStep: __webpack_require__(/*! ./SmootherStepInterpolation */ "./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/interpolation/index.js?')},"./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns the nearest power of 2 to the given `value`.\r\n *\r\n * @function Phaser.Math.Pow2.GetPowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value.\r\n *\r\n * @return {integer} The nearest power of 2 to `value`.\r\n */\r\nvar GetPowerOfTwo = function (value)\r\n{\r\n var index = Math.log(value) / 0.6931471805599453;\r\n\r\n return (1 << Math.ceil(index));\r\n};\r\n\r\nmodule.exports = GetPowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given `width` and `height` are a power of two.\r\n * Useful for checking texture dimensions.\r\n *\r\n * @function Phaser.Math.Pow2.IsSizePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width.\r\n * @param {number} height - The height.\r\n *\r\n * @return {boolean} `true` if `width` and `height` are a power of two, otherwise `false`.\r\n */\r\nvar IsSizePowerOfTwo = function (width, height)\r\n{\r\n return (width > 0 && (width & (width - 1)) === 0 && height > 0 && (height & (height - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsSizePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests the value and returns `true` if it is a power of two.\r\n *\r\n * @function Phaser.Math.Pow2.IsValuePowerOfTwo\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to check if it's a power of two.\r\n *\r\n * @return {boolean} Returns `true` if `value` is a power of two, otherwise `false`.\r\n */\r\nvar IsValuePowerOfTwo = function (value)\r\n{\r\n return (value > 0 && (value & (value - 1)) === 0);\r\n};\r\n\r\nmodule.exports = IsValuePowerOfTwo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js?")},"./node_modules/phaser/src/math/pow2/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Pow2\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetNext: __webpack_require__(/*! ./GetPowerOfTwo */ "./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js"),\r\n IsSize: __webpack_require__(/*! ./IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js"),\r\n IsValue: __webpack_require__(/*! ./IsValuePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/pow2/index.js?')},"./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A seeded Random Data Generator.\r\n * \r\n * Access via `Phaser.Math.RND` which is an instance of this class pre-defined\r\n * by Phaser. Or, create your own instance to use as you require.\r\n * \r\n * The `Math.RND` generator is seeded by the Game Config property value `seed`.\r\n * If no such config property exists, a random number is used.\r\n * \r\n * If you create your own instance of this class you should provide a seed for it.\r\n * If no seed is given it will use a 'random' one based on Date.now.\r\n *\r\n * @class RandomDataGenerator\r\n * @memberof Phaser.Math\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} [seeds] - The seeds to use for the random number generator.\r\n */\r\nvar RandomDataGenerator = new Class({\r\n\r\n initialize:\r\n\r\n function RandomDataGenerator (seeds)\r\n {\r\n if (seeds === undefined) { seeds = [ (Date.now() * Math.random()).toString() ]; }\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#c\r\n * @type {number}\r\n * @default 1\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.c = 1;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s0\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s0 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s1\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s1 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#s2\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.s2 = 0;\r\n\r\n /**\r\n * Internal var.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#n\r\n * @type {number}\r\n * @default 0\r\n * @private\r\n * @since 3.2.0\r\n */\r\n this.n = 0;\r\n\r\n /**\r\n * Signs to choose from.\r\n *\r\n * @name Phaser.Math.RandomDataGenerator#signs\r\n * @type {number[]}\r\n * @since 3.0.0\r\n */\r\n this.signs = [ -1, 1 ];\r\n\r\n if (seeds)\r\n {\r\n this.init(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Private random helper.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rnd\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @return {number} A random number.\r\n */\r\n rnd: function ()\r\n {\r\n var t = 2091639 * this.s0 + this.c * 2.3283064365386963e-10; // 2^-32\r\n\r\n this.c = t | 0;\r\n this.s0 = this.s1;\r\n this.s1 = this.s2;\r\n this.s2 = t - this.c;\r\n\r\n return this.s2;\r\n },\r\n\r\n /**\r\n * Internal method that creates a seed hash.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#hash\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {string} data - The value to hash.\r\n *\r\n * @return {number} The hashed value.\r\n */\r\n hash: function (data)\r\n {\r\n var h;\r\n var n = this.n;\r\n\r\n data = data.toString();\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n n += data.charCodeAt(i);\r\n h = 0.02519603282416938 * n;\r\n n = h >>> 0;\r\n h -= n;\r\n h *= n;\r\n n = h >>> 0;\r\n h -= n;\r\n n += h * 0x100000000;// 2^32\r\n }\r\n\r\n this.n = n;\r\n\r\n return (n >>> 0) * 2.3283064365386963e-10;// 2^-32\r\n },\r\n\r\n /**\r\n * Initialize the state of the random data generator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#init\r\n * @since 3.0.0\r\n *\r\n * @param {(string|string[])} seeds - The seeds to initialize the random data generator with.\r\n */\r\n init: function (seeds)\r\n {\r\n if (typeof seeds === 'string')\r\n {\r\n this.state(seeds);\r\n }\r\n else\r\n {\r\n this.sow(seeds);\r\n }\r\n },\r\n\r\n /**\r\n * Reset the seed of the random data generator.\r\n *\r\n * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sow\r\n * @since 3.0.0\r\n *\r\n * @param {string[]} seeds - The array of seeds: the `toString()` of each value is used.\r\n */\r\n sow: function (seeds)\r\n {\r\n // Always reset to default seed\r\n this.n = 0xefc8249d;\r\n this.s0 = this.hash(' ');\r\n this.s1 = this.hash(' ');\r\n this.s2 = this.hash(' ');\r\n this.c = 1;\r\n\r\n if (!seeds)\r\n {\r\n return;\r\n }\r\n\r\n // Apply any seeds\r\n for (var i = 0; i < seeds.length && (seeds[i] != null); i++)\r\n {\r\n var seed = seeds[i];\r\n\r\n this.s0 -= this.hash(seed);\r\n this.s0 += ~~(this.s0 < 0);\r\n this.s1 -= this.hash(seed);\r\n this.s1 += ~~(this.s1 < 0);\r\n this.s2 -= this.hash(seed);\r\n this.s2 += ~~(this.s2 < 0);\r\n }\r\n },\r\n\r\n /**\r\n * Returns a random integer between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integer\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random integer between 0 and 2^32.\r\n */\r\n integer: function ()\r\n {\r\n // 2^32\r\n return this.rnd() * 0x100000000;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#frac\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 1.\r\n */\r\n frac: function ()\r\n {\r\n // 2^-53\r\n return this.rnd() + (this.rnd() * 0x200000 | 0) * 1.1102230246251565e-16;\r\n },\r\n\r\n /**\r\n * Returns a random real number between 0 and 2^32.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#real\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between 0 and 2^32.\r\n */\r\n real: function ()\r\n {\r\n return this.integer() + this.frac();\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#integerInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n integerInRange: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random integer between and including min and max.\r\n * This method is an alias for RandomDataGenerator.integerInRange.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#between\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n between: function (min, max)\r\n {\r\n return Math.floor(this.realInRange(0, max - min + 1) + min);\r\n },\r\n\r\n /**\r\n * Returns a random real number between min and max.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#realInRange\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random number between min and max.\r\n */\r\n realInRange: function (min, max)\r\n {\r\n return this.frac() * (max - min) + min;\r\n },\r\n\r\n /**\r\n * Returns a random real number between -1 and 1.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#normal\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random real number between -1 and 1.\r\n */\r\n normal: function ()\r\n {\r\n return 1 - (2 * this.frac());\r\n },\r\n\r\n /**\r\n * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#uuid\r\n * @since 3.0.0\r\n *\r\n * @return {string} A valid RFC4122 version4 ID hex string\r\n */\r\n uuid: function ()\r\n {\r\n var a = '';\r\n var b = '';\r\n\r\n for (b = a = ''; a++ < 36; b += ~a % 5 | a * 3 & 4 ? (a ^ 15 ? 8 ^ this.frac() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-')\r\n {\r\n // eslint-disable-next-line no-empty\r\n }\r\n\r\n return b;\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#pick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n pick: function (array)\r\n {\r\n return array[this.integerInRange(0, array.length - 1)];\r\n },\r\n\r\n /**\r\n * Returns a sign to be used with multiplication operator.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#sign\r\n * @since 3.0.0\r\n *\r\n * @return {number} -1 or +1.\r\n */\r\n sign: function ()\r\n {\r\n return this.pick(this.signs);\r\n },\r\n\r\n /**\r\n * Returns a random element from within the given array, favoring the earlier entries.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#weightedPick\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to pick a random element from.\r\n *\r\n * @return {*} A random member of the array.\r\n */\r\n weightedPick: function (array)\r\n {\r\n return array[~~(Math.pow(this.frac(), 2) * (array.length - 1) + 0.5)];\r\n },\r\n\r\n /**\r\n * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#timestamp\r\n * @since 3.0.0\r\n *\r\n * @param {number} min - The minimum value in the range.\r\n * @param {number} max - The maximum value in the range.\r\n *\r\n * @return {number} A random timestamp between min and max.\r\n */\r\n timestamp: function (min, max)\r\n {\r\n return this.realInRange(min || 946684800000, max || 1577862000000);\r\n },\r\n\r\n /**\r\n * Returns a random angle between -180 and 180.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#angle\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -180 and 180.\r\n */\r\n angle: function ()\r\n {\r\n return this.integerInRange(-180, 180);\r\n },\r\n\r\n /**\r\n * Returns a random rotation in radians, between -3.141 and 3.141\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#rotation\r\n * @since 3.0.0\r\n *\r\n * @return {number} A random number between -3.141 and 3.141\r\n */\r\n rotation: function ()\r\n {\r\n return this.realInRange(-3.1415926, 3.1415926);\r\n },\r\n\r\n /**\r\n * Gets or Sets the state of the generator. This allows you to retain the values\r\n * that the generator is using between games, i.e. in a game save file.\r\n *\r\n * To seed this generator with a previously saved state you can pass it as the\r\n * `seed` value in your game config, or call this method directly after Phaser has booted.\r\n *\r\n * Call this method with no parameters to return the current state.\r\n *\r\n * If providing a state it should match the same format that this method\r\n * returns, which is a string with a header `!rnd` followed by the `c`,\r\n * `s0`, `s1` and `s2` values respectively, each comma-delimited.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#state\r\n * @since 3.0.0\r\n *\r\n * @param {string} [state] - Generator state to be set.\r\n *\r\n * @return {string} The current state of the generator.\r\n */\r\n state: function (state)\r\n {\r\n if (typeof state === 'string' && state.match(/^!rnd/))\r\n {\r\n state = state.split(',');\r\n\r\n this.c = parseFloat(state[1]);\r\n this.s0 = parseFloat(state[2]);\r\n this.s1 = parseFloat(state[3]);\r\n this.s2 = parseFloat(state[4]);\r\n }\r\n\r\n return [ '!rnd', this.c, this.s0, this.s1, this.s2 ].join(',');\r\n },\r\n\r\n /**\r\n * Shuffles the given array, using the current seed.\r\n *\r\n * @method Phaser.Math.RandomDataGenerator#shuffle\r\n * @since 3.7.0\r\n *\r\n * @param {array} [array] - The array to be shuffled.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\n shuffle: function (array)\r\n {\r\n var len = array.length - 1;\r\n\r\n for (var i = len; i > 0; i--)\r\n {\r\n var randomIndex = Math.floor(this.frac() * (i + 1));\r\n var itemAtIndex = array[randomIndex];\r\n\r\n array[randomIndex] = array[i];\r\n array[i] = itemAtIndex;\r\n }\r\n\r\n return array;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = RandomDataGenerator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js?")},"./node_modules/phaser/src/math/snap/SnapCeil.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using ceil.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `15`.\r\n * As will `14` snap to `15`... but `16` will snap to `20`.\r\n *\r\n * @function Phaser.Math.Snap.Ceil\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapCeil = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.ceil(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapCeil;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapCeil.js?")},"./node_modules/phaser/src/math/snap/SnapFloor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using floor.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10`.\r\n * As will `14` snap to `10`... but `16` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.Floor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapFloor = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.floor(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapFloor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapFloor.js?")},"./node_modules/phaser/src/math/snap/SnapTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Snap a value to nearest grid slice, using rounding.\r\n *\r\n * Example: if you have an interval gap of `5` and a position of `12`... you will snap to `10` whereas `14` will snap to `15`.\r\n *\r\n * @function Phaser.Math.Snap.To\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to snap.\r\n * @param {number} gap - The interval gap of the grid.\r\n * @param {number} [start=0] - Optional starting offset for gap.\r\n * @param {boolean} [divide=false] - If `true` it will divide the snapped value by the gap before returning.\r\n *\r\n * @return {number} The snapped value.\r\n */\r\nvar SnapTo = function (value, gap, start, divide)\r\n{\r\n if (start === undefined) { start = 0; }\r\n\r\n if (gap === 0)\r\n {\r\n return value;\r\n }\r\n\r\n value -= start;\r\n value = gap * Math.round(value / gap);\r\n\r\n return (divide) ? (start + value) / gap : start + value;\r\n};\r\n\r\nmodule.exports = SnapTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/SnapTo.js?")},"./node_modules/phaser/src/math/snap/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Math.Snap\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Ceil: __webpack_require__(/*! ./SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js"),\r\n Floor: __webpack_require__(/*! ./SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js"),\r\n To: __webpack_require__(/*! ./SnapTo */ "./node_modules/phaser/src/math/snap/SnapTo.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/math/snap/index.js?')},"./node_modules/phaser/src/phaser.js":function(module,exports,__webpack_require__){eval('/* WEBPACK VAR INJECTION */(function(global) {/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n__webpack_require__(/*! ./polyfills */ "./node_modules/phaser/src/polyfills/index.js");\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/const.js");\r\nvar Extend = __webpack_require__(/*! ./utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser\r\n */\r\n\r\nvar Phaser = {\r\n\r\n Actions: __webpack_require__(/*! ./actions */ "./node_modules/phaser/src/actions/index.js"),\r\n Animations: __webpack_require__(/*! ./animations */ "./node_modules/phaser/src/animations/index.js"),\r\n BlendModes: __webpack_require__(/*! ./renderer/BlendModes */ "./node_modules/phaser/src/renderer/BlendModes.js"),\r\n Cache: __webpack_require__(/*! ./cache */ "./node_modules/phaser/src/cache/index.js"),\r\n Cameras: __webpack_require__(/*! ./cameras */ "./node_modules/phaser/src/cameras/index.js"),\r\n Core: __webpack_require__(/*! ./core */ "./node_modules/phaser/src/core/index.js"),\r\n Class: __webpack_require__(/*! ./utils/Class */ "./node_modules/phaser/src/utils/Class.js"),\r\n Create: __webpack_require__(/*! ./create */ "./node_modules/phaser/src/create/index.js"),\r\n Curves: __webpack_require__(/*! ./curves */ "./node_modules/phaser/src/curves/index.js"),\r\n Data: __webpack_require__(/*! ./data */ "./node_modules/phaser/src/data/index.js"),\r\n Display: __webpack_require__(/*! ./display */ "./node_modules/phaser/src/display/index.js"),\r\n DOM: __webpack_require__(/*! ./dom */ "./node_modules/phaser/src/dom/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/events/index.js"),\r\n Game: __webpack_require__(/*! ./core/Game */ "./node_modules/phaser/src/core/Game.js"),\r\n GameObjects: __webpack_require__(/*! ./gameobjects */ "./node_modules/phaser/src/gameobjects/index.js"),\r\n Geom: __webpack_require__(/*! ./geom */ "./node_modules/phaser/src/geom/index.js"),\r\n Input: __webpack_require__(/*! ./input */ "./node_modules/phaser/src/input/index.js"),\r\n Loader: __webpack_require__(/*! ./loader */ "./node_modules/phaser/src/loader/index.js"),\r\n Math: __webpack_require__(/*! ./math */ "./node_modules/phaser/src/math/index.js"),\r\n Physics: __webpack_require__(/*! ./physics */ "./node_modules/phaser/src/physics/index.js"),\r\n Plugins: __webpack_require__(/*! ./plugins */ "./node_modules/phaser/src/plugins/index.js"),\r\n Renderer: __webpack_require__(/*! ./renderer */ "./node_modules/phaser/src/renderer/index.js"),\r\n Scale: __webpack_require__(/*! ./scale */ "./node_modules/phaser/src/scale/index.js"),\r\n ScaleModes: __webpack_require__(/*! ./renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js"),\r\n Scene: __webpack_require__(/*! ./scene/Scene */ "./node_modules/phaser/src/scene/Scene.js"),\r\n Scenes: __webpack_require__(/*! ./scene */ "./node_modules/phaser/src/scene/index.js"),\r\n Structs: __webpack_require__(/*! ./structs */ "./node_modules/phaser/src/structs/index.js"),\r\n Textures: __webpack_require__(/*! ./textures */ "./node_modules/phaser/src/textures/index.js"),\r\n Tilemaps: __webpack_require__(/*! ./tilemaps */ "./node_modules/phaser/src/tilemaps/index.js"),\r\n Time: __webpack_require__(/*! ./time */ "./node_modules/phaser/src/time/index.js"),\r\n Tweens: __webpack_require__(/*! ./tweens */ "./node_modules/phaser/src/tweens/index.js"),\r\n Utils: __webpack_require__(/*! ./utils */ "./node_modules/phaser/src/utils/index.js")\r\n\r\n};\r\n\r\n// Merge in the optional plugins\r\n\r\nif (typeof FEATURE_SOUND)\r\n{\r\n Phaser.Sound = __webpack_require__(/*! ./sound */ "./node_modules/phaser/src/sound/index.js");\r\n}\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n Phaser.Cameras.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src */ "./node_modules/phaser/plugins/camera3d/src/index.js");\r\n Phaser.GameObjects.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3D */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js");\r\n Phaser.GameObjects.Factories.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DFactory */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js");\r\n Phaser.GameObjects.Creators.Sprite3D = __webpack_require__(/*! ../plugins/camera3d/src/sprite3d/Sprite3DCreator */ "./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js");\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n Phaser.FacebookInstantGamesPlugin = __webpack_require__(/*! ../plugins/fbinstant/src/FacebookInstantGamesPlugin */ "./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js");\r\n}\r\n\r\n// Merge in the consts\r\n\r\nPhaser = Extend(false, Phaser, CONST);\r\n\r\n/**\r\n * The root types namespace.\r\n * \r\n * @namespace Phaser.Types\r\n * @since 3.17.0\r\n */\r\n\r\n// Export it\r\n\r\nmodule.exports = Phaser;\r\n\r\nglobal.Phaser = Phaser;\r\n\r\n/*\r\n * "Documentation is like pizza: when it is good, it is very, very good;\r\n * and when it is bad, it is better than nothing."\r\n * -- Dick Brandon\r\n */\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "./node_modules/webpack/buildin/global.js")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/phaser.js?')},"./node_modules/phaser/src/physics/arcade/ArcadeImage.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\n\n/**\n * @classdesc\n * An Arcade Physics Image is an Image with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Image and an Arcade Sprite is that you cannot animate an Arcade Image.\n *\n * @class Image\n * @extends Phaser.GameObjects.Image\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeImage = new Class({\n\n Extends: Image,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeImage (scene, x, y, texture, frame)\n {\n Image.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Image#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeImage;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeImage.js?')},"./node_modules/phaser/src/physics/arcade/ArcadePhysics.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\nvar DegToRad = __webpack_require__(/*! ../../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\nvar DistanceSquared = __webpack_require__(/*! ../../math/distance/DistanceSquared */ \"./node_modules/phaser/src/math/distance/DistanceSquared.js\");\nvar Factory = __webpack_require__(/*! ./Factory */ \"./node_modules/phaser/src/physics/arcade/Factory.js\");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\nvar OverlapRect = __webpack_require__(/*! ./components/OverlapRect */ \"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js\");\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\nvar World = __webpack_require__(/*! ./World */ \"./node_modules/phaser/src/physics/arcade/World.js\");\n\n/**\n * @classdesc\n * The Arcade Physics Plugin belongs to a Scene and sets up and manages the Scene's physics simulation.\n * It also holds some useful methods for moving and rotating Arcade Physics Bodies.\n *\n * You can access it from within a Scene using `this.physics`.\n * \n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @class ArcadePhysics\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene that this Plugin belongs to.\n */\nvar ArcadePhysics = new Class({\n\n initialize:\n\n function ArcadePhysics (scene)\n {\n /**\n * The Scene that this Plugin belongs to.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = scene;\n\n /**\n * The Scene's Systems.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#systems\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.systems = scene.sys;\n\n /**\n * A configuration object. Union of the `physics.arcade.*` properties of the GameConfig and SceneConfig objects.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#config\n * @type {object}\n * @since 3.0.0\n */\n this.config = this.getConfig();\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world;\n\n /**\n * An object holding the Arcade Physics factory methods.\n *\n * @name Phaser.Physics.Arcade.ArcadePhysics#add\n * @type {Phaser.Physics.Arcade.Factory}\n * @since 3.0.0\n */\n this.add;\n\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\n scene.sys.events.on(SceneEvents.START, this.start, this);\n },\n\n /**\n * This method is called automatically, only once, when the Scene is first created.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#boot\n * @private\n * @since 3.5.1\n */\n boot: function ()\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\n },\n\n /**\n * This method is called automatically by the Scene when it is starting up.\n * It is responsible for creating local systems, properties and listening for Scene events.\n * Do not invoke it directly.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#start\n * @private\n * @since 3.5.0\n */\n start: function ()\n {\n if (!this.world)\n {\n this.world = new World(this.scene, this.config);\n this.add = new Factory(this.world);\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\n },\n\n /**\n * Creates the physics configuration for the current Scene.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#getConfig\n * @since 3.0.0\n *\n * @return {object} The physics configuration.\n */\n getConfig: function ()\n {\n var gameConfig = this.systems.game.config.physics;\n var sceneConfig = this.systems.settings.physics;\n\n var config = Merge(\n GetFastValue(sceneConfig, 'arcade', {}),\n GetFastValue(gameConfig, 'arcade', {})\n );\n\n return config;\n },\n\n /**\n * Tests if Game Objects overlap. See {@link Phaser.Physics.Arcade.World#overlap}\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlap\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if at least one Game Object overlaps another.\n *\n * @see Phaser.Physics.Arcade.World#overlap\n */\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\n {\n if (overlapCallback === undefined) { overlapCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\n\n return this.world.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\n },\n\n /**\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\n *\n * If you don't require separation then use {@link #overlap} instead.\n *\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\n *\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\n * \n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\n *\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\n * objects are passed to it.\n *\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collide\n * @since 3.0.0\n *\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {*} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any overlapping Game Objects were separated, otherwise false.\n *\n * @see Phaser.Physics.Arcade.World#collide\n */\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n if (collideCallback === undefined) { collideCallback = null; }\n if (processCallback === undefined) { processCallback = null; }\n if (callbackContext === undefined) { callbackContext = collideCallback; }\n\n return this.world.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\n },\n\n /**\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n * \n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\n * dynamic maps, this method can prove very useful.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#collideTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.collideTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\n * \n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\n * \n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\n * you should filter them before passing them to this method.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapTiles\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.17.0\n *\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\n * @param {any} [callbackContext] - The context in which to run the callbacks.\n *\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\n */\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\n {\n return this.world.overlapTiles(sprite, tiles, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Pauses the simulation.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#pause\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n pause: function ()\n {\n return this.world.pause();\n },\n\n /**\n * Resumes the simulation (if paused).\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#resume\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.World} The simulation.\n */\n resume: function ()\n {\n return this.world.resume();\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to accelerate towards.\n * @param {number} y - The y coordinate to accelerate towards.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateTo: function (gameObject, x, y, speed, xSpeedMax, ySpeedMax)\n {\n if (speed === undefined) { speed = 60; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n gameObject.body.acceleration.setToPolar(angle, speed);\n\n if (xSpeedMax !== undefined && ySpeedMax !== undefined)\n {\n gameObject.body.maxVelocity.set(xSpeedMax, ySpeedMax);\n }\n\n return angle;\n },\n\n /**\n * Sets the acceleration.x/y property on the game object so it will move towards the x/y coordinates at the given rate (in pixels per second squared)\n *\n * You must give a maximum speed value, beyond which the game object won't go any faster.\n *\n * Note: The game object does not continuously track the target. If the target changes location during transit the game object will not modify its course.\n * Note: The game object doesn't stop moving once it reaches the destination coordinates.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#accelerateToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {Phaser.GameObjects.GameObject} destination - The Game Object to move towards. Can be any object but must have visible x/y properties.\n * @param {number} [speed=60] - The acceleration (change in speed) in pixels per second squared.\n * @param {number} [xSpeedMax=500] - The maximum x velocity the game object can reach.\n * @param {number} [ySpeedMax=500] - The maximum y velocity the game object can reach.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n accelerateToObject: function (gameObject, destination, speed, xSpeedMax, ySpeedMax)\n {\n return this.accelerateTo(gameObject, destination.x, destination.y, speed, xSpeedMax, ySpeedMax);\n },\n\n /**\n * Finds the Dynamic Body closest to a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#closest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The closest Dynamic Body to the given source point.\n */\n closest: function (source)\n {\n var bodies = this.world.bodies;\n\n var min = Number.MAX_VALUE;\n var closest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance < min)\n {\n closest = target;\n min = distance;\n }\n\n });\n\n return closest;\n },\n\n /**\n * Finds the Dynamic Body farthest from a source point or object.\n * \n * If two or more bodies are the exact same distance from the source point, only the first body\n * is returned.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#furthest\n * @since 3.0.0\n *\n * @param {any} source - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n *\n * @return {Phaser.Physics.Arcade.Body} The Dynamic Body furthest away from the given source point.\n */\n furthest: function (source)\n {\n var bodies = this.world.bodies;\n\n var max = -1;\n var farthest = null;\n var x = source.x;\n var y = source.y;\n\n bodies.iterate(function (target)\n {\n var distance = DistanceSquared(x, y, target.x, target.y);\n\n if (distance > max)\n {\n farthest = target;\n max = distance;\n }\n\n });\n\n return farthest;\n },\n\n /**\n * Move the given display object towards the x/y coordinates at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveTo\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {number} x - The x coordinate to move towards.\n * @param {number} y - The y coordinate to move towards.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveTo: function (gameObject, x, y, speed, maxTime)\n {\n if (speed === undefined) { speed = 60; }\n if (maxTime === undefined) { maxTime = 0; }\n\n var angle = Math.atan2(y - gameObject.y, x - gameObject.x);\n\n if (maxTime > 0)\n {\n // We know how many pixels we need to move, but how fast?\n speed = DistanceBetween(gameObject.x, gameObject.y, x, y) / (maxTime / 1000);\n }\n\n gameObject.body.velocity.setToPolar(angle, speed);\n\n return angle;\n },\n\n /**\n * Move the given display object towards the destination object at a steady velocity.\n * If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.\n * Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.\n * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.\n * Note: The display object doesn't stop moving once it reaches the destination coordinates.\n * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#moveToObject\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - Any Game Object with an Arcade Physics body.\n * @param {object} destination - Any object with public `x` and `y` properties, such as a Game Object or Geometry object.\n * @param {number} [speed=60] - The speed it will move, in pixels per second (default is 60 pixels/sec)\n * @param {number} [maxTime=0] - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms.\n *\n * @return {number} The angle (in radians) that the object should be visually set to in order to match its new velocity.\n */\n moveToObject: function (gameObject, destination, speed, maxTime)\n {\n return this.moveTo(gameObject, destination.x, destination.y, speed, maxTime);\n },\n\n /**\n * Given the angle (in degrees) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromAngle(angle, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromAngle\n * @since 3.0.0\n *\n * @param {number} angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative)\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared.\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromAngle: function (angle, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(DegToRad(angle), speed);\n },\n\n /**\n * Given the rotation (in radians) and speed calculate the velocity and return it as a vector, or set it to the given vector object.\n * One way to use this is: velocityFromRotation(rotation, 200, sprite.body.velocity) which will set the values directly to the sprite's velocity and not create a new vector object.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#velocityFromRotation\n * @since 3.0.0\n *\n * @param {number} rotation - The angle in radians.\n * @param {number} [speed=60] - The speed it will move, in pixels per second squared\n * @param {Phaser.Math.Vector2} [vec2] - The Vector2 in which the x and y properties will be set to the calculated velocity.\n *\n * @return {Phaser.Math.Vector2} The Vector2 that stores the velocity.\n */\n velocityFromRotation: function (rotation, speed, vec2)\n {\n if (speed === undefined) { speed = 60; }\n if (vec2 === undefined) { vec2 = new Vector2(); }\n\n return vec2.setToPolar(rotation, speed);\n },\n\n /**\n * This method will search the given rectangular area and return an array of all physics bodies that\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\n * \n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\n * contained within it.\n * \n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\n * otherwise the search is O(N) for Dynamic Bodies.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#overlapRect\n * @since 3.17.0\n *\n * @param {number} x - The top-left x coordinate of the area to search within.\n * @param {number} y - The top-left y coordinate of the area to search within.\n * @param {number} width - The width of the area to search within.\n * @param {number} height - The height of the area to search within.\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\n *\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\n */\n overlapRect: function (x, y, width, height, includeDynamic, includeStatic)\n {\n return OverlapRect(this.world, x, y, width, height, includeDynamic, includeStatic);\n },\n \n /**\n * The Scene that owns this plugin is shutting down.\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#shutdown\n * @since 3.0.0\n */\n shutdown: function ()\n {\n if (!this.world)\n {\n // Already destroyed\n return;\n }\n\n var eventEmitter = this.systems.events;\n\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\n\n this.add.destroy();\n this.world.destroy();\n\n this.add = null;\n this.world = null;\n },\n\n /**\n * The Scene that owns this plugin is being destroyed.\n * We need to shutdown and then kill off all external references.\n *\n * @method Phaser.Physics.Arcade.ArcadePhysics#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.shutdown();\n\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\n\n this.scene = null;\n this.systems = null;\n }\n\n});\n\nPluginCache.register('ArcadePhysics', ArcadePhysics, 'arcadePhysics');\n\nmodule.exports = ArcadePhysics;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadePhysics.js?")},"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js");\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\n\n/**\n * @classdesc\n * An Arcade Physics Sprite is a Sprite with an Arcade Physics body and related components.\n * The body can be dynamic or static.\n *\n * The main difference between an Arcade Sprite and an Arcade Image is that you cannot animate an Arcade Image.\n * If you do not require animation then you can safely use Arcade Images instead of Arcade Sprites.\n *\n * @class Sprite\n * @extends Phaser.GameObjects.Sprite\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.Physics.Arcade.Components.Acceleration\n * @extends Phaser.Physics.Arcade.Components.Angular\n * @extends Phaser.Physics.Arcade.Components.Bounce\n * @extends Phaser.Physics.Arcade.Components.Debug\n * @extends Phaser.Physics.Arcade.Components.Drag\n * @extends Phaser.Physics.Arcade.Components.Enable\n * @extends Phaser.Physics.Arcade.Components.Friction\n * @extends Phaser.Physics.Arcade.Components.Gravity\n * @extends Phaser.Physics.Arcade.Components.Immovable\n * @extends Phaser.Physics.Arcade.Components.Mass\n * @extends Phaser.Physics.Arcade.Components.Size\n * @extends Phaser.Physics.Arcade.Components.Velocity\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Flip\n * @extends Phaser.GameObjects.Components.GetBounds\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Size\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n */\nvar ArcadeSprite = new Class({\n\n Extends: Sprite,\n\n Mixins: [\n Components.Acceleration,\n Components.Angular,\n Components.Bounce,\n Components.Debug,\n Components.Drag,\n Components.Enable,\n Components.Friction,\n Components.Gravity,\n Components.Immovable,\n Components.Mass,\n Components.Size,\n Components.Velocity\n ],\n\n initialize:\n\n function ArcadeSprite (scene, x, y, texture, frame)\n {\n Sprite.call(this, scene, x, y, texture, frame);\n\n /**\n * This Game Object\'s Physics Body.\n *\n * @name Phaser.Physics.Arcade.Sprite#body\n * @type {?(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)}\n * @default null\n * @since 3.0.0\n */\n this.body = null;\n }\n\n});\n\nmodule.exports = ArcadeSprite;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/ArcadeSprite.js?')},"./node_modules/phaser/src/physics/arcade/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar RadToDeg = __webpack_require__(/*! ../../math/RadToDeg */ \"./node_modules/phaser/src/math/RadToDeg.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Arcade Body.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticBody}.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Body belongs to.\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Transformations applied to this Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#transform\r\n * @type {object}\r\n * @since 3.4.0\r\n */\r\n this.transform = {\r\n x: gameObject.x,\r\n y: gameObject.y,\r\n rotation: gameObject.angle,\r\n scaleX: gameObject.scaleX,\r\n scaleY: gameObject.scaleY,\r\n displayOriginX: gameObject.displayOriginX,\r\n displayOriginY: gameObject.displayOriginY\r\n };\r\n\r\n /**\r\n * Whether the Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * Whether the Body's velocity is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * The color of this Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * Whether this Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Body's boundary is circular (true) or rectangular (false).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Body is circular, this is the unscaled radius of the Body's boundary, as set by setCircle(), in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setCircle\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Body's position from its Game Object's position, in source pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setOffset\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * The position of this Body during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#prev\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.prev = new Vector2(gameObject.x, gameObject.y);\r\n\r\n /**\r\n * Whether this Body's `rotation` is affected by its angular acceleration and angular velocity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowRotation\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowRotation = true;\r\n\r\n /**\r\n * This body's rotation, in degrees, based on its angular acceleration and angular velocity.\r\n * The Body's rotation controls the `angle` of its Game Object.\r\n * It doesn't rotate the Body's boundary, which is always an axis-aligned rectangle or a circle.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = gameObject.angle;\r\n\r\n /**\r\n * The Body's rotation, in degrees, during the previous step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#preRotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.preRotation = gameObject.angle;\r\n\r\n /**\r\n * The width of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#width\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Body's boundary, in pixels.\r\n * If the Body is circular, this is also the Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#height\r\n * @type {number}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The unscaled width of the Body, in source pixels, as set by setSize().\r\n * The default is the width of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceWidth = width;\r\n\r\n /**\r\n * The unscaled height of the Body, in source pixels, as set by setSize().\r\n * The default is the height of the Body's Game Object's texture frame.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#sourceHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#setSize\r\n */\r\n this.sourceHeight = height;\r\n\r\n if (gameObject.frame)\r\n {\r\n this.sourceWidth = gameObject.frame.realWidth;\r\n this.sourceHeight = gameObject.frame.realHeight;\r\n }\r\n\r\n /**\r\n * Half the Body's width, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(width / 2);\r\n\r\n /**\r\n * Half the Body's height, in pixels.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(height / 2);\r\n\r\n /**\r\n * The center of the Body's boundary.\r\n * The midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * The Body's velocity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.velocity = new Vector2();\r\n\r\n /**\r\n * The Body's calculated velocity, in pixels per second, at the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#newVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.newVelocity = new Vector2();\r\n\r\n /**\r\n * The Body's absolute maximum change in position, in pixels per step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#deltaMax\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.deltaMax = new Vector2();\r\n\r\n /**\r\n * The Body's change in velocity, in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#acceleration\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.acceleration = new Vector2();\r\n\r\n /**\r\n * Whether this Body's velocity is affected by its `drag`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowDrag\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.allowDrag = true;\r\n\r\n /**\r\n * Absolute loss of velocity due to movement, in pixels per second squared.\r\n * The x and y components are applied separately.\r\n *\r\n * When `useDamping` is true, this is 1 minus the damping factor.\r\n * A value of 1 means the Body loses no velocity.\r\n * A value of 0.95 means the Body loses 5% of its velocity per step.\r\n * A value of 0.5 means the Body loses 50% of its velocity per step.\r\n *\r\n * Drag is applied only when `acceleration` is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#drag\r\n * @type {(Phaser.Math.Vector2|number)}\r\n * @since 3.0.0\r\n */\r\n this.drag = new Vector2();\r\n\r\n /**\r\n * Whether this Body's position is affected by gravity (local or world).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#allowGravity\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#gravity\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.allowGravity = true;\r\n\r\n /**\r\n * Acceleration due to gravity (specific to this Body), in pixels per second squared.\r\n * Total gravity is the sum of this vector and the simulation's `gravity`.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#gravity\r\n */\r\n this.gravity = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision, relative to 1.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.bounce = new Vector2();\r\n\r\n /**\r\n * Rebound following a collision with the world boundary, relative to 1.\r\n * If null, `bounce` is used instead.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#worldBounce\r\n * @type {?Phaser.Math.Vector2}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.worldBounce = null;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this Body collides with the world boundary (and `collideWorldBounds` is also true).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#worldboundsEvent\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this Body collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collideEvent\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this Body overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#overlapEvent\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The Body's absolute maximum velocity, in pixels per second.\r\n * The horizontal and vertical components are applied separately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxVelocity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.maxVelocity = new Vector2(10000, 10000);\r\n\r\n /**\r\n * The maximum speed this Body is allowed to reach.\r\n * \r\n * If not negative it limits the scalar value of speed.\r\n * \r\n * Any negative value means no maximum is being applied.\r\n * \r\n * @name Phaser.Physics.Arcade.Body#maxSpeed\r\n * @type {number}\r\n * @since 3.16.0 \r\n */\r\n this.maxSpeed = -1;\r\n\r\n /**\r\n * If this Body is `immovable` and in motion, `friction` is the proportion of this Body's motion received by the riding Body on each axis, relative to 1.\r\n * The default value (1, 0) moves the riding Body horizontally in equal proportion to this Body and vertically not at all.\r\n * The horizontal component (x) is applied only when two colliding Bodies are separated vertically.\r\n * The vertical component (y) is applied only when two colliding Bodies are separated horizontally.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#friction\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.friction = new Vector2(1, 0);\r\n\r\n /**\r\n * If this Body is using `drag` for deceleration this property controls how the drag is applied.\r\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\r\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\r\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\r\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\r\n *\r\n * If you enable this property then you should use far smaller `drag` values than with linear, as\r\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\r\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#useDamping\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.10.0\r\n */\r\n this.useDamping = false;\r\n\r\n /**\r\n * The rate of change of this Body's `rotation`, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularVelocity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularVelocity = 0;\r\n\r\n /**\r\n * The Body's angular acceleration (change in angular velocity), in degrees per second squared.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularAcceleration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularAcceleration = 0;\r\n\r\n /**\r\n * Loss of angular velocity due to angular movement, in degrees per second.\r\n *\r\n * Angular drag is applied only when angular acceleration is zero.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angularDrag\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angularDrag = 0;\r\n\r\n /**\r\n * The Body's maximum angular velocity, in degrees per second.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#maxAngular\r\n * @type {number}\r\n * @default 1000\r\n * @since 3.0.0\r\n */\r\n this.maxAngular = 1000;\r\n\r\n /**\r\n * The Body's inertia, relative to a default unit (1).\r\n * With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * The calculated angle of this Body's velocity vector, in radians, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#angle\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.angle = 0;\r\n\r\n /**\r\n * The calculated magnitude of the Body's velocity, in pixels per second, during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#speed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.speed = 0;\r\n\r\n /**\r\n * The direction of the Body's velocity, as calculated during the last step.\r\n * If the Body is moving on both axes (diagonally), this describes motion on the vertical axis only.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#facing\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.facing = CONST.FACING_NONE;\r\n\r\n /**\r\n * Whether this Body can be moved by collisions with another Body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#immovable\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.immovable = false;\r\n\r\n /**\r\n * Whether the Body's position and rotation are affected by its velocity, acceleration, drag, and gravity.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#moves\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.moves = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies.\r\n * Pass your own `collideCallback` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this Body is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this Body is overlapped with another and both are not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this Body interacts with the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#collideWorldBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this Body is checked for collisions and for which directions.\r\n * You can set `checkCollision.none = true` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this Body is colliding with another and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body was colliding with another during the last step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this Body is colliding with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether to automatically synchronize this Body's dimensions to the dimensions of its Game Object's visual bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#syncBounds\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n * @see Phaser.GameObjects.Components.GetBounds#getBounds\r\n */\r\n this.syncBounds = false;\r\n\r\n /**\r\n * The Body's physics type (dynamic or static).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#physicsType\r\n * @type {integer}\r\n * @readonly\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Whether the Body's position needs updating from its Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_reset\r\n * @type {boolean}\r\n * @private\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this._reset = true;\r\n\r\n /**\r\n * Cached horizontal scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sx\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sx = gameObject.scaleX;\r\n\r\n /**\r\n * Cached vertical scale of the Body's Game Object.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_sy\r\n * @type {number}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._sy = gameObject.scaleY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the last step.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._dy = 0;\r\n\r\n /**\r\n * Stores the Game Object's bounds.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#_bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._bounds = new Rectangle();\r\n },\r\n\r\n /**\r\n * Updates the Body's `transform`, `width`, `height`, and `center` from its Game Object.\r\n * The Body's `position` isn't changed.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateBounds\r\n * @since 3.0.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var sprite = this.gameObject;\r\n\r\n // Container?\r\n\r\n var transform = this.transform;\r\n\r\n if (sprite.parentContainer)\r\n {\r\n var matrix = sprite.getWorldTransformMatrix(this.world._tempMatrix, this.world._tempMatrix2);\r\n\r\n transform.x = matrix.tx;\r\n transform.y = matrix.ty;\r\n transform.rotation = RadToDeg(matrix.rotation);\r\n transform.scaleX = matrix.scaleX;\r\n transform.scaleY = matrix.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n else\r\n {\r\n transform.x = sprite.x;\r\n transform.y = sprite.y;\r\n transform.rotation = sprite.angle;\r\n transform.scaleX = sprite.scaleX;\r\n transform.scaleY = sprite.scaleY;\r\n transform.displayOriginX = sprite.displayOriginX;\r\n transform.displayOriginY = sprite.displayOriginY;\r\n }\r\n\r\n var recalc = false;\r\n\r\n if (this.syncBounds)\r\n {\r\n var b = sprite.getBounds(this._bounds);\r\n\r\n this.width = b.width;\r\n this.height = b.height;\r\n recalc = true;\r\n }\r\n else\r\n {\r\n var asx = Math.abs(transform.scaleX);\r\n var asy = Math.abs(transform.scaleY);\r\n\r\n if (this._sx !== asx || this._sy !== asy)\r\n {\r\n this.width = this.sourceWidth * asx;\r\n this.height = this.sourceHeight * asy;\r\n this._sx = asx;\r\n this._sy = asy;\r\n recalc = true;\r\n }\r\n }\r\n\r\n if (recalc)\r\n {\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n this.updateCenter();\r\n }\r\n },\r\n\r\n /**\r\n * Updates the Body's `center` from its `position`, `width`, and `height`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Prepares the Body for a physics step by resetting the `wasTouching`, `touching` and `blocked` states.\r\n * \r\n * This method is only called if the physics world is going to run a step this frame.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#resetFlags\r\n * @since 3.18.0\r\n */\r\n resetFlags: function ()\r\n {\r\n // Store and reset collision flags\r\n this.wasTouching.none = this.touching.none;\r\n this.wasTouching.up = this.touching.up;\r\n this.wasTouching.down = this.touching.down;\r\n this.wasTouching.left = this.touching.left;\r\n this.wasTouching.right = this.touching.right;\r\n\r\n this.touching.none = true;\r\n this.touching.up = false;\r\n this.touching.down = false;\r\n this.touching.left = false;\r\n this.touching.right = false;\r\n\r\n this.blocked.none = true;\r\n this.blocked.up = false;\r\n this.blocked.down = false;\r\n this.blocked.left = false;\r\n this.blocked.right = false;\r\n\r\n this.overlapR = 0;\r\n this.overlapX = 0;\r\n this.overlapY = 0;\r\n\r\n this.embedded = false;\r\n },\r\n\r\n /**\r\n * Syncs the position body position with the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#preUpdate\r\n * @since 3.17.0\r\n * \r\n * @param {boolean} willStep - Will this Body run an update as well?\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n preUpdate: function (willStep, delta)\r\n {\r\n if (willStep)\r\n {\r\n this.resetFlags();\r\n }\r\n\r\n this.updateBounds();\r\n\r\n var sprite = this.transform;\r\n\r\n this.position.x = sprite.x + sprite.scaleX * (this.offset.x - sprite.displayOriginX);\r\n this.position.y = sprite.y + sprite.scaleY * (this.offset.y - sprite.displayOriginY);\r\n\r\n this.updateCenter();\r\n\r\n this.rotation = sprite.rotation;\r\n\r\n this.preRotation = this.rotation;\r\n\r\n if (this._reset)\r\n {\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n }\r\n\r\n if (willStep)\r\n {\r\n this.update(delta);\r\n }\r\n },\r\n\r\n /**\r\n * Performs a single physics step and updates the body velocity, angle, speed and other properties.\r\n * \r\n * This method can be called multiple times per game frame, depending on the physics step rate.\r\n * \r\n * The results are synced back to the Game Object in `postUpdate`.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#update\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_BOUNDS\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time, in seconds, elapsed since the last frame.\r\n */\r\n update: function (delta)\r\n {\r\n if (this.moves)\r\n {\r\n this.world.updateMotion(this, delta);\r\n\r\n var vx = this.velocity.x;\r\n var vy = this.velocity.y;\r\n\r\n this.newVelocity.set(vx * delta, vy * delta);\r\n\r\n this.position.add(this.newVelocity);\r\n\r\n this.updateCenter();\r\n\r\n this.angle = Math.atan2(vy, vx);\r\n this.speed = Math.sqrt(vx * vx + vy * vy);\r\n\r\n // Now the update will throw collision checks at the Body\r\n // And finally we'll integrate the new position back to the Sprite in postUpdate\r\n\r\n if (this.collideWorldBounds && this.checkWorldBounds() && this.onWorldBounds)\r\n {\r\n this.world.emit(Events.WORLD_BOUNDS, this, this.blocked.up, this.blocked.down, this.blocked.left, this.blocked.right);\r\n }\r\n }\r\n\r\n this._dx = this.position.x - this.prev.x;\r\n this._dy = this.position.y - this.prev.y;\r\n },\r\n\r\n /**\r\n * Feeds the Body results back into the parent Game Object.\r\n * \r\n * This method is called every game frame, regardless if the world steps or not.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var dx = this.position.x - this.prev.x;\r\n var dy = this.position.y - this.prev.y;\r\n\r\n if (this.moves)\r\n {\r\n var mx = this.deltaMax.x;\r\n var my = this.deltaMax.y;\r\n\r\n if (mx !== 0 && dx !== 0)\r\n {\r\n if (dx < 0 && dx < -mx)\r\n {\r\n dx = -mx;\r\n }\r\n else if (dx > 0 && dx > mx)\r\n {\r\n dx = mx;\r\n }\r\n }\r\n\r\n if (my !== 0 && dy !== 0)\r\n {\r\n if (dy < 0 && dy < -my)\r\n {\r\n dy = -my;\r\n }\r\n else if (dy > 0 && dy > my)\r\n {\r\n dy = my;\r\n }\r\n }\r\n\r\n this.gameObject.x += dx;\r\n this.gameObject.y += dy;\r\n\r\n this._reset = true;\r\n }\r\n\r\n if (dx < 0)\r\n {\r\n this.facing = CONST.FACING_LEFT;\r\n }\r\n else if (dx > 0)\r\n {\r\n this.facing = CONST.FACING_RIGHT;\r\n }\r\n\r\n if (dy < 0)\r\n {\r\n this.facing = CONST.FACING_UP;\r\n }\r\n else if (dy > 0)\r\n {\r\n this.facing = CONST.FACING_DOWN;\r\n }\r\n\r\n this._dx = dx;\r\n this._dy = dy;\r\n\r\n if (this.allowRotation)\r\n {\r\n this.gameObject.angle += this.deltaZ();\r\n }\r\n\r\n this.prev.x = this.position.x;\r\n this.prev.y = this.position.y;\r\n },\r\n\r\n /**\r\n * Checks for collisions between this Body and the world boundary and separates them.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#checkWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if this Body is colliding with the world boundary.\r\n */\r\n checkWorldBounds: function ()\r\n {\r\n var pos = this.position;\r\n var bounds = this.world.bounds;\r\n var check = this.world.checkCollision;\r\n\r\n var bx = (this.worldBounce) ? -this.worldBounce.x : -this.bounce.x;\r\n var by = (this.worldBounce) ? -this.worldBounce.y : -this.bounce.y;\r\n\r\n if (pos.x < bounds.x && check.left)\r\n {\r\n pos.x = bounds.x;\r\n this.velocity.x *= bx;\r\n this.blocked.left = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.right > bounds.right && check.right)\r\n {\r\n pos.x = bounds.right - this.width;\r\n this.velocity.x *= bx;\r\n this.blocked.right = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n if (pos.y < bounds.y && check.up)\r\n {\r\n pos.y = bounds.y;\r\n this.velocity.y *= by;\r\n this.blocked.up = true;\r\n this.blocked.none = false;\r\n }\r\n else if (this.bottom > bounds.bottom && check.down)\r\n {\r\n pos.y = bounds.bottom - this.height;\r\n this.velocity.y *= by;\r\n this.blocked.down = true;\r\n this.blocked.none = false;\r\n }\r\n\r\n return !this.blocked.none;\r\n },\r\n\r\n /**\r\n * Sets the offset of the Body's position from its Game Object's position.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal offset, in source pixels.\r\n * @param {number} [y=x] - The vertical offset, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.offset.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a rectangle.\r\n * Modifies the Body `offset` if `center` is true (the default).\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.sourceWidth = width;\r\n this.sourceHeight = height;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.updateCenter();\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n }\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sizes and positions this Body's boundary, as a circle.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the Body, in source pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the Body from its Game Object, in source pixels.\r\n * @param {number} [offsetY] - The vertical offset of the Body from its Game Object, in source pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.isCircle = true;\r\n this.radius = radius;\r\n\r\n this.sourceWidth = radius * 2;\r\n this.sourceHeight = radius * 2;\r\n\r\n this.width = this.sourceWidth * this._sx;\r\n this.height = this.sourceHeight * this._sy;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * If the Body had any velocity or acceleration it is lost as a result of calling this.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position to place the Game Object and Body.\r\n * @param {number} y - The vertical position to place the Game Object and Body.\r\n */\r\n reset: function (x, y)\r\n {\r\n this.stop();\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n if (gameObject.getTopLeft)\r\n {\r\n gameObject.getTopLeft(this.position);\r\n }\r\n else\r\n {\r\n this.position.set(x, y);\r\n }\r\n\r\n this.prev.copy(this.position);\r\n\r\n this.rotation = gameObject.angle;\r\n this.preRotation = gameObject.angle;\r\n\r\n this.updateBounds();\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Sets acceleration, velocity, and speed to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n stop: function ()\r\n {\r\n this.velocity.set(0);\r\n this.acceleration.set(0);\r\n this.speed = 0;\r\n this.angularVelocity = 0;\r\n this.angularAcceleration = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Copies the coordinates of this Body's edges into an object.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - An object to copy the values into.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} - An object with {x, y, right, bottom}.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Tests if the coordinates are within this Body's boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal coordinate.\r\n * @param {number} y - The vertical coordinate.\r\n *\r\n * @return {boolean} True if (x, y) is within this Body.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving down.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onFloor\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onFloor: function ()\r\n {\r\n return this.blocked.down;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving up.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onCeiling\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onCeiling: function ()\r\n {\r\n return this.blocked.up;\r\n },\r\n\r\n /**\r\n * Whether this Body is touching a tile or the world boundary while moving left or right.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#onWall\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.Body#blocked\r\n *\r\n * @return {boolean} True if touching.\r\n */\r\n onWall: function ()\r\n {\r\n return (this.blocked.left || this.blocked.right);\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's horizontal position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return (this._dx > 0) ? this._dx : -this._dx;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this Body's vertical position from the previous step.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return (this._dy > 0) ? this._dy : -this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's horizontal position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaX: function ()\r\n {\r\n return this._dx;\r\n },\r\n\r\n /**\r\n * The change in this Body's vertical position from the previous step.\r\n * This value is set during the Body's update phase.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaY: function ()\r\n {\r\n return this._dy;\r\n },\r\n\r\n /**\r\n * The change in this Body's rotation from the previous step, in degrees.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The delta value.\r\n */\r\n deltaZ: function ()\r\n {\r\n return this.rotation - this.preRotation;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for deletion by the simulation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n if (this.world)\r\n {\r\n this.world.pendingDestroy.set(this);\r\n }\r\n },\r\n\r\n /**\r\n * Draws this Body's boundary and velocity, if enabled.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to draw on.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n // Only draw the sides where checkCollision is true, similar to debugger in layer\r\n if (this.checkCollision.up)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x + this.width, pos.y);\r\n }\r\n\r\n if (this.checkCollision.right)\r\n {\r\n graphic.lineBetween(pos.x + this.width, pos.y, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.down)\r\n {\r\n graphic.lineBetween(pos.x, pos.y + this.height, pos.x + this.width, pos.y + this.height);\r\n }\r\n\r\n if (this.checkCollision.left)\r\n {\r\n graphic.lineBetween(pos.x, pos.y, pos.x, pos.y + this.height);\r\n }\r\n }\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.velocity.x / 2, y + this.velocity.y / 2);\r\n }\r\n },\r\n\r\n /**\r\n * Whether this Body will be drawn to the debug display.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} True if either `debugShowBody` or `debugShowVelocity` are enabled.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * Sets whether this Body collides with the world boundary.\r\n * \r\n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setCollideWorldBounds\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\r\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\r\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setCollideWorldBounds: function (value, bounceX, bounceY)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.collideWorldBounds = value;\r\n\r\n var setBounceX = (bounceX !== undefined);\r\n var setBounceY = (bounceY !== undefined);\r\n\r\n if (setBounceX || setBounceY)\r\n {\r\n if (!this.worldBounce)\r\n {\r\n this.worldBounce = new Vector2();\r\n }\r\n\r\n if (setBounceX)\r\n {\r\n this.worldBounce.x = bounceX;\r\n }\r\n\r\n if (setBounceY)\r\n {\r\n this.worldBounce.y = bounceY;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this.velocity.set(x, y);\r\n\r\n x = this.velocity.x;\r\n y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityX: function (value)\r\n {\r\n this.velocity.x = value;\r\n\r\n var x = value;\r\n var y = this.velocity.y;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setVelocityY: function (value)\r\n {\r\n this.velocity.y = value;\r\n\r\n var x = this.velocity.x;\r\n var y = value;\r\n\r\n this.speed = Math.sqrt(x * x + y * y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's maximum velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - The horizontal velocity, in pixels per second.\r\n * @param {number} [y=x] - The vertical velocity, in pixels per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n this.maxVelocity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum speed the Body can move.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMaxSpeed\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The maximum speed value, in pixels per second. Set to a negative value to disable.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMaxSpeed: function (value)\r\n {\r\n this.maxSpeed = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal bounce, relative to 1.\r\n * @param {number} y - The vertical bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounce: function (x, y)\r\n {\r\n this.bounce.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceX: function (value)\r\n {\r\n this.bounce.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical bounce.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setBounceY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The bounce, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setBounceY: function (value)\r\n {\r\n this.bounce.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.acceleration.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationX: function (value)\r\n {\r\n this.acceleration.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAccelerationY: function (value)\r\n {\r\n this.acceleration.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowDrag\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowDrag\r\n *\r\n * @param {boolean} [value=true] - `true` to allow drag on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowDrag: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables gravity's effect on this Body.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowGravity\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowGravity\r\n *\r\n * @param {boolean} [value=true] - `true` to allow gravity on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowGravity: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowGravity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables rotation.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAllowRotation\r\n * @since 3.9.0\r\n * @see Phaser.Physics.Arcade.Body#allowRotation\r\n *\r\n * @param {boolean} [value=true] - `true` to allow rotation on this body, or `false` to disable it.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAllowRotation: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.allowRotation = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDrag: function (x, y)\r\n {\r\n this.drag.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragX: function (value)\r\n {\r\n this.drag.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setDragY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setDragY: function (value)\r\n {\r\n this.drag.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, in pixels per second squared.\r\n * @param {number} y - The vertical component, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravity: function (x, y)\r\n {\r\n this.gravity.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityX: function (value)\r\n {\r\n this.gravity.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical gravity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setGravityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The gravity, in pixels per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setGravityY: function (value)\r\n {\r\n this.gravity.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal component, relative to 1.\r\n * @param {number} y - The vertical component, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.set(x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's horizontal friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionX: function (value)\r\n {\r\n this.friction.x = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's vertical friction.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The friction value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setFrictionY: function (value)\r\n {\r\n this.friction.y = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity, in degrees per second.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n this.angularVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular acceleration.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The acceleration, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularAcceleration: function (value)\r\n {\r\n this.angularAcceleration = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's angular drag.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setAngularDrag\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The drag, in degrees per second squared.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setAngularDrag: function (value)\r\n {\r\n this.angularDrag = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's mass.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The mass value, relative to 1.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `immovable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setImmovable\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `immovable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setImmovable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.immovable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Body's `enable` property.\r\n *\r\n * @method Phaser.Physics.Arcade.Body#setEnable\r\n * @since 3.15.0\r\n *\r\n * @param {boolean} [value=true] - The value to assign to `enable`.\r\n *\r\n * @return {Phaser.Physics.Arcade.Body} This Body object.\r\n */\r\n setEnable: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.enable = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Body's horizontal position (left edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.x = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Body's vertical position (top edge).\r\n *\r\n * @name Phaser.Physics.Arcade.Body#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.position.y = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The left edge of the Body's boundary. Identical to x.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right edge of the Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The top edge of the Body's boundary. Identical to y.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The bottom edge of this Body's boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.Body#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Body.js?")},"./node_modules/phaser/src/physics/arcade/Collider.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\n\n/**\n * @classdesc\n * An Arcade Physics Collider will automatically check for collision, or overlaps, between two objects\n * every step. If a collision, or overlap, occurs it will invoke the given callbacks.\n *\n * @class Collider\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade physics World that will manage the collisions.\n * @param {boolean} overlapOnly - Whether to check for collisions or overlap.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {any} callbackContext - The scope in which to call the callbacks.\n */\nvar Collider = new Class({\n\n initialize:\n\n function Collider (world, overlapOnly, object1, object2, collideCallback, processCallback, callbackContext)\n {\n /**\n * The world in which the bodies will collide.\n *\n * @name Phaser.Physics.Arcade.Collider#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The name of the collider (unused by Phaser).\n *\n * @name Phaser.Physics.Arcade.Collider#name\n * @type {string}\n * @since 3.1.0\n */\n this.name = '';\n\n /**\n * Whether the collider is active.\n *\n * @name Phaser.Physics.Arcade.Collider#active\n * @type {boolean}\n * @default true\n * @since 3.0.0\n */\n this.active = true;\n\n /**\n * Whether to check for collisions or overlaps.\n *\n * @name Phaser.Physics.Arcade.Collider#overlapOnly\n * @type {boolean}\n * @since 3.0.0\n */\n this.overlapOnly = overlapOnly;\n\n /**\n * The first object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object1\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object1 = object1;\n\n /**\n * The second object to check for collision.\n *\n * @name Phaser.Physics.Arcade.Collider#object2\n * @type {Phaser.Types.Physics.Arcade.ArcadeColliderType}\n * @since 3.0.0\n */\n this.object2 = object2;\n\n /**\n * The callback to invoke when the two objects collide.\n *\n * @name Phaser.Physics.Arcade.Collider#collideCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.collideCallback = collideCallback;\n\n /**\n * If a processCallback exists it must return true or collision checking will be skipped.\n *\n * @name Phaser.Physics.Arcade.Collider#processCallback\n * @type {ArcadePhysicsCallback}\n * @since 3.0.0\n */\n this.processCallback = processCallback;\n\n /**\n * The context the collideCallback and processCallback will run in.\n *\n * @name Phaser.Physics.Arcade.Collider#callbackContext\n * @type {object}\n * @since 3.0.0\n */\n this.callbackContext = callbackContext;\n },\n\n /**\n * A name for the Collider.\n * \n * Phaser does not use this value, it's for your own reference.\n *\n * @method Phaser.Physics.Arcade.Collider#setName\n * @since 3.1.0\n *\n * @param {string} name - The name to assign to the Collider.\n *\n * @return {Phaser.Physics.Arcade.Collider} This Collider instance.\n */\n setName: function (name)\n {\n this.name = name;\n\n return this;\n },\n\n /**\n * Called by World as part of its step processing, initial operation of collision checking.\n *\n * @method Phaser.Physics.Arcade.Collider#update\n * @since 3.0.0\n */\n update: function ()\n {\n this.world.collideObjects(\n this.object1,\n this.object2,\n this.collideCallback,\n this.processCallback,\n this.callbackContext,\n this.overlapOnly\n );\n },\n\n /**\n * Removes Collider from World and disposes of its resources.\n *\n * @method Phaser.Physics.Arcade.Collider#destroy\n * @since 3.0.0\n */\n destroy: function ()\n {\n this.world.removeCollider(this);\n\n this.active = false;\n\n this.world = null;\n\n this.object1 = null;\n this.object2 = null;\n\n this.collideCallback = null;\n this.processCallback = null;\n this.callbackContext = null;\n }\n\n});\n\nmodule.exports = Collider;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Collider.js?")},"./node_modules/phaser/src/physics/arcade/Factory.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeImage = __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js");\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar PhysicsGroup = __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js");\nvar StaticPhysicsGroup = __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js");\n\n/**\n * @classdesc\n * The Arcade Physics Factory allows you to easily create Arcade Physics enabled Game Objects.\n * Objects that are created by this Factory are automatically added to the physics world.\n *\n * @class Factory\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics World instance.\n */\nvar Factory = new Class({\n\n initialize:\n\n function Factory (world)\n {\n /**\n * A reference to the Arcade Physics World.\n *\n * @name Phaser.Physics.Arcade.Factory#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * A reference to the Scene this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#scene\n * @type {Phaser.Scene}\n * @since 3.0.0\n */\n this.scene = world.scene;\n\n /**\n * A reference to the Scene.Systems this Arcade Physics instance belongs to.\n *\n * @name Phaser.Physics.Arcade.Factory#sys\n * @type {Phaser.Scenes.Systems}\n * @since 3.0.0\n */\n this.sys = world.scene.sys;\n },\n\n /**\n * Creates a new Arcade Physics Collider object.\n *\n * @method Phaser.Physics.Arcade.Factory#collider\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for collision.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for collision.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n collider: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addCollider(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Creates a new Arcade Physics Collider Overlap object.\n *\n * @method Phaser.Physics.Arcade.Factory#overlap\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object1 - The first object to check for overlap.\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object2 - The second object to check for overlap.\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\n *\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\n */\n overlap: function (object1, object2, collideCallback, processCallback, callbackContext)\n {\n return this.world.addOverlap(object1, object2, collideCallback, processCallback, callbackContext);\n },\n\n /**\n * Adds an Arcade Physics Body to the given Game Object.\n *\n * @method Phaser.Physics.Arcade.Factory#existing\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} gameObject - A Game Object.\n * @param {boolean} [isStatic=false] - Create a Static body (true) or Dynamic body (false).\n *\n * @return {Phaser.GameObjects.GameObject} The Game Object.\n */\n existing: function (gameObject, isStatic)\n {\n var type = (isStatic) ? CONST.STATIC_BODY : CONST.DYNAMIC_BODY;\n\n this.world.enableBody(gameObject, type);\n\n return gameObject;\n },\n\n /**\n * Creates a new Arcade Image object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticImage\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n staticImage: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.STATIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Image object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#image\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Image} The Image object that was created.\n */\n image: function (x, y, key, frame)\n {\n var image = new ArcadeImage(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(image);\n\n this.world.enableBody(image, CONST.DYNAMIC_BODY);\n\n return image;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Static body.\n *\n * @method Phaser.Physics.Arcade.Factory#staticSprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n staticSprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.STATIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a new Arcade Sprite object with a Dynamic body.\n *\n * @method Phaser.Physics.Arcade.Factory#sprite\n * @since 3.0.0\n *\n * @param {number} x - The horizontal position of this Game Object in the world.\n * @param {number} y - The vertical position of this Game Object in the world.\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\n *\n * @return {Phaser.Physics.Arcade.Sprite} The Sprite object that was created.\n */\n sprite: function (x, y, key, frame)\n {\n var sprite = new ArcadeSprite(this.scene, x, y, key, frame);\n\n this.sys.displayList.add(sprite);\n this.sys.updateList.add(sprite);\n\n this.world.enableBody(sprite, CONST.DYNAMIC_BODY);\n\n return sprite;\n },\n\n /**\n * Creates a Static Physics Group object.\n * All Game Objects created by this Group will automatically be static Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#staticGroup\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} The Static Group object that was created.\n */\n staticGroup: function (children, config)\n {\n return this.sys.updateList.add(new StaticPhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Creates a Physics Group object.\n * All Game Objects created by this Group will automatically be dynamic Arcade Physics objects.\n *\n * @method Phaser.Physics.Arcade.Factory#group\n * @since 3.0.0\n *\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n *\n * @return {Phaser.Physics.Arcade.Group} The Group object that was created.\n */\n group: function (children, config)\n {\n return this.sys.updateList.add(new PhysicsGroup(this.world, this.world.scene, children, config));\n },\n\n /**\n * Destroys this Factory.\n *\n * @method Phaser.Physics.Arcade.Factory#destroy\n * @since 3.5.0\n */\n destroy: function ()\n {\n this.world = null;\n this.scene = null;\n this.sys = null;\n }\n\n});\n\nmodule.exports = Factory;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/Factory.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the horizontal overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.left`, `touching.right`, `touching.none` and `overlapX\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsX() + body2.deltaAbsX() + bias;\n\n if (body1._dx === 0 && body2._dx === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dx > body2._dx)\n {\n // Body1 is moving right and / or Body2 is moving left\n overlap = body1.right - body2.x;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.right === false || body2.checkCollision.left === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.right = true;\n\n body2.touching.none = false;\n body2.touching.left = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.right = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.left = true;\n }\n }\n }\n else if (body1._dx < body2._dx)\n {\n // Body1 is moving left and/or Body2 is moving right\n overlap = body1.x - body2.width - body2.x;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.left === false || body2.checkCollision.right === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.left = true;\n\n body2.touching.none = false;\n body2.touching.right = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.left = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.right = true;\n }\n }\n }\n\n // Resets the overlapX to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapX = overlap;\n body2.overlapX = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapX.js?')},"./node_modules/phaser/src/physics/arcade/GetOverlapY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\n\n/**\n * Calculates and returns the vertical overlap between two arcade physics bodies and sets their properties\n * accordingly, including: `touching.up`, `touching.down`, `touching.none` and `overlapY\'.\n *\n * @function Phaser.Physics.Arcade.GetOverlapY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - Is this an overlap only check, or part of separation?\n * @param {number} bias - A value added to the delta values during collision checks. Increase it to prevent sprite tunneling(sprites passing through another instead of colliding).\n *\n * @return {number} The amount of overlap.\n */\nvar GetOverlapY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = 0;\n var maxOverlap = body1.deltaAbsY() + body2.deltaAbsY() + bias;\n\n if (body1._dy === 0 && body2._dy === 0)\n {\n // They overlap but neither of them are moving\n body1.embedded = true;\n body2.embedded = true;\n }\n else if (body1._dy > body2._dy)\n {\n // Body1 is moving down and/or Body2 is moving up\n overlap = body1.bottom - body2.y;\n\n if ((overlap > maxOverlap && !overlapOnly) || body1.checkCollision.down === false || body2.checkCollision.up === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.down = true;\n\n body2.touching.none = false;\n body2.touching.up = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.down = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.up = true;\n }\n }\n }\n else if (body1._dy < body2._dy)\n {\n // Body1 is moving up and/or Body2 is moving down\n overlap = body1.y - body2.bottom;\n\n if ((-overlap > maxOverlap && !overlapOnly) || body1.checkCollision.up === false || body2.checkCollision.down === false)\n {\n overlap = 0;\n }\n else\n {\n body1.touching.none = false;\n body1.touching.up = true;\n\n body2.touching.none = false;\n body2.touching.down = true;\n\n if (body2.physicsType === CONST.STATIC_BODY)\n {\n body1.blocked.none = false;\n body1.blocked.up = true;\n }\n\n if (body1.physicsType === CONST.STATIC_BODY)\n {\n body2.blocked.none = false;\n body2.blocked.down = true;\n }\n }\n }\n\n // Resets the overlapY to zero if there is no overlap, or to the actual pixel value if there is\n body1.overlapY = overlap;\n body2.overlapY = overlap;\n\n return overlap;\n};\n\nmodule.exports = GetOverlapY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/GetOverlapY.js?')},"./node_modules/phaser/src/physics/arcade/PhysicsGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ \"./node_modules/phaser/src/physics/arcade/ArcadeSprite.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ \"./node_modules/phaser/src/gameobjects/group/Group.js\");\r\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n/**\r\n * @classdesc\r\n * An Arcade Physics Group object.\r\n *\r\n * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies.\r\n *\r\n * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}.\r\n *\r\n * @class Group\r\n * @extends Phaser.GameObjects.Group\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\r\n * @param {Phaser.Scene} scene - The scene this group belongs to.\r\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\r\n * @param {Phaser.Types.Physics.Arcade.PhysicsGroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\r\n */\r\nvar PhysicsGroup = new Class({\r\n\r\n Extends: Group,\r\n\r\n initialize:\r\n\r\n function PhysicsGroup (world, scene, children, config)\r\n {\r\n if (!children && !config)\r\n {\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n else if (IsPlainObject(children))\r\n {\r\n // children is a plain object, so swizzle them:\r\n config = children;\r\n children = null;\r\n\r\n config.createCallback = this.createCallbackHandler;\r\n config.removeCallback = this.removeCallbackHandler;\r\n }\r\n else if (Array.isArray(children) && IsPlainObject(children[0]))\r\n {\r\n // children is an array of plain objects\r\n config = children[0];\r\n\r\n var _this = this;\r\n\r\n children.forEach(function (singleConfig)\r\n {\r\n singleConfig.createCallback = _this.createCallbackHandler;\r\n singleConfig.removeCallback = _this.removeCallbackHandler;\r\n });\r\n }\r\n else\r\n {\r\n // config is not defined and children is not a plain object nor an array of plain objects\r\n config = {\r\n createCallback: this.createCallbackHandler,\r\n removeCallback: this.removeCallbackHandler\r\n };\r\n }\r\n\r\n /**\r\n * The physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The class to create new Group members from.\r\n * \r\n * This should be either `Phaser.Physics.Arcade.Image`, `Phaser.Physics.Arcade.Sprite`, or a class extending one of those.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#classType\r\n * @type {Function}\r\n * @default ArcadeSprite\r\n * @since 3.0.0\r\n */\r\n config.classType = GetFastValue(config, 'classType', ArcadeSprite);\r\n\r\n /**\r\n * The physics type of the Group's members.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.DYNAMIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.DYNAMIC_BODY;\r\n\r\n /**\r\n * Default physics properties applied to Game Objects added to the Group or created by the Group. Derived from the `config` argument.\r\n *\r\n * @name Phaser.Physics.Arcade.Group#defaults\r\n * @type {Phaser.Types.Physics.Arcade.PhysicsGroupDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n setCollideWorldBounds: GetFastValue(config, 'collideWorldBounds', false),\r\n setAccelerationX: GetFastValue(config, 'accelerationX', 0),\r\n setAccelerationY: GetFastValue(config, 'accelerationY', 0),\r\n setAllowDrag: GetFastValue(config, 'allowDrag', true),\r\n setAllowGravity: GetFastValue(config, 'allowGravity', true),\r\n setAllowRotation: GetFastValue(config, 'allowRotation', true),\r\n setBounceX: GetFastValue(config, 'bounceX', 0),\r\n setBounceY: GetFastValue(config, 'bounceY', 0),\r\n setDragX: GetFastValue(config, 'dragX', 0),\r\n setDragY: GetFastValue(config, 'dragY', 0),\r\n setEnable: GetFastValue(config, 'enable', true),\r\n setGravityX: GetFastValue(config, 'gravityX', 0),\r\n setGravityY: GetFastValue(config, 'gravityY', 0),\r\n setFrictionX: GetFastValue(config, 'frictionX', 0),\r\n setFrictionY: GetFastValue(config, 'frictionY', 0),\r\n setVelocityX: GetFastValue(config, 'velocityX', 0),\r\n setVelocityY: GetFastValue(config, 'velocityY', 0),\r\n setAngularVelocity: GetFastValue(config, 'angularVelocity', 0),\r\n setAngularAcceleration: GetFastValue(config, 'angularAcceleration', 0),\r\n setAngularDrag: GetFastValue(config, 'angularDrag', 0),\r\n setMass: GetFastValue(config, 'mass', 1),\r\n setImmovable: GetFastValue(config, 'immovable', false)\r\n };\r\n\r\n if (Array.isArray(children))\r\n {\r\n config = null;\r\n }\r\n\r\n Group.call(this, scene, children, config);\r\n },\r\n\r\n /**\r\n * Enables a Game Object's Body and assigns `defaults`. Called when a Group member is added or created.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#createCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being added.\r\n */\r\n createCallbackHandler: function (child)\r\n {\r\n if (!child.body)\r\n {\r\n this.world.enableBody(child, CONST.DYNAMIC_BODY);\r\n }\r\n\r\n var body = child.body;\r\n\r\n for (var key in this.defaults)\r\n {\r\n body[key](this.defaults[key]);\r\n }\r\n },\r\n\r\n /**\r\n * Disables a Game Object's Body. Called when a Group member is removed.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#removeCallbackHandler\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} child - The Game Object being removed.\r\n */\r\n removeCallbackHandler: function (child)\r\n {\r\n if (child.body)\r\n {\r\n this.world.disableBody(child);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity.\r\n * @param {number} y - The vertical velocity.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x, y), the second (x + step, y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocity: function (x, y, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.set(x + (i * step), y + (i * step));\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (x), the second (x + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityX: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.x = value + (i * step);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of each Group member.\r\n *\r\n * @method Phaser.Physics.Arcade.Group#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The velocity value.\r\n * @param {number} [step=0] - The velocity increment. When set, the first member receives velocity (y), the second (y + step), and so on.\r\n *\r\n * @return {Phaser.Physics.Arcade.Group} This Physics Group object.\r\n */\r\n setVelocityY: function (value, step)\r\n {\r\n if (step === undefined) { step = 0; }\r\n\r\n var items = this.getChildren();\r\n\r\n for (var i = 0; i < items.length; i++)\r\n {\r\n items[i].body.velocity.y = value + (i * step);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PhysicsGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/PhysicsGroup.js?")},"./node_modules/phaser/src/physics/arcade/SeparateX.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\n\n/**\n * Separates two overlapping bodies on the X-axis (horizontally).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no horizontal overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap horizontally, otherwise `false`.\n */\nvar SeparateX = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapX(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.x;\n var v2 = body2.velocity.x;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.x -= overlap;\n body2.x += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.x = avg + nv1 * body1.bounce.x;\n body2.velocity.x = avg + nv2 * body2.bounce.x;\n }\n else if (!body1.immovable)\n {\n body1.x -= overlap;\n body1.velocity.x = v2 - v1 * body1.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body2.moves)\n {\n body1.y += (body2.y - body2.prev.y) * body2.friction.y;\n }\n }\n else\n {\n body2.x += overlap;\n body2.velocity.x = v1 - v2 * body2.bounce.x;\n\n // This is special case code that handles things like vertically moving platforms you can ride\n if (body1.moves)\n {\n body2.y += (body1.y - body1.prev.y) * body1.friction.y;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateX.js?")},"./node_modules/phaser/src/physics/arcade/SeparateY.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\n\n/**\n * Separates two overlapping bodies on the Y-axis (vertically).\n *\n * Separation involves moving two overlapping bodies so they don't overlap anymore and adjusting their velocities based on their mass. This is a core part of collision detection.\n *\n * The bodies won't be separated if there is no vertical overlap between them, if they are static, or if either one uses custom logic for its separation.\n *\n * @function Phaser.Physics.Arcade.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to separate.\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to separate.\n * @param {boolean} overlapOnly - If `true`, the bodies will only have their overlap data set and no separation will take place.\n * @param {number} bias - A value to add to the delta value during overlap checking. Used to prevent sprite tunneling.\n *\n * @return {boolean} `true` if the two bodies overlap vertically, otherwise `false`.\n */\nvar SeparateY = function (body1, body2, overlapOnly, bias)\n{\n var overlap = GetOverlapY(body1, body2, overlapOnly, bias);\n\n // Can't separate two immovable bodies, or a body with its own custom separation logic\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateY || body2.customSeparateY)\n {\n // return true if there was some overlap, otherwise false\n return (overlap !== 0) || (body1.embedded && body2.embedded);\n }\n\n // Adjust their positions and velocities accordingly (if there was any overlap)\n var v1 = body1.velocity.y;\n var v2 = body2.velocity.y;\n\n if (!body1.immovable && !body2.immovable)\n {\n overlap *= 0.5;\n\n body1.y -= overlap;\n body2.y += overlap;\n\n var nv1 = Math.sqrt((v2 * v2 * body2.mass) / body1.mass) * ((v2 > 0) ? 1 : -1);\n var nv2 = Math.sqrt((v1 * v1 * body1.mass) / body2.mass) * ((v1 > 0) ? 1 : -1);\n var avg = (nv1 + nv2) * 0.5;\n\n nv1 -= avg;\n nv2 -= avg;\n\n body1.velocity.y = avg + nv1 * body1.bounce.y;\n body2.velocity.y = avg + nv2 * body2.bounce.y;\n }\n else if (!body1.immovable)\n {\n body1.y -= overlap;\n body1.velocity.y = v2 - v1 * body1.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body2.moves)\n {\n body1.x += (body2.x - body2.prev.x) * body2.friction.x;\n }\n }\n else\n {\n body2.y += overlap;\n body2.velocity.y = v1 - v2 * body2.bounce.y;\n\n // This is special case code that handles things like horizontal moving platforms you can ride\n if (body1.moves)\n {\n body2.x += (body1.x - body1.prev.x) * body1.friction.x;\n }\n }\n\n // If we got this far then there WAS overlap, and separation is complete, so return true\n return true;\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/SeparateY.js?")},"./node_modules/phaser/src/physics/arcade/StaticBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CircleContains = __webpack_require__(/*! ../../geom/circle/Contains */ \"./node_modules/phaser/src/geom/circle/Contains.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar RectangleContains = __webpack_require__(/*! ../../geom/rectangle/Contains */ \"./node_modules/phaser/src/geom/rectangle/Contains.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Arcade Physics Body.\r\n *\r\n * A Static Body never moves, and isn't automatically synchronized with its parent Game Object.\r\n * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually.\r\n *\r\n * A Static Body can collide with other Bodies, but is never moved by collisions.\r\n *\r\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Body}.\r\n *\r\n * @class StaticBody\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.World} world - The Arcade Physics simulation this Static Body belongs to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object this Static Body belongs to.\r\n */\r\nvar StaticBody = new Class({\r\n\r\n initialize:\r\n\r\n function StaticBody (world, gameObject)\r\n {\r\n var width = (gameObject.width) ? gameObject.width : 64;\r\n var height = (gameObject.height) ? gameObject.height : 64;\r\n\r\n /**\r\n * The Arcade Physics simulation this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#world\r\n * @type {Phaser.Physics.Arcade.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Game Object this Static Body belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @since 3.0.0\r\n */\r\n this.gameObject = gameObject;\r\n\r\n /**\r\n * Whether the Static Body's boundary is drawn to the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowStaticBody;\r\n\r\n /**\r\n * The color of this Static Body on the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.staticBodyDebugColor;\r\n\r\n /**\r\n * Whether this Static Body is updated by the physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#enable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enable = true;\r\n\r\n /**\r\n * Whether this Static Body's boundary is circular (`true`) or rectangular (`false`).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#isCircle\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isCircle = false;\r\n\r\n /**\r\n * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels.\r\n * The true radius is equal to `halfWidth`.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#radius\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.radius = 0;\r\n\r\n /**\r\n * The offset of this Static Body's actual position from any updated position.\r\n *\r\n * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#offset\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.offset = new Vector2();\r\n\r\n /**\r\n * The position of this Static Body within the simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2(gameObject.x - gameObject.displayOriginX, gameObject.y - gameObject.displayOriginY);\r\n\r\n /**\r\n * The width of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Static Body's boundary, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's diameter.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * Half the Static Body's width, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth = Math.abs(this.width / 2);\r\n\r\n /**\r\n * Half the Static Body's height, in pixels.\r\n * If the Static Body is circular, this is also the Static Body's radius.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#halfHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n /**\r\n * The center of the Static Body's boundary.\r\n * This is the midpoint of its `position` (top-left corner) and its bottom-right corner.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#center\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight);\r\n\r\n /**\r\n * A constant zero velocity used by the Arcade Physics simulation for calculations.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#velocity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.velocity = Vector2.ZERO;\r\n\r\n /**\r\n * A constant `false` value expected by the Arcade Physics simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#allowGravity\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.allowGravity = false;\r\n\r\n /**\r\n * Gravitational force applied specifically to this Body. Values are in pixels per second squared. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.gravity = Vector2.ZERO;\r\n\r\n /**\r\n * Rebound, or restitution, following a collision, relative to 1. Always zero for a Static Body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bounce\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.bounce = Vector2.ZERO;\r\n\r\n // If true this Body will dispatch events\r\n\r\n /**\r\n * Whether the simulation emits a `worldbounds` event when this StaticBody collides with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary and never trigger a `worldbounds` event.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onWorldBounds = false;\r\n\r\n /**\r\n * Whether the simulation emits a `collide` event when this StaticBody collides with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onCollide\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onCollide = false;\r\n\r\n /**\r\n * Whether the simulation emits an `overlap` event when this StaticBody overlaps with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#onOverlap\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.onOverlap = false;\r\n\r\n /**\r\n * The StaticBody's inertia, relative to a default unit (1). With `bounce`, this affects the exchange of momentum (velocities) during collisions.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#mass\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.mass = 1;\r\n\r\n /**\r\n * Whether this object can be moved by collisions with another body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#immovable\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.immovable = true;\r\n\r\n /**\r\n * A flag disabling the default horizontal separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateX = false;\r\n\r\n /**\r\n * A flag disabling the default vertical separation of colliding bodies. Pass your own `collideHandler` to the collider.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#customSeparateY\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customSeparateY = false;\r\n\r\n /**\r\n * The amount of horizontal overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapX = 0;\r\n\r\n /**\r\n * The amount of vertical overlap (before separation), if this Body is colliding with another.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapY = 0;\r\n\r\n /**\r\n * The amount of overlap (before separation), if this StaticBody is circular and colliding with another circular body.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#overlapR\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.overlapR = 0;\r\n\r\n /**\r\n * Whether this StaticBody has ever overlapped with another while both were not moving.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#embedded\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.embedded = false;\r\n\r\n /**\r\n * Whether this StaticBody interacts with the world boundary.\r\n * Always false for a Static Body. (Static Bodies never collide with the world boundary.)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#collideWorldBounds\r\n * @type {boolean}\r\n * @readonly\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.collideWorldBounds = false;\r\n\r\n /**\r\n * Whether this StaticBody is checked for collisions and for which directions. You can set `checkCollision.none = false` to disable collision checks.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = { none: false, up: true, down: true, left: true, right: true };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with another body and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#touching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.touching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody was colliding with another body during the last step or any previous step, and in which direction.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#wasTouching\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.wasTouching = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * Whether this StaticBody has ever collided with a tile or the world boundary.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#blocked\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeBodyCollision}\r\n * @since 3.0.0\r\n */\r\n this.blocked = { none: true, up: false, down: false, left: false, right: false };\r\n\r\n /**\r\n * The StaticBody's physics type (static by default).\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#physicsType\r\n * @type {integer}\r\n * @default Phaser.Physics.Arcade.STATIC_BODY\r\n * @since 3.0.0\r\n */\r\n this.physicsType = CONST.STATIC_BODY;\r\n\r\n /**\r\n * The calculated change in the Body's horizontal position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dx\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dx = 0;\r\n\r\n /**\r\n * The calculated change in the Body's vertical position during the current step.\r\n * For a static body this is always zero.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#_dy\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.10.0\r\n */\r\n this._dy = 0;\r\n },\r\n\r\n /**\r\n * Changes the Game Object this Body is bound to.\r\n * First it removes its reference from the old Game Object, then sets the new one.\r\n * You can optionally update the position and dimensions of this Body to reflect that of the new Game Object.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setGameObject\r\n * @since 3.1.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The new Game Object that will own this Body.\r\n * @param {boolean} [update=true] - Reposition and resize this Body to match the new Game Object?\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n *\r\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n */\r\n setGameObject: function (gameObject, update)\r\n {\r\n if (gameObject && gameObject !== this.gameObject)\r\n {\r\n // Remove this body from the old game object\r\n this.gameObject.body = null;\r\n\r\n gameObject.body = this;\r\n\r\n // Update our reference\r\n this.gameObject = gameObject;\r\n }\r\n\r\n if (update)\r\n {\r\n this.updateFromGameObject();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates this Static Body so that its position and dimensions are updated\r\n * based on the current Game Object it is bound to.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject\r\n * @since 3.1.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n updateFromGameObject: function ()\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n var gameObject = this.gameObject;\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.width = gameObject.displayWidth;\r\n this.height = gameObject.displayHeight;\r\n\r\n this.halfWidth = Math.abs(this.width / 2);\r\n this.halfHeight = Math.abs(this.height / 2);\r\n\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the offset of the body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setOffset\r\n * @since 3.4.0\r\n *\r\n * @param {number} x - The horizontal offset of the Body from the Game Object's center.\r\n * @param {number} y - The vertical offset of the Body from the Game Object's center.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setOffset: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(x, y);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the body.\r\n * Resets the width and height to match current frame, if no width and height provided and a frame is found.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width.\r\n * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height.\r\n * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setSize: function (width, height, center)\r\n {\r\n if (center === undefined) { center = true; }\r\n\r\n var gameObject = this.gameObject;\r\n\r\n if (!width && gameObject.frame)\r\n {\r\n width = gameObject.frame.realWidth;\r\n }\r\n\r\n if (!height && gameObject.frame)\r\n {\r\n height = gameObject.frame.realHeight;\r\n }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width / 2);\r\n this.halfHeight = Math.floor(height / 2);\r\n\r\n if (center && gameObject.getCenter)\r\n {\r\n var ox = gameObject.displayWidth / 2;\r\n var oy = gameObject.displayHeight / 2;\r\n\r\n this.position.x -= this.offset.x;\r\n this.position.y -= this.offset.y;\r\n\r\n this.offset.set(ox - this.halfWidth, oy - this.halfHeight);\r\n\r\n this.position.x += this.offset.x;\r\n this.position.y += this.offset.y;\r\n }\r\n\r\n this.updateCenter();\r\n\r\n this.isCircle = false;\r\n this.radius = 0;\r\n\r\n this.world.staticTree.insert(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets this Static Body to have a circular body and sets its sizes and position.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the StaticBody, in pixels.\r\n * @param {number} [offsetX] - The horizontal offset of the StaticBody from its Game Object, in pixels.\r\n * @param {number} [offsetY] - The vertical offset of the StaticBody from its Game Object, in pixels.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setCircle: function (radius, offsetX, offsetY)\r\n {\r\n if (offsetX === undefined) { offsetX = this.offset.x; }\r\n if (offsetY === undefined) { offsetY = this.offset.y; }\r\n\r\n if (radius > 0)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.isCircle = true;\r\n\r\n this.radius = radius;\r\n\r\n this.width = radius * 2;\r\n this.height = radius * 2;\r\n\r\n this.halfWidth = Math.floor(this.width / 2);\r\n this.halfHeight = Math.floor(this.height / 2);\r\n\r\n this.offset.set(offsetX, offsetY);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n else\r\n {\r\n this.isCircle = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the StaticBody's `center` from its `position` and dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#updateCenter\r\n * @since 3.0.0\r\n */\r\n updateCenter: function ()\r\n {\r\n this.center.set(this.position.x + this.halfWidth, this.position.y + this.halfHeight);\r\n },\r\n\r\n /**\r\n * Resets this Body to the given coordinates. Also positions its parent Game Object to the same coordinates.\r\n * Similar to `updateFromGameObject`, but doesn't modify the Body's dimensions.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n * @param {number} [y] - The y coordinate to reset the body to. If not given will use the parent Game Object's coordinate.\r\n */\r\n reset: function (x, y)\r\n {\r\n var gameObject = this.gameObject;\r\n\r\n if (x === undefined) { x = gameObject.x; }\r\n if (y === undefined) { y = gameObject.y; }\r\n\r\n this.world.staticTree.remove(this);\r\n\r\n gameObject.setPosition(x, y);\r\n\r\n gameObject.getTopLeft(this.position);\r\n\r\n this.updateCenter();\r\n\r\n this.world.staticTree.insert(this);\r\n },\r\n\r\n /**\r\n * NOOP function. A Static Body cannot be stopped.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#stop\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n stop: function ()\r\n {\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the x and y coordinates of the top left and bottom right points of the StaticBody.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} obj - The object which will hold the coordinates of the bounds.\r\n *\r\n * @return {Phaser.Types.Physics.Arcade.ArcadeBodyBounds} The same object that was passed with `x`, `y`, `right` and `bottom` values matching the respective values of the StaticBody.\r\n */\r\n getBounds: function (obj)\r\n {\r\n obj.x = this.x;\r\n obj.y = this.y;\r\n obj.right = this.right;\r\n obj.bottom = this.bottom;\r\n\r\n return obj;\r\n },\r\n\r\n /**\r\n * Checks to see if a given x,y coordinate is colliding with this Static Body.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#hitTest\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to check against this body.\r\n * @param {number} y - The y coordinate to check against this body.\r\n *\r\n * @return {boolean} `true` if the given coordinate lies within this body, otherwise `false`.\r\n */\r\n hitTest: function (x, y)\r\n {\r\n return (this.isCircle) ? CircleContains(this, x, y) : RectangleContains(this, x, y);\r\n },\r\n\r\n /**\r\n * NOOP\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#postUpdate\r\n * @since 3.12.0\r\n */\r\n postUpdate: function ()\r\n {\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsX\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The absolute (non-negative) change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaAbsY\r\n * @since 3.0.0\r\n *\r\n * @return {number} Always zero for a Static Body.\r\n */\r\n deltaAbsY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's horizontal position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaX\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaX: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's vertical position from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaY\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's velocity from the previous step. Always zero.\r\n */\r\n deltaY: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * The change in this StaticBody's rotation from the previous step. Always zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#deltaZ\r\n * @since 3.0.0\r\n *\r\n * @return {number} The change in this StaticBody's rotation from the previous step. Always zero.\r\n */\r\n deltaZ: function ()\r\n {\r\n return 0;\r\n },\r\n\r\n /**\r\n * Disables this Body and marks it for destruction during the next step.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.enable = false;\r\n\r\n this.world.pendingDestroy.set(this);\r\n },\r\n\r\n /**\r\n * Draws a graphical representation of the StaticBody for visual debugging purposes.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - The Graphics object to use for the debug drawing of the StaticBody.\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.position;\r\n\r\n var x = pos.x + this.halfWidth;\r\n var y = pos.y + this.halfHeight;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(graphic.defaultStrokeWidth, this.debugBodyColor, 1);\r\n\r\n if (this.isCircle)\r\n {\r\n graphic.strokeCircle(x, y, this.width / 2);\r\n }\r\n else\r\n {\r\n graphic.strokeRect(pos.x, pos.y, this.width, this.height);\r\n }\r\n\r\n }\r\n },\r\n\r\n /**\r\n * Indicates whether the StaticBody is going to be showing a debug visualization during postUpdate.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether or not the StaticBody is going to show the debug visualization during postUpdate.\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return this.debugShowBody;\r\n },\r\n\r\n /**\r\n * Sets the Mass of the StaticBody. Will set the Mass to 0.1 if the value passed is less than or equal to zero.\r\n *\r\n * @method Phaser.Physics.Arcade.StaticBody#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to set the Mass to. Values of zero or less are changed to 0.1.\r\n *\r\n * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object.\r\n */\r\n setMass: function (value)\r\n {\r\n if (value <= 0)\r\n {\r\n // Causes havoc otherwise\r\n value = 0.1;\r\n }\r\n\r\n this.mass = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The x coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.x = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y coordinate of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.world.staticTree.remove(this);\r\n\r\n this.position.y = value;\r\n\r\n this.world.staticTree.insert(this);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Returns the left-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#left\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n left: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The right-most x coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#right\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n right: {\r\n\r\n get: function ()\r\n {\r\n return this.position.x + this.width;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The highest y coordinate of the area of the StaticBody.\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#top\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n top: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The lowest y coordinate of the area of the StaticBody. (y + height)\r\n *\r\n * @name Phaser.Physics.Arcade.StaticBody#bottom\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n bottom: {\r\n\r\n get: function ()\r\n {\r\n return this.position.y + this.height;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticBody.js?")},"./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ArcadeSprite = __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js");\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\nvar Group = __webpack_require__(/*! ../../gameobjects/group/Group */ "./node_modules/phaser/src/gameobjects/group/Group.js");\nvar IsPlainObject = __webpack_require__(/*! ../../utils/object/IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js");\n\n/**\n * @classdesc\n * An Arcade Physics Static Group object.\n *\n * All Game Objects created by this Group will automatically be given static Arcade Physics bodies.\n *\n * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}.\n *\n * @class StaticGroup\n * @extends Phaser.GameObjects.Group\n * @memberof Phaser.Physics.Arcade\n * @constructor\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.World} world - The physics simulation.\n * @param {Phaser.Scene} scene - The scene this group belongs to.\n * @param {(Phaser.GameObjects.GameObject[]|Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig)} [children] - Game Objects to add to this group; or the `config` argument.\n * @param {Phaser.Types.GameObjects.Group.GroupConfig|Phaser.Types.GameObjects.Group.GroupCreateConfig} [config] - Settings for this group.\n */\nvar StaticPhysicsGroup = new Class({\n\n Extends: Group,\n\n initialize:\n\n function StaticPhysicsGroup (world, scene, children, config)\n {\n if (!children && !config)\n {\n config = {\n createCallback: this.createCallbackHandler,\n removeCallback: this.removeCallbackHandler,\n createMultipleCallback: this.createMultipleCallbackHandler,\n classType: ArcadeSprite\n };\n }\n else if (IsPlainObject(children))\n {\n // children is a plain object, so swizzle them:\n config = children;\n children = null;\n\n config.createCallback = this.createCallbackHandler;\n config.removeCallback = this.removeCallbackHandler;\n config.createMultipleCallback = this.createMultipleCallbackHandler;\n config.classType = GetFastValue(config, \'classType\', ArcadeSprite);\n }\n else if (Array.isArray(children) && IsPlainObject(children[0]))\n {\n // children is an array of plain objects\n config = children;\n children = null;\n\n config.forEach(function (singleConfig)\n {\n singleConfig.createCallback = this.createCallbackHandler;\n singleConfig.removeCallback = this.removeCallbackHandler;\n singleConfig.createMultipleCallback = this.createMultipleCallbackHandler;\n singleConfig.classType = GetFastValue(singleConfig, \'classType\', ArcadeSprite);\n });\n }\n\n /**\n * The physics simulation.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#world\n * @type {Phaser.Physics.Arcade.World}\n * @since 3.0.0\n */\n this.world = world;\n\n /**\n * The scene this group belongs to.\n *\n * @name Phaser.Physics.Arcade.StaticGroup#physicsType\n * @type {integer}\n * @default Phaser.Physics.Arcade.STATIC_BODY\n * @since 3.0.0\n */\n this.physicsType = CONST.STATIC_BODY;\n\n Group.call(this, scene, children, config);\n },\n\n /**\n * Adds a static physics body to the new group member (if it lacks one) and adds it to the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The new group member.\n *\n * @see Phaser.Physics.Arcade.World#enableBody\n */\n createCallbackHandler: function (child)\n {\n if (!child.body)\n {\n this.world.enableBody(child, CONST.STATIC_BODY);\n }\n },\n\n /**\n * Disables the group member\'s physics body, removing it from the simulation.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#removeCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject} child - The group member being removed.\n *\n * @see Phaser.Physics.Arcade.World#disableBody\n */\n removeCallbackHandler: function (child)\n {\n if (child.body)\n {\n this.world.disableBody(child);\n }\n },\n\n /**\n * Refreshes the group.\n *\n * @method Phaser.Physics.Arcade.StaticGroup#createMultipleCallbackHandler\n * @since 3.0.0\n *\n * @param {Phaser.GameObjects.GameObject[]} entries - The newly created group members.\n *\n * @see Phaser.Physics.Arcade.StaticGroup#refresh\n */\n createMultipleCallbackHandler: function ()\n {\n this.refresh();\n },\n\n /**\n * Resets each Body to the position of its parent Game Object.\n * Body sizes aren\'t changed (use {@link Phaser.Physics.Arcade.Components.Enable#refreshBody} for that).\n *\n * @method Phaser.Physics.Arcade.StaticGroup#refresh\n * @since 3.0.0\n *\n * @return {Phaser.Physics.Arcade.StaticGroup} This group.\n *\n * @see Phaser.Physics.Arcade.StaticBody#reset\n */\n refresh: function ()\n {\n var children = this.children.entries;\n\n for (var i = 0; i < children.length; i++)\n {\n children[i].body.reset();\n }\n\n return this;\n }\n\n});\n\nmodule.exports = StaticPhysicsGroup;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js?')},"./node_modules/phaser/src/physics/arcade/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/arcade/Body.js\");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Collider = __webpack_require__(/*! ./Collider */ \"./node_modules/phaser/src/physics/arcade/Collider.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/physics/arcade/const.js\");\r\nvar DistanceBetween = __webpack_require__(/*! ../../math/distance/DistanceBetween */ \"./node_modules/phaser/src/math/distance/DistanceBetween.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/arcade/events/index.js\");\r\nvar FuzzyEqual = __webpack_require__(/*! ../../math/fuzzy/Equal */ \"./node_modules/phaser/src/math/fuzzy/Equal.js\");\r\nvar FuzzyGreaterThan = __webpack_require__(/*! ../../math/fuzzy/GreaterThan */ \"./node_modules/phaser/src/math/fuzzy/GreaterThan.js\");\r\nvar FuzzyLessThan = __webpack_require__(/*! ../../math/fuzzy/LessThan */ \"./node_modules/phaser/src/math/fuzzy/LessThan.js\");\r\nvar GetOverlapX = __webpack_require__(/*! ./GetOverlapX */ \"./node_modules/phaser/src/physics/arcade/GetOverlapX.js\");\r\nvar GetOverlapY = __webpack_require__(/*! ./GetOverlapY */ \"./node_modules/phaser/src/physics/arcade/GetOverlapY.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar ProcessQueue = __webpack_require__(/*! ../../structs/ProcessQueue */ \"./node_modules/phaser/src/structs/ProcessQueue.js\");\r\nvar ProcessTileCallbacks = __webpack_require__(/*! ./tilemap/ProcessTileCallbacks */ \"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js\");\r\nvar Rectangle = __webpack_require__(/*! ../../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar RTree = __webpack_require__(/*! ../../structs/RTree */ \"./node_modules/phaser/src/structs/RTree.js\");\r\nvar SeparateTile = __webpack_require__(/*! ./tilemap/SeparateTile */ \"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/arcade/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/arcade/SeparateY.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar StaticBody = __webpack_require__(/*! ./StaticBody */ \"./node_modules/phaser/src/physics/arcade/StaticBody.js\");\r\nvar TileIntersectsBody = __webpack_require__(/*! ./tilemap/TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\nvar Wrap = __webpack_require__(/*! ../../math/Wrap */ \"./node_modules/phaser/src/math/Wrap.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Arcade Physics World.\r\n *\r\n * The World is responsible for creating, managing, colliding and updating all of the bodies within it.\r\n *\r\n * An instance of the World belongs to a Phaser.Scene and is accessed via the property `physics.world`.\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Arcade\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this World instance belongs.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeWorldConfig} config - An Arcade Physics Configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene this simulation belongs to.\r\n *\r\n * @name Phaser.Physics.Arcade.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * Dynamic Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * Static Bodies in this simulation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticBodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.staticBodies = new Set();\r\n\r\n /**\r\n * Static Bodies marked for deletion.\r\n *\r\n * @name Phaser.Physics.Arcade.World#pendingDestroy\r\n * @type {Phaser.Structs.Set.<(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)>}\r\n * @since 3.1.0\r\n */\r\n this.pendingDestroy = new Set();\r\n\r\n /**\r\n * This simulation's collision processors.\r\n *\r\n * @name Phaser.Physics.Arcade.World#colliders\r\n * @type {Phaser.Structs.ProcessQueue.}\r\n * @since 3.0.0\r\n */\r\n this.colliders = new ProcessQueue();\r\n\r\n /**\r\n * Acceleration of Bodies due to gravity, in pixels per second.\r\n *\r\n * @name Phaser.Physics.Arcade.World#gravity\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.gravity = new Vector2(GetValue(config, 'gravity.x', 0), GetValue(config, 'gravity.y', 0));\r\n\r\n /**\r\n * A boundary constraining Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#bounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.0.0\r\n */\r\n this.bounds = new Rectangle(\r\n GetValue(config, 'x', 0),\r\n GetValue(config, 'y', 0),\r\n GetValue(config, 'width', scene.sys.scale.width),\r\n GetValue(config, 'height', scene.sys.scale.height)\r\n );\r\n\r\n /**\r\n * The boundary edges that Bodies can collide with.\r\n *\r\n * @name Phaser.Physics.Arcade.World#checkCollision\r\n * @type {Phaser.Types.Physics.Arcade.CheckCollisionObject}\r\n * @since 3.0.0\r\n */\r\n this.checkCollision = {\r\n up: GetValue(config, 'checkCollision.up', true),\r\n down: GetValue(config, 'checkCollision.down', true),\r\n left: GetValue(config, 'checkCollision.left', true),\r\n right: GetValue(config, 'checkCollision.right', true)\r\n };\r\n\r\n /**\r\n * The number of physics steps to be taken per second.\r\n *\r\n * This property is read-only. Use the `setFPS` method to modify it at run-time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#fps\r\n * @readonly\r\n * @type {number}\r\n * @default 60\r\n * @since 3.10.0\r\n */\r\n this.fps = GetValue(config, 'fps', 60);\r\n\r\n /**\r\n * The amount of elapsed ms since the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_elapsed\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Internal frame time value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTime\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTime = 1 / this.fps;\r\n\r\n /**\r\n * Internal frame time ms value.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_frameTimeMS\r\n * @private\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n /**\r\n * The number of steps that took place in the last frame.\r\n *\r\n * @name Phaser.Physics.Arcade.World#stepsLastFrame\r\n * @readonly\r\n * @type {number}\r\n * @since 3.10.0\r\n */\r\n this.stepsLastFrame = 0;\r\n\r\n /**\r\n * Scaling factor applied to the frame rate.\r\n *\r\n * - 1.0 = normal speed\r\n * - 2.0 = half speed\r\n * - 0.5 = double speed\r\n *\r\n * @name Phaser.Physics.Arcade.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.10.0\r\n */\r\n this.timeScale = GetValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * The maximum absolute difference of a Body's per-step velocity and its overlap with another Body that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n *\r\n * @name Phaser.Physics.Arcade.World#OVERLAP_BIAS\r\n * @type {number}\r\n * @default 4\r\n * @since 3.0.0\r\n */\r\n this.OVERLAP_BIAS = GetValue(config, 'overlapBias', 4);\r\n\r\n /**\r\n * The maximum absolute value of a Body's overlap with a tile that will result in separation on *each axis*.\r\n * Larger values favor separation.\r\n * Smaller values favor no separation.\r\n * The optimum value may be similar to the tile size.\r\n *\r\n * @name Phaser.Physics.Arcade.World#TILE_BIAS\r\n * @type {number}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.TILE_BIAS = GetValue(config, 'tileBias', 16);\r\n\r\n /**\r\n * Always separate overlapping Bodies horizontally before vertically.\r\n * False (the default) means Bodies are first separated on the axis of greater gravity, or the vertical axis if neither is greater.\r\n *\r\n * @name Phaser.Physics.Arcade.World#forceX\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.forceX = GetValue(config, 'forceX', false);\r\n\r\n /**\r\n * Whether the simulation advances with the game loop.\r\n *\r\n * @name Phaser.Physics.Arcade.World#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.isPaused = GetValue(config, 'isPaused', false);\r\n\r\n /**\r\n * Temporary total of colliding Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_total\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._total = 0;\r\n\r\n /**\r\n * Enables the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * The graphics object drawing the debug display.\r\n *\r\n * @name Phaser.Physics.Arcade.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * Default debug display settings for new Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#defaults\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetValue(config, 'debugBodyColor', 0xff00ff),\r\n staticBodyDebugColor: GetValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetValue(config, 'debugVelocityColor', 0x00ff00)\r\n };\r\n\r\n /**\r\n * The maximum number of items per node on the RTree.\r\n *\r\n * This is ignored if `useTree` is `false`. If you have a large number of bodies in\r\n * your world then you may find search performance improves by increasing this value,\r\n * to allow more items per node and less node division.\r\n *\r\n * @name Phaser.Physics.Arcade.World#maxEntries\r\n * @type {integer}\r\n * @default 16\r\n * @since 3.0.0\r\n */\r\n this.maxEntries = GetValue(config, 'maxEntries', 16);\r\n\r\n /**\r\n * Should this Arcade Physics World use an RTree for Dynamic and Static Physics bodies?\r\n *\r\n * An RTree is a fast way of spatially sorting of all the bodies in the world.\r\n * However, at certain limits, the cost of clearing and inserting the bodies into the\r\n * tree every frame becomes more expensive than the search speed gains it provides.\r\n *\r\n * If you have a large number of dynamic bodies in your world then it may be best to\r\n * disable the use of the RTree by setting this property to `false` in the physics config.\r\n * \r\n * The number it can cope with depends on browser and device, but a conservative estimate\r\n * of around 5,000 bodies should be considered the max before disabling it.\r\n *\r\n * This only applies to dynamic bodies. Static bodies are always kept in an RTree,\r\n * because they don't have to be cleared every frame, so you benefit from the\r\n * massive search speeds all the time.\r\n *\r\n * @name Phaser.Physics.Arcade.World#useTree\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.10.0\r\n */\r\n this.useTree = GetValue(config, 'useTree', true);\r\n\r\n /**\r\n * The spatial index of Dynamic Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#tree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.tree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * The spatial index of Static Bodies.\r\n *\r\n * @name Phaser.Physics.Arcade.World#staticTree\r\n * @type {Phaser.Structs.RTree}\r\n * @since 3.0.0\r\n */\r\n this.staticTree = new RTree(this.maxEntries);\r\n\r\n /**\r\n * Recycled input for tree searches.\r\n *\r\n * @name Phaser.Physics.Arcade.World#treeMinMax\r\n * @type {Phaser.Types.Physics.Arcade.ArcadeWorldTreeMinMax}\r\n * @since 3.0.0\r\n */\r\n this.treeMinMax = { minX: 0, minY: 0, maxX: 0, maxY: 0 };\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix used by bodies for calculations without them needing their own local copy.\r\n *\r\n * @name Phaser.Physics.Arcade.World#_tempMatrix2\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Adds an Arcade Physics Body to a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `enableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * You can specify if the bodies are to be Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to create the bodies.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n */\r\n enable: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.enable(child, bodyType);\r\n }\r\n else\r\n {\r\n this.enableBody(child, bodyType);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.enableBody(entry, bodyType);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Creates an Arcade Physics Body on a single Game Object.\r\n *\r\n * If the Game Object already has a body, this method will simply add it back into the simulation.\r\n *\r\n * You can specify if the body is Dynamic or Static. A dynamic body can move via velocity and\r\n * acceleration. A static body remains fixed in place and as such is able to use an optimized search\r\n * tree, making it ideal for static elements such as level objects. You can still collide and overlap\r\n * with static bodies.\r\n *\r\n * Normally, rather than calling this method directly, you'd use the helper methods available in the\r\n * Arcade Physics Factory, such as:\r\n *\r\n * ```javascript\r\n * this.physics.add.image(x, y, textureKey);\r\n * this.physics.add.sprite(x, y, textureKey);\r\n * ```\r\n *\r\n * Calling factory methods encapsulates the creation of a Game Object and the creation of its\r\n * body at the same time. If you are creating custom classes then you can pass them to this\r\n * method to have their bodies created.\r\n *\r\n * @method Phaser.Physics.Arcade.World#enableBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} object - The Game Object on which to create the body.\r\n * @param {integer} [bodyType] - The type of Body to create. Either `DYNAMIC_BODY` or `STATIC_BODY`.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object on which the body was created.\r\n */\r\n enableBody: function (object, bodyType)\r\n {\r\n if (bodyType === undefined) { bodyType = CONST.DYNAMIC_BODY; }\r\n\r\n if (!object.body)\r\n {\r\n if (bodyType === CONST.DYNAMIC_BODY)\r\n {\r\n object.body = new Body(this, object);\r\n }\r\n else if (bodyType === CONST.STATIC_BODY)\r\n {\r\n object.body = new StaticBody(this, object);\r\n }\r\n }\r\n\r\n this.add(object.body);\r\n\r\n return object;\r\n },\r\n\r\n /**\r\n * Adds an existing Arcade Physics Body or StaticBody to the simulation.\r\n *\r\n * The body is enabled and added to the local search trees.\r\n *\r\n * @method Phaser.Physics.Arcade.World#add\r\n * @since 3.10.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be added to the simulation.\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} The Body that was added to the simulation.\r\n */\r\n add: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.bodies.set(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.set(body);\r\n\r\n this.staticTree.insert(body);\r\n }\r\n\r\n body.enable = true;\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Disables the Arcade Physics Body of a Game Object, an array of Game Objects, or the children of a Group.\r\n *\r\n * The difference between this and the `disableBody` method is that you can pass arrays or Groups\r\n * to this method.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disable\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group|Phaser.GameObjects.Group[])} object - The object, or objects, on which to disable the bodies.\r\n */\r\n disable: function (object)\r\n {\r\n if (!Array.isArray(object))\r\n {\r\n object = [ object ];\r\n }\r\n\r\n for (var i = 0; i < object.length; i++)\r\n {\r\n var entry = object[i];\r\n\r\n if (entry.isParent)\r\n {\r\n var children = entry.getChildren();\r\n\r\n for (var c = 0; c < children.length; c++)\r\n {\r\n var child = children[c];\r\n\r\n if (child.isParent)\r\n {\r\n // Handle Groups nested inside of Groups\r\n this.disable(child);\r\n }\r\n else\r\n {\r\n this.disableBody(child.body);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.disableBody(entry.body);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Disables an existing Arcade Physics Body or StaticBody and removes it from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enable` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `World.enable` or `World.add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#disableBody\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The Body to be disabled.\r\n */\r\n disableBody: function (body)\r\n {\r\n this.remove(body);\r\n\r\n body.enable = false;\r\n },\r\n\r\n /**\r\n * Removes an existing Arcade Physics Body or StaticBody from the simulation.\r\n *\r\n * The body is disabled and removed from the local search trees.\r\n *\r\n * The body itself is not deleted, it just has its `enabled` property set to false, which\r\n * means you can re-enable it again at any point by passing it to enable `enable` or `add`.\r\n *\r\n * @method Phaser.Physics.Arcade.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody)} body - The body to be removed from the simulation.\r\n */\r\n remove: function (body)\r\n {\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n this.tree.remove(body);\r\n this.bodies.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n this.staticBodies.delete(body);\r\n this.staticTree.remove(body);\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object that the world will use to render the debug display to.\r\n *\r\n * This is called automatically when the World is instantiated if the `debug` config property\r\n * was set to `true`. However, you can call it at any point should you need to display the\r\n * debug Graphic from a fixed point.\r\n *\r\n * You can control which objects are drawn to the Graphics object, and the colors they use,\r\n * by setting the debug properties in the physics config.\r\n *\r\n * You should not typically use this in a production game. Use it to aid during debugging.\r\n *\r\n * @method Phaser.Physics.Arcade.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object that was created for use by the World.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the position, size and properties of the World boundary.\r\n *\r\n * The World boundary is an invisible rectangle that defines the edges of the World.\r\n * If a Body is set to collide with the world bounds then it will automatically stop\r\n * when it reaches any of the edges. You can optionally set which edges of the boundary\r\n * should be checked against.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the boundary.\r\n * @param {number} y - The top-left y coordinate of the boundary.\r\n * @param {number} width - The width of the boundary.\r\n * @param {number} height - The height of the boundary.\r\n * @param {boolean} [checkLeft] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [checkRight] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [checkUp] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [checkDown] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, checkLeft, checkRight, checkUp, checkDown)\r\n {\r\n this.bounds.setTo(x, y, width, height);\r\n\r\n if (checkLeft !== undefined)\r\n {\r\n this.setBoundsCollision(checkLeft, checkRight, checkUp, checkDown);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Enables or disables collisions on each edge of the World boundary.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setBoundsCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [left=true] - Should bodies check against the left edge of the boundary?\r\n * @param {boolean} [right=true] - Should bodies check against the right edge of the boundary?\r\n * @param {boolean} [up=true] - Should bodies check against the top edge of the boundary?\r\n * @param {boolean} [down=true] - Should bodies check against the bottom edge of the boundary?\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n setBoundsCollision: function (left, right, up, down)\r\n {\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (up === undefined) { up = true; }\r\n if (down === undefined) { down = true; }\r\n\r\n this.checkCollision.left = left;\r\n this.checkCollision.right = right;\r\n this.checkCollision.up = up;\r\n this.checkCollision.down = down;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses the simulation.\r\n *\r\n * A paused simulation does not update any existing bodies, or run any Colliders.\r\n *\r\n * However, you can still enable and disable bodies within it, or manually run collide or overlap\r\n * checks.\r\n *\r\n * @method Phaser.Physics.Arcade.World#pause\r\n * @fires Phaser.Physics.Arcade.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.isPaused = true;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the simulation, if paused.\r\n *\r\n * @method Phaser.Physics.Arcade.World#resume\r\n * @fires Phaser.Physics.Arcade.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.isPaused = false;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a new Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform collision checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.collide` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addCollider\r\n * @since 3.0.0\r\n * @see Phaser.Physics.Arcade.World#collide\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addCollider: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, false, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Creates a new Overlap Collider object and adds it to the simulation.\r\n *\r\n * A Collider is a way to automatically perform overlap checks between two objects,\r\n * calling the collide and process callbacks if they occur.\r\n *\r\n * Colliders are run as part of the World update, after all of the Bodies have updated.\r\n *\r\n * By creating a Collider you don't need then call `World.overlap` in your `update` loop,\r\n * as it will be handled for you automatically.\r\n *\r\n * @method Phaser.Physics.Arcade.World#addOverlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for overlap.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object to check for overlap.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - The callback to invoke when the two objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The callback to invoke when the two objects overlap. Must return a boolean.\r\n * @param {*} [callbackContext] - The scope in which to call the callbacks.\r\n *\r\n * @return {Phaser.Physics.Arcade.Collider} The Collider that was created.\r\n */\r\n addOverlap: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n var collider = new Collider(this, true, object1, object2, collideCallback, processCallback, callbackContext);\r\n\r\n this.colliders.add(collider);\r\n\r\n return collider;\r\n },\r\n\r\n /**\r\n * Removes a Collider from the simulation so it is no longer processed.\r\n *\r\n * This method does not destroy the Collider. If you wish to add it back at a later stage you can call\r\n * `World.colliders.add(Collider)`.\r\n *\r\n * If you no longer need the Collider you can call the `Collider.destroy` method instead, which will\r\n * automatically clear all of its references and then remove it from the World. If you call destroy on\r\n * a Collider you _don't_ need to pass it to this method too.\r\n *\r\n * @method Phaser.Physics.Arcade.World#removeCollider\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Collider} collider - The Collider to remove from the simulation.\r\n *\r\n * @return {Phaser.Physics.Arcade.World} This World object.\r\n */\r\n removeCollider: function (collider)\r\n {\r\n this.colliders.remove(collider);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the frame rate to run the simulation at.\r\n *\r\n * The frame rate value is used to simulate a fixed update time step. This fixed\r\n * time step allows for a straightforward implementation of a deterministic game state.\r\n *\r\n * This frame rate is independent of the frequency at which the game is rendering. The\r\n * higher you set the fps, the more physics simulation steps will occur per game step.\r\n * Conversely, the lower you set it, the less will take place.\r\n *\r\n * You can optionally advance the simulation directly yourself by calling the `step` method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#setFPS\r\n * @since 3.10.0\r\n *\r\n * @param {integer} framerate - The frame rate to advance the simulation at.\r\n *\r\n * @return {this} This World object.\r\n */\r\n setFPS: function (framerate)\r\n {\r\n this.fps = framerate;\r\n this._frameTime = 1 / this.fps;\r\n this._frameTimeMS = 1000 * this._frameTime;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Advances the simulation based on the elapsed time and fps rate.\r\n *\r\n * This is called automatically by your Scene and does not need to be invoked directly.\r\n *\r\n * @method Phaser.Physics.Arcade.World#update\r\n * @protected\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time, in ms, elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.isPaused || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var fixedDelta = this._frameTime;\r\n var msPerFrame = this._frameTimeMS * this.timeScale;\r\n\r\n this._elapsed += delta;\r\n\r\n // Update all active bodies\r\n var body;\r\n var bodies = this.bodies.entries;\r\n\r\n // Will a step happen this frame?\r\n var willStep = (this._elapsed >= msPerFrame);\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.preUpdate(willStep, fixedDelta);\r\n }\r\n }\r\n\r\n // We know that a step will happen this frame, so let's bundle it all together to save branching and iteration costs\r\n if (willStep)\r\n {\r\n this._elapsed -= msPerFrame;\r\n this.stepsLastFrame = 1;\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n }\r\n\r\n // Process any additional steps this frame\r\n while (this._elapsed >= msPerFrame)\r\n {\r\n this._elapsed -= msPerFrame;\r\n\r\n this.step(fixedDelta);\r\n }\r\n },\r\n\r\n /**\r\n * Advances the simulation by a time increment.\r\n *\r\n * @method Phaser.Physics.Arcade.World#step\r\n * @fires Phaser.Physics.Arcade.Events#WORLD_STEP\r\n * @since 3.10.0\r\n *\r\n * @param {number} delta - The delta time amount, in seconds, by which to advance the simulation.\r\n */\r\n step: function (delta)\r\n {\r\n // Update all active bodies\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enable)\r\n {\r\n body.update(delta);\r\n }\r\n }\r\n\r\n // Optionally populate our dynamic collision tree\r\n if (this.useTree)\r\n {\r\n this.tree.clear();\r\n this.tree.load(bodies);\r\n }\r\n\r\n // Process any colliders\r\n var colliders = this.colliders.update();\r\n\r\n for (i = 0; i < colliders.length; i++)\r\n {\r\n var collider = colliders[i];\r\n\r\n if (collider.active)\r\n {\r\n collider.update();\r\n }\r\n }\r\n\r\n this.emit(Events.WORLD_STEP);\r\n\r\n this.stepsLastFrame++;\r\n },\r\n\r\n /**\r\n * Updates bodies, draws the debug display, and handles pending queue operations.\r\n *\r\n * @method Phaser.Physics.Arcade.World#postUpdate\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n\r\n var dynamic = this.bodies;\r\n var staticBodies = this.staticBodies;\r\n\r\n // We don't need to postUpdate if there wasn't a step this frame\r\n if (this.stepsLastFrame)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n \r\n if (body.enable)\r\n {\r\n body.postUpdate();\r\n }\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n\r\n bodies = staticBodies.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n\r\n var pending = this.pendingDestroy;\r\n\r\n if (pending.size > 0)\r\n {\r\n var dynamicTree = this.tree;\r\n var staticTree = this.staticTree;\r\n\r\n bodies = pending.entries;\r\n len = bodies.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.physicsType === CONST.DYNAMIC_BODY)\r\n {\r\n dynamicTree.remove(body);\r\n dynamic.delete(body);\r\n }\r\n else if (body.physicsType === CONST.STATIC_BODY)\r\n {\r\n staticTree.remove(body);\r\n staticBodies.delete(body);\r\n }\r\n\r\n body.world = undefined;\r\n body.gameObject = undefined;\r\n }\r\n\r\n pending.clear();\r\n }\r\n },\r\n\r\n /**\r\n * Calculates a Body's velocity and updates its position.\r\n *\r\n * @method Phaser.Physics.Arcade.World#updateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to be updated.\r\n * @param {number} delta - The delta value to be used in the motion calculations, in seconds.\r\n */\r\n updateMotion: function (body, delta)\r\n {\r\n if (body.allowRotation)\r\n {\r\n this.computeAngularVelocity(body, delta);\r\n }\r\n\r\n this.computeVelocity(body, delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's angular velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeAngularVelocity\r\n * @since 3.10.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeAngularVelocity: function (body, delta)\r\n {\r\n var velocity = body.angularVelocity;\r\n var acceleration = body.angularAcceleration;\r\n var drag = body.angularDrag;\r\n var max = body.maxAngular;\r\n\r\n if (acceleration)\r\n {\r\n velocity += acceleration * delta;\r\n }\r\n else if (body.allowDrag && drag)\r\n {\r\n drag *= delta;\r\n\r\n if (FuzzyGreaterThan(velocity - drag, 0, 0.1))\r\n {\r\n velocity -= drag;\r\n }\r\n else if (FuzzyLessThan(velocity + drag, 0, 0.1))\r\n {\r\n velocity += drag;\r\n }\r\n else\r\n {\r\n velocity = 0;\r\n }\r\n }\r\n\r\n velocity = Clamp(velocity, -max, max);\r\n\r\n var velocityDelta = velocity - body.angularVelocity;\r\n\r\n body.angularVelocity += velocityDelta;\r\n body.rotation += (body.angularVelocity * delta);\r\n },\r\n\r\n /**\r\n * Calculates a Body's per-axis velocity.\r\n *\r\n * @method Phaser.Physics.Arcade.World#computeVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body - The Body to compute the velocity for.\r\n * @param {number} delta - The delta value to be used in the calculation, in seconds.\r\n */\r\n computeVelocity: function (body, delta)\r\n {\r\n var velocityX = body.velocity.x;\r\n var accelerationX = body.acceleration.x;\r\n var dragX = body.drag.x;\r\n var maxX = body.maxVelocity.x;\r\n\r\n var velocityY = body.velocity.y;\r\n var accelerationY = body.acceleration.y;\r\n var dragY = body.drag.y;\r\n var maxY = body.maxVelocity.y;\r\n\r\n var speed = body.speed;\r\n var maxSpeed = body.maxSpeed;\r\n var allowDrag = body.allowDrag;\r\n var useDamping = body.useDamping;\r\n\r\n if (body.allowGravity)\r\n {\r\n velocityX += (this.gravity.x + body.gravity.x) * delta;\r\n velocityY += (this.gravity.y + body.gravity.y) * delta;\r\n }\r\n\r\n if (accelerationX)\r\n {\r\n velocityX += accelerationX * delta;\r\n }\r\n else if (allowDrag && dragX)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n\r\n velocityX *= dragX;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragX *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityX - dragX, 0, 0.01))\r\n {\r\n velocityX -= dragX;\r\n }\r\n else if (FuzzyLessThan(velocityX + dragX, 0, 0.01))\r\n {\r\n velocityX += dragX;\r\n }\r\n else\r\n {\r\n velocityX = 0;\r\n }\r\n }\r\n }\r\n\r\n if (accelerationY)\r\n {\r\n velocityY += accelerationY * delta;\r\n }\r\n else if (allowDrag && dragY)\r\n {\r\n if (useDamping)\r\n {\r\n // Damping based deceleration\r\n velocityY *= dragY;\r\n\r\n speed = Math.sqrt(velocityX * velocityX + velocityY * velocityY);\r\n\r\n if (FuzzyEqual(speed, 0, 0.001))\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n else\r\n {\r\n // Linear deceleration\r\n dragY *= delta;\r\n\r\n if (FuzzyGreaterThan(velocityY - dragY, 0, 0.01))\r\n {\r\n velocityY -= dragY;\r\n }\r\n else if (FuzzyLessThan(velocityY + dragY, 0, 0.01))\r\n {\r\n velocityY += dragY;\r\n }\r\n else\r\n {\r\n velocityY = 0;\r\n }\r\n }\r\n }\r\n\r\n velocityX = Clamp(velocityX, -maxX, maxX);\r\n velocityY = Clamp(velocityY, -maxY, maxY);\r\n\r\n body.velocity.set(velocityX, velocityY);\r\n\r\n if (maxSpeed > -1 && speed > maxSpeed)\r\n {\r\n body.velocity.normalize().scale(maxSpeed);\r\n speed = maxSpeed;\r\n }\r\n\r\n body.speed = speed;\r\n },\r\n\r\n /**\r\n * Separates two Bodies.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separate\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {ArcadePhysicsCallback} [processCallback] - The process callback.\r\n * @param {*} [callbackContext] - The context in which to invoke the callback.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separate: function (body1, body2, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (\r\n !body1.enable ||\r\n !body2.enable ||\r\n body1.checkCollision.none ||\r\n body2.checkCollision.none ||\r\n !this.intersects(body1, body2))\r\n {\r\n return false;\r\n }\r\n\r\n // They overlap. Is there a custom process callback? If it returns true then we can carry on, otherwise we should abort.\r\n if (processCallback && processCallback.call(callbackContext, body1.gameObject, body2.gameObject) === false)\r\n {\r\n return false;\r\n }\r\n\r\n // Circle vs. Circle quick bail out\r\n if (body1.isCircle && body2.isCircle)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n\r\n // We define the behavior of bodies in a collision circle and rectangle\r\n // If a collision occurs in the corner points of the rectangle, the body behave like circles\r\n\r\n // Either body1 or body2 is a circle\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var bodyRect = (body1.isCircle) ? body2 : body1;\r\n var bodyCircle = (body1.isCircle) ? body1 : body2;\r\n\r\n var rect = {\r\n x: bodyRect.x,\r\n y: bodyRect.y,\r\n right: bodyRect.right,\r\n bottom: bodyRect.bottom\r\n };\r\n\r\n var circle = bodyCircle.center;\r\n\r\n if (circle.y < rect.y || circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x || circle.x > rect.right)\r\n {\r\n return this.separateCircle(body1, body2, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n var resultX = false;\r\n var resultY = false;\r\n\r\n // Do we separate on x or y first?\r\n if (this.forceX || Math.abs(this.gravity.y + body1.gravity.y) < Math.abs(this.gravity.x + body1.gravity.x))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n else\r\n {\r\n resultY = SeparateY(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n\r\n // Are they still intersecting? Let's do the other axis then\r\n if (this.intersects(body1, body2))\r\n {\r\n resultX = SeparateX(body1, body2, overlapOnly, this.OVERLAP_BIAS);\r\n }\r\n }\r\n\r\n var result = (resultX || resultY);\r\n\r\n if (result)\r\n {\r\n if (overlapOnly)\r\n {\r\n if (body1.onOverlap || body2.onOverlap)\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n else if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n }\r\n\r\n return result;\r\n },\r\n\r\n /**\r\n * Separates two Bodies, when both are circular.\r\n *\r\n * @method Phaser.Physics.Arcade.World#separateCircle\r\n * @fires Phaser.Physics.Arcade.Events#COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first Body to be separated.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second Body to be separated.\r\n * @param {boolean} [overlapOnly] - If this a collide or overlap check?\r\n * @param {number} [bias] - A small value added to the calculations.\r\n *\r\n * @return {boolean} True if separation occurred, otherwise false.\r\n */\r\n separateCircle: function (body1, body2, overlapOnly, bias)\r\n {\r\n // Set the bounding box overlap values into the bodies themselves (hence we don't use the return values here)\r\n GetOverlapX(body1, body2, false, bias);\r\n GetOverlapY(body1, body2, false, bias);\r\n\r\n var overlap = 0;\r\n\r\n if (body1.isCircle !== body2.isCircle)\r\n {\r\n var rect = {\r\n x: (body2.isCircle) ? body1.position.x : body2.position.x,\r\n y: (body2.isCircle) ? body1.position.y : body2.position.y,\r\n right: (body2.isCircle) ? body1.right : body2.right,\r\n bottom: (body2.isCircle) ? body1.bottom : body2.bottom\r\n };\r\n\r\n var circle = {\r\n x: (body1.isCircle) ? body1.center.x : body2.center.x,\r\n y: (body1.isCircle) ? body1.center.y : body2.center.y,\r\n radius: (body1.isCircle) ? body1.halfWidth : body2.halfWidth\r\n };\r\n\r\n if (circle.y < rect.y)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.y) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.y) - circle.radius;\r\n }\r\n }\r\n else if (circle.y > rect.bottom)\r\n {\r\n if (circle.x < rect.x)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.x, rect.bottom) - circle.radius;\r\n }\r\n else if (circle.x > rect.right)\r\n {\r\n overlap = DistanceBetween(circle.x, circle.y, rect.right, rect.bottom) - circle.radius;\r\n }\r\n }\r\n\r\n overlap *= -1;\r\n }\r\n else\r\n {\r\n overlap = (body1.halfWidth + body2.halfWidth) - DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y);\r\n }\r\n\r\n // Can't separate two immovable bodies, or a body with its own custom separation logic\r\n if (overlapOnly || overlap === 0 || (body1.immovable && body2.immovable) || body1.customSeparateX || body2.customSeparateX)\r\n {\r\n if (overlap !== 0 && (body1.onOverlap || body2.onOverlap))\r\n {\r\n this.emit(Events.OVERLAP, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n // return true if there was some overlap, otherwise false\r\n return (overlap !== 0);\r\n }\r\n\r\n var dx = body1.position.x - body2.position.x;\r\n var dy = body1.position.y - body2.position.y;\r\n var d = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));\r\n var nx = ((body2.position.x - body1.position.x) / d) || 0;\r\n var ny = ((body2.position.y - body1.position.y) / d) || 0;\r\n var p = 2 * (body1.velocity.x * nx + body1.velocity.y * ny - body2.velocity.x * nx - body2.velocity.y * ny) / (body1.mass + body2.mass);\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.velocity.x = (body1.velocity.x - p * body1.mass * nx) * body1.bounce.x;\r\n body1.velocity.y = (body1.velocity.y - p * body1.mass * ny) * body1.bounce.y;\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.velocity.x = (body2.velocity.x + p * body2.mass * nx) * body2.bounce.x;\r\n body2.velocity.y = (body2.velocity.y + p * body2.mass * ny) * body2.bounce.y;\r\n }\r\n\r\n var dvx = body2.velocity.x - body1.velocity.x;\r\n var dvy = body2.velocity.y - body1.velocity.y;\r\n var angleCollision = Math.atan2(dvy, dvx);\r\n\r\n var delta = this._frameTime;\r\n\r\n if (!body1.immovable)\r\n {\r\n body1.x += (body1.velocity.x * delta) - overlap * Math.cos(angleCollision);\r\n body1.y += (body1.velocity.y * delta) - overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (!body2.immovable)\r\n {\r\n body2.x += (body2.velocity.x * delta) + overlap * Math.cos(angleCollision);\r\n body2.y += (body2.velocity.y * delta) + overlap * Math.sin(angleCollision);\r\n }\r\n\r\n if (body1.onCollide || body2.onCollide)\r\n {\r\n this.emit(Events.COLLIDE, body1.gameObject, body2.gameObject, body1, body2);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if two Bodies intersect at all.\r\n *\r\n * @method Phaser.Physics.Arcade.World#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} body1 - The first body to check.\r\n * @param {Phaser.Physics.Arcade.Body} body2 - The second body to check.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n intersects: function (body1, body2)\r\n {\r\n if (body1 === body2)\r\n {\r\n return false;\r\n }\r\n\r\n if (!body1.isCircle && !body2.isCircle)\r\n {\r\n // Rect vs. Rect\r\n return !(\r\n body1.right <= body2.position.x ||\r\n body1.bottom <= body2.position.y ||\r\n body1.position.x >= body2.right ||\r\n body1.position.y >= body2.bottom\r\n );\r\n }\r\n else if (body1.isCircle)\r\n {\r\n if (body2.isCircle)\r\n {\r\n // Circle vs. Circle\r\n return DistanceBetween(body1.center.x, body1.center.y, body2.center.x, body2.center.y) <= (body1.halfWidth + body2.halfWidth);\r\n }\r\n else\r\n {\r\n // Circle vs. Rect\r\n return this.circleBodyIntersects(body1, body2);\r\n }\r\n }\r\n else\r\n {\r\n // Rect vs. Circle\r\n return this.circleBodyIntersects(body2, body1);\r\n }\r\n },\r\n\r\n /**\r\n * Tests if a circular Body intersects with another Body.\r\n *\r\n * @method Phaser.Physics.Arcade.World#circleBodyIntersects\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Arcade.Body} circle - The circular body to test.\r\n * @param {Phaser.Physics.Arcade.Body} body - The rectangular body to test.\r\n *\r\n * @return {boolean} True if the two bodies intersect, otherwise false.\r\n */\r\n circleBodyIntersects: function (circle, body)\r\n {\r\n var x = Clamp(circle.center.x, body.left, body.right);\r\n var y = Clamp(circle.center.y, body.top, body.bottom);\r\n\r\n var dx = (circle.center.x - x) * (circle.center.x - x);\r\n var dy = (circle.center.y - y) * (circle.center.y - y);\r\n\r\n return (dx + dy) <= (circle.halfWidth * circle.halfWidth);\r\n },\r\n\r\n /**\r\n * Tests if Game Objects overlap.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlap\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [overlapCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`.\r\n * @param {*} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if at least one Game Object overlaps another.\r\n */\r\n overlap: function (object1, object2, overlapCallback, processCallback, callbackContext)\r\n {\r\n if (overlapCallback === undefined) { overlapCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = overlapCallback; }\r\n\r\n return this.collideObjects(object1, object2, overlapCallback, processCallback, callbackContext, true);\r\n },\r\n\r\n /**\r\n * Performs a collision check and separation between the two physics enabled objects given, which can be single\r\n * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups.\r\n *\r\n * If you don't require separation then use {@link #overlap} instead.\r\n *\r\n * If two Groups or arrays are passed, each member of one will be tested against each member of the other.\r\n *\r\n * If **only** one Group is passed (as `object1`), each member of the Group will be collided against the other members.\r\n * \r\n * If **only** one Array is passed, the array is iterated and every element in it is tested against the others.\r\n *\r\n * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding\r\n * objects are passed to it.\r\n *\r\n * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable\r\n * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other.\r\n * The separation that stops two objects penetrating may create a new penetration against a different object. If you\r\n * require a high level of stability please consider using an alternative physics system, such as Matter.js.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collide\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} `true` if any overlapping Game Objects were separated, otherwise `false`.\r\n */\r\n collide: function (object1, object2, collideCallback, processCallback, callbackContext)\r\n {\r\n if (collideCallback === undefined) { collideCallback = null; }\r\n if (processCallback === undefined) { processCallback = null; }\r\n if (callbackContext === undefined) { callbackContext = collideCallback; }\r\n\r\n return this.collideObjects(object1, object2, collideCallback, processCallback, callbackContext, false);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideObjects\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object to check for collision.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} [object2] - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideObjects: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var i;\r\n var j;\r\n\r\n if (object1.isParent && object1.physicsType === undefined)\r\n {\r\n object1 = object1.children.entries;\r\n }\r\n\r\n if (object2 && object2.isParent && object2.physicsType === undefined)\r\n {\r\n object2 = object2.children.entries;\r\n }\r\n\r\n var object1isArray = Array.isArray(object1);\r\n var object2isArray = Array.isArray(object2);\r\n\r\n this._total = 0;\r\n\r\n if (!object1isArray && !object2isArray)\r\n {\r\n // Neither of them are arrays - do this first as it's the most common use-case\r\n this.collideHandler(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (!object1isArray && object2isArray)\r\n {\r\n // Object 2 is an Array\r\n for (i = 0; i < object2.length; i++)\r\n {\r\n this.collideHandler(object1, object2[i], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n else if (object1isArray && !object2isArray)\r\n {\r\n // Object 1 is an Array\r\n if (!object2)\r\n {\r\n // Special case for array vs. self\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n var child = object1[i];\r\n\r\n for (j = i + 1; j < object1.length; j++)\r\n {\r\n if (i === j)\r\n {\r\n continue;\r\n }\r\n\r\n this.collideHandler(child, object1[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n this.collideHandler(object1[i], object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // They're both arrays\r\n for (i = 0; i < object1.length; i++)\r\n {\r\n for (j = 0; j < object2.length; j++)\r\n {\r\n this.collideHandler(object1[i], object2[j], collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n }\r\n\r\n return (this._total > 0);\r\n },\r\n\r\n /**\r\n * Internal helper function. Please use Phaser.Physics.Arcade.World#collide and Phaser.Physics.Arcade.World#overlap instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideHandler\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object1 - The first object or array of objects to check.\r\n * @param {Phaser.Types.Physics.Arcade.ArcadeColliderType} object2 - The second object or array of objects to check, or `undefined`.\r\n * @param {ArcadePhysicsCallback} collideCallback - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} callbackContext - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideHandler: function (object1, object2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n // Collide Group with Self\r\n // Only collide valid objects\r\n if (object2 === undefined && object1.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n\r\n // If neither of the objects are set then bail out\r\n if (!object1 || !object2)\r\n {\r\n return false;\r\n }\r\n\r\n // A Body\r\n if (object1.body)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsSprite(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideSpriteVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // GROUPS\r\n else if (object1.isParent)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsGroup(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsGroup(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isTilemap)\r\n {\r\n return this.collideGroupVsTilemapLayer(object1, object2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n\r\n // TILEMAP LAYERS\r\n else if (object1.isTilemap)\r\n {\r\n if (object2.body)\r\n {\r\n return this.collideSpriteVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n else if (object2.isParent)\r\n {\r\n return this.collideGroupVsTilemapLayer(object2, object1, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Sprite collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsSprite\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.GameObject} sprite2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsSprite: function (sprite1, sprite2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (!sprite1.body || !sprite2.body)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.separate(sprite1.body, sprite2.body, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite1, sprite2);\r\n }\r\n\r\n this._total++;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} collideCallback - The callback to invoke when the two objects collide.\r\n * @param {ArcadePhysicsCallback} processCallback - The callback to invoke when the two objects collide. Must return a boolean.\r\n * @param {any} callbackContext - The scope in which to call the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} `true` if the Sprite collided with the given Group, otherwise `false`.\r\n */\r\n collideSpriteVsGroup: function (sprite, group, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var bodyA = sprite.body;\r\n\r\n if (group.length === 0 || !bodyA || !bodyA.enable)\r\n {\r\n return;\r\n }\r\n\r\n // Does sprite collide with anything?\r\n\r\n var i;\r\n var len;\r\n var bodyB;\r\n\r\n if (this.useTree)\r\n {\r\n var minMax = this.treeMinMax;\r\n\r\n minMax.minX = bodyA.left;\r\n minMax.minY = bodyA.top;\r\n minMax.maxX = bodyA.right;\r\n minMax.maxY = bodyA.bottom;\r\n\r\n var results = (group.physicsType === CONST.DYNAMIC_BODY) ? this.tree.search(minMax) : this.staticTree.search(minMax);\r\n\r\n len = results.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = results[i];\r\n\r\n if (bodyA === bodyB || !group.contains(bodyB.gameObject))\r\n {\r\n // Skip if comparing against itself, or if bodyB isn't actually part of the Group\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n var children = group.getChildren();\r\n var skipIndex = group.children.entries.indexOf(sprite);\r\n\r\n len = children.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n bodyB = children[i].body;\r\n\r\n if (!bodyB || i === skipIndex || !bodyB.enable)\r\n {\r\n continue;\r\n }\r\n\r\n if (this.separate(bodyA, bodyB, processCallback, callbackContext, overlapOnly))\r\n {\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, bodyA.gameObject, bodyB.gameObject);\r\n }\r\n\r\n this._total++;\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Group vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsTilemapLayer\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsTilemapLayer: function (group, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var children = group.getChildren();\r\n\r\n if (children.length === 0)\r\n {\r\n return false;\r\n }\r\n\r\n var didCollide = false;\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n if (children[i].body)\r\n {\r\n if (this.collideSpriteVsTilemapLayer(children[i], tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly))\r\n {\r\n didCollide = true;\r\n }\r\n }\r\n }\r\n\r\n return didCollide;\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for collision between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `collide` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for collision with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic collisions\r\n * on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n * \r\n * Important: Use of this method skips the `interesting faces` system that Tilemap Layers use. This means if you have\r\n * say a row or column of tiles, and you jump into, or walk over them, it's possible to get stuck on the edges of the\r\n * tiles as the interesting face calculations are skipped. However, for quick-fire small collision set tests on\r\n * dynamic maps, this method can prove very useful.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, false, false);\r\n }\r\n },\r\n\r\n /**\r\n * This advanced method is specifically for testing for overlaps between a single Sprite and an array of Tile objects.\r\n * \r\n * You should generally use the `overlap` method instead, with a Sprite vs. a Tilemap Layer, as that will perform\r\n * tile filtering and culling for you, as well as handle the interesting face collision automatically.\r\n * \r\n * This method is offered for those who would like to check for overlaps with specific Tiles in a layer, without\r\n * having to set any collision attributes on the tiles in question. This allows you to perform quick dynamic overlap\r\n * tests on small sets of Tiles. As such, no culling or checks are made to the array of Tiles given to this method,\r\n * you should filter them before passing them to this method.\r\n *\r\n * @method Phaser.Physics.Arcade.World#overlapTiles\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of Tiles to check for collision against.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects overlap.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n overlapTiles: function (sprite, tiles, collideCallback, processCallback, callbackContext)\r\n {\r\n if (!sprite.body.enable || tiles.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, tiles, collideCallback, processCallback, callbackContext, true, false);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilemapLayer\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilemapLayer: function (sprite, tilemapLayer, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n var body = sprite.body;\r\n\r\n if (!body.enable)\r\n {\r\n return false;\r\n }\r\n\r\n var x = body.position.x;\r\n var y = body.position.y;\r\n var w = body.width;\r\n var h = body.height;\r\n\r\n // TODO: this logic should be encapsulated within the Tilemap API at some point.\r\n // If the maps base tile size differs from the layer's tile size, we need to adjust the\r\n // selection area by the difference between the two.\r\n var layerData = tilemapLayer.layer;\r\n\r\n if (layerData.tileWidth > layerData.baseTileWidth)\r\n {\r\n // The x origin of a tile is the left side, so x and width need to be adjusted.\r\n var xDiff = (layerData.tileWidth - layerData.baseTileWidth) * tilemapLayer.scaleX;\r\n x -= xDiff;\r\n w += xDiff;\r\n }\r\n\r\n if (layerData.tileHeight > layerData.baseTileHeight)\r\n {\r\n // The y origin of a tile is the bottom side, so just the height needs to be adjusted.\r\n var yDiff = (layerData.tileHeight - layerData.baseTileHeight) * tilemapLayer.scaleY;\r\n h += yDiff;\r\n }\r\n\r\n var mapData = tilemapLayer.getTilesWithinWorldXY(x, y, w, h);\r\n\r\n if (mapData.length === 0)\r\n {\r\n return false;\r\n }\r\n else\r\n {\r\n return this.collideSpriteVsTilesHandler(sprite, mapData, collideCallback, processCallback, callbackContext, overlapOnly, true);\r\n }\r\n },\r\n\r\n /**\r\n * Internal handler for Sprite vs. Tilemap collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideSpriteVsTilesHandler\r\n * @fires Phaser.Physics.Arcade.Events#TILE_COLLIDE\r\n * @fires Phaser.Physics.Arcade.Events#TILE_OVERLAP\r\n * @private\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The first object to check for collision.\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} [overlapOnly] - Whether this is a collision or overlap check.\r\n * @param {boolean} [isLayer] - Is this check coming from a TilemapLayer or an array of tiles?\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideSpriteVsTilesHandler: function (sprite, tiles, collideCallback, processCallback, callbackContext, overlapOnly, isLayer)\r\n {\r\n var body = sprite.body;\r\n\r\n var tile;\r\n var tileWorldRect = { left: 0, right: 0, top: 0, bottom: 0 };\r\n var tilemapLayer;\r\n var collision = false;\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tile = tiles[i];\r\n\r\n tilemapLayer = tile.tilemapLayer;\r\n\r\n tileWorldRect.left = tilemapLayer.tileToWorldX(tile.x);\r\n tileWorldRect.top = tilemapLayer.tileToWorldY(tile.y);\r\n\r\n // If the map's base tile size differs from the layer's tile size, only the top of the rect\r\n // needs to be adjusted since its origin is (0, 1).\r\n if (tile.baseHeight !== tile.height)\r\n {\r\n tileWorldRect.top -= (tile.height - tile.baseHeight) * tilemapLayer.scaleY;\r\n }\r\n\r\n tileWorldRect.right = tileWorldRect.left + tile.width * tilemapLayer.scaleX;\r\n tileWorldRect.bottom = tileWorldRect.top + tile.height * tilemapLayer.scaleY;\r\n\r\n if (TileIntersectsBody(tileWorldRect, body)\r\n && (!processCallback || processCallback.call(callbackContext, sprite, tile))\r\n && ProcessTileCallbacks(tile, sprite)\r\n && (overlapOnly || SeparateTile(i, body, tile, tileWorldRect, tilemapLayer, this.TILE_BIAS, isLayer)))\r\n {\r\n this._total++;\r\n\r\n collision = true;\r\n\r\n if (collideCallback)\r\n {\r\n collideCallback.call(callbackContext, sprite, tile);\r\n }\r\n\r\n if (overlapOnly && body.onOverlap)\r\n {\r\n this.emit(Events.TILE_OVERLAP, sprite, tile, body);\r\n }\r\n else if (body.onCollide)\r\n {\r\n this.emit(Events.TILE_COLLIDE, sprite, tile, body);\r\n }\r\n }\r\n }\r\n\r\n return collision;\r\n },\r\n\r\n /**\r\n * Internal helper for Group vs. Group collisions.\r\n * Please use Phaser.Physics.Arcade.World#collide instead.\r\n *\r\n * @method Phaser.Physics.Arcade.World#collideGroupVsGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Group} group1 - The first object to check for collision.\r\n * @param {Phaser.GameObjects.Group} group2 - The second object to check for collision.\r\n * @param {ArcadePhysicsCallback} [collideCallback] - An optional callback function that is called if the objects collide.\r\n * @param {ArcadePhysicsCallback} [processCallback] - An optional callback function that lets you perform additional checks against the two objects if they collide. If this is set then `collideCallback` will only be called if this callback returns `true`.\r\n * @param {any} [callbackContext] - The context in which to run the callbacks.\r\n * @param {boolean} overlapOnly - Whether this is a collision or overlap check.\r\n *\r\n * @return {boolean} True if any objects overlap (with `overlapOnly`); or true if any overlapping objects were separated.\r\n */\r\n collideGroupVsGroup: function (group1, group2, collideCallback, processCallback, callbackContext, overlapOnly)\r\n {\r\n if (group1.length === 0 || group2.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var children = group1.getChildren();\r\n\r\n for (var i = 0; i < children.length; i++)\r\n {\r\n this.collideSpriteVsGroup(children[i], group2, collideCallback, processCallback, callbackContext, overlapOnly);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates (or several objects' coordinates) within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * If the object is outside any boundary edge (left, top, right, bottom), it will be moved to the same offset from the opposite edge (the interior).\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrap\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Group, an object with `x` and `y` coordinates, or an array of such objects.\r\n * @param {number} [padding=0] - An amount added to each boundary edge during the operation.\r\n */\r\n wrap: function (object, padding)\r\n {\r\n if (object.body)\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n else if (object.getChildren)\r\n {\r\n this.wrapArray(object.getChildren(), padding);\r\n }\r\n else if (Array.isArray(object))\r\n {\r\n this.wrapArray(object, padding);\r\n }\r\n else\r\n {\r\n this.wrapObject(object, padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap each object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapArray\r\n * @since 3.3.0\r\n *\r\n * @param {Array.<*>} objects - An array of objects to be wrapped.\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapArray: function (objects, padding)\r\n {\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n this.wrapObject(objects[i], padding);\r\n }\r\n },\r\n\r\n /**\r\n * Wrap an object's coordinates within {@link Phaser.Physics.Arcade.World#bounds}.\r\n *\r\n * @method Phaser.Physics.Arcade.World#wrapObject\r\n * @since 3.3.0\r\n *\r\n * @param {*} object - A Game Object, a Physics Body, or any object with `x` and `y` coordinates\r\n * @param {number} [padding=0] - An amount added to the boundary.\r\n */\r\n wrapObject: function (object, padding)\r\n {\r\n if (padding === undefined) { padding = 0; }\r\n\r\n object.x = Wrap(object.x, this.bounds.left - padding, this.bounds.right + padding);\r\n object.y = Wrap(object.y, this.bounds.top - padding, this.bounds.bottom + padding);\r\n },\r\n\r\n /**\r\n * Shuts down the simulation, clearing physics data and removing listeners.\r\n *\r\n * @method Phaser.Physics.Arcade.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.tree.clear();\r\n this.staticTree.clear();\r\n this.bodies.clear();\r\n this.staticBodies.clear();\r\n this.colliders.destroy();\r\n\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * Shuts down the simulation and disconnects it from the current scene.\r\n *\r\n * @method Phaser.Physics.Arcade.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/World.js?")},"./node_modules/phaser/src/physics/arcade/components/Acceleration.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Acceleration\n * @since 3.0.0\n */\nvar Acceleration = {\n\n /**\n * Sets the body's horizontal and vertical acceleration. If the vertical acceleration value is not provided, the vertical acceleration is set to the same value as the horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAcceleration\n * @since 3.0.0\n *\n * @param {number} x - The horizontal acceleration\n * @param {number} [y=x] - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAcceleration: function (x, y)\n {\n this.body.acceleration.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationX\n * @since 3.0.0\n *\n * @param {number} value - The horizontal acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationX: function (value)\n {\n this.body.acceleration.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical acceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Acceleration#setAccelerationY\n * @since 3.0.0\n *\n * @param {number} value - The vertical acceleration\n *\n * @return {this} This Game Object.\n */\n setAccelerationY: function (value)\n {\n this.body.acceleration.y = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Acceleration;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Acceleration.js?")},"./node_modules/phaser/src/physics/arcade/components/Angular.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Angular\n * @since 3.0.0\n */\nvar Angular = {\n\n /**\n * Sets the angular velocity of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularVelocity\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular velocity.\n *\n * @return {this} This Game Object.\n */\n setAngularVelocity: function (value)\n {\n this.body.angularVelocity = value;\n\n return this;\n },\n\n /**\n * Sets the angular acceleration of the body.\n * \n * In Arcade Physics, bodies cannot rotate. They are always axis-aligned.\n * However, they can have angular motion, which is passed on to the Game Object bound to the body,\n * causing them to visually rotate, even though the body remains axis-aligned.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularAcceleration\n * @since 3.0.0\n *\n * @param {number} value - The amount of angular acceleration.\n *\n * @return {this} This Game Object.\n */\n setAngularAcceleration: function (value)\n {\n this.body.angularAcceleration = value;\n\n return this;\n },\n\n /**\n * Sets the angular drag of the body. Drag is applied to the current velocity, providing a form of deceleration.\n *\n * @method Phaser.Physics.Arcade.Components.Angular#setAngularDrag\n * @since 3.0.0\n *\n * @param {number} value - The amount of drag.\n *\n * @return {this} This Game Object.\n */\n setAngularDrag: function (value)\n {\n this.body.angularDrag = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Angular;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Angular.js?")},"./node_modules/phaser/src/physics/arcade/components/Bounce.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the bounce properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Bounce\n * @since 3.0.0\n */\nvar Bounce = {\n\n /**\n * Sets the bounce values of this body.\n * \n * Bounce is the amount of restitution, or elasticity, the body has when it collides with another object.\n * A value of 1 means that it will retain its full velocity after the rebound. A value of 0 means it will not rebound at all.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounce\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n * @param {number} [y=x] - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounce: function (x, y)\n {\n this.body.bounce.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceX: function (value)\n {\n this.body.bounce.x = value;\n\n return this;\n },\n\n /**\n * Sets the vertical bounce value for this body.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setBounceY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical bounce to apply on collision. A float, typically between 0 and 1.\n *\n * @return {this} This Game Object.\n */\n setBounceY: function (value)\n {\n this.body.bounce.y = value;\n\n return this;\n },\n\n /**\n * Sets whether this Body collides with the world boundary.\n * \n * Optionally also sets the World Bounce values. If the `Body.worldBounce` is null, it's set to a new Vec2 first.\n *\n * @method Phaser.Physics.Arcade.Components.Bounce#setCollideWorldBounds\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - `true` if this body should collide with the world bounds, otherwise `false`.\n * @param {number} [bounceX] - If given this will be replace the `worldBounce.x` value.\n * @param {number} [bounceY] - If given this will be replace the `worldBounce.y` value.\n *\n * @return {this} This Game Object.\n */\n setCollideWorldBounds: function (value, bounceX, bounceY)\n {\n this.body.setCollideWorldBounds(value, bounceX, bounceY);\n\n return this;\n }\n\n};\n\nmodule.exports = Bounce;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Bounce.js?")},"./node_modules/phaser/src/physics/arcade/components/Debug.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the debug properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Debug\n * @since 3.0.0\n */\nvar Debug = {\n\n /**\n * Sets the debug values of this body.\n * \n * Bodies will only draw their debug if debug has been enabled for Arcade Physics as a whole.\n * Note that there is a performance cost in drawing debug displays. It should never be used in production.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebug\n * @since 3.0.0\n *\n * @param {boolean} showBody - Set to `true` to have this body render its outline to the debug display.\n * @param {boolean} showVelocity - Set to `true` to have this body render a velocity marker to the debug display.\n * @param {number} bodyColor - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebug: function (showBody, showVelocity, bodyColor)\n {\n this.debugShowBody = showBody;\n this.debugShowVelocity = showVelocity;\n this.debugBodyColor = bodyColor;\n\n return this;\n },\n\n /**\n * Sets the color of the body outline when it renders to the debug display.\n *\n * @method Phaser.Physics.Arcade.Components.Debug#setDebugBodyColor\n * @since 3.0.0\n *\n * @param {number} value - The color of the body outline when rendered to the debug display.\n *\n * @return {this} This Game Object.\n */\n setDebugBodyColor: function (value)\n {\n this.body.debugBodyColor = value;\n\n return this;\n },\n\n /**\n * Set to `true` to have this body render its outline to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowBody\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowBody: {\n\n get: function ()\n {\n return this.body.debugShowBody;\n },\n\n set: function (value)\n {\n this.body.debugShowBody = value;\n }\n\n },\n\n /**\n * Set to `true` to have this body render a velocity marker to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugShowVelocity\n * @type {boolean}\n * @since 3.0.0\n */\n debugShowVelocity: {\n\n get: function ()\n {\n return this.body.debugShowVelocity;\n },\n\n set: function (value)\n {\n this.body.debugShowVelocity = value;\n }\n\n },\n\n /**\n * The color of the body outline when it renders to the debug display.\n *\n * @name Phaser.Physics.Arcade.Components.Debug#debugBodyColor\n * @type {number}\n * @since 3.0.0\n */\n debugBodyColor: {\n\n get: function ()\n {\n return this.body.debugBodyColor;\n },\n\n set: function (value)\n {\n this.body.debugBodyColor = value;\n }\n\n }\n\n};\n\nmodule.exports = Debug;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Debug.js?")},"./node_modules/phaser/src/physics/arcade/components/Drag.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the drag properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Drag\n * @since 3.0.0\n */\nvar Drag = {\n\n /**\n * Sets the body's horizontal and vertical drag. If the vertical drag value is not provided, the vertical drag is set to the same value as the horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDrag\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal drag to apply.\n * @param {number} [y=x] - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDrag: function (x, y)\n {\n this.body.drag.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the body's horizontal drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragX\n * @since 3.0.0\n *\n * @param {number} value - The amount of horizontal drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragX: function (value)\n {\n this.body.drag.x = value;\n\n return this;\n },\n\n /**\n * Sets the body's vertical drag.\n *\n * Drag can be considered as a form of deceleration that will return the velocity of a body back to zero over time.\n * It is the absolute loss of velocity due to movement, in pixels per second squared.\n * The x and y components are applied separately.\n *\n * When `useDamping` is true, this is 1 minus the damping factor.\n * A value of 1 means the Body loses no velocity.\n * A value of 0.95 means the Body loses 5% of its velocity per step.\n * A value of 0.5 means the Body loses 50% of its velocity per step.\n *\n * Drag is applied only when `acceleration` is zero.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDragY\n * @since 3.0.0\n *\n * @param {number} value - The amount of vertical drag to apply.\n *\n * @return {this} This Game Object.\n */\n setDragY: function (value)\n {\n this.body.drag.y = value;\n\n return this;\n },\n\n /**\n * If this Body is using `drag` for deceleration this function controls how the drag is applied.\n * If set to `true` drag will use a damping effect rather than a linear approach. If you are\n * creating a game where the Body moves freely at any angle (i.e. like the way the ship moves in\n * the game Asteroids) then you will get a far smoother and more visually correct deceleration\n * by using damping, avoiding the axis-drift that is prone with linear deceleration.\n *\n * If you enable this property then you should use far smaller `drag` values than with linear, as\n * they are used as a multiplier on the velocity. Values such as 0.95 will give a nice slow\n * deceleration, where-as smaller values, such as 0.5 will stop an object almost immediately.\n *\n * @method Phaser.Physics.Arcade.Components.Drag#setDamping\n * @since 3.10.0\n *\n * @param {boolean} value - `true` to use damping for deceleration, or `false` to use linear deceleration.\n *\n * @return {this} This Game Object.\n */\n setDamping: function (value)\n {\n this.body.useDamping = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Drag;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Drag.js?")},"./node_modules/phaser/src/physics/arcade/components/Enable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the enable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Enable\n * @since 3.0.0\n */\nvar Enable = {\n\n /**\n * Enables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#enableBody\n * @since 3.0.0\n *\n * @param {boolean} reset - Also reset the Body and place it at (x, y).\n * @param {number} x - The horizontal position to place the Game Object and Body.\n * @param {number} y - The horizontal position to place the Game Object and Body.\n * @param {boolean} enableGameObject - Also activate this Game Object.\n * @param {boolean} showGameObject - Also show this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.Physics.Arcade.Body#reset\n * @see Phaser.Physics.Arcade.StaticBody#reset\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n enableBody: function (reset, x, y, enableGameObject, showGameObject)\n {\n if (reset)\n {\n this.body.reset(x, y);\n }\n\n if (enableGameObject)\n {\n this.body.gameObject.active = true;\n }\n\n if (showGameObject)\n {\n this.body.gameObject.visible = true;\n }\n\n this.body.enable = true;\n\n return this;\n },\n\n /**\n * Stops and disables this Game Object's Body.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#disableBody\n * @since 3.0.0\n *\n * @param {boolean} [disableGameObject=false] - Also deactivate this Game Object.\n * @param {boolean} [hideGameObject=false] - Also hide this Game Object.\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.Body#enable\n * @see Phaser.Physics.Arcade.StaticBody#enable\n * @see Phaser.GameObjects.GameObject#active\n * @see Phaser.GameObjects.GameObject#visible\n */\n disableBody: function (disableGameObject, hideGameObject)\n {\n if (disableGameObject === undefined) { disableGameObject = false; }\n if (hideGameObject === undefined) { hideGameObject = false; }\n\n this.body.stop();\n\n this.body.enable = false;\n\n if (disableGameObject)\n {\n this.body.gameObject.active = false;\n }\n\n if (hideGameObject)\n {\n this.body.gameObject.visible = false;\n }\n\n return this;\n },\n\n /**\n * Syncs the Body's position and size with its parent Game Object.\n * You don't need to call this for Dynamic Bodies, as it happens automatically.\n * But for Static bodies it's a useful way of modifying the position of a Static Body\n * in the Physics World, based on its Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Enable#refreshBody\n * @since 3.1.0\n *\n * @return {this} This Game Object.\n *\n * @see Phaser.Physics.Arcade.StaticBody#updateFromGameObject\n */\n refreshBody: function ()\n {\n this.body.updateFromGameObject();\n\n return this;\n }\n\n};\n\nmodule.exports = Enable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Enable.js?")},"./node_modules/phaser/src/physics/arcade/components/Friction.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @namespace Phaser.Physics.Arcade.Components.Friction\n * @since 3.0.0\n */\nvar Friction = {\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFriction\n * @since 3.0.0\n *\n * @param {number} x - The amount of horizontal friction to apply.\n * @param {number} [y=x] - The amount of vertical friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFriction: function (x, y)\n {\n this.body.friction.set(x, y);\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionX: function (x)\n {\n this.body.friction.x = x;\n\n return this;\n },\n\n /**\n * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving vertically in the Y axis.\n * The higher than friction, the faster the body will slow down once force stops being applied to it.\n *\n * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY\n * @since 3.0.0\n *\n * @param {number} x - The amount of friction to apply.\n *\n * @return {this} This Game Object.\n */\n setFrictionY: function (y)\n {\n this.body.friction.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Friction;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Friction.js?")},"./node_modules/phaser/src/physics/arcade/components/Gravity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the gravity properties of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Gravity\n * @since 3.0.0\n */\nvar Gravity = {\n\n /**\n * Set the X and Y values of the gravitational pull to act upon this Arcade Physics Game Object. Values can be positive or negative. Larger values result in a stronger effect.\n * \n * If only one value is provided, this value will be used for both the X and Y axis.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravity\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n * @param {number} [y=x] - The gravitational force to be applied to the Y-axis. If this is not specified, the X value will be used.\n *\n * @return {this} This Game Object.\n */\n setGravity: function (x, y)\n {\n this.body.gravity.set(x, y);\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the X axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityX\n * @since 3.0.0\n *\n * @param {number} x - The gravitational force to be applied to the X-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityX: function (x)\n {\n this.body.gravity.x = x;\n\n return this;\n },\n\n /**\n * Set the gravitational force to be applied to the Y axis. Value can be positive or negative. Larger values result in a stronger effect.\n *\n * @method Phaser.Physics.Arcade.Components.Gravity#setGravityY\n * @since 3.0.0\n *\n * @param {number} y - The gravitational force to be applied to the Y-axis.\n *\n * @return {this} This Game Object.\n */\n setGravityY: function (y)\n {\n this.body.gravity.y = y;\n\n return this;\n }\n\n};\n\nmodule.exports = Gravity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Gravity.js?")},"./node_modules/phaser/src/physics/arcade/components/Immovable.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the immovable properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Immovable\n * @since 3.0.0\n */\nvar Immovable = {\n\n /**\n * Sets Whether this Body can be moved by collisions with another Body.\n *\n * @method Phaser.Physics.Arcade.Components.Immovable#setImmovable\n * @since 3.0.0\n *\n * @param {boolean} [value=true] - Sets if this body can be moved by collisions with another Body.\n *\n * @return {this} This Game Object.\n */\n setImmovable: function (value)\n {\n if (value === undefined) { value = true; }\n\n this.body.immovable = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Immovable;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Immovable.js?")},"./node_modules/phaser/src/physics/arcade/components/Mass.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods used for setting the mass properties of an Arcade Physics Body.\n *\n * @namespace Phaser.Physics.Arcade.Components.Mass\n * @since 3.0.0\n */\nvar Mass = {\n\n /**\n * Sets the mass of the physics body\n *\n * @method Phaser.Physics.Arcade.Components.Mass#setMass\n * @since 3.0.0\n *\n * @param {number} value - New value for the mass of the body.\n *\n * @return {this} This Game Object.\n */\n setMass: function (value)\n {\n this.body.mass = value;\n\n return this;\n }\n\n};\n\nmodule.exports = Mass;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Mass.js?")},"./node_modules/phaser/src/physics/arcade/components/OverlapRect.js":function(module,exports){eval("/**\r\n * This method will search the given rectangular area and return an array of all physics bodies that\r\n * overlap with it. It can return either Dynamic, Static bodies or a mixture of both.\r\n * \r\n * A body only has to intersect with the search area to be considered, it doesn't have to be fully\r\n * contained within it.\r\n * \r\n * If Arcade Physics is set to use the RTree (which it is by default) then the search for is extremely fast,\r\n * otherwise the search is O(N) for Dynamic Bodies.\r\n *\r\n * @function Phaser.Physics.Arcade.Components.OverlapRect\r\n * @since 3.17.0\r\n *\r\n * @param {number} x - The top-left x coordinate of the area to search within.\r\n * @param {number} y - The top-left y coordinate of the area to search within.\r\n * @param {number} width - The width of the area to search within.\r\n * @param {number} height - The height of the area to search within.\r\n * @param {boolean} [includeDynamic=true] - Should the search include Dynamic Bodies?\r\n * @param {boolean} [includeStatic=false] - Should the search include Static Bodies?\r\n *\r\n * @return {(Phaser.Physics.Arcade.Body[]|Phaser.Physics.Arcade.StaticBody[])} An array of bodies that overlap with the given area.\r\n */\r\nvar OverlapRect = function (world, x, y, width, height, includeDynamic, includeStatic)\r\n{\r\n if (includeDynamic === undefined) { includeDynamic = true; }\r\n if (includeStatic === undefined) { includeStatic = false; }\r\n\r\n var dynamicBodies = [];\r\n var staticBodies = [];\r\n\r\n var minMax = world.treeMinMax;\r\n\r\n minMax.minX = x;\r\n minMax.minY = y;\r\n minMax.maxX = x + width;\r\n minMax.maxY = y + height;\r\n\r\n if (includeStatic)\r\n {\r\n staticBodies = world.staticTree.search(minMax);\r\n }\r\n\r\n if (includeDynamic && world.useTree)\r\n {\r\n dynamicBodies = world.tree.search(minMax);\r\n }\r\n else if (includeDynamic)\r\n {\r\n var bodies = world.bodies;\r\n\r\n var fakeBody =\r\n {\r\n position: {\r\n x: x,\r\n y: y\r\n },\r\n left: x,\r\n top: y,\r\n right: x + width,\r\n bottom: y + height,\r\n isCircle: false\r\n };\r\n\r\n var intersects = world.intersects;\r\n\r\n bodies.iterate(function (target)\r\n {\r\n if (intersects(target, fakeBody))\r\n {\r\n dynamicBodies.push(target);\r\n }\r\n\r\n });\r\n }\r\n\r\n return staticBodies.concat(dynamicBodies);\r\n};\r\n\r\nmodule.exports = OverlapRect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/OverlapRect.js?")},"./node_modules/phaser/src/physics/arcade/components/Size.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for setting the size of an Arcade Physics Game Object.\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Size\n * @since 3.0.0\n */\nvar Size = {\n\n /**\n * Sets the body offset. This allows you to adjust the difference between the center of the body\n * and the x and y coordinates of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setOffset\n * @since 3.0.0\n *\n * @param {number} x - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [y=x] - The amount to offset the body from the parent Game Object along the y-axis. Defaults to the value given for the x-axis.\n *\n * @return {this} This Game Object.\n */\n setOffset: function (x, y)\n {\n this.body.setOffset(x, y);\n\n return this;\n },\n\n /**\n * Sets the size of this physics body. Setting the size does not adjust the dimensions\n * of the parent Game Object.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setSize\n * @since 3.0.0\n *\n * @param {number} width - The new width of the physics body, in pixels.\n * @param {number} height - The new height of the physics body, in pixels.\n * @param {boolean} [center=true] - Should the body be re-positioned so its center aligns with the parent Game Object?\n *\n * @return {this} This Game Object.\n */\n setSize: function (width, height, center)\n {\n this.body.setSize(width, height, center);\n\n return this;\n },\n\n /**\n * Sets this physics body to use a circle for collision instead of a rectangle.\n *\n * @method Phaser.Physics.Arcade.Components.Size#setCircle\n * @since 3.0.0\n *\n * @param {number} radius - The radius of the physics body, in pixels.\n * @param {number} [offsetX] - The amount to offset the body from the parent Game Object along the x-axis.\n * @param {number} [offsetY] - The amount to offset the body from the parent Game Object along the y-axis.\n *\n * @return {this} This Game Object.\n */\n setCircle: function (radius, offsetX, offsetY)\n {\n this.body.setCircle(radius, offsetX, offsetY);\n\n return this;\n }\n\n};\n\nmodule.exports = Size;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Size.js?")},"./node_modules/phaser/src/physics/arcade/components/Velocity.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Provides methods for modifying the velocity of an Arcade Physics body.\n *\n * Should be applied as a mixin and not used directly.\n *\n * @namespace Phaser.Physics.Arcade.Components.Velocity\n * @since 3.0.0\n */\nvar Velocity = {\n\n /**\n * Sets the velocity of the Body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocity\n * @since 3.0.0\n *\n * @param {number} x - The horizontal velocity of the body. Positive values move the body to the right, while negative values move it to the left.\n * @param {number} [y=x] - The vertical velocity of the body. Positive values move the body down, while negative values move it up.\n *\n * @return {this} This Game Object.\n */\n setVelocity: function (x, y)\n {\n this.body.setVelocity(x, y);\n\n return this;\n },\n\n /**\n * Sets the horizontal component of the body's velocity.\n *\n * Positive values move the body to the right, while negative values move it to the left.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityX\n * @since 3.0.0\n *\n * @param {number} x - The new horizontal velocity.\n *\n * @return {this} This Game Object.\n */\n setVelocityX: function (x)\n {\n this.body.setVelocityX(x);\n\n return this;\n },\n\n /**\n * Sets the vertical component of the body's velocity.\n *\n * Positive values move the body down, while negative values move it up.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setVelocityY\n * @since 3.0.0\n *\n * @param {number} y - The new vertical velocity of the body.\n *\n * @return {this} This Game Object.\n */\n setVelocityY: function (y)\n {\n this.body.setVelocityY(y);\n\n return this;\n },\n\n /**\n * Sets the maximum velocity of the body.\n *\n * @method Phaser.Physics.Arcade.Components.Velocity#setMaxVelocity\n * @since 3.0.0\n *\n * @param {number} x - The new maximum horizontal velocity.\n * @param {number} [y=x] - The new maximum vertical velocity.\n *\n * @return {this} This Game Object.\n */\n setMaxVelocity: function (x, y)\n {\n this.body.maxVelocity.set(x, y);\n\n return this;\n }\n\n};\n\nmodule.exports = Velocity;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/Velocity.js?")},"./node_modules/phaser/src/physics/arcade/components/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Components\n */\n\nmodule.exports = {\n\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/arcade/components/Acceleration.js"),\n Angular: __webpack_require__(/*! ./Angular */ "./node_modules/phaser/src/physics/arcade/components/Angular.js"),\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/arcade/components/Bounce.js"),\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/arcade/components/Debug.js"),\n Drag: __webpack_require__(/*! ./Drag */ "./node_modules/phaser/src/physics/arcade/components/Drag.js"),\n Enable: __webpack_require__(/*! ./Enable */ "./node_modules/phaser/src/physics/arcade/components/Enable.js"),\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/arcade/components/Friction.js"),\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/arcade/components/Gravity.js"),\n Immovable: __webpack_require__(/*! ./Immovable */ "./node_modules/phaser/src/physics/arcade/components/Immovable.js"),\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/arcade/components/Mass.js"),\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/physics/arcade/components/Size.js"),\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/arcade/components/Velocity.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/components/index.js?')},"./node_modules/phaser/src/physics/arcade/const.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Arcade Physics consts.\n *\n * @ignore\n */\n\nvar CONST = {\n\n /**\n * Dynamic Body.\n *\n * @name Phaser.Physics.Arcade.DYNAMIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.Group#physicsType\n */\n DYNAMIC_BODY: 0,\n\n /**\n * Static Body.\n *\n * @name Phaser.Physics.Arcade.STATIC_BODY\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#physicsType\n * @see Phaser.Physics.Arcade.StaticBody#physicsType\n */\n STATIC_BODY: 1,\n\n /**\n * Arcade Physics Group containing Dynamic Bodies.\n *\n * @name Phaser.Physics.Arcade.GROUP\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n GROUP: 2,\n\n /**\n * A Tilemap Layer.\n *\n * @name Phaser.Physics.Arcade.TILEMAPLAYER\n * @readonly\n * @type {number}\n * @since 3.0.0\n */\n TILEMAPLAYER: 3,\n\n /**\n * Facing no direction (initial value).\n *\n * @name Phaser.Physics.Arcade.FACING_NONE\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_NONE: 10,\n\n /**\n * Facing up.\n *\n * @name Phaser.Physics.Arcade.FACING_UP\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_UP: 11,\n\n /**\n * Facing down.\n *\n * @name Phaser.Physics.Arcade.FACING_DOWN\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_DOWN: 12,\n\n /**\n * Facing left.\n *\n * @name Phaser.Physics.Arcade.FACING_LEFT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_LEFT: 13,\n\n /**\n * Facing right.\n *\n * @name Phaser.Physics.Arcade.FACING_RIGHT\n * @readonly\n * @type {number}\n * @since 3.0.0\n *\n * @see Phaser.Physics.Arcade.Body#facing\n */\n FACING_RIGHT: 14\n\n};\n\nmodule.exports = CONST;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/const.js?")},"./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies collide _and_ at least\n * one of them has their [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('collide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#COLLIDE\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the collision. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the collision. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the collision.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the collision.\n */\nmodule.exports = 'collide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if two bodies overlap _and_ at least\n * one of them has their [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('overlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#OVERLAP\n * @since 3.0.0\n * \n * @param {Phaser.GameObjects.GameObject} gameObject1 - The first Game Object involved in the overlap. This is the parent of `body1`.\n * @param {Phaser.GameObjects.GameObject} gameObject2 - The second Game Object involved in the overlap. This is the parent of `body2`.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body1 - The first Physics Body involved in the overlap.\n * @param {Phaser.Physics.Arcade.Body|Phaser.Physics.Arcade.StaticBody} body2 - The second Physics Body involved in the overlap.\n */\nmodule.exports = 'overlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Pause Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it is paused.\n * \n * Listen to it from a Scene using: `this.physics.world.on('pause', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#PAUSE\n * @since 3.0.0\n */\nmodule.exports = 'pause';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Resume Event.\n * \n * This event is dispatched by an Arcade Physics World instance when it resumes from a paused state.\n * \n * Listen to it from a Scene using: `this.physics.world.on('resume', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#RESUME\n * @since 3.0.0\n */\nmodule.exports = 'resume';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Collide Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body collides with a Tile _and_\n * has its [onCollide]{@link Phaser.Physics.Arcade.Body#onCollide} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tilecollide', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_COLLIDE\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the collision. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body collided with.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the collision.\n */\nmodule.exports = 'tilecollide';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics Tile Overlap Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body overlaps with a Tile _and_\n * has its [onOverlap]{@link Phaser.Physics.Arcade.Body#onOverlap} property set to `true`.\n * \n * It provides an alternative means to handling overlap events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('tileoverlap', listener)`.\n * \n * Please note that 'collide' and 'overlap' are two different things in Arcade Physics.\n *\n * @event Phaser.Physics.Arcade.Events#TILE_OVERLAP\n * @since 3.16.1\n * \n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object involved in the overlap. This is the parent of `body`.\n * @param {Phaser.Tilemaps.Tile} tile - The tile the body overlapped.\n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body of the Game Object involved in the overlap.\n */\nmodule.exports = 'tileoverlap';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Bounds Event.\n * \n * This event is dispatched by an Arcade Physics World instance if a body makes contact with the world bounds _and_\n * it has its [onWorldBounds]{@link Phaser.Physics.Arcade.Body#onWorldBounds} property set to `true`.\n * \n * It provides an alternative means to handling collide events rather than using the callback approach.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldbounds', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_BOUNDS\n * @since 3.0.0\n * \n * @param {Phaser.Physics.Arcade.Body} body - The Arcade Physics Body that hit the world bounds.\n * @param {boolean} up - Is the Body blocked up? I.e. collided with the top of the world bounds.\n * @param {boolean} down - Is the Body blocked down? I.e. collided with the bottom of the world bounds.\n * @param {boolean} left - Is the Body blocked left? I.e. collided with the left of the world bounds.\n * @param {boolean} right - Is the Body blocked right? I.e. collided with the right of the world bounds.\n */\nmodule.exports = 'worldbounds';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * The Arcade Physics World Step Event.\n * \n * This event is dispatched by an Arcade Physics World instance whenever a physics step is run.\n * It is emitted _after_ the bodies and colliders have been updated.\n * \n * In high framerate settings this can be multiple times per game frame.\n * \n * Listen to it from a Scene using: `this.physics.world.on('worldstep', listener)`.\n *\n * @event Phaser.Physics.Arcade.Events#WORLD_STEP\n * @since 3.18.0\n */\nmodule.exports = 'worldstep';\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js?")},"./node_modules/phaser/src/physics/arcade/events/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * @namespace Phaser.Physics.Arcade.Events\n */\n\nmodule.exports = {\n\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js"),\n OVERLAP: __webpack_require__(/*! ./OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js"),\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js"),\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js"),\n TILE_COLLIDE: __webpack_require__(/*! ./TILE_COLLIDE_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js"),\n TILE_OVERLAP: __webpack_require__(/*! ./TILE_OVERLAP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js"),\n WORLD_BOUNDS: __webpack_require__(/*! ./WORLD_BOUNDS_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js"),\n WORLD_STEP: __webpack_require__(/*! ./WORLD_STEP_EVENT */ "./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js")\n\n};\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/events/index.js?')},"./node_modules/phaser/src/physics/arcade/index.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/physics/arcade/const.js");\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\n\n/**\n * @callback ArcadePhysicsCallback\n *\n * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate.\n * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate.\n */\n\n/**\n * @namespace Phaser.Physics.Arcade\n */\n\nvar Arcade = {\n\n ArcadePhysics: __webpack_require__(/*! ./ArcadePhysics */ "./node_modules/phaser/src/physics/arcade/ArcadePhysics.js"),\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/arcade/Body.js"),\n Collider: __webpack_require__(/*! ./Collider */ "./node_modules/phaser/src/physics/arcade/Collider.js"),\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/arcade/components/index.js"),\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/arcade/events/index.js"),\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/arcade/Factory.js"),\n Group: __webpack_require__(/*! ./PhysicsGroup */ "./node_modules/phaser/src/physics/arcade/PhysicsGroup.js"),\n Image: __webpack_require__(/*! ./ArcadeImage */ "./node_modules/phaser/src/physics/arcade/ArcadeImage.js"),\n Sprite: __webpack_require__(/*! ./ArcadeSprite */ "./node_modules/phaser/src/physics/arcade/ArcadeSprite.js"),\n StaticBody: __webpack_require__(/*! ./StaticBody */ "./node_modules/phaser/src/physics/arcade/StaticBody.js"),\n StaticGroup: __webpack_require__(/*! ./StaticPhysicsGroup */ "./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js"),\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/arcade/World.js")\n\n};\n\n// Merge in the consts\nArcade = Extend(false, Arcade, CONST);\n\nmodule.exports = Arcade;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/index.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * A function to process the collision callbacks between a single tile and an Arcade Physics enabled Game Object.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileCallbacks\n * @since 3.0.0\n *\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to process.\n * @param {Phaser.GameObjects.Sprite} sprite - The Game Object to process with the Tile.\n *\n * @return {boolean} The result of the callback, `true` for further processing, or `false` to skip this pair.\n */\nvar ProcessTileCallbacks = function (tile, sprite)\n{\n // Tile callbacks take priority over layer level callbacks\n if (tile.collisionCallback)\n {\n return !tile.collisionCallback.call(tile.collisionCallbackContext, sprite, tile);\n }\n else if (tile.layer.callbacks[tile.index])\n {\n return !tile.layer.callbacks[tile.index].callback.call(\n tile.layer.callbacks[tile.index].callbackContext, sprite, tile\n );\n }\n\n return true;\n};\n\nmodule.exports = ProcessTileCallbacks;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} x - The x separation amount.\n */\nvar ProcessTileSeparationX = function (body, x)\n{\n if (x < 0)\n {\n body.blocked.none = false;\n body.blocked.left = true;\n }\n else if (x > 0)\n {\n body.blocked.none = false;\n body.blocked.right = true;\n }\n\n body.position.x -= x;\n\n if (body.bounce.x === 0)\n {\n body.velocity.x = 0;\n }\n else\n {\n body.velocity.x = -body.velocity.x * body.bounce.x;\n }\n};\n\nmodule.exports = ProcessTileSeparationX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Internal function to process the separation of a physics body from a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.ProcessTileSeparationY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {number} y - The y separation amount.\n */\nvar ProcessTileSeparationY = function (body, y)\n{\n if (y < 0)\n {\n body.blocked.none = false;\n body.blocked.up = true;\n }\n else if (y > 0)\n {\n body.blocked.none = false;\n body.blocked.down = true;\n }\n\n body.position.y -= y;\n\n if (body.bounce.y === 0)\n {\n body.velocity.y = 0;\n }\n else\n {\n body.velocity.y = -body.velocity.y * body.bounce.y;\n }\n};\n\nmodule.exports = ProcessTileSeparationY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar TileCheckX = __webpack_require__(/*! ./TileCheckX */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js\");\nvar TileCheckY = __webpack_require__(/*! ./TileCheckY */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js\");\nvar TileIntersectsBody = __webpack_require__(/*! ./TileIntersectsBody */ \"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js\");\n\n/**\n * The core separation function to separate a physics body and a tile.\n *\n * @function Phaser.Physics.Arcade.Tilemap.SeparateTile\n * @since 3.0.0\n *\n * @param {number} i - The index of the tile within the map data.\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to collide against.\n * @param {Phaser.Geom.Rectangle} tileWorldRect - A rectangle-like object defining the dimensions of the tile.\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemapLayer to collide against.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {boolean} `true` if the body was separated, otherwise `false`.\n */\nvar SeparateTile = function (i, body, tile, tileWorldRect, tilemapLayer, tileBias, isLayer)\n{\n var tileLeft = tileWorldRect.left;\n var tileTop = tileWorldRect.top;\n var tileRight = tileWorldRect.right;\n var tileBottom = tileWorldRect.bottom;\n var faceHorizontal = tile.faceLeft || tile.faceRight;\n var faceVertical = tile.faceTop || tile.faceBottom;\n\n if (!isLayer)\n {\n faceHorizontal = true;\n faceVertical = true;\n }\n\n // We don't need to go any further if this tile doesn't actually have any colliding faces. This\n // could happen if the tile was meant to be collided with re: a callback, but otherwise isn't\n // needed for separation.\n if (!faceHorizontal && !faceVertical)\n {\n return false;\n }\n\n var ox = 0;\n var oy = 0;\n var minX = 0;\n var minY = 1;\n\n if (body.deltaAbsX() > body.deltaAbsY())\n {\n // Moving faster horizontally, check X axis first\n minX = -1;\n }\n else if (body.deltaAbsX() < body.deltaAbsY())\n {\n // Moving faster vertically, check Y axis first\n minY = -1;\n }\n\n if (body.deltaX() !== 0 && body.deltaY() !== 0 && faceHorizontal && faceVertical)\n {\n // We only need do this if both axes have colliding faces AND we're moving in both\n // directions\n minX = Math.min(Math.abs(body.position.x - tileRight), Math.abs(body.right - tileLeft));\n minY = Math.min(Math.abs(body.position.y - tileBottom), Math.abs(body.bottom - tileTop));\n }\n\n if (minX < minY)\n {\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n\n // That's horizontal done, check if we still intersects? If not then we can return now\n if (ox !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n }\n }\n else\n {\n if (faceVertical)\n {\n oy = TileCheckY(body, tile, tileTop, tileBottom, tileBias, isLayer);\n\n // That's vertical done, check if we still intersects? If not then we can return now\n if (oy !== 0 && !TileIntersectsBody(tileWorldRect, body))\n {\n return true;\n }\n }\n\n if (faceHorizontal)\n {\n ox = TileCheckX(body, tile, tileLeft, tileRight, tileBias, isLayer);\n }\n }\n\n return (ox !== 0 || oy !== 0);\n};\n\nmodule.exports = SeparateTile;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js?")},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationX = __webpack_require__(/*! ./ProcessTileSeparationX */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js");\n\n/**\n * Check the body against the given tile on the X axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileLeft - The left position of the tile within the tile world.\n * @param {number} tileRight - The right position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckX = function (body, tile, tileLeft, tileRight, tileBias, isLayer)\n{\n var ox = 0;\n\n var faceLeft = tile.faceLeft;\n var faceRight = tile.faceRight;\n var collideLeft = tile.collideLeft;\n var collideRight = tile.collideRight;\n\n if (!isLayer)\n {\n faceLeft = true;\n faceRight = true;\n collideLeft = true;\n collideRight = true;\n }\n\n if (body.deltaX() < 0 && !body.blocked.left && collideRight && body.checkCollision.left)\n {\n // Body is moving LEFT\n if (faceRight && body.x < tileRight)\n {\n ox = body.x - tileRight;\n\n if (ox < -tileBias)\n {\n ox = 0;\n }\n }\n }\n else if (body.deltaX() > 0 && !body.blocked.right && collideLeft && body.checkCollision.right)\n {\n // Body is moving RIGHT\n if (faceLeft && body.right > tileLeft)\n {\n ox = body.right - tileLeft;\n\n if (ox > tileBias)\n {\n ox = 0;\n }\n }\n }\n\n if (ox !== 0)\n {\n if (body.customSeparateX)\n {\n body.overlapX = ox;\n }\n else\n {\n ProcessTileSeparationX(body, ox);\n }\n }\n\n return ox;\n};\n\nmodule.exports = TileCheckX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar ProcessTileSeparationY = __webpack_require__(/*! ./ProcessTileSeparationY */ "./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js");\n\n/**\n * Check the body against the given tile on the Y axis.\n * Used internally by the SeparateTile function.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileCheckY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Arcade.Body} body - The Body object to separate.\n * @param {Phaser.Tilemaps.Tile} tile - The tile to check.\n * @param {number} tileTop - The top position of the tile within the tile world.\n * @param {number} tileBottom - The bottom position of the tile within the tile world.\n * @param {number} tileBias - The tile bias value. Populated by the `World.TILE_BIAS` constant.\n * @param {boolean} isLayer - Is this check coming from a TilemapLayer or an array of tiles?\n *\n * @return {number} The amount of separation that occurred.\n */\nvar TileCheckY = function (body, tile, tileTop, tileBottom, tileBias, isLayer)\n{\n var oy = 0;\n\n var faceTop = tile.faceTop;\n var faceBottom = tile.faceBottom;\n var collideUp = tile.collideUp;\n var collideDown = tile.collideDown;\n\n if (!isLayer)\n {\n faceTop = true;\n faceBottom = true;\n collideUp = true;\n collideDown = true;\n }\n\n if (body.deltaY() < 0 && !body.blocked.up && collideDown && body.checkCollision.up)\n {\n // Body is moving UP\n if (faceBottom && body.y < tileBottom)\n {\n oy = body.y - tileBottom;\n\n if (oy < -tileBias)\n {\n oy = 0;\n }\n }\n }\n else if (body.deltaY() > 0 && !body.blocked.down && collideUp && body.checkCollision.down)\n {\n // Body is moving DOWN\n if (faceTop && body.bottom > tileTop)\n {\n oy = body.bottom - tileTop;\n\n if (oy > tileBias)\n {\n oy = 0;\n }\n }\n }\n\n if (oy !== 0)\n {\n if (body.customSeparateY)\n {\n body.overlapY = oy;\n }\n else\n {\n ProcessTileSeparationY(body, oy);\n }\n }\n\n return oy;\n};\n\nmodule.exports = TileCheckY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js?')},"./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Checks for intersection between the given tile rectangle-like object and an Arcade Physics body.\n *\n * @function Phaser.Physics.Arcade.Tilemap.TileIntersectsBody\n * @since 3.0.0\n *\n * @param {{ left: number, right: number, top: number, bottom: number }} tileWorldRect - A rectangle object that defines the tile placement in the world.\n * @param {Phaser.Physics.Arcade.Body} body - The body to check for intersection against.\n *\n * @return {boolean} Returns `true` of the tile intersects with the body, otherwise `false`.\n */\nvar TileIntersectsBody = function (tileWorldRect, body)\n{\n // Currently, all bodies are treated as rectangles when colliding with a Tile.\n\n return !(\n body.right <= tileWorldRect.left ||\n body.bottom <= tileWorldRect.top ||\n body.position.x >= tileWorldRect.right ||\n body.position.y >= tileWorldRect.bottom\n );\n};\n\nmodule.exports = TileIntersectsBody;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js?")},"./node_modules/phaser/src/physics/impact/Body.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\nvar GetVelocity = __webpack_require__(/*! ./GetVelocity */ "./node_modules/phaser/src/physics/impact/GetVelocity.js");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\nvar UpdateMotion = __webpack_require__(/*! ./UpdateMotion */ "./node_modules/phaser/src/physics/impact/UpdateMotion.js");\r\n\r\n/**\r\n * @callback Phaser.Types.Physics.Impact.BodyUpdateCallback\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * An Impact.js compatible physics body.\r\n * This re-creates the properties you\'d get on an Entity and the math needed to update them.\r\n *\r\n * @class Body\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [sx=16] - [description]\r\n * @param {number} [sy=16] - [description]\r\n */\r\nvar Body = new Class({\r\n\r\n initialize:\r\n\r\n function Body (world, x, y, sx, sy)\r\n {\r\n if (sx === undefined) { sx = 16; }\r\n if (sy === undefined) { sy = sx; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gameObject\r\n * @type {Phaser.GameObjects.GameObject}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gameObject = null;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any.\r\n *\r\n * @name Phaser.Physics.Impact.Body#parent\r\n * @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)}\r\n * @since 3.0.0\r\n */\r\n this.parent;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#id\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.id = world.getNextID();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#name\r\n * @type {string}\r\n * @default \'\'\r\n * @since 3.0.0\r\n */\r\n this.name = \'\';\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#size\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.size = { x: sx, y: sy };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#offset\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.offset = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#pos\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.pos = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#last\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.last = { x: x, y: y };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#vel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.vel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.accel = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#friction\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.friction = { x: 0, y: 0 };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#maxVel\r\n * @type {Phaser.Types.Math.Vector2Like}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = { x: world.defaults.maxVelocityX, y: world.defaults.maxVelocityY };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#standing\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.standing = false;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#gravityFactor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.gravityFactor = world.defaults.gravityFactor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#bounciness\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.bounciness = world.defaults.bounciness;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#minBounceVelocity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.minBounceVelocity = world.defaults.minBounceVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelGround\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelGround = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#accelAir\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.accelAir = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#jumpSpeed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.jumpSpeed = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#type\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.type = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#checkAgainst\r\n * @type {Phaser.Physics.Impact.TYPE}\r\n * @since 3.0.0\r\n */\r\n this.checkAgainst = TYPE.NONE;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#collides\r\n * @type {Phaser.Physics.Impact.COLLIDES}\r\n * @since 3.0.0\r\n */\r\n this.collides = COLLIDES.NEVER;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowBody = world.defaults.debugShowBody;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.debugShowVelocity = world.defaults.debugShowVelocity;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#debugBodyColor\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.debugBodyColor = world.defaults.bodyDebugColor;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Body#updateCallback\r\n * @type {?Phaser.Types.Physics.Impact.BodyUpdateCallback}\r\n * @since 3.0.0\r\n */\r\n this.updateCallback;\r\n\r\n /**\r\n * min 44 deg, max 136 deg\r\n *\r\n * @name Phaser.Physics.Impact.Body#slopeStanding\r\n * @type {{ min: number, max: number }}\r\n * @since 3.0.0\r\n */\r\n this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 };\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#reset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n */\r\n reset: function (x, y)\r\n {\r\n this.pos = { x: x, y: y };\r\n this.last = { x: x, y: y };\r\n this.vel = { x: 0, y: 0 };\r\n this.accel = { x: 0, y: 0 };\r\n this.friction = { x: 0, y: 0 };\r\n this.maxVel = { x: 100, y: 100 };\r\n\r\n this.standing = false;\r\n\r\n this.gravityFactor = 1;\r\n this.bounciness = 0;\r\n this.minBounceVelocity = 40;\r\n\r\n this.accelGround = 0;\r\n this.accelAir = 0;\r\n this.jumpSpeed = 0;\r\n\r\n this.type = TYPE.NONE;\r\n this.checkAgainst = TYPE.NONE;\r\n this.collides = COLLIDES.NEVER;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (delta)\r\n {\r\n var pos = this.pos;\r\n\r\n this.last.x = pos.x;\r\n this.last.y = pos.y;\r\n\r\n this.vel.y += this.world.gravity * delta * this.gravityFactor;\r\n\r\n this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x);\r\n this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y);\r\n\r\n var mx = this.vel.x * delta;\r\n var my = this.vel.y * delta;\r\n\r\n var res = this.world.collisionMap.trace(pos.x, pos.y, mx, my, this.size.x, this.size.y);\r\n\r\n if (this.handleMovementTrace(res))\r\n {\r\n UpdateMotion(this, res);\r\n }\r\n\r\n var go = this.gameObject;\r\n\r\n if (go)\r\n {\r\n go.x = (pos.x - this.offset.x) + go.displayOriginX * go.scaleX;\r\n go.y = (pos.y - this.offset.y) + go.displayOriginY * go.scaleY;\r\n }\r\n\r\n if (this.updateCallback)\r\n {\r\n this.updateCallback(this);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#drawDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphic - [description]\r\n */\r\n drawDebug: function (graphic)\r\n {\r\n var pos = this.pos;\r\n\r\n if (this.debugShowBody)\r\n {\r\n graphic.lineStyle(1, this.debugBodyColor, 1);\r\n graphic.strokeRect(pos.x, pos.y, this.size.x, this.size.y);\r\n }\r\n\r\n if (this.debugShowVelocity)\r\n {\r\n var x = pos.x + this.size.x / 2;\r\n var y = pos.y + this.size.y / 2;\r\n\r\n graphic.lineStyle(1, this.world.defaults.velocityDebugColor, 1);\r\n graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#willDrawDebug\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n willDrawDebug: function ()\r\n {\r\n return (this.debugShowBody || this.debugShowVelocity);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#skipHash\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n skipHash: function ()\r\n {\r\n return (!this.enabled || (this.type === 0 && this.checkAgainst === 0 && this.collides === 0));\r\n },\r\n\r\n /**\r\n * Determines whether the body collides with the `other` one or not.\r\n *\r\n * @method Phaser.Physics.Impact.Body#touches\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n touches: function (other)\r\n {\r\n return !(\r\n this.pos.x >= other.pos.x + other.size.x ||\r\n this.pos.x + this.size.x <= other.pos.x ||\r\n this.pos.y >= other.pos.y + other.size.y ||\r\n this.pos.y + this.size.y <= other.pos.y\r\n );\r\n },\r\n\r\n /**\r\n * Reset the size and position of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Body#resetSize\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to position the body.\r\n * @param {number} y - The y coordinate to position the body.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.Body} This Body object.\r\n */\r\n resetSize: function (x, y, width, height)\r\n {\r\n this.pos.x = x;\r\n this.pos.y = y;\r\n this.size.x = width;\r\n this.size.y = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Export this body object to JSON.\r\n *\r\n * @method Phaser.Physics.Impact.Body#toJSON\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Types.Physics.Impact.JSONImpactBody} JSON representation of this body object.\r\n */\r\n toJSON: function ()\r\n {\r\n var output = {\r\n name: this.name,\r\n size: { x: this.size.x, y: this.size.y },\r\n pos: { x: this.pos.x, y: this.pos.y },\r\n vel: { x: this.vel.x, y: this.vel.y },\r\n accel: { x: this.accel.x, y: this.accel.y },\r\n friction: { x: this.friction.x, y: this.friction.y },\r\n maxVel: { x: this.maxVel.x, y: this.maxVel.y },\r\n gravityFactor: this.gravityFactor,\r\n bounciness: this.bounciness,\r\n minBounceVelocity: this.minBounceVelocity,\r\n type: this.type,\r\n checkAgainst: this.checkAgainst,\r\n collides: this.collides\r\n };\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#fromJSON\r\n * @todo Code it!\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n */\r\n fromJSON: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#check\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n */\r\n check: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Can be overridden by user code\r\n *\r\n * @method Phaser.Physics.Impact.Body#collideWith\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n collideWith: function (other, axis)\r\n {\r\n if (this.parent && this.parent._collideCallback)\r\n {\r\n this.parent._collideCallback.call(this.parent._callbackScope, this, other, axis);\r\n }\r\n },\r\n\r\n /**\r\n * Can be overridden by user code but must return a boolean.\r\n *\r\n * @method Phaser.Physics.Impact.Body#handleMovementTrace\r\n * @since 3.0.0\r\n *\r\n * @param {number} res - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n handleMovementTrace: function ()\r\n {\r\n return true;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Body#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.remove(this);\r\n\r\n this.enabled = false;\r\n\r\n this.world = null;\r\n\r\n this.gameObject = null;\r\n\r\n this.parent = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Body;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Body.js?')},"./node_modules/phaser/src/physics/impact/COLLIDES.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.COLLIDES\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Never collides.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.NEVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEVER: 0,\r\n\r\n /**\r\n * Lite collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.LITE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LITE: 1,\r\n\r\n /**\r\n * Passive collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.PASSIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n PASSIVE: 2,\r\n\r\n /**\r\n * Active collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.ACTIVE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 4,\r\n\r\n /**\r\n * Fixed collision.\r\n *\r\n * @name Phaser.Physics.Impact.COLLIDES.FIXED\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n FIXED: 8\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/COLLIDES.js?')},"./node_modules/phaser/src/physics/impact/CollisionMap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar DefaultDefs = __webpack_require__(/*! ./DefaultDefs */ "./node_modules/phaser/src/physics/impact/DefaultDefs.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class CollisionMap\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tilesize=32] - [description]\r\n * @param {array} [data] - [description]\r\n */\r\nvar CollisionMap = new Class({\r\n\r\n initialize:\r\n\r\n function CollisionMap (tilesize, data)\r\n {\r\n if (tilesize === undefined) { tilesize = 32; }\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tilesize\r\n * @type {integer}\r\n * @default 32\r\n * @since 3.0.0\r\n */\r\n this.tilesize = tilesize;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#data\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.data = (Array.isArray(data)) ? data : [];\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = (Array.isArray(data)) ? data[0].length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = (Array.isArray(data)) ? data.length : 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#lastSlope\r\n * @type {integer}\r\n * @default 55\r\n * @since 3.0.0\r\n */\r\n this.lastSlope = 55;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.CollisionMap#tiledef\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tiledef = DefaultDefs;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#trace\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} objectWidth - [description]\r\n * @param {number} objectHeight - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n trace: function (x, y, vx, vy, objectWidth, objectHeight)\r\n {\r\n // Set up the trace-result\r\n var res = {\r\n collision: { x: false, y: false, slope: false },\r\n pos: { x: x + vx, y: y + vy },\r\n tile: { x: 0, y: 0 }\r\n };\r\n\r\n if (!this.data)\r\n {\r\n return res;\r\n }\r\n \r\n var steps = Math.ceil(Math.max(Math.abs(vx), Math.abs(vy)) / this.tilesize);\r\n\r\n if (steps > 1)\r\n {\r\n var sx = vx / steps;\r\n var sy = vy / steps;\r\n \r\n for (var i = 0; i < steps && (sx || sy); i++)\r\n {\r\n this.step(res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i);\r\n \r\n x = res.pos.x;\r\n y = res.pos.y;\r\n\r\n if (res.collision.x)\r\n {\r\n sx = 0;\r\n vx = 0;\r\n }\r\n\r\n if (res.collision.y)\r\n {\r\n sy = 0;\r\n vy = 0;\r\n }\r\n\r\n if (res.collision.slope)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n this.step(res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0);\r\n }\r\n \r\n return res;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#step\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} rvx - [description]\r\n * @param {number} rvy - [description]\r\n * @param {number} step - [description]\r\n */\r\n step: function (res, x, y, vx, vy, width, height, rvx, rvy, step)\r\n {\r\n var t = 0;\r\n var tileX;\r\n var tileY;\r\n var tilesize = this.tilesize;\r\n var mapWidth = this.width;\r\n var mapHeight = this.height;\r\n \r\n // Horizontal\r\n if (vx)\r\n {\r\n var pxOffsetX = (vx > 0 ? width : 0);\r\n var tileOffsetX = (vx < 0 ? tilesize : 0);\r\n \r\n var firstTileY = Math.max(Math.floor(y / tilesize), 0);\r\n var lastTileY = Math.min(Math.ceil((y + height) / tilesize), mapHeight);\r\n \r\n tileX = Math.floor((res.pos.x + pxOffsetX) / tilesize);\r\n\r\n var prevTileX = Math.floor((x + pxOffsetX) / tilesize);\r\n\r\n if (step > 0 || tileX === prevTileX || prevTileX < 0 || prevTileX >= mapWidth)\r\n {\r\n prevTileX = -1;\r\n }\r\n \r\n if (tileX >= 0 && tileX < mapWidth)\r\n {\r\n for (tileY = firstTileY; tileY < lastTileY; tileY++)\r\n {\r\n if (prevTileX !== -1)\r\n {\r\n t = this.data[tileY][prevTileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.x = true;\r\n res.tile.x = t;\r\n res.pos.x = (tileX * tilesize) - pxOffsetX + tileOffsetX;\r\n x = res.pos.x;\r\n rvx = 0;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n \r\n // Vertical\r\n if (vy)\r\n {\r\n var pxOffsetY = (vy > 0 ? height : 0);\r\n var tileOffsetY = (vy < 0 ? tilesize : 0);\r\n \r\n var firstTileX = Math.max(Math.floor(res.pos.x / tilesize), 0);\r\n var lastTileX = Math.min(Math.ceil((res.pos.x + width) / tilesize), mapWidth);\r\n \r\n tileY = Math.floor((res.pos.y + pxOffsetY) / tilesize);\r\n \r\n var prevTileY = Math.floor((y + pxOffsetY) / tilesize);\r\n\r\n if (step > 0 || tileY === prevTileY || prevTileY < 0 || prevTileY >= mapHeight)\r\n {\r\n prevTileY = -1;\r\n }\r\n \r\n if (tileY >= 0 && tileY < mapHeight)\r\n {\r\n for (tileX = firstTileX; tileX < lastTileX; tileX++)\r\n {\r\n if (prevTileY !== -1)\r\n {\r\n t = this.data[prevTileY][tileX];\r\n\r\n if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY))\r\n {\r\n break;\r\n }\r\n }\r\n \r\n t = this.data[tileY][tileX];\r\n\r\n if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY)))\r\n {\r\n if (t > 1 && t <= this.lastSlope && res.collision.slope)\r\n {\r\n break;\r\n }\r\n \r\n res.collision.y = true;\r\n res.tile.y = t;\r\n res.pos.y = tileY * tilesize - pxOffsetY + tileOffsetY;\r\n\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.CollisionMap#checkDef\r\n * @since 3.0.0\r\n *\r\n * @param {object} res - [description]\r\n * @param {number} t - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} vx - [description]\r\n * @param {number} vy - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} tileX - [description]\r\n * @param {number} tileY - [description]\r\n *\r\n * @return {boolean} [description]\r\n */\r\n checkDef: function (res, t, x, y, vx, vy, width, height, tileX, tileY)\r\n {\r\n var def = this.tiledef[t];\r\n\r\n if (!def)\r\n {\r\n return false;\r\n }\r\n\r\n var tilesize = this.tilesize;\r\n \r\n var lx = (tileX + def[0]) * tilesize;\r\n var ly = (tileY + def[1]) * tilesize;\r\n var lvx = (def[2] - def[0]) * tilesize;\r\n var lvy = (def[3] - def[1]) * tilesize;\r\n var solid = def[4];\r\n \r\n var tx = x + vx + (lvy < 0 ? width : 0) - lx;\r\n var ty = y + vy + (lvx > 0 ? height : 0) - ly;\r\n \r\n if (lvx * ty - lvy * tx > 0)\r\n {\r\n if (vx * -lvy + vy * lvx < 0)\r\n {\r\n return solid;\r\n }\r\n \r\n var length = Math.sqrt(lvx * lvx + lvy * lvy);\r\n var nx = lvy / length;\r\n var ny = -lvx / length;\r\n \r\n var proj = tx * nx + ty * ny;\r\n var px = nx * proj;\r\n var py = ny * proj;\r\n \r\n if (px * px + py * py >= vx * vx + vy * vy)\r\n {\r\n return solid || (lvx * (ty - vy) - lvy * (tx - vx) < 0.5);\r\n }\r\n \r\n res.pos.x = x + vx - px;\r\n res.pos.y = y + vy - py;\r\n res.collision.slope = { x: lvx, y: lvy, nx: nx, ny: ny };\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CollisionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/CollisionMap.js?')},"./node_modules/phaser/src/physics/impact/DefaultDefs.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar H = 0.5;\r\nvar N = 1 / 3;\r\nvar M = 2 / 3;\r\n\r\n// Tile ID to Slope defs.\r\n// First 4 elements = line data, final = solid or non-solid behind the line\r\n \r\nmodule.exports = {\r\n\r\n 2: [ 0, 1, 1, 0, true ],\r\n 3: [ 0, 1, 1, H, true ],\r\n 4: [ 0, H, 1, 0, true ],\r\n 5: [ 0, 1, 1, M, true ],\r\n 6: [ 0, M, 1, N, true ],\r\n 7: [ 0, N, 1, 0, true ],\r\n 8: [ H, 1, 0, 0, true ],\r\n 9: [ 1, 0, H, 1, true ],\r\n 10: [ H, 1, 1, 0, true ],\r\n 11: [ 0, 0, H, 1, true ],\r\n 12: [ 0, 0, 1, 0, false ],\r\n 13: [ 1, 1, 0, 0, true ],\r\n 14: [ 1, H, 0, 0, true ],\r\n 15: [ 1, 1, 0, H, true ],\r\n 16: [ 1, N, 0, 0, true ],\r\n 17: [ 1, M, 0, N, true ],\r\n 18: [ 1, 1, 0, M, true ],\r\n 19: [ 1, 1, H, 0, true ],\r\n 20: [ H, 0, 0, 1, true ],\r\n 21: [ 0, 1, H, 0, true ],\r\n 22: [ H, 0, 1, 1, true ],\r\n 23: [ 1, 1, 0, 1, false ],\r\n 24: [ 0, 0, 1, 1, true ],\r\n 25: [ 0, 0, 1, H, true ],\r\n 26: [ 0, H, 1, 1, true ],\r\n 27: [ 0, 0, 1, N, true ],\r\n 28: [ 0, N, 1, M, true ],\r\n 29: [ 0, M, 1, 1, true ],\r\n 30: [ N, 1, 0, 0, true ],\r\n 31: [ 1, 0, M, 1, true ],\r\n 32: [ M, 1, 1, 0, true ],\r\n 33: [ 0, 0, N, 1, true ],\r\n 34: [ 1, 0, 1, 1, false ],\r\n 35: [ 1, 0, 0, 1, true ],\r\n 36: [ 1, H, 0, 1, true ],\r\n 37: [ 1, 0, 0, H, true ],\r\n 38: [ 1, M, 0, 1, true ],\r\n 39: [ 1, N, 0, M, true ],\r\n 40: [ 1, 0, 0, N, true ],\r\n 41: [ M, 1, N, 0, true ],\r\n 42: [ M, 0, N, 1, true ],\r\n 43: [ N, 1, M, 0, true ],\r\n 44: [ N, 0, M, 1, true ],\r\n 45: [ 0, 1, 0, 0, false ],\r\n 52: [ 1, 1, M, 0, true ],\r\n 53: [ N, 0, 0, 1, true ],\r\n 54: [ 0, 1, N, 0, true ],\r\n 55: [ M, 0, 1, 1, true ]\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/DefaultDefs.js?")},"./node_modules/phaser/src/physics/impact/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar ImpactBody = __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js");\r\nvar ImpactImage = __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js");\r\nvar ImpactSprite = __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Impact Physics Factory allows you to easily create Impact Physics enabled Game Objects.\r\n * Objects that are created by this Factory are automatically added to the physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - A reference to the Impact Physics world.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * A reference to the Impact Physics world.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Impact Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Impact.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactBody object and adds it to the physics simulation.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#body\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the physics world.\r\n * @param {number} y - The vertical position of the body in the physics world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactBody} The ImpactBody object that was created.\r\n */\r\n body: function (x, y, width, height)\r\n {\r\n return new ImpactBody(this.world, x, y, width, height);\r\n },\r\n\r\n /**\r\n * Adds an Impact Physics Body to the given Game Object.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to receive the physics body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object.\r\n */\r\n existing: function (gameObject)\r\n {\r\n var x = gameObject.x - gameObject.frame.centerX;\r\n var y = gameObject.y - gameObject.frame.centerY;\r\n var w = gameObject.width;\r\n var h = gameObject.height;\r\n\r\n gameObject.body = this.world.create(x, y, w, h);\r\n\r\n gameObject.body.parent = gameObject;\r\n gameObject.body.gameObject = gameObject;\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactImage object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created.\r\n */\r\n image: function (x, y, key, frame)\r\n {\r\n var image = new ImpactImage(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * Creates a new ImpactSprite object and adds it to the physics world.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n *\r\n * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created.\r\n */\r\n sprite: function (x, y, key, frame)\r\n {\r\n var sprite = new ImpactSprite(this.world, x, y, key, frame);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Impact.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Factory.js?')},"./node_modules/phaser/src/physics/impact/GetVelocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Impact.GetVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n * @param {number} vel - [description]\r\n * @param {number} accel - [description]\r\n * @param {number} friction - [description]\r\n * @param {number} max - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\nvar GetVelocity = function (delta, vel, accel, friction, max)\r\n{\r\n if (accel)\r\n {\r\n return Clamp(vel + accel * delta, -max, max);\r\n }\r\n else if (friction)\r\n {\r\n var frictionDelta = friction * delta;\r\n \r\n if (vel - frictionDelta > 0)\r\n {\r\n return vel - frictionDelta;\r\n }\r\n else if (vel + frictionDelta < 0)\r\n {\r\n return vel + frictionDelta;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n }\r\n\r\n return Clamp(vel, -max, max);\r\n};\r\n\r\nmodule.exports = GetVelocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/GetVelocity.js?')},"./node_modules/phaser/src/physics/impact/ImpactBody.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactBody\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - x - The horizontal position of this physics body in the world.\r\n * @param {number} y - y - The vertical position of this physics body in the world.\r\n * @param {number} width - The width of the physics body in the world.\r\n * @param {number} height - [description]\r\n */\r\nvar ImpactBody = new Class({\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactBody (world, x, y, width, height)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x, y, width, height);\r\n\r\n this.body.parent = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactBody#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactBody.js?')},"./node_modules/phaser/src/physics/impact/ImpactImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class ImpactImage\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The physics world of the Impact physics system.\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactImage (world, x, y, texture, frame)\r\n {\r\n Image.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * The Physics Body linked to an ImpactImage.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * The size of the physics Body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * The X and Y offset of the Body from the left and top of the Image.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * The velocity, or rate of change the Body\'s position. Measured in pixels per second.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * The acceleration is the rate of change of the velocity. Measured in pixels per second squared.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * Friction between colliding bodies.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * The maximum velocity of the body.\r\n *\r\n * @name Phaser.Physics.Impact.ImpactImage#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactImage.js?')},"./node_modules/phaser/src/physics/impact/ImpactPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class ImpactPhysics\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar ImpactPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function ImpactPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#world\r\n * @type {Phaser.Physics.Impact.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactPhysics#add\r\n * @type {Phaser.Physics.Impact.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'impact\', {}),\r\n GetFastValue(gameConfig, \'impact\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} The Impact World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Impact.ImpactPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'ImpactPhysics\', ImpactPhysics, \'impactPhysics\');\r\n\r\nmodule.exports = ImpactPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactPhysics.js?')},"./node_modules/phaser/src/physics/impact/ImpactSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/impact/components/index.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Impact Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class ImpactSprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Impact.Components.Acceleration\r\n * @extends Phaser.Physics.Impact.Components.BodyScale\r\n * @extends Phaser.Physics.Impact.Components.BodyType\r\n * @extends Phaser.Physics.Impact.Components.Bounce\r\n * @extends Phaser.Physics.Impact.Components.CheckAgainst\r\n * @extends Phaser.Physics.Impact.Components.Collides\r\n * @extends Phaser.Physics.Impact.Components.Debug\r\n * @extends Phaser.Physics.Impact.Components.Friction\r\n * @extends Phaser.Physics.Impact.Components.Gravity\r\n * @extends Phaser.Physics.Impact.Components.Offset\r\n * @extends Phaser.Physics.Impact.Components.SetGameObject\r\n * @extends Phaser.Physics.Impact.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n */\r\nvar ImpactSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Acceleration,\r\n Components.BodyScale,\r\n Components.BodyType,\r\n Components.Bounce,\r\n Components.CheckAgainst,\r\n Components.Collides,\r\n Components.Debug,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Offset,\r\n Components.SetGameObject,\r\n Components.Velocity\r\n ],\r\n\r\n initialize:\r\n\r\n function ImpactSprite (world, x, y, texture, frame)\r\n {\r\n Sprite.call(this, world.scene, x, y, texture, frame);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#body\r\n * @type {Phaser.Physics.Impact.Body}\r\n * @since 3.0.0\r\n */\r\n this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height);\r\n\r\n this.body.parent = this;\r\n this.body.gameObject = this;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#size\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.size = this.body.size;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#offset\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.offset = this.body.offset;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#vel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.vel = this.body.vel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#accel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.accel = this.body.accel;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#friction\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.friction = this.body.friction;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.ImpactSprite#maxVel\r\n * @type {{x: number, y: number}}\r\n * @since 3.0.0\r\n */\r\n this.maxVel = this.body.maxVel;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImpactSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/ImpactSprite.js?')},"./node_modules/phaser/src/physics/impact/SeparateX.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateX\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} left - [description]\n * @param {Phaser.Physics.Impact.Body} right - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateX = function (world, left, right, weak)\n{\n var nudge = left.pos.x + left.size.x - right.pos.x;\n \n // We have a weak entity, so just move this one\n if (weak)\n {\n var strong = (left === weak) ? right : left;\n\n weak.vel.x = -weak.vel.x * weak.bounciness + strong.vel.x;\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, weak === left ? -nudge : nudge, 0, weak.size.x, weak.size.y);\n\n weak.pos.x = resWeak.pos.x;\n }\n else\n {\n var v2 = (left.vel.x - right.vel.x) / 2;\n\n left.vel.x = -v2;\n right.vel.x = v2;\n \n var resLeft = world.collisionMap.trace(left.pos.x, left.pos.y, -nudge / 2, 0, left.size.x, left.size.y);\n\n left.pos.x = Math.floor(resLeft.pos.x);\n \n var resRight = world.collisionMap.trace(right.pos.x, right.pos.y, nudge / 2, 0, right.size.x, right.size.y);\n\n right.pos.x = Math.ceil(resRight.pos.x);\n }\n};\n\nmodule.exports = SeparateX;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateX.js?")},"./node_modules/phaser/src/physics/impact/SeparateY.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * [description]\n *\n * @function Phaser.Physics.Impact.SeparateY\n * @since 3.0.0\n *\n * @param {Phaser.Physics.Impact.World} world - [description]\n * @param {Phaser.Physics.Impact.Body} top - [description]\n * @param {Phaser.Physics.Impact.Body} bottom - [description]\n * @param {Phaser.Physics.Impact.Body} [weak] - [description]\n */\nvar SeparateY = function (world, top, bottom, weak)\n{\n var nudge = (top.pos.y + top.size.y - bottom.pos.y);\n var nudgeX;\n var resTop;\n \n if (weak)\n {\n var strong = (top === weak) ? bottom : top;\n\n weak.vel.y = -weak.vel.y * weak.bounciness + strong.vel.y;\n \n // Riding on a platform?\n nudgeX = 0;\n\n if (weak === top && Math.abs(weak.vel.y - strong.vel.y) < weak.minBounceVelocity)\n {\n weak.standing = true;\n nudgeX = strong.vel.x * world.delta;\n }\n \n var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, nudgeX, weak === top ? -nudge : nudge, weak.size.x, weak.size.y);\n\n weak.pos.y = resWeak.pos.y;\n weak.pos.x = resWeak.pos.x;\n }\n else if (world.gravity && (bottom.standing || top.vel.y > 0))\n {\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, 0, -(top.pos.y + top.size.y - bottom.pos.y), top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n if (top.bounciness > 0 && top.vel.y > top.minBounceVelocity)\n {\n top.vel.y *= -top.bounciness;\n }\n else\n {\n top.standing = true;\n top.vel.y = 0;\n }\n }\n else\n {\n var v2 = (top.vel.y - bottom.vel.y) / 2;\n\n top.vel.y = -v2;\n bottom.vel.y = v2;\n \n nudgeX = bottom.vel.x * world.delta;\n\n resTop = world.collisionMap.trace(top.pos.x, top.pos.y, nudgeX, -nudge / 2, top.size.x, top.size.y);\n\n top.pos.y = resTop.pos.y;\n \n var resBottom = world.collisionMap.trace(bottom.pos.x, bottom.pos.y, 0, nudge / 2, bottom.size.x, bottom.size.y);\n\n bottom.pos.y = resBottom.pos.y;\n }\n};\n\nmodule.exports = SeparateY;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/SeparateY.js?")},"./node_modules/phaser/src/physics/impact/Solver.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar SeparateX = __webpack_require__(/*! ./SeparateX */ \"./node_modules/phaser/src/physics/impact/SeparateX.js\");\r\nvar SeparateY = __webpack_require__(/*! ./SeparateY */ \"./node_modules/phaser/src/physics/impact/SeparateY.js\");\r\n\r\n/**\r\n * Impact Physics Solver\r\n *\r\n * @function Phaser.Physics.Impact.Solver\r\n * @fires Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.World} world - The Impact simulation to run the solver in.\r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body in the collision.\r\n */\r\nvar Solver = function (world, bodyA, bodyB)\r\n{\r\n var weak = null;\r\n\r\n if (bodyA.collides === COLLIDES.LITE || bodyB.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyA;\r\n }\r\n else if (bodyB.collides === COLLIDES.LITE || bodyA.collides === COLLIDES.FIXED)\r\n {\r\n weak = bodyB;\r\n }\r\n\r\n if (bodyA.last.x + bodyA.size.x > bodyB.last.x && bodyA.last.x < bodyB.last.x + bodyB.size.x)\r\n {\r\n if (bodyA.last.y < bodyB.last.y)\r\n {\r\n SeparateY(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateY(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'y');\r\n bodyB.collideWith(bodyA, 'y');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'y');\r\n }\r\n else if (bodyA.last.y + bodyA.size.y > bodyB.last.y && bodyA.last.y < bodyB.last.y + bodyB.size.y)\r\n {\r\n if (bodyA.last.x < bodyB.last.x)\r\n {\r\n SeparateX(world, bodyA, bodyB, weak);\r\n }\r\n else\r\n {\r\n SeparateX(world, bodyB, bodyA, weak);\r\n }\r\n\r\n bodyA.collideWith(bodyB, 'x');\r\n bodyB.collideWith(bodyA, 'x');\r\n\r\n world.emit(Events.COLLIDE, bodyA, bodyB, 'x');\r\n }\r\n};\r\n\r\nmodule.exports = Solver;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/Solver.js?")},"./node_modules/phaser/src/physics/impact/TYPE.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Collision Types - Determine if and how entities collide with each other.\r\n *\r\n * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves,\r\n * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE\r\n * collisions, both entities are moved. LITE or PASSIVE entities don\'t collide\r\n * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.\r\n * FIXED collisions is undefined.\r\n *\r\n * @namespace Phaser.Physics.Impact.TYPE\r\n * @memberof Phaser.Physics.Impact\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Collides with nothing.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * Type A. Collides with Type B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.A\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n A: 1,\r\n\r\n /**\r\n * Type B. Collides with Type A.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.B\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n B: 2,\r\n\r\n /**\r\n * Collides with both types A and B.\r\n *\r\n * @name Phaser.Physics.Impact.TYPE.BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n BOTH: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/TYPE.js?')},"./node_modules/phaser/src/physics/impact/UpdateMotion.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Set up the trace-result\r\n * var res = {\r\n * collision: {x: false, y: false, slope: false},\r\n * pos: {x: x, y: y},\r\n * tile: {x: 0, y: 0}\r\n * };\r\n *\r\n * @function Phaser.Physics.Impact.UpdateMotion\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} res - [description]\r\n */\r\nvar UpdateMotion = function (body, res)\r\n{\r\n body.standing = false;\r\n\r\n // Y\r\n if (res.collision.y)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.y) > body.minBounceVelocity)\r\n {\r\n body.vel.y *= -body.bounciness;\r\n }\r\n else\r\n {\r\n if (body.vel.y > 0)\r\n {\r\n body.standing = true;\r\n }\r\n\r\n body.vel.y = 0;\r\n }\r\n }\r\n\r\n // X\r\n if (res.collision.x)\r\n {\r\n if (body.bounciness > 0 && Math.abs(body.vel.x) > body.minBounceVelocity)\r\n {\r\n body.vel.x *= -body.bounciness;\r\n }\r\n else\r\n {\r\n body.vel.x = 0;\r\n }\r\n }\r\n\r\n // SLOPE\r\n if (res.collision.slope)\r\n {\r\n var s = res.collision.slope;\r\n \r\n if (body.bounciness > 0)\r\n {\r\n var proj = body.vel.x * s.nx + body.vel.y * s.ny;\r\n\r\n body.vel.x = (body.vel.x - s.nx * proj * 2) * body.bounciness;\r\n body.vel.y = (body.vel.y - s.ny * proj * 2) * body.bounciness;\r\n }\r\n else\r\n {\r\n var lengthSquared = s.x * s.x + s.y * s.y;\r\n var dot = (body.vel.x * s.x + body.vel.y * s.y) / lengthSquared;\r\n \r\n body.vel.x = s.x * dot;\r\n body.vel.y = s.y * dot;\r\n \r\n var angle = Math.atan2(s.x, s.y);\r\n\r\n if (angle > body.slopeStanding.min && angle < body.slopeStanding.max)\r\n {\r\n body.standing = true;\r\n }\r\n }\r\n }\r\n\r\n body.pos.x = res.pos.x;\r\n body.pos.y = res.pos.y;\r\n};\r\n\r\nmodule.exports = UpdateMotion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/UpdateMotion.js?")},"./node_modules/phaser/src/physics/impact/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/impact/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar COLLIDES = __webpack_require__(/*! ./COLLIDES */ \"./node_modules/phaser/src/physics/impact/COLLIDES.js\");\r\nvar CollisionMap = __webpack_require__(/*! ./CollisionMap */ \"./node_modules/phaser/src/physics/impact/CollisionMap.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/impact/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Set = __webpack_require__(/*! ../../structs/Set */ \"./node_modules/phaser/src/structs/Set.js\");\r\nvar Solver = __webpack_require__(/*! ./Solver */ \"./node_modules/phaser/src/physics/impact/Solver.js\");\r\nvar TILEMAP_FORMATS = __webpack_require__(/*! ../../tilemaps/Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar TYPE = __webpack_require__(/*! ./TYPE */ \"./node_modules/phaser/src/physics/impact/TYPE.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Impact\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Impact World instance belongs.\r\n * @param {Phaser.Types.Physics.Impact.WorldConfig} config - [description]\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#bodies\r\n * @type {Phaser.Structs.Set.}\r\n * @since 3.0.0\r\n */\r\n this.bodies = new Set();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#gravity\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.gravity = GetFastValue(config, 'gravity', 0);\r\n\r\n /**\r\n * Spatial hash cell dimensions\r\n *\r\n * @name Phaser.Physics.Impact.World#cellSize\r\n * @type {integer}\r\n * @default 64\r\n * @since 3.0.0\r\n */\r\n this.cellSize = GetFastValue(config, 'cellSize', 64);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#collisionMap\r\n * @type {Phaser.Physics.Impact.CollisionMap}\r\n * @since 3.0.0\r\n */\r\n this.collisionMap = new CollisionMap();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n /**\r\n * Impacts maximum time step is 20 fps.\r\n *\r\n * @name Phaser.Physics.Impact.World#maxStep\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.maxStep = GetFastValue(config, 'maxStep', 0.05);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = true;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#drawDebug\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetFastValue(config, 'debug', false);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n var _maxVelocity = GetFastValue(config, 'maxVelocity', 100);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#defaults\r\n * @type {Phaser.Types.Physics.Impact.WorldDefaults}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n maxVelocityX: GetFastValue(config, 'maxVelocityX', _maxVelocity),\r\n maxVelocityY: GetFastValue(config, 'maxVelocityY', _maxVelocity),\r\n minBounceVelocity: GetFastValue(config, 'minBounceVelocity', 40),\r\n gravityFactor: GetFastValue(config, 'gravityFactor', 1),\r\n bounciness: GetFastValue(config, 'bounciness', 0)\r\n };\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Impact.World#walls\r\n * @type {Phaser.Types.Physics.Impact.WorldWalls}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#delta\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.delta = 0;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.World#_lastId\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._lastId = 0;\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from\r\n * a 2D array. If loading from a Weltmeister level, the map must have a layer called \"collision\".\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMap\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer[][])} key - Either a string key that corresponds to a Weltmeister level\r\n * in the cache, or a 2D array of collision IDs.\r\n * @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister\r\n * level in the cache.\r\n *\r\n * @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to\r\n * create the CollisionMap.\r\n */\r\n setCollisionMap: function (key, tileSize)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n var tilemapData = this.scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData || tilemapData.format !== TILEMAP_FORMATS.WELTMEISTER)\r\n {\r\n console.warn('The specified key does not correspond to a Weltmeister tilemap: ' + key);\r\n return null;\r\n }\r\n\r\n var layers = tilemapData.data.layer;\r\n var collisionLayer;\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].name === 'collision')\r\n {\r\n collisionLayer = layers[i];\r\n break;\r\n }\r\n }\r\n\r\n if (tileSize === undefined) { tileSize = collisionLayer.tilesize; }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionLayer.data);\r\n }\r\n else if (Array.isArray(key))\r\n {\r\n this.collisionMap = new CollisionMap(tileSize, key);\r\n }\r\n else\r\n {\r\n console.warn('Invalid Weltmeister collision map data: ' + key);\r\n }\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as\r\n * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of\r\n * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can\r\n * manually create a slopeMap that stores the mapping between tile indices and slope IDs.\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use.\r\n * @param {Phaser.Types.Physics.Impact.CollisionOptions} [options] - Options for controlling the mapping from tiles to slope IDs.\r\n *\r\n * @return {Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap.\r\n */\r\n setCollisionMapFromTilemapLayer: function (tilemapLayer, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n var slopeProperty = GetFastValue(options, 'slopeProperty', null);\r\n var slopeMap = GetFastValue(options, 'slopeMap', null);\r\n var collidingSlope = GetFastValue(options, 'defaultCollidingSlope', null);\r\n var nonCollidingSlope = GetFastValue(options, 'defaultNonCollidingSlope', 0);\r\n\r\n var layerData = tilemapLayer.layer;\r\n var tileSize = layerData.baseTileWidth;\r\n var collisionData = [];\r\n\r\n for (var ty = 0; ty < layerData.height; ty++)\r\n {\r\n collisionData[ty] = [];\r\n\r\n for (var tx = 0; tx < layerData.width; tx++)\r\n {\r\n var tile = layerData.data[ty][tx];\r\n\r\n if (tile && tile.collides)\r\n {\r\n if (slopeProperty !== null && HasValue(tile.properties, slopeProperty))\r\n {\r\n collisionData[ty][tx] = parseInt(tile.properties[slopeProperty], 10);\r\n }\r\n else if (slopeMap !== null && HasValue(slopeMap, tile.index))\r\n {\r\n collisionData[ty][tx] = slopeMap[tile.index];\r\n }\r\n else if (collidingSlope !== null)\r\n {\r\n collisionData[ty][tx] = collidingSlope;\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = tile.index;\r\n }\r\n }\r\n else\r\n {\r\n collisionData[ty][tx] = nonCollidingSlope;\r\n }\r\n }\r\n }\r\n\r\n this.collisionMap = new CollisionMap(tileSize, collisionData);\r\n\r\n return this.collisionMap;\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Impact.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=64] - [description]\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 64; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y, thickness, height);\r\n this.updateWall(right, 'right', x + width, y, thickness, height);\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * position = 'left', 'right', 'top' or 'bottom'\r\n *\r\n * @method Phaser.Physics.Impact.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n wall.resetSize(x, y, width, height);\r\n }\r\n else\r\n {\r\n this.walls[position] = this.create(x, y, width, height);\r\n this.walls[position].name = position;\r\n this.walls[position].gravityFactor = 0;\r\n this.walls[position].collides = COLLIDES.FIXED;\r\n }\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n this.bodies.remove(wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a Graphics Game Object used for debug display and enables the world for debug drawing.\r\n *\r\n * @method Phaser.Physics.Impact.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} The Graphics object created that will have the debug visuals drawn to it.\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#getNextID\r\n * @since 3.0.0\r\n *\r\n * @return {integer} [description]\r\n */\r\n getNextID: function ()\r\n {\r\n return this._lastId++;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} sizeX - [description]\r\n * @param {number} sizeY - [description]\r\n *\r\n * @return {Phaser.Physics.Impact.Body} The Body that was added to this World.\r\n */\r\n create: function (x, y, sizeX, sizeY)\r\n {\r\n var body = new Body(this, x, y, sizeX, sizeY);\r\n\r\n this.bodies.set(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} object - The Body to remove from this World.\r\n */\r\n remove: function (object)\r\n {\r\n this.bodies.delete(object);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#pause\r\n * @fires Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#resume\r\n * @fires Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (!this.enabled || this.bodies.size === 0)\r\n {\r\n return;\r\n }\r\n\r\n // Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum\r\n\r\n var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale;\r\n\r\n this.delta = clampedDelta;\r\n\r\n // Update all active bodies\r\n\r\n var i;\r\n var body;\r\n var bodies = this.bodies.entries;\r\n var len = bodies.length;\r\n var hash = {};\r\n var size = this.cellSize;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body.enabled)\r\n {\r\n body.update(clampedDelta);\r\n }\r\n }\r\n\r\n // Run collision against them all now they're in the new positions from the update\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && !body.skipHash())\r\n {\r\n this.checkHash(body, hash, size);\r\n }\r\n }\r\n\r\n if (this.drawDebug)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.clear();\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (body && body.willDrawDebug())\r\n {\r\n body.drawDebug(graphics);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Check the body against the spatial hash.\r\n *\r\n * @method Phaser.Physics.Impact.World#checkHash\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {object} hash - [description]\r\n * @param {number} size - [description]\r\n */\r\n checkHash: function (body, hash, size)\r\n {\r\n var checked = {};\r\n\r\n var xmin = Math.floor(body.pos.x / size);\r\n var ymin = Math.floor(body.pos.y / size);\r\n var xmax = Math.floor((body.pos.x + body.size.x) / size) + 1;\r\n var ymax = Math.floor((body.pos.y + body.size.y) / size) + 1;\r\n\r\n for (var x = xmin; x < xmax; x++)\r\n {\r\n for (var y = ymin; y < ymax; y++)\r\n {\r\n if (!hash[x])\r\n {\r\n hash[x] = {};\r\n hash[x][y] = [ body ];\r\n }\r\n else if (!hash[x][y])\r\n {\r\n hash[x][y] = [ body ];\r\n }\r\n else\r\n {\r\n var cell = hash[x][y];\r\n\r\n for (var c = 0; c < cell.length; c++)\r\n {\r\n if (body.touches(cell[c]) && !checked[cell[c].id])\r\n {\r\n checked[cell[c].id] = true;\r\n\r\n this.checkBodies(body, cell[c]);\r\n }\r\n }\r\n\r\n cell.push(body);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#checkBodies\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body} bodyA - [description]\r\n * @param {Phaser.Physics.Impact.Body} bodyB - [description]\r\n */\r\n checkBodies: function (bodyA, bodyB)\r\n {\r\n // 2 fixed bodies won't do anything\r\n if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED)\r\n {\r\n return;\r\n }\r\n\r\n // bitwise checks\r\n if (bodyA.checkAgainst & bodyB.type)\r\n {\r\n bodyA.check(bodyB);\r\n }\r\n\r\n if (bodyB.checkAgainst & bodyA.type)\r\n {\r\n bodyB.check(bodyA);\r\n }\r\n\r\n if (bodyA.collides && bodyB.collides && bodyA.collides + bodyB.collides > COLLIDES.ACTIVE)\r\n {\r\n Solver(this, bodyA, bodyB);\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCollidesNever: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.NEVER;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setLite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setLite: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.LITE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setPassive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setPassive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.PASSIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setActive: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.ACTIVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setFixed\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setFixed: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].collides = COLLIDES.FIXED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setTypeB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setAvsB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.A;\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setBvsA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].type = TYPE.B;\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstNone: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.NONE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstA: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.A;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on.\r\n *\r\n * @return {Phaser.Physics.Impact.World} This World object.\r\n */\r\n setCheckAgainstB: function (bodies)\r\n {\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n bodies[i].checkAgainst = TYPE.B;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAllListeners();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.scene = null;\r\n\r\n this.bodies.clear();\r\n\r\n this.bodies = null;\r\n\r\n this.collisionMap = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/World.js?")},"./node_modules/phaser/src/physics/impact/components/Acceleration.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Acceleration component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Acceleration\r\n * @since 3.0.0\r\n */\r\nvar Acceleration = {\r\n\r\n /**\r\n * Sets the horizontal acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationX: function (x)\r\n {\r\n this.accel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The amount of acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAccelerationY: function (y)\r\n {\r\n this.accel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical acceleration of this body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The amount of horizontal acceleration to apply.\r\n * @param {number} y - The amount of vertical acceleration to apply.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAcceleration: function (x, y)\r\n {\r\n this.accel.x = x;\r\n this.accel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Acceleration;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Acceleration.js?")},"./node_modules/phaser/src/physics/impact/components/BodyScale.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Body Scale component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyScale\r\n * @since 3.0.0\r\n */\r\nvar BodyScale = {\r\n\r\n /**\r\n * Sets the size of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the body in pixels.\r\n * @param {number} [height=width] - The height of the body in pixels.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodySize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n this.body.size.x = Math.round(width);\r\n this.body.size.y = Math.round(height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} scaleX - The horizontal scale of the body.\r\n * @param {number} [scaleY] - The vertical scale of the body. If not given, will use the horizontal scale value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setBodyScale: function (scaleX, scaleY)\r\n {\r\n if (scaleY === undefined) { scaleY = scaleX; }\r\n\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n gameObject.setScale(scaleX, scaleY);\r\n\r\n return this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n else\r\n {\r\n return this.setBodySize(this.body.size.x * scaleX, this.body.size.y * scaleY);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyScale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyScale.js?")},"./node_modules/phaser/src/physics/impact/components/BodyType.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Body Type component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.BodyType\r\n * @since 3.0.0\r\n */\r\nvar BodyType = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#getBodyType\r\n * @since 3.0.0\r\n *\r\n * @return {number} [description]\r\n */\r\n getBodyType: function ()\r\n {\r\n return this.body.type;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeNone: function ()\r\n {\r\n this.body.type = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeA: function ()\r\n {\r\n this.body.type = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.BodyType#setTypeB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTypeB: function ()\r\n {\r\n this.body.type = TYPE.B;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = BodyType;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/BodyType.js?')},"./node_modules/phaser/src/physics/impact/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Bounce component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the impact physics bounce, or restitution, value.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.bounciness = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the minimum velocity the body is allowed to be moving to be considered for rebound.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The minimum allowed velocity.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMinBounceVelocity: function (value)\r\n {\r\n this.body.minBounceVelocity = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The bounce, or restitution, value of this body.\r\n * A value between 0 (no rebound) and 1 (full rebound)\r\n *\r\n * @name Phaser.Physics.Impact.Components.Bounce#bounce\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n bounce: {\r\n\r\n get: function ()\r\n {\r\n return this.body.bounciness;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.bounciness = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Bounce.js?")},"./node_modules/phaser/src/physics/impact/components/CheckAgainst.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TYPE = __webpack_require__(/*! ../TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js");\r\n\r\n/**\r\n * The Impact Check Against component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.CheckAgainst\r\n * @since 3.0.0\r\n */\r\nvar CheckAgainst = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAvsB: function ()\r\n {\r\n this.setTypeA();\r\n\r\n return this.setCheckAgainstB();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBvsA: function ()\r\n {\r\n this.setTypeB();\r\n\r\n return this.setCheckAgainstA();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstNone: function ()\r\n {\r\n this.body.checkAgainst = TYPE.NONE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstA: function ()\r\n {\r\n this.body.checkAgainst = TYPE.A;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCheckAgainstB: function ()\r\n {\r\n this.body.checkAgainst = TYPE.B;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n checkAgainst: {\r\n\r\n get: function ()\r\n {\r\n return this.body.checkAgainst;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.checkAgainst = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = CheckAgainst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/CheckAgainst.js?')},"./node_modules/phaser/src/physics/impact/components/Collides.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar COLLIDES = __webpack_require__(/*! ../COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js");\r\n\r\n/**\r\n * @callback CollideCallback\r\n *\r\n * @param {Phaser.Physics.Impact.Body} body - [description]\r\n * @param {Phaser.Physics.Impact.Body} other - [description]\r\n * @param {string} axis - [description]\r\n */\r\n\r\n/**\r\n * The Impact Collides component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Collides\r\n * @since 3.0.0\r\n */\r\nvar Collides = {\r\n\r\n _collideCallback: null,\r\n _callbackScope: null,\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback\r\n * @since 3.0.0\r\n *\r\n * @param {CollideCallback} callback - [description]\r\n * @param {*} scope - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollideCallback: function (callback, scope)\r\n {\r\n this._collideCallback = callback;\r\n\r\n if (scope)\r\n {\r\n this._callbackScope = scope;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesNever: function ()\r\n {\r\n this.body.collides = COLLIDES.NEVER;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setLiteCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.LITE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPassiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.PASSIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setActiveCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.ACTIVE;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision\r\n * @since 3.6.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFixedCollision: function ()\r\n {\r\n this.body.collides = COLLIDES.FIXED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Collides#collides\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n\r\n get: function ()\r\n {\r\n return this.body.collides;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.collides = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collides;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Collides.js?')},"./node_modules/phaser/src/physics/impact/components/Debug.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Debug component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Debug\r\n * @since 3.0.0\r\n */\r\nvar Debug = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebug\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} showBody - [description]\r\n * @param {boolean} showVelocity - [description]\r\n * @param {number} bodyColor - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebug: function (showBody, showVelocity, bodyColor)\r\n {\r\n this.debugShowBody = showBody;\r\n this.debugShowVelocity = showVelocity;\r\n this.debugBodyColor = bodyColor;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDebugBodyColor: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowBody\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowBody: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowBody;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowBody = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n debugShowVelocity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugShowVelocity;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugShowVelocity = value;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n debugBodyColor: {\r\n\r\n get: function ()\r\n {\r\n return this.body.debugBodyColor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.debugBodyColor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Debug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Debug.js?")},"./node_modules/phaser/src/physics/impact/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Friction component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionX: function (x)\r\n {\r\n this.friction.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFrictionY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionY: function (y)\r\n {\r\n this.friction.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (x, y)\r\n {\r\n this.friction.x = x;\r\n this.friction.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Friction.js?")},"./node_modules/phaser/src/physics/impact/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Gravity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Gravity#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGravity: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Impact.Components.Gravity#gravity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n gravity: {\r\n\r\n get: function ()\r\n {\r\n return this.body.gravityFactor;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.body.gravityFactor = value;\r\n }\r\n\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Gravity.js?")},"./node_modules/phaser/src/physics/impact/components/Offset.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Offset component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Offset\r\n * @since 3.0.0\r\n */\r\nvar Offset = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.Offset#setOffset\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} [width] - [description]\r\n * @param {number} [height] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setOffset: function (x, y, width, height)\r\n {\r\n this.body.offset.x = x;\r\n this.body.offset.y = y;\r\n\r\n if (width)\r\n {\r\n this.setBodySize(width, height);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Offset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Offset.js?")},"./node_modules/phaser/src/physics/impact/components/SetGameObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Set Game Object component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.SetGameObject\r\n * @since 3.0.0\r\n */\r\nvar SetGameObject = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - [description]\r\n * @param {boolean} [sync=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setGameObject: function (gameObject, sync)\r\n {\r\n if (sync === undefined) { sync = true; }\r\n\r\n if (gameObject)\r\n {\r\n this.body.gameObject = gameObject;\r\n\r\n if (sync)\r\n {\r\n this.syncGameObject();\r\n }\r\n }\r\n else\r\n {\r\n this.body.gameObject = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n syncGameObject: function ()\r\n {\r\n var gameObject = this.body.gameObject;\r\n\r\n if (gameObject)\r\n {\r\n this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/SetGameObject.js?")},"./node_modules/phaser/src/physics/impact/components/Velocity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Velocity component.\r\n * Should be applied as a mixin.\r\n *\r\n * @namespace Phaser.Physics.Impact.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this.vel.x = x;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal and vertical velocities of the physics body.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.vel.x = x;\r\n this.vel.y = y;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the maximum velocity this body can travel at.\r\n *\r\n * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The maximum allowed horizontal velocity.\r\n * @param {number} [y=x] - The maximum allowed vertical velocity. If not given, defaults to the horizontal value.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setMaxVelocity: function (x, y)\r\n {\r\n if (y === undefined) { y = x; }\r\n\r\n this.maxVel.x = x;\r\n this.maxVel.y = y;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/Velocity.js?")},"./node_modules/phaser/src/physics/impact/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Acceleration: __webpack_require__(/*! ./Acceleration */ "./node_modules/phaser/src/physics/impact/components/Acceleration.js"),\r\n BodyScale: __webpack_require__(/*! ./BodyScale */ "./node_modules/phaser/src/physics/impact/components/BodyScale.js"),\r\n BodyType: __webpack_require__(/*! ./BodyType */ "./node_modules/phaser/src/physics/impact/components/BodyType.js"),\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/impact/components/Bounce.js"),\r\n CheckAgainst: __webpack_require__(/*! ./CheckAgainst */ "./node_modules/phaser/src/physics/impact/components/CheckAgainst.js"),\r\n Collides: __webpack_require__(/*! ./Collides */ "./node_modules/phaser/src/physics/impact/components/Collides.js"),\r\n Debug: __webpack_require__(/*! ./Debug */ "./node_modules/phaser/src/physics/impact/components/Debug.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/impact/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/impact/components/Gravity.js"),\r\n Offset: __webpack_require__(/*! ./Offset */ "./node_modules/phaser/src/physics/impact/components/Offset.js"),\r\n SetGameObject: __webpack_require__(/*! ./SetGameObject */ "./node_modules/phaser/src/physics/impact/components/SetGameObject.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/impact/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/components/index.js?')},"./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Collide Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance if two bodies collide.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('collide', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#COLLIDE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Impact.Body} bodyA - The first body involved in the collision.\r\n * @param {Phaser.Physics.Impact.Body} bodyB - The second body involved in the collision.\r\n * @param {string} axis - The collision axis. Either `x` or `y`.\r\n */\r\nmodule.exports = 'collide';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Impact Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Impact Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.impact.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Impact.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/impact/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Impact.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COLLIDE: __webpack_require__(/*! ./COLLIDE_EVENT */ "./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/events/index.js?')},"./node_modules/phaser/src/physics/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * An Impact.js compatible physics world, body and solver, for those who are used\r\n * to the Impact way of defining and controlling physics bodies. Also works with\r\n * the new Loader support for Weltmeister map data.\r\n *\r\n * World updated to run off the Phaser main loop.\r\n * Body extended to support additional setter functions.\r\n *\r\n * To create the map data you\'ll need Weltmeister, which comes with Impact\r\n * and can be purchased from http://impactjs.com\r\n *\r\n * My thanks to Dominic Szablewski for his permission to support Impact in Phaser.\r\n *\r\n * @namespace Phaser.Physics.Impact\r\n */\r\nmodule.exports = {\r\n\r\n Body: __webpack_require__(/*! ./Body */ "./node_modules/phaser/src/physics/impact/Body.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/impact/events/index.js"),\r\n COLLIDES: __webpack_require__(/*! ./COLLIDES */ "./node_modules/phaser/src/physics/impact/COLLIDES.js"),\r\n CollisionMap: __webpack_require__(/*! ./CollisionMap */ "./node_modules/phaser/src/physics/impact/CollisionMap.js"),\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/impact/Factory.js"),\r\n Image: __webpack_require__(/*! ./ImpactImage */ "./node_modules/phaser/src/physics/impact/ImpactImage.js"),\r\n ImpactBody: __webpack_require__(/*! ./ImpactBody */ "./node_modules/phaser/src/physics/impact/ImpactBody.js"),\r\n ImpactPhysics: __webpack_require__(/*! ./ImpactPhysics */ "./node_modules/phaser/src/physics/impact/ImpactPhysics.js"),\r\n Sprite: __webpack_require__(/*! ./ImpactSprite */ "./node_modules/phaser/src/physics/impact/ImpactSprite.js"),\r\n TYPE: __webpack_require__(/*! ./TYPE */ "./node_modules/phaser/src/physics/impact/TYPE.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/impact/World.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/impact/index.js?')},"./node_modules/phaser/src/physics/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Physics\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Arcade: __webpack_require__(/*! ./arcade */ "./node_modules/phaser/src/physics/arcade/index.js"),\r\n Impact: __webpack_require__(/*! ./impact */ "./node_modules/phaser/src/physics/impact/index.js"),\r\n Matter: __webpack_require__(/*! ./matter-js */ "./node_modules/phaser/src/physics/matter-js/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/index.js?')},"./node_modules/phaser/src/physics/matter-js/CustomMain.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Matter\r\n */\r\n\r\nvar Matter = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\n\r\nMatter.Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nMatter.Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nMatter.World = __webpack_require__(/*! ./lib/body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\n\r\nMatter.Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nMatter.Grid = __webpack_require__(/*! ./lib/collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nMatter.Pairs = __webpack_require__(/*! ./lib/collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nMatter.Pair = __webpack_require__(/*! ./lib/collision/Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nMatter.Query = __webpack_require__(/*! ./lib/collision/Query */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js");\r\nMatter.Resolver = __webpack_require__(/*! ./lib/collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nMatter.SAT = __webpack_require__(/*! ./lib/collision/SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\n\r\nMatter.Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\n\r\nMatter.Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nMatter.Engine = __webpack_require__(/*! ./lib/core/Engine */ "./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js");\r\nMatter.Events = __webpack_require__(/*! ./lib/core/Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nMatter.Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nMatter.Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\n\r\nMatter.Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nMatter.Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\n\r\nMatter.Axes = __webpack_require__(/*! ./lib/geometry/Axes */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js");\r\nMatter.Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nMatter.Svg = __webpack_require__(/*! ./lib/geometry/Svg */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js");\r\nMatter.Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nMatter.Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n// aliases\r\n\r\nMatter.World.add = Matter.Composite.add;\r\nMatter.World.remove = Matter.Composite.remove;\r\nMatter.World.addComposite = Matter.Composite.addComposite;\r\nMatter.World.addBody = Matter.Composite.addBody;\r\nMatter.World.addConstraint = Matter.Composite.addConstraint;\r\nMatter.World.clear = Matter.Composite.clear;\r\n\r\nmodule.exports = Matter;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/CustomMain.js?')},"./node_modules/phaser/src/physics/matter-js/Factory.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composites = __webpack_require__(/*! ./lib/factory/Composites */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar MatterGameObject = __webpack_require__(/*! ./MatterGameObject */ "./node_modules/phaser/src/physics/matter-js/MatterGameObject.js");\r\nvar MatterImage = __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js");\r\nvar MatterSprite = __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js");\r\nvar PointerConstraint = __webpack_require__(/*! ./PointerConstraint */ "./node_modules/phaser/src/physics/matter-js/PointerConstraint.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * The Matter Factory can create different types of bodies and them to a physics world.\r\n *\r\n * @class Factory\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter World which this Factory adds to.\r\n */\r\nvar Factory = new Class({\r\n\r\n initialize:\r\n\r\n function Factory (world)\r\n {\r\n /**\r\n * The Matter World which this Factory adds to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Scene which this Factory\'s Matter World belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = world.scene;\r\n\r\n /**\r\n * A reference to the Scene.Systems this Matter Physics instance belongs to.\r\n *\r\n * @name Phaser.Physics.Matter.Factory#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = world.scene.sys;\r\n },\r\n\r\n /**\r\n * Creates a new rigid rectangular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#rectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the Body.\r\n * @param {number} height - The height of the Body.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n rectangle: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid trapezoidal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#trapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} width - The width of the trapezoid of the Body.\r\n * @param {number} height - The height of the trapezoid of the Body.\r\n * @param {number} slope - The slope of the trapezoid. 0 creates a rectangle, while 1 creates a triangle. Positive values make the top side shorter, while negative values make the bottom side shorter.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n trapezoid: function (x, y, width, height, slope, options)\r\n {\r\n var body = Bodies.trapezoid(x, y, width, height, slope, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid circular Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#circle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} radius - The radius of the circle.\r\n * @param {object} [options] - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n * @param {number} [maxSides] - The maximum amount of sides to use for the polygon which will approximate this circle.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n circle: function (x, y, radius, options, maxSides)\r\n {\r\n var body = Bodies.circle(x, y, radius, options, maxSides);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a new rigid polygonal Body and adds it to the World.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#polygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {number} sides - The number of sides the polygon will have.\r\n * @param {number} radius - The "radius" of the polygon, i.e. the distance from its center to any vertex. This is also the radius of its circumcircle.\r\n * @param {object} options - An object of properties to set on the Body. You can also specify a `chamfer` property to automatically adjust the body.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n polygon: function (x, y, sides, radius, options)\r\n {\r\n var body = Bodies.polygon(x, y, sides, radius, options);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices) and adds it to the World.\r\n * If the vertices are convex, they will pass through as supplied. Otherwise, if the vertices are concave, they will be decomposed. Note that this process is not guaranteed to support complex sets of vertices, e.g. ones with holes.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#fromVertices\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The X coordinate of the center of the Body.\r\n * @param {number} y - The Y coordinate of the center of the Body.\r\n * @param {(string|array)} vertexSets - [description]\r\n * @param {object} [options] - [description]\r\n * @param {boolean} [flagInternal=false] - Flag internal edges (coincident part edges)\r\n * @param {number} [removeCollinear=0.01] - Whether Matter.js will discard collinear edges (to improve performance).\r\n * @param {number} [minimumArea=10] - During decomposition discard parts that have an area less than this.\r\n *\r\n * @return {MatterJS.Body} A Matter JS Body.\r\n */\r\n fromVertices: function (x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea)\r\n {\r\n if (typeof vertexSets === \'string\')\r\n {\r\n vertexSets = Vertices.fromPath(vertexSets);\r\n }\r\n\r\n var body = Bodies.fromVertices(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea);\r\n\r\n this.world.add(body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Create a new composite containing Matter Image objects created in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#imageStack\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} frame - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} [columnGap=0] - The distance between each column.\r\n * @param {number} [rowGap=0] - The distance between each row.\r\n * @param {object} [options] - [description]\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite Stack.\r\n */\r\n imageStack: function (key, frame, x, y, columns, rows, columnGap, rowGap, options)\r\n {\r\n if (columnGap === undefined) { columnGap = 0; }\r\n if (rowGap === undefined) { rowGap = 0; }\r\n if (options === undefined) { options = {}; }\r\n\r\n var world = this.world;\r\n var displayList = this.sys.displayList;\r\n\r\n options.addToWorld = false;\r\n\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, function (x, y)\r\n {\r\n var image = new MatterImage(world, x, y, key, frame, options);\r\n\r\n displayList.add(image);\r\n\r\n return image.body;\r\n });\r\n\r\n world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#stack\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the grid.\r\n * @param {number} rows - The number of rows in the grid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback that creates the stack.\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects created in the callback.\r\n */\r\n stack: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.stack(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body bounds to prevent overlaps.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pyramid\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the pyramid.\r\n * @param {number} rows - The number of rows in the pyramid.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {function} callback - The callback function to be invoked.\r\n *\r\n * @return {MatterJS.Composite} A Matter JS Composite pyramid.\r\n */\r\n pyramid: function (x, y, columns, rows, columnGap, rowGap, callback)\r\n {\r\n var stack = Composites.pyramid(x, y, columns, rows, columnGap, rowGap, callback);\r\n\r\n this.world.add(stack);\r\n\r\n return stack;\r\n },\r\n\r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#chain\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} xOffsetA - [description]\r\n * @param {number} yOffsetA - [description]\r\n * @param {number} xOffsetB - [description]\r\n * @param {number} yOffsetB - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite containing objects chained together with constraints.\r\n */\r\n chain: function (composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options)\r\n {\r\n return Composites.chain(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options);\r\n },\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mesh\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Composite} composite - [description]\r\n * @param {number} columns - [description]\r\n * @param {number} rows - [description]\r\n * @param {boolean} crossBrace - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Composite} The composite containing objects meshed together with constraints.\r\n */\r\n mesh: function (composite, columns, rows, crossBrace, options)\r\n {\r\n return Composites.mesh(composite, columns, rows, crossBrace, options);\r\n },\r\n\r\n /**\r\n * Creates a composite with a Newton\'s Cradle setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#newtonsCradle\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} number - [description]\r\n * @param {number} size - [description]\r\n * @param {number} length - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite newtonsCradle body.\r\n */\r\n newtonsCradle: function (x, y, number, size, length)\r\n {\r\n var composite = Composites.newtonsCradle(x, y, number, size, length);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#car\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} wheelSize - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite car body.\r\n */\r\n car: function (x, y, width, height, wheelSize)\r\n {\r\n var composite = Composites.car(x, y, width, height, wheelSize);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#softBody\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this composite in the world.\r\n * @param {number} y - The vertical position of this composite in the world.\r\n * @param {number} columns - The number of columns in the Composite.\r\n * @param {number} rows - The number of rows in the Composite.\r\n * @param {number} columnGap - The distance between each column.\r\n * @param {number} rowGap - The distance between each row.\r\n * @param {boolean} crossBrace - [description]\r\n * @param {number} particleRadius - The radius of this circlular composite.\r\n * @param {object} particleOptions - [description]\r\n * @param {object} constraintOptions - [description]\r\n *\r\n * @return {MatterJS.Composite} A new composite simple soft body.\r\n */\r\n softBody: function (x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions)\r\n {\r\n var composite = Composites.softBody(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions);\r\n\r\n this.world.add(composite);\r\n\r\n return composite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#joint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n joint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#spring\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n spring: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n return this.constraint(bodyA, bodyB, length, stiffness, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#constraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyA - The first possible `Body` that this constraint is attached to.\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n constraint: function (bodyA, bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyA = (bodyA.type === \'body\') ? bodyA : bodyA.body;\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#worldConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} bodyB - The second possible `Body` that this constraint is attached to.\r\n * @param {number} [length] - A Number that specifies the target resting length of the constraint. If not given it is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n * @param {number} [stiffness=1] - A Number that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`. A value of `1` means the constraint should be very stiff. A value of `0.2` means the constraint acts as a soft spring.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n worldConstraint: function (bodyB, length, stiffness, options)\r\n {\r\n if (stiffness === undefined) { stiffness = 1; }\r\n if (options === undefined) { options = {}; }\r\n\r\n options.bodyB = (bodyB.type === \'body\') ? bodyB : bodyB.body;\r\n\r\n if (!isNaN(length))\r\n {\r\n options.length = length;\r\n }\r\n\r\n options.stiffness = stiffness;\r\n\r\n var constraint = Constraint.create(options);\r\n\r\n this.world.add(constraint);\r\n\r\n return constraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#mouseSpring\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n mouseSpring: function (options)\r\n {\r\n return this.pointerConstraint(options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#pointerConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {object} options - [description]\r\n *\r\n * @return {MatterJS.Constraint} A Matter JS Constraint.\r\n */\r\n pointerConstraint: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n if (!options.hasOwnProperty(\'render\'))\r\n {\r\n options.render = { visible: false };\r\n }\r\n\r\n var pointerConstraint = new PointerConstraint(this.scene, this.world, options);\r\n\r\n this.world.add(pointerConstraint.constraint);\r\n\r\n return pointerConstraint;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#image\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Image} [description]\r\n */\r\n image: function (x, y, key, frame, options)\r\n {\r\n var image = new MatterImage(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(image);\r\n\r\n return image;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#tileBody\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} [description]\r\n */\r\n tileBody: function (tile, options)\r\n {\r\n var tileBody = new MatterTileBody(this.world, tile, options);\r\n\r\n return tileBody;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#sprite\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} key - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.\r\n * @param {object} [options={}] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.Sprite} [description]\r\n */\r\n sprite: function (x, y, key, frame, options)\r\n {\r\n var sprite = new MatterSprite(this.world, x, y, key, frame, options);\r\n\r\n this.sys.displayList.add(sprite);\r\n this.sys.updateList.add(sprite);\r\n\r\n return sprite;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Factory#gameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to inject the Matter Body in to.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that had the Matter Body injected into it.\r\n */\r\n gameObject: function (gameObject, options)\r\n {\r\n return MatterGameObject(this.world, gameObject, options);\r\n },\r\n\r\n /**\r\n * Instantly sets the linear velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#velocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {Phaser.Types.Math.Vector2Like} velocity - The velocity to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n velocity: function (body, velocity)\r\n {\r\n Body.setVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Instantly sets the angular velocity of the given body. Position, angle, force etc. are unchanged.\r\n * \r\n * See also `force`.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#angularVelocity\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the velocity on.\r\n * @param {number} velocity - The angular velocity to set.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n angularVelocity: function (body, velocity)\r\n {\r\n Body.setAngularVelocity(body, velocity);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#force\r\n * @since 3.18.0\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to set the force on.\r\n * @param {Phaser.Types.Math.Vector2Like} position - The world position to apply the force from. An object with public `x` and `y` components.\r\n * @param {Phaser.Types.Math.Vector2Like} force - The force to set. An object with public `x` and `y` components.\r\n *\r\n * @return {MatterJS.Body} The Matter body.\r\n */\r\n force: function (body, position, force)\r\n {\r\n Body.applyForce(body, position, force);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Destroys this Factory.\r\n *\r\n * @method Phaser.Physics.Matter.Factory#destroy\r\n * @since 3.5.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world = null;\r\n this.scene = null;\r\n this.sys = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Factory;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/Factory.js?')},"./node_modules/phaser/src/physics/matter-js/MatterGameObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * Internal function to check if the object has a getter or setter.\r\n *\r\n * @function hasGetterOrSetter\r\n * @private\r\n *\r\n * @param {object} def - The object to check.\r\n *\r\n * @return {boolean} True if it has a getter or setter, otherwise false.\r\n */\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Physics.Matter.MatterGameObject\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - The Matter world to add the body to.\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object that will have the Matter body applied to it.\r\n * @param {(object|MatterJS.Body)} options - A Matter Body configuration object, or an instance of a Matter Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object that was created with the Matter body.\r\n */\r\nvar MatterGameObject = function (world, gameObject, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var x = gameObject.x;\r\n var y = gameObject.y;\r\n\r\n // Temp body pos to avoid body null checks\r\n gameObject.body = {\r\n temp: true,\r\n position: {\r\n x: x,\r\n y: y\r\n }\r\n };\r\n\r\n var mixins = [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity\r\n ];\r\n\r\n // First let's inject all of the components into the Game Object\r\n mixins.forEach(function (mixin)\r\n {\r\n for (var key in mixin)\r\n {\r\n if (hasGetterOrSetter(mixin[key]))\r\n {\r\n Object.defineProperty(gameObject, key, {\r\n get: mixin[key].get,\r\n set: mixin[key].set\r\n });\r\n }\r\n else\r\n {\r\n Object.defineProperty(gameObject, key, {value: mixin[key]});\r\n }\r\n }\r\n\r\n });\r\n\r\n gameObject.world = world;\r\n\r\n gameObject._tempVec2 = new Vector2(x, y);\r\n\r\n if (options.hasOwnProperty('type') && options.type === 'body')\r\n {\r\n gameObject.setExistingBody(options, true);\r\n }\r\n else\r\n {\r\n var shape = GetFastValue(options, 'shape', null);\r\n\r\n if (!shape)\r\n {\r\n shape = 'rectangle';\r\n }\r\n \r\n gameObject.setBody(shape, options);\r\n }\r\n\r\n return gameObject;\r\n};\r\n\r\nmodule.exports = MatterGameObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterGameObject.js?")},"./node_modules/phaser/src/physics/matter-js/MatterImage.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Image = __webpack_require__(/*! ../../gameobjects/image/Image */ "./node_modules/phaser/src/gameobjects/image/Image.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Image Game Object.\r\n * \r\n * An Image is a light-weight Game Object useful for the display of static images in your game,\r\n * such as logos, backgrounds, scenery or other non-animated elements. Images can have input\r\n * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an\r\n * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component.\r\n *\r\n * @class Image\r\n * @extends Phaser.GameObjects.Image\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterImage = new Class({\r\n\r\n Extends: Image,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterImage (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Image\');\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Image#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterImage;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterImage.js?')},"./node_modules/phaser/src/physics/matter-js/MatterPhysics.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Factory = __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar MatterAttractors = __webpack_require__(/*! ./lib/plugins/MatterAttractors */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js");\r\nvar MatterLib = __webpack_require__(/*! ./lib/core/Matter */ "./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js");\r\nvar MatterWrap = __webpack_require__(/*! ./lib/plugins/MatterWrap */ "./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Plugin = __webpack_require__(/*! ./lib/core/Plugin */ "./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js");\r\nvar PluginCache = __webpack_require__(/*! ../../plugins/PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js");\r\nvar SceneEvents = __webpack_require__(/*! ../../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\nvar World = __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class MatterPhysics\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - [description]\r\n */\r\nvar MatterPhysics = new Class({\r\n\r\n initialize:\r\n\r\n function MatterPhysics (scene)\r\n {\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = this.getConfig();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#add\r\n * @type {Phaser.Physics.Matter.Factory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the `Matter.Vertices` module which contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#verts\r\n * @type {MatterJS.Vertices}\r\n * @since 3.14.0\r\n */\r\n this.verts = Vertices;\r\n\r\n /**\r\n * A reference to the `Matter.Body` module which contains methods for creating and manipulating body models.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#body\r\n * @type {MatterJS.Body}\r\n * @since 3.18.0\r\n */\r\n this.body = Body;\r\n\r\n /**\r\n * A reference to the `Matter.Bodies` module which contains methods for creating bodies.\r\n *\r\n * @name Phaser.Physics.Matter.MatterPhysics#bodies\r\n * @type {MatterJS.Bodies}\r\n * @since 3.18.0\r\n */\r\n this.bodies = Bodies;\r\n\r\n // Matter plugins\r\n\r\n if (GetValue(this.config, \'plugins.attractors\', false))\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n }\r\n\r\n if (GetValue(this.config, \'plugins.wrap\', false))\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n }\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n if (!this.world)\r\n {\r\n this.world = new World(this.scene, this.config);\r\n this.add = new Factory(this.world);\r\n }\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.on(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#getConfig\r\n * @since 3.0.0\r\n *\r\n * @return {object} [description]\r\n */\r\n getConfig: function ()\r\n {\r\n var gameConfig = this.systems.game.config.physics;\r\n var sceneConfig = this.systems.settings.physics;\r\n\r\n var config = Merge(\r\n GetFastValue(sceneConfig, \'matter\', {}),\r\n GetFastValue(gameConfig, \'matter\', {})\r\n );\r\n\r\n return config;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableAttractorPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableAttractorPlugin: function ()\r\n {\r\n Plugin.register(MatterAttractors);\r\n Plugin.use(MatterLib, MatterAttractors);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#enableWrapPlugin\r\n * @since 3.0.0\r\n * \r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n enableWrapPlugin: function ()\r\n {\r\n Plugin.register(MatterWrap);\r\n Plugin.use(MatterLib, MatterWrap);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#pause\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n return this.world.pause();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#resume\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} The Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n return this.world.resume();\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 60Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set60Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update60Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the Matter Engine to run at fixed timestep of 30Hz and enables `autoUpdate`.\r\n * If you have set a custom `getDelta` function then this will override it.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#set30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {Phaser.Physics.Matter.MatterPhysics} This Matter Physics instance.\r\n */\r\n set30Hz: function ()\r\n {\r\n this.world.getDelta = this.world.update30Hz;\r\n this.world.autoUpdate = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n this.world.step(delta, correction);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world);\r\n eventEmitter.off(SceneEvents.POST_UPDATE, this.world.postUpdate, this.world);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.add.destroy();\r\n this.world.destroy();\r\n\r\n this.add = null;\r\n this.world = null;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Physics.Matter.MatterPhysics#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register(\'MatterPhysics\', MatterPhysics, \'matterPhysics\');\r\n\r\nmodule.exports = MatterPhysics;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterPhysics.js?')},"./node_modules/phaser/src/physics/matter-js/MatterSprite.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar AnimationComponent = __webpack_require__(/*! ../../gameobjects/components/Animation */ "./node_modules/phaser/src/gameobjects/components/Animation.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Components = __webpack_require__(/*! ./components */ "./node_modules/phaser/src/physics/matter-js/components/index.js");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ "./node_modules/phaser/src/gameobjects/GameObject.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Pipeline = __webpack_require__(/*! ../../gameobjects/components/Pipeline */ "./node_modules/phaser/src/gameobjects/components/Pipeline.js");\r\nvar Sprite = __webpack_require__(/*! ../../gameobjects/sprite/Sprite */ "./node_modules/phaser/src/gameobjects/sprite/Sprite.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Matter Physics Sprite Game Object.\r\n *\r\n * A Sprite Game Object is used for the display of both static and animated images in your game.\r\n * Sprites can have input events and physics bodies. They can also be tweened, tinted, scrolled\r\n * and animated.\r\n *\r\n * The main difference between a Sprite and an Image Game Object is that you cannot animate Images.\r\n * As such, Sprites take a fraction longer to process and have a larger API footprint due to the Animation\r\n * Component. If you do not require animation then you can safely use Images to replace Sprites in all cases.\r\n *\r\n * @class Sprite\r\n * @extends Phaser.GameObjects.Sprite\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Force\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.SetBody\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n * @extends Phaser.Physics.Matter.Components.Transform\r\n * @extends Phaser.Physics.Matter.Components.Velocity\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Size\r\n * @extends Phaser.GameObjects.Components.Texture\r\n * @extends Phaser.GameObjects.Components.Tint\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {number} x - The horizontal position of this Game Object in the world.\r\n * @param {number} y - The vertical position of this Game Object in the world.\r\n * @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.\r\n * @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.\r\n * @param {object} [options={}] - Matter.js configuration object.\r\n */\r\nvar MatterSprite = new Class({\r\n\r\n Extends: Sprite,\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Force,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.SetBody,\r\n Components.Sleep,\r\n Components.Static,\r\n Components.Transform,\r\n Components.Velocity,\r\n Pipeline\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterSprite (world, x, y, texture, frame, options)\r\n {\r\n GameObject.call(this, world.scene, \'Sprite\');\r\n\r\n this.anims = new AnimationComponent(this);\r\n\r\n this.setTexture(texture, frame);\r\n this.setSizeToFrame();\r\n this.setOrigin();\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Physics.Matter.Sprite#_tempVec2\r\n * @type {Phaser.Math.Vector2}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempVec2 = new Vector2(x, y);\r\n\r\n var shape = GetFastValue(options, \'shape\', null);\r\n\r\n if (shape)\r\n {\r\n this.setBody(shape, options);\r\n }\r\n else\r\n {\r\n this.setRectangle(this.width, this.height, options);\r\n }\r\n\r\n this.setPosition(x, y);\r\n\r\n this.initPipeline(\'TextureTintPipeline\');\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterSprite;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterSprite.js?')},"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/physics/matter-js/components/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ \"./node_modules/phaser/src/utils/object/HasValue.js\");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A wrapper around a Tile that provides access to a corresponding Matter body. A tile can only\r\n * have one Matter body associated with it. You can either pass in an existing Matter body for\r\n * the tile or allow the constructor to create the corresponding body for you. If the Tile has a\r\n * collision group (defined in Tiled), those shapes will be used to create the body. If not, the\r\n * tile's rectangle bounding box will be used.\r\n *\r\n * The corresponding body will be accessible on the Tile itself via Tile.physics.matterBody.\r\n *\r\n * Note: not all Tiled collision shapes are supported. See\r\n * Phaser.Physics.Matter.TileBody#setFromTileCollision for more information.\r\n *\r\n * @class TileBody\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.Physics.Matter.Components.Bounce\r\n * @extends Phaser.Physics.Matter.Components.Collision\r\n * @extends Phaser.Physics.Matter.Components.Friction\r\n * @extends Phaser.Physics.Matter.Components.Gravity\r\n * @extends Phaser.Physics.Matter.Components.Mass\r\n * @extends Phaser.Physics.Matter.Components.Sensor\r\n * @extends Phaser.Physics.Matter.Components.Sleep\r\n * @extends Phaser.Physics.Matter.Components.Static\r\n *\r\n * @param {Phaser.Physics.Matter.World} world - [description]\r\n * @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body.\r\n * @param {Phaser.Types.Physics.Matter.MatterTileOptions} [options] - Options to be used when creating the Matter body.\r\n */\r\nvar MatterTileBody = new Class({\r\n\r\n Mixins: [\r\n Components.Bounce,\r\n Components.Collision,\r\n Components.Friction,\r\n Components.Gravity,\r\n Components.Mass,\r\n Components.Sensor,\r\n Components.Sleep,\r\n Components.Static\r\n ],\r\n\r\n initialize:\r\n\r\n function MatterTileBody (world, tile, options)\r\n {\r\n /**\r\n * The tile object the body is associated with.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#tile\r\n * @type {Phaser.Tilemaps.Tile}\r\n * @since 3.0.0\r\n */\r\n this.tile = tile;\r\n\r\n /**\r\n * The Matter world the body exists within.\r\n *\r\n * @name Phaser.Physics.Matter.TileBody#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n // Install a reference to 'this' on the tile and ensure there can only be one matter body\r\n // associated with the tile\r\n if (tile.physics.matterBody)\r\n {\r\n tile.physics.matterBody.destroy();\r\n }\r\n\r\n tile.physics.matterBody = this;\r\n\r\n // Set the body either from an existing body (if provided), the shapes in the tileset\r\n // collision layer (if it exists) or a rectangle matching the tile.\r\n var body = GetFastValue(options, 'body', null);\r\n\r\n var addToWorld = GetFastValue(options, 'addToWorld', true);\r\n\r\n if (!body)\r\n {\r\n var collisionGroup = tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n if (collisionObjects.length > 0)\r\n {\r\n this.setFromTileCollision(options);\r\n }\r\n else\r\n {\r\n this.setFromTileRectangle(options);\r\n }\r\n }\r\n else\r\n {\r\n this.setBody(body, addToWorld);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the current body to a rectangle that matches the bounds of the tile.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileRectangle: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var bounds = this.tile.getBounds();\r\n var cx = bounds.x + (bounds.width / 2);\r\n var cy = bounds.y + (bounds.height / 2);\r\n var body = Bodies.rectangle(cx, cy, bounds.width, bounds.height, options);\r\n\r\n this.setBody(body, options.addToWorld);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body from the collision group associated with the Tile. This is typically\r\n * set up in Tiled's collision editor.\r\n *\r\n * Note: Matter doesn't support all shapes from Tiled. Rectangles and polygons are directly\r\n * supported. Ellipses are converted into circle bodies. Polylines are treated as if they are\r\n * closed polygons. If a tile has multiple shapes, a multi-part body will be created. Concave\r\n * shapes are supported if poly-decomp library is included. Decomposition is not guaranteed to\r\n * work for complex shapes (e.g. holes), so it's often best to manually decompose a concave\r\n * polygon into multiple convex polygons yourself.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setFromTileCollision\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Physics.Matter.MatterBodyTileOptions} [options] - Options to be used when creating the Matter body. See MatterJS.Body for a list of what Matter accepts.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setFromTileCollision: function (options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n if (!HasValue(options, 'isStatic')) { options.isStatic = true; }\r\n if (!HasValue(options, 'addToWorld')) { options.addToWorld = true; }\r\n\r\n var sx = this.tile.tilemapLayer.scaleX;\r\n var sy = this.tile.tilemapLayer.scaleY;\r\n var tileX = this.tile.getLeft();\r\n var tileY = this.tile.getTop();\r\n var collisionGroup = this.tile.getCollisionGroup();\r\n var collisionObjects = GetFastValue(collisionGroup, 'objects', []);\r\n\r\n var parts = [];\r\n\r\n for (var i = 0; i < collisionObjects.length; i++)\r\n {\r\n var object = collisionObjects[i];\r\n var ox = tileX + (object.x * sx);\r\n var oy = tileY + (object.y * sy);\r\n var ow = object.width * sx;\r\n var oh = object.height * sy;\r\n var body = null;\r\n\r\n if (object.rectangle)\r\n {\r\n body = Bodies.rectangle(ox + ow / 2, oy + oh / 2, ow, oh, options);\r\n }\r\n else if (object.ellipse)\r\n {\r\n body = Bodies.circle(ox + ow / 2, oy + oh / 2, ow / 2, options);\r\n }\r\n else if (object.polygon || object.polyline)\r\n {\r\n // Polygons and polylines are both treated as closed polygons\r\n var originalPoints = object.polygon ? object.polygon : object.polyline;\r\n\r\n var points = originalPoints.map(function (p)\r\n {\r\n return { x: p.x * sx, y: p.y * sy };\r\n });\r\n\r\n var vertices = Vertices.create(points);\r\n\r\n // Points are relative to the object's origin (first point placed in Tiled), but\r\n // matter expects points to be relative to the center of mass. This only applies to\r\n // convex shapes. When a concave shape is decomposed, multiple parts are created and\r\n // the individual parts are positioned relative to (ox, oy).\r\n //\r\n // Update: 8th January 2019 - the latest version of Matter needs the Vertices adjusted,\r\n // regardless if convex or concave.\r\n\r\n var center = Vertices.centre(vertices);\r\n\r\n ox += center.x;\r\n oy += center.y;\r\n\r\n body = Bodies.fromVertices(ox, oy, vertices, options);\r\n }\r\n\r\n if (body)\r\n {\r\n parts.push(body);\r\n }\r\n }\r\n\r\n if (parts.length === 1)\r\n {\r\n this.setBody(parts[0], options.addToWorld);\r\n }\r\n else if (parts.length > 1)\r\n {\r\n options.parts = parts;\r\n this.setBody(Body.create(options), options.addToWorld);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current body to the given body. This will remove the previous body, if one already\r\n * exists.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - The new Matter body to use.\r\n * @param {boolean} [addToWorld=true] - Whether or not to add the body to the Matter world.\r\n * \r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n setBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined) { addToWorld = true; }\r\n\r\n if (this.body)\r\n {\r\n this.removeBody();\r\n }\r\n\r\n this.body = body;\r\n this.body.gameObject = this;\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(this.body);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the TileBody and from the Matter world\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#removeBody\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n removeBody: function ()\r\n {\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n this.body.gameObject = undefined;\r\n this.body = undefined;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the current body from the tile and the world.\r\n *\r\n * @method Phaser.Physics.Matter.TileBody#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.TileBody} This TileBody object.\r\n */\r\n destroy: function ()\r\n {\r\n this.removeBody();\r\n this.tile.physics.matterBody = undefined;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MatterTileBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/MatterTileBody.js?")},"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Joachim Grill \r\n * @copyright 2018 CodeAndWeb GmbH\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * Use PhysicsEditorParser.parseBody() to build a Matter body object, based on a physics data file\r\n * created and exported with PhysicsEditor (https://www.codeandweb.com/physicseditor).\r\n *\r\n * @namespace Phaser.Physics.Matter.PhysicsEditorParser\r\n * @since 3.10.0\r\n */\r\nvar PhysicsEditorParser = {\r\n\r\n /**\r\n * Parses a body element exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseBody\r\n * @since 3.10.0\r\n *\r\n * @param {number} x - x position.\r\n * @param {number} y - y position.\r\n * @param {number} w - width.\r\n * @param {number} h - height.\r\n * @param {object} config - body configuration and fixture (child body) definitions.\r\n * \r\n * @return {object} A matter body, consisting of several parts (child bodies)\r\n */\r\n parseBody: function (x, y, w, h, config)\r\n {\r\n var fixtureConfigs = GetFastValue(config, \'fixtures\', []);\r\n var fixtures = [];\r\n\r\n for (var fc = 0; fc < fixtureConfigs.length; fc++)\r\n {\r\n var fixtureParts = this.parseFixture(fixtureConfigs[fc]);\r\n\r\n for (var i = 0; i < fixtureParts.length; i++)\r\n {\r\n fixtures.push(fixtureParts[i]);\r\n }\r\n }\r\n\r\n var matterConfig = Common.extend({}, false, config);\r\n\r\n delete matterConfig.fixtures;\r\n delete matterConfig.type;\r\n\r\n var body = Body.create(matterConfig);\r\n\r\n Body.setParts(body, fixtures);\r\n body.render.sprite.xOffset = body.position.x / w;\r\n body.render.sprite.yOffset = body.position.y / h;\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n },\r\n\r\n\r\n /**\r\n * Parses an element of the "fixtures" list exported by PhysicsEditor\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseFixture\r\n * @since 3.10.0\r\n *\r\n * @param {object} fixtureConfig - the fixture object to parse\r\n * \r\n * @return {object[]} - A list of matter bodies\r\n */\r\n parseFixture: function (fixtureConfig)\r\n {\r\n var matterConfig = Common.extend({}, false, fixtureConfig);\r\n\r\n delete matterConfig.circle;\r\n delete matterConfig.vertices;\r\n\r\n var fixtures;\r\n\r\n if (fixtureConfig.circle)\r\n {\r\n var x = GetFastValue(fixtureConfig.circle, \'x\');\r\n var y = GetFastValue(fixtureConfig.circle, \'y\');\r\n var r = GetFastValue(fixtureConfig.circle, \'radius\');\r\n fixtures = [ Bodies.circle(x, y, r, matterConfig) ];\r\n }\r\n else if (fixtureConfig.vertices)\r\n {\r\n fixtures = this.parseVertices(fixtureConfig.vertices, matterConfig);\r\n }\r\n\r\n return fixtures;\r\n },\r\n\r\n /**\r\n * Parses the "vertices" lists exported by PhysicsEditor.\r\n *\r\n * @function Phaser.Physics.Matter.PhysicsEditorParser.parseVertices\r\n * @since 3.10.0\r\n *\r\n * @param {object} vertexSets - The vertex lists to parse.\r\n * @param {object} options - Matter body options.\r\n * \r\n * @return {object[]} - A list of matter bodies.\r\n */\r\n parseVertices: function (vertexSets, options)\r\n {\r\n var i, j, k, v, z;\r\n var parts = [];\r\n\r\n options = options || {};\r\n\r\n for (v = 0; v < vertexSets.length; v += 1)\r\n {\r\n parts.push(Body.create(Common.extend({\r\n position: Vertices.centre(vertexSets[v]),\r\n vertices: vertexSets[v]\r\n }, options)));\r\n }\r\n\r\n // flag coincident part edges\r\n var coincidentMaxDist = 5;\r\n\r\n for (i = 0; i < parts.length; i++)\r\n {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++)\r\n {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds))\r\n {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++)\r\n {\r\n for (z = 0; z < partB.vertices.length; z++)\r\n {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincidentMaxDist && db < coincidentMaxDist)\r\n {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n\r\n return parts;\r\n }\r\n};\r\n\r\nmodule.exports = PhysicsEditorParser;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js?')},"./node_modules/phaser/src/physics/matter-js/PointerConstraint.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bounds = __webpack_require__(/*! ./lib/geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ./lib/constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Detector = __webpack_require__(/*! ./lib/collision/Detector */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/physics/matter-js/events/index.js");\r\nvar InputEvents = __webpack_require__(/*! ../../input/events */ "./node_modules/phaser/src/input/events/index.js");\r\nvar Merge = __webpack_require__(/*! ../../utils/object/Merge */ "./node_modules/phaser/src/utils/object/Merge.js");\r\nvar Sleeping = __webpack_require__(/*! ./lib/core/Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\nvar Vertices = __webpack_require__(/*! ./lib/geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Pointer Constraint is a special type of constraint that allows you to click\r\n * and drag bodies in a Matter World. It monitors the active Pointers in a Scene,\r\n * and when one is pressed down it checks to see if that hit any part of any active\r\n * body in the world. If it did, and the body has input enabled, it will begin to\r\n * drag it until either released, or you stop it via the `stopDrag` method.\r\n * \r\n * You can adjust the stiffness, length and other properties of the constraint via\r\n * the `options` object on creation.\r\n *\r\n * @class PointerConstraint\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene to which this Pointer Constraint belongs.\r\n * @param {Phaser.Physics.Matter.World} world - A reference to the Matter World instance to which this Constraint belongs.\r\n * @param {object} [options] - A Constraint configuration object.\r\n */\r\nvar PointerConstraint = new Class({\r\n\r\n initialize:\r\n\r\n function PointerConstraint (scene, world, options)\r\n {\r\n if (options === undefined) { options = {}; }\r\n\r\n // Defaults\r\n var defaults = {\r\n label: \'Pointer Constraint\',\r\n pointA: { x: 0, y: 0 },\r\n pointB: { x: 0, y: 0 },\r\n damping: 0,\r\n length: 0.01,\r\n stiffness: 0.1,\r\n angularStiffness: 1,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n }\r\n };\r\n\r\n /**\r\n * A reference to the Scene to which this Pointer Constraint belongs.\r\n * This is the same Scene as the Matter World instance.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Matter World instance to which this Constraint belongs.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#world\r\n * @type {Phaser.Physics.Matter.World}\r\n * @since 3.0.0\r\n */\r\n this.world = world;\r\n\r\n /**\r\n * The Camera the Pointer was interacting with when the input\r\n * down event was processed.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#camera\r\n * @type {Phaser.Cameras.Scene2D.Camera}\r\n * @since 3.0.0\r\n */\r\n this.camera = null;\r\n\r\n /**\r\n * A reference to the Input Pointer that activated this Constraint.\r\n * This is set in the `onDown` handler.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#pointer\r\n * @type {Phaser.Input.Pointer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pointer = null;\r\n\r\n /**\r\n * Is this Constraint active or not?\r\n * \r\n * An active constraint will be processed each update. An inactive one will be skipped.\r\n * Use this to toggle a Pointer Constraint on and off.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#active\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.active = true;\r\n\r\n /**\r\n * The internal transformed position.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#position\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.0.0\r\n */\r\n this.position = new Vector2();\r\n\r\n /**\r\n * The body that is currently being dragged, if any.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#body\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.body = null;\r\n\r\n /**\r\n * The part of the body that was clicked on to start the drag.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#part\r\n * @type {?MatterJS.Body}\r\n * @since 3.16.2\r\n */\r\n this.part = null;\r\n\r\n /**\r\n * The native Matter Constraint that is used to attach to bodies.\r\n *\r\n * @name Phaser.Physics.Matter.PointerConstraint#constraint\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.constraint = Constraint.create(Merge(options, defaults));\r\n\r\n this.world.on(Events.BEFORE_UPDATE, this.update, this);\r\n\r\n scene.sys.input.on(InputEvents.POINTER_DOWN, this.onDown, this);\r\n },\r\n\r\n /**\r\n * A Pointer has been pressed down onto the Scene.\r\n * \r\n * If this Constraint doesn\'t have an active Pointer then a hit test is\r\n * run against all active bodies in the world. If one is found it is bound\r\n * to this constraint and the drag begins.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#onDown\r\n * @fires Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Input.Pointer} pointer - A reference to the Pointer that was pressed.\r\n */\r\n onDown: function (pointer)\r\n {\r\n if (!this.pointer)\r\n {\r\n if (this.getBody(pointer))\r\n {\r\n this.pointer = pointer;\r\n\r\n this.camera = pointer.camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Scans all active bodies in the current Matter World to see if any of them\r\n * are hit by the Pointer. The _first one_ found to hit is set as the active contraint\r\n * body.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#getBody\r\n * @since 3.16.2\r\n * \r\n * @return {boolean} `true` if a body was found and set, otherwise `false`.\r\n */\r\n getBody: function (pointer)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n\r\n pointer.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n\r\n var bodies = Composite.allBodies(this.world.localWorld);\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.ignorePointer &&\r\n Bounds.contains(body.bounds, pos) &&\r\n Detector.canCollide(body.collisionFilter, constraint.collisionFilter))\r\n {\r\n if (this.hitTestBody(body, pos))\r\n {\r\n this.world.emit(Events.DRAG_START, this.body, this.part, this);\r\n\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Scans the current body to determine if a part of it was clicked on.\r\n * If a part is found the body is set as the `constraint.bodyB` property,\r\n * as well as the `body` property of this class. The part is also set.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#hitTestBody\r\n * @since 3.16.2\r\n *\r\n * @param {MatterJS.Body} body - The Matter Body to check.\r\n * @param {Phaser.Math.Vector2} position - A translated hit test position.\r\n *\r\n * @return {boolean} `true` if a part of the body was hit, otherwise `false`.\r\n */\r\n hitTestBody: function (body, position)\r\n {\r\n var constraint = this.constraint;\r\n\r\n var start = (body.parts.length > 1) ? 1 : 0;\r\n\r\n for (var i = start; i < body.parts.length; i++)\r\n {\r\n var part = body.parts[i];\r\n\r\n if (Vertices.contains(part.vertices, position))\r\n {\r\n constraint.bodyB = body;\r\n\r\n constraint.pointA.x = position.x;\r\n constraint.pointA.y = position.y;\r\n\r\n constraint.pointB.x = position.x - body.position.x;\r\n constraint.pointB.y = position.y - body.position.y;\r\n\r\n constraint.angleB = body.angle;\r\n\r\n Sleeping.set(body, false);\r\n\r\n this.part = part;\r\n this.body = body;\r\n\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Internal update handler. Called in the Matter BEFORE_UPDATE step.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#update\r\n * @fires Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.0.0\r\n */\r\n update: function ()\r\n {\r\n var body = this.body;\r\n var pointer = this.pointer;\r\n\r\n if (!this.active || !pointer || !body)\r\n {\r\n return;\r\n }\r\n\r\n if (pointer.isDown)\r\n {\r\n var pos = this.position;\r\n var constraint = this.constraint;\r\n \r\n this.camera.getWorldPoint(pointer.x, pointer.y, pos);\r\n \r\n Sleeping.set(body, false);\r\n \r\n constraint.pointA.x = pos.x;\r\n constraint.pointA.y = pos.y;\r\n \r\n this.world.emit(Events.DRAG, body, this);\r\n }\r\n else\r\n {\r\n // Pointer has been released since the last world step\r\n this.stopDrag();\r\n }\r\n },\r\n\r\n /**\r\n * Stops the Pointer Constraint from dragging the body any further.\r\n * \r\n * This is called automatically if the Pointer is released while actively\r\n * dragging a body. Or, you can call it manually to release a body from a\r\n * constraint without having to first release the pointer.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#stopDrag\r\n * @fires Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n */\r\n stopDrag: function ()\r\n {\r\n var body = this.body;\r\n var constraint = this.constraint;\r\n\r\n if (body)\r\n {\r\n this.world.emit(Events.DRAG_END, body, this);\r\n\r\n this.pointer = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n constraint.bodyB = null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Pointer Constraint instance and all of its references.\r\n *\r\n * @method Phaser.Physics.Matter.PointerConstraint#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.world.removeConstraint(this.constraint);\r\n\r\n this.pointer = null;\r\n this.constraint = null;\r\n this.body = null;\r\n this.part = null;\r\n\r\n this.world.off(Events.BEFORE_UPDATE, this.update);\r\n\r\n this.scene.sys.input.off(InputEvents.POINTER_DOWN, this.onDown, this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = PointerConstraint;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/PointerConstraint.js?')},"./node_modules/phaser/src/physics/matter-js/World.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ./lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Common = __webpack_require__(/*! ./lib/core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Composite = __webpack_require__(/*! ./lib/body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Engine = __webpack_require__(/*! ./lib/core/Engine */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar MatterBody = __webpack_require__(/*! ./lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar MatterEvents = __webpack_require__(/*! ./lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar MatterTileBody = __webpack_require__(/*! ./MatterTileBody */ \"./node_modules/phaser/src/physics/matter-js/MatterTileBody.js\");\r\nvar MatterWorld = __webpack_require__(/*! ./lib/body/World */ \"./node_modules/phaser/src/physics/matter-js/lib/body/World.js\");\r\nvar Vector = __webpack_require__(/*! ./lib/geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\n\r\n/**\r\n * @classdesc\r\n * [description]\r\n *\r\n * @class World\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Physics.Matter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Matter World instance belongs.\r\n * @param {Phaser.Types.Physics.Matter.MatterWorldConfig} config - The Matter World configuration object.\r\n */\r\nvar World = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function World (scene, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Scene to which this Matter World instance belongs.\r\n *\r\n * @name Phaser.Physics.Matter.World#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * An instance of the MatterJS Engine.\r\n *\r\n * @name Phaser.Physics.Matter.World#engine\r\n * @type {MatterJS.Engine}\r\n * @since 3.0.0\r\n */\r\n this.engine = Engine.create(config);\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @name Phaser.Physics.Matter.World#localWorld\r\n * @type {MatterJS.World}\r\n * @since 3.0.0\r\n */\r\n this.localWorld = this.engine.world;\r\n\r\n var gravity = GetValue(config, 'gravity', null);\r\n\r\n if (gravity)\r\n {\r\n this.setGravity(gravity.x, gravity.y, gravity.scale);\r\n }\r\n\r\n /**\r\n * An object containing the 4 wall bodies that bound the physics world.\r\n *\r\n * @name Phaser.Physics.Matter.World#walls\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.walls = { left: null, right: null, top: null, bottom: null };\r\n\r\n if (GetFastValue(config, 'setBounds', false))\r\n {\r\n var boundsConfig = config['setBounds'];\r\n\r\n if (typeof boundsConfig === 'boolean')\r\n {\r\n this.setBounds();\r\n }\r\n else\r\n {\r\n var x = GetFastValue(boundsConfig, 'x', 0);\r\n var y = GetFastValue(boundsConfig, 'y', 0);\r\n var width = GetFastValue(boundsConfig, 'width', scene.sys.scale.width);\r\n var height = GetFastValue(boundsConfig, 'height', scene.sys.scale.height);\r\n var thickness = GetFastValue(boundsConfig, 'thickness', 64);\r\n var left = GetFastValue(boundsConfig, 'left', true);\r\n var right = GetFastValue(boundsConfig, 'right', true);\r\n var top = GetFastValue(boundsConfig, 'top', true);\r\n var bottom = GetFastValue(boundsConfig, 'bottom', true);\r\n\r\n this.setBounds(x, y, width, height, thickness, left, right, top, bottom);\r\n }\r\n }\r\n\r\n /**\r\n * A flag that toggles if the world is enabled or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#enabled\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.enabled = GetValue(config, 'enabled', true);\r\n\r\n /**\r\n * The correction argument is an optional Number that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where delta is changing between updates.\r\n * The value of correction is defined as delta / lastDelta, i.e. the percentage change of delta over the last step.\r\n * Therefore the value is always 1 (no correction) when delta constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * @name Phaser.Physics.Matter.World#correction\r\n * @type {number}\r\n * @default 1\r\n * @since 3.4.0\r\n */\r\n this.correction = GetValue(config, 'correction', 1);\r\n\r\n /**\r\n * This function is called every time the core game loop steps, which is bound to the\r\n * Request Animation Frame frequency unless otherwise modified.\r\n * \r\n * The function is passed two values: `time` and `delta`, both of which come from the game step values.\r\n * \r\n * It must return a number. This number is used as the delta value passed to Matter.Engine.update.\r\n * \r\n * You can override this function with your own to define your own timestep.\r\n * \r\n * If you need to update the Engine multiple times in a single game step then call\r\n * `World.update` as many times as required. Each call will trigger the `getDelta` function.\r\n * If you wish to have full control over when the Engine updates then see the property `autoUpdate`.\r\n *\r\n * You can also adjust the number of iterations that Engine.update performs.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @name Phaser.Physics.Matter.World#getDelta\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.getDelta = GetValue(config, 'getDelta', this.update60Hz);\r\n\r\n /**\r\n * Automatically call Engine.update every time the game steps.\r\n * If you disable this then you are responsible for calling `World.step` directly from your game.\r\n * If you call `set60Hz` or `set30Hz` then `autoUpdate` is reset to `true`.\r\n *\r\n * @name Phaser.Physics.Matter.World#autoUpdate\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.4.0\r\n */\r\n this.autoUpdate = GetValue(config, 'autoUpdate', true);\r\n\r\n /**\r\n * A flag that controls if the debug graphics will be drawn to or not.\r\n *\r\n * @name Phaser.Physics.Matter.World#drawDebug\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.drawDebug = GetValue(config, 'debug', false);\r\n\r\n /**\r\n * An instance of the Graphics object the debug bodies are drawn to, if enabled.\r\n *\r\n * @name Phaser.Physics.Matter.World#debugGraphic\r\n * @type {Phaser.GameObjects.Graphics}\r\n * @since 3.0.0\r\n */\r\n this.debugGraphic;\r\n\r\n /**\r\n * The default configuration values.\r\n *\r\n * @name Phaser.Physics.Matter.World#defaults\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.defaults = {\r\n debugShowBody: GetFastValue(config, 'debugShowBody', true),\r\n debugShowStaticBody: GetFastValue(config, 'debugShowStaticBody', true),\r\n debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true),\r\n bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff),\r\n bodyDebugFillColor: GetFastValue(config, 'debugBodyFillColor', 0xe3a7e3),\r\n staticBodyDebugColor: GetFastValue(config, 'debugStaticBodyColor', 0x0000ff),\r\n velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00),\r\n debugShowJoint: GetFastValue(config, 'debugShowJoint', true),\r\n jointDebugColor: GetFastValue(config, 'debugJointColor', 0x000000),\r\n debugWireframes: GetFastValue(config, 'debugWireframes', true),\r\n debugShowInternalEdges: GetFastValue(config, 'debugShowInternalEdges', false),\r\n debugShowConvexHulls: GetFastValue(config, 'debugShowConvexHulls', false),\r\n debugConvexHullColor: GetFastValue(config, 'debugConvexHullColor', 0xaaaaaa),\r\n debugShowSleeping: GetFastValue(config, 'debugShowSleeping', false)\r\n };\r\n\r\n if (this.drawDebug)\r\n {\r\n this.createDebugGraphic();\r\n }\r\n\r\n this.setEventsProxy();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#setEventsProxy\r\n * @since 3.0.0\r\n */\r\n setEventsProxy: function ()\r\n {\r\n var _this = this;\r\n var engine = this.engine;\r\n\r\n MatterEvents.on(engine, 'beforeUpdate', function (event)\r\n {\r\n _this.emit(Events.BEFORE_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'afterUpdate', function (event)\r\n {\r\n _this.emit(Events.AFTER_UPDATE, event);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionStart', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_START, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionActive', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_ACTIVE, event, bodyA, bodyB);\r\n });\r\n\r\n MatterEvents.on(engine, 'collisionEnd', function (event)\r\n {\r\n var pairs = event.pairs;\r\n var bodyA;\r\n var bodyB;\r\n\r\n if (pairs.length > 0)\r\n {\r\n bodyA = pairs[0].bodyA;\r\n bodyB = pairs[0].bodyB;\r\n }\r\n\r\n _this.emit(Events.COLLISION_END, event, bodyA, bodyB);\r\n });\r\n },\r\n\r\n /**\r\n * Sets the bounds of the Physics world to match the given world pixel dimensions.\r\n * You can optionally set which 'walls' to create: left, right, top or bottom.\r\n * If none of the walls are given it will default to use the walls settings it had previously.\r\n * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size\r\n * the newly created bounds will also not have the left and right walls.\r\n * Explicitly state them in the parameters to override this.\r\n *\r\n * @method Phaser.Physics.Matter.World#setBounds\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The x coordinate of the top-left corner of the bounds.\r\n * @param {number} [y=0] - The y coordinate of the top-left corner of the bounds.\r\n * @param {number} [width] - The width of the bounds.\r\n * @param {number} [height] - The height of the bounds.\r\n * @param {number} [thickness=128] - The thickness of each wall, in pixels.\r\n * @param {boolean} [left=true] - If true will create the left bounds wall.\r\n * @param {boolean} [right=true] - If true will create the right bounds wall.\r\n * @param {boolean} [top=true] - If true will create the top bounds wall.\r\n * @param {boolean} [bottom=true] - If true will create the bottom bounds wall.\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setBounds: function (x, y, width, height, thickness, left, right, top, bottom)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.scene.sys.scale.width; }\r\n if (height === undefined) { height = this.scene.sys.scale.height; }\r\n if (thickness === undefined) { thickness = 128; }\r\n if (left === undefined) { left = true; }\r\n if (right === undefined) { right = true; }\r\n if (top === undefined) { top = true; }\r\n if (bottom === undefined) { bottom = true; }\r\n\r\n this.updateWall(left, 'left', x - thickness, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(right, 'right', x + width, y - thickness, thickness, height + (thickness * 2));\r\n this.updateWall(top, 'top', x, y - thickness, width, thickness);\r\n this.updateWall(bottom, 'bottom', x, y + height, width, thickness);\r\n\r\n return this;\r\n },\r\n\r\n // position = 'left', 'right', 'top' or 'bottom'\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#updateWall\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} add - [description]\r\n * @param {string} position - [description]\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n */\r\n updateWall: function (add, position, x, y, width, height)\r\n {\r\n var wall = this.walls[position];\r\n\r\n if (add)\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n // adjust center\r\n x += (width / 2);\r\n y += (height / 2);\r\n\r\n this.walls[position] = this.create(x, y, width, height, { isStatic: true, friction: 0, frictionStatic: 0 });\r\n }\r\n else\r\n {\r\n if (wall)\r\n {\r\n MatterWorld.remove(this.localWorld, wall);\r\n }\r\n\r\n this.walls[position] = null;\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#createDebugGraphic\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.GameObjects.Graphics} [description]\r\n */\r\n createDebugGraphic: function ()\r\n {\r\n var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });\r\n\r\n graphic.setDepth(Number.MAX_VALUE);\r\n\r\n this.debugGraphic = graphic;\r\n\r\n this.drawDebug = true;\r\n\r\n return graphic;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity and gravity scale to 0.\r\n *\r\n * @method Phaser.Physics.Matter.World#disableGravity\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n disableGravity: function ()\r\n {\r\n this.localWorld.gravity.x = 0;\r\n this.localWorld.gravity.y = 0;\r\n this.localWorld.gravity.scale = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the world's gravity\r\n *\r\n * @method Phaser.Physics.Matter.World#setGravity\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The world gravity x component.\r\n * @param {number} [y=1] - The world gravity y component.\r\n * @param {number} [scale] - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n setGravity: function (x, y, scale)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 1; }\r\n\r\n this.localWorld.gravity.x = x;\r\n this.localWorld.gravity.y = y;\r\n\r\n if (scale !== undefined)\r\n {\r\n this.localWorld.gravity.scale = scale;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a rectangle Matter body and adds it to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#create\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal position of the body in the world.\r\n * @param {number} y - The vertical position of the body in the world.\r\n * @param {number} width - The width of the body.\r\n * @param {number} height - The height of the body.\r\n * @param {object} options - Optional Matter configuration object.\r\n *\r\n * @return {MatterJS.Body} The Matter.js body that was created.\r\n */\r\n create: function (x, y, width, height, options)\r\n {\r\n var body = Bodies.rectangle(x, y, width, height, options);\r\n\r\n MatterWorld.add(this.localWorld, body);\r\n\r\n return body;\r\n },\r\n\r\n /**\r\n * Adds an object to the world.\r\n *\r\n * @method Phaser.Physics.Matter.World#add\r\n * @since 3.0.0\r\n *\r\n * @param {(object|object[])} object - Can be single or an array, and can be a body, composite or constraint\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n add: function (object)\r\n {\r\n MatterWorld.add(this.localWorld, object);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#remove\r\n * @since 3.0.0\r\n *\r\n * @param {object} object - The object to be removed from the world.\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n remove: function (object, deep)\r\n {\r\n var body = (object.body) ? object.body : object;\r\n\r\n Composite.remove(this.localWorld, body, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#removeConstraint\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Constraint} constraint - [description]\r\n * @param {boolean} deep - [description]\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n removeConstraint: function (constraint, deep)\r\n {\r\n Composite.remove(this.localWorld, constraint, deep);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for all the colliding tiles within the given tilemap layer. Set\r\n * the appropriate tiles in your layer to collide before calling this method!\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTilemapLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer -\r\n * An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTilemapLayer: function (tilemapLayer, options)\r\n {\r\n var layerData = tilemapLayer.layer;\r\n var tiles = tilemapLayer.getTilesWithin(0, 0, layerData.width, layerData.height, { isColliding: true });\r\n\r\n this.convertTiles(tiles, options);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds MatterTileBody instances for the given tiles. This adds bodies regardless of whether the\r\n * tiles are set to collide or not.\r\n *\r\n * @method Phaser.Physics.Matter.World#convertTiles\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles.\r\n * @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n convertTiles: function (tiles, options)\r\n {\r\n if (tiles.length === 0)\r\n {\r\n return this;\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n new MatterTileBody(this, tiles[i], options);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} isNonColliding - [description]\r\n *\r\n * @return {number} [description]\r\n */\r\n nextGroup: function (isNonColliding)\r\n {\r\n return MatterBody.nextGroup(isNonColliding);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#nextCategory\r\n * @since 3.0.0\r\n *\r\n * @return {number} Returns the next unique category bitfield.\r\n */\r\n nextCategory: function ()\r\n {\r\n return MatterBody.nextCategory();\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#pause\r\n * @fires Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n pause: function ()\r\n {\r\n this.enabled = false;\r\n\r\n this.emit(Events.PAUSE);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#resume\r\n * @fires Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Physics.Matter.World} This Matter World object.\r\n */\r\n resume: function ()\r\n {\r\n this.enabled = true;\r\n\r\n this.emit(Events.RESUME);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.enabled && this.autoUpdate)\r\n {\r\n Engine.update(this.engine, this.getDelta(time, delta), this.correction);\r\n }\r\n },\r\n\r\n /**\r\n * Manually advances the physics simulation by one iteration.\r\n * \r\n * You can optionally pass in the `delta` and `correction` values to be used by Engine.update.\r\n * If undefined they use the Matter defaults of 60Hz and no correction.\r\n * \r\n * Calling `step` directly bypasses any checks of `enabled` or `autoUpdate`.\r\n * \r\n * It also ignores any custom `getDelta` functions, as you should be passing the delta\r\n * value in to this call.\r\n *\r\n * You can adjust the number of iterations that Engine.update performs internally.\r\n * Use the Scene Matter Physics config object to set the following properties:\r\n *\r\n * positionIterations (defaults to 6)\r\n * velocityIterations (defaults to 4)\r\n * constraintIterations (defaults to 2)\r\n *\r\n * Adjusting these values can help performance in certain situations, depending on the physics requirements\r\n * of your game.\r\n *\r\n * @method Phaser.Physics.Matter.World#step\r\n * @since 3.4.0\r\n *\r\n * @param {number} [delta=16.666] - [description]\r\n * @param {number} [correction=1] - [description]\r\n */\r\n step: function (delta, correction)\r\n {\r\n Engine.update(this.engine, delta, correction);\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 60Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update60Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update60Hz: function ()\r\n {\r\n return 1000 / 60;\r\n },\r\n\r\n /**\r\n * Runs the Matter Engine.update at a fixed timestep of 30Hz.\r\n *\r\n * @method Phaser.Physics.Matter.World#update30Hz\r\n * @since 3.4.0\r\n *\r\n * @return {number} The delta value to be passed to Engine.update.\r\n */\r\n update30Hz: function ()\r\n {\r\n return 1000 / 30;\r\n },\r\n\r\n /**\r\n * Handles the rendering of bodies and debug information to the debug Graphics object, if enabled.\r\n *\r\n * @method Phaser.Physics.Matter.World#postUpdate\r\n * @private\r\n * @since 3.0.0\r\n */\r\n postUpdate: function ()\r\n {\r\n if (!this.drawDebug)\r\n {\r\n return;\r\n }\r\n\r\n this.debugGraphic.clear();\r\n\r\n var bodies = Composite.allBodies(this.localWorld);\r\n\r\n if (this.defaults.debugWireframes)\r\n {\r\n if (this.defaults.debugShowConvexHulls)\r\n {\r\n this.renderConvexHulls(bodies);\r\n }\r\n\r\n this.renderWireframes(bodies);\r\n }\r\n else\r\n {\r\n this.renderBodies(bodies);\r\n }\r\n\r\n if (this.defaults.debugShowJoint)\r\n {\r\n this.renderJoints();\r\n }\r\n },\r\n\r\n /**\r\n * Renders the debug convex hulls from the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderConvexHulls\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderConvexHulls: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(1, this.defaults.debugConvexHullColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible || body.parts.length === 1)\r\n {\r\n continue;\r\n }\r\n\r\n graphics.moveTo(body.vertices[0].x, body.vertices[0].y);\r\n\r\n for (var j = 1; j < body.vertices.length; j++)\r\n {\r\n graphics.lineTo(body.vertices[j].x, body.vertices[j].y);\r\n }\r\n \r\n graphics.lineTo(body.vertices[0].x, body.vertices[0].y);\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the wireframes of the given array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderWireframes\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderWireframes: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n var showInternalEdges = this.defaults.debugShowInternalEdges;\r\n\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor);\r\n\r\n graphics.beginPath();\r\n\r\n for (var i = 0; i < bodies.length; i++)\r\n {\r\n var body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n for (var k = (body.parts.length > 1) ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n var part = body.parts[k];\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % vertLength].x, part.vertices[(j + 1) % vertLength].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n }\r\n }\r\n\r\n graphics.strokePath();\r\n },\r\n\r\n /**\r\n * Renders the array of bodies.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderBodies\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {array} bodies - An array of bodies from the localWorld.\r\n */\r\n renderBodies: function (bodies)\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n var showInternalEdges = this.defaults.debugShowInternalEdges || !this.defaults.debugWireframes;\r\n var showSleeping = this.defaults.debugShowSleeping;\r\n var wireframes = this.defaults.debugWireframes;\r\n\r\n var body;\r\n var part;\r\n var i;\r\n var k;\r\n\r\n for (i = 0; i < bodies.length; i++)\r\n {\r\n body = bodies[i];\r\n\r\n if (!body.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n // Handle compound parts\r\n for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++)\r\n {\r\n part = body.parts[k];\r\n\r\n if (!part.render.visible)\r\n {\r\n continue;\r\n }\r\n\r\n if (showSleeping && body.isSleeping)\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, 0.5 * part.render.opacity);\r\n }\r\n else\r\n {\r\n graphics.lineStyle(1, this.defaults.bodyDebugColor, part.render.opacity);\r\n graphics.fillStyle(this.defaults.bodyDebugColor, part.render.opacity);\r\n }\r\n\r\n // Part polygon\r\n if (part.circleRadius)\r\n {\r\n graphics.beginPath();\r\n graphics.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI);\r\n }\r\n else\r\n {\r\n graphics.beginPath();\r\n graphics.moveTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n var vertLength = part.vertices.length;\r\n\r\n for (var j = 1; j < vertLength; j++)\r\n {\r\n if (!part.vertices[j - 1].isInternal || showInternalEdges)\r\n {\r\n graphics.lineTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n else\r\n {\r\n graphics.moveTo(part.vertices[j].x, part.vertices[j].y);\r\n }\r\n\r\n if (part.vertices[j].isInternal && !showInternalEdges)\r\n {\r\n graphics.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\r\n }\r\n }\r\n \r\n graphics.lineTo(part.vertices[0].x, part.vertices[0].y);\r\n\r\n graphics.closePath();\r\n }\r\n\r\n if (!wireframes)\r\n {\r\n graphics.fillPath();\r\n }\r\n else\r\n {\r\n graphics.strokePath();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders world constraints.\r\n *\r\n * @method Phaser.Physics.Matter.World#renderJoints\r\n * @private\r\n * @since 3.14.0\r\n */\r\n renderJoints: function ()\r\n {\r\n var graphics = this.debugGraphic;\r\n\r\n graphics.lineStyle(2, this.defaults.jointDebugColor);\r\n\r\n // Render constraints \r\n var constraints = Composite.allConstraints(this.localWorld);\r\n\r\n for (var i = 0; i < constraints.length; i++)\r\n {\r\n var constraint = constraints[i];\r\n\r\n if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\r\n {\r\n continue;\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.lineStyle(constraint.render.lineWidth, Common.colorToNumber(constraint.render.strokeStyle));\r\n }\r\n\r\n var bodyA = constraint.bodyA;\r\n var bodyB = constraint.bodyB;\r\n var start;\r\n var end;\r\n\r\n if (bodyA)\r\n {\r\n start = Vector.add(bodyA.position, constraint.pointA);\r\n }\r\n else\r\n {\r\n start = constraint.pointA;\r\n }\r\n\r\n if (constraint.render.type === 'pin')\r\n {\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 3, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n }\r\n else\r\n {\r\n if (bodyB)\r\n {\r\n end = Vector.add(bodyB.position, constraint.pointB);\r\n }\r\n else\r\n {\r\n end = constraint.pointB;\r\n }\r\n\r\n graphics.beginPath();\r\n graphics.moveTo(start.x, start.y);\r\n\r\n if (constraint.render.type === 'spring')\r\n {\r\n var delta = Vector.sub(end, start);\r\n var normal = Vector.perp(Vector.normalise(delta));\r\n var coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20));\r\n var offset;\r\n\r\n for (var j = 1; j < coils; j += 1)\r\n {\r\n offset = (j % 2 === 0) ? 1 : -1;\r\n\r\n graphics.lineTo(\r\n start.x + delta.x * (j / coils) + normal.x * offset * 4,\r\n start.y + delta.y * (j / coils) + normal.y * offset * 4\r\n );\r\n }\r\n }\r\n\r\n graphics.lineTo(end.x, end.y);\r\n }\r\n\r\n if (constraint.render.lineWidth)\r\n {\r\n graphics.strokePath();\r\n }\r\n\r\n if (constraint.render.anchors)\r\n {\r\n graphics.fillStyle(Common.colorToNumber(constraint.render.strokeStyle));\r\n graphics.beginPath();\r\n graphics.arc(start.x, start.y, 6, 0, 2 * Math.PI);\r\n graphics.arc(end.x, end.y, 6, 0, 2 * Math.PI);\r\n graphics.closePath();\r\n graphics.fillPath();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.World#fromPath\r\n * @since 3.0.0\r\n *\r\n * @param {string} path - [description]\r\n * @param {array} points - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\n fromPath: function (path, points)\r\n {\r\n if (points === undefined) { points = []; }\r\n\r\n // var pathPattern = /L?\\s*([-\\d.e]+)[\\s,]*([-\\d.e]+)*/ig;\r\n\r\n // eslint-disable-next-line no-useless-escape\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig;\r\n\r\n path.replace(pathPattern, function (match, x, y)\r\n {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return points;\r\n },\r\n\r\n /**\r\n * Resets the internal collision IDs that Matter.JS uses for Body collision groups.\r\n * \r\n * You should call this before destroying your game if you need to restart the game\r\n * again on the same page, without first reloading the page. Or, if you wish to\r\n * consistently destroy a Scene that contains Matter.js and then run it again\r\n * later in the same game.\r\n *\r\n * @method Phaser.Physics.Matter.World#resetCollisionIDs\r\n * @since 3.17.0\r\n */\r\n resetCollisionIDs: function ()\r\n {\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * @method Phaser.Physics.Matter.World#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n MatterEvents.off(this.engine);\r\n\r\n this.removeAllListeners();\r\n\r\n MatterWorld.clear(this.localWorld, false);\r\n\r\n Engine.clear(this.engine);\r\n\r\n if (this.drawDebug)\r\n {\r\n this.debugGraphic.destroy();\r\n }\r\n },\r\n\r\n /**\r\n * Will remove all Matter physics event listeners and clear the matter physics world,\r\n * engine and any debug graphics, if any.\r\n *\r\n * After destroying the world it cannot be re-used again.\r\n *\r\n * @method Phaser.Physics.Matter.World#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n }\r\n\r\n});\r\n\r\nmodule.exports = World;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/World.js?")},"./node_modules/phaser/src/physics/matter-js/components/Bounce.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to set restitution on objects.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Bounce\r\n * @since 3.0.0\r\n */\r\nvar Bounce = {\r\n\r\n /**\r\n * Sets the restitution on the physics object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Bounce#setBounce\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - A Number that defines the restitution (elasticity) of the body. The value is always positive and is in the range (0, 1). A value of 0 means collisions may be perfectly inelastic and no bouncing may occur. A value of 0.8 means the body may bounce back with approximately 80% of its kinetic energy. Note that collision response is based on pairs of bodies, and that restitution values are combined with the following formula: `Math.max(bodyA.restitution, bodyB.restitution)`\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBounce: function (value)\r\n {\r\n this.body.restitution = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Bounce;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Bounce.js?")},"./node_modules/phaser/src/physics/matter-js/components/Collision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Collision\r\n * @since 3.0.0\r\n */\r\nvar Collision = {\r\n\r\n /**\r\n * Sets the collision category of this Game Object's Matter Body. This number must be a power of two between 2^0 (= 1) and 2^31. Two bodies with different collision groups (see {@link #setCollisionGroup}) will only collide if their collision categories are included in their collision masks (see {@link #setCollidesWith}).\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionCategory\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique category bitfield.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionCategory: function (value)\r\n {\r\n this.body.collisionFilter.category = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision group of this Game Object's Matter Body. If this is zero or two Matter Bodies have different values, they will collide according to the usual rules (see {@link #setCollisionCategory} and {@link #setCollisionGroup}). If two Matter Bodies have the same positive value, they will always collide; if they have the same negative value, they will never collide.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - Unique group index.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollisionGroup: function (value)\r\n {\r\n this.body.collisionFilter.group = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision mask for this Game Object's Matter Body. Two Matter Bodies with different collision groups will only collide if each one includes the other's category in its mask based on a bitwise AND, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0` are both true.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Collision#setCollidesWith\r\n * @since 3.0.0\r\n *\r\n * @param {(number|number[])} categories - A unique category bitfield, or an array of them.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCollidesWith: function (categories)\r\n {\r\n var flags = 0;\r\n\r\n if (!Array.isArray(categories))\r\n {\r\n flags = categories;\r\n }\r\n else\r\n {\r\n for (var i = 0; i < categories.length; i++)\r\n {\r\n flags |= categories[i];\r\n }\r\n }\r\n\r\n this.body.collisionFilter.mask = flags;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Collision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Collision.js?")},"./node_modules/phaser/src/physics/matter-js/components/Force.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * A component to apply force to Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Force\r\n * @since 3.0.0\r\n */\r\nvar Force = {\r\n\r\n // force = vec2 / point\r\n\r\n /**\r\n * Applies a force to a body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForce\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForce: function (force)\r\n {\r\n this._tempVec2.set(this.body.position.x, this.body.position.y);\r\n\r\n Body.applyForce(this.body, this._tempVec2, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Applies a force to a body from a given position.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#applyForceFrom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Math.Vector2} position - The position in which the force comes from.\r\n * @param {Phaser.Math.Vector2} force - A Vector that specifies the force to apply.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n applyForceFrom: function (position, force)\r\n {\r\n Body.applyForce(this.body, position, force);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the forward position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrust\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrust: function (speed)\r\n {\r\n var angle = this.body.angle;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the left position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustLeft\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustLeft: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the right position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustRight\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustRight: function (speed)\r\n {\r\n var angle = this.body.angle + Math.PI / 2;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Apply thrust to the back position of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Force#thrustBack\r\n * @since 3.0.0\r\n *\r\n * @param {number} speed - A speed value to be applied to a directional force.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n thrustBack: function (speed)\r\n {\r\n var angle = this.body.angle - Math.PI;\r\n\r\n this._tempVec2.set(speed * Math.cos(angle), speed * Math.sin(angle));\r\n\r\n Body.applyForce(this.body, { x: this.body.position.x, y: this.body.position.y }, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Force;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Force.js?')},"./node_modules/phaser/src/physics/matter-js/components/Friction.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Friction\r\n * @since 3.0.0\r\n */\r\nvar Friction = {\r\n\r\n /**\r\n * Sets new friction values for this Game Object's Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFriction\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new friction of the body, between 0 and 1, where 0 allows the Body to slide indefinitely, while 1 allows it to stop almost immediately after a force is applied.\r\n * @param {number} [air] - If provided, the new air resistance of the Body. The higher the value, the faster the Body will slow as it moves through space. 0 means the body has no air resistance.\r\n * @param {number} [fstatic] - If provided, the new static friction of the Body. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary. 0 means the body will never \"stick\" when it is nearly stationary.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFriction: function (value, air, fstatic)\r\n {\r\n this.body.friction = value;\r\n\r\n if (air !== undefined)\r\n {\r\n this.body.frictionAir = air;\r\n }\r\n\r\n if (fstatic !== undefined)\r\n {\r\n this.body.frictionStatic = fstatic;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new air resistance for this Game Object's Matter Body. A value of 0 means the Body will never slow as it moves through space. The higher the value, the faster a Body slows when moving through space.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionAir\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new air resistance for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionAir: function (value)\r\n {\r\n this.body.frictionAir = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new static friction for this Game Object's Matter Body. A value of 0 means the Body will never \"stick\" when it is nearly stationary. The higher the value (e.g. 10), the more force it will take to initially get the Body moving when it is nearly stationary.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Friction#setFrictionStatic\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new static friction for the Body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setFrictionStatic: function (value)\r\n {\r\n this.body.frictionStatic = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Friction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Friction.js?")},"./node_modules/phaser/src/physics/matter-js/components/Gravity.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A component to manipulate world gravity for Matter.js bodies.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Gravity\r\n * @since 3.0.0\r\n */\r\nvar Gravity = {\r\n\r\n /**\r\n * A togglable function for ignoring world gravity in real-time on the current body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Gravity#setIgnoreGravity\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - Set to true to ignore the effect of world gravity, or false to not ignore it.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setIgnoreGravity: function (value)\r\n {\r\n this.body.ignoreGravity = value;\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Gravity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Gravity.js?")},"./node_modules/phaser/src/physics/matter-js/components/Mass.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar Vector2 = __webpack_require__(/*! ../../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Mass\r\n * @since 3.0.0\r\n */\r\nvar Mass = {\r\n\r\n /**\r\n * Sets the mass of the Game Object\'s Matter Body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setMass\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new mass of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setMass: function (value)\r\n {\r\n Body.setMass(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets density of the body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Mass#setDensity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new density of the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setDensity: function (value)\r\n {\r\n Body.setDensity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The body\'s center of mass.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Mass#centerOfMass\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.10.0\r\n *\r\n * @return {Phaser.Math.Vector2} The center of mass.\r\n */\r\n centerOfMass: {\r\n\r\n get: function ()\r\n {\r\n return new Vector2(this.body.render.sprite.xOffset * this.width, this.body.render.sprite.yOffset * this.height);\r\n }\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Mass;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Mass.js?')},"./node_modules/phaser/src/physics/matter-js/components/Sensor.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sensor\r\n * @since 3.0.0\r\n */\r\nvar Sensor = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#setSensor\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSensor: function (value)\r\n {\r\n this.body.isSensor = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sensor#isSensor\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isSensor: function ()\r\n {\r\n return this.body.isSensor;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sensor;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sensor.js?")},"./node_modules/phaser/src/physics/matter-js/components/SetBody.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Bodies = __webpack_require__(/*! ../lib/factory/Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PhysicsEditorParser = __webpack_require__(/*! ../PhysicsEditorParser */ \"./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js\");\r\nvar Vertices = __webpack_require__(/*! ../lib/geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.SetBody\r\n * @since 3.0.0\r\n */\r\nvar SetBody = {\r\n\r\n // Calling any of these methods resets previous properties you may have set on the body, including plugins, mass, etc\r\n\r\n /**\r\n * Set the body on a Game Object to a rectangle.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setRectangle\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setRectangle: function (width, height, options)\r\n {\r\n return this.setBody({ type: 'rectangle', width: width, height: height }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setCircle\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setCircle: function (radius, options)\r\n {\r\n return this.setBody({ type: 'circle', radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Set the body on the Game Object to a polygon shape.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setPolygon\r\n * @since 3.0.0\r\n *\r\n * @param {number} radius - The radius of the polygon.\r\n * @param {number} sides - The amount of sides creating the polygon.\r\n * @param {object} options - A matterjs config object.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setPolygon: function (radius, sides, options)\r\n {\r\n return this.setBody({ type: 'polygon', sides: sides, radius: radius }, options);\r\n },\r\n\r\n /**\r\n * Creates a new matterjs trapezoid body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setTrapezoid\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The width of the trapezoid.\r\n * @param {number} height - The height of the trapezoid.\r\n * @param {number} slope - The angle of slope for the trapezoid.\r\n * @param {object} options - A matterjs config object for the body.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setTrapezoid: function (width, height, slope, options)\r\n {\r\n return this.setBody({ type: 'trapezoid', width: width, height: height, slope: slope }, options);\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setExistingBody\r\n * @since 3.0.0\r\n *\r\n * @param {MatterJS.Body} body - [description]\r\n * @param {boolean} [addToWorld=true] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setExistingBody: function (body, addToWorld)\r\n {\r\n if (addToWorld === undefined)\r\n {\r\n addToWorld = true;\r\n }\r\n\r\n if (this.body)\r\n {\r\n this.world.remove(this.body);\r\n }\r\n\r\n this.body = body;\r\n\r\n for (var i = 0; i < body.parts.length; i++)\r\n {\r\n body.parts[i].gameObject = this;\r\n }\r\n\r\n var _this = this;\r\n\r\n body.destroy = function destroy ()\r\n {\r\n _this.world.remove(_this.body);\r\n _this.body.gameObject = null;\r\n };\r\n\r\n if (addToWorld)\r\n {\r\n this.world.add(body);\r\n }\r\n\r\n if (this._originComponent)\r\n {\r\n this.setOrigin(body.render.sprite.xOffset, body.render.sprite.yOffset);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.SetBody#setBody\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - [description]\r\n * @param {object} options - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setBody: function (config, options)\r\n {\r\n if (!config)\r\n {\r\n return this;\r\n }\r\n\r\n var body;\r\n\r\n // Allow them to do: shape: 'circle' instead of shape: { type: 'circle' }\r\n if (typeof config === 'string')\r\n {\r\n // Using defaults\r\n config = { type: config };\r\n }\r\n\r\n var shapeType = GetFastValue(config, 'type', 'rectangle');\r\n var bodyX = GetFastValue(config, 'x', this._tempVec2.x);\r\n var bodyY = GetFastValue(config, 'y', this._tempVec2.y);\r\n var bodyWidth = GetFastValue(config, 'width', this.width);\r\n var bodyHeight = GetFastValue(config, 'height', this.height);\r\n\r\n switch (shapeType)\r\n {\r\n case 'rectangle':\r\n body = Bodies.rectangle(bodyX, bodyY, bodyWidth, bodyHeight, options);\r\n break;\r\n\r\n case 'circle':\r\n var radius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n var maxSides = GetFastValue(config, 'maxSides', 25);\r\n body = Bodies.circle(bodyX, bodyY, radius, options, maxSides);\r\n break;\r\n\r\n case 'trapezoid':\r\n var slope = GetFastValue(config, 'slope', 0.5);\r\n body = Bodies.trapezoid(bodyX, bodyY, bodyWidth, bodyHeight, slope, options);\r\n break;\r\n\r\n case 'polygon':\r\n var sides = GetFastValue(config, 'sides', 5);\r\n var pRadius = GetFastValue(config, 'radius', Math.max(bodyWidth, bodyHeight) / 2);\r\n body = Bodies.polygon(bodyX, bodyY, sides, pRadius, options);\r\n break;\r\n\r\n case 'fromVertices':\r\n case 'fromVerts':\r\n\r\n var verts = GetFastValue(config, 'verts', null);\r\n\r\n if (verts)\r\n {\r\n // Has the verts array come from Vertices.fromPath, or is it raw?\r\n if (typeof verts === 'string')\r\n {\r\n verts = Vertices.fromPath(verts);\r\n }\r\n\r\n if (this.body && !this.body.hasOwnProperty('temp'))\r\n {\r\n Body.setVertices(this.body, verts);\r\n\r\n body = this.body;\r\n }\r\n else\r\n {\r\n var flagInternal = GetFastValue(config, 'flagInternal', false);\r\n var removeCollinear = GetFastValue(config, 'removeCollinear', 0.01);\r\n var minimumArea = GetFastValue(config, 'minimumArea', 10);\r\n \r\n body = Bodies.fromVertices(bodyX, bodyY, verts, options, flagInternal, removeCollinear, minimumArea);\r\n }\r\n }\r\n\r\n break;\r\n\r\n case 'fromPhysicsEditor':\r\n body = PhysicsEditorParser.parseBody(bodyX, bodyY, bodyWidth, bodyHeight, config);\r\n break;\r\n }\r\n\r\n if (body)\r\n {\r\n this.setExistingBody(body, config.addToWorld);\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetBody;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/SetBody.js?")},"./node_modules/phaser/src/physics/matter-js/components/Sleep.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/physics/matter-js/events/index.js\");\r\nvar MatterEvents = __webpack_require__(/*! ../lib/core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Sleep\r\n * @since 3.0.0\r\n */\r\nvar Sleep = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepThreshold\r\n * @since 3.0.0\r\n *\r\n * @param {number} [value=60] - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepThreshold: function (value)\r\n {\r\n if (value === undefined) { value = 60; }\r\n\r\n this.body.sleepThreshold = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEvents\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} start - [description]\r\n * @param {boolean} end - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEvents: function (start, end)\r\n {\r\n this.setSleepStartEvent(start);\r\n this.setSleepEndEvent(end);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepStartEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepStartEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepStart', function (event)\r\n {\r\n world.emit(Events.SLEEP_START, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepStart');\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Sleep#setSleepEndEvent\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setSleepEndEvent: function (value)\r\n {\r\n if (value)\r\n {\r\n var world = this.world;\r\n\r\n MatterEvents.on(this.body, 'sleepEnd', function (event)\r\n {\r\n world.emit(Events.SLEEP_END, event, this);\r\n });\r\n }\r\n else\r\n {\r\n MatterEvents.off(this.body, 'sleepEnd');\r\n }\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Sleep;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Sleep.js?")},"./node_modules/phaser/src/physics/matter-js/components/Static.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Static\r\n * @since 3.0.0\r\n */\r\nvar Static = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#setStatic\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setStatic: function (value)\r\n {\r\n Body.setStatic(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Static#isStatic\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} [description]\r\n */\r\n isStatic: function ()\r\n {\r\n return this.body.isStatic;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Static;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Static.js?')},"./node_modules/phaser/src/physics/matter-js/components/Transform.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\nvar MATH_CONST = __webpack_require__(/*! ../../../math/const */ "./node_modules/phaser/src/math/const.js");\r\nvar WrapAngle = __webpack_require__(/*! ../../../math/angle/Wrap */ "./node_modules/phaser/src/math/angle/Wrap.js");\r\nvar WrapAngleDegrees = __webpack_require__(/*! ../../../math/angle/WrapDegrees */ "./node_modules/phaser/src/math/angle/WrapDegrees.js");\r\n\r\n// global bitmask flag for GameObject.renderMask (used by Scale)\r\nvar _FLAG = 4; // 0100\r\n\r\n// Transform Component\r\n\r\n/**\r\n * Provides methods used for getting and setting the position, scale and rotation of a Game Object.\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Transform\r\n * @since 3.0.0\r\n */\r\nvar Transform = {\r\n\r\n /**\r\n * The x position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n x: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.x;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(value, this.y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The y position of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n y: {\r\n\r\n get: function ()\r\n {\r\n return this.body.position.y;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._tempVec2.set(this.x, value);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The horizontal scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleX: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleX;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n \r\n this._scaleX = value;\r\n\r\n if (this._scaleX === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n // Reset Matter scale back to 1 (sigh)\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, value, this._scaleY);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The vertical scale of this Game Object.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#scaleY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n scaleY: {\r\n\r\n get: function ()\r\n {\r\n return this._scaleY;\r\n },\r\n\r\n set: function (value)\r\n {\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleY = value;\r\n\r\n if (this._scaleY === 0)\r\n {\r\n this.renderFlags &= ~_FLAG;\r\n }\r\n else\r\n {\r\n this.renderFlags |= _FLAG;\r\n }\r\n\r\n Body.scale(this.body, factorX, factorY);\r\n\r\n Body.scale(this.body, this._scaleX, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Use `angle` to set or get rotation of the physics body associated to this GameObject. Unlike rotation, when using set the value can be in degrees, which will be converted to radians internally.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#angle\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n angle: {\r\n\r\n get: function ()\r\n {\r\n return WrapAngleDegrees(this.body.angle * MATH_CONST.RAD_TO_DEG);\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in degrees\r\n this.rotation = WrapAngleDegrees(value) * MATH_CONST.DEG_TO_RAD;\r\n }\r\n },\r\n\r\n /**\r\n * Use `rotation` to set or get the rotation of the physics body associated with this GameObject. The value when set must be in radians.\r\n *\r\n * @name Phaser.Physics.Matter.Components.Transform#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n rotation: {\r\n\r\n get: function ()\r\n {\r\n return this.body.angle;\r\n },\r\n\r\n set: function (value)\r\n {\r\n // value is in radians\r\n this._rotation = WrapAngle(value);\r\n\r\n Body.setAngle(this.body, this._rotation);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the position of the physics body along x and y axes. Both the parameters to this function are optional and if not passed any they default to 0.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setPosition\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=0] - The horizontal position of the body.\r\n * @param {number} [y=x] - The vertical position of the body.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setPosition: function (x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = x; }\r\n\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setPosition(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setRotation\r\n * @since 3.0.0\r\n *\r\n * @param {number} [radians=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setRotation: function (radians)\r\n {\r\n if (radians === undefined) { radians = 0; }\r\n\r\n this._rotation = WrapAngle(radians);\r\n\r\n Body.setAngle(this.body, radians);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setFixedRotation\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setFixedRotation: function ()\r\n {\r\n Body.setInertia(this.body, Infinity);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setAngle\r\n * @since 3.0.0\r\n *\r\n * @param {number} [degrees=0] - [description]\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setAngle: function (degrees)\r\n {\r\n if (degrees === undefined) { degrees = 0; }\r\n\r\n this.angle = degrees;\r\n\r\n Body.setAngle(this.body, this.rotation);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the scale of this Game Object.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Transform#setScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} [x=1] - The horizontal scale of this Game Object.\r\n * @param {number} [y=x] - The vertical scale of this Game Object. If not set it will use the x value.\r\n * @param {Phaser.Math.Vector2} [point] - The point (Vector2) from which scaling will occur.\r\n *\r\n * @return {this} This Game Object.\r\n */\r\n setScale: function (x, y, point)\r\n {\r\n if (x === undefined) { x = 1; }\r\n if (y === undefined) { y = x; }\r\n\r\n var factorX = 1 / this._scaleX;\r\n var factorY = 1 / this._scaleY;\r\n\r\n this._scaleX = x;\r\n this._scaleY = y;\r\n\r\n Body.scale(this.body, factorX, factorY, point);\r\n\r\n Body.scale(this.body, x, y, point);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Transform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Transform.js?')},"./node_modules/phaser/src/physics/matter-js/components/Velocity.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Body = __webpack_require__(/*! ../lib/body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @namespace Phaser.Physics.Matter.Components.Velocity\r\n * @since 3.0.0\r\n */\r\nvar Velocity = {\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setAngularVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - [description]\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setAngularVelocity: function (value)\r\n {\r\n Body.setAngularVelocity(this.body, value);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the horizontal velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityX\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityX: function (x)\r\n {\r\n this._tempVec2.set(x, this.body.velocity.y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocityY\r\n * @since 3.0.0\r\n *\r\n * @param {number} y - The vertical velocity value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocityY: function (y)\r\n {\r\n this._tempVec2.set(this.body.velocity.x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets both the horizontal and vertical velocity of the physics body.\r\n *\r\n * @method Phaser.Physics.Matter.Components.Velocity#setVelocity\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The horizontal velocity value.\r\n * @param {number} [y=x] - The vertical velocity value, it can be either positive or negative. If not given, it will be the same as the `x` value.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} This Game Object.\r\n */\r\n setVelocity: function (x, y)\r\n {\r\n this._tempVec2.set(x, y);\r\n\r\n Body.setVelocity(this.body, this._tempVec2);\r\n\r\n return this;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Velocity;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/Velocity.js?')},"./node_modules/phaser/src/physics/matter-js/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Bounce: __webpack_require__(/*! ./Bounce */ "./node_modules/phaser/src/physics/matter-js/components/Bounce.js"),\r\n Collision: __webpack_require__(/*! ./Collision */ "./node_modules/phaser/src/physics/matter-js/components/Collision.js"),\r\n Force: __webpack_require__(/*! ./Force */ "./node_modules/phaser/src/physics/matter-js/components/Force.js"),\r\n Friction: __webpack_require__(/*! ./Friction */ "./node_modules/phaser/src/physics/matter-js/components/Friction.js"),\r\n Gravity: __webpack_require__(/*! ./Gravity */ "./node_modules/phaser/src/physics/matter-js/components/Gravity.js"),\r\n Mass: __webpack_require__(/*! ./Mass */ "./node_modules/phaser/src/physics/matter-js/components/Mass.js"),\r\n Static: __webpack_require__(/*! ./Static */ "./node_modules/phaser/src/physics/matter-js/components/Static.js"),\r\n Sensor: __webpack_require__(/*! ./Sensor */ "./node_modules/phaser/src/physics/matter-js/components/Sensor.js"),\r\n SetBody: __webpack_require__(/*! ./SetBody */ "./node_modules/phaser/src/physics/matter-js/components/SetBody.js"),\r\n Sleep: __webpack_require__(/*! ./Sleep */ "./node_modules/phaser/src/physics/matter-js/components/Sleep.js"),\r\n Transform: __webpack_require__(/*! ./Transform */ "./node_modules/phaser/src/physics/matter-js/components/Transform.js"),\r\n Velocity: __webpack_require__(/*! ./Velocity */ "./node_modules/phaser/src/physics/matter-js/components/Velocity.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/components/index.js?')},"./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.AfterUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics After Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated and all collision events have resolved.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('afterupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#AFTER_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.AfterUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'afterupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.BeforeUpdateEvent\r\n *\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Before Update Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance right before all the collision processing takes place.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('beforeupdate', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#BEFORE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.BeforeUpdateEvent} event - The Update Event object.\r\n */\r\nmodule.exports = 'beforeupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionActiveEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Active Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that are colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionactive', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_ACTIVE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionActiveEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionactive';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionEndEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have finished colliding in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionEndEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.CollisionStartEvent\r\n *\r\n * @property {array} pairs - A list of all affected pairs in the collision.\r\n * @property {number} timestamp - The Matter Engine `timing.timestamp` value for the event.\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Collision Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance after the engine has updated.\r\n * It provides a list of all pairs that have started to collide in the current tick (if any).\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('collisionstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#COLLISION_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.CollisionStartEvent} event - The Collision Event object.\r\n * @param {MatterJS.Body} bodyA - The first body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n * @param {MatterJS.Body} bodyB - The second body of the first colliding pair. The `event.pairs` array may contain more colliding bodies.\r\n */\r\nmodule.exports = 'collisionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * stops dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_END\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has stopped being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that was dragging the body.\r\n */\r\nmodule.exports = 'dragend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * is actively dragging a body. It is emitted each time the pointer moves.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('drag', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that is being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'drag';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics Drag Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Pointer Constraint\r\n * starts dragging a body.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('dragstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#DRAG_START\r\n * @since 3.16.2\r\n * \r\n * @param {MatterJS.Body} body - The Body that has started being dragged. This is a Matter Body, not a Phaser Game Object.\r\n * @param {MatterJS.Body} part - The part of the body that was clicked on.\r\n * @param {Phaser.Physics.Matter.PointerConstraint} constraint - The Pointer Constraint that is dragging the body.\r\n */\r\nmodule.exports = 'dragstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Pause Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it is paused.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('pause', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#PAUSE\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Matter Physics World Resume Event.\r\n * \r\n * This event is dispatched by an Matter Physics World instance when it resumes from a paused state.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('resume', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#RESUME\r\n * @since 3.0.0\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepEndEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep End Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body stop sleeping.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepend', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_END\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepEndEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has stopped sleeping.\r\n */\r\nmodule.exports = 'sleepend';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Physics.Matter.Events.SleepStartEvent\r\n *\r\n * @property {any} source - The source object of the event.\r\n * @property {string} name - The name of the event.\r\n */\r\n\r\n/**\r\n * The Matter Physics Sleep Start Event.\r\n * \r\n * This event is dispatched by a Matter Physics World instance when a Body goes to sleep.\r\n * \r\n * Listen to it from a Scene using: `this.matter.world.on('sleepstart', listener)`.\r\n *\r\n * @event Phaser.Physics.Matter.Events#SLEEP_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Physics.Matter.Events.SleepStartEvent} event - The Sleep Event object.\r\n * @param {MatterJS.Body} body - The body that has gone to sleep.\r\n */\r\nmodule.exports = 'sleepstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js?")},"./node_modules/phaser/src/physics/matter-js/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AFTER_UPDATE: __webpack_require__(/*! ./AFTER_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js"),\r\n BEFORE_UPDATE: __webpack_require__(/*! ./BEFORE_UPDATE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js"),\r\n COLLISION_ACTIVE: __webpack_require__(/*! ./COLLISION_ACTIVE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js"),\r\n COLLISION_END: __webpack_require__(/*! ./COLLISION_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js"),\r\n COLLISION_START: __webpack_require__(/*! ./COLLISION_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js"),\r\n DRAG_END: __webpack_require__(/*! ./DRAG_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js"),\r\n DRAG: __webpack_require__(/*! ./DRAG_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js"),\r\n DRAG_START: __webpack_require__(/*! ./DRAG_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js"),\r\n SLEEP_END: __webpack_require__(/*! ./SLEEP_END_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js"),\r\n SLEEP_START: __webpack_require__(/*! ./SLEEP_START_EVENT */ "./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/events/index.js?')},"./node_modules/phaser/src/physics/matter-js/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Physics.Matter\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Factory: __webpack_require__(/*! ./Factory */ "./node_modules/phaser/src/physics/matter-js/Factory.js"),\r\n Image: __webpack_require__(/*! ./MatterImage */ "./node_modules/phaser/src/physics/matter-js/MatterImage.js"),\r\n Matter: __webpack_require__(/*! ./CustomMain */ "./node_modules/phaser/src/physics/matter-js/CustomMain.js"),\r\n MatterPhysics: __webpack_require__(/*! ./MatterPhysics */ "./node_modules/phaser/src/physics/matter-js/MatterPhysics.js"),\r\n PolyDecomp: __webpack_require__(/*! ./poly-decomp */ "./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js"),\r\n Sprite: __webpack_require__(/*! ./MatterSprite */ "./node_modules/phaser/src/physics/matter-js/MatterSprite.js"),\r\n TileBody: __webpack_require__(/*! ./MatterTileBody */ "./node_modules/phaser/src/physics/matter-js/MatterTileBody.js"),\r\n PhysicsEditorParser: __webpack_require__(/*! ./PhysicsEditorParser */ "./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js"),\r\n World: __webpack_require__(/*! ./World */ "./node_modules/phaser/src/physics/matter-js/World.js")\r\n\r\n};\r\n\r\n/**\r\n * @namespace MatterJS\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Body` module contains methods for creating and manipulating body models.\r\n * A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n * Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n *\r\n * @class MatterJS.Body\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n * with commonly used body configurations (such as rectangles, circles and other polygons).\r\n *\r\n * @class MatterJS.Bodies\r\n * @since 3.18.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n * A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n * It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n * Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n *\r\n * @class MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n * A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n * A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n * It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n * There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n *\r\n * @class MatterJS.World\r\n * @extends MatterJS.Composite\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n * Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n * The stiffness of constraints can be modified to create springs or elastic.\r\n *\r\n * @class MatterJS.Constraint\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n * An engine is a controller that manages updating the simulation of the world.\r\n *\r\n * @class MatterJS.Engine\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n * A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n * A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n *\r\n * @class MatterJS.Vertices\r\n * @since 3.0.0\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/index.js?')},"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Body` module contains methods for creating and manipulating body models.\r\n* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.\r\n* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n\r\n* @class Body\r\n*/\r\n\r\nvar Body = {};\r\n\r\nmodule.exports = Body;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\n\r\n(function() {\r\n\r\n Body._inertiaScale = 4;\r\n Body._nextCollidingGroupId = 1;\r\n Body._nextNonCollidingGroupId = -1;\r\n Body._nextCategory = 0x0001;\r\n\r\n /**\r\n * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * Vertices must be specified in clockwise order.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {body} body\r\n */\r\n Body.create = function(options) {\r\n var defaults = {\r\n id: Common.nextId(),\r\n type: 'body',\r\n label: 'Body',\r\n gameObject: null,\r\n parts: [],\r\n plugin: {},\r\n angle: 0,\r\n vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),\r\n position: { x: 0, y: 0 },\r\n force: { x: 0, y: 0 },\r\n torque: 0,\r\n positionImpulse: { x: 0, y: 0 },\r\n previousPositionImpulse: { x: 0, y: 0 },\r\n constraintImpulse: { x: 0, y: 0, angle: 0 },\r\n totalContacts: 0,\r\n speed: 0,\r\n angularSpeed: 0,\r\n velocity: { x: 0, y: 0 },\r\n angularVelocity: 0,\r\n isSensor: false,\r\n isStatic: false,\r\n isSleeping: false,\r\n ignoreGravity: false,\r\n ignorePointer: false,\r\n motion: 0,\r\n sleepThreshold: 60,\r\n density: 0.001,\r\n restitution: 0,\r\n friction: 0.1,\r\n frictionStatic: 0.5,\r\n frictionAir: 0.01,\r\n collisionFilter: {\r\n category: 0x0001,\r\n mask: 0xFFFFFFFF,\r\n group: 0\r\n },\r\n slop: 0.05,\r\n timeScale: 1,\r\n render: {\r\n visible: true,\r\n opacity: 1,\r\n sprite: {\r\n xScale: 1,\r\n yScale: 1,\r\n xOffset: 0,\r\n yOffset: 0\r\n },\r\n lineWidth: 0\r\n },\r\n\r\n events: null,\r\n bounds: null,\r\n chamfer: null,\r\n circleRadius: 0,\r\n positionPrev: null,\r\n anglePrev: 0,\r\n parent: null,\r\n\r\n axes: null,\r\n area: 0,\r\n mass: 0,\r\n inertia: 0,\r\n\r\n _original: null\r\n };\r\n\r\n var body = Common.extend(defaults, options);\r\n\r\n _initProperties(body, options);\r\n\r\n return body;\r\n };\r\n\r\n /**\r\n * Returns the next unique group index for which bodies will collide.\r\n * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.\r\n * See `body.collisionFilter` for more information.\r\n * @method nextGroup\r\n * @param {bool} [isNonColliding=false]\r\n * @return {Number} Unique group index\r\n */\r\n Body.nextGroup = function(isNonColliding) {\r\n if (isNonColliding)\r\n return Body._nextNonCollidingGroupId--;\r\n\r\n return Body._nextCollidingGroupId++;\r\n };\r\n\r\n /**\r\n * Returns the next unique category bitfield (starting after the initial default category `0x0001`).\r\n * There are 32 available. See `body.collisionFilter` for more information.\r\n * @method nextCategory\r\n * @return {Number} Unique category bitfield\r\n */\r\n Body.nextCategory = function() {\r\n Body._nextCategory = Body._nextCategory << 1;\r\n return Body._nextCategory;\r\n };\r\n\r\n /**\r\n * Initialises body properties.\r\n * @method _initProperties\r\n * @private\r\n * @param {body} body\r\n * @param {} [options]\r\n */\r\n var _initProperties = function(body, options) {\r\n options = options || {};\r\n\r\n // init required properties (order is important)\r\n Body.set(body, {\r\n bounds: body.bounds || Bounds.create(body.vertices),\r\n positionPrev: body.positionPrev || Vector.clone(body.position),\r\n anglePrev: body.anglePrev || body.angle,\r\n vertices: body.vertices,\r\n parts: body.parts || [body],\r\n isStatic: body.isStatic,\r\n isSleeping: body.isSleeping,\r\n parent: body.parent || body\r\n });\r\n\r\n Vertices.rotate(body.vertices, body.angle, body.position);\r\n Axes.rotate(body.axes, body.angle);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n\r\n // allow options to override the automatically calculated properties\r\n Body.set(body, {\r\n axes: options.axes || body.axes,\r\n area: options.area || body.area,\r\n mass: options.mass || body.mass,\r\n inertia: options.inertia || body.inertia\r\n });\r\n\r\n // render properties\r\n var defaultFillStyle = (body.isStatic ? '#2e2b44' : Common.choose(['#006BA6', '#0496FF', '#FFBC42', '#D81159', '#8F2D56'])),\r\n defaultStrokeStyle = '#000';\r\n body.render.fillStyle = body.render.fillStyle || defaultFillStyle;\r\n body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle;\r\n body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x);\r\n body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y);\r\n };\r\n\r\n /**\r\n * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist.\r\n * Prefer to use the actual setter functions in performance critical situations.\r\n * @method set\r\n * @param {body} body\r\n * @param {} settings A property name (or map of properties and values) to set on the body.\r\n * @param {} value The value to set if `settings` is a single property name.\r\n */\r\n Body.set = function(body, settings, value) {\r\n var property;\r\n\r\n if (typeof settings === 'string') {\r\n property = settings;\r\n settings = {};\r\n settings[property] = value;\r\n }\r\n\r\n for (property in settings) {\r\n\r\n if (!settings.hasOwnProperty(property))\r\n continue;\r\n\r\n value = settings[property];\r\n switch (property) {\r\n\r\n case 'isStatic':\r\n Body.setStatic(body, value);\r\n break;\r\n case 'isSleeping':\r\n Sleeping.set(body, value);\r\n break;\r\n case 'mass':\r\n Body.setMass(body, value);\r\n break;\r\n case 'density':\r\n Body.setDensity(body, value);\r\n break;\r\n case 'inertia':\r\n Body.setInertia(body, value);\r\n break;\r\n case 'vertices':\r\n Body.setVertices(body, value);\r\n break;\r\n case 'position':\r\n Body.setPosition(body, value);\r\n break;\r\n case 'angle':\r\n Body.setAngle(body, value);\r\n break;\r\n case 'velocity':\r\n Body.setVelocity(body, value);\r\n break;\r\n case 'angularVelocity':\r\n Body.setAngularVelocity(body, value);\r\n break;\r\n case 'parts':\r\n Body.setParts(body, value);\r\n break;\r\n default:\r\n body[property] = value;\r\n\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity.\r\n * @method setStatic\r\n * @param {body} body\r\n * @param {bool} isStatic\r\n */\r\n Body.setStatic = function(body, isStatic) {\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.isStatic = isStatic;\r\n\r\n if (isStatic) {\r\n part._original = {\r\n restitution: part.restitution,\r\n friction: part.friction,\r\n mass: part.mass,\r\n inertia: part.inertia,\r\n density: part.density,\r\n inverseMass: part.inverseMass,\r\n inverseInertia: part.inverseInertia\r\n };\r\n\r\n part.restitution = 0;\r\n part.friction = 1;\r\n part.mass = part.inertia = part.density = Infinity;\r\n part.inverseMass = part.inverseInertia = 0;\r\n\r\n part.positionPrev.x = part.position.x;\r\n part.positionPrev.y = part.position.y;\r\n part.anglePrev = part.angle;\r\n part.angularVelocity = 0;\r\n part.speed = 0;\r\n part.angularSpeed = 0;\r\n part.motion = 0;\r\n } else if (part._original) {\r\n part.restitution = part._original.restitution;\r\n part.friction = part._original.friction;\r\n part.mass = part._original.mass;\r\n part.inertia = part._original.inertia;\r\n part.density = part._original.density;\r\n part.inverseMass = part._original.inverseMass;\r\n part.inverseInertia = part._original.inverseInertia;\r\n\r\n part._original = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the mass of the body. Inverse mass, density and inertia are automatically updated to reflect the change.\r\n * @method setMass\r\n * @param {body} body\r\n * @param {number} mass\r\n */\r\n Body.setMass = function(body, mass) {\r\n var moment = body.inertia / (body.mass / 6);\r\n body.inertia = moment * (mass / 6);\r\n body.inverseInertia = 1 / body.inertia;\r\n\r\n body.mass = mass;\r\n body.inverseMass = 1 / body.mass;\r\n body.density = body.mass / body.area;\r\n };\r\n\r\n /**\r\n * Sets the density of the body. Mass and inertia are automatically updated to reflect the change.\r\n * @method setDensity\r\n * @param {body} body\r\n * @param {number} density\r\n */\r\n Body.setDensity = function(body, density) {\r\n Body.setMass(body, density * body.area);\r\n body.density = density;\r\n };\r\n\r\n /**\r\n * Sets the moment of inertia (i.e. second moment of area) of the body of the body. \r\n * Inverse inertia is automatically updated to reflect the change. Mass is not changed.\r\n * @method setInertia\r\n * @param {body} body\r\n * @param {number} inertia\r\n */\r\n Body.setInertia = function(body, inertia) {\r\n body.inertia = inertia;\r\n body.inverseInertia = 1 / body.inertia;\r\n };\r\n\r\n /**\r\n * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`).\r\n * Vertices will be automatically transformed to be orientated around their centre of mass as the origin.\r\n * They are then automatically translated to world space based on `body.position`.\r\n *\r\n * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array).\r\n * Vertices must form a convex hull, concave hulls are not supported.\r\n *\r\n * @method setVertices\r\n * @param {body} body\r\n * @param {vector[]} vertices\r\n */\r\n Body.setVertices = function(body, vertices) {\r\n // change vertices\r\n if (vertices[0].body === body) {\r\n body.vertices = vertices;\r\n } else {\r\n body.vertices = Vertices.create(vertices, body);\r\n }\r\n\r\n // update properties\r\n body.axes = Axes.fromVertices(body.vertices);\r\n body.area = Vertices.area(body.vertices);\r\n Body.setMass(body, body.density * body.area);\r\n\r\n // orient vertices around the centre of mass at origin (0, 0)\r\n var centre = Vertices.centre(body.vertices);\r\n Vertices.translate(body.vertices, centre, -1);\r\n\r\n // update inertia while vertices are at origin (0, 0)\r\n Body.setInertia(body, Body._inertiaScale * Vertices.inertia(body.vertices, body.mass));\r\n\r\n // update geometry\r\n Vertices.translate(body.vertices, body.position);\r\n Bounds.update(body.bounds, body.vertices, body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the parts of the `body` and updates mass, inertia and centroid.\r\n * Each part will have its parent set to `body`.\r\n * By default the convex hull will be automatically computed and set on `body`, unless `autoHull` is set to `false.`\r\n * Note that this method will ensure that the first part in `body.parts` will always be the `body`.\r\n * @method setParts\r\n * @param {body} body\r\n * @param [body] parts\r\n * @param {bool} [autoHull=true]\r\n */\r\n Body.setParts = function(body, parts, autoHull) {\r\n var i;\r\n\r\n // add all the parts, ensuring that the first part is always the parent body\r\n parts = parts.slice(0);\r\n body.parts.length = 0;\r\n body.parts.push(body);\r\n body.parent = body;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var part = parts[i];\r\n if (part !== body) {\r\n part.parent = body;\r\n body.parts.push(part);\r\n }\r\n }\r\n\r\n if (body.parts.length === 1)\r\n return;\r\n\r\n autoHull = typeof autoHull !== 'undefined' ? autoHull : true;\r\n\r\n // find the convex hull of all parts to set on the parent body\r\n if (autoHull) {\r\n var vertices = [];\r\n for (i = 0; i < parts.length; i++) {\r\n vertices = vertices.concat(parts[i].vertices);\r\n }\r\n\r\n Vertices.clockwiseSort(vertices);\r\n\r\n var hull = Vertices.hull(vertices),\r\n hullCentre = Vertices.centre(hull);\r\n\r\n Body.setVertices(body, hull);\r\n Vertices.translate(body.vertices, hullCentre);\r\n }\r\n\r\n // sum the properties of all compound parts of the parent body\r\n var total = Body._totalProperties(body);\r\n\r\n body.area = total.area;\r\n body.parent = body;\r\n body.position.x = total.centre.x;\r\n body.position.y = total.centre.y;\r\n body.positionPrev.x = total.centre.x;\r\n body.positionPrev.y = total.centre.y;\r\n\r\n Body.setMass(body, total.mass);\r\n Body.setInertia(body, total.inertia);\r\n Body.setPosition(body, total.centre);\r\n };\r\n\r\n /**\r\n * Sets the position of the body instantly. Velocity, angle, force etc. are unchanged.\r\n * @method setPosition\r\n * @param {body} body\r\n * @param {vector} position\r\n */\r\n Body.setPosition = function(body, position) {\r\n var delta = Vector.sub(position, body.position);\r\n body.positionPrev.x += delta.x;\r\n body.positionPrev.y += delta.y;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.position.x += delta.x;\r\n part.position.y += delta.y;\r\n Vertices.translate(part.vertices, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Sets the angle of the body instantly. Angular velocity, position, force etc. are unchanged.\r\n * @method setAngle\r\n * @param {body} body\r\n * @param {number} angle\r\n */\r\n Body.setAngle = function(body, angle) {\r\n var delta = angle - body.angle;\r\n body.anglePrev += delta;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n part.angle += delta;\r\n Vertices.rotate(part.vertices, delta, body.position);\r\n Axes.rotate(part.axes, delta);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, delta, body.position, part.position);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Sets the linear velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setVelocity\r\n * @param {body} body\r\n * @param {vector} velocity\r\n */\r\n Body.setVelocity = function(body, velocity) {\r\n body.positionPrev.x = body.position.x - velocity.x;\r\n body.positionPrev.y = body.position.y - velocity.y;\r\n body.velocity.x = velocity.x;\r\n body.velocity.y = velocity.y;\r\n body.speed = Vector.magnitude(body.velocity);\r\n };\r\n\r\n /**\r\n * Sets the angular velocity of the body instantly. Position, angle, force etc. are unchanged. See also `Body.applyForce`.\r\n * @method setAngularVelocity\r\n * @param {body} body\r\n * @param {number} velocity\r\n */\r\n Body.setAngularVelocity = function(body, velocity) {\r\n body.anglePrev = body.angle - velocity;\r\n body.angularVelocity = velocity;\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n };\r\n\r\n /**\r\n * Moves a body by a given vector relative to its current position, without imparting any velocity.\r\n * @method translate\r\n * @param {body} body\r\n * @param {vector} translation\r\n */\r\n Body.translate = function(body, translation) {\r\n Body.setPosition(body, Vector.add(body.position, translation));\r\n };\r\n\r\n /**\r\n * Rotates a body by a given angle relative to its current angle, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {body} body\r\n * @param {number} rotation\r\n * @param {vector} [point]\r\n */\r\n Body.rotate = function(body, rotation, point) {\r\n if (!point) {\r\n Body.setAngle(body, body.angle + rotation);\r\n } else {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.setAngle(body, body.angle + rotation);\r\n }\r\n };\r\n\r\n /**\r\n * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre).\r\n * @method scale\r\n * @param {body} body\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} [point]\r\n */\r\n Body.scale = function(body, scaleX, scaleY, point) {\r\n var totalArea = 0,\r\n totalInertia = 0;\r\n\r\n point = point || body.position;\r\n\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n // scale vertices\r\n Vertices.scale(part.vertices, scaleX, scaleY, point);\r\n\r\n // update properties\r\n part.axes = Axes.fromVertices(part.vertices);\r\n part.area = Vertices.area(part.vertices);\r\n Body.setMass(part, body.density * part.area);\r\n\r\n // update inertia (requires vertices to be at origin)\r\n Vertices.translate(part.vertices, { x: -part.position.x, y: -part.position.y });\r\n Body.setInertia(part, Body._inertiaScale * Vertices.inertia(part.vertices, part.mass));\r\n Vertices.translate(part.vertices, { x: part.position.x, y: part.position.y });\r\n\r\n if (i > 0) {\r\n totalArea += part.area;\r\n totalInertia += part.inertia;\r\n }\r\n\r\n // scale position\r\n part.position.x = point.x + (part.position.x - point.x) * scaleX;\r\n part.position.y = point.y + (part.position.y - point.y) * scaleY;\r\n\r\n // update bounds\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // handle parent body\r\n if (body.parts.length > 1) {\r\n body.area = totalArea;\r\n\r\n if (!body.isStatic) {\r\n Body.setMass(body, body.density * totalArea);\r\n Body.setInertia(body, totalInertia);\r\n }\r\n }\r\n\r\n // handle circles\r\n if (body.circleRadius) { \r\n if (scaleX === scaleY) {\r\n body.circleRadius *= scaleX;\r\n } else {\r\n // body is no longer a circle\r\n body.circleRadius = null;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Performs a simulation step for the given `body`, including updating position and angle using Verlet integration.\r\n * @method update\r\n * @param {body} body\r\n * @param {number} deltaTime\r\n * @param {number} timeScale\r\n * @param {number} correction\r\n */\r\n Body.update = function(body, deltaTime, timeScale, correction) {\r\n var deltaTimeSquared = Math.pow(deltaTime * timeScale * body.timeScale, 2);\r\n\r\n // from the previous step\r\n var frictionAir = 1 - body.frictionAir * timeScale * body.timeScale,\r\n velocityPrevX = body.position.x - body.positionPrev.x,\r\n velocityPrevY = body.position.y - body.positionPrev.y;\r\n\r\n // update velocity with Verlet integration\r\n body.velocity.x = (velocityPrevX * frictionAir * correction) + (body.force.x / body.mass) * deltaTimeSquared;\r\n body.velocity.y = (velocityPrevY * frictionAir * correction) + (body.force.y / body.mass) * deltaTimeSquared;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n body.position.x += body.velocity.x;\r\n body.position.y += body.velocity.y;\r\n\r\n // update angular velocity with Verlet integration\r\n body.angularVelocity = ((body.angle - body.anglePrev) * frictionAir * correction) + (body.torque / body.inertia) * deltaTimeSquared;\r\n body.anglePrev = body.angle;\r\n body.angle += body.angularVelocity;\r\n\r\n // track speed and acceleration\r\n body.speed = Vector.magnitude(body.velocity);\r\n body.angularSpeed = Math.abs(body.angularVelocity);\r\n\r\n // transform the body geometry\r\n for (var i = 0; i < body.parts.length; i++) {\r\n var part = body.parts[i];\r\n\r\n Vertices.translate(part.vertices, body.velocity);\r\n \r\n if (i > 0) {\r\n part.position.x += body.velocity.x;\r\n part.position.y += body.velocity.y;\r\n }\r\n\r\n if (body.angularVelocity !== 0) {\r\n Vertices.rotate(part.vertices, body.angularVelocity, body.position);\r\n Axes.rotate(part.axes, body.angularVelocity);\r\n if (i > 0) {\r\n Vector.rotateAbout(part.position, body.angularVelocity, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n };\r\n\r\n /**\r\n * Applies a force to a body from a given world-space position, including resulting torque.\r\n * @method applyForce\r\n * @param {body} body\r\n * @param {vector} position\r\n * @param {vector} force\r\n */\r\n Body.applyForce = function(body, position, force) {\r\n body.force.x += force.x;\r\n body.force.y += force.y;\r\n var offset = { x: position.x - body.position.x, y: position.y - body.position.y };\r\n body.torque += offset.x * force.y - offset.y * force.x;\r\n };\r\n\r\n /**\r\n * Returns the sums of the properties of all compound parts of the parent body.\r\n * @method _totalProperties\r\n * @private\r\n * @param {body} body\r\n * @return {}\r\n */\r\n Body._totalProperties = function(body) {\r\n // from equations at:\r\n // https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory\r\n // http://output.to/sideway/default.asp?qno=121100087\r\n\r\n var properties = {\r\n mass: 0,\r\n area: 0,\r\n inertia: 0,\r\n centre: { x: 0, y: 0 }\r\n };\r\n\r\n // sum the properties of all compound parts of the parent body\r\n for (var i = body.parts.length === 1 ? 0 : 1; i < body.parts.length; i++) {\r\n var part = body.parts[i],\r\n mass = part.mass !== Infinity ? part.mass : 1;\r\n\r\n properties.mass += mass;\r\n properties.area += part.area;\r\n properties.inertia += part.inertia;\r\n properties.centre = Vector.add(properties.centre, Vector.mult(part.position, mass));\r\n }\r\n\r\n properties.centre = Vector.div(properties.centre, properties.mass);\r\n\r\n return properties;\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a body starts sleeping (where `this` is the body).\r\n *\r\n * @event sleepStart\r\n * @this {body} The body that has started sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a body ends sleeping (where `this` is the body).\r\n *\r\n * @event sleepEnd\r\n * @this {body} The body that has ended sleeping\r\n * @param {} event An event object\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"body\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Body\"\r\n */\r\n\r\n /**\r\n * An array of bodies that make up this body. \r\n * The first body in the array must always be a self reference to the current body instance.\r\n * All bodies in the `parts` array together form a single rigid compound body.\r\n * Parts are allowed to overlap, have gaps or holes or even form concave bodies.\r\n * Parts themselves should never be added to a `World`, only the parent body should be.\r\n * Use `Body.setParts` when setting parts to ensure correct updates of all properties.\r\n *\r\n * @property parts\r\n * @type body[]\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n /**\r\n * A self reference if the body is _not_ a part of another body.\r\n * Otherwise this is a reference to the body that this is a part of.\r\n * See `body.parts`.\r\n *\r\n * @property parent\r\n * @type body\r\n */\r\n\r\n /**\r\n * A `Number` specifying the angle of the body, in radians.\r\n *\r\n * @property angle\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An array of `Vector` objects that specify the convex hull of the rigid body.\r\n * These should be provided about the origin `(0, 0)`. E.g.\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * When passed via `Body.create`, the vertices are translated relative to `body.position` (i.e. world-space, and constantly updated by `Body.update` during simulation).\r\n * The `Vector` objects are also augmented with additional properties required for efficient collision detection. \r\n *\r\n * Other properties such as `inertia` and `bounds` are automatically calculated from the passed vertices (unless provided via `options`).\r\n * Concave hulls are not currently supported. The module `Matter.Vertices` contains useful methods for working with vertices.\r\n *\r\n * @property vertices\r\n * @type vector[]\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the current world-space position of the body.\r\n *\r\n * @property position\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the force to apply in the current step. It is zeroed after every `Body.update`. See also `Body.applyForce`.\r\n *\r\n * @property force\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the torque (turning force) to apply in the current step. It is zeroed after every `Body.update`.\r\n *\r\n * @property torque\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.velocity`).\r\n *\r\n * @readOnly\r\n * @property speed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular speed of the body after the last `Body.update`. It is read-only and always positive (it's the magnitude of `body.angularVelocity`).\r\n *\r\n * @readOnly\r\n * @property angularSpeed\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Vector` that _measures_ the current velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's velocity directly, you should either apply a force or simply change the body's `position` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property velocity\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the current angular velocity of the body after the last `Body.update`. It is read-only. \r\n * If you need to modify a body's angular velocity directly, you should apply a torque or simply change the body's `angle` (as the engine uses position-Verlet integration).\r\n *\r\n * @readOnly\r\n * @property angularVelocity\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.\r\n * If you need to set a body as static after its creation, you should use `Body.setStatic` as this requires more than just setting this flag.\r\n *\r\n * @property isStatic\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.\r\n *\r\n * @property isSensor\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken.\r\n * If you need to set a body as sleeping, you should use `Sleeping.set` as this requires more than just setting this flag.\r\n *\r\n * @property isSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * A `Number` that _measures_ the amount of movement a body currently has (a combination of `speed` and `angularSpeed`). It is read-only and always positive.\r\n * It is used and updated by the `Matter.Sleeping` module during simulation to decide if a body has come to rest.\r\n *\r\n * @readOnly\r\n * @property motion\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the number of updates in which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).\r\n *\r\n * @property sleepThreshold\r\n * @type number\r\n * @default 60\r\n */\r\n\r\n /**\r\n * A `Number` that defines the density of the body, that is its mass per unit area.\r\n * If you pass the density via `Body.create` the `mass` property is automatically calculated for you based on the size (area) of the object.\r\n * This is generally preferable to simply setting mass and allows for more intuitive definition of materials (e.g. rock has a higher density than wood).\r\n *\r\n * @property density\r\n * @type number\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Number` that defines the mass of the body, although it may be more appropriate to specify the `density` property instead.\r\n * If you modify this value, you must also modify the `body.inverseMass` property (`1 / mass`).\r\n *\r\n * @property mass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse mass of the body (`1 / mass`).\r\n * If you modify this value, you must also modify the `body.mass` property.\r\n *\r\n * @property inverseMass\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the moment of inertia (i.e. second moment of area) of the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) and density in `Body.create`.\r\n * If you modify this value, you must also modify the `body.inverseInertia` property (`1 / inertia`).\r\n *\r\n * @property inertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`).\r\n * If you modify this value, you must also modify the `body.inertia` property.\r\n *\r\n * @property inverseInertia\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. \r\n * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy.\r\n * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula:\r\n *\r\n * Math.max(bodyA.restitution, bodyB.restitution)\r\n *\r\n * @property restitution\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`.\r\n * A value of `0` means that the body may slide indefinitely.\r\n * A value of `1` means the body may come to a stop almost instantly after a force is applied.\r\n *\r\n * The effects of the value may be non-linear. \r\n * High values may be unstable depending on the body.\r\n * The engine uses a Coulomb friction model including static and kinetic friction.\r\n * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula:\r\n *\r\n * Math.min(bodyA.friction, bodyB.friction)\r\n *\r\n * @property friction\r\n * @type number\r\n * @default 0.1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the static friction of the body (in the Coulomb friction model). \r\n * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.\r\n * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.\r\n * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.\r\n *\r\n * @property frictionStatic\r\n * @type number\r\n * @default 0.5\r\n */\r\n\r\n /**\r\n * A `Number` that defines the air friction of the body (air resistance). \r\n * A value of `0` means the body will never slow as it moves through space.\r\n * The higher the value, the faster a body slows when moving through space.\r\n * The effects of the value are non-linear. \r\n *\r\n * @property frictionAir\r\n * @type number\r\n * @default 0.01\r\n */\r\n\r\n /**\r\n * An `Object` that specifies the collision filtering properties of this body.\r\n *\r\n * Collisions between two bodies will obey the following rules:\r\n * - If the two bodies have the same non-zero value of `collisionFilter.group`,\r\n * they will always collide if the value is positive, and they will never collide\r\n * if the value is negative.\r\n * - If the two bodies have different values of `collisionFilter.group` or if one\r\n * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:\r\n *\r\n * Each body belongs to a collision category, given by `collisionFilter.category`. This\r\n * value is used as a bit field and the category should have only one bit set, meaning that\r\n * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32\r\n * different collision categories available.\r\n *\r\n * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies\r\n * the categories it collides with (the value is the bitwise AND value of all these categories).\r\n *\r\n * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's\r\n * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`\r\n * are both true.\r\n *\r\n * @property collisionFilter\r\n * @type object\r\n */\r\n\r\n /**\r\n * An Integer `Number`, that specifies the collision group this body belongs to.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.group\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A bit field that specifies the collision category this body belongs to.\r\n * The category value should have only one bit set, for example `0x0001`.\r\n * This means there are up to 32 unique collision categories available.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.category\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A bit mask that specifies the collision categories this body may collide with.\r\n * See `body.collisionFilter` for more information.\r\n *\r\n * @property collisionFilter.mask\r\n * @type object\r\n * @default -1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies a tolerance on how far a body is allowed to 'sink' or rotate into other bodies.\r\n * Avoid changing this value unless you understand the purpose of `slop` in physics engines.\r\n * The default should generally suffice, although very large bodies may require larger values for stable stacking.\r\n *\r\n * @property slop\r\n * @type number\r\n * @default 0.05\r\n */\r\n\r\n /**\r\n * A `Number` that allows per-body time scaling, e.g. a force-field where bodies inside are in slow-motion, while others are at full speed.\r\n *\r\n * @property timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the body should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * Sets the opacity to use when rendering.\r\n *\r\n * @property render.opacity\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * An `Object` that defines the sprite properties to use when rendering, if any.\r\n *\r\n * @property render.sprite\r\n * @type object\r\n */\r\n\r\n /**\r\n * An `String` that defines the path to the image to use as the sprite texture, if any.\r\n *\r\n * @property render.sprite.texture\r\n * @type string\r\n */\r\n \r\n /**\r\n * A `Number` that defines the scaling in the x-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.xScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the scaling in the y-axis for the sprite, if any.\r\n *\r\n * @property render.sprite.yScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width).\r\n *\r\n * @property render.sprite.xOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the offset in the y-axis for the sprite (normalised by texture height).\r\n *\r\n * @property render.sprite.yOffset\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined).\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.fillStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined).\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * An array of unique axis vectors (edge normals) used for collision detection.\r\n * These are automatically calculated from the given convex hull (`vertices` array) in `Body.create`.\r\n * They are constantly updated by `Body.update` during the simulation.\r\n *\r\n * @property axes\r\n * @type vector[]\r\n */\r\n \r\n /**\r\n * A `Number` that _measures_ the area of the body's convex hull, calculated at creation by `Body.create`.\r\n *\r\n * @property area\r\n * @type string\r\n * @default \r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the AABB region for the body.\r\n * It is automatically calculated from the given convex hull (`vertices` array) in `Body.create` and constantly updated by `Body.update` during simulation.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Body.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.\r\n* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.\r\n* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.\r\n* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composite\r\n*/\r\n\r\nvar Composite = {};\r\n\r\nmodule.exports = Composite;\r\n\r\nvar Events = __webpack_require__(/*! ../core/Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Body = __webpack_require__(/*! ./Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properites section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} [options]\r\n * @return {composite} A new composite\r\n */\r\n Composite.create = function(options) {\r\n return Common.extend({ \r\n id: Common.nextId(),\r\n type: 'composite',\r\n parent: null,\r\n isModified: false,\r\n bodies: [], \r\n constraints: [], \r\n composites: [],\r\n label: 'Composite',\r\n plugin: {}\r\n }, options);\r\n };\r\n\r\n /**\r\n * Sets the composite's `isModified` flag. \r\n * If `updateParents` is true, all parents will be set (default: false).\r\n * If `updateChildren` is true, all children will be set (default: false).\r\n * @method setModified\r\n * @param {composite} composite\r\n * @param {boolean} isModified\r\n * @param {boolean} [updateParents=false]\r\n * @param {boolean} [updateChildren=false]\r\n */\r\n Composite.setModified = function(composite, isModified, updateParents, updateChildren) {\r\n composite.isModified = isModified;\r\n\r\n if (updateParents && composite.parent) {\r\n Composite.setModified(composite.parent, isModified, updateParents, updateChildren);\r\n }\r\n\r\n if (updateChildren) {\r\n for(var i = 0; i < composite.composites.length; i++) {\r\n var childComposite = composite.composites[i];\r\n Composite.setModified(childComposite, isModified, updateParents, updateChildren);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Generic add function. Adds one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Triggers `beforeAdd` and `afterAdd` events on the `composite`.\r\n * @method add\r\n * @param {composite} composite\r\n * @param {} object\r\n * @return {composite} The original composite with the objects added\r\n */\r\n Composite.add = function(composite, object) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeAdd', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n // skip adding compound parts\r\n if (obj.parent !== obj) {\r\n Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)');\r\n break;\r\n }\r\n\r\n Composite.addBody(composite, obj);\r\n break;\r\n case 'constraint':\r\n Composite.addConstraint(composite, obj);\r\n break;\r\n case 'composite':\r\n Composite.addComposite(composite, obj);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.addConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterAdd', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite.\r\n * Optionally searching its children recursively.\r\n * Triggers `beforeRemove` and `afterRemove` events on the `composite`.\r\n * @method remove\r\n * @param {composite} composite\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the objects removed\r\n */\r\n Composite.remove = function(composite, object, deep) {\r\n var objects = [].concat(object);\r\n\r\n Events.trigger(composite, 'beforeRemove', { object: object });\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n var obj = objects[i];\r\n\r\n switch (obj.type) {\r\n\r\n case 'body':\r\n Composite.removeBody(composite, obj, deep);\r\n break;\r\n case 'constraint':\r\n Composite.removeConstraint(composite, obj, deep);\r\n break;\r\n case 'composite':\r\n Composite.removeComposite(composite, obj, deep);\r\n break;\r\n case 'mouseConstraint':\r\n Composite.removeConstraint(composite, obj.constraint);\r\n break;\r\n\r\n }\r\n }\r\n\r\n Events.trigger(composite, 'afterRemove', { object: object });\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a composite to the given composite.\r\n * @private\r\n * @method addComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @return {composite} The original compositeA with the objects from compositeB added\r\n */\r\n Composite.addComposite = function(compositeA, compositeB) {\r\n compositeA.composites.push(compositeB);\r\n compositeB.parent = compositeA;\r\n Composite.setModified(compositeA, true, true, false);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeComposite\r\n * @param {composite} compositeA\r\n * @param {composite} compositeB\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original compositeA with the composite removed\r\n */\r\n Composite.removeComposite = function(compositeA, compositeB, deep) {\r\n var position = compositeA.composites.indexOf(compositeB);\r\n if (position !== -1) {\r\n Composite.removeCompositeAt(compositeA, position);\r\n Composite.setModified(compositeA, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < compositeA.composites.length; i++){\r\n Composite.removeComposite(compositeA.composites[i], compositeB, true);\r\n }\r\n }\r\n\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Removes a composite from the given composite.\r\n * @private\r\n * @method removeCompositeAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the composite removed\r\n */\r\n Composite.removeCompositeAt = function(composite, position) {\r\n composite.composites.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a body to the given composite.\r\n * @private\r\n * @method addBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @return {composite} The original composite with the body added\r\n */\r\n Composite.addBody = function(composite, body) {\r\n composite.bodies.push(body);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeBody\r\n * @param {composite} composite\r\n * @param {body} body\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBody = function(composite, body, deep) {\r\n var position = composite.bodies.indexOf(body);\r\n if (position !== -1) {\r\n Composite.removeBodyAt(composite, position);\r\n Composite.setModified(composite, true, true, false);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeBody(composite.composites[i], body, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeBodyAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the body removed\r\n */\r\n Composite.removeBodyAt = function(composite, position) {\r\n composite.bodies.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Adds a constraint to the given composite.\r\n * @private\r\n * @method addConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @return {composite} The original composite with the constraint added\r\n */\r\n Composite.addConstraint = function(composite, constraint) {\r\n composite.constraints.push(constraint);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a constraint from the given composite, and optionally searching its children recursively.\r\n * @private\r\n * @method removeConstraint\r\n * @param {composite} composite\r\n * @param {constraint} constraint\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraint = function(composite, constraint, deep) {\r\n var position = composite.constraints.indexOf(constraint);\r\n if (position !== -1) {\r\n Composite.removeConstraintAt(composite, position);\r\n }\r\n\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.removeConstraint(composite.composites[i], constraint, true);\r\n }\r\n }\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes a body from the given composite.\r\n * @private\r\n * @method removeConstraintAt\r\n * @param {composite} composite\r\n * @param {number} position\r\n * @return {composite} The original composite with the constraint removed\r\n */\r\n Composite.removeConstraintAt = function(composite, position) {\r\n composite.constraints.splice(position, 1);\r\n Composite.setModified(composite, true, true, false);\r\n return composite;\r\n };\r\n\r\n /**\r\n * Removes all bodies, constraints and composites from the given composite.\r\n * Optionally clearing its children recursively.\r\n * @method clear\r\n * @param {composite} composite\r\n * @param {boolean} keepStatic\r\n * @param {boolean} [deep=false]\r\n */\r\n Composite.clear = function(composite, keepStatic, deep) {\r\n if (deep) {\r\n for (var i = 0; i < composite.composites.length; i++){\r\n Composite.clear(composite.composites[i], keepStatic, true);\r\n }\r\n }\r\n \r\n if (keepStatic) {\r\n composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; });\r\n } else {\r\n composite.bodies.length = 0;\r\n }\r\n\r\n composite.constraints.length = 0;\r\n composite.composites.length = 0;\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns all bodies in the given composite, including all bodies in its children, recursively.\r\n * @method allBodies\r\n * @param {composite} composite\r\n * @return {body[]} All the bodies\r\n */\r\n Composite.allBodies = function(composite) {\r\n var bodies = [].concat(composite.bodies);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n bodies = bodies.concat(Composite.allBodies(composite.composites[i]));\r\n\r\n return bodies;\r\n };\r\n\r\n /**\r\n * Returns all constraints in the given composite, including all constraints in its children, recursively.\r\n * @method allConstraints\r\n * @param {composite} composite\r\n * @return {constraint[]} All the constraints\r\n */\r\n Composite.allConstraints = function(composite) {\r\n var constraints = [].concat(composite.constraints);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n constraints = constraints.concat(Composite.allConstraints(composite.composites[i]));\r\n\r\n return constraints;\r\n };\r\n\r\n /**\r\n * Returns all composites in the given composite, including all composites in its children, recursively.\r\n * @method allComposites\r\n * @param {composite} composite\r\n * @return {composite[]} All the composites\r\n */\r\n Composite.allComposites = function(composite) {\r\n var composites = [].concat(composite.composites);\r\n\r\n for (var i = 0; i < composite.composites.length; i++)\r\n composites = composites.concat(Composite.allComposites(composite.composites[i]));\r\n\r\n return composites;\r\n };\r\n\r\n /**\r\n * Searches the composite recursively for an object matching the type and id supplied, null if not found.\r\n * @method get\r\n * @param {composite} composite\r\n * @param {number} id\r\n * @param {string} type\r\n * @return {object} The requested object, if found\r\n */\r\n Composite.get = function(composite, id, type) {\r\n var objects,\r\n object;\r\n\r\n switch (type) {\r\n case 'body':\r\n objects = Composite.allBodies(composite);\r\n break;\r\n case 'constraint':\r\n objects = Composite.allConstraints(composite);\r\n break;\r\n case 'composite':\r\n objects = Composite.allComposites(composite).concat(composite);\r\n break;\r\n }\r\n\r\n if (!objects)\r\n return null;\r\n\r\n object = objects.filter(function(object) { \r\n return object.id.toString() === id.toString(); \r\n });\r\n\r\n return object.length === 0 ? null : object[0];\r\n };\r\n\r\n /**\r\n * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add).\r\n * @method move\r\n * @param {compositeA} compositeA\r\n * @param {object[]} objects\r\n * @param {compositeB} compositeB\r\n * @return {composite} Returns compositeA\r\n */\r\n Composite.move = function(compositeA, objects, compositeB) {\r\n Composite.remove(compositeA, objects);\r\n Composite.add(compositeB, objects);\r\n return compositeA;\r\n };\r\n\r\n /**\r\n * Assigns new ids for all objects in the composite, recursively.\r\n * @method rebase\r\n * @param {composite} composite\r\n * @return {composite} Returns composite\r\n */\r\n Composite.rebase = function(composite) {\r\n var objects = Composite.allBodies(composite)\r\n .concat(Composite.allConstraints(composite))\r\n .concat(Composite.allComposites(composite));\r\n\r\n for (var i = 0; i < objects.length; i++) {\r\n objects[i].id = Common.nextId();\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Translates all children in the composite by a given vector relative to their current positions, \r\n * without imparting any velocity.\r\n * @method translate\r\n * @param {composite} composite\r\n * @param {vector} translation\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.translate = function(composite, translation, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n Body.translate(bodies[i], translation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.\r\n * @method rotate\r\n * @param {composite} composite\r\n * @param {number} rotation\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.rotate = function(composite, rotation, point, recursive) {\r\n var cos = Math.cos(rotation),\r\n sin = Math.sin(rotation),\r\n bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + (dx * cos - dy * sin),\r\n y: point.y + (dx * sin + dy * cos)\r\n });\r\n\r\n Body.rotate(body, rotation);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.\r\n * @method scale\r\n * @param {composite} composite\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n * @param {bool} [recursive=true]\r\n */\r\n Composite.scale = function(composite, scaleX, scaleY, point, recursive) {\r\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n dx = body.position.x - point.x,\r\n dy = body.position.y - point.y;\r\n \r\n Body.setPosition(body, {\r\n x: point.x + dx * scaleX,\r\n y: point.y + dy * scaleY\r\n });\r\n\r\n Body.scale(body, scaleX, scaleY);\r\n }\r\n\r\n Composite.setModified(composite, true, true, false);\r\n\r\n return composite;\r\n };\r\n\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies.\r\n * @method bounds\r\n * @param {composite} composite The composite.\r\n * @returns {bounds} The composite bounds.\r\n */\r\n Composite.bounds = function(composite) {\r\n var bodies = Composite.allBodies(composite),\r\n vertices = [];\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Bounds.create(vertices);\r\n };\r\n\r\n /*\r\n *\r\n * Events Documentation\r\n *\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, before objects have been added.\r\n *\r\n * @event beforeAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.add` is made, after objects have been added.\r\n *\r\n * @event afterAdd\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, before objects have been removed.\r\n *\r\n * @event beforeRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired when a call to `Composite.remove` is made, after objects have been removed.\r\n *\r\n * @event afterRemove\r\n * @param {} event An event object\r\n * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these)\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"composite\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage composites.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Composite\"\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the composite has been modified during the current step.\r\n * Most `Matter.Composite` methods will automatically set this flag to `true` to inform the engine of changes to be handled.\r\n * If you need to change it manually, you should use the `Composite.setModified` method.\r\n *\r\n * @property isModified\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods.\r\n *\r\n * @property parent\r\n * @type composite\r\n * @default null\r\n */\r\n\r\n /**\r\n * An array of `Body` that are _direct_ children of this composite.\r\n * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method.\r\n *\r\n * @property bodies\r\n * @type body[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Constraint` that are _direct_ children of this composite.\r\n * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method.\r\n *\r\n * @property constraints\r\n * @type constraint[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An array of `Composite` that are _direct_ children of this composite.\r\n * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\r\n * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method.\r\n *\r\n * @property composites\r\n * @type composite[]\r\n * @default []\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js?")},"./node_modules/phaser/src/physics/matter-js/lib/body/World.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.World` module contains methods for creating and manipulating the world composite.\r\n* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.\r\n* A `Matter.World` has a few additional properties including `gravity` and `bounds`.\r\n* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.\r\n* There are also a few methods here that alias those in `Matter.Composite` for easier readability.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class World\r\n* @extends Composite\r\n*/\r\n\r\nvar World = {};\r\n\r\nmodule.exports = World;\r\n\r\nvar Composite = __webpack_require__(/*! ./Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new world composite. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @constructor\r\n * @param {} options\r\n * @return {world} A new world\r\n */\r\n World.create = function(options) {\r\n var composite = Composite.create();\r\n\r\n var defaults = {\r\n label: \'World\',\r\n gravity: {\r\n x: 0,\r\n y: 1,\r\n scale: 0.001\r\n },\r\n bounds: { \r\n min: { x: -Infinity, y: -Infinity }, \r\n max: { x: Infinity, y: Infinity } \r\n }\r\n };\r\n \r\n return Common.extend(composite, defaults, options);\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * The gravity to apply on the world.\r\n *\r\n * @property gravity\r\n * @type object\r\n */\r\n\r\n /**\r\n * The gravity x component.\r\n *\r\n * @property gravity.x\r\n * @type object\r\n * @default 0\r\n */\r\n\r\n /**\r\n * The gravity y component.\r\n *\r\n * @property gravity.y\r\n * @type object\r\n * @default 1\r\n */\r\n\r\n /**\r\n * The gravity scale factor.\r\n *\r\n * @property gravity.scale\r\n * @type object\r\n * @default 0.001\r\n */\r\n\r\n /**\r\n * A `Bounds` object that defines the world bounds for collision detection.\r\n *\r\n * @property bounds\r\n * @type bounds\r\n * @default { min: { x: -Infinity, y: -Infinity }, max: { x: Infinity, y: Infinity } }\r\n */\r\n\r\n // World is a Composite body\r\n // see src/module/Outro.js for these aliases:\r\n \r\n /**\r\n * An alias for Composite.add\r\n * @method add\r\n * @param {world} world\r\n * @param {} object\r\n * @return {composite} The original world with the objects added\r\n */\r\n\r\n /**\r\n * An alias for Composite.remove\r\n * @method remove\r\n * @param {world} world\r\n * @param {} object\r\n * @param {boolean} [deep=false]\r\n * @return {composite} The original world with the objects removed\r\n */\r\n\r\n /**\r\n * An alias for Composite.clear\r\n * @method clear\r\n * @param {world} world\r\n * @param {boolean} keepStatic\r\n */\r\n\r\n /**\r\n * An alias for Composite.addComposite\r\n * @method addComposite\r\n * @param {world} world\r\n * @param {composite} composite\r\n * @return {world} The original world with the objects from composite added\r\n */\r\n \r\n /**\r\n * An alias for Composite.addBody\r\n * @method addBody\r\n * @param {world} world\r\n * @param {body} body\r\n * @return {world} The original world with the body added\r\n */\r\n\r\n /**\r\n * An alias for Composite.addConstraint\r\n * @method addConstraint\r\n * @param {world} world\r\n * @param {constraint} constraint\r\n * @return {world} The original world with the constraint added\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/body/World.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Detector` module contains methods for detecting collisions given a set of pairs.\r\n*\r\n* @class Detector\r\n*/\r\n\r\n// TODO: speculative contacts\r\n\r\nvar Detector = {};\r\n\r\nmodule.exports = Detector;\r\n\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Finds all collisions given a list of pairs.\r\n * @method collisions\r\n * @param {pair[]} broadphasePairs\r\n * @param {engine} engine\r\n * @return {array} collisions\r\n */\r\n Detector.collisions = function(broadphasePairs, engine) {\r\n var collisions = [],\r\n pairsTable = engine.pairs.table;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n // @endif\r\n \r\n for (var i = 0; i < broadphasePairs.length; i++) {\r\n var bodyA = broadphasePairs[i][0], \r\n bodyB = broadphasePairs[i][1];\r\n\r\n if ((bodyA.isStatic || bodyA.isSleeping) && (bodyB.isStatic || bodyB.isSleeping))\r\n continue;\r\n \r\n if (!Detector.canCollide(bodyA.collisionFilter, bodyB.collisionFilter))\r\n continue;\r\n\r\n // @if DEBUG\r\n metrics.midphaseTests += 1;\r\n // @endif\r\n\r\n // mid phase\r\n if (Bounds.overlaps(bodyA.bounds, bodyB.bounds)) {\r\n for (var j = bodyA.parts.length > 1 ? 1 : 0; j < bodyA.parts.length; j++) {\r\n var partA = bodyA.parts[j];\r\n\r\n for (var k = bodyB.parts.length > 1 ? 1 : 0; k < bodyB.parts.length; k++) {\r\n var partB = bodyB.parts[k];\r\n\r\n if ((partA === bodyA && partB === bodyB) || Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n // find a previous collision we could reuse\r\n var pairId = Pair.id(partA, partB),\r\n pair = pairsTable[pairId],\r\n previousCollision;\r\n\r\n if (pair && pair.isActive) {\r\n previousCollision = pair.collision;\r\n } else {\r\n previousCollision = null;\r\n }\r\n\r\n // narrow phase\r\n var collision = SAT.collides(partA, partB, previousCollision);\r\n\r\n // @if DEBUG\r\n metrics.narrowphaseTests += 1;\r\n if (collision.reused)\r\n metrics.narrowReuseCount += 1;\r\n // @endif\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n // @if DEBUG\r\n metrics.narrowDetections += 1;\r\n // @endif\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns `true` if both supplied collision filters will allow a collision to occur.\r\n * See `body.collisionFilter` for more information.\r\n * @method canCollide\r\n * @param {} filterA\r\n * @param {} filterB\r\n * @return {bool} `true` if collision can occur\r\n */\r\n Detector.canCollide = function(filterA, filterB) {\r\n if (filterA.group === filterB.group && filterA.group !== 0)\r\n return filterA.group > 0;\r\n\r\n return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures.\r\n*\r\n* @class Grid\r\n*/\r\n\r\nvar Grid = {};\r\n\r\nmodule.exports = Grid;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js\");\r\nvar Detector = __webpack_require__(/*! ./Detector */ \"./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new grid.\r\n * @method create\r\n * @param {} options\r\n * @return {grid} A new grid\r\n */\r\n Grid.create = function(options) {\r\n var defaults = {\r\n controller: Grid,\r\n detector: Detector.collisions,\r\n buckets: {},\r\n pairs: {},\r\n pairsList: [],\r\n bucketWidth: 48,\r\n bucketHeight: 48\r\n };\r\n\r\n return Common.extend(defaults, options);\r\n };\r\n\r\n /**\r\n * The width of a single grid bucket.\r\n *\r\n * @property bucketWidth\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * The height of a single grid bucket.\r\n *\r\n * @property bucketHeight\r\n * @type number\r\n * @default 48\r\n */\r\n\r\n /**\r\n * Updates the grid.\r\n * @method update\r\n * @param {grid} grid\r\n * @param {body[]} bodies\r\n * @param {engine} engine\r\n * @param {boolean} forceUpdate\r\n */\r\n Grid.update = function(grid, bodies, engine, forceUpdate) {\r\n var i, col, row,\r\n world = engine.world,\r\n buckets = grid.buckets,\r\n bucket,\r\n bucketId,\r\n gridChanged = false;\r\n\r\n // @if DEBUG\r\n var metrics = engine.metrics;\r\n metrics.broadphaseTests = 0;\r\n // @endif\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isSleeping && !forceUpdate)\r\n continue;\r\n\r\n // don't update out of world bodies\r\n if (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x\r\n || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y)\r\n continue;\r\n\r\n var newRegion = Grid._getRegion(grid, body);\r\n\r\n // if the body has changed grid region\r\n if (!body.region || newRegion.id !== body.region.id || forceUpdate) {\r\n\r\n // @if DEBUG\r\n metrics.broadphaseTests += 1;\r\n // @endif\r\n\r\n if (!body.region || forceUpdate)\r\n body.region = newRegion;\r\n\r\n var union = Grid._regionUnion(newRegion, body.region);\r\n\r\n // update grid buckets affected by region change\r\n // iterate over the union of both regions\r\n for (col = union.startCol; col <= union.endCol; col++) {\r\n for (row = union.startRow; row <= union.endRow; row++) {\r\n bucketId = Grid._getBucketId(col, row);\r\n bucket = buckets[bucketId];\r\n\r\n var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol\r\n && row >= newRegion.startRow && row <= newRegion.endRow);\r\n\r\n var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol\r\n && row >= body.region.startRow && row <= body.region.endRow);\r\n\r\n // remove from old region buckets\r\n if (!isInsideNewRegion && isInsideOldRegion) {\r\n if (isInsideOldRegion) {\r\n if (bucket)\r\n Grid._bucketRemoveBody(grid, bucket, body);\r\n }\r\n }\r\n\r\n // add to new region buckets\r\n if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) {\r\n if (!bucket)\r\n bucket = Grid._createBucket(buckets, bucketId);\r\n Grid._bucketAddBody(grid, bucket, body);\r\n }\r\n }\r\n }\r\n\r\n // set the new region\r\n body.region = newRegion;\r\n\r\n // flag changes so we can update pairs\r\n gridChanged = true;\r\n }\r\n }\r\n\r\n // update pairs list only if pairs changed (i.e. a body changed region)\r\n if (gridChanged)\r\n grid.pairsList = Grid._createActivePairsList(grid);\r\n };\r\n\r\n /**\r\n * Clears the grid.\r\n * @method clear\r\n * @param {grid} grid\r\n */\r\n Grid.clear = function(grid) {\r\n grid.buckets = {};\r\n grid.pairs = {};\r\n grid.pairsList = [];\r\n };\r\n\r\n /**\r\n * Finds the union of two regions.\r\n * @method _regionUnion\r\n * @private\r\n * @param {} regionA\r\n * @param {} regionB\r\n * @return {} region\r\n */\r\n Grid._regionUnion = function(regionA, regionB) {\r\n var startCol = Math.min(regionA.startCol, regionB.startCol),\r\n endCol = Math.max(regionA.endCol, regionB.endCol),\r\n startRow = Math.min(regionA.startRow, regionB.startRow),\r\n endRow = Math.max(regionA.endRow, regionB.endRow);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Gets the region a given body falls in for a given grid.\r\n * @method _getRegion\r\n * @private\r\n * @param {} grid\r\n * @param {} body\r\n * @return {} region\r\n */\r\n Grid._getRegion = function(grid, body) {\r\n var bounds = body.bounds,\r\n startCol = Math.floor(bounds.min.x / grid.bucketWidth),\r\n endCol = Math.floor(bounds.max.x / grid.bucketWidth),\r\n startRow = Math.floor(bounds.min.y / grid.bucketHeight),\r\n endRow = Math.floor(bounds.max.y / grid.bucketHeight);\r\n\r\n return Grid._createRegion(startCol, endCol, startRow, endRow);\r\n };\r\n\r\n /**\r\n * Creates a region.\r\n * @method _createRegion\r\n * @private\r\n * @param {} startCol\r\n * @param {} endCol\r\n * @param {} startRow\r\n * @param {} endRow\r\n * @return {} region\r\n */\r\n Grid._createRegion = function(startCol, endCol, startRow, endRow) {\r\n return { \r\n id: startCol + ',' + endCol + ',' + startRow + ',' + endRow,\r\n startCol: startCol, \r\n endCol: endCol, \r\n startRow: startRow, \r\n endRow: endRow \r\n };\r\n };\r\n\r\n /**\r\n * Gets the bucket id at the given position.\r\n * @method _getBucketId\r\n * @private\r\n * @param {} column\r\n * @param {} row\r\n * @return {string} bucket id\r\n */\r\n Grid._getBucketId = function(column, row) {\r\n return 'C' + column + 'R' + row;\r\n };\r\n\r\n /**\r\n * Creates a bucket.\r\n * @method _createBucket\r\n * @private\r\n * @param {} buckets\r\n * @param {} bucketId\r\n * @return {} bucket\r\n */\r\n Grid._createBucket = function(buckets, bucketId) {\r\n var bucket = buckets[bucketId] = [];\r\n return bucket;\r\n };\r\n\r\n /**\r\n * Adds a body to a bucket.\r\n * @method _bucketAddBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketAddBody = function(grid, bucket, body) {\r\n // add new pairs\r\n for (var i = 0; i < bucket.length; i++) {\r\n var bodyB = bucket[i];\r\n\r\n if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic))\r\n continue;\r\n\r\n // keep track of the number of buckets the pair exists in\r\n // important for Grid.update to work\r\n var pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair) {\r\n pair[2] += 1;\r\n } else {\r\n grid.pairs[pairId] = [body, bodyB, 1];\r\n }\r\n }\r\n\r\n // add to bodies (after pairs, otherwise pairs with self)\r\n bucket.push(body);\r\n };\r\n\r\n /**\r\n * Removes a body from a bucket.\r\n * @method _bucketRemoveBody\r\n * @private\r\n * @param {} grid\r\n * @param {} bucket\r\n * @param {} body\r\n */\r\n Grid._bucketRemoveBody = function(grid, bucket, body) {\r\n // remove from bucket\r\n bucket.splice(Common.indexOf(bucket, body), 1);\r\n\r\n // update pair counts\r\n for (var i = 0; i < bucket.length; i++) {\r\n // keep track of the number of buckets the pair exists in\r\n // important for _createActivePairsList to work\r\n var bodyB = bucket[i],\r\n pairId = Pair.id(body, bodyB),\r\n pair = grid.pairs[pairId];\r\n\r\n if (pair)\r\n pair[2] -= 1;\r\n }\r\n };\r\n\r\n /**\r\n * Generates a list of the active pairs in the grid.\r\n * @method _createActivePairsList\r\n * @private\r\n * @param {} grid\r\n * @return [] pairs\r\n */\r\n Grid._createActivePairsList = function(grid) {\r\n var pairKeys,\r\n pair,\r\n pairs = [];\r\n\r\n // grid.pairs is used as a hashmap\r\n pairKeys = Common.keys(grid.pairs);\r\n\r\n // iterate over grid.pairs\r\n for (var k = 0; k < pairKeys.length; k++) {\r\n pair = grid.pairs[pairKeys[k]];\r\n\r\n // if pair exists in at least one bucket\r\n // it is a pair that needs further collision testing so push it\r\n if (pair[2] > 0) {\r\n pairs.push(pair);\r\n } else {\r\n delete grid.pairs[pairKeys[k]];\r\n }\r\n }\r\n\r\n return pairs;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js":function(module,exports){eval("/**\r\n* The `Matter.Pair` module contains methods for creating and manipulating collision pairs.\r\n*\r\n* @class Pair\r\n*/\r\n\r\nvar Pair = {};\r\n\r\nmodule.exports = Pair;\r\n\r\n(function() {\r\n \r\n /**\r\n * Creates a pair.\r\n * @method create\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n * @return {pair} A new pair\r\n */\r\n Pair.create = function(collision, timestamp) {\r\n var bodyA = collision.bodyA,\r\n bodyB = collision.bodyB;\r\n\r\n var pair = {\r\n id: Pair.id(bodyA, bodyB),\r\n bodyA: bodyA,\r\n bodyB: bodyB,\r\n activeContacts: [],\r\n separation: 0,\r\n isActive: true,\r\n confirmedActive: true,\r\n isSensor: bodyA.isSensor || bodyB.isSensor,\r\n timeCreated: timestamp,\r\n timeUpdated: timestamp,\r\n collision: null,\r\n inverseMass: 0,\r\n friction: 0,\r\n frictionStatic: 0,\r\n restitution: 0,\r\n slop: 0\r\n };\r\n\r\n Pair.update(pair, collision, timestamp);\r\n\r\n return pair;\r\n };\r\n\r\n /**\r\n * Updates a pair given a collision.\r\n * @method update\r\n * @param {pair} pair\r\n * @param {collision} collision\r\n * @param {number} timestamp\r\n */\r\n Pair.update = function(pair, collision, timestamp) {\r\n pair.collision = collision;\r\n\r\n if (collision.collided) {\r\n var supports = collision.supports,\r\n activeContacts = pair.activeContacts,\r\n parentA = collision.parentA,\r\n parentB = collision.parentB;\r\n\r\n pair.inverseMass = parentA.inverseMass + parentB.inverseMass;\r\n pair.friction = Math.min(parentA.friction, parentB.friction);\r\n pair.frictionStatic = Math.max(parentA.frictionStatic, parentB.frictionStatic);\r\n pair.restitution = Math.max(parentA.restitution, parentB.restitution);\r\n pair.slop = Math.max(parentA.slop, parentB.slop);\r\n\r\n for (var i = 0; i < supports.length; i++) {\r\n activeContacts[i] = supports[i].contact;\r\n }\r\n\r\n // optimise array size\r\n var supportCount = supports.length;\r\n if (supportCount < activeContacts.length) {\r\n activeContacts.length = supportCount;\r\n }\r\n\r\n pair.separation = collision.depth;\r\n Pair.setActive(pair, true, timestamp);\r\n } else {\r\n if (pair.isActive === true)\r\n Pair.setActive(pair, false, timestamp);\r\n }\r\n };\r\n \r\n /**\r\n * Set a pair as active or inactive.\r\n * @method setActive\r\n * @param {pair} pair\r\n * @param {bool} isActive\r\n * @param {number} timestamp\r\n */\r\n Pair.setActive = function(pair, isActive, timestamp) {\r\n if (isActive) {\r\n pair.isActive = true;\r\n pair.timeUpdated = timestamp;\r\n } else {\r\n pair.isActive = false;\r\n pair.activeContacts.length = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Get the id for the given pair.\r\n * @method id\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @return {string} Unique pairId\r\n */\r\n Pair.id = function(bodyA, bodyB) {\r\n if (bodyA.id < bodyB.id) {\r\n return 'A' + bodyA.id + 'B' + bodyB.id;\r\n } else {\r\n return 'A' + bodyB.id + 'B' + bodyA.id;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js?")},"./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.\r\n*\r\n* @class Pairs\r\n*/\r\n\r\nvar Pairs = {};\r\n\r\nmodule.exports = Pairs;\r\n\r\nvar Pair = __webpack_require__(/*! ./Pair */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n \r\n Pairs._pairMaxIdleLife = 1000;\r\n\r\n /**\r\n * Creates a new pairs structure.\r\n * @method create\r\n * @param {object} options\r\n * @return {pairs} A new pairs structure\r\n */\r\n Pairs.create = function(options) {\r\n return Common.extend({ \r\n table: {},\r\n list: [],\r\n collisionStart: [],\r\n collisionActive: [],\r\n collisionEnd: []\r\n }, options);\r\n };\r\n\r\n /**\r\n * Updates pairs given a list of collisions.\r\n * @method update\r\n * @param {object} pairs\r\n * @param {collision[]} collisions\r\n * @param {number} timestamp\r\n */\r\n Pairs.update = function(pairs, collisions, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n collisionStart = pairs.collisionStart,\r\n collisionEnd = pairs.collisionEnd,\r\n collisionActive = pairs.collisionActive,\r\n collision,\r\n pairId,\r\n pair,\r\n i;\r\n\r\n // clear collision state arrays, but maintain old reference\r\n collisionStart.length = 0;\r\n collisionEnd.length = 0;\r\n collisionActive.length = 0;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pairsList[i].confirmedActive = false;\r\n }\r\n\r\n for (i = 0; i < collisions.length; i++) {\r\n collision = collisions[i];\r\n\r\n if (collision.collided) {\r\n pairId = Pair.id(collision.bodyA, collision.bodyB);\r\n\r\n pair = pairsTable[pairId];\r\n \r\n if (pair) {\r\n // pair already exists (but may or may not be active)\r\n if (pair.isActive) {\r\n // pair exists and is active\r\n collisionActive.push(pair);\r\n } else {\r\n // pair exists but was inactive, so a collision has just started again\r\n collisionStart.push(pair);\r\n }\r\n\r\n // update the pair\r\n Pair.update(pair, collision, timestamp);\r\n pair.confirmedActive = true;\r\n } else {\r\n // pair did not exist, create a new pair\r\n pair = Pair.create(collision, timestamp);\r\n pairsTable[pairId] = pair;\r\n\r\n // push the new pair\r\n collisionStart.push(pair);\r\n pairsList.push(pair);\r\n }\r\n }\r\n }\r\n\r\n // deactivate previously active pairs that are now inactive\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n if (pair.isActive && !pair.confirmedActive) {\r\n Pair.setActive(pair, false, timestamp);\r\n collisionEnd.push(pair);\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Finds and removes pairs that have been inactive for a set amount of time.\r\n * @method removeOld\r\n * @param {object} pairs\r\n * @param {number} timestamp\r\n */\r\n Pairs.removeOld = function(pairs, timestamp) {\r\n var pairsList = pairs.list,\r\n pairsTable = pairs.table,\r\n indexesToRemove = [],\r\n pair,\r\n collision,\r\n pairIndex,\r\n i;\r\n\r\n for (i = 0; i < pairsList.length; i++) {\r\n pair = pairsList[i];\r\n collision = pair.collision;\r\n \r\n // never remove sleeping pairs\r\n if (collision.bodyA.isSleeping || collision.bodyB.isSleeping) {\r\n pair.timeUpdated = timestamp;\r\n continue;\r\n }\r\n\r\n // if pair is inactive for too long, mark it to be removed\r\n if (timestamp - pair.timeUpdated > Pairs._pairMaxIdleLife) {\r\n indexesToRemove.push(i);\r\n }\r\n }\r\n\r\n // remove marked pairs\r\n for (i = 0; i < indexesToRemove.length; i++) {\r\n pairIndex = indexesToRemove[i] - i;\r\n pair = pairsList[pairIndex];\r\n delete pairsTable[pair.id];\r\n pairsList.splice(pairIndex, 1);\r\n }\r\n };\r\n\r\n /**\r\n * Clears the given pairs structure.\r\n * @method clear\r\n * @param {pairs} pairs\r\n * @return {pairs} pairs\r\n */\r\n Pairs.clear = function(pairs) {\r\n pairs.table = {};\r\n pairs.list.length = 0;\r\n pairs.collisionStart.length = 0;\r\n pairs.collisionActive.length = 0;\r\n pairs.collisionEnd.length = 0;\r\n return pairs;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Query` module contains methods for performing collision queries.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Query\r\n*/\r\n\r\nvar Query = {};\r\n\r\nmodule.exports = Query;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar SAT = __webpack_require__(/*! ./SAT */ "./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\nvar Bodies = __webpack_require__(/*! ../factory/Bodies */ "./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js");\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Returns a list of collisions between `body` and `bodies`.\r\n * @method collides\r\n * @param {body} body\r\n * @param {body[]} bodies\r\n * @return {object[]} Collisions\r\n */\r\n Query.collides = function(body, bodies) {\r\n var collisions = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var bodyA = bodies[i];\r\n \r\n if (Bounds.overlaps(bodyA.bounds, body.bounds)) {\r\n for (var j = bodyA.parts.length === 1 ? 0 : 1; j < bodyA.parts.length; j++) {\r\n var part = bodyA.parts[j];\r\n\r\n if (Bounds.overlaps(part.bounds, body.bounds)) {\r\n var collision = SAT.collides(part, body);\r\n\r\n if (collision.collided) {\r\n collisions.push(collision);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.\r\n * @method ray\r\n * @param {body[]} bodies\r\n * @param {vector} startPoint\r\n * @param {vector} endPoint\r\n * @param {number} [rayWidth]\r\n * @return {object[]} Collisions\r\n */\r\n Query.ray = function(bodies, startPoint, endPoint, rayWidth) {\r\n rayWidth = rayWidth || 1e-100;\r\n\r\n var rayAngle = Vector.angle(startPoint, endPoint),\r\n rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),\r\n rayX = (endPoint.x + startPoint.x) * 0.5,\r\n rayY = (endPoint.y + startPoint.y) * 0.5,\r\n ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }),\r\n collisions = Query.collides(ray, bodies);\r\n\r\n for (var i = 0; i < collisions.length; i += 1) {\r\n var collision = collisions[i];\r\n collision.body = collision.bodyB = collision.bodyA; \r\n }\r\n\r\n return collisions;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.\r\n * @method region\r\n * @param {body[]} bodies\r\n * @param {bounds} bounds\r\n * @param {bool} [outside=false]\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.region = function(bodies, bounds, outside) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n overlaps = Bounds.overlaps(body.bounds, bounds);\r\n if ((overlaps && !outside) || (!overlaps && outside))\r\n result.push(body);\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Returns all bodies whose vertices contain the given point, from the given set of bodies.\r\n * @method point\r\n * @param {body[]} bodies\r\n * @param {vector} point\r\n * @return {body[]} The bodies matching the query\r\n */\r\n Query.point = function(bodies, point) {\r\n var result = [];\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n \r\n if (Bounds.contains(body.bounds, point)) {\r\n for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n\r\n if (Bounds.contains(part.bounds, point)\r\n && Vertices.contains(part.vertices, point)) {\r\n result.push(body);\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Resolver` module contains methods for resolving collision pairs.\r\n*\r\n* @class Resolver\r\n*/\r\n\r\nvar Resolver = {};\r\n\r\nmodule.exports = Resolver;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js");\r\n\r\n(function() {\r\n\r\n Resolver._restingThresh = 4;\r\n Resolver._restingThreshTangent = 6;\r\n Resolver._positionDampen = 0.9;\r\n Resolver._positionWarming = 0.8;\r\n Resolver._frictionNormalMultiplier = 5;\r\n\r\n /**\r\n * Prepare pairs for position solving.\r\n * @method preSolvePosition\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolvePosition = function(pairs) {\r\n var i,\r\n pair,\r\n activeCount;\r\n\r\n // find total contacts on each body\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive)\r\n continue;\r\n \r\n activeCount = pair.activeContacts.length;\r\n pair.collision.parentA.totalContacts += activeCount;\r\n pair.collision.parentB.totalContacts += activeCount;\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair positions.\r\n * @method solvePosition\r\n * @param {pair[]} pairs\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Resolver.solvePosition = function(pairs, bodies, timeScale) {\r\n var i,\r\n normalX,\r\n normalY,\r\n pair,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n separation,\r\n penetration,\r\n positionImpulseA,\r\n positionImpulseB,\r\n contactShare,\r\n bodyBtoAX,\r\n bodyBtoAY,\r\n positionImpulse,\r\n impulseCoefficient = timeScale * Resolver._positionDampen;\r\n\r\n for (i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n body.previousPositionImpulse.x = body.positionImpulse.x;\r\n body.previousPositionImpulse.y = body.positionImpulse.y;\r\n }\r\n\r\n // find impulses required to resolve penetration\r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n\r\n positionImpulseA = bodyA.previousPositionImpulse;\r\n positionImpulseB = bodyB.previousPositionImpulse;\r\n\r\n penetration = collision.penetration;\r\n\r\n bodyBtoAX = positionImpulseB.x - positionImpulseA.x + penetration.x;\r\n bodyBtoAY = positionImpulseB.y - positionImpulseA.y + penetration.y;\r\n\r\n normalX = normal.x;\r\n normalY = normal.y;\r\n\r\n separation = normalX * bodyBtoAX + normalY * bodyBtoAY;\r\n pair.separation = separation;\r\n\r\n positionImpulse = (separation - pair.slop) * impulseCoefficient;\r\n\r\n if (bodyA.isStatic || bodyB.isStatic)\r\n positionImpulse *= 2;\r\n \r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n contactShare = positionImpulse / bodyA.totalContacts;\r\n bodyA.positionImpulse.x += normalX * contactShare;\r\n bodyA.positionImpulse.y += normalY * contactShare;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n contactShare = positionImpulse / bodyB.totalContacts;\r\n bodyB.positionImpulse.x -= normalX * contactShare;\r\n bodyB.positionImpulse.y -= normalY * contactShare;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Apply position resolution.\r\n * @method postSolvePosition\r\n * @param {body[]} bodies\r\n */\r\n Resolver.postSolvePosition = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset contact count\r\n body.totalContacts = 0;\r\n\r\n if (body.positionImpulse.x !== 0 || body.positionImpulse.y !== 0) {\r\n // update body geometry\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n Vertices.translate(part.vertices, body.positionImpulse);\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n part.position.x += body.positionImpulse.x;\r\n part.position.y += body.positionImpulse.y;\r\n }\r\n\r\n // move the body without changing velocity\r\n body.positionPrev.x += body.positionImpulse.x;\r\n body.positionPrev.y += body.positionImpulse.y;\r\n\r\n if (Vector.dot(body.positionImpulse, body.velocity) < 0) {\r\n // reset cached impulse if the body has velocity along it\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n } else {\r\n // warm the next iteration\r\n body.positionImpulse.x *= Resolver._positionWarming;\r\n body.positionImpulse.y *= Resolver._positionWarming;\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Prepare pairs for velocity solving.\r\n * @method preSolveVelocity\r\n * @param {pair[]} pairs\r\n */\r\n Resolver.preSolveVelocity = function(pairs) {\r\n var i,\r\n j,\r\n pair,\r\n contacts,\r\n collision,\r\n bodyA,\r\n bodyB,\r\n normal,\r\n tangent,\r\n contact,\r\n contactVertex,\r\n normalImpulse,\r\n tangentImpulse,\r\n offset,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1];\r\n \r\n for (i = 0; i < pairs.length; i++) {\r\n pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n contacts = pair.activeContacts;\r\n collision = pair.collision;\r\n bodyA = collision.parentA;\r\n bodyB = collision.parentB;\r\n normal = collision.normal;\r\n tangent = collision.tangent;\r\n\r\n // resolve each contact\r\n for (j = 0; j < contacts.length; j++) {\r\n contact = contacts[j];\r\n contactVertex = contact.vertex;\r\n normalImpulse = contact.normalImpulse;\r\n tangentImpulse = contact.tangentImpulse;\r\n\r\n if (normalImpulse !== 0 || tangentImpulse !== 0) {\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyA.position, tempA);\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offset, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n offset = Vector.sub(contactVertex, bodyB.position, tempA);\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offset, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Find a solution for pair velocities.\r\n * @method solveVelocity\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Resolver.solveVelocity = function(pairs, timeScale) {\r\n var timeScaleSquared = timeScale * timeScale,\r\n impulse = Vector._temp[0],\r\n tempA = Vector._temp[1],\r\n tempB = Vector._temp[2],\r\n tempC = Vector._temp[3],\r\n tempD = Vector._temp[4],\r\n tempE = Vector._temp[5];\r\n \r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n if (!pair.isActive || pair.isSensor)\r\n continue;\r\n \r\n var collision = pair.collision,\r\n bodyA = collision.parentA,\r\n bodyB = collision.parentB,\r\n normal = collision.normal,\r\n tangent = collision.tangent,\r\n contacts = pair.activeContacts,\r\n contactShare = 1 / contacts.length;\r\n\r\n // update body velocities\r\n bodyA.velocity.x = bodyA.position.x - bodyA.positionPrev.x;\r\n bodyA.velocity.y = bodyA.position.y - bodyA.positionPrev.y;\r\n bodyB.velocity.x = bodyB.position.x - bodyB.positionPrev.x;\r\n bodyB.velocity.y = bodyB.position.y - bodyB.positionPrev.y;\r\n bodyA.angularVelocity = bodyA.angle - bodyA.anglePrev;\r\n bodyB.angularVelocity = bodyB.angle - bodyB.anglePrev;\r\n\r\n // resolve each contact\r\n for (var j = 0; j < contacts.length; j++) {\r\n var contact = contacts[j],\r\n contactVertex = contact.vertex,\r\n offsetA = Vector.sub(contactVertex, bodyA.position, tempA),\r\n offsetB = Vector.sub(contactVertex, bodyB.position, tempB),\r\n velocityPointA = Vector.add(bodyA.velocity, Vector.mult(Vector.perp(offsetA), bodyA.angularVelocity), tempC),\r\n velocityPointB = Vector.add(bodyB.velocity, Vector.mult(Vector.perp(offsetB), bodyB.angularVelocity), tempD), \r\n relativeVelocity = Vector.sub(velocityPointA, velocityPointB, tempE),\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n\r\n var tangentVelocity = Vector.dot(tangent, relativeVelocity),\r\n tangentSpeed = Math.abs(tangentVelocity),\r\n tangentVelocityDirection = Common.sign(tangentVelocity);\r\n\r\n // raw impulses\r\n var normalImpulse = (1 + pair.restitution) * normalVelocity,\r\n normalForce = Common.clamp(pair.separation + normalVelocity, 0, 1) * Resolver._frictionNormalMultiplier;\r\n\r\n // coulomb friction\r\n var tangentImpulse = tangentVelocity,\r\n maxFriction = Infinity;\r\n\r\n if (tangentSpeed > pair.friction * pair.frictionStatic * normalForce * timeScaleSquared) {\r\n maxFriction = tangentSpeed;\r\n tangentImpulse = Common.clamp(\r\n pair.friction * tangentVelocityDirection * timeScaleSquared,\r\n -maxFriction, maxFriction\r\n );\r\n }\r\n\r\n // modify impulses accounting for mass, inertia and offset\r\n var oAcN = Vector.cross(offsetA, normal),\r\n oBcN = Vector.cross(offsetB, normal),\r\n share = contactShare / (bodyA.inverseMass + bodyB.inverseMass + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN);\r\n\r\n normalImpulse *= share;\r\n tangentImpulse *= share;\r\n\r\n // handle high velocity and resting collisions separately\r\n if (normalVelocity < 0 && normalVelocity * normalVelocity > Resolver._restingThresh * timeScaleSquared) {\r\n // high normal velocity so clear cached contact normal impulse\r\n contact.normalImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // impulse constraint tends to 0\r\n var contactNormalImpulse = contact.normalImpulse;\r\n contact.normalImpulse = Math.min(contact.normalImpulse + normalImpulse, 0);\r\n normalImpulse = contact.normalImpulse - contactNormalImpulse;\r\n }\r\n\r\n // handle high velocity and resting collisions separately\r\n if (tangentVelocity * tangentVelocity > Resolver._restingThreshTangent * timeScaleSquared) {\r\n // high tangent velocity so clear cached contact tangent impulse\r\n contact.tangentImpulse = 0;\r\n } else {\r\n // solve resting collision constraints using Erin Catto\'s method (GDC08)\r\n // tangent impulse tends to -tangentSpeed or +tangentSpeed\r\n var contactTangentImpulse = contact.tangentImpulse;\r\n contact.tangentImpulse = Common.clamp(contact.tangentImpulse + tangentImpulse, -maxFriction, maxFriction);\r\n tangentImpulse = contact.tangentImpulse - contactTangentImpulse;\r\n }\r\n\r\n // total impulse from contact\r\n impulse.x = (normal.x * normalImpulse) + (tangent.x * tangentImpulse);\r\n impulse.y = (normal.y * normalImpulse) + (tangent.y * tangentImpulse);\r\n \r\n // apply impulse from contact\r\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\r\n bodyA.positionPrev.x += impulse.x * bodyA.inverseMass;\r\n bodyA.positionPrev.y += impulse.y * bodyA.inverseMass;\r\n bodyA.anglePrev += Vector.cross(offsetA, impulse) * bodyA.inverseInertia;\r\n }\r\n\r\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\r\n bodyB.positionPrev.x -= impulse.x * bodyB.inverseMass;\r\n bodyB.positionPrev.y -= impulse.y * bodyB.inverseMass;\r\n bodyB.anglePrev -= Vector.cross(offsetB, impulse) * bodyB.inverseInertia;\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js?')},"./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.\r\n*\r\n* @class SAT\r\n*/\r\n\r\n// TODO: true circles and curves\r\n\r\nvar SAT = {};\r\n\r\nmodule.exports = SAT;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Detect collision between two bodies using the Separating Axis Theorem.\r\n * @method collides\r\n * @param {body} bodyA\r\n * @param {body} bodyB\r\n * @param {collision} previousCollision\r\n * @return {collision} collision\r\n */\r\n SAT.collides = function(bodyA, bodyB, previousCollision) {\r\n var overlapAB,\r\n overlapBA, \r\n minOverlap,\r\n collision,\r\n canReusePrevCol = false;\r\n\r\n if (previousCollision) {\r\n // estimate total motion\r\n var parentA = bodyA.parent,\r\n parentB = bodyB.parent,\r\n motion = parentA.speed * parentA.speed + parentA.angularSpeed * parentA.angularSpeed\r\n + parentB.speed * parentB.speed + parentB.angularSpeed * parentB.angularSpeed;\r\n\r\n // we may be able to (partially) reuse collision result \r\n // but only safe if collision was resting\r\n canReusePrevCol = previousCollision && previousCollision.collided && motion < 0.2;\r\n\r\n // reuse collision object\r\n collision = previousCollision;\r\n } else {\r\n collision = { collided: false, bodyA: bodyA, bodyB: bodyB };\r\n }\r\n\r\n if (previousCollision && canReusePrevCol) {\r\n // if we can reuse the collision result\r\n // we only need to test the previously found axis\r\n var axisBodyA = collision.axisBody,\r\n axisBodyB = axisBodyA === bodyA ? bodyB : bodyA,\r\n axes = [axisBodyA.axes[previousCollision.axisNumber]];\r\n\r\n minOverlap = SAT._overlapAxes(axisBodyA.vertices, axisBodyB.vertices, axes);\r\n collision.reused = true;\r\n\r\n if (minOverlap.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n } else {\r\n // if we can\'t reuse a result, perform a full SAT test\r\n\r\n overlapAB = SAT._overlapAxes(bodyA.vertices, bodyB.vertices, bodyA.axes);\r\n\r\n if (overlapAB.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n overlapBA = SAT._overlapAxes(bodyB.vertices, bodyA.vertices, bodyB.axes);\r\n\r\n if (overlapBA.overlap <= 0) {\r\n collision.collided = false;\r\n return collision;\r\n }\r\n\r\n if (overlapAB.overlap < overlapBA.overlap) {\r\n minOverlap = overlapAB;\r\n collision.axisBody = bodyA;\r\n } else {\r\n minOverlap = overlapBA;\r\n collision.axisBody = bodyB;\r\n }\r\n\r\n // important for reuse later\r\n collision.axisNumber = minOverlap.axisNumber;\r\n }\r\n\r\n collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB;\r\n collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA;\r\n collision.collided = true;\r\n collision.depth = minOverlap.overlap;\r\n collision.parentA = collision.bodyA.parent;\r\n collision.parentB = collision.bodyB.parent;\r\n \r\n bodyA = collision.bodyA;\r\n bodyB = collision.bodyB;\r\n\r\n // ensure normal is facing away from bodyA\r\n if (Vector.dot(minOverlap.axis, Vector.sub(bodyB.position, bodyA.position)) < 0) {\r\n collision.normal = {\r\n x: minOverlap.axis.x,\r\n y: minOverlap.axis.y\r\n };\r\n } else {\r\n collision.normal = {\r\n x: -minOverlap.axis.x,\r\n y: -minOverlap.axis.y\r\n };\r\n }\r\n\r\n collision.tangent = Vector.perp(collision.normal);\r\n\r\n collision.penetration = collision.penetration || {};\r\n collision.penetration.x = collision.normal.x * collision.depth;\r\n collision.penetration.y = collision.normal.y * collision.depth; \r\n\r\n // find support points, there is always either exactly one or two\r\n var verticesB = SAT._findSupports(bodyA, bodyB, collision.normal),\r\n supports = [];\r\n\r\n // find the supports from bodyB that are inside bodyA\r\n if (Vertices.contains(bodyA.vertices, verticesB[0]))\r\n supports.push(verticesB[0]);\r\n\r\n if (Vertices.contains(bodyA.vertices, verticesB[1]))\r\n supports.push(verticesB[1]);\r\n\r\n // find the supports from bodyA that are inside bodyB\r\n if (supports.length < 2) {\r\n var verticesA = SAT._findSupports(bodyB, bodyA, Vector.neg(collision.normal));\r\n \r\n if (Vertices.contains(bodyB.vertices, verticesA[0]))\r\n supports.push(verticesA[0]);\r\n\r\n if (supports.length < 2 && Vertices.contains(bodyB.vertices, verticesA[1]))\r\n supports.push(verticesA[1]);\r\n }\r\n\r\n // account for the edge case of overlapping but no vertex containment\r\n if (supports.length < 1)\r\n supports = [verticesB[0]];\r\n \r\n collision.supports = supports;\r\n\r\n return collision;\r\n };\r\n\r\n /**\r\n * Find the overlap between two sets of vertices.\r\n * @method _overlapAxes\r\n * @private\r\n * @param {} verticesA\r\n * @param {} verticesB\r\n * @param {} axes\r\n * @return result\r\n */\r\n SAT._overlapAxes = function(verticesA, verticesB, axes) {\r\n var projectionA = Vector._temp[0], \r\n projectionB = Vector._temp[1],\r\n result = { overlap: Number.MAX_VALUE },\r\n overlap,\r\n axis;\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n axis = axes[i];\r\n\r\n SAT._projectToAxis(projectionA, verticesA, axis);\r\n SAT._projectToAxis(projectionB, verticesB, axis);\r\n\r\n overlap = Math.min(projectionA.max - projectionB.min, projectionB.max - projectionA.min);\r\n\r\n if (overlap <= 0) {\r\n result.overlap = overlap;\r\n return result;\r\n }\r\n\r\n if (overlap < result.overlap) {\r\n result.overlap = overlap;\r\n result.axis = axis;\r\n result.axisNumber = i;\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n /**\r\n * Projects vertices on an axis and returns an interval.\r\n * @method _projectToAxis\r\n * @private\r\n * @param {} projection\r\n * @param {} vertices\r\n * @param {} axis\r\n */\r\n SAT._projectToAxis = function(projection, vertices, axis) {\r\n var min = Vector.dot(vertices[0], axis),\r\n max = min;\r\n\r\n for (var i = 1; i < vertices.length; i += 1) {\r\n var dot = Vector.dot(vertices[i], axis);\r\n\r\n if (dot > max) { \r\n max = dot; \r\n } else if (dot < min) { \r\n min = dot; \r\n }\r\n }\r\n\r\n projection.min = min;\r\n projection.max = max;\r\n };\r\n \r\n /**\r\n * Finds supporting vertices given two bodies along a given direction using hill-climbing.\r\n * @method _findSupports\r\n * @private\r\n * @param {} bodyA\r\n * @param {} bodyB\r\n * @param {} normal\r\n * @return [vector]\r\n */\r\n SAT._findSupports = function(bodyA, bodyB, normal) {\r\n var nearestDistance = Number.MAX_VALUE,\r\n vertexToBody = Vector._temp[0],\r\n vertices = bodyB.vertices,\r\n bodyAPosition = bodyA.position,\r\n distance,\r\n vertex,\r\n vertexA,\r\n vertexB;\r\n\r\n // find closest vertex on bodyB\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n\r\n if (distance < nearestDistance) {\r\n nearestDistance = distance;\r\n vertexA = vertex;\r\n }\r\n }\r\n\r\n // find next closest vertex using the two connected to it\r\n var prevIndex = vertexA.index - 1 >= 0 ? vertexA.index - 1 : vertices.length - 1;\r\n vertex = vertices[prevIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n nearestDistance = -Vector.dot(normal, vertexToBody);\r\n vertexB = vertex;\r\n\r\n var nextIndex = (vertexA.index + 1) % vertices.length;\r\n vertex = vertices[nextIndex];\r\n vertexToBody.x = vertex.x - bodyAPosition.x;\r\n vertexToBody.y = vertex.y - bodyAPosition.y;\r\n distance = -Vector.dot(normal, vertexToBody);\r\n if (distance < nearestDistance) {\r\n vertexB = vertex;\r\n }\r\n\r\n return [vertexA, vertexB];\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js?')},"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Constraint` module contains methods for creating and manipulating constraints.\r\n* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\r\n* The stiffness of constraints can be modified to create springs or elastic.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Constraint\r\n*/\r\n\r\nvar Constraint = {};\r\n\r\nmodule.exports = Constraint;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Sleeping = __webpack_require__(/*! ../core/Sleeping */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Axes = __webpack_require__(/*! ../geometry/Axes */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Constraint._warming = 0.4;\r\n Constraint._torqueDampen = 1;\r\n Constraint._minLength = 0.000001;\r\n\r\n /**\r\n * Creates a new constraint.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above).\r\n * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`.\r\n * For compound bodies, constraints must be applied to the parent body (not one of its parts).\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {} options\r\n * @return {constraint} constraint\r\n */\r\n Constraint.create = function(options) {\r\n var constraint = options;\r\n\r\n // if bodies defined but no points, use body centre\r\n if (constraint.bodyA && !constraint.pointA)\r\n constraint.pointA = { x: 0, y: 0 };\r\n if (constraint.bodyB && !constraint.pointB)\r\n constraint.pointB = { x: 0, y: 0 };\r\n\r\n // calculate static length using initial world space points\r\n var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA,\r\n initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB,\r\n length = Vector.magnitude(Vector.sub(initialPointA, initialPointB));\r\n \r\n constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length;\r\n\r\n // option defaults\r\n constraint.id = constraint.id || Common.nextId();\r\n constraint.label = constraint.label || 'Constraint';\r\n constraint.type = 'constraint';\r\n constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7);\r\n constraint.damping = constraint.damping || 0;\r\n constraint.angularStiffness = constraint.angularStiffness || 0;\r\n constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA;\r\n constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB;\r\n constraint.plugin = {};\r\n\r\n // render\r\n var render = {\r\n visible: true,\r\n lineWidth: 2,\r\n strokeStyle: '#ffffff',\r\n type: 'line',\r\n anchors: true\r\n };\r\n\r\n if (constraint.length === 0 && constraint.stiffness > 0.1) {\r\n render.type = 'pin';\r\n render.anchors = false;\r\n } else if (constraint.stiffness < 0.9) {\r\n render.type = 'spring';\r\n }\r\n\r\n constraint.render = Common.extend(render, constraint.render);\r\n\r\n return constraint;\r\n };\r\n\r\n /**\r\n * Prepares for solving by constraint warming.\r\n * @private\r\n * @method preSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.preSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n body.position.x += impulse.x;\r\n body.position.y += impulse.y;\r\n body.angle += impulse.angle;\r\n }\r\n };\r\n\r\n /**\r\n * Solves all constraints in a list of collisions.\r\n * @private\r\n * @method solveAll\r\n * @param {constraint[]} constraints\r\n * @param {number} timeScale\r\n */\r\n Constraint.solveAll = function(constraints, timeScale) {\r\n // Solve fixed constraints first.\r\n for (var i = 0; i < constraints.length; i += 1) {\r\n var constraint = constraints[i],\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic),\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (fixedA || fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n\r\n // Solve free constraints last.\r\n for (i = 0; i < constraints.length; i += 1) {\r\n constraint = constraints[i];\r\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic);\r\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\r\n\r\n if (!fixedA && !fixedB) {\r\n Constraint.solve(constraints[i], timeScale);\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Solves a distance constraint with Gauss-Siedel method.\r\n * @private\r\n * @method solve\r\n * @param {constraint} constraint\r\n * @param {number} timeScale\r\n */\r\n Constraint.solve = function(constraint, timeScale) {\r\n var bodyA = constraint.bodyA,\r\n bodyB = constraint.bodyB,\r\n pointA = constraint.pointA,\r\n pointB = constraint.pointB;\r\n\r\n if (!bodyA && !bodyB)\r\n return;\r\n\r\n // update reference angle\r\n if (bodyA && !bodyA.isStatic) {\r\n Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA);\r\n constraint.angleA = bodyA.angle;\r\n }\r\n \r\n // update reference angle\r\n if (bodyB && !bodyB.isStatic) {\r\n Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB);\r\n constraint.angleB = bodyB.angle;\r\n }\r\n\r\n var pointAWorld = pointA,\r\n pointBWorld = pointB;\r\n\r\n if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA);\r\n if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB);\r\n\r\n if (!pointAWorld || !pointBWorld)\r\n return;\r\n\r\n var delta = Vector.sub(pointAWorld, pointBWorld),\r\n currentLength = Vector.magnitude(delta);\r\n\r\n // prevent singularity\r\n if (currentLength < Constraint._minLength) {\r\n currentLength = Constraint._minLength;\r\n }\r\n\r\n // solve distance constraint with Gauss-Siedel method\r\n var difference = (currentLength - constraint.length) / currentLength,\r\n stiffness = constraint.stiffness < 1 ? constraint.stiffness * timeScale : constraint.stiffness,\r\n force = Vector.mult(delta, difference * stiffness),\r\n massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0),\r\n inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0),\r\n resistanceTotal = massTotal + inertiaTotal,\r\n torque,\r\n share,\r\n normal,\r\n normalVelocity,\r\n relativeVelocity;\r\n\r\n if (constraint.damping) {\r\n var zero = Vector.create();\r\n normal = Vector.div(delta, currentLength);\r\n\r\n relativeVelocity = Vector.sub(\r\n bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero,\r\n bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero\r\n );\r\n\r\n normalVelocity = Vector.dot(normal, relativeVelocity);\r\n }\r\n\r\n if (bodyA && !bodyA.isStatic) {\r\n share = bodyA.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyA.constraintImpulse.x -= force.x * share;\r\n bodyA.constraintImpulse.y -= force.y * share;\r\n\r\n // apply forces\r\n bodyA.position.x -= force.x * share;\r\n bodyA.position.y -= force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyA.positionPrev.x -= constraint.damping * normal.x * normalVelocity * share;\r\n bodyA.positionPrev.y -= constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyA.constraintImpulse.angle -= torque;\r\n bodyA.angle -= torque;\r\n }\r\n\r\n if (bodyB && !bodyB.isStatic) {\r\n share = bodyB.inverseMass / massTotal;\r\n\r\n // keep track of applied impulses for post solving\r\n bodyB.constraintImpulse.x += force.x * share;\r\n bodyB.constraintImpulse.y += force.y * share;\r\n \r\n // apply forces\r\n bodyB.position.x += force.x * share;\r\n bodyB.position.y += force.y * share;\r\n\r\n // apply damping\r\n if (constraint.damping) {\r\n bodyB.positionPrev.x += constraint.damping * normal.x * normalVelocity * share;\r\n bodyB.positionPrev.y += constraint.damping * normal.y * normalVelocity * share;\r\n }\r\n\r\n // apply torque\r\n torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness);\r\n bodyB.constraintImpulse.angle += torque;\r\n bodyB.angle += torque;\r\n }\r\n\r\n };\r\n\r\n /**\r\n * Performs body updates required after solving constraints.\r\n * @private\r\n * @method postSolveAll\r\n * @param {body[]} bodies\r\n */\r\n Constraint.postSolveAll = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n impulse = body.constraintImpulse;\r\n\r\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\r\n continue;\r\n }\r\n\r\n Sleeping.set(body, false);\r\n\r\n // update geometry and reset\r\n for (var j = 0; j < body.parts.length; j++) {\r\n var part = body.parts[j];\r\n \r\n Vertices.translate(part.vertices, impulse);\r\n\r\n if (j > 0) {\r\n part.position.x += impulse.x;\r\n part.position.y += impulse.y;\r\n }\r\n\r\n if (impulse.angle !== 0) {\r\n Vertices.rotate(part.vertices, impulse.angle, body.position);\r\n Axes.rotate(part.axes, impulse.angle);\r\n if (j > 0) {\r\n Vector.rotateAbout(part.position, impulse.angle, body.position, part.position);\r\n }\r\n }\r\n\r\n Bounds.update(part.bounds, part.vertices, body.velocity);\r\n }\r\n\r\n // dampen the cached impulse for warming next step\r\n impulse.angle *= Constraint._warming;\r\n impulse.x *= Constraint._warming;\r\n impulse.y *= Constraint._warming;\r\n }\r\n };\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\r\n *\r\n * @property id\r\n * @type number\r\n */\r\n\r\n /**\r\n * A `String` denoting the type of object.\r\n *\r\n * @property type\r\n * @type string\r\n * @default \"constraint\"\r\n * @readOnly\r\n */\r\n\r\n /**\r\n * An arbitrary `String` name to help the user identify and manage bodies.\r\n *\r\n * @property label\r\n * @type string\r\n * @default \"Constraint\"\r\n */\r\n\r\n /**\r\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\r\n *\r\n * @property render\r\n * @type object\r\n */\r\n\r\n /**\r\n * A flag that indicates if the constraint should be rendered.\r\n *\r\n * @property render.visible\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * A `Number` that defines the line width to use when rendering the constraint outline.\r\n * A value of `0` means no outline will be rendered.\r\n *\r\n * @property render.lineWidth\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A `String` that defines the stroke style to use when rendering the constraint outline.\r\n * It is the same as when using a canvas, so it accepts CSS style property values.\r\n *\r\n * @property render.strokeStyle\r\n * @type string\r\n * @default a random colour\r\n */\r\n\r\n /**\r\n * A `String` that defines the constraint rendering type. \r\n * The possible values are 'line', 'pin', 'spring'.\r\n * An appropriate render type will be automatically chosen unless one is given in options.\r\n *\r\n * @property render.type\r\n * @type string\r\n * @default 'line'\r\n */\r\n\r\n /**\r\n * A `Boolean` that defines if the constraint's anchor points should be rendered.\r\n *\r\n * @property render.anchors\r\n * @type boolean\r\n * @default true\r\n */\r\n\r\n /**\r\n * The first possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyA\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * The second possible `Body` that this constraint is attached to.\r\n *\r\n * @property bodyB\r\n * @type body\r\n * @default null\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\r\n *\r\n * @property pointA\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position.\r\n *\r\n * @property pointB\r\n * @type vector\r\n * @default { x: 0, y: 0 }\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`.\r\n * A value of `1` means the constraint should be very stiff.\r\n * A value of `0.2` means the constraint acts like a soft spring.\r\n *\r\n * @property stiffness\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the damping of the constraint, \r\n * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation.\r\n * Damping will only be apparent when the constraint also has a very low `stiffness`.\r\n * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation.\r\n * A value of `0` means the constraint will apply no damping.\r\n *\r\n * @property damping\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the target resting length of the constraint. \r\n * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\r\n *\r\n * @property length\r\n * @type number\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {/**\r\n* The `Matter.Common` module contains utility functions that are common to all modules.\r\n*\r\n* @class Common\r\n*/\r\n\r\nvar Common = {};\r\n\r\nmodule.exports = Common;\r\n\r\n(function() {\r\n\r\n Common._nextId = 0;\r\n Common._seed = 0;\r\n Common._nowStartTime = +(new Date());\r\n\r\n /**\r\n * Extends the object in the first argument using the object in the second argument.\r\n * @method extend\r\n * @param {} obj\r\n * @param {boolean} deep\r\n * @return {} obj extended\r\n */\r\n Common.extend = function(obj, deep) {\r\n var argsStart,\r\n args,\r\n deepClone;\r\n\r\n if (typeof deep === 'boolean') {\r\n argsStart = 2;\r\n deepClone = deep;\r\n } else {\r\n argsStart = 1;\r\n deepClone = true;\r\n }\r\n\r\n for (var i = argsStart; i < arguments.length; i++) {\r\n var source = arguments[i];\r\n\r\n if (source) {\r\n for (var prop in source) {\r\n if (deepClone && source[prop] && source[prop].constructor === Object) {\r\n if (!obj[prop] || obj[prop].constructor === Object) {\r\n obj[prop] = obj[prop] || {};\r\n Common.extend(obj[prop], deepClone, source[prop]);\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n } else {\r\n obj[prop] = source[prop];\r\n }\r\n }\r\n }\r\n }\r\n \r\n return obj;\r\n };\r\n\r\n /**\r\n * Creates a new clone of the object, if deep is true references will also be cloned.\r\n * @method clone\r\n * @param {} obj\r\n * @param {bool} deep\r\n * @return {} obj cloned\r\n */\r\n Common.clone = function(obj, deep) {\r\n return Common.extend({}, deep, obj);\r\n };\r\n\r\n /**\r\n * Returns the list of keys for the given object.\r\n * @method keys\r\n * @param {} obj\r\n * @return {string[]} keys\r\n */\r\n Common.keys = function(obj) {\r\n if (Object.keys)\r\n return Object.keys(obj);\r\n\r\n // avoid hasOwnProperty for performance\r\n var keys = [];\r\n for (var key in obj)\r\n keys.push(key);\r\n return keys;\r\n };\r\n\r\n /**\r\n * Returns the list of values for the given object.\r\n * @method values\r\n * @param {} obj\r\n * @return {array} Array of the objects property values\r\n */\r\n Common.values = function(obj) {\r\n var values = [];\r\n \r\n if (Object.keys) {\r\n var keys = Object.keys(obj);\r\n for (var i = 0; i < keys.length; i++) {\r\n values.push(obj[keys[i]]);\r\n }\r\n return values;\r\n }\r\n \r\n // avoid hasOwnProperty for performance\r\n for (var key in obj)\r\n values.push(obj[key]);\r\n return values;\r\n };\r\n\r\n /**\r\n * Gets a value from `base` relative to the `path` string.\r\n * @method get\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} The object at the given path\r\n */\r\n Common.get = function(obj, path, begin, end) {\r\n path = path.split('.').slice(begin, end);\r\n\r\n for (var i = 0; i < path.length; i += 1) {\r\n obj = obj[path[i]];\r\n }\r\n\r\n return obj;\r\n };\r\n\r\n /**\r\n * Sets a value on `base` relative to the given `path` string.\r\n * @method set\r\n * @param {} obj The base object\r\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\r\n * @param {} val The value to set\r\n * @param {number} [begin] Path slice begin\r\n * @param {number} [end] Path slice end\r\n * @return {} Pass through `val` for chaining\r\n */\r\n Common.set = function(obj, path, val, begin, end) {\r\n var parts = path.split('.').slice(begin, end);\r\n Common.get(obj, path, 0, -1)[parts[parts.length - 1]] = val;\r\n return val;\r\n };\r\n\r\n /**\r\n * Shuffles the given array in-place.\r\n * The function uses a seeded random generator.\r\n * @method shuffle\r\n * @param {array} array\r\n * @return {array} array shuffled randomly\r\n */\r\n Common.shuffle = function(array) {\r\n for (var i = array.length - 1; i > 0; i--) {\r\n var j = Math.floor(Common.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n return array;\r\n };\r\n\r\n /**\r\n * Randomly chooses a value from a list with equal probability.\r\n * The function uses a seeded random generator.\r\n * @method choose\r\n * @param {array} choices\r\n * @return {object} A random choice object from the array\r\n */\r\n Common.choose = function(choices) {\r\n return choices[Math.floor(Common.random() * choices.length)];\r\n };\r\n\r\n /**\r\n * Returns true if the object is a HTMLElement, otherwise false.\r\n * @method isElement\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a HTMLElement, otherwise false\r\n */\r\n Common.isElement = function(obj) {\r\n if (typeof HTMLElement !== 'undefined') {\r\n return obj instanceof HTMLElement;\r\n }\r\n\r\n return !!(obj && obj.nodeType && obj.nodeName);\r\n };\r\n\r\n /**\r\n * Returns true if the object is an array.\r\n * @method isArray\r\n * @param {object} obj\r\n * @return {boolean} True if the object is an array, otherwise false\r\n */\r\n Common.isArray = function(obj) {\r\n return Object.prototype.toString.call(obj) === '[object Array]';\r\n };\r\n\r\n /**\r\n * Returns true if the object is a function.\r\n * @method isFunction\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a function, otherwise false\r\n */\r\n Common.isFunction = function(obj) {\r\n return typeof obj === \"function\";\r\n };\r\n\r\n /**\r\n * Returns true if the object is a plain object.\r\n * @method isPlainObject\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a plain object, otherwise false\r\n */\r\n Common.isPlainObject = function(obj) {\r\n return typeof obj === 'object' && obj.constructor === Object;\r\n };\r\n\r\n /**\r\n * Returns true if the object is a string.\r\n * @method isString\r\n * @param {object} obj\r\n * @return {boolean} True if the object is a string, otherwise false\r\n */\r\n Common.isString = function(obj) {\r\n return toString.call(obj) === '[object String]';\r\n };\r\n \r\n /**\r\n * Returns the given value clamped between a minimum and maximum value.\r\n * @method clamp\r\n * @param {number} value\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} The value clamped between min and max inclusive\r\n */\r\n Common.clamp = function(value, min, max) {\r\n if (value < min)\r\n return min;\r\n if (value > max)\r\n return max;\r\n return value;\r\n };\r\n \r\n /**\r\n * Returns the sign of the given value.\r\n * @method sign\r\n * @param {number} value\r\n * @return {number} -1 if negative, +1 if 0 or positive\r\n */\r\n Common.sign = function(value) {\r\n return value < 0 ? -1 : 1;\r\n };\r\n \r\n /**\r\n * Returns the current timestamp since the time origin (e.g. from page load).\r\n * The result will be high-resolution including decimal places if available.\r\n * @method now\r\n * @return {number} the current timestamp\r\n */\r\n Common.now = function() {\r\n if (window.performance) {\r\n if (window.performance.now) {\r\n return window.performance.now();\r\n } else if (window.performance.webkitNow) {\r\n return window.performance.webkitNow();\r\n }\r\n }\r\n\r\n return (new Date()) - Common._nowStartTime;\r\n };\r\n \r\n /**\r\n * Returns a random value between a minimum and a maximum value inclusive.\r\n * The function uses a seeded random generator.\r\n * @method random\r\n * @param {number} min\r\n * @param {number} max\r\n * @return {number} A random number between min and max inclusive\r\n */\r\n Common.random = function(min, max) {\r\n min = (typeof min !== \"undefined\") ? min : 0;\r\n max = (typeof max !== \"undefined\") ? max : 1;\r\n return min + _seededRandom() * (max - min);\r\n };\r\n\r\n var _seededRandom = function() {\r\n // https://en.wikipedia.org/wiki/Linear_congruential_generator\r\n Common._seed = (Common._seed * 9301 + 49297) % 233280;\r\n return Common._seed / 233280;\r\n };\r\n\r\n /**\r\n * Converts a CSS hex colour string into an integer.\r\n * @method colorToNumber\r\n * @param {string} colorString\r\n * @return {number} An integer representing the CSS hex string\r\n */\r\n Common.colorToNumber = function(colorString) {\r\n colorString = colorString.replace('#','');\r\n\r\n if (colorString.length == 3) {\r\n colorString = colorString.charAt(0) + colorString.charAt(0)\r\n + colorString.charAt(1) + colorString.charAt(1)\r\n + colorString.charAt(2) + colorString.charAt(2);\r\n }\r\n\r\n return parseInt(colorString, 16);\r\n };\r\n\r\n /**\r\n * The console logging level to use, where each level includes all levels above and excludes the levels below.\r\n * The default level is 'debug' which shows all console messages. \r\n *\r\n * Possible level values are:\r\n * - 0 = None\r\n * - 1 = Debug\r\n * - 2 = Info\r\n * - 3 = Warn\r\n * - 4 = Error\r\n * @property Common.logLevel\r\n * @type {Number}\r\n * @default 1\r\n */\r\n Common.logLevel = 1;\r\n\r\n /**\r\n * Shows a `console.log` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method log\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.log = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.log.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.info` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method info\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.info = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 2) {\r\n console.info.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Shows a `console.warn` message only if the current `Common.logLevel` allows it.\r\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\r\n * @method warn\r\n * @param ...objs {} The objects to log.\r\n */\r\n Common.warn = function() {\r\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\r\n console.warn.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\r\n }\r\n };\r\n\r\n /**\r\n * Returns the next unique sequential ID.\r\n * @method nextId\r\n * @return {Number} Unique sequential ID\r\n */\r\n Common.nextId = function() {\r\n return Common._nextId++;\r\n };\r\n\r\n /**\r\n * A cross browser compatible indexOf implementation.\r\n * @method indexOf\r\n * @param {array} haystack\r\n * @param {object} needle\r\n * @return {number} The position of needle in haystack, otherwise -1.\r\n */\r\n Common.indexOf = function(haystack, needle) {\r\n if (haystack.indexOf)\r\n return haystack.indexOf(needle);\r\n\r\n for (var i = 0; i < haystack.length; i++) {\r\n if (haystack[i] === needle)\r\n return i;\r\n }\r\n\r\n return -1;\r\n };\r\n\r\n /**\r\n * A cross browser compatible array map implementation.\r\n * @method map\r\n * @param {array} list\r\n * @param {function} func\r\n * @return {array} Values from list transformed by func.\r\n */\r\n Common.map = function(list, func) {\r\n if (list.map) {\r\n return list.map(func);\r\n }\r\n\r\n var mapped = [];\r\n\r\n for (var i = 0; i < list.length; i += 1) {\r\n mapped.push(func(list[i]));\r\n }\r\n\r\n return mapped;\r\n };\r\n\r\n /**\r\n * Takes a directed graph and returns the partially ordered set of vertices in topological order.\r\n * Circular dependencies are allowed.\r\n * @method topologicalSort\r\n * @param {object} graph\r\n * @return {array} Partially ordered set of vertices in topological order.\r\n */\r\n Common.topologicalSort = function(graph) {\r\n // https://github.com/mgechev/javascript-algorithms\r\n // Copyright (c) Minko Gechev (MIT license)\r\n // Modifications: tidy formatting and naming\r\n var result = [],\r\n visited = [],\r\n temp = [];\r\n\r\n for (var node in graph) {\r\n if (!visited[node] && !temp[node]) {\r\n Common._topologicalSort(node, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n return result;\r\n };\r\n\r\n Common._topologicalSort = function(node, visited, temp, graph, result) {\r\n var neighbors = graph[node] || [];\r\n temp[node] = true;\r\n\r\n for (var i = 0; i < neighbors.length; i += 1) {\r\n var neighbor = neighbors[i];\r\n\r\n if (temp[neighbor]) {\r\n // skip circular dependencies\r\n continue;\r\n }\r\n\r\n if (!visited[neighbor]) {\r\n Common._topologicalSort(neighbor, visited, temp, graph, result);\r\n }\r\n }\r\n\r\n temp[node] = false;\r\n visited[node] = true;\r\n\r\n result.push(node);\r\n };\r\n\r\n /**\r\n * Takes _n_ functions as arguments and returns a new function that calls them in order.\r\n * The arguments applied when calling the new function will also be applied to every function passed.\r\n * The value of `this` refers to the last value returned in the chain that was not `undefined`.\r\n * Therefore if a passed function does not return a value, the previously returned value is maintained.\r\n * After all passed functions have been called the new function returns the last returned value (if any).\r\n * If any of the passed functions are a chain, then the chain will be flattened.\r\n * @method chain\r\n * @param ...funcs {function} The functions to chain.\r\n * @return {function} A new function that calls the passed functions in order.\r\n */\r\n Common.chain = function() {\r\n var funcs = [];\r\n\r\n for (var i = 0; i < arguments.length; i += 1) {\r\n var func = arguments[i];\r\n\r\n if (func._chained) {\r\n // flatten already chained functions\r\n funcs.push.apply(funcs, func._chained);\r\n } else {\r\n funcs.push(func);\r\n }\r\n }\r\n\r\n var chain = function() {\r\n // https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358\r\n var lastResult,\r\n args = new Array(arguments.length);\r\n\r\n for (var i = 0, l = arguments.length; i < l; i++) {\r\n args[i] = arguments[i];\r\n }\r\n\r\n for (i = 0; i < funcs.length; i += 1) {\r\n var result = funcs[i].apply(lastResult, args);\r\n\r\n if (typeof result !== 'undefined') {\r\n lastResult = result;\r\n }\r\n }\r\n\r\n return lastResult;\r\n };\r\n\r\n chain._chained = funcs;\r\n\r\n return chain;\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathBefore\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathBefore = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n func,\r\n Common.get(base, path)\r\n ));\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `base`.\r\n * See also docs for `Common.chain`.\r\n * @method chainPathAfter\r\n * @param {} base The base object\r\n * @param {string} path The path relative to `base`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Common.chainPathAfter = function(base, path, func) {\r\n return Common.set(base, path, Common.chain(\r\n Common.get(base, path),\r\n func\r\n ));\r\n };\r\n\r\n /**\r\n * Used to require external libraries outside of the bundle.\r\n * It first looks for the `globalName` on the environment's global namespace.\r\n * If the global is not found, it will fall back to using the standard `require` using the `moduleName`.\r\n * @private\r\n * @method _requireGlobal\r\n * @param {string} globalName The global module name\r\n * @param {string} moduleName The fallback CommonJS module name\r\n * @return {} The loaded module\r\n */\r\n Common._requireGlobal = function(globalName, moduleName) {\r\n var obj = (typeof window !== 'undefined' ? window[globalName] : typeof global !== 'undefined' ? global[globalName] : null);\r\n\r\n // Breaks webpack :(\r\n // return obj || require(moduleName);\r\n\r\n return obj;\r\n };\r\n})();\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Common.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Engine` module contains methods for creating and manipulating engines.\r\n* An engine is a controller that manages updating the simulation of the world.\r\n* See `Matter.Runner` for an optional game loop utility.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Engine\r\n*/\r\n\r\nvar Engine = {};\r\n\r\nmodule.exports = Engine;\r\n\r\nvar World = __webpack_require__(/*! ../body/World */ "./node_modules/phaser/src/physics/matter-js/lib/body/World.js");\r\nvar Sleeping = __webpack_require__(/*! ./Sleeping */ "./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js");\r\nvar Resolver = __webpack_require__(/*! ../collision/Resolver */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js");\r\nvar Pairs = __webpack_require__(/*! ../collision/Pairs */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js");\r\nvar Metrics = __webpack_require__(/*! ./Metrics */ "./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js");\r\nvar Grid = __webpack_require__(/*! ../collision/Grid */ "./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js");\r\nvar Events = __webpack_require__(/*! ./Events */ "./node_modules/phaser/src/physics/matter-js/lib/core/Events.js");\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ "./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\nvar Body = __webpack_require__(/*! ../body/Body */ "./node_modules/phaser/src/physics/matter-js/lib/body/Body.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * All properties have default values, and many are pre-calculated automatically based on other properties.\r\n * See the properties section below for detailed information on what you can pass via the `options` object.\r\n * @method create\r\n * @param {object} [options]\r\n * @return {engine} engine\r\n */\r\n Engine.create = function(element, options) {\r\n // options may be passed as the first (and only) argument\r\n options = Common.isElement(element) ? options : element;\r\n element = Common.isElement(element) ? element : null;\r\n options = options || {};\r\n\r\n if (element || options.render) {\r\n Common.warn(\'Engine.create: engine.render is deprecated (see docs)\');\r\n }\r\n\r\n var defaults = {\r\n positionIterations: 6,\r\n velocityIterations: 4,\r\n constraintIterations: 2,\r\n enableSleeping: false,\r\n events: [],\r\n plugin: {},\r\n timing: {\r\n timestamp: 0,\r\n timeScale: 1\r\n },\r\n broadphase: {\r\n controller: Grid\r\n }\r\n };\r\n\r\n var engine = Common.extend(defaults, options);\r\n\r\n // @deprecated\r\n if (element || engine.render) {\r\n var renderDefaults = {\r\n element: element,\r\n controller: Render\r\n };\r\n \r\n engine.render = Common.extend(renderDefaults, engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render && engine.render.controller) {\r\n engine.render = engine.render.controller.create(engine.render);\r\n }\r\n\r\n // @deprecated\r\n if (engine.render) {\r\n engine.render.engine = engine;\r\n }\r\n\r\n engine.world = options.world || World.create(engine.world);\r\n engine.pairs = Pairs.create();\r\n engine.broadphase = engine.broadphase.controller.create(engine.broadphase);\r\n engine.metrics = engine.metrics || { extended: false };\r\n\r\n // @if DEBUG\r\n engine.metrics = Metrics.create(engine.metrics);\r\n // @endif\r\n\r\n return engine;\r\n };\r\n\r\n /**\r\n * Moves the simulation forward in time by `delta` ms.\r\n * The `correction` argument is an optional `Number` that specifies the time correction factor to apply to the update.\r\n * This can help improve the accuracy of the simulation in cases where `delta` is changing between updates.\r\n * The value of `correction` is defined as `delta / lastDelta`, i.e. the percentage change of `delta` over the last step.\r\n * Therefore the value is always `1` (no correction) when `delta` constant (or when no correction is desired, which is the default).\r\n * See the paper on Time Corrected Verlet for more information.\r\n *\r\n * Triggers `beforeUpdate` and `afterUpdate` events.\r\n * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.\r\n * @method update\r\n * @param {engine} engine\r\n * @param {number} [delta=16.666]\r\n * @param {number} [correction=1]\r\n */\r\n Engine.update = function(engine, delta, correction) {\r\n delta = delta || 1000 / 60;\r\n correction = correction || 1;\r\n\r\n var world = engine.world,\r\n timing = engine.timing,\r\n broadphase = engine.broadphase,\r\n broadphasePairs = [],\r\n i;\r\n\r\n // increment timestamp\r\n timing.timestamp += delta * timing.timeScale;\r\n\r\n // create an event object\r\n var event = {\r\n timestamp: timing.timestamp\r\n };\r\n\r\n Events.trigger(engine, \'beforeUpdate\', event);\r\n\r\n // get lists of all bodies and constraints, no matter what composites they are in\r\n var allBodies = Composite.allBodies(world),\r\n allConstraints = Composite.allConstraints(world);\r\n\r\n // @if DEBUG\r\n // reset metrics logging\r\n Metrics.reset(engine.metrics);\r\n // @endif\r\n\r\n // if sleeping enabled, call the sleeping controller\r\n if (engine.enableSleeping)\r\n Sleeping.update(allBodies, timing.timeScale);\r\n\r\n // applies gravity to all bodies\r\n Engine._bodiesApplyGravity(allBodies, world.gravity);\r\n\r\n // update all body position and rotation by integration\r\n Engine._bodiesUpdate(allBodies, delta, timing.timeScale, correction, world.bounds);\r\n\r\n // update all constraints (first pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // broadphase pass: find potential collision pairs\r\n if (broadphase.controller) {\r\n // if world is dirty, we must flush the whole grid\r\n if (world.isModified)\r\n broadphase.controller.clear(broadphase);\r\n\r\n // update the grid buckets based on current bodies\r\n broadphase.controller.update(broadphase, allBodies, engine, world.isModified);\r\n broadphasePairs = broadphase.pairsList;\r\n } else {\r\n // if no broadphase set, we just pass all bodies\r\n broadphasePairs = allBodies;\r\n }\r\n\r\n // clear all composite modified flags\r\n if (world.isModified) {\r\n Composite.setModified(world, false, false, true);\r\n }\r\n\r\n // narrowphase pass: find actual collisions, then create or update collision pairs\r\n var collisions = broadphase.detector(broadphasePairs, engine);\r\n\r\n // update collision pairs\r\n var pairs = engine.pairs,\r\n timestamp = timing.timestamp;\r\n Pairs.update(pairs, collisions, timestamp);\r\n Pairs.removeOld(pairs, timestamp);\r\n\r\n // wake up bodies involved in collisions\r\n if (engine.enableSleeping)\r\n Sleeping.afterCollisions(pairs.list, timing.timeScale);\r\n\r\n // trigger collision events\r\n if (pairs.collisionStart.length > 0)\r\n Events.trigger(engine, \'collisionStart\', { pairs: pairs.collisionStart });\r\n\r\n // iteratively resolve position between collisions\r\n Resolver.preSolvePosition(pairs.list);\r\n for (i = 0; i < engine.positionIterations; i++) {\r\n Resolver.solvePosition(pairs.list, allBodies, timing.timeScale);\r\n }\r\n Resolver.postSolvePosition(allBodies);\r\n\r\n // update all constraints (second pass)\r\n Constraint.preSolveAll(allBodies);\r\n for (i = 0; i < engine.constraintIterations; i++) {\r\n Constraint.solveAll(allConstraints, timing.timeScale);\r\n }\r\n Constraint.postSolveAll(allBodies);\r\n\r\n // iteratively resolve velocity between collisions\r\n Resolver.preSolveVelocity(pairs.list);\r\n for (i = 0; i < engine.velocityIterations; i++) {\r\n Resolver.solveVelocity(pairs.list, timing.timeScale);\r\n }\r\n\r\n // trigger collision events\r\n if (pairs.collisionActive.length > 0)\r\n Events.trigger(engine, \'collisionActive\', { pairs: pairs.collisionActive });\r\n\r\n if (pairs.collisionEnd.length > 0)\r\n Events.trigger(engine, \'collisionEnd\', { pairs: pairs.collisionEnd });\r\n\r\n // @if DEBUG\r\n // update metrics log\r\n Metrics.update(engine.metrics, engine);\r\n // @endif\r\n\r\n // clear force buffers\r\n Engine._bodiesClearForces(allBodies);\r\n\r\n Events.trigger(engine, \'afterUpdate\', event);\r\n\r\n return engine;\r\n };\r\n \r\n /**\r\n * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`.\r\n * @method merge\r\n * @param {engine} engineA\r\n * @param {engine} engineB\r\n */\r\n Engine.merge = function(engineA, engineB) {\r\n Common.extend(engineA, engineB);\r\n \r\n if (engineB.world) {\r\n engineA.world = engineB.world;\r\n\r\n Engine.clear(engineA);\r\n\r\n var bodies = Composite.allBodies(engineA.world);\r\n\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n Sleeping.set(body, false);\r\n body.id = Common.nextId();\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Clears the engine including the world, pairs and broadphase.\r\n * @method clear\r\n * @param {engine} engine\r\n */\r\n Engine.clear = function(engine) {\r\n var world = engine.world;\r\n \r\n Pairs.clear(engine.pairs);\r\n\r\n var broadphase = engine.broadphase;\r\n if (broadphase.controller) {\r\n var bodies = Composite.allBodies(world);\r\n broadphase.controller.clear(broadphase);\r\n broadphase.controller.update(broadphase, bodies, engine, true);\r\n }\r\n };\r\n\r\n /**\r\n * Zeroes the `body.force` and `body.torque` force buffers.\r\n * @method _bodiesClearForces\r\n * @private\r\n * @param {body[]} bodies\r\n */\r\n Engine._bodiesClearForces = function(bodies) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n // reset force buffers\r\n body.force.x = 0;\r\n body.force.y = 0;\r\n body.torque = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Applys a mass dependant force to all given bodies.\r\n * @method _bodiesApplyGravity\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {vector} gravity\r\n */\r\n Engine._bodiesApplyGravity = function(bodies, gravity) {\r\n var gravityScale = typeof gravity.scale !== \'undefined\' ? gravity.scale : 0.001;\r\n\r\n if ((gravity.x === 0 && gravity.y === 0) || gravityScale === 0) {\r\n return;\r\n }\r\n \r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.ignoreGravity || body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n // apply gravity\r\n body.force.y += body.mass * gravity.y * gravityScale;\r\n body.force.x += body.mass * gravity.x * gravityScale;\r\n }\r\n };\r\n\r\n /**\r\n * Applys `Body.update` to all given `bodies`.\r\n * @method _bodiesUpdate\r\n * @private\r\n * @param {body[]} bodies\r\n * @param {number} deltaTime \r\n * The amount of time elapsed between updates\r\n * @param {number} timeScale\r\n * @param {number} correction \r\n * The Verlet correction factor (deltaTime / lastDeltaTime)\r\n * @param {bounds} worldBounds\r\n */\r\n Engine._bodiesUpdate = function(bodies, deltaTime, timeScale, correction, worldBounds) {\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i];\r\n\r\n if (body.isStatic || body.isSleeping)\r\n continue;\r\n\r\n Body.update(body, deltaTime, timeScale, correction);\r\n }\r\n };\r\n\r\n /**\r\n * An alias for `Runner.run`, see `Matter.Runner` for more information.\r\n * @method run\r\n * @param {engine} engine\r\n */\r\n\r\n /**\r\n * Fired just before an update\r\n *\r\n * @event beforeUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update and all collision events\r\n *\r\n * @event afterUpdate\r\n * @param {} event An event object\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any)\r\n *\r\n * @event collisionStart\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any)\r\n *\r\n * @event collisionActive\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /**\r\n * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any)\r\n *\r\n * @event collisionEnd\r\n * @param {} event An event object\r\n * @param {} event.pairs List of affected pairs\r\n * @param {number} event.timestamp The engine.timing.timestamp of the event\r\n * @param {} event.source The source object of the event\r\n * @param {} event.name The name of the event\r\n */\r\n\r\n /*\r\n *\r\n * Properties Documentation\r\n *\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of position iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property positionIterations\r\n * @type number\r\n * @default 6\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of velocity iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n *\r\n * @property velocityIterations\r\n * @type number\r\n * @default 4\r\n */\r\n\r\n /**\r\n * An integer `Number` that specifies the number of constraint iterations to perform each update.\r\n * The higher the value, the higher quality the simulation will be at the expense of performance.\r\n * The default value of `2` is usually very adequate.\r\n *\r\n * @property constraintIterations\r\n * @type number\r\n * @default 2\r\n */\r\n\r\n /**\r\n * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module.\r\n * Sleeping can improve stability and performance, but often at the expense of accuracy.\r\n *\r\n * @property enableSleeping\r\n * @type boolean\r\n * @default false\r\n */\r\n\r\n /**\r\n * An `Object` containing properties regarding the timing systems of the engine. \r\n *\r\n * @property timing\r\n * @type object\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the global scaling factor of time for all bodies.\r\n * A value of `0` freezes the simulation.\r\n * A value of `0.1` gives a slow-motion effect.\r\n * A value of `1.2` gives a speed-up effect.\r\n *\r\n * @property timing.timeScale\r\n * @type number\r\n * @default 1\r\n */\r\n\r\n /**\r\n * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. \r\n * It is incremented on every `Engine.update` by the given `delta` argument. \r\n *\r\n * @property timing.timestamp\r\n * @type number\r\n * @default 0\r\n */\r\n\r\n /**\r\n * An instance of a `Render` controller. The default value is a `Matter.Render` instance created by `Engine.create`.\r\n * One may also develop a custom renderer module based on `Matter.Render` and pass an instance of it to `Engine.create` via `options.render`.\r\n *\r\n * A minimal custom renderer object must define at least three functions: `create`, `clear` and `world` (see `Matter.Render`).\r\n * It is also possible to instead pass the _module_ reference via `options.render.controller` and `Engine.create` will instantiate one for you.\r\n *\r\n * @property render\r\n * @type render\r\n * @deprecated see Demo.js for an example of creating a renderer\r\n * @default a Matter.Render instance\r\n */\r\n\r\n /**\r\n * An instance of a broadphase controller. The default value is a `Matter.Grid` instance created by `Engine.create`.\r\n *\r\n * @property broadphase\r\n * @type grid\r\n * @default a Matter.Grid instance\r\n */\r\n\r\n /**\r\n * A `World` composite object that will contain all simulated bodies and constraints.\r\n *\r\n * @property world\r\n * @type world\r\n * @default a Matter.World instance\r\n */\r\n\r\n /**\r\n * An object reserved for storing plugin-specific properties.\r\n *\r\n * @property plugin\r\n * @type {}\r\n */\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Events` module contains methods to fire and listen to events on other objects.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Events\r\n*/\r\n\r\nvar Events = {};\r\n\r\nmodule.exports = Events;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Subscribes a callback function to the given object's `eventName`.\r\n * @method on\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.on = function(object, eventNames, callback) {\r\n var names = eventNames.split(' '),\r\n name;\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n object.events = object.events || {};\r\n object.events[name] = object.events[name] || [];\r\n object.events[name].push(callback);\r\n }\r\n\r\n return callback;\r\n };\r\n\r\n /**\r\n * Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all events.\r\n * @method off\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {function} callback\r\n */\r\n Events.off = function(object, eventNames, callback) {\r\n if (!eventNames) {\r\n object.events = {};\r\n return;\r\n }\r\n\r\n // handle Events.off(object, callback)\r\n if (typeof eventNames === 'function') {\r\n callback = eventNames;\r\n eventNames = Common.keys(object.events).join(' ');\r\n }\r\n\r\n var names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n var callbacks = object.events[names[i]],\r\n newCallbacks = [];\r\n\r\n if (callback && callbacks) {\r\n for (var j = 0; j < callbacks.length; j++) {\r\n if (callbacks[j] !== callback)\r\n newCallbacks.push(callbacks[j]);\r\n }\r\n }\r\n\r\n object.events[names[i]] = newCallbacks;\r\n }\r\n };\r\n\r\n /**\r\n * Fires all the callbacks subscribed to the given object's `eventName`, in the order they subscribed, if any.\r\n * @method trigger\r\n * @param {} object\r\n * @param {string} eventNames\r\n * @param {} event\r\n */\r\n Events.trigger = function(object, eventNames, event) {\r\n var names,\r\n name,\r\n callbacks,\r\n eventClone;\r\n\r\n var events = object.events;\r\n \r\n if (events && Common.keys(events).length > 0) {\r\n if (!event)\r\n event = {};\r\n\r\n names = eventNames.split(' ');\r\n\r\n for (var i = 0; i < names.length; i++) {\r\n name = names[i];\r\n callbacks = events[name];\r\n\r\n if (callbacks) {\r\n eventClone = Common.clone(event, false);\r\n eventClone.name = name;\r\n eventClone.source = object;\r\n\r\n for (var j = 0; j < callbacks.length; j++) {\r\n callbacks[j].apply(object, [eventClone]);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Events.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter` module is the top level namespace. It also includes a function for installing plugins on top of the library.\r\n*\r\n* @class Matter\r\n*/\r\n\r\nvar Matter = {};\r\n\r\nmodule.exports = Matter;\r\n\r\nvar Plugin = __webpack_require__(/*! ./Plugin */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js\");\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * The library name.\r\n * @property name\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.name = 'matter-js';\r\n\r\n /**\r\n * The library version.\r\n * @property version\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.version = '0.14.2';\r\n\r\n /**\r\n * A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.\r\n * Alternatively you may set `Matter.uses` manually and install them by calling `Plugin.use(Matter)`.\r\n * @property uses\r\n * @type {Array}\r\n */\r\n Matter.uses = [];\r\n\r\n /**\r\n * The plugins that have been installed through `Matter.Plugin.install`. Read only.\r\n * @property used\r\n * @readOnly\r\n * @type {Array}\r\n */\r\n Matter.used = [];\r\n\r\n /**\r\n * Installs the given plugins on the `Matter` namespace.\r\n * This is a short-hand for `Plugin.use`, see it for more information.\r\n * Call this function once at the start of your code, with all of the plugins you wish to install as arguments.\r\n * Avoid calling this function multiple times unless you intend to manually control installation order.\r\n * @method use\r\n * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument).\r\n */\r\n Matter.use = function() {\r\n Plugin.use(Matter, Array.prototype.slice.call(arguments));\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method before\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.before = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathBefore(Matter, path, func);\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method after\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.after = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathAfter(Matter, path, func);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js":function(module,exports,__webpack_require__){eval('// @if DEBUG\r\n/**\r\n* _Internal Class_, not generally used outside of the engine\'s internals.\r\n*\r\n*/\r\n\r\nvar Metrics = {};\r\n\r\nmodule.exports = Metrics;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ "./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js");\r\nvar Common = __webpack_require__(/*! ./Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new metrics.\r\n * @method create\r\n * @private\r\n * @return {metrics} A new metrics\r\n */\r\n Metrics.create = function(options) {\r\n var defaults = {\r\n extended: false,\r\n narrowDetections: 0,\r\n narrowphaseTests: 0,\r\n narrowReuse: 0,\r\n narrowReuseCount: 0,\r\n midphaseTests: 0,\r\n broadphaseTests: 0,\r\n narrowEff: 0.0001,\r\n midEff: 0.0001,\r\n broadEff: 0.0001,\r\n collisions: 0,\r\n buckets: 0,\r\n bodies: 0,\r\n pairs: 0\r\n };\r\n\r\n return Common.extend(defaults, false, options);\r\n };\r\n\r\n /**\r\n * Resets metrics.\r\n * @method reset\r\n * @private\r\n * @param {metrics} metrics\r\n */\r\n Metrics.reset = function(metrics) {\r\n if (metrics.extended) {\r\n metrics.narrowDetections = 0;\r\n metrics.narrowphaseTests = 0;\r\n metrics.narrowReuse = 0;\r\n metrics.narrowReuseCount = 0;\r\n metrics.midphaseTests = 0;\r\n metrics.broadphaseTests = 0;\r\n metrics.narrowEff = 0;\r\n metrics.midEff = 0;\r\n metrics.broadEff = 0;\r\n metrics.collisions = 0;\r\n metrics.buckets = 0;\r\n metrics.pairs = 0;\r\n metrics.bodies = 0;\r\n }\r\n };\r\n\r\n /**\r\n * Updates metrics.\r\n * @method update\r\n * @private\r\n * @param {metrics} metrics\r\n * @param {engine} engine\r\n */\r\n Metrics.update = function(metrics, engine) {\r\n if (metrics.extended) {\r\n var world = engine.world,\r\n bodies = Composite.allBodies(world);\r\n\r\n metrics.collisions = metrics.narrowDetections;\r\n metrics.pairs = engine.pairs.list.length;\r\n metrics.bodies = bodies.length;\r\n metrics.midEff = (metrics.narrowDetections / (metrics.midphaseTests || 1)).toFixed(2);\r\n metrics.narrowEff = (metrics.narrowDetections / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n metrics.broadEff = (1 - (metrics.broadphaseTests / (bodies.length || 1))).toFixed(2);\r\n metrics.narrowReuse = (metrics.narrowReuseCount / (metrics.narrowphaseTests || 1)).toFixed(2);\r\n //var broadphase = engine.broadphase[engine.broadphase.current];\r\n //if (broadphase.instance)\r\n // metrics.buckets = Common.keys(broadphase.instance.buckets).length;\r\n }\r\n };\r\n\r\n})();\r\n// @endif\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js?')},"./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Plugin` module contains functions for registering and installing plugins on modules.\r\n*\r\n* @class Plugin\r\n*/\r\n\r\nvar Plugin = {};\r\n\r\nmodule.exports = Plugin;\r\n\r\nvar Common = __webpack_require__(/*! ./Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n Plugin._registry = {};\r\n\r\n /**\r\n * Registers a plugin object so it can be resolved later by name.\r\n * @method register\r\n * @param plugin {} The plugin to register.\r\n * @return {object} The plugin.\r\n */\r\n Plugin.register = function(plugin) {\r\n if (!Plugin.isPlugin(plugin)) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'does not implement all required fields.');\r\n }\r\n\r\n if (plugin.name in Plugin._registry) {\r\n var registered = Plugin._registry[plugin.name],\r\n pluginVersion = Plugin.versionParse(plugin.version).number,\r\n registeredVersion = Plugin.versionParse(registered.version).number;\r\n\r\n if (pluginVersion > registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'was upgraded to', Plugin.toString(plugin));\r\n Plugin._registry[plugin.name] = plugin;\r\n } else if (pluginVersion < registeredVersion) {\r\n Common.warn('Plugin.register:', Plugin.toString(registered), 'can not be downgraded to', Plugin.toString(plugin));\r\n } else if (plugin !== registered) {\r\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'is already registered to different plugin object');\r\n }\r\n } else {\r\n Plugin._registry[plugin.name] = plugin;\r\n }\r\n\r\n return plugin;\r\n };\r\n\r\n /**\r\n * Resolves a dependency to a plugin object from the registry if it exists. \r\n * The `dependency` may contain a version, but only the name matters when resolving.\r\n * @method resolve\r\n * @param dependency {string} The dependency.\r\n * @return {object} The plugin if resolved, otherwise `undefined`.\r\n */\r\n Plugin.resolve = function(dependency) {\r\n return Plugin._registry[Plugin.dependencyParse(dependency).name];\r\n };\r\n\r\n /**\r\n * Returns a pretty printed plugin name and version.\r\n * @method toString\r\n * @param plugin {} The plugin.\r\n * @return {string} Pretty printed plugin name and version.\r\n */\r\n Plugin.toString = function(plugin) {\r\n return typeof plugin === 'string' ? plugin : (plugin.name || 'anonymous') + '@' + (plugin.version || plugin.range || '0.0.0');\r\n };\r\n\r\n /**\r\n * Returns `true` if the object meets the minimum standard to be considered a plugin.\r\n * This means it must define the following properties:\r\n * - `name`\r\n * - `version`\r\n * - `install`\r\n * @method isPlugin\r\n * @param obj {} The obj to test.\r\n * @return {boolean} `true` if the object can be considered a plugin otherwise `false`.\r\n */\r\n Plugin.isPlugin = function(obj) {\r\n return obj && obj.name && obj.version && obj.install;\r\n };\r\n\r\n /**\r\n * Returns `true` if a plugin with the given `name` been installed on `module`.\r\n * @method isUsed\r\n * @param module {} The module.\r\n * @param name {string} The plugin name.\r\n * @return {boolean} `true` if a plugin with the given `name` been installed on `module`, otherwise `false`.\r\n */\r\n Plugin.isUsed = function(module, name) {\r\n return module.used.indexOf(name) > -1;\r\n };\r\n\r\n /**\r\n * Returns `true` if `plugin.for` is applicable to `module` by comparing against `module.name` and `module.version`.\r\n * If `plugin.for` is not specified then it is assumed to be applicable.\r\n * The value of `plugin.for` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * @method isFor\r\n * @param plugin {} The plugin.\r\n * @param module {} The module.\r\n * @return {boolean} `true` if `plugin.for` is applicable to `module`, otherwise `false`.\r\n */\r\n Plugin.isFor = function(plugin, module) {\r\n var parsed = plugin.for && Plugin.dependencyParse(plugin.for);\r\n return !plugin.for || (module.name === parsed.name && Plugin.versionSatisfies(module.version, parsed.range));\r\n };\r\n\r\n /**\r\n * Installs the plugins by calling `plugin.install` on each plugin specified in `plugins` if passed, otherwise `module.uses`.\r\n * For installing plugins on `Matter` see the convenience function `Matter.use`.\r\n * Plugins may be specified either by their name or a reference to the plugin object.\r\n * Plugins themselves may specify further dependencies, but each plugin is installed only once.\r\n * Order is important, a topological sort is performed to find the best resulting order of installation.\r\n * This sorting attempts to satisfy every dependency's requested ordering, but may not be exact in all cases.\r\n * This function logs the resulting status of each dependency in the console, along with any warnings.\r\n * - A green tick ✅ indicates a dependency was resolved and installed.\r\n * - An orange diamond 🔶 indicates a dependency was resolved but a warning was thrown for it or one if its dependencies.\r\n * - A red cross ❌ indicates a dependency could not be resolved.\r\n * Avoid calling this function multiple times on the same module unless you intend to manually control installation order.\r\n * @method use\r\n * @param module {} The module install plugins on.\r\n * @param [plugins=module.uses] {} The plugins to install on module (optional, defaults to `module.uses`).\r\n */\r\n Plugin.use = function(module, plugins) {\r\n module.uses = (module.uses || []).concat(plugins || []);\r\n\r\n if (module.uses.length === 0) {\r\n Common.warn('Plugin.use:', Plugin.toString(module), 'does not specify any dependencies to install.');\r\n return;\r\n }\r\n\r\n var dependencies = Plugin.dependencies(module),\r\n sortedDependencies = Common.topologicalSort(dependencies),\r\n status = [];\r\n\r\n for (var i = 0; i < sortedDependencies.length; i += 1) {\r\n if (sortedDependencies[i] === module.name) {\r\n continue;\r\n }\r\n\r\n var plugin = Plugin.resolve(sortedDependencies[i]);\r\n\r\n if (!plugin) {\r\n status.push('❌ ' + sortedDependencies[i]);\r\n continue;\r\n }\r\n\r\n if (Plugin.isUsed(module, plugin.name)) {\r\n continue;\r\n }\r\n\r\n if (!Plugin.isFor(plugin, module)) {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'is for', plugin.for, 'but installed on', Plugin.toString(module) + '.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin.install) {\r\n plugin.install(module);\r\n } else {\r\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'does not specify an install function.');\r\n plugin._warned = true;\r\n }\r\n\r\n if (plugin._warned) {\r\n status.push('🔶 ' + Plugin.toString(plugin));\r\n delete plugin._warned;\r\n } else {\r\n status.push('✅ ' + Plugin.toString(plugin));\r\n }\r\n\r\n module.used.push(plugin.name);\r\n }\r\n\r\n if (status.length > 0 && !plugin.silent) {\r\n Common.info(status.join(' '));\r\n }\r\n };\r\n\r\n /**\r\n * Recursively finds all of a module's dependencies and returns a flat dependency graph.\r\n * @method dependencies\r\n * @param module {} The module.\r\n * @return {object} A dependency graph.\r\n */\r\n Plugin.dependencies = function(module, tracked) {\r\n var parsedBase = Plugin.dependencyParse(module),\r\n name = parsedBase.name;\r\n\r\n tracked = tracked || {};\r\n\r\n if (name in tracked) {\r\n return;\r\n }\r\n\r\n module = Plugin.resolve(module) || module;\r\n\r\n tracked[name] = Common.map(module.uses || [], function(dependency) {\r\n if (Plugin.isPlugin(dependency)) {\r\n Plugin.register(dependency);\r\n }\r\n\r\n var parsed = Plugin.dependencyParse(dependency),\r\n resolved = Plugin.resolve(dependency);\r\n\r\n if (resolved && !Plugin.versionSatisfies(resolved.version, parsed.range)) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(resolved), 'does not satisfy',\r\n Plugin.toString(parsed), 'used by', Plugin.toString(parsedBase) + '.'\r\n );\r\n\r\n resolved._warned = true;\r\n module._warned = true;\r\n } else if (!resolved) {\r\n Common.warn(\r\n 'Plugin.dependencies:', Plugin.toString(dependency), 'used by',\r\n Plugin.toString(parsedBase), 'could not be resolved.'\r\n );\r\n\r\n module._warned = true;\r\n }\r\n\r\n return parsed.name;\r\n });\r\n\r\n for (var i = 0; i < tracked[name].length; i += 1) {\r\n Plugin.dependencies(tracked[name][i], tracked);\r\n }\r\n\r\n return tracked;\r\n };\r\n\r\n /**\r\n * Parses a dependency string into its components.\r\n * The `dependency` is a string of the format `'module-name'` or `'module-name@version'`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * This function can also handle dependencies that are already resolved (e.g. a module object).\r\n * @method dependencyParse\r\n * @param dependency {string} The dependency of the format `'module-name'` or `'module-name@version'`.\r\n * @return {object} The dependency parsed into its components.\r\n */\r\n Plugin.dependencyParse = function(dependency) {\r\n if (Common.isString(dependency)) {\r\n var pattern = /^[\\w-]+(@(\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?))?$/;\r\n\r\n if (!pattern.test(dependency)) {\r\n Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.');\r\n }\r\n\r\n return {\r\n name: dependency.split('@')[0],\r\n range: dependency.split('@')[1] || '*'\r\n };\r\n }\r\n\r\n return {\r\n name: dependency.name,\r\n range: dependency.range || dependency.version\r\n };\r\n };\r\n\r\n /**\r\n * Parses a version string into its components. \r\n * Versions are strictly of the format `x.y.z` (as in [semver](http://semver.org/)).\r\n * Versions may optionally have a prerelease tag in the format `x.y.z-alpha`.\r\n * Ranges are a strict subset of [npm ranges](https://docs.npmjs.com/misc/semver#advanced-range-syntax).\r\n * Only the following range types are supported:\r\n * - Tilde ranges e.g. `~1.2.3`\r\n * - Caret ranges e.g. `^1.2.3`\r\n * - Exact version e.g. `1.2.3`\r\n * - Any version `*`\r\n * @method versionParse\r\n * @param range {string} The version string.\r\n * @return {object} The version range parsed into its components.\r\n */\r\n Plugin.versionParse = function(range) {\r\n var pattern = /^\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-]+)?$/;\r\n\r\n if (!pattern.test(range)) {\r\n Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');\r\n }\r\n\r\n var identifiers = range.split('-');\r\n range = identifiers[0];\r\n\r\n var isRange = isNaN(Number(range[0])),\r\n version = isRange ? range.substr(1) : range,\r\n parts = Common.map(version.split('.'), function(part) {\r\n return Number(part);\r\n });\r\n\r\n return {\r\n isRange: isRange,\r\n version: version,\r\n range: range,\r\n operator: isRange ? range[0] : '',\r\n parts: parts,\r\n prerelease: identifiers[1],\r\n number: parts[0] * 1e8 + parts[1] * 1e4 + parts[2]\r\n };\r\n };\r\n\r\n /**\r\n * Returns `true` if `version` satisfies the given `range`.\r\n * See documentation for `Plugin.versionParse` for a description of the format.\r\n * If a version or range is not specified, then any version (`*`) is assumed to satisfy.\r\n * @method versionSatisfies\r\n * @param version {string} The version string.\r\n * @param range {string} The range string.\r\n * @return {boolean} `true` if `version` satisfies `range`, otherwise `false`.\r\n */\r\n Plugin.versionSatisfies = function(version, range) {\r\n range = range || '*';\r\n\r\n var rangeParsed = Plugin.versionParse(range),\r\n rangeParts = rangeParsed.parts,\r\n versionParsed = Plugin.versionParse(version),\r\n versionParts = versionParsed.parts;\r\n\r\n if (rangeParsed.isRange) {\r\n if (rangeParsed.operator === '*' || version === '*') {\r\n return true;\r\n }\r\n\r\n if (rangeParsed.operator === '~') {\r\n return versionParts[0] === rangeParts[0] && versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n if (rangeParsed.operator === '^') {\r\n if (rangeParts[0] > 0) {\r\n return versionParts[0] === rangeParts[0] && versionParsed.number >= rangeParsed.number;\r\n }\r\n\r\n if (rangeParts[1] > 0) {\r\n return versionParts[1] === rangeParts[1] && versionParts[2] >= rangeParts[2];\r\n }\r\n\r\n return versionParts[2] === rangeParts[2];\r\n }\r\n }\r\n\r\n return version === range || version === '*';\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js?")},"./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies.\r\n*\r\n* @class Sleeping\r\n*/\r\n\r\nvar Sleeping = {};\r\n\r\nmodule.exports = Sleeping;\r\n\r\nvar Events = __webpack_require__(/*! ./Events */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Events.js\");\r\n\r\n(function() {\r\n\r\n Sleeping._motionWakeThreshold = 0.18;\r\n Sleeping._motionSleepThreshold = 0.08;\r\n Sleeping._minBias = 0.9;\r\n\r\n /**\r\n * Puts bodies to sleep or wakes them up depending on their motion.\r\n * @method update\r\n * @param {body[]} bodies\r\n * @param {number} timeScale\r\n */\r\n Sleeping.update = function(bodies, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // update bodies sleeping status\r\n for (var i = 0; i < bodies.length; i++) {\r\n var body = bodies[i],\r\n motion = body.speed * body.speed + body.angularSpeed * body.angularSpeed;\r\n\r\n // wake up bodies if they have a force applied\r\n if (body.force.x !== 0 || body.force.y !== 0) {\r\n Sleeping.set(body, false);\r\n continue;\r\n }\r\n\r\n var minMotion = Math.min(body.motion, motion),\r\n maxMotion = Math.max(body.motion, motion);\r\n \r\n // biased average motion estimation between frames\r\n body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion;\r\n \r\n if (body.sleepThreshold > 0 && body.motion < Sleeping._motionSleepThreshold * timeFactor) {\r\n body.sleepCounter += 1;\r\n \r\n if (body.sleepCounter >= body.sleepThreshold)\r\n Sleeping.set(body, true);\r\n } else if (body.sleepCounter > 0) {\r\n body.sleepCounter -= 1;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Given a set of colliding pairs, wakes the sleeping bodies involved.\r\n * @method afterCollisions\r\n * @param {pair[]} pairs\r\n * @param {number} timeScale\r\n */\r\n Sleeping.afterCollisions = function(pairs, timeScale) {\r\n var timeFactor = timeScale * timeScale * timeScale;\r\n\r\n // wake up bodies involved in collisions\r\n for (var i = 0; i < pairs.length; i++) {\r\n var pair = pairs[i];\r\n \r\n // don't wake inactive pairs\r\n if (!pair.isActive)\r\n continue;\r\n\r\n var collision = pair.collision,\r\n bodyA = collision.bodyA.parent, \r\n bodyB = collision.bodyB.parent;\r\n \r\n // don't wake if at least one body is static\r\n if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic)\r\n continue;\r\n \r\n if (bodyA.isSleeping || bodyB.isSleeping) {\r\n var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB,\r\n movingBody = sleepingBody === bodyA ? bodyB : bodyA;\r\n\r\n if (!sleepingBody.isStatic && movingBody.motion > Sleeping._motionWakeThreshold * timeFactor) {\r\n Sleeping.set(sleepingBody, false);\r\n }\r\n }\r\n }\r\n };\r\n \r\n /**\r\n * Set a body as sleeping or awake.\r\n * @method set\r\n * @param {body} body\r\n * @param {boolean} isSleeping\r\n */\r\n Sleeping.set = function(body, isSleeping) {\r\n var wasSleeping = body.isSleeping;\r\n\r\n if (isSleeping) {\r\n body.isSleeping = true;\r\n body.sleepCounter = body.sleepThreshold;\r\n\r\n body.positionImpulse.x = 0;\r\n body.positionImpulse.y = 0;\r\n\r\n body.positionPrev.x = body.position.x;\r\n body.positionPrev.y = body.position.y;\r\n\r\n body.anglePrev = body.angle;\r\n body.speed = 0;\r\n body.angularSpeed = 0;\r\n body.motion = 0;\r\n\r\n if (!wasSleeping) {\r\n Events.trigger(body, 'sleepStart');\r\n }\r\n } else {\r\n body.isSleeping = false;\r\n body.sleepCounter = 0;\r\n\r\n if (wasSleeping) {\r\n Events.trigger(body, 'sleepEnd');\r\n }\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Bodies` module contains factory methods for creating rigid body models \r\n* with commonly used body configurations (such as rectangles, circles and other polygons).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Bodies\r\n*/\r\n\r\n// TODO: true circle bodies\r\n\r\nvar Bodies = {};\r\n\r\nmodule.exports = Bodies;\r\n\r\nvar Vertices = __webpack_require__(/*! ../geometry/Vertices */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar decomp = __webpack_require__(/*! ../../poly-decomp */ \"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new rigid body model with a rectangle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method rectangle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {object} [options]\r\n * @return {body} A new rectangle body\r\n */\r\n Bodies.rectangle = function(x, y, width, height, options) {\r\n options = options || {};\r\n\r\n var rectangle = { \r\n label: 'Rectangle Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, rectangle, options));\r\n };\r\n \r\n /**\r\n * Creates a new rigid body model with a trapezoid hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method trapezoid\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} slope\r\n * @param {object} [options]\r\n * @return {body} A new trapezoid body\r\n */\r\n Bodies.trapezoid = function(x, y, width, height, slope, options) {\r\n options = options || {};\r\n\r\n slope *= 0.5;\r\n var roof = (1 - (slope * 2)) * width;\r\n \r\n var x1 = width * slope,\r\n x2 = x1 + roof,\r\n x3 = x2 + x1,\r\n verticesPath;\r\n\r\n if (slope < 0.5) {\r\n verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n } else {\r\n verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\r\n }\r\n\r\n var trapezoid = { \r\n label: 'Trapezoid Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(verticesPath)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, trapezoid, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a circle hull. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method circle\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @param {number} [maxSides]\r\n * @return {body} A new circle body\r\n */\r\n Bodies.circle = function(x, y, radius, options, maxSides) {\r\n options = options || {};\r\n\r\n var circle = {\r\n label: 'Circle Body',\r\n circleRadius: radius\r\n };\r\n \r\n // approximate circles with polygons until true circles implemented in SAT\r\n maxSides = maxSides || 25;\r\n var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius)));\r\n\r\n // optimisation: always use even number of sides (half the number of unique axes)\r\n if (sides % 2 === 1)\r\n sides += 1;\r\n\r\n return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options));\r\n };\r\n\r\n /**\r\n * Creates a new rigid body model with a regular polygon hull with the given number of sides. \r\n * The options parameter is an object that specifies any properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method polygon\r\n * @param {number} x\r\n * @param {number} y\r\n * @param {number} sides\r\n * @param {number} radius\r\n * @param {object} [options]\r\n * @return {body} A new regular polygon body\r\n */\r\n Bodies.polygon = function(x, y, sides, radius, options) {\r\n options = options || {};\r\n\r\n if (sides < 3)\r\n return Bodies.circle(x, y, radius, options);\r\n\r\n var theta = 2 * Math.PI / sides,\r\n path = '',\r\n offset = theta * 0.5;\r\n\r\n for (var i = 0; i < sides; i += 1) {\r\n var angle = offset + (i * theta),\r\n xx = Math.cos(angle) * radius,\r\n yy = Math.sin(angle) * radius;\r\n\r\n path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' ';\r\n }\r\n\r\n var polygon = { \r\n label: 'Polygon Body',\r\n position: { x: x, y: y },\r\n vertices: Vertices.fromPath(path)\r\n };\r\n\r\n if (options.chamfer) {\r\n var chamfer = options.chamfer;\r\n polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, \r\n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\r\n delete options.chamfer;\r\n }\r\n\r\n return Body.create(Common.extend({}, polygon, options));\r\n };\r\n\r\n /**\r\n * Creates a body using the supplied vertices (or an array containing multiple sets of vertices).\r\n * If the vertices are convex, they will pass through as supplied.\r\n * Otherwise if the vertices are concave, they will be decomposed if [poly-decomp.js](https://github.com/schteppe/poly-decomp.js) is available.\r\n * Note that this process is not guaranteed to support complex sets of vertices (e.g. those with holes may fail).\r\n * By default the decomposition will discard collinear edges (to improve performance).\r\n * It can also optionally discard any parts that have an area less than `minimumArea`.\r\n * If the vertices can not be decomposed, the result will fall back to using the convex hull.\r\n * The options parameter is an object that specifies any `Matter.Body` properties you wish to override the defaults.\r\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\r\n * @method fromVertices\r\n * @param {number} x\r\n * @param {number} y\r\n * @param [[vector]] vertexSets\r\n * @param {object} [options]\r\n * @param {bool} [flagInternal=false]\r\n * @param {number} [removeCollinear=0.01]\r\n * @param {number} [minimumArea=10]\r\n * @return {body}\r\n */\r\n Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea) {\r\n var body,\r\n parts,\r\n isConvex,\r\n vertices,\r\n i,\r\n j,\r\n k,\r\n v,\r\n z;\r\n\r\n options = options || {};\r\n parts = [];\r\n\r\n flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;\r\n removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;\r\n minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;\r\n\r\n if (!decomp) {\r\n Common.warn('Bodies.fromVertices: poly-decomp.js required. Could not decompose vertices. Fallback to convex hull.');\r\n }\r\n\r\n // ensure vertexSets is an array of arrays\r\n if (!Common.isArray(vertexSets[0])) {\r\n vertexSets = [vertexSets];\r\n }\r\n\r\n for (v = 0; v < vertexSets.length; v += 1) {\r\n vertices = vertexSets[v];\r\n isConvex = Vertices.isConvex(vertices);\r\n\r\n if (isConvex || !decomp) {\r\n if (isConvex) {\r\n vertices = Vertices.clockwiseSort(vertices);\r\n } else {\r\n // fallback to convex hull when decomposition is not possible\r\n vertices = Vertices.hull(vertices);\r\n }\r\n\r\n parts.push({\r\n position: { x: x, y: y },\r\n vertices: vertices\r\n });\r\n } else {\r\n // initialise a decomposition\r\n var concave = vertices.map(function(vertex) {\r\n return [vertex.x, vertex.y];\r\n });\r\n\r\n // vertices are concave and simple, we can decompose into parts\r\n decomp.makeCCW(concave);\r\n if (removeCollinear !== false)\r\n decomp.removeCollinearPoints(concave, removeCollinear);\r\n\r\n // use the quick decomposition algorithm (Bayazit)\r\n var decomposed = decomp.quickDecomp(concave);\r\n\r\n // for each decomposed chunk\r\n for (i = 0; i < decomposed.length; i++) {\r\n var chunk = decomposed[i];\r\n\r\n // convert vertices into the correct structure\r\n var chunkVertices = chunk.map(function(vertices) {\r\n return {\r\n x: vertices[0],\r\n y: vertices[1]\r\n };\r\n });\r\n\r\n // skip small chunks\r\n if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea)\r\n continue;\r\n\r\n // create a compound part\r\n parts.push({\r\n position: Vertices.centre(chunkVertices),\r\n vertices: chunkVertices\r\n });\r\n }\r\n }\r\n }\r\n\r\n // create body parts\r\n for (i = 0; i < parts.length; i++) {\r\n parts[i] = Body.create(Common.extend(parts[i], options));\r\n }\r\n\r\n // flag internal edges (coincident part edges)\r\n if (flagInternal) {\r\n var coincident_max_dist = 5;\r\n\r\n for (i = 0; i < parts.length; i++) {\r\n var partA = parts[i];\r\n\r\n for (j = i + 1; j < parts.length; j++) {\r\n var partB = parts[j];\r\n\r\n if (Bounds.overlaps(partA.bounds, partB.bounds)) {\r\n var pav = partA.vertices,\r\n pbv = partB.vertices;\r\n\r\n // iterate vertices of both parts\r\n for (k = 0; k < partA.vertices.length; k++) {\r\n for (z = 0; z < partB.vertices.length; z++) {\r\n // find distances between the vertices\r\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\r\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\r\n\r\n // if both vertices are very close, consider the edge concident (internal)\r\n if (da < coincident_max_dist && db < coincident_max_dist) {\r\n pav[k].isInternal = true;\r\n pbv[z].isInternal = true;\r\n }\r\n }\r\n }\r\n\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (parts.length > 1) {\r\n // create the parent body to be returned, that contains generated compound parts\r\n body = Body.create(Common.extend({ parts: parts.slice(0) }, options));\r\n Body.setPosition(body, { x: x, y: y });\r\n\r\n return body;\r\n } else {\r\n return parts[0];\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js?")},"./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Composites` module contains factory methods for creating composite bodies\r\n* with commonly used configurations (such as stacks and chains).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Composites\r\n*/\r\n\r\nvar Composites = {};\r\n\r\nmodule.exports = Composites;\r\n\r\nvar Composite = __webpack_require__(/*! ../body/Composite */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js\");\r\nvar Constraint = __webpack_require__(/*! ../constraint/Constraint */ \"./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\nvar Body = __webpack_require__(/*! ../body/Body */ \"./node_modules/phaser/src/physics/matter-js/lib/body/Body.js\");\r\nvar Bodies = __webpack_require__(/*! ./Bodies */ \"./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Create a new composite containing bodies created in the callback in a grid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method stack\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.stack = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n var stack = Composite.create({ label: 'Stack' }),\r\n x = xx,\r\n y = yy,\r\n lastBody,\r\n i = 0;\r\n\r\n for (var row = 0; row < rows; row++) {\r\n var maxHeight = 0;\r\n \r\n for (var column = 0; column < columns; column++) {\r\n var body = callback(x, y, column, row, lastBody, i);\r\n \r\n if (body) {\r\n var bodyHeight = body.bounds.max.y - body.bounds.min.y,\r\n bodyWidth = body.bounds.max.x - body.bounds.min.x; \r\n\r\n if (bodyHeight > maxHeight)\r\n maxHeight = bodyHeight;\r\n \r\n Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 });\r\n\r\n x = body.bounds.max.x + columnGap;\r\n\r\n Composite.addBody(stack, body);\r\n \r\n lastBody = body;\r\n i += 1;\r\n } else {\r\n x += columnGap;\r\n }\r\n }\r\n \r\n y += maxHeight + rowGap;\r\n x = xx;\r\n }\r\n\r\n return stack;\r\n };\r\n \r\n /**\r\n * Chains all bodies in the given composite together using constraints.\r\n * @method chain\r\n * @param {composite} composite\r\n * @param {number} xOffsetA\r\n * @param {number} yOffsetA\r\n * @param {number} xOffsetB\r\n * @param {number} yOffsetB\r\n * @param {object} options\r\n * @return {composite} A new composite containing objects chained together with constraints\r\n */\r\n Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) {\r\n var bodies = composite.bodies;\r\n \r\n for (var i = 1; i < bodies.length; i++) {\r\n var bodyA = bodies[i - 1],\r\n bodyB = bodies[i],\r\n bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y,\r\n bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, \r\n bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y,\r\n bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x;\r\n \r\n var defaults = {\r\n bodyA: bodyA,\r\n pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA },\r\n bodyB: bodyB,\r\n pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB }\r\n };\r\n \r\n var constraint = Common.extend(defaults, options);\r\n \r\n Composite.addConstraint(composite, Constraint.create(constraint));\r\n }\r\n\r\n composite.label += ' Chain';\r\n \r\n return composite;\r\n };\r\n\r\n /**\r\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\r\n * @method mesh\r\n * @param {composite} composite\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {boolean} crossBrace\r\n * @param {object} options\r\n * @return {composite} The composite containing objects meshed together with constraints\r\n */\r\n Composites.mesh = function(composite, columns, rows, crossBrace, options) {\r\n var bodies = composite.bodies,\r\n row,\r\n col,\r\n bodyA,\r\n bodyB,\r\n bodyC;\r\n \r\n for (row = 0; row < rows; row++) {\r\n for (col = 1; col < columns; col++) {\r\n bodyA = bodies[(col - 1) + (row * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (row > 0) {\r\n for (col = 0; col < columns; col++) {\r\n bodyA = bodies[col + ((row - 1) * columns)];\r\n bodyB = bodies[col + (row * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\r\n\r\n if (crossBrace && col > 0) {\r\n bodyC = bodies[(col - 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n\r\n if (crossBrace && col < columns - 1) {\r\n bodyC = bodies[(col + 1) + ((row - 1) * columns)];\r\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\r\n }\r\n }\r\n }\r\n }\r\n\r\n composite.label += ' Mesh';\r\n \r\n return composite;\r\n };\r\n \r\n /**\r\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\r\n * This function uses the body's bounds to prevent overlaps.\r\n * @method pyramid\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {function} callback\r\n * @return {composite} A new composite containing objects created in the callback\r\n */\r\n Composites.pyramid = function(xx, yy, columns, rows, columnGap, rowGap, callback) {\r\n return Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y, column, row, lastBody, i) {\r\n var actualRows = Math.min(rows, Math.ceil(columns / 2)),\r\n lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0;\r\n \r\n if (row > actualRows)\r\n return;\r\n \r\n // reverse row order\r\n row = actualRows - row;\r\n \r\n var start = row,\r\n end = columns - 1 - row;\r\n\r\n if (column < start || column > end)\r\n return;\r\n \r\n // retroactively fix the first body's position, since width was unknown\r\n if (i === 1) {\r\n Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 });\r\n }\r\n\r\n var xOffset = lastBody ? column * lastBodyWidth : 0;\r\n \r\n return callback(xx + xOffset + column * columnGap, y, column, row, lastBody, i);\r\n });\r\n };\r\n\r\n /**\r\n * Creates a composite with a Newton's Cradle setup of bodies and constraints.\r\n * @method newtonsCradle\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} number\r\n * @param {number} size\r\n * @param {number} length\r\n * @return {composite} A new composite newtonsCradle body\r\n */\r\n Composites.newtonsCradle = function(xx, yy, number, size, length) {\r\n var newtonsCradle = Composite.create({ label: 'Newtons Cradle' });\r\n\r\n for (var i = 0; i < number; i++) {\r\n var separation = 1.9,\r\n circle = Bodies.circle(xx + i * (size * separation), yy + length, size, \r\n { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }),\r\n constraint = Constraint.create({ pointA: { x: xx + i * (size * separation), y: yy }, bodyB: circle });\r\n\r\n Composite.addBody(newtonsCradle, circle);\r\n Composite.addConstraint(newtonsCradle, constraint);\r\n }\r\n\r\n return newtonsCradle;\r\n };\r\n \r\n /**\r\n * Creates a composite with simple car setup of bodies and constraints.\r\n * @method car\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} width\r\n * @param {number} height\r\n * @param {number} wheelSize\r\n * @return {composite} A new composite car body\r\n */\r\n Composites.car = function(xx, yy, width, height, wheelSize) {\r\n var group = Body.nextGroup(true),\r\n wheelBase = 20,\r\n wheelAOffset = -width * 0.5 + wheelBase,\r\n wheelBOffset = width * 0.5 - wheelBase,\r\n wheelYOffset = 0;\r\n \r\n var car = Composite.create({ label: 'Car' }),\r\n body = Bodies.rectangle(xx, yy, width, height, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n chamfer: {\r\n radius: height * 0.5\r\n },\r\n density: 0.0002\r\n });\r\n \r\n var wheelA = Bodies.circle(xx + wheelAOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var wheelB = Bodies.circle(xx + wheelBOffset, yy + wheelYOffset, wheelSize, { \r\n collisionFilter: {\r\n group: group\r\n },\r\n friction: 0.8\r\n });\r\n \r\n var axelA = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelAOffset, y: wheelYOffset },\r\n bodyA: wheelA,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n var axelB = Constraint.create({\r\n bodyB: body,\r\n pointB: { x: wheelBOffset, y: wheelYOffset },\r\n bodyA: wheelB,\r\n stiffness: 1,\r\n length: 0\r\n });\r\n \r\n Composite.addBody(car, body);\r\n Composite.addBody(car, wheelA);\r\n Composite.addBody(car, wheelB);\r\n Composite.addConstraint(car, axelA);\r\n Composite.addConstraint(car, axelB);\r\n\r\n return car;\r\n };\r\n\r\n /**\r\n * Creates a simple soft body like object.\r\n * @method softBody\r\n * @param {number} xx\r\n * @param {number} yy\r\n * @param {number} columns\r\n * @param {number} rows\r\n * @param {number} columnGap\r\n * @param {number} rowGap\r\n * @param {boolean} crossBrace\r\n * @param {number} particleRadius\r\n * @param {} particleOptions\r\n * @param {} constraintOptions\r\n * @return {composite} A new composite softBody\r\n */\r\n Composites.softBody = function(xx, yy, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) {\r\n particleOptions = Common.extend({ inertia: Infinity }, particleOptions);\r\n constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions);\r\n\r\n var softBody = Composites.stack(xx, yy, columns, rows, columnGap, rowGap, function(x, y) {\r\n return Bodies.circle(x, y, particleRadius, particleOptions);\r\n });\r\n\r\n Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions);\r\n\r\n softBody.label = 'Soft Body';\r\n\r\n return softBody;\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js":function(module,exports,__webpack_require__){eval('/**\r\n* The `Matter.Axes` module contains methods for creating and manipulating sets of axes.\r\n*\r\n* @class Axes\r\n*/\r\n\r\nvar Axes = {};\r\n\r\nmodule.exports = Axes;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ "./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js");\r\nvar Common = __webpack_require__(/*! ../core/Common */ "./node_modules/phaser/src/physics/matter-js/lib/core/Common.js");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of axes from the given vertices.\r\n * @method fromVertices\r\n * @param {vertices} vertices\r\n * @return {axes} A new axes from the given vertices\r\n */\r\n Axes.fromVertices = function(vertices) {\r\n var axes = {};\r\n\r\n // find the unique axes, using edge normal gradients\r\n for (var i = 0; i < vertices.length; i++) {\r\n var j = (i + 1) % vertices.length, \r\n normal = Vector.normalise({ \r\n x: vertices[j].y - vertices[i].y, \r\n y: vertices[i].x - vertices[j].x\r\n }),\r\n gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y);\r\n \r\n // limit precision\r\n gradient = gradient.toFixed(3).toString();\r\n axes[gradient] = normal;\r\n }\r\n\r\n return Common.values(axes);\r\n };\r\n\r\n /**\r\n * Rotates a set of axes by the given angle.\r\n * @method rotate\r\n * @param {axes} axes\r\n * @param {number} angle\r\n */\r\n Axes.rotate = function(axes, angle) {\r\n if (angle === 0)\r\n return;\r\n \r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < axes.length; i++) {\r\n var axis = axes[i],\r\n xx;\r\n xx = axis.x * cos - axis.y * sin;\r\n axis.y = axis.x * sin + axis.y * cos;\r\n axis.x = xx;\r\n }\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js?')},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js":function(module,exports){eval("/**\r\n* The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).\r\n*\r\n* @class Bounds\r\n*/\r\n\r\nvar Bounds = {};\r\n\r\nmodule.exports = Bounds;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new axis-aligned bounding box (AABB) for the given vertices.\r\n * @method create\r\n * @param {vertices} vertices\r\n * @return {bounds} A new bounds object\r\n */\r\n Bounds.create = function(vertices) {\r\n var bounds = { \r\n min: { x: 0, y: 0 }, \r\n max: { x: 0, y: 0 }\r\n };\r\n\r\n if (vertices)\r\n Bounds.update(bounds, vertices);\r\n \r\n return bounds;\r\n };\r\n\r\n /**\r\n * Updates bounds using the given vertices and extends the bounds given a velocity.\r\n * @method update\r\n * @param {bounds} bounds\r\n * @param {vertices} vertices\r\n * @param {vector} velocity\r\n */\r\n Bounds.update = function(bounds, vertices, velocity) {\r\n bounds.min.x = Infinity;\r\n bounds.max.x = -Infinity;\r\n bounds.min.y = Infinity;\r\n bounds.max.y = -Infinity;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertex = vertices[i];\r\n if (vertex.x > bounds.max.x) bounds.max.x = vertex.x;\r\n if (vertex.x < bounds.min.x) bounds.min.x = vertex.x;\r\n if (vertex.y > bounds.max.y) bounds.max.y = vertex.y;\r\n if (vertex.y < bounds.min.y) bounds.min.y = vertex.y;\r\n }\r\n \r\n if (velocity) {\r\n if (velocity.x > 0) {\r\n bounds.max.x += velocity.x;\r\n } else {\r\n bounds.min.x += velocity.x;\r\n }\r\n \r\n if (velocity.y > 0) {\r\n bounds.max.y += velocity.y;\r\n } else {\r\n bounds.min.y += velocity.y;\r\n }\r\n }\r\n };\r\n\r\n /**\r\n * Returns true if the bounds contains the given point.\r\n * @method contains\r\n * @param {bounds} bounds\r\n * @param {vector} point\r\n * @return {boolean} True if the bounds contain the point, otherwise false\r\n */\r\n Bounds.contains = function(bounds, point) {\r\n return point.x >= bounds.min.x && point.x <= bounds.max.x \r\n && point.y >= bounds.min.y && point.y <= bounds.max.y;\r\n };\r\n\r\n /**\r\n * Returns true if the two bounds intersect.\r\n * @method overlaps\r\n * @param {bounds} boundsA\r\n * @param {bounds} boundsB\r\n * @return {boolean} True if the bounds overlap, otherwise false\r\n */\r\n Bounds.overlaps = function(boundsA, boundsB) {\r\n return (boundsA.min.x <= boundsB.max.x && boundsA.max.x >= boundsB.min.x\r\n && boundsA.max.y >= boundsB.min.y && boundsA.min.y <= boundsB.max.y);\r\n };\r\n\r\n /**\r\n * Translates the bounds by the given vector.\r\n * @method translate\r\n * @param {bounds} bounds\r\n * @param {vector} vector\r\n */\r\n Bounds.translate = function(bounds, vector) {\r\n bounds.min.x += vector.x;\r\n bounds.max.x += vector.x;\r\n bounds.min.y += vector.y;\r\n bounds.max.y += vector.y;\r\n };\r\n\r\n /**\r\n * Shifts the bounds to the given position.\r\n * @method shift\r\n * @param {bounds} bounds\r\n * @param {vector} position\r\n */\r\n Bounds.shift = function(bounds, position) {\r\n var deltaX = bounds.max.x - bounds.min.x,\r\n deltaY = bounds.max.y - bounds.min.y;\r\n \r\n bounds.min.x = position.x;\r\n bounds.max.x = position.x + deltaX;\r\n bounds.min.y = position.y;\r\n bounds.max.y = position.y + deltaY;\r\n };\r\n \r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.\r\n*\r\n* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Svg\r\n*/\r\n\r\nvar Svg = {};\r\n\r\nmodule.exports = Svg;\r\n\r\nvar Bounds = __webpack_require__(/*! ../geometry/Bounds */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Converts an SVG path into an array of vector points.\r\n * If the input path forms a concave shape, you must decompose the result into convex parts before use.\r\n * See `Bodies.fromVertices` which provides support for this.\r\n * Note that this function is not guaranteed to support complex paths (such as those with holes).\r\n * You must load the `pathseg.js` polyfill on newer browsers.\r\n * @method pathToVertices\r\n * @param {SVGPathElement} path\r\n * @param {Number} [sampleLength=15]\r\n * @return {Vector[]} points\r\n */\r\n Svg.pathToVertices = function(path, sampleLength) {\r\n if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) {\r\n Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.');\r\n }\r\n\r\n // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js\r\n var i, il, total, point, segment, segments, \r\n segmentsQueue, lastSegment, \r\n lastPoint, segmentIndex, points = [],\r\n lx, ly, length = 0, x = 0, y = 0;\r\n\r\n sampleLength = sampleLength || 15;\r\n\r\n var addPoint = function(px, py, pathSegType) {\r\n // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1)\r\n var isRelative = pathSegType % 2 === 1 && pathSegType > 1;\r\n\r\n // when the last point doesn't equal the current point add the current point\r\n if (!lastPoint || px != lastPoint.x || py != lastPoint.y) {\r\n if (lastPoint && isRelative) {\r\n lx = lastPoint.x;\r\n ly = lastPoint.y;\r\n } else {\r\n lx = 0;\r\n ly = 0;\r\n }\r\n\r\n var point = {\r\n x: lx + px,\r\n y: ly + py\r\n };\r\n\r\n // set last point\r\n if (isRelative || !lastPoint) {\r\n lastPoint = point;\r\n }\r\n\r\n points.push(point);\r\n\r\n x = lx + px;\r\n y = ly + py;\r\n }\r\n };\r\n\r\n var addSegmentPoint = function(segment) {\r\n var segType = segment.pathSegTypeAsLetter.toUpperCase();\r\n\r\n // skip path ends\r\n if (segType === 'Z') \r\n return;\r\n\r\n // map segment to x and y\r\n switch (segType) {\r\n\r\n case 'M':\r\n case 'L':\r\n case 'T':\r\n case 'C':\r\n case 'S':\r\n case 'Q':\r\n x = segment.x;\r\n y = segment.y;\r\n break;\r\n case 'H':\r\n x = segment.x;\r\n break;\r\n case 'V':\r\n y = segment.y;\r\n break;\r\n }\r\n\r\n addPoint(x, y, segment.pathSegType);\r\n };\r\n\r\n // ensure path is absolute\r\n Svg._svgPathToAbsolute(path);\r\n\r\n // get total length\r\n total = path.getTotalLength();\r\n\r\n // queue segments\r\n segments = [];\r\n for (i = 0; i < path.pathSegList.numberOfItems; i += 1)\r\n segments.push(path.pathSegList.getItem(i));\r\n\r\n segmentsQueue = segments.concat();\r\n\r\n // sample through path\r\n while (length < total) {\r\n // get segment at position\r\n segmentIndex = path.getPathSegAtLength(length);\r\n segment = segments[segmentIndex];\r\n\r\n // new segment\r\n if (segment != lastSegment) {\r\n while (segmentsQueue.length && segmentsQueue[0] != segment)\r\n addSegmentPoint(segmentsQueue.shift());\r\n\r\n lastSegment = segment;\r\n }\r\n\r\n // add points in between when curving\r\n // TODO: adaptive sampling\r\n switch (segment.pathSegTypeAsLetter.toUpperCase()) {\r\n\r\n case 'C':\r\n case 'T':\r\n case 'S':\r\n case 'Q':\r\n case 'A':\r\n point = path.getPointAtLength(length);\r\n addPoint(point.x, point.y, 0);\r\n break;\r\n\r\n }\r\n\r\n // increment by sample value\r\n length += sampleLength;\r\n }\r\n\r\n // add remaining segments not passed by sampling\r\n for (i = 0, il = segmentsQueue.length; i < il; ++i)\r\n addSegmentPoint(segmentsQueue[i]);\r\n\r\n return points;\r\n };\r\n\r\n Svg._svgPathToAbsolute = function(path) {\r\n // http://phrogz.net/convert-svg-path-to-all-absolute-commands\r\n // Copyright (c) Gavin Kistner\r\n // http://phrogz.net/js/_ReuseLicense.txt\r\n // Modifications: tidy formatting and naming\r\n var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,\r\n x = 0, y = 0, len = segs.numberOfItems;\r\n\r\n for (var i = 0; i < len; ++i) {\r\n var seg = segs.getItem(i),\r\n segType = seg.pathSegTypeAsLetter;\r\n\r\n if (/[MLHVCSQTA]/.test(segType)) {\r\n if ('x' in seg) x = seg.x;\r\n if ('y' in seg) y = seg.y;\r\n } else {\r\n if ('x1' in seg) x1 = x + seg.x1;\r\n if ('x2' in seg) x2 = x + seg.x2;\r\n if ('y1' in seg) y1 = y + seg.y1;\r\n if ('y2' in seg) y2 = y + seg.y2;\r\n if ('x' in seg) x += seg.x;\r\n if ('y' in seg) y += seg.y;\r\n\r\n switch (segType) {\r\n\r\n case 'm':\r\n segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i);\r\n break;\r\n case 'l':\r\n segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i);\r\n break;\r\n case 'h':\r\n segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i);\r\n break;\r\n case 'v':\r\n segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i);\r\n break;\r\n case 'c':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i);\r\n break;\r\n case 's':\r\n segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i);\r\n break;\r\n case 'q':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i);\r\n break;\r\n case 't':\r\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i);\r\n break;\r\n case 'a':\r\n segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i);\r\n break;\r\n case 'z':\r\n case 'Z':\r\n x = x0;\r\n y = y0;\r\n break;\r\n\r\n }\r\n }\r\n\r\n if (segType == 'M' || segType == 'm') {\r\n x0 = x;\r\n y0 = y;\r\n }\r\n }\r\n };\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js":function(module,exports){eval("/**\r\n* The `Matter.Vector` module contains methods for creating and manipulating vectors.\r\n* Vectors are the basis of all the geometry related operations in the engine.\r\n* A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vector\r\n*/\r\n\r\n// TODO: consider params for reusing vector objects\r\n\r\nvar Vector = {};\r\n\r\nmodule.exports = Vector;\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new vector.\r\n * @method create\r\n * @param {number} x\r\n * @param {number} y\r\n * @return {vector} A new vector\r\n */\r\n Vector.create = function(x, y) {\r\n return { x: x || 0, y: y || 0 };\r\n };\r\n\r\n /**\r\n * Returns a new vector with `x` and `y` copied from the given `vector`.\r\n * @method clone\r\n * @param {vector} vector\r\n * @return {vector} A new cloned vector\r\n */\r\n Vector.clone = function(vector) {\r\n return { x: vector.x, y: vector.y };\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector.\r\n * @method magnitude\r\n * @param {vector} vector\r\n * @return {number} The magnitude of the vector\r\n */\r\n Vector.magnitude = function(vector) {\r\n return Math.sqrt((vector.x * vector.x) + (vector.y * vector.y));\r\n };\r\n\r\n /**\r\n * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation).\r\n * @method magnitudeSquared\r\n * @param {vector} vector\r\n * @return {number} The squared magnitude of the vector\r\n */\r\n Vector.magnitudeSquared = function(vector) {\r\n return (vector.x * vector.x) + (vector.y * vector.y);\r\n };\r\n\r\n /**\r\n * Rotates the vector about (0, 0) by specified angle.\r\n * @method rotate\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} [output]\r\n * @return {vector} The vector rotated about (0, 0)\r\n */\r\n Vector.rotate = function(vector, angle, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = vector.x * cos - vector.y * sin;\r\n output.y = vector.x * sin + vector.y * cos;\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Rotates the vector about a specified point by specified angle.\r\n * @method rotateAbout\r\n * @param {vector} vector\r\n * @param {number} angle\r\n * @param {vector} point\r\n * @param {vector} [output]\r\n * @return {vector} A new vector rotated about the point\r\n */\r\n Vector.rotateAbout = function(vector, angle, point, output) {\r\n var cos = Math.cos(angle), sin = Math.sin(angle);\r\n if (!output) output = {};\r\n var x = point.x + ((vector.x - point.x) * cos - (vector.y - point.y) * sin);\r\n output.y = point.y + ((vector.x - point.x) * sin + (vector.y - point.y) * cos);\r\n output.x = x;\r\n return output;\r\n };\r\n\r\n /**\r\n * Normalises a vector (such that its magnitude is `1`).\r\n * @method normalise\r\n * @param {vector} vector\r\n * @return {vector} A new vector normalised\r\n */\r\n Vector.normalise = function(vector) {\r\n var magnitude = Vector.magnitude(vector);\r\n if (magnitude === 0)\r\n return { x: 0, y: 0 };\r\n return { x: vector.x / magnitude, y: vector.y / magnitude };\r\n };\r\n\r\n /**\r\n * Returns the dot-product of two vectors.\r\n * @method dot\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The dot product of the two vectors\r\n */\r\n Vector.dot = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.x) + (vectorA.y * vectorB.y);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of two vectors.\r\n * @method cross\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The cross product of the two vectors\r\n */\r\n Vector.cross = function(vectorA, vectorB) {\r\n return (vectorA.x * vectorB.y) - (vectorA.y * vectorB.x);\r\n };\r\n\r\n /**\r\n * Returns the cross-product of three vectors.\r\n * @method cross3\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} vectorC\r\n * @return {number} The cross product of the three vectors\r\n */\r\n Vector.cross3 = function(vectorA, vectorB, vectorC) {\r\n return (vectorB.x - vectorA.x) * (vectorC.y - vectorA.y) - (vectorB.y - vectorA.y) * (vectorC.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Adds the two vectors.\r\n * @method add\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB added\r\n */\r\n Vector.add = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x + vectorB.x;\r\n output.y = vectorA.y + vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Subtracts the two vectors.\r\n * @method sub\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @param {vector} [output]\r\n * @return {vector} A new vector of vectorA and vectorB subtracted\r\n */\r\n Vector.sub = function(vectorA, vectorB, output) {\r\n if (!output) output = {};\r\n output.x = vectorA.x - vectorB.x;\r\n output.y = vectorA.y - vectorB.y;\r\n return output;\r\n };\r\n\r\n /**\r\n * Multiplies a vector and a scalar.\r\n * @method mult\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector multiplied by scalar\r\n */\r\n Vector.mult = function(vector, scalar) {\r\n return { x: vector.x * scalar, y: vector.y * scalar };\r\n };\r\n\r\n /**\r\n * Divides a vector and a scalar.\r\n * @method div\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n * @return {vector} A new vector divided by scalar\r\n */\r\n Vector.div = function(vector, scalar) {\r\n return { x: vector.x / scalar, y: vector.y / scalar };\r\n };\r\n\r\n /**\r\n * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction.\r\n * @method perp\r\n * @param {vector} vector\r\n * @param {bool} [negate=false]\r\n * @return {vector} The perpendicular vector\r\n */\r\n Vector.perp = function(vector, negate) {\r\n negate = negate === true ? -1 : 1;\r\n return { x: negate * -vector.y, y: negate * vector.x };\r\n };\r\n\r\n /**\r\n * Negates both components of a vector such that it points in the opposite direction.\r\n * @method neg\r\n * @param {vector} vector\r\n * @return {vector} The negated vector\r\n */\r\n Vector.neg = function(vector) {\r\n return { x: -vector.x, y: -vector.y };\r\n };\r\n\r\n /**\r\n * Returns the angle between the vector `vectorB - vectorA` and the x-axis in radians.\r\n * @method angle\r\n * @param {vector} vectorA\r\n * @param {vector} vectorB\r\n * @return {number} The angle in radians\r\n */\r\n Vector.angle = function(vectorA, vectorB) {\r\n return Math.atan2(vectorB.y - vectorA.y, vectorB.x - vectorA.x);\r\n };\r\n\r\n /**\r\n * Temporary vector pool (not thread-safe).\r\n * @property _temp\r\n * @type {vector[]}\r\n * @private\r\n */\r\n Vector._temp = [\r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create(), \r\n Vector.create(), Vector.create()\r\n ];\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js?")},"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js":function(module,exports,__webpack_require__){eval("/**\r\n* The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\r\n* A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\r\n* A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\r\n*\r\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\r\n*\r\n* @class Vertices\r\n*/\r\n\r\nvar Vertices = {};\r\n\r\nmodule.exports = Vertices;\r\n\r\nvar Vector = __webpack_require__(/*! ../geometry/Vector */ \"./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js\");\r\nvar Common = __webpack_require__(/*! ../core/Common */ \"./node_modules/phaser/src/physics/matter-js/lib/core/Common.js\");\r\n\r\n(function() {\r\n\r\n /**\r\n * Creates a new set of `Matter.Body` compatible vertices.\r\n * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example:\r\n *\r\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\r\n *\r\n * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects,\r\n * but with some additional references required for efficient collision detection routines.\r\n *\r\n * Vertices must be specified in clockwise order.\r\n *\r\n * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided.\r\n *\r\n * @method create\r\n * @param {vector[]} points\r\n * @param {body} body\r\n */\r\n Vertices.create = function(points, body) {\r\n var vertices = [];\r\n\r\n for (var i = 0; i < points.length; i++) {\r\n var point = points[i],\r\n vertex = {\r\n x: point.x,\r\n y: point.y,\r\n index: i,\r\n body: body,\r\n isInternal: false,\r\n contact: null\r\n };\r\n\r\n vertex.contact = {\r\n vertex: vertex,\r\n normalImpulse: 0,\r\n tangentImpulse: 0\r\n };\r\n\r\n vertices.push(vertex);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), \r\n * into a `Matter.Vertices` object for the given `Matter.Body`.\r\n * For parsing SVG paths, see `Svg.pathToVertices`.\r\n * @method fromPath\r\n * @param {string} path\r\n * @param {body} body\r\n * @return {vertices} vertices\r\n */\r\n Vertices.fromPath = function(path, body) {\r\n var pathPattern = /L?\\s*([\\-\\d\\.e]+)[\\s,]*([\\-\\d\\.e]+)*/ig,\r\n points = [];\r\n\r\n path.replace(pathPattern, function(match, x, y) {\r\n points.push({ x: parseFloat(x), y: parseFloat(y) });\r\n });\r\n\r\n return Vertices.create(points, body);\r\n };\r\n\r\n /**\r\n * Returns the centre (centroid) of the set of vertices.\r\n * @method centre\r\n * @param {vertices} vertices\r\n * @return {vector} The centre point\r\n */\r\n Vertices.centre = function(vertices) {\r\n var area = Vertices.area(vertices, true),\r\n centre = { x: 0, y: 0 },\r\n cross,\r\n temp,\r\n j;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n j = (i + 1) % vertices.length;\r\n cross = Vector.cross(vertices[i], vertices[j]);\r\n temp = Vector.mult(Vector.add(vertices[i], vertices[j]), cross);\r\n centre = Vector.add(centre, temp);\r\n }\r\n\r\n return Vector.div(centre, 6 * area);\r\n };\r\n\r\n /**\r\n * Returns the average (mean) of the set of vertices.\r\n * @method mean\r\n * @param {vertices} vertices\r\n * @return {vector} The average point\r\n */\r\n Vertices.mean = function(vertices) {\r\n var average = { x: 0, y: 0 };\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n average.x += vertices[i].x;\r\n average.y += vertices[i].y;\r\n }\r\n\r\n return Vector.div(average, vertices.length);\r\n };\r\n\r\n /**\r\n * Returns the area of the set of vertices.\r\n * @method area\r\n * @param {vertices} vertices\r\n * @param {bool} signed\r\n * @return {number} The area\r\n */\r\n Vertices.area = function(vertices, signed) {\r\n var area = 0,\r\n j = vertices.length - 1;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n area += (vertices[j].x - vertices[i].x) * (vertices[j].y + vertices[i].y);\r\n j = i;\r\n }\r\n\r\n if (signed)\r\n return area / 2;\r\n\r\n return Math.abs(area) / 2;\r\n };\r\n\r\n /**\r\n * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass.\r\n * @method inertia\r\n * @param {vertices} vertices\r\n * @param {number} mass\r\n * @return {number} The polygon's moment of inertia\r\n */\r\n Vertices.inertia = function(vertices, mass) {\r\n var numerator = 0,\r\n denominator = 0,\r\n v = vertices,\r\n cross,\r\n j;\r\n\r\n // find the polygon's moment of inertia, using second moment of area\r\n // from equations at http://www.physicsforums.com/showthread.php?t=25293\r\n for (var n = 0; n < v.length; n++) {\r\n j = (n + 1) % v.length;\r\n cross = Math.abs(Vector.cross(v[j], v[n]));\r\n numerator += cross * (Vector.dot(v[j], v[j]) + Vector.dot(v[j], v[n]) + Vector.dot(v[n], v[n]));\r\n denominator += cross;\r\n }\r\n\r\n return (mass / 6) * (numerator / denominator);\r\n };\r\n\r\n /**\r\n * Translates the set of vertices in-place.\r\n * @method translate\r\n * @param {vertices} vertices\r\n * @param {vector} vector\r\n * @param {number} scalar\r\n */\r\n Vertices.translate = function(vertices, vector, scalar) {\r\n var i;\r\n if (scalar) {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x * scalar;\r\n vertices[i].y += vector.y * scalar;\r\n }\r\n } else {\r\n for (i = 0; i < vertices.length; i++) {\r\n vertices[i].x += vector.x;\r\n vertices[i].y += vector.y;\r\n }\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Rotates the set of vertices in-place.\r\n * @method rotate\r\n * @param {vertices} vertices\r\n * @param {number} angle\r\n * @param {vector} point\r\n */\r\n Vertices.rotate = function(vertices, angle, point) {\r\n if (angle === 0)\r\n return;\r\n\r\n var cos = Math.cos(angle),\r\n sin = Math.sin(angle);\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n dx = vertice.x - point.x,\r\n dy = vertice.y - point.y;\r\n \r\n vertice.x = point.x + (dx * cos - dy * sin);\r\n vertice.y = point.y + (dx * sin + dy * cos);\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns `true` if the `point` is inside the set of `vertices`.\r\n * @method contains\r\n * @param {vertices} vertices\r\n * @param {vector} point\r\n * @return {boolean} True if the vertices contains point, otherwise false\r\n */\r\n Vertices.contains = function(vertices, point) {\r\n for (var i = 0; i < vertices.length; i++) {\r\n var vertice = vertices[i],\r\n nextVertice = vertices[(i + 1) % vertices.length];\r\n if ((point.x - vertice.x) * (nextVertice.y - vertice.y) + (point.y - vertice.y) * (vertice.x - nextVertice.x) > 0) {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n };\r\n\r\n /**\r\n * Scales the vertices from a point (default is centre) in-place.\r\n * @method scale\r\n * @param {vertices} vertices\r\n * @param {number} scaleX\r\n * @param {number} scaleY\r\n * @param {vector} point\r\n */\r\n Vertices.scale = function(vertices, scaleX, scaleY, point) {\r\n if (scaleX === 1 && scaleY === 1)\r\n return vertices;\r\n\r\n point = point || Vertices.centre(vertices);\r\n\r\n var vertex,\r\n delta;\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n vertex = vertices[i];\r\n delta = Vector.sub(vertex, point);\r\n vertices[i].x = point.x + delta.x * scaleX;\r\n vertices[i].y = point.y + delta.y * scaleY;\r\n }\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices.\r\n * The radius parameter is a single number or an array to specify the radius for each vertex.\r\n * @method chamfer\r\n * @param {vertices} vertices\r\n * @param {number[]} radius\r\n * @param {number} quality\r\n * @param {number} qualityMin\r\n * @param {number} qualityMax\r\n */\r\n Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {\r\n if (typeof radius === 'number') {\r\n radius = [radius];\r\n } else {\r\n radius = radius || [8];\r\n }\r\n\r\n // quality defaults to -1, which is auto\r\n quality = (typeof quality !== 'undefined') ? quality : -1;\r\n qualityMin = qualityMin || 2;\r\n qualityMax = qualityMax || 14;\r\n\r\n var newVertices = [];\r\n\r\n for (var i = 0; i < vertices.length; i++) {\r\n var prevVertex = vertices[i - 1 >= 0 ? i - 1 : vertices.length - 1],\r\n vertex = vertices[i],\r\n nextVertex = vertices[(i + 1) % vertices.length],\r\n currentRadius = radius[i < radius.length ? i : radius.length - 1];\r\n\r\n if (currentRadius === 0) {\r\n newVertices.push(vertex);\r\n continue;\r\n }\r\n\r\n var prevNormal = Vector.normalise({ \r\n x: vertex.y - prevVertex.y, \r\n y: prevVertex.x - vertex.x\r\n });\r\n\r\n var nextNormal = Vector.normalise({ \r\n x: nextVertex.y - vertex.y, \r\n y: vertex.x - nextVertex.x\r\n });\r\n\r\n var diagonalRadius = Math.sqrt(2 * Math.pow(currentRadius, 2)),\r\n radiusVector = Vector.mult(Common.clone(prevNormal), currentRadius),\r\n midNormal = Vector.normalise(Vector.mult(Vector.add(prevNormal, nextNormal), 0.5)),\r\n scaledVertex = Vector.sub(vertex, Vector.mult(midNormal, diagonalRadius));\r\n\r\n var precision = quality;\r\n\r\n if (quality === -1) {\r\n // automatically decide precision\r\n precision = Math.pow(currentRadius, 0.32) * 1.75;\r\n }\r\n\r\n precision = Common.clamp(precision, qualityMin, qualityMax);\r\n\r\n // use an even value for precision, more likely to reduce axes by using symmetry\r\n if (precision % 2 === 1)\r\n precision += 1;\r\n\r\n var alpha = Math.acos(Vector.dot(prevNormal, nextNormal)),\r\n theta = alpha / precision;\r\n\r\n for (var j = 0; j < precision; j++) {\r\n newVertices.push(Vector.add(Vector.rotate(radiusVector, theta * j), scaledVertex));\r\n }\r\n }\r\n\r\n return newVertices;\r\n };\r\n\r\n /**\r\n * Sorts the input vertices into clockwise order in place.\r\n * @method clockwiseSort\r\n * @param {vertices} vertices\r\n * @return {vertices} vertices\r\n */\r\n Vertices.clockwiseSort = function(vertices) {\r\n var centre = Vertices.mean(vertices);\r\n\r\n vertices.sort(function(vertexA, vertexB) {\r\n return Vector.angle(centre, vertexA) - Vector.angle(centre, vertexB);\r\n });\r\n\r\n return vertices;\r\n };\r\n\r\n /**\r\n * Returns true if the vertices form a convex shape (vertices must be in clockwise order).\r\n * @method isConvex\r\n * @param {vertices} vertices\r\n * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable).\r\n */\r\n Vertices.isConvex = function(vertices) {\r\n // http://paulbourke.net/geometry/polygonmesh/\r\n // Copyright (c) Paul Bourke (use permitted)\r\n\r\n var flag = 0,\r\n n = vertices.length,\r\n i,\r\n j,\r\n k,\r\n z;\r\n\r\n if (n < 3)\r\n return null;\r\n\r\n for (i = 0; i < n; i++) {\r\n j = (i + 1) % n;\r\n k = (i + 2) % n;\r\n z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y);\r\n z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x);\r\n\r\n if (z < 0) {\r\n flag |= 1;\r\n } else if (z > 0) {\r\n flag |= 2;\r\n }\r\n\r\n if (flag === 3) {\r\n return false;\r\n }\r\n }\r\n\r\n if (flag !== 0){\r\n return true;\r\n } else {\r\n return null;\r\n }\r\n };\r\n\r\n /**\r\n * Returns the convex hull of the input vertices as a new array of points.\r\n * @method hull\r\n * @param {vertices} vertices\r\n * @return [vertex] vertices\r\n */\r\n Vertices.hull = function(vertices) {\r\n // http://geomalgorithms.com/a10-_hull-1.html\r\n\r\n var upper = [],\r\n lower = [], \r\n vertex,\r\n i;\r\n\r\n // sort vertices on x-axis (y-axis for ties)\r\n vertices = vertices.slice(0);\r\n vertices.sort(function(vertexA, vertexB) {\r\n var dx = vertexA.x - vertexB.x;\r\n return dx !== 0 ? dx : vertexA.y - vertexB.y;\r\n });\r\n\r\n // build lower hull\r\n for (i = 0; i < vertices.length; i += 1) {\r\n vertex = vertices[i];\r\n\r\n while (lower.length >= 2 \r\n && Vector.cross3(lower[lower.length - 2], lower[lower.length - 1], vertex) <= 0) {\r\n lower.pop();\r\n }\r\n\r\n lower.push(vertex);\r\n }\r\n\r\n // build upper hull\r\n for (i = vertices.length - 1; i >= 0; i -= 1) {\r\n vertex = vertices[i];\r\n\r\n while (upper.length >= 2 \r\n && Vector.cross3(upper[upper.length - 2], upper[upper.length - 1], vertex) <= 0) {\r\n upper.pop();\r\n }\r\n\r\n upper.push(vertex);\r\n }\r\n\r\n // concatenation of the lower and upper hulls gives the convex hull\r\n // omit last points because they are repeated at the beginning of the other list\r\n upper.pop();\r\n lower.pop();\r\n\r\n return upper.concat(lower);\r\n };\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * An attractors plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterAttractors\r\n */\r\nvar MatterAttractors = {\r\n // plugin meta\r\n name: 'matter-attractors', // PLUGIN_NAME\r\n version: '0.1.7', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Body.create', function() {\r\n MatterAttractors.Body.init(this);\r\n });\r\n\r\n base.before('Engine.update', function(engine) {\r\n MatterAttractors.Engine.update(engine);\r\n });\r\n },\r\n\r\n Body: {\r\n /**\r\n * Initialises the `body` to support attractors.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Body.init\r\n * @param {Matter.Body} body The body to init.\r\n * @returns {void} No return value.\r\n */\r\n init: function(body) {\r\n body.plugin.attractors = body.plugin.attractors || [];\r\n }\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Applies all attractors for all bodies in the `engine`.\r\n * This is called automatically by the plugin.\r\n * @function MatterAttractors.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var bodyA = bodies[i],\r\n attractors = bodyA.plugin.attractors;\r\n\r\n if (attractors && attractors.length > 0) {\r\n for (var j = i + 1; j < bodies.length; j += 1) {\r\n var bodyB = bodies[j];\r\n\r\n for (var k = 0; k < attractors.length; k += 1) {\r\n var attractor = attractors[k],\r\n forceVector = attractor;\r\n\r\n if (Matter.Common.isFunction(attractor)) {\r\n forceVector = attractor(bodyA, bodyB);\r\n }\r\n\r\n if (forceVector) {\r\n Matter.Body.applyForce(bodyB, bodyB.position, forceVector);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Defines some useful common attractor functions that can be used\r\n * by pushing them to your body's `body.plugin.attractors` array.\r\n * @namespace MatterAttractors.Attractors\r\n * @property {number} gravityConstant The gravitational constant used by the gravity attractor.\r\n */\r\n Attractors: {\r\n gravityConstant: 0.001,\r\n\r\n /**\r\n * An attractor function that applies Newton's law of gravitation.\r\n * Use this by pushing `MatterAttractors.Attractors.gravity` to your body's `body.plugin.attractors` array.\r\n * The gravitational constant defaults to `0.001` which you can change\r\n * at `MatterAttractors.Attractors.gravityConstant`.\r\n * @function MatterAttractors.Attractors.gravity\r\n * @param {Matter.Body} bodyA The first body.\r\n * @param {Matter.Body} bodyB The second body.\r\n * @returns {void} No return value.\r\n */\r\n gravity: function(bodyA, bodyB) {\r\n // use Newton's law of gravitation\r\n var bToA = Matter.Vector.sub(bodyB.position, bodyA.position),\r\n distanceSq = Matter.Vector.magnitudeSquared(bToA) || 0.0001,\r\n normal = Matter.Vector.normalise(bToA),\r\n magnitude = -MatterAttractors.Attractors.gravityConstant * (bodyA.mass * bodyB.mass / distanceSq),\r\n force = Matter.Vector.mult(normal, magnitude);\r\n\r\n // to apply forces to both bodies\r\n Matter.Body.applyForce(bodyA, bodyA.position, Matter.Vector.neg(force));\r\n Matter.Body.applyForce(bodyB, bodyB.position, force);\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterAttractors;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.attractors` to instances of `Matter.Body`.\r\n * This is an array of callback functions that will be called automatically\r\n * for every pair of bodies, on every engine update.\r\n * @property {Function[]} body.plugin.attractors\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * An attractor function calculates the force to be applied\r\n * to `bodyB`, it should either:\r\n * - return the force vector to be applied to `bodyB`\r\n * - or apply the force to the body(s) itself\r\n * @callback AttractorFunction\r\n * @param {Matter.Body} bodyA\r\n * @param {Matter.Body} bodyB\r\n * @returns {(Vector|undefined)} a force vector (optional)\r\n */\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js?")},"./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js":function(module,exports,__webpack_require__){eval("var Matter = __webpack_require__(/*! ../../CustomMain */ \"./node_modules/phaser/src/physics/matter-js/CustomMain.js\");\r\n\r\n/**\r\n * A coordinate wrapping plugin for matter.js.\r\n * See the readme for usage and examples.\r\n * @module MatterWrap\r\n */\r\nvar MatterWrap = {\r\n // plugin meta\r\n name: 'matter-wrap', // PLUGIN_NAME\r\n version: '0.1.4', // PLUGIN_VERSION\r\n for: 'matter-js@^0.13.1',\r\n silent: true, // no console log please\r\n\r\n // installs the plugin where `base` is `Matter`\r\n // you should not need to call this directly.\r\n install: function(base) {\r\n base.after('Engine.update', function() {\r\n MatterWrap.Engine.update(this);\r\n });\r\n },\r\n\r\n Engine: {\r\n /**\r\n * Updates the engine by wrapping bodies and composites inside `engine.world`.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Engine.update\r\n * @param {Matter.Engine} engine The engine to update.\r\n * @returns {void} No return value.\r\n */\r\n update: function(engine) {\r\n var world = engine.world,\r\n bodies = Matter.Composite.allBodies(world),\r\n composites = Matter.Composite.allComposites(world);\r\n\r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n\r\n if (body.plugin.wrap) {\r\n MatterWrap.Body.wrap(body, body.plugin.wrap);\r\n }\r\n }\r\n\r\n for (i = 0; i < composites.length; i += 1) {\r\n var composite = composites[i];\r\n\r\n if (composite.plugin.wrap) {\r\n MatterWrap.Composite.wrap(composite, composite.plugin.wrap);\r\n }\r\n }\r\n }\r\n },\r\n\r\n Bounds: {\r\n /**\r\n * Returns a translation vector that wraps the `objectBounds` inside the `bounds`.\r\n * @function MatterWrap.Bounds.wrap\r\n * @param {Matter.Bounds} objectBounds The bounds of the object to wrap inside the bounds.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} A translation vector (only if wrapping is required).\r\n */\r\n wrap: function(objectBounds, bounds) {\r\n var x = null,\r\n y = null;\r\n\r\n if (typeof bounds.min.x !== 'undefined' && typeof bounds.max.x !== 'undefined') {\r\n if (objectBounds.min.x > bounds.max.x) {\r\n x = bounds.min.x - objectBounds.max.x;\r\n } else if (objectBounds.max.x < bounds.min.x) {\r\n x = bounds.max.x - objectBounds.min.x;\r\n }\r\n }\r\n\r\n if (typeof bounds.min.y !== 'undefined' && typeof bounds.max.y !== 'undefined') {\r\n if (objectBounds.min.y > bounds.max.y) {\r\n y = bounds.min.y - objectBounds.max.y;\r\n } else if (objectBounds.max.y < bounds.min.y) {\r\n y = bounds.max.y - objectBounds.min.y;\r\n }\r\n }\r\n\r\n if (x !== null || y !== null) {\r\n return {\r\n x: x || 0,\r\n y: y || 0\r\n };\r\n }\r\n }\r\n },\r\n\r\n Body: {\r\n /**\r\n * Wraps the `body` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the body will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Body.wrap\r\n * @param {Matter.Body} body The body to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the body inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(body, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(body.bounds, bounds);\r\n\r\n if (translation) {\r\n Matter.Body.translate(body, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n },\r\n\r\n Composite: {\r\n /**\r\n * Returns the union of the bounds of all of the composite's bodies\r\n * (not accounting for constraints).\r\n * @function MatterWrap.Composite.bounds\r\n * @param {Matter.Composite} composite The composite.\r\n * @returns {Matter.Bounds} The composite bounds.\r\n */\r\n bounds: function(composite) {\r\n var bodies = Matter.Composite.allBodies(composite),\r\n vertices = [];\r\n \r\n for (var i = 0; i < bodies.length; i += 1) {\r\n var body = bodies[i];\r\n vertices.push(body.bounds.min, body.bounds.max);\r\n }\r\n\r\n return Matter.Bounds.create(vertices);\r\n },\r\n\r\n /**\r\n * Wraps the `composite` position such that it always stays within the given bounds. \r\n * Upon crossing a boundary the composite will appear on the opposite side of the bounds, \r\n * while maintaining its velocity.\r\n * This is called automatically by the plugin.\r\n * @function MatterWrap.Composite.wrap\r\n * @param {Matter.Composite} composite The composite to wrap.\r\n * @param {Matter.Bounds} bounds The bounds to wrap the composite inside.\r\n * @returns {?Matter.Vector} The translation vector that was applied (only if wrapping was required).\r\n */\r\n wrap: function(composite, bounds) {\r\n var translation = MatterWrap.Bounds.wrap(\r\n MatterWrap.Composite.bounds(composite), \r\n bounds\r\n );\r\n\r\n if (translation) {\r\n Matter.Composite.translate(composite, translation);\r\n }\r\n\r\n return translation;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = MatterWrap;\r\n\r\n/**\r\n * @namespace Matter.Body\r\n * @see http://brm.io/matter-js/docs/classes/Body.html\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `body.plugin.wrap` to instances of `Matter.Body`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} body.plugin.wrap\r\n * @memberof Matter.Body\r\n */\r\n\r\n/**\r\n * This plugin adds a new property `composite.plugin.wrap` to instances of `Matter.Composite`. \r\n * This is a `Matter.Bounds` instance that specifies the wrapping region.\r\n * @property {Matter.Bounds} composite.plugin.wrap\r\n * @memberof Matter.Composite\r\n */\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js?")},"./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js":function(module,exports){eval('/**\r\n * @author Stefan Hedman (http://steffe.se)\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// v0.3.0\r\n\r\nmodule.exports = {\r\n decomp: polygonDecomp,\r\n quickDecomp: polygonQuickDecomp,\r\n isSimple: polygonIsSimple,\r\n removeCollinearPoints: polygonRemoveCollinearPoints,\r\n removeDuplicatePoints: polygonRemoveDuplicatePoints,\r\n makeCCW: polygonMakeCCW\r\n};\r\n\r\n/**\r\n * Compute the intersection between two lines.\r\n * @static\r\n * @method lineInt\r\n * @param {Array} l1 Line vector 1\r\n * @param {Array} l2 Line vector 2\r\n * @param {Number} precision Precision to use when checking if the lines are parallel\r\n * @return {Array} The intersection point.\r\n */\r\nfunction lineInt(l1,l2,precision){\r\n precision = precision || 0;\r\n var i = [0,0]; // point\r\n var a1, b1, c1, a2, b2, c2, det; // scalars\r\n a1 = l1[1][1] - l1[0][1];\r\n b1 = l1[0][0] - l1[1][0];\r\n c1 = a1 * l1[0][0] + b1 * l1[0][1];\r\n a2 = l2[1][1] - l2[0][1];\r\n b2 = l2[0][0] - l2[1][0];\r\n c2 = a2 * l2[0][0] + b2 * l2[0][1];\r\n det = a1 * b2 - a2*b1;\r\n if (!scalar_eq(det, 0, precision)) { // lines are not parallel\r\n i[0] = (b2 * c1 - b1 * c2) / det;\r\n i[1] = (a1 * c2 - a2 * c1) / det;\r\n }\r\n return i;\r\n}\r\n\r\n/**\r\n * Checks if two line segments intersects.\r\n * @method segmentsIntersect\r\n * @param {Array} p1 The start vertex of the first line segment.\r\n * @param {Array} p2 The end vertex of the first line segment.\r\n * @param {Array} q1 The start vertex of the second line segment.\r\n * @param {Array} q2 The end vertex of the second line segment.\r\n * @return {Boolean} True if the two line segments intersect\r\n */\r\nfunction lineSegmentsIntersect(p1, p2, q1, q2){\r\n\tvar dx = p2[0] - p1[0];\r\n\tvar dy = p2[1] - p1[1];\r\n\tvar da = q2[0] - q1[0];\r\n\tvar db = q2[1] - q1[1];\r\n\r\n\t// segments are parallel\r\n\tif((da*dy - db*dx) === 0){\r\n\t\treturn false;\r\n\t}\r\n\r\n\tvar s = (dx * (q1[1] - p1[1]) + dy * (p1[0] - q1[0])) / (da * dy - db * dx);\r\n\tvar t = (da * (p1[1] - q1[1]) + db * (q1[0] - p1[0])) / (db * dx - da * dy);\r\n\r\n\treturn (s>=0 && s<=1 && t>=0 && t<=1);\r\n}\r\n\r\n/**\r\n * Get the area of a triangle spanned by the three given points. Note that the area will be negative if the points are not given in counter-clockwise order.\r\n * @static\r\n * @method area\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @return {Number}\r\n */\r\nfunction triangleArea(a,b,c){\r\n return (((b[0] - a[0])*(c[1] - a[1]))-((c[0] - a[0])*(b[1] - a[1])));\r\n}\r\n\r\nfunction isLeft(a,b,c){\r\n return triangleArea(a,b,c) > 0;\r\n}\r\n\r\nfunction isLeftOn(a,b,c) {\r\n return triangleArea(a, b, c) >= 0;\r\n}\r\n\r\nfunction isRight(a,b,c) {\r\n return triangleArea(a, b, c) < 0;\r\n}\r\n\r\nfunction isRightOn(a,b,c) {\r\n return triangleArea(a, b, c) <= 0;\r\n}\r\n\r\nvar tmpPoint1 = [],\r\n tmpPoint2 = [];\r\n\r\n/**\r\n * Check if three points are collinear\r\n * @method collinear\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Array} c\r\n * @param {Number} [thresholdAngle=0] Threshold angle to use when comparing the vectors. The function will return true if the angle between the resulting vectors is less than this value. Use zero for max precision.\r\n * @return {Boolean}\r\n */\r\nfunction collinear(a,b,c,thresholdAngle) {\r\n if(!thresholdAngle){\r\n return triangleArea(a, b, c) === 0;\r\n } else {\r\n var ab = tmpPoint1,\r\n bc = tmpPoint2;\r\n\r\n ab[0] = b[0]-a[0];\r\n ab[1] = b[1]-a[1];\r\n bc[0] = c[0]-b[0];\r\n bc[1] = c[1]-b[1];\r\n\r\n var dot = ab[0]*bc[0] + ab[1]*bc[1],\r\n magA = Math.sqrt(ab[0]*ab[0] + ab[1]*ab[1]),\r\n magB = Math.sqrt(bc[0]*bc[0] + bc[1]*bc[1]),\r\n angle = Math.acos(dot/(magA*magB));\r\n return angle < thresholdAngle;\r\n }\r\n}\r\n\r\nfunction sqdist(a,b){\r\n var dx = b[0] - a[0];\r\n var dy = b[1] - a[1];\r\n return dx * dx + dy * dy;\r\n}\r\n\r\n/**\r\n * Get a vertex at position i. It does not matter if i is out of bounds, this function will just cycle.\r\n * @method at\r\n * @param {Number} i\r\n * @return {Array}\r\n */\r\nfunction polygonAt(polygon, i){\r\n var s = polygon.length;\r\n return polygon[i < 0 ? i % s + s : i % s];\r\n}\r\n\r\n/**\r\n * Clear the polygon data\r\n * @method clear\r\n * @return {Array}\r\n */\r\nfunction polygonClear(polygon){\r\n polygon.length = 0;\r\n}\r\n\r\n/**\r\n * Append points "from" to "to"-1 from an other polygon "poly" onto this one.\r\n * @method append\r\n * @param {Polygon} poly The polygon to get points from.\r\n * @param {Number} from The vertex index in "poly".\r\n * @param {Number} to The end vertex index in "poly". Note that this vertex is NOT included when appending.\r\n * @return {Array}\r\n */\r\nfunction polygonAppend(polygon, poly, from, to){\r\n for(var i=from; i v[br][0])) {\r\n br = i;\r\n }\r\n }\r\n\r\n // reverse poly if clockwise\r\n if (!isLeft(polygonAt(polygon, br - 1), polygonAt(polygon, br), polygonAt(polygon, br + 1))) {\r\n polygonReverse(polygon);\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}\r\n\r\n/**\r\n * Reverse the vertices in the polygon\r\n * @method reverse\r\n */\r\nfunction polygonReverse(polygon){\r\n var tmp = [];\r\n var N = polygon.length;\r\n for(var i=0; i!==N; i++){\r\n tmp.push(polygon.pop());\r\n }\r\n for(var i=0; i!==N; i++){\r\n\t\tpolygon[i] = tmp[i];\r\n }\r\n}\r\n\r\n/**\r\n * Check if a point in the polygon is a reflex point\r\n * @method isReflex\r\n * @param {Number} i\r\n * @return {Boolean}\r\n */\r\nfunction polygonIsReflex(polygon, i){\r\n return isRight(polygonAt(polygon, i - 1), polygonAt(polygon, i), polygonAt(polygon, i + 1));\r\n}\r\n\r\nvar tmpLine1=[],\r\n tmpLine2=[];\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee(polygon, a,b) {\r\n var p, dist, l1=tmpLine1, l2=tmpLine2;\r\n\r\n if (isLeftOn(polygonAt(polygon, a + 1), polygonAt(polygon, a), polygonAt(polygon, b)) && isRightOn(polygonAt(polygon, a - 1), polygonAt(polygon, a), polygonAt(polygon, b))) {\r\n return false;\r\n }\r\n dist = sqdist(polygonAt(polygon, a), polygonAt(polygon, b));\r\n for (var i = 0; i !== polygon.length; ++i) { // for each edge\r\n if ((i + 1) % polygon.length === a || i === a){ // ignore incident edges\r\n continue;\r\n }\r\n if (isLeftOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i + 1)) && isRightOn(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i))) { // if diag intersects an edge\r\n l1[0] = polygonAt(polygon, a);\r\n l1[1] = polygonAt(polygon, b);\r\n l2[0] = polygonAt(polygon, i);\r\n l2[1] = polygonAt(polygon, i + 1);\r\n p = lineInt(l1,l2);\r\n if (sqdist(polygonAt(polygon, a), p) < dist) { // if edge is blocking visibility to b\r\n return false;\r\n }\r\n }\r\n }\r\n\r\n return true;\r\n}\r\n\r\n/**\r\n * Check if two vertices in the polygon can see each other\r\n * @method canSee2\r\n * @param {Number} a Vertex index 1\r\n * @param {Number} b Vertex index 2\r\n * @return {Boolean}\r\n */\r\nfunction polygonCanSee2(polygon, a,b) {\r\n // for each edge\r\n for (var i = 0; i !== polygon.length; ++i) {\r\n // ignore incident edges\r\n if (i === a || i === b || (i + 1) % polygon.length === a || (i + 1) % polygon.length === b){\r\n continue;\r\n }\r\n if( lineSegmentsIntersect(polygonAt(polygon, a), polygonAt(polygon, b), polygonAt(polygon, i), polygonAt(polygon, i+1)) ){\r\n return false;\r\n }\r\n }\r\n return true;\r\n}\r\n\r\n/**\r\n * Copy the polygon from vertex i to vertex j.\r\n * @method copy\r\n * @param {Number} i\r\n * @param {Number} j\r\n * @param {Polygon} [targetPoly] Optional target polygon to save in.\r\n * @return {Polygon} The resulting copy.\r\n */\r\nfunction polygonCopy(polygon, i,j,targetPoly){\r\n var p = targetPoly || [];\r\n polygonClear(p);\r\n if (i < j) {\r\n // Insert all vertices from i to j\r\n for(var k=i; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n } else {\r\n\r\n // Insert vertices 0 to j\r\n for(var k=0; k<=j; k++){\r\n p.push(polygon[k]);\r\n }\r\n\r\n // Insert vertices i to end\r\n for(var k=i; k 0){\r\n return polygonSlice(polygon, edges);\r\n } else {\r\n return [polygon];\r\n }\r\n}\r\n\r\n/**\r\n * Slices the polygon given one or more cut edges. If given one, this function will return two polygons (false on failure). If many, an array of polygons.\r\n * @method slice\r\n * @param {Array} cutEdges A list of edges, as returned by .getCutEdges()\r\n * @return {Array}\r\n */\r\nfunction polygonSlice(polygon, cutEdges){\r\n if(cutEdges.length === 0){\r\n\t\treturn [polygon];\r\n }\r\n if(cutEdges instanceof Array && cutEdges.length && cutEdges[0] instanceof Array && cutEdges[0].length===2 && cutEdges[0][0] instanceof Array){\r\n\r\n var polys = [polygon];\r\n\r\n for(var i=0; i maxlevel){\r\n console.warn("quickDecomp: max level ("+maxlevel+") reached.");\r\n return result;\r\n }\r\n\r\n for (var i = 0; i < polygon.length; ++i) {\r\n if (polygonIsReflex(poly, i)) {\r\n reflexVertices.push(poly[i]);\r\n upperDist = lowerDist = Number.MAX_VALUE;\r\n\r\n\r\n for (var j = 0; j < polygon.length; ++j) {\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) && isRightOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j - 1))) { // if line intersects with an edge\r\n p = getIntersectionPoint(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j - 1)); // find the point of intersection\r\n if (isRight(polygonAt(poly, i + 1), polygonAt(poly, i), p)) { // make sure it\'s inside the poly\r\n d = sqdist(poly[i], p);\r\n if (d < lowerDist) { // keep only the closest intersection\r\n lowerDist = d;\r\n lowerInt = p;\r\n lowerIndex = j;\r\n }\r\n }\r\n }\r\n if (isLeft(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j + 1)) && isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))) {\r\n p = getIntersectionPoint(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j), polygonAt(poly, j + 1));\r\n if (isLeft(polygonAt(poly, i - 1), polygonAt(poly, i), p)) {\r\n d = sqdist(poly[i], p);\r\n if (d < upperDist) {\r\n upperDist = d;\r\n upperInt = p;\r\n upperIndex = j;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // if there are no vertices to connect to, choose a point in the middle\r\n if (lowerIndex === (upperIndex + 1) % polygon.length) {\r\n //console.log("Case 1: Vertex("+i+"), lowerIndex("+lowerIndex+"), upperIndex("+upperIndex+"), poly.size("+polygon.length+")");\r\n p[0] = (lowerInt[0] + upperInt[0]) / 2;\r\n p[1] = (lowerInt[1] + upperInt[1]) / 2;\r\n steinerPoints.push(p);\r\n\r\n if (i < upperIndex) {\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly, i, upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n if (lowerIndex !== 0){\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.end());\r\n polygonAppend(upperPoly, poly,lowerIndex,poly.length);\r\n }\r\n //upperPoly.insert(upperPoly.end(), poly.begin(), poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin() + i, poly.end());\r\n polygonAppend(lowerPoly, poly,i,poly.length);\r\n }\r\n //lowerPoly.insert(lowerPoly.end(), poly.begin(), poly.begin() + upperIndex + 1);\r\n polygonAppend(lowerPoly, poly,0,upperIndex+1);\r\n lowerPoly.push(p);\r\n upperPoly.push(p);\r\n //upperPoly.insert(upperPoly.end(), poly.begin() + lowerIndex, poly.begin() + i + 1);\r\n polygonAppend(upperPoly, poly,lowerIndex,i+1);\r\n }\r\n } else {\r\n // connect to the closest point within the triangle\r\n //console.log("Case 2: Vertex("+i+"), closestIndex("+closestIndex+"), poly.size("+polygon.length+")\\n");\r\n\r\n if (lowerIndex > upperIndex) {\r\n upperIndex += polygon.length;\r\n }\r\n closestDist = Number.MAX_VALUE;\r\n\r\n if(upperIndex < lowerIndex){\r\n return result;\r\n }\r\n\r\n for (var j = lowerIndex; j <= upperIndex; ++j) {\r\n if (\r\n isLeftOn(polygonAt(poly, i - 1), polygonAt(poly, i), polygonAt(poly, j)) &&\r\n isRightOn(polygonAt(poly, i + 1), polygonAt(poly, i), polygonAt(poly, j))\r\n ) {\r\n d = sqdist(polygonAt(poly, i), polygonAt(poly, j));\r\n if (d < closestDist && polygonCanSee2(poly, i, j)) {\r\n closestDist = d;\r\n closestIndex = j % polygon.length;\r\n }\r\n }\r\n }\r\n\r\n if (i < closestIndex) {\r\n polygonAppend(lowerPoly, poly,i,closestIndex+1);\r\n if (closestIndex !== 0){\r\n polygonAppend(upperPoly, poly,closestIndex,v.length);\r\n }\r\n polygonAppend(upperPoly, poly,0,i+1);\r\n } else {\r\n if (i !== 0){\r\n polygonAppend(lowerPoly, poly,i,v.length);\r\n }\r\n polygonAppend(lowerPoly, poly,0,closestIndex+1);\r\n polygonAppend(upperPoly, poly,closestIndex,i+1);\r\n }\r\n }\r\n\r\n // solve smallest poly first\r\n if (lowerPoly.length < upperPoly.length) {\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n } else {\r\n polygonQuickDecomp(upperPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n polygonQuickDecomp(lowerPoly,result,reflexVertices,steinerPoints,delta,maxlevel,level);\r\n }\r\n\r\n return result;\r\n }\r\n }\r\n result.push(polygon);\r\n\r\n return result;\r\n}\r\n\r\n/**\r\n * Remove collinear points in the polygon.\r\n * @method removeCollinearPoints\r\n * @param {Number} [precision] The threshold angle to use when determining whether two edges are collinear. Use zero for finest precision.\r\n * @return {Number} The number of points removed\r\n */\r\nfunction polygonRemoveCollinearPoints(polygon, precision){\r\n var num = 0;\r\n for(var i=polygon.length-1; polygon.length>3 && i>=0; --i){\r\n if(collinear(polygonAt(polygon, i-1),polygonAt(polygon, i),polygonAt(polygon, i+1),precision)){\r\n // Remove the middle point\r\n polygon.splice(i%polygon.length,1);\r\n num++;\r\n }\r\n }\r\n return num;\r\n}\r\n\r\n/**\r\n * Remove duplicate points in the polygon.\r\n * @method removeDuplicatePoints\r\n * @param {Number} [precision] The threshold to use when determining whether two points are the same. Use zero for best precision.\r\n */\r\nfunction polygonRemoveDuplicatePoints(polygon, precision){\r\n for(var i=polygon.length-1; i>=1; --i){\r\n var pi = polygon[i];\r\n for(var j=i-1; j>=0; --j){\r\n if(points_eq(pi, polygon[j], precision)){\r\n polygon.splice(i,1);\r\n continue;\r\n }\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Check if two scalars are equal\r\n * @static\r\n * @method eq\r\n * @param {Number} a\r\n * @param {Number} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction scalar_eq(a,b,precision){\r\n precision = precision || 0;\r\n return Math.abs(a-b) <= precision;\r\n}\r\n\r\n/**\r\n * Check if two points are equal\r\n * @static\r\n * @method points_eq\r\n * @param {Array} a\r\n * @param {Array} b\r\n * @param {Number} [precision]\r\n * @return {Boolean}\r\n */\r\nfunction points_eq(a,b,precision){\r\n return scalar_eq(a[0],b[0],precision) && scalar_eq(a[1],b[1],precision);\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js?')},"./node_modules/phaser/src/plugins/BasePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Global Plugin is installed just once into the Game owned Plugin Manager.\r\n * It can listen for Game events and respond to them.\r\n *\r\n * @class BasePlugin\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar BasePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function BasePlugin (pluginManager)\r\n {\r\n /**\r\n * A handy reference to the Plugin Manager that is responsible for this plugin.\r\n * Can be used as a route to gain access to game systems and events.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#pluginManager\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.pluginManager = pluginManager;\r\n\r\n /**\r\n * A reference to the Game instance this plugin is running under.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#game\r\n * @type {Phaser.Game}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.game = pluginManager.game;\r\n\r\n /**\r\n * A reference to the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#scene\r\n * @type {?Phaser.Scene}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A reference to the Scene Systems of the Scene that has installed this plugin.\r\n * Only set if it's a Scene Plugin, otherwise `null`.\r\n * This property is only set when the plugin is instantiated and added to the Scene, not before.\r\n * You cannot use it during the `init` method, but you can during the `boot` method.\r\n *\r\n * @name Phaser.Plugins.BasePlugin#systems\r\n * @type {?Phaser.Scenes.Systems}\r\n * @protected\r\n * @since 3.8.0\r\n */\r\n this.systems;\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is first instantiated.\r\n * It will never be called again on this instance.\r\n * In here you can set-up whatever you need for this plugin to run.\r\n * If a plugin is set to automatically start then `BasePlugin.start` will be called immediately after this.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#init\r\n * @since 3.8.0\r\n *\r\n * @param {?any} [data] - A value specified by the user, if any, from the `data` property of the plugin's configuration object (if started at game boot) or passed in the PluginManager's `install` method (if started manually).\r\n */\r\n init: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is started.\r\n * If a plugin is stopped, and then started again, this will get called again.\r\n * Typically called immediately after `BasePlugin.init`.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#start\r\n * @since 3.8.0\r\n */\r\n start: function ()\r\n {\r\n // Here are the game-level events you can listen to.\r\n // At the very least you should offer a destroy handler for when the game closes down.\r\n\r\n // var eventEmitter = this.game.events;\r\n\r\n // eventEmitter.once('destroy', this.gameDestroy, this);\r\n // eventEmitter.on('pause', this.gamePause, this);\r\n // eventEmitter.on('resume', this.gameResume, this);\r\n // eventEmitter.on('resize', this.gameResize, this);\r\n // eventEmitter.on('prestep', this.gamePreStep, this);\r\n // eventEmitter.on('step', this.gameStep, this);\r\n // eventEmitter.on('poststep', this.gamePostStep, this);\r\n // eventEmitter.on('prerender', this.gamePreRender, this);\r\n // eventEmitter.on('postrender', this.gamePostRender, this);\r\n },\r\n\r\n /**\r\n * Called by the PluginManager when this plugin is stopped.\r\n * The game code has requested that your plugin stop doing whatever it does.\r\n * It is now considered as 'inactive' by the PluginManager.\r\n * Handle that process here (i.e. stop listening for events, etc)\r\n * If the plugin is started again then `BasePlugin.start` will be called again.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#stop\r\n * @since 3.8.0\r\n */\r\n stop: function ()\r\n {\r\n },\r\n\r\n /**\r\n * If this is a Scene Plugin (i.e. installed into a Scene) then this method is called when the Scene boots.\r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n // Here are the Scene events you can listen to.\r\n // At the very least you should offer a destroy handler for when the Scene closes down.\r\n\r\n // var eventEmitter = this.systems.events;\r\n\r\n // eventEmitter.once('destroy', this.sceneDestroy, this);\r\n // eventEmitter.on('start', this.sceneStart, this);\r\n // eventEmitter.on('preupdate', this.scenePreUpdate, this);\r\n // eventEmitter.on('update', this.sceneUpdate, this);\r\n // eventEmitter.on('postupdate', this.scenePostUpdate, this);\r\n // eventEmitter.on('pause', this.scenePause, this);\r\n // eventEmitter.on('resume', this.sceneResume, this);\r\n // eventEmitter.on('sleep', this.sceneSleep, this);\r\n // eventEmitter.on('wake', this.sceneWake, this);\r\n // eventEmitter.on('shutdown', this.sceneShutdown, this);\r\n // eventEmitter.on('destroy', this.sceneDestroy, this);\r\n },\r\n\r\n /**\r\n * Game instance has been destroyed.\r\n * You must release everything in here, all references, all objects, free it all up.\r\n *\r\n * @method Phaser.Plugins.BasePlugin#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n this.pluginManager = null;\r\n this.game = null;\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BasePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/BasePlugin.js?")},"./node_modules/phaser/src/plugins/DefaultPlugins.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Plugins.DefaultPlugins\r\n * \r\n * @property {array} Global - These are the Global Managers that are created by the Phaser.Game instance.\r\n * @property {array} CoreScene - These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * @property {array} DefaultScene - These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n */\r\n\r\nvar DefaultPlugins = {\r\n\r\n /**\r\n * These are the Global Managers that are created by the Phaser.Game instance.\r\n * They are referenced from Scene.Systems so that plugins can use them.\r\n * \r\n * @name Phaser.Plugins.Global\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n Global: [\r\n\r\n 'game',\r\n 'anims',\r\n 'cache',\r\n 'plugins',\r\n 'registry',\r\n 'scale',\r\n 'sound',\r\n 'textures'\r\n\r\n ],\r\n\r\n /**\r\n * These are the core plugins that are installed into every Scene.Systems instance, no matter what.\r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are created in the order in which they appear in this array and EventEmitter is always first.\r\n * \r\n * @name Phaser.Plugins.CoreScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n CoreScene: [\r\n\r\n 'EventEmitter',\r\n\r\n 'CameraManager',\r\n 'GameObjectCreator',\r\n 'GameObjectFactory',\r\n 'ScenePlugin',\r\n 'DisplayList',\r\n 'UpdateList'\r\n\r\n ],\r\n\r\n /**\r\n * These plugins are created in Scene.Systems in addition to the CoreScenePlugins.\r\n * \r\n * You can elect not to have these plugins by either creating a DefaultPlugins object as part\r\n * of the Game Config, by creating a Plugins object as part of a Scene Config, or by modifying this array\r\n * and building your own bundle.\r\n * \r\n * They are optionally exposed in the Scene as well (see the InjectionMap for details)\r\n * \r\n * They are always created in the order in which they appear in the array.\r\n * \r\n * @name Phaser.Plugins.DefaultScene\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n DefaultScene: [\r\n\r\n 'Clock',\r\n 'DataManagerPlugin',\r\n 'InputPlugin',\r\n 'Loader',\r\n 'TweenManager',\r\n 'LightsPlugin'\r\n\r\n ]\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n DefaultPlugins.DefaultScene.push('CameraManager3D');\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n DefaultPlugins.Global.push('facebook');\r\n}\r\n\r\nmodule.exports = DefaultPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/DefaultPlugins.js?")},"./node_modules/phaser/src/plugins/PluginCache.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Contains the plugins that Phaser uses globally and locally.\r\n// These are the source objects, not instantiated.\r\nvar corePlugins = {};\r\n\r\n// Contains the plugins that the dev has loaded into their game\r\n// These are the source objects, not instantiated.\r\nvar customPlugins = {};\r\n\r\nvar PluginCache = {};\r\n\r\n/**\r\n * @namespace Phaser.Plugins.PluginCache\r\n */\r\n\r\n/**\r\n * Static method called directly by the Core internal Plugins.\r\n * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)\r\n * Plugin is the object to instantiate to create the plugin\r\n * Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)\r\n *\r\n * @method Phaser.Plugins.PluginCache.register\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin?\r\n */\r\nPluginCache.register = function (key, plugin, mapping, custom)\r\n{\r\n if (custom === undefined) { custom = false; }\r\n\r\n corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom };\r\n};\r\n\r\n/**\r\n * Stores a custom plugin in the global plugin cache.\r\n * The key must be unique, within the scope of the cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.registerCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - A reference used to get this plugin from the plugin cache.\r\n * @param {function} plugin - The plugin to be stored. Should be the core object, not instantiated.\r\n * @param {string} mapping - If this plugin is to be injected into the Scene Systems, this is the property key map used.\r\n * @param {?any} data - A value to be passed to the plugin's `init` method.\r\n */\r\nPluginCache.registerCustom = function (key, plugin, mapping, data)\r\n{\r\n customPlugins[key] = { plugin: plugin, mapping: mapping, data: data };\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the core plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`.\r\n */\r\nPluginCache.hasCore = function (key)\r\n{\r\n return corePlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Checks if the given key is already being used in the custom plugin cache.\r\n *\r\n * @method Phaser.Plugins.PluginCache.hasCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key to check for.\r\n *\r\n * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`.\r\n */\r\nPluginCache.hasCustom = function (key)\r\n{\r\n return customPlugins.hasOwnProperty(key);\r\n};\r\n\r\n/**\r\n * Returns the core plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCore\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object.\r\n */\r\nPluginCache.getCore = function (key)\r\n{\r\n return corePlugins[key];\r\n};\r\n\r\n/**\r\n * Returns the custom plugin object from the cache based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object.\r\n */\r\nPluginCache.getCustom = function (key)\r\n{\r\n return customPlugins[key];\r\n};\r\n\r\n/**\r\n * Returns an object from the custom cache based on the given key that can be instantiated.\r\n *\r\n * @method Phaser.Plugins.PluginCache.getCustomClass\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to get.\r\n *\r\n * @return {function} The custom plugin object.\r\n */\r\nPluginCache.getCustomClass = function (key)\r\n{\r\n return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null;\r\n};\r\n\r\n/**\r\n * Removes a core plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.remove\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the core plugin to remove.\r\n */\r\nPluginCache.remove = function (key)\r\n{\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes a custom plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginCache.removeCustom\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The key of the custom plugin to remove.\r\n */\r\nPluginCache.removeCustom = function (key)\r\n{\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Core Plugins.\r\n * \r\n * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin.\r\n * So be sure you only call this if you do not wish to run Phaser again.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCorePlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCorePlugins = function ()\r\n{\r\n for (var key in corePlugins)\r\n {\r\n if (corePlugins.hasOwnProperty(key))\r\n {\r\n delete corePlugins[key];\r\n }\r\n }\r\n};\r\n\r\n/**\r\n * Removes all Custom Plugins.\r\n *\r\n * @method Phaser.Plugins.PluginCache.destroyCustomPlugins\r\n * @since 3.12.0\r\n */\r\nPluginCache.destroyCustomPlugins = function ()\r\n{\r\n for (var key in customPlugins)\r\n {\r\n if (customPlugins.hasOwnProperty(key))\r\n {\r\n delete customPlugins[key];\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = PluginCache;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginCache.js?")},"./node_modules/phaser/src/plugins/PluginManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar FileTypesManager = __webpack_require__(/*! ../loader/FileTypesManager */ \"./node_modules/phaser/src/loader/FileTypesManager.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ./PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar Remove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The PluginManager is responsible for installing and adding plugins to Phaser.\r\n *\r\n * It is a global system and therefore belongs to the Game instance, not a specific Scene.\r\n *\r\n * It works in conjunction with the PluginCache. Core internal plugins automatically register themselves \r\n * with the Cache, but it's the Plugin Manager that is responsible for injecting them into the Scenes.\r\n *\r\n * There are two types of plugin:\r\n *\r\n * 1. A Global Plugin\r\n * 2. A Scene Plugin\r\n *\r\n * A Global Plugin is a plugin that lives within the Plugin Manager rather than a Scene. You can get\r\n * access to it by calling `PluginManager.get` and providing a key. Any Scene that requests a plugin in\r\n * this way will all get access to the same plugin instance, allowing you to use a single plugin across\r\n * multiple Scenes.\r\n *\r\n * A Scene Plugin is a plugin dedicated to running within a Scene. These are different to Global Plugins\r\n * in that their instances do not live within the Plugin Manager, but within the Scene Systems class instead.\r\n * And that every Scene created is given its own unique instance of a Scene Plugin. Examples of core Scene\r\n * Plugins include the Input Plugin, the Tween Plugin and the physics Plugins.\r\n *\r\n * You can add a plugin to Phaser in three different ways:\r\n *\r\n * 1. Preload it\r\n * 2. Include it in your source code and install it via the Game Config\r\n * 3. Include it in your source code and install it within a Scene\r\n *\r\n * For examples of all of these approaches please see the Phaser 3 Examples Repo `plugins` folder.\r\n *\r\n * For information on creating your own plugin please see the Phaser 3 Plugin Template.\r\n *\r\n * @class PluginManager\r\n * @memberof Phaser.Plugins\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The game instance that owns this Plugin Manager.\r\n */\r\nvar PluginManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function PluginManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The game instance that owns this Plugin Manager.\r\n *\r\n * @name Phaser.Plugins.PluginManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The global plugins currently running and managed by this Plugin Manager.\r\n * A plugin must have been started at least once in order to appear in this list.\r\n *\r\n * @name Phaser.Plugins.PluginManager#plugins\r\n * @type {Phaser.Types.Plugins.GlobalPlugin[]}\r\n * @since 3.8.0\r\n */\r\n this.plugins = [];\r\n\r\n /**\r\n * A list of plugin keys that should be installed into Scenes as well as the Core Plugins.\r\n *\r\n * @name Phaser.Plugins.PluginManager#scenePlugins\r\n * @type {string[]}\r\n * @since 3.8.0\r\n */\r\n this.scenePlugins = [];\r\n\r\n /**\r\n * A temporary list of plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingGlobal\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingGlobal = [];\r\n\r\n /**\r\n * A temporary list of scene plugins to install when the game has booted.\r\n *\r\n * @name Phaser.Plugins.PluginManager#_pendingScene\r\n * @private\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this._pendingScene = [];\r\n\r\n if (game.isBooted)\r\n {\r\n this.boot();\r\n }\r\n else\r\n {\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n }\r\n },\r\n\r\n /**\r\n * Run once the game has booted and installs all of the plugins configured in the Game Config.\r\n *\r\n * @method Phaser.Plugins.PluginManager#boot\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n var i;\r\n var entry;\r\n var key;\r\n var plugin;\r\n var start;\r\n var mapping;\r\n var data;\r\n var config = this.game.config;\r\n\r\n // Any plugins to install?\r\n var list = config.installGlobalPlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingGlobal);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'TestPlugin', plugin: TestPlugin, start: true, mapping: 'test', data: { msg: 'The plugin is alive' } }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n start = GetFastValue(entry, 'start', false);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n data = GetFastValue(entry, 'data', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.install(key, plugin, start, mapping, data);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n \r\n }\r\n }\r\n\r\n // Any scene plugins to install?\r\n list = config.installScenePlugins;\r\n\r\n // Any plugins added outside of the game config, but before the game booted?\r\n list = list.concat(this._pendingScene);\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n entry = list[i];\r\n\r\n // { key: 'moveSpritePlugin', plugin: MoveSpritePlugin, , mapping: 'move' }\r\n\r\n key = GetFastValue(entry, 'key', null);\r\n plugin = GetFastValue(entry, 'plugin', null);\r\n mapping = GetFastValue(entry, 'mapping', null);\r\n\r\n if (key)\r\n {\r\n if (plugin)\r\n {\r\n this.installScenePlugin(key, plugin, mapping);\r\n }\r\n else\r\n {\r\n console.warn('Missing `plugin` for key: ' + key);\r\n }\r\n }\r\n }\r\n\r\n this._pendingGlobal = [];\r\n this._pendingScene = [];\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Tells the plugin manager to install all Scene plugins into it.\r\n *\r\n * First it will install global references, i.e. references from the Game systems into the Scene Systems (and Scene if mapped.)\r\n * Then it will install Core Scene Plugins followed by Scene Plugins registered with the PluginManager.\r\n * Finally it will install any references to Global Plugins that have a Scene mapping property into the Scene itself.\r\n *\r\n * @method Phaser.Plugins.PluginManager#addToScene\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems class to install all the plugins in to.\r\n * @param {array} globalPlugins - An array of global plugins to install.\r\n * @param {array} scenePlugins - An array of scene plugins to install.\r\n */\r\n addToScene: function (sys, globalPlugins, scenePlugins)\r\n {\r\n var i;\r\n var pluginKey;\r\n var pluginList;\r\n var game = this.game;\r\n var scene = sys.scene;\r\n var map = sys.settings.map;\r\n var isBooted = sys.settings.isBooted;\r\n\r\n // Reference the GlobalPlugins from Game into Scene.Systems\r\n for (i = 0; i < globalPlugins.length; i++)\r\n {\r\n pluginKey = globalPlugins[i];\r\n\r\n if (game[pluginKey])\r\n {\r\n sys[pluginKey] = game[pluginKey];\r\n\r\n // Scene level injection\r\n if (map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = sys[pluginKey];\r\n }\r\n }\r\n else if (pluginKey === 'game' && map.hasOwnProperty(pluginKey))\r\n {\r\n scene[map[pluginKey]] = game;\r\n }\r\n }\r\n\r\n for (var s = 0; s < scenePlugins.length; s++)\r\n {\r\n pluginList = scenePlugins[s];\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n pluginKey = pluginList[i];\r\n\r\n if (!PluginCache.hasCore(pluginKey))\r\n {\r\n continue;\r\n }\r\n\r\n var source = PluginCache.getCore(pluginKey);\r\n\r\n var plugin = new source.plugin(scene, this);\r\n \r\n sys[source.mapping] = plugin;\r\n\r\n // Scene level injection\r\n if (source.custom)\r\n {\r\n scene[source.mapping] = plugin;\r\n }\r\n else if (map.hasOwnProperty(source.mapping))\r\n {\r\n scene[map[source.mapping]] = plugin;\r\n }\r\n\r\n // Scene is already booted, usually because this method is being called at run-time, so boot the plugin\r\n if (isBooted)\r\n {\r\n plugin.boot();\r\n }\r\n }\r\n }\r\n\r\n // And finally, inject any 'global scene plugins'\r\n pluginList = this.plugins;\r\n\r\n for (i = 0; i < pluginList.length; i++)\r\n {\r\n var entry = pluginList[i];\r\n\r\n if (entry.mapping)\r\n {\r\n scene[entry.mapping] = entry.plugin;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Called by the Scene Systems class. Returns a list of plugins to be installed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getDefaultScenePlugins\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @return {string[]} A list keys of all the Scene Plugins to install.\r\n */\r\n getDefaultScenePlugins: function ()\r\n {\r\n var list = this.game.config.defaultPlugins;\r\n\r\n // Merge in custom Scene plugins\r\n list = list.concat(this.scenePlugins);\r\n\r\n return list;\r\n },\r\n\r\n /**\r\n * Installs a new Scene Plugin into the Plugin Manager and optionally adds it\r\n * to the given Scene as well. A Scene Plugin added to the manager in this way\r\n * will be automatically installed into all new Scenes using the key and mapping given.\r\n *\r\n * The `key` property is what the plugin is injected into Scene.Systems as.\r\n * The `mapping` property is optional, and if specified is what the plugin is installed into\r\n * the Scene as. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.installScenePlugin('powerupsPlugin', pluginCode, 'powerups');\r\n * \r\n * // and from within the scene:\r\n * this.sys.powerupsPlugin; // key value\r\n * this.powerups; // mapping value\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * @method Phaser.Plugins.PluginManager#installScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The property key that will be used to add this plugin to Scene.Systems.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {Phaser.Scene} [addToScene] - Optionally automatically add this plugin to the given Scene.\r\n * @param {boolean} [fromLoader=false] - Is this being called by the Loader?\r\n */\r\n installScenePlugin: function (key, plugin, mapping, addToScene, fromLoader)\r\n {\r\n if (fromLoader === undefined) { fromLoader = false; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Scene Plugin: ' + key);\r\n return;\r\n }\r\n\r\n if (!PluginCache.hasCore(key))\r\n {\r\n // Plugin is freshly loaded\r\n PluginCache.register(key, plugin, mapping, true);\r\n\r\n this.scenePlugins.push(key);\r\n }\r\n else if (!fromLoader && PluginCache.hasCore(key))\r\n {\r\n // Plugin wasn't from the loader but already exists\r\n console.warn('Scene Plugin key in use: ' + key);\r\n return;\r\n }\r\n\r\n if (addToScene)\r\n {\r\n var instance = new plugin(addToScene, this);\r\n\r\n addToScene.sys[key] = instance;\r\n\r\n if (mapping && mapping !== '')\r\n {\r\n addToScene[mapping] = instance;\r\n }\r\n\r\n instance.boot();\r\n }\r\n },\r\n\r\n /**\r\n * Installs a new Global Plugin into the Plugin Manager and optionally starts it running.\r\n * A global plugin belongs to the Plugin Manager, rather than a specific Scene, and can be accessed\r\n * and used by all Scenes in your game.\r\n *\r\n * The `key` property is what you use to access this plugin from the Plugin Manager.\r\n *\r\n * ```javascript\r\n * this.plugins.install('powerupsPlugin', pluginCode);\r\n * \r\n * // and from within the scene:\r\n * this.plugins.get('powerupsPlugin');\r\n * ```\r\n *\r\n * This method is called automatically by Phaser if you install your plugins using either the\r\n * Game Configuration object, or by preloading them via the Loader.\r\n *\r\n * The same plugin can be installed multiple times into the Plugin Manager by simply giving each\r\n * instance its own unique key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#install\r\n * @since 3.8.0\r\n * \r\n * @param {string} key - The unique handle given to this plugin within the Plugin Manager.\r\n * @param {function} plugin - The plugin code. This should be the non-instantiated version.\r\n * @param {boolean} [start=false] - Automatically start the plugin running? This is always `true` if you provide a mapping value.\r\n * @param {string} [mapping] - If this plugin is injected into the Phaser.Scene class, this is the property key to use.\r\n * @param {any} [data] - A value passed to the plugin's `init` method.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if `start` was false, or game isn't yet booted.\r\n */\r\n install: function (key, plugin, start, mapping, data)\r\n {\r\n if (start === undefined) { start = false; }\r\n if (mapping === undefined) { mapping = null; }\r\n if (data === undefined) { data = null; }\r\n\r\n if (typeof plugin !== 'function')\r\n {\r\n console.warn('Invalid Plugin: ' + key);\r\n return null;\r\n }\r\n\r\n if (PluginCache.hasCustom(key))\r\n {\r\n console.warn('Plugin key in use: ' + key);\r\n return null;\r\n }\r\n\r\n if (mapping !== null)\r\n {\r\n start = true;\r\n }\r\n\r\n if (!this.game.isBooted)\r\n {\r\n this._pendingGlobal.push({ key: key, plugin: plugin, start: start, mapping: mapping, data: data });\r\n }\r\n else\r\n {\r\n // Add it to the plugin store\r\n PluginCache.registerCustom(key, plugin, mapping, data);\r\n\r\n if (start)\r\n {\r\n return this.start(key);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets an index of a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getIndex\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {integer} The index of the plugin within the plugins array.\r\n */\r\n getIndex: function (key)\r\n {\r\n var list = this.plugins;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n var entry = list[i];\r\n\r\n if (entry.key === key)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Gets a global plugin based on the given key.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getEntry\r\n * @protected\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {Phaser.Types.Plugins.GlobalPlugin} The plugin entry.\r\n */\r\n getEntry: function (key)\r\n {\r\n var idx = this.getIndex(key);\r\n\r\n if (idx !== -1)\r\n {\r\n return this.plugins[idx];\r\n }\r\n },\r\n\r\n /**\r\n * Checks if the given global plugin, based on its key, is active or not.\r\n *\r\n * @method Phaser.Plugins.PluginManager#isActive\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The unique plugin key.\r\n *\r\n * @return {boolean} `true` if the plugin is active, otherwise `false`.\r\n */\r\n isActive: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n return (entry && entry.active);\r\n },\r\n\r\n /**\r\n * Starts a global plugin running.\r\n *\r\n * If the plugin was previously active then calling `start` will reset it to an active state and then\r\n * call its `start` method.\r\n *\r\n * If the plugin has never been run before a new instance of it will be created within the Plugin Manager,\r\n * its active state set and then both of its `init` and `start` methods called, in that order.\r\n *\r\n * If the plugin is already running under the given key then nothing happens.\r\n *\r\n * @method Phaser.Plugins.PluginManager#start\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to start.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given or plugin is already stopped.\r\n */\r\n start: function (key, runAs)\r\n {\r\n if (runAs === undefined) { runAs = key; }\r\n\r\n var entry = this.getEntry(runAs);\r\n\r\n // Plugin already running under this key?\r\n if (entry && !entry.active)\r\n {\r\n // It exists, we just need to start it up again\r\n entry.active = true;\r\n entry.plugin.start();\r\n }\r\n else if (!entry)\r\n {\r\n entry = this.createEntry(key, runAs);\r\n }\r\n\r\n return (entry) ? entry.plugin : null;\r\n },\r\n\r\n /**\r\n * Creates a new instance of a global plugin, adds an entry into the plugins array and returns it.\r\n *\r\n * @method Phaser.Plugins.PluginManager#createEntry\r\n * @private\r\n * @since 3.9.0\r\n *\r\n * @param {string} key - The key of the plugin to create an instance of.\r\n * @param {string} [runAs] - Run the plugin under a new key. This allows you to run one plugin multiple times.\r\n *\r\n * @return {?Phaser.Plugins.BasePlugin} The plugin that was started, or `null` if invalid key given.\r\n */\r\n createEntry: function (key, runAs)\r\n {\r\n var entry = PluginCache.getCustom(key);\r\n\r\n if (entry)\r\n {\r\n var instance = new entry.plugin(this);\r\n\r\n entry = {\r\n key: runAs,\r\n plugin: instance,\r\n active: true,\r\n mapping: entry.mapping,\r\n data: entry.data\r\n };\r\n\r\n this.plugins.push(entry);\r\n\r\n instance.init(entry.data);\r\n instance.start();\r\n }\r\n\r\n return entry;\r\n },\r\n\r\n /**\r\n * Stops a global plugin from running.\r\n *\r\n * If the plugin is active then its active state will be set to false and the plugins `stop` method\r\n * will be called.\r\n *\r\n * If the plugin is not already running, nothing will happen.\r\n *\r\n * @method Phaser.Plugins.PluginManager#stop\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to stop.\r\n *\r\n * @return {Phaser.Plugins.PluginManager} The Plugin Manager.\r\n */\r\n stop: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry && entry.active)\r\n {\r\n entry.active = false;\r\n entry.plugin.stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a global plugin from the Plugin Manager based on the given key and returns it.\r\n *\r\n * If it cannot find an active plugin based on the key, but there is one in the Plugin Cache with the same key,\r\n * then it will create a new instance of the cached plugin and return that.\r\n *\r\n * @method Phaser.Plugins.PluginManager#get\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n * @param {boolean} [autoStart=true] - Automatically start a new instance of the plugin if found in the cache, but not actively running.\r\n *\r\n * @return {?(Phaser.Plugins.BasePlugin|function)} The plugin, or `null` if no plugin was found matching the key.\r\n */\r\n get: function (key, autoStart)\r\n {\r\n if (autoStart === undefined) { autoStart = true; }\r\n\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n return entry.plugin;\r\n }\r\n else\r\n {\r\n var plugin = this.getClass(key);\r\n\r\n if (plugin && autoStart)\r\n {\r\n entry = this.createEntry(key, key);\r\n\r\n return (entry) ? entry.plugin : null;\r\n }\r\n else if (plugin)\r\n {\r\n return plugin;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Returns the plugin class from the cache.\r\n * Used internally by the Plugin Manager.\r\n *\r\n * @method Phaser.Plugins.PluginManager#getClass\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to get.\r\n *\r\n * @return {Phaser.Plugins.BasePlugin} A Plugin object\r\n */\r\n getClass: function (key)\r\n {\r\n return PluginCache.getCustomClass(key);\r\n },\r\n\r\n /**\r\n * Removes a global plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGlobalPlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeGlobalPlugin: function (key)\r\n {\r\n var entry = this.getEntry(key);\r\n\r\n if (entry)\r\n {\r\n Remove(this.plugins, entry);\r\n }\r\n\r\n PluginCache.removeCustom(key);\r\n },\r\n\r\n /**\r\n * Removes a scene plugin from the Plugin Manager and Plugin Cache.\r\n *\r\n * This will not remove the plugin from any active Scenes that are already using it.\r\n *\r\n * It is up to you to remove all references to this plugin that you may hold within your game code.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeScenePlugin\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the plugin to remove.\r\n */\r\n removeScenePlugin: function (key)\r\n {\r\n Remove(this.scenePlugins, key);\r\n\r\n PluginCache.remove(key);\r\n },\r\n\r\n /**\r\n * Registers a new type of Game Object with the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new Game Objects.\r\n *\r\n * The key is the property that will be injected into the factories and used to create the\r\n * Game Object. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerGameObject('clown', clownFactoryCallback, clownCreatorCallback);\r\n * // later in your game code:\r\n * this.add.clown();\r\n * this.make.clown();\r\n * ```\r\n * \r\n * The callbacks are what are called when the factories try to create a Game Object\r\n * matching the given key. It's important to understand that the callbacks are invoked within\r\n * the context of the GameObjectFactory. In this context there are several properties available\r\n * to use:\r\n * \r\n * this.scene - A reference to the Scene that owns the GameObjectFactory.\r\n * this.displayList - A reference to the Display List the Scene owns.\r\n * this.updateList - A reference to the Update List the Scene owns.\r\n * \r\n * See the GameObjectFactory and GameObjectCreator classes for more details.\r\n * Any public property or method listed is available from your callbacks under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerGameObject\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} [factoryCallback] - The callback to invoke when the Game Object Factory is called.\r\n * @param {function} [creatorCallback] - The callback to invoke when the Game Object Creator is called.\r\n */\r\n registerGameObject: function (key, factoryCallback, creatorCallback)\r\n {\r\n if (factoryCallback)\r\n {\r\n GameObjectFactory.register(key, factoryCallback);\r\n }\r\n\r\n if (creatorCallback)\r\n {\r\n GameObjectCreator.register(key, creatorCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a previously registered Game Object from the global Game Object Factory and / or Creator.\r\n * This is usually called from within your Plugin destruction code to help clean-up after your plugin has been removed.\r\n *\r\n * @method Phaser.Plugins.PluginManager#removeGameObject\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The key of the Game Object to be removed from the factories.\r\n * @param {boolean} [removeFromFactory=true] - Should the Game Object be removed from the Game Object Factory?\r\n * @param {boolean} [removeFromCreator=true] - Should the Game Object be removed from the Game Object Creator?\r\n */\r\n removeGameObject: function (key, removeFromFactory, removeFromCreator)\r\n {\r\n if (removeFromFactory === undefined) { removeFromFactory = true; }\r\n if (removeFromCreator === undefined) { removeFromCreator = true; }\r\n\r\n if (removeFromFactory)\r\n {\r\n GameObjectFactory.remove(key);\r\n }\r\n\r\n if (removeFromCreator)\r\n {\r\n GameObjectCreator.remove(key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Registers a new file type with the global File Types Manager, making it available to all Loader\r\n * Plugins created after this.\r\n * \r\n * This is usually called from within your Plugin code and is a helpful short-cut for creating\r\n * new loader file types.\r\n *\r\n * The key is the property that will be injected into the Loader Plugin and used to load the\r\n * files. For example:\r\n *\r\n * ```javascript\r\n * this.plugins.registerFileType('wad', doomWadLoaderCallback);\r\n * // later in your preload code:\r\n * this.load.wad();\r\n * ```\r\n * \r\n * The callback is what is called when the loader tries to load a file matching the given key.\r\n * It's important to understand that the callback is invoked within\r\n * the context of the LoaderPlugin. In this context there are several properties / methods available\r\n * to use:\r\n * \r\n * this.addFile - A method to add the new file to the load queue.\r\n * this.scene - The Scene that owns the Loader Plugin instance.\r\n *\r\n * See the LoaderPlugin class for more details. Any public property or method listed is available from\r\n * your callback under `this`.\r\n *\r\n * @method Phaser.Plugins.PluginManager#registerFileType\r\n * @since 3.8.0\r\n *\r\n * @param {string} key - The key of the Game Object that the given callbacks will create, i.e. `image`, `sprite`.\r\n * @param {function} callback - The callback to invoke when the Game Object Factory is called.\r\n * @param {Phaser.Scene} [addToScene] - Optionally add this file type into the Loader Plugin owned by the given Scene.\r\n */\r\n registerFileType: function (key, callback, addToScene)\r\n {\r\n FileTypesManager.register(key, callback);\r\n\r\n if (addToScene && addToScene.sys.load)\r\n {\r\n addToScene.sys.load[key] = callback;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Plugin Manager and all associated plugins.\r\n * It will iterate all plugins found and call their `destroy` methods.\r\n * \r\n * The PluginCache will remove all custom plugins.\r\n *\r\n * @method Phaser.Plugins.PluginManager#destroy\r\n * @since 3.8.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.plugins.length; i++)\r\n {\r\n this.plugins[i].plugin.destroy();\r\n }\r\n\r\n PluginCache.destroyCustomPlugins();\r\n\r\n if (this.game.noReturn)\r\n {\r\n PluginCache.destroyCorePlugins();\r\n }\r\n\r\n this.game = null;\r\n this.plugins = [];\r\n this.scenePlugins = [];\r\n }\r\n\r\n});\r\n\r\n/*\r\n * \"Sometimes, the elegant implementation is just a function.\r\n * Not a method. Not a class. Not a framework. Just a function.\"\r\n * -- John Carmack\r\n */\r\n\r\nmodule.exports = PluginManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/PluginManager.js?")},"./node_modules/phaser/src/plugins/ScenePlugin.js":function(module,exports,__webpack_require__){eval('/**\r\n* @author Richard Davey \r\n* @copyright 2019 Photon Storm Ltd.\r\n* @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License}\r\n*/\r\n\r\nvar BasePlugin = __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ "./node_modules/phaser/src/scene/events/index.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Scene Level Plugin is installed into every Scene and belongs to that Scene.\r\n * It can listen for Scene events and respond to them.\r\n * It can map itself to a Scene property, or into the Scene Systems, or both.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Plugins\r\n * @extends Phaser.Plugins.BasePlugin\r\n * @constructor\r\n * @since 3.8.0\r\n *\r\n * @param {Phaser.Scene} scene - A reference to the Scene that has installed this plugin.\r\n * @param {Phaser.Plugins.PluginManager} pluginManager - A reference to the Plugin Manager.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n Extends: BasePlugin,\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene, pluginManager)\r\n {\r\n BasePlugin.call(this, pluginManager);\r\n\r\n this.scene = scene;\r\n this.systems = scene.sys;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * This method is called when the Scene boots. It is only ever called once.\r\n * \r\n * By this point the plugin properties `scene` and `systems` will have already been set.\r\n * \r\n * In here you can listen for Scene events and set-up whatever you need for this plugin to run.\r\n * Here are the Scene events you can listen to:\r\n * \r\n * start\r\n * ready\r\n * preupdate\r\n * update\r\n * postupdate\r\n * resize\r\n * pause\r\n * resume\r\n * sleep\r\n * wake\r\n * transitioninit\r\n * transitionstart\r\n * transitioncomplete\r\n * transitionout\r\n * shutdown\r\n * destroy\r\n * \r\n * At the very least you should offer a destroy handler for when the Scene closes down, i.e:\r\n *\r\n * ```javascript\r\n * var eventEmitter = this.systems.events;\r\n * eventEmitter.once(\'destroy\', this.sceneDestroy, this);\r\n * ```\r\n *\r\n * @method Phaser.Plugins.ScenePlugin#boot\r\n * @since 3.8.0\r\n */\r\n boot: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/ScenePlugin.js?')},"./node_modules/phaser/src/plugins/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Plugins\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BasePlugin: __webpack_require__(/*! ./BasePlugin */ "./node_modules/phaser/src/plugins/BasePlugin.js"),\r\n DefaultPlugins: __webpack_require__(/*! ./DefaultPlugins */ "./node_modules/phaser/src/plugins/DefaultPlugins.js"),\r\n PluginCache: __webpack_require__(/*! ./PluginCache */ "./node_modules/phaser/src/plugins/PluginCache.js"),\r\n PluginManager: __webpack_require__(/*! ./PluginManager */ "./node_modules/phaser/src/plugins/PluginManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/plugins/ScenePlugin.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/plugins/index.js?')},"./node_modules/phaser/src/polyfills/Array.forEach.js":function(module,exports){eval("/**\r\n* A polyfill for Array.forEach\r\n* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\r\n*/\r\nif (!Array.prototype.forEach)\r\n{\r\n Array.prototype.forEach = function (fun /*, thisArg */)\r\n {\r\n 'use strict';\r\n\r\n if (this === void 0 || this === null)\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var t = Object(this);\r\n var len = t.length >>> 0;\r\n\r\n if (typeof fun !== 'function')\r\n {\r\n throw new TypeError();\r\n }\r\n\r\n var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\r\n\r\n for (var i = 0; i < len; i++)\r\n {\r\n if (i in t)\r\n {\r\n fun.call(thisArg, t[i], i, t);\r\n }\r\n }\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.forEach.js?")},"./node_modules/phaser/src/polyfills/Array.isArray.js":function(module,exports){eval("/**\r\n* A polyfill for Array.isArray\r\n*/\r\nif (!Array.isArray)\r\n{\r\n Array.isArray = function (arg)\r\n {\r\n return Object.prototype.toString.call(arg) === '[object Array]';\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Array.isArray.js?")},"./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js":function(module,exports){eval("/* Copyright 2013 Chris Wilson\r\n\r\n Licensed under the Apache License, Version 2.0 (the \"License\");\r\n you may not use this file except in compliance with the License.\r\n You may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n Unless required by applicable law or agreed to in writing, software\r\n distributed under the License is distributed on an \"AS IS\" BASIS,\r\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n See the License for the specific language governing permissions and\r\n limitations under the License.\r\n*/\r\n\r\n/*\r\n\r\nThis monkeypatch library is intended to be included in projects that are\r\nwritten to the proper AudioContext spec (instead of webkitAudioContext),\r\nand that use the new naming and proper bits of the Web Audio API (e.g.\r\nusing BufferSourceNode.start() instead of BufferSourceNode.noteOn()), but may\r\nhave to run on systems that only support the deprecated bits.\r\n\r\nThis library should be harmless to include if the browser supports\r\nunprefixed \"AudioContext\", and/or if it supports the new names.\r\n\r\nThe patches this library handles:\r\nif window.AudioContext is unsupported, it will be aliased to webkitAudioContext().\r\nif AudioBufferSourceNode.start() is unimplemented, it will be routed to noteOn() or\r\nnoteGrainOn(), depending on parameters.\r\n\r\nThe following aliases only take effect if the new names are not already in place:\r\n\r\nAudioBufferSourceNode.stop() is aliased to noteOff()\r\nAudioContext.createGain() is aliased to createGainNode()\r\nAudioContext.createDelay() is aliased to createDelayNode()\r\nAudioContext.createScriptProcessor() is aliased to createJavaScriptNode()\r\nAudioContext.createPeriodicWave() is aliased to createWaveTable()\r\nOscillatorNode.start() is aliased to noteOn()\r\nOscillatorNode.stop() is aliased to noteOff()\r\nOscillatorNode.setPeriodicWave() is aliased to setWaveTable()\r\nAudioParam.setTargetAtTime() is aliased to setTargetValueAtTime()\r\n\r\nThis library does NOT patch the enumerated type changes, as it is\r\nrecommended in the specification that implementations support both integer\r\nand string types for AudioPannerNode.panningModel, AudioPannerNode.distanceModel\r\nBiquadFilterNode.type and OscillatorNode.type.\r\n\r\n*/\r\n\r\n(function () {\r\n\r\n function fixSetTarget(param) {\r\n if (!param)\t// if NYI, just return\r\n return;\r\n if (!param.setTargetAtTime)\r\n param.setTargetAtTime = param.setTargetValueAtTime;\r\n }\r\n\r\n if (window.hasOwnProperty('webkitAudioContext') &&\r\n !window.hasOwnProperty('AudioContext')) {\r\n window.AudioContext = webkitAudioContext;\r\n\r\n if (!AudioContext.prototype.hasOwnProperty('createGain'))\r\n AudioContext.prototype.createGain = AudioContext.prototype.createGainNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createDelay'))\r\n AudioContext.prototype.createDelay = AudioContext.prototype.createDelayNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createScriptProcessor'))\r\n AudioContext.prototype.createScriptProcessor = AudioContext.prototype.createJavaScriptNode;\r\n if (!AudioContext.prototype.hasOwnProperty('createPeriodicWave'))\r\n AudioContext.prototype.createPeriodicWave = AudioContext.prototype.createWaveTable;\r\n\r\n\r\n AudioContext.prototype.internal_createGain = AudioContext.prototype.createGain;\r\n AudioContext.prototype.createGain = function() {\r\n var node = this.internal_createGain();\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDelay = AudioContext.prototype.createDelay;\r\n AudioContext.prototype.createDelay = function(maxDelayTime) {\r\n var node = maxDelayTime ? this.internal_createDelay(maxDelayTime) : this.internal_createDelay();\r\n fixSetTarget(node.delayTime);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBufferSource = AudioContext.prototype.createBufferSource;\r\n AudioContext.prototype.createBufferSource = function() {\r\n var node = this.internal_createBufferSource();\r\n if (!node.start) {\r\n node.start = function ( when, offset, duration ) {\r\n if ( offset || duration )\r\n this.noteGrainOn( when || 0, offset, duration );\r\n else\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function( when, offset, duration ) {\r\n if( typeof duration !== 'undefined' )\r\n node.internal_start( when || 0, offset, duration );\r\n else\r\n node.internal_start( when || 0, offset || 0 );\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n fixSetTarget(node.playbackRate);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createDynamicsCompressor = AudioContext.prototype.createDynamicsCompressor;\r\n AudioContext.prototype.createDynamicsCompressor = function() {\r\n var node = this.internal_createDynamicsCompressor();\r\n fixSetTarget(node.threshold);\r\n fixSetTarget(node.knee);\r\n fixSetTarget(node.ratio);\r\n fixSetTarget(node.reduction);\r\n fixSetTarget(node.attack);\r\n fixSetTarget(node.release);\r\n return node;\r\n };\r\n\r\n AudioContext.prototype.internal_createBiquadFilter = AudioContext.prototype.createBiquadFilter;\r\n AudioContext.prototype.createBiquadFilter = function() {\r\n var node = this.internal_createBiquadFilter();\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n fixSetTarget(node.Q);\r\n fixSetTarget(node.gain);\r\n return node;\r\n };\r\n\r\n if (AudioContext.prototype.hasOwnProperty( 'createOscillator' )) {\r\n AudioContext.prototype.internal_createOscillator = AudioContext.prototype.createOscillator;\r\n AudioContext.prototype.createOscillator = function() {\r\n var node = this.internal_createOscillator();\r\n if (!node.start) {\r\n node.start = function ( when ) {\r\n this.noteOn( when || 0 );\r\n };\r\n } else {\r\n node.internal_start = node.start;\r\n node.start = function ( when ) {\r\n node.internal_start( when || 0);\r\n };\r\n }\r\n if (!node.stop) {\r\n node.stop = function ( when ) {\r\n this.noteOff( when || 0 );\r\n };\r\n } else {\r\n node.internal_stop = node.stop;\r\n node.stop = function( when ) {\r\n node.internal_stop( when || 0 );\r\n };\r\n }\r\n if (!node.setPeriodicWave)\r\n node.setPeriodicWave = node.setWaveTable;\r\n fixSetTarget(node.frequency);\r\n fixSetTarget(node.detune);\r\n return node;\r\n };\r\n }\r\n }\r\n\r\n if (window.hasOwnProperty('webkitOfflineAudioContext') &&\r\n !window.hasOwnProperty('OfflineAudioContext')) {\r\n window.OfflineAudioContext = webkitOfflineAudioContext;\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js?")},"./node_modules/phaser/src/polyfills/Math.trunc.js":function(module,exports){eval("// ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc\r\nif (!Math.trunc) {\r\n Math.trunc = function trunc(x) {\r\n return x < 0 ? Math.ceil(x) : Math.floor(x);\r\n };\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Math.trunc.js?")},"./node_modules/phaser/src/polyfills/Uint32Array.js":function(module,exports){eval("/**\r\n* Low-budget Float32Array knock-off, suitable for use with P2.js in IE9\r\n* Source: http://www.html5gamedevs.com/topic/5988-phaser-12-ie9/\r\n* Cameron Foale (http://www.kibibu.com)\r\n*/\r\nif (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'object')\r\n{\r\n var CheapArray = function (fakeType)\r\n {\r\n var proto = new Array(); // jshint ignore:line\r\n\r\n window[fakeType] = function(arg) {\r\n\r\n if (typeof(arg) === 'number')\r\n {\r\n Array.call(this, arg);\r\n\r\n this.length = arg;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = 0;\r\n }\r\n }\r\n else\r\n {\r\n Array.call(this, arg.length);\r\n\r\n this.length = arg.length;\r\n\r\n for (var i = 0; i < this.length; i++)\r\n {\r\n this[i] = arg[i];\r\n }\r\n }\r\n };\r\n\r\n window[fakeType].prototype = proto;\r\n window[fakeType].constructor = window[fakeType];\r\n };\r\n\r\n CheapArray('Float32Array'); // jshint ignore:line\r\n CheapArray('Uint32Array'); // jshint ignore:line\r\n CheapArray('Uint16Array'); // jshint ignore:line\r\n CheapArray('Int16Array'); // jshint ignore:line\r\n CheapArray('ArrayBuffer'); // jshint ignore:line\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/Uint32Array.js?")},"./node_modules/phaser/src/polyfills/console.js":function(module,exports){eval("/**\r\n * Also fix for the absent console in IE9\r\n */\r\nif (!window.console)\r\n{\r\n window.console = {};\r\n window.console.log = window.console.assert = function(){};\r\n window.console.warn = window.console.assert = function(){};\r\n}\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/console.js?")},"./node_modules/phaser/src/polyfills/index.js":function(module,exports,__webpack_require__){eval('__webpack_require__(/*! ./Array.forEach */ "./node_modules/phaser/src/polyfills/Array.forEach.js");\r\n__webpack_require__(/*! ./Array.isArray */ "./node_modules/phaser/src/polyfills/Array.isArray.js");\r\n__webpack_require__(/*! ./AudioContextMonkeyPatch */ "./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js");\r\n__webpack_require__(/*! ./console */ "./node_modules/phaser/src/polyfills/console.js");\r\n__webpack_require__(/*! ./Math.trunc */ "./node_modules/phaser/src/polyfills/Math.trunc.js");\r\n__webpack_require__(/*! ./performance.now */ "./node_modules/phaser/src/polyfills/performance.now.js");\r\n__webpack_require__(/*! ./requestAnimationFrame */ "./node_modules/phaser/src/polyfills/requestAnimationFrame.js");\r\n__webpack_require__(/*! ./Uint32Array */ "./node_modules/phaser/src/polyfills/Uint32Array.js");\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/index.js?')},"./node_modules/phaser/src/polyfills/performance.now.js":function(module,exports){eval("/**\r\n * performance.now\r\n */\r\n(function () {\r\n\r\n if ('performance' in window === false)\r\n {\r\n window.performance = {};\r\n }\r\n\r\n // Thanks IE8\r\n Date.now = (Date.now || function () {\r\n return new Date().getTime();\r\n });\r\n\r\n if ('now' in window.performance === false)\r\n {\r\n var nowOffset = Date.now();\r\n\r\n if (performance.timing && performance.timing.navigationStart)\r\n {\r\n nowOffset = performance.timing.navigationStart;\r\n }\r\n\r\n window.performance.now = function now ()\r\n {\r\n return Date.now() - nowOffset;\r\n }\r\n }\r\n\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/performance.now.js?")},"./node_modules/phaser/src/polyfills/requestAnimationFrame.js":function(module,exports,__webpack_require__){eval("/* WEBPACK VAR INJECTION */(function(global) {// References:\r\n// http://paulirish.com/2011/requestanimationframe-for-smart-animating/\r\n// https://gist.github.com/1579671\r\n// http://updates.html5rocks.com/2012/05/requestAnimationFrame-API-now-with-sub-millisecond-precision\r\n// https://gist.github.com/timhall/4078614\r\n// https://github.com/Financial-Times/polyfill-service/tree/master/polyfills/requestAnimationFrame\r\n\r\n// Expected to be used with Browserfiy\r\n// Browserify automatically detects the use of `global` and passes the\r\n// correct reference of `global`, `self`, and finally `window`\r\n\r\n// Date.now\r\nif (!(Date.now && Date.prototype.getTime)) {\r\n Date.now = function now() {\r\n return new Date().getTime();\r\n };\r\n}\r\n\r\n// performance.now\r\nif (!(global.performance && global.performance.now)) {\r\n var startTime = Date.now();\r\n if (!global.performance) {\r\n global.performance = {};\r\n }\r\n global.performance.now = function () {\r\n return Date.now() - startTime;\r\n };\r\n}\r\n\r\n// requestAnimationFrame\r\nvar lastTime = Date.now();\r\nvar vendors = ['ms', 'moz', 'webkit', 'o'];\r\n\r\nfor(var x = 0; x < vendors.length && !global.requestAnimationFrame; ++x) {\r\n global.requestAnimationFrame = global[vendors[x] + 'RequestAnimationFrame'];\r\n global.cancelAnimationFrame = global[vendors[x] + 'CancelAnimationFrame'] ||\r\n global[vendors[x] + 'CancelRequestAnimationFrame'];\r\n}\r\n\r\nif (!global.requestAnimationFrame) {\r\n global.requestAnimationFrame = function (callback) {\r\n if (typeof callback !== 'function') {\r\n throw new TypeError(callback + 'is not a function');\r\n }\r\n\r\n var currentTime = Date.now(),\r\n delay = 16 + lastTime - currentTime;\r\n\r\n if (delay < 0) {\r\n delay = 0;\r\n }\r\n\r\n lastTime = currentTime;\r\n\r\n return setTimeout(function () {\r\n lastTime = Date.now();\r\n callback(performance.now());\r\n }, delay);\r\n };\r\n}\r\n\r\nif (!global.cancelAnimationFrame) {\r\n global.cancelAnimationFrame = function(id) {\r\n clearTimeout(id);\r\n };\r\n}\r\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ \"./node_modules/webpack/buildin/global.js\")))\n\n//# sourceURL=webpack:///./node_modules/phaser/src/polyfills/requestAnimationFrame.js?")},"./node_modules/phaser/src/renderer/BlendModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Blend Modes.\r\n * \r\n * @namespace Phaser.BlendModes\r\n * @since 3.0.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * Skips the Blend Mode check in the renderer.\r\n * \r\n * @name Phaser.BlendModes.SKIP_CHECK\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SKIP_CHECK: -1,\r\n\r\n /**\r\n * Normal blend mode. For Canvas and WebGL.\r\n * This is the default setting and draws new shapes on top of the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.NORMAL\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NORMAL: 0,\r\n\r\n /**\r\n * Add blend mode. For Canvas and WebGL.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.ADD\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ADD: 1,\r\n\r\n /**\r\n * Multiply blend mode. For Canvas and WebGL.\r\n * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result.\r\n * \r\n * @name Phaser.BlendModes.MULTIPLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n MULTIPLY: 2,\r\n\r\n /**\r\n * Screen blend mode. For Canvas and WebGL.\r\n * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)\r\n * \r\n * @name Phaser.BlendModes.SCREEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SCREEN: 3,\r\n\r\n /**\r\n * Overlay blend mode. For Canvas only.\r\n * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.\r\n * \r\n * @name Phaser.BlendModes.OVERLAY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n OVERLAY: 4,\r\n\r\n /**\r\n * Darken blend mode. For Canvas only.\r\n * Retains the darkest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.DARKEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DARKEN: 5,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Retains the lightest pixels of both layers.\r\n * \r\n * @name Phaser.BlendModes.LIGHTEN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTEN: 6,\r\n\r\n /**\r\n * Color Dodge blend mode. For Canvas only.\r\n * Divides the bottom layer by the inverted top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR_DODGE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_DODGE: 7,\r\n\r\n /**\r\n * Color Burn blend mode. For Canvas only.\r\n * Divides the inverted bottom layer by the top layer, and then inverts the result.\r\n * \r\n * @name Phaser.BlendModes.COLOR_BURN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR_BURN: 8,\r\n\r\n /**\r\n * Hard Light blend mode. For Canvas only.\r\n * A combination of multiply and screen like overlay, but with top and bottom layer swapped.\r\n * \r\n * @name Phaser.BlendModes.HARD_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HARD_LIGHT: 9,\r\n\r\n /**\r\n * Soft Light blend mode. For Canvas only.\r\n * A softer version of hard-light. Pure black or white does not result in pure black or white.\r\n * \r\n * @name Phaser.BlendModes.SOFT_LIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOFT_LIGHT: 10,\r\n\r\n /**\r\n * Difference blend mode. For Canvas only.\r\n * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.\r\n * \r\n * @name Phaser.BlendModes.DIFFERENCE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DIFFERENCE: 11,\r\n\r\n /**\r\n * Exclusion blend mode. For Canvas only.\r\n * Like difference, but with lower contrast.\r\n * \r\n * @name Phaser.BlendModes.EXCLUSION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n EXCLUSION: 12,\r\n\r\n /**\r\n * Hue blend mode. For Canvas only.\r\n * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.\r\n * \r\n * @name Phaser.BlendModes.HUE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n HUE: 13,\r\n\r\n /**\r\n * Saturation blend mode. For Canvas only.\r\n * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.SATURATION\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SATURATION: 14,\r\n\r\n /**\r\n * Color blend mode. For Canvas only.\r\n * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.COLOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COLOR: 15,\r\n\r\n /**\r\n * Luminosity blend mode. For Canvas only.\r\n * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.\r\n * \r\n * @name Phaser.BlendModes.LUMINOSITY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LUMINOSITY: 16,\r\n\r\n /**\r\n * Alpha erase blend mode. For Canvas and WebGL.\r\n * \r\n * @name Phaser.BlendModes.ERASE\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n ERASE: 17,\r\n\r\n /**\r\n * Source-in blend mode. For Canvas only.\r\n * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_IN: 18,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is drawn where it doesn't overlap the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_OUT: 19,\r\n\r\n /**\r\n * Source-out blend mode. For Canvas only.\r\n * The new shape is only drawn where it overlaps the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.SOURCE_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n SOURCE_ATOP: 20,\r\n\r\n /**\r\n * Destination-over blend mode. For Canvas only.\r\n * New shapes are drawn behind the existing canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OVER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OVER: 21,\r\n\r\n /**\r\n * Destination-in blend mode. For Canvas only.\r\n * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_IN\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_IN: 22,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing content is kept where it doesn't overlap the new shape.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_OUT\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_OUT: 23,\r\n\r\n /**\r\n * Destination-out blend mode. For Canvas only.\r\n * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content.\r\n * \r\n * @name Phaser.BlendModes.DESTINATION_ATOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n DESTINATION_ATOP: 24,\r\n\r\n /**\r\n * Lighten blend mode. For Canvas only.\r\n * Where both shapes overlap the color is determined by adding color values.\r\n * \r\n * @name Phaser.BlendModes.LIGHTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LIGHTER: 25,\r\n\r\n /**\r\n * Copy blend mode. For Canvas only.\r\n * Only the new shape is shown.\r\n * \r\n * @name Phaser.BlendModes.COPY\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n COPY: 26,\r\n\r\n /**\r\n * Xor blend mode. For Canvas only.\r\n * Shapes are made transparent where both overlap and drawn normal everywhere else.\r\n * \r\n * @name Phaser.BlendModes.XOR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n XOR: 27\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/BlendModes.js?")},"./node_modules/phaser/src/renderer/ScaleModes.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Modes.\r\n * \r\n * @namespace Phaser.ScaleModes\r\n * @since 3.0.0\r\n */\r\n\r\nvar ScaleModes = {\r\n\r\n /**\r\n * Default Scale Mode (Linear).\r\n * \r\n * @name Phaser.ScaleModes.DEFAULT\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n DEFAULT: 0,\r\n\r\n /**\r\n * Linear Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.LINEAR\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest Scale Mode.\r\n * \r\n * @name Phaser.ScaleModes.NEAREST\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n\r\n};\r\n\r\nmodule.exports = ScaleModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/ScaleModes.js?")},"./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasSnapshot = __webpack_require__(/*! ../snapshot/CanvasSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GetBlendModes = __webpack_require__(/*! ./utils/GetBlendModes */ \"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar ScaleModes = __webpack_require__(/*! ../ScaleModes */ \"./node_modules/phaser/src/renderer/ScaleModes.js\");\r\nvar Smoothing = __webpack_require__(/*! ../../display/canvas/Smoothing */ \"./node_modules/phaser/src/display/canvas/Smoothing.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Canvas Renderer is responsible for managing 2D canvas rendering contexts, including the one used by the Game's canvas. It tracks the internal state of a given context and can renderer textured Game Objects to it, taking into account alpha, blending, and scaling.\r\n *\r\n * @class CanvasRenderer\r\n * @memberof Phaser.Renderer.Canvas\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser Game instance that owns this renderer.\r\n */\r\nvar CanvasRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function CanvasRenderer (game)\r\n {\r\n /**\r\n * The Phaser Game instance that owns this renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.CANVAS;\r\n\r\n /**\r\n * The total number of Game Objects which were rendered in a frame.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#drawCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.drawCount = 0;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The local configuration settings of the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: game.config.clearBeforeRender,\r\n backgroundColor: game.config.backgroundColor,\r\n resolution: game.config.resolution,\r\n antialias: game.config.antialias,\r\n roundPixels: game.config.roundPixels\r\n };\r\n\r\n /**\r\n * The scale mode which should be used by the CanvasRenderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#scaleMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = (game.config.antialias) ? ScaleModes.LINEAR : ScaleModes.NEAREST;\r\n\r\n /**\r\n * The canvas element which the Game uses.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameCanvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.gameCanvas = game.canvas;\r\n\r\n var contextOptions = {\r\n alpha: game.config.transparent,\r\n desynchronized: game.config.desynchronized\r\n };\r\n\r\n /**\r\n * The canvas context used to render all Cameras in all Scenes during the game loop.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#gameContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.gameContext = (this.game.config.context) ? this.game.config.context : this.gameCanvas.getContext('2d', contextOptions);\r\n\r\n /**\r\n * The canvas context currently used by the CanvasRenderer for all rendering operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentContext\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.currentContext = this.gameContext;\r\n\r\n /**\r\n * The blend modes supported by the Canvas Renderer.\r\n *\r\n * This object maps the {@link Phaser.BlendModes} to canvas compositing operations.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#blendModes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.blendModes = GetBlendModes();\r\n\r\n // image-rendering: optimizeSpeed;\r\n // image-rendering: pixelated;\r\n\r\n /**\r\n * The scale mode currently in use by the Canvas Renderer.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#currentScaleMode\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.currentScaleMode = 0;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.16.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92\r\n };\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.Canvas.CanvasRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n this.init();\r\n },\r\n\r\n /**\r\n * Prepares the game canvas for rendering.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#init\r\n * @since 3.0.0\r\n */\r\n init: function ()\r\n {\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height)\r\n {\r\n this.resize(baseSize.width, baseSize.height);\r\n }\r\n },\r\n\r\n /**\r\n * Resize the main game canvas.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n */\r\n resize: function (width, height)\r\n {\r\n this.width = width;\r\n this.height = height;\r\n\r\n // Resizing a canvas will reset imageSmoothingEnabled (and probably other properties)\r\n if (this.scaleMode === ScaleModes.NEAREST)\r\n {\r\n Smoothing.disable(this.gameContext);\r\n }\r\n },\r\n\r\n /**\r\n * Resets the transformation matrix of the current context to the identity matrix, thus resetting any transformation.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#resetTransform\r\n * @since 3.0.0\r\n */\r\n resetTransform: function ()\r\n {\r\n this.currentContext.setTransform(1, 0, 0, 1, 0, 0);\r\n },\r\n\r\n /**\r\n * Sets the blend mode (compositing operation) of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {string} blendMode - The new blend mode which should be used.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setBlendMode: function (blendMode)\r\n {\r\n this.currentContext.globalCompositeOperation = blendMode;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Changes the Canvas Rendering Context that all draw operations are performed against.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setContext\r\n * @since 3.12.0\r\n *\r\n * @param {?CanvasRenderingContext2D} [ctx] - The new Canvas Rendering Context to draw everything to. Leave empty to reset to the Game Canvas.\r\n *\r\n * @return {this} The Canvas Renderer instance.\r\n */\r\n setContext: function (ctx)\r\n {\r\n this.currentContext = (ctx) ? ctx : this.gameContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the global alpha of the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#setAlpha\r\n * @since 3.0.0\r\n *\r\n * @param {number} alpha - The new alpha to use, where 0 is fully transparent and 1 is fully opaque.\r\n *\r\n * @return {this} This CanvasRenderer object.\r\n */\r\n setAlpha: function (alpha)\r\n {\r\n this.currentContext.globalAlpha = alpha;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Called at the start of the render loop.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n var config = this.config;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n ctx.globalAlpha = 1;\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n\r\n if (config.clearBeforeRender)\r\n {\r\n ctx.clearRect(0, 0, width, height);\r\n }\r\n\r\n if (!config.transparent)\r\n {\r\n ctx.fillStyle = config.backgroundColor.rgba;\r\n ctx.fillRect(0, 0, width, height);\r\n }\r\n\r\n ctx.save();\r\n\r\n this.drawCount = 0;\r\n },\r\n\r\n /**\r\n * Renders the Scene to the given Camera.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.DisplayList} children - The Game Objects within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently unused.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n var list = children.list;\r\n var childCount = list.length;\r\n\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var ctx = (camera.renderToTexture) ? camera.context : scene.sys.context;\r\n\r\n // Save context pre-clip\r\n ctx.save();\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n ctx.beginPath();\r\n ctx.rect(cx, cy, cw, ch);\r\n ctx.clip();\r\n }\r\n\r\n this.currentContext = ctx;\r\n\r\n var mask = camera.mask;\r\n\r\n if (mask)\r\n {\r\n mask.preRenderCanvas(this, null, camera._maskCamera);\r\n }\r\n\r\n if (!camera.transparent)\r\n {\r\n ctx.fillStyle = camera.backgroundColor.rgba;\r\n ctx.fillRect(cx, cy, cw, ch);\r\n }\r\n\r\n ctx.globalAlpha = camera.alpha;\r\n\r\n ctx.globalCompositeOperation = 'source-over';\r\n\r\n this.drawCount += list.length;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n\r\n camera.matrix.copyToContext(ctx);\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.mask)\r\n {\r\n child.mask.preRenderCanvas(this, child, camera);\r\n }\r\n\r\n child.renderCanvas(this, child, interpolationPercentage, camera);\r\n\r\n if (child.mask)\r\n {\r\n child.mask.postRenderCanvas(this, child, camera);\r\n }\r\n }\r\n\r\n ctx.setTransform(1, 0, 0, 1, 0, 0);\r\n ctx.globalCompositeOperation = 'source-over';\r\n ctx.globalAlpha = 1;\r\n\r\n camera.flashEffect.postRenderCanvas(ctx);\r\n camera.fadeEffect.postRenderCanvas(ctx);\r\n\r\n camera.dirty = false;\r\n\r\n if (mask)\r\n {\r\n mask.postRenderCanvas(this);\r\n }\r\n\r\n // Restore pre-clip context\r\n ctx.restore();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n scene.sys.context.drawImage(camera.canvas, cx, cy);\r\n }\r\n },\r\n\r\n /**\r\n * Restores the game context's global settings and takes a snapshot if one is scheduled.\r\n *\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n var ctx = this.gameContext;\r\n\r\n ctx.restore();\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n CanvasSnapshot(this.gameCanvas, state);\r\n\r\n state.callback = null;\r\n }\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given canvas.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotCanvas\r\n * @since 3.19.0\r\n *\r\n * @param {HTMLCanvasElement} canvas - The canvas to grab from.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=canvas.width] - The width of the area to grab.\r\n * @param {integer} [height=canvas.height] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This Canvas Renderer.\r\n */\r\n snapshotCanvas: function (canvas, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n CanvasSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gameCanvas.width, this.gameCanvas.height, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by creating an Image object from the canvas data, this is a blocking process, which gets\r\n * more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gameCanvas.width);\r\n state.height = Math.min(height, this.gameCanvas.height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and draws it to the current context.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#batchSprite\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} sprite - The texture based Game Object to draw.\r\n * @param {Phaser.Textures.Frame} frame - The frame to draw, doesn't have to be that owned by the Game Object.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, frame, camera, parentTransformMatrix)\r\n {\r\n var alpha = camera.alpha * sprite.alpha;\r\n\r\n if (alpha === 0)\r\n {\r\n // Nothing to see, so abort early\r\n return;\r\n }\r\n \r\n var ctx = this.currentContext;\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var cd = frame.canvasData;\r\n\r\n var frameX = cd.x;\r\n var frameY = cd.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var res = frame.source.resolution;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frame.x;\r\n var y = -displayOriginY + frame.y;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n frameWidth = crop.cw;\r\n frameHeight = crop.ch;\r\n \r\n frameX = crop.cx;\r\n frameY = crop.cy;\r\n\r\n x = -displayOriginX + crop.x;\r\n y = -displayOriginY + crop.y;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (x >= 0)\r\n {\r\n x = -(x + frameWidth);\r\n }\r\n else if (x < 0)\r\n {\r\n x = (Math.abs(x) - frameWidth);\r\n }\r\n }\r\n \r\n if (sprite.flipY)\r\n {\r\n if (y >= 0)\r\n {\r\n y = -(y + frameHeight);\r\n }\r\n else if (y < 0)\r\n {\r\n y = (Math.abs(y) - frameHeight);\r\n }\r\n }\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY)\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n ctx.save();\r\n \r\n calcMatrix.setToContext(ctx);\r\n\r\n ctx.globalCompositeOperation = this.blendModes[sprite.blendMode];\r\n\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.drawImage(frame.source.image, frameX, frameY, frameWidth, frameHeight, x, y, frameWidth / res, frameHeight / res);\r\n\r\n ctx.restore();\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Canvas Renderer.\r\n *\r\n * @method Phaser.Renderer.Canvas.CanvasRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.gameCanvas = null;\r\n this.gameContext = null;\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js?")},"./node_modules/phaser/src/renderer/canvas/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Canvas\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CanvasRenderer: __webpack_require__(/*! ./CanvasRenderer */ "./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js"),\r\n GetBlendModes: __webpack_require__(/*! ./utils/GetBlendModes */ "./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js"),\r\n SetTransform: __webpack_require__(/*! ./utils/SetTransform */ "./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/index.js?')},"./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar modes = __webpack_require__(/*! ../../BlendModes */ \"./node_modules/phaser/src/renderer/BlendModes.js\");\r\nvar CanvasFeatures = __webpack_require__(/*! ../../../device/CanvasFeatures */ \"./node_modules/phaser/src/device/CanvasFeatures.js\");\r\n\r\n/**\r\n * Returns an array which maps the default blend modes to supported Canvas blend modes.\r\n *\r\n * If the browser doesn't support a blend mode, it will default to the normal `source-over` blend mode.\r\n *\r\n * @function Phaser.Renderer.Canvas.GetBlendModes\r\n * @since 3.0.0\r\n *\r\n * @return {array} Which Canvas blend mode corresponds to which default Phaser blend mode.\r\n */\r\nvar GetBlendModes = function ()\r\n{\r\n var output = [];\r\n var useNew = CanvasFeatures.supportNewBlendModes;\r\n var so = 'source-over';\r\n\r\n output[modes.NORMAL] = so;\r\n output[modes.ADD] = 'lighter';\r\n output[modes.MULTIPLY] = (useNew) ? 'multiply' : so;\r\n output[modes.SCREEN] = (useNew) ? 'screen' : so;\r\n output[modes.OVERLAY] = (useNew) ? 'overlay' : so;\r\n output[modes.DARKEN] = (useNew) ? 'darken' : so;\r\n output[modes.LIGHTEN] = (useNew) ? 'lighten' : so;\r\n output[modes.COLOR_DODGE] = (useNew) ? 'color-dodge' : so;\r\n output[modes.COLOR_BURN] = (useNew) ? 'color-burn' : so;\r\n output[modes.HARD_LIGHT] = (useNew) ? 'hard-light' : so;\r\n output[modes.SOFT_LIGHT] = (useNew) ? 'soft-light' : so;\r\n output[modes.DIFFERENCE] = (useNew) ? 'difference' : so;\r\n output[modes.EXCLUSION] = (useNew) ? 'exclusion' : so;\r\n output[modes.HUE] = (useNew) ? 'hue' : so;\r\n output[modes.SATURATION] = (useNew) ? 'saturation' : so;\r\n output[modes.COLOR] = (useNew) ? 'color' : so;\r\n output[modes.LUMINOSITY] = (useNew) ? 'luminosity' : so;\r\n output[modes.ERASE] = 'destination-out';\r\n output[modes.SOURCE_IN] = 'source-in';\r\n output[modes.SOURCE_OUT] = 'source-out';\r\n output[modes.SOURCE_ATOP] = 'source-atop';\r\n output[modes.DESTINATION_OVER] = 'destination-over';\r\n output[modes.DESTINATION_IN] = 'destination-in';\r\n output[modes.DESTINATION_OUT] = 'destination-out';\r\n output[modes.DESTINATION_ATOP] = 'destination-atop';\r\n output[modes.LIGHTER] = 'lighter';\r\n output[modes.COPY] = 'copy';\r\n output[modes.XOR] = 'xor';\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetBlendModes;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js?")},"./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix\r\n * and then performs the following steps:\r\n * \r\n * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts.\r\n * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given.\r\n * 3. Sets the blend mode of the context to be that used by the Game Object.\r\n * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera.\r\n * 5. Saves the context state.\r\n * 6. Sets the final matrix values into the context via setTransform.\r\n * \r\n * This function is only meant to be used internally. Most of the Canvas Renderer classes use it.\r\n *\r\n * @function Phaser.Renderer.Canvas.SetTransform\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on.\r\n * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering.\r\n * \r\n * @return {boolean} `true` if the Game Object context was set, otherwise `false`.\r\n */\r\nvar SetTransform = function (renderer, ctx, src, camera, parentMatrix)\r\n{\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (alpha <= 0)\r\n {\r\n // Nothing to see, so don't waste time calculating stuff\r\n return false;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix);\r\n var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n gameObjectMatrix.e = src.x;\r\n gameObjectMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(gameObjectMatrix, calcMatrix);\r\n }\r\n\r\n // Blend Mode\r\n ctx.globalCompositeOperation = renderer.blendModes[src.blendMode];\r\n\r\n // Alpha\r\n ctx.globalAlpha = alpha;\r\n\r\n ctx.save();\r\n\r\n calcMatrix.setToContext(ctx);\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = SetTransform;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js?")},"./node_modules/phaser/src/renderer/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Types.Renderer\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./canvas */ "./node_modules/phaser/src/renderer/canvas/index.js"),\r\n Snapshot: __webpack_require__(/*! ./snapshot */ "./node_modules/phaser/src/renderer/snapshot/index.js"),\r\n WebGL: __webpack_require__(/*! ./webgl */ "./node_modules/phaser/src/renderer/webgl/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/index.js?')},"./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.Canvas\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar CanvasSnapshot = function (canvas, config)\r\n{\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = Math.abs(Math.round(GetFastValue(config, 'x', 0)));\r\n var y = Math.abs(Math.round(GetFastValue(config, 'y', 0)));\r\n var width = GetFastValue(config, 'width', canvas.width);\r\n var height = GetFastValue(config, 'height', canvas.height);\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n if (getPixel)\r\n {\r\n var context = canvas.getContext('2d');\r\n var imageData = context.getImageData(x, y, 1, 1);\r\n var data = imageData.data;\r\n\r\n callback.call(null, new Color(data[0], data[1], data[2], data[3] / 255));\r\n }\r\n else if (x !== 0 || y !== 0 || width !== canvas.width || height !== canvas.height)\r\n {\r\n // Area Grab\r\n var copyCanvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = copyCanvas.getContext('2d');\r\n\r\n ctx.drawImage(canvas, x, y, width, height, 0, 0, width, height);\r\n\r\n var image1 = new Image();\r\n \r\n image1.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.onload = function ()\r\n {\r\n callback.call(null, image1);\r\n\r\n CanvasPool.remove(copyCanvas);\r\n };\r\n\r\n image1.src = copyCanvas.toDataURL(type, encoderOptions);\r\n }\r\n else\r\n {\r\n // Full Grab\r\n var image2 = new Image();\r\n \r\n image2.onerror = function ()\r\n {\r\n callback.call(null);\r\n };\r\n\r\n image2.onload = function ()\r\n {\r\n callback.call(null, image2);\r\n };\r\n\r\n image2.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = CanvasSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar Color = __webpack_require__(/*! ../../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Takes a snapshot of an area from the current frame displayed by a WebGL canvas.\r\n * \r\n * This is then copied to an Image object. When this loads, the results are sent\r\n * to the callback provided in the Snapshot Configuration object.\r\n *\r\n * @function Phaser.Renderer.Snapshot.WebGL\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} sourceCanvas - The canvas to take a snapshot of.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotState} config - The snapshot configuration object.\r\n */\r\nvar WebGLSnapshot = function (sourceCanvas, config)\r\n{\r\n var gl = sourceCanvas.getContext('experimental-webgl');\r\n\r\n var callback = GetFastValue(config, 'callback');\r\n var type = GetFastValue(config, 'type', 'image/png');\r\n var encoderOptions = GetFastValue(config, 'encoder', 0.92);\r\n var x = GetFastValue(config, 'x', 0);\r\n var y = GetFastValue(config, 'y', 0);\r\n\r\n var getPixel = GetFastValue(config, 'getPixel', false);\r\n\r\n var isFramebuffer = GetFastValue(config, 'isFramebuffer', false);\r\n\r\n var bufferWidth = (isFramebuffer) ? GetFastValue(config, 'bufferWidth', 1) : gl.drawingBufferWidth;\r\n var bufferHeight = (isFramebuffer) ? GetFastValue(config, 'bufferHeight', 1) : gl.drawingBufferHeight;\r\n\r\n if (getPixel)\r\n {\r\n var pixel = new Uint8Array(4);\r\n\r\n var destY = (isFramebuffer) ? y : bufferHeight - y;\r\n\r\n gl.readPixels(x, destY, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, pixel);\r\n\r\n callback.call(null, new Color(pixel[0], pixel[1], pixel[2], pixel[3] / 255));\r\n }\r\n else\r\n {\r\n var width = GetFastValue(config, 'width', bufferWidth);\r\n var height = GetFastValue(config, 'height', bufferHeight);\r\n\r\n var total = width * height * 4;\r\n\r\n var pixels = new Uint8Array(total);\r\n\r\n gl.readPixels(x, bufferHeight - y - height, width, height, gl.RGBA, gl.UNSIGNED_BYTE, pixels);\r\n \r\n var canvas = CanvasPool.createWebGL(this, width, height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n var imageData = ctx.getImageData(0, 0, width, height);\r\n \r\n var data = imageData.data;\r\n\r\n for (var py = 0; py < height; py++)\r\n {\r\n for (var px = 0; px < width; px++)\r\n {\r\n var sourceIndex = ((height - py) * width + px) * 4;\r\n var destIndex = (isFramebuffer) ? total - ((py * width + (width - px)) * 4) : (py * width + px) * 4;\r\n\r\n data[destIndex + 0] = pixels[sourceIndex + 0];\r\n data[destIndex + 1] = pixels[sourceIndex + 1];\r\n data[destIndex + 2] = pixels[sourceIndex + 2];\r\n data[destIndex + 3] = pixels[sourceIndex + 3];\r\n }\r\n }\r\n\r\n ctx.putImageData(imageData, 0, 0);\r\n \r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n callback.call(null);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n callback.call(null, image);\r\n\r\n CanvasPool.remove(canvas);\r\n };\r\n\r\n image.src = canvas.toDataURL(type, encoderOptions);\r\n }\r\n};\r\n\r\nmodule.exports = WebGLSnapshot;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js?")},"./node_modules/phaser/src/renderer/snapshot/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.Snapshot\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Canvas: __webpack_require__(/*! ./CanvasSnapshot */ "./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js"),\r\n WebGL: __webpack_require__(/*! ./WebGLSnapshot */ "./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/snapshot/index.js?')},"./node_modules/phaser/src/renderer/webgl/Utils.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Utils\r\n * @since 3.0.0\r\n */\r\nmodule.exports = {\r\n\r\n /**\r\n * Packs four floats on a range from 0.0 to 1.0 into a single Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats\r\n * @since 3.0.0\r\n * \r\n * @param {number} r - Red component in a range from 0.0 to 1.0 \r\n * @param {number} g - Green component in a range from 0.0 to 1.0\r\n * @param {number} b - Blue component in a range from 0.0 to 1.0\r\n * @param {number} a - Alpha component in a range from 0.0 to 1.0\r\n * \r\n * @return {number} [description]\r\n */\r\n getTintFromFloats: function (r, g, b, a)\r\n {\r\n var ur = ((r * 255.0)|0) & 0xFF;\r\n var ug = ((g * 255.0)|0) & 0xFF;\r\n var ub = ((b * 255.0)|0) & 0xFF;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlpha: function (rgb, a)\r\n {\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n return ((ua << 24) | rgb) >>> 0;\r\n },\r\n\r\n /**\r\n * Packs a Uint24, representing RGB components, with a Float32, representing\r\n * the alpha component, with a range between 0.0 and 1.0 and return a \r\n * swizzled Uint32\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - Uint24 representing RGB components\r\n * @param {number} a - Float32 representing Alpha component\r\n * \r\n * @return {number} Packed RGBA as Uint32\r\n */\r\n getTintAppendFloatAlphaAndSwap: function (rgb, a)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n var ua = ((a * 255.0)|0) & 0xFF;\r\n\r\n return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0;\r\n },\r\n\r\n /**\r\n * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB\r\n * @since 3.0.0\r\n * \r\n * @param {number} rgb - RGB packed as a Uint24\r\n * \r\n * @return {array} Array of floats representing each component as a float \r\n */\r\n getFloatsFromUintRGB: function (rgb)\r\n {\r\n var ur = ((rgb >> 16)|0) & 0xff;\r\n var ug = ((rgb >> 8)|0) & 0xff;\r\n var ub = (rgb|0) & 0xff;\r\n\r\n return [ ur / 255.0, ug / 255.0, ub / 255.0 ];\r\n },\r\n\r\n /**\r\n * Counts how many attributes of 32 bits a vertex has\r\n *\r\n * @function Phaser.Renderer.WebGL.Utils.getComponentCount\r\n * @since 3.0.0\r\n * \r\n * @param {array} attributes - Array of attributes \r\n * @param {WebGLRenderingContext} glContext - WebGLContext used for check types\r\n * \r\n * @return {number} Count of 32 bit attributes in vertex\r\n */\r\n getComponentCount: function (attributes, glContext)\r\n {\r\n var count = 0;\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n \r\n if (element.type === glContext.FLOAT)\r\n {\r\n count += element.size;\r\n }\r\n else\r\n {\r\n count += 1; // We'll force any other type to be 32 bit. for now\r\n }\r\n }\r\n\r\n return count;\r\n }\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/Utils.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * WebGLPipeline is a class that describes the way elements will be rendererd\r\n * in WebGL, specially focused on batching vertices (batching is not provided).\r\n * Pipelines are mostly used for describing 2D rendering passes but it's\r\n * flexible enough to be used for any type of rendering including 3D.\r\n * Internally WebGLPipeline will handle things like compiling shaders,\r\n * creating vertex buffers, assigning primitive topology and binding\r\n * vertex attributes.\r\n *\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - gl: Current WebGL context.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n * - vertices: An optional buffer of vertices\r\n * - attributes: An array describing the vertex attributes\r\n *\r\n * The vertex attributes properties are:\r\n * - name : String - Name of the attribute in the vertex shader\r\n * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1\r\n * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT)\r\n * - normalized : boolean - Is the attribute normalized\r\n * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C\r\n * Here you can find more information of how to describe an attribute:\r\n * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer\r\n *\r\n * @class WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for this WebGL Pipeline, as described above.\r\n */\r\nvar WebGLPipeline = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLPipeline (config)\r\n {\r\n /**\r\n * Name of the Pipeline. Used for identifying\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'WebGLPipeline';\r\n\r\n /**\r\n * The Game which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = config.game;\r\n\r\n /**\r\n * The canvas which this WebGL Pipeline renders to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#view\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.view = config.game.canvas;\r\n\r\n /**\r\n * Used to store the current game resolution\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * Width of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * Height of the current viewport\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The WebGL context this WebGL Pipeline uses.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#gl\r\n * @type {WebGLRenderingContext}\r\n * @since 3.0.0\r\n */\r\n this.gl = config.gl;\r\n\r\n /**\r\n * How many vertices have been fed to the current pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = 0;\r\n\r\n /**\r\n * The limit of vertices that the pipeline can hold\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexCapacity = config.vertexCapacity;\r\n\r\n /**\r\n * The WebGL Renderer which owns this WebGL Pipeline.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer\r\n * @type {Phaser.Renderer.WebGL.WebGLRenderer}\r\n * @since 3.0.0\r\n */\r\n this.renderer = config.renderer;\r\n\r\n /**\r\n * Raw byte buffer of vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData\r\n * @type {ArrayBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize));\r\n\r\n /**\r\n * The handle to a WebGL vertex buffer object.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer\r\n * @type {WebGLBuffer}\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW);\r\n\r\n /**\r\n * The handle to a WebGL program\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#program\r\n * @type {WebGLProgram}\r\n * @since 3.0.0\r\n */\r\n this.program = this.renderer.createProgram(config.vertShader, config.fragShader);\r\n\r\n /**\r\n * Array of objects that describe the vertex attributes\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.attributes = config.attributes;\r\n\r\n /**\r\n * The size in bytes of the vertex\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexSize = config.vertexSize;\r\n\r\n /**\r\n * The primitive topology which the pipeline will use to submit draw calls\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#topology\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.topology = config.topology;\r\n\r\n /**\r\n * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources\r\n * to the GPU.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes\r\n * @type {Uint8Array}\r\n * @since 3.0.0\r\n */\r\n this.bytes = new Uint8Array(this.vertexData);\r\n\r\n /**\r\n * This will store the amount of components of 32 bit length\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl);\r\n\r\n /**\r\n * Indicates if the current pipeline is flushing the contents to the GPU.\r\n * When the variable is set the flush function will be locked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked\r\n * @type {boolean}\r\n * @since 3.1.0\r\n */\r\n this.flushLocked = false;\r\n\r\n /**\r\n * Indicates if the current pipeline is active or not for this frame only.\r\n * Reset in the onRender method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLPipeline#active\r\n * @type {boolean}\r\n * @since 3.10.0\r\n */\r\n this.active = false;\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n *\r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#boot\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n },\r\n\r\n /**\r\n * Adds a description of vertex attribute to the pipeline\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - Name of the vertex attribute\r\n * @param {integer} size - Vertex component size\r\n * @param {integer} type - Type of the attribute\r\n * @param {boolean} normalized - Is the value normalized to a range\r\n * @param {integer} offset - Byte offset to the beginning of the first element in the vertex\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n addAttribute: function (name, size, type, normalized, offset)\r\n {\r\n this.attributes.push({\r\n name: name,\r\n size: size,\r\n type: this.renderer.glFormats[type],\r\n normalized: normalized,\r\n offset: offset\r\n });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Check if the current batch of vertices is full.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the current batch should be flushed, otherwise `false`.\r\n */\r\n shouldFlush: function ()\r\n {\r\n return (this.vertexCount >= this.vertexCapacity);\r\n },\r\n\r\n /**\r\n * Resizes the properties used to describe the viewport\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width of this WebGL Pipeline.\r\n * @param {number} height - The new height of this WebGL Pipeline.\r\n * @param {number} resolution - The resolution this WebGL Pipeline should be resized to.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n this.width = width * resolution;\r\n this.height = height * resolution;\r\n this.resolution = resolution;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds the pipeline resources, including programs, vertex buffers and binds attributes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#bind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n bind: function ()\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = this.vertexBuffer;\r\n var attributes = this.attributes;\r\n var program = this.program;\r\n var renderer = this.renderer;\r\n var vertexSize = this.vertexSize;\r\n\r\n renderer.setProgram(program);\r\n renderer.setVertexBuffer(vertexBuffer);\r\n\r\n for (var index = 0; index < attributes.length; ++index)\r\n {\r\n var element = attributes[index];\r\n var location = gl.getAttribLocation(program, element.name);\r\n\r\n if (location >= 0)\r\n {\r\n gl.enableVertexAttribArray(location);\r\n gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset);\r\n }\r\n else if (location !== -1)\r\n {\r\n gl.disableVertexAttribArray(location);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set whenever this WebGL Pipeline is bound to a WebGL Renderer.\r\n *\r\n * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n // This is for updating uniform data it's called on each bind attempt.\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before each frame is rendered, but after the canvas has been cleared.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPreRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Called before a Scene's Camera is rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function ()\r\n {\r\n // called for each camera\r\n return this;\r\n },\r\n\r\n /**\r\n * Called after each frame has been completely rendered and snapshots have been taken.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onPostRender: function ()\r\n {\r\n // called once every frame\r\n return this;\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call\r\n * for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked) { return this; }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n\r\n if (vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n return;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n gl.drawArrays(topology, 0, vertexCount);\r\n\r\n this.vertexCount = 0;\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n destroy: function ()\r\n {\r\n var gl = this.gl;\r\n\r\n gl.deleteProgram(this.program);\r\n gl.deleteBuffer(this.vertexBuffer);\r\n\r\n delete this.program;\r\n delete this.vertexBuffer;\r\n delete this.gl;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new value of the `float` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1: function (name, x)\r\n {\r\n this.renderer.setFloat1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec2` uniform.\r\n * @param {number} y - The new Y component of the `vec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2: function (name, x, y)\r\n {\r\n this.renderer.setFloat2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - The new X component of the `vec3` uniform.\r\n * @param {number} y - The new Y component of the `vec3` uniform.\r\n * @param {number} z - The new Z component of the `vec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3: function (name, x, y, z)\r\n {\r\n this.renderer.setFloat3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component of the uniform\r\n * @param {number} y - Y component of the uniform\r\n * @param {number} z - Z component of the uniform\r\n * @param {number} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setFloat4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat1v: function (name, arr)\r\n {\r\n this.renderer.setFloat1v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat2v: function (name, arr)\r\n {\r\n this.renderer.setFloat2v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat3v: function (name, arr)\r\n {\r\n this.renderer.setFloat3v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setFloat4v: function (name, arr)\r\n {\r\n this.renderer.setFloat4v(this.program, name, arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new value of the `int` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt1: function (name, x)\r\n {\r\n this.renderer.setInt1(this.program, name, x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec2` uniform.\r\n * @param {integer} y - The new Y component of the `ivec2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt2: function (name, x, y)\r\n {\r\n this.renderer.setInt2(this.program, name, x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component of the `ivec3` uniform.\r\n * @param {integer} y - The new Y component of the `ivec3` uniform.\r\n * @param {integer} z - The new Z component of the `ivec3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt3: function (name, x, y, z)\r\n {\r\n this.renderer.setInt3(this.program, name, x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component of the uniform\r\n * @param {integer} y - Y component of the uniform\r\n * @param {integer} z - Z component of the uniform\r\n * @param {integer} w - W component of the uniform\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setInt4: function (name, x, y, z, w)\r\n {\r\n this.renderer.setInt4(this.program, name, x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat2` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix2: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix2(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`.\r\n * @param {Float32Array} matrix - The new values for the `mat3` uniform.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix3: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix3(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a uniform value of the current pipeline program.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4\r\n * @since 3.2.0\r\n *\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Should the matrix be transpose\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n setMatrix4: function (name, transpose, matrix)\r\n {\r\n this.renderer.setMatrix4(this.program, name, transpose, matrix);\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseCamera = __webpack_require__(/*! ../../cameras/2d/BaseCamera */ \"./node_modules/phaser/src/cameras/2d/BaseCamera.js\");\r\nvar CameraEvents = __webpack_require__(/*! ../../cameras/2d/events */ \"./node_modules/phaser/src/cameras/2d/events/index.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ../../const */ \"./node_modules/phaser/src/const.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../../math/pow2/IsSizePowerOfTwo */ \"./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js\");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar ScaleEvents = __webpack_require__(/*! ../../scale/events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar TextureEvents = __webpack_require__(/*! ../../textures/events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ./Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLSnapshot = __webpack_require__(/*! ../snapshot/WebGLSnapshot */ \"./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js\");\r\n\r\n// Default Pipelines\r\nvar BitmapMaskPipeline = __webpack_require__(/*! ./pipelines/BitmapMaskPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js\");\r\nvar ForwardDiffuseLightPipeline = __webpack_require__(/*! ./pipelines/ForwardDiffuseLightPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./pipelines/TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\n/**\r\n * @callback WebGLContextCallback\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - The WebGL Renderer which owns the context.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * WebGLRenderer is a class that contains the needed functionality to keep the\r\n * WebGLRenderingContext state clean. The main idea of the WebGLRenderer is to keep track of\r\n * any context change that happens for WebGL rendering inside of Phaser. This means\r\n * if raw webgl functions are called outside the WebGLRenderer of the Phaser WebGL\r\n * rendering ecosystem they might pollute the current WebGLRenderingContext state producing\r\n * unexpected behavior. It's recommended that WebGL interaction is done through\r\n * WebGLRenderer and/or WebGLPipeline.\r\n *\r\n * @class WebGLRenderer\r\n * @memberof Phaser.Renderer.WebGL\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Game instance which owns this WebGL Renderer.\r\n */\r\nvar WebGLRenderer = new Class({\r\n\r\n initialize:\r\n\r\n function WebGLRenderer (game)\r\n {\r\n var gameConfig = game.config;\r\n\r\n var contextCreationConfig = {\r\n alpha: gameConfig.transparent,\r\n desynchronized: gameConfig.desynchronized,\r\n depth: false,\r\n antialias: gameConfig.antialias,\r\n premultipliedAlpha: gameConfig.premultipliedAlpha,\r\n stencil: true,\r\n failIfMajorPerformanceCaveat: gameConfig.failIfMajorPerformanceCaveat,\r\n powerPreference: gameConfig.powerPreference\r\n };\r\n\r\n /**\r\n * The local configuration settings of this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#config\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n clearBeforeRender: gameConfig.clearBeforeRender,\r\n antialias: gameConfig.antialias,\r\n backgroundColor: gameConfig.backgroundColor,\r\n contextCreation: contextCreationConfig,\r\n resolution: gameConfig.resolution,\r\n roundPixels: gameConfig.roundPixels,\r\n maxTextures: gameConfig.maxTextures,\r\n maxTextureSize: gameConfig.maxTextureSize,\r\n batchSize: gameConfig.batchSize,\r\n maxLights: gameConfig.maxLights\r\n };\r\n\r\n /**\r\n * The Game instance which owns this WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A constant which allows the renderer to be easily identified as a WebGL Renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#type\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.type = CONST.WEBGL;\r\n\r\n /**\r\n * The width of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = 0;\r\n\r\n /**\r\n * The height of the canvas being rendered to.\r\n * This is populated in the onResize event handler.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = 0;\r\n\r\n /**\r\n * The canvas which this WebGL Renderer draws to.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas = game.canvas;\r\n\r\n /**\r\n * An array of blend modes supported by the WebGL Renderer.\r\n * \r\n * This array includes the default blend modes as well as any custom blend modes added through {@link #addBlendMode}.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blendModes\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.blendModes = [];\r\n\r\n /**\r\n * Keeps track of any WebGLTexture created with the current WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nativeTextures\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.nativeTextures = [];\r\n\r\n /**\r\n * This property is set to `true` if the WebGL context of the renderer is lost.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLost\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.contextLost = false;\r\n\r\n /**\r\n * This object will store all pipelines created through addPipeline\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#pipelines\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.pipelines = null;\r\n\r\n /**\r\n * Details about the currently scheduled snapshot.\r\n * \r\n * If a non-null `callback` is set in this object, a snapshot of the canvas will be taken after the current frame is fully rendered.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#snapshotState\r\n * @type {Phaser.Types.Renderer.Snapshot.SnapshotState}\r\n * @since 3.0.0\r\n */\r\n this.snapshotState = {\r\n x: 0,\r\n y: 0,\r\n width: 1,\r\n height: 1,\r\n getPixel: false,\r\n callback: null,\r\n type: 'image/png',\r\n encoder: 0.92,\r\n isFramebuffer: false,\r\n bufferWidth: 0,\r\n bufferHeight: 0\r\n };\r\n\r\n // Internal Renderer State (Textures, Framebuffers, Pipelines, Buffers, etc)\r\n\r\n /**\r\n * Cached value for the last texture unit that was used\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentActiveTextureUnit\r\n * @type {integer}\r\n * @since 3.1.0\r\n */\r\n this.currentActiveTextureUnit = 0;\r\n\r\n /**\r\n * An array of the last texture handles that were bound to the WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentTextures\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.currentTextures = new Array(16);\r\n\r\n /**\r\n * Current framebuffer in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentFramebuffer\r\n * @type {WebGLFramebuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentFramebuffer = null;\r\n\r\n /**\r\n * Current WebGLPipeline in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentPipeline\r\n * @type {Phaser.Renderer.WebGL.WebGLPipeline}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentPipeline = null;\r\n\r\n /**\r\n * Current WebGLProgram in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentProgram\r\n * @type {WebGLProgram}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentProgram = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Vertex buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentVertexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentVertexBuffer = null;\r\n\r\n /**\r\n * Current WebGLBuffer (Index buffer) in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentIndexBuffer\r\n * @type {WebGLBuffer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.currentIndexBuffer = null;\r\n\r\n /**\r\n * Current blend mode in use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentBlendMode\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentBlendMode = Infinity;\r\n\r\n /**\r\n * Indicates if the the scissor state is enabled in WebGLRenderingContext\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissorEnabled\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.currentScissorEnabled = false;\r\n\r\n /**\r\n * Stores the current scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentScissor\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.currentScissor = null;\r\n\r\n /**\r\n * Stack of scissor data\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#scissorStack\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.scissorStack = [];\r\n\r\n /**\r\n * The handler to invoke when the context is lost.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextLostHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextLostHandler = NOOP;\r\n\r\n /**\r\n * The handler to invoke when the context is restored.\r\n * This should not be changed and is set in the boot method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#contextRestoredHandler\r\n * @type {function}\r\n * @since 3.19.0\r\n */\r\n this.contextRestoredHandler = NOOP;\r\n\r\n /**\r\n * The underlying WebGL context of the renderer.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#gl\r\n * @type {WebGLRenderingContext}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.gl = null;\r\n\r\n /**\r\n * Array of strings that indicate which WebGL extensions are supported by the browser\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#supportedExtensions\r\n * @type {object}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.supportedExtensions = null;\r\n\r\n /**\r\n * Extensions loaded into the current context\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#extensions\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.extensions = {};\r\n\r\n /**\r\n * Stores the current WebGL component formats for further use\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFormats\r\n * @type {array}\r\n * @default []\r\n * @since 3.2.0\r\n */\r\n this.glFormats = [];\r\n\r\n /**\r\n * Stores the supported WebGL texture compression formats.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#compression\r\n * @type {array}\r\n * @since 3.8.0\r\n */\r\n this.compression = {\r\n ETC1: false,\r\n PVRTC: false,\r\n S3TC: false\r\n };\r\n\r\n /**\r\n * Cached drawing buffer height to reduce gl calls.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#drawingBufferHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.drawingBufferHeight = 0;\r\n\r\n /**\r\n * A blank 32x32 transparent texture, as used by the Graphics system where needed.\r\n * This is set in the `boot` method.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#blankTexture\r\n * @type {WebGLTexture}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.blankTexture = null;\r\n\r\n /**\r\n * A default Camera used in calls when no other camera has been provided.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#defaultCamera\r\n * @type {Phaser.Cameras.Scene2D.BaseCamera}\r\n * @since 3.12.0\r\n */\r\n this.defaultCamera = new BaseCamera(0, 0, 0, 0);\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.12.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * The total number of masks currently stacked.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskCount\r\n * @type {integer}\r\n * @since 3.17.0\r\n */\r\n this.maskCount = 0;\r\n\r\n /**\r\n * The mask stack.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#maskStack\r\n * @type {Phaser.Display.Masks.GeometryMask[]}\r\n * @since 3.17.0\r\n */\r\n this.maskStack = [];\r\n\r\n /**\r\n * Internal property that tracks the currently set mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal property that tracks the currently set camera mask.\r\n *\r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentCameraMask\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.currentCameraMask = { mask: null, camera: null };\r\n\r\n /**\r\n * Internal gl function mapping for uniform look-up.\r\n * https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/uniform\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#glFuncMap\r\n * @type {any}\r\n * @since 3.17.0\r\n */\r\n this.glFuncMap = null;\r\n\r\n /**\r\n * The `type` of the Game Object being currently rendered.\r\n * This can be used by advanced render functions for batching look-ahead.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#currentType\r\n * @type {string}\r\n * @since 3.19.0\r\n */\r\n this.currentType = '';\r\n\r\n /**\r\n * Is the `type` of the Game Object being currently rendered different than the\r\n * type of the object before it in the display list? I.e. it's a 'new' type.\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#newType\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.newType = false;\r\n\r\n /**\r\n * Does the `type` of the next Game Object in the display list match that\r\n * of the object being currently rendered?\r\n * \r\n * @name Phaser.Renderer.WebGL.WebGLRenderer#nextTypeMatch\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.nextTypeMatch = false;\r\n\r\n this.init(this.config);\r\n },\r\n\r\n /**\r\n * Creates a new WebGLRenderingContext and initializes all internal state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#init\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object for the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n init: function (config)\r\n {\r\n var gl;\r\n var game = this.game;\r\n var canvas = this.canvas;\r\n var clearColor = config.backgroundColor;\r\n\r\n // Did they provide their own context?\r\n if (game.config.context)\r\n {\r\n gl = game.config.context;\r\n }\r\n else\r\n {\r\n gl = canvas.getContext('webgl', config.contextCreation) || canvas.getContext('experimental-webgl', config.contextCreation);\r\n }\r\n\r\n if (!gl || gl.isContextLost())\r\n {\r\n this.contextLost = true;\r\n\r\n throw new Error('WebGL unsupported');\r\n }\r\n\r\n this.gl = gl;\r\n\r\n var _this = this;\r\n\r\n this.contextLostHandler = function (event)\r\n {\r\n _this.contextLost = true;\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_LOST, _this);\r\n\r\n event.preventDefault();\r\n };\r\n\r\n this.contextRestoredHandler = function ()\r\n {\r\n _this.contextLost = false;\r\n\r\n _this.init(_this.config);\r\n\r\n _this.game.events.emit(GameEvents.CONTEXT_RESTORED, _this);\r\n };\r\n\r\n canvas.addEventListener('webglcontextlost', this.contextLostHandler, false);\r\n canvas.addEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n // Set it back into the Game, so developers can access it from there too\r\n game.context = gl;\r\n\r\n for (var i = 0; i <= 27; i++)\r\n {\r\n this.blendModes.push({ func: [ gl.ONE, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_ADD });\r\n }\r\n\r\n // ADD\r\n this.blendModes[1].func = [ gl.ONE, gl.DST_ALPHA ];\r\n\r\n // MULTIPLY\r\n this.blendModes[2].func = [ gl.DST_COLOR, gl.ONE_MINUS_SRC_ALPHA ];\r\n\r\n // SCREEN\r\n this.blendModes[3].func = [ gl.ONE, gl.ONE_MINUS_SRC_COLOR ];\r\n\r\n // ERASE\r\n this.blendModes[17] = { func: [ gl.ZERO, gl.ONE_MINUS_SRC_ALPHA ], equation: gl.FUNC_REVERSE_SUBTRACT };\r\n\r\n this.glFormats[0] = gl.BYTE;\r\n this.glFormats[1] = gl.SHORT;\r\n this.glFormats[2] = gl.UNSIGNED_BYTE;\r\n this.glFormats[3] = gl.UNSIGNED_SHORT;\r\n this.glFormats[4] = gl.FLOAT;\r\n\r\n // Set the gl function map\r\n this.glFuncMap = {\r\n\r\n mat2: { func: gl.uniformMatrix2fv, length: 1, matrix: true },\r\n mat3: { func: gl.uniformMatrix3fv, length: 1, matrix: true },\r\n mat4: { func: gl.uniformMatrix4fv, length: 1, matrix: true },\r\n\r\n '1f': { func: gl.uniform1f, length: 1 },\r\n '1fv': { func: gl.uniform1fv, length: 1 },\r\n '1i': { func: gl.uniform1i, length: 1 },\r\n '1iv': { func: gl.uniform1iv, length: 1 },\r\n\r\n '2f': { func: gl.uniform2f, length: 2 },\r\n '2fv': { func: gl.uniform2fv, length: 1 },\r\n '2i': { func: gl.uniform2i, length: 2 },\r\n '2iv': { func: gl.uniform2iv, length: 1 },\r\n\r\n '3f': { func: gl.uniform3f, length: 3 },\r\n '3fv': { func: gl.uniform3fv, length: 1 },\r\n '3i': { func: gl.uniform3i, length: 3 },\r\n '3iv': { func: gl.uniform3iv, length: 1 },\r\n\r\n '4f': { func: gl.uniform4f, length: 4 },\r\n '4fv': { func: gl.uniform4fv, length: 1 },\r\n '4i': { func: gl.uniform4i, length: 4 },\r\n '4iv': { func: gl.uniform4iv, length: 1 }\r\n\r\n };\r\n\r\n // Load supported extensions\r\n var exts = gl.getSupportedExtensions();\r\n\r\n if (!config.maxTextures)\r\n {\r\n config.maxTextures = gl.getParameter(gl.MAX_TEXTURE_IMAGE_UNITS);\r\n }\r\n\r\n if (!config.maxTextureSize)\r\n {\r\n config.maxTextureSize = gl.getParameter(gl.MAX_TEXTURE_SIZE);\r\n }\r\n\r\n var extString = 'WEBGL_compressed_texture_';\r\n var wkExtString = 'WEBKIT_' + extString;\r\n\r\n this.compression.ETC1 = gl.getExtension(extString + 'etc1') || gl.getExtension(wkExtString + 'etc1');\r\n this.compression.PVRTC = gl.getExtension(extString + 'pvrtc') || gl.getExtension(wkExtString + 'pvrtc');\r\n this.compression.S3TC = gl.getExtension(extString + 's3tc') || gl.getExtension(wkExtString + 's3tc');\r\n\r\n this.supportedExtensions = exts;\r\n\r\n // Setup initial WebGL state\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n gl.enable(gl.BLEND);\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n // Initialize all textures to null\r\n for (var index = 0; index < this.currentTextures.length; ++index)\r\n {\r\n this.currentTextures[index] = null;\r\n }\r\n\r\n // Clear previous pipelines and reload default ones\r\n this.pipelines = {};\r\n\r\n this.addPipeline('TextureTintPipeline', new TextureTintPipeline({ game: game, renderer: this }));\r\n this.addPipeline('BitmapMaskPipeline', new BitmapMaskPipeline({ game: game, renderer: this }));\r\n this.addPipeline('Light2D', new ForwardDiffuseLightPipeline({ game: game, renderer: this, maxLights: config.maxLights }));\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n game.textures.once(TextureEvents.READY, this.boot, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal boot handler. Calls 'boot' on each pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#boot\r\n * @private\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n for (var pipelineName in this.pipelines)\r\n {\r\n this.pipelines[pipelineName].boot();\r\n }\r\n\r\n var blank = this.game.textures.getFrame('__DEFAULT');\r\n\r\n this.pipelines.TextureTintPipeline.currentFrame = blank;\r\n\r\n this.blankTexture = blank;\r\n\r\n var gl = this.gl;\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n\r\n this.game.scale.on(ScaleEvents.RESIZE, this.onResize, this);\r\n\r\n var baseSize = this.game.scale.baseSize;\r\n\r\n this.resize(baseSize.width, baseSize.height, this.game.scale.resolution);\r\n },\r\n\r\n /**\r\n * The event handler that manages the `resize` event dispatched by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#onResize\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Structs.Size} gameSize - The default Game Size object. This is the un-modified game dimensions.\r\n * @param {Phaser.Structs.Size} baseSize - The base Size object. The game dimensions multiplied by the resolution. The canvas width / height values match this.\r\n * @param {Phaser.Structs.Size} displaySize - The display Size object. The size of the canvas style width / height attributes.\r\n * @param {number} [resolution] - The Scale Manager resolution setting.\r\n */\r\n onResize: function (gameSize, baseSize, displaySize, resolution)\r\n {\r\n // Has the underlying canvas size changed?\r\n if (baseSize.width !== this.width || baseSize.height !== this.height || resolution !== this.resolution)\r\n {\r\n this.resize(baseSize.width, baseSize.height, resolution);\r\n }\r\n },\r\n\r\n /**\r\n * Resizes the drawing buffer to match that required by the Scale Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} [width] - The new width of the renderer.\r\n * @param {number} [height] - The new height of the renderer.\r\n * @param {number} [resolution] - The new resolution of the renderer.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n this.width = width;\r\n this.height = height;\r\n this.resolution = resolution;\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n // Update all registered pipelines\r\n for (var pipelineName in pipelines)\r\n {\r\n pipelines[pipelineName].resize(width, height, resolution);\r\n }\r\n\r\n this.drawingBufferHeight = gl.drawingBufferHeight;\r\n\r\n gl.scissor(0, (gl.drawingBufferHeight - height), width, height);\r\n\r\n this.defaultCamera.setSize(width, height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a WebGL extension is supported\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - Name of the WebGL extension\r\n *\r\n * @return {boolean} `true` if the extension is supported, otherwise `false`.\r\n */\r\n hasExtension: function (extensionName)\r\n {\r\n return this.supportedExtensions ? this.supportedExtensions.indexOf(extensionName) : false;\r\n },\r\n\r\n /**\r\n * Loads a WebGL extension\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getExtension\r\n * @since 3.0.0\r\n *\r\n * @param {string} extensionName - The name of the extension to load.\r\n *\r\n * @return {object} WebGL extension if the extension is supported\r\n */\r\n getExtension: function (extensionName)\r\n {\r\n if (!this.hasExtension(extensionName)) { return null; }\r\n\r\n if (!(extensionName in this.extensions))\r\n {\r\n this.extensions[extensionName] = this.gl.getExtension(extensionName);\r\n }\r\n\r\n return this.extensions[extensionName];\r\n },\r\n\r\n /**\r\n * Flushes the current pipeline if the pipeline is bound\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#flush\r\n * @since 3.0.0\r\n */\r\n flush: function ()\r\n {\r\n if (this.currentPipeline)\r\n {\r\n this.currentPipeline.flush();\r\n }\r\n },\r\n\r\n /**\r\n * Checks if a pipeline is present in the current WebGLRenderer\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {boolean} `true` if the given pipeline is loaded, otherwise `false`.\r\n */\r\n hasPipeline: function (pipelineName)\r\n {\r\n return (pipelineName in this.pipelines);\r\n },\r\n\r\n /**\r\n * Returns the pipeline by name if the pipeline exists\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance, or `null` if not found.\r\n */\r\n getPipeline: function (pipelineName)\r\n {\r\n return (this.hasPipeline(pipelineName)) ? this.pipelines[pipelineName] : null;\r\n },\r\n\r\n /**\r\n * Removes a pipeline by name.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removePipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - The name of the pipeline to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removePipeline: function (pipelineName)\r\n {\r\n delete this.pipelines[pipelineName];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a pipeline instance into the collection of pipelines\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {string} pipelineName - A unique string-based key for the pipeline.\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - A pipeline instance which must extend WebGLPipeline.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline instance that was passed.\r\n */\r\n addPipeline: function (pipelineName, pipelineInstance)\r\n {\r\n if (!this.hasPipeline(pipelineName))\r\n {\r\n this.pipelines[pipelineName] = pipelineInstance;\r\n }\r\n else\r\n {\r\n console.warn('Pipeline exists: ' + pipelineName);\r\n }\r\n\r\n pipelineInstance.name = pipelineName;\r\n\r\n this.pipelines[pipelineName].resize(this.width, this.height, this.config.resolution);\r\n\r\n return pipelineInstance;\r\n },\r\n\r\n /**\r\n * Pushes a new scissor state. This is used to set nested scissor states.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#pushScissor\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n *\r\n * @return {integer[]} An array containing the scissor values.\r\n */\r\n pushScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var scissorStack = this.scissorStack;\r\n\r\n var scissor = [ x, y, width, height ];\r\n\r\n scissorStack.push(scissor);\r\n\r\n this.setScissor(x, y, width, height, drawingBufferHeight);\r\n\r\n this.currentScissor = scissor;\r\n\r\n return scissor;\r\n },\r\n\r\n /**\r\n * Sets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setScissor\r\n * @since 3.0.0\r\n * \r\n * @param {integer} x - The x position of the scissor.\r\n * @param {integer} y - The y position of the scissor.\r\n * @param {integer} width - The width of the scissor.\r\n * @param {integer} height - The height of the scissor.\r\n * @param {integer} [drawingBufferHeight] - Optional drawingBufferHeight override value.\r\n */\r\n setScissor: function (x, y, width, height, drawingBufferHeight)\r\n {\r\n if (drawingBufferHeight === undefined) { drawingBufferHeight = this.drawingBufferHeight; }\r\n\r\n var gl = this.gl;\r\n\r\n var current = this.currentScissor;\r\n\r\n var setScissor = (width > 0 && height > 0);\r\n\r\n if (current && setScissor)\r\n {\r\n var cx = current[0];\r\n var cy = current[1];\r\n var cw = current[2];\r\n var ch = current[3];\r\n\r\n setScissor = (cx !== x || cy !== y || cw !== width || ch !== height);\r\n }\r\n\r\n if (setScissor)\r\n {\r\n this.flush();\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/scissor\r\n gl.scissor(x, (drawingBufferHeight - y - height), width, height);\r\n }\r\n },\r\n\r\n /**\r\n * Pops the last scissor state and sets it.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#popScissor\r\n * @since 3.0.0\r\n */\r\n popScissor: function ()\r\n {\r\n var scissorStack = this.scissorStack;\r\n\r\n // Remove the current scissor\r\n scissorStack.pop();\r\n\r\n // Reset the previous scissor\r\n var scissor = scissorStack[scissorStack.length - 1];\r\n\r\n if (scissor)\r\n {\r\n this.setScissor(scissor[0], scissor[1], scissor[2], scissor[3]);\r\n }\r\n\r\n this.currentScissor = scissor;\r\n },\r\n\r\n /**\r\n * Binds a WebGLPipeline and sets it as the current pipeline to be used.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setPipeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {Phaser.Renderer.WebGL.WebGLPipeline} The pipeline that was activated.\r\n */\r\n setPipeline: function (pipelineInstance, gameObject)\r\n {\r\n if (this.currentPipeline !== pipelineInstance ||\r\n this.currentPipeline.vertexBuffer !== this.currentVertexBuffer ||\r\n this.currentPipeline.program !== this.currentProgram)\r\n {\r\n this.flush();\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n }\r\n\r\n this.currentPipeline.onBind(gameObject);\r\n\r\n return this.currentPipeline;\r\n },\r\n\r\n /**\r\n * Is there an active stencil mask?\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#hasActiveStencilMask\r\n * @since 3.17.0\r\n * \r\n * @return {boolean} `true` if there is an active stencil mask, otherwise `false`.\r\n */\r\n hasActiveStencilMask: function ()\r\n {\r\n var mask = this.currentMask.mask;\r\n var camMask = this.currentCameraMask.mask;\r\n\r\n return ((mask && mask.isStencil) || (camMask && camMask.isStencil));\r\n },\r\n\r\n /**\r\n * Use this to reset the gl context to the state that Phaser requires to continue rendering.\r\n * Calling this will:\r\n * \r\n * * Disable `DEPTH_TEST`, `CULL_FACE` and `STENCIL_TEST`.\r\n * * Clear the depth buffer and stencil buffers.\r\n * * Reset the viewport size.\r\n * * Reset the blend mode.\r\n * * Bind a blank texture as the active texture on texture unit zero.\r\n * * Rebinds the given pipeline instance.\r\n * \r\n * You should call this having previously called `clearPipeline` and then wishing to return\r\n * control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#rebindPipeline\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Renderer.WebGL.WebGLPipeline} pipelineInstance - The pipeline instance to be activated.\r\n */\r\n rebindPipeline: function (pipelineInstance)\r\n {\r\n var gl = this.gl;\r\n\r\n gl.disable(gl.DEPTH_TEST);\r\n gl.disable(gl.CULL_FACE);\r\n\r\n if (this.hasActiveStencilMask())\r\n {\r\n gl.clear(gl.DEPTH_BUFFER_BIT);\r\n }\r\n else\r\n {\r\n // If there wasn't a stencil mask set before this call, we can disable it safely\r\n gl.disable(gl.STENCIL_TEST);\r\n gl.clear(gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.viewport(0, 0, this.width, this.height);\r\n\r\n this.setBlendMode(0, true);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, this.blankTexture.glTexture);\r\n\r\n this.currentActiveTextureUnit = 0;\r\n this.currentTextures[0] = this.blankTexture.glTexture;\r\n\r\n this.currentPipeline = pipelineInstance;\r\n this.currentPipeline.bind();\r\n this.currentPipeline.onBind();\r\n },\r\n\r\n /**\r\n * Flushes the current WebGLPipeline being used and then clears it, along with the\r\n * the current shader program and vertex buffer. Then resets the blend mode to NORMAL.\r\n * Call this before jumping to your own gl context handler, and then call `rebindPipeline` when\r\n * you wish to return control to Phaser again.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#clearPipeline\r\n * @since 3.16.0\r\n */\r\n clearPipeline: function ()\r\n {\r\n this.flush();\r\n\r\n this.currentPipeline = null;\r\n this.currentProgram = null;\r\n this.currentVertexBuffer = null;\r\n this.currentIndexBuffer = null;\r\n\r\n this.setBlendMode(0, true);\r\n },\r\n\r\n /**\r\n * Sets the blend mode to the value given.\r\n *\r\n * If the current blend mode is different from the one given, the pipeline is flushed and the new\r\n * blend mode is enabled.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} blendModeId - The blend mode to be set. Can be a `BlendModes` const or an integer value.\r\n * @param {boolean} [force=false] - Force the blend mode to be set, regardless of the currently set blend mode.\r\n *\r\n * @return {boolean} `true` if the blend mode was changed as a result of this call, forcing a flush, otherwise `false`.\r\n */\r\n setBlendMode: function (blendModeId, force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n var gl = this.gl;\r\n var blendMode = this.blendModes[blendModeId];\r\n\r\n if (force || (blendModeId !== CONST.BlendModes.SKIP_CHECK && this.currentBlendMode !== blendModeId))\r\n {\r\n this.flush();\r\n\r\n gl.enable(gl.BLEND);\r\n gl.blendEquation(blendMode.equation);\r\n\r\n if (blendMode.func.length > 2)\r\n {\r\n gl.blendFuncSeparate(blendMode.func[0], blendMode.func[1], blendMode.func[2], blendMode.func[3]);\r\n }\r\n else\r\n {\r\n gl.blendFunc(blendMode.func[0], blendMode.func[1]);\r\n }\r\n\r\n this.currentBlendMode = blendModeId;\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Creates a new custom blend mode for the renderer.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Blending_modes\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#addBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {GLenum[]} func - An array containing the WebGL functions to use for the source and the destination blending factors, respectively. See the possible constants for {@link WebGLRenderingContext#blendFunc()}.\r\n * @param {GLenum} equation - The equation to use for combining the RGB and alpha components of a new pixel with a rendered one. See the possible constants for {@link WebGLRenderingContext#blendEquation()}.\r\n *\r\n * @return {integer} The index of the new blend mode, used for referencing it in the future.\r\n */\r\n addBlendMode: function (func, equation)\r\n {\r\n var index = this.blendModes.push({ func: func, equation: equation });\r\n\r\n return index - 1;\r\n },\r\n\r\n /**\r\n * Updates the function bound to a given custom blend mode.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#updateBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode.\r\n * @param {function} func - The function to use for the blend mode.\r\n * @param {function} equation - The equation to use for the blend mode.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n updateBlendMode: function (index, func, equation)\r\n {\r\n if (this.blendModes[index])\r\n {\r\n this.blendModes[index].func = func;\r\n\r\n if (equation)\r\n {\r\n this.blendModes[index].equation = equation;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a custom blend mode from the renderer.\r\n * Any Game Objects still using this blend mode will error, so be sure to clear them first.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#removeBlendMode\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the custom blend mode to be removed.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n removeBlendMode: function (index)\r\n {\r\n if (index > 17 && this.blendModes[index])\r\n {\r\n this.blendModes.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current active texture for texture unit zero to be a blank texture.\r\n * This only happens if there isn't a texture already in use by texture unit zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setBlankTexture\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [force=false] - Force a blank texture set, regardless of what's already bound?\r\n */\r\n setBlankTexture: function (force)\r\n {\r\n if (force === undefined) { force = false; }\r\n\r\n if (force || this.currentActiveTextureUnit !== 0 || !this.currentTextures[0])\r\n {\r\n this.setTexture2D(this.blankTexture.glTexture, 0);\r\n }\r\n },\r\n\r\n /**\r\n * Binds a texture at a texture unit. If a texture is already\r\n * bound to that unit it will force a flush on the current pipeline.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL texture that needs to be bound.\r\n * @param {integer} textureUnit - The texture unit to which the texture will be bound.\r\n * @param {boolean} [flush=true] - Will the current pipeline be flushed if this is a new texture, or not?\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setTexture2D: function (texture, textureUnit, flush)\r\n {\r\n if (flush === undefined) { flush = true; }\r\n\r\n var gl = this.gl;\r\n\r\n if (texture !== this.currentTextures[textureUnit])\r\n {\r\n if (flush)\r\n {\r\n this.flush();\r\n }\r\n\r\n if (this.currentActiveTextureUnit !== textureUnit)\r\n {\r\n gl.activeTexture(gl.TEXTURE0 + textureUnit);\r\n\r\n this.currentActiveTextureUnit = textureUnit;\r\n }\r\n\r\n gl.bindTexture(gl.TEXTURE_2D, texture);\r\n\r\n this.currentTextures[textureUnit] = texture;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a framebuffer. If there was another framebuffer already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer that needs to be bound.\r\n * @param {boolean} [updateScissor=false] - If a framebuffer is given, set the gl scissor to match the frame buffer size? Or, if `null` given, pop the scissor from the stack.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setFramebuffer: function (framebuffer, updateScissor)\r\n {\r\n if (updateScissor === undefined) { updateScissor = false; }\r\n\r\n var gl = this.gl;\r\n\r\n var width = this.width;\r\n var height = this.height;\r\n\r\n if (framebuffer !== this.currentFramebuffer)\r\n {\r\n if (framebuffer && framebuffer.renderTexture)\r\n {\r\n width = framebuffer.renderTexture.width;\r\n height = framebuffer.renderTexture.height;\r\n }\r\n else\r\n {\r\n this.flush();\r\n }\r\n\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, framebuffer);\r\n\r\n gl.viewport(0, 0, width, height);\r\n\r\n if (updateScissor)\r\n {\r\n if (framebuffer)\r\n {\r\n this.drawingBufferHeight = height;\r\n\r\n this.pushScissor(0, 0, width, height);\r\n }\r\n else\r\n {\r\n this.drawingBufferHeight = this.height;\r\n\r\n this.popScissor();\r\n }\r\n }\r\n\r\n this.currentFramebuffer = framebuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds a program. If there was another program already bound it will force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The program that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setProgram: function (program)\r\n {\r\n var gl = this.gl;\r\n\r\n if (program !== this.currentProgram)\r\n {\r\n this.flush();\r\n\r\n gl.useProgram(program);\r\n\r\n this.currentProgram = program;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a vertex buffer. If there is a vertex buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The buffer that needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setVertexBuffer: function (vertexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (vertexBuffer !== this.currentVertexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ARRAY_BUFFER, vertexBuffer);\r\n\r\n this.currentVertexBuffer = vertexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Bounds a index buffer. If there is a index buffer already bound it'll force a pipeline flush.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} indexBuffer - The buffer the needs to be bound.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n setIndexBuffer: function (indexBuffer)\r\n {\r\n var gl = this.gl;\r\n\r\n if (indexBuffer !== this.currentIndexBuffer)\r\n {\r\n this.flush();\r\n\r\n gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, indexBuffer);\r\n\r\n this.currentIndexBuffer = indexBuffer;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a texture from an image source. If the source is not valid it creates an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTextureFromSource\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source of the texture.\r\n * @param {integer} width - The width of the texture.\r\n * @param {integer} height - The height of the texture.\r\n * @param {integer} scaleMode - The scale mode to be used by the texture.\r\n *\r\n * @return {?WebGLTexture} The WebGL Texture that was created, or `null` if it couldn't be created.\r\n */\r\n createTextureFromSource: function (source, width, height, scaleMode)\r\n {\r\n var gl = this.gl;\r\n var filter = gl.NEAREST;\r\n var wrap = gl.CLAMP_TO_EDGE;\r\n var texture = null;\r\n\r\n width = source ? source.width : width;\r\n height = source ? source.height : height;\r\n\r\n if (IsSizePowerOfTwo(width, height))\r\n {\r\n wrap = gl.REPEAT;\r\n }\r\n\r\n if (scaleMode === CONST.ScaleModes.LINEAR && this.config.antialias)\r\n {\r\n filter = gl.LINEAR;\r\n }\r\n\r\n if (!source && typeof width === 'number' && typeof height === 'number')\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, null, width, height);\r\n }\r\n else\r\n {\r\n texture = this.createTexture2D(0, filter, filter, wrap, wrap, gl.RGBA, source);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * A wrapper for creating a WebGLTexture. If no pixel data is passed it will create an empty texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createTexture2D\r\n * @since 3.0.0\r\n *\r\n * @param {integer} mipLevel - Mip level of the texture.\r\n * @param {integer} minFilter - Filtering of the texture.\r\n * @param {integer} magFilter - Filtering of the texture.\r\n * @param {integer} wrapT - Wrapping mode of the texture.\r\n * @param {integer} wrapS - Wrapping mode of the texture.\r\n * @param {integer} format - Which format does the texture use.\r\n * @param {object} pixels - pixel data.\r\n * @param {integer} width - Width of the texture in pixels.\r\n * @param {integer} height - Height of the texture in pixels.\r\n * @param {boolean} pma - Does the texture have premultiplied alpha?\r\n *\r\n * @return {WebGLTexture} The WebGLTexture that was created.\r\n */\r\n createTexture2D: function (mipLevel, minFilter, magFilter, wrapT, wrapS, format, pixels, width, height, pma)\r\n {\r\n pma = (pma === undefined || pma === null) ? true : pma;\r\n\r\n var gl = this.gl;\r\n var texture = gl.createTexture();\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, minFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, magFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, wrapS);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, wrapT);\r\n gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, pma);\r\n\r\n if (pixels === null || pixels === undefined)\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, width, height, 0, format, gl.UNSIGNED_BYTE, null);\r\n }\r\n else\r\n {\r\n gl.texImage2D(gl.TEXTURE_2D, mipLevel, format, format, gl.UNSIGNED_BYTE, pixels);\r\n\r\n width = pixels.width;\r\n height = pixels.height;\r\n }\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n texture.isAlphaPremultiplied = pma;\r\n texture.isRenderTexture = false;\r\n texture.width = width;\r\n texture.height = height;\r\n\r\n this.nativeTextures.push(texture);\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Wrapper for creating WebGLFramebuffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {integer} width - Width in pixels of the framebuffer\r\n * @param {integer} height - Height in pixels of the framebuffer\r\n * @param {WebGLTexture} renderTexture - The color texture to where the color pixels are written\r\n * @param {boolean} addDepthStencilBuffer - Indicates if the current framebuffer support depth and stencil buffers\r\n *\r\n * @return {WebGLFramebuffer} Raw WebGLFramebuffer\r\n */\r\n createFramebuffer: function (width, height, renderTexture, addDepthStencilBuffer)\r\n {\r\n var gl = this.gl;\r\n var framebuffer = gl.createFramebuffer();\r\n var complete = 0;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n if (addDepthStencilBuffer)\r\n {\r\n var depthStencilBuffer = gl.createRenderbuffer();\r\n gl.bindRenderbuffer(gl.RENDERBUFFER, depthStencilBuffer);\r\n gl.renderbufferStorage(gl.RENDERBUFFER, gl.DEPTH_STENCIL, width, height);\r\n gl.framebufferRenderbuffer(gl.FRAMEBUFFER, gl.DEPTH_STENCIL_ATTACHMENT, gl.RENDERBUFFER, depthStencilBuffer);\r\n }\r\n\r\n renderTexture.isRenderTexture = true;\r\n renderTexture.isAlphaPremultiplied = false;\r\n\r\n gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, renderTexture, 0);\r\n\r\n complete = gl.checkFramebufferStatus(gl.FRAMEBUFFER);\r\n\r\n if (complete !== gl.FRAMEBUFFER_COMPLETE)\r\n {\r\n var errors = {\r\n 36054: 'Incomplete Attachment',\r\n 36055: 'Missing Attachment',\r\n 36057: 'Incomplete Dimensions',\r\n 36061: 'Framebuffer Unsupported'\r\n };\r\n\r\n throw new Error('Framebuffer incomplete. Framebuffer status: ' + errors[complete]);\r\n }\r\n\r\n framebuffer.renderTexture = renderTexture;\r\n\r\n this.setFramebuffer(null);\r\n\r\n return framebuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createProgram\r\n * @since 3.0.0\r\n *\r\n * @param {string} vertexShader - Source to the vertex shader\r\n * @param {string} fragmentShader - Source to the fragment shader\r\n *\r\n * @return {WebGLProgram} Raw WebGLProgram\r\n */\r\n createProgram: function (vertexShader, fragmentShader)\r\n {\r\n var gl = this.gl;\r\n var program = gl.createProgram();\r\n var vs = gl.createShader(gl.VERTEX_SHADER);\r\n var fs = gl.createShader(gl.FRAGMENT_SHADER);\r\n\r\n gl.shaderSource(vs, vertexShader);\r\n gl.shaderSource(fs, fragmentShader);\r\n gl.compileShader(vs);\r\n gl.compileShader(fs);\r\n\r\n if (!gl.getShaderParameter(vs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Vertex Shader:\\n' + gl.getShaderInfoLog(vs));\r\n }\r\n if (!gl.getShaderParameter(fs, gl.COMPILE_STATUS))\r\n {\r\n throw new Error('Failed to compile Fragment Shader:\\n' + gl.getShaderInfoLog(fs));\r\n }\r\n\r\n gl.attachShader(program, vs);\r\n gl.attachShader(program, fs);\r\n gl.linkProgram(program);\r\n\r\n if (!gl.getProgramParameter(program, gl.LINK_STATUS))\r\n {\r\n throw new Error('Failed to link program:\\n' + gl.getProgramInfoLog(program));\r\n }\r\n\r\n return program;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createVertexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - It's either ArrayBuffer or an integer indicating the size of the vbo\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW\r\n *\r\n * @return {WebGLBuffer} Raw vertex buffer\r\n */\r\n createVertexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var vertexBuffer = gl.createBuffer();\r\n\r\n this.setVertexBuffer(vertexBuffer);\r\n\r\n gl.bufferData(gl.ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setVertexBuffer(null);\r\n\r\n return vertexBuffer;\r\n },\r\n\r\n /**\r\n * Wrapper for creating a vertex buffer.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#createIndexBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {ArrayBuffer} initialDataOrSize - Either ArrayBuffer or an integer indicating the size of the vbo.\r\n * @param {integer} bufferUsage - How the buffer is used. gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW.\r\n *\r\n * @return {WebGLBuffer} Raw index buffer\r\n */\r\n createIndexBuffer: function (initialDataOrSize, bufferUsage)\r\n {\r\n var gl = this.gl;\r\n var indexBuffer = gl.createBuffer();\r\n\r\n this.setIndexBuffer(indexBuffer);\r\n\r\n gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, initialDataOrSize, bufferUsage);\r\n\r\n this.setIndexBuffer(null);\r\n\r\n return indexBuffer;\r\n },\r\n\r\n /**\r\n * Removes the given texture from the nativeTextures array and then deletes it from the GPU.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteTexture\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLTexture} texture - The WebGL Texture to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteTexture: function (texture)\r\n {\r\n var index = this.nativeTextures.indexOf(texture);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(this.nativeTextures, index);\r\n }\r\n\r\n this.gl.deleteTexture(texture);\r\n\r\n if (this.currentTextures[0] === texture && !this.game.pendingDestroy)\r\n {\r\n // texture we just deleted is in use, so bind a blank texture\r\n this.setBlankTexture(true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLFramebuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteFramebuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The Framebuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteFramebuffer: function (framebuffer)\r\n {\r\n this.gl.deleteFramebuffer(framebuffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLProgram from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteProgram\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The shader program to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteProgram: function (program)\r\n {\r\n this.gl.deleteProgram(program);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Deletes a WebGLBuffer from the GL instance.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#deleteBuffer\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLBuffer} vertexBuffer - The WebGLBuffer to be deleted.\r\n *\r\n * @return {this} This WebGLRenderer instance.\r\n */\r\n deleteBuffer: function (buffer)\r\n {\r\n this.gl.deleteBuffer(buffer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Controls the pre-render operations for the given camera.\r\n * Handles any clipping needed by the camera and renders the background color if a color is visible.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to pre-render.\r\n */\r\n preRenderCamera: function (camera)\r\n {\r\n var cx = camera._cx;\r\n var cy = camera._cy;\r\n var cw = camera._cw;\r\n var ch = camera._ch;\r\n\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n var color = camera.backgroundColor;\r\n\r\n if (camera.renderToTexture)\r\n {\r\n this.flush();\r\n\r\n this.pushScissor(cx, cy, cw, -ch);\r\n\r\n this.setFramebuffer(camera.framebuffer);\r\n\r\n var gl = this.gl;\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n TextureTintPipeline.projOrtho(cx, cw + cx, cy, ch + cy, -1000, 1000);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw + cx, ch + cy,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n \r\n camera.emit(CameraEvents.PRE_RENDER, camera);\r\n }\r\n else\r\n {\r\n this.pushScissor(cx, cy, cw, ch);\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = camera.mask;\r\n this.currentCameraMask.camera = camera._maskCamera;\r\n\r\n camera.mask.preRenderWebGL(this, camera, camera._maskCamera);\r\n }\r\n\r\n if (color.alphaGL > 0)\r\n {\r\n TextureTintPipeline.drawFillRect(\r\n cx, cy, cw , ch,\r\n Utils.getTintFromFloats(color.redGL, color.greenGL, color.blueGL, 1),\r\n color.alphaGL\r\n );\r\n }\r\n }\r\n },\r\n\r\n getCurrentStencilMask: function ()\r\n {\r\n var prev = null;\r\n var stack = this.maskStack;\r\n var cameraMask = this.currentCameraMask;\r\n\r\n if (stack.length > 0)\r\n {\r\n prev = stack[stack.length - 1];\r\n }\r\n else if (cameraMask.mask && cameraMask.mask.isStencil)\r\n {\r\n prev = cameraMask;\r\n }\r\n\r\n return prev;\r\n },\r\n\r\n /**\r\n * Controls the post-render operations for the given camera.\r\n * Renders the foreground camera effects like flash and fading. It resets the current scissor state.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRenderCamera\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to post-render.\r\n */\r\n postRenderCamera: function (camera)\r\n {\r\n var TextureTintPipeline = this.pipelines.TextureTintPipeline;\r\n\r\n camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n camera.fadeEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats);\r\n\r\n camera.dirty = false;\r\n\r\n this.popScissor();\r\n\r\n if (camera.renderToTexture)\r\n {\r\n TextureTintPipeline.flush();\r\n\r\n this.setFramebuffer(null);\r\n\r\n camera.emit(CameraEvents.POST_RENDER, camera);\r\n\r\n TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0);\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline;\r\n\r\n pipeline.batchTexture(\r\n camera,\r\n camera.glTexture,\r\n camera.width, camera.height,\r\n camera.x, camera.y,\r\n camera.width, camera.height,\r\n camera.zoom, camera.zoom,\r\n camera.rotation,\r\n camera.flipX, !camera.flipY,\r\n 1, 1,\r\n 0, 0,\r\n 0, 0, camera.width, camera.height,\r\n getTint(camera._tintTL, camera._alphaTL),\r\n getTint(camera._tintTR, camera._alphaTR),\r\n getTint(camera._tintBL, camera._alphaBL),\r\n getTint(camera._tintBR, camera._alphaBR),\r\n (camera._isTinted && camera.tintFill),\r\n 0, 0,\r\n this.defaultCamera,\r\n null\r\n );\r\n\r\n // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it\r\n this.setBlankTexture(true);\r\n }\r\n\r\n if (camera.mask)\r\n {\r\n this.currentCameraMask.mask = null;\r\n\r\n camera.mask.postRenderWebGL(this, camera._maskCamera);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the current vertex buffer and updates pipelines.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#preRender\r\n * @since 3.0.0\r\n */\r\n preRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var gl = this.gl;\r\n var pipelines = this.pipelines;\r\n\r\n // Make sure we are bound to the main frame buffer\r\n gl.bindFramebuffer(gl.FRAMEBUFFER, null);\r\n\r\n if (this.config.clearBeforeRender)\r\n {\r\n var clearColor = this.config.backgroundColor;\r\n\r\n gl.clearColor(clearColor.redGL, clearColor.greenGL, clearColor.blueGL, clearColor.alphaGL);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT | gl.STENCIL_BUFFER_BIT);\r\n }\r\n\r\n gl.enable(gl.SCISSOR_TEST);\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPreRender();\r\n }\r\n\r\n // TODO - Find a way to stop needing to create these arrays every frame\r\n // and equally not need a huge array buffer created to hold them\r\n\r\n this.currentScissor = [ 0, 0, this.width, this.height ];\r\n this.scissorStack = [ this.currentScissor ];\r\n\r\n if (this.game.scene.customViewports)\r\n {\r\n gl.scissor(0, (this.drawingBufferHeight - this.height), this.width, this.height);\r\n }\r\n\r\n this.currentMask.mask = null;\r\n this.currentCameraMask.mask = null;\r\n this.maskStack.length = 0;\r\n\r\n this.setPipeline(this.pipelines.TextureTintPipeline);\r\n },\r\n\r\n /**\r\n * The core render step for a Scene Camera.\r\n * \r\n * Iterates through the given Game Object's array and renders them with the given Camera.\r\n * \r\n * This is called by the `CameraManager.render` method. The Camera Manager instance belongs to a Scene, and is invoked\r\n * by the Scene Systems.render method.\r\n * \r\n * This method is not called if `Camera.visible` is `false`, or `Camera.alpha` is zero.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#render\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to render.\r\n * @param {Phaser.GameObjects.GameObject} children - The Game Object's within the Scene to be rendered.\r\n * @param {number} interpolationPercentage - The interpolation percentage to apply. Currently un-used.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera to render with.\r\n */\r\n render: function (scene, children, interpolationPercentage, camera)\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n var list = children.list;\r\n var childCount = list.length;\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onRender(scene, camera);\r\n }\r\n\r\n // Apply scissor for cam region + render background color, if not transparent\r\n this.preRenderCamera(camera);\r\n\r\n // Nothing to render, so bail out\r\n if (childCount === 0)\r\n {\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n\r\n return;\r\n }\r\n\r\n // Reset the current type\r\n this.currentType = '';\r\n \r\n var current = this.currentMask;\r\n\r\n for (var i = 0; i < childCount; i++)\r\n {\r\n var child = list[i];\r\n\r\n if (!child.willRender(camera))\r\n {\r\n continue;\r\n }\r\n\r\n if (child.blendMode !== this.currentBlendMode)\r\n {\r\n this.setBlendMode(child.blendMode);\r\n }\r\n\r\n var mask = child.mask;\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask && current.mask !== mask)\r\n {\r\n // Render out the previously set mask\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n if (mask && current.mask !== mask)\r\n {\r\n mask.preRenderWebGL(this, child, camera);\r\n }\r\n\r\n var type = child.type;\r\n\r\n if (type !== this.currentType)\r\n {\r\n this.newType = true;\r\n this.currentType = type;\r\n }\r\n\r\n this.nextTypeMatch = (i < childCount - 1) ? (list[i + 1].type === this.currentType) : false;\r\n\r\n child.renderWebGL(this, child, interpolationPercentage, camera);\r\n\r\n this.newType = false;\r\n }\r\n\r\n current = this.currentMask;\r\n\r\n if (current.mask)\r\n {\r\n // Render out the previously set mask, if it was the last item in the display list\r\n current.mask.postRenderWebGL(this, current.camera);\r\n }\r\n\r\n this.setBlendMode(CONST.BlendModes.NORMAL);\r\n\r\n // Applies camera effects and pops the scissor, if set\r\n this.postRenderCamera(camera);\r\n },\r\n\r\n /**\r\n * The post-render step happens after all Cameras in all Scenes have been rendered.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#postRender\r\n * @since 3.0.0\r\n */\r\n postRender: function ()\r\n {\r\n if (this.contextLost) { return; }\r\n\r\n this.flush();\r\n\r\n // Unbind custom framebuffer here\r\n\r\n var state = this.snapshotState;\r\n\r\n if (state.callback)\r\n {\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n state.callback = null;\r\n }\r\n\r\n var pipelines = this.pipelines;\r\n\r\n for (var key in pipelines)\r\n {\r\n pipelines[key].onPostRender();\r\n }\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the entire game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture a specific area see the `snapshotArea` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshot\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshot: function (callback, type, encoderOptions)\r\n {\r\n return this.snapshotArea(0, 0, this.gl.drawingBufferWidth, this.gl.drawingBufferHeight, callback, type, encoderOptions);\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given area of the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific pixel, see `snapshotPixel`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotPixel`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotArea\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate to grab from.\r\n * @param {integer} y - The y coordinate to grab from.\r\n * @param {integer} width - The width of the area to grab.\r\n * @param {integer} height - The height of the area to grab.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotArea: function (x, y, width, height, callback, type, encoderOptions)\r\n {\r\n var state = this.snapshotState;\r\n\r\n state.callback = callback;\r\n state.type = type;\r\n state.encoder = encoderOptions;\r\n state.getPixel = false;\r\n state.x = x;\r\n state.y = y;\r\n state.width = Math.min(width, this.gl.drawingBufferWidth);\r\n state.height = Math.min(height, this.gl.drawingBufferHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules a snapshot of the given pixel from the game viewport to be taken after the current frame is rendered.\r\n * \r\n * To capture the whole game viewport see the `snapshot` method. To capture a specific area, see `snapshotArea`.\r\n * \r\n * Only one snapshot can be active _per frame_. If you have already called `snapshotArea`, for example, then\r\n * calling this method will override it.\r\n * \r\n * Unlike the other two snapshot methods, this one will return a `Color` object containing the color data for\r\n * the requested pixel. It doesn't need to create an internal Canvas or Image object, so is a lot faster to execute,\r\n * using less memory.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotPixel\r\n * @since 3.16.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel to get.\r\n * @param {integer} y - The y coordinate of the pixel to get.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot pixel data is extracted.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotPixel: function (x, y, callback)\r\n {\r\n this.snapshotArea(x, y, 1, 1, callback);\r\n\r\n this.snapshotState.getPixel = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a snapshot of the given area of the given frame buffer.\r\n * \r\n * Unlike the other snapshot methods, this one is processed immediately and doesn't wait for the next render.\r\n * \r\n * Snapshots work by using the WebGL `readPixels` feature to grab every pixel from the frame buffer into an ArrayBufferView.\r\n * It then parses this, copying the contents to a temporary Canvas and finally creating an Image object from it,\r\n * which is the image returned to the callback provided. All in all, this is a computationally expensive and blocking process,\r\n * which gets more expensive the larger the canvas size gets, so please be careful how you employ this in your game.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#snapshotFramebuffer\r\n * @since 3.19.0\r\n *\r\n * @param {WebGLFramebuffer} framebuffer - The framebuffer to grab from.\r\n * @param {integer} bufferWidth - The width of the framebuffer.\r\n * @param {integer} bufferHeight - The height of the framebuffer.\r\n * @param {Phaser.Types.Renderer.Snapshot.SnapshotCallback} callback - The Function to invoke after the snapshot image is created.\r\n * @param {boolean} [getPixel=false] - Grab a single pixel as a Color object, or an area as an Image object?\r\n * @param {integer} [x=0] - The x coordinate to grab from.\r\n * @param {integer} [y=0] - The y coordinate to grab from.\r\n * @param {integer} [width=bufferWidth] - The width of the area to grab.\r\n * @param {integer} [height=bufferHeight] - The height of the area to grab.\r\n * @param {string} [type='image/png'] - The format of the image to create, usually `image/png` or `image/jpeg`.\r\n * @param {number} [encoderOptions=0.92] - The image quality, between 0 and 1. Used for image formats with lossy compression, such as `image/jpeg`.\r\n *\r\n * @return {this} This WebGL Renderer.\r\n */\r\n snapshotFramebuffer: function (framebuffer, bufferWidth, bufferHeight, callback, getPixel, x, y, width, height, type, encoderOptions)\r\n {\r\n if (getPixel === undefined) { getPixel = false; }\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = bufferWidth; }\r\n if (height === undefined) { height = bufferHeight; }\r\n\r\n var currentFramebuffer = this.currentFramebuffer;\r\n\r\n this.snapshotArea(x, y, width, height, callback, type, encoderOptions);\r\n\r\n var state = this.snapshotState;\r\n\r\n state.getPixel = getPixel;\r\n\r\n state.isFramebuffer = true;\r\n state.bufferWidth = bufferWidth;\r\n state.bufferHeight = bufferHeight;\r\n\r\n this.setFramebuffer(framebuffer);\r\n\r\n WebGLSnapshot(this.canvas, state);\r\n\r\n this.setFramebuffer(currentFramebuffer);\r\n\r\n state.callback = null;\r\n state.isFramebuffer = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture based on the given canvas element.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#canvasToTexture\r\n * @since 3.0.0\r\n *\r\n * @param {HTMLCanvasElement} srcCanvas - The Canvas element that will be used to populate the texture.\r\n * @param {WebGLTexture} [dstTexture] - Is this going to replace an existing texture? If so, pass it here.\r\n * @param {boolean} [noRepeat=false] - Should this canvas never be allowed to set REPEAT? (such as for Text objects)\r\n *\r\n * @return {WebGLTexture} The newly created WebGL Texture.\r\n */\r\n canvasToTexture: function (srcCanvas, dstTexture, noRepeat)\r\n {\r\n if (noRepeat === undefined) { noRepeat = false; }\r\n\r\n var gl = this.gl;\r\n\r\n if (!dstTexture)\r\n {\r\n var wrapping = gl.CLAMP_TO_EDGE;\r\n\r\n if (!noRepeat && IsSizePowerOfTwo(srcCanvas.width, srcCanvas.height))\r\n {\r\n wrapping = gl.REPEAT;\r\n }\r\n\r\n var filter = (this.config.antialias) ? gl.LINEAR : gl.NEAREST;\r\n\r\n dstTexture = this.createTexture2D(0, filter, filter, wrapping, wrapping, gl.RGBA, srcCanvas, srcCanvas.width, srcCanvas.height, true);\r\n }\r\n else\r\n {\r\n this.setTexture2D(dstTexture, 0);\r\n\r\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, srcCanvas);\r\n\r\n dstTexture.width = srcCanvas.width;\r\n dstTexture.height = srcCanvas.height;\r\n\r\n this.setTexture2D(null, 0);\r\n }\r\n\r\n return dstTexture;\r\n },\r\n\r\n /**\r\n * Sets the minification and magnification filter for a texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setTextureFilter\r\n * @since 3.0.0\r\n *\r\n * @param {integer} texture - The texture to set the filter for.\r\n * @param {integer} filter - The filter to set. 0 for linear filtering, 1 for nearest neighbor (blocky) filtering.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setTextureFilter: function (texture, filter)\r\n {\r\n var gl = this.gl;\r\n var glFilter = [ gl.LINEAR, gl.NEAREST ][filter];\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, glFilter);\r\n gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, glFilter);\r\n\r\n this.setTexture2D(null, 0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1f(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2f(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - [description]\r\n * @param {number} y - [description]\r\n * @param {number} z - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3f(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {number} x - X component\r\n * @param {number} y - Y component\r\n * @param {number} z - Z component\r\n * @param {number} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4f(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat1v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat2v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setFloat3v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v\r\n * @since 3.13.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {Float32Array} arr - The new value to be used for the uniform variable.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n\r\n setFloat4v: function (program, name, arr)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4fv(this.gl.getUniformLocation(program, name), arr);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt1: function (program, name, x)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform1i(this.gl.getUniformLocation(program, name), x);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt2: function (program, name, x, y)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform2i(this.gl.getUniformLocation(program, name), x, y);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - The new X component\r\n * @param {integer} y - The new Y component\r\n * @param {integer} z - The new Z component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt3: function (program, name, x, y, z)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform3i(this.gl.getUniformLocation(program, name), x, y, z);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {integer} x - X component\r\n * @param {integer} y - Y component\r\n * @param {integer} z - Z component\r\n * @param {integer} w - W component\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setInt4: function (program, name, x, y, z, w)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniform4i(this.gl.getUniformLocation(program, name), x, y, z, w);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false.\r\n * @param {Float32Array} matrix - The new matrix value.\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix2: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix2fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - [description]\r\n * @param {Float32Array} matrix - [description]\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix3: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix3fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets uniform of a WebGLProgram\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4\r\n * @since 3.0.0\r\n *\r\n * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up.\r\n * @param {string} name - The name of the uniform to look-up and modify.\r\n * @param {boolean} transpose - Is the matrix transposed\r\n * @param {Float32Array} matrix - Matrix data\r\n *\r\n * @return {this} This WebGL Renderer instance.\r\n */\r\n setMatrix4: function (program, name, transpose, matrix)\r\n {\r\n this.setProgram(program);\r\n\r\n this.gl.uniformMatrix4fv(this.gl.getUniformLocation(program, name), transpose, matrix);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the maximum number of texture units that can be used in a fragment shader.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextures\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum number of textures WebGL supports.\r\n */\r\n getMaxTextures: function ()\r\n {\r\n return this.config.maxTextures;\r\n },\r\n\r\n /**\r\n * Returns the largest texture size (either width or height) that can be created.\r\n * Note that VRAM may not allow a texture of any given size, it just expresses\r\n * hardware / driver support for a given size.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#getMaxTextureSize\r\n * @since 3.8.0\r\n *\r\n * @return {integer} The maximum supported texture size.\r\n */\r\n getMaxTextureSize: function ()\r\n {\r\n return this.config.maxTextureSize;\r\n },\r\n\r\n /**\r\n * Destroy this WebGLRenderer, cleaning up all related resources such as pipelines, native textures, etc.\r\n *\r\n * @method Phaser.Renderer.WebGL.WebGLRenderer#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n // Clear-up anything that should be cleared :)\r\n\r\n for (var i = 0; i < this.nativeTextures.length; i++)\r\n {\r\n this.gl.deleteTexture(this.nativeTextures[i]);\r\n }\r\n\r\n this.nativeTextures = [];\r\n\r\n for (var key in this.pipelines)\r\n {\r\n this.pipelines[key].destroy();\r\n\r\n delete this.pipelines[key];\r\n }\r\n\r\n this.defaultCamera.destroy();\r\n\r\n this.currentMask = null;\r\n this.currentCameraMask = null;\r\n\r\n this.canvas.removeEventListener('webglcontextlost', this.contextLostHandler, false);\r\n this.canvas.removeEventListener('webglcontextrestored', this.contextRestoredHandler, false);\r\n\r\n this.game = null;\r\n this.gl = null;\r\n this.canvas = null;\r\n\r\n this.maskStack = [];\r\n\r\n this.contextLost = true;\r\n\r\n this.extensions = {};\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js?")},"./node_modules/phaser/src/renderer/webgl/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Utils: __webpack_require__(/*! ./Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js"),\r\n WebGLPipeline: __webpack_require__(/*! ./WebGLPipeline */ "./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js"),\r\n WebGLRenderer: __webpack_require__(/*! ./WebGLRenderer */ "./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js"),\r\n Pipelines: __webpack_require__(/*! ./pipelines */ "./node_modules/phaser/src/renderer/webgl/pipelines/index.js"),\r\n\r\n // Constants\r\n BYTE: 0,\r\n SHORT: 1,\r\n UNSIGNED_BYTE: 2,\r\n UNSIGNED_SHORT: 3,\r\n FLOAT: 4\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/index.js?')},"./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/BitmapMask-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/BitmapMask-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * BitmapMaskPipeline handles all bitmap masking rendering in WebGL. It works by using \r\n * sampling two texture on the fragment shader and using the fragment's alpha to clip the region.\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class BitmapMaskPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - Used for overriding shader an pipeline properties if extending this pipeline.\r\n */\r\nvar BitmapMaskPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n \r\n initialize:\r\n\r\n function BitmapMaskPipeline (config)\r\n {\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: (config.topology ? config.topology : config.renderer.gl.TRIANGLES),\r\n vertShader: (config.vertShader ? config.vertShader : ShaderSourceVS),\r\n fragShader: (config.fragShader ? config.fragShader : ShaderSourceFS),\r\n vertexCapacity: (config.vertexCapacity ? config.vertexCapacity : 3),\r\n\r\n vertexSize: (config.vertexSize ? config.vertexSize :\r\n Float32Array.BYTES_PER_ELEMENT * 2),\r\n\r\n vertices: new Float32Array([\r\n -1, +1, -1, -7, +7, +1\r\n ]).buffer,\r\n\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#maxQuads\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = 1;\r\n\r\n /**\r\n * Dirty flag to check if resolution properties need to be updated on the \r\n * masking shader.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resolutionDirty\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.resolutionDirty = true;\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n \r\n if (this.resolutionDirty)\r\n {\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n renderer.setInt1(program, 'uMainSampler', 0);\r\n renderer.setInt1(program, 'uMaskSampler', 1);\r\n this.resolutionDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * [description]\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - [description]\r\n * @param {number} height - [description]\r\n * @param {number} resolution - [description]\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n this.resolutionDirty = true;\r\n return this;\r\n },\r\n\r\n /**\r\n * Binds necessary resources and renders the mask to a separated framebuffer.\r\n * The framebuffer for the masked object is also bound for further use.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#beginMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask.\r\n * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - [description]\r\n */\r\n beginMask: function (mask, maskedObject, camera)\r\n {\r\n var renderer = this.renderer;\r\n var gl = this.gl;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n mask.prevFramebuffer = renderer.currentFramebuffer;\r\n\r\n renderer.setFramebuffer(mask.mainFramebuffer);\r\n\r\n gl.disable(gl.STENCIL_TEST);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n if (renderer.currentCameraMask.mask !== mask)\r\n {\r\n renderer.currentMask.mask = mask;\r\n renderer.currentMask.camera = camera;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The masked game objects framebuffer is unbound and its texture \r\n * is bound together with the mask texture and the mask shader and \r\n * a draw call with a single quad is processed. Here is where the\r\n * masking effect is applied. \r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#endMask\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} mask - GameObject used as a mask.\r\n */\r\n endMask: function (mask, camera)\r\n {\r\n var gl = this.gl;\r\n var renderer = this.renderer;\r\n\r\n // The renderable Game Object that is being used for the bitmap mask\r\n var bitmapMask = mask.bitmapMask;\r\n\r\n if (bitmapMask && gl)\r\n {\r\n renderer.flush();\r\n\r\n // First we draw the mask to the mask fb\r\n renderer.setFramebuffer(mask.maskFramebuffer);\r\n\r\n gl.clearColor(0, 0, 0, 0);\r\n gl.clear(gl.COLOR_BUFFER_BIT);\r\n\r\n renderer.setBlendMode(0, true);\r\n\r\n bitmapMask.renderWebGL(renderer, bitmapMask, 0, camera);\r\n\r\n renderer.flush();\r\n\r\n renderer.setFramebuffer(mask.prevFramebuffer);\r\n\r\n // Is there a stencil further up the stack?\r\n var prev = renderer.getCurrentStencilMask();\r\n\r\n if (prev)\r\n {\r\n gl.enable(gl.STENCIL_TEST);\r\n\r\n prev.mask.applyStencil(renderer, prev.camera, true);\r\n }\r\n else\r\n {\r\n renderer.currentMask.mask = null;\r\n }\r\n\r\n // Bind bitmap mask pipeline and draw\r\n renderer.setPipeline(this);\r\n\r\n gl.activeTexture(gl.TEXTURE1);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.maskTexture);\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n gl.bindTexture(gl.TEXTURE_2D, mask.mainTexture);\r\n\r\n gl.uniform1i(gl.getUniformLocation(this.program, 'uInvertMaskAlpha'), mask.invertAlpha);\r\n\r\n // Finally, draw a triangle filling the whole screen\r\n gl.drawArrays(this.topology, 0, 3);\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BitmapMaskPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/ForwardDiffuse-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js\");\r\nvar TextureTintPipeline = __webpack_require__(/*! ./TextureTintPipeline */ \"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js\");\r\n\r\nvar LIGHT_COUNT = 10;\r\n\r\n/**\r\n * @classdesc\r\n * ForwardDiffuseLightPipeline implements a forward rendering approach for 2D lights.\r\n * This pipeline extends TextureTintPipeline so it implements all it's rendering functions\r\n * and batching system.\r\n *\r\n * @class ForwardDiffuseLightPipeline\r\n * @extends Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration of the pipeline, same as the {@link Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline}. The fragment shader will be replaced with the lighting shader.\r\n */\r\nvar ForwardDiffuseLightPipeline = new Class({\r\n\r\n Extends: TextureTintPipeline,\r\n\r\n initialize:\r\n\r\n function ForwardDiffuseLightPipeline (config)\r\n {\r\n LIGHT_COUNT = config.maxLights;\r\n\r\n config.fragShader = ShaderSourceFS.replace('%LIGHT_COUNT%', LIGHT_COUNT.toString());\r\n\r\n TextureTintPipeline.call(this, config);\r\n\r\n /**\r\n * Default normal map texture to use.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#defaultNormalMap\r\n * @type {Phaser.Texture.Frame}\r\n * @private\r\n * @since 3.11.0\r\n */\r\n this.defaultNormalMap;\r\n\r\n /**\r\n * Inverse rotation matrix for normal map rotations.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#inverseRotationMatrix\r\n * @type {Float32Array}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.inverseRotationMatrix = new Float32Array([\r\n 1, 0, 0,\r\n 0, 1, 0,\r\n 0, 0, 1\r\n ]);\r\n },\r\n\r\n /**\r\n * Called when the Game has fully booted and the Renderer has finished setting up.\r\n * \r\n * By this stage all Game level systems are now in place and you can perform any final\r\n * tasks that the pipeline may need that relied on game systems such as the Texture Manager.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#boot\r\n * @override\r\n * @since 3.11.0\r\n */\r\n boot: function ()\r\n {\r\n this.defaultNormalMap = this.game.textures.getFrame('__DEFAULT');\r\n },\r\n\r\n /**\r\n * This function binds its base class resources and this lights 2D resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onBind\r\n * @override\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.GameObjects.GameObject} [gameObject] - The Game Object that invoked this pipeline, if any.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function (gameObject)\r\n {\r\n TextureTintPipeline.prototype.onBind.call(this);\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n\r\n this.mvpUpdate();\r\n\r\n renderer.setInt1(program, 'uNormSampler', 1);\r\n renderer.setFloat2(program, 'uResolution', this.width, this.height);\r\n\r\n if (gameObject)\r\n {\r\n this.setNormalMap(gameObject);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This function sets all the needed resources for each camera pass.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#onRender\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene being rendered.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onRender: function (scene, camera)\r\n {\r\n this.active = false;\r\n\r\n var lightManager = scene.sys.lights;\r\n\r\n if (!lightManager || lightManager.lights.length <= 0 || !lightManager.active)\r\n {\r\n // Passthru\r\n return this;\r\n }\r\n\r\n var lights = lightManager.cull(camera);\r\n var lightCount = Math.min(lights.length, LIGHT_COUNT);\r\n\r\n if (lightCount === 0)\r\n {\r\n return this;\r\n }\r\n\r\n this.active = true;\r\n\r\n var renderer = this.renderer;\r\n var program = this.program;\r\n var cameraMatrix = camera.matrix;\r\n var point = {x: 0, y: 0};\r\n var height = renderer.height;\r\n var index;\r\n\r\n for (index = 0; index < LIGHT_COUNT; ++index)\r\n {\r\n // Reset lights\r\n renderer.setFloat1(program, 'uLights[' + index + '].radius', 0);\r\n }\r\n\r\n renderer.setFloat4(program, 'uCamera', camera.x, camera.y, camera.rotation, camera.zoom);\r\n renderer.setFloat3(program, 'uAmbientLightColor', lightManager.ambientColor.r, lightManager.ambientColor.g, lightManager.ambientColor.b);\r\n\r\n for (index = 0; index < lightCount; ++index)\r\n {\r\n var light = lights[index];\r\n var lightName = 'uLights[' + index + '].';\r\n\r\n cameraMatrix.transformPoint(light.x, light.y, point);\r\n\r\n renderer.setFloat2(program, lightName + 'position', point.x - (camera.scrollX * light.scrollFactorX * camera.zoom), height - (point.y - (camera.scrollY * light.scrollFactorY) * camera.zoom));\r\n renderer.setFloat3(program, lightName + 'color', light.r, light.g, light.b);\r\n renderer.setFloat1(program, lightName + 'intensity', light.intensity);\r\n renderer.setFloat1(program, lightName + 'radius', light.radius);\r\n }\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad\r\n * @param {integer} textureWidth - Real texture width\r\n * @param {integer} textureHeight - Real texture height\r\n * @param {number} srcX - X coordinate of the quad\r\n * @param {number} srcY - Y coordinate of the quad\r\n * @param {number} srcWidth - Width of the quad\r\n * @param {number} srcHeight - Height of the quad\r\n * @param {number} scaleX - X component of scale\r\n * @param {number} scaleY - Y component of scale\r\n * @param {number} rotation - Rotation of the quad\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll\r\n * @param {number} displayOriginX - Horizontal origin in pixels\r\n * @param {number} displayOriginY - Vertical origin in pixels\r\n * @param {number} frameX - X coordinate of the texture frame\r\n * @param {number} frameY - Y coordinate of the texture frame\r\n * @param {number} frameWidth - Width of the texture frame\r\n * @param {number} frameHeight - Height of the texture frame\r\n * @param {integer} tintTL - Tint for top left\r\n * @param {integer} tintTR - Tint for top right\r\n * @param {integer} tintBL - Tint for bottom left\r\n * @param {integer} tintBR - Tint for bottom right\r\n * @param {number} tintEffect - The tint effect (0 for additive, 1 for replacement)\r\n * @param {number} uOffset - Horizontal offset on texture coordinate\r\n * @param {number} vOffset - Vertical offset on texture coordinate\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n this.renderer.setPipeline(this);\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.displayTexture)\r\n {\r\n normalTexture = gameObject.displayTexture.dataSource[gameObject.displayFrame.sourceIndex];\r\n }\r\n else if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n else if (gameObject.tileset)\r\n {\r\n normalTexture = gameObject.tileset.image.dataSource[0];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n console.warn('Normal map missing or invalid');\r\n return;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(rotation);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n // var x = -displayOriginX + frameX;\r\n // var y = -displayOriginY + frameY;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n // Do we need this? (doubt it)\r\n // if (camera.roundPixels)\r\n // {\r\n // x |= 0;\r\n // y |= 0;\r\n // }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Sets the Game Objects normal map as the active texture.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMap\r\n * @since 3.11.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to update.\r\n */\r\n setNormalMap: function (gameObject)\r\n {\r\n if (!this.active || !gameObject)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture;\r\n\r\n if (gameObject.texture)\r\n {\r\n normalTexture = gameObject.texture.dataSource[gameObject.frame.sourceIndex];\r\n }\r\n\r\n if (!normalTexture)\r\n {\r\n normalTexture = this.defaultNormalMap;\r\n }\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n\r\n this.renderer.setPipeline(gameObject.defaultPipeline);\r\n },\r\n\r\n /**\r\n * Rotates the normal map vectors inversely by the given angle.\r\n * Only works in 2D space.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#setNormalMapRotation\r\n * @since 3.16.0\r\n * \r\n * @param {number} rotation - The angle of rotation in radians.\r\n */\r\n setNormalMapRotation: function (rotation)\r\n {\r\n var inverseRotationMatrix = this.inverseRotationMatrix;\r\n\r\n if (rotation)\r\n {\r\n var rot = -rotation;\r\n var c = Math.cos(rot);\r\n var s = Math.sin(rot);\r\n\r\n inverseRotationMatrix[1] = s;\r\n inverseRotationMatrix[3] = -s;\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = c;\r\n }\r\n else\r\n {\r\n inverseRotationMatrix[0] = inverseRotationMatrix[4] = 1;\r\n inverseRotationMatrix[1] = inverseRotationMatrix[3] = 0;\r\n }\r\n\r\n this.renderer.setMatrix3(this.program, 'uInverseRotationMatrix', false, inverseRotationMatrix);\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, which has a normal texture and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.ForwardDiffuseLightPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Sprite} sprite - The texture-based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n if (!this.active)\r\n {\r\n return;\r\n }\r\n\r\n var normalTexture = sprite.texture.dataSource[sprite.frame.sourceIndex];\r\n\r\n if (normalTexture)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n this.setTexture2D(normalTexture.glTexture, 1);\r\n this.setNormalMapRotation(sprite.rotation);\r\n\r\n TextureTintPipeline.prototype.batchSprite.call(this, sprite, camera, parentTransformMatrix);\r\n }\r\n }\r\n\r\n});\r\n\r\nForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT;\r\n\r\nmodule.exports = ForwardDiffuseLightPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Felipe Alfonso <@bitnenfer>\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Earcut = __webpack_require__(/*! ../../../geom/polygon/Earcut */ \"./node_modules/phaser/src/geom/polygon/Earcut.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ModelViewProjection = __webpack_require__(/*! ./components/ModelViewProjection */ \"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js\");\r\nvar ShaderSourceFS = __webpack_require__(/*! ../shaders/TextureTint-frag.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js\");\r\nvar ShaderSourceVS = __webpack_require__(/*! ../shaders/TextureTint-vert.js */ \"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\nvar WebGLPipeline = __webpack_require__(/*! ../WebGLPipeline */ \"./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js\");\r\n\r\n/**\r\n * @classdesc\r\n * TextureTintPipeline implements the rendering infrastructure\r\n * for displaying textured objects\r\n * The config properties are:\r\n * - game: Current game instance.\r\n * - renderer: Current WebGL renderer.\r\n * - topology: This indicates how the primitives are rendered. The default value is GL_TRIANGLES.\r\n * Here is the full list of rendering primitives (https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants).\r\n * - vertShader: Source for vertex shader as a string.\r\n * - fragShader: Source for fragment shader as a string.\r\n * - vertexCapacity: The amount of vertices that shall be allocated\r\n * - vertexSize: The size of a single vertex in bytes.\r\n *\r\n * @class TextureTintPipeline\r\n * @extends Phaser.Renderer.WebGL.WebGLPipeline\r\n * @memberof Phaser.Renderer.WebGL.Pipelines\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration options for this Texture Tint Pipeline, as described above.\r\n */\r\nvar TextureTintPipeline = new Class({\r\n\r\n Extends: WebGLPipeline,\r\n\r\n Mixins: [\r\n ModelViewProjection\r\n ],\r\n\r\n initialize:\r\n\r\n function TextureTintPipeline (config)\r\n {\r\n var rendererConfig = config.renderer.config;\r\n\r\n // Vertex Size = attribute size added together (2 + 2 + 1 + 4)\r\n\r\n WebGLPipeline.call(this, {\r\n game: config.game,\r\n renderer: config.renderer,\r\n gl: config.renderer.gl,\r\n topology: GetFastValue(config, 'topology', config.renderer.gl.TRIANGLES),\r\n vertShader: GetFastValue(config, 'vertShader', ShaderSourceVS),\r\n fragShader: GetFastValue(config, 'fragShader', ShaderSourceFS),\r\n vertexCapacity: GetFastValue(config, 'vertexCapacity', 6 * rendererConfig.batchSize),\r\n vertexSize: GetFastValue(config, 'vertexSize', Float32Array.BYTES_PER_ELEMENT * 5 + Uint8Array.BYTES_PER_ELEMENT * 4),\r\n attributes: [\r\n {\r\n name: 'inPosition',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: 0\r\n },\r\n {\r\n name: 'inTexCoord',\r\n size: 2,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 2\r\n },\r\n {\r\n name: 'inTintEffect',\r\n size: 1,\r\n type: config.renderer.gl.FLOAT,\r\n normalized: false,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 4\r\n },\r\n {\r\n name: 'inTint',\r\n size: 4,\r\n type: config.renderer.gl.UNSIGNED_BYTE,\r\n normalized: true,\r\n offset: Float32Array.BYTES_PER_ELEMENT * 5\r\n }\r\n ]\r\n });\r\n\r\n /**\r\n * Float32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewF32\r\n * @type {Float32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = new Float32Array(this.vertexData);\r\n\r\n /**\r\n * Uint32 view of the array buffer containing the pipeline's vertices.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#vertexViewU32\r\n * @type {Uint32Array}\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = new Uint32Array(this.vertexData);\r\n\r\n /**\r\n * Size of the batch.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#maxQuads\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.maxQuads = rendererConfig.batchSize;\r\n\r\n /**\r\n * Collection of batch information\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batches\r\n * @type {array}\r\n * @since 3.1.0\r\n */\r\n this.batches = [];\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix1\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix1 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix2\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix2 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix3\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix3 = new TransformMatrix();\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#_tempMatrix4\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.11.0\r\n */\r\n this._tempMatrix4 = new TransformMatrix();\r\n\r\n /**\r\n * Used internally to draw stroked triangles.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tempTriangle\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tempTriangle = [\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 },\r\n { x: 0, y: 0, width: 0 }\r\n ];\r\n\r\n /**\r\n * The tint effect to be applied by the shader in the next geometry draw:\r\n * \r\n * 0 = texture multiplied by color\r\n * 1 = solid color + texture alpha\r\n * 2 = solid color, no texture\r\n * 3 = solid texture, no color\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#tintEffect\r\n * @type {number}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.tintEffect = 2;\r\n\r\n /**\r\n * Cached stroke tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#strokeTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.strokeTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Cached fill tint.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#fillTint\r\n * @type {object}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.fillTint = { TL: 0, TR: 0, BL: 0, BR: 0 };\r\n\r\n /**\r\n * Internal texture frame reference.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#currentFrame\r\n * @type {Phaser.Textures.Frame}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.currentFrame = { u0: 0, v0: 0, u1: 1, v1: 1 };\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#firstQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.firstQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Internal path quad cache.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#prevQuad\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.prevQuad = [ 0, 0, 0, 0, 0 ];\r\n\r\n /**\r\n * Used internally for triangulating a polygon.\r\n *\r\n * @name Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#polygonCache\r\n * @type {array}\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this.polygonCache = [];\r\n\r\n this.mvpInit();\r\n },\r\n\r\n /**\r\n * Called every time the pipeline needs to be used.\r\n * It binds all necessary resources.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#onBind\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n onBind: function ()\r\n {\r\n WebGLPipeline.prototype.onBind.call(this);\r\n\r\n this.mvpUpdate();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resizes this pipeline and updates the projection.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#resize\r\n * @since 3.0.0\r\n *\r\n * @param {number} width - The new width.\r\n * @param {number} height - The new height.\r\n * @param {number} resolution - The resolution.\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n resize: function (width, height, resolution)\r\n {\r\n WebGLPipeline.prototype.resize.call(this, width, height, resolution);\r\n\r\n this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Assigns a texture to the current batch. If a different texture is already set it creates a new batch object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#setTexture2D\r\n * @since 3.1.0\r\n *\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline} This pipeline instance.\r\n */\r\n setTexture2D: function (texture, unit)\r\n {\r\n if (texture === undefined) { texture = this.renderer.blankTexture.glTexture; }\r\n if (unit === undefined) { unit = 0; }\r\n\r\n if (this.requireTextureBatch(texture, unit))\r\n {\r\n this.pushBatch(texture, unit);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the current batch has the same texture and texture unit, or if we need to create a new batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#requireTextureBatch\r\n * @since 3.16.0\r\n *\r\n * @param {WebGLTexture} texture - WebGLTexture that will be assigned to the current batch. If not given uses blankTexture.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n *\r\n * @return {boolean} `true` if the pipeline needs to create a new batch, otherwise `false`.\r\n */\r\n requireTextureBatch: function (texture, unit)\r\n {\r\n var batches = this.batches;\r\n var batchLength = batches.length;\r\n\r\n if (batchLength > 0)\r\n {\r\n // If Texture Unit specified, we get the texture from the textures array, otherwise we use the texture property\r\n var currentTexture = (unit > 0) ? batches[batchLength - 1].textures[unit - 1] : batches[batchLength - 1].texture;\r\n\r\n return !(currentTexture === texture);\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Creates a new batch object and pushes it to a batch array.\r\n * The batch object contains information relevant to the current \r\n * vertex batch like the offset in the vertex buffer, vertex count and \r\n * the textures used by that batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#pushBatch\r\n * @since 3.1.0\r\n * \r\n * @param {WebGLTexture} texture - Optional WebGLTexture that will be assigned to the created batch.\r\n * @param {integer} unit - Texture unit to which the texture needs to be bound.\r\n */\r\n pushBatch: function (texture, unit)\r\n {\r\n if (unit === 0)\r\n {\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: texture,\r\n textures: []\r\n });\r\n }\r\n else\r\n {\r\n var textures = [];\r\n\r\n textures[unit - 1] = texture;\r\n\r\n this.batches.push({\r\n first: this.vertexCount,\r\n texture: null,\r\n textures: textures\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Uploads the vertex data and emits a draw call for the current batch of vertices.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#flush\r\n * @since 3.0.0\r\n *\r\n * @return {this} This WebGLPipeline instance.\r\n */\r\n flush: function ()\r\n {\r\n if (this.flushLocked)\r\n {\r\n return this;\r\n }\r\n\r\n this.flushLocked = true;\r\n\r\n var gl = this.gl;\r\n var vertexCount = this.vertexCount;\r\n var topology = this.topology;\r\n var vertexSize = this.vertexSize;\r\n var renderer = this.renderer;\r\n\r\n var batches = this.batches;\r\n var batchCount = batches.length;\r\n var batchVertexCount = 0;\r\n var batch = null;\r\n var batchNext;\r\n var textureIndex;\r\n var nTexture;\r\n\r\n if (batchCount === 0 || vertexCount === 0)\r\n {\r\n this.flushLocked = false;\r\n\r\n return this;\r\n }\r\n\r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize));\r\n\r\n // Process the TEXTURE BATCHES\r\n\r\n for (var index = 0; index < batchCount - 1; index++)\r\n {\r\n batch = batches[index];\r\n batchNext = batches[index + 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = batchNext.first - batch.first;\r\n\r\n // Bail out if texture property is null (i.e. if a texture unit > 0)\r\n if (batch.texture === null || batchVertexCount <= 0)\r\n {\r\n continue;\r\n }\r\n\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n // Left over data\r\n batch = batches[batchCount - 1];\r\n\r\n // Multi-texture check (for non-zero texture units)\r\n\r\n if (batch.textures.length > 0)\r\n {\r\n for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex)\r\n {\r\n nTexture = batch.textures[textureIndex];\r\n\r\n if (nTexture)\r\n {\r\n renderer.setTexture2D(nTexture, 1 + textureIndex, false);\r\n }\r\n }\r\n\r\n gl.activeTexture(gl.TEXTURE0);\r\n }\r\n\r\n batchVertexCount = vertexCount - batch.first;\r\n\r\n if (batch.texture && batchVertexCount > 0)\r\n {\r\n renderer.setTexture2D(batch.texture, 0, false);\r\n\r\n gl.drawArrays(topology, batch.first, batchVertexCount);\r\n }\r\n\r\n this.vertexCount = 0;\r\n\r\n batches.length = 0;\r\n\r\n this.flushLocked = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a Sprite Game Object, or any object that extends it, and adds it to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchSprite\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.GameObjects.Image|Phaser.GameObjects.Sprite)} sprite - The texture based Game Object to add to the batch.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to use for the rendering transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - The transform matrix of the parent container, if set.\r\n */\r\n batchSprite: function (sprite, camera, parentTransformMatrix)\r\n {\r\n // Will cause a flush if there are batchSize entries already\r\n this.renderer.setPipeline(this);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var frame = sprite.frame;\r\n var texture = frame.glTexture;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n var frameX = frame.x;\r\n var frameY = frame.y;\r\n var frameWidth = frame.cutWidth;\r\n var frameHeight = frame.cutHeight;\r\n var customPivot = frame.customPivot;\r\n\r\n var displayOriginX = sprite.displayOriginX;\r\n var displayOriginY = sprite.displayOriginY;\r\n\r\n var x = -displayOriginX + frameX;\r\n var y = -displayOriginY + frameY;\r\n\r\n if (sprite.isCropped)\r\n {\r\n var crop = sprite._crop;\r\n\r\n if (crop.flipX !== sprite.flipX || crop.flipY !== sprite.flipY)\r\n {\r\n frame.updateCropUVs(crop, sprite.flipX, sprite.flipY);\r\n }\r\n\r\n u0 = crop.u0;\r\n v0 = crop.v0;\r\n u1 = crop.u1;\r\n v1 = crop.v1;\r\n\r\n frameWidth = crop.width;\r\n frameHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n var flipX = 1;\r\n var flipY = 1;\r\n\r\n if (sprite.flipX)\r\n {\r\n if (!customPivot)\r\n {\r\n x += (-frame.realWidth + (displayOriginX * 2));\r\n }\r\n\r\n flipX = -1;\r\n }\r\n\r\n // Auto-invert the flipY if this is coming from a GLTexture\r\n if (sprite.flipY || (frame.source.isGLTexture && !texture.flipY))\r\n {\r\n if (!customPivot)\r\n {\r\n y += (-frame.realHeight + (displayOriginY * 2));\r\n }\r\n\r\n flipY = -1;\r\n }\r\n\r\n spriteMatrix.applyITRS(sprite.x, sprite.y, sprite.rotation, sprite.scaleX * flipX, sprite.scaleY * flipY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * sprite.scrollFactorX, -camera.scrollY * sprite.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = sprite.x;\r\n spriteMatrix.f = sprite.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * sprite.scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * sprite.scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var xw = x + frameWidth;\r\n var yh = y + frameHeight;\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n var tintTL = Utils.getTintAppendFloatAlpha(sprite._tintTL, camera.alpha * sprite._alphaTL);\r\n var tintTR = Utils.getTintAppendFloatAlpha(sprite._tintTR, camera.alpha * sprite._alphaTR);\r\n var tintBL = Utils.getTintAppendFloatAlpha(sprite._tintBL, camera.alpha * sprite._alphaBL);\r\n var tintBR = Utils.getTintAppendFloatAlpha(sprite._tintBR, camera.alpha * sprite._alphaBR);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n var tintEffect = (sprite._isTinted && sprite.tintFill);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 6 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0----3\r\n * |\\ B|\r\n * | \\ |\r\n * | \\ |\r\n * | A \\|\r\n * | \\\r\n * 1----2\r\n * ```\r\n * \r\n * Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchQuad\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - The top-left x position.\r\n * @param {number} y0 - The top-left y position.\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {number} tintBR - The bottom-right tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchQuad: function (x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 6 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n hasFlushed = true;\r\n\r\n this.setTexture2D(texture, unit);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n \r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x0;\r\n vertexViewF32[++vertexOffset] = y0;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n this.vertexCount += 6;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Adds the vertices data into the batch and flushes if full.\r\n * \r\n * Assumes 3 vertices in the following arrangement:\r\n * \r\n * ```\r\n * 0\r\n * |\\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * | \\\r\n * 1-----2\r\n * ```\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTri\r\n * @since 3.12.0\r\n *\r\n * @param {number} x1 - The bottom-left x position.\r\n * @param {number} y1 - The bottom-left y position.\r\n * @param {number} x2 - The bottom-right x position.\r\n * @param {number} y2 - The bottom-right y position.\r\n * @param {number} x3 - The top-right x position.\r\n * @param {number} y3 - The top-right y position.\r\n * @param {number} u0 - UV u0 value.\r\n * @param {number} v0 - UV v0 value.\r\n * @param {number} u1 - UV u1 value.\r\n * @param {number} v1 - UV v1 value.\r\n * @param {number} tintTL - The top-left tint color value.\r\n * @param {number} tintTR - The top-right tint color value.\r\n * @param {number} tintBL - The bottom-left tint color value.\r\n * @param {(number|boolean)} tintEffect - The tint effect for the shader to use.\r\n * @param {WebGLTexture} [texture] - WebGLTexture that will be assigned to the current batch if a flush occurs.\r\n * @param {integer} [unit=0] - Texture unit to which the texture needs to be bound.\r\n * \r\n * @return {boolean} `true` if this method caused the batch to flush, otherwise `false`.\r\n */\r\n batchTri: function (x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect, texture, unit)\r\n {\r\n var hasFlushed = false;\r\n\r\n if (this.vertexCount + 3 > this.vertexCapacity)\r\n {\r\n this.flush();\r\n\r\n this.setTexture2D(texture, unit);\r\n\r\n hasFlushed = true;\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32;\r\n var vertexViewU32 = this.vertexViewU32;\r\n\r\n var vertexOffset = (this.vertexCount * this.vertexComponentCount) - 1;\r\n\r\n vertexViewF32[++vertexOffset] = x1;\r\n vertexViewF32[++vertexOffset] = y1;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v0;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTL;\r\n\r\n vertexViewF32[++vertexOffset] = x2;\r\n vertexViewF32[++vertexOffset] = y2;\r\n vertexViewF32[++vertexOffset] = u0;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintTR;\r\n\r\n vertexViewF32[++vertexOffset] = x3;\r\n vertexViewF32[++vertexOffset] = y3;\r\n vertexViewF32[++vertexOffset] = u1;\r\n vertexViewF32[++vertexOffset] = v1;\r\n vertexViewF32[++vertexOffset] = tintEffect;\r\n vertexViewU32[++vertexOffset] = tintBL;\r\n\r\n this.vertexCount += 3;\r\n\r\n return hasFlushed;\r\n },\r\n\r\n /**\r\n * Generic function for batching a textured quad using argument values instead of a Game Object.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - Source GameObject.\r\n * @param {WebGLTexture} texture - Raw WebGLTexture associated with the quad.\r\n * @param {integer} textureWidth - Real texture width.\r\n * @param {integer} textureHeight - Real texture height.\r\n * @param {number} srcX - X coordinate of the quad.\r\n * @param {number} srcY - Y coordinate of the quad.\r\n * @param {number} srcWidth - Width of the quad.\r\n * @param {number} srcHeight - Height of the quad.\r\n * @param {number} scaleX - X component of scale.\r\n * @param {number} scaleY - Y component of scale.\r\n * @param {number} rotation - Rotation of the quad.\r\n * @param {boolean} flipX - Indicates if the quad is horizontally flipped.\r\n * @param {boolean} flipY - Indicates if the quad is vertically flipped.\r\n * @param {number} scrollFactorX - By which factor is the quad affected by the camera horizontal scroll.\r\n * @param {number} scrollFactorY - By which factor is the quad effected by the camera vertical scroll.\r\n * @param {number} displayOriginX - Horizontal origin in pixels.\r\n * @param {number} displayOriginY - Vertical origin in pixels.\r\n * @param {number} frameX - X coordinate of the texture frame.\r\n * @param {number} frameY - Y coordinate of the texture frame.\r\n * @param {number} frameWidth - Width of the texture frame.\r\n * @param {number} frameHeight - Height of the texture frame.\r\n * @param {integer} tintTL - Tint for top left.\r\n * @param {integer} tintTR - Tint for top right.\r\n * @param {integer} tintBL - Tint for bottom left.\r\n * @param {integer} tintBR - Tint for bottom right.\r\n * @param {number} tintEffect - The tint effect.\r\n * @param {number} uOffset - Horizontal offset on texture coordinate.\r\n * @param {number} vOffset - Vertical offset on texture coordinate.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - Current used camera.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentTransformMatrix - Parent container.\r\n * @param {boolean} [skipFlip=false] - Skip the renderTexture check.\r\n */\r\n batchTexture: function (\r\n gameObject,\r\n texture,\r\n textureWidth, textureHeight,\r\n srcX, srcY,\r\n srcWidth, srcHeight,\r\n scaleX, scaleY,\r\n rotation,\r\n flipX, flipY,\r\n scrollFactorX, scrollFactorY,\r\n displayOriginX, displayOriginY,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tintTL, tintTR, tintBL, tintBR, tintEffect,\r\n uOffset, vOffset,\r\n camera,\r\n parentTransformMatrix,\r\n skipFlip)\r\n {\r\n this.renderer.setPipeline(this, gameObject);\r\n\r\n var camMatrix = this._tempMatrix1;\r\n var spriteMatrix = this._tempMatrix2;\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n var u0 = (frameX / textureWidth) + uOffset;\r\n var v0 = (frameY / textureHeight) + vOffset;\r\n var u1 = (frameX + frameWidth) / textureWidth + uOffset;\r\n var v1 = (frameY + frameHeight) / textureHeight + vOffset;\r\n\r\n var width = srcWidth;\r\n var height = srcHeight;\r\n\r\n var x = -displayOriginX;\r\n var y = -displayOriginY;\r\n\r\n if (gameObject.isCropped)\r\n {\r\n var crop = gameObject._crop;\r\n\r\n width = crop.width;\r\n height = crop.height;\r\n\r\n srcWidth = crop.width;\r\n srcHeight = crop.height;\r\n\r\n frameX = crop.x;\r\n frameY = crop.y;\r\n\r\n var ox = frameX;\r\n var oy = frameY;\r\n\r\n if (flipX)\r\n {\r\n ox = (frameWidth - crop.x - crop.width);\r\n }\r\n \r\n if (flipY && !texture.isRenderTexture)\r\n {\r\n oy = (frameHeight - crop.y - crop.height);\r\n }\r\n\r\n u0 = (ox / textureWidth) + uOffset;\r\n v0 = (oy / textureHeight) + vOffset;\r\n u1 = (ox + crop.width) / textureWidth + uOffset;\r\n v1 = (oy + crop.height) / textureHeight + vOffset;\r\n\r\n x = -displayOriginX + frameX;\r\n y = -displayOriginY + frameY;\r\n }\r\n\r\n // Invert the flipY if this is a RenderTexture\r\n flipY = flipY ^ (!skipFlip && texture.isRenderTexture ? 1 : 0);\r\n\r\n if (flipX)\r\n {\r\n width *= -1;\r\n x += srcWidth;\r\n }\r\n\r\n if (flipY)\r\n {\r\n height *= -1;\r\n y += srcHeight;\r\n }\r\n\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n spriteMatrix.applyITRS(srcX, srcY, rotation, scaleX, scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n if (parentTransformMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentTransformMatrix, -camera.scrollX * scrollFactorX, -camera.scrollY * scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n spriteMatrix.e = srcX;\r\n spriteMatrix.f = srcY;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n spriteMatrix.e -= camera.scrollX * scrollFactorX;\r\n spriteMatrix.f -= camera.scrollY * scrollFactorY;\r\n \r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(spriteMatrix, calcMatrix);\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n this.setTexture2D(texture, 0);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect, texture, 0);\r\n },\r\n\r\n /**\r\n * Adds a Texture Frame into the batch for rendering.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchTextureFrame\r\n * @since 3.12.0\r\n *\r\n * @param {Phaser.Textures.Frame} frame - The Texture Frame to be rendered.\r\n * @param {number} x - The horizontal position to render the texture at.\r\n * @param {number} y - The vertical position to render the texture at.\r\n * @param {number} tint - The tint color.\r\n * @param {number} alpha - The alpha value.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} transformMatrix - The Transform Matrix to use for the texture.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} [parentTransformMatrix] - A parent Transform Matrix.\r\n */\r\n batchTextureFrame: function (\r\n frame,\r\n x, y,\r\n tint, alpha,\r\n transformMatrix,\r\n parentTransformMatrix\r\n )\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var spriteMatrix = this._tempMatrix1.copyFrom(transformMatrix);\r\n var calcMatrix = this._tempMatrix2;\r\n\r\n var xw = x + frame.width;\r\n var yh = y + frame.height;\r\n\r\n if (parentTransformMatrix)\r\n {\r\n spriteMatrix.multiply(parentTransformMatrix, calcMatrix);\r\n }\r\n else\r\n {\r\n calcMatrix = spriteMatrix;\r\n }\r\n\r\n var tx0 = calcMatrix.getX(x, y);\r\n var ty0 = calcMatrix.getY(x, y);\r\n\r\n var tx1 = calcMatrix.getX(x, yh);\r\n var ty1 = calcMatrix.getY(x, yh);\r\n\r\n var tx2 = calcMatrix.getX(xw, yh);\r\n var ty2 = calcMatrix.getY(xw, yh);\r\n\r\n var tx3 = calcMatrix.getX(xw, y);\r\n var ty3 = calcMatrix.getY(xw, y);\r\n\r\n this.setTexture2D(frame.glTexture, 0);\r\n\r\n tint = Utils.getTintAppendFloatAlpha(tint, alpha);\r\n\r\n this.batchQuad(tx0, ty0, tx1, ty1, tx2, ty2, tx3, ty3, frame.u0, frame.v0, frame.u1, frame.v1, tint, tint, tint, tint, 0, frame.glTexture, 0);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle has no transform values and isn't transformed into the local space.\r\n * Used for directly batching untransformed rectangles, such as Camera background colors.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#drawFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {number} color - Color of the rectangle to draw.\r\n * @param {number} alpha - Alpha value of the rectangle to draw.\r\n */\r\n drawFillRect: function (x, y, width, height, color, alpha)\r\n {\r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n this.setTexture2D();\r\n\r\n var tint = Utils.getTintAppendFloatAlphaAndSwap(color, alpha);\r\n\r\n this.batchQuad(x, y, x, yh, xw, yh, xw, y, 0, 0, 1, 1, tint, tint, tint, tint, 2);\r\n },\r\n\r\n /**\r\n * Pushes a filled rectangle into the vertex batch.\r\n * Rectangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillRect\r\n * @since 3.12.0\r\n *\r\n * @param {number} x - Horizontal top left coordinate of the rectangle.\r\n * @param {number} y - Vertical top left coordinate of the rectangle.\r\n * @param {number} width - Width of the rectangle.\r\n * @param {number} height - Height of the rectangle.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillRect: function (x, y, width, height, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var xw = x + width;\r\n var yh = y + height;\r\n\r\n var x0 = calcMatrix.getX(x, y);\r\n var y0 = calcMatrix.getY(x, y);\r\n\r\n var x1 = calcMatrix.getX(x, yh);\r\n var y1 = calcMatrix.getY(x, yh);\r\n\r\n var x2 = calcMatrix.getX(xw, yh);\r\n var y2 = calcMatrix.getY(xw, yh);\r\n\r\n var x3 = calcMatrix.getX(xw, y);\r\n var y3 = calcMatrix.getY(xw, y);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.fillTint.BR, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a filled triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillTriangle: function (x0, y0, x1, y1, x2, y2, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n \r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n\r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n\r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, this.fillTint.TL, this.fillTint.TR, this.fillTint.BL, this.tintEffect);\r\n },\r\n\r\n /**\r\n * Pushes a stroked triangle into the vertex batch.\r\n * Triangle factors in the given transform matrices before adding to the batch.\r\n * The triangle is created from 3 lines and drawn using the `batchStrokePath` method.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokeTriangle\r\n * @since 3.12.0\r\n *\r\n * @param {number} x0 - Point 0 x coordinate.\r\n * @param {number} y0 - Point 0 y coordinate.\r\n * @param {number} x1 - Point 1 x coordinate.\r\n * @param {number} y1 - Point 1 y coordinate.\r\n * @param {number} x2 - Point 2 x coordinate.\r\n * @param {number} y2 - Point 2 y coordinate.\r\n * @param {number} lineWidth - The width of the line in pixels.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokeTriangle: function (x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix)\r\n {\r\n var tempTriangle = this.tempTriangle;\r\n\r\n tempTriangle[0].x = x0;\r\n tempTriangle[0].y = y0;\r\n tempTriangle[0].width = lineWidth;\r\n\r\n tempTriangle[1].x = x1;\r\n tempTriangle[1].y = y1;\r\n tempTriangle[1].width = lineWidth;\r\n\r\n tempTriangle[2].x = x2;\r\n tempTriangle[2].y = y2;\r\n tempTriangle[2].width = lineWidth;\r\n\r\n tempTriangle[3].x = x0;\r\n tempTriangle[3].y = y0;\r\n tempTriangle[3].width = lineWidth;\r\n\r\n this.batchStrokePath(tempTriangle, lineWidth, false, currentMatrix, parentMatrix);\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and then passing it through Earcut, which\r\n * creates a list of polygons. Each polygon is then added to the batch.\r\n * \r\n * The path is always automatically closed because it's filled.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchFillPath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchFillPath: function (path, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var length = path.length;\r\n var polygonCache = this.polygonCache;\r\n var polygonIndexArray;\r\n var point;\r\n\r\n var tintTL = this.fillTint.TL;\r\n var tintTR = this.fillTint.TR;\r\n var tintBL = this.fillTint.BL;\r\n var tintEffect = this.tintEffect;\r\n\r\n for (var pathIndex = 0; pathIndex < length; ++pathIndex)\r\n {\r\n point = path[pathIndex];\r\n polygonCache.push(point.x, point.y);\r\n }\r\n\r\n polygonIndexArray = Earcut(polygonCache);\r\n length = polygonIndexArray.length;\r\n\r\n var frame = this.currentFrame;\r\n\r\n for (var index = 0; index < length; index += 3)\r\n {\r\n var p0 = polygonIndexArray[index + 0] * 2;\r\n var p1 = polygonIndexArray[index + 1] * 2;\r\n var p2 = polygonIndexArray[index + 2] * 2;\r\n\r\n var x0 = polygonCache[p0 + 0];\r\n var y0 = polygonCache[p0 + 1];\r\n var x1 = polygonCache[p1 + 0];\r\n var y1 = polygonCache[p1 + 1];\r\n var x2 = polygonCache[p2 + 0];\r\n var y2 = polygonCache[p2 + 1];\r\n\r\n var tx0 = calcMatrix.getX(x0, y0);\r\n var ty0 = calcMatrix.getY(x0, y0);\r\n \r\n var tx1 = calcMatrix.getX(x1, y1);\r\n var ty1 = calcMatrix.getY(x1, y1);\r\n \r\n var tx2 = calcMatrix.getX(x2, y2);\r\n var ty2 = calcMatrix.getY(x2, y2);\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n \r\n this.batchTri(tx0, ty0, tx1, ty1, tx2, ty2, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintEffect);\r\n }\r\n\r\n polygonCache.length = 0;\r\n },\r\n\r\n /**\r\n * Adds the given path to the vertex batch for rendering.\r\n * \r\n * It works by taking the array of path data and calling `batchLine` for each section\r\n * of the path.\r\n * \r\n * The path is optionally closed at the end.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchStrokePath\r\n * @since 3.12.0\r\n *\r\n * @param {array} path - Collection of points that represent the path.\r\n * @param {number} lineWidth - The width of the line segments in pixels.\r\n * @param {boolean} pathOpen - Indicates if the path should be closed or left open.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} currentMatrix - The current transform.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - The parent transform.\r\n */\r\n batchStrokePath: function (path, lineWidth, pathOpen, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n // Reset the closePath booleans\r\n this.prevQuad[4] = 0;\r\n this.firstQuad[4] = 0;\r\n\r\n var pathLength = path.length - 1;\r\n\r\n for (var pathIndex = 0; pathIndex < pathLength; pathIndex++)\r\n {\r\n var point0 = path[pathIndex];\r\n var point1 = path[pathIndex + 1];\r\n\r\n this.batchLine(\r\n point0.x,\r\n point0.y,\r\n point1.x,\r\n point1.y,\r\n point0.width / 2,\r\n point1.width / 2,\r\n lineWidth,\r\n pathIndex,\r\n !pathOpen && (pathIndex === pathLength - 1),\r\n currentMatrix,\r\n parentMatrix\r\n );\r\n }\r\n },\r\n\r\n /**\r\n * Creates a quad and adds it to the vertex batch based on the given line values.\r\n *\r\n * @method Phaser.Renderer.WebGL.Pipelines.TextureTintPipeline#batchLine\r\n * @since 3.12.0\r\n *\r\n * @param {number} ax - X coordinate to the start of the line\r\n * @param {number} ay - Y coordinate to the start of the line\r\n * @param {number} bx - X coordinate to the end of the line\r\n * @param {number} by - Y coordinate to the end of the line\r\n * @param {number} aLineWidth - Width of the start of the line\r\n * @param {number} bLineWidth - Width of the end of the line\r\n * @param {Float32Array} currentMatrix - Parent matrix, generally used by containers\r\n */\r\n batchLine: function (ax, ay, bx, by, aLineWidth, bLineWidth, lineWidth, index, closePath, currentMatrix, parentMatrix)\r\n {\r\n this.renderer.setPipeline(this);\r\n\r\n var calcMatrix = this._tempMatrix3;\r\n\r\n // Multiply and store result in calcMatrix, only if the parentMatrix is set, otherwise we'll use whatever values are already in the calcMatrix\r\n if (parentMatrix)\r\n {\r\n parentMatrix.multiply(currentMatrix, calcMatrix);\r\n }\r\n\r\n var dx = bx - ax;\r\n var dy = by - ay;\r\n\r\n var len = Math.sqrt(dx * dx + dy * dy);\r\n var al0 = aLineWidth * (by - ay) / len;\r\n var al1 = aLineWidth * (ax - bx) / len;\r\n var bl0 = bLineWidth * (by - ay) / len;\r\n var bl1 = bLineWidth * (ax - bx) / len;\r\n\r\n var lx0 = bx - bl0;\r\n var ly0 = by - bl1;\r\n var lx1 = ax - al0;\r\n var ly1 = ay - al1;\r\n var lx2 = bx + bl0;\r\n var ly2 = by + bl1;\r\n var lx3 = ax + al0;\r\n var ly3 = ay + al1;\r\n\r\n // tx0 = bottom right\r\n var brX = calcMatrix.getX(lx0, ly0);\r\n var brY = calcMatrix.getY(lx0, ly0);\r\n\r\n // tx1 = bottom left\r\n var blX = calcMatrix.getX(lx1, ly1);\r\n var blY = calcMatrix.getY(lx1, ly1);\r\n\r\n // tx2 = top right\r\n var trX = calcMatrix.getX(lx2, ly2);\r\n var trY = calcMatrix.getY(lx2, ly2);\r\n\r\n // tx3 = top left\r\n var tlX = calcMatrix.getX(lx3, ly3);\r\n var tlY = calcMatrix.getY(lx3, ly3);\r\n\r\n var tint = this.strokeTint;\r\n var tintEffect = this.tintEffect;\r\n\r\n var tintTL = tint.TL;\r\n var tintTR = tint.TR;\r\n var tintBL = tint.BL;\r\n var tintBR = tint.BR;\r\n\r\n var frame = this.currentFrame;\r\n\r\n var u0 = frame.u0;\r\n var v0 = frame.v0;\r\n var u1 = frame.u1;\r\n var v1 = frame.v1;\r\n\r\n // TL, BL, BR, TR\r\n this.batchQuad(tlX, tlY, blX, blY, brX, brY, trX, trY, u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n\r\n if (lineWidth <= 2)\r\n {\r\n // No point doing a linejoin if the line isn't thick enough\r\n return;\r\n }\r\n\r\n var prev = this.prevQuad;\r\n var first = this.firstQuad;\r\n\r\n if (index > 0 && prev[4])\r\n {\r\n this.batchQuad(tlX, tlY, blX, blY, prev[0], prev[1], prev[2], prev[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n first[0] = tlX;\r\n first[1] = tlY;\r\n first[2] = blX;\r\n first[3] = blY;\r\n first[4] = 1;\r\n }\r\n\r\n if (closePath && first[4])\r\n {\r\n // Add a join for the final path segment\r\n this.batchQuad(brX, brY, trX, trY, first[0], first[1], first[2], first[3], u0, v0, u1, v1, tintTL, tintTR, tintBL, tintBR, tintEffect);\r\n }\r\n else\r\n {\r\n // Store it\r\n\r\n prev[0] = brX;\r\n prev[1] = brY;\r\n prev[2] = trX;\r\n prev[3] = trY;\r\n prev[4] = 1;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureTintPipeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Implements a model view projection matrices.\r\n * Pipelines can implement this for doing 2D and 3D rendering.\r\n *\r\n * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection\r\n * @since 3.0.0\r\n */\r\nvar ModelViewProjection = {\r\n\r\n /**\r\n * Dirty flag for checking if model matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n modelMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if view matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n viewMatrixDirty: false,\r\n\r\n /**\r\n * Dirty flag for checking if projection matrix needs to be updated on GPU.\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n projectionMatrixDirty: false,\r\n\r\n /**\r\n * Model matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n modelMatrix: null,\r\n\r\n /**\r\n * View matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n viewMatrix: null,\r\n\r\n /**\r\n * Projection matrix\r\n * \r\n * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix\r\n * @type {?Float32Array}\r\n * @since 3.0.0\r\n */\r\n projectionMatrix: null,\r\n\r\n /**\r\n * Initializes MVP matrices with an identity matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit\r\n * @since 3.0.0\r\n */\r\n mvpInit: function ()\r\n {\r\n this.modelMatrixDirty = true;\r\n this.viewMatrixDirty = true;\r\n this.projectionMatrixDirty = true;\r\n \r\n this.modelMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.viewMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n this.projectionMatrix = new Float32Array([\r\n 1, 0, 0, 0,\r\n 0, 1, 0, 0,\r\n 0, 0, 1, 0,\r\n 0, 0, 0, 1\r\n ]);\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * If dirty flags are set then the matrices are uploaded to the GPU.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate\r\n * @since 3.0.0\r\n */\r\n mvpUpdate: function ()\r\n {\r\n var program = this.program;\r\n\r\n if (this.modelMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix);\r\n this.modelMatrixDirty = false;\r\n }\r\n \r\n if (this.viewMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix);\r\n this.viewMatrixDirty = false;\r\n }\r\n\r\n if (this.projectionMatrixDirty)\r\n {\r\n this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix);\r\n this.projectionMatrixDirty = false;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads an identity matrix to the model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity\r\n * @since 3.0.0\r\n */\r\n modelIdentity: function ()\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n \r\n modelMatrix[0] = 1;\r\n modelMatrix[1] = 0;\r\n modelMatrix[2] = 0;\r\n modelMatrix[3] = 0;\r\n modelMatrix[4] = 0;\r\n modelMatrix[5] = 1;\r\n modelMatrix[6] = 0;\r\n modelMatrix[7] = 0;\r\n modelMatrix[8] = 0;\r\n modelMatrix[9] = 0;\r\n modelMatrix[10] = 1;\r\n modelMatrix[11] = 0;\r\n modelMatrix[12] = 0;\r\n modelMatrix[13] = 0;\r\n modelMatrix[14] = 0;\r\n modelMatrix[15] = 1;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n\r\n /**\r\n * Scale model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelScale: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[0] = modelMatrix[0] * x;\r\n modelMatrix[1] = modelMatrix[1] * x;\r\n modelMatrix[2] = modelMatrix[2] * x;\r\n modelMatrix[3] = modelMatrix[3] * x;\r\n modelMatrix[4] = modelMatrix[4] * y;\r\n modelMatrix[5] = modelMatrix[5] * y;\r\n modelMatrix[6] = modelMatrix[6] * y;\r\n modelMatrix[7] = modelMatrix[7] * y;\r\n modelMatrix[8] = modelMatrix[8] * z;\r\n modelMatrix[9] = modelMatrix[9] * z;\r\n modelMatrix[10] = modelMatrix[10] * z;\r\n modelMatrix[11] = modelMatrix[11] * z;\r\n \r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translate model matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelTranslate: function (x, y, z)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n\r\n modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12];\r\n modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13];\r\n modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14];\r\n modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15];\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateX: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[4] = a10 * c + a20 * s;\r\n modelMatrix[5] = a11 * c + a21 * s;\r\n modelMatrix[6] = a12 * c + a22 * s;\r\n modelMatrix[7] = a13 * c + a23 * s;\r\n modelMatrix[8] = a20 * c - a10 * s;\r\n modelMatrix[9] = a21 * c - a11 * s;\r\n modelMatrix[10] = a22 * c - a12 * s;\r\n modelMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rotates the model matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateY: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a20 = modelMatrix[8];\r\n var a21 = modelMatrix[9];\r\n var a22 = modelMatrix[10];\r\n var a23 = modelMatrix[11];\r\n\r\n modelMatrix[0] = a00 * c - a20 * s;\r\n modelMatrix[1] = a01 * c - a21 * s;\r\n modelMatrix[2] = a02 * c - a22 * s;\r\n modelMatrix[3] = a03 * c - a23 * s;\r\n modelMatrix[8] = a00 * s + a20 * c;\r\n modelMatrix[9] = a01 * s + a21 * c;\r\n modelMatrix[10] = a02 * s + a22 * c;\r\n modelMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.modelMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates the model matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n modelRotateZ: function (radians)\r\n {\r\n var modelMatrix = this.modelMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = modelMatrix[0];\r\n var a01 = modelMatrix[1];\r\n var a02 = modelMatrix[2];\r\n var a03 = modelMatrix[3];\r\n var a10 = modelMatrix[4];\r\n var a11 = modelMatrix[5];\r\n var a12 = modelMatrix[6];\r\n var a13 = modelMatrix[7];\r\n\r\n modelMatrix[0] = a00 * c + a10 * s;\r\n modelMatrix[1] = a01 * c + a11 * s;\r\n modelMatrix[2] = a02 * c + a12 * s;\r\n modelMatrix[3] = a03 * c + a13 * s;\r\n modelMatrix[4] = a10 * c - a00 * s;\r\n modelMatrix[5] = a11 * c - a01 * s;\r\n modelMatrix[6] = a12 * c - a02 * s;\r\n modelMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.modelMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads identity matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewIdentity: function ()\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n \r\n viewMatrix[0] = 1;\r\n viewMatrix[1] = 0;\r\n viewMatrix[2] = 0;\r\n viewMatrix[3] = 0;\r\n viewMatrix[4] = 0;\r\n viewMatrix[5] = 1;\r\n viewMatrix[6] = 0;\r\n viewMatrix[7] = 0;\r\n viewMatrix[8] = 0;\r\n viewMatrix[9] = 0;\r\n viewMatrix[10] = 1;\r\n viewMatrix[11] = 0;\r\n viewMatrix[12] = 0;\r\n viewMatrix[13] = 0;\r\n viewMatrix[14] = 0;\r\n viewMatrix[15] = 1;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Scales view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewScale: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[0] = viewMatrix[0] * x;\r\n viewMatrix[1] = viewMatrix[1] * x;\r\n viewMatrix[2] = viewMatrix[2] * x;\r\n viewMatrix[3] = viewMatrix[3] * x;\r\n viewMatrix[4] = viewMatrix[4] * y;\r\n viewMatrix[5] = viewMatrix[5] * y;\r\n viewMatrix[6] = viewMatrix[6] * y;\r\n viewMatrix[7] = viewMatrix[7] * y;\r\n viewMatrix[8] = viewMatrix[8] * z;\r\n viewMatrix[9] = viewMatrix[9] * z;\r\n viewMatrix[10] = viewMatrix[10] * z;\r\n viewMatrix[11] = viewMatrix[11] * z;\r\n \r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Translates view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x component.\r\n * @param {number} y - The y component.\r\n * @param {number} z - The z component.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewTranslate: function (x, y, z)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n\r\n viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12];\r\n viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13];\r\n viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14];\r\n viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the X axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateX: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[4] = a10 * c + a20 * s;\r\n viewMatrix[5] = a11 * c + a21 * s;\r\n viewMatrix[6] = a12 * c + a22 * s;\r\n viewMatrix[7] = a13 * c + a23 * s;\r\n viewMatrix[8] = a20 * c - a10 * s;\r\n viewMatrix[9] = a21 * c - a11 * s;\r\n viewMatrix[10] = a22 * c - a12 * s;\r\n viewMatrix[11] = a23 * c - a13 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Y axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateY: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a20 = viewMatrix[8];\r\n var a21 = viewMatrix[9];\r\n var a22 = viewMatrix[10];\r\n var a23 = viewMatrix[11];\r\n\r\n viewMatrix[0] = a00 * c - a20 * s;\r\n viewMatrix[1] = a01 * c - a21 * s;\r\n viewMatrix[2] = a02 * c - a22 * s;\r\n viewMatrix[3] = a03 * c - a23 * s;\r\n viewMatrix[8] = a00 * s + a20 * c;\r\n viewMatrix[9] = a01 * s + a21 * c;\r\n viewMatrix[10] = a02 * s + a22 * c;\r\n viewMatrix[11] = a03 * s + a23 * c;\r\n\r\n this.viewMatrixDirty = true;\r\n \r\n return this;\r\n },\r\n \r\n /**\r\n * Rotates view matrix in the Z axis.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ\r\n * @since 3.0.0\r\n *\r\n * @param {number} radians - The amount to rotate by.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewRotateZ: function (radians)\r\n {\r\n var viewMatrix = this.viewMatrix;\r\n var s = Math.sin(radians);\r\n var c = Math.cos(radians);\r\n var a00 = viewMatrix[0];\r\n var a01 = viewMatrix[1];\r\n var a02 = viewMatrix[2];\r\n var a03 = viewMatrix[3];\r\n var a10 = viewMatrix[4];\r\n var a11 = viewMatrix[5];\r\n var a12 = viewMatrix[6];\r\n var a13 = viewMatrix[7];\r\n\r\n viewMatrix[0] = a00 * c + a10 * s;\r\n viewMatrix[1] = a01 * c + a11 * s;\r\n viewMatrix[2] = a02 * c + a12 * s;\r\n viewMatrix[3] = a03 * c + a13 * s;\r\n viewMatrix[4] = a10 * c - a00 * s;\r\n viewMatrix[5] = a11 * c - a01 * s;\r\n viewMatrix[6] = a12 * c - a02 * s;\r\n viewMatrix[7] = a13 * c - a03 * s;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix \r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix2D - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad2D: function (matrix2D)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix2D[0];\r\n vm[1] = matrix2D[1];\r\n vm[2] = 0.0;\r\n vm[3] = 0.0;\r\n vm[4] = matrix2D[2];\r\n vm[5] = matrix2D[3];\r\n vm[6] = 0.0;\r\n vm[7] = 0.0;\r\n vm[8] = matrix2D[4];\r\n vm[9] = matrix2D[5];\r\n vm[10] = 1.0;\r\n vm[11] = 0.0;\r\n vm[12] = 0.0;\r\n vm[13] = 0.0;\r\n vm[14] = 0.0;\r\n vm[15] = 1.0;\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n\r\n /**\r\n * Copies a 4x4 matrix into the view matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad\r\n * @since 3.0.0\r\n *\r\n * @param {Float32Array} matrix - The Matrix2D.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n viewLoad: function (matrix)\r\n {\r\n var vm = this.viewMatrix;\r\n\r\n vm[0] = matrix[0];\r\n vm[1] = matrix[1];\r\n vm[2] = matrix[2];\r\n vm[3] = matrix[3];\r\n vm[4] = matrix[4];\r\n vm[5] = matrix[5];\r\n vm[6] = matrix[6];\r\n vm[7] = matrix[7];\r\n vm[8] = matrix[8];\r\n vm[9] = matrix[9];\r\n vm[10] = matrix[10];\r\n vm[11] = matrix[11];\r\n vm[12] = matrix[12];\r\n vm[13] = matrix[13];\r\n vm[14] = matrix[14];\r\n vm[15] = matrix[15];\r\n\r\n this.viewMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Loads identity matrix into the projection matrix.\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projIdentity: function ()\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n \r\n projectionMatrix[0] = 1;\r\n projectionMatrix[1] = 0;\r\n projectionMatrix[2] = 0;\r\n projectionMatrix[3] = 0;\r\n projectionMatrix[4] = 0;\r\n projectionMatrix[5] = 1;\r\n projectionMatrix[6] = 0;\r\n projectionMatrix[7] = 0;\r\n projectionMatrix[8] = 0;\r\n projectionMatrix[9] = 0;\r\n projectionMatrix[10] = 1;\r\n projectionMatrix[11] = 0;\r\n projectionMatrix[12] = 0;\r\n projectionMatrix[13] = 0;\r\n projectionMatrix[14] = 0;\r\n projectionMatrix[15] = 1;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets up an orthographic projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho\r\n * @since 3.0.0\r\n *\r\n * @param {number} left - The left value.\r\n * @param {number} right - The right value.\r\n * @param {number} bottom - The bottom value.\r\n * @param {number} top - The top value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projOrtho: function (left, right, bottom, top, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var leftRight = 1.0 / (left - right);\r\n var bottomTop = 1.0 / (bottom - top);\r\n var nearFar = 1.0 / (near - far);\r\n\r\n projectionMatrix[0] = -2.0 * leftRight;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = -2.0 * bottomTop;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = 2.0 * nearFar;\r\n projectionMatrix[11] = 0.0;\r\n projectionMatrix[12] = (left + right) * leftRight;\r\n projectionMatrix[13] = (top + bottom) * bottomTop;\r\n projectionMatrix[14] = (far + near) * nearFar;\r\n projectionMatrix[15] = 1.0;\r\n\r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n },\r\n \r\n /**\r\n * Sets up a perspective projection matrix\r\n * \r\n * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp\r\n * @since 3.0.0\r\n *\r\n * @param {number} fovY - The fov value.\r\n * @param {number} aspectRatio - The aspectRatio value.\r\n * @param {number} near - The near value.\r\n * @param {number} far - The far value.\r\n *\r\n * @return {this} This Model View Projection.\r\n */\r\n projPersp: function (fovY, aspectRatio, near, far)\r\n {\r\n var projectionMatrix = this.projectionMatrix;\r\n var fov = 1.0 / Math.tan(fovY / 2.0);\r\n var nearFar = 1.0 / (near - far);\r\n \r\n projectionMatrix[0] = fov / aspectRatio;\r\n projectionMatrix[1] = 0.0;\r\n projectionMatrix[2] = 0.0;\r\n projectionMatrix[3] = 0.0;\r\n projectionMatrix[4] = 0.0;\r\n projectionMatrix[5] = fov;\r\n projectionMatrix[6] = 0.0;\r\n projectionMatrix[7] = 0.0;\r\n projectionMatrix[8] = 0.0;\r\n projectionMatrix[9] = 0.0;\r\n projectionMatrix[10] = (far + near) * nearFar;\r\n projectionMatrix[11] = -1.0;\r\n projectionMatrix[12] = 0.0;\r\n projectionMatrix[13] = 0.0;\r\n projectionMatrix[14] = (2.0 * far * near) * nearFar;\r\n projectionMatrix[15] = 0.0;\r\n \r\n this.projectionMatrixDirty = true;\r\n\r\n return this;\r\n }\r\n};\r\n\r\nmodule.exports = ModelViewProjection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js?")},"./node_modules/phaser/src/renderer/webgl/pipelines/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Renderer.WebGL.Pipelines\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BitmapMaskPipeline: __webpack_require__(/*! ./BitmapMaskPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js"),\r\n ForwardDiffuseLightPipeline: __webpack_require__(/*! ./ForwardDiffuseLightPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js"),\r\n TextureTintPipeline: __webpack_require__(/*! ./TextureTintPipeline */ "./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js"),\r\n ModelViewProjection: __webpack_require__(/*! ./components/ModelViewProjection */ "./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/pipelines/index.js?')},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform vec2 uResolution;',\n 'uniform sampler2D uMainSampler;',\n 'uniform sampler2D uMaskSampler;',\n 'uniform bool uInvertMaskAlpha;',\n '',\n 'void main()',\n '{',\n ' vec2 uv = gl_FragCoord.xy / uResolution;',\n ' vec4 mainColor = texture2D(uMainSampler, uv);',\n ' vec4 maskColor = texture2D(uMaskSampler, uv);',\n ' float alpha = mainColor.a;',\n '',\n ' if (!uInvertMaskAlpha)',\n ' {',\n ' alpha *= (maskColor.a);',\n ' }',\n ' else',\n ' {',\n ' alpha *= (1.0 - maskColor.a);',\n ' }',\n '',\n ' gl_FragColor = vec4(mainColor.rgb * alpha, alpha);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_BITMAP_MASK_VS',\n '',\n 'precision mediump float;',\n '',\n 'attribute vec2 inPosition;',\n '',\n 'void main()',\n '{',\n ' gl_Position = vec4(inPosition, 0.0, 1.0);',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js":function(module,exports){eval("module.exports = [\r\n '#define SHADER_NAME PHASER_FORWARD_DIFFUSE_FS',\r\n '',\r\n 'precision mediump float;',\r\n '',\r\n 'struct Light',\r\n '{',\r\n ' vec2 position;',\r\n ' vec3 color;',\r\n ' float intensity;',\r\n ' float radius;',\r\n '};',\r\n '',\r\n 'const int kMaxLights = %LIGHT_COUNT%;',\r\n '',\r\n 'uniform vec4 uCamera; /* x, y, rotation, zoom */',\r\n 'uniform vec2 uResolution;',\r\n 'uniform sampler2D uMainSampler;',\r\n 'uniform sampler2D uNormSampler;',\r\n 'uniform vec3 uAmbientLightColor;',\r\n 'uniform Light uLights[kMaxLights];',\r\n 'uniform mat3 uInverseRotationMatrix;',\r\n '',\r\n 'varying vec2 outTexCoord;',\r\n 'varying vec4 outTint;',\r\n '',\r\n 'void 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(uInverseRotationMatrix * 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 ''\r\n].join('\\n');\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_FS',\n '',\n 'precision mediump float;',\n '',\n 'uniform sampler2D uMainSampler;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main()',\n '{',\n ' vec4 texture = texture2D(uMainSampler, outTexCoord);',\n ' vec4 texel = vec4(outTint.rgb * outTint.a, outTint.a);',\n ' vec4 color = texture;',\n '',\n ' if (outTintEffect == 0.0)',\n ' {',\n ' // Multiply texture tint',\n ' color = texture * texel;',\n ' }',\n ' else if (outTintEffect == 1.0)',\n ' {',\n ' // Solid color + texture alpha',\n ' color.rgb = mix(texture.rgb, outTint.rgb * outTint.a, texture.a);',\n ' color.a = texture.a * texel.a;',\n ' }',\n ' else if (outTintEffect == 2.0)',\n ' {',\n ' // Solid color, no texture',\n ' color = texel;',\n ' }',\n '',\n ' gl_FragColor = color;',\n '}',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js?")},"./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js":function(module,exports){eval("module.exports = [\n '#define SHADER_NAME PHASER_TEXTURE_TINT_VS',\n '',\n 'precision mediump float;',\n '',\n 'uniform mat4 uProjectionMatrix;',\n 'uniform mat4 uViewMatrix;',\n 'uniform mat4 uModelMatrix;',\n '',\n 'attribute vec2 inPosition;',\n 'attribute vec2 inTexCoord;',\n 'attribute float inTintEffect;',\n 'attribute vec4 inTint;',\n '',\n 'varying vec2 outTexCoord;',\n 'varying float outTintEffect;',\n 'varying vec4 outTint;',\n '',\n 'void main ()',\n '{',\n ' gl_Position = uProjectionMatrix * uViewMatrix * uModelMatrix * vec4(inPosition, 1.0, 1.0);',\n '',\n ' outTexCoord = inTexCoord;',\n ' outTint = inTint;',\n ' outTintEffect = inTintEffect;',\n '}',\n '',\n ''\n].join('\\n');\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js?")},"./node_modules/phaser/src/scale/ScaleManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scale/const/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scale/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetInnerHeight = __webpack_require__(/*! ../dom/GetInnerHeight */ \"./node_modules/phaser/src/dom/GetInnerHeight.js\");\r\nvar GetTarget = __webpack_require__(/*! ../dom/GetTarget */ \"./node_modules/phaser/src/dom/GetTarget.js\");\r\nvar GetScreenOrientation = __webpack_require__(/*! ../dom/GetScreenOrientation */ \"./node_modules/phaser/src/dom/GetScreenOrientation.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle/Rectangle */ \"./node_modules/phaser/src/geom/rectangle/Rectangle.js\");\r\nvar Size = __webpack_require__(/*! ../structs/Size */ \"./node_modules/phaser/src/structs/Size.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scale Manager handles the scaling, resizing and alignment of the game canvas.\r\n * \r\n * The way scaling is handled is by setting the game canvas to a fixed size, which is defined in the\r\n * game configuration. You also define the parent container in the game config. If no parent is given,\r\n * it will default to using the document body. The Scale Manager will then look at the available space\r\n * within the _parent_ and scale the canvas accordingly. Scaling is handled by setting the canvas CSS\r\n * width and height properties, leaving the width and height of the canvas element itself untouched.\r\n * Scaling is therefore achieved by keeping the core canvas the same size and 'stretching'\r\n * it via its CSS properties. This gives the same result and speed as using the `transform-scale` CSS\r\n * property, without the need for browser prefix handling.\r\n * \r\n * The calculations for the scale are heavily influenced by the bounding parent size, which is the computed\r\n * dimensions of the canvas's parent. The CSS rules of the parent element play an important role in the\r\n * operation of the Scale Manager. For example, if the parent has no defined width or height, then actions\r\n * like auto-centering will fail to achieve the required result. The Scale Manager works in tandem with the\r\n * CSS you set-up on the page hosting your game, rather than taking control of it.\r\n * \r\n * #### Parent and Display canvas containment guidelines:\r\n *\r\n * - Style the Parent element (of the game canvas) to control the Parent size and thus the games size and layout.\r\n *\r\n * - The Parent element's CSS styles should _effectively_ apply maximum (and minimum) bounding behavior.\r\n *\r\n * - The Parent element should _not_ apply a padding as this is not accounted for.\r\n * If a padding is required apply it to the Parent's parent or apply a margin to the Parent.\r\n * If you need to add a border, margin or any other CSS around your game container, then use a parent element and\r\n * apply the CSS to this instead, otherwise you'll be constantly resizing the shape of the game container.\r\n *\r\n * - The Display canvas layout CSS styles (i.e. margins, size) should not be altered / specified as\r\n * they may be updated by the Scale Manager.\r\n *\r\n * #### Scale Modes\r\n * \r\n * The way the scaling is handled is determined by the `scaleMode` property. The default is `NO_SCALE`,\r\n * which prevents Phaser from scaling or touching the canvas, or its parent, at all. In this mode, you are\r\n * responsible for all scaling. The other scaling modes afford you automatic scaling.\r\n * \r\n * If you wish to scale your game so that it always fits into the available space within the parent, you\r\n * should use the scale mode `FIT`. Look at the documentation for other scale modes to see what options are\r\n * available. Here is a basic config showing how to set this scale mode:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * mode: Phaser.Scale.FIT,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * Place the `scale` config object within your game config.\r\n * \r\n * If you wish for the canvas to be resized directly, so that the canvas itself fills the available space\r\n * (i.e. it isn't scaled, it's resized) then use the `RESIZE` scale mode. This will give you a 1:1 mapping\r\n * of canvas pixels to game size. In this mode CSS isn't used to scale the canvas, it's literally adjusted\r\n * to fill all available space within the parent. You should be extremely careful about the size of the\r\n * canvas you're creating when doing this, as the larger the area, the more work the GPU has to do and it's\r\n * very easy to hit fill-rate limits quickly.\r\n * \r\n * For complex, custom-scaling requirements, you should probably consider using the `RESIZE` scale mode,\r\n * with your own limitations in place re: canvas dimensions and managing the scaling with the game scenes\r\n * yourself. For the vast majority of games, however, the `FIT` mode is likely to be the most used.\r\n * \r\n * Please appreciate that the Scale Manager cannot perform miracles. All it does is scale your game canvas\r\n * as best it can, based on what it can infer from its surrounding area. There are all kinds of environments\r\n * where it's up to you to guide and help the canvas position itself, especially when built into rendering\r\n * frameworks like React and Vue. If your page requires meta tags to prevent user scaling gestures, or such\r\n * like, then it's up to you to ensure they are present in the html.\r\n * \r\n * #### Centering\r\n * \r\n * You can also have the game canvas automatically centered. Again, this relies heavily on the parent being\r\n * properly configured and styled, as the centering offsets are based entirely on the available space\r\n * within the parent element. Centering is disabled by default, or can be applied horizontally, vertically,\r\n * or both. Here's an example:\r\n * \r\n * ```javascript\r\n * scale: {\r\n * parent: 'yourgamediv',\r\n * autoCenter: Phaser.Scale.CENTER_BOTH,\r\n * width: 800,\r\n * height: 600\r\n * }\r\n * ```\r\n * \r\n * #### Fullscreen API\r\n * \r\n * If the browser supports it, you can send your game into fullscreen mode. In this mode, the game will fill\r\n * the entire display, removing all browser UI and anything else present on the screen. It will remain in this\r\n * mode until your game either disables it, or until the user tabs out or presses ESCape if on desktop. It's a\r\n * great way to achieve a desktop-game like experience from the browser, but it does require a modern browser\r\n * to handle it. Some mobile browsers also support this.\r\n *\r\n * @class ScaleManager\r\n * @memberof Phaser.Scale\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser.Game instance.\r\n */\r\nvar ScaleManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function ScaleManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n *\r\n * @name Phaser.Scale.ScaleManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.15.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * A reference to the HTML Canvas Element that Phaser uses to render the game.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.16.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * The DOM bounds of the canvas element.\r\n *\r\n * @name Phaser.Scale.ScaleManager#canvasBounds\r\n * @type {Phaser.Geom.Rectangle}\r\n * @since 3.16.0\r\n */\r\n this.canvasBounds = new Rectangle();\r\n\r\n /**\r\n * The parent object of the Canvas. Often a div, or the browser window, or nothing in non-browser environments.\r\n * \r\n * This is set in the Game Config as the `parent` property. If undefined (or just not present), it will default\r\n * to use the document body. If specifically set to `null` Phaser will ignore all parent operations.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parent\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.parent = null;\r\n\r\n /**\r\n * Is the parent element the browser window?\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentIsWindow\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.parentIsWindow = false;\r\n\r\n /**\r\n * The Parent Size component.\r\n *\r\n * @name Phaser.Scale.ScaleManager#parentSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.parentSize = new Size();\r\n\r\n /**\r\n * The Game Size component.\r\n * \r\n * The un-modified game size, as requested in the game config (the raw width / height),\r\n * as used for world bounds, cameras, etc\r\n *\r\n * @name Phaser.Scale.ScaleManager#gameSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.gameSize = new Size();\r\n\r\n /**\r\n * The Base Size component.\r\n * \r\n * The modified game size, which is the gameSize * resolution, used to set the canvas width and height\r\n * (but not the CSS style)\r\n *\r\n * @name Phaser.Scale.ScaleManager#baseSize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.baseSize = new Size();\r\n\r\n /**\r\n * The Display Size component.\r\n * \r\n * The size used for the canvas style, factoring in the scale mode, parent and other values.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displaySize\r\n * @type {Phaser.Structs.Size}\r\n * @since 3.16.0\r\n */\r\n this.displaySize = new Size();\r\n\r\n /**\r\n * The game scale mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#scaleMode\r\n * @type {Phaser.Scale.ScaleModeType}\r\n * @since 3.16.0\r\n */\r\n this.scaleMode = CONST.SCALE_MODE.NONE;\r\n\r\n /**\r\n * The canvas resolution.\r\n * \r\n * This is hard-coded to a value of 1 in the 3.16 release of Phaser and will be enabled at a later date.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resolution\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The game zoom factor.\r\n * \r\n * This value allows you to multiply your games base size by the given zoom factor.\r\n * This is then used when calculating the display size, even in `NO_SCALE` situations.\r\n * If you don't want Phaser to touch the canvas style at all, this value should be 1.\r\n * \r\n * Can also be set to `MAX_ZOOM` in which case the zoom value will be derived based\r\n * on the game size and available space within the parent.\r\n *\r\n * @name Phaser.Scale.ScaleManager#zoom\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n this.zoom = 1;\r\n\r\n /**\r\n * Internal flag set when the game zoom factor is modified.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_resetZoom\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this._resetZoom = false;\r\n\r\n /**\r\n * The scale factor between the baseSize and the canvasBounds.\r\n *\r\n * @name Phaser.Scale.ScaleManager#displayScale\r\n * @type {Phaser.Math.Vector2}\r\n * @since 3.16.0\r\n */\r\n this.displayScale = new Vector2(1, 1);\r\n\r\n /**\r\n * If set, the canvas sizes will be automatically passed through Math.floor.\r\n * This results in rounded pixel display values, which is important for performance on legacy\r\n * and low powered devices, but at the cost of not achieving a 'perfect' fit in some browser windows.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoRound\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.autoRound = false;\r\n\r\n /**\r\n * Automatically center the canvas within the parent? The different centering modes are:\r\n * \r\n * 1. No centering.\r\n * 2. Center both horizontally and vertically.\r\n * 3. Center horizontally.\r\n * 4. Center vertically.\r\n * \r\n * Please be aware that in order to center the game canvas, you must have specified a parent\r\n * that has a size set, or the canvas parent is the document.body.\r\n *\r\n * @name Phaser.Scale.ScaleManager#autoCenter\r\n * @type {Phaser.Scale.CenterType}\r\n * @since 3.16.0\r\n */\r\n this.autoCenter = CONST.CENTER.NO_CENTER;\r\n\r\n /**\r\n * The current device orientation.\r\n * \r\n * Orientation events are dispatched via the Device Orientation API, typically only on mobile browsers.\r\n *\r\n * @name Phaser.Scale.ScaleManager#orientation\r\n * @type {Phaser.Scale.OrientationType}\r\n * @since 3.16.0\r\n */\r\n this.orientation = CONST.ORIENTATION.LANDSCAPE;\r\n\r\n /**\r\n * A reference to the Device.Fullscreen object.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreen\r\n * @type {Phaser.Device.Fullscreen}\r\n * @since 3.16.0\r\n */\r\n this.fullscreen;\r\n\r\n /**\r\n * The DOM Element which is sent into fullscreen mode.\r\n *\r\n * @name Phaser.Scale.ScaleManager#fullscreenTarget\r\n * @type {?any}\r\n * @since 3.16.0\r\n */\r\n this.fullscreenTarget = null;\r\n\r\n /**\r\n * Did Phaser create the fullscreen target div, or was it provided in the game config?\r\n *\r\n * @name Phaser.Scale.ScaleManager#_createdFullscreenTarget\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._createdFullscreenTarget = false;\r\n\r\n /**\r\n * Internal var that keeps track of the user, or the browser, requesting fullscreen changes.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_requestedFullscreenChange\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.2\r\n */\r\n this._requestedFullscreenChange = false;\r\n\r\n /**\r\n * The dirty state of the Scale Manager.\r\n * Set if there is a change between the parent size and the current size.\r\n *\r\n * @name Phaser.Scale.ScaleManager#dirty\r\n * @type {boolean}\r\n * @since 3.16.0\r\n */\r\n this.dirty = false;\r\n\r\n /**\r\n * How many milliseconds should elapse before checking if the browser size has changed?\r\n * \r\n * Most modern browsers dispatch a 'resize' event, which the Scale Manager will listen for.\r\n * However, older browsers fail to do this, or do it consistently, so we fall back to a\r\n * more traditional 'size check' based on a time interval. You can control how often it is\r\n * checked here.\r\n *\r\n * @name Phaser.Scale.ScaleManager#resizeInterval\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\n this.resizeInterval = 500;\r\n\r\n /**\r\n * Internal size interval tracker.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_lastCheck\r\n * @type {integer}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._lastCheck = 0;\r\n\r\n /**\r\n * Internal flag to check orientation state.\r\n *\r\n * @name Phaser.Scale.ScaleManager#_checkOrientation\r\n * @type {boolean}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._checkOrientation = false;\r\n\r\n /**\r\n * Internal object containing our defined event listeners.\r\n *\r\n * @name Phaser.Scale.ScaleManager#listeners\r\n * @type {object}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this.listeners = {\r\n\r\n orientationChange: NOOP,\r\n windowResize: NOOP,\r\n fullScreenChange: NOOP,\r\n fullScreenError: NOOP\r\n\r\n };\r\n },\r\n\r\n /**\r\n * Called _before_ the canvas object is created and added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#preBoot\r\n * @protected\r\n * @listens Phaser.Core.Events#BOOT\r\n * @since 3.16.0\r\n */\r\n preBoot: function ()\r\n {\r\n // Parse the config to get the scaling values we need\r\n this.parseConfig(this.game.config);\r\n\r\n this.game.events.once('boot', this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot handler is called by Phaser.Game when it first starts up.\r\n * The renderer is available by now and the canvas has been added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#boot\r\n * @protected\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n */\r\n boot: function ()\r\n {\r\n var game = this.game;\r\n\r\n this.canvas = game.canvas;\r\n\r\n this.fullscreen = game.device.fullscreen;\r\n\r\n if (this.scaleMode !== CONST.SCALE_MODE.RESIZE)\r\n {\r\n this.displaySize.setAspectMode(this.scaleMode);\r\n }\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n this.resize(this.width, this.height);\r\n }\r\n else\r\n {\r\n this.getParentBounds();\r\n\r\n // Only set the parent bounds if the parent has an actual size\r\n if (this.parentSize.width > 0 && this.parentSize.height > 0)\r\n {\r\n this.displaySize.setParent(this.parentSize);\r\n }\r\n\r\n this.refresh();\r\n }\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.step, this);\r\n\r\n this.startListeners();\r\n },\r\n\r\n /**\r\n * Parses the game configuration to set-up the scale defaults.\r\n *\r\n * @method Phaser.Scale.ScaleManager#parseConfig\r\n * @protected\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n parseConfig: function (config)\r\n {\r\n // Get the parent element, if any\r\n this.getParent(config);\r\n \r\n // Get the size of the parent element\r\n // This can often set a height of zero (especially for un-styled divs)\r\n this.getParentBounds();\r\n\r\n var width = config.width;\r\n var height = config.height;\r\n var scaleMode = config.scaleMode;\r\n var resolution = config.resolution;\r\n var zoom = config.zoom;\r\n var autoRound = config.autoRound;\r\n\r\n // If width = '100%', or similar value\r\n if (typeof width === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentWidth = this.parentSize.width;\r\n\r\n if (parentWidth === 0)\r\n {\r\n parentWidth = window.innerWidth;\r\n }\r\n\r\n var parentScaleX = parseInt(width, 10) / 100;\r\n\r\n width = Math.floor(parentWidth * parentScaleX);\r\n }\r\n\r\n // If height = '100%', or similar value\r\n if (typeof height === 'string')\r\n {\r\n // If we have a parent with a height, we'll work it out from that\r\n var parentHeight = this.parentSize.height;\r\n\r\n if (parentHeight === 0)\r\n {\r\n parentHeight = window.innerHeight;\r\n }\r\n\r\n var parentScaleY = parseInt(height, 10) / 100;\r\n\r\n height = Math.floor(parentHeight * parentScaleY);\r\n }\r\n\r\n // This is fixed at 1 on purpose.\r\n // Changing it will break all user input.\r\n // Wait for another release to solve this issue.\r\n this.resolution = 1;\r\n\r\n this.scaleMode = scaleMode;\r\n\r\n this.autoRound = autoRound;\r\n\r\n this.autoCenter = config.autoCenter;\r\n\r\n this.resizeInterval = config.resizeInterval;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.setSize(width, height);\r\n\r\n if (zoom === CONST.ZOOM.MAX_ZOOM)\r\n {\r\n zoom = this.getMaxZoom();\r\n }\r\n\r\n this.zoom = zoom;\r\n\r\n if (zoom !== 1)\r\n {\r\n this._resetZoom = true;\r\n }\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.setSize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n if (config.minWidth > 0)\r\n {\r\n this.displaySize.setMin(config.minWidth * zoom, config.minHeight * zoom);\r\n }\r\n\r\n if (config.maxWidth > 0)\r\n {\r\n this.displaySize.setMax(config.maxWidth * zoom, config.maxHeight * zoom);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.orientation = GetScreenOrientation(width, height);\r\n },\r\n\r\n /**\r\n * Determines the parent element of the game canvas, if any, based on the game configuration.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParent\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Types.Core.GameConfig} config - The Game configuration object.\r\n */\r\n getParent: function (config)\r\n {\r\n var parent = config.parent;\r\n\r\n if (parent === null)\r\n {\r\n // User is responsible for managing the parent\r\n return;\r\n }\r\n\r\n this.parent = GetTarget(parent);\r\n this.parentIsWindow = (this.parent === document.body);\r\n\r\n if (config.expandParent && config.scaleMode !== CONST.SCALE_MODE.NONE)\r\n {\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow || DOMRect.height === 0)\r\n {\r\n document.documentElement.style.height = '100%';\r\n document.body.style.height = '100%';\r\n\r\n DOMRect = this.parent.getBoundingClientRect();\r\n\r\n // The parent STILL has no height, clearly no CSS\r\n // has been set on it even though we fixed the body :(\r\n if (!this.parentIsWindow && DOMRect.height === 0)\r\n {\r\n this.parent.style.overflow = 'hidden';\r\n this.parent.style.width = '100%';\r\n this.parent.style.height = '100%';\r\n }\r\n }\r\n }\r\n\r\n // And now get the fullscreenTarget\r\n if (config.fullscreenTarget && !this.fullscreenTarget)\r\n {\r\n this.fullscreenTarget = GetTarget(config.fullscreenTarget);\r\n }\r\n },\r\n\r\n /**\r\n * Calculates the size of the parent bounds and updates the `parentSize` component, if the canvas has a dom parent.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getParentBounds\r\n * @since 3.16.0\r\n * \r\n * @return {boolean} `true` if the parent bounds have changed size, otherwise `false`.\r\n */\r\n getParentBounds: function ()\r\n {\r\n if (!this.parent)\r\n {\r\n return false;\r\n }\r\n\r\n var parentSize = this.parentSize;\r\n\r\n // Ref. http://msdn.microsoft.com/en-us/library/hh781509(v=vs.85).aspx for getBoundingClientRect\r\n\r\n var DOMRect = this.parent.getBoundingClientRect();\r\n\r\n if (this.parentIsWindow && this.game.device.os.iOS)\r\n {\r\n DOMRect.height = GetInnerHeight(true);\r\n }\r\n\r\n var resolution = this.resolution;\r\n var newWidth = DOMRect.width * resolution;\r\n var newHeight = DOMRect.height * resolution;\r\n\r\n if (parentSize.width !== newWidth || parentSize.height !== newHeight)\r\n {\r\n parentSize.setSize(newWidth, newHeight);\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n },\r\n\r\n /**\r\n * Attempts to lock the orientation of the web browser using the Screen Orientation API.\r\n * \r\n * This API is only available on modern mobile browsers.\r\n * See https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation for details.\r\n *\r\n * @method Phaser.Scale.ScaleManager#lockOrientation\r\n * @since 3.16.0\r\n * \r\n * @param {string} orientation - The orientation you'd like to lock the browser in. Should be an API string such as 'landscape', 'landscape-primary', 'portrait', etc.\r\n * \r\n * @return {boolean} `true` if the orientation was successfully locked, otherwise `false`.\r\n */\r\n lockOrientation: function (orientation)\r\n {\r\n var lock = screen.lockOrientation || screen.mozLockOrientation || screen.msLockOrientation;\r\n\r\n if (lock)\r\n {\r\n return lock(orientation);\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * This method will set the size of the Parent Size component, which is used in scaling\r\n * and centering calculations. You only need to call this method if you have explicitly\r\n * disabled the use of a parent in your game config, but still wish to take advantage of\r\n * other Scale Manager features.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setParentSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the parent.\r\n * @param {number} height - The new height of the parent.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setParentSize: function (width, height)\r\n {\r\n this.parentSize.setSize(width, height);\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * This method will set a new size for your game.\r\n * \r\n * It should only be used if you're looking to change the base size of your game and are using\r\n * one of the Scale Manager scaling modes, i.e. `FIT`. If you're using `NO_SCALE` and wish to\r\n * change the game and canvas size directly, then please use the `resize` method instead.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setGameSize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setGameSize: function (width, height)\r\n {\r\n var autoRound = this.autoRound;\r\n var resolution = this.resolution;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize(width, height);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Call this to modify the size of the Phaser canvas element directly.\r\n * You should only use this if you are using the `NO_SCALE` scale mode,\r\n * it will update all internal components completely.\r\n * \r\n * If all you want to do is change the size of the parent, see the `setParentSize` method.\r\n * \r\n * If all you want is to change the base size of the game, but still have the Scale Manager\r\n * manage all the scaling (i.e. you're **not** using `NO_SCALE`), then see the `setGameSize` method.\r\n * \r\n * This method will set the `gameSize`, `baseSize` and `displaySize` components to the given\r\n * dimensions. It will then resize the canvas width and height to the values given, by\r\n * directly setting the properties. Finally, if you have set the Scale Manager zoom value\r\n * to anything other than 1 (the default), it will set the canvas CSS width and height to\r\n * be the given size multiplied by the zoom factor (the canvas pixel size remains untouched).\r\n * \r\n * If you have enabled `autoCenter`, it is then passed to the `updateCenter` method and\r\n * the margins are set, allowing the canvas to be centered based on its parent element\r\n * alone. Finally, the `displayScale` is adjusted and the RESIZE event dispatched.\r\n *\r\n * @method Phaser.Scale.ScaleManager#resize\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} width - The new width of the game.\r\n * @param {number} height - The new height of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n var zoom = this.zoom;\r\n var resolution = this.resolution;\r\n var autoRound = this.autoRound;\r\n\r\n if (autoRound)\r\n {\r\n width = Math.floor(width);\r\n height = Math.floor(height);\r\n }\r\n\r\n var previousWidth = this.width;\r\n var previousHeight = this.height;\r\n\r\n // The un-modified game size, as requested in the game config (the raw width / height) as used for world bounds, etc\r\n this.gameSize.resize(width, height);\r\n\r\n // The modified game size, which is the w/h * resolution\r\n this.baseSize.resize(width * resolution, height * resolution);\r\n\r\n if (autoRound)\r\n {\r\n this.baseSize.width = Math.floor(this.baseSize.width);\r\n this.baseSize.height = Math.floor(this.baseSize.height);\r\n }\r\n\r\n // The size used for the canvas style, factoring in the scale mode and parent and zoom value\r\n // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change)\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n this.canvas.width = this.baseSize.width;\r\n this.canvas.height = this.baseSize.height;\r\n\r\n var style = this.canvas.style;\r\n\r\n var styleWidth = width * zoom;\r\n var styleHeight = height * zoom;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (styleWidth !== width || styleHeight !== height)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n return this.refresh(previousWidth, previousHeight);\r\n },\r\n\r\n /**\r\n * Sets the zoom value of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {integer} value - The new zoom value of the game.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setZoom: function (value)\r\n {\r\n this.zoom = value;\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Sets the zoom to be the maximum possible based on the _current_ parent size.\r\n *\r\n * @method Phaser.Scale.ScaleManager#setMaxZoom\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n setMaxZoom: function ()\r\n {\r\n this.zoom = this.getMaxZoom();\r\n this._resetZoom = true;\r\n\r\n return this.refresh();\r\n },\r\n\r\n /**\r\n * Refreshes the internal scale values, bounds sizes and orientation checks.\r\n * \r\n * Once finished, dispatches the resize event.\r\n * \r\n * This is called automatically by the Scale Manager when the browser window size changes,\r\n * as long as it is using a Scale Mode other than 'NONE'.\r\n *\r\n * @method Phaser.Scale.ScaleManager#refresh\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {number} [previousWidth] - The previous width of the game. Only set if the gameSize has changed.\r\n * @param {number} [previousHeight] - The previous height of the game. Only set if the gameSize has changed.\r\n * \r\n * @return {this} The Scale Manager instance.\r\n */\r\n refresh: function (previousWidth, previousHeight)\r\n {\r\n if (previousWidth === undefined) { previousWidth = this.width; }\r\n if (previousHeight === undefined) { previousHeight = this.height; }\r\n\r\n this.updateScale();\r\n this.updateBounds();\r\n this.updateOrientation();\r\n\r\n this.displayScale.set(this.baseSize.width / this.canvasBounds.width, this.baseSize.height / this.canvasBounds.height);\r\n\r\n var domContainer = this.game.domContainer;\r\n\r\n if (domContainer)\r\n {\r\n this.baseSize.setCSS(domContainer);\r\n\r\n var canvasStyle = this.canvas.style;\r\n var domStyle = domContainer.style;\r\n\r\n domStyle.transform = 'scale(' + this.displaySize.width / this.baseSize.width + ',' + this.displaySize.height / this.baseSize.height + ')';\r\n\r\n domStyle.marginLeft = canvasStyle.marginLeft;\r\n domStyle.marginTop = canvasStyle.marginTop;\r\n }\r\n\r\n this.emit(Events.RESIZE, this.gameSize, this.baseSize, this.displaySize, this.resolution, previousWidth, previousHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that checks the current screen orientation, only if the internal check flag is set.\r\n * \r\n * If the orientation has changed it updates the orientation property and then dispatches the orientation change event.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateOrientation\r\n * @fires Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.0\r\n */\r\n updateOrientation: function ()\r\n {\r\n if (this._checkOrientation)\r\n {\r\n this._checkOrientation = false;\r\n\r\n var newOrientation = GetScreenOrientation(this.width, this.height);\r\n\r\n if (newOrientation !== this.orientation)\r\n {\r\n this.orientation = newOrientation;\r\n \r\n this.emit(Events.ORIENTATION_CHANGE, newOrientation);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that manages updating the size components based on the scale mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateScale\r\n * @since 3.16.0\r\n */\r\n updateScale: function ()\r\n {\r\n var style = this.canvas.style;\r\n\r\n var width = this.gameSize.width;\r\n var height = this.gameSize.height;\r\n\r\n var styleWidth;\r\n var styleHeight;\r\n\r\n var zoom = this.zoom;\r\n var autoRound = this.autoRound;\r\n var resolution = 1;\r\n\r\n if (this.scaleMode === CONST.SCALE_MODE.NONE)\r\n {\r\n // No scale\r\n this.displaySize.setSize((width * zoom) * resolution, (height * zoom) * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n if (this._resetZoom)\r\n {\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n\r\n this._resetZoom = false;\r\n }\r\n }\r\n else if (this.scaleMode === CONST.SCALE_MODE.RESIZE)\r\n {\r\n // Resize to match parent\r\n\r\n // This will constrain using min/max\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n this.gameSize.setSize(this.displaySize.width, this.displaySize.height);\r\n\r\n this.baseSize.setSize(this.displaySize.width * resolution, this.displaySize.height * resolution);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n this.canvas.width = styleWidth;\r\n this.canvas.height = styleHeight;\r\n }\r\n else\r\n {\r\n // All other scale modes\r\n this.displaySize.setSize(this.parentSize.width, this.parentSize.height);\r\n\r\n styleWidth = this.displaySize.width / resolution;\r\n styleHeight = this.displaySize.height / resolution;\r\n\r\n if (autoRound)\r\n {\r\n styleWidth = Math.floor(styleWidth);\r\n styleHeight = Math.floor(styleHeight);\r\n }\r\n\r\n style.width = styleWidth + 'px';\r\n style.height = styleHeight + 'px';\r\n }\r\n\r\n // Update the parentSize incase the canvas / style change modified it\r\n this.getParentBounds();\r\n\r\n // Finally, update the centering\r\n this.updateCenter();\r\n },\r\n\r\n /**\r\n * Calculates and returns the largest possible zoom factor, based on the current\r\n * parent and game sizes. If the parent has no dimensions (i.e. an unstyled div),\r\n * or is smaller than the un-zoomed game, then this will return a value of 1 (no zoom)\r\n *\r\n * @method Phaser.Scale.ScaleManager#getMaxZoom\r\n * @since 3.16.0\r\n * \r\n * @return {integer} The maximum possible zoom factor. At a minimum this value is always at least 1.\r\n */\r\n getMaxZoom: function ()\r\n {\r\n var zoomH = SnapFloor(this.parentSize.width, this.gameSize.width, 0, true);\r\n var zoomV = SnapFloor(this.parentSize.height, this.gameSize.height, 0, true);\r\n \r\n return Math.max(Math.min(zoomH, zoomV), 1);\r\n },\r\n\r\n /**\r\n * Calculates and updates the canvas CSS style in order to center it within the\r\n * bounds of its parent. If you have explicitly set parent to be `null` in your\r\n * game config then this method will likely give incorrect results unless you have called the\r\n * `setParentSize` method first.\r\n * \r\n * It works by modifying the canvas CSS `marginLeft` and `marginTop` properties.\r\n * \r\n * If they have already been set by your own style sheet, or code, this will overwrite them.\r\n * \r\n * To prevent the Scale Manager from centering the canvas, either do not set the\r\n * `autoCenter` property in your game config, or make sure it is set to `NO_CENTER`.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateCenter\r\n * @since 3.16.0\r\n */\r\n updateCenter: function ()\r\n {\r\n var autoCenter = this.autoCenter;\r\n\r\n if (autoCenter === CONST.CENTER.NO_CENTER)\r\n {\r\n return;\r\n }\r\n\r\n var canvas = this.canvas;\r\n\r\n var style = canvas.style;\r\n\r\n var bounds = canvas.getBoundingClientRect();\r\n\r\n // var width = parseInt(canvas.style.width, 10) || canvas.width;\r\n // var height = parseInt(canvas.style.height, 10) || canvas.height;\r\n\r\n var width = bounds.width;\r\n var height = bounds.height;\r\n\r\n var offsetX = Math.floor((this.parentSize.width - width) / 2);\r\n var offsetY = Math.floor((this.parentSize.height - height) / 2);\r\n\r\n if (autoCenter === CONST.CENTER.CENTER_HORIZONTALLY)\r\n {\r\n offsetY = 0;\r\n }\r\n else if (autoCenter === CONST.CENTER.CENTER_VERTICALLY)\r\n {\r\n offsetX = 0;\r\n }\r\n\r\n style.marginLeft = offsetX + 'px';\r\n style.marginTop = offsetY + 'px';\r\n },\r\n\r\n /**\r\n * Updates the `canvasBounds` rectangle to match the bounding client rectangle of the\r\n * canvas element being used to track input events.\r\n *\r\n * @method Phaser.Scale.ScaleManager#updateBounds\r\n * @since 3.16.0\r\n */\r\n updateBounds: function ()\r\n {\r\n var bounds = this.canvasBounds;\r\n var clientRect = this.canvas.getBoundingClientRect();\r\n\r\n bounds.x = clientRect.left + (window.pageXOffset || 0) - (document.documentElement.clientLeft || 0);\r\n bounds.y = clientRect.top + (window.pageYOffset || 0) - (document.documentElement.clientTop || 0);\r\n bounds.width = clientRect.width;\r\n bounds.height = clientRect.height;\r\n },\r\n\r\n /**\r\n * Transforms the pageX value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformX\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageX - The DOM pageX value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformX: function (pageX)\r\n {\r\n return (pageX - this.canvasBounds.left) * this.displayScale.x;\r\n },\r\n\r\n /**\r\n * Transforms the pageY value into the scaled coordinate space of the Scale Manager.\r\n *\r\n * @method Phaser.Scale.ScaleManager#transformY\r\n * @since 3.16.0\r\n *\r\n * @param {number} pageY - The DOM pageY value.\r\n *\r\n * @return {number} The translated value.\r\n */\r\n transformY: function (pageY)\r\n {\r\n return (pageY - this.canvasBounds.top) * this.displayScale.y;\r\n },\r\n\r\n /**\r\n * Sends a request to the browser to ask it to go in to full screen mode, using the {@link https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API Fullscreen API}.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerup`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n * \r\n * On touch devices, such as Android and iOS Safari, you should always use `pointerup` and NOT `pointerdown`,\r\n * otherwise the request will fail unless the document in which your game is embedded has already received\r\n * some form of touch input, which you cannot guarantee. Activating fullscreen via `pointerup` circumvents\r\n * this issue.\r\n * \r\n * Performing an action that navigates to another page, or opens another tab, will automatically cancel\r\n * fullscreen mode, as will the user pressing the ESC key. To cancel fullscreen mode directly from your game,\r\n * i.e. by clicking an icon, call the `stopFullscreen` method.\r\n * \r\n * A browser can only send one DOM element into fullscreen. You can control which element this is by\r\n * setting the `fullscreenTarget` property in your game config, or changing the property in the Scale Manager.\r\n * Note that the game canvas _must_ be a child of the target. If you do not give a target, Phaser will\r\n * automatically create a blank `
` element and move the canvas into it, before going fullscreen.\r\n * When it leaves fullscreen, the div will be removed.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n startFullscreen: function (fullscreenOptions)\r\n {\r\n if (fullscreenOptions === undefined) { fullscreenOptions = { navigationUI: 'hide' }; }\r\n\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return;\r\n }\r\n\r\n if (!fullscreen.active)\r\n {\r\n var fsTarget = this.getFullscreenTarget();\r\n\r\n this._requestedFullscreenChange = true;\r\n \r\n if (typeof Promise !== 'undefined')\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions)\r\n .then(this.fullscreenSuccessHandler.bind(this))\r\n .catch(this.fullscreenErrorHandler.bind(this));\r\n }\r\n }\r\n else\r\n {\r\n if (fullscreen.keyboard)\r\n {\r\n fsTarget[fullscreen.request](Element.ALLOW_KEYBOARD_INPUT);\r\n }\r\n else\r\n {\r\n fsTarget[fullscreen.request](fullscreenOptions);\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this.fullscreenSuccessHandler();\r\n }\r\n else\r\n {\r\n this.fullscreenErrorHandler();\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The browser has successfully entered fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenSuccessHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n */\r\n fullscreenSuccessHandler: function ()\r\n {\r\n this.getParentBounds();\r\n\r\n this.refresh();\r\n\r\n this.emit(Events.ENTER_FULLSCREEN);\r\n },\r\n\r\n /**\r\n * The browser failed to enter fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#fullscreenErrorHandler\r\n * @private\r\n * @fires Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.17.0\r\n * \r\n * @param {any} error - The DOM error event.\r\n */\r\n fullscreenErrorHandler: function (error)\r\n {\r\n this.removeFullscreenTarget();\r\n\r\n this.emit(Events.FULLSCREEN_FAILED, error);\r\n },\r\n\r\n /**\r\n * An internal method that gets the target element that is used when entering fullscreen mode.\r\n *\r\n * @method Phaser.Scale.ScaleManager#getFullscreenTarget\r\n * @since 3.16.0\r\n * \r\n * @return {object} The fullscreen target element.\r\n */\r\n getFullscreenTarget: function ()\r\n {\r\n if (!this.fullscreenTarget)\r\n {\r\n var fsTarget = document.createElement('div');\r\n\r\n fsTarget.style.margin = '0';\r\n fsTarget.style.padding = '0';\r\n fsTarget.style.width = '100%';\r\n fsTarget.style.height = '100%';\r\n\r\n this.fullscreenTarget = fsTarget;\r\n\r\n this._createdFullscreenTarget = true;\r\n }\r\n\r\n if (this._createdFullscreenTarget)\r\n {\r\n var canvasParent = this.canvas.parentNode;\r\n\r\n canvasParent.insertBefore(this.fullscreenTarget, this.canvas);\r\n\r\n this.fullscreenTarget.appendChild(this.canvas);\r\n }\r\n\r\n return this.fullscreenTarget;\r\n },\r\n\r\n /**\r\n * Removes the fullscreen target that was added to the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#removeFullscreenTarget\r\n * @since 3.17.0\r\n */\r\n removeFullscreenTarget: function ()\r\n {\r\n if (this._createdFullscreenTarget)\r\n {\r\n var fsTarget = this.fullscreenTarget;\r\n\r\n if (fsTarget && fsTarget.parentNode)\r\n {\r\n var parent = fsTarget.parentNode;\r\n\r\n parent.insertBefore(this.canvas, fsTarget);\r\n\r\n parent.removeChild(fsTarget);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Calling this method will cancel fullscreen mode, if the browser has entered it.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopFullscreen\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.0\r\n */\r\n stopFullscreen: function ()\r\n {\r\n var fullscreen = this.fullscreen;\r\n\r\n if (!fullscreen.available)\r\n {\r\n this.emit(Events.FULLSCREEN_UNSUPPORTED);\r\n\r\n return false;\r\n }\r\n\r\n if (fullscreen.active)\r\n {\r\n this._requestedFullscreenChange = true;\r\n\r\n document[fullscreen.cancel]();\r\n }\r\n\r\n this.removeFullscreenTarget();\r\n\r\n // Get the parent size again as it will have changed\r\n this.getParentBounds();\r\n\r\n this.emit(Events.LEAVE_FULLSCREEN);\r\n\r\n this.refresh();\r\n },\r\n\r\n /**\r\n * Toggles the fullscreen mode. If already in fullscreen, calling this will cancel it.\r\n * If not in fullscreen, this will request the browser to enter fullscreen mode.\r\n * \r\n * If the browser does not support this, a `FULLSCREEN_UNSUPPORTED` event will be emitted.\r\n * \r\n * This method _must_ be called from a user-input gesture, such as `pointerdown`. You cannot launch\r\n * games fullscreen without this, as most browsers block it. Games within an iframe will also be blocked\r\n * from fullscreen unless the iframe has the `allowfullscreen` attribute.\r\n *\r\n * @method Phaser.Scale.ScaleManager#toggleFullscreen\r\n * @fires Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @fires Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @fires Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @fires Phaser.Scale.Events#RESIZE\r\n * @since 3.16.0\r\n * \r\n * @param {object} [fullscreenOptions] - The FullscreenOptions dictionary is used to provide configuration options when entering full screen.\r\n */\r\n toggleFullscreen: function (fullscreenOptions)\r\n {\r\n if (this.fullscreen.active)\r\n {\r\n this.stopFullscreen();\r\n }\r\n else\r\n {\r\n this.startFullscreen(fullscreenOptions);\r\n }\r\n },\r\n\r\n /**\r\n * An internal method that starts the different DOM event listeners running.\r\n *\r\n * @method Phaser.Scale.ScaleManager#startListeners\r\n * @since 3.16.0\r\n */\r\n startListeners: function ()\r\n {\r\n var _this = this;\r\n var listeners = this.listeners;\r\n\r\n listeners.orientationChange = function ()\r\n {\r\n _this._checkOrientation = true;\r\n _this.dirty = true;\r\n };\r\n\r\n listeners.windowResize = function ()\r\n {\r\n _this.dirty = true;\r\n };\r\n\r\n // Only dispatched on mobile devices\r\n window.addEventListener('orientationchange', listeners.orientationChange, false);\r\n\r\n window.addEventListener('resize', listeners.windowResize, false);\r\n\r\n if (this.fullscreen.available)\r\n {\r\n listeners.fullScreenChange = function (event)\r\n {\r\n return _this.onFullScreenChange(event);\r\n };\r\n\r\n listeners.fullScreenError = function (event)\r\n {\r\n return _this.onFullScreenError(event);\r\n };\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.addEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.addEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.addEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.addEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n }\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenchange event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenChange\r\n * @since 3.16.0\r\n */\r\n onFullScreenChange: function ()\r\n {\r\n // They pressed ESC while in fullscreen mode\r\n if (!this._requestedFullscreenChange)\r\n {\r\n this.stopFullscreen();\r\n }\r\n\r\n this._requestedFullscreenChange = false;\r\n },\r\n\r\n /**\r\n * Triggered when a fullscreenerror event is dispatched by the DOM.\r\n *\r\n * @method Phaser.Scale.ScaleManager#onFullScreenError\r\n * @since 3.16.0\r\n */\r\n onFullScreenError: function ()\r\n {\r\n this.removeFullscreenTarget();\r\n },\r\n\r\n /**\r\n * Internal method, called automatically by the game step.\r\n * Monitors the elapsed time and resize interval to see if a parent bounds check needs to take place.\r\n *\r\n * @method Phaser.Scale.ScaleManager#step\r\n * @since 3.16.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n if (!this.parent)\r\n {\r\n return;\r\n }\r\n\r\n this._lastCheck += delta;\r\n\r\n if (this.dirty || this._lastCheck > this.resizeInterval)\r\n {\r\n // Returns true if the parent bounds have changed size\r\n if (this.getParentBounds())\r\n {\r\n this.refresh();\r\n }\r\n\r\n this.dirty = false;\r\n this._lastCheck = 0;\r\n }\r\n },\r\n\r\n /**\r\n * Stops all DOM event listeners.\r\n *\r\n * @method Phaser.Scale.ScaleManager#stopListeners\r\n * @since 3.16.0\r\n */\r\n stopListeners: function ()\r\n {\r\n var listeners = this.listeners;\r\n\r\n window.removeEventListener('orientationchange', listeners.orientationChange, false);\r\n window.removeEventListener('resize', listeners.windowResize, false);\r\n\r\n var vendors = [ 'webkit', 'moz', '' ];\r\n\r\n vendors.forEach(function (prefix)\r\n {\r\n document.removeEventListener(prefix + 'fullscreenchange', listeners.fullScreenChange, false);\r\n document.removeEventListener(prefix + 'fullscreenerror', listeners.fullScreenError, false);\r\n });\r\n\r\n // MS Specific\r\n document.removeEventListener('MSFullscreenChange', listeners.fullScreenChange, false);\r\n document.removeEventListener('MSFullscreenError', listeners.fullScreenError, false);\r\n },\r\n\r\n /**\r\n * Destroys this Scale Manager, releasing all references to external resources.\r\n * Once destroyed, the Scale Manager cannot be used again.\r\n *\r\n * @method Phaser.Scale.ScaleManager#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.stopListeners();\r\n\r\n this.game = null;\r\n this.canvas = null;\r\n this.canvasBounds = null;\r\n this.parent = null;\r\n this.fullscreenTarget = null;\r\n\r\n this.parentSize.destroy();\r\n this.gameSize.destroy();\r\n this.baseSize.destroy();\r\n this.displaySize.destroy();\r\n },\r\n\r\n /**\r\n * Is the browser currently in fullscreen mode or not?\r\n *\r\n * @name Phaser.Scale.ScaleManager#isFullscreen\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isFullscreen: {\r\n\r\n get: function ()\r\n {\r\n return this.fullscreen.active;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game width.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#width\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.width;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * The game height.\r\n * \r\n * This is typically the size given in the game configuration.\r\n *\r\n * @name Phaser.Scale.ScaleManager#height\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this.gameSize.height;\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a portrait orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isPortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isPortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.PORTRAIT);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Is the device in a landscape orientation as reported by the Orientation API?\r\n * This value is usually only available on mobile devices.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.orientation === CONST.ORIENTATION.LANDSCAPE);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions portrait? (i.e. taller than they are wide)\r\n * \r\n * This is different to the device itself being in a portrait orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGamePortrait\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGamePortrait: {\r\n\r\n get: function ()\r\n {\r\n return (this.height > this.width);\r\n }\r\n \r\n },\r\n\r\n /**\r\n * Are the game dimensions landscape? (i.e. wider than they are tall)\r\n * \r\n * This is different to the device itself being in a landscape orientation.\r\n *\r\n * @name Phaser.Scale.ScaleManager#isGameLandscape\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n isGameLandscape: {\r\n\r\n get: function ()\r\n {\r\n return (this.width > this.height);\r\n }\r\n \r\n }\r\n\r\n});\r\n\r\nmodule.exports = ScaleManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/ScaleManager.js?")},"./node_modules/phaser/src/scale/const/CENTER_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * @namespace Phaser.Scale.Center\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for centering the game canvas.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Center]{@link Phaser.Scale.Center}.\r\n * \r\n * @typedef {Phaser.Scale.Center} Phaser.Scale.CenterType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas is not centered within the parent by Phaser.\r\n * You can still center it yourself via CSS.\r\n * \r\n * @name Phaser.Scale.Center.NO_CENTER\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_CENTER: 0,\r\n\r\n /**\r\n * The game canvas is centered both horizontally and vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_BOTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_BOTH: 1,\r\n\r\n /**\r\n * The game canvas is centered horizontally within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_HORIZONTALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_HORIZONTALLY: 2,\r\n\r\n /**\r\n * The game canvas is centered both vertically within the parent.\r\n * To do this, the parent has to have a bounds that can be calculated and not be empty.\r\n * \r\n * Centering is achieved by setting the margin left and top properties of the\r\n * game canvas, and does not factor in any other CSS styles you may have applied.\r\n * \r\n * @name Phaser.Scale.Center.CENTER_VERTICALLY\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n CENTER_VERTICALLY: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/CENTER_CONST.js?")},"./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * @namespace Phaser.Scale.Orientation\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for orientation.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Orientation]{@link Phaser.Scale.Orientation}.\r\n * \r\n * @typedef {Phaser.Scale.Orientation} Phaser.Scale.OrientationType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * A landscape orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.LANDSCAPE\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n LANDSCAPE: 'landscape-primary',\r\n\r\n /**\r\n * A portrait orientation.\r\n * \r\n * @name Phaser.Scale.Orientation.PORTRAIT\r\n * @type {string}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n PORTRAIT: 'portrait-primary'\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js?")},"./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * @namespace Phaser.Scale.ScaleModes\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for the different scale modes available.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.ScaleModes]{@link Phaser.Scale.ScaleModes}.\r\n * \r\n * @typedef {Phaser.Scale.ScaleModes} Phaser.Scale.ScaleModeType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * No scaling happens at all. The canvas is set to the size given in the game config and Phaser doesn't change it\r\n * again from that point on. If you change the canvas size, either via CSS, or directly via code, then you need\r\n * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.\r\n * \r\n * @name Phaser.Scale.ScaleModes.NONE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NONE: 0,\r\n\r\n /**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n WIDTH_CONTROLS_HEIGHT: 1,\r\n\r\n /**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n HEIGHT_CONTROLS_WIDTH: 2,\r\n\r\n /**\r\n * The width and height are automatically adjusted to fit inside the given target area,\r\n * while keeping the aspect ratio. Depending on the aspect ratio there may be some space\r\n * inside the area which is not covered.\r\n * \r\n * @name Phaser.Scale.ScaleModes.FIT\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n FIT: 3,\r\n\r\n /**\r\n * The width and height are automatically adjusted to make the size cover the entire target\r\n * area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Scale.ScaleModes.ENVELOP\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ENVELOP: 4,\r\n\r\n /**\r\n * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.\r\n * \r\n * @name Phaser.Scale.ScaleModes.RESIZE\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n RESIZE: 5\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js?")},"./node_modules/phaser/src/scale/const/ZOOM_CONST.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * @namespace Phaser.Scale.Zoom\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\n/**\r\n * Phaser Scale Manager constants for zoom modes.\r\n * \r\n * To find out what each mode does please see [Phaser.Scale.Zoom]{@link Phaser.Scale.Zoom}.\r\n * \r\n * @typedef {Phaser.Scale.Zoom} Phaser.Scale.ZoomType\r\n * @memberof Phaser.Scale\r\n * @since 3.16.0\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * The game canvas will not be zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.NO_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n NO_ZOOM: 1,\r\n\r\n /**\r\n * The game canvas will be 2x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_2X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_2X: 2,\r\n\r\n /**\r\n * The game canvas will be 4x zoomed by Phaser.\r\n * \r\n * @name Phaser.Scale.Zoom.ZOOM_4X\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n ZOOM_4X: 4,\r\n\r\n /**\r\n * Calculate the zoom value based on the maximum multiplied game size that will\r\n * fit into the parent, or browser window if no parent is set.\r\n * \r\n * @name Phaser.Scale.Zoom.MAX_ZOOM\r\n * @type {integer}\r\n * @const\r\n * @since 3.16.0\r\n */\r\n MAX_ZOOM: -1\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/ZOOM_CONST.js?")},"./node_modules/phaser/src/scale/const/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = {\r\n\r\n CENTER: __webpack_require__(/*! ./CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n ORIENTATION: __webpack_require__(/*! ./ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n SCALE_MODE: __webpack_require__(/*! ./SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n ZOOM: __webpack_require__(/*! ./ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/const/index.js?')},"./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager has successfully entered fullscreen mode.\r\n *\r\n * @event Phaser.Scale.Events#ENTER_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'enterfullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode but failed.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_FAILED\r\n * @since 3.17.0\r\n */\r\nmodule.exports = 'fullscreenfailed';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js?")},"./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager tried to enter fullscreen mode, but it is unsupported by the browser.\r\n *\r\n * @event Phaser.Scale.Events#FULLSCREEN_UNSUPPORTED\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'fullscreenunsupported';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js?")},"./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager was in fullscreen mode, but has since left, either directly via game code,\r\n * or via a user gestured, such as pressing the ESC key.\r\n *\r\n * @event Phaser.Scale.Events#LEAVE_FULLSCREEN\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'leavefullscreen';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js?")},"./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Orientation Change Event.\r\n *\r\n * @event Phaser.Scale.Events#ORIENTATION_CHANGE\r\n * @since 3.16.1\r\n * \r\n * @param {string} orientation - \r\n */\r\nmodule.exports = 'orientationchange';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js?")},"./node_modules/phaser/src/scale/events/RESIZE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scale Manager Resize Event.\r\n * \r\n * This event is dispatched whenever the Scale Manager detects a resize event from the browser.\r\n * It sends three parameters to the callback, each of them being Size components. You can read\r\n * the `width`, `height`, `aspectRatio` and other properties of these components to help with\r\n * scaling your own game content.\r\n *\r\n * @event Phaser.Scale.Events#RESIZE\r\n * @since 3.16.1\r\n * \r\n * @param {Phaser.Structs.Size} gameSize - A reference to the Game Size component. This is the un-scaled size of your game canvas.\r\n * @param {Phaser.Structs.Size} baseSize - A reference to the Base Size component. This is the game size multiplied by resolution.\r\n * @param {Phaser.Structs.Size} displaySize - A reference to the Display Size component. This is the scaled canvas size, after applying zoom and scale mode.\r\n * @param {number} resolution - The current resolution. Defaults to 1 at the moment.\r\n * @param {number} previousWidth - If the `gameSize` has changed, this value contains its previous width, otherwise it contains the current width.\r\n * @param {number} previousHeight - If the `gameSize` has changed, this value contains its previous height, otherwise it contains the current height.\r\n */\r\nmodule.exports = 'resize';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/RESIZE_EVENT.js?")},"./node_modules/phaser/src/scale/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scale.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ENTER_FULLSCREEN: __webpack_require__(/*! ./ENTER_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js"),\r\n FULLSCREEN_FAILED: __webpack_require__(/*! ./FULLSCREEN_FAILED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js"),\r\n FULLSCREEN_UNSUPPORTED: __webpack_require__(/*! ./FULLSCREEN_UNSUPPORTED_EVENT */ "./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js"),\r\n LEAVE_FULLSCREEN: __webpack_require__(/*! ./LEAVE_FULLSCREEN_EVENT */ "./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js"),\r\n ORIENTATION_CHANGE: __webpack_require__(/*! ./ORIENTATION_CHANGE_EVENT */ "./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js"),\r\n RESIZE: __webpack_require__(/*! ./RESIZE_EVENT */ "./node_modules/phaser/src/scale/events/RESIZE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/events/index.js?')},"./node_modules/phaser/src/scale/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scale/const/index.js");\r\n\r\n/**\r\n * @namespace Phaser.Scale\r\n * \r\n * @borrows Phaser.Scale.Center.NO_CENTER as NO_CENTER\r\n * @borrows Phaser.Scale.Center.CENTER_BOTH as CENTER_BOTH\r\n * @borrows Phaser.Scale.Center.CENTER_HORIZONTALLY as CENTER_HORIZONTALLY\r\n * @borrows Phaser.Scale.Center.CENTER_VERTICALLY as CENTER_VERTICALLY\r\n * \r\n * @borrows Phaser.Scale.Orientation.LANDSCAPE as LANDSCAPE\r\n * @borrows Phaser.Scale.Orientation.PORTRAIT as PORTRAIT\r\n * \r\n * @borrows Phaser.Scale.ScaleModes.NONE as NONE\r\n * @borrows Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT as WIDTH_CONTROLS_HEIGHT\r\n * @borrows Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH as HEIGHT_CONTROLS_WIDTH\r\n * @borrows Phaser.Scale.ScaleModes.FIT as FIT\r\n * @borrows Phaser.Scale.ScaleModes.ENVELOP as ENVELOP\r\n * @borrows Phaser.Scale.ScaleModes.RESIZE as RESIZE\r\n * \r\n * @borrows Phaser.Scale.Zoom.NO_ZOOM as NO_ZOOM\r\n * @borrows Phaser.Scale.Zoom.ZOOM_2X as ZOOM_2X\r\n * @borrows Phaser.Scale.Zoom.ZOOM_4X as ZOOM_4X\r\n * @borrows Phaser.Scale.Zoom.MAX_ZOOM as MAX_ZOOM\r\n */\r\n\r\nvar Scale = {\r\n\r\n Center: __webpack_require__(/*! ./const/CENTER_CONST */ "./node_modules/phaser/src/scale/const/CENTER_CONST.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scale/events/index.js"),\r\n Orientation: __webpack_require__(/*! ./const/ORIENTATION_CONST */ "./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js"),\r\n ScaleManager: __webpack_require__(/*! ./ScaleManager */ "./node_modules/phaser/src/scale/ScaleManager.js"),\r\n ScaleModes: __webpack_require__(/*! ./const/SCALE_MODE_CONST */ "./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js"),\r\n Zoom: __webpack_require__(/*! ./const/ZOOM_CONST */ "./node_modules/phaser/src/scale/const/ZOOM_CONST.js")\r\n\r\n};\r\n\r\nScale = Extend(false, Scale, CONST.CENTER);\r\nScale = Extend(false, Scale, CONST.ORIENTATION);\r\nScale = Extend(false, Scale, CONST.SCALE_MODE);\r\nScale = Extend(false, Scale, CONST.ZOOM);\r\n\r\nmodule.exports = Scale;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scale/index.js?')},"./node_modules/phaser/src/scene/GetPhysicsPlugins.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * Builds an array of which physics plugins should be activated for the given Scene.\r\n *\r\n * @function Phaser.Scenes.GetPhysicsPlugins\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scenes.Systems} sys - The scene system to get the physics systems of.\r\n *\r\n * @return {array} An array of Physics systems to start for this Scene.\r\n */\r\nvar GetPhysicsPlugins = function (sys)\r\n{\r\n var defaultSystem = sys.game.config.defaultPhysicsSystem;\r\n var sceneSystems = GetFastValue(sys.settings, 'physics', false);\r\n\r\n if (!defaultSystem && !sceneSystems)\r\n {\r\n // No default physics system or systems in this scene\r\n return;\r\n }\r\n\r\n // Let's build the systems array\r\n var output = [];\r\n\r\n if (defaultSystem)\r\n {\r\n output.push(UppercaseFirst(defaultSystem + 'Physics'));\r\n }\r\n\r\n if (sceneSystems)\r\n {\r\n for (var key in sceneSystems)\r\n {\r\n key = UppercaseFirst(key.concat('Physics'));\r\n\r\n if (output.indexOf(key) === -1)\r\n {\r\n output.push(key);\r\n }\r\n }\r\n }\r\n\r\n // An array of Physics systems to start for this Scene\r\n return output;\r\n};\r\n\r\nmodule.exports = GetPhysicsPlugins;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetPhysicsPlugins.js?")},"./node_modules/phaser/src/scene/GetScenePlugins.js":function(module,exports,__webpack_require__){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\n\n/**\n * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene.\n *\n * @function Phaser.Scenes.GetScenePlugins\n * @since 3.0.0\n *\n * @param {Phaser.Scenes.Systems} sys - The Scene Systems object to check for plugins.\n *\n * @return {array} An array of all plugins which should be activated, either the default ones or the ones configured in the Scene Systems object.\n */\nvar GetScenePlugins = function (sys)\n{\n var defaultPlugins = sys.plugins.getDefaultScenePlugins();\n\n var scenePlugins = GetFastValue(sys.settings, 'plugins', false);\n\n // Scene Plugins always override Default Plugins\n if (Array.isArray(scenePlugins))\n {\n return scenePlugins;\n }\n else if (defaultPlugins)\n {\n return defaultPlugins;\n }\n else\n {\n // No default plugins or plugins in this scene\n return [];\n }\n};\n\nmodule.exports = GetScenePlugins;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/GetScenePlugins.js?")},"./node_modules/phaser/src/scene/InjectionMap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// These properties get injected into the Scene and map to local systems\r\n// The map value is the property that is injected into the Scene, the key is the Scene.Systems reference.\r\n// These defaults can be modified via the Scene config object\r\n// var config = {\r\n// map: {\r\n// add: 'makeStuff',\r\n// load: 'loader'\r\n// }\r\n// };\r\n\r\nvar InjectionMap = {\r\n\r\n game: 'game',\r\n\r\n anims: 'anims',\r\n cache: 'cache',\r\n plugins: 'plugins',\r\n registry: 'registry',\r\n scale: 'scale',\r\n sound: 'sound',\r\n textures: 'textures',\r\n\r\n events: 'events',\r\n cameras: 'cameras',\r\n add: 'add',\r\n make: 'make',\r\n scenePlugin: 'scene',\r\n displayList: 'children',\r\n lights: 'lights',\r\n\r\n data: 'data',\r\n input: 'input',\r\n load: 'load',\r\n time: 'time',\r\n tweens: 'tweens',\r\n\r\n arcadePhysics: 'physics',\r\n impactPhysics: 'impact',\r\n matterPhysics: 'matter'\r\n\r\n};\r\n\r\nif (typeof PLUGIN_CAMERA3D)\r\n{\r\n InjectionMap.cameras3d = 'cameras3d';\r\n}\r\n\r\nif (typeof PLUGIN_FBINSTANT)\r\n{\r\n InjectionMap.facebook = 'facebook';\r\n}\r\n\r\nmodule.exports = InjectionMap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/InjectionMap.js?")},"./node_modules/phaser/src/scene/Scene.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Systems = __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js");\r\n\r\n/**\r\n * @classdesc\r\n * A base Phaser.Scene class which can be extended for your own use.\r\n *\r\n * You can also define the optional methods {@link Phaser.Types.Scenes.SceneInitCallback init()}, {@link Phaser.Types.Scenes.ScenePreloadCallback preload()}, and {@link Phaser.Types.Scenes.SceneCreateCallback create()}.\r\n *\r\n * @class Scene\r\n * @memberof Phaser\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Scene = new Class({\r\n\r\n initialize:\r\n\r\n function Scene (config)\r\n {\r\n /**\r\n * The Scene Systems. You must never overwrite this property, or all hell will break lose.\r\n *\r\n * @name Phaser.Scene#sys\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.sys = new Systems(this, config);\r\n\r\n /**\r\n * A reference to the Phaser.Game instance.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to the global Animation Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the game level Data Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the Sound Manager.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#sound\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the Texture Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n /**\r\n * A scene level Event Emitter.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A scene level Camera System.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A scene level Game Object Factory.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A scene level Game Object Creator.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scene\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scene;\r\n\r\n /**\r\n * A scene level Game Object Display List.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#children\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.children;\r\n\r\n /**\r\n * A scene level Lights Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#lights\r\n * @type {Phaser.GameObjects.LightsManager}\r\n * @since 3.0.0\r\n */\r\n this.lights;\r\n\r\n /**\r\n * A scene level Data Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#data\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.data;\r\n\r\n /**\r\n * A scene level Input Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#input\r\n * @type {Phaser.Input.InputPlugin}\r\n * @since 3.0.0\r\n */\r\n this.input;\r\n\r\n /**\r\n * A scene level Loader Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#load\r\n * @type {Phaser.Loader.LoaderPlugin}\r\n * @since 3.0.0\r\n */\r\n this.load;\r\n\r\n /**\r\n * A scene level Time and Clock Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#time\r\n * @type {Phaser.Time.Clock}\r\n * @since 3.0.0\r\n */\r\n this.time;\r\n\r\n /**\r\n * A scene level Tween Manager Plugin.\r\n * This property will only be available if defined in the Scene Injection Map and the plugin is installed.\r\n *\r\n * @name Phaser.Scene#tweens\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.tweens;\r\n\r\n /**\r\n * A scene level Arcade Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#physics\r\n * @type {Phaser.Physics.Arcade.ArcadePhysics}\r\n * @since 3.0.0\r\n */\r\n this.physics;\r\n\r\n /**\r\n * A scene level Impact Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#impact\r\n * @type {Phaser.Physics.Impact.ImpactPhysics}\r\n * @since 3.0.0\r\n */\r\n this.impact;\r\n\r\n /**\r\n * A scene level Matter Physics Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#matter\r\n * @type {Phaser.Physics.Matter.MatterPhysics}\r\n * @since 3.0.0\r\n */\r\n this.matter;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * A scene level Facebook Instant Games Plugin.\r\n * This property will only be available if defined in the Scene Injection Map, the plugin is installed and configured.\r\n *\r\n * @name Phaser.Scene#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * This property will only be available if defined in the Scene Injection Map.\r\n *\r\n * @name Phaser.Scene#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.16.2\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the Plugin Manager.\r\n *\r\n * The Plugin Manager is a global system that allows plugins to register themselves with it, and can then install\r\n * those plugins into Scenes as required.\r\n *\r\n * @name Phaser.Scene#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n },\r\n\r\n /**\r\n * Should be overridden by your own Scenes.\r\n * This method is called once per game step while the scene is running.\r\n *\r\n * @method Phaser.Scene#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function ()\r\n {\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Scene.js?')},"./node_modules/phaser/src/scene/SceneManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar LoaderEvents = __webpack_require__(/*! ../loader/events */ \"./node_modules/phaser/src/loader/events/index.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Scene = __webpack_require__(/*! ./Scene */ \"./node_modules/phaser/src/scene/Scene.js\");\r\nvar Systems = __webpack_require__(/*! ./Systems */ \"./node_modules/phaser/src/scene/Systems.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Manager.\r\n *\r\n * The Scene Manager is a Game level system, responsible for creating, processing and updating all of the\r\n * Scenes in a Game instance.\r\n *\r\n *\r\n * @class SceneManager\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Scene Manager belongs to.\r\n * @param {object} sceneConfig - Scene specific configuration settings.\r\n */\r\nvar SceneManager = new Class({\r\n\r\n initialize:\r\n\r\n function SceneManager (game, sceneConfig)\r\n {\r\n /**\r\n * The Game that this SceneManager belongs to.\r\n *\r\n * @name Phaser.Scenes.SceneManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * An object that maps the keys to the scene so we can quickly get a scene from a key without iteration.\r\n *\r\n * @name Phaser.Scenes.SceneManager#keys\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.keys = {};\r\n\r\n /**\r\n * The array in which all of the scenes are kept.\r\n *\r\n * @name Phaser.Scenes.SceneManager#scenes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.scenes = [];\r\n\r\n /**\r\n * Scenes pending to be added are stored in here until the manager has time to add it.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of scenes waiting to be started once the game has booted.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_start\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._start = [];\r\n\r\n /**\r\n * An operations queue, because we don't manipulate the scenes array during processing.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_queue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._queue = [];\r\n\r\n /**\r\n * Boot time data to merge.\r\n *\r\n * @name Phaser.Scenes.SceneManager#_data\r\n * @type {object}\r\n * @private\r\n * @since 3.4.0\r\n */\r\n this._data = {};\r\n\r\n /**\r\n * Is the Scene Manager actively processing the Scenes list?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isProcessing\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isProcessing = false;\r\n\r\n /**\r\n * Has the Scene Manager properly started?\r\n *\r\n * @name Phaser.Scenes.SceneManager#isBooted\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.4.0\r\n */\r\n this.isBooted = false;\r\n\r\n /**\r\n * Do any of the Cameras in any of the Scenes require a custom viewport?\r\n * If not we can skip scissor tests.\r\n *\r\n * @name Phaser.Scenes.SceneManager#customViewports\r\n * @type {number}\r\n * @default 0\r\n * @since 3.12.0\r\n */\r\n this.customViewports = 0;\r\n\r\n if (sceneConfig)\r\n {\r\n if (!Array.isArray(sceneConfig))\r\n {\r\n sceneConfig = [ sceneConfig ];\r\n }\r\n\r\n for (var i = 0; i < sceneConfig.length; i++)\r\n {\r\n // The i === 0 part just autostarts the first Scene given (unless it says otherwise in its config)\r\n this._pending.push({\r\n key: 'default',\r\n scene: sceneConfig[i],\r\n autoStart: (i === 0),\r\n data: {}\r\n });\r\n }\r\n }\r\n\r\n game.events.once(GameEvents.READY, this.bootQueue, this);\r\n },\r\n\r\n /**\r\n * Internal first-time Scene boot handler.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootQueue\r\n * @private\r\n * @since 3.2.0\r\n */\r\n bootQueue: function ()\r\n {\r\n if (this.isBooted)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n var key;\r\n var sceneConfig;\r\n\r\n for (i = 0; i < this._pending.length; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n key = entry.key;\r\n sceneConfig = entry.scene;\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n // Any data to inject?\r\n if (this._data[key])\r\n {\r\n newScene.sys.settings.data = this._data[key].data;\r\n\r\n if (this._data[key].autoStart)\r\n {\r\n entry.autoStart = true;\r\n }\r\n }\r\n\r\n if (entry.autoStart || newScene.sys.settings.active)\r\n {\r\n this._start.push(key);\r\n }\r\n }\r\n\r\n // Clear the pending lists\r\n this._pending.length = 0;\r\n\r\n this._data = {};\r\n\r\n this.isBooted = true;\r\n\r\n // _start might have been populated by the above\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n this._start.length = 0;\r\n },\r\n\r\n /**\r\n * Process the Scene operations queue.\r\n *\r\n * @method Phaser.Scenes.SceneManager#processQueue\r\n * @since 3.0.0\r\n */\r\n processQueue: function ()\r\n {\r\n var pendingLength = this._pending.length;\r\n var queueLength = this._queue.length;\r\n\r\n if (pendingLength === 0 && queueLength === 0)\r\n {\r\n return;\r\n }\r\n\r\n var i;\r\n var entry;\r\n\r\n if (pendingLength)\r\n {\r\n for (i = 0; i < pendingLength; i++)\r\n {\r\n entry = this._pending[i];\r\n\r\n this.add(entry.key, entry.scene, entry.autoStart, entry.data);\r\n }\r\n\r\n // _start might have been populated by this.add\r\n for (i = 0; i < this._start.length; i++)\r\n {\r\n entry = this._start[i];\r\n\r\n this.start(entry);\r\n }\r\n\r\n // Clear the pending lists\r\n this._start.length = 0;\r\n this._pending.length = 0;\r\n\r\n return;\r\n }\r\n\r\n for (i = 0; i < this._queue.length; i++)\r\n {\r\n entry = this._queue[i];\r\n\r\n this[entry.op](entry.keyA, entry.keyB);\r\n }\r\n\r\n this._queue.length = 0;\r\n },\r\n\r\n /**\r\n * Adds a new Scene into the SceneManager.\r\n * You must give each Scene a unique key by which you'll identify it.\r\n *\r\n * The `sceneConfig` can be:\r\n *\r\n * * A `Phaser.Scene` object, or an object that extends it.\r\n * * A plain JavaScript object\r\n * * A JavaScript ES6 Class that extends `Phaser.Scene`\r\n * * A JavaScript ES5 prototype based Class\r\n * * A JavaScript function\r\n *\r\n * If a function is given then a new Scene will be created by calling it.\r\n *\r\n * @method Phaser.Scenes.SceneManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - A unique key used to reference the Scene, i.e. `MainMenu` or `Level1`.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene\r\n * @param {boolean} [autoStart=false] - If `true` the Scene will be started immediately after being added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {?Phaser.Scene} The added Scene, if it was added immediately, otherwise `null`.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n if (autoStart === undefined) { autoStart = false; }\r\n if (data === undefined) { data = {}; }\r\n\r\n // If processing or not booted then put scene into a holding pattern\r\n if (this.isProcessing || !this.isBooted)\r\n {\r\n this._pending.push({\r\n key: key,\r\n scene: sceneConfig,\r\n autoStart: autoStart,\r\n data: data\r\n });\r\n\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = { data: data };\r\n }\r\n\r\n return null;\r\n }\r\n\r\n key = this.getKey(key, sceneConfig);\r\n\r\n var newScene;\r\n\r\n if (sceneConfig instanceof Scene)\r\n {\r\n newScene = this.createSceneFromInstance(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'object')\r\n {\r\n sceneConfig.key = key;\r\n\r\n newScene = this.createSceneFromObject(key, sceneConfig);\r\n }\r\n else if (typeof sceneConfig === 'function')\r\n {\r\n newScene = this.createSceneFromFunction(key, sceneConfig);\r\n }\r\n\r\n // Any data to inject?\r\n newScene.sys.settings.data = data;\r\n\r\n // Replace key in case the scene changed it\r\n key = newScene.sys.settings.key;\r\n\r\n this.keys[key] = newScene;\r\n\r\n this.scenes.push(newScene);\r\n\r\n if (autoStart || newScene.sys.settings.active)\r\n {\r\n if (this._pending.length)\r\n {\r\n this._start.push(key);\r\n }\r\n else\r\n {\r\n this.start(key);\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it will\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.SceneManager#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} scene - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'remove', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var sceneToRemove = this.getScene(key);\r\n\r\n if (!sceneToRemove || sceneToRemove.sys.isTransitioning())\r\n {\r\n return this;\r\n }\r\n\r\n var index = this.scenes.indexOf(sceneToRemove);\r\n var sceneKey = sceneToRemove.sys.settings.key;\r\n\r\n if (index > -1)\r\n {\r\n delete this.keys[sceneKey];\r\n this.scenes.splice(index, 1);\r\n\r\n if (this._start.indexOf(sceneKey) > -1)\r\n {\r\n index = this._start.indexOf(sceneKey);\r\n this._start.splice(index, 1);\r\n }\r\n\r\n sceneToRemove.sys.destroy();\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boot the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bootScene\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to boot.\r\n */\r\n bootScene: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.init)\r\n {\r\n scene.init.call(scene, settings.data);\r\n\r\n settings.status = CONST.INIT;\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_INIT, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n }\r\n\r\n var loader;\r\n\r\n if (sys.load)\r\n {\r\n loader = sys.load;\r\n\r\n loader.reset();\r\n }\r\n\r\n if (loader && scene.preload)\r\n {\r\n scene.preload.call(scene);\r\n\r\n // Is the loader empty?\r\n if (loader.list.size === 0)\r\n {\r\n this.create(scene);\r\n }\r\n else\r\n {\r\n settings.status = CONST.LOADING;\r\n\r\n // Start the loader going as we have something in the queue\r\n loader.once(LoaderEvents.COMPLETE, this.loadComplete, this);\r\n\r\n loader.start();\r\n }\r\n }\r\n else\r\n {\r\n // No preload? Then there was nothing to load either\r\n this.create(scene);\r\n }\r\n },\r\n\r\n /**\r\n * Handles load completion for a Scene's Loader.\r\n *\r\n * Starts the Scene that the Loader belongs to.\r\n *\r\n * @method Phaser.Scenes.SceneManager#loadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading.\r\n */\r\n loadComplete: function (loader)\r\n {\r\n var scene = loader.scene;\r\n\r\n // TODO - Remove. This should *not* be handled here\r\n // Try to unlock HTML5 sounds every time any loader completes\r\n if (this.game.sound && this.game.sound.onBlurPausedSounds)\r\n {\r\n this.game.sound.unlock();\r\n }\r\n\r\n this.create(scene);\r\n },\r\n\r\n /**\r\n * Handle payload completion for a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#payloadComplete\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Loader.LoaderPlugin} loader - The loader that has completed loading its Scene's payload.\r\n */\r\n payloadComplete: function (loader)\r\n {\r\n this.bootScene(loader.scene);\r\n },\r\n\r\n /**\r\n * Updates the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - Time elapsed.\r\n * @param {number} delta - Delta time from the last update.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.processQueue();\r\n\r\n this.isProcessing = true;\r\n\r\n // Loop through the active scenes in reverse order\r\n for (var i = this.scenes.length - 1; i >= 0; i--)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.status > CONST.START && sys.settings.status <= CONST.RUNNING)\r\n {\r\n sys.step(time, delta);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Renders the Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#render\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer to use.\r\n */\r\n render: function (renderer)\r\n {\r\n // Loop through the scenes in forward order\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n if (sys.settings.visible && sys.settings.status >= CONST.LOADING && sys.settings.status < CONST.SLEEPING)\r\n {\r\n sys.render(renderer);\r\n }\r\n }\r\n\r\n this.isProcessing = false;\r\n },\r\n\r\n /**\r\n * Calls the given Scene's {@link Phaser.Scene#create} method and updates its status.\r\n *\r\n * @method Phaser.Scenes.SceneManager#create\r\n * @private\r\n * @fires Phaser.Scenes.Events#CREATE\r\n * @fires Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to create.\r\n */\r\n create: function (scene)\r\n {\r\n var sys = scene.sys;\r\n var settings = sys.settings;\r\n\r\n if (scene.create)\r\n {\r\n settings.status = CONST.CREATING;\r\n\r\n scene.create.call(scene, settings.data);\r\n\r\n if (settings.status === CONST.DESTROYED)\r\n {\r\n return;\r\n }\r\n }\r\n\r\n if (settings.isTransition)\r\n {\r\n sys.events.emit(Events.TRANSITION_START, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n // If the Scene has an update function we'll set it now, otherwise it'll remain as NOOP\r\n if (scene.update)\r\n {\r\n sys.sceneUpdate = scene.update;\r\n }\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n sys.events.emit(Events.CREATE, scene);\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from a function.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromFunction\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {function} scene - The function to create the Scene from.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromFunction: function (key, scene)\r\n {\r\n var newScene = new scene();\r\n\r\n if (newScene instanceof Scene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n\r\n return this.createSceneFromInstance(key, newScene);\r\n }\r\n else\r\n {\r\n newScene.sys = new Systems(newScene);\r\n\r\n newScene.sys.settings.key = key;\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n }\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene instance.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromInstance\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {Phaser.Scene} newScene - The Scene instance.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromInstance: function (key, newScene)\r\n {\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Creates and initializes a Scene from an Object definition.\r\n *\r\n * @method Phaser.Scenes.SceneManager#createSceneFromObject\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key of the Scene.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig)} sceneConfig - The Scene config.\r\n *\r\n * @return {Phaser.Scene} The created Scene.\r\n */\r\n createSceneFromObject: function (key, sceneConfig)\r\n {\r\n var newScene = new Scene(sceneConfig);\r\n\r\n var configKey = newScene.sys.settings.key;\r\n\r\n if (configKey !== '')\r\n {\r\n key = configKey;\r\n }\r\n else\r\n {\r\n newScene.sys.settings.key = key;\r\n }\r\n\r\n newScene.sys.init(this.game);\r\n\r\n // Extract callbacks\r\n\r\n var defaults = [ 'init', 'preload', 'create', 'update', 'render' ];\r\n\r\n for (var i = 0; i < defaults.length; i++)\r\n {\r\n var sceneCallback = GetValue(sceneConfig, defaults[i], null);\r\n\r\n if (sceneCallback)\r\n {\r\n newScene[defaults[i]] = sceneCallback;\r\n }\r\n }\r\n\r\n // Now let's move across any other functions or properties that may exist in the extend object:\r\n\r\n /*\r\n scene: {\r\n preload: preload,\r\n create: create,\r\n extend: {\r\n hello: 1,\r\n test: 'atari',\r\n addImage: addImage\r\n }\r\n }\r\n */\r\n\r\n if (sceneConfig.hasOwnProperty('extend'))\r\n {\r\n for (var propertyKey in sceneConfig.extend)\r\n {\r\n var value = sceneConfig.extend[propertyKey];\r\n\r\n if (propertyKey === 'data' && newScene.hasOwnProperty('data') && typeof value === 'object')\r\n {\r\n // Populate the DataManager\r\n newScene.data.merge(value);\r\n }\r\n else if (propertyKey !== 'sys')\r\n {\r\n newScene[propertyKey] = value;\r\n }\r\n }\r\n }\r\n\r\n return newScene;\r\n },\r\n\r\n /**\r\n * Retrieves the key of a Scene from a Scene config.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getKey\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to check in the Scene config.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|function)} sceneConfig - The Scene config.\r\n *\r\n * @return {string} The Scene key.\r\n */\r\n getKey: function (key, sceneConfig)\r\n {\r\n if (!key) { key = 'default'; }\r\n\r\n if (typeof sceneConfig === 'function')\r\n {\r\n return key;\r\n }\r\n else if (sceneConfig instanceof Scene)\r\n {\r\n key = sceneConfig.sys.settings.key;\r\n }\r\n else if (typeof sceneConfig === 'object' && sceneConfig.hasOwnProperty('key'))\r\n {\r\n key = sceneConfig.key;\r\n }\r\n\r\n // By this point it's either 'default' or extracted from the Scene\r\n\r\n if (this.keys.hasOwnProperty(key))\r\n {\r\n throw new Error('Cannot add a Scene with duplicate key: ' + key);\r\n }\r\n else\r\n {\r\n return key;\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all the current Scenes being managed by this Scene Manager.\r\n *\r\n * You can filter the output by the active state of the Scene and choose to have\r\n * the array returned in normal or reversed order.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScenes\r\n * @since 3.16.0\r\n *\r\n * @param {boolean} [isActive=true] - Only include Scene's that are currently active?\r\n * @param {boolean} [inReverse=false] - Return the array of Scenes in reverse?\r\n *\r\n * @return {Phaser.Scene[]} An array containing all of the Scenes in the Scene Manager.\r\n */\r\n getScenes: function (isActive, inReverse)\r\n {\r\n if (isActive === undefined) { isActive = true; }\r\n if (inReverse === undefined) { inReverse = false; }\r\n\r\n var out = [];\r\n var scenes = this.scenes;\r\n\r\n for (var i = 0; i < scenes.length; i++)\r\n {\r\n var scene = scenes[i];\r\n\r\n if (scene && (!isActive || (isActive && scene.sys.isActive())))\r\n {\r\n out.push(scene);\r\n }\r\n }\r\n\r\n return (inReverse) ? out.reverse() : out;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getScene\r\n * @since 3.0.0\r\n *\r\n * @param {string|Phaser.Scene} key - The Scene to retrieve.\r\n *\r\n * @return {?Phaser.Scene} The Scene.\r\n */\r\n getScene: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.keys[key])\r\n {\r\n return this.keys[key];\r\n }\r\n }\r\n else\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n if (key === this.scenes[i])\r\n {\r\n return key;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is running.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isActive();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is paused.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isPaused();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is visible.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isVisible();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Determines whether a Scene is sleeping.\r\n *\r\n * @method Phaser.Scenes.SceneManager#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n return scene.sys.isSleeping();\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Pauses the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its pause event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n pause: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.pause(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its resume event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n resume: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.resume(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the given Scene to sleep.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its sleep event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sleep: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.sleep(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Awakens the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted by its wake event.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n wake: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.wake(data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene on start, wake, or resume.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This Scene Manager.\r\n */\r\n run: function (key, data)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (!scene)\r\n {\r\n for (var i = 0; i < this._pending.length; i++)\r\n {\r\n if (this._pending[i].key === key)\r\n {\r\n this.queueOp('start', key, data);\r\n break;\r\n }\r\n }\r\n return this;\r\n }\r\n\r\n if (scene.sys.isSleeping())\r\n {\r\n // Sleeping?\r\n scene.sys.wake(data);\r\n }\r\n else if (scene.sys.isBooted && !scene.sys.isActive())\r\n {\r\n // Paused?\r\n scene.sys.resume(data);\r\n }\r\n else\r\n {\r\n // Not actually running?\r\n this.start(key, data);\r\n }\r\n },\r\n\r\n /**\r\n * Starts the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n * @param {object} [data] - Optional data object to pass to Scene.Settings and Scene.init.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n start: function (key, data)\r\n {\r\n // If the Scene Manager is not running, then put the Scene into a holding pattern\r\n if (!this.isBooted)\r\n {\r\n this._data[key] = {\r\n autoStart: true,\r\n data: data\r\n };\r\n\r\n return this;\r\n }\r\n\r\n var scene = this.getScene(key);\r\n\r\n if (scene)\r\n {\r\n // If the Scene is already running (perhaps they called start from a launched sub-Scene?)\r\n // then we close it down before starting it again.\r\n if (scene.sys.isActive() || scene.sys.isPaused())\r\n {\r\n scene.sys.shutdown();\r\n\r\n scene.sys.start(data);\r\n }\r\n else\r\n {\r\n scene.sys.start(data);\r\n\r\n var loader;\r\n\r\n if (scene.sys.load)\r\n {\r\n loader = scene.sys.load;\r\n }\r\n\r\n // Files payload?\r\n if (loader && scene.sys.settings.hasOwnProperty('pack'))\r\n {\r\n loader.reset();\r\n\r\n if (loader.addPack({ payload: scene.sys.settings.pack }))\r\n {\r\n scene.sys.settings.status = CONST.LOADING;\r\n\r\n loader.once(LoaderEvents.COMPLETE, this.payloadComplete, this);\r\n\r\n loader.start();\r\n\r\n return this;\r\n }\r\n }\r\n }\r\n\r\n this.bootScene(scene);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the given Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n stop: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n if (scene && !scene.sys.isTransitioning())\r\n {\r\n scene.sys.shutdown();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sleeps one one Scene and starts the other.\r\n *\r\n * @method Phaser.Scenes.SceneManager#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} from - The Scene to sleep.\r\n * @param {string} to - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n switch: function (from, to)\r\n {\r\n var sceneA = this.getScene(from);\r\n var sceneB = this.getScene(to);\r\n\r\n if (sceneA && sceneB && sceneA !== sceneB)\r\n {\r\n this.sleep(from);\r\n\r\n if (this.isSleeping(to))\r\n {\r\n this.wake(to);\r\n }\r\n else\r\n {\r\n this.start(to);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieves a Scene by numeric index.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The index of the Scene to retrieve.\r\n *\r\n * @return {(Phaser.Scene|undefined)} The Scene.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.scenes[index];\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The key of the Scene.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n return this.scenes.indexOf(scene);\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'bringToTop', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index < this.scenes.length)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.push(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.SceneManager#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'sendToBack', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var index = this.getIndex(key);\r\n\r\n if (index !== -1 && index > 0)\r\n {\r\n var scene = this.getScene(key);\r\n\r\n this.scenes.splice(index, 1);\r\n this.scenes.unshift(scene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveDown', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA > 0)\r\n {\r\n var indexB = indexA - 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} key - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveUp', keyA: key, keyB: null });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(key);\r\n\r\n if (indexA < this.scenes.length - 1)\r\n {\r\n var indexB = indexA + 1;\r\n var sceneA = this.getScene(key);\r\n var sceneB = this.getAt(indexB);\r\n\r\n this.scenes[indexA] = sceneB;\r\n this.scenes[indexB] = sceneA;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately above another Scene in the Scenes list.\r\n *\r\n * This means it will render over the top of the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveAbove', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n // Add in new location\r\n this.scenes.splice(indexA + 1, 0, tempScene);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene so it is immediately below another Scene in the Scenes list.\r\n *\r\n * This means it will render behind the other Scene.\r\n *\r\n * @method Phaser.Scenes.SceneManager#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The Scene that Scene B will be moved above.\r\n * @param {(string|Phaser.Scene)} keyB - The Scene to be moved.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'moveBelow', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexB);\r\n\r\n // Remove\r\n this.scenes.splice(indexB, 1);\r\n\r\n if (indexA === 0)\r\n {\r\n this.scenes.unshift(tempScene);\r\n }\r\n else\r\n {\r\n // Add in new location\r\n this.scenes.splice(indexA, 0, tempScene);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Queue a Scene operation for the next update.\r\n *\r\n * @method Phaser.Scenes.SceneManager#queueOp\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {string} op - The operation to perform.\r\n * @param {(string|Phaser.Scene)} keyA - Scene A.\r\n * @param {(string|Phaser.Scene)} [keyB] - Scene B.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n queueOp: function (op, keyA, keyB)\r\n {\r\n this._queue.push({ op: op, keyA: keyA, keyB: keyB });\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the positions of two Scenes in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.SceneManager#swapPosition\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Scene)} keyA - The first Scene to swap.\r\n * @param {(string|Phaser.Scene)} keyB - The second Scene to swap.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyA === keyB)\r\n {\r\n return this;\r\n }\r\n\r\n if (this.isProcessing)\r\n {\r\n this._queue.push({ op: 'swapPosition', keyA: keyA, keyB: keyB });\r\n }\r\n else\r\n {\r\n var indexA = this.getIndex(keyA);\r\n var indexB = this.getIndex(keyB);\r\n\r\n if (indexA !== indexB && indexA !== -1 && indexB !== -1)\r\n {\r\n var tempScene = this.getAt(indexA);\r\n\r\n this.scenes[indexA] = this.scenes[indexB];\r\n this.scenes[indexB] = tempScene;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps debug information about each Scene to the developer console.\r\n *\r\n * @method Phaser.Scenes.SceneManager#dump\r\n * @since 3.2.0\r\n */\r\n dump: function ()\r\n {\r\n var out = [];\r\n var map = [ 'pending', 'init', 'start', 'loading', 'creating', 'running', 'paused', 'sleeping', 'shutdown', 'destroyed' ];\r\n\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n var key = (sys.settings.visible && (sys.settings.status === CONST.RUNNING || sys.settings.status === CONST.PAUSED)) ? '[*] ' : '[-] ';\r\n key += sys.settings.key + ' (' + map[sys.settings.status] + ')';\r\n\r\n out.push(key);\r\n }\r\n\r\n console.log(out.join('\\n'));\r\n },\r\n\r\n /**\r\n * Destroy the SceneManager and all of its Scene's systems.\r\n *\r\n * @method Phaser.Scenes.SceneManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.scenes.length; i++)\r\n {\r\n var sys = this.scenes[i].sys;\r\n\r\n sys.destroy();\r\n }\r\n\r\n this.update = NOOP;\r\n\r\n this.scenes = [];\r\n\r\n this._pending = [];\r\n this._start = [];\r\n this._queue = [];\r\n\r\n this.game = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = SceneManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/SceneManager.js?")},"./node_modules/phaser/src/scene/ScenePlugin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A proxy class to the Global Scene Manager.\r\n *\r\n * @class ScenePlugin\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that this ScenePlugin belongs to.\r\n */\r\nvar ScenePlugin = new Class({\r\n\r\n initialize:\r\n\r\n function ScenePlugin (scene)\r\n {\r\n /**\r\n * The Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems instance of the Scene that this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The settings of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = scene.sys.settings;\r\n\r\n /**\r\n * The key of the Scene this ScenePlugin belongs to.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = scene.sys.settings.key;\r\n\r\n /**\r\n * The Game's SceneManager.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#manager\r\n * @type {Phaser.Scenes.SceneManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = scene.sys.game.scene;\r\n\r\n /**\r\n * If this Scene is currently transitioning to another, this holds\r\n * the current percentage of the transition progress, between 0 and 1.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#transitionProgress\r\n * @type {number}\r\n * @since 3.5.0\r\n */\r\n this.transitionProgress = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_elapsed\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._elapsed = 0;\r\n\r\n /**\r\n * Transition elapsed timer.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_target\r\n * @type {?Phaser.Scenes.Scene}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._target = null;\r\n\r\n /**\r\n * Transition duration.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_duration\r\n * @type {integer}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._duration = 0;\r\n\r\n /**\r\n * Transition callback.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdate;\r\n\r\n /**\r\n * Transition callback scope.\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_onUpdateScope\r\n * @type {object}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._onUpdateScope;\r\n\r\n /**\r\n * Will this Scene sleep (true) after the transition, or stop (false)\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willSleep\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willSleep = false;\r\n\r\n /**\r\n * Will this Scene be removed from the Scene Manager after the transition completes?\r\n *\r\n * @name Phaser.Scenes.ScenePlugin#_willRemove\r\n * @type {boolean}\r\n * @private\r\n * @since 3.5.0\r\n */\r\n this._willRemove = false;\r\n\r\n scene.sys.events.once(Events.BOOT, this.boot, this);\r\n scene.sys.events.on(Events.START, this.pluginStart, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(Events.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pluginStart\r\n * @private\r\n * @since 3.5.0\r\n */\r\n pluginStart: function ()\r\n {\r\n this._target = null;\r\n\r\n this.systems.events.once(Events.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and run the given one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#start\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to start.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n start: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', this.key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts this Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#restart\r\n * @since 3.4.0\r\n *\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n restart: function (data)\r\n {\r\n var key = this.key;\r\n\r\n this.manager.queueOp('stop', key);\r\n this.manager.queueOp('start', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * This will start a transition from the current Scene to the target Scene given.\r\n *\r\n * The transition will last for the duration specified in milliseconds.\r\n *\r\n * You can have the target Scene moved above or below this one in the display list.\r\n *\r\n * You can specify an update callback. This callback will be invoked _every frame_ for the duration\r\n * of the transition.\r\n *\r\n * This Scene can either be sent to sleep at the end of the transition, or stopped. The default is to stop.\r\n *\r\n * There are also 5 transition related events: This scene will emit the event `transitionout` when\r\n * the transition begins, which is typically the frame after calling this method.\r\n *\r\n * The target Scene will emit the event `transitioninit` when that Scene's `init` method is called.\r\n * It will then emit the event `transitionstart` when its `create` method is called.\r\n * If the Scene was sleeping and has been woken up, it will emit the event `transitionwake` instead of these two,\r\n * as the Scenes `init` and `create` methods are not invoked when a Scene wakes up.\r\n *\r\n * When the duration of the transition has elapsed it will emit the event `transitioncomplete`.\r\n * These events are cleared of all listeners when the Scene shuts down, but not if it is sent to sleep.\r\n *\r\n * It's important to understand that the duration of the transition begins the moment you call this method.\r\n * If the Scene you are transitioning to includes delayed processes, such as waiting for files to load, the\r\n * time still counts down even while that is happening. If the game itself pauses, or something else causes\r\n * this Scenes update loop to stop, then the transition will also pause for that duration. There are\r\n * checks in place to prevent you accidentally stopping a transitioning Scene but if you've got code to\r\n * override this understand that until the target Scene completes it might never be unlocked for input events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transition\r\n * @fires Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Types.Scenes.SceneTransitionConfig} config - The transition configuration object.\r\n *\r\n * @return {boolean} `true` is the transition was started, otherwise `false`.\r\n */\r\n transition: function (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var key = GetFastValue(config, 'target', false);\r\n\r\n var target = this.manager.getScene(key);\r\n\r\n if (!key || !this.checkValidTransition(target))\r\n {\r\n return false;\r\n }\r\n\r\n var duration = GetFastValue(config, 'duration', 1000);\r\n\r\n this._elapsed = 0;\r\n this._target = target;\r\n this._duration = duration;\r\n this._willSleep = GetFastValue(config, 'sleep', false);\r\n this._willRemove = GetFastValue(config, 'remove', false);\r\n\r\n var callback = GetFastValue(config, 'onUpdate', null);\r\n\r\n if (callback)\r\n {\r\n this._onUpdate = callback;\r\n this._onUpdateScope = GetFastValue(config, 'onUpdateScope', this.scene);\r\n }\r\n\r\n var allowInput = GetFastValue(config, 'allowInput', false);\r\n\r\n this.settings.transitionAllowInput = allowInput;\r\n\r\n var targetSettings = target.sys.settings;\r\n\r\n targetSettings.isTransition = true;\r\n targetSettings.transitionFrom = this.scene;\r\n targetSettings.transitionDuration = duration;\r\n targetSettings.transitionAllowInput = allowInput;\r\n\r\n if (GetFastValue(config, 'moveAbove', false))\r\n {\r\n this.manager.moveAbove(this.key, key);\r\n }\r\n else if (GetFastValue(config, 'moveBelow', false))\r\n {\r\n this.manager.moveBelow(this.key, key);\r\n }\r\n\r\n if (target.sys.isSleeping())\r\n {\r\n target.sys.wake();\r\n }\r\n else\r\n {\r\n this.manager.start(key, GetFastValue(config, 'data'));\r\n }\r\n\r\n this.systems.events.emit(Events.TRANSITION_OUT, target, duration);\r\n\r\n this.systems.events.on(Events.UPDATE, this.step, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Checks to see if this Scene can transition to the target Scene or not.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#checkValidTransition\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {Phaser.Scene} target - The Scene to test against.\r\n *\r\n * @return {boolean} `true` if this Scene can transition, otherwise `false`.\r\n */\r\n checkValidTransition: function (target)\r\n {\r\n // Not a valid target if it doesn't exist, isn't active or is already transitioning in or out\r\n if (!target || target.sys.isActive() || target.sys.isTransitioning() || target === this.scene || this.systems.isTransitioning())\r\n {\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * A single game step. This is only called if the parent Scene is transitioning\r\n * out to another Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#step\r\n * @private\r\n * @since 3.5.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n step: function (time, delta)\r\n {\r\n this._elapsed += delta;\r\n\r\n this.transitionProgress = Clamp(this._elapsed / this._duration, 0, 1);\r\n\r\n if (this._onUpdate)\r\n {\r\n this._onUpdate.call(this._onUpdateScope, this.transitionProgress);\r\n }\r\n\r\n if (this._elapsed >= this._duration)\r\n {\r\n this.transitionComplete();\r\n }\r\n },\r\n\r\n /**\r\n * Called by `step` when the transition out of this scene to another is over.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#transitionComplete\r\n * @private\r\n * @fires Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n */\r\n transitionComplete: function ()\r\n {\r\n var targetSys = this._target.sys;\r\n var targetSettings = this._target.sys.settings;\r\n\r\n // Stop the step\r\n this.systems.events.off(Events.UPDATE, this.step, this);\r\n\r\n // Notify target scene\r\n targetSys.events.emit(Events.TRANSITION_COMPLETE, this.scene);\r\n\r\n // Clear target scene settings\r\n targetSettings.isTransition = false;\r\n targetSettings.transitionFrom = null;\r\n\r\n // Clear local settings\r\n this._duration = 0;\r\n this._target = null;\r\n this._onUpdate = null;\r\n this._onUpdateScope = null;\r\n\r\n // Now everything is clear we can handle what happens to this Scene\r\n if (this._willRemove)\r\n {\r\n this.manager.remove(this.key);\r\n }\r\n else if (this._willSleep)\r\n {\r\n this.systems.sleep();\r\n }\r\n else\r\n {\r\n this.manager.stop(this.key);\r\n }\r\n },\r\n\r\n /**\r\n * Add the Scene into the Scene Manager and start it if 'autoStart' is true or the Scene config 'active' property is set.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene key.\r\n * @param {(Phaser.Scene|Phaser.Types.Scenes.SettingsConfig|Phaser.Types.Scenes.CreateSceneFromObjectConfig|function)} sceneConfig - The config for the Scene.\r\n * @param {boolean} autoStart - Whether to start the Scene after it's added.\r\n * @param {object} [data] - Optional data object. This will be set as Scene.settings.data and passed to `Scene.init`.\r\n *\r\n * @return {Phaser.Scene} An instance of the Scene that was added to the Scene Manager.\r\n */\r\n add: function (key, sceneConfig, autoStart, data)\r\n {\r\n return this.manager.add(key, sceneConfig, autoStart, data);\r\n },\r\n\r\n /**\r\n * Launch the given Scene and run it in parallel with this one.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#launch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to launch.\r\n * @param {object} [data] - The Scene data.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n launch: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('start', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Runs the given Scene, but does not change the state of this Scene.\r\n *\r\n * If the given Scene is paused, it will resume it. If sleeping, it will wake it.\r\n * If not running at all, it will be started.\r\n *\r\n * Use this if you wish to open a modal Scene by calling `pause` on the current\r\n * Scene, then `run` on the modal Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#run\r\n * @since 3.10.0\r\n *\r\n * @param {string} key - The Scene to run.\r\n * @param {object} [data] - A data object that will be passed to the Scene and emitted in its ready, wake, or resume events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n run: function (key, data)\r\n {\r\n if (key && key !== this.key)\r\n {\r\n this.manager.queueOp('run', key, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pause the Scene - this stops the update step from happening but it still renders.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#pause\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to pause.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its pause event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n pause: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('pause', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume the Scene - starts the update loop again.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#resume\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to resume.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its resume event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n resume: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('resume', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene sleep (no update, no render) but doesn't shutdown.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sleep\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to put to sleep.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its sleep event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sleep: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('sleep', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes the Scene wake-up (starts update and render)\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#wake\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to wake up.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted in its wake event.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n wake: function (key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('wake', key, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Makes this Scene sleep then starts the Scene given.\r\n * \r\n * No checks are made to see if an instance of the given Scene is already running.\r\n * Because Scenes in Phaser are non-exclusive, you are allowed to run multiple\r\n * instances of them _at the same time_. This means, calling this function\r\n * may launch another instance of the requested Scene if it's already running.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#switch\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to start.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n switch: function (key)\r\n {\r\n if (key !== this.key)\r\n {\r\n this.manager.queueOp('switch', this.key, key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shutdown the Scene, clearing display list, timers, etc.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#stop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to stop.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n stop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.queueOp('stop', key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the active state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed. If `false` it will be paused.\r\n * @param {string} [key] - The Scene to set the active state of.\r\n * @param {object} [data] - An optional data object that will be passed to the Scene and emitted with its events.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setActive: function (value, key, data)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setActive(value, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the visible state of the given Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - The visible value.\r\n * @param {string} [key] - The Scene to set the visible state for.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n setVisible: function (value, key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n var scene = this.manager.getScene(key);\r\n\r\n if (scene)\r\n {\r\n scene.sys.setVisible(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is sleeping or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is sleeping.\r\n */\r\n isSleeping: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isSleeping(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is running or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isActive\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is running.\r\n */\r\n isActive: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isActive(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is paused or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isPaused\r\n * @since 3.17.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is paused.\r\n */\r\n isPaused: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isPaused(key);\r\n },\r\n\r\n /**\r\n * Checks if the given Scene is visible or not?\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#isVisible\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to check.\r\n *\r\n * @return {boolean} Whether the Scene is visible.\r\n */\r\n isVisible: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.isVisible(key);\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#swapPosition\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The first Scene to swap.\r\n * @param {string} [keyB] - The second Scene to swap. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n swapPosition: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.swapPosition(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly above Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveAbove\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be above.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveAbove: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveAbove(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Swaps the position of two scenes in the Scenes list, so that Scene B is directly below Scene A.\r\n *\r\n * This controls the order in which they are rendered and updated.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveBelow\r\n * @since 3.2.0\r\n *\r\n * @param {string} keyA - The Scene that Scene B will be moved to be below.\r\n * @param {string} [keyB] - The Scene to be moved. If none is given it defaults to this Scene.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveBelow: function (keyA, keyB)\r\n {\r\n if (keyB === undefined) { keyB = this.key; }\r\n\r\n if (keyA !== keyB)\r\n {\r\n this.manager.moveBelow(keyA, keyB);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a Scene from the SceneManager.\r\n *\r\n * The Scene is removed from the local scenes array, it's key is cleared from the keys\r\n * cache and Scene.Systems.destroy is then called on it.\r\n *\r\n * If the SceneManager is processing the Scenes when this method is called it wil\r\n * queue the operation for the next update sequence.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#remove\r\n * @since 3.2.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to be removed.\r\n *\r\n * @return {Phaser.Scenes.SceneManager} This SceneManager.\r\n */\r\n remove: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.remove(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene up one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveUp\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveUp: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveUp(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Moves a Scene down one position in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#moveDown\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n moveDown: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.moveDown(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings a Scene to the top of the Scenes list.\r\n *\r\n * This means it will render above all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n bringToTop: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.bringToTop(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sends a Scene to the back of the Scenes list.\r\n *\r\n * This means it will render below all other Scenes.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The Scene to move.\r\n *\r\n * @return {Phaser.Scenes.ScenePlugin} This ScenePlugin object.\r\n */\r\n sendToBack: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n this.manager.sendToBack(key);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Retrieve a Scene.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The Scene to retrieve.\r\n *\r\n * @return {Phaser.Scene} The Scene.\r\n */\r\n get: function (key)\r\n {\r\n return this.manager.getScene(key);\r\n },\r\n\r\n /**\r\n * Retrieves the numeric index of a Scene in the Scenes list.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#getIndex\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Scene)} [key] - The Scene to get the index of.\r\n *\r\n * @return {integer} The index of the Scene.\r\n */\r\n getIndex: function (key)\r\n {\r\n if (key === undefined) { key = this.key; }\r\n\r\n return this.manager.getIndex(key);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(Events.SHUTDOWN, this.shutdown, this);\r\n eventEmitter.off(Events.POST_UPDATE, this.step, this);\r\n eventEmitter.off(Events.TRANSITION_OUT);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Scenes.ScenePlugin#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(Events.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n this.settings = null;\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('ScenePlugin', ScenePlugin, 'scenePlugin');\r\n\r\nmodule.exports = ScenePlugin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/ScenePlugin.js?")},"./node_modules/phaser/src/scene/Settings.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Merge = __webpack_require__(/*! ../utils/object/Merge */ \"./node_modules/phaser/src/utils/object/Merge.js\");\r\nvar InjectionMap = __webpack_require__(/*! ./InjectionMap */ \"./node_modules/phaser/src/scene/InjectionMap.js\");\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Settings\r\n */\r\n\r\nvar Settings = {\r\n\r\n /**\r\n * Takes a Scene configuration object and returns a fully formed System Settings object.\r\n *\r\n * @function Phaser.Scenes.Settings.create\r\n * @since 3.0.0\r\n *\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - The Scene configuration object used to create this Scene Settings.\r\n *\r\n * @return {Phaser.Types.Scenes.SettingsObject} The Scene Settings object created as a result of the config and default settings.\r\n */\r\n create: function (config)\r\n {\r\n if (typeof config === 'string')\r\n {\r\n config = { key: config };\r\n }\r\n else if (config === undefined)\r\n {\r\n // Pass the 'hasOwnProperty' checks\r\n config = {};\r\n }\r\n\r\n return {\r\n\r\n status: CONST.PENDING,\r\n\r\n key: GetValue(config, 'key', ''),\r\n active: GetValue(config, 'active', false),\r\n visible: GetValue(config, 'visible', true),\r\n\r\n isBooted: false,\r\n\r\n isTransition: false,\r\n transitionFrom: null,\r\n transitionDuration: 0,\r\n transitionAllowInput: true,\r\n\r\n // Loader payload array\r\n\r\n data: {},\r\n\r\n pack: GetValue(config, 'pack', false),\r\n\r\n // Cameras\r\n\r\n cameras: GetValue(config, 'cameras', null),\r\n\r\n // Scene Property Injection Map\r\n\r\n map: GetValue(config, 'map', Merge(InjectionMap, GetValue(config, 'mapAdd', {}))),\r\n\r\n // Physics\r\n\r\n physics: GetValue(config, 'physics', {}),\r\n\r\n // Loader\r\n\r\n loader: GetValue(config, 'loader', {}),\r\n\r\n // Plugins\r\n\r\n plugins: GetValue(config, 'plugins', false),\r\n\r\n // Input\r\n\r\n input: GetValue(config, 'input', {})\r\n\r\n };\r\n }\r\n\r\n};\r\n\r\nmodule.exports = Settings;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Settings.js?")},"./node_modules/phaser/src/scene/Systems.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/scene/const.js\");\r\nvar DefaultPlugins = __webpack_require__(/*! ../plugins/DefaultPlugins */ \"./node_modules/phaser/src/plugins/DefaultPlugins.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar GetPhysicsPlugins = __webpack_require__(/*! ./GetPhysicsPlugins */ \"./node_modules/phaser/src/scene/GetPhysicsPlugins.js\");\r\nvar GetScenePlugins = __webpack_require__(/*! ./GetScenePlugins */ \"./node_modules/phaser/src/scene/GetScenePlugins.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar Settings = __webpack_require__(/*! ./Settings */ \"./node_modules/phaser/src/scene/Settings.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Scene Systems class.\r\n *\r\n * This class is available from within a Scene under the property `sys`.\r\n * It is responsible for managing all of the plugins a Scene has running, including the display list, and\r\n * handling the update step and renderer. It also contains references to global systems belonging to Game.\r\n *\r\n * @class Systems\r\n * @memberof Phaser.Scenes\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene that owns this Systems instance.\r\n * @param {(string|Phaser.Types.Scenes.SettingsConfig)} config - Scene specific configuration settings.\r\n */\r\nvar Systems = new Class({\r\n\r\n initialize:\r\n\r\n function Systems (scene, config)\r\n {\r\n /**\r\n * A reference to the Scene that these Systems belong to.\r\n *\r\n * @name Phaser.Scenes.Systems#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * A reference to the Phaser Game instance.\r\n *\r\n * @name Phaser.Scenes.Systems#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game;\r\n\r\n /**\r\n * A reference to either the Canvas or WebGL Renderer that this Game is using.\r\n *\r\n * @name Phaser.Scenes.Systems#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.17.0\r\n */\r\n this.renderer;\r\n\r\n if (typeof PLUGIN_FBINSTANT)\r\n {\r\n /**\r\n * The Facebook Instant Games Plugin.\r\n *\r\n * @name Phaser.Scenes.Systems#facebook\r\n * @type {Phaser.FacebookInstantGamesPlugin}\r\n * @since 3.12.0\r\n */\r\n this.facebook;\r\n }\r\n\r\n /**\r\n * The Scene Configuration object, as passed in when creating the Scene.\r\n *\r\n * @name Phaser.Scenes.Systems#config\r\n * @type {(string|Phaser.Types.Scenes.SettingsConfig)}\r\n * @since 3.0.0\r\n */\r\n this.config = config;\r\n\r\n /**\r\n * The Scene Settings. This is the parsed output based on the Scene configuration.\r\n *\r\n * @name Phaser.Scenes.Systems#settings\r\n * @type {Phaser.Types.Scenes.SettingsObject}\r\n * @since 3.0.0\r\n */\r\n this.settings = Settings.create(config);\r\n\r\n /**\r\n * A handy reference to the Scene canvas / context.\r\n *\r\n * @name Phaser.Scenes.Systems#canvas\r\n * @type {HTMLCanvasElement}\r\n * @since 3.0.0\r\n */\r\n this.canvas;\r\n\r\n /**\r\n * A reference to the Canvas Rendering Context being used by the renderer.\r\n *\r\n * @name Phaser.Scenes.Systems#context\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.0.0\r\n */\r\n this.context;\r\n\r\n // Global Systems - these are single-instance global managers that belong to Game\r\n\r\n /**\r\n * A reference to the global Animations Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.anims` property.\r\n *\r\n * @name Phaser.Scenes.Systems#anims\r\n * @type {Phaser.Animations.AnimationManager}\r\n * @since 3.0.0\r\n */\r\n this.anims;\r\n\r\n /**\r\n * A reference to the global Cache. The Cache stores all files bought in to Phaser via\r\n * the Loader, with the exception of images. Images are stored in the Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cache` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cache\r\n * @type {Phaser.Cache.CacheManager}\r\n * @since 3.0.0\r\n */\r\n this.cache;\r\n\r\n /**\r\n * A reference to the global Plugins Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.plugins` property.\r\n *\r\n * @name Phaser.Scenes.Systems#plugins\r\n * @type {Phaser.Plugins.PluginManager}\r\n * @since 3.0.0\r\n */\r\n this.plugins;\r\n\r\n /**\r\n * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing\r\n * you to exchange data between Scenes via a universal and shared point.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.registry` property.\r\n *\r\n * @name Phaser.Scenes.Systems#registry\r\n * @type {Phaser.Data.DataManager}\r\n * @since 3.0.0\r\n */\r\n this.registry;\r\n\r\n /**\r\n * A reference to the global Scale Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scale` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scale\r\n * @type {Phaser.Scale.ScaleManager}\r\n * @since 3.15.0\r\n */\r\n this.scale;\r\n\r\n /**\r\n * A reference to the global Sound Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.sound` property.\r\n *\r\n * @name Phaser.Scenes.Systems#sound\r\n * @type {(Phaser.Sound.NoAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager|Phaser.Sound.WebAudioSoundManager)}\r\n * @since 3.0.0\r\n */\r\n this.sound;\r\n\r\n /**\r\n * A reference to the global Texture Manager.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.textures` property.\r\n *\r\n * @name Phaser.Scenes.Systems#textures\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.textures;\r\n\r\n // Core Plugins - these are non-optional Scene plugins, needed by lots of the other systems\r\n\r\n /**\r\n * A reference to the Scene's Game Object Factory.\r\n * \r\n * Use this to quickly and easily create new Game Object's.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.add` property.\r\n *\r\n * @name Phaser.Scenes.Systems#add\r\n * @type {Phaser.GameObjects.GameObjectFactory}\r\n * @since 3.0.0\r\n */\r\n this.add;\r\n\r\n /**\r\n * A reference to the Scene's Camera Manager.\r\n * \r\n * Use this to manipulate and create Cameras for this specific Scene.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.cameras` property.\r\n *\r\n * @name Phaser.Scenes.Systems#cameras\r\n * @type {Phaser.Cameras.Scene2D.CameraManager}\r\n * @since 3.0.0\r\n */\r\n this.cameras;\r\n\r\n /**\r\n * A reference to the Scene's Display List.\r\n * \r\n * Use this to organize the children contained in the display list.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.children` property.\r\n *\r\n * @name Phaser.Scenes.Systems#displayList\r\n * @type {Phaser.GameObjects.DisplayList}\r\n * @since 3.0.0\r\n */\r\n this.displayList;\r\n\r\n /**\r\n * A reference to the Scene's Event Manager.\r\n * \r\n * Use this to listen for Scene specific events, such as `pause` and `shutdown`.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.events` property.\r\n *\r\n * @name Phaser.Scenes.Systems#events\r\n * @type {Phaser.Events.EventEmitter}\r\n * @since 3.0.0\r\n */\r\n this.events;\r\n\r\n /**\r\n * A reference to the Scene's Game Object Creator.\r\n * \r\n * Use this to quickly and easily create new Game Object's. The difference between this and the\r\n * Game Object Factory, is that the Creator just creates and returns Game Object instances, it\r\n * doesn't then add them to the Display List or Update List.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.make` property.\r\n *\r\n * @name Phaser.Scenes.Systems#make\r\n * @type {Phaser.GameObjects.GameObjectCreator}\r\n * @since 3.0.0\r\n */\r\n this.make;\r\n\r\n /**\r\n * A reference to the Scene Manager Plugin.\r\n * \r\n * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene,\r\n * or pause or resume a Scene, or switch from this Scene to another.\r\n * \r\n * In the default set-up you can access this from within a Scene via the `this.scene` property.\r\n *\r\n * @name Phaser.Scenes.Systems#scenePlugin\r\n * @type {Phaser.Scenes.ScenePlugin}\r\n * @since 3.0.0\r\n */\r\n this.scenePlugin;\r\n\r\n /**\r\n * A reference to the Scene's Update List.\r\n * \r\n * Use this to organize the children contained in the update list.\r\n * \r\n * The Update List is responsible for managing children that need their `preUpdate` methods called,\r\n * in order to process so internal components, such as Sprites with Animations.\r\n * \r\n * In the default set-up there is no reference to this from within the Scene itself.\r\n *\r\n * @name Phaser.Scenes.Systems#updateList\r\n * @type {Phaser.GameObjects.UpdateList}\r\n * @since 3.0.0\r\n */\r\n this.updateList;\r\n\r\n /**\r\n * The Scene Update function.\r\n *\r\n * This starts out as NOOP during init, preload and create, and at the end of create\r\n * it swaps to be whatever the Scene.update function is.\r\n *\r\n * @name Phaser.Scenes.Systems#sceneUpdate\r\n * @type {function}\r\n * @private\r\n * @since 3.10.0\r\n */\r\n this.sceneUpdate = NOOP;\r\n },\r\n\r\n /**\r\n * This method is called only once by the Scene Manager when the Scene is instantiated.\r\n * It is responsible for setting up all of the Scene plugins and references.\r\n * It should never be called directly.\r\n *\r\n * @method Phaser.Scenes.Systems#init\r\n * @protected\r\n * @fires Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n this.settings.status = CONST.INIT;\r\n\r\n // This will get replaced by the SceneManager with the actual update function, if it exists, once create is over.\r\n this.sceneUpdate = NOOP;\r\n\r\n this.game = game;\r\n this.renderer = game.renderer;\r\n\r\n this.canvas = game.canvas;\r\n this.context = game.context;\r\n\r\n var pluginManager = game.plugins;\r\n\r\n this.plugins = pluginManager;\r\n\r\n pluginManager.addToScene(this, DefaultPlugins.Global, [ DefaultPlugins.CoreScene, GetScenePlugins(this), GetPhysicsPlugins(this) ]);\r\n\r\n this.events.emit(Events.BOOT, this);\r\n\r\n this.settings.isBooted = true;\r\n },\r\n\r\n /**\r\n * Called by a plugin, it tells the System to install the plugin locally.\r\n *\r\n * @method Phaser.Scenes.Systems#install\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {array} plugin - An array of plugins to install into this Scene.\r\n */\r\n install: function (plugin)\r\n {\r\n if (!Array.isArray(plugin))\r\n {\r\n plugin = [ plugin ];\r\n }\r\n\r\n this.plugins.installLocal(this, plugin);\r\n },\r\n\r\n /**\r\n * A single game step. Called automatically by the Scene Manager as a result of a Request Animation\r\n * Frame or Set Timeout call to the main Game instance.\r\n *\r\n * @method Phaser.Scenes.Systems#step\r\n * @fires Phaser.Scenes.Events#PRE_UPDATE\r\n * @fires Phaser.Scenes.Events#_UPDATE\r\n * @fires Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The time value from the most recent Game step. Typically a high-resolution timer value, or Date.now().\r\n * @param {number} delta - The delta value since the last frame. This is smoothed to avoid delta spikes by the TimeStep class.\r\n */\r\n step: function (time, delta)\r\n {\r\n this.events.emit(Events.PRE_UPDATE, time, delta);\r\n\r\n this.events.emit(Events.UPDATE, time, delta);\r\n\r\n this.sceneUpdate.call(this.scene, time, delta);\r\n\r\n this.events.emit(Events.POST_UPDATE, time, delta);\r\n },\r\n\r\n /**\r\n * Called automatically by the Scene Manager.\r\n * Instructs the Scene to render itself via its Camera Manager to the renderer given.\r\n *\r\n * @method Phaser.Scenes.Systems#render\r\n * @fires Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that invoked the render call.\r\n */\r\n render: function (renderer)\r\n {\r\n var displayList = this.displayList;\r\n\r\n displayList.depthSort();\r\n\r\n this.cameras.render(renderer, displayList);\r\n\r\n this.events.emit(Events.RENDER, renderer);\r\n },\r\n\r\n /**\r\n * Force a sort of the display list on the next render.\r\n *\r\n * @method Phaser.Scenes.Systems#queueDepthSort\r\n * @since 3.0.0\r\n */\r\n queueDepthSort: function ()\r\n {\r\n this.displayList.queueDepthSort();\r\n },\r\n\r\n /**\r\n * Immediately sorts the display list if the flag is set.\r\n *\r\n * @method Phaser.Scenes.Systems#depthSort\r\n * @since 3.0.0\r\n */\r\n depthSort: function ()\r\n {\r\n this.displayList.depthSort();\r\n },\r\n\r\n /**\r\n * Pause this Scene.\r\n * A paused Scene still renders, it just doesn't run ANY of its update handlers or systems.\r\n *\r\n * @method Phaser.Scenes.Systems#pause\r\n * @fires Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'pause' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n pause: function (data)\r\n {\r\n if (this.settings.active)\r\n {\r\n this.settings.status = CONST.PAUSED;\r\n\r\n this.settings.active = false;\r\n\r\n this.events.emit(Events.PAUSE, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resume this Scene from a paused state.\r\n *\r\n * @method Phaser.Scenes.Systems#resume\r\n * @fires Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'resume' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n resume: function (data)\r\n {\r\n if (!this.settings.active)\r\n {\r\n this.settings.status = CONST.RUNNING;\r\n\r\n this.settings.active = true;\r\n\r\n this.events.emit(Events.RESUME, this, data);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Send this Scene to sleep.\r\n *\r\n * A sleeping Scene doesn't run it's update step or render anything, but it also isn't shut down\r\n * or have any of its systems or children removed, meaning it can be re-activated at any point and\r\n * will carry on from where it left off. It also keeps everything in memory and events and callbacks\r\n * from other Scenes may still invoke changes within it, so be careful what is left active.\r\n *\r\n * @method Phaser.Scenes.Systems#sleep\r\n * @fires Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'sleep' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n sleep: function (data)\r\n {\r\n this.settings.status = CONST.SLEEPING;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SLEEP, this, data);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Wake-up this Scene if it was previously asleep.\r\n *\r\n * @method Phaser.Scenes.Systems#wake\r\n * @fires Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n *\r\n * @param {object} [data] - A data object that will be passed in the 'wake' event.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n wake: function (data)\r\n {\r\n var settings = this.settings;\r\n\r\n settings.status = CONST.RUNNING;\r\n\r\n settings.active = true;\r\n settings.visible = true;\r\n\r\n this.events.emit(Events.WAKE, this, data);\r\n\r\n if (settings.isTransition)\r\n {\r\n this.events.emit(Events.TRANSITION_WAKE, settings.transitionFrom, settings.transitionDuration);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Is this Scene sleeping?\r\n *\r\n * @method Phaser.Scenes.Systems#isSleeping\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is asleep, otherwise `false`.\r\n */\r\n isSleeping: function ()\r\n {\r\n return (this.settings.status === CONST.SLEEPING);\r\n },\r\n\r\n /**\r\n * Is this Scene running?\r\n *\r\n * @method Phaser.Scenes.Systems#isActive\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is running, otherwise `false`.\r\n */\r\n isActive: function ()\r\n {\r\n return (this.settings.status === CONST.RUNNING);\r\n },\r\n\r\n /**\r\n * Is this Scene paused?\r\n *\r\n * @method Phaser.Scenes.Systems#isPaused\r\n * @since 3.13.0\r\n *\r\n * @return {boolean} `true` if this Scene is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.settings.status === CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out to, or in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitioning\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is currently transitioning, otherwise `false`.\r\n */\r\n isTransitioning: function ()\r\n {\r\n return (this.settings.isTransition || this.scenePlugin._target !== null);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning out from itself to another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionOut\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is in transition to another Scene, otherwise `false`.\r\n */\r\n isTransitionOut: function ()\r\n {\r\n return (this.scenePlugin._target !== null && this.scenePlugin._duration > 0);\r\n },\r\n\r\n /**\r\n * Is this Scene currently transitioning in from another Scene?\r\n *\r\n * @method Phaser.Scenes.Systems#isTransitionIn\r\n * @since 3.5.0\r\n *\r\n * @return {boolean} `true` if this Scene is transitioning in from another Scene, otherwise `false`.\r\n */\r\n isTransitionIn: function ()\r\n {\r\n return (this.settings.isTransition);\r\n },\r\n\r\n /**\r\n * Is this Scene visible and rendering?\r\n *\r\n * @method Phaser.Scenes.Systems#isVisible\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Scene is visible, otherwise `false`.\r\n */\r\n isVisible: function ()\r\n {\r\n return this.settings.visible;\r\n },\r\n\r\n /**\r\n * Sets the visible state of this Scene.\r\n * An invisible Scene will not render, but will still process updates.\r\n *\r\n * @method Phaser.Scenes.Systems#setVisible\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - `true` to render this Scene, otherwise `false`.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setVisible: function (value)\r\n {\r\n this.settings.visible = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set the active state of this Scene.\r\n * \r\n * An active Scene will run its core update loop.\r\n *\r\n * @method Phaser.Scenes.Systems#setActive\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} value - If `true` the Scene will be resumed, if previously paused. If `false` it will be paused.\r\n * @param {object} [data] - A data object that will be passed in the 'resume' or 'pause' events.\r\n *\r\n * @return {Phaser.Scenes.Systems} This Systems object.\r\n */\r\n setActive: function (value, data)\r\n {\r\n if (value)\r\n {\r\n return this.resume(data);\r\n }\r\n else\r\n {\r\n return this.pause(data);\r\n }\r\n },\r\n\r\n /**\r\n * Start this Scene running and rendering.\r\n * Called automatically by the SceneManager.\r\n *\r\n * @method Phaser.Scenes.Systems#start\r\n * @fires Phaser.Scenes.Events#START\r\n * @fires Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Optional data object that may have been passed to this Scene from another.\r\n */\r\n start: function (data)\r\n {\r\n if (data)\r\n {\r\n this.settings.data = data;\r\n }\r\n\r\n this.settings.status = CONST.START;\r\n\r\n this.settings.active = true;\r\n this.settings.visible = true;\r\n\r\n // For plugins to listen out for\r\n this.events.emit(Events.START, this);\r\n\r\n // For user-land code to listen out for\r\n this.events.emit(Events.READY, this, data);\r\n },\r\n\r\n /**\r\n * Shutdown this Scene and send a shutdown event to all of its systems.\r\n * A Scene that has been shutdown will not run its update loop or render, but it does\r\n * not destroy any of its plugins or references. It is put into hibernation for later use.\r\n * If you don't ever plan to use this Scene again, then it should be destroyed instead\r\n * to free-up resources.\r\n *\r\n * @method Phaser.Scenes.Systems#shutdown\r\n * @fires Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {object} [data] - A data object that will be passed in the 'shutdown' event.\r\n */\r\n shutdown: function (data)\r\n {\r\n this.events.off(Events.TRANSITION_INIT);\r\n this.events.off(Events.TRANSITION_START);\r\n this.events.off(Events.TRANSITION_COMPLETE);\r\n this.events.off(Events.TRANSITION_OUT);\r\n\r\n this.settings.status = CONST.SHUTDOWN;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.SHUTDOWN, this, data);\r\n },\r\n\r\n /**\r\n * Destroy this Scene and send a destroy event all of its systems.\r\n * A destroyed Scene cannot be restarted.\r\n * You should not call this directly, instead use `SceneManager.remove`.\r\n *\r\n * @method Phaser.Scenes.Systems#destroy\r\n * @private\r\n * @fires Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.settings.status = CONST.DESTROYED;\r\n\r\n this.settings.active = false;\r\n this.settings.visible = false;\r\n\r\n this.events.emit(Events.DESTROY, this);\r\n\r\n this.events.removeAllListeners();\r\n\r\n var props = [ 'scene', 'game', 'anims', 'cache', 'plugins', 'registry', 'sound', 'textures', 'add', 'camera', 'displayList', 'events', 'make', 'scenePlugin', 'updateList' ];\r\n\r\n for (var i = 0; i < props.length; i++)\r\n {\r\n this[props[i]] = null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Systems;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/Systems.js?")},"./node_modules/phaser/src/scene/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Scene consts.\r\n * \r\n * @ignore\r\n */\r\n\r\nvar CONST = {\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PENDING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING: 0,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.INIT\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.START\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n START: 2,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.LOADING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOADING: 3,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.CREATING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATING: 4,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.RUNNING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n RUNNING: 5,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.PAUSED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 6,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SLEEPING\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SLEEPING: 7,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.SHUTDOWN\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n SHUTDOWN: 8,\r\n\r\n /**\r\n * Scene state.\r\n * \r\n * @name Phaser.Scenes.DESTROYED\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DESTROYED: 9\r\n\r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/const.js?")},"./node_modules/phaser/src/scene/events/BOOT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Boot Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems boot process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('boot', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#BOOT\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'boot';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/BOOT_EVENT.js?")},"./node_modules/phaser/src/scene/events/CREATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Create Event.\r\n * \r\n * This event is dispatched by a Scene after it has been created by the Scene Manager.\r\n * \r\n * If a Scene has a `create` method then this event is emitted _after_ that has run.\r\n * \r\n * If there is a transition, this event will be fired after the `TRANSITION_START` event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('create', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#CREATE\r\n * @since 3.17.0\r\n * \r\n * @param {Phaser.Scene} scene - A reference to the Scene that emitted this event.\r\n */\r\nmodule.exports = 'create';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/CREATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Destroy Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems destroy process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('destroy', listener)`.\r\n * \r\n * You should destroy any resources that may be in use by your Scene in this event handler.\r\n * \r\n * @event Phaser.Scenes.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/scene/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pause Event.\r\n * \r\n * This event is dispatched by a Scene when it is paused, either directly via the `pause` method, or as an\r\n * action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('pause', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was paused.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Post Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('postupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#POST_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'postupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Pre Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('preupdate', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#PRE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'preupdate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Ready Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process.\r\n * By this point in the process the Scene is now fully active and rendering.\r\n * This event is meant for your game code to use, as all plugins have responded to the earlier 'start' event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('ready', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#READY\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was started.\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/READY_EVENT.js?")},"./node_modules/phaser/src/scene/events/RENDER_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Render Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('render', listener)`.\r\n * \r\n * A Scene will only render if it is visible and active.\r\n * By the time this event is dispatched, the Scene will have already been rendered.\r\n * \r\n * @event Phaser.Scenes.Events#RENDER\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The renderer that rendered the Scene.\r\n */\r\nmodule.exports = 'render';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RENDER_EVENT.js?")},"./node_modules/phaser/src/scene/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Resume Event.\r\n * \r\n * This event is dispatched by a Scene when it is resumed from a paused state, either directly via the `resume` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('resume', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was resumed.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Shutdown Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems shutdown process.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('shutdown', listener)`.\r\n * \r\n * You should free-up any resources that may be in use by your Scene in this event handler, on the understanding\r\n * that the Scene may, at any time, become active again. A shutdown Scene is not 'destroyed', it's simply not\r\n * currently active. Use the [DESTROY]{@linkcode Phaser.Scenes.Events#event:DESTROY} event to completely clear resources.\r\n * \r\n * @event Phaser.Scenes.Events#SHUTDOWN\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was shutdown.\r\n */\r\nmodule.exports = 'shutdown';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js?")},"./node_modules/phaser/src/scene/events/SLEEP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Sleep Event.\r\n * \r\n * This event is dispatched by a Scene when it is sent to sleep, either directly via the `sleep` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('sleep', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#SLEEP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was sent to sleep.\r\n */\r\nmodule.exports = 'sleep';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/SLEEP_EVENT.js?")},"./node_modules/phaser/src/scene/events/START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Start Event.\r\n * \r\n * This event is dispatched by a Scene during the Scene Systems start process. Primarily used by Scene Plugins.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('start', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Complete Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens when the transition process has completed. This occurs when the duration timer equals or exceeds the duration\r\n * of the transition.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioncomplete', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_COMPLETE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} scene -The Scene on which the transitioned completed.\r\n */\r\nmodule.exports = 'transitioncomplete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Init Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition.\r\n * \r\n * It happens immediately after the `Scene.init` method is called. If the Scene does not have an `init` method,\r\n * this event is not dispatched.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitioninit', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_INIT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitioninit';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Out Event.\r\n * \r\n * This event is dispatched by a Scene when it initiates a transition to another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionout', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_OUT\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} target - A reference to the Scene that is being transitioned to.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionout';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Start Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was not asleep.\r\n * \r\n * It happens immediately after the `Scene.create` method is called. If the Scene does not have a `create` method,\r\n * this event is dispatched anyway.\r\n * \r\n * If the Target Scene was sleeping then the [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} event is\r\n * dispatched instead of this event.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionstart', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_START\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionstart';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js?")},"./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Transition Wake Event.\r\n * \r\n * This event is dispatched by the Target Scene of a transition, only if that Scene was asleep before\r\n * the transition began. If the Scene was not asleep the [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} event is dispatched instead.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('transitionwake', listener)`.\r\n * \r\n * The Scene Transition event flow is as follows:\r\n * \r\n * 1. [TRANSITION_OUT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_OUT} - the Scene that started the transition will emit this event.\r\n * 2. [TRANSITION_INIT]{@linkcode Phaser.Scenes.Events#event:TRANSITION_INIT} - the Target Scene will emit this event if it has an `init` method.\r\n * 3. [TRANSITION_START]{@linkcode Phaser.Scenes.Events#event:TRANSITION_START} - the Target Scene will emit this event after its `create` method is called, OR ...\r\n * 4. [TRANSITION_WAKE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_WAKE} - the Target Scene will emit this event if it was asleep and has been woken-up to be transitioned to.\r\n * 5. [TRANSITION_COMPLETE]{@linkcode Phaser.Scenes.Events#event:TRANSITION_COMPLETE} - the Target Scene will emit this event when the transition finishes.\r\n * \r\n * @event Phaser.Scenes.Events#TRANSITION_WAKE\r\n * @since 3.5.0\r\n * \r\n * @param {Phaser.Scene} from - A reference to the Scene that is being transitioned from.\r\n * @param {number} duration - The duration of the transition in ms.\r\n */\r\nmodule.exports = 'transitionwake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Update Event.\r\n * \r\n * This event is dispatched by a Scene during the main game loop step.\r\n * \r\n * The event flow for a single step of a Scene is as follows:\r\n * \r\n * 1. [PRE_UPDATE]{@linkcode Phaser.Scenes.Events#event:PRE_UPDATE}\r\n * 2. [UPDATE]{@linkcode Phaser.Scenes.Events#event:UPDATE}\r\n * 3. The `Scene.update` method is called, if it exists\r\n * 4. [POST_UPDATE]{@linkcode Phaser.Scenes.Events#event:POST_UPDATE}\r\n * 5. [RENDER]{@linkcode Phaser.Scenes.Events#event:RENDER}\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('update', listener)`.\r\n * \r\n * A Scene will only run its step if it is active.\r\n * \r\n * @event Phaser.Scenes.Events#UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/UPDATE_EVENT.js?")},"./node_modules/phaser/src/scene/events/WAKE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Scene Systems Wake Event.\r\n * \r\n * This event is dispatched by a Scene when it is woken from sleep, either directly via the `wake` method,\r\n * or as an action from another Scene.\r\n * \r\n * Listen to it from a Scene using `this.scene.events.on('wake', listener)`.\r\n * \r\n * @event Phaser.Scenes.Events#WAKE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scenes.Systems} sys - A reference to the Scene Systems class of the Scene that emitted this event.\r\n * @param {any} [data] - An optional data object that was passed to this Scene when it was woken up.\r\n */\r\nmodule.exports = 'wake';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/WAKE_EVENT.js?")},"./node_modules/phaser/src/scene/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Scenes.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n BOOT: __webpack_require__(/*! ./BOOT_EVENT */ "./node_modules/phaser/src/scene/events/BOOT_EVENT.js"),\r\n CREATE: __webpack_require__(/*! ./CREATE_EVENT */ "./node_modules/phaser/src/scene/events/CREATE_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/scene/events/DESTROY_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/scene/events/PAUSE_EVENT.js"),\r\n POST_UPDATE: __webpack_require__(/*! ./POST_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js"),\r\n PRE_UPDATE: __webpack_require__(/*! ./PRE_UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/scene/events/READY_EVENT.js"),\r\n RENDER: __webpack_require__(/*! ./RENDER_EVENT */ "./node_modules/phaser/src/scene/events/RENDER_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/scene/events/RESUME_EVENT.js"),\r\n SHUTDOWN: __webpack_require__(/*! ./SHUTDOWN_EVENT */ "./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js"),\r\n SLEEP: __webpack_require__(/*! ./SLEEP_EVENT */ "./node_modules/phaser/src/scene/events/SLEEP_EVENT.js"),\r\n START: __webpack_require__(/*! ./START_EVENT */ "./node_modules/phaser/src/scene/events/START_EVENT.js"),\r\n TRANSITION_COMPLETE: __webpack_require__(/*! ./TRANSITION_COMPLETE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js"),\r\n TRANSITION_INIT: __webpack_require__(/*! ./TRANSITION_INIT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js"),\r\n TRANSITION_OUT: __webpack_require__(/*! ./TRANSITION_OUT_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js"),\r\n TRANSITION_START: __webpack_require__(/*! ./TRANSITION_START_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js"),\r\n TRANSITION_WAKE: __webpack_require__(/*! ./TRANSITION_WAKE_EVENT */ "./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js"),\r\n UPDATE: __webpack_require__(/*! ./UPDATE_EVENT */ "./node_modules/phaser/src/scene/events/UPDATE_EVENT.js"),\r\n WAKE: __webpack_require__(/*! ./WAKE_EVENT */ "./node_modules/phaser/src/scene/events/WAKE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/events/index.js?')},"./node_modules/phaser/src/scene/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/scene/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Scenes\r\n */\r\n\r\nvar Scene = {\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/scene/events/index.js"),\r\n SceneManager: __webpack_require__(/*! ./SceneManager */ "./node_modules/phaser/src/scene/SceneManager.js"),\r\n ScenePlugin: __webpack_require__(/*! ./ScenePlugin */ "./node_modules/phaser/src/scene/ScenePlugin.js"),\r\n Settings: __webpack_require__(/*! ./Settings */ "./node_modules/phaser/src/scene/Settings.js"),\r\n Systems: __webpack_require__(/*! ./Systems */ "./node_modules/phaser/src/scene/Systems.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nScene = Extend(false, Scene, CONST);\r\n\r\nmodule.exports = Scene;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/scene/index.js?')},"./node_modules/phaser/src/sound/BaseSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Class containing all the shared state and behavior of a sound object, independent of the implementation.\r\n *\r\n * @class BaseSound\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n */\r\nvar BaseSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSound (manager, key, config)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to the sound manager.\r\n *\r\n * @name Phaser.Sound.BaseSound#manager\r\n * @type {Phaser.Sound.BaseSoundManager}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * Asset key for the sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#key\r\n * @type {string}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * Flag indicating if sound is currently playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPlaying\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPlaying = false;\r\n\r\n /**\r\n * Flag indicating if sound is currently paused.\r\n *\r\n * @name Phaser.Sound.BaseSound#isPaused\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isPaused = false;\r\n\r\n /**\r\n * A property that holds the value of sound's actual playback rate,\r\n * after its rate and detune values has been combined with global\r\n * rate and detune values.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalRate\r\n * @type {number}\r\n * @default 1\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalRate = 1;\r\n\r\n /**\r\n * A value representing the duration, in seconds.\r\n * It could be total sound duration or a marker duration.\r\n *\r\n * @name Phaser.Sound.BaseSound#duration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.duration = this.duration || 0;\r\n\r\n /**\r\n * The total duration of the sound in seconds.\r\n *\r\n * @name Phaser.Sound.BaseSound#totalDuration\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = this.totalDuration || 0;\r\n\r\n /**\r\n * A config object used to store default sound settings' values.\r\n * Default values will be set by properties' setters.\r\n *\r\n * @name Phaser.Sound.BaseSound#config\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.config = {\r\n\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n\r\n };\r\n\r\n /**\r\n * Reference to the currently used config.\r\n * It could be default config or marker config.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentConfig\r\n * @type {Phaser.Types.Sound.SoundConfig}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.currentConfig = this.config;\r\n\r\n this.config = Extend(this.config, config);\r\n\r\n /**\r\n * Object containing markers definitions.\r\n *\r\n * @name Phaser.Sound.BaseSound#markers\r\n * @type {Object.}\r\n * @default {}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.markers = {};\r\n\r\n /**\r\n * Currently playing marker.\r\n * 'null' if whole sound is playing.\r\n *\r\n * @name Phaser.Sound.BaseSound#currentMarker\r\n * @type {Phaser.Types.Sound.SoundMarker}\r\n * @default null\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.currentMarker = null;\r\n\r\n /**\r\n * Flag indicating if destroy method was called on this sound.\r\n *\r\n * @name Phaser.Sound.BaseSound#pendingRemove\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.pendingRemove = false;\r\n },\r\n\r\n /**\r\n * Adds a marker into the current sound. A marker is represented by name, start time, duration, and optionally config object.\r\n * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.\r\n *\r\n * @method Phaser.Sound.BaseSound#addMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object.\r\n *\r\n * @return {boolean} Whether the marker was added successfully.\r\n */\r\n addMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('addMarker ' + marker.name + ' already exists in Sound');\r\n\r\n return false;\r\n }\r\n\r\n marker = Extend(true, {\r\n name: '',\r\n start: 0,\r\n duration: this.totalDuration - (marker.start || 0),\r\n config: {\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }\r\n }, marker);\r\n\r\n this.markers[marker.name] = marker;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Updates previously added marker.\r\n *\r\n * @method Phaser.Sound.BaseSound#updateMarker\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values.\r\n *\r\n * @return {boolean} Whether the marker was updated successfully.\r\n */\r\n updateMarker: function (marker)\r\n {\r\n if (!marker || !marker.name || typeof marker.name !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!this.markers[marker.name])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio Marker: ' + marker.name + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.markers[marker.name] = Extend(true, this.markers[marker.name], marker);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a marker from the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#removeMarker\r\n * @since 3.0.0\r\n *\r\n * @param {string} markerName - The name of the marker to remove.\r\n *\r\n * @return {?Phaser.Types.Sound.SoundMarker} Removed marker object or 'null' if there was no marker with provided name.\r\n */\r\n removeMarker: function (markerName)\r\n {\r\n var marker = this.markers[markerName];\r\n\r\n if (!marker)\r\n {\r\n return null;\r\n }\r\n\r\n this.markers[markerName] = null;\r\n\r\n return marker;\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.BaseSound#play\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (markerName === undefined) { markerName = ''; }\r\n\r\n if (typeof markerName === 'object')\r\n {\r\n config = markerName;\r\n markerName = '';\r\n }\r\n\r\n if (typeof markerName !== 'string')\r\n {\r\n return false;\r\n }\r\n\r\n if (!markerName)\r\n {\r\n this.currentMarker = null;\r\n this.currentConfig = this.config;\r\n this.duration = this.totalDuration;\r\n }\r\n else\r\n {\r\n if (!this.markers[markerName])\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Marker: ' + markerName + ' missing in Sound: ' + this.key);\r\n\r\n return false;\r\n }\r\n\r\n this.currentMarker = this.markers[markerName];\r\n this.currentConfig = this.currentMarker.config;\r\n this.duration = this.currentMarker.duration;\r\n }\r\n\r\n this.resetConfig();\r\n\r\n this.currentConfig = Extend(this.currentConfig, config);\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#pause\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.isPaused || !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#resume\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (!this.isPaused || this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#stop\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!this.isPaused && !this.isPlaying)\r\n {\r\n return false;\r\n }\r\n\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.mute = this.currentConfig.mute;\r\n this.volume = this.currentConfig.volume;\r\n this.rate = this.currentConfig.rate;\r\n this.detune = this.currentConfig.detune;\r\n this.loop = this.currentConfig.loop;\r\n },\r\n\r\n /**\r\n * Method used internally for resetting values of some of the config properties.\r\n *\r\n * @method Phaser.Sound.BaseSound#resetConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n resetConfig: function ()\r\n {\r\n this.currentConfig.seek = 0;\r\n this.currentConfig.delay = 0;\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.BaseSound#update\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: NOOP,\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.BaseSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n var cent = 1.0005777895065548; // Math.pow(2, 1/1200);\r\n var totalDetune = this.currentConfig.detune + this.manager.detune;\r\n var detuneRate = Math.pow(cent, totalDetune);\r\n\r\n this.totalRate = this.currentConfig.rate * this.manager.rate * detuneRate;\r\n },\r\n\r\n /**\r\n * Destroys this sound and all associated events and marks it for removal from the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSound#destroy\r\n * @fires Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.pendingRemove)\r\n {\r\n return;\r\n }\r\n\r\n this.emit(Events.DESTROY, this);\r\n this.pendingRemove = true;\r\n this.manager = null;\r\n this.key = '';\r\n this.removeAllListeners();\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.config = null;\r\n this.currentConfig = null;\r\n this.markers = null;\r\n this.currentMarker = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSound.js?")},"./node_modules/phaser/src/sound/BaseSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clone = __webpack_require__(/*! ../utils/object/Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Events = __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ "./node_modules/phaser/src/core/events/index.js");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback.\r\n * The audio file type and the encoding of those files are extremely important.\r\n *\r\n * Not all browsers can play all audio formats.\r\n *\r\n * There is a good guide to what\'s supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support).\r\n *\r\n * @class BaseSoundManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar BaseSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function BaseSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * Local reference to game.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#game\r\n * @type {Phaser.Game}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * Local reference to the JSON Cache, as used by Audio Sprites.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#jsonCache\r\n * @type {Phaser.Cache.BaseCache}\r\n * @readonly\r\n * @since 3.7.0\r\n */\r\n this.jsonCache = game.cache.json;\r\n\r\n /**\r\n * An array containing all added sounds.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#sounds\r\n * @type {Phaser.Sound.BaseSound[]}\r\n * @default []\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.sounds = [];\r\n\r\n /**\r\n * Global mute setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#mute\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.mute = false;\r\n\r\n /**\r\n * Global volume setting.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#volume\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.volume = 1;\r\n\r\n /**\r\n * Flag indicating if sounds should be paused when game looses focus,\r\n * for instance when user switches to another tab/program/app.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#pauseOnBlur\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.pauseOnBlur = true;\r\n\r\n /**\r\n * Property that actually holds the value of global playback rate.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_rate\r\n * @type {number}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._rate = 1;\r\n\r\n /**\r\n * Property that actually holds the value of global detune.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#_detune\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._detune = 0;\r\n\r\n /**\r\n * Mobile devices require sounds to be triggered from an explicit user action,\r\n * such as a tap, before any sound can be loaded/played on a web page.\r\n * Set to true if the audio system is currently locked awaiting user interaction.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#locked\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.locked = this.locked || false;\r\n\r\n /**\r\n * Flag used internally for handling when the audio system\r\n * has been unlocked, if there ever was a need for it.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#unlocked\r\n * @type {boolean}\r\n * @default false\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.unlocked = false;\r\n\r\n game.events.on(GameEvents.BLUR, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onBlur();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.FOCUS, function ()\r\n {\r\n if (this.pauseOnBlur)\r\n {\r\n this.onFocus();\r\n }\r\n }, this);\r\n\r\n game.events.on(GameEvents.PRE_STEP, this.update, this);\r\n game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#add\r\n * @override\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.BaseSound} The new sound instance.\r\n */\r\n add: NOOP,\r\n\r\n /**\r\n * Adds a new audio sprite sound into the sound manager.\r\n * Audio Sprites are a combination of audio files and a JSON configuration.\r\n * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#addAudioSprite\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Types.Sound.AudioSpriteSound} The new audio sprite sound instance.\r\n */\r\n addAudioSprite: function (key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = this.jsonCache.get(key).spritemap;\r\n\r\n for (var markerName in sound.spritemap)\r\n {\r\n if (!sound.spritemap.hasOwnProperty(markerName))\r\n {\r\n continue;\r\n }\r\n\r\n var markerConfig = Clone(config);\r\n\r\n var marker = sound.spritemap[markerName];\r\n\r\n markerConfig.loop = (marker.hasOwnProperty(\'loop\')) ? marker.loop : false;\r\n\r\n sound.addMarker({\r\n name: markerName,\r\n start: marker.start,\r\n duration: marker.end - marker.start,\r\n config: markerConfig\r\n });\r\n }\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Enables playing sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#play\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {(Phaser.Types.Sound.SoundConfig|Phaser.Types.Sound.SoundMarker)} [extra] - An optional additional object containing settings to be applied to the sound. It could be either config or marker object.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (key, extra)\r\n {\r\n var sound = this.add(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n if (extra)\r\n {\r\n if (extra.name)\r\n {\r\n sound.addMarker(extra);\r\n\r\n return sound.play(extra.name);\r\n }\r\n else\r\n {\r\n return sound.play(extra);\r\n }\r\n }\r\n else\r\n {\r\n return sound.play();\r\n }\r\n },\r\n\r\n /**\r\n * Enables playing audio sprite sound on the fly without the need to keep a reference to it.\r\n * Sound will auto destroy once its playback ends.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#playAudioSprite\r\n * @listens Phaser.Sound.Events#COMPLETE\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {string} spriteName - The name of the sound sprite to play.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {boolean} Whether the audio sprite sound started playing successfully.\r\n */\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n var sound = this.addAudioSprite(key);\r\n\r\n sound.once(Events.COMPLETE, sound.destroy, sound);\r\n\r\n return sound.play(spriteName, config);\r\n },\r\n\r\n /**\r\n * Removes a sound from the sound manager.\r\n * The removed sound is destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#remove\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.BaseSound} sound - The sound object to remove.\r\n *\r\n * @return {boolean} True if the sound was removed successfully, otherwise false.\r\n */\r\n remove: function (sound)\r\n {\r\n var index = this.sounds.indexOf(sound);\r\n\r\n if (index !== -1)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(index, 1);\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Removes all sounds from the sound manager that have an asset key matching the given value.\r\n * The removed sounds are destroyed before removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#removeByKey\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The key to match when removing sound objects.\r\n *\r\n * @return {number} The number of matching sound objects that were removed.\r\n */\r\n removeByKey: function (key)\r\n {\r\n var removed = 0;\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n var sound = this.sounds[i];\r\n\r\n if (sound.key === key)\r\n {\r\n sound.destroy();\r\n\r\n this.sounds.splice(i, 1);\r\n\r\n removed++;\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Pauses all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#pauseAll\r\n * @fires Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n */\r\n pauseAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.pause();\r\n });\r\n\r\n this.emit(Events.PAUSE_ALL, this);\r\n },\r\n\r\n /**\r\n * Resumes all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#resumeAll\r\n * @fires Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n */\r\n resumeAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.resume();\r\n });\r\n\r\n this.emit(Events.RESUME_ALL, this);\r\n },\r\n\r\n /**\r\n * Stops all the sounds in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#stopAll\r\n * @fires Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n */\r\n stopAll: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.stop();\r\n });\r\n\r\n this.emit(Events.STOP_ALL, this);\r\n },\r\n\r\n /**\r\n * Method used internally for unlocking audio playback on devices that\r\n * require user interaction before any sound can be played on a web page.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#unlock\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n unlock: NOOP,\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onBlur\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: NOOP,\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.BaseSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#onFocus\r\n * @override\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: NOOP,\r\n\r\n /**\r\n * Update method called on every game step.\r\n * Removes destroyed sounds and updates every active sound in the game.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#update\r\n * @protected\r\n * @fires Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n update: function (time, delta)\r\n {\r\n if (this.unlocked)\r\n {\r\n this.unlocked = false;\r\n this.locked = false;\r\n\r\n this.emit(Events.UNLOCKED, this);\r\n }\r\n\r\n for (var i = this.sounds.length - 1; i >= 0; i--)\r\n {\r\n if (this.sounds[i].pendingRemove)\r\n {\r\n this.sounds.splice(i, 1);\r\n }\r\n }\r\n\r\n this.sounds.forEach(function (sound)\r\n {\r\n sound.update(time, delta);\r\n });\r\n },\r\n\r\n /**\r\n * Destroys all the sounds in the game and all associated events.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllListeners();\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.destroy();\r\n });\r\n\r\n this.sounds.length = 0;\r\n this.sounds = null;\r\n\r\n this.game = null;\r\n },\r\n\r\n /**\r\n * Method used internally for iterating only over active sounds and skipping sounds that are marked for removal.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#forEachActiveSound\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Sound.EachActiveSoundCallback} callback - Callback function. (manager: Phaser.Sound.BaseSoundManager, sound: Phaser.Sound.BaseSound, index: number, sounds: Phaser.Manager.BaseSound[]) => void\r\n * @param {*} [scope] - Callback context.\r\n */\r\n forEachActiveSound: function (callback, scope)\r\n {\r\n var _this = this;\r\n\r\n this.sounds.forEach(function (sound, index)\r\n {\r\n if (!sound.pendingRemove)\r\n {\r\n callback.call(scope || _this, sound, index, _this.sounds);\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Sets the global playback rate at which all the sounds will be played.\r\n *\r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setRate\r\n * @fires Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - Global playback rate at which all the sounds will be played.\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global playback rate at which all the sounds will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audio\'s playback speed.\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#rate\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this._rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._rate = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.BaseSoundManager#setDetune\r\n * @fires Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.BaseSoundManager} This Sound Manager.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Global detuning of all sounds in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.BaseSoundManager#detune\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this._detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._detune = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.calculateRate();\r\n });\r\n\r\n this.emit(Events.GLOBAL_DETUNE, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = BaseSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/BaseSoundManager.js?')},"./node_modules/phaser/src/sound/SoundManagerCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HTML5AudioSoundManager = __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js");\r\nvar NoAudioSoundManager = __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js");\r\nvar WebAudioSoundManager = __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js");\r\n\r\n/**\r\n * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings.\r\n *\r\n * Be aware of https://developers.google.com/web/updates/2017/09/autoplay-policy-changes\r\n *\r\n * @function Phaser.Sound.SoundManagerCreator\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar SoundManagerCreator = {\r\n\r\n create: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n var deviceAudio = game.device.audio;\r\n\r\n if ((audioConfig && audioConfig.noAudio) || (!deviceAudio.webAudio && !deviceAudio.audioData))\r\n {\r\n return new NoAudioSoundManager(game);\r\n }\r\n\r\n if (deviceAudio.webAudio && !(audioConfig && audioConfig.disableWebAudio))\r\n {\r\n return new WebAudioSoundManager(game);\r\n }\r\n\r\n return new HTML5AudioSoundManager(game);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SoundManagerCreator;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/SoundManagerCreator.js?')},"./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Complete Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they complete playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('complete', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#COMPLETE\r\n * @since 3.16.1\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded All Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method,\r\n * once all files passed to the method have been decoded (or errored).\r\n * \r\n * Use `Phaser.Sound.Events#DECODED` to listen for single sounds being decoded, and `DECODED_ALL` to\r\n * listen for them all completing.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decodedall', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.once('decodedall', handler);\r\n * this.sound.decodeAudio([ audioFiles ]);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n */\r\nmodule.exports = 'decodedall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/DECODED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Audio Data Decoded Event.\r\n * \r\n * This event is dispatched by the Web Audio Sound Manager as a result of calling the `decodeAudio` method.\r\n * \r\n * Listen to it from the Sound Manager in a Scene using `this.sound.on('decoded', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * this.sound.on('decoded', handler);\r\n * this.sound.decodeAudio(key, audioData);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DECODED\r\n * @since 3.18.0\r\n * \r\n * @param {string} key - The key of the audio file that was decoded and added to the audio cache.\r\n */\r\nmodule.exports = 'decoded';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DECODED_EVENT.js?")},"./node_modules/phaser/src/sound/events/DESTROY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Destroy Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are destroyed, either\r\n * directly or via a Sound Manager.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('destroy', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('destroy', listener);\r\n * music.destroy();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DESTROY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'destroy';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DESTROY_EVENT.js?")},"./node_modules/phaser/src/sound/events/DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Detune Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their detune value changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('detune', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('detune', listener);\r\n * music.play();\r\n * music.setDetune(200);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Detune Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `detune` property of the Sound Manager is changed, which globally\r\n * adjusts the detuning of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_DETUNE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} detune - The updated detune value.\r\n */\r\nmodule.exports = 'detune';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Mute Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `mute` property is changed, either directly\r\n * or via the `setMute` method. This changes the mute state of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('mute', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound Manager is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Rate Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `rate` property of the Sound Manager is changed, which globally\r\n * adjusts the playback rate of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('rate', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_RATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} rate - The updated rate value.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Global Volume Event.\r\n * \r\n * This event is dispatched by the Sound Manager when its `volume` property is changed, either directly\r\n * or via the `setVolume` method. This changes the volume of all active sounds.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('volume', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSoundManager|Phaser.Sound.HTML5AudioSoundManager)} soundManager - A reference to the sound manager that emitted the event.\r\n * @param {number} volume - The new global volume of the Sound Manager.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOPED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Looped Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they loop during playback.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('looped', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('looped', listener);\r\n * music.setLoop(true);\r\n * music.play();\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOP]{@linkcode Phaser.Sound.Events#event:LOOP} event, which only emits when the loop state of a Sound is changed.\r\n *\r\n * @event Phaser.Sound.Events#LOOPED\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'looped';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOPED_EVENT.js?")},"./node_modules/phaser/src/sound/events/LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Loop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their loop state is changed.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('loop', listener);\r\n * music.setLoop(true);\r\n * ```\r\n * \r\n * This is not to be confused with the [LOOPED]{@linkcode Phaser.Sound.Events#event:LOOPED} event, which emits each time a Sound loops during playback.\r\n *\r\n * @event Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} loop - The new loop value. `true` if the Sound will loop, otherwise `false`.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/LOOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/MUTE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Mute Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their mute state changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('mute', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('mute', listener);\r\n * music.play();\r\n * music.setMute(true);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {boolean} mute - The mute value. `true` if the Sound is now muted, otherwise `false`.\r\n */\r\nmodule.exports = 'mute';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/MUTE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Pause All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `pauseAll` method is invoked and after all current Sounds\r\n * have been paused.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('pauseall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#PAUSE_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'pauseall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Pause Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are paused.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('pause', listener);\r\n * music.play();\r\n * music.pause();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PAUSE_EVENT.js?")},"./node_modules/phaser/src/sound/events/PLAY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Play Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are played.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('play', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('play', listener);\r\n * music.play();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'play';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/PLAY_EVENT.js?")},"./node_modules/phaser/src/sound/events/RATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Rate Change Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their rate changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('rate', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('rate', listener);\r\n * music.play();\r\n * music.setRate(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} rate - The new rate of the Sound.\r\n */\r\nmodule.exports = 'rate';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RATE_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Resume All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `resumeAll` method is invoked and after all current Sounds\r\n * have been resumed.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('resumeall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#RESUME_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'resumeall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Resume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are resumed from a paused state.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('resume', listener);\r\n * music.play();\r\n * music.pause();\r\n * music.resume();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/RESUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/SEEK_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Seek Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are seeked to a new position.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('seek', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('seek', listener);\r\n * music.play();\r\n * music.setSeek(5000);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} detune - The new detune value of the Sound.\r\n */\r\nmodule.exports = 'seek';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/SEEK_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Stop All Sounds Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched when the `stopAll` method is invoked and after all current Sounds\r\n * have been stopped.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('stopall', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#STOP_ALL\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'stopall';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js?")},"./node_modules/phaser/src/sound/events/STOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Stop Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when they are stopped.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('stop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('stop', listener);\r\n * music.play();\r\n * music.stop();\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n */\r\nmodule.exports = 'stop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/STOP_EVENT.js?")},"./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Manager Unlocked Event.\r\n * \r\n * This event is dispatched by the Base Sound Manager, or more typically, an instance of the Web Audio Sound Manager,\r\n * or the HTML5 Audio Manager. It is dispatched during the update loop when the Sound Manager becomes unlocked. For\r\n * Web Audio this is on the first user gesture on the page.\r\n * \r\n * Listen to it from a Scene using: `this.sound.on('unlocked', listener)`.\r\n *\r\n * @event Phaser.Sound.Events#UNLOCKED\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Sound.BaseSoundManager} soundManager - A reference to the sound manager that emitted the event.\r\n */\r\nmodule.exports = 'unlocked';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js?")},"./node_modules/phaser/src/sound/events/VOLUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Sound Volume Event.\r\n * \r\n * This event is dispatched by both Web Audio and HTML5 Audio Sound objects when their volume changes.\r\n * \r\n * Listen to it from a Sound instance using `Sound.on('volume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var music = this.sound.add('key');\r\n * music.on('volume', listener);\r\n * music.play();\r\n * music.setVolume(0.5);\r\n * ```\r\n *\r\n * @event Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n * \r\n * @param {(Phaser.Sound.WebAudioSound|Phaser.Sound.HTML5AudioSound)} sound - A reference to the Sound that emitted the event.\r\n * @param {number} volume - The new volume of the Sound.\r\n */\r\nmodule.exports = 'volume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/VOLUME_EVENT.js?")},"./node_modules/phaser/src/sound/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n COMPLETE: __webpack_require__(/*! ./COMPLETE_EVENT */ "./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js"),\r\n DECODED: __webpack_require__(/*! ./DECODED_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_EVENT.js"),\r\n DECODED_ALL: __webpack_require__(/*! ./DECODED_ALL_EVENT */ "./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js"),\r\n DESTROY: __webpack_require__(/*! ./DESTROY_EVENT */ "./node_modules/phaser/src/sound/events/DESTROY_EVENT.js"),\r\n DETUNE: __webpack_require__(/*! ./DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/DETUNE_EVENT.js"),\r\n GLOBAL_DETUNE: __webpack_require__(/*! ./GLOBAL_DETUNE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js"),\r\n GLOBAL_MUTE: __webpack_require__(/*! ./GLOBAL_MUTE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js"),\r\n GLOBAL_RATE: __webpack_require__(/*! ./GLOBAL_RATE_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js"),\r\n GLOBAL_VOLUME: __webpack_require__(/*! ./GLOBAL_VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js"),\r\n LOOP: __webpack_require__(/*! ./LOOP_EVENT */ "./node_modules/phaser/src/sound/events/LOOP_EVENT.js"),\r\n LOOPED: __webpack_require__(/*! ./LOOPED_EVENT */ "./node_modules/phaser/src/sound/events/LOOPED_EVENT.js"),\r\n MUTE: __webpack_require__(/*! ./MUTE_EVENT */ "./node_modules/phaser/src/sound/events/MUTE_EVENT.js"),\r\n PAUSE_ALL: __webpack_require__(/*! ./PAUSE_ALL_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js"),\r\n PAUSE: __webpack_require__(/*! ./PAUSE_EVENT */ "./node_modules/phaser/src/sound/events/PAUSE_EVENT.js"),\r\n PLAY: __webpack_require__(/*! ./PLAY_EVENT */ "./node_modules/phaser/src/sound/events/PLAY_EVENT.js"),\r\n RATE: __webpack_require__(/*! ./RATE_EVENT */ "./node_modules/phaser/src/sound/events/RATE_EVENT.js"),\r\n RESUME_ALL: __webpack_require__(/*! ./RESUME_ALL_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js"),\r\n RESUME: __webpack_require__(/*! ./RESUME_EVENT */ "./node_modules/phaser/src/sound/events/RESUME_EVENT.js"),\r\n SEEK: __webpack_require__(/*! ./SEEK_EVENT */ "./node_modules/phaser/src/sound/events/SEEK_EVENT.js"),\r\n STOP_ALL: __webpack_require__(/*! ./STOP_ALL_EVENT */ "./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js"),\r\n STOP: __webpack_require__(/*! ./STOP_EVENT */ "./node_modules/phaser/src/sound/events/STOP_EVENT.js"),\r\n UNLOCKED: __webpack_require__(/*! ./UNLOCKED_EVENT */ "./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js"),\r\n VOLUME: __webpack_require__(/*! ./VOLUME_EVENT */ "./node_modules/phaser/src/sound/events/VOLUME_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/events/index.js?')},"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * HTML5 Audio implementation of the sound.\r\n *\r\n * @class HTML5AudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar HTML5AudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * An array containing all HTML5 Audio tags that could be used for individual\r\n * sound's playback. Number of instances depends on the config value passed\r\n * to the Loader#audio method call, default is 1.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#tags\r\n * @type {HTMLAudioElement[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.tags = manager.game.cache.audio.get(key);\r\n\r\n if (!this.tags)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * Reference to an HTML5 Audio tag used for playing sound.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#audio\r\n * @type {HTMLAudioElement}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.audio = null;\r\n\r\n /**\r\n * Timestamp as generated by the Request Animation Frame or SetTimeout\r\n * representing the time at which the delayed sound playback should start.\r\n * Set to 0 if sound playback is not delayed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * Audio tag's playback position recorded on previous\r\n * update method call. Set to 0 if sound is not playing.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#previousTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.previousTime = 0;\r\n\r\n this.duration = this.tags[0].duration;\r\n\r\n this.totalDuration = this.tags[0].duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (this.manager.isLocked(this, 'play', [ markerName, config ]))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.isLocked(this, 'pause'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.isLocked(this, 'resume'))\r\n {\r\n return false;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n if (!this.pickAndPlayAudioTag())\r\n {\r\n return false;\r\n }\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (this.manager.isLocked(this, 'stop'))\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAndPlayAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAndPlayAudioTag: function ()\r\n {\r\n if (!this.pickAudioTag())\r\n {\r\n this.reset();\r\n return false;\r\n }\r\n\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n\r\n this.previousTime = offset;\r\n this.audio.currentTime = offset;\r\n this.applyConfig();\r\n\r\n if (delay === 0)\r\n {\r\n this.startTime = 0;\r\n\r\n if (this.audio.paused)\r\n {\r\n this.playCatchPromise();\r\n }\r\n }\r\n else\r\n {\r\n this.startTime = window.performance.now() + delay * 1000;\r\n\r\n if (!this.audio.paused)\r\n {\r\n this.audio.pause();\r\n }\r\n }\r\n\r\n this.resetConfig();\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * This method performs the audio tag pooling logic. It first looks for\r\n * unused audio tag to assign to this sound object. If there are no unused\r\n * audio tags, based on HTML5AudioSoundManager#override property value, it\r\n * looks for sound with most advanced playback and hijacks its audio tag or\r\n * does nothing.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#pickAudioTag\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was assigned an audio tag successfully.\r\n */\r\n pickAudioTag: function ()\r\n {\r\n if (this.audio)\r\n {\r\n return true;\r\n }\r\n\r\n for (var i = 0; i < this.tags.length; i++)\r\n {\r\n var audio = this.tags[i];\r\n\r\n if (audio.dataset.used === 'false')\r\n {\r\n audio.dataset.used = 'true';\r\n this.audio = audio;\r\n return true;\r\n }\r\n }\r\n\r\n if (!this.manager.override)\r\n {\r\n return false;\r\n }\r\n\r\n var otherSounds = [];\r\n\r\n this.manager.forEachActiveSound(function (sound)\r\n {\r\n if (sound.key === this.key && sound.audio)\r\n {\r\n otherSounds.push(sound);\r\n }\r\n }, this);\r\n\r\n otherSounds.sort(function (a1, a2)\r\n {\r\n if (a1.loop === a2.loop)\r\n {\r\n // sort by progress\r\n return (a2.seek / a2.duration) - (a1.seek / a1.duration);\r\n }\r\n return a1.loop ? 1 : -1;\r\n });\r\n\r\n var selectedSound = otherSounds[0];\r\n\r\n this.audio = selectedSound.audio;\r\n\r\n selectedSound.reset();\r\n selectedSound.audio = null;\r\n selectedSound.startTime = 0;\r\n selectedSound.previousTime = 0;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Method used for playing audio tag and catching possible exceptions\r\n * thrown from rejected Promise returned from play method call.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#playCatchPromise\r\n * @private\r\n * @since 3.0.0\r\n */\r\n playCatchPromise: function ()\r\n {\r\n var playPromise = this.audio.play();\r\n\r\n if (playPromise)\r\n {\r\n // eslint-disable-next-line no-unused-vars\r\n playPromise.catch(function (reason)\r\n {\r\n console.warn(reason);\r\n });\r\n }\r\n },\r\n\r\n /**\r\n * Used internally to do what the name says.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#stopAndReleaseAudioTag\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndReleaseAudioTag: function ()\r\n {\r\n this.audio.pause();\r\n this.audio.dataset.used = 'false';\r\n this.audio = null;\r\n this.startTime = 0;\r\n this.previousTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally to reset sound state, usually when stopping sound\r\n * or when hijacking audio tag from another sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#reset\r\n * @private\r\n * @since 3.0.0\r\n */\r\n reset: function ()\r\n {\r\n BaseSound.prototype.stop.call(this);\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for pausing sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.isPlaying = false;\r\n this.isPaused = true;\r\n\r\n this.currentConfig.seek = this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n\r\n this.currentConfig.delay = Math.max(0, (this.startTime - window.performance.now()) / 1000);\r\n\r\n this.stopAndReleaseAudioTag();\r\n },\r\n\r\n /**\r\n * Method used internally by sound manager for resuming sound if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#onFocus\r\n * @private\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.isPlaying = true;\r\n this.isPaused = false;\r\n this.pickAndPlayAudioTag();\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (!this.isPlaying)\r\n {\r\n return;\r\n }\r\n\r\n // handling delayed playback\r\n if (this.startTime > 0)\r\n {\r\n if (this.startTime < time - this.manager.audioPlayDelay)\r\n {\r\n this.audio.currentTime += Math.max(0, time - this.startTime) / 1000;\r\n this.startTime = 0;\r\n this.previousTime = this.audio.currentTime;\r\n this.playCatchPromise();\r\n }\r\n\r\n return;\r\n }\r\n\r\n // handle looping and ending\r\n var startTime = this.currentMarker ? this.currentMarker.start : 0;\r\n var endTime = startTime + this.duration;\r\n var currentTime = this.audio.currentTime;\r\n\r\n if (this.currentConfig.loop)\r\n {\r\n if (currentTime >= endTime - this.manager.loopEndOffset)\r\n {\r\n this.audio.currentTime = startTime + Math.max(0, currentTime - endTime);\r\n currentTime = this.audio.currentTime;\r\n }\r\n else if (currentTime < startTime)\r\n {\r\n this.audio.currentTime += startTime;\r\n currentTime = this.audio.currentTime;\r\n }\r\n\r\n if (currentTime < this.previousTime)\r\n {\r\n this.emit(Events.LOOPED, this);\r\n }\r\n }\r\n else if (currentTime >= endTime)\r\n {\r\n this.reset();\r\n\r\n this.stopAndReleaseAudioTag();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n\r\n return;\r\n }\r\n\r\n this.previousTime = currentTime;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.tags = null;\r\n\r\n if (this.audio)\r\n {\r\n this.stopAndReleaseAudioTag();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to determine mute setting of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateMute\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateMute: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.muted = this.currentConfig.mute || this.manager.mute;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total volume of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#updateVolume\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updateVolume: function ()\r\n {\r\n if (this.audio)\r\n {\r\n this.audio.volume = this.currentConfig.volume * this.manager.volume;\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n if (this.audio)\r\n {\r\n this.audio.playbackRate = this.totalRate;\r\n }\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n\r\n if (this.manager.isLocked(this, 'mute', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateMute();\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n\r\n if (this.manager.isLocked(this, 'volume', value))\r\n {\r\n return;\r\n }\r\n\r\n this.updateVolume();\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n if (this.manager.isLocked(this, Events.RATE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.HTML5AudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n if (this.manager.isLocked(this, Events.DETUNE, value))\r\n {\r\n return;\r\n }\r\n else\r\n {\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n return this.audio.currentTime - (this.currentMarker ? this.currentMarker.start : 0);\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.isLocked(this, 'seek', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.startTime > 0)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n if (this.isPlaying)\r\n {\r\n this.previousTime = value;\r\n this.audio.currentTime = value;\r\n }\r\n else if (this.isPaused)\r\n {\r\n this.currentConfig.seek = value;\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.HTML5AudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.manager.isLocked(this, 'loop', value))\r\n {\r\n return;\r\n }\r\n\r\n if (this.audio)\r\n {\r\n this.audio.loop = value;\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSound.js?")},"./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar HTML5AudioSound = __webpack_require__(/*! ./HTML5AudioSound */ \"./node_modules/phaser/src/sound/html5/HTML5AudioSound.js\");\r\n\r\n/**\r\n * HTML5 Audio implementation of the Sound Manager.\r\n *\r\n * @class HTML5AudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar HTML5AudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function HTML5AudioSoundManager (game)\r\n {\r\n /**\r\n * Flag indicating whether if there are no idle instances of HTML5 Audio tag,\r\n * for any particular sound, if one of the used tags should be hijacked and used\r\n * for succeeding playback or if succeeding Phaser.Sound.HTML5AudioSound#play\r\n * call should be ignored.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#override\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.override = true;\r\n\r\n /**\r\n * Value representing time difference, in seconds, between calling\r\n * play method on an audio tag and when it actually starts playing.\r\n * It is used to achieve more accurate delayed sound playback.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since audio play delay varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#audioPlayDelay\r\n * @type {number}\r\n * @default 0.1\r\n * @since 3.0.0\r\n */\r\n this.audioPlayDelay = 0.1;\r\n\r\n /**\r\n * A value by which we should offset the loop end marker of the\r\n * looping sound to compensate for lag, caused by changing audio\r\n * tag playback position, in order to achieve gapless looping.\r\n *\r\n * You might need to tweak this value to get the desired results\r\n * since loop lag varies depending on the browser/platform.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#loopEndOffset\r\n * @type {number}\r\n * @default 0.05\r\n * @since 3.0.0\r\n */\r\n this.loopEndOffset = 0.05;\r\n\r\n /**\r\n * An array for keeping track of all the sounds\r\n * that were paused when game lost focus.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#onBlurPausedSounds\r\n * @type {Phaser.Sound.HTML5AudioSound[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.onBlurPausedSounds = [];\r\n\r\n this.locked = 'ontouchstart' in window;\r\n\r\n /**\r\n * A queue of all actions performed on sound objects while audio was locked.\r\n * Once the audio gets unlocked, after an explicit user interaction,\r\n * all actions will be performed in chronological order.\r\n * Array of object types: { sound: Phaser.Sound.HTML5AudioSound, name: string, value?: * }\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#lockedActionsQueue\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.lockedActionsQueue = this.locked ? [] : null;\r\n\r\n /**\r\n * Property that actually holds the value of global mute\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_mute\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this._mute = false;\r\n\r\n /**\r\n * Property that actually holds the value of global volume\r\n * for HTML5 Audio sound manager implementation.\r\n *\r\n * @name Phaser.Sound.HTML5AudioSoundManager#_volume\r\n * @type {boolean}\r\n * @private\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this._volume = 1;\r\n\r\n BaseSoundManager.call(this, game);\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new HTML5AudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Unlocks HTML5 Audio loading and playback on mobile\r\n * devices on the initial explicit user interaction.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n this.locked = false;\r\n\r\n var _this = this;\r\n\r\n this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n if (tags[i].dataset.locked === 'true')\r\n {\r\n _this.locked = true;\r\n\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (!this.locked)\r\n {\r\n return;\r\n }\r\n\r\n var moved = false;\r\n\r\n var detectMove = function ()\r\n {\r\n moved = true;\r\n };\r\n\r\n var unlock = function ()\r\n {\r\n if (moved)\r\n {\r\n moved = false;\r\n return;\r\n }\r\n\r\n document.body.removeEventListener('touchmove', detectMove);\r\n document.body.removeEventListener('touchend', unlock);\r\n\r\n var lockedTags = [];\r\n\r\n _this.game.cache.audio.entries.each(function (key, tags)\r\n {\r\n for (var i = 0; i < tags.length; i++)\r\n {\r\n var tag = tags[i];\r\n\r\n if (tag.dataset.locked === 'true')\r\n {\r\n lockedTags.push(tag);\r\n }\r\n }\r\n\r\n return true;\r\n });\r\n\r\n if (lockedTags.length === 0)\r\n {\r\n return;\r\n }\r\n\r\n var lastTag = lockedTags[lockedTags.length - 1];\r\n\r\n lastTag.oncanplaythrough = function ()\r\n {\r\n lastTag.oncanplaythrough = null;\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.dataset.locked = 'false';\r\n });\r\n\r\n _this.unlocked = true;\r\n };\r\n\r\n lockedTags.forEach(function (tag)\r\n {\r\n tag.load();\r\n });\r\n };\r\n\r\n this.once(Events.UNLOCKED, function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.currentMarker === null && sound.duration === 0)\r\n {\r\n sound.duration = sound.tags[0].duration;\r\n }\r\n\r\n sound.totalDuration = sound.tags[0].duration;\r\n });\r\n\r\n while (this.lockedActionsQueue.length)\r\n {\r\n var lockedAction = this.lockedActionsQueue.shift();\r\n\r\n if (lockedAction.sound[lockedAction.prop].apply)\r\n {\r\n lockedAction.sound[lockedAction.prop].apply(lockedAction.sound, lockedAction.value || []);\r\n }\r\n else\r\n {\r\n lockedAction.sound[lockedAction.prop] = lockedAction.value;\r\n }\r\n }\r\n\r\n }, this);\r\n\r\n document.body.addEventListener('touchmove', detectMove, false);\r\n document.body.addEventListener('touchend', unlock, false);\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n this.forEachActiveSound(function (sound)\r\n {\r\n if (sound.isPlaying)\r\n {\r\n this.onBlurPausedSounds.push(sound);\r\n sound.onBlur();\r\n }\r\n });\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.HTML5AudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n this.onBlurPausedSounds.forEach(function (sound)\r\n {\r\n sound.onFocus();\r\n });\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all HTML5 Audio related stuff.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n\r\n this.onBlurPausedSounds.length = 0;\r\n this.onBlurPausedSounds = null;\r\n },\r\n\r\n /**\r\n * Method used internally by Phaser.Sound.HTML5AudioSound class methods and property setters\r\n * to check if sound manager is locked and then either perform action immediately or queue it\r\n * to be performed once the sound manager gets unlocked.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#isLocked\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.HTML5AudioSound} sound - Sound object on which to perform queued action.\r\n * @param {string} prop - Name of the method to be called or property to be assigned a value to.\r\n * @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.\r\n *\r\n * @return {boolean} Whether the sound manager is locked.\r\n */\r\n isLocked: function (sound, prop, value)\r\n {\r\n if (sound.tags[0].dataset.locked === 'true')\r\n {\r\n this.lockedActionsQueue.push({\r\n sound: sound,\r\n prop: prop,\r\n value: value\r\n });\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return this._mute;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._mute = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateMute();\r\n });\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.HTML5AudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.HTML5AudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.HTML5AudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this._volume;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this._volume = value;\r\n\r\n this.forEachActiveSound(function (sound)\r\n {\r\n sound.updateVolume();\r\n });\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = HTML5AudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js?")},"./node_modules/phaser/src/sound/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Sound\r\n */\r\n\r\nmodule.exports = {\r\n\r\n SoundManagerCreator: __webpack_require__(/*! ./SoundManagerCreator */ "./node_modules/phaser/src/sound/SoundManagerCreator.js"),\r\n\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/sound/events/index.js"),\r\n\r\n BaseSound: __webpack_require__(/*! ./BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js"),\r\n BaseSoundManager: __webpack_require__(/*! ./BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js"),\r\n\r\n WebAudioSound: __webpack_require__(/*! ./webaudio/WebAudioSound */ "./node_modules/phaser/src/sound/webaudio/WebAudioSound.js"),\r\n WebAudioSoundManager: __webpack_require__(/*! ./webaudio/WebAudioSoundManager */ "./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js"),\r\n\r\n HTML5AudioSound: __webpack_require__(/*! ./html5/HTML5AudioSound */ "./node_modules/phaser/src/sound/html5/HTML5AudioSound.js"),\r\n HTML5AudioSoundManager: __webpack_require__(/*! ./html5/HTML5AudioSoundManager */ "./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js"),\r\n\r\n NoAudioSound: __webpack_require__(/*! ./noaudio/NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js"),\r\n NoAudioSoundManager: __webpack_require__(/*! ./noaudio/NoAudioSoundManager */ "./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/index.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSound.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ "./node_modules/phaser/src/sound/BaseSound.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar Extend = __webpack_require__(/*! ../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.NoAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar NoAudioSound = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSound (manager, key, config)\r\n {\r\n if (config === void 0) { config = {}; }\r\n\r\n EventEmitter.call(this);\r\n\r\n this.manager = manager;\r\n this.key = key;\r\n this.isPlaying = false;\r\n this.isPaused = false;\r\n this.totalRate = 1;\r\n this.duration = 0;\r\n this.totalDuration = 0;\r\n\r\n this.config = Extend({\r\n mute: false,\r\n volume: 1,\r\n rate: 1,\r\n detune: 0,\r\n seek: 0,\r\n loop: false,\r\n delay: 0\r\n }, config);\r\n\r\n this.currentConfig = this.config;\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.seek = 0;\r\n this.loop = false;\r\n this.markers = {};\r\n this.currentMarker = null;\r\n this.pendingRemove = false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n addMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n updateMarker: function (marker)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n removeMarker: function (markerName)\r\n {\r\n return null;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (markerName, config)\r\n {\r\n return false;\r\n },\r\n\r\n pause: function ()\r\n {\r\n return false;\r\n },\r\n\r\n resume: function ()\r\n {\r\n return false;\r\n },\r\n\r\n stop: function ()\r\n {\r\n return false;\r\n },\r\n\r\n destroy: function ()\r\n {\r\n this.manager.remove(this);\r\n\r\n BaseSound.prototype.destroy.call(this);\r\n }\r\n});\r\n\r\nmodule.exports = NoAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSound.js?')},"./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ "./node_modules/phaser/src/sound/BaseSoundManager.js");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ "./node_modules/eventemitter3/index.js");\r\nvar NoAudioSound = __webpack_require__(/*! ./NoAudioSound */ "./node_modules/phaser/src/sound/noaudio/NoAudioSound.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\n/**\r\n * @classdesc\r\n * No audio implementation of the sound manager. It is used if audio has been\r\n * disabled in the game config or the device doesn\'t support any audio.\r\n *\r\n * It represents a graceful degradation of sound manager logic that provides\r\n * minimal functionality and prevents Phaser projects that use audio from\r\n * breaking on devices that don\'t support any audio playback technologies.\r\n *\r\n * @class NoAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar NoAudioSoundManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function NoAudioSoundManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n this.game = game;\r\n this.sounds = [];\r\n this.mute = false;\r\n this.volume = 1;\r\n this.rate = 1;\r\n this.detune = 0;\r\n this.pauseOnBlur = true;\r\n this.locked = false;\r\n },\r\n\r\n add: function (key, config)\r\n {\r\n var sound = new NoAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n addAudioSprite: function (key, config)\r\n {\r\n var sound = this.add(key, config);\r\n\r\n sound.spritemap = {};\r\n\r\n return sound;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n play: function (key, extra)\r\n {\r\n return false;\r\n },\r\n\r\n // eslint-disable-next-line no-unused-vars\r\n playAudioSprite: function (key, spriteName, config)\r\n {\r\n return false;\r\n },\r\n\r\n remove: function (sound)\r\n {\r\n return BaseSoundManager.prototype.remove.call(this, sound);\r\n },\r\n\r\n removeByKey: function (key)\r\n {\r\n return BaseSoundManager.prototype.removeByKey.call(this, key);\r\n },\r\n\r\n pauseAll: NOOP,\r\n resumeAll: NOOP,\r\n stopAll: NOOP,\r\n update: NOOP,\r\n setRate: NOOP,\r\n setDetune: NOOP,\r\n setMute: NOOP,\r\n setVolume: NOOP,\r\n\r\n forEachActiveSound: function (callbackfn, scope)\r\n {\r\n BaseSoundManager.prototype.forEachActiveSound.call(this, callbackfn, scope);\r\n },\r\n\r\n destroy: function ()\r\n {\r\n BaseSoundManager.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = NoAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js?')},"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar BaseSound = __webpack_require__(/*! ../BaseSound */ \"./node_modules/phaser/src/sound/BaseSound.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound.\r\n *\r\n * @class WebAudioSound\r\n * @extends Phaser.Sound.BaseSound\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Sound.WebAudioSoundManager} manager - Reference to the current sound manager instance.\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config={}] - An optional config object containing default sound settings.\r\n */\r\nvar WebAudioSound = new Class({\r\n\r\n Extends: BaseSound,\r\n\r\n initialize:\r\n\r\n function WebAudioSound (manager, key, config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * Audio buffer containing decoded data of the audio asset to be played.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#audioBuffer\r\n * @type {AudioBuffer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.audioBuffer = manager.game.cache.audio.get(key);\r\n\r\n if (!this.audioBuffer)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.warn('Audio cache entry missing: ' + key);\r\n return;\r\n }\r\n\r\n /**\r\n * A reference to an audio source node used for playing back audio from\r\n * audio data stored in Phaser.Sound.WebAudioSound#audioBuffer.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#source\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.source = null;\r\n\r\n /**\r\n * A reference to a second audio source used for gapless looped playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopSource\r\n * @type {AudioBufferSourceNode}\r\n * @private\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.loopSource = null;\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#muteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.muteNode = manager.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling this sound's volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#volumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.volumeNode = manager.context.createGain();\r\n\r\n /**\r\n * The time at which the sound should have started playback from the beginning.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#playTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.playTime = 0;\r\n\r\n /**\r\n * The time at which the sound source should have actually started playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#startTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startTime = 0;\r\n\r\n /**\r\n * The time at which the sound loop source should actually start playback.\r\n * Based on BaseAudioContext.currentTime value.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#loopTime\r\n * @type {number}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopTime = 0;\r\n\r\n /**\r\n * An array where we keep track of all rate updates during playback.\r\n * Array of object types: { time: number, rate: number }\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rateUpdates\r\n * @type {array}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.rateUpdates = [];\r\n\r\n /**\r\n * Used for keeping track when sound source playback has ended\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasEnded\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasEnded = false;\r\n\r\n /**\r\n * Used for keeping track when sound source has looped\r\n * so its state can be updated accordingly.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#hasLooped\r\n * @type {boolean}\r\n * @private\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasLooped = false;\r\n\r\n this.muteNode.connect(this.volumeNode);\r\n\r\n this.volumeNode.connect(manager.destination);\r\n\r\n this.duration = this.audioBuffer.duration;\r\n\r\n this.totalDuration = this.audioBuffer.duration;\r\n\r\n BaseSound.call(this, manager, key, config);\r\n },\r\n\r\n /**\r\n * Play this sound, or a marked section of it.\r\n * \r\n * It always plays the sound from the start. If you want to start playback from a specific time\r\n * you can set 'seek' setting of the config object, provided to this call, to that value.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#play\r\n * @fires Phaser.Sound.Events#PLAY\r\n * @since 3.0.0\r\n *\r\n * @param {string} [markerName=''] - If you want to play a marker then provide the marker name here, otherwise omit it to play the full sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound.\r\n *\r\n * @return {boolean} Whether the sound started playing successfully.\r\n */\r\n play: function (markerName, config)\r\n {\r\n if (!BaseSound.prototype.play.call(this, markerName, config))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.PLAY, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Pauses the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#pause\r\n * @fires Phaser.Sound.Events#PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was paused successfully.\r\n */\r\n pause: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.pause.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = true \\/\\/\\/\r\n this.currentConfig.seek = this.getCurrentTime(); // Equivalent to setting paused time\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.PAUSE, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Resumes the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#resume\r\n * @fires Phaser.Sound.Events#RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was resumed successfully.\r\n */\r\n resume: function ()\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return false;\r\n }\r\n\r\n if (!BaseSound.prototype.resume.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = true, isPaused = false \\/\\/\\/\r\n this.createAndStartBufferSource();\r\n\r\n this.emit(Events.RESUME, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Stop playing this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stop\r\n * @fires Phaser.Sound.Events#STOP\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Whether the sound was stopped successfully.\r\n */\r\n stop: function ()\r\n {\r\n if (!BaseSound.prototype.stop.call(this))\r\n {\r\n return false;\r\n }\r\n\r\n // \\/\\/\\/ isPlaying = false, isPaused = false \\/\\/\\/\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.STOP, this);\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartBufferSource: function ()\r\n {\r\n var seek = this.currentConfig.seek;\r\n var delay = this.currentConfig.delay;\r\n var when = this.manager.context.currentTime + delay;\r\n var offset = (this.currentMarker ? this.currentMarker.start : 0) + seek;\r\n var duration = this.duration - seek;\r\n\r\n this.playTime = when - seek;\r\n this.startTime = when;\r\n this.source = this.createBufferSource();\r\n\r\n this.applyConfig();\r\n\r\n this.source.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n\r\n this.resetConfig();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createAndStartLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n createAndStartLoopBufferSource: function ()\r\n {\r\n var when = this.getLoopTime();\r\n var offset = this.currentMarker ? this.currentMarker.start : 0;\r\n var duration = this.duration;\r\n\r\n this.loopTime = when;\r\n this.loopSource = this.createBufferSource();\r\n this.loopSource.playbackRate.setValueAtTime(this.totalRate, 0);\r\n this.loopSource.start(Math.max(0, when), Math.max(0, offset), Math.max(0, duration));\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#createBufferSource\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {AudioBufferSourceNode}\r\n */\r\n createBufferSource: function ()\r\n {\r\n var _this = this;\r\n var source = this.manager.context.createBufferSource();\r\n\r\n source.buffer = this.audioBuffer;\r\n\r\n source.connect(this.muteNode);\r\n\r\n source.onended = function (ev)\r\n {\r\n if (ev.target === _this.source)\r\n {\r\n // sound ended\r\n if (_this.currentConfig.loop)\r\n {\r\n _this.hasLooped = true;\r\n }\r\n else\r\n {\r\n _this.hasEnded = true;\r\n }\r\n }\r\n\r\n // else was stopped\r\n };\r\n\r\n return source;\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveBufferSource: function ()\r\n {\r\n if (this.source)\r\n {\r\n this.source.stop();\r\n this.source.disconnect();\r\n this.source = null;\r\n }\r\n\r\n this.playTime = 0;\r\n this.startTime = 0;\r\n\r\n this.stopAndRemoveLoopBufferSource();\r\n },\r\n\r\n /**\r\n * Used internally.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#stopAndRemoveLoopBufferSource\r\n * @private\r\n * @since 3.0.0\r\n */\r\n stopAndRemoveLoopBufferSource: function ()\r\n {\r\n if (this.loopSource)\r\n {\r\n this.loopSource.stop();\r\n this.loopSource.disconnect();\r\n this.loopSource = null;\r\n }\r\n\r\n this.loopTime = 0;\r\n },\r\n\r\n /**\r\n * Method used internally for applying config values to some of the sound properties.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#applyConfig\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n applyConfig: function ()\r\n {\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: 1\r\n });\r\n\r\n BaseSound.prototype.applyConfig.call(this);\r\n },\r\n\r\n /**\r\n * Update method called automatically by sound manager on every game step.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#update\r\n * @fires Phaser.Sound.Events#COMPLETE\r\n * @fires Phaser.Sound.Events#LOOPED\r\n * @protected\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.\r\n * @param {number} delta - The delta time elapsed since the last frame.\r\n */\r\n // eslint-disable-next-line no-unused-vars\r\n update: function (time, delta)\r\n {\r\n if (this.hasEnded)\r\n {\r\n this.hasEnded = false;\r\n\r\n BaseSound.prototype.stop.call(this);\r\n\r\n this.stopAndRemoveBufferSource();\r\n\r\n this.emit(Events.COMPLETE, this);\r\n }\r\n else if (this.hasLooped)\r\n {\r\n this.hasLooped = false;\r\n this.source = this.loopSource;\r\n this.loopSource = null;\r\n this.playTime = this.startTime = this.loopTime;\r\n this.rateUpdates.length = 0;\r\n\r\n this.rateUpdates.push({\r\n time: 0,\r\n rate: this.totalRate\r\n });\r\n\r\n this.createAndStartLoopBufferSource();\r\n\r\n this.emit(Events.LOOPED, this);\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSound#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n BaseSound.prototype.destroy.call(this);\r\n\r\n this.audioBuffer = null;\r\n this.stopAndRemoveBufferSource();\r\n this.muteNode.disconnect();\r\n this.muteNode = null;\r\n this.volumeNode.disconnect();\r\n this.volumeNode = null;\r\n this.rateUpdates.length = 0;\r\n this.rateUpdates = null;\r\n },\r\n\r\n /**\r\n * Method used internally to calculate total playback rate of the sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#calculateRate\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n calculateRate: function ()\r\n {\r\n BaseSound.prototype.calculateRate.call(this);\r\n\r\n var now = this.manager.context.currentTime;\r\n\r\n if (this.source && typeof this.totalRate === 'number')\r\n {\r\n this.source.playbackRate.setValueAtTime(this.totalRate, now);\r\n }\r\n\r\n if (this.isPlaying)\r\n {\r\n this.rateUpdates.push({\r\n time: Math.max(this.startTime, now) - this.playTime,\r\n rate: this.totalRate\r\n });\r\n\r\n if (this.loopSource)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for calculating current playback time of a playing sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getCurrentTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getCurrentTime: function ()\r\n {\r\n var currentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length; i++)\r\n {\r\n var nextTime = 0;\r\n\r\n if (i < this.rateUpdates.length - 1)\r\n {\r\n nextTime = this.rateUpdates[i + 1].time;\r\n }\r\n else\r\n {\r\n nextTime = this.manager.context.currentTime - this.playTime;\r\n }\r\n\r\n currentTime += (nextTime - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n return currentTime;\r\n },\r\n\r\n /**\r\n * Method used internally for calculating the time\r\n * at witch the loop source should start playing.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#getLoopTime\r\n * @private\r\n * @since 3.0.0\r\n */\r\n getLoopTime: function ()\r\n {\r\n var lastRateUpdateCurrentTime = 0;\r\n\r\n for (var i = 0; i < this.rateUpdates.length - 1; i++)\r\n {\r\n lastRateUpdateCurrentTime += (this.rateUpdates[i + 1].time - this.rateUpdates[i].time) * this.rateUpdates[i].rate;\r\n }\r\n\r\n var lastRateUpdate = this.rateUpdates[this.rateUpdates.length - 1];\r\n\r\n return this.playTime + lastRateUpdate.time + (this.duration - lastRateUpdateCurrentTime) / lastRateUpdate.rate;\r\n },\r\n\r\n /**\r\n * Rate at which this Sound will be played.\r\n * Value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @name Phaser.Sound.WebAudioSound#rate\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.0.0\r\n */\r\n rate: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.rate;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.rate = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.RATE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the playback rate of this Sound.\r\n * \r\n * For example, a value of 1.0 plays the audio at full speed, 0.5 plays the audio at half speed\r\n * and 2.0 doubles the audios playback speed.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setRate\r\n * @fires Phaser.Sound.Events#RATE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The playback rate at of this Sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setRate: function (value)\r\n {\r\n this.rate = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @name Phaser.Sound.WebAudioSound#detune\r\n * @type {number}\r\n * @default 0\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.0.0\r\n */\r\n detune: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.detune;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.detune = value;\r\n\r\n this.calculateRate();\r\n\r\n this.emit(Events.DETUNE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the detune value of this Sound, given in [cents](https://en.wikipedia.org/wiki/Cent_%28music%29).\r\n * The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setDetune\r\n * @fires Phaser.Sound.Events#DETUNE\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The range of the value is -1200 to 1200, but we recommend setting it to [50](https://en.wikipedia.org/wiki/50_Cent).\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound.\r\n */\r\n setDetune: function (value)\r\n {\r\n this.detune = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Boolean indicating whether the sound is muted or not.\r\n * Gets or sets the muted state of this sound.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#mute\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.muteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.mute = value;\r\n this.muteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the muted state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setMute\r\n * @fires Phaser.Sound.Events#MUTE\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to mute this sound, `false` to unmute it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets or sets the volume of this sound, a value between 0 (silence) and 1 (full volume).\r\n * \r\n * @name Phaser.Sound.WebAudioSound#volume\r\n * @type {number}\r\n * @default 1\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.volumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.volume = value;\r\n this.volumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.VOLUME, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setVolume\r\n * @fires Phaser.Sound.Events#VOLUME\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The volume of the sound.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Property representing the position of playback for this sound, in seconds.\r\n * Setting it to a specific value moves current playback to that position.\r\n * The value given is clamped to the range 0 to current marker duration.\r\n * Setting seek of a stopped sound has no effect.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#seek\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.0.0\r\n */\r\n seek: {\r\n\r\n get: function ()\r\n {\r\n if (this.isPlaying)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return this.startTime - this.playTime;\r\n }\r\n\r\n return this.getCurrentTime();\r\n }\r\n else if (this.isPaused)\r\n {\r\n return this.currentConfig.seek;\r\n }\r\n else\r\n {\r\n return 0;\r\n }\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (this.manager.context.currentTime < this.startTime)\r\n {\r\n return;\r\n }\r\n\r\n if (this.isPlaying || this.isPaused)\r\n {\r\n value = Math.min(Math.max(0, value), this.duration);\r\n\r\n this.currentConfig.seek = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveBufferSource();\r\n this.createAndStartBufferSource();\r\n }\r\n\r\n this.emit(Events.SEEK, this, value);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in this sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setSeek\r\n * @fires Phaser.Sound.Events#SEEK\r\n * @since 3.4.0\r\n *\r\n * @param {number} value - The point in the sound to seek to.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setSeek: function (value)\r\n {\r\n this.seek = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flag indicating whether or not the sound or current sound marker will loop.\r\n * \r\n * @name Phaser.Sound.WebAudioSound#loop\r\n * @type {boolean}\r\n * @default false\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.0.0\r\n */\r\n loop: {\r\n\r\n get: function ()\r\n {\r\n return this.currentConfig.loop;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.currentConfig.loop = value;\r\n\r\n if (this.isPlaying)\r\n {\r\n this.stopAndRemoveLoopBufferSource();\r\n\r\n if (value)\r\n {\r\n this.createAndStartLoopBufferSource();\r\n }\r\n }\r\n\r\n this.emit(Events.LOOP, this, value);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the loop state of this Sound.\r\n *\r\n * @method Phaser.Sound.WebAudioSound#setLoop\r\n * @fires Phaser.Sound.Events#LOOP\r\n * @since 3.4.0\r\n *\r\n * @param {boolean} value - `true` to loop this sound, `false` to not loop it.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} This Sound instance.\r\n */\r\n setLoop: function (value)\r\n {\r\n this.loop = value;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSound;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSound.js?")},"./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @author Pavle Goloskokovic (http://prunegames.com)\r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64ToArrayBuffer = __webpack_require__(/*! ../../utils/base64/Base64ToArrayBuffer */ \"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js\");\r\nvar BaseSoundManager = __webpack_require__(/*! ../BaseSoundManager */ \"./node_modules/phaser/src/sound/BaseSoundManager.js\");\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/sound/events/index.js\");\r\nvar WebAudioSound = __webpack_require__(/*! ./WebAudioSound */ \"./node_modules/phaser/src/sound/webaudio/WebAudioSound.js\");\r\n\r\n/**\r\n * @classdesc\r\n * Web Audio API implementation of the sound manager.\r\n *\r\n * @class WebAudioSoundManager\r\n * @extends Phaser.Sound.BaseSoundManager\r\n * @memberof Phaser.Sound\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n */\r\nvar WebAudioSoundManager = new Class({\r\n\r\n Extends: BaseSoundManager,\r\n\r\n initialize:\r\n\r\n function WebAudioSoundManager (game)\r\n {\r\n /**\r\n * The AudioContext being used for playback.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#context\r\n * @type {AudioContext}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.context = this.createAudioContext(game);\r\n\r\n /**\r\n * Gain node responsible for controlling global muting.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterMuteNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterMuteNode = this.context.createGain();\r\n\r\n /**\r\n * Gain node responsible for controlling global volume.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#masterVolumeNode\r\n * @type {GainNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.masterVolumeNode = this.context.createGain();\r\n\r\n this.masterMuteNode.connect(this.masterVolumeNode);\r\n\r\n this.masterVolumeNode.connect(this.context.destination);\r\n\r\n /**\r\n * Destination node for connecting individual sounds to.\r\n *\r\n * @name Phaser.Sound.WebAudioSoundManager#destination\r\n * @type {AudioNode}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.destination = this.masterMuteNode;\r\n\r\n this.locked = this.context.state === 'suspended' && ('ontouchstart' in window || 'onclick' in window);\r\n\r\n BaseSoundManager.call(this, game);\r\n\r\n if (this.locked)\r\n {\r\n this.unlock();\r\n }\r\n },\r\n\r\n /**\r\n * Method responsible for instantiating and returning AudioContext instance.\r\n * If an instance of an AudioContext class was provided through the game config,\r\n * that instance will be returned instead. This can come in handy if you are reloading\r\n * a Phaser game on a page that never properly refreshes (such as in an SPA project)\r\n * and you want to reuse already instantiated AudioContext.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#createAudioContext\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - Reference to the current game instance.\r\n *\r\n * @return {AudioContext} The AudioContext instance to be used for playback.\r\n */\r\n createAudioContext: function (game)\r\n {\r\n var audioConfig = game.config.audio;\r\n\r\n if (audioConfig && audioConfig.context)\r\n {\r\n audioConfig.context.resume();\r\n\r\n return audioConfig.context;\r\n }\r\n\r\n return new AudioContext();\r\n },\r\n\r\n /**\r\n * Adds a new sound into the sound manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - Asset key for the sound.\r\n * @param {Phaser.Types.Sound.SoundConfig} [config] - An optional config object containing default sound settings.\r\n *\r\n * @return {Phaser.Sound.WebAudioSound} The new sound instance.\r\n */\r\n add: function (key, config)\r\n {\r\n var sound = new WebAudioSound(this, key, config);\r\n\r\n this.sounds.push(sound);\r\n\r\n return sound;\r\n },\r\n\r\n /**\r\n * Decode audio data into a format ready for playback via Web Audio.\r\n * \r\n * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n * \r\n * The `audioKey` is the key that will be used to save the decoded audio to the audio cache.\r\n * \r\n * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig`\r\n * objects as the first and only argument.\r\n * \r\n * Decoding is an async process, so be sure to listen for the events to know when decoding has completed.\r\n * \r\n * Once the audio has decoded it can be added to the Sound Manager or played via its key.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#decodeAudio\r\n * @fires Phaser.Sound.Events#DECODED\r\n * @fires Phaser.Sound.Events#DECODED_ALL\r\n * @since 3.18.0\r\n *\r\n * @param {(Phaser.Types.Sound.DecodeAudioConfig[]|string)} [audioKey] - The string-based key to be used to reference the decoded audio in the audio cache, or an array of audio config objects.\r\n * @param {(ArrayBuffer|string)} [audioData] - The audio data, either a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance.\r\n */\r\n decodeAudio: function (audioKey, audioData)\r\n {\r\n var audioFiles;\r\n\r\n if (!Array.isArray(audioKey))\r\n {\r\n audioFiles = [ { key: audioKey, data: audioData } ];\r\n }\r\n else\r\n {\r\n audioFiles = audioKey;\r\n }\r\n\r\n var cache = this.game.cache.audio;\r\n var remaining = audioFiles.length;\r\n\r\n for (var i = 0; i < audioFiles.length; i++)\r\n {\r\n var entry = audioFiles[i];\r\n\r\n var key = entry.key;\r\n var data = entry.data;\r\n\r\n if (typeof data === 'string')\r\n {\r\n data = Base64ToArrayBuffer(data);\r\n }\r\n\r\n var success = function (key, audioBuffer)\r\n {\r\n cache.add(key, audioBuffer);\r\n \r\n this.emit(Events.DECODED, key);\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n \r\n var failure = function (key, error)\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Error decoding audio: ' + key + ' - ', error ? error.message : '');\r\n\r\n remaining--;\r\n\r\n if (remaining === 0)\r\n {\r\n this.emit(Events.DECODED_ALL);\r\n }\r\n }.bind(this, key);\r\n\r\n this.context.decodeAudioData(data, success, failure);\r\n }\r\n },\r\n\r\n /**\r\n * Unlocks Web Audio API on the initial input event.\r\n *\r\n * Read more about how this issue is handled here in [this article](https://medium.com/@pgoloskokovic/unlocking-web-audio-the-smarter-way-8858218c0e09).\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#unlock\r\n * @since 3.0.0\r\n */\r\n unlock: function ()\r\n {\r\n var _this = this;\r\n\r\n var unlockHandler = function unlockHandler ()\r\n {\r\n if (_this.context)\r\n {\r\n _this.context.resume().then(function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n \r\n _this.unlocked = true;\r\n }, function ()\r\n {\r\n document.body.removeEventListener('touchstart', unlockHandler);\r\n document.body.removeEventListener('touchend', unlockHandler);\r\n document.body.removeEventListener('click', unlockHandler);\r\n });\r\n }\r\n };\r\n\r\n if (document.body)\r\n {\r\n document.body.addEventListener('touchstart', unlockHandler, false);\r\n document.body.addEventListener('touchend', unlockHandler, false);\r\n document.body.addEventListener('click', unlockHandler, false);\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for pausing sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onBlur\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onBlur: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.suspend();\r\n }\r\n },\r\n\r\n /**\r\n * Method used internally for resuming sound manager if\r\n * Phaser.Sound.WebAudioSoundManager#pauseOnBlur is set to true.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#onFocus\r\n * @protected\r\n * @since 3.0.0\r\n */\r\n onFocus: function ()\r\n {\r\n if (!this.locked)\r\n {\r\n this.context.resume();\r\n }\r\n },\r\n\r\n /**\r\n * Calls Phaser.Sound.BaseSoundManager#destroy method\r\n * and cleans up all Web Audio API related stuff.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.destination = null;\r\n this.masterVolumeNode.disconnect();\r\n this.masterVolumeNode = null;\r\n this.masterMuteNode.disconnect();\r\n this.masterMuteNode = null;\r\n\r\n if (this.game.config.audio && this.game.config.audio.context)\r\n {\r\n this.context.suspend();\r\n }\r\n else\r\n {\r\n var _this = this;\r\n\r\n this.context.close().then(function ()\r\n {\r\n\r\n _this.context = null;\r\n\r\n });\r\n }\r\n\r\n BaseSoundManager.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the muted state of all this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setMute\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.3.0\r\n *\r\n * @param {boolean} value - `true` to mute all sounds, `false` to unmute them.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setMute: function (value)\r\n {\r\n this.mute = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#mute\r\n * @type {boolean}\r\n * @fires Phaser.Sound.Events#GLOBAL_MUTE\r\n * @since 3.0.0\r\n */\r\n mute: {\r\n\r\n get: function ()\r\n {\r\n return (this.masterMuteNode.gain.value === 0);\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterMuteNode.gain.setValueAtTime(value ? 0 : 1, 0);\r\n\r\n this.emit(Events.GLOBAL_MUTE, this, value);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Sets the volume of this Sound Manager.\r\n *\r\n * @method Phaser.Sound.WebAudioSoundManager#setVolume\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.3.0\r\n *\r\n * @param {number} value - The global volume of this Sound Manager.\r\n *\r\n * @return {Phaser.Sound.WebAudioSoundManager} This Sound Manager.\r\n */\r\n setVolume: function (value)\r\n {\r\n this.volume = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * @name Phaser.Sound.WebAudioSoundManager#volume\r\n * @type {number}\r\n * @fires Phaser.Sound.Events#GLOBAL_VOLUME\r\n * @since 3.0.0\r\n */\r\n volume: {\r\n\r\n get: function ()\r\n {\r\n return this.masterVolumeNode.gain.value;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.masterVolumeNode.gain.setValueAtTime(value, 0);\r\n\r\n this.emit(Events.GLOBAL_VOLUME, this, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = WebAudioSoundManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js?")},"./node_modules/phaser/src/structs/List.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayUtils = __webpack_require__(/*! ../utils/array */ \"./node_modules/phaser/src/utils/array/index.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NOOP = __webpack_require__(/*! ../utils/NOOP */ \"./node_modules/phaser/src/utils/NOOP.js\");\r\nvar StableSort = __webpack_require__(/*! ../utils/array/StableSort */ \"./node_modules/phaser/src/utils/array/StableSort.js\");\r\n\r\n/**\r\n * @callback EachListCallback\r\n *\r\n * @param {I} item - The item which is currently being processed.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * List is a generic implementation of an ordered list which contains utility methods for retrieving, manipulating, and iterating items.\r\n *\r\n * @class List\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n *\r\n * @param {*} parent - The parent of this list.\r\n */\r\nvar List = new Class({\r\n\r\n initialize:\r\n\r\n function List (parent)\r\n {\r\n /**\r\n * The parent of this list.\r\n *\r\n * @name Phaser.Structs.List#parent\r\n * @type {*}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * The objects that belong to this collection.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.List#list\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.list = [];\r\n\r\n /**\r\n * The index of the current element.\r\n * \r\n * This is used internally when iterating through the list with the {@link #first}, {@link #last}, {@link #get}, and {@link #previous} properties.\r\n *\r\n * @name Phaser.Structs.List#position\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.position = 0;\r\n\r\n /**\r\n * A callback that is invoked every time a child is added to this list.\r\n *\r\n * @name Phaser.Structs.List#addCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.addCallback = NOOP;\r\n\r\n /**\r\n * A callback that is invoked every time a child is removed from this list.\r\n *\r\n * @name Phaser.Structs.List#removeCallback\r\n * @type {function}\r\n * @since 3.4.0\r\n */\r\n this.removeCallback = NOOP;\r\n\r\n /**\r\n * The property key to sort by.\r\n *\r\n * @name Phaser.Structs.List#_sortKey\r\n * @type {string}\r\n * @since 3.4.0\r\n */\r\n this._sortKey = '';\r\n },\r\n\r\n /**\r\n * Adds the given item to the end of the list. Each item must be unique.\r\n *\r\n * @method Phaser.Structs.List#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*|Array.<*>} child - The item, or array of items, to add to the list.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The list's underlying array.\r\n */\r\n add: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Add(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Add(this.list, child, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Adds an item to list, starting at a specified index. Each item must be unique within the list.\r\n *\r\n * @method Phaser.Structs.List#addAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to add to the list.\r\n * @param {integer} [index=0] - The index in the list at which the element(s) will be inserted.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.addCallback if this child is added successfully.\r\n *\r\n * @return {*} The List's underlying array.\r\n */\r\n addAt: function (child, index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.AddAt(this.list, child, index, 0, this.addCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Retrieves the item at a given position inside the List.\r\n *\r\n * @method Phaser.Structs.List#getAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The index of the item.\r\n *\r\n * @return {*} The retrieved item, or `undefined` if it's outside the List's bounds.\r\n */\r\n getAt: function (index)\r\n {\r\n return this.list[index];\r\n },\r\n\r\n /**\r\n * Locates an item within the List and returns its index.\r\n *\r\n * @method Phaser.Structs.List#getIndex\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to locate.\r\n *\r\n * @return {integer} The index of the item within the List, or -1 if it's not in the List.\r\n */\r\n getIndex: function (child)\r\n {\r\n // Return -1 if given child isn't a child of this display list\r\n return this.list.indexOf(child);\r\n },\r\n\r\n /**\r\n * Sort the contents of this List so the items are in order based on the given property.\r\n * For example, `sort('alpha')` would sort the List contents based on the value of their `alpha` property.\r\n *\r\n * @method Phaser.Structs.List#sort\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [children,$return]\r\n *\r\n * @param {string} property - The property to lexically sort by.\r\n * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n sort: function (property, handler)\r\n {\r\n if (!property)\r\n {\r\n return this;\r\n }\r\n\r\n if (handler === undefined)\r\n {\r\n handler = function (childA, childB)\r\n {\r\n return childA[property] - childB[property];\r\n };\r\n }\r\n\r\n StableSort.inplace(this.list, handler);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches for the first instance of a child with its `name`\r\n * property matching the given argument. Should more than one child have\r\n * the same name only the first is returned.\r\n *\r\n * @method Phaser.Structs.List#getByName\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} name - The name to search for.\r\n *\r\n * @return {?*} The first child with a matching name, or null if none were found.\r\n */\r\n getByName: function (name)\r\n {\r\n return ArrayUtils.GetFirst(this.list, 'name', name);\r\n },\r\n\r\n /**\r\n * Returns a random child from the group.\r\n *\r\n * @method Phaser.Structs.List#getRandom\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - Offset from the front of the group (lowest child).\r\n * @param {integer} [length=(to top)] - Restriction on the number of values you want to randomly select from.\r\n *\r\n * @return {?*} A random child of this Group.\r\n */\r\n getRandom: function (startIndex, length)\r\n {\r\n return ArrayUtils.GetRandom(this.list, startIndex, length);\r\n },\r\n\r\n /**\r\n * Returns the first element in a given part of the List which matches a specific criterion.\r\n *\r\n * @method Phaser.Structs.List#getFirst\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T | null} - [$return]\r\n *\r\n * @param {string} property - The name of the property to test or a falsey value to have no criterion.\r\n * @param {*} value - The value to test the `property` against, or `undefined` to allow any value and only check for existence.\r\n * @param {number} [startIndex=0] - The position in the List to start the search at.\r\n * @param {number} [endIndex] - The position in the List to optionally stop the search at. It won't be checked.\r\n *\r\n * @return {?*} The first item which matches the given criterion, or `null` if no such item exists.\r\n */\r\n getFirst: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetFirst(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns all children in this List.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('parent')` would return only children that have a property called `parent`.\r\n *\r\n * You can also specify a value to compare the property to:\r\n * \r\n * `getAll('visible', true)` would return only children that have their visible property set to `true`.\r\n *\r\n * Optionally you can specify a start and end index. For example if this List had 100 children,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 children in the List.\r\n *\r\n * @method Phaser.Structs.List#getAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {string} [property] - An optional property to test against the value argument.\r\n * @param {*} [value] - If property is set then Child.property must strictly equal this value to be included in the results.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n *\r\n * @return {Array.<*>} All items of the List which match the given criterion, if any.\r\n */\r\n getAll: function (property, value, startIndex, endIndex)\r\n {\r\n return ArrayUtils.GetAll(this.list, property, value, startIndex, endIndex);\r\n },\r\n\r\n /**\r\n * Returns the total number of items in the List which have a property matching the given value.\r\n *\r\n * @method Phaser.Structs.List#count\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The property to test on each item.\r\n * @param {*} value - The value to test the property against.\r\n *\r\n * @return {integer} The total number of matching elements.\r\n */\r\n count: function (property, value)\r\n {\r\n return ArrayUtils.CountAllMatching(this.list, property, value);\r\n },\r\n\r\n /**\r\n * Swaps the positions of two items in the list.\r\n *\r\n * @method Phaser.Structs.List#swap\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child1,child2]\r\n *\r\n * @param {*} child1 - The first item to swap.\r\n * @param {*} child2 - The second item to swap.\r\n */\r\n swap: function (child1, child2)\r\n {\r\n ArrayUtils.Swap(this.list, child1, child2);\r\n },\r\n\r\n /**\r\n * Moves an item in the List to a new position.\r\n *\r\n * @method Phaser.Structs.List#moveTo\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move.\r\n * @param {integer} index - Moves an item in the List to a new position.\r\n *\r\n * @return {*} The item that was moved.\r\n */\r\n moveTo: function (child, index)\r\n {\r\n return ArrayUtils.MoveTo(this.list, child, index);\r\n },\r\n\r\n /**\r\n * Removes one or many items from the List.\r\n *\r\n * @method Phaser.Structs.List#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item, or array of items, to remove.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item, or array of items, which were successfully removed from the List.\r\n */\r\n remove: function (child, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.Remove(this.list, child);\r\n }\r\n else\r\n {\r\n return ArrayUtils.Remove(this.list, child, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the item at the given position in the List.\r\n *\r\n * @method Phaser.Structs.List#removeAt\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [$return]\r\n *\r\n * @param {integer} index - The position to remove the item from.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\n removeAt: function (index, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveAt(this.list, index, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes the items within the given range in the List.\r\n *\r\n * @method Phaser.Structs.List#removeBetween\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @param {integer} [startIndex=0] - The index to start removing from.\r\n * @param {integer} [endIndex] - The position to stop removing at. The item at this position won't be removed.\r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Array.<*>} An array of the items which were removed.\r\n */\r\n removeBetween: function (startIndex, endIndex, skipCallback)\r\n {\r\n if (skipCallback)\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex);\r\n }\r\n else\r\n {\r\n return ArrayUtils.RemoveBetween(this.list, startIndex, endIndex, this.removeCallback, this);\r\n }\r\n },\r\n\r\n /**\r\n * Removes all the items.\r\n *\r\n * @method Phaser.Structs.List#removeAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n * \r\n * @param {boolean} [skipCallback=false] - Skip calling the List.removeCallback.\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n removeAll: function (skipCallback)\r\n {\r\n var i = this.list.length;\r\n\r\n while (i--)\r\n {\r\n this.remove(this.list[i], skipCallback);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Brings the given child to the top of this List.\r\n *\r\n * @method Phaser.Structs.List#bringToTop\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to bring to the top of the List.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n bringToTop: function (child)\r\n {\r\n return ArrayUtils.BringToTop(this.list, child);\r\n },\r\n\r\n /**\r\n * Sends the given child to the bottom of this List.\r\n *\r\n * @method Phaser.Structs.List#sendToBack\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to send to the back of the list.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n sendToBack: function (child)\r\n {\r\n return ArrayUtils.SendToBack(this.list, child);\r\n },\r\n\r\n /**\r\n * Moves the given child up one place in this group unless it's already at the top.\r\n *\r\n * @method Phaser.Structs.List#moveUp\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move up.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveUp: function (child)\r\n {\r\n ArrayUtils.MoveUp(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Moves the given child down one place in this group unless it's already at the bottom.\r\n *\r\n * @method Phaser.Structs.List#moveDown\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child,$return]\r\n *\r\n * @param {*} child - The item to move down.\r\n *\r\n * @return {*} The item which was moved.\r\n */\r\n moveDown: function (child)\r\n {\r\n ArrayUtils.MoveDown(this.list, child);\r\n\r\n return child;\r\n },\r\n\r\n /**\r\n * Reverses the order of all children in this List.\r\n *\r\n * @method Phaser.Structs.List#reverse\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n reverse: function ()\r\n {\r\n this.list.reverse();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the items in the list.\r\n *\r\n * @method Phaser.Structs.List#shuffle\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.List.} - [$return]\r\n *\r\n * @return {Phaser.Structs.List} This List object.\r\n */\r\n shuffle: function ()\r\n {\r\n ArrayUtils.Shuffle(this.list);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Replaces a child of this List with the given newChild. The newChild cannot be a member of this List.\r\n *\r\n * @method Phaser.Structs.List#replace\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [oldChild,newChild,$return]\r\n *\r\n * @param {*} oldChild - The child in this List that will be replaced.\r\n * @param {*} newChild - The child to be inserted into this List.\r\n *\r\n * @return {*} Returns the oldChild that was replaced within this group.\r\n */\r\n replace: function (oldChild, newChild)\r\n {\r\n return ArrayUtils.Replace(this.list, oldChild, newChild);\r\n },\r\n\r\n /**\r\n * Checks if an item exists within the List.\r\n *\r\n * @method Phaser.Structs.List#exists\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [child]\r\n *\r\n * @param {*} child - The item to check for the existence of.\r\n *\r\n * @return {boolean} `true` if the item is found in the list, otherwise `false`.\r\n */\r\n exists: function (child)\r\n {\r\n return (this.list.indexOf(child) > -1);\r\n },\r\n\r\n /**\r\n * Sets the property `key` to the given value on all members of this List.\r\n *\r\n * @method Phaser.Structs.List#setAll\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {string} property - The name of the property to set.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - The first child index to start the search from.\r\n * @param {integer} [endIndex] - The last child index to search up until.\r\n */\r\n setAll: function (property, value, startIndex, endIndex)\r\n {\r\n ArrayUtils.SetAll(this.list, property, value, startIndex, endIndex);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all children to the given callback.\r\n *\r\n * @method Phaser.Structs.List#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachListCallback.} - [callback]\r\n *\r\n * @param {EachListCallback} callback - The function to call.\r\n * @param {*} [context] - Value to use as `this` when executing callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, context)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 2; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < this.list.length; i++)\r\n {\r\n args[0] = this.list[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n },\r\n\r\n /**\r\n * Clears the List and recreates its internal array.\r\n *\r\n * @method Phaser.Structs.List#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.list = [];\r\n },\r\n\r\n /**\r\n * Destroys this List.\r\n *\r\n * @method Phaser.Structs.List#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAll();\r\n\r\n this.parent = null;\r\n this.addCallback = null;\r\n this.removeCallback = null;\r\n },\r\n\r\n /**\r\n * The number of items inside the List.\r\n *\r\n * @name Phaser.Structs.List#length\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n length: {\r\n\r\n get: function ()\r\n {\r\n return this.list.length;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The first item in the List or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#first\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n first: {\r\n\r\n get: function ()\r\n {\r\n this.position = 0;\r\n\r\n if (this.list.length > 0)\r\n {\r\n return this.list[0];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The last item in the List, or `null` for an empty List.\r\n *\r\n * @name Phaser.Structs.List#last\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n last: {\r\n\r\n get: function ()\r\n {\r\n if (this.list.length > 0)\r\n {\r\n this.position = this.list.length - 1;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The next item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #first} or manually setting the {@link #position} to iterate the List.\r\n *\r\n * @name Phaser.Structs.List#next\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n next: {\r\n\r\n get: function ()\r\n {\r\n if (this.position < this.list.length)\r\n {\r\n this.position++;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The previous item in the List, or `null` if the entire List has been traversed.\r\n * \r\n * This property can be read successively after reading {@link #last} or manually setting the {@link #position} to iterate the List backwards.\r\n *\r\n * @name Phaser.Structs.List#previous\r\n * @genericUse {T} - [$type]\r\n * @type {*}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n previous: {\r\n\r\n get: function ()\r\n {\r\n if (this.position > 0)\r\n {\r\n this.position--;\r\n\r\n return this.list[this.position];\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = List;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/List.js?")},"./node_modules/phaser/src/structs/Map.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachMapCallback\r\n *\r\n * @param {string} key - The key of the Map entry.\r\n * @param {E} entry - The value of the Map entry.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * The keys of a Map can be arbitrary values.\r\n * \r\n * ```javascript\r\n * var map = new Map([\r\n * [ 1, 'one' ],\r\n * [ 2, 'two' ],\r\n * [ 3, 'three' ]\r\n * ]);\r\n * ```\r\n *\r\n * @class Map\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic K\r\n * @generic V\r\n * @genericUse {V[]} - [elements]\r\n *\r\n * @param {Array.<*>} elements - An optional array of key-value pairs to populate this Map with.\r\n */\r\nvar Map = new Class({\r\n\r\n initialize:\r\n\r\n function Map (elements)\r\n {\r\n /**\r\n * The entries in this Map.\r\n *\r\n * @genericUse {Object.} - [$type]\r\n *\r\n * @name Phaser.Structs.Map#entries\r\n * @type {Object.}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.entries = {};\r\n\r\n /**\r\n * The number of key / value pairs in this Map.\r\n *\r\n * @name Phaser.Structs.Map#size\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.size = 0;\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i][0], elements[i][1]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Adds an element with a specified `key` and `value` to this Map.\r\n * If the `key` already exists, the value will be replaced.\r\n *\r\n * @method Phaser.Structs.Map#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [value]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to be added to this Map.\r\n * @param {*} value - The value of the element to be added to this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n set: function (key, value)\r\n {\r\n if (!this.has(key))\r\n {\r\n this.size++;\r\n }\r\n\r\n this.entries[key] = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the value associated to the `key`, or `undefined` if there is none.\r\n *\r\n * @method Phaser.Structs.Map#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {V} - [$return]\r\n *\r\n * @param {string} key - The key of the element to return from the `Map` object.\r\n *\r\n * @return {*} The element associated with the specified key or `undefined` if the key can't be found in this Map object.\r\n */\r\n get: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n return this.entries[key];\r\n }\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all the values stored in this Map.\r\n *\r\n * @method Phaser.Structs.Map#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array of the values stored in this Map.\r\n */\r\n getArray: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns a boolean indicating whether an element with the specified key exists or not.\r\n *\r\n * @method Phaser.Structs.Map#has\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n *\r\n * @param {string} key - The key of the element to test for presence of in this Map.\r\n *\r\n * @return {boolean} Returns `true` if an element with the specified key exists in this Map, otherwise `false`.\r\n */\r\n has: function (key)\r\n {\r\n return (this.entries.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Delete the specified element from this Map.\r\n *\r\n * @method Phaser.Structs.Map#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K} - [key]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {string} key - The key of the element to delete from this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n delete: function (key)\r\n {\r\n if (this.has(key))\r\n {\r\n delete this.entries[key];\r\n this.size--;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Delete all entries from this Map.\r\n *\r\n * @method Phaser.Structs.Map#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n clear: function ()\r\n {\r\n Object.keys(this.entries).forEach(function (prop)\r\n {\r\n delete this.entries[prop];\r\n\r\n }, this);\r\n\r\n this.size = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns all entries keys in this Map.\r\n *\r\n * @method Phaser.Structs.Map#keys\r\n * @since 3.0.0\r\n *\r\n * @genericUse {K[]} - [$return]\r\n *\r\n * @return {string[]} Array containing entries' keys.\r\n */\r\n keys: function ()\r\n {\r\n return Object.keys(this.entries);\r\n },\r\n\r\n /**\r\n * Returns an `Array` of all entries.\r\n *\r\n * @method Phaser.Structs.Map#values\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V[]} - [$return]\r\n *\r\n * @return {Array.<*>} An `Array` of entries.\r\n */\r\n values: function ()\r\n {\r\n var output = [];\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n output.push(entries[key]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Map to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Map#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n var entries = this.entries;\r\n\r\n // eslint-disable-next-line no-console\r\n console.group('Map');\r\n\r\n for (var key in entries)\r\n {\r\n console.log(key, entries[key]);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes all entries in this Map to the given callback.\r\n *\r\n * @method Phaser.Structs.Map#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachMapCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Map.} - [$return]\r\n *\r\n * @param {EachMapCallback} callback - The callback which will receive the keys and entries held in this Map.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n each: function (callback)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (callback(key, entries[key]) === false)\r\n {\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if the value exists within this Map. Otherwise, returns `false`.\r\n *\r\n * @method Phaser.Structs.Map#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {V} - [value]\r\n *\r\n * @param {*} value - The value to search for.\r\n *\r\n * @return {boolean} `true` if the value is found, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n var entries = this.entries;\r\n\r\n for (var key in entries)\r\n {\r\n if (entries[key] === value)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Merges all new keys from the given Map into this one.\r\n * If it encounters a key that already exists it will be skipped unless override is set to `true`.\r\n *\r\n * @method Phaser.Structs.Map#merge\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Map.} - [map,$return]\r\n *\r\n * @param {Phaser.Structs.Map} map - The Map to merge in to this Map.\r\n * @param {boolean} [override=false] - Set to `true` to replace values in this Map with those from the source map, or `false` to skip them.\r\n *\r\n * @return {Phaser.Structs.Map} This Map object.\r\n */\r\n merge: function (map, override)\r\n {\r\n if (override === undefined) { override = false; }\r\n\r\n var local = this.entries;\r\n var source = map.entries;\r\n\r\n for (var key in source)\r\n {\r\n if (local.hasOwnProperty(key) && override)\r\n {\r\n local[key] = source[key];\r\n }\r\n else\r\n {\r\n this.set(key, source[key]);\r\n }\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Map;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Map.js?")},"./node_modules/phaser/src/structs/ProcessQueue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Process Queue maintains three internal lists.\r\n * \r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * When new items are added to a Process Queue they are put in the pending list, rather than being added\r\n * immediately the active list. Equally, items that are removed are put into the destroy list, rather than\r\n * being destroyed immediately. This allows the Process Queue to carefully process each item at a specific, fixed\r\n * time, rather than at the time of the request from the API.\r\n *\r\n * @class ProcessQueue\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n */\r\nvar ProcessQueue = new Class({\r\n\r\n initialize:\r\n\r\n function ProcessQueue ()\r\n {\r\n /**\r\n * The `pending` list is a selection of items which are due to be made 'active' in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_pending\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * The `active` list is a selection of items which are considered active and should be updated.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_active\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * The `destroy` list is a selection of items that were active and are awaiting being destroyed in the next update.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_destroy\r\n * @type {Array.<*>}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The total number of items awaiting processing.\r\n *\r\n * @name Phaser.Structs.ProcessQueue#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Adds a new item to the Process Queue.\r\n * The item is added to the pending list and made active in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#add\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to add to the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n add: function (item)\r\n {\r\n this._pending.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes an item from the Process Queue.\r\n * The item is added to the pending destroy and fully removed in the next update.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#remove\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [item]\r\n * @genericUse {Phaser.Structs.ProcessQueue.} - [$return]\r\n *\r\n * @param {*} item - The item to be removed from the queue.\r\n *\r\n * @return {Phaser.Structs.ProcessQueue} This Process Queue object.\r\n */\r\n remove: function (item)\r\n {\r\n this._destroy.push(item);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Update this queue. First it will process any items awaiting destruction, and remove them.\r\n * \r\n * Then it will check to see if there are any items pending insertion, and move them to an\r\n * active state. Finally, it will return a list of active items for further processing.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#update\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n update: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return this._active;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var i;\r\n var item;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(item);\r\n\r\n if (idx !== -1)\r\n {\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the pending addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during an update\r\n\r\n list = this._pending;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n item = list[i];\r\n\r\n this._active.push(item);\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n\r\n // The owner of this queue can now safely do whatever it needs to with the active list\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Returns the current list of active items.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#getActive\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} A list of active items.\r\n */\r\n getActive: function ()\r\n {\r\n return this._active;\r\n },\r\n\r\n /**\r\n * Immediately destroys this process queue, clearing all of its internal arrays and resetting the process totals.\r\n *\r\n * @method Phaser.Structs.ProcessQueue#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this._toProcess = 0;\r\n\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ProcessQueue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/ProcessQueue.js?")},"./node_modules/phaser/src/structs/RTree.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Vladimir Agafonkin\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar quickselect = __webpack_require__(/*! ../utils/array/QuickSelect */ \"./node_modules/phaser/src/utils/array/QuickSelect.js\");\r\n\r\n/**\r\n * @classdesc\r\n * RBush is a high-performance JavaScript library for 2D spatial indexing of points and rectangles.\r\n * It's based on an optimized R-tree data structure with bulk insertion support.\r\n *\r\n * Spatial index is a special data structure for points and rectangles that allows you to perform queries like\r\n * \"all items within this bounding box\" very efficiently (e.g. hundreds of times faster than looping over all items).\r\n *\r\n * This version of RBush uses a fixed min/max accessor structure of `[ '.left', '.top', '.right', '.bottom' ]`.\r\n * This is to avoid the eval like function creation that the original library used, which caused CSP policy violations.\r\n * \r\n * rbush is forked from https://github.com/mourner/rbush by Vladimir Agafonkin\r\n *\r\n * @class RTree\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n */\r\n\r\nfunction rbush (maxEntries)\r\n{\r\n var format = [ '.left', '.top', '.right', '.bottom' ];\r\n\r\n if (!(this instanceof rbush)) return new rbush(maxEntries, format);\r\n\r\n // max entries in a node is 9 by default; min node fill is 40% for best performance\r\n this._maxEntries = Math.max(4, maxEntries || 9);\r\n this._minEntries = Math.max(2, Math.ceil(this._maxEntries * 0.4));\r\n\r\n this.clear();\r\n}\r\n\r\nrbush.prototype = {\r\n\r\n all: function ()\r\n {\r\n return this._all(this.data, []);\r\n },\r\n\r\n search: function (bbox)\r\n {\r\n var node = this.data,\r\n result = [],\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return result;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf) result.push(child);\r\n else if (contains(bbox, childBBox)) this._all(child, result);\r\n else nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return result;\r\n },\r\n\r\n collides: function (bbox)\r\n {\r\n var node = this.data,\r\n toBBox = this.toBBox;\r\n\r\n if (!intersects(bbox, node)) return false;\r\n\r\n var nodesToSearch = [],\r\n i, len, child, childBBox;\r\n\r\n while (node) {\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n\r\n child = node.children[i];\r\n childBBox = node.leaf ? toBBox(child) : child;\r\n\r\n if (intersects(bbox, childBBox)) {\r\n if (node.leaf || contains(bbox, childBBox)) return true;\r\n nodesToSearch.push(child);\r\n }\r\n }\r\n node = nodesToSearch.pop();\r\n }\r\n\r\n return false;\r\n },\r\n\r\n load: function (data)\r\n {\r\n if (!(data && data.length)) return this;\r\n\r\n if (data.length < this._minEntries) {\r\n for (var i = 0, len = data.length; i < len; i++) {\r\n this.insert(data[i]);\r\n }\r\n return this;\r\n }\r\n\r\n // recursively build the tree with the given data from scratch using OMT algorithm\r\n var node = this._build(data.slice(), 0, data.length - 1, 0);\r\n\r\n if (!this.data.children.length) {\r\n // save as is if tree is empty\r\n this.data = node;\r\n\r\n } else if (this.data.height === node.height) {\r\n // split root if trees have the same height\r\n this._splitRoot(this.data, node);\r\n\r\n } else {\r\n if (this.data.height < node.height) {\r\n // swap trees if inserted one is bigger\r\n var tmpNode = this.data;\r\n this.data = node;\r\n node = tmpNode;\r\n }\r\n\r\n // insert the small tree into the large tree at appropriate level\r\n this._insert(node, this.data.height - node.height - 1, true);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n insert: function (item)\r\n {\r\n if (item) this._insert(item, this.data.height - 1);\r\n return this;\r\n },\r\n\r\n clear: function ()\r\n {\r\n this.data = createNode([]);\r\n return this;\r\n },\r\n\r\n remove: function (item, equalsFn)\r\n {\r\n if (!item) return this;\r\n\r\n var node = this.data,\r\n bbox = this.toBBox(item),\r\n path = [],\r\n indexes = [],\r\n i, parent, index, goingUp;\r\n\r\n // depth-first iterative tree traversal\r\n while (node || path.length) {\r\n\r\n if (!node) { // go up\r\n node = path.pop();\r\n parent = path[path.length - 1];\r\n i = indexes.pop();\r\n goingUp = true;\r\n }\r\n\r\n if (node.leaf) { // check current node\r\n index = findItem(item, node.children, equalsFn);\r\n\r\n if (index !== -1) {\r\n // item found, remove the item and condense tree upwards\r\n node.children.splice(index, 1);\r\n path.push(node);\r\n this._condense(path);\r\n return this;\r\n }\r\n }\r\n\r\n if (!goingUp && !node.leaf && contains(node, bbox)) { // go down\r\n path.push(node);\r\n indexes.push(i);\r\n i = 0;\r\n parent = node;\r\n node = node.children[0];\r\n\r\n } else if (parent) { // go right\r\n i++;\r\n node = parent.children[i];\r\n goingUp = false;\r\n\r\n } else node = null; // nothing found\r\n }\r\n\r\n return this;\r\n },\r\n\r\n toBBox: function (item) { return item; },\r\n\r\n compareMinX: compareNodeMinX,\r\n compareMinY: compareNodeMinY,\r\n\r\n toJSON: function () { return this.data; },\r\n\r\n fromJSON: function (data)\r\n {\r\n this.data = data;\r\n return this;\r\n },\r\n\r\n _all: function (node, result)\r\n {\r\n var nodesToSearch = [];\r\n while (node) {\r\n if (node.leaf) result.push.apply(result, node.children);\r\n else nodesToSearch.push.apply(nodesToSearch, node.children);\r\n\r\n node = nodesToSearch.pop();\r\n }\r\n return result;\r\n },\r\n\r\n _build: function (items, left, right, height)\r\n {\r\n var N = right - left + 1,\r\n M = this._maxEntries,\r\n node;\r\n\r\n if (N <= M) {\r\n // reached leaf level; return leaf\r\n node = createNode(items.slice(left, right + 1));\r\n calcBBox(node, this.toBBox);\r\n return node;\r\n }\r\n\r\n if (!height) {\r\n // target height of the bulk-loaded tree\r\n height = Math.ceil(Math.log(N) / Math.log(M));\r\n\r\n // target number of root entries to maximize storage utilization\r\n M = Math.ceil(N / Math.pow(M, height - 1));\r\n }\r\n\r\n node = createNode([]);\r\n node.leaf = false;\r\n node.height = height;\r\n\r\n // split the items into M mostly square tiles\r\n\r\n var N2 = Math.ceil(N / M),\r\n N1 = N2 * Math.ceil(Math.sqrt(M)),\r\n i, j, right2, right3;\r\n\r\n multiSelect(items, left, right, N1, this.compareMinX);\r\n\r\n for (i = left; i <= right; i += N1) {\r\n\r\n right2 = Math.min(i + N1 - 1, right);\r\n\r\n multiSelect(items, i, right2, N2, this.compareMinY);\r\n\r\n for (j = i; j <= right2; j += N2) {\r\n\r\n right3 = Math.min(j + N2 - 1, right2);\r\n\r\n // pack each entry recursively\r\n node.children.push(this._build(items, j, right3, height - 1));\r\n }\r\n }\r\n\r\n calcBBox(node, this.toBBox);\r\n\r\n return node;\r\n },\r\n\r\n _chooseSubtree: function (bbox, node, level, path)\r\n {\r\n var i, len, child, targetNode, area, enlargement, minArea, minEnlargement;\r\n\r\n while (true) {\r\n path.push(node);\r\n\r\n if (node.leaf || path.length - 1 === level) break;\r\n\r\n minArea = minEnlargement = Infinity;\r\n\r\n for (i = 0, len = node.children.length; i < len; i++) {\r\n child = node.children[i];\r\n area = bboxArea(child);\r\n enlargement = enlargedArea(bbox, child) - area;\r\n\r\n // choose entry with the least area enlargement\r\n if (enlargement < minEnlargement) {\r\n minEnlargement = enlargement;\r\n minArea = area < minArea ? area : minArea;\r\n targetNode = child;\r\n\r\n } else if (enlargement === minEnlargement) {\r\n // otherwise choose one with the smallest area\r\n if (area < minArea) {\r\n minArea = area;\r\n targetNode = child;\r\n }\r\n }\r\n }\r\n\r\n node = targetNode || node.children[0];\r\n }\r\n\r\n return node;\r\n },\r\n\r\n _insert: function (item, level, isNode)\r\n {\r\n var toBBox = this.toBBox,\r\n bbox = isNode ? item : toBBox(item),\r\n insertPath = [];\r\n\r\n // find the best node for accommodating the item, saving all nodes along the path too\r\n var node = this._chooseSubtree(bbox, this.data, level, insertPath);\r\n\r\n // put the item into the node\r\n node.children.push(item);\r\n extend(node, bbox);\r\n\r\n // split on node overflow; propagate upwards if necessary\r\n while (level >= 0) {\r\n if (insertPath[level].children.length > this._maxEntries) {\r\n this._split(insertPath, level);\r\n level--;\r\n } else break;\r\n }\r\n\r\n // adjust bboxes along the insertion path\r\n this._adjustParentBBoxes(bbox, insertPath, level);\r\n },\r\n\r\n // split overflowed node into two\r\n _split: function (insertPath, level)\r\n {\r\n var node = insertPath[level],\r\n M = node.children.length,\r\n m = this._minEntries;\r\n\r\n this._chooseSplitAxis(node, m, M);\r\n\r\n var splitIndex = this._chooseSplitIndex(node, m, M);\r\n\r\n var newNode = createNode(node.children.splice(splitIndex, node.children.length - splitIndex));\r\n newNode.height = node.height;\r\n newNode.leaf = node.leaf;\r\n\r\n calcBBox(node, this.toBBox);\r\n calcBBox(newNode, this.toBBox);\r\n\r\n if (level) insertPath[level - 1].children.push(newNode);\r\n else this._splitRoot(node, newNode);\r\n },\r\n\r\n _splitRoot: function (node, newNode)\r\n {\r\n // split root node\r\n this.data = createNode([node, newNode]);\r\n this.data.height = node.height + 1;\r\n this.data.leaf = false;\r\n calcBBox(this.data, this.toBBox);\r\n },\r\n\r\n _chooseSplitIndex: function (node, m, M)\r\n {\r\n var i, bbox1, bbox2, overlap, area, minOverlap, minArea, index;\r\n\r\n minOverlap = minArea = Infinity;\r\n\r\n for (i = m; i <= M - m; i++) {\r\n bbox1 = distBBox(node, 0, i, this.toBBox);\r\n bbox2 = distBBox(node, i, M, this.toBBox);\r\n\r\n overlap = intersectionArea(bbox1, bbox2);\r\n area = bboxArea(bbox1) + bboxArea(bbox2);\r\n\r\n // choose distribution with minimum overlap\r\n if (overlap < minOverlap) {\r\n minOverlap = overlap;\r\n index = i;\r\n\r\n minArea = area < minArea ? area : minArea;\r\n\r\n } else if (overlap === minOverlap) {\r\n // otherwise choose distribution with minimum area\r\n if (area < minArea) {\r\n minArea = area;\r\n index = i;\r\n }\r\n }\r\n }\r\n\r\n return index;\r\n },\r\n\r\n // sorts node children by the best axis for split\r\n _chooseSplitAxis: function (node, m, M)\r\n {\r\n var compareMinX = node.leaf ? this.compareMinX : compareNodeMinX,\r\n compareMinY = node.leaf ? this.compareMinY : compareNodeMinY,\r\n xMargin = this._allDistMargin(node, m, M, compareMinX),\r\n yMargin = this._allDistMargin(node, m, M, compareMinY);\r\n\r\n // if total distributions margin value is minimal for x, sort by minX,\r\n // otherwise it's already sorted by minY\r\n if (xMargin < yMargin) node.children.sort(compareMinX);\r\n },\r\n\r\n // total margin of all possible split distributions where each node is at least m full\r\n _allDistMargin: function (node, m, M, compare)\r\n {\r\n node.children.sort(compare);\r\n\r\n var toBBox = this.toBBox,\r\n leftBBox = distBBox(node, 0, m, toBBox),\r\n rightBBox = distBBox(node, M - m, M, toBBox),\r\n margin = bboxMargin(leftBBox) + bboxMargin(rightBBox),\r\n i, child;\r\n\r\n for (i = m; i < M - m; i++) {\r\n child = node.children[i];\r\n extend(leftBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(leftBBox);\r\n }\r\n\r\n for (i = M - m - 1; i >= m; i--) {\r\n child = node.children[i];\r\n extend(rightBBox, node.leaf ? toBBox(child) : child);\r\n margin += bboxMargin(rightBBox);\r\n }\r\n\r\n return margin;\r\n },\r\n\r\n _adjustParentBBoxes: function (bbox, path, level)\r\n {\r\n // adjust bboxes along the given tree path\r\n for (var i = level; i >= 0; i--) {\r\n extend(path[i], bbox);\r\n }\r\n },\r\n\r\n _condense: function (path)\r\n {\r\n // go through the path, removing empty nodes and updating bboxes\r\n for (var i = path.length - 1, siblings; i >= 0; i--) {\r\n if (path[i].children.length === 0) {\r\n if (i > 0) {\r\n siblings = path[i - 1].children;\r\n siblings.splice(siblings.indexOf(path[i]), 1);\r\n\r\n } else this.clear();\r\n\r\n } else calcBBox(path[i], this.toBBox);\r\n }\r\n },\r\n\r\n compareMinX: function (a, b)\r\n {\r\n return a.left - b.left;\r\n },\r\n\r\n compareMinY: function (a, b)\r\n {\r\n return a.top - b.top;\r\n },\r\n\r\n toBBox: function (a)\r\n {\r\n return {\r\n minX: a.left,\r\n minY: a.top,\r\n maxX: a.right,\r\n maxY: a.bottom\r\n };\r\n }\r\n};\r\n\r\nfunction findItem (item, items, equalsFn)\r\n{\r\n if (!equalsFn) return items.indexOf(item);\r\n\r\n for (var i = 0; i < items.length; i++) {\r\n if (equalsFn(item, items[i])) return i;\r\n }\r\n return -1;\r\n}\r\n\r\n// calculate node's bbox from bboxes of its children\r\nfunction calcBBox (node, toBBox)\r\n{\r\n distBBox(node, 0, node.children.length, toBBox, node);\r\n}\r\n\r\n// min bounding rectangle of node children from k to p-1\r\nfunction distBBox (node, k, p, toBBox, destNode)\r\n{\r\n if (!destNode) destNode = createNode(null);\r\n destNode.minX = Infinity;\r\n destNode.minY = Infinity;\r\n destNode.maxX = -Infinity;\r\n destNode.maxY = -Infinity;\r\n\r\n for (var i = k, child; i < p; i++) {\r\n child = node.children[i];\r\n extend(destNode, node.leaf ? toBBox(child) : child);\r\n }\r\n\r\n return destNode;\r\n}\r\n\r\nfunction extend (a, b)\r\n{\r\n a.minX = Math.min(a.minX, b.minX);\r\n a.minY = Math.min(a.minY, b.minY);\r\n a.maxX = Math.max(a.maxX, b.maxX);\r\n a.maxY = Math.max(a.maxY, b.maxY);\r\n return a;\r\n}\r\n\r\nfunction compareNodeMinX (a, b) { return a.minX - b.minX; }\r\nfunction compareNodeMinY (a, b) { return a.minY - b.minY; }\r\n\r\nfunction bboxArea (a) { return (a.maxX - a.minX) * (a.maxY - a.minY); }\r\nfunction bboxMargin (a) { return (a.maxX - a.minX) + (a.maxY - a.minY); }\r\n\r\nfunction enlargedArea (a, b)\r\n{\r\n return (Math.max(b.maxX, a.maxX) - Math.min(b.minX, a.minX)) *\r\n (Math.max(b.maxY, a.maxY) - Math.min(b.minY, a.minY));\r\n}\r\n\r\nfunction intersectionArea (a, b)\r\n{\r\n var minX = Math.max(a.minX, b.minX),\r\n minY = Math.max(a.minY, b.minY),\r\n maxX = Math.min(a.maxX, b.maxX),\r\n maxY = Math.min(a.maxY, b.maxY);\r\n\r\n return Math.max(0, maxX - minX) *\r\n Math.max(0, maxY - minY);\r\n}\r\n\r\nfunction contains (a, b)\r\n{\r\n return a.minX <= b.minX &&\r\n a.minY <= b.minY &&\r\n b.maxX <= a.maxX &&\r\n b.maxY <= a.maxY;\r\n}\r\n\r\nfunction intersects (a, b)\r\n{\r\n return b.minX <= a.maxX &&\r\n b.minY <= a.maxY &&\r\n b.maxX >= a.minX &&\r\n b.maxY >= a.minY;\r\n}\r\n\r\nfunction createNode (children)\r\n{\r\n return {\r\n children: children,\r\n height: 1,\r\n leaf: true,\r\n minX: Infinity,\r\n minY: Infinity,\r\n maxX: -Infinity,\r\n maxY: -Infinity\r\n };\r\n}\r\n\r\n// sort an array so that items come in groups of n unsorted items, with groups sorted between each other;\r\n// combines selection algorithm with binary divide & conquer approach\r\n\r\nfunction multiSelect (arr, left, right, n, compare)\r\n{\r\n var stack = [left, right],\r\n mid;\r\n\r\n while (stack.length)\r\n {\r\n right = stack.pop();\r\n left = stack.pop();\r\n\r\n if (right - left <= n) continue;\r\n\r\n mid = left + Math.ceil((right - left) / n / 2) * n;\r\n quickselect(arr, mid, left, right, compare);\r\n\r\n stack.push(left, mid, mid, right);\r\n }\r\n}\r\n\r\nmodule.exports = rbush;\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/RTree.js?")},"./node_modules/phaser/src/structs/Set.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @callback EachSetCallback\r\n *\r\n * @param {E} entry - The Set entry.\r\n * @param {number} index - The index of the entry within the Set.\r\n *\r\n * @return {?boolean} The callback result.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Set is a collection of unique elements.\r\n *\r\n * @class Set\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[]} - [elements]\r\n *\r\n * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set.\r\n */\r\nvar Set = new Class({\r\n\r\n initialize:\r\n\r\n function Set (elements)\r\n {\r\n /**\r\n * The entries of this Set. Stored internally as an array.\r\n *\r\n * @genericUse {T[]} - [$type]\r\n *\r\n * @name Phaser.Structs.Set#entries\r\n * @type {Array.<*>}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.entries = [];\r\n\r\n if (Array.isArray(elements))\r\n {\r\n for (var i = 0; i < elements.length; i++)\r\n {\r\n this.set(elements[i]);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect.\r\n *\r\n * @method Phaser.Structs.Set#set\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to insert into this Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n set: function (value)\r\n {\r\n if (this.entries.indexOf(value) === -1)\r\n {\r\n this.entries.push(value);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value.\r\n * If no elements of this Set satisfy the condition then this method will return `null`.\r\n *\r\n * @method Phaser.Structs.Set#get\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value,$return]\r\n *\r\n * @param {string} property - The property name to check on the elements of this Set.\r\n * @param {*} value - The value to check for.\r\n *\r\n * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition.\r\n */\r\n get: function (property, value)\r\n {\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n if (entry[property] === value)\r\n {\r\n return entry;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array containing all the values in this Set.\r\n *\r\n * @method Phaser.Structs.Set#getArray\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T[]} - [$return]\r\n *\r\n * @return {Array.<*>} An array containing all the values in this Set.\r\n */\r\n getArray: function ()\r\n {\r\n return this.entries.slice(0);\r\n },\r\n\r\n /**\r\n * Removes the given value from this Set if this Set contains that value.\r\n *\r\n * @method Phaser.Structs.Set#delete\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {*} value - The value to remove from the Set.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n delete: function (value)\r\n {\r\n var index = this.entries.indexOf(value);\r\n\r\n if (index > -1)\r\n {\r\n this.entries.splice(index, 1);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Dumps the contents of this Set to the console via `console.group`.\r\n *\r\n * @method Phaser.Structs.Set#dump\r\n * @since 3.0.0\r\n */\r\n dump: function ()\r\n {\r\n // eslint-disable-next-line no-console\r\n console.group('Set');\r\n\r\n for (var i = 0; i < this.entries.length; i++)\r\n {\r\n var entry = this.entries[i];\r\n console.log(entry);\r\n }\r\n\r\n // eslint-disable-next-line no-console\r\n console.groupEnd();\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`.\r\n *\r\n * @method Phaser.Structs.Set#each\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n each: function (callback, callbackScope)\r\n {\r\n var i;\r\n var temp = this.entries.slice();\r\n var len = temp.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(temp[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes each value in this Set to the given callback.\r\n * For when you absolutely know this Set won't be modified during the iteration.\r\n *\r\n * @method Phaser.Structs.Set#iterate\r\n * @since 3.0.0\r\n *\r\n * @genericUse {EachSetCallback.} - [callback]\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains.\r\n * @param {*} [callbackScope] - The scope of the callback.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterate: function (callback, callbackScope)\r\n {\r\n var i;\r\n var len = this.entries.length;\r\n\r\n if (callbackScope)\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback.call(callbackScope, this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < len; i++)\r\n {\r\n if (callback(this.entries[i], i) === false)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Goes through each entry in this Set and invokes the given function on them, passing in the arguments.\r\n *\r\n * @method Phaser.Structs.Set#iterateLocal\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @param {string} callbackKey - The key of the function to be invoked on each Set entry.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n iterateLocal: function (callbackKey)\r\n {\r\n var i;\r\n var args = [];\r\n\r\n for (i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n var len = this.entries.length;\r\n\r\n for (i = 0; i < len; i++)\r\n {\r\n var entry = this.entries[i];\r\n\r\n entry[callbackKey].apply(entry, args);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clears this Set so that it no longer contains any values.\r\n *\r\n * @method Phaser.Structs.Set#clear\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [$return]\r\n *\r\n * @return {Phaser.Structs.Set} This Set object.\r\n */\r\n clear: function ()\r\n {\r\n this.entries.length = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns `true` if this Set contains the given value, otherwise returns `false`.\r\n *\r\n * @method Phaser.Structs.Set#contains\r\n * @since 3.0.0\r\n *\r\n * @genericUse {T} - [value]\r\n *\r\n * @param {*} value - The value to check for in this Set.\r\n *\r\n * @return {boolean} `true` if the given value was found in this Set, otherwise `false`.\r\n */\r\n contains: function (value)\r\n {\r\n return (this.entries.indexOf(value) > -1);\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument.\r\n *\r\n * @method Phaser.Structs.Set#union\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the union with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument.\r\n */\r\n union: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n set.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n newSet.set(value);\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set that contains only the values which are in this Set and that are also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#intersect\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to intersect this set with.\r\n *\r\n * @return {Phaser.Structs.Set} The result of the intersection, as a new Set.\r\n */\r\n intersect: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * Returns a new Set containing all the values in this Set which are *not* also in the given Set.\r\n *\r\n * @method Phaser.Structs.Set#difference\r\n * @since 3.0.0\r\n *\r\n * @genericUse {Phaser.Structs.Set.} - [set,$return]\r\n *\r\n * @param {Phaser.Structs.Set} set - The Set to perform the difference with.\r\n *\r\n * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method.\r\n */\r\n difference: function (set)\r\n {\r\n var newSet = new Set();\r\n\r\n this.entries.forEach(function (value)\r\n {\r\n if (!set.contains(value))\r\n {\r\n newSet.set(value);\r\n }\r\n });\r\n\r\n return newSet;\r\n },\r\n\r\n /**\r\n * The size of this Set. This is the number of entries within it.\r\n * Changing the size will truncate the Set if the given value is smaller than the current size.\r\n * Increasing the size larger than the current size has no effect.\r\n *\r\n * @name Phaser.Structs.Set#size\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n size: {\r\n\r\n get: function ()\r\n {\r\n return this.entries.length;\r\n },\r\n\r\n set: function (value)\r\n {\r\n if (value < this.entries.length)\r\n {\r\n return this.entries.length = value;\r\n }\r\n else\r\n {\r\n return this.entries.length;\r\n }\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Set;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Set.js?")},"./node_modules/phaser/src/structs/Size.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ \"./node_modules/phaser/src/math/Clamp.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar SnapFloor = __webpack_require__(/*! ../math/snap/SnapFloor */ \"./node_modules/phaser/src/math/snap/SnapFloor.js\");\r\nvar Vector2 = __webpack_require__(/*! ../math/Vector2 */ \"./node_modules/phaser/src/math/Vector2.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Size component allows you to set `width` and `height` properties and define the relationship between them.\r\n * \r\n * The component can automatically maintain the aspect ratios between the two values, and clamp them\r\n * to a defined min-max range. You can also control the dominant axis. When dimensions are given to the Size component\r\n * that would cause it to exceed its min-max range, the dimensions are adjusted based on the dominant axis.\r\n *\r\n * @class Size\r\n * @memberof Phaser.Structs\r\n * @constructor\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The width of the Size component.\r\n * @param {number} [height=width] - The height of the Size component. If not given, it will use the `width`.\r\n * @param {integer} [aspectMode=0] - The aspect mode of the Size component. Defaults to 0, no mode.\r\n * @param {any} [parent=null] - The parent of this Size component. Can be any object with public `width` and `height` properties. Dimensions are clamped to keep them within the parent bounds where possible.\r\n */\r\nvar Size = new Class({\r\n\r\n initialize:\r\n\r\n function Size (width, height, aspectMode, parent)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (aspectMode === undefined) { aspectMode = 0; }\r\n if (parent === undefined) { parent = null; }\r\n\r\n /**\r\n * Internal width value.\r\n *\r\n * @name Phaser.Structs.Size#_width\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._width = width;\r\n\r\n /**\r\n * Internal height value.\r\n *\r\n * @name Phaser.Structs.Size#_height\r\n * @type {number}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._height = height;\r\n\r\n /**\r\n * Internal parent reference.\r\n *\r\n * @name Phaser.Structs.Size#_parent\r\n * @type {any}\r\n * @private\r\n * @since 3.16.0\r\n */\r\n this._parent = parent;\r\n\r\n /**\r\n * The aspect mode this Size component will use when calculating its dimensions.\r\n * This property is read-only. To change it use the `setAspectMode` method.\r\n *\r\n * @name Phaser.Structs.Size#aspectMode\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectMode = aspectMode;\r\n\r\n /**\r\n * The proportional relationship between the width and height.\r\n * \r\n * This property is read-only and is updated automatically when either the `width` or `height` properties are changed,\r\n * depending on the aspect mode.\r\n *\r\n * @name Phaser.Structs.Size#aspectRatio\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.aspectRatio = (height === 0) ? 1 : width / height;\r\n\r\n /**\r\n * The minimum allowed width.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minWidth = 0;\r\n\r\n /**\r\n * The minimum allowed height.\r\n * Cannot be less than zero.\r\n * This value is read-only. To change it see the `setMin` method.\r\n *\r\n * @name Phaser.Structs.Size#minHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.minHeight = 0;\r\n\r\n /**\r\n * The maximum allowed width.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxWidth = Number.MAX_VALUE;\r\n\r\n /**\r\n * The maximum allowed height.\r\n * This value is read-only. To change it see the `setMax` method.\r\n *\r\n * @name Phaser.Structs.Size#maxHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.maxHeight = Number.MAX_VALUE;\r\n\r\n /**\r\n * A Vector2 containing the horizontal and vertical snap values, which the width and height are snapped to during resizing.\r\n * \r\n * By default this is disabled.\r\n * \r\n * This property is read-only. To change it see the `setSnap` method.\r\n *\r\n * @name Phaser.Structs.Size#snapTo\r\n * @type {Phaser.Math.Vector2}\r\n * @readonly\r\n * @since 3.16.0\r\n */\r\n this.snapTo = new Vector2();\r\n },\r\n\r\n /**\r\n * Sets the aspect mode of this Size component.\r\n * \r\n * The aspect mode controls what happens when you modify the `width` or `height` properties, or call `setSize`.\r\n * \r\n * It can be a number from 0 to 4, or a Size constant:\r\n * \r\n * 0. NONE = Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * 1. WIDTH_CONTROLS_HEIGHT = The height is automatically adjusted based on the width.\r\n * 2. HEIGHT_CONTROLS_WIDTH = The width is automatically adjusted based on the height.\r\n * 3. FIT = The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * 4. ENVELOP = The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setAspectMode\r\n * @since 3.16.0\r\n *\r\n * @param {integer} [value=0] - The aspect mode value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectMode: function (value)\r\n {\r\n if (value === undefined) { value = 0; }\r\n\r\n this.aspectMode = value;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * By setting a Snap To value when this Size component is modified its dimensions will automatically\r\n * by snapped to the nearest grid slice, using floor. For example, if you have snap value of 16,\r\n * and the width changes to 68, then it will snap down to 64 (the closest multiple of 16 when floored)\r\n * \r\n * Note that snapping takes place before adjustments by the parent, or the min / max settings. If these\r\n * values are not multiples of the given snap values, then this can result in un-snapped dimensions.\r\n * \r\n * Call this method with no arguments to reset the snap values.\r\n * \r\n * Calling this method automatically recalculates the `width` and the `height`, if required.\r\n * \r\n * @method Phaser.Structs.Size#setSnap\r\n * @since 3.16.0\r\n *\r\n * @param {number} [snapWidth=0] - The amount to snap the width to. If you don't want to snap the width, pass a value of zero.\r\n * @param {number} [snapHeight=snapWidth] - The amount to snap the height to. If not provided it will use the `snapWidth` value. If you don't want to snap the height, pass a value of zero.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSnap: function (snapWidth, snapHeight)\r\n {\r\n if (snapWidth === undefined) { snapWidth = 0; }\r\n if (snapHeight === undefined) { snapHeight = snapWidth; }\r\n\r\n this.snapTo.set(snapWidth, snapHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets, or clears, the parent of this Size component.\r\n * \r\n * To clear the parent call this method with no arguments.\r\n * \r\n * The parent influences the maximum extents to which this Size compoent can expand,\r\n * based on the aspect mode:\r\n * \r\n * NONE - The parent clamps both the width and height.\r\n * WIDTH_CONTROLS_HEIGHT - The parent clamps just the width.\r\n * HEIGHT_CONTROLS_WIDTH - The parent clamps just the height.\r\n * FIT - The parent clamps whichever axis is required to ensure the size fits within it.\r\n * ENVELOP - The parent is used to ensure the size fully envelops the parent.\r\n * \r\n * Calling this method automatically calls `setSize`.\r\n *\r\n * @method Phaser.Structs.Size#setParent\r\n * @since 3.16.0\r\n *\r\n * @param {any} [parent] - Sets the parent of this Size component. Don't provide a value to clear an existing parent.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setParent: function (parent)\r\n {\r\n this._parent = parent;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the minimum width and height values this Size component will allow.\r\n * \r\n * The minimum values can never be below zero, or greater than the maximum values.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the minimums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMin\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The minimum allowed width of the Size component.\r\n * @param {number} [height=width] - The minimum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMin: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.minWidth = Clamp(width, 0, this.maxWidth);\r\n this.minHeight = Clamp(height, 0, this.maxHeight);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Set the maximum width and height values this Size component will allow.\r\n * \r\n * Setting this will automatically adjust both the `width` and `height` properties to ensure they are within range.\r\n * \r\n * Note that based on the aspect mode, and if this Size component has a parent set or not, the maximums set here\r\n * _can_ be exceed in some situations.\r\n *\r\n * @method Phaser.Structs.Size#setMax\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=Number.MAX_VALUE] - The maximum allowed width of the Size component.\r\n * @param {number} [height=width] - The maximum allowed height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setMax: function (width, height)\r\n {\r\n if (width === undefined) { width = Number.MAX_VALUE; }\r\n if (height === undefined) { height = width; }\r\n\r\n this.maxWidth = Clamp(width, this.minWidth, Number.MAX_VALUE);\r\n this.maxHeight = Clamp(height, this.minHeight, Number.MAX_VALUE);\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets the width and height of this Size component based on the aspect mode.\r\n * \r\n * If the aspect mode is 'none' then calling this method will change the aspect ratio, otherwise the current\r\n * aspect ratio is honored across all other modes.\r\n * \r\n * If snapTo values have been set then the given width and height are snapped first, prior to any further\r\n * adjustment via min/max values, or a parent.\r\n * \r\n * If minimum and/or maximum dimensions have been specified, the values given to this method will be clamped into\r\n * that range prior to adjustment, but may still exceed them depending on the aspect mode.\r\n * \r\n * If this Size component has a parent set, and the aspect mode is `fit` or `envelop`, then the given sizes will\r\n * be clamped to the range specified by the parent.\r\n *\r\n * @method Phaser.Structs.Size#setSize\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n \r\n switch (this.aspectMode)\r\n {\r\n case Size.NONE:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n break;\r\n\r\n case Size.WIDTH_CONTROLS_HEIGHT:\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(this._width * (1 / this.aspectRatio), false);\r\n break;\r\n\r\n case Size.HEIGHT_CONTROLS_WIDTH:\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this._width = this.getNewWidth(this._height * this.aspectRatio, false);\r\n break;\r\n\r\n case Size.FIT:\r\n this.constrain(width, height, true);\r\n break;\r\n\r\n case Size.ENVELOP:\r\n this.constrain(width, height, false);\r\n break;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new aspect ratio, overriding what was there previously.\r\n * \r\n * It then calls `setSize` immediately using the current dimensions.\r\n *\r\n * @method Phaser.Structs.Size#setAspectRatio\r\n * @since 3.16.0\r\n *\r\n * @param {number} ratio - The new aspect ratio.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setAspectRatio: function (ratio)\r\n {\r\n this.aspectRatio = ratio;\r\n\r\n return this.setSize(this._width, this._height);\r\n },\r\n\r\n /**\r\n * Sets a new width and height for this Size component and updates the aspect ratio based on them.\r\n * \r\n * It _doesn't_ change the `aspectMode` and still factors in size limits such as the min max and parent bounds.\r\n *\r\n * @method Phaser.Structs.Size#resize\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n * @param {number} [height=width] - The new height of the Size component. If not given, it will use the `width`.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n resize: function (width, height)\r\n {\r\n this._width = this.getNewWidth(SnapFloor(width, this.snapTo.x));\r\n this._height = this.getNewHeight(SnapFloor(height, this.snapTo.y));\r\n this.aspectRatio = (this._height === 0) ? 1 : this._width / this._height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Takes a new width and passes it through the min/max clamp and then checks it doesn't exceed the parent width.\r\n *\r\n * @method Phaser.Structs.Size#getNewWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified width value.\r\n */\r\n getNewWidth: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n \r\n value = Clamp(value, this.minWidth, this.maxWidth);\r\n\r\n if (checkParent && this._parent && value > this._parent.width)\r\n {\r\n value = Math.max(this.minWidth, this._parent.width);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * Takes a new height and passes it through the min/max clamp and then checks it doesn't exceed the parent height.\r\n *\r\n * @method Phaser.Structs.Size#getNewHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} value - The value to clamp and check.\r\n * @param {boolean} [checkParent=true] - Check the given value against the parent, if set.\r\n *\r\n * @return {number} The modified height value.\r\n */\r\n getNewHeight: function (value, checkParent)\r\n {\r\n if (checkParent === undefined) { checkParent = true; }\r\n\r\n value = Clamp(value, this.minHeight, this.maxHeight);\r\n\r\n if (checkParent && this._parent && value > this._parent.height)\r\n {\r\n value = Math.max(this.minHeight, this._parent.height);\r\n }\r\n\r\n return value;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * If `fit` is true there may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * If `fit` is false the size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#constrain\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n * @param {boolean} [fit=true] - Perform a `fit` (true) constraint, or an `envelop` (false) constraint.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n constrain: function (width, height, fit)\r\n {\r\n if (width === undefined) { width = 0; }\r\n if (height === undefined) { height = width; }\r\n if (fit === undefined) { fit = true; }\r\n\r\n width = this.getNewWidth(width);\r\n height = this.getNewHeight(height);\r\n\r\n var snap = this.snapTo;\r\n var newRatio = (height === 0) ? 1 : width / height;\r\n\r\n if ((fit && this.aspectRatio > newRatio) || (!fit && this.aspectRatio < newRatio))\r\n {\r\n // We need to change the height to fit the width\r\n // height = width / this.aspectRatio;\r\n\r\n width = SnapFloor(width, snap.x);\r\n\r\n height = width / this.aspectRatio;\r\n\r\n if (snap.y > 0)\r\n {\r\n height = SnapFloor(height, snap.y);\r\n\r\n // Reduce the width accordingly\r\n width = height * this.aspectRatio;\r\n }\r\n }\r\n else if ((fit && this.aspectRatio < newRatio) || (!fit && this.aspectRatio > newRatio))\r\n {\r\n // We need to change the width to fit the height\r\n // width = height * this.aspectRatio;\r\n\r\n height = SnapFloor(height, snap.y);\r\n\r\n width = height * this.aspectRatio;\r\n\r\n if (snap.x > 0)\r\n {\r\n width = SnapFloor(width, snap.x);\r\n\r\n // Reduce the height accordingly\r\n height = width * (1 / this.aspectRatio);\r\n }\r\n }\r\n\r\n this._width = width;\r\n this._height = height;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted to fit inside the given dimensions, while keeping the aspect ratio.\r\n * \r\n * There may be some space inside the target area which is not covered if its aspect ratio differs.\r\n * \r\n * If this Size component has a parent set, then the width and height passed to this method will be clamped so\r\n * it cannot exceed that of the parent.\r\n *\r\n * @method Phaser.Structs.Size#fitTo\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n fitTo: function (width, height)\r\n {\r\n return this.constrain(width, height, true);\r\n },\r\n\r\n /**\r\n * The current `width` and `height` are adjusted so that they fully envlop the given dimensions, while keeping the aspect ratio.\r\n * \r\n * The size may extend further out than the target area if the aspect ratios differ.\r\n * \r\n * If this Size component has a parent set, then the values are clamped so that it never exceeds the parent\r\n * on the longest axis.\r\n *\r\n * @method Phaser.Structs.Size#envelop\r\n * @since 3.16.0\r\n *\r\n * @param {number} [width=0] - The new width of the Size component.\r\n * @param {number} [height] - The new height of the Size component. If not given, it will use the width value.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n envelop: function (width, height)\r\n {\r\n return this.constrain(width, height, false);\r\n },\r\n\r\n /**\r\n * Sets the width of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the width may also update the height and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setWidth\r\n * @since 3.16.0\r\n *\r\n * @param {number} width - The new width of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setWidth: function (value)\r\n {\r\n return this.setSize(value, this._height);\r\n },\r\n\r\n /**\r\n * Sets the height of this Size component.\r\n * \r\n * Depending on the aspect mode, changing the height may also update the width and aspect ratio.\r\n *\r\n * @method Phaser.Structs.Size#setHeight\r\n * @since 3.16.0\r\n *\r\n * @param {number} height - The new height of the Size component.\r\n *\r\n * @return {this} This Size component instance.\r\n */\r\n setHeight: function (value)\r\n {\r\n return this.setSize(this._width, value);\r\n },\r\n\r\n /**\r\n * Returns a string representation of this Size component.\r\n *\r\n * @method Phaser.Structs.Size#toString\r\n * @since 3.16.0\r\n *\r\n * @return {string} A string representation of this Size component.\r\n */\r\n toString: function ()\r\n {\r\n return '[{ Size (width=' + this._width + ' height=' + this._height + ' aspectRatio=' + this.aspectRatio + ' aspectMode=' + this.aspectMode + ') }]';\r\n },\r\n\r\n /**\r\n * Sets the values of this Size component to the `element.style.width` and `height`\r\n * properties of the given DOM Element. The properties are set as `px` values.\r\n *\r\n * @method Phaser.Structs.Size#setCSS\r\n * @since 3.17.0\r\n *\r\n * @param {HTMLElement} element - The DOM Element to set the CSS style on.\r\n */\r\n setCSS: function (element)\r\n {\r\n if (element && element.style)\r\n {\r\n element.style.width = this._width + 'px';\r\n element.style.height = this._height + 'px';\r\n }\r\n },\r\n\r\n /**\r\n * Copies the aspect mode, aspect ratio, width and height from this Size component\r\n * to the given Size component. Note that the parent, if set, is not copied across.\r\n *\r\n * @method Phaser.Structs.Size#copy\r\n * @since 3.16.0\r\n * \r\n * @param {Phaser.Structs.Size} destination - The Size component to copy the values to.\r\n *\r\n * @return {Phaser.Structs.Size} The updated destination Size component.\r\n */\r\n copy: function (destination)\r\n {\r\n destination.setAspectMode(this.aspectMode);\r\n\r\n destination.aspectRatio = this.aspectRatio;\r\n\r\n return destination.setSize(this.width, this.height);\r\n },\r\n\r\n /**\r\n * Destroys this Size component.\r\n * \r\n * This clears the local properties and any parent object, if set.\r\n * \r\n * A destroyed Size component cannot be re-used.\r\n *\r\n * @method Phaser.Structs.Size#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n this._parent = null;\r\n this.snapTo = null;\r\n },\r\n\r\n /**\r\n * The width of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minWidth` and `maxWidth`, if enabled.\r\n * \r\n * A width can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `height` if the aspect ratio lock is enabled.\r\n * You can also use the `setWidth` and `getWidth` methods.\r\n *\r\n * @name Phaser.Structs.Size#width\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n width: {\r\n\r\n get: function ()\r\n {\r\n return this._width;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(value, this._height);\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of this Size component.\r\n * \r\n * This value is clamped to the range specified by `minHeight` and `maxHeight`, if enabled.\r\n * \r\n * A height can never be less than zero.\r\n * \r\n * Changing this value will automatically update the `width` if the aspect ratio lock is enabled.\r\n * You can also use the `setHeight` and `getHeight` methods.\r\n *\r\n * @name Phaser.Structs.Size#height\r\n * @type {number}\r\n * @since 3.16.0\r\n */\r\n height: {\r\n\r\n get: function ()\r\n {\r\n return this._height;\r\n },\r\n\r\n set: function (value)\r\n {\r\n this.setSize(this._width, value);\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\n/**\r\n * Do not make the size fit the aspect ratio. Change the ratio when the size changes.\r\n * \r\n * @name Phaser.Structs.Size.NONE\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.NONE = 0;\r\n\r\n/**\r\n * The height is automatically adjusted based on the width.\r\n * \r\n * @name Phaser.Structs.Size.WIDTH_CONTROLS_HEIGHT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.WIDTH_CONTROLS_HEIGHT = 1;\r\n\r\n/**\r\n * The width is automatically adjusted based on the height.\r\n * \r\n * @name Phaser.Structs.Size.HEIGHT_CONTROLS_WIDTH\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.HEIGHT_CONTROLS_WIDTH = 2;\r\n\r\n/**\r\n * The width and height are automatically adjusted to fit inside the given target area, while keeping the aspect ratio. Depending on the aspect ratio there may be some space inside the area which is not covered.\r\n * \r\n * @name Phaser.Structs.Size.FIT\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.FIT = 3;\r\n\r\n/**\r\n * The width and height are automatically adjusted to make the size cover the entire target area while keeping the aspect ratio. This may extend further out than the target size.\r\n * \r\n * @name Phaser.Structs.Size.ENVELOP\r\n * @constant\r\n * @type {integer}\r\n * @since 3.16.0\r\n */\r\nSize.ENVELOP = 4;\r\n\r\nmodule.exports = Size;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/Size.js?")},"./node_modules/phaser/src/structs/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Structs\r\n */\r\n\r\nmodule.exports = {\r\n\r\n List: __webpack_require__(/*! ./List */ "./node_modules/phaser/src/structs/List.js"),\r\n Map: __webpack_require__(/*! ./Map */ "./node_modules/phaser/src/structs/Map.js"),\r\n ProcessQueue: __webpack_require__(/*! ./ProcessQueue */ "./node_modules/phaser/src/structs/ProcessQueue.js"),\r\n RTree: __webpack_require__(/*! ./RTree */ "./node_modules/phaser/src/structs/RTree.js"),\r\n Set: __webpack_require__(/*! ./Set */ "./node_modules/phaser/src/structs/Set.js"),\r\n Size: __webpack_require__(/*! ./Size */ "./node_modules/phaser/src/structs/Size.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/structs/index.js?')},"./node_modules/phaser/src/textures/CanvasTexture.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ "./node_modules/phaser/src/display/color/Color.js");\r\nvar CONST = __webpack_require__(/*! ../const */ "./node_modules/phaser/src/const.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar Texture = __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Canvas Texture is a special kind of Texture that is backed by an HTML Canvas Element as its source.\r\n *\r\n * You can use the properties of this texture to draw to the canvas element directly, using all of the standard\r\n * canvas operations available in the browser. Any Game Object can be given this texture and will render with it.\r\n *\r\n * Note: When running under WebGL the Canvas Texture needs to re-generate its base WebGLTexture and reupload it to\r\n * the GPU every time you modify it, otherwise the changes you make to this texture will not be visible. To do this\r\n * you should call `CanvasTexture.refresh()` once you are finished with your changes to the canvas. Try and keep\r\n * this to a minimum, especially on large canvas sizes, or you may inadvertently thrash the GPU by constantly uploading\r\n * texture data to it. This restriction does not apply if using the Canvas Renderer.\r\n * \r\n * It starts with only one frame that covers the whole of the canvas. You can add further frames, that specify\r\n * sections of the canvas using the `add` method.\r\n * \r\n * Should you need to resize the canvas use the `setSize` method so that it accurately updates all of the underlying\r\n * texture data as well. Forgetting to do this (i.e. by changing the canvas size directly from your code) could cause\r\n * graphical errors.\r\n *\r\n * @class CanvasTexture\r\n * @extends Phaser.Textures.Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {HTMLCanvasElement} source - The canvas element that is used as the base of this texture.\r\n * @param {integer} width - The width of the canvas.\r\n * @param {integer} height - The height of the canvas.\r\n */\r\nvar CanvasTexture = new Class({\r\n\r\n Extends: Texture,\r\n\r\n initialize:\r\n\r\n function CanvasTexture (manager, key, source, width, height)\r\n {\r\n Texture.call(this, manager, key, source, width, height);\r\n\r\n this.add(\'__BASE\', 0, 0, 0, width, height);\r\n\r\n /**\r\n * A reference to the Texture Source of this Canvas.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#_source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @private\r\n * @since 3.7.0\r\n */\r\n this._source = this.frames[\'__BASE\'].source;\r\n\r\n /**\r\n * The source Canvas Element.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#canvas\r\n * @readonly\r\n * @type {HTMLCanvasElement}\r\n * @since 3.7.0\r\n */\r\n this.canvas = this._source.image;\r\n\r\n /**\r\n * The 2D Canvas Rendering Context.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#context\r\n * @readonly\r\n * @type {CanvasRenderingContext2D}\r\n * @since 3.7.0\r\n */\r\n this.context = this.canvas.getContext(\'2d\');\r\n\r\n /**\r\n * The width of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#width\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the Canvas.\r\n * This property is read-only, if you wish to change it use the `setSize` method.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#height\r\n * @readonly\r\n * @type {integer}\r\n * @since 3.7.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The context image data.\r\n * Use the `update` method to populate this when the canvas changes.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#imageData\r\n * @type {ImageData}\r\n * @since 3.13.0\r\n */\r\n this.imageData = this.context.getImageData(0, 0, width, height);\r\n\r\n /**\r\n * A Uint8ClampedArray view into the `buffer`.\r\n * Use the `update` method to populate this when the canvas changes.\r\n * Note that this is unavailable in some browsers, such as Epic Browser, due to their security restrictions.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#data\r\n * @type {Uint8ClampedArray}\r\n * @since 3.13.0\r\n */\r\n this.data = null;\r\n\r\n if (this.imageData)\r\n {\r\n this.data = this.imageData.data;\r\n }\r\n\r\n /**\r\n * An Uint32Array view into the `buffer`.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#pixels\r\n * @type {Uint32Array}\r\n * @since 3.13.0\r\n */\r\n this.pixels = null;\r\n\r\n /**\r\n * An ArrayBuffer the same size as the context ImageData.\r\n *\r\n * @name Phaser.Textures.CanvasTexture#buffer\r\n * @type {ArrayBuffer}\r\n * @since 3.13.0\r\n */\r\n this.buffer;\r\n\r\n if (this.data)\r\n {\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * This re-creates the `imageData` from the current context.\r\n * It then re-builds the ArrayBuffer, the `data` Uint8ClampedArray reference and the `pixels` Int32Array.\r\n *\r\n * Warning: This is a very expensive operation, so use it sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#update\r\n * @since 3.13.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n update: function ()\r\n {\r\n this.imageData = this.context.getImageData(0, 0, this.width, this.height);\r\n\r\n this.data = this.imageData.data;\r\n\r\n if (this.imageData.data.buffer)\r\n {\r\n this.buffer = this.imageData.data.buffer;\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else if (window.ArrayBuffer)\r\n {\r\n this.buffer = new ArrayBuffer(this.imageData.data.length);\r\n this.pixels = new Uint32Array(this.buffer);\r\n }\r\n else\r\n {\r\n this.pixels = this.imageData.data;\r\n }\r\n\r\n if (this.manager.game.config.renderType === CONST.WEBGL)\r\n {\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws the given Image or Canvas element to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#draw\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate to draw the source at.\r\n * @param {integer} y - The y coordinate to draw the source at.\r\n * @param {(HTMLImageElement|HTMLCanvasElement)} source - The element to draw to this canvas.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n draw: function (x, y, source)\r\n {\r\n this.context.drawImage(source, x, y);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Draws the given texture frame to this CanvasTexture, then updates the internal\r\n * ImageData buffer and arrays.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#drawFrame\r\n * @since 3.16.0\r\n * \r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {integer} [x=0] - The x coordinate to draw the source at.\r\n * @param {integer} [y=0] - The y coordinate to draw the source at.\r\n * \r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n drawFrame: function (key, frame, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n var textureFrame = this.manager.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var width = textureFrame.cutWidth;\r\n var height = textureFrame.cutHeight;\r\n var res = textureFrame.source.resolution;\r\n\r\n this.context.drawImage(\r\n textureFrame.source.image,\r\n cd.x, cd.y,\r\n width,\r\n height,\r\n x, y,\r\n width / res,\r\n height / res\r\n );\r\n\r\n return this.update();\r\n }\r\n else\r\n {\r\n return this;\r\n }\r\n },\r\n\r\n /**\r\n * Sets a pixel in the CanvasTexture to the given color and alpha values.\r\n *\r\n * This is an expensive operation to run in large quantities, so use sparingly.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setPixel\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} red - The red color value. A number between 0 and 255.\r\n * @param {integer} green - The green color value. A number between 0 and 255.\r\n * @param {integer} blue - The blue color value. A number between 0 and 255.\r\n * @param {integer} [alpha=255] - The alpha value. A number between 0 and 255.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n setPixel: function (x, y, red, green, blue, alpha)\r\n {\r\n if (alpha === undefined) { alpha = 255; }\r\n\r\n x = Math.abs(Math.floor(x));\r\n y = Math.abs(Math.floor(y));\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var imageData = this.context.getImageData(x, y, 1, 1);\r\n\r\n imageData.data[0] = red;\r\n imageData.data[1] = green;\r\n imageData.data[2] = blue;\r\n imageData.data[3] = alpha;\r\n\r\n this.context.putImageData(imageData, x, y);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Puts the ImageData into the context of this CanvasTexture at the given coordinates.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#putData\r\n * @since 3.16.0\r\n * \r\n * @param {ImageData} imageData - The ImageData to put at the given location.\r\n * @param {integer} x - The x coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate to put the imageData. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [dirtyX=0] - Horizontal position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyY=0] - Vertical position (x coordinate) of the top-left corner from which the image data will be extracted.\r\n * @param {integer} [dirtyWidth] - Width of the rectangle to be painted. Defaults to the width of the image data.\r\n * @param {integer} [dirtyHeight] - Height of the rectangle to be painted. Defaults to the height of the image data.\r\n * \r\n * @return {this} This CanvasTexture.\r\n */\r\n putData: function (imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight)\r\n {\r\n if (dirtyX === undefined) { dirtyX = 0; }\r\n if (dirtyY === undefined) { dirtyY = 0; }\r\n if (dirtyWidth === undefined) { dirtyWidth = imageData.width; }\r\n if (dirtyHeight === undefined) { dirtyHeight = imageData.height; }\r\n\r\n this.context.putImageData(imageData, x, y, dirtyX, dirtyY, dirtyWidth, dirtyHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an ImageData region from this CanvasTexture from the position and size specified.\r\n * You can write this back using `CanvasTexture.putData`, or manipulate it.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getData\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the top-left of the area to get the ImageData from. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} width - The width of the rectangle from which the ImageData will be extracted. Positive values are to the right, and negative to the left.\r\n * @param {integer} height - The height of the rectangle from which the ImageData will be extracted. Positive values are down, and negative are up.\r\n * \r\n * @return {ImageData} The ImageData extracted from this CanvasTexture.\r\n */\r\n getData: function (x, y, width, height)\r\n {\r\n x = Clamp(Math.floor(x), 0, this.width - 1);\r\n y = Clamp(Math.floor(y), 0, this.height - 1);\r\n width = Clamp(width, 1, this.width - x);\r\n height = Clamp(height, 1, this.height - y);\r\n\r\n var imageData = this.context.getImageData(x, y, width, height);\r\n\r\n return imageData;\r\n },\r\n\r\n /**\r\n * Get the color of a specific pixel from this texture and store it in a Color object.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixel\r\n * @since 3.13.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {Phaser.Display.Color} [out] - A Color object to store the pixel values in. If not provided a new Color object will be created.\r\n * \r\n * @return {Phaser.Display.Color} An object with the red, green, blue and alpha values set in the r, g, b and a properties.\r\n */\r\n getPixel: function (x, y, out)\r\n {\r\n if (!out)\r\n {\r\n out = new Color();\r\n }\r\n\r\n var index = this.getIndex(x, y);\r\n\r\n if (index > -1)\r\n {\r\n var data = this.data;\r\n\r\n var r = data[index + 0];\r\n var g = data[index + 1];\r\n var b = data[index + 2];\r\n var a = data[index + 3];\r\n\r\n out.setTo(r, g, b, a);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array containing all of the pixels in the given region.\r\n *\r\n * If the requested region extends outside the bounds of this CanvasTexture,\r\n * the region is truncated to fit.\r\n * \r\n * If you have drawn anything to this CanvasTexture since it was created you must call `CanvasTexture.update` to refresh the array buffer,\r\n * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn\'t exist.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getPixels\r\n * @since 3.16.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given.\r\n * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.\r\n * \r\n * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects.\r\n */\r\n getPixels: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = width; }\r\n\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n var left = Clamp(x, 0, this.width);\r\n var right = Clamp(x + width, 0, this.width);\r\n var top = Clamp(y, 0, this.height);\r\n var bottom = Clamp(y + height, 0, this.height);\r\n\r\n var pixel = new Color();\r\n\r\n var out = [];\r\n\r\n for (var py = top; py < bottom; py++)\r\n {\r\n var row = [];\r\n\r\n for (var px = left; px < right; px++)\r\n {\r\n pixel = this.getPixel(px, py, pixel);\r\n\r\n row.push({ x: px, y: py, color: pixel.color, alpha: pixel.alphaGL });\r\n }\r\n\r\n out.push(row);\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns the Image Data index for the given pixel in this CanvasTexture.\r\n *\r\n * The index can be used to read directly from the `this.data` array.\r\n *\r\n * The index points to the red value in the array. The subsequent 3 indexes\r\n * point to green, blue and alpha respectively.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getIndex\r\n * @since 3.16.0\r\n * \r\n * @param {integer} x - The x coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * @param {integer} y - The y coordinate of the pixel to get. Must lay within the dimensions of this CanvasTexture and be an integer.\r\n * \r\n * @return {integer} \r\n */\r\n getIndex: function (x, y)\r\n {\r\n x = Math.abs(Math.round(x));\r\n y = Math.abs(Math.round(y));\r\n\r\n if (x < this.width && y < this.height)\r\n {\r\n return (x + y * this.width) * 4;\r\n }\r\n else\r\n {\r\n return -1;\r\n }\r\n },\r\n\r\n /**\r\n * This should be called manually if you are running under WebGL.\r\n * It will refresh the WebGLTexture from the Canvas source. Only call this if you know that the\r\n * canvas has changed, as there is a significant GPU texture allocation cost involved in doing so.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#refresh\r\n * @since 3.7.0\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} This CanvasTexture.\r\n */\r\n refresh: function ()\r\n {\r\n this._source.update();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the Canvas Element.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getCanvas\r\n * @since 3.7.0\r\n *\r\n * @return {HTMLCanvasElement} The Canvas DOM element this texture is using.\r\n */\r\n getCanvas: function ()\r\n {\r\n return this.canvas;\r\n },\r\n\r\n /**\r\n * Gets the 2D Canvas Rendering Context.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#getContext\r\n * @since 3.7.0\r\n *\r\n * @return {CanvasRenderingContext2D} The Canvas Rendering Context this texture is using.\r\n */\r\n getContext: function ()\r\n {\r\n return this.context;\r\n },\r\n\r\n /**\r\n * Clears the given region of this Canvas Texture, resetting it back to transparent.\r\n * If no region is given, the whole Canvas Texture is cleared.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#clear\r\n * @since 3.7.0\r\n * \r\n * @param {integer} [x=0] - The x coordinate of the top-left of the region to clear.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of the region to clear.\r\n * @param {integer} [width] - The width of the region.\r\n * @param {integer} [height] - The height of the region.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n clear: function (x, y, width, height)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n\r\n this.context.clearRect(x, y, width, height);\r\n\r\n return this.update();\r\n },\r\n\r\n /**\r\n * Changes the size of this Canvas Texture.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The new width of the Canvas.\r\n * @param {integer} [height] - The new height of the Canvas. If not given it will use the width as the height.\r\n *\r\n * @return {Phaser.Textures.CanvasTexture} The Canvas Texture.\r\n */\r\n setSize: function (width, height)\r\n {\r\n if (height === undefined) { height = width; }\r\n\r\n if (width !== this.width || height !== this.height)\r\n {\r\n // Update the Canvas\r\n this.canvas.width = width;\r\n this.canvas.height = height;\r\n\r\n // Update the Texture Source\r\n this._source.width = width;\r\n this._source.height = height;\r\n this._source.isPowerOf2 = IsSizePowerOfTwo(width, height);\r\n\r\n // Update the Frame\r\n this.frames[\'__BASE\'].setSize(width, height, 0, 0);\r\n\r\n this.refresh();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.CanvasTexture#destroy\r\n * @since 3.16.0\r\n */\r\n destroy: function ()\r\n {\r\n Texture.prototype.destroy.call(this);\r\n\r\n this._source = null;\r\n this.canvas = null;\r\n this.context = null;\r\n this.imageData = null;\r\n this.data = null;\r\n this.pixels = null;\r\n this.buffer = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = CanvasTexture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/CanvasTexture.js?')},"./node_modules/phaser/src/textures/Frame.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar Clamp = __webpack_require__(/*! ../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Frame is a section of a Texture.\r\n *\r\n * @class Frame\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this Frame is a part of.\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n */\r\nvar Frame = new Class({\r\n\r\n initialize:\r\n\r\n function Frame (texture, name, sourceIndex, x, y, width, height)\r\n {\r\n /**\r\n * The Texture this Frame is a part of.\r\n *\r\n * @name Phaser.Textures.Frame#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The name of this Frame.\r\n * The name is unique within the Texture.\r\n *\r\n * @name Phaser.Textures.Frame#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The TextureSource this Frame is part of.\r\n *\r\n * @name Phaser.Textures.Frame#source\r\n * @type {Phaser.Textures.TextureSource}\r\n * @since 3.0.0\r\n */\r\n this.source = texture.source[sourceIndex];\r\n\r\n /**\r\n * The index of the TextureSource in the Texture sources array.\r\n *\r\n * @name Phaser.Textures.Frame#sourceIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.sourceIndex = sourceIndex;\r\n\r\n /**\r\n * A reference to the Texture Source WebGL Texture that this Frame is using.\r\n *\r\n * @name Phaser.Textures.Frame#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.11.0\r\n */\r\n this.glTexture = this.source.glTexture;\r\n\r\n /**\r\n * X position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutX;\r\n\r\n /**\r\n * Y position within the source image to cut from.\r\n *\r\n * @name Phaser.Textures.Frame#cutY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutY;\r\n\r\n /**\r\n * The width of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutWidth;\r\n\r\n /**\r\n * The height of the area in the source image to cut.\r\n *\r\n * @name Phaser.Textures.Frame#cutHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.cutHeight;\r\n\r\n /**\r\n * The X rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#x\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.x = 0;\r\n\r\n /**\r\n * The Y rendering offset of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#y\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.y = 0;\r\n\r\n /**\r\n * The rendering width of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width;\r\n\r\n /**\r\n * The rendering height of this Frame, taking trim into account.\r\n *\r\n * @name Phaser.Textures.Frame#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height;\r\n\r\n /**\r\n * Half the width, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfWidth;\r\n\r\n /**\r\n * Half the height, floored.\r\n * Precalculated for the renderer.\r\n *\r\n * @name Phaser.Textures.Frame#halfHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.halfHeight;\r\n\r\n /**\r\n * The x center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerX\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerX;\r\n\r\n /**\r\n * The y center of this frame, floored.\r\n *\r\n * @name Phaser.Textures.Frame#centerY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.centerY;\r\n\r\n /**\r\n * The horizontal pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotX\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotX = 0;\r\n\r\n /**\r\n * The vertical pivot point of this Frame.\r\n *\r\n * @name Phaser.Textures.Frame#pivotY\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.pivotY = 0;\r\n\r\n /**\r\n * Does this Frame have a custom pivot point?\r\n *\r\n * @name Phaser.Textures.Frame#customPivot\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.customPivot = false;\r\n\r\n /**\r\n * **CURRENTLY UNSUPPORTED**\r\n *\r\n * Is this frame is rotated or not in the Texture?\r\n * Rotation allows you to use rotated frames in texture atlas packing.\r\n * It has nothing to do with Sprite rotation.\r\n *\r\n * @name Phaser.Textures.Frame#rotated\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.rotated = false;\r\n\r\n /**\r\n * Over-rides the Renderer setting.\r\n * -1 = use Renderer Setting\r\n * 0 = No rounding\r\n * 1 = Round\r\n *\r\n * @name Phaser.Textures.Frame#autoRound\r\n * @type {integer}\r\n * @default -1\r\n * @since 3.0.0\r\n */\r\n this.autoRound = -1;\r\n\r\n /**\r\n * Any Frame specific custom data can be stored here.\r\n *\r\n * @name Phaser.Textures.Frame#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * WebGL UV u0 value.\r\n *\r\n * @name Phaser.Textures.Frame#u0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u0 = 0;\r\n\r\n /**\r\n * WebGL UV v0 value.\r\n *\r\n * @name Phaser.Textures.Frame#v0\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v0 = 0;\r\n\r\n /**\r\n * WebGL UV u1 value.\r\n *\r\n * @name Phaser.Textures.Frame#u1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.u1 = 0;\r\n\r\n /**\r\n * WebGL UV v1 value.\r\n *\r\n * @name Phaser.Textures.Frame#v1\r\n * @type {number}\r\n * @default 0\r\n * @since 3.11.0\r\n */\r\n this.v1 = 0;\r\n\r\n /**\r\n * The un-modified source frame, trim and UV data.\r\n *\r\n * @name Phaser.Textures.Frame#data\r\n * @type {object}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.data = {\r\n cut: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n trim: false,\r\n sourceSize: {\r\n w: 0,\r\n h: 0\r\n },\r\n spriteSourceSize: {\r\n x: 0,\r\n y: 0,\r\n w: 0,\r\n h: 0,\r\n r: 0,\r\n b: 0\r\n },\r\n radius: 0,\r\n drawImage: {\r\n x: 0,\r\n y: 0,\r\n width: 0,\r\n height: 0\r\n }\r\n };\r\n\r\n this.setSize(width, height, x, y);\r\n },\r\n\r\n /**\r\n * Sets the width, height, x and y of this Frame.\r\n * \r\n * This is called automatically by the constructor\r\n * and should rarely be changed on-the-fly.\r\n *\r\n * @method Phaser.Textures.Frame#setSize\r\n * @since 3.7.0\r\n *\r\n * @param {integer} width - The width of the frame before being trimmed.\r\n * @param {integer} height - The height of the frame before being trimmed.\r\n * @param {integer} [x=0] - The x coordinate of the top-left of this Frame.\r\n * @param {integer} [y=0] - The y coordinate of the top-left of this Frame.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setSize: function (width, height, x, y)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n\r\n this.cutX = x;\r\n this.cutY = y;\r\n this.cutWidth = width;\r\n this.cutHeight = height;\r\n\r\n this.width = width;\r\n this.height = height;\r\n\r\n this.halfWidth = Math.floor(width * 0.5);\r\n this.halfHeight = Math.floor(height * 0.5);\r\n\r\n this.centerX = Math.floor(width / 2);\r\n this.centerY = Math.floor(height / 2);\r\n\r\n var data = this.data;\r\n var cut = data.cut;\r\n\r\n cut.x = x;\r\n cut.y = y;\r\n cut.w = width;\r\n cut.h = height;\r\n cut.r = x + width;\r\n cut.b = y + height;\r\n\r\n data.sourceSize.w = width;\r\n data.sourceSize.h = height;\r\n\r\n data.spriteSourceSize.w = width;\r\n data.spriteSourceSize.h = height;\r\n\r\n data.radius = 0.5 * Math.sqrt(width * width + height * height);\r\n\r\n var drawImage = data.drawImage;\r\n\r\n drawImage.x = x;\r\n drawImage.y = y;\r\n drawImage.width = width;\r\n drawImage.height = height;\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * If the frame was trimmed when added to the Texture Atlas, this records the trim and source data.\r\n *\r\n * @method Phaser.Textures.Frame#setTrim\r\n * @since 3.0.0\r\n *\r\n * @param {number} actualWidth - The width of the frame before being trimmed.\r\n * @param {number} actualHeight - The height of the frame before being trimmed.\r\n * @param {number} destX - The destination X position of the trimmed frame for display.\r\n * @param {number} destY - The destination Y position of the trimmed frame for display.\r\n * @param {number} destWidth - The destination width of the trimmed frame for display.\r\n * @param {number} destHeight - The destination height of the trimmed frame for display.\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n setTrim: function (actualWidth, actualHeight, destX, destY, destWidth, destHeight)\r\n {\r\n var data = this.data;\r\n var ss = data.spriteSourceSize;\r\n\r\n // Store actual values\r\n\r\n data.trim = true;\r\n\r\n data.sourceSize.w = actualWidth;\r\n data.sourceSize.h = actualHeight;\r\n\r\n ss.x = destX;\r\n ss.y = destY;\r\n ss.w = destWidth;\r\n ss.h = destHeight;\r\n ss.r = destX + destWidth;\r\n ss.b = destY + destHeight;\r\n\r\n // Adjust properties\r\n this.x = destX;\r\n this.y = destY;\r\n\r\n this.width = destWidth;\r\n this.height = destHeight;\r\n\r\n this.halfWidth = destWidth * 0.5;\r\n this.halfHeight = destHeight * 0.5;\r\n\r\n this.centerX = Math.floor(destWidth / 2);\r\n this.centerY = Math.floor(destHeight / 2);\r\n\r\n return this.updateUVs();\r\n },\r\n\r\n /**\r\n * Takes a crop data object and, based on the rectangular region given, calculates the\r\n * required UV coordinates in order to crop this Frame for WebGL and Canvas rendering.\r\n * \r\n * This is called directly by the Game Object Texture Components `setCrop` method.\r\n * Please use that method to crop a Game Object.\r\n *\r\n * @method Phaser.Textures.Frame#setCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {number} x - The x coordinate to start the crop from. Cannot be negative or exceed the Frame width.\r\n * @param {number} y - The y coordinate to start the crop from. Cannot be negative or exceed the Frame height.\r\n * @param {number} width - The width of the crop rectangle. Cannot exceed the Frame width.\r\n * @param {number} height - The height of the crop rectangle. Cannot exceed the Frame height.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n setCropUVs: function (crop, x, y, width, height, flipX, flipY)\r\n {\r\n // Clamp the input values\r\n\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n var rw = this.realWidth;\r\n var rh = this.realHeight;\r\n\r\n x = Clamp(x, 0, rw);\r\n y = Clamp(y, 0, rh);\r\n\r\n width = Clamp(width, 0, rw - x);\r\n height = Clamp(height, 0, rh - y);\r\n\r\n var ox = cx + x;\r\n var oy = cy + y;\r\n var ow = width;\r\n var oh = height;\r\n\r\n var data = this.data;\r\n\r\n if (data.trim)\r\n {\r\n var ss = data.spriteSourceSize;\r\n\r\n // Need to check for intersection between the cut area and the crop area\r\n // If there is none, we set UV to be empty, otherwise set it to be the intersection area\r\n\r\n width = Clamp(width, 0, cw - x);\r\n height = Clamp(height, 0, ch - y);\r\n \r\n var cropRight = x + width;\r\n var cropBottom = y + height;\r\n\r\n var intersects = !(ss.r < x || ss.b < y || ss.x > cropRight || ss.y > cropBottom);\r\n\r\n if (intersects)\r\n {\r\n var ix = Math.max(ss.x, x);\r\n var iy = Math.max(ss.y, y);\r\n var iw = Math.min(ss.r, cropRight) - ix;\r\n var ih = Math.min(ss.b, cropBottom) - iy;\r\n\r\n ow = iw;\r\n oh = ih;\r\n \r\n if (flipX)\r\n {\r\n ox = cx + (cw - (ix - ss.x) - iw);\r\n }\r\n else\r\n {\r\n ox = cx + (ix - ss.x);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - (iy - ss.y) - ih);\r\n }\r\n else\r\n {\r\n oy = cy + (iy - ss.y);\r\n }\r\n\r\n x = ix;\r\n y = iy;\r\n\r\n width = iw;\r\n height = ih;\r\n }\r\n else\r\n {\r\n ox = 0;\r\n oy = 0;\r\n ow = 0;\r\n oh = 0;\r\n }\r\n }\r\n else\r\n {\r\n if (flipX)\r\n {\r\n ox = cx + (cw - x - width);\r\n }\r\n \r\n if (flipY)\r\n {\r\n oy = cy + (ch - y - height);\r\n }\r\n }\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n // Map the given coordinates into UV space, clamping to the 0-1 range.\r\n\r\n crop.u0 = Math.max(0, ox / tw);\r\n crop.v0 = Math.max(0, oy / th);\r\n crop.u1 = Math.min(1, (ox + ow) / tw);\r\n crop.v1 = Math.min(1, (oy + oh) / th);\r\n\r\n crop.x = x;\r\n crop.y = y;\r\n\r\n crop.cx = ox;\r\n crop.cy = oy;\r\n crop.cw = ow;\r\n crop.ch = oh;\r\n\r\n crop.width = width;\r\n crop.height = height;\r\n\r\n crop.flipX = flipX;\r\n crop.flipY = flipY;\r\n\r\n return crop;\r\n },\r\n\r\n /**\r\n * Takes a crop data object and recalculates the UVs based on the dimensions inside the crop object.\r\n * Called automatically by `setFrame`.\r\n *\r\n * @method Phaser.Textures.Frame#updateCropUVs\r\n * @since 3.11.0\r\n * \r\n * @param {object} crop - The crop data object. This is the `GameObject._crop` property.\r\n * @param {boolean} flipX - Does the parent Game Object have flipX set?\r\n * @param {boolean} flipY - Does the parent Game Object have flipY set?\r\n *\r\n * @return {object} The updated crop data object.\r\n */\r\n updateCropUVs: function (crop, flipX, flipY)\r\n {\r\n return this.setCropUVs(crop, crop.x, crop.y, crop.width, crop.height, flipX, flipY);\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache and the drawImage cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVs\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVs: function ()\r\n {\r\n var cx = this.cutX;\r\n var cy = this.cutY;\r\n var cw = this.cutWidth;\r\n var ch = this.cutHeight;\r\n\r\n // Canvas data\r\n\r\n var cd = this.data.drawImage;\r\n\r\n cd.width = cw;\r\n cd.height = ch;\r\n\r\n // WebGL data\r\n\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = cx / tw;\r\n this.v0 = cy / th;\r\n\r\n this.u1 = (cx + cw) / tw;\r\n this.v1 = (cy + ch) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the internal WebGL UV cache.\r\n *\r\n * @method Phaser.Textures.Frame#updateUVsInverted\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} This Frame object.\r\n */\r\n updateUVsInverted: function ()\r\n {\r\n var tw = this.source.width;\r\n var th = this.source.height;\r\n\r\n this.u0 = (this.cutX + this.cutHeight) / tw;\r\n this.v0 = this.cutY / th;\r\n\r\n this.u1 = this.cutX / tw;\r\n this.v1 = (this.cutY + this.cutWidth) / th;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Clones this Frame into a new Frame object.\r\n *\r\n * @method Phaser.Textures.Frame#clone\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Textures.Frame} A clone of this Frame.\r\n */\r\n clone: function ()\r\n {\r\n var clone = new Frame(this.texture, this.name, this.sourceIndex);\r\n\r\n clone.cutX = this.cutX;\r\n clone.cutY = this.cutY;\r\n clone.cutWidth = this.cutWidth;\r\n clone.cutHeight = this.cutHeight;\r\n\r\n clone.x = this.x;\r\n clone.y = this.y;\r\n\r\n clone.width = this.width;\r\n clone.height = this.height;\r\n\r\n clone.halfWidth = this.halfWidth;\r\n clone.halfHeight = this.halfHeight;\r\n\r\n clone.centerX = this.centerX;\r\n clone.centerY = this.centerY;\r\n\r\n clone.rotated = this.rotated;\r\n\r\n clone.data = Extend(true, clone.data, this.data);\r\n\r\n clone.updateUVs();\r\n\r\n return clone;\r\n },\r\n\r\n /**\r\n * Destroys this Frame by nulling its reference to the parent Texture and and data objects.\r\n *\r\n * @method Phaser.Textures.Frame#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.source = null;\r\n this.texture = null;\r\n this.glTexture = null;\r\n this.customData = null;\r\n this.data = null;\r\n },\r\n\r\n /**\r\n * The width of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realWidth\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realWidth: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.w;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The height of the Frame in its un-trimmed, un-padded state, as prepared in the art package,\r\n * before being packed.\r\n *\r\n * @name Phaser.Textures.Frame#realHeight\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n realHeight: {\r\n\r\n get: function ()\r\n {\r\n return this.data.sourceSize.h;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The radius of the Frame (derived from sqrt(w * w + h * h) / 2)\r\n *\r\n * @name Phaser.Textures.Frame#radius\r\n * @type {number}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n radius: {\r\n\r\n get: function ()\r\n {\r\n return this.data.radius;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * Is the Frame trimmed or not?\r\n *\r\n * @name Phaser.Textures.Frame#trimmed\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n trimmed: {\r\n\r\n get: function ()\r\n {\r\n return this.data.trim;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The Canvas drawImage data object.\r\n *\r\n * @name Phaser.Textures.Frame#canvasData\r\n * @type {object}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canvasData: {\r\n\r\n get: function ()\r\n {\r\n return this.data.drawImage;\r\n }\r\n\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Frame;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Frame.js?')},"./node_modules/phaser/src/textures/Texture.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Frame = __webpack_require__(/*! ./Frame */ \"./node_modules/phaser/src/textures/Frame.js\");\r\nvar TextureSource = __webpack_require__(/*! ./TextureSource */ \"./node_modules/phaser/src/textures/TextureSource.js\");\r\n\r\nvar TEXTURE_MISSING_ERROR = 'Texture.frame missing: ';\r\n\r\n/**\r\n * @classdesc\r\n * A Texture consists of a source, usually an Image from the Cache, and a collection of Frames.\r\n * The Frames represent the different areas of the Texture. For example a texture atlas\r\n * may have many Frames, one for each element within the atlas. Where-as a single image would have\r\n * just one frame, that encompasses the whole image.\r\n * \r\n * Every Texture, no matter where it comes from, always has at least 1 frame called the `__BASE` frame.\r\n * This frame represents the entirety of the source image.\r\n *\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * @class Texture\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureManager} manager - A reference to the Texture Manager this Texture belongs to.\r\n * @param {string} key - The unique string-based key of this Texture.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} source - An array of sources that are used to create the texture. Usually Images, but can also be a Canvas.\r\n * @param {number} [width] - The width of the Texture. This is optional and automatically derived from the source images.\r\n * @param {number} [height] - The height of the Texture. This is optional and automatically derived from the source images.\r\n */\r\nvar Texture = new Class({\r\n\r\n initialize:\r\n\r\n function Texture (manager, key, source, width, height)\r\n {\r\n if (!Array.isArray(source))\r\n {\r\n source = [ source ];\r\n }\r\n\r\n /**\r\n * A reference to the Texture Manager this Texture belongs to.\r\n *\r\n * @name Phaser.Textures.Texture#manager\r\n * @type {Phaser.Textures.TextureManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * The unique string-based key of this Texture.\r\n *\r\n * @name Phaser.Textures.Texture#key\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.key = key;\r\n\r\n /**\r\n * An array of TextureSource instances.\r\n * These are unique to this Texture and contain the actual Image (or Canvas) data.\r\n *\r\n * @name Phaser.Textures.Texture#source\r\n * @type {Phaser.Textures.TextureSource[]}\r\n * @since 3.0.0\r\n */\r\n this.source = [];\r\n\r\n /**\r\n * An array of TextureSource data instances.\r\n * Used to store additional data images, such as normal maps or specular maps.\r\n *\r\n * @name Phaser.Textures.Texture#dataSource\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.dataSource = [];\r\n\r\n /**\r\n * A key-value object pair associating the unique Frame keys with the Frames objects.\r\n *\r\n * @name Phaser.Textures.Texture#frames\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.frames = {};\r\n\r\n /**\r\n * Any additional data that was set in the source JSON (if any),\r\n * or any extra data you'd like to store relating to this texture\r\n *\r\n * @name Phaser.Textures.Texture#customData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.customData = {};\r\n\r\n /**\r\n * The name of the first frame of the Texture.\r\n *\r\n * @name Phaser.Textures.Texture#firstFrame\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.firstFrame = '__BASE';\r\n\r\n /**\r\n * The total number of Frames in this Texture, including the `__BASE` frame.\r\n * \r\n * A Texture will always contain at least 1 frame because every Texture contains a `__BASE` frame by default,\r\n * in addition to any extra frames that have been added to it, such as when parsing a Sprite Sheet or Texture Atlas.\r\n *\r\n * @name Phaser.Textures.Texture#frameTotal\r\n * @type {integer}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.frameTotal = 0;\r\n\r\n // Load the Sources\r\n for (var i = 0; i < source.length; i++)\r\n {\r\n this.source.push(new TextureSource(this, source[i], width, height));\r\n }\r\n },\r\n\r\n /**\r\n * Adds a new Frame to this Texture.\r\n *\r\n * A Frame is a rectangular region of a TextureSource with a unique index or string-based key.\r\n * \r\n * The name given must be unique within this Texture. If it already exists, this method will return `null`.\r\n *\r\n * @method Phaser.Textures.Texture#add\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} name - The name of this Frame. The name is unique within the Texture.\r\n * @param {integer} sourceIndex - The index of the TextureSource that this Frame is a part of.\r\n * @param {number} x - The x coordinate of the top-left of this Frame.\r\n * @param {number} y - The y coordinate of the top-left of this Frame.\r\n * @param {number} width - The width of this Frame.\r\n * @param {number} height - The height of this Frame.\r\n *\r\n * @return {?Phaser.Textures.Frame} The Frame that was added to this Texture, or `null` if the given name already exists.\r\n */\r\n add: function (name, sourceIndex, x, y, width, height)\r\n {\r\n if (this.has(name))\r\n {\r\n return null;\r\n }\r\n\r\n var frame = new Frame(this, name, sourceIndex, x, y, width, height);\r\n\r\n this.frames[name] = frame;\r\n\r\n // Set the first frame of the Texture (other than __BASE)\r\n // This is used to ensure we don't spam the display with entire\r\n // atlases of sprite sheets, but instead just the first frame of them\r\n // should the dev incorrectly specify the frame index\r\n if (this.firstFrame === '__BASE')\r\n {\r\n this.firstFrame = name;\r\n }\r\n\r\n this.frameTotal++;\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Removes the given Frame from this Texture. The Frame is destroyed immediately.\r\n * \r\n * Any Game Objects using this Frame should stop using it _before_ you remove it,\r\n * as it does not happen automatically.\r\n *\r\n * @method Phaser.Textures.Texture#remove\r\n * @since 3.19.0\r\n *\r\n * @param {string} name - The key of the Frame to remove.\r\n *\r\n * @return {boolean} True if a Frame with the matching key was removed from this Texture.\r\n */\r\n remove: function (name)\r\n {\r\n if (this.has(name))\r\n {\r\n var frame = this.get(name);\r\n\r\n frame.destroy();\r\n\r\n delete this.frames[name];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Checks to see if a Frame matching the given key exists within this Texture.\r\n *\r\n * @method Phaser.Textures.Texture#has\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The key of the Frame to check for.\r\n *\r\n * @return {boolean} True if a Frame with the matching key exists in this Texture.\r\n */\r\n has: function (name)\r\n {\r\n return (this.frames[name]);\r\n },\r\n\r\n /**\r\n * Gets a Frame from this Texture based on either the key or the index of the Frame.\r\n *\r\n * In a Texture Atlas Frames are typically referenced by a key.\r\n * In a Sprite Sheet Frames are referenced by an index.\r\n * Passing no value for the name returns the base texture.\r\n *\r\n * @method Phaser.Textures.Texture#get\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} The Texture Frame.\r\n */\r\n get: function (name)\r\n {\r\n // null, undefined, empty string, zero\r\n if (!name)\r\n {\r\n name = this.firstFrame;\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n frame = this.frames[this.firstFrame];\r\n }\r\n\r\n return frame;\r\n },\r\n\r\n /**\r\n * Takes the given TextureSource and returns the index of it within this Texture.\r\n * If it's not in this Texture, it returns -1.\r\n * Unless this Texture has multiple TextureSources, such as with a multi-atlas, this\r\n * method will always return zero or -1.\r\n *\r\n * @method Phaser.Textures.Texture#getTextureSourceIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.TextureSource} source - The TextureSource to check.\r\n *\r\n * @return {integer} The index of the TextureSource within this Texture, or -1 if not in this Texture.\r\n */\r\n getTextureSourceIndex: function (source)\r\n {\r\n for (var i = 0; i < this.source.length; i++)\r\n {\r\n if (this.source[i] === source)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n },\r\n\r\n /**\r\n * Returns an array of all the Frames in the given TextureSource.\r\n *\r\n * @method Phaser.Textures.Texture#getFramesFromTextureSource\r\n * @since 3.0.0\r\n *\r\n * @param {integer} sourceIndex - The index of the TextureSource to get the Frames from.\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {Phaser.Textures.Frame[]} An array of Texture Frames.\r\n */\r\n getFramesFromTextureSource: function (sourceIndex, includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = [];\r\n\r\n for (var frameName in this.frames)\r\n {\r\n if (frameName === '__BASE' && !includeBase)\r\n {\r\n continue;\r\n }\r\n\r\n var frame = this.frames[frameName];\r\n\r\n if (frame.sourceIndex === sourceIndex)\r\n {\r\n out.push(frame);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Returns an array with all of the names of the Frames in this Texture.\r\n *\r\n * Useful if you want to randomly assign a Frame to a Game Object, as you can\r\n * pick a random element from the returned array.\r\n *\r\n * @method Phaser.Textures.Texture#getFrameNames\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [includeBase=false] - Include the `__BASE` Frame in the output array?\r\n *\r\n * @return {string[]} An array of all Frame names in this Texture.\r\n */\r\n getFrameNames: function (includeBase)\r\n {\r\n if (includeBase === undefined) { includeBase = false; }\r\n\r\n var out = Object.keys(this.frames);\r\n\r\n if (!includeBase)\r\n {\r\n var idx = out.indexOf('__BASE');\r\n\r\n if (idx !== -1)\r\n {\r\n out.splice(idx, 1);\r\n }\r\n }\r\n\r\n return out;\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the source image it uses to render with.\r\n *\r\n * This will return the actual DOM Image or Canvas element.\r\n *\r\n * @method Phaser.Textures.Texture#getSourceImage\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture)} The DOM Image, Canvas Element or Render Texture.\r\n */\r\n getSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n\r\n if (frame)\r\n {\r\n return frame.source.image;\r\n }\r\n else\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n return this.frames['__BASE'].source.image;\r\n }\r\n },\r\n\r\n /**\r\n * Given a Frame name, return the data source image it uses to render with.\r\n * You can use this to get the normal map for an image for example.\r\n *\r\n * This will return the actual DOM Image.\r\n *\r\n * @method Phaser.Textures.Texture#getDataSourceImage\r\n * @since 3.7.0\r\n *\r\n * @param {(string|integer)} [name] - The string-based name, or integer based index, of the Frame to get from this Texture.\r\n *\r\n * @return {(HTMLImageElement|HTMLCanvasElement)} The DOM Image or Canvas Element.\r\n */\r\n getDataSourceImage: function (name)\r\n {\r\n if (name === undefined || name === null || this.frameTotal === 1)\r\n {\r\n name = '__BASE';\r\n }\r\n\r\n var frame = this.frames[name];\r\n var idx;\r\n\r\n if (!frame)\r\n {\r\n console.warn(TEXTURE_MISSING_ERROR + name);\r\n\r\n idx = this.frames['__BASE'].sourceIndex;\r\n }\r\n else\r\n {\r\n idx = frame.sourceIndex;\r\n }\r\n\r\n return this.dataSource[idx].image;\r\n },\r\n\r\n /**\r\n * Adds a data source image to this Texture.\r\n *\r\n * An example of a data source image would be a normal map, where all of the Frames for this Texture\r\n * equally apply to the normal map.\r\n *\r\n * @method Phaser.Textures.Texture#setDataSource\r\n * @since 3.0.0\r\n *\r\n * @param {(HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[])} data - The source image.\r\n */\r\n setDataSource: function (data)\r\n {\r\n if (!Array.isArray(data))\r\n {\r\n data = [ data ];\r\n }\r\n \r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var source = this.source[i];\r\n\r\n this.dataSource.push(new TextureSource(this, data[i], source.width, source.height));\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * The mode applies to the entire Texture, not just a specific Frame of it.\r\n *\r\n * @method Phaser.Textures.Texture#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].setFilter(filterMode);\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].setFilter(filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture and releases references to its sources and frames.\r\n *\r\n * @method Phaser.Textures.Texture#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this.source.length; i++)\r\n {\r\n this.source[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this.dataSource.length; i++)\r\n {\r\n this.dataSource[i].destroy();\r\n }\r\n\r\n for (var frameName in this.frames)\r\n {\r\n var frame = this.frames[frameName];\r\n\r\n frame.destroy();\r\n }\r\n\r\n this.source = [];\r\n this.dataSource = [];\r\n this.frames = {};\r\n\r\n this.manager.removeKey(this.key);\r\n\r\n this.manager = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Texture;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/Texture.js?")},"./node_modules/phaser/src/textures/TextureManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ \"./node_modules/phaser/src/display/canvas/CanvasPool.js\");\r\nvar CanvasTexture = __webpack_require__(/*! ./CanvasTexture */ \"./node_modules/phaser/src/textures/CanvasTexture.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Color = __webpack_require__(/*! ../display/color/Color */ \"./node_modules/phaser/src/display/color/Color.js\");\r\nvar CONST = __webpack_require__(/*! ../const */ \"./node_modules/phaser/src/const.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/textures/events/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GenerateTexture = __webpack_require__(/*! ../create/GenerateTexture */ \"./node_modules/phaser/src/create/GenerateTexture.js\");\r\nvar GetValue = __webpack_require__(/*! ../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Parser = __webpack_require__(/*! ./parsers */ \"./node_modules/phaser/src/textures/parsers/index.js\");\r\nvar Texture = __webpack_require__(/*! ./Texture */ \"./node_modules/phaser/src/textures/Texture.js\");\r\n\r\n/**\r\n * @callback EachTextureCallback\r\n *\r\n * @param {Phaser.Textures.Texture} texture - Each texture in Texture Manager.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * Textures are managed by the global TextureManager. This is a singleton class that is\r\n * responsible for creating and delivering Textures and their corresponding Frames to Game Objects.\r\n *\r\n * Sprites and other Game Objects get the texture data they need from the TextureManager.\r\n *\r\n * Access it via `scene.textures`.\r\n *\r\n * @class TextureManager\r\n * @extends Phaser.Events.EventEmitter\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - The Phaser.Game instance this Texture Manager belongs to.\r\n */\r\nvar TextureManager = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function TextureManager (game)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Game that this TextureManager belongs to.\r\n *\r\n * @name Phaser.Textures.TextureManager#game\r\n * @type {Phaser.Game}\r\n * @since 3.0.0\r\n */\r\n this.game = game;\r\n\r\n /**\r\n * The name of this manager.\r\n *\r\n * @name Phaser.Textures.TextureManager#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = 'TextureManager';\r\n\r\n /**\r\n * An object that has all of textures that Texture Manager creates.\r\n * Textures are assigned to keys so we can access to any texture that this object has directly by key value without iteration.\r\n *\r\n * @name Phaser.Textures.TextureManager#list\r\n * @type {object}\r\n * @default {}\r\n * @since 3.0.0\r\n */\r\n this.list = {};\r\n\r\n /**\r\n * The temporary canvas element to save an pixel data of an arbitrary texture in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempCanvas\r\n * @type {HTMLCanvasElement}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempCanvas = CanvasPool.create2D(this, 1, 1);\r\n\r\n /**\r\n * The context of the temporary canvas element made to save an pixel data in getPixel() and getPixelAlpha() method.\r\n *\r\n * @name Phaser.Textures.TextureManager#_tempContext\r\n * @type {CanvasRenderingContext2D}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._tempContext = this._tempCanvas.getContext('2d');\r\n\r\n /**\r\n * An counting value used for emitting 'ready' event after all of managers in game is loaded.\r\n *\r\n * @name Phaser.Textures.TextureManager#_pending\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._pending = 0;\r\n\r\n game.events.once(GameEvents.BOOT, this.boot, this);\r\n },\r\n\r\n /**\r\n * The Boot Handler called by Phaser.Game when it first starts up.\r\n *\r\n * @method Phaser.Textures.TextureManager#boot\r\n * @private\r\n * @since 3.0.0\r\n */\r\n boot: function ()\r\n {\r\n this._pending = 2;\r\n\r\n this.on(Events.LOAD, this.updatePending, this);\r\n this.on(Events.ERROR, this.updatePending, this);\r\n\r\n this.addBase64('__DEFAULT', this.game.config.defaultImage);\r\n this.addBase64('__MISSING', this.game.config.missingImage);\r\n\r\n this.game.events.once(GameEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * After 'onload' or 'onerror' invoked twice, emit 'ready' event.\r\n *\r\n * @method Phaser.Textures.TextureManager#updatePending\r\n * @private\r\n * @since 3.0.0\r\n */\r\n updatePending: function ()\r\n {\r\n this._pending--;\r\n\r\n if (this._pending === 0)\r\n {\r\n this.off(Events.LOAD);\r\n this.off(Events.ERROR);\r\n\r\n this.emit(Events.READY);\r\n }\r\n },\r\n\r\n /**\r\n * Checks the given texture key and throws a console.warn if the key is already in use, then returns false.\r\n * If you wish to avoid the console.warn then use `TextureManager.exists` instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#checkKey\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The texture key to check.\r\n *\r\n * @return {boolean} `true` if it's safe to use the texture key, otherwise `false`.\r\n */\r\n checkKey: function (key)\r\n {\r\n if (this.exists(key))\r\n {\r\n // eslint-disable-next-line no-console\r\n console.error('Texture key already in use: ' + key);\r\n\r\n return false;\r\n }\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Removes a Texture from the Texture Manager and destroys it. This will immediately\r\n * clear all references to it from the Texture Manager, and if it has one, destroy its\r\n * WebGLTexture. This will emit a `removetexture` event.\r\n *\r\n * Note: If you have any Game Objects still using this texture they will start throwing\r\n * errors the next time they try to render. Make sure that removing the texture is the final\r\n * step when clearing down to avoid this.\r\n *\r\n * @method Phaser.Textures.TextureManager#remove\r\n * @fires Phaser.Textures.Events#REMOVE\r\n * @since 3.7.0\r\n *\r\n * @param {(string|Phaser.Textures.Texture)} key - The key of the Texture to remove, or a reference to it.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n remove: function (key)\r\n {\r\n if (typeof key === 'string')\r\n {\r\n if (this.exists(key))\r\n {\r\n key = this.get(key);\r\n }\r\n else\r\n {\r\n console.warn('No texture found matching key: ' + key);\r\n return this;\r\n }\r\n }\r\n\r\n // By this point key should be a Texture, if not, the following fails anyway\r\n if (this.list.hasOwnProperty(key.key))\r\n {\r\n key.destroy();\r\n\r\n this.emit(Events.REMOVE, key.key);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes a key from the Texture Manager but does not destroy the Texture that was using the key.\r\n *\r\n * @method Phaser.Textures.TextureManager#removeKey\r\n * @since 3.17.0\r\n *\r\n * @param {string} key - The key to remove from the texture list.\r\n *\r\n * @return {Phaser.Textures.TextureManager} The Texture Manager.\r\n */\r\n removeKey: function (key)\r\n {\r\n if (this.list.hasOwnProperty(key))\r\n {\r\n delete this.list[key];\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Base64 encoded data.\r\n *\r\n * @method Phaser.Textures.TextureManager#addBase64\r\n * @fires Phaser.Textures.Events#ADD\r\n * @fires Phaser.Textures.Events#ERROR\r\n * @fires Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {*} data - The Base64 encoded data.\r\n * \r\n * @return {this} This Texture Manager instance.\r\n */\r\n addBase64: function (key, data)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var _this = this;\r\n\r\n var image = new Image();\r\n\r\n image.onerror = function ()\r\n {\r\n _this.emit(Events.ERROR, key);\r\n };\r\n\r\n image.onload = function ()\r\n {\r\n var texture = _this.create(key, image);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n _this.emit(Events.ADD, key, texture);\r\n\r\n _this.emit(Events.LOAD, key, texture);\r\n };\r\n\r\n image.src = data;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets an existing texture frame and converts it into a base64 encoded image and returns the base64 data.\r\n * \r\n * You can also provide the image type and encoder options.\r\n * \r\n * This will only work with bitmap based texture frames, such as those created from Texture Atlases.\r\n * It will not work with GL Texture objects, such as Shaders, or Render Textures. For those please\r\n * see the WebGL Snapshot function instead.\r\n *\r\n * @method Phaser.Textures.TextureManager#getBase64\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n * @param {string} [type='image/png'] - [description]\r\n * @param {number} [encoderOptions=0.92] - [description]\r\n * \r\n * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found.\r\n */\r\n getBase64: function (key, frame, type, encoderOptions)\r\n {\r\n if (type === undefined) { type = 'image/png'; }\r\n if (encoderOptions === undefined) { encoderOptions = 0.92; }\r\n\r\n var data = '';\r\n\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame && (textureFrame.source.isRenderTexture || textureFrame.source.isGLTexture))\r\n {\r\n console.warn('Cannot getBase64 from WebGL Texture');\r\n }\r\n else if (textureFrame)\r\n {\r\n var cd = textureFrame.canvasData;\r\n\r\n var canvas = CanvasPool.create2D(this, cd.width, cd.height);\r\n var ctx = canvas.getContext('2d');\r\n\r\n ctx.drawImage(\r\n textureFrame.source.image,\r\n cd.x,\r\n cd.y,\r\n cd.width,\r\n cd.height,\r\n 0,\r\n 0,\r\n cd.width,\r\n cd.height\r\n );\r\n\r\n data = canvas.toDataURL(type, encoderOptions);\r\n\r\n CanvasPool.remove(canvas);\r\n }\r\n\r\n return data;\r\n },\r\n\r\n /**\r\n * Adds a new Texture to the Texture Manager created from the given Image element.\r\n *\r\n * @method Phaser.Textures.TextureManager#addImage\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {HTMLImageElement|HTMLCanvasElement} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addImage: function (key, source, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.Image(texture, 0);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Takes a WebGL Texture and creates a Phaser Texture from it, which is added to the Texture Manager using the given key.\r\n * \r\n * This allows you to then use the Texture as a normal texture for texture based Game Objects like Sprites.\r\n * \r\n * This is a WebGL only feature.\r\n *\r\n * @method Phaser.Textures.TextureManager#addGLTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.19.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {WebGLTexture} glTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addGLTexture: function (key, glTexture, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, glTexture, width, height);\r\n\r\n texture.add('__BASE', 0, 0, 0, width, height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Render Texture to the Texture Manager using the given key.\r\n * This allows you to then use the Render Texture as a normal texture for texture based Game Objects like Sprites.\r\n *\r\n * @method Phaser.Textures.TextureManager#addRenderTexture\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.12.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.GameObjects.RenderTexture} renderTexture - The source Render Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addRenderTexture: function (key, renderTexture)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, renderTexture);\r\n\r\n texture.add('__BASE', 0, 0, 0, renderTexture.width, renderTexture.height);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n \r\n return texture;\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given config values.\r\n * Generated textures consist of a Canvas element to which the texture data is drawn.\r\n * See the Phaser.Create function for the more direct way to create textures.\r\n *\r\n * @method Phaser.Textures.TextureManager#generate\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {object} config - The configuration object needed to generate the texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n generate: function (key, config)\r\n {\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, 1, 1);\r\n\r\n config.canvas = canvas;\r\n\r\n GenerateTexture(config);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using a blank Canvas element of the size given.\r\n *\r\n * Canvas elements are automatically pooled and calling this method will\r\n * extract a free canvas from the CanvasPool, or create one if none are available.\r\n *\r\n * @method Phaser.Textures.TextureManager#createCanvas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {integer} [width=256] - The width of the Canvas element.\r\n * @param {integer} [height=256] - The height of the Canvas element.\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n createCanvas: function (key, width, height)\r\n {\r\n if (width === undefined) { width = 256; }\r\n if (height === undefined) { height = 256; }\r\n\r\n if (this.checkKey(key))\r\n {\r\n var canvas = CanvasPool.create(this, width, height, CONST.CANVAS, true);\r\n\r\n return this.addCanvas(key, canvas);\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Creates a new Canvas Texture object from an existing Canvas element\r\n * and adds it to this Texture Manager, unless `skipCache` is true.\r\n *\r\n * @method Phaser.Textures.TextureManager#addCanvas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLCanvasElement} source - The Canvas element to form the base of the new Texture.\r\n * @param {boolean} [skipCache=false] - Skip adding this Texture into the Cache?\r\n *\r\n * @return {?Phaser.Textures.CanvasTexture} The Canvas Texture that was created, or `null` if the key is already in use.\r\n */\r\n addCanvas: function (key, source, skipCache)\r\n {\r\n if (skipCache === undefined) { skipCache = false; }\r\n\r\n var texture = null;\r\n\r\n if (skipCache)\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n }\r\n else if (this.checkKey(key))\r\n {\r\n texture = new CanvasTexture(this, key, source, source.width, source.height);\r\n\r\n this.list[key] = texture;\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a new Texture Atlas to this Texture Manager.\r\n * It can accept either JSON Array or JSON Hash formats, as exported by Texture Packer and similar software.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlas\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlas: function (key, source, data, dataSource)\r\n {\r\n // New Texture Packer format?\r\n if (Array.isArray(data.textures) || Array.isArray(data.frames))\r\n {\r\n return this.addAtlasJSONArray(key, source, data, dataSource);\r\n }\r\n else\r\n {\r\n return this.addAtlasJSONHash(key, source, data, dataSource);\r\n }\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Array within the JSON.\r\n * This is known as a JSON Array in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONArray\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(HTMLImageElement|HTMLImageElement[])} source - The source Image element/s.\r\n * @param {(object|object[])} data - The Texture Atlas data/s.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONArray: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n // Multi-Atlas?\r\n if (Array.isArray(data))\r\n {\r\n var singleAtlasFile = (data.length === 1); // multi-pack with one atlas file for all images\r\n\r\n // !! Assumes the textures are in the same order in the source array as in the json data !!\r\n for (var i = 0; i < texture.source.length; i++)\r\n {\r\n var atlasData = singleAtlasFile ? data[0] : data[i];\r\n\r\n Parser.JSONArray(texture, i, atlasData);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONArray(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager.\r\n * The frame data of the atlas must be stored in an Object within the JSON.\r\n * This is known as a JSON Hash in software such as Texture Packer.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasJSONHash\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasJSONHash: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n if (Array.isArray(data))\r\n {\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n Parser.JSONHash(texture, i, data[i]);\r\n }\r\n }\r\n else\r\n {\r\n Parser.JSONHash(texture, 0, data);\r\n }\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Texture Atlas to this Texture Manager, where the atlas data is given\r\n * in the XML format.\r\n *\r\n * @method Phaser.Textures.TextureManager#addAtlasXML\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.7.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas XML data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addAtlasXML: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n \r\n Parser.AtlasXML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Unity Texture Atlas to this Texture Manager.\r\n * The data must be in the form of a Unity YAML file.\r\n *\r\n * @method Phaser.Textures.TextureManager#addUnityAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {object} data - The Texture Atlas data.\r\n * @param {HTMLImageElement|HTMLCanvasElement|HTMLImageElement[]|HTMLCanvasElement[]} [dataSource] - An optional data Image element.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addUnityAtlas: function (key, source, data, dataSource)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n Parser.UnityYAML(texture, 0, data);\r\n\r\n if (dataSource)\r\n {\r\n texture.setDataSource(dataSource);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheet\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {Phaser.Types.Textures.SpriteSheetConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheet: function (key, source, config)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = this.create(key, source);\r\n\r\n var width = texture.source[0].width;\r\n var height = texture.source[0].height;\r\n\r\n Parser.SpriteSheet(texture, 0, 0, 0, width, height, config);\r\n\r\n this.emit(Events.ADD, key, texture);\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Adds a Sprite Sheet to this Texture Manager, where the Sprite Sheet exists as a Frame within a Texture Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @method Phaser.Textures.TextureManager#addSpriteSheetFromAtlas\r\n * @fires Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {Phaser.Types.Textures.SpriteSheetFromAtlasConfig} config - The configuration object for this Sprite Sheet.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n addSpriteSheetFromAtlas: function (key, config)\r\n {\r\n if (!this.checkKey(key))\r\n {\r\n return null;\r\n }\r\n\r\n var atlasKey = GetValue(config, 'atlas', null);\r\n var atlasFrame = GetValue(config, 'frame', null);\r\n\r\n if (!atlasKey || !atlasFrame)\r\n {\r\n return;\r\n }\r\n\r\n var atlas = this.get(atlasKey);\r\n var sheet = atlas.get(atlasFrame);\r\n\r\n if (sheet)\r\n {\r\n var texture = this.create(key, sheet.source.image);\r\n\r\n if (sheet.trimmed)\r\n {\r\n // If trimmed we need to help the parser adjust\r\n Parser.SpriteSheetFromAtlas(texture, sheet, config);\r\n }\r\n else\r\n {\r\n Parser.SpriteSheet(texture, 0, sheet.cutX, sheet.cutY, sheet.cutWidth, sheet.cutHeight, config);\r\n }\r\n\r\n this.emit(Events.ADD, key, texture);\r\n\r\n return texture;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new Texture using the given source and dimensions.\r\n *\r\n * @method Phaser.Textures.TextureManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {HTMLImageElement} source - The source Image element.\r\n * @param {integer} width - The width of the Texture.\r\n * @param {integer} height - The height of the Texture.\r\n *\r\n * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use.\r\n */\r\n create: function (key, source, width, height)\r\n {\r\n var texture = null;\r\n\r\n if (this.checkKey(key))\r\n {\r\n texture = new Texture(this, key, source, width, height);\r\n\r\n this.list[key] = texture;\r\n }\r\n\r\n return texture;\r\n },\r\n\r\n /**\r\n * Checks the given key to see if a Texture using it exists within this Texture Manager.\r\n *\r\n * @method Phaser.Textures.TextureManager#exists\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {boolean} Returns `true` if a Texture matching the given key exists in this Texture Manager.\r\n */\r\n exists: function (key)\r\n {\r\n return (this.list.hasOwnProperty(key));\r\n },\r\n\r\n /**\r\n * Returns a Texture from the Texture Manager that matches the given key.\r\n * If the key is undefined it will return the `__DEFAULT` Texture.\r\n * If the key is given, but not found, it will return the `__MISSING` Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#get\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture that was created.\r\n */\r\n get: function (key)\r\n {\r\n if (key === undefined) { key = '__DEFAULT'; }\r\n\r\n if (this.list[key])\r\n {\r\n return this.list[key];\r\n }\r\n else\r\n {\r\n return this.list['__MISSING'];\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a clone of that Frame if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#cloneFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} frame - The string or index of the Frame to be cloned.\r\n *\r\n * @return {Phaser.Textures.Frame} A Clone of the given Frame.\r\n */\r\n cloneFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame).clone();\r\n }\r\n },\r\n\r\n /**\r\n * Takes a Texture key and Frame name and returns a reference to that Frame, if found.\r\n *\r\n * @method Phaser.Textures.TextureManager#getFrame\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture.\r\n *\r\n * @return {Phaser.Textures.Frame} A Texture Frame object.\r\n */\r\n getFrame: function (key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n return this.list[key].get(frame);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array with all of the keys of all Textures in this Texture Manager.\r\n * The output array will exclude the `__DEFAULT` and `__MISSING` keys.\r\n *\r\n * @method Phaser.Textures.TextureManager#getTextureKeys\r\n * @since 3.0.0\r\n *\r\n * @return {string[]} An array containing all of the Texture keys stored in this Texture Manager.\r\n */\r\n getTextureKeys: function ()\r\n {\r\n var output = [];\r\n\r\n for (var key in this.list)\r\n {\r\n if (key !== '__DEFAULT' && key !== '__MISSING')\r\n {\r\n output.push(key);\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a new\r\n * Color object that has been populated with the color and alpha values of the pixel\r\n * at that location in the Texture.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixel\r\n * @since 3.0.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {?Phaser.Display.Color} A Color object populated with the color values of the requested pixel,\r\n * or `null` if the coordinates were out of bounds.\r\n */\r\n getPixel: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n\r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n\r\n return new Color(rgb.data[0], rgb.data[1], rgb.data[2], rgb.data[3]);\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Given a Texture and an `x` and `y` coordinate this method will return a value between 0 and 255\r\n * corresponding to the alpha value of the pixel at that location in the Texture. If the coordinate\r\n * is out of bounds it will return null.\r\n *\r\n * @method Phaser.Textures.TextureManager#getPixelAlpha\r\n * @since 3.10.0\r\n *\r\n * @param {integer} x - The x coordinate of the pixel within the Texture.\r\n * @param {integer} y - The y coordinate of the pixel within the Texture.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {integer} A value between 0 and 255, or `null` if the coordinates were out of bounds.\r\n */\r\n getPixelAlpha: function (x, y, key, frame)\r\n {\r\n var textureFrame = this.getFrame(key, frame);\r\n\r\n if (textureFrame)\r\n {\r\n // Adjust for trim (if not trimmed x and y are just zero)\r\n x -= textureFrame.x;\r\n y -= textureFrame.y;\r\n\r\n var data = textureFrame.data.cut;\r\n\r\n x += data.x;\r\n y += data.y;\r\n\r\n if (x >= data.x && x < data.r && y >= data.y && y < data.b)\r\n {\r\n var ctx = this._tempContext;\r\n\r\n ctx.clearRect(0, 0, 1, 1);\r\n ctx.drawImage(textureFrame.source.image, x, y, 1, 1, 0, 0, 1, 1);\r\n \r\n var rgb = ctx.getImageData(0, 0, 1, 1);\r\n \r\n return rgb.data[3];\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Sets the given Game Objects `texture` and `frame` properties so that it uses\r\n * the Texture and Frame specified in the `key` and `frame` arguments to this method.\r\n *\r\n * @method Phaser.Textures.TextureManager#setTexture\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object the texture would be set on.\r\n * @param {string} key - The unique string-based key of the Texture.\r\n * @param {(string|integer)} [frame] - The string or index of the Frame.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The Game Object the texture was set on.\r\n */\r\n setTexture: function (gameObject, key, frame)\r\n {\r\n if (this.list[key])\r\n {\r\n gameObject.texture = this.list[key];\r\n gameObject.frame = gameObject.texture.get(frame);\r\n }\r\n\r\n return gameObject;\r\n },\r\n\r\n /**\r\n * Changes the key being used by a Texture to the new key provided.\r\n * \r\n * The old key is removed, allowing it to be re-used.\r\n * \r\n * Game Objects are linked to Textures by a reference to the Texture object, so\r\n * all existing references will be retained.\r\n *\r\n * @method Phaser.Textures.TextureManager#renameTexture\r\n * @since 3.12.0\r\n *\r\n * @param {string} currentKey - The current string-based key of the Texture you wish to rename.\r\n * @param {string} newKey - The new unique string-based key to use for the Texture.\r\n *\r\n * @return {boolean} `true` if the Texture key was successfully renamed, otherwise `false`.\r\n */\r\n renameTexture: function (currentKey, newKey)\r\n {\r\n var texture = this.get(currentKey);\r\n\r\n if (texture && currentKey !== newKey)\r\n {\r\n texture.key = newKey;\r\n\r\n this.list[newKey] = texture;\r\n\r\n delete this.list[currentKey];\r\n\r\n return true;\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Passes all Textures to the given callback.\r\n *\r\n * @method Phaser.Textures.TextureManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {EachTextureCallback} callback - The callback function to be sent the Textures.\r\n * @param {object} scope - The value to use as `this` when executing the callback.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the Texture Manager and all Textures stored within it.\r\n *\r\n * @method Phaser.Textures.TextureManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var texture in this.list)\r\n {\r\n this.list[texture].destroy();\r\n }\r\n\r\n this.list = {};\r\n\r\n this.game = null;\r\n\r\n CanvasPool.remove(this._tempCanvas);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureManager.js?")},"./node_modules/phaser/src/textures/TextureSource.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CanvasPool = __webpack_require__(/*! ../display/canvas/CanvasPool */ "./node_modules/phaser/src/display/canvas/CanvasPool.js");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\nvar IsSizePowerOfTwo = __webpack_require__(/*! ../math/pow2/IsSizePowerOfTwo */ "./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js");\r\nvar ScaleModes = __webpack_require__(/*! ../renderer/ScaleModes */ "./node_modules/phaser/src/renderer/ScaleModes.js");\r\n\r\n/**\r\n * @classdesc\r\n * A Texture Source is the encapsulation of the actual source data for a Texture.\r\n * This is typically an Image Element, loaded from the file system or network, or a Canvas Element.\r\n *\r\n * A Texture can contain multiple Texture Sources, which only happens when a multi-atlas is loaded.\r\n *\r\n * @class TextureSource\r\n * @memberof Phaser.Textures\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture this TextureSource belongs to.\r\n * @param {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)} source - The source image data.\r\n * @param {integer} [width] - Optional width of the source image. If not given it\'s derived from the source itself.\r\n * @param {integer} [height] - Optional height of the source image. If not given it\'s derived from the source itself.\r\n */\r\nvar TextureSource = new Class({\r\n\r\n initialize:\r\n\r\n function TextureSource (texture, source, width, height)\r\n {\r\n var game = texture.manager.game;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @since 3.7.0\r\n */\r\n this.renderer = game.renderer;\r\n\r\n /**\r\n * The Texture this TextureSource belongs to.\r\n *\r\n * @name Phaser.Textures.TextureSource#texture\r\n * @type {Phaser.Textures.Texture}\r\n * @since 3.0.0\r\n */\r\n this.texture = texture;\r\n\r\n /**\r\n * The source of the image data.\r\n * This is either an Image Element, a Canvas Element, a RenderTexture or a WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#source\r\n * @type {(HTMLImageElement|HTMLCanvasElement|Phaser.GameObjects.RenderTexture|WebGLTexture)}\r\n * @since 3.12.0\r\n */\r\n this.source = source;\r\n\r\n /**\r\n * The image data.\r\n * This is either an Image element or a Canvas element.\r\n *\r\n * @name Phaser.Textures.TextureSource#image\r\n * @type {(HTMLImageElement|HTMLCanvasElement)}\r\n * @since 3.0.0\r\n */\r\n this.image = source;\r\n\r\n /**\r\n * Currently un-used.\r\n *\r\n * @name Phaser.Textures.TextureSource#compressionAlgorithm\r\n * @type {integer}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.compressionAlgorithm = null;\r\n\r\n /**\r\n * The resolution of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#resolution\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.resolution = 1;\r\n\r\n /**\r\n * The width of the source image. If not specified in the constructor it will check\r\n * the `naturalWidth` and then `width` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width || source.naturalWidth || source.width || 0;\r\n\r\n /**\r\n * The height of the source image. If not specified in the constructor it will check\r\n * the `naturalHeight` and then `height` properties of the source image.\r\n *\r\n * @name Phaser.Textures.TextureSource#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height || source.naturalHeight || source.height || 0;\r\n\r\n /**\r\n * The Scale Mode the image will use when rendering.\r\n * Either Linear or Nearest.\r\n *\r\n * @name Phaser.Textures.TextureSource#scaleMode\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.scaleMode = ScaleModes.DEFAULT;\r\n\r\n /**\r\n * Is the source image a Canvas Element?\r\n *\r\n * @name Phaser.Textures.TextureSource#isCanvas\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isCanvas = (source instanceof HTMLCanvasElement);\r\n\r\n /**\r\n * Is the source image a Render Texture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isRenderTexture\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.isRenderTexture = (source.type === \'RenderTexture\');\r\n\r\n /**\r\n * Is the source image a WebGLTexture?\r\n *\r\n * @name Phaser.Textures.TextureSource#isGLTexture\r\n * @type {boolean}\r\n * @since 3.19.0\r\n */\r\n this.isGLTexture = (source instanceof WebGLTexture);\r\n\r\n /**\r\n * Are the source image dimensions a power of two?\r\n *\r\n * @name Phaser.Textures.TextureSource#isPowerOf2\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.isPowerOf2 = IsSizePowerOfTwo(this.width, this.height);\r\n\r\n /**\r\n * The WebGL Texture of the source image. If this TextureSource is driven from a WebGLTexture\r\n * already, then this is a reference to that WebGLTexture.\r\n *\r\n * @name Phaser.Textures.TextureSource#glTexture\r\n * @type {?WebGLTexture}\r\n * @default null\r\n * @since 3.0.0\r\n */\r\n this.glTexture = null;\r\n\r\n this.init(game);\r\n },\r\n\r\n /**\r\n * Creates a WebGL Texture, if required, and sets the Texture filter mode.\r\n *\r\n * @method Phaser.Textures.TextureSource#init\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Game} game - A reference to the Phaser Game instance.\r\n */\r\n init: function (game)\r\n {\r\n if (this.renderer)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n if (this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image);\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n \r\n this.glTexture = this.renderer.createTextureFromSource(null, this.width, this.height, this.scaleMode);\r\n }\r\n else if (this.isGLTexture)\r\n {\r\n this.glTexture = this.source;\r\n }\r\n else\r\n {\r\n this.glTexture = this.renderer.createTextureFromSource(this.image, this.width, this.height, this.scaleMode);\r\n }\r\n }\r\n else if (this.isRenderTexture)\r\n {\r\n this.image = this.source.canvas;\r\n }\r\n }\r\n\r\n if (!game.config.antialias)\r\n {\r\n this.setFilter(1);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the Filter Mode for this Texture.\r\n *\r\n * The mode can be either Linear, the default, or Nearest.\r\n *\r\n * For pixel-art you should use Nearest.\r\n *\r\n * @method Phaser.Textures.TextureSource#setFilter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.FilterMode} filterMode - The Filter Mode.\r\n */\r\n setFilter: function (filterMode)\r\n {\r\n if (this.renderer.gl)\r\n {\r\n this.renderer.setTextureFilter(this.glTexture, filterMode);\r\n }\r\n },\r\n\r\n /**\r\n * If this TextureSource is backed by a Canvas and is running under WebGL,\r\n * it updates the WebGLTexture using the canvas data.\r\n *\r\n * @method Phaser.Textures.TextureSource#update\r\n * @since 3.7.0\r\n */\r\n update: function ()\r\n {\r\n if (this.renderer.gl && this.isCanvas)\r\n {\r\n this.glTexture = this.renderer.canvasToTexture(this.image, this.glTexture);\r\n }\r\n },\r\n\r\n /**\r\n * Destroys this Texture Source and nulls the references.\r\n *\r\n * @method Phaser.Textures.TextureSource#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n if (this.glTexture)\r\n {\r\n this.renderer.deleteTexture(this.glTexture);\r\n }\r\n\r\n if (this.isCanvas)\r\n {\r\n CanvasPool.remove(this.image);\r\n }\r\n\r\n this.renderer = null;\r\n this.texture = null;\r\n this.source = null;\r\n this.image = null;\r\n this.glTexture = null;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TextureSource;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/TextureSource.js?')},"./node_modules/phaser/src/textures/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Filter Types.\r\n *\r\n * @namespace Phaser.Textures.FilterMode\r\n * @memberof Phaser.Textures\r\n * @since 3.0.0\r\n */\r\nvar CONST = {\r\n\r\n /**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n LINEAR: 0,\r\n\r\n /**\r\n * Nearest neighbor filter type.\r\n * \r\n * @name Phaser.Textures.FilterMode.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n NEAREST: 1\r\n \r\n};\r\n\r\nmodule.exports = CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/const.js?")},"./node_modules/phaser/src/textures/events/ADD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Add Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is added to it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('addtexture', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ADD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was added to the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was added to the Texture Manager.\r\n */\r\nmodule.exports = 'addtexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ADD_EVENT.js?")},"./node_modules/phaser/src/textures/events/ERROR_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Error Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture it requested to load failed.\r\n * This only happens when base64 encoded textures fail. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onerror', listener)`.\r\n *\r\n * @event Phaser.Textures.Events#ERROR\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that failed to load into the Texture Manager.\r\n */\r\nmodule.exports = 'onerror';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/ERROR_EVENT.js?")},"./node_modules/phaser/src/textures/events/LOAD_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Load Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture has finished loading on it.\r\n * This only happens for base64 encoded textures. All other texture types are loaded via the Loader Plugin.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('onload', listener)`.\r\n * \r\n * This event is dispatched after the [ADD]{@linkcode Phaser.Textures.Events#event:ADD} event.\r\n *\r\n * @event Phaser.Textures.Events#LOAD\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was loaded by the Texture Manager.\r\n * @param {Phaser.Textures.Texture} texture - A reference to the Texture that was loaded by the Texture Manager.\r\n */\r\nmodule.exports = 'onload';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/LOAD_EVENT.js?")},"./node_modules/phaser/src/textures/events/READY_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This internal event signifies that the Texture Manager is now ready and the Game can continue booting.\r\n * \r\n * When a Phaser Game instance is booting for the first time, the Texture Manager has to wait on a couple of non-blocking\r\n * async events before it's fully ready to carry on. When those complete the Texture Manager emits this event via the Game\r\n * instance, which tells the Game to carry on booting.\r\n *\r\n * @event Phaser.Textures.Events#READY\r\n * @since 3.16.1\r\n */\r\nmodule.exports = 'ready';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/READY_EVENT.js?")},"./node_modules/phaser/src/textures/events/REMOVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Texture Remove Event.\r\n * \r\n * This event is dispatched by the Texture Manager when a texture is removed from it.\r\n * \r\n * Listen to this event from within a Scene using: `this.textures.on('removetexture', listener)`.\r\n * \r\n * If you have any Game Objects still using the removed texture, they will start throwing\r\n * errors the next time they try to render. Be sure to clear all use of the texture in this event handler.\r\n *\r\n * @event Phaser.Textures.Events#REMOVE\r\n * @since 3.0.0\r\n * \r\n * @param {string} key - The key of the Texture that was removed from the Texture Manager.\r\n */\r\nmodule.exports = 'removetexture';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/REMOVE_EVENT.js?")},"./node_modules/phaser/src/textures/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ADD: __webpack_require__(/*! ./ADD_EVENT */ "./node_modules/phaser/src/textures/events/ADD_EVENT.js"),\r\n ERROR: __webpack_require__(/*! ./ERROR_EVENT */ "./node_modules/phaser/src/textures/events/ERROR_EVENT.js"),\r\n LOAD: __webpack_require__(/*! ./LOAD_EVENT */ "./node_modules/phaser/src/textures/events/LOAD_EVENT.js"),\r\n READY: __webpack_require__(/*! ./READY_EVENT */ "./node_modules/phaser/src/textures/events/READY_EVENT.js"),\r\n REMOVE: __webpack_require__(/*! ./REMOVE_EVENT */ "./node_modules/phaser/src/textures/events/REMOVE_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/events/index.js?')},"./node_modules/phaser/src/textures/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\nvar FilterMode = __webpack_require__(/*! ./const */ "./node_modules/phaser/src/textures/const.js");\r\n\r\n/**\r\n * @namespace Phaser.Textures\r\n */\r\n\r\n/**\r\n * Linear filter type.\r\n * \r\n * @name Phaser.Textures.LINEAR\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\n/**\r\n * Nearest Neighbor filter type.\r\n * \r\n * @name Phaser.Textures.NEAREST\r\n * @type {integer}\r\n * @const\r\n * @since 3.0.0\r\n */\r\n\r\nvar Textures = {\r\n\r\n CanvasTexture: __webpack_require__(/*! ./CanvasTexture */ "./node_modules/phaser/src/textures/CanvasTexture.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/textures/events/index.js"),\r\n FilterMode: FilterMode,\r\n Frame: __webpack_require__(/*! ./Frame */ "./node_modules/phaser/src/textures/Frame.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/textures/parsers/index.js"),\r\n Texture: __webpack_require__(/*! ./Texture */ "./node_modules/phaser/src/textures/Texture.js"),\r\n TextureManager: __webpack_require__(/*! ./TextureManager */ "./node_modules/phaser/src/textures/TextureManager.js"),\r\n TextureSource: __webpack_require__(/*! ./TextureSource */ "./node_modules/phaser/src/textures/TextureSource.js")\r\n\r\n};\r\n\r\nTextures = Extend(false, Textures, FilterMode);\r\n\r\nmodule.exports = Textures;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/index.js?')},"./node_modules/phaser/src/textures/parsers/AtlasXML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Parses an XML Texture Atlas object and adds all the Frames into a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.AtlasXML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.7.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {*} xml - The XML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar AtlasXML = function (texture, sourceIndex, xml)\r\n{\r\n // Malformed?\r\n if (!xml.getElementsByTagName('TextureAtlas'))\r\n {\r\n console.warn('Invalid Texture Atlas XML given');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = xml.getElementsByTagName('SubTexture');\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var frame = frames[i].attributes;\r\n\r\n var name = frame.name.value;\r\n var x = parseInt(frame.x.value, 10);\r\n var y = parseInt(frame.y.value, 10);\r\n var width = parseInt(frame.width.value, 10);\r\n var height = parseInt(frame.height.value, 10);\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(name, sourceIndex, x, y, width, height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (frame.frameX)\r\n {\r\n var frameX = Math.abs(parseInt(frame.frameX.value, 10));\r\n var frameY = Math.abs(parseInt(frame.frameY.value, 10));\r\n var frameWidth = parseInt(frame.frameWidth.value, 10);\r\n var frameHeight = parseInt(frame.frameHeight.value, 10);\r\n\r\n newFrame.setTrim(\r\n width,\r\n height,\r\n frameX,\r\n frameY,\r\n frameWidth,\r\n frameHeight\r\n );\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = AtlasXML;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/AtlasXML.js?")},"./node_modules/phaser/src/textures/parsers/Canvas.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds a Canvas Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Canvas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Canvas = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Canvas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Canvas.js?")},"./node_modules/phaser/src/textures/parsers/Image.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds an Image Element to a Texture.\r\n *\r\n * @function Phaser.Textures.Parsers.Image\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar Image = function (texture, sourceIndex)\r\n{\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = Image;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/Image.js?")},"./node_modules/phaser/src/textures/parsers/JSONArray.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Array and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an array of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONArray\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONArray = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'] && !json['textures'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Array');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed array\r\n var frames = (Array.isArray(json.textures)) ? json.textures[sourceIndex].frames : json.frames;\r\n\r\n var newFrame;\r\n\r\n for (var i = 0; i < frames.length; i++)\r\n {\r\n var src = frames[i];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(src.filename, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n if (src.anchor)\r\n {\r\n newFrame.customPivot = true;\r\n newFrame.pivotX = src.anchor.x;\r\n newFrame.pivotY = src.anchor.y;\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONArray.js?")},"./node_modules/phaser/src/textures/parsers/JSONHash.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture.\r\n * JSON format expected to match that defined by Texture Packer, with the frames property containing an object of Frames.\r\n *\r\n * @function Phaser.Textures.Parsers.JSONHash\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} json - The JSON data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar JSONHash = function (texture, sourceIndex, json)\r\n{\r\n // Malformed?\r\n if (!json['frames'])\r\n {\r\n console.warn('Invalid Texture Atlas JSON Hash given, missing \\'frames\\' Object');\r\n return;\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n // By this stage frames is a fully parsed Object\r\n var frames = json['frames'];\r\n var newFrame;\r\n\r\n for (var key in frames)\r\n {\r\n var src = frames[key];\r\n\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n newFrame = texture.add(key, sourceIndex, src.frame.x, src.frame.y, src.frame.w, src.frame.h);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n\r\n if (src.rotated)\r\n {\r\n newFrame.rotated = true;\r\n newFrame.updateUVsInverted();\r\n }\r\n\r\n // Copy over any extra data\r\n newFrame.customData = Clone(src);\r\n }\r\n\r\n // Copy over any additional data that was in the JSON to Texture.customData\r\n for (var dataKey in json)\r\n {\r\n if (dataKey === 'frames')\r\n {\r\n continue;\r\n }\r\n\r\n if (Array.isArray(json[dataKey]))\r\n {\r\n texture.customData[dataKey] = json[dataKey].slice(0);\r\n }\r\n else\r\n {\r\n texture.customData[dataKey] = json[dataKey];\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = JSONHash;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/JSONHash.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheet.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture.\r\n * \r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheet\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {integer} x - [description]\r\n * @param {integer} y - [description]\r\n * @param {integer} width - [description]\r\n * @param {integer} height - [description]\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - [description]\r\n * @param {number} [config.endFrame=-1] - [description]\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheet = function (texture, sourceIndex, x, y, width, height, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (frameWidth === null)\r\n {\r\n throw new Error('TextureManager.SpriteSheet: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var row = Math.floor((width - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((height - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n if (total === 0)\r\n {\r\n console.warn('SpriteSheet frame dimensions will result in zero frames.');\r\n }\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var fx = margin;\r\n var fy = margin;\r\n var ax = 0;\r\n var ay = 0;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n ax = 0;\r\n ay = 0;\r\n\r\n var w = fx + frameWidth;\r\n var h = fy + frameHeight;\r\n\r\n if (w > width)\r\n {\r\n ax = w - width;\r\n }\r\n\r\n if (h > height)\r\n {\r\n ay = h - height;\r\n }\r\n\r\n texture.add(i, sourceIndex, x + fx, y + fy, frameWidth - ax, frameHeight - ay);\r\n\r\n fx += frameWidth + spacing;\r\n\r\n if (fx + frameWidth > width)\r\n {\r\n fx = margin;\r\n fy += frameHeight + spacing;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheet;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheet.js?")},"./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas.\r\n *\r\n * In Phaser terminology a Sprite Sheet is a texture containing different frames, but each frame is the exact\r\n * same size and cannot be trimmed or rotated.\r\n *\r\n * @function Phaser.Textures.Parsers.SpriteSheetFromAtlas\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {Phaser.Textures.Frame} frame - The Frame that contains the Sprite Sheet.\r\n * @param {object} config - An object describing how to parse the Sprite Sheet.\r\n * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet.\r\n * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided.\r\n * @param {number} [config.startFrame=0] - Index of the start frame in the sprite sheet\r\n * @param {number} [config.endFrame=-1] - Index of the end frame in the sprite sheet. -1 mean all the rest of the frames\r\n * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here.\r\n * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar SpriteSheetFromAtlas = function (texture, frame, config)\r\n{\r\n var frameWidth = GetFastValue(config, 'frameWidth', null);\r\n var frameHeight = GetFastValue(config, 'frameHeight', frameWidth);\r\n\r\n // If missing we can't proceed\r\n if (!frameWidth)\r\n {\r\n throw new Error('TextureManager.SpriteSheetFromAtlas: Invalid frameWidth given.');\r\n }\r\n\r\n // Add in a __BASE entry (for the entire atlas frame)\r\n var source = texture.source[0];\r\n texture.add('__BASE', 0, 0, 0, source.width, source.height);\r\n\r\n var startFrame = GetFastValue(config, 'startFrame', 0);\r\n var endFrame = GetFastValue(config, 'endFrame', -1);\r\n var margin = GetFastValue(config, 'margin', 0);\r\n var spacing = GetFastValue(config, 'spacing', 0);\r\n\r\n var x = frame.cutX;\r\n var y = frame.cutY;\r\n\r\n var cutWidth = frame.cutWidth;\r\n var cutHeight = frame.cutHeight;\r\n var sheetWidth = frame.realWidth;\r\n var sheetHeight = frame.realHeight;\r\n\r\n var row = Math.floor((sheetWidth - margin + spacing) / (frameWidth + spacing));\r\n var column = Math.floor((sheetHeight - margin + spacing) / (frameHeight + spacing));\r\n var total = row * column;\r\n\r\n // trim offsets\r\n\r\n var leftPad = frame.x;\r\n var leftWidth = frameWidth - leftPad;\r\n\r\n var rightWidth = frameWidth - ((sheetWidth - cutWidth) - leftPad);\r\n\r\n var topPad = frame.y;\r\n var topHeight = frameHeight - topPad;\r\n\r\n var bottomHeight = frameHeight - ((sheetHeight - cutHeight) - topPad);\r\n\r\n if (startFrame > total || startFrame < -total)\r\n {\r\n startFrame = 0;\r\n }\r\n\r\n if (startFrame < 0)\r\n {\r\n // Allow negative skipframes.\r\n startFrame = total + startFrame;\r\n }\r\n\r\n if (endFrame !== -1)\r\n {\r\n total = startFrame + (endFrame + 1);\r\n }\r\n\r\n var sheetFrame;\r\n var frameX = margin;\r\n var frameY = margin;\r\n var frameIndex = 0;\r\n var sourceIndex = frame.sourceIndex;\r\n\r\n for (var sheetY = 0; sheetY < column; sheetY++)\r\n {\r\n var topRow = (sheetY === 0);\r\n var bottomRow = (sheetY === column - 1);\r\n\r\n for (var sheetX = 0; sheetX < row; sheetX++)\r\n {\r\n var leftRow = (sheetX === 0);\r\n var rightRow = (sheetX === row - 1);\r\n\r\n sheetFrame = texture.add(frameIndex, sourceIndex, x + frameX, y + frameY, frameWidth, frameHeight);\r\n\r\n if (leftRow || topRow || rightRow || bottomRow)\r\n {\r\n var destX = (leftRow) ? leftPad : 0;\r\n var destY = (topRow) ? topPad : 0;\r\n\r\n var trimWidth = 0;\r\n var trimHeight = 0;\r\n\r\n if (leftRow)\r\n {\r\n trimWidth += (frameWidth - leftWidth);\r\n }\r\n\r\n if (rightRow)\r\n {\r\n trimWidth += (frameWidth - rightWidth);\r\n }\r\n\r\n if (topRow)\r\n {\r\n trimHeight += (frameHeight - topHeight);\r\n }\r\n\r\n if (bottomRow)\r\n {\r\n trimHeight += (frameHeight - bottomHeight);\r\n }\r\n\r\n var destWidth = frameWidth - trimWidth;\r\n var destHeight = frameHeight - trimHeight;\r\n\r\n sheetFrame.cutWidth = destWidth;\r\n sheetFrame.cutHeight = destHeight;\r\n\r\n sheetFrame.setTrim(frameWidth, frameHeight, destX, destY, destWidth, destHeight);\r\n }\r\n\r\n frameX += spacing;\r\n\r\n if (leftRow)\r\n {\r\n frameX += leftWidth;\r\n }\r\n else if (rightRow)\r\n {\r\n frameX += rightWidth;\r\n }\r\n else\r\n {\r\n frameX += frameWidth;\r\n }\r\n\r\n frameIndex++;\r\n }\r\n\r\n frameX = margin;\r\n frameY += spacing;\r\n\r\n if (topRow)\r\n {\r\n frameY += topHeight;\r\n }\r\n else if (bottomRow)\r\n {\r\n frameY += bottomHeight;\r\n }\r\n else\r\n {\r\n frameY += frameHeight;\r\n }\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = SpriteSheetFromAtlas;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js?")},"./node_modules/phaser/src/textures/parsers/UnityYAML.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar imageHeight = 0;\r\n\r\n/**\r\n * @function addFrame\r\n * @private\r\n * @since 3.0.0\r\n */\r\nvar addFrame = function (texture, sourceIndex, name, frame)\r\n{\r\n // The frame values are the exact coordinates to cut the frame out of the atlas from\r\n\r\n var y = imageHeight - frame.y - frame.height;\r\n\r\n texture.add(name, sourceIndex, frame.x, y, frame.width, frame.height);\r\n\r\n // These are the original (non-trimmed) sprite values\r\n /*\r\n if (src.trimmed)\r\n {\r\n newFrame.setTrim(\r\n src.sourceSize.w,\r\n src.sourceSize.h,\r\n src.spriteSourceSize.x,\r\n src.spriteSourceSize.y,\r\n src.spriteSourceSize.w,\r\n src.spriteSourceSize.h\r\n );\r\n }\r\n */\r\n};\r\n\r\n/**\r\n * Parses a Unity YAML File and creates Frames in the Texture.\r\n * For more details about Sprite Meta Data see https://docs.unity3d.com/ScriptReference/SpriteMetaData.html\r\n *\r\n * @function Phaser.Textures.Parsers.UnityYAML\r\n * @memberof Phaser.Textures.Parsers\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to.\r\n * @param {integer} sourceIndex - The index of the TextureSource.\r\n * @param {object} yaml - The YAML data.\r\n *\r\n * @return {Phaser.Textures.Texture} The Texture modified by this parser.\r\n */\r\nvar UnityYAML = function (texture, sourceIndex, yaml)\r\n{\r\n // Add in a __BASE entry (for the entire atlas)\r\n var source = texture.source[sourceIndex];\r\n\r\n texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height);\r\n\r\n imageHeight = source.height;\r\n\r\n var data = yaml.split('\\n');\r\n\r\n var lineRegExp = /^[ ]*(- )*(\\w+)+[: ]+(.*)/;\r\n\r\n var prevSprite = '';\r\n var currentSprite = '';\r\n var rect = { x: 0, y: 0, width: 0, height: 0 };\r\n\r\n // var pivot = { x: 0, y: 0 };\r\n // var border = { x: 0, y: 0, z: 0, w: 0 };\r\n\r\n for (var i = 0; i < data.length; i++)\r\n {\r\n var results = data[i].match(lineRegExp);\r\n\r\n if (!results)\r\n {\r\n continue;\r\n }\r\n\r\n var isList = (results[1] === '- ');\r\n var key = results[2];\r\n var value = results[3];\r\n\r\n if (isList)\r\n {\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n\r\n prevSprite = currentSprite;\r\n }\r\n\r\n rect = { x: 0, y: 0, width: 0, height: 0 };\r\n }\r\n\r\n if (key === 'name')\r\n {\r\n // Start new list\r\n currentSprite = value;\r\n continue;\r\n }\r\n\r\n switch (key)\r\n {\r\n case 'x':\r\n case 'y':\r\n case 'width':\r\n case 'height':\r\n rect[key] = parseInt(value, 10);\r\n break;\r\n\r\n // case 'pivot':\r\n // pivot = eval('var obj = ' + value);\r\n // break;\r\n\r\n // case 'border':\r\n // border = eval('var obj = ' + value);\r\n // break;\r\n }\r\n }\r\n\r\n if (currentSprite !== prevSprite)\r\n {\r\n addFrame(texture, sourceIndex, currentSprite, rect);\r\n }\r\n\r\n return texture;\r\n};\r\n\r\nmodule.exports = UnityYAML;\r\n\r\n/*\r\nExample data:\r\n\r\nTextureImporter:\r\n spritePivot: {x: .5, y: .5}\r\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\r\n spritePixelsToUnits: 100\r\n spriteSheet:\r\n sprites:\r\n - name: asteroids_0\r\n rect:\r\n serializedVersion: 2\r\n x: 5\r\n y: 328\r\n width: 65\r\n height: 82\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n - name: asteroids_1\r\n rect:\r\n serializedVersion: 2\r\n x: 80\r\n y: 322\r\n width: 53\r\n height: 88\r\n alignment: 0\r\n pivot: {x: 0, y: 0}\r\n border: {x: 0, y: 0, z: 0, w: 0}\r\n spritePackingTag: Asteroids\r\n*/\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/UnityYAML.js?")},"./node_modules/phaser/src/textures/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Textures.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AtlasXML: __webpack_require__(/*! ./AtlasXML */ "./node_modules/phaser/src/textures/parsers/AtlasXML.js"),\r\n Canvas: __webpack_require__(/*! ./Canvas */ "./node_modules/phaser/src/textures/parsers/Canvas.js"),\r\n Image: __webpack_require__(/*! ./Image */ "./node_modules/phaser/src/textures/parsers/Image.js"),\r\n JSONArray: __webpack_require__(/*! ./JSONArray */ "./node_modules/phaser/src/textures/parsers/JSONArray.js"),\r\n JSONHash: __webpack_require__(/*! ./JSONHash */ "./node_modules/phaser/src/textures/parsers/JSONHash.js"),\r\n SpriteSheet: __webpack_require__(/*! ./SpriteSheet */ "./node_modules/phaser/src/textures/parsers/SpriteSheet.js"),\r\n SpriteSheetFromAtlas: __webpack_require__(/*! ./SpriteSheetFromAtlas */ "./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js"),\r\n UnityYAML: __webpack_require__(/*! ./UnityYAML */ "./node_modules/phaser/src/textures/parsers/UnityYAML.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/textures/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/Formats.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Formats\r\n */\r\n\r\nmodule.exports = {\r\n\r\n /**\r\n * CSV Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.CSV\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n CSV: 0,\r\n\r\n /**\r\n * Tiled JSON Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.TILED_JSON\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n TILED_JSON: 1,\r\n\r\n /**\r\n * 2D Array Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.ARRAY_2D\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n ARRAY_2D: 2,\r\n\r\n /**\r\n * Weltmeister (Impact.js) Map Type\r\n * \r\n * @name Phaser.Tilemaps.Formats.WELTMEISTER\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n WELTMEISTER: 3\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Formats.js?")},"./node_modules/phaser/src/tilemaps/ImageCollection.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ "./node_modules/phaser/src/utils/Class.js");\r\n\r\n/**\r\n * @classdesc\r\n * An Image Collection is a special Tile Set containing multiple images, with no slicing into each image.\r\n *\r\n * Image Collections are normally created automatically when Tiled data is loaded.\r\n *\r\n * @class ImageCollection\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n * \r\n * @param {string} name - The name of the image collection in the map data.\r\n * @param {integer} firstgid - The first image index this image collection contains.\r\n * @param {integer} [width=32] - Width of widest image (in pixels).\r\n * @param {integer} [height=32] - Height of tallest image (in pixels).\r\n * @param {integer} [margin=0] - The margin around all images in the collection (in pixels).\r\n * @param {integer} [spacing=0] - The spacing between each image in the collection (in pixels).\r\n * @param {object} [properties={}] - Custom Image Collection properties.\r\n */\r\nvar ImageCollection = new Class({\r\n\r\n initialize:\r\n\r\n function ImageCollection (name, firstgid, width, height, margin, spacing, properties)\r\n {\r\n if (width === undefined || width <= 0) { width = 32; }\r\n if (height === undefined || height <= 0) { height = 32; }\r\n if (margin === undefined) { margin = 0; }\r\n if (spacing === undefined) { spacing = 0; }\r\n\r\n /**\r\n * The name of the Image Collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The Tiled firstgid value.\r\n * This is the starting index of the first image index this Image Collection contains.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid | 0;\r\n\r\n /**\r\n * The width of the widest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageWidth = width | 0;\r\n\r\n /**\r\n * The height of the tallest image (in pixels).\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageHeight = height | 0;\r\n\r\n /**\r\n * The margin around the images in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageMarge\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageMargin = margin | 0;\r\n\r\n /**\r\n * The spacing between each image in the collection (in pixels).\r\n * Use `setSpacing` to change.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#imageSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.imageSpacing = spacing | 0;\r\n\r\n /**\r\n * Image Collection-specific properties that are typically defined in the Tiled editor.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = properties || {};\r\n\r\n /**\r\n * The cached images that are a part of this collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#images\r\n * @type {array}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.images = [];\r\n\r\n /**\r\n * The total number of images in the image collection.\r\n * \r\n * @name Phaser.Tilemaps.ImageCollection#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this image collection contains the given image index.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#containsImageIndex\r\n * @since 3.0.0\r\n * \r\n * @param {integer} imageIndex - The image index to search for.\r\n * \r\n * @return {boolean} True if this Image Collection contains the given index.\r\n */\r\n containsImageIndex: function (imageIndex)\r\n {\r\n return (imageIndex >= this.firstgid && imageIndex < (this.firstgid + this.total));\r\n },\r\n\r\n /**\r\n * Add an image to this Image Collection.\r\n *\r\n * @method Phaser.Tilemaps.ImageCollection#addImage\r\n * @since 3.0.0\r\n * \r\n * @param {integer} gid - The gid of the image in the Image Collection.\r\n * @param {string} image - The the key of the image in the Image Collection and in the cache.\r\n *\r\n * @return {Phaser.Tilemaps.ImageCollection} This ImageCollection object.\r\n */\r\n addImage: function (gid, image)\r\n {\r\n this.images.push({ gid: gid, image: image });\r\n this.total++;\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ImageCollection;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ImageCollection.js?')},"./node_modules/phaser/src/tilemaps/ParseToTilemap.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Parse = __webpack_require__(/*! ./parsers/Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js");\r\nvar Tilemap = __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js");\r\n\r\n/**\r\n * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When\r\n * loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing from\r\n * a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map data. For\r\n * an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @function Phaser.Tilemaps.ParseToTilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels.\r\n * @param {integer} [width=10] - The width of the map in tiles.\r\n * @param {integer} [height=10] - The height of the map in tiles.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nvar ParseToTilemap = function (scene, key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n if (tileWidth === undefined) { tileWidth = 32; }\r\n if (tileHeight === undefined) { tileHeight = 32; }\r\n if (width === undefined) { width = 10; }\r\n if (height === undefined) { height = 10; }\r\n if (insertNull === undefined) { insertNull = false; }\r\n\r\n var mapData = null;\r\n\r\n if (Array.isArray(data))\r\n {\r\n var name = key !== undefined ? key : \'map\';\r\n mapData = Parse(name, Formats.ARRAY_2D, data, tileWidth, tileHeight, insertNull);\r\n }\r\n else if (key !== undefined)\r\n {\r\n var tilemapData = scene.cache.tilemap.get(key);\r\n\r\n if (!tilemapData)\r\n {\r\n console.warn(\'No map data found for key \' + key);\r\n }\r\n else\r\n {\r\n mapData = Parse(key, tilemapData.format, tilemapData.data, tileWidth, tileHeight, insertNull);\r\n }\r\n }\r\n\r\n if (mapData === null)\r\n {\r\n mapData = new MapData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n }\r\n\r\n return new Tilemap(scene, mapData);\r\n};\r\n\r\nmodule.exports = ParseToTilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/ParseToTilemap.js?')},"./node_modules/phaser/src/tilemaps/Tile.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar Rectangle = __webpack_require__(/*! ../geom/rectangle */ \"./node_modules/phaser/src/geom/rectangle/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tile is a representation of a single tile within the Tilemap. This is a lightweight data\r\n * representation, so its position information is stored without factoring in scroll, layer\r\n * scale or layer position.\r\n *\r\n * @class Tile\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The LayerData object in the Tilemap that this tile belongs to.\r\n * @param {integer} index - The unique index of this tile within the map.\r\n * @param {integer} x - The x coordinate of this tile in tile coordinates.\r\n * @param {integer} y - The y coordinate of this tile in tile coordinates.\r\n * @param {integer} width - Width of the tile in pixels.\r\n * @param {integer} height - Height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels). Tiled maps support\r\n * multiple tileset sizes within one map, but they are still placed at intervals of the base\r\n * tile width.\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels). Tiled maps\r\n * support multiple tileset sizes within one map, but they are still placed at intervals of the\r\n * base tile height.\r\n */\r\nvar Tile = new Class({\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.Flip,\r\n Components.Visible\r\n ],\r\n\r\n initialize:\r\n\r\n function Tile (layer, index, x, y, width, height, baseWidth, baseHeight)\r\n {\r\n /**\r\n * The LayerData in the Tilemap data that this tile belongs to.\r\n *\r\n * @name Phaser.Tilemaps.Tile#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = layer;\r\n\r\n /**\r\n * The index of this tile within the map data corresponding to the tileset, or -1 if this\r\n * represents a blank tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#index\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.index = index;\r\n\r\n /**\r\n * The x map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#x\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.x = x;\r\n\r\n /**\r\n * The y map coordinate of this tile in tile units.\r\n *\r\n * @name Phaser.Tilemaps.Tile#y\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.y = y;\r\n\r\n /**\r\n * The width of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#width\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.width = width;\r\n\r\n /**\r\n * The height of the tile in pixels.\r\n *\r\n * @name Phaser.Tilemaps.Tile#height\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.height = height;\r\n\r\n /**\r\n * The map's base width of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseWidth = (baseWidth !== undefined) ? baseWidth : width;\r\n\r\n /**\r\n * The map's base height of a tile in pixels. Tiled maps support multiple tileset sizes\r\n * within one map, but they are still placed at intervals of the base tile size.\r\n *\r\n * @name Phaser.Tilemaps.Tile#baseHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.baseHeight = (baseHeight !== undefined) ? baseHeight : height;\r\n\r\n /**\r\n * The x coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelX\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelX = 0;\r\n\r\n /**\r\n * The y coordinate of the top left of this tile in pixels. This is relative to the top left\r\n * of the layer this tile is being rendered within. This property does NOT factor in camera\r\n * scroll, layer scale or layer position.\r\n *\r\n * @name Phaser.Tilemaps.Tile#pixelY\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.pixelY = 0;\r\n\r\n this.updatePixelXY();\r\n\r\n /**\r\n * Tile specific properties. These usually come from Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tile#properties\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.properties = {};\r\n\r\n /**\r\n * The rotation angle of this tile.\r\n *\r\n * @name Phaser.Tilemaps.Tile#rotation\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.rotation = 0;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the left side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideLeft = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the right side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideRight = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the top side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideUp\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideUp = false;\r\n\r\n /**\r\n * Whether the tile should collide with any object on the bottom side.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collideDown\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.collideDown = false;\r\n\r\n /**\r\n * Whether the tile's left edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceLeft\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceLeft = false;\r\n\r\n /**\r\n * Whether the tile's right edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceRight\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceRight = false;\r\n\r\n /**\r\n * Whether the tile's top edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceTop\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceTop = false;\r\n\r\n /**\r\n * Whether the tile's bottom edge is interesting for collisions.\r\n *\r\n * @name Phaser.Tilemaps.Tile#faceBottom\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.faceBottom = false;\r\n\r\n /**\r\n * Tile collision callback.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallback = null;\r\n\r\n /**\r\n * The context in which the collision callback will be called.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collisionCallbackContext\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collisionCallbackContext = this;\r\n\r\n /**\r\n * The tint to apply to this tile. Note: tint is currently a single color value instead of\r\n * the 4 corner tint component on other GameObjects.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tint\r\n * @type {number}\r\n * @default\r\n * @since 3.0.0\r\n */\r\n this.tint = 0xffffff;\r\n\r\n /**\r\n * An empty object where physics-engine specific information (e.g. bodies) may be stored.\r\n *\r\n * @name Phaser.Tilemaps.Tile#physics\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.physics = {};\r\n },\r\n\r\n /**\r\n * Check if the given x and y world coordinates are within this Tile. This does not factor in\r\n * camera scroll, layer scale or layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#containsPoint\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x coordinate to test.\r\n * @param {number} y - The y coordinate to test.\r\n *\r\n * @return {boolean} True if the coordinates are within this Tile, otherwise false.\r\n */\r\n containsPoint: function (x, y)\r\n {\r\n return !(x < this.pixelX || y < this.pixelY || x > this.right || y > this.bottom);\r\n },\r\n\r\n /**\r\n * Copies the tile data & properties from the given tile to this tile. This copies everything\r\n * except for position and interesting faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#copy\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The tile to copy from.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n copy: function (tile)\r\n {\r\n this.index = tile.index;\r\n this.alpha = tile.alpha;\r\n this.properties = tile.properties;\r\n this.visible = tile.visible;\r\n this.setFlip(tile.flipX, tile.flipY);\r\n this.tint = tile.tint;\r\n this.rotation = tile.rotation;\r\n this.collideUp = tile.collideUp;\r\n this.collideDown = tile.collideDown;\r\n this.collideLeft = tile.collideLeft;\r\n this.collideRight = tile.collideRight;\r\n this.collisionCallback = tile.collisionCallback;\r\n this.collisionCallbackContext = tile.collisionCallbackContext;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The collision group for this Tile, defined within the Tileset. This returns a reference to\r\n * the collision group stored within the Tileset, so any modification of the returned object\r\n * will impact all tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getCollisionGroup: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileCollisionGroup(this.index) : null;\r\n },\r\n\r\n /**\r\n * The tile data for this Tile, defined within the Tileset. This typically contains Tiled\r\n * collision data, tile animations and terrain information. This returns a reference to the tile\r\n * data stored within the Tileset, so any modification of the returned object will impact all\r\n * tiles that have the same index as this tile.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTileData\r\n * @since 3.0.0\r\n *\r\n * @return {?object} tileset\r\n */\r\n getTileData: function ()\r\n {\r\n return this.tileset ? this.tileset.getTileData(this.index) : null;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the left side of the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getLeft\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getLeft: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? tilemapLayer.tileToWorldX(this.x, camera) : this.x * this.baseWidth;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the right side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getRight\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getRight: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n return (tilemapLayer) ? this.getLeft(camera) + this.width * tilemapLayer.scaleX : this.getLeft(camera) + this.width;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the top side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getTop\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getTop: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile in grid\r\n // units is the bottom left, so the y coordinate needs to be adjusted by the difference\r\n // between the base size and this tile's size.\r\n return tilemapLayer\r\n ? tilemapLayer.tileToWorldY(this.y, camera) - (this.height - this.baseHeight) * tilemapLayer.scaleY\r\n : this.y * this.baseHeight - (this.height - this.baseHeight);\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the bottom side of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n\r\n * @method Phaser.Tilemaps.Tile#getBottom\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getBottom: function (camera)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer\r\n ? this.getTop(camera) + this.height * tilemapLayer.scaleY\r\n : this.getTop(camera) + this.height;\r\n },\r\n\r\n\r\n /**\r\n * Gets the world rectangle bounding box for the tile, factoring in the layers position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getBounds\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n * @param {object} [output] - [description]\r\n *\r\n * @return {(Phaser.Geom.Rectangle|object)}\r\n */\r\n getBounds: function (camera, output)\r\n {\r\n if (output === undefined) { output = new Rectangle(); }\r\n\r\n output.x = this.getLeft();\r\n output.y = this.getTop();\r\n output.width = this.getRight() - output.x;\r\n output.height = this.getBottom() - output.y;\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Gets the world X position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterX\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterX: function (camera)\r\n {\r\n return (this.getLeft(camera) + this.getRight(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Gets the world Y position of the center of the tile, factoring in the layer's position,\r\n * scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.Tile#getCenterY\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check.\r\n *\r\n * @return {number}\r\n */\r\n getCenterY: function (camera)\r\n {\r\n return (this.getTop(camera) + this.getBottom(camera)) / 2;\r\n },\r\n\r\n /**\r\n * Clean up memory.\r\n *\r\n * @method Phaser.Tilemaps.Tile#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n this.properties = undefined;\r\n },\r\n\r\n /**\r\n * Check for intersection with this tile. This does not factor in camera scroll, layer scale or\r\n * layer position.\r\n *\r\n * @method Phaser.Tilemaps.Tile#intersects\r\n * @since 3.0.0\r\n *\r\n * @param {number} x - The x axis in pixels.\r\n * @param {number} y - The y axis in pixels.\r\n * @param {number} right - The right point.\r\n * @param {number} bottom - The bottom point.\r\n *\r\n * @return {boolean}\r\n */\r\n intersects: function (x, y, right, bottom)\r\n {\r\n return !(\r\n right <= this.pixelX || bottom <= this.pixelY ||\r\n x >= this.right || y >= this.bottom\r\n );\r\n },\r\n\r\n /**\r\n * Checks if the tile is interesting.\r\n *\r\n * @method Phaser.Tilemaps.Tile#isInteresting\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} collides - If true, will consider the tile interesting if it collides on any side.\r\n * @param {boolean} faces - If true, will consider the tile interesting if it has an interesting face.\r\n *\r\n * @return {boolean} True if the Tile is interesting, otherwise false.\r\n */\r\n isInteresting: function (collides, faces)\r\n {\r\n if (collides && faces) { return (this.canCollide || this.hasInterestingFace); }\r\n else if (collides) { return this.collides; }\r\n else if (faces) { return this.hasInterestingFace; }\r\n return false;\r\n },\r\n\r\n /**\r\n * Reset collision status flags.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetCollision: function (recalculateFaces)\r\n {\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = false;\r\n this.collideRight = false;\r\n this.collideUp = false;\r\n this.collideDown = false;\r\n\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Reset faces.\r\n *\r\n * @method Phaser.Tilemaps.Tile#resetFaces\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n resetFaces: function ()\r\n {\r\n this.faceTop = false;\r\n this.faceBottom = false;\r\n this.faceLeft = false;\r\n this.faceRight = false;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the collision flags for each side of this tile and updates the interesting faces list.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} left - Indicating collide with any object on the left.\r\n * @param {boolean} [right] - Indicating collide with any object on the right.\r\n * @param {boolean} [up] - Indicating collide with any object on the top.\r\n * @param {boolean} [down] - Indicating collide with any object on the bottom.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate interesting faces\r\n * for this tile and its neighbors.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollision: function (left, right, up, down, recalculateFaces)\r\n {\r\n if (right === undefined) { right = left; }\r\n if (up === undefined) { up = left; }\r\n if (down === undefined) { down = left; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n this.collideLeft = left;\r\n this.collideRight = right;\r\n this.collideUp = up;\r\n this.collideDown = down;\r\n\r\n this.faceLeft = left;\r\n this.faceRight = right;\r\n this.faceTop = up;\r\n this.faceBottom = down;\r\n\r\n if (recalculateFaces)\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n this.tilemapLayer.calculateFacesAt(this.x, this.y);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Set a callback to be called when this tile is hit by an object. The callback must true for\r\n * collision processing to take place.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setCollisionCallback\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - Callback function.\r\n * @param {object} context - Callback will be called within this context.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setCollisionCallback: function (callback, context)\r\n {\r\n if (callback === null)\r\n {\r\n this.collisionCallback = undefined;\r\n this.collisionCallbackContext = undefined;\r\n }\r\n else\r\n {\r\n this.collisionCallback = callback;\r\n this.collisionCallbackContext = context;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the size of the tile and updates its pixelX and pixelY.\r\n *\r\n * @method Phaser.Tilemaps.Tile#setSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tile in pixels.\r\n * @param {integer} tileHeight - The height of the tile in pixels.\r\n * @param {integer} baseWidth - The base width a tile in the map (in pixels).\r\n * @param {integer} baseHeight - The base height of the tile in pixels (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n setSize: function (tileWidth, tileHeight, baseWidth, baseHeight)\r\n {\r\n if (tileWidth !== undefined) { this.width = tileWidth; }\r\n if (tileHeight !== undefined) { this.height = tileHeight; }\r\n if (baseWidth !== undefined) { this.baseWidth = baseWidth; }\r\n if (baseHeight !== undefined) { this.baseHeight = baseHeight; }\r\n\r\n this.updatePixelXY();\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Used internally. Updates the tile's world XY position based on the current tile size.\r\n *\r\n * @method Phaser.Tilemaps.Tile#updatePixelXY\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tile} This Tile object.\r\n */\r\n updatePixelXY: function ()\r\n {\r\n // Tiled places tiles on a grid of baseWidth x baseHeight. The origin for a tile is the\r\n // bottom left, while the Phaser renderer assumes the origin is the top left. The y\r\n // coordinate needs to be adjusted by the difference.\r\n this.pixelX = this.x * this.baseWidth;\r\n this.pixelY = this.y * this.baseHeight;\r\n\r\n // this.pixelY = this.y * this.baseHeight - (this.height - this.baseHeight);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces or has a collision callback set.\r\n *\r\n * @name Phaser.Tilemaps.Tile#canCollide\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n canCollide: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown || this.collisionCallback);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile can collide on any of its faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#collides\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n collides: {\r\n get: function ()\r\n {\r\n return (this.collideLeft || this.collideRight || this.collideUp || this.collideDown);\r\n }\r\n },\r\n\r\n /**\r\n * True if this tile has any interesting faces.\r\n *\r\n * @name Phaser.Tilemaps.Tile#hasInterestingFace\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n hasInterestingFace: {\r\n get: function ()\r\n {\r\n return (this.faceTop || this.faceBottom || this.faceLeft || this.faceRight);\r\n }\r\n },\r\n\r\n /**\r\n * The tileset that contains this Tile. This is null if accessed from a LayerData instance\r\n * before the tile is placed in a StaticTilemapLayer or DynamicTilemapLayer, or if the tile has\r\n * an index that doesn't correspond to any of the map's tilesets.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tileset\r\n * @type {?Phaser.Tilemaps.Tileset}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tileset: {\r\n\r\n get: function ()\r\n {\r\n var tilemapLayer = this.layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n var tileset = tilemapLayer.gidMap[this.index];\r\n\r\n if (tileset)\r\n {\r\n return tileset;\r\n }\r\n }\r\n\r\n return null;\r\n }\r\n\r\n },\r\n\r\n /**\r\n * The tilemap layer that contains this Tile. This will only return null if accessed from a\r\n * LayerData instance before the tile is placed within a StaticTilemapLayer or\r\n * DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemapLayer\r\n * @type {?Phaser.Tilemaps.StaticTilemapLayer|Phaser.Tilemaps.DynamicTilemapLayer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemapLayer: {\r\n get: function ()\r\n {\r\n return this.layer.tilemapLayer;\r\n }\r\n },\r\n\r\n /**\r\n * The tilemap that contains this Tile. This will only return null if accessed from a LayerData\r\n * instance before the tile is placed within a StaticTilemapLayer or DynamicTilemapLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tile#tilemap\r\n * @type {?Phaser.Tilemaps.Tilemap}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n tilemap: {\r\n get: function ()\r\n {\r\n var tilemapLayer = this.tilemapLayer;\r\n return tilemapLayer ? tilemapLayer.tilemap : null;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tile.js?")},"./node_modules/phaser/src/tilemaps/Tilemap.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar DegToRad = __webpack_require__(/*! ../math/DegToRad */ \"./node_modules/phaser/src/math/DegToRad.js\");\r\nvar DynamicTilemapLayer = __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js\");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ \"./node_modules/phaser/src/utils/object/Extend.js\");\r\nvar Formats = __webpack_require__(/*! ./Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar LayerData = __webpack_require__(/*! ./mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar Rotate = __webpack_require__(/*! ../math/Rotate */ \"./node_modules/phaser/src/math/Rotate.js\");\r\nvar SpliceOne = __webpack_require__(/*! ../utils/array/SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\nvar StaticTilemapLayer = __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js\");\r\nvar Tile = __webpack_require__(/*! ./Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ./components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar Tileset = __webpack_require__(/*! ./Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * @callback TilemapFilterCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found in the filtered area.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {Phaser.GameObjects.GameObject} The object.\r\n */\r\n\r\n/**\r\n * @callback TilemapFindCallback\r\n *\r\n * @param {Phaser.GameObjects.GameObject} value - An object found.\r\n * @param {number} index - The index of the object within the array.\r\n * @param {Phaser.GameObjects.GameObject[]} array - An array of all the objects found.\r\n *\r\n * @return {boolean} `true` if the callback should be invoked, otherwise `false`.\r\n */\r\n\r\n/**\r\n * @classdesc\r\n * A Tilemap is a container for Tilemap data. This isn't a display object, rather, it holds data\r\n * about the map and allows you to add tilesets and tilemap layers to it. A map can have one or\r\n * more tilemap layers (StaticTilemapLayer or DynamicTilemapLayer), which are the display\r\n * objects that actually render tiles.\r\n *\r\n * The Tilemap data be parsed from a Tiled JSON file, a CSV file or a 2D array. Tiled is a free\r\n * software package specifically for creating tile maps, and is available from:\r\n * http://www.mapeditor.org\r\n *\r\n * A Tilemap has handy methods for getting & manipulating the tiles within a layer. You can only\r\n * use the methods that change tiles (e.g. removeTileAt) on a DynamicTilemapLayer.\r\n *\r\n * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a\r\n * StaticTilemapLayer or DynamicTilemapLayer may have its own unique tile size that overrides\r\n * it.\r\n *\r\n * @class Tilemap\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Tilemap belongs.\r\n * @param {Phaser.Tilemaps.MapData} mapData - A MapData instance containing Tilemap data.\r\n */\r\nvar Tilemap = new Class({\r\n\r\n initialize:\r\n\r\n function Tilemap (scene, mapData)\r\n {\r\n /**\r\n * @name Phaser.Tilemaps.Tilemap#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The base width of a tile in pixels. Note that individual layers may have a different tile\r\n * width.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileWidth\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = mapData.tileWidth;\r\n\r\n /**\r\n * The base height of a tile in pixels. Note that individual layers may have a different\r\n * tile height.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tileHeight\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = mapData.tileHeight;\r\n\r\n /**\r\n * The width of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = mapData.width;\r\n\r\n /**\r\n * The height of the map (in tiles).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = mapData.height;\r\n\r\n /**\r\n * The orientation of the map data (as specified in Tiled), usually 'orthogonal'.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = mapData.orientation;\r\n\r\n /**\r\n * The render (draw) order of the map data (as specified in Tiled), usually 'right-down'.\r\n *\r\n * The draw orders are:\r\n *\r\n * right-down\r\n * left-down\r\n * right-up\r\n * left-up\r\n *\r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = mapData.renderOrder;\r\n\r\n /**\r\n * The format of the map data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#format\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.format = mapData.format;\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled, usually 1).\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#version\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.version = mapData.version;\r\n\r\n /**\r\n * Map specific properties as specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = mapData.properties;\r\n\r\n /**\r\n * The width of the map in pixels based on width * tileWidth.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = mapData.widthInPixels;\r\n\r\n /**\r\n * The height of the map in pixels based on height * tileHeight.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = mapData.heightInPixels;\r\n\r\n /**\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#imageCollections\r\n * @type {Phaser.Tilemaps.ImageCollection[]}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = mapData.imageCollections;\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = mapData.images;\r\n\r\n /**\r\n * An array of Tilemap layer data.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layers\r\n * @type {Phaser.Tilemaps.LayerData[]}\r\n * @since 3.0.0\r\n */\r\n this.layers = mapData.layers;\r\n\r\n /**\r\n * An array of Tilesets used in the map.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = mapData.tilesets;\r\n\r\n /**\r\n * An array of ObjectLayer instances parsed from Tiled object layers.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#objects\r\n * @type {Phaser.Tilemaps.ObjectLayer[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = mapData.objects;\r\n\r\n /**\r\n * The index of the currently selected LayerData object.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#currentLayerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.currentLayerIndex = 0;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this map.\r\n *\r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n *\r\n * The draw orders are:\r\n *\r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n *\r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n *\r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * Calling this method _after_ creating Static or Dynamic Tilemap Layers will **not** automatically\r\n * update them to use the new render order. If you call this method after creating layers, use their\r\n * own `setRenderOrder` methods to change them as needed.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'number')\r\n {\r\n renderOrder = orders[renderOrder];\r\n }\r\n\r\n if (orders.indexOf(renderOrder) > -1)\r\n {\r\n this.renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.\r\n * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled\r\n * editor.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#addTilesetImage\r\n * @since 3.0.0\r\n *\r\n * @param {string} tilesetName - The name of the tileset as specified in the map data.\r\n * @param {string} [key] - The key of the Phaser.Cache image used for this tileset. If\r\n * `undefined` or `null` it will look for an image with a key matching the tilesetName parameter.\r\n * @param {integer} [tileWidth] - The width of the tile (in pixels) in the Tileset Image. If not\r\n * given it will default to the map's tileWidth value, or the tileWidth specified in the Tiled\r\n * JSON file.\r\n * @param {integer} [tileHeight] - The height of the tiles (in pixels) in the Tileset Image. If\r\n * not given it will default to the map's tileHeight value, or the tileHeight specified in the\r\n * Tiled JSON file.\r\n * @param {integer} [tileMargin] - The margin around the tiles in the sheet (in pixels). If not\r\n * specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [tileSpacing] - The spacing between each the tile in the sheet (in pixels).\r\n * If not specified, it will default to 0 or the value specified in the Tiled JSON file.\r\n * @param {integer} [gid=0] - If adding multiple tilesets to a blank map, specify the starting\r\n * GID this set will use here.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} Returns the Tileset object that was created or updated, or null if it\r\n * failed.\r\n */\r\n addTilesetImage: function (tilesetName, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid)\r\n {\r\n if (tilesetName === undefined) { return null; }\r\n if (key === undefined || key === null) { key = tilesetName; }\r\n\r\n if (!this.scene.sys.textures.exists(key))\r\n {\r\n console.warn('Invalid Tileset Image: ' + key);\r\n return null;\r\n }\r\n\r\n var texture = this.scene.sys.textures.get(key);\r\n\r\n var index = this.getTilesetIndex(tilesetName);\r\n\r\n if (index === null && this.format === Formats.TILED_JSON)\r\n {\r\n console.warn('No data found for Tileset: ' + tilesetName);\r\n return null;\r\n }\r\n\r\n var tileset = this.tilesets[index];\r\n\r\n if (tileset)\r\n {\r\n tileset.setTileSize(tileWidth, tileHeight);\r\n tileset.setSpacing(tileMargin, tileSpacing);\r\n tileset.setImage(texture);\r\n\r\n return tileset;\r\n }\r\n\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (gid === undefined) { gid = 0; }\r\n\r\n tileset = new Tileset(tilesetName, gid, tileWidth, tileHeight, tileMargin, tileSpacing);\r\n\r\n tileset.setImage(texture);\r\n\r\n this.tilesets.push(tileset);\r\n\r\n return tileset;\r\n },\r\n\r\n /**\r\n * Turns the DynamicTilemapLayer associated with the given layer into a StaticTilemapLayer. If\r\n * no layer specified, the map's current layer is used. This is useful if you want to manipulate\r\n * a map at the start of a scene, but then make it non-manipulable and optimize it for speed.\r\n * Note: the DynamicTilemapLayer passed in is destroyed, so make sure to store the value\r\n * returned from this method if you want to manipulate the new StaticTilemapLayer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#convertLayerToStatic\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer)} [layer] - The name of the layer from Tiled, the\r\n * index of the layer in the map, or a DynamicTilemapLayer.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer that was created, or null if it\r\n * failed.\r\n */\r\n convertLayerToStatic: function (layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n var dynamicLayer = layer.tilemapLayer;\r\n\r\n if (!dynamicLayer || !(dynamicLayer instanceof DynamicTilemapLayer))\r\n {\r\n return null;\r\n }\r\n\r\n var staticLayer = new StaticTilemapLayer(\r\n dynamicLayer.scene,\r\n dynamicLayer.tilemap,\r\n dynamicLayer.layerIndex,\r\n dynamicLayer.tileset,\r\n dynamicLayer.x,\r\n dynamicLayer.y\r\n );\r\n\r\n this.scene.sys.displayList.add(staticLayer);\r\n\r\n dynamicLayer.destroy();\r\n\r\n return staticLayer;\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * If no layer specified, the map's current layer is used. This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'copy')) { return this; }\r\n\r\n if (layer !== null)\r\n {\r\n TilemapComponents.Copy(\r\n srcTileX, srcTileY,\r\n width, height,\r\n destTileX, destTileY,\r\n recalculateFaces, layer\r\n );\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Creates a new and empty DynamicTilemapLayer. The currently selected layer in the map is set to this new layer.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createBlankDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of this layer. Must be unique within the map.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n * @param {integer} [width] - The width of the layer in tiles. If not specified, it will default to the map's width.\r\n * @param {integer} [height] - The height of the layer in tiles. If not specified, it will default to the map's height.\r\n * @param {integer} [tileWidth] - The width of the tiles the layer uses for calculations. If not specified, it will default to the map's tileWidth.\r\n * @param {integer} [tileHeight] - The height of the tiles the layer uses for calculations. If not specified, it will default to the map's tileHeight.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer that was created, or `null` if it failed.\r\n */\r\n createBlankDynamicLayer: function (name, tileset, x, y, width, height, tileWidth, tileHeight)\r\n {\r\n if (x === undefined) { x = 0; }\r\n if (y === undefined) { y = 0; }\r\n if (width === undefined) { width = this.width; }\r\n if (height === undefined) { height = this.height; }\r\n if (tileWidth === undefined) { tileWidth = this.tileWidth; }\r\n if (tileHeight === undefined) { tileHeight = this.tileHeight; }\r\n\r\n var index = this.getLayerIndex(name);\r\n\r\n if (index !== null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + name);\r\n return null;\r\n }\r\n\r\n var layerData = new LayerData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n width: width,\r\n height: height\r\n });\r\n\r\n var row;\r\n\r\n for (var tileY = 0; tileY < height; tileY++)\r\n {\r\n row = [];\r\n\r\n for (var tileX = 0; tileX < width; tileX++)\r\n {\r\n row.push(new Tile(layerData, -1, tileX, tileY, tileWidth, tileHeight, this.tileWidth, this.tileHeight));\r\n }\r\n\r\n layerData.data.push(row);\r\n }\r\n\r\n this.layers.push(layerData);\r\n\r\n this.currentLayerIndex = this.layers.length - 1;\r\n\r\n var dynamicLayer = new DynamicTilemapLayer(this.scene, this, this.currentLayerIndex, tileset, x, y);\r\n\r\n dynamicLayer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(dynamicLayer);\r\n\r\n return dynamicLayer;\r\n },\r\n\r\n /**\r\n * Creates a new DynamicTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * Unlike a static layer, a dynamic layer can be modified. See DynamicTilemapLayer for more\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createDynamicLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.DynamicTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createDynamicLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n\r\n if (x === undefined)\r\n {\r\n x = layerData.x;\r\n }\r\n\r\n if (y === undefined)\r\n {\r\n y = layerData.y;\r\n }\r\n\r\n var layer = new DynamicTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given gid in the map data. All properties from\r\n * the map data objectgroup are copied into the `spriteConfig`, so you can use this as an easy\r\n * way to configure Sprite properties from within the map editor. For example giving an object a\r\n * property of alpha: 0.5 in the map editor will duplicate that when the Sprite is created.\r\n *\r\n * Custom object properties not sharing names with the Sprite's own properties are copied to the\r\n * Sprite's {@link Phaser.GameObjects.Sprite#data data store}.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromObjects\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the object layer (from Tiled) to create Sprites from.\r\n * @param {(integer|string)} id - Either the id (object), gid (tile object) or name (object or\r\n * tile object) from Tiled. Ids are unique in Tiled, but a gid is shared by all tile objects\r\n * with the same graphic. The same name can be used on multiple objects.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=the scene the map is within] - The Scene to create the Sprites within.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromObjects: function (name, id, spriteConfig, scene)\r\n {\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n if (scene === undefined) { scene = this.scene; }\r\n\r\n var objectLayer = this.getObjectLayer(name);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('Cannot create from object. Invalid objectgroup name given: ' + name);\r\n return;\r\n }\r\n\r\n var objects = objectLayer.objects;\r\n var sprites = [];\r\n\r\n for (var i = 0; i < objects.length; i++)\r\n {\r\n var found = false;\r\n var obj = objects[i];\r\n\r\n if (obj.gid !== undefined && typeof id === 'number' && obj.gid === id ||\r\n obj.id !== undefined && typeof id === 'number' && obj.id === id ||\r\n obj.name !== undefined && typeof id === 'string' && obj.name === id)\r\n {\r\n found = true;\r\n }\r\n\r\n if (found)\r\n {\r\n var config = Extend({}, spriteConfig, obj.properties);\r\n\r\n config.x = obj.x;\r\n config.y = obj.y;\r\n\r\n var sprite = scene.make.sprite(config);\r\n\r\n sprite.name = obj.name;\r\n\r\n if (obj.width) { sprite.displayWidth = obj.width; }\r\n if (obj.height) { sprite.displayHeight = obj.height; }\r\n\r\n // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin.\r\n var offset = {\r\n x: sprite.originX * sprite.displayWidth,\r\n y: (sprite.originY - 1) * sprite.displayHeight\r\n };\r\n\r\n // If the object is rotated, then the origin offset also needs to be rotated.\r\n if (obj.rotation)\r\n {\r\n var angle = DegToRad(obj.rotation);\r\n Rotate(offset, angle);\r\n sprite.rotation = angle;\r\n }\r\n\r\n sprite.x += offset.x;\r\n sprite.y += offset.y;\r\n\r\n if (obj.flippedHorizontal !== undefined || obj.flippedVertical !== undefined)\r\n {\r\n sprite.setFlip(obj.flippedHorizontal, obj.flippedVertical);\r\n }\r\n\r\n if (!obj.visible) { sprite.visible = false; }\r\n\r\n for (var key in obj.properties)\r\n {\r\n if (sprite.hasOwnProperty(key))\r\n {\r\n continue;\r\n }\r\n\r\n sprite.setData(key, obj.properties[key]);\r\n }\r\n\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n return sprites;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.GameObjects.Sprite[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, layer);\r\n },\r\n\r\n /**\r\n * Creates a new StaticTilemapLayer that renders the LayerData associated with the given\r\n * `layerID`. The currently selected layer in the map is set to this new layer.\r\n *\r\n * The `layerID` is important. If you've created your map in Tiled then you can get this by\r\n * looking in Tiled and looking at the layer name. Or you can open the JSON file it exports and\r\n * look at the layers[].name value. Either way it must match.\r\n *\r\n * It's important to remember that a static layer cannot be modified. See StaticTilemapLayer for\r\n * more information.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#createStaticLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|string)} layerID - The layer array index value, or if a string is given, the layer name from Tiled.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The x position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n * @param {number} [y=0] - The y position to place the layer in the world. If not specified, it will default to the layer offset from Tiled or 0.\r\n *\r\n * @return {?Phaser.Tilemaps.StaticTilemapLayer} Returns the new layer was created, or null if it failed.\r\n */\r\n createStaticLayer: function (layerID, tileset, x, y)\r\n {\r\n var index = this.getLayerIndex(layerID);\r\n\r\n if (index === null)\r\n {\r\n console.warn('Invalid Tilemap Layer ID: ' + layerID);\r\n return null;\r\n }\r\n\r\n var layerData = this.layers[index];\r\n\r\n // Check for an associated static or dynamic tilemap layer\r\n if (layerData.tilemapLayer)\r\n {\r\n console.warn('Tilemap Layer ID already exists:' + layerID);\r\n return null;\r\n }\r\n\r\n this.currentLayerIndex = index;\r\n\r\n // Default the x/y position to match Tiled layer offset, if it exists.\r\n if (x === undefined && this.layers[index].x) { x = this.layers[index].x; }\r\n if (y === undefined && this.layers[index].y) { y = this.layers[index].y; }\r\n\r\n var layer = new StaticTilemapLayer(this.scene, this, index, tileset, x, y);\r\n\r\n layer.setRenderOrder(this.renderOrder);\r\n\r\n this.scene.sys.displayList.add(layer);\r\n\r\n return layer;\r\n },\r\n\r\n /**\r\n * Removes all layer data from this Tilemap and nulls the scene reference. This will destroy any\r\n * StaticTilemapLayers or DynamicTilemapLayers that have been linked to LayerData.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.removeAllLayers();\r\n this.tilesets.length = 0;\r\n this.objects.length = 0;\r\n this.scene = undefined;\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n if (this._isStaticCall(layer, 'fill')) { return this; }\r\n\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each object in the given object layer, run the given filter callback function. Any\r\n * objects that pass the filter test (i.e. where the callback returns true) will returned as a\r\n * new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterObjects\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFilterCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject[]} An array of object that match the search, or null if the objectLayer given was invalid.\r\n */\r\n filterObjects: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.filter(callback, context);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findByIndex: function (findIndex, skip, reverse, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, layer);\r\n },\r\n\r\n /**\r\n * Find the first object in the given object layer that satisfies the provided testing function.\r\n * I.e. finds the first object for which `callback` returns true. Similar to\r\n * Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findObject\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tilemaps.ObjectLayer|string)} objectLayer - The name of an object layer (from Tiled) or an ObjectLayer instance.\r\n * @param {TilemapFindCallback} callback - The callback. Each object in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n *\r\n * @return {?Phaser.GameObjects.GameObject} An object that matches the search, or null if no object found.\r\n */\r\n findObject: function (objectLayer, callback, context)\r\n {\r\n if (typeof objectLayer === 'string')\r\n {\r\n var name = objectLayer;\r\n\r\n objectLayer = this.getObjectLayer(objectLayer);\r\n\r\n if (!objectLayer)\r\n {\r\n console.warn('No object layer found with the name: ' + name);\r\n return null;\r\n }\r\n }\r\n\r\n return objectLayer.objects.find(callback, context) || null;\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tiles, or null if the layer given was invalid.\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The Tile layer to run the search on. If not provided will use the current layer.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the image layer index based on its name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getImageIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the image to get.\r\n *\r\n * @return {integer} The index of the image in this tilemap, or null if not found.\r\n */\r\n getImageIndex: function (name)\r\n {\r\n return this.getIndex(this.images, name);\r\n },\r\n\r\n /**\r\n * Internally used. Returns the index of the object in one of the Tilemaps arrays whose name\r\n * property matches the given `name`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getIndex\r\n * @since 3.0.0\r\n *\r\n * @param {array} location - The Tilemap array to search.\r\n * @param {string} name - The name of the array element to get.\r\n *\r\n * @return {number} The index of the element in the array, or null if not found.\r\n */\r\n getIndex: function (location, name)\r\n {\r\n for (var i = 0; i < location.length; i++)\r\n {\r\n if (location[i].name === name)\r\n {\r\n return i;\r\n }\r\n }\r\n\r\n return null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData from this.layers that is associated with `layer`, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the maps current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.LayerData} The corresponding LayerData within this.layers.\r\n */\r\n getLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n return (index !== null) ? this.layers[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the ObjectLayer from this.objects that has the given `name`, or null if no ObjectLayer\r\n * is found with that name.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getObjectLayer\r\n * @since 3.0.0\r\n *\r\n * @param {string} [name] - The name of the object layer from Tiled.\r\n *\r\n * @return {?Phaser.Tilemaps.ObjectLayer} The corresponding ObjectLayer within this.objects or null.\r\n */\r\n getObjectLayer: function (name)\r\n {\r\n var index = this.getIndex(this.objects, name);\r\n\r\n return (index !== null) ? this.objects[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the LayerData index of the given `layer` within this.layers, or null if an invalid\r\n * `layer` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndex\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndex: function (layer)\r\n {\r\n if (layer === undefined)\r\n {\r\n return this.currentLayerIndex;\r\n }\r\n else if (typeof layer === 'string')\r\n {\r\n return this.getLayerIndexByName(layer);\r\n }\r\n else if (typeof layer === 'number' && layer < this.layers.length)\r\n {\r\n return layer;\r\n }\r\n else if (layer instanceof StaticTilemapLayer || layer instanceof DynamicTilemapLayer)\r\n {\r\n return layer.layerIndex;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Gets the index of the LayerData within this.layers that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getLayerIndexByName\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the layer to get.\r\n *\r\n * @return {integer} The LayerData index within this.layers.\r\n */\r\n getLayerIndexByName: function (name)\r\n {\r\n return this.getIndex(this.layers, name);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile[]} Returns an array of Tiles, or null if the layer given was invalid.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, layer);\r\n },\r\n\r\n /**\r\n * Gets the Tileset that has the given `name`, or null if an invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTileset\r\n * @since 3.14.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {?Phaser.Tilemaps.Tileset} The Tileset, or `null` if no matching named tileset was found.\r\n */\r\n getTileset: function (name)\r\n {\r\n var index = this.getIndex(this.tilesets, name);\r\n\r\n return (index !== null) ? this.tilesets[index] : null;\r\n },\r\n\r\n /**\r\n * Gets the index of the Tileset within this.tilesets that has the given `name`, or null if an\r\n * invalid `name` is given.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#getTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the Tileset to get.\r\n *\r\n * @return {integer} The Tileset index within this.tilesets.\r\n */\r\n getTilesetIndex: function (name)\r\n {\r\n return this.getIndex(this.tilesets, name);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAt(tileX, tileY, layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, layer);\r\n },\r\n\r\n /**\r\n * The LayerData object that is currently selected in the map. You can set this property using\r\n * any type supported by setLayer.\r\n *\r\n * @name Phaser.Tilemaps.Tilemap#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n layer: {\r\n get: function ()\r\n {\r\n return this.layers[this.currentLayerIndex];\r\n },\r\n\r\n set: function (layer)\r\n {\r\n this.setLayer(layer);\r\n }\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid or the coordinates were out of bounds.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * If no layer specified, the maps current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'putTilesAt')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'randomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesAt: function (tileX, tileY, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given TilemapLayer from this Tilemap without destroying it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be removed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n removeLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Destroys the given TilemapLayer and removes it from this Tilemap.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#destroyLayer\r\n * @since 3.17.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to be destroyed.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.\r\n */\r\n destroyLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n layer = this.layers[index];\r\n\r\n layer.destroy();\r\n\r\n SpliceOne(this.layers, index);\r\n\r\n if (this.currentLayerIndex === index)\r\n {\r\n this.currentLayerIndex = 0;\r\n }\r\n\r\n return this;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n },\r\n\r\n /**\r\n * Removes all layers from this Tilemap and destroys any associated StaticTilemapLayers or\r\n * DynamicTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeAllLayers\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n removeAllLayers: function ()\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n if (layers[i].tilemapLayer)\r\n {\r\n layers[i].tilemapLayer.destroy(false);\r\n }\r\n }\r\n\r\n layers.length = 0;\r\n\r\n this.currentLayerIndex = 0;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the given Tile, or an array of Tiles, from the layer to which they belong,\r\n * and optionally recalculates the collision information.\r\n *\r\n * This cannot be applied to Tiles that belong to Static Tilemap Layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTile\r\n * @since 3.17.0\r\n *\r\n * @param {(Phaser.Tilemaps.Tile|Phaser.Tilemaps.Tile[])} tiles - The Tile to remove, or an array of Tiles.\r\n * @param {integer} [replaceIndex=-1] - After removing the Tile, insert a brand new Tile into its location with the given index. Leave as -1 to just remove the tile.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Returns an array of Tiles that were removed.\r\n */\r\n removeTile: function (tiles, replaceIndex, recalculateFaces)\r\n {\r\n if (replaceIndex === undefined) { replaceIndex = -1; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var removed = [];\r\n\r\n if (!Array.isArray(tiles))\r\n {\r\n tiles = [ tiles ];\r\n }\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n removed.push(this.removeTileAt(tile.x, tile.y, true, recalculateFaces, tile.tilemapLayer));\r\n\r\n if (replaceIndex > -1)\r\n {\r\n this.putTileAt(replaceIndex, tile.x, tile.y, recalculateFaces, tile.tilemapLayer);\r\n }\r\n }\r\n\r\n return removed;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns the Tile that was removed, or null if the layer given was invalid.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAt')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} Returns a Tile, or null if the layer given was invalid.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'removeTileAtWorldXY')) { return null; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebug: function (graphics, styleConfig, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Draws a debug representation of all layers within this Tilemap to the given Graphics object.\r\n *\r\n * This is helpful when you want to get a quick idea of which of your tiles are colliding and which\r\n * have interesting faces. The tiles are drawn starting at (0, 0) in the Graphics, allowing you to\r\n * place the debug representation wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#renderDebugFull\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n renderDebugFull: function (graphics, styleConfig)\r\n {\r\n var layers = this.layers;\r\n\r\n // Destroy any StaticTilemapLayers or DynamicTilemapLayers that are stored in LayerData\r\n for (var i = 0; i < layers.length; i++)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, layers[i]);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'replaceByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordindates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * If no layer specified, the map's current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the current layer to the LayerData associated with `layer`.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayer\r\n * @since 3.0.0\r\n *\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayer: function (layer)\r\n {\r\n var index = this.getLayerIndex(layer);\r\n\r\n if (index !== null)\r\n {\r\n this.currentLayerIndex = index;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the base tile size for the map. Note: this does not necessarily match the tileWidth and\r\n * tileHeight for all layers. This also updates the base size on all tiles across all layers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setBaseTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles the map uses for calculations.\r\n * @param {integer} tileHeight - The height of the tiles the map uses for calculations.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setBaseTileSize: function (tileWidth, tileHeight)\r\n {\r\n this.tileWidth = tileWidth;\r\n this.tileHeight = tileHeight;\r\n this.widthInPixels = this.width * tileWidth;\r\n this.heightInPixels = this.height * tileHeight;\r\n\r\n // Update the base tile size on all layers & tiles\r\n for (var i = 0; i < this.layers.length; i++)\r\n {\r\n this.layers[i].baseTileWidth = tileWidth;\r\n this.layers[i].baseTileHeight = tileHeight;\r\n\r\n var mapData = this.layers[i].data;\r\n var mapWidth = this.layers[i].width;\r\n var mapHeight = this.layers[i].height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(undefined, undefined, tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile size for a specific `layer`. Note: this does not necessarily match the map's\r\n * tileWidth and tileHeight for all layers. This will set the tile size for the layer and any\r\n * tiles the layer has.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#setLayerTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileWidth - The width of the tiles (in pixels) in the layer.\r\n * @param {integer} tileHeight - The height of the tiles (in pixels) in the layer.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The name of the\r\n * layer from Tiled, the index of the layer in the map, a DynamicTilemapLayer or a\r\n * StaticTilemapLayer. If not given will default to the map's current layer index.\r\n *\r\n * @return {Phaser.Tilemaps.Tilemap} This Tilemap object.\r\n */\r\n setLayerTileSize: function (tileWidth, tileHeight, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return this; }\r\n\r\n layer.tileWidth = tileWidth;\r\n layer.tileHeight = tileHeight;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n for (var row = 0; row < mapHeight; row++)\r\n {\r\n for (var col = 0; col < mapWidth; col++)\r\n {\r\n var tile = mapData[row][col];\r\n\r\n if (tile !== null)\r\n {\r\n tile.setSize(tileWidth, tileHeight);\r\n }\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n shuffle: function (tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'shuffle')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n * This cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'swapByIndex')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldX: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldX(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n tileToWorldY: function (tileX, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldY(tileX, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * If no layer specified, the map's current layer is used. This\r\n * cannot be applied to StaticTilemapLayers.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (this._isStaticCall(layer, 'weightedRandomize')) { return this; }\r\n\r\n if (layer === null) { return null; }\r\n\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer\r\n * to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?number} Returns a number, or null if the layer given was invalid.\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * If no layer specified, the maps current layer is used.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used.\r\n *\r\n * @return {?Phaser.Math.Vector2} Returns a point, or null if the layer given was invalid.\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera, layer)\r\n {\r\n layer = this.getLayer(layer);\r\n\r\n if (layer === null) { return null; }\r\n\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, layer);\r\n },\r\n\r\n /**\r\n * Used internally to check if a layer is static and prints out a warning.\r\n *\r\n * @method Phaser.Tilemaps.Tilemap#_isStaticCall\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @return {boolean}\r\n */\r\n _isStaticCall: function (layer, functionName)\r\n {\r\n if (layer.tilemapLayer instanceof StaticTilemapLayer)\r\n {\r\n console.warn(functionName + ': You cannot change the tiles in a static tilemap layer');\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tilemap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tilemap.js?")},"./node_modules/phaser/src/tilemaps/TilemapCreator.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectCreator = __webpack_require__(/*! ../gameobjects/GameObjectCreator */ "./node_modules/phaser/src/gameobjects/GameObjectCreator.js");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tilemap\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Types.Tilemaps.TilemapConfig} [config] - The config options for the Tilemap.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectCreator.register(\'tilemap\', function (config)\r\n{\r\n // Defaults are applied in ParseToTilemap\r\n var c = (config !== undefined) ? config : {};\r\n\r\n return ParseToTilemap(\r\n this.scene,\r\n c.key,\r\n c.tileWidth,\r\n c.tileHeight,\r\n c.width,\r\n c.height,\r\n c.data,\r\n c.insertNull\r\n );\r\n});\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapCreator.js?')},"./node_modules/phaser/src/tilemaps/TilemapFactory.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GameObjectFactory = __webpack_require__(/*! ../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar ParseToTilemap = __webpack_require__(/*! ./ParseToTilemap */ \"./node_modules/phaser/src/tilemaps/ParseToTilemap.js\");\r\n\r\n/**\r\n * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided.\r\n * When loading from CSV or a 2D array, you should specify the tileWidth & tileHeight. When parsing\r\n * from a map from Tiled, the tileWidth, tileHeight, width & height will be pulled from the map\r\n * data. For an empty map, you should specify tileWidth, tileHeight, width & height.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tilemap\r\n * @since 3.0.0\r\n *\r\n * @param {string} [key] - The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * @param {integer} [tileWidth=32] - The width of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [tileHeight=32] - The height of a tile in pixels. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [width=10] - The width of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer} [height=10] - The height of the map in tiles. Pass in `null` to leave as the\r\n * default.\r\n * @param {integer[][]} [data] - Instead of loading from the cache, you can also load directly from\r\n * a 2D array of tile indexes. Pass in `null` for no data.\r\n * @param {boolean} [insertNull=false] - Controls how empty tiles, tiles with an index of -1, in the\r\n * map data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n * \r\n * @return {Phaser.Tilemaps.Tilemap}\r\n */\r\nGameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, width, height, data, insertNull)\r\n{\r\n // Allow users to specify null to indicate that they want the default value, since null is\r\n // shorter & more legible than undefined. Convert null to undefined to allow ParseToTilemap\r\n // defaults to take effect.\r\n\r\n if (key === null) { key = undefined; }\r\n if (tileWidth === null) { tileWidth = undefined; }\r\n if (tileHeight === null) { tileHeight = undefined; }\r\n if (width === null) { width = undefined; }\r\n if (height === null) { height = undefined; }\r\n\r\n return ParseToTilemap(this.scene, key, tileWidth, tileHeight, width, height, data, insertNull);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/TilemapFactory.js?")},"./node_modules/phaser/src/tilemaps/Tileset.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tileset is a combination of an image containing the tiles and a container for data about\r\n * each tile.\r\n *\r\n * @class Tileset\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tileset in the map data.\r\n * @param {integer} firstgid - The first tile index this tileset contains.\r\n * @param {integer} [tileWidth=32] - Width of each tile (in pixels).\r\n * @param {integer} [tileHeight=32] - Height of each tile (in pixels).\r\n * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels).\r\n * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels).\r\n * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset.\r\n * These typically are custom properties created in Tiled when editing a tileset.\r\n * @param {object} [tileData={}] - Data stored per tile. These typically are created in Tiled\r\n * when editing a tileset, e.g. from Tiled's tile collision editor or terrain editor.\r\n */\r\nvar Tileset = new Class({\r\n\r\n initialize:\r\n\r\n function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData)\r\n {\r\n if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; }\r\n if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; }\r\n if (tileMargin === undefined) { tileMargin = 0; }\r\n if (tileSpacing === undefined) { tileSpacing = 0; }\r\n if (tileProperties === undefined) { tileProperties = {}; }\r\n if (tileData === undefined) { tileData = {}; }\r\n\r\n /**\r\n * The name of the Tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = name;\r\n\r\n /**\r\n * The starting index of the first tile index this Tileset contains.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#firstgid\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.firstgid = firstgid;\r\n\r\n /**\r\n * The width of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileWidth\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = tileWidth;\r\n\r\n /**\r\n * The height of each tile (in pixels). Use setTileSize to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileHeight\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = tileHeight;\r\n\r\n /**\r\n * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileMargin\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileMargin = tileMargin;\r\n\r\n /**\r\n * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileSpacing\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.tileSpacing = tileSpacing;\r\n\r\n /**\r\n * Tileset-specific properties per tile that are typically defined in the Tiled editor in the\r\n * Tileset editor.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileProperties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileProperties = tileProperties;\r\n\r\n /**\r\n * Tileset-specific data per tile that are typically defined in the Tiled editor, e.g. within\r\n * the Tileset collision editor. This is where collision objects and terrain are stored.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#tileData\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.tileData = tileData;\r\n\r\n /**\r\n * The cached image that contains the individual tiles. Use setImage to set.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#image\r\n * @type {?Phaser.Textures.Texture}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.image = null;\r\n\r\n /**\r\n * The gl texture used by the WebGL renderer.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#glTexture\r\n * @type {?WebGLTexture}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.glTexture = null;\r\n\r\n /**\r\n * The number of tile rows in the the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#rows\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.rows = 0;\r\n\r\n /**\r\n * The number of tile columns in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#columns\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.columns = 0;\r\n\r\n /**\r\n * The total number of tiles in the tileset.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#total\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.total = 0;\r\n\r\n /**\r\n * The look-up table to specific tile image texture coordinates (UV in pixels). Each element\r\n * contains the coordinates for a tile in an object of the form {x, y}.\r\n *\r\n * @name Phaser.Tilemaps.Tileset#texCoordinates\r\n * @type {object[]}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.texCoordinates = [];\r\n },\r\n\r\n /**\r\n * Get a tiles properties that are stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined in Tiled under the Tileset editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?(object|undefined)}\r\n */\r\n getTileProperties: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileProperties[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's data that is stored in the Tileset. Returns null if tile index is not contained\r\n * in this Tileset. This is typically defined in Tiled and will contain both Tileset collision\r\n * info and terrain mapping.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object|undefined}\r\n */\r\n getTileData: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.tileData[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Get a tile's collision group that is stored in the Tileset. Returns null if tile index is not\r\n * contained in this Tileset. This is typically defined within Tiled's tileset collision editor.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object}\r\n */\r\n getTileCollisionGroup: function (tileIndex)\r\n {\r\n var data = this.getTileData(tileIndex);\r\n\r\n return (data && data.objectgroup) ? data.objectgroup : null;\r\n },\r\n\r\n /**\r\n * Returns true if and only if this Tileset contains the given tile index.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#containsTileIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {boolean}\r\n */\r\n containsTileIndex: function (tileIndex)\r\n {\r\n return (\r\n tileIndex >= this.firstgid &&\r\n tileIndex < (this.firstgid + this.total)\r\n );\r\n },\r\n\r\n /**\r\n * Returns the texture coordinates (UV in pixels) in the Tileset image for the given tile index.\r\n * Returns null if tile index is not contained in this Tileset.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map.\r\n *\r\n * @return {?object} Object in the form { x, y } representing the top-left UV coordinate\r\n * within the Tileset image.\r\n */\r\n getTileTextureCoordinates: function (tileIndex)\r\n {\r\n if (!this.containsTileIndex(tileIndex)) { return null; }\r\n\r\n return this.texCoordinates[tileIndex - this.firstgid];\r\n },\r\n\r\n /**\r\n * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setImage\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Textures.Texture} texture - The image that contains the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setImage: function (texture)\r\n {\r\n this.image = texture;\r\n\r\n this.glTexture = texture.get().source.glTexture;\r\n\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile width & height and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setTileSize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileWidth] - The width of a tile in pixels.\r\n * @param {integer} [tileHeight] - The height of a tile in pixels.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setTileSize: function (tileWidth, tileHeight)\r\n {\r\n if (tileWidth !== undefined) { this.tileWidth = tileWidth; }\r\n if (tileHeight !== undefined) { this.tileHeight = tileHeight; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.).\r\n *\r\n * @method Phaser.Tilemaps.Tileset#setSpacing\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels).\r\n * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels).\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n setSpacing: function (margin, spacing)\r\n {\r\n if (margin !== undefined) { this.tileMargin = margin; }\r\n if (spacing !== undefined) { this.tileSpacing = spacing; }\r\n\r\n if (this.image)\r\n {\r\n this.updateTileData(this.image.source[0].width, this.image.source[0].height);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates tile texture coordinates and tileset data.\r\n *\r\n * @method Phaser.Tilemaps.Tileset#updateTileData\r\n * @since 3.0.0\r\n *\r\n * @param {integer} imageWidth - The (expected) width of the image to slice.\r\n * @param {integer} imageHeight - The (expected) height of the image to slice.\r\n *\r\n * @return {Phaser.Tilemaps.Tileset} This Tileset object.\r\n */\r\n updateTileData: function (imageWidth, imageHeight)\r\n {\r\n var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing);\r\n var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing);\r\n\r\n if (rowCount % 1 !== 0 || colCount % 1 !== 0)\r\n {\r\n console.warn('Image tile area not tile size multiple in: ' + this.name);\r\n }\r\n\r\n // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated\r\n // - hence the floor when calculating the rows/columns.\r\n rowCount = Math.floor(rowCount);\r\n colCount = Math.floor(colCount);\r\n\r\n this.rows = rowCount;\r\n this.columns = colCount;\r\n\r\n // In Tiled, \"empty\" spaces in a tileset count as tiles and hence count towards the gid\r\n this.total = rowCount * colCount;\r\n\r\n this.texCoordinates.length = 0;\r\n\r\n var tx = this.tileMargin;\r\n var ty = this.tileMargin;\r\n\r\n for (var y = 0; y < this.rows; y++)\r\n {\r\n for (var x = 0; x < this.columns; x++)\r\n {\r\n this.texCoordinates.push({ x: tx, y: ty });\r\n tx += this.tileWidth + this.tileSpacing;\r\n }\r\n\r\n tx = this.tileMargin;\r\n ty += this.tileHeight + this.tileSpacing;\r\n }\r\n\r\n return this;\r\n }\r\n\r\n});\r\n\r\nmodule.exports = Tileset;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/Tileset.js?")},"./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\n\r\n/**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesAt\r\n * @private\r\n * @since 3.0.0\r\n * \r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesAt = function (tileX, tileY, layer)\r\n{\r\n var tile = GetTileAt(tileX, tileY, true, layer);\r\n var above = GetTileAt(tileX, tileY - 1, true, layer);\r\n var below = GetTileAt(tileX, tileY + 1, true, layer);\r\n var left = GetTileAt(tileX - 1, tileY, true, layer);\r\n var right = GetTileAt(tileX + 1, tileY, true, layer);\r\n var tileCollides = tile && tile.collides;\r\n\r\n // Assume the changed tile has all interesting edges\r\n if (tileCollides)\r\n {\r\n tile.faceTop = true;\r\n tile.faceBottom = true;\r\n tile.faceLeft = true;\r\n tile.faceRight = true;\r\n }\r\n\r\n // Reset edges that are shared between tile and its neighbors\r\n if (above && above.collides)\r\n {\r\n if (tileCollides) { tile.faceTop = false; }\r\n above.faceBottom = !tileCollides;\r\n }\r\n\r\n if (below && below.collides)\r\n {\r\n if (tileCollides) { tile.faceBottom = false; }\r\n below.faceTop = !tileCollides;\r\n }\r\n\r\n if (left && left.collides)\r\n {\r\n if (tileCollides) { tile.faceLeft = false; }\r\n left.faceRight = !tileCollides;\r\n }\r\n\r\n if (right && right.collides)\r\n {\r\n if (tileCollides) { tile.faceRight = false; }\r\n right.faceLeft = !tileCollides;\r\n }\r\n\r\n if (tile && !tile.collides) { tile.resetFaces(); }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = CalculateFacesAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js?')},"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CalculateFacesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar CalculateFacesWithin = function (tileX, tileY, width, height, layer)\r\n{\r\n var above = null;\r\n var below = null;\r\n var left = null;\r\n var right = null;\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (tile)\r\n {\r\n if (tile.collides)\r\n {\r\n above = GetTileAt(tile.x, tile.y - 1, true, layer);\r\n below = GetTileAt(tile.x, tile.y + 1, true, layer);\r\n left = GetTileAt(tile.x - 1, tile.y, true, layer);\r\n right = GetTileAt(tile.x + 1, tile.y, true, layer);\r\n\r\n tile.faceTop = (above && above.collides) ? false : true;\r\n tile.faceBottom = (below && below.collides) ? false : true;\r\n tile.faceLeft = (left && left.collides) ? false : true;\r\n tile.faceRight = (right && right.collides) ? false : true;\r\n }\r\n else\r\n {\r\n tile.resetFaces();\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = CalculateFacesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js?')},"./node_modules/phaser/src/tilemaps/components/Copy.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\n\r\n/**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @function Phaser.Tilemaps.Components.Copy\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Copy = function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, layer)\r\n{\r\n if (srcTileX < 0) { srcTileX = 0; }\r\n if (srcTileY < 0) { srcTileY = 0; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var srcTiles = GetTilesWithin(srcTileX, srcTileY, width, height, null, layer);\r\n\r\n var offsetX = destTileX - srcTileX;\r\n var offsetY = destTileY - srcTileY;\r\n\r\n for (var i = 0; i < srcTiles.length; i++)\r\n {\r\n var tileX = srcTiles[i].x + offsetX;\r\n var tileY = srcTiles[i].y + offsetY;\r\n if (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height)\r\n {\r\n if (layer.data[tileY][tileX])\r\n {\r\n layer.data[tileY][tileX].copy(srcTiles[i]);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(destTileX - 1, destTileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Copy;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Copy.js?')},"./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ReplaceByIndex = __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js");\r\n\r\n/**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @function Phaser.Tilemaps.Components.CreateFromTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e. scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\nvar CreateFromTiles = function (indexes, replacements, spriteConfig, scene, camera, layer)\r\n{\r\n if (spriteConfig === undefined) { spriteConfig = {}; }\r\n\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n var tilemapLayer = layer.tilemapLayer;\r\n if (scene === undefined) { scene = tilemapLayer.scene; }\r\n if (camera === undefined) { camera = scene.cameras.main; }\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n var sprites = [];\r\n var i;\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n if (indexes.indexOf(tile.index) !== -1)\r\n {\r\n spriteConfig.x = TileToWorldX(tile.x, camera, layer);\r\n spriteConfig.y = TileToWorldY(tile.y, camera, layer);\r\n\r\n var sprite = scene.make.sprite(spriteConfig);\r\n sprites.push(sprite);\r\n }\r\n }\r\n\r\n if (typeof replacements === \'number\')\r\n {\r\n // Assume 1 replacement for all types of tile given\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements, 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n else if (Array.isArray(replacements))\r\n {\r\n // Assume 1 to 1 mapping with indexes array\r\n for (i = 0; i < indexes.length; i++)\r\n {\r\n ReplaceByIndex(indexes[i], replacements[i], 0, 0, layer.width, layer.height, layer);\r\n }\r\n }\r\n\r\n return sprites;\r\n};\r\n\r\nmodule.exports = CreateFromTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js?')},"./node_modules/phaser/src/tilemaps/components/CullTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SnapFloor = __webpack_require__(/*! ../../math/snap/SnapFloor */ "./node_modules/phaser/src/math/snap/SnapFloor.js");\r\nvar SnapCeil = __webpack_require__(/*! ../../math/snap/SnapCeil */ "./node_modules/phaser/src/math/snap/SnapCeil.js");\r\n\r\n/**\r\n * Returns the tiles in the given layer that are within the camera\'s viewport. This is used internally.\r\n *\r\n * @function Phaser.Tilemaps.Components.CullTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n * @param {array} [outputArray] - An optional array to store the Tile objects within.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\nvar CullTiles = function (layer, camera, outputArray, renderOrder)\r\n{\r\n if (outputArray === undefined) { outputArray = []; }\r\n if (renderOrder === undefined) { renderOrder = 0; }\r\n\r\n outputArray.length = 0;\r\n\r\n var tilemap = layer.tilemapLayer.tilemap;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n var mapData = layer.data;\r\n var mapWidth = layer.width;\r\n var mapHeight = layer.height;\r\n\r\n // We need to use the tile sizes defined for the map as a whole, not the layer,\r\n // in order to calculate the bounds correctly. As different sized tiles may be\r\n // placed on the grid and we cannot trust layer.baseTileWidth to give us the true size.\r\n var tileW = Math.floor(tilemap.tileWidth * tilemapLayer.scaleX);\r\n var tileH = Math.floor(tilemap.tileHeight * tilemapLayer.scaleY);\r\n\r\n var drawLeft = 0;\r\n var drawRight = mapWidth;\r\n var drawTop = 0;\r\n var drawBottom = mapHeight;\r\n\r\n if (!tilemapLayer.skipCull && tilemapLayer.scrollFactorX === 1 && tilemapLayer.scrollFactorY === 1)\r\n {\r\n // Camera world view bounds, snapped for scaled tile size\r\n // Cull Padding values are given in tiles, not pixels\r\n\r\n var boundsLeft = SnapFloor(camera.worldView.x - tilemapLayer.x, tileW, 0, true) - tilemapLayer.cullPaddingX;\r\n var boundsRight = SnapCeil(camera.worldView.right - tilemapLayer.x, tileW, 0, true) + tilemapLayer.cullPaddingX;\r\n var boundsTop = SnapFloor(camera.worldView.y - tilemapLayer.y, tileH, 0, true) - tilemapLayer.cullPaddingY;\r\n var boundsBottom = SnapCeil(camera.worldView.bottom - tilemapLayer.y, tileH, 0, true) + tilemapLayer.cullPaddingY;\r\n\r\n drawLeft = Math.max(0, boundsLeft);\r\n drawRight = Math.min(mapWidth, boundsRight);\r\n drawTop = Math.max(0, boundsTop);\r\n drawBottom = Math.min(mapHeight, boundsBottom);\r\n }\r\n\r\n var x;\r\n var y;\r\n var tile;\r\n\r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n\r\n for (y = drawTop; y < drawBottom; y++)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawLeft; mapData[y] && x < drawRight; x++)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n\r\n for (y = drawBottom; y >= drawTop; y--)\r\n {\r\n for (x = drawRight; mapData[y] && x >= drawLeft; x--)\r\n {\r\n tile = mapData[y][x];\r\n\r\n if (!tile || tile.index === -1 || !tile.visible || tile.alpha === 0)\r\n {\r\n continue;\r\n }\r\n\r\n outputArray.push(tile);\r\n }\r\n }\r\n }\r\n\r\n tilemapLayer.tilesDrawn = outputArray.length;\r\n tilemapLayer.tilesTotal = mapWidth * mapHeight;\r\n\r\n return outputArray;\r\n};\r\n\r\nmodule.exports = CullTiles;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/CullTiles.js?')},"./node_modules/phaser/src/tilemaps/components/Fill.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @function Phaser.Tilemaps.Components.Fill\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} recalculateFaces - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The tile layer to use. If not given the current layer is used.\r\n */\r\nvar Fill = function (index, tileX, tileY, width, height, recalculateFaces, layer)\r\n{\r\n var doesIndexCollide = (layer.collideIndexes.indexOf(index) !== -1);\r\n\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = index;\r\n\r\n SetTileCollision(tiles[i], doesIndexCollide);\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = Fill;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Fill.js?')},"./node_modules/phaser/src/tilemaps/components/FilterTiles.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FilterTiles\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} The filtered array of Tiles.\r\n */\r\nvar FilterTiles = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n return tiles.filter(callback, context);\r\n};\r\n\r\nmodule.exports = FilterTiles;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FilterTiles.js?')},"./node_modules/phaser/src/tilemaps/components/FindByIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} The first (or n skipped) tile with the matching index.\r\n */\r\nvar FindByIndex = function (findIndex, skip, reverse, layer)\r\n{\r\n if (skip === undefined) { skip = 0; }\r\n if (reverse === undefined) { reverse = false; }\r\n\r\n var count = 0;\r\n var tx;\r\n var ty;\r\n var tile;\r\n\r\n if (reverse)\r\n {\r\n for (ty = layer.height - 1; ty >= 0; ty--)\r\n {\r\n for (tx = layer.width - 1; tx >= 0; tx--)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (ty = 0; ty < layer.height; ty++)\r\n {\r\n for (tx = 0; tx < layer.width; tx++)\r\n {\r\n tile = layer.data[ty][tx];\r\n if (tile && tile.index === findIndex)\r\n {\r\n if (count === skip)\r\n {\r\n return tile;\r\n }\r\n else\r\n {\r\n count += 1;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = FindByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindByIndex.js?")},"./node_modules/phaser/src/tilemaps/components/FindTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback FindTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n *\r\n * @return {boolean} Return `true` if the callback should run, otherwise `false`.\r\n */\r\n\r\n/**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.FindTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile} A Tile that matches the search, or null if no Tile found\r\n */\r\nvar FindTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n return tiles.find(callback, context) || null;\r\n};\r\n\r\nmodule.exports = FindTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/FindTile.js?')},"./node_modules/phaser/src/tilemaps/components/ForEachTile.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * @callback EachTileCallback\r\n *\r\n * @param {Phaser.Tilemaps.Tile} value - The Tile.\r\n * @param {integer} index - The index of the tile.\r\n * @param {Phaser.Tilemaps.Tile[]} array - An array of Tile objects.\r\n */\r\n\r\n/**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @function Phaser.Tilemaps.Components.ForEachTile\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ForEachTile = function (callback, context, tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, filteringOptions, layer);\r\n\r\n tiles.forEach(callback, context);\r\n};\r\n\r\nmodule.exports = ForEachTile;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ForEachTile.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAt = function (tileX, tileY, nonNull, layer)\r\n{\r\n if (nonNull === undefined) { nonNull = false; }\r\n\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX] || null;\r\n if (tile === null)\r\n {\r\n return null;\r\n }\r\n else if (tile.index === -1)\r\n {\r\n return nonNull ? tile : null;\r\n }\r\n else\r\n {\r\n return tile;\r\n }\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n};\r\n\r\nmodule.exports = GetTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTileAt = __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won\'t return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\nvar GetTileAtWorldXY = function (worldX, worldY, nonNull, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return GetTileAt(tileX, tileY, nonNull, layer);\r\n};\r\n\r\nmodule.exports = GetTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithin\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.GetTilesWithinFilteringOptions} GetTilesWithinFilteringOptions - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithin = function (tileX, tileY, width, height, filteringOptions, layer)\r\n{\r\n if (tileX === undefined) { tileX = 0; }\r\n if (tileY === undefined) { tileY = 0; }\r\n if (width === undefined) { width = layer.width; }\r\n if (height === undefined) { height = layer.height; }\r\n\r\n var isNotEmpty = GetFastValue(filteringOptions, 'isNotEmpty', false);\r\n var isColliding = GetFastValue(filteringOptions, 'isColliding', false);\r\n var hasInterestingFace = GetFastValue(filteringOptions, 'hasInterestingFace', false);\r\n\r\n // Clip x, y to top left of map, while shrinking width/height to match.\r\n if (tileX < 0)\r\n {\r\n width += tileX;\r\n tileX = 0;\r\n }\r\n if (tileY < 0)\r\n {\r\n height += tileY;\r\n tileY = 0;\r\n }\r\n\r\n // Clip width and height to bottom right of map.\r\n if (tileX + width > layer.width)\r\n {\r\n width = Math.max(layer.width - tileX, 0);\r\n }\r\n if (tileY + height > layer.height)\r\n {\r\n height = Math.max(layer.height - tileY, 0);\r\n }\r\n\r\n var results = [];\r\n\r\n for (var ty = tileY; ty < tileY + height; ty++)\r\n {\r\n for (var tx = tileX; tx < tileX + width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile !== null)\r\n {\r\n if (isNotEmpty && tile.index === -1) { continue; }\r\n if (isColliding && !tile.collides) { continue; }\r\n if (hasInterestingFace && !tile.hasInterestingFace) { continue; }\r\n results.push(tile);\r\n }\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithin;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js?")},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Geom = __webpack_require__(/*! ../../geom/ */ "./node_modules/phaser/src/geom/index.js");\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Intersects = __webpack_require__(/*! ../../geom/intersects/ */ "./node_modules/phaser/src/geom/intersects/index.js");\r\nvar NOOP = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\nvar TriangleToRectangle = function (triangle, rect)\r\n{\r\n return Intersects.RectangleToTriangle(rect, triangle);\r\n};\r\n\r\n// Note: Could possibly be optimized by copying the shape and shifting it into tilemapLayer\r\n// coordinates instead of shifting the tiles.\r\n\r\n/**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinShape\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinShape = function (shape, filteringOptions, camera, layer)\r\n{\r\n if (shape === undefined) { return []; }\r\n\r\n // intersectTest is a function with parameters: shape, rect\r\n var intersectTest = NOOP;\r\n if (shape instanceof Geom.Circle) { intersectTest = Intersects.CircleToRectangle; }\r\n else if (shape instanceof Geom.Rectangle) { intersectTest = Intersects.RectangleToRectangle; }\r\n else if (shape instanceof Geom.Triangle) { intersectTest = TriangleToRectangle; }\r\n else if (shape instanceof Geom.Line) { intersectTest = Intersects.LineToRectangle; }\r\n\r\n // Top left corner of the shapes\'s bounding box, rounded down to include partial tiles\r\n var xStart = WorldToTileX(shape.left, true, camera, layer);\r\n var yStart = WorldToTileY(shape.top, true, camera, layer);\r\n\r\n // Bottom right corner of the shapes\'s bounding box, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(shape.right, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(shape.bottom, false, camera, layer));\r\n\r\n // Tiles within bounding rectangle of shape. Bounds are forced to be at least 1 x 1 tile in size\r\n // to grab tiles for shapes that don\'t have a height or width (e.g. a horizontal line).\r\n var width = Math.max(xEnd - xStart, 1);\r\n var height = Math.max(yEnd - yStart, 1);\r\n var tiles = GetTilesWithin(xStart, yStart, width, height, filteringOptions, layer);\r\n\r\n var tileWidth = layer.tileWidth;\r\n var tileHeight = layer.tileHeight;\r\n if (layer.tilemapLayer)\r\n {\r\n tileWidth *= layer.tilemapLayer.scaleX;\r\n tileHeight *= layer.tilemapLayer.scaleY;\r\n }\r\n\r\n var results = [];\r\n var tileRect = new Geom.Rectangle(0, 0, tileWidth, tileHeight);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n tileRect.x = TileToWorldX(tile.x, camera, layer);\r\n tileRect.y = TileToWorldY(tile.y, camera, layer);\r\n if (intersectTest(shape, tileRect))\r\n {\r\n results.push(tile);\r\n }\r\n }\r\n\r\n return results;\r\n};\r\n\r\nmodule.exports = GetTilesWithinShape;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js?')},"./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.GetTilesWithinWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {object} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {boolean} [filteringOptions.isNotEmpty=false] - If true, only return tiles that don\'t have -1 for an index.\r\n * @param {boolean} [filteringOptions.isColliding=false] - If true, only return tiles that collide on at least one side.\r\n * @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that have at least one interesting face.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Tilemaps.Tile[]} Array of Tile objects.\r\n */\r\nvar GetTilesWithinWorldXY = function (worldX, worldY, width, height, filteringOptions, camera, layer)\r\n{\r\n // Top left corner of the rect, rounded down to include partial tiles\r\n var xStart = WorldToTileX(worldX, true, camera, layer);\r\n var yStart = WorldToTileY(worldY, true, camera, layer);\r\n\r\n // Bottom right corner of the rect, rounded up to include partial tiles\r\n var xEnd = Math.ceil(WorldToTileX(worldX + width, false, camera, layer));\r\n var yEnd = Math.ceil(WorldToTileY(worldY + height, false, camera, layer));\r\n\r\n return GetTilesWithin(xStart, yStart, xEnd - xStart, yEnd - yStart, filteringOptions, layer);\r\n};\r\n\r\nmodule.exports = GetTilesWithinWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAt = function (tileX, tileY, layer)\r\n{\r\n if (IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n var tile = layer.data[tileY][tileX];\r\n return (tile !== null && tile.index > -1);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n\r\n};\r\n\r\nmodule.exports = HasTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasTileAt = __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @function Phaser.Tilemaps.Components.HasTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {?boolean} Returns a boolean, or null if the layer given was invalid.\r\n */\r\nvar HasTileAtWorldXY = function (worldX, worldY, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n\r\n return HasTileAt(tileX, tileY, layer);\r\n};\r\n\r\nmodule.exports = HasTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if the given tile coordinates are within the bounds of the layer.\r\n *\r\n * @function Phaser.Tilemaps.Components.IsInLayerBounds\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {boolean} `true` if the tile coordinates are within the bounds of the layer, otherwise `false`.\r\n */\r\nvar IsInLayerBounds = function (tileX, tileY, layer)\r\n{\r\n return (tileX >= 0 && tileX < layer.width && tileY >= 0 && tileY < layer.height);\r\n};\r\n\r\nmodule.exports = IsInLayerBounds;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js?")},"./node_modules/phaser/src/tilemaps/components/PutTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\n\r\n/**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAt = function (tile, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!IsInLayerBounds(tileX, tileY, layer)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n var oldTile = layer.data[tileY][tileX];\r\n var oldTileCollides = oldTile && oldTile.collides;\r\n\r\n if (tile instanceof Tile)\r\n {\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, tile.index, tileX, tileY, tile.width, tile.height);\r\n }\r\n layer.data[tileY][tileX].copy(tile);\r\n }\r\n else\r\n {\r\n var index = tile;\r\n if (layer.data[tileY][tileX] === null)\r\n {\r\n layer.data[tileY][tileX] = new Tile(layer, index, tileX, tileY, layer.tileWidth, layer.tileHeight);\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX].index = index;\r\n }\r\n }\r\n\r\n // Updating colliding flag on the new tile\r\n var newTile = layer.data[tileY][tileX];\r\n var collides = layer.collideIndexes.indexOf(newTile.index) !== -1;\r\n SetTileCollision(newTile, collides);\r\n\r\n // Recalculate faces only if the colliding flag at (tileX, tileY) has changed\r\n if (recalculateFaces && (oldTileCollides !== newTile.collides))\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return newTile;\r\n};\r\n\r\nmodule.exports = PutTileAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was created or added to this map.\r\n */\r\nvar PutTileAtWorldXY = function (tile, worldX, worldY, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return PutTileAt(tile, tileX, tileY, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = PutTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/PutTilesAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar PutTileAt = __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js");\r\n\r\n/**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @function Phaser.Tilemaps.Components.PutTilesAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar PutTilesAt = function (tilesArray, tileX, tileY, recalculateFaces, layer)\r\n{\r\n if (!Array.isArray(tilesArray)) { return null; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n // Force the input array to be a 2D array\r\n if (!Array.isArray(tilesArray[0]))\r\n {\r\n tilesArray = [ tilesArray ];\r\n }\r\n\r\n var height = tilesArray.length;\r\n var width = tilesArray[0].length;\r\n\r\n for (var ty = 0; ty < height; ty++)\r\n {\r\n for (var tx = 0; tx < width; tx++)\r\n {\r\n var tile = tilesArray[ty][tx];\r\n PutTileAt(tile, tileX + tx, tileY + ty, false, layer);\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n // Recalculate the faces within the destination area and neighboring tiles\r\n CalculateFacesWithin(tileX - 1, tileY - 1, width + 2, height + 2, layer);\r\n }\r\n};\r\n\r\nmodule.exports = PutTilesAt;\r\n\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/PutTilesAt.js?')},"./node_modules/phaser/src/tilemaps/components/Randomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar GetRandom = __webpack_require__(/*! ../../utils/array/GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Randomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Randomize = function (tileX, tileY, width, height, indexes, layer)\r\n{\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n // If no indicies are given, then find all the unique indexes within the specified region\r\n if (indexes === undefined)\r\n {\r\n indexes = [];\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n if (indexes.indexOf(tiles[i].index) === -1)\r\n {\r\n indexes.push(tiles[i].index);\r\n }\r\n }\r\n }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = GetRandom(indexes);\r\n }\r\n};\r\n\r\nmodule.exports = Randomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Randomize.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\nvar IsInLayerBounds = __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js");\r\nvar CalculateFacesAt = __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js");\r\n\r\n/**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAt\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAt = function (tileX, tileY, replaceWithNull, recalculateFaces, layer)\r\n{\r\n if (replaceWithNull === undefined) { replaceWithNull = false; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (!IsInLayerBounds(tileX, tileY, layer))\r\n {\r\n return null;\r\n }\r\n\r\n var tile = layer.data[tileY][tileX];\r\n\r\n if (!tile)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n layer.data[tileY][tileX] = (replaceWithNull) ? null : new Tile(layer, -1, tileX, tileY, tile.width, tile.height);\r\n }\r\n\r\n // Recalculate faces only if the removed tile was a colliding tile\r\n if (recalculateFaces && tile && tile.collides)\r\n {\r\n CalculateFacesAt(tileX, tileY, layer);\r\n }\r\n\r\n return tile;\r\n};\r\n\r\nmodule.exports = RemoveTileAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js?')},"./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RemoveTileAt = __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js");\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\n\r\n/**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer\'s\r\n * collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.RemoveTileAtWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The Tile object that was removed.\r\n */\r\nvar RemoveTileAtWorldXY = function (worldX, worldY, replaceWithNull, recalculateFaces, camera, layer)\r\n{\r\n var tileX = WorldToTileX(worldX, true, camera, layer);\r\n var tileY = WorldToTileY(worldY, true, camera, layer);\r\n return RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, layer);\r\n};\r\n\r\nmodule.exports = RemoveTileAtWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/RenderDebug.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar Color = __webpack_require__(/*! ../../display/color */ "./node_modules/phaser/src/display/color/index.js");\r\n\r\nvar defaultTileColor = new Color(105, 210, 231, 150);\r\nvar defaultCollidingTileColor = new Color(243, 134, 48, 200);\r\nvar defaultFaceColor = new Color(40, 39, 37, 150);\r\n\r\n/**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @function Phaser.Tilemaps.Components.RenderDebug\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {object} styleConfig - An object specifying the colors to use for the debug drawing.\r\n * @param {?Phaser.Display.Color} [styleConfig.tileColor=blue] - Color to use for drawing a filled rectangle at\r\n * non-colliding tile locations. If set to null, non-colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.collidingTileColor=orange] - Color to use for drawing a filled\r\n * rectangle at colliding tile locations. If set to null, colliding tiles will not be drawn.\r\n * @param {?Phaser.Display.Color} [styleConfig.faceColor=grey] - Color to use for drawing a line at interesting\r\n * tile faces. If set to null, interesting tile faces will not be drawn.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar RenderDebug = function (graphics, styleConfig, layer)\r\n{\r\n if (styleConfig === undefined) { styleConfig = {}; }\r\n\r\n // Default colors without needlessly creating Color objects\r\n var tileColor = (styleConfig.tileColor !== undefined) ? styleConfig.tileColor : defaultTileColor;\r\n var collidingTileColor = (styleConfig.collidingTileColor !== undefined) ? styleConfig.collidingTileColor : defaultCollidingTileColor;\r\n var faceColor = (styleConfig.faceColor !== undefined) ? styleConfig.faceColor : defaultFaceColor;\r\n\r\n var tiles = GetTilesWithin(0, 0, layer.width, layer.height, null, layer);\r\n\r\n graphics.translateCanvas(layer.tilemapLayer.x, layer.tilemapLayer.y);\r\n graphics.scaleCanvas(layer.tilemapLayer.scaleX, layer.tilemapLayer.scaleY);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n var tile = tiles[i];\r\n\r\n var tw = tile.width;\r\n var th = tile.height;\r\n var x = tile.pixelX;\r\n var y = tile.pixelY;\r\n\r\n var color = tile.collides ? collidingTileColor : tileColor;\r\n\r\n if (color !== null)\r\n {\r\n graphics.fillStyle(color.color, color.alpha / 255);\r\n graphics.fillRect(x, y, tw, th);\r\n }\r\n\r\n // Inset the face line to prevent neighboring tile\'s lines from overlapping\r\n x += 1;\r\n y += 1;\r\n tw -= 2;\r\n th -= 2;\r\n\r\n if (faceColor !== null)\r\n {\r\n graphics.lineStyle(1, faceColor.color, faceColor.alpha / 255);\r\n\r\n if (tile.faceTop) { graphics.lineBetween(x, y, x + tw, y); }\r\n if (tile.faceRight) { graphics.lineBetween(x + tw, y, x + tw, y + th); }\r\n if (tile.faceBottom) { graphics.lineBetween(x, y + th, x + tw, y + th); }\r\n if (tile.faceLeft) { graphics.lineBetween(x, y, x, y + th); }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = RenderDebug;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/RenderDebug.js?')},"./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.ReplaceByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar ReplaceByIndex = function (findIndex, newIndex, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i] && tiles[i].index === findIndex)\r\n {\r\n tiles[i].index = newIndex;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = ReplaceByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollision.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollision = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Update the array of colliding indexes\r\n for (var i = 0; i < indexes.length; i++)\r\n {\r\n SetLayerCollisionIndex(indexes[i], collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (tile && indexes.indexOf(tile.index) !== -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollision.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionBetween\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionBetween = function (start, stop, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n if (start > stop) { return; }\r\n\r\n // Update the array of colliding indexes\r\n for (var index = start; index <= stop; index++)\r\n {\r\n SetLayerCollisionIndex(index, collides, layer);\r\n }\r\n\r\n // Update the tiles\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile)\r\n {\r\n if (tile.index >= start && tile.index <= stop)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar SetLayerCollisionIndex = __webpack_require__(/*! ./SetLayerCollisionIndex */ "./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js");\r\n\r\n/**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByExclusion\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByExclusion = function (indexes, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n if (!Array.isArray(indexes)) { indexes = [ indexes ]; }\r\n\r\n // Note: this only updates layer.collideIndexes for tile indexes found currently in the layer\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n if (tile && indexes.indexOf(tile.index) === -1)\r\n {\r\n SetTileCollision(tile, collides);\r\n SetLayerCollisionIndex(tile.index, collides, layer);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByExclusion;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ "./node_modules/phaser/src/tilemaps/components/SetTileCollision.js");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js");\r\nvar HasValue = __webpack_require__(/*! ../../utils/object/HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a "collides" property that\r\n * has a value of true. Any tile that doesn\'t have "collides" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: ["stone", "lava", "sand" ] }`. If a tile has a\r\n * "types" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionByProperty\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionByProperty = function (properties, collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n for (var property in properties)\r\n {\r\n if (!HasValue(tile.properties, property)) { continue; }\r\n\r\n var values = properties[property];\r\n if (!Array.isArray(values))\r\n {\r\n values = [ values ];\r\n }\r\n\r\n for (var i = 0; i < values.length; i++)\r\n {\r\n if (tile.properties[property] === values[i])\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionByProperty;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js?')},"./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SetTileCollision = __webpack_require__(/*! ./SetTileCollision */ \"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js\");\r\nvar CalculateFacesWithin = __webpack_require__(/*! ./CalculateFacesWithin */ \"./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js\");\r\n\r\n/**\r\n * Sets collision on the tiles within a layer by checking each tile's collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tile's collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @function Phaser.Tilemaps.Components.SetCollisionFromCollisionGroup\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetCollisionFromCollisionGroup = function (collides, recalculateFaces, layer)\r\n{\r\n if (collides === undefined) { collides = true; }\r\n if (recalculateFaces === undefined) { recalculateFaces = true; }\r\n\r\n for (var ty = 0; ty < layer.height; ty++)\r\n {\r\n for (var tx = 0; tx < layer.width; tx++)\r\n {\r\n var tile = layer.data[ty][tx];\r\n\r\n if (!tile) { continue; }\r\n\r\n var collisionGroup = tile.getCollisionGroup();\r\n\r\n // It's possible in Tiled to have a collision group without any shapes, e.g. create a\r\n // shape and then delete the shape.\r\n if (collisionGroup && collisionGroup.objects && collisionGroup.objects.length > 0)\r\n {\r\n SetTileCollision(tile, collides);\r\n }\r\n }\r\n }\r\n\r\n if (recalculateFaces)\r\n {\r\n CalculateFacesWithin(0, 0, layer.width, layer.height, layer);\r\n }\r\n};\r\n\r\nmodule.exports = SetCollisionFromCollisionGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js?")},"./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to keep track of the tile indexes that collide within a layer. This\r\n * updates LayerData.collideIndexes to either contain or not contain the given `tileIndex`.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetLayerCollisionIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileIndex - The tile index to set the collision boolean for.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetLayerCollisionIndex = function (tileIndex, collides, layer)\r\n{\r\n var loc = layer.collideIndexes.indexOf(tileIndex);\r\n\r\n if (collides && loc === -1)\r\n {\r\n layer.collideIndexes.push(tileIndex);\r\n }\r\n else if (!collides && loc !== -1)\r\n {\r\n layer.collideIndexes.splice(loc, 1);\r\n }\r\n};\r\n\r\nmodule.exports = SetLayerCollisionIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileCollision.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internally used method to set the colliding state of a tile. This does not recalculate\r\n * interesting faces.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileCollision\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.Tile} tile - The Tile to set the collision on.\r\n * @param {boolean} [collides=true] - Should the tile index collide or not?\r\n */\r\nvar SetTileCollision = function (tile, collides)\r\n{\r\n if (collides)\r\n {\r\n tile.setCollision(true, true, true, true, false);\r\n }\r\n else\r\n {\r\n tile.resetCollision(false);\r\n }\r\n};\r\n\r\nmodule.exports = SetTileCollision;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileCollision.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileIndexCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileIndexCallback = function (indexes, callback, callbackContext, layer)\r\n{\r\n if (typeof indexes === 'number')\r\n {\r\n layer.callbacks[indexes] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n else\r\n {\r\n for (var i = 0, len = indexes.length; i < len; i++)\r\n {\r\n layer.callbacks[indexes[i]] = (callback !== null)\r\n ? { callback: callback, callbackContext: callbackContext }\r\n : undefined;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SetTileIndexCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js?")},"./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @function Phaser.Tilemaps.Components.SetTileLocationCallback\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SetTileLocationCallback = function (tileX, tileY, width, height, callback, callbackContext, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].setCollisionCallback(callback, callbackContext);\r\n }\r\n\r\n};\r\n\r\nmodule.exports = SetTileLocationCallback;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js?')},"./node_modules/phaser/src/tilemaps/components/Shuffle.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\nvar ShuffleArray = __webpack_require__(/*! ../../utils/array/Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js");\r\n\r\n/**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they\'re all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.Shuffle\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar Shuffle = function (tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var indexes = tiles.map(function (tile) { return tile.index; });\r\n ShuffleArray(indexes);\r\n\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n tiles[i].index = indexes[i];\r\n }\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/Shuffle.js?')},"./node_modules/phaser/src/tilemaps/components/SwapByIndex.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @function Phaser.Tilemaps.Components.SwapByIndex\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar SwapByIndex = function (indexA, indexB, tileX, tileY, width, height, layer)\r\n{\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n for (var i = 0; i < tiles.length; i++)\r\n {\r\n if (tiles[i])\r\n {\r\n if (tiles[i].index === indexA)\r\n {\r\n tiles[i].index = indexB;\r\n }\r\n else if (tiles[i].index === indexB)\r\n {\r\n tiles[i].index = indexA;\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = SwapByIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/SwapByIndex.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldX = function (tileX, camera, layer)\r\n{\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldX = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldX = tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX);\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return layerWorldX + tileX * tileWidth;\r\n};\r\n\r\nmodule.exports = TileToWorldX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldX.js?")},"./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TileToWorldX = __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js");\r\nvar TileToWorldY = __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in world coordinates.\r\n */\r\nvar TileToWorldXY = function (tileX, tileY, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = TileToWorldX(tileX, camera, layer);\r\n point.y = TileToWorldY(tileY, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = TileToWorldXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js?')},"./node_modules/phaser/src/tilemaps/components/TileToWorldY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.TileToWorldY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number}\r\n */\r\nvar TileToWorldY = function (tileY, camera, layer)\r\n{\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n var layerWorldY = 0;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n layerWorldY = (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return layerWorldY + tileY * tileHeight;\r\n};\r\n\r\nmodule.exports = TileToWorldY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/TileToWorldY.js?")},"./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetTilesWithin = __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js");\r\n\r\n/**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index\'s weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @function Phaser.Tilemaps.Components.WeightedRandomize\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n */\r\nvar WeightedRandomize = function (tileX, tileY, width, height, weightedIndexes, layer)\r\n{\r\n if (weightedIndexes === undefined) { return; }\r\n\r\n var i;\r\n var tiles = GetTilesWithin(tileX, tileY, width, height, null, layer);\r\n\r\n var weightTotal = 0;\r\n for (i = 0; i < weightedIndexes.length; i++)\r\n {\r\n weightTotal += weightedIndexes[i].weight;\r\n }\r\n\r\n if (weightTotal <= 0) { return; }\r\n\r\n for (i = 0; i < tiles.length; i++)\r\n {\r\n var rand = Math.random() * weightTotal;\r\n var sum = 0;\r\n var randomIndex = -1;\r\n for (var j = 0; j < weightedIndexes.length; j++)\r\n {\r\n sum += weightedIndexes[j].weight;\r\n if (rand <= sum)\r\n {\r\n var chosen = weightedIndexes[j].index;\r\n randomIndex = Array.isArray(chosen)\r\n ? chosen[Math.floor(Math.random() * chosen.length)]\r\n : chosen;\r\n break;\r\n }\r\n }\r\n\r\n tiles[i].index = randomIndex;\r\n }\r\n};\r\n\r\nmodule.exports = WeightedRandomize;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileX.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileX\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The X location in tile units.\r\n */\r\nvar WorldToTileX = function (worldX, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileWidth = layer.baseTileWidth;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's horizontal scroll\r\n worldX = worldX - (tilemapLayer.x + camera.scrollX * (1 - tilemapLayer.scrollFactorX));\r\n\r\n tileWidth *= tilemapLayer.scaleX;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldX / tileWidth)\r\n : worldX / tileWidth;\r\n};\r\n\r\nmodule.exports = WorldToTileX;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileX.js?")},"./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar WorldToTileX = __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js");\r\nvar WorldToTileY = __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js");\r\nvar Vector2 = __webpack_require__(/*! ../../math/Vector2 */ "./node_modules/phaser/src/math/Vector2.js");\r\n\r\n/**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layer\'s position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileXY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {Phaser.Math.Vector2} The XY location in tile units.\r\n */\r\nvar WorldToTileXY = function (worldX, worldY, snapToFloor, point, camera, layer)\r\n{\r\n if (point === undefined) { point = new Vector2(0, 0); }\r\n\r\n point.x = WorldToTileX(worldX, snapToFloor, camera, layer);\r\n point.y = WorldToTileY(worldY, snapToFloor, camera, layer);\r\n\r\n return point;\r\n};\r\n\r\nmodule.exports = WorldToTileXY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js?')},"./node_modules/phaser/src/tilemaps/components/WorldToTileY.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layer's position, scale and scroll.\r\n *\r\n * @function Phaser.Tilemaps.Components.WorldToTileY\r\n * @private\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n * @param {Phaser.Tilemaps.LayerData} layer - The Tilemap Layer to act upon.\r\n * \r\n * @return {number} The Y location in tile units.\r\n */\r\nvar WorldToTileY = function (worldY, snapToFloor, camera, layer)\r\n{\r\n if (snapToFloor === undefined) { snapToFloor = true; }\r\n\r\n var tileHeight = layer.baseTileHeight;\r\n var tilemapLayer = layer.tilemapLayer;\r\n\r\n if (tilemapLayer)\r\n {\r\n if (camera === undefined) { camera = tilemapLayer.scene.cameras.main; }\r\n\r\n // Find the world position relative to the static or dynamic layer's top left origin,\r\n // factoring in the camera's vertical scroll\r\n worldY = worldY - (tilemapLayer.y + camera.scrollY * (1 - tilemapLayer.scrollFactorY));\r\n\r\n tileHeight *= tilemapLayer.scaleY;\r\n }\r\n\r\n return snapToFloor\r\n ? Math.floor(worldY / tileHeight)\r\n : worldY / tileHeight;\r\n};\r\n\r\nmodule.exports = WorldToTileY;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/WorldToTileY.js?")},"./node_modules/phaser/src/tilemaps/components/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Components\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CalculateFacesAt: __webpack_require__(/*! ./CalculateFacesAt */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js"),\r\n CalculateFacesWithin: __webpack_require__(/*! ./CalculateFacesWithin */ "./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js"),\r\n Copy: __webpack_require__(/*! ./Copy */ "./node_modules/phaser/src/tilemaps/components/Copy.js"),\r\n CreateFromTiles: __webpack_require__(/*! ./CreateFromTiles */ "./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js"),\r\n CullTiles: __webpack_require__(/*! ./CullTiles */ "./node_modules/phaser/src/tilemaps/components/CullTiles.js"),\r\n Fill: __webpack_require__(/*! ./Fill */ "./node_modules/phaser/src/tilemaps/components/Fill.js"),\r\n FilterTiles: __webpack_require__(/*! ./FilterTiles */ "./node_modules/phaser/src/tilemaps/components/FilterTiles.js"),\r\n FindByIndex: __webpack_require__(/*! ./FindByIndex */ "./node_modules/phaser/src/tilemaps/components/FindByIndex.js"),\r\n FindTile: __webpack_require__(/*! ./FindTile */ "./node_modules/phaser/src/tilemaps/components/FindTile.js"),\r\n ForEachTile: __webpack_require__(/*! ./ForEachTile */ "./node_modules/phaser/src/tilemaps/components/ForEachTile.js"),\r\n GetTileAt: __webpack_require__(/*! ./GetTileAt */ "./node_modules/phaser/src/tilemaps/components/GetTileAt.js"),\r\n GetTileAtWorldXY: __webpack_require__(/*! ./GetTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js"),\r\n GetTilesWithin: __webpack_require__(/*! ./GetTilesWithin */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js"),\r\n GetTilesWithinShape: __webpack_require__(/*! ./GetTilesWithinShape */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js"),\r\n GetTilesWithinWorldXY: __webpack_require__(/*! ./GetTilesWithinWorldXY */ "./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js"),\r\n HasTileAt: __webpack_require__(/*! ./HasTileAt */ "./node_modules/phaser/src/tilemaps/components/HasTileAt.js"),\r\n HasTileAtWorldXY: __webpack_require__(/*! ./HasTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js"),\r\n IsInLayerBounds: __webpack_require__(/*! ./IsInLayerBounds */ "./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js"),\r\n PutTileAt: __webpack_require__(/*! ./PutTileAt */ "./node_modules/phaser/src/tilemaps/components/PutTileAt.js"),\r\n PutTileAtWorldXY: __webpack_require__(/*! ./PutTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js"),\r\n PutTilesAt: __webpack_require__(/*! ./PutTilesAt */ "./node_modules/phaser/src/tilemaps/components/PutTilesAt.js"),\r\n Randomize: __webpack_require__(/*! ./Randomize */ "./node_modules/phaser/src/tilemaps/components/Randomize.js"),\r\n RemoveTileAt: __webpack_require__(/*! ./RemoveTileAt */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js"),\r\n RemoveTileAtWorldXY: __webpack_require__(/*! ./RemoveTileAtWorldXY */ "./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js"),\r\n RenderDebug: __webpack_require__(/*! ./RenderDebug */ "./node_modules/phaser/src/tilemaps/components/RenderDebug.js"),\r\n ReplaceByIndex: __webpack_require__(/*! ./ReplaceByIndex */ "./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js"),\r\n SetCollision: __webpack_require__(/*! ./SetCollision */ "./node_modules/phaser/src/tilemaps/components/SetCollision.js"),\r\n SetCollisionBetween: __webpack_require__(/*! ./SetCollisionBetween */ "./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js"),\r\n SetCollisionByExclusion: __webpack_require__(/*! ./SetCollisionByExclusion */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js"),\r\n SetCollisionByProperty: __webpack_require__(/*! ./SetCollisionByProperty */ "./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js"),\r\n SetCollisionFromCollisionGroup: __webpack_require__(/*! ./SetCollisionFromCollisionGroup */ "./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js"),\r\n SetTileIndexCallback: __webpack_require__(/*! ./SetTileIndexCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js"),\r\n SetTileLocationCallback: __webpack_require__(/*! ./SetTileLocationCallback */ "./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/tilemaps/components/Shuffle.js"),\r\n SwapByIndex: __webpack_require__(/*! ./SwapByIndex */ "./node_modules/phaser/src/tilemaps/components/SwapByIndex.js"),\r\n TileToWorldX: __webpack_require__(/*! ./TileToWorldX */ "./node_modules/phaser/src/tilemaps/components/TileToWorldX.js"),\r\n TileToWorldXY: __webpack_require__(/*! ./TileToWorldXY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js"),\r\n TileToWorldY: __webpack_require__(/*! ./TileToWorldY */ "./node_modules/phaser/src/tilemaps/components/TileToWorldY.js"),\r\n WeightedRandomize: __webpack_require__(/*! ./WeightedRandomize */ "./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js"),\r\n WorldToTileX: __webpack_require__(/*! ./WorldToTileX */ "./node_modules/phaser/src/tilemaps/components/WorldToTileX.js"),\r\n WorldToTileXY: __webpack_require__(/*! ./WorldToTileXY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js"),\r\n WorldToTileY: __webpack_require__(/*! ./WorldToTileY */ "./node_modules/phaser/src/tilemaps/components/WorldToTileY.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/components/index.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar DynamicTilemapLayerRender = __webpack_require__(/*! ./DynamicTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Dynamic Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Dynamic Tilemap Layer trades some speed for being able to apply powerful effects. Unlike a\r\n * Static Tilemap Layer, you can apply per-tile effects like tint or alpha, and you can change the\r\n * tiles in a DynamicTilemapLayer.\r\n * \r\n * Use this over a Static Tilemap Layer when you need those features.\r\n *\r\n * @class DynamicTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar DynamicTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n DynamicTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function DynamicTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'DynamicTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally with the canvas render. This holds the tiles that are visible within the\r\n * camera.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.11.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * The total number of tiles drawn by the renderer in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.11.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.11.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.11.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.DynamicTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles, this._renderOrder);\r\n },\r\n\r\n /**\r\n * Copies the tiles in the source rectangular area to a new destination (all specified in tile\r\n * coordinates) within the layer. This copies all tile properties & recalculates collision\r\n * information in the destination region.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#copy\r\n * @since 3.0.0\r\n *\r\n * @param {integer} srcTileX - The x coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} srcTileY - The y coordinate of the area to copy from, in tiles, not pixels.\r\n * @param {integer} width - The width of the area to copy, in tiles, not pixels.\r\n * @param {integer} height - The height of the area to copy, in tiles, not pixels.\r\n * @param {integer} destTileX - The x coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {integer} destTileY - The y coordinate of the area to copy to, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n copy: function (srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces)\r\n {\r\n TilemapComponents.Copy(srcTileX, srcTileY, width, height, destTileX, destTileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Destroys this DynamicTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n },\r\n\r\n /**\r\n * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the\r\n * specified index. Tiles will be set to collide if the given index is a colliding index.\r\n * Collision information in the region will be recalculated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#fill\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index to fill the area with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n fill: function (index, tileX, tileY, width, height, recalculateFaces)\r\n {\r\n TilemapComponents.Fill(index, tileX, tileY, width, height, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {FindTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {EachTileCallback} callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area to search.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The world x coordinate for the top-left of the area.\r\n * @param {number} worldY - The world y coordinate for the top-left of the area.\r\n * @param {number} width - The width of the area.\r\n * @param {number} height - The height of the area.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {boolean} `true` if a tile was found at the given location, otherwise `false`.\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index\r\n * or a Tile object. If you pass in a Tile, all attributes will be copied over to the specified\r\n * location. If you pass in an index, only the index at the specified location will be changed.\r\n * Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAt: function (tile, tileX, tileY, recalculateFaces)\r\n {\r\n return TilemapComponents.PutTileAt(tile, tileX, tileY, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either\r\n * an index or a Tile object. If you pass in a Tile, all attributes will be copied over to the\r\n * specified location. If you pass in an index, only the index at the specified location will be\r\n * changed. Collision information will be recalculated at the specified location.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|Phaser.Tilemaps.Tile)} tile - The index of this tile to set or a Tile object.\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n putTileAtWorldXY: function (tile, worldX, worldY, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.PutTileAtWorldXY(tile, worldX, worldY, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified\r\n * layer. The array can be composed of either tile indexes or Tile objects. If you pass in a Tile,\r\n * all attributes will be copied over to the specified location. If you pass in an index, only the\r\n * index at the specified location will be changed. Collision information will be recalculated\r\n * within the region tiles were changed.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#putTilesAt\r\n * @since 3.0.0\r\n *\r\n * @param {(integer[]|integer[][]|Phaser.Tilemaps.Tile[]|Phaser.Tilemaps.Tile[][])} tile - A row (array) or grid (2D array) of Tiles or tile indexes to place.\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n putTilesAt: function (tilesArray, tileX, tileY, recalculateFaces)\r\n {\r\n TilemapComponents.PutTilesAt(tilesArray, tileX, tileY, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will receive a new index. If an array of indexes is passed in, then\r\n * those will be used for randomly assigning new tile indexes. If an array is not provided, the\r\n * indexes found within the region (excluding -1) will be used for randomly assigning new tile\r\n * indexes. This method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#randomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {integer[]} [indexes] - An array of indexes to randomly draw from during randomization.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n randomize: function (tileX, tileY, width, height, indexes)\r\n {\r\n TilemapComponents.Randomize(tileX, tileY, width, height, indexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Removes the tile at the given tile coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAt: function (tileX, tileY, replaceWithNull, recalculateFaces)\r\n {\r\n return TilemapComponents.RemoveTileAt(tileX, tileY, replaceWithNull, recalculateFaces, this.layer);\r\n },\r\n\r\n /**\r\n * Removes the tile at the given world coordinates in the specified layer and updates the layer's\r\n * collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#removeTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate, in pixels.\r\n * @param {number} worldY - The y coordinate, in pixels.\r\n * @param {boolean} [replaceWithNull=true] - If true, this will replace the tile at the specified location with null instead of a Tile with an index of -1.\r\n * @param {boolean} [recalculateFaces=true] - `true` if the faces data should be recalculated.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n removeTileAtWorldXY: function (worldX, worldY, replaceWithNull, recalculateFaces, camera)\r\n {\r\n return TilemapComponents.RemoveTileAtWorldXY(worldX, worldY, replaceWithNull, recalculateFaces, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `findIndex` and updates their index to match `newIndex`. This only modifies the index and does\r\n * not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#replaceByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} findIndex - The index of the tile to search for.\r\n * @param {integer} newIndex - The index of the tile to replace it with.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n replaceByIndex: function (findIndex, newIndex, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.ReplaceByIndex(findIndex, newIndex, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setSkipCull\r\n * @since 3.11.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCullPadding\r\n * @since 3.11.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the update.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|integer[])} indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} [callback] - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given\r\n * layer. It will only randomize the tiles in that area, so if they're all the same nothing will\r\n * appear to have changed! This method only modifies tile indexes and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n shuffle: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.Shuffle(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Scans the given rectangular area (given in tile coordinates) for tiles with an index matching\r\n * `indexA` and swaps then with `indexB`. This only modifies the index and does not change collision\r\n * information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#swapByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileA - First tile index.\r\n * @param {integer} tileB - Second tile index.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n swapByIndex: function (indexA, indexB, tileX, tileY, width, height)\r\n {\r\n TilemapComponents.SwapByIndex(indexA, indexB, tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate, in tiles, not pixels.\r\n * @param {integer} tileY - The y coordinate, in tiles, not pixels.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the\r\n * specified layer. Each tile will recieve a new index. New indexes are drawn from the given\r\n * weightedIndexes array. An example weighted array:\r\n *\r\n * [\r\n * { index: 6, weight: 4 }, // Probability of index 6 is 4 / 8\r\n * { index: 7, weight: 2 }, // Probability of index 7 would be 2 / 8\r\n * { index: 8, weight: 1.5 }, // Probability of index 8 would be 1.5 / 8\r\n * { index: 26, weight: 0.5 } // Probability of index 27 would be 0.5 / 8\r\n * ]\r\n *\r\n * The probability of any index being choose is (the index's weight) / (sum of all weights). This\r\n * method only modifies tile indexes and does not change collision information.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#weightedRandomize\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {object[]} [weightedIndexes] - An array of objects to randomly draw from during\r\n * randomization. They should be in the form: { index: 0, weight: 4 } or\r\n * { index: [0, 1], weight: 4 } if you wish to draw from multiple tile indexes.\r\n *\r\n * @return {Phaser.Tilemaps.DynamicTilemapLayer} This Tilemap Layer object.\r\n */\r\n weightedRandomize: function (tileX, tileY, width, height, weightedIndexes)\r\n {\r\n TilemapComponents.WeightedRandomize(tileX, tileY, width, height, weightedIndexes, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The x coordinate to be converted, in pixels, not tiles.\r\n * @param {number} worldY - The y coordinate to be converted, in pixels, not tiles.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = DynamicTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar DynamicTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n // Multiply by the Sprite matrix, store result in calcMatrix\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var halfWidth = tile.width / 2;\r\n var halfHeight = tile.height / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n \r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n \r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tile.width, tile.height,\r\n -halfWidth, -halfHeight,\r\n tile.width, tile.height\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./DynamicTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./DynamicTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ "./node_modules/phaser/src/renderer/webgl/Utils.js");\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.DynamicTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.DynamicTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar DynamicTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n if (tileCount === 0 || alpha <= 0)\r\n {\r\n return;\r\n }\r\n\r\n var gidMap = src.gidMap;\r\n var pipeline = src.pipeline;\r\n\r\n var getTint = Utils.getTintAppendFloatAlpha;\r\n\r\n var scrollFactorX = src.scrollFactorX;\r\n var scrollFactorY = src.scrollFactorY;\r\n\r\n var x = src.x;\r\n var y = src.y;\r\n\r\n var sx = src.scaleX;\r\n var sy = src.scaleY;\r\n\r\n var tilesets = src.tileset;\r\n\r\n // Loop through each tileset in this layer, drawing just the tiles that are in that set each time\r\n // Doing it this way around allows us to batch tiles using the same tileset\r\n for (var c = 0; c < tilesets.length; c++)\r\n {\r\n var currentSet = tilesets[c];\r\n var texture = currentSet.glTexture;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (tileset !== currentSet)\r\n {\r\n // Skip tiles that aren\'t in this set\r\n continue;\r\n }\r\n \r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords === null)\r\n {\r\n continue;\r\n }\r\n\r\n var frameWidth = tile.width;\r\n var frameHeight = tile.height;\r\n\r\n var frameX = tileTexCoords.x;\r\n var frameY = tileTexCoords.y;\r\n\r\n var tw = tile.width * 0.5;\r\n var th = tile.height * 0.5;\r\n\r\n var tint = getTint(tile.tint, alpha * tile.alpha);\r\n\r\n pipeline.batchTexture(\r\n src,\r\n texture,\r\n texture.width, texture.height,\r\n x + ((tw + tile.pixelX) * sx), y + ((th + tile.pixelY) * sy),\r\n tile.width, tile.height,\r\n sx, sy,\r\n tile.rotation,\r\n tile.flipX, tile.flipY,\r\n scrollFactorX, scrollFactorY,\r\n tw, th,\r\n frameX, frameY, frameWidth, frameHeight,\r\n tint, tint, tint, tint, false,\r\n 0, 0,\r\n camera,\r\n null,\r\n true\r\n );\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = DynamicTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js?')},"./node_modules/phaser/src/tilemaps/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Components: __webpack_require__(/*! ./components */ "./node_modules/phaser/src/tilemaps/components/index.js"),\r\n Parsers: __webpack_require__(/*! ./parsers */ "./node_modules/phaser/src/tilemaps/parsers/index.js"),\r\n\r\n Formats: __webpack_require__(/*! ./Formats */ "./node_modules/phaser/src/tilemaps/Formats.js"),\r\n ImageCollection: __webpack_require__(/*! ./ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js"),\r\n ParseToTilemap: __webpack_require__(/*! ./ParseToTilemap */ "./node_modules/phaser/src/tilemaps/ParseToTilemap.js"),\r\n Tile: __webpack_require__(/*! ./Tile */ "./node_modules/phaser/src/tilemaps/Tile.js"),\r\n Tilemap: __webpack_require__(/*! ./Tilemap */ "./node_modules/phaser/src/tilemaps/Tilemap.js"),\r\n TilemapCreator: __webpack_require__(/*! ./TilemapCreator */ "./node_modules/phaser/src/tilemaps/TilemapCreator.js"),\r\n TilemapFactory: __webpack_require__(/*! ./TilemapFactory */ "./node_modules/phaser/src/tilemaps/TilemapFactory.js"),\r\n Tileset: __webpack_require__(/*! ./Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js"),\r\n\r\n LayerData: __webpack_require__(/*! ./mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js"),\r\n MapData: __webpack_require__(/*! ./mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js"),\r\n ObjectLayer: __webpack_require__(/*! ./mapdata/ObjectLayer */ "./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js"),\r\n\r\n DynamicTilemapLayer: __webpack_require__(/*! ./dynamiclayer/DynamicTilemapLayer */ "./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js"),\r\n StaticTilemapLayer: __webpack_require__(/*! ./staticlayer/StaticTilemapLayer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/index.js?')},"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about about a layer in a map. Maps are parsed from CSV, Tiled,\r\n * etc. into this format. Tilemap, StaticTilemapLayer and DynamicTilemapLayer have a reference\r\n * to this data and use it to look up and perform operations on tiles.\r\n *\r\n * @class LayerData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {object} [config] - [description]\r\n */\r\nvar LayerData = new Class({\r\n\r\n initialize:\r\n\r\n function LayerData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the layer, if specified in Tiled.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'layer');\r\n\r\n /**\r\n * The x offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#x\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.x = GetFastValue(config, 'x', 0);\r\n\r\n /**\r\n * The y offset of where to draw from the top left\r\n *\r\n * @name Phaser.Tilemaps.LayerData#y\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.y = GetFastValue(config, 'y', 0);\r\n\r\n /**\r\n * The width in tile of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height in tiles of the layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * The pixel width of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The pixel height of the tiles.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#baseTileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.baseTileHeight = GetFastValue(config, 'baseTileHeight', this.tileHeight);\r\n\r\n /**\r\n * The width in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.baseTileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire layer.\r\n *\r\n * @name Phaser.Tilemaps.LayerData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#alpha\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.alpha = GetFastValue(config, 'alpha', 1);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * Layer specific properties (can be specified in Tiled)\r\n *\r\n * @name Phaser.Tilemaps.LayerData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#indexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.indexes = GetFastValue(config, 'indexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#collideIndexes\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.collideIndexes = GetFastValue(config, 'collideIndexes', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#callbacks\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = GetFastValue(config, 'callbacks', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#bodies\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.bodies = GetFastValue(config, 'bodies', []);\r\n\r\n /**\r\n * An array of the tile indexes\r\n *\r\n * @name Phaser.Tilemaps.LayerData#data\r\n * @type {(number[])}\r\n * @since 3.0.0\r\n */\r\n this.data = GetFastValue(config, 'data', []);\r\n\r\n /**\r\n * [description]\r\n *\r\n * @name Phaser.Tilemaps.LayerData#tilemapLayer\r\n * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)}\r\n * @since 3.0.0\r\n */\r\n this.tilemapLayer = GetFastValue(config, 'tilemapLayer', null);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = LayerData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/LayerData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/MapData.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing data about a map. Maps are parsed from CSV, Tiled, etc. into this\r\n * format. A Tilemap object get a copy of this data and then unpacks the needed properties into\r\n * itself.\r\n *\r\n * @class MapData\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.MapDataConfig} [config] - The Map configuration object.\r\n */\r\nvar MapData = new Class({\r\n\r\n initialize:\r\n\r\n function MapData (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The key in the Phaser cache that corresponds to the loaded tilemap data.\r\n * \r\n * @name Phaser.Tilemaps.MapData#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'map');\r\n\r\n /**\r\n * The width of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#width\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.width = GetFastValue(config, 'width', 0);\r\n\r\n /**\r\n * The height of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#height\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.height = GetFastValue(config, 'height', 0);\r\n\r\n /**\r\n * If the map is infinite or not.\r\n *\r\n * @name Phaser.Tilemaps.MapData#infinite\r\n * @type {boolean}\r\n * @since 3.17.0\r\n */\r\n this.infinite = GetFastValue(config, 'infinite', false);\r\n\r\n /**\r\n * The width of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileWidth\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileWidth = GetFastValue(config, 'tileWidth', 0);\r\n\r\n /**\r\n * The height of the tiles.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tileHeight\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.tileHeight = GetFastValue(config, 'tileHeight', 0);\r\n\r\n /**\r\n * The width in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#widthInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.widthInPixels = GetFastValue(config, 'widthInPixels', this.width * this.tileWidth);\r\n\r\n /**\r\n * The height in pixels of the entire tilemap.\r\n * \r\n * @name Phaser.Tilemaps.MapData#heightInPixels\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#format\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.format = GetFastValue(config, 'format', null);\r\n\r\n /**\r\n * The orientation of the map data (i.e. orthogonal, isometric, hexagonal), default 'orthogonal'.\r\n * \r\n * @name Phaser.Tilemaps.MapData#orientation\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.orientation = GetFastValue(config, 'orientation', 'orthogonal');\r\n\r\n /**\r\n * Determines the draw order of tilemap. Default is right-down\r\n * \r\n * 0, or 'right-down'\r\n * 1, or 'left-down'\r\n * 2, or 'right-up'\r\n * 3, or 'left-up'\r\n * \r\n * @name Phaser.Tilemaps.MapData#renderOrder\r\n * @type {string}\r\n * @since 3.12.0\r\n */\r\n this.renderOrder = GetFastValue(config, 'renderOrder', 'right-down');\r\n\r\n /**\r\n * The version of the map data (as specified in Tiled).\r\n * \r\n * @name Phaser.Tilemaps.MapData#version\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.version = GetFastValue(config, 'version', '1');\r\n\r\n /**\r\n * Map specific properties (can be specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * An array with all the layers configured to the MapData.\r\n * \r\n * @name Phaser.Tilemaps.MapData#layers\r\n * @type {(Phaser.Tilemaps.LayerData[]|Phaser.Tilemaps.ObjectLayer)}\r\n * @since 3.0.0\r\n */\r\n this.layers = GetFastValue(config, 'layers', []);\r\n\r\n /**\r\n * An array of Tiled Image Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#images\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.images = GetFastValue(config, 'images', []);\r\n\r\n /**\r\n * An object of Tiled Object Layers.\r\n * \r\n * @name Phaser.Tilemaps.MapData#objects\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', {});\r\n\r\n /**\r\n * An object of collision data. Must be created as physics object or will return undefined.\r\n * \r\n * @name Phaser.Tilemaps.MapData#collision\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.collision = GetFastValue(config, 'collision', {});\r\n\r\n /**\r\n * An array of Tilesets.\r\n * \r\n * @name Phaser.Tilemaps.MapData#tilesets\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tilesets = GetFastValue(config, 'tilesets', []);\r\n\r\n /**\r\n * The collection of images the map uses(specified in Tiled)\r\n * \r\n * @name Phaser.Tilemaps.MapData#imageCollections\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.imageCollections = GetFastValue(config, 'imageCollections', []);\r\n\r\n /**\r\n * [description]\r\n * \r\n * @name Phaser.Tilemaps.MapData#tiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.tiles = GetFastValue(config, 'tiles', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = MapData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/MapData.js?")},"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A class for representing a Tiled object layer in a map. This mirrors the structure of a Tiled\r\n * object layer, except:\r\n * - \"x\" & \"y\" properties are ignored since these cannot be changed in Tiled.\r\n * - \"offsetx\" & \"offsety\" are applied to the individual object coordinates directly, so they\r\n * are ignored as well.\r\n * - \"draworder\" is ignored.\r\n *\r\n * @class ObjectLayer\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tilemaps.ObjectLayerConfig} [config] - The data for the layer from the Tiled JSON object.\r\n */\r\nvar ObjectLayer = new Class({\r\n\r\n initialize:\r\n\r\n function ObjectLayer (config)\r\n {\r\n if (config === undefined) { config = {}; }\r\n\r\n /**\r\n * The name of the Object Layer.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#name\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.name = GetFastValue(config, 'name', 'object layer');\r\n\r\n /**\r\n * The opacity of the layer, between 0 and 1.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#opacity\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.opacity = GetFastValue(config, 'opacity', 1);\r\n\r\n /**\r\n * The custom properties defined on the Object Layer, keyed by their name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#properties\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.properties = GetFastValue(config, 'properties', {});\r\n\r\n /**\r\n * The type of each custom property defined on the Object Layer, keyed by its name.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#propertyTypes\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.propertyTypes = GetFastValue(config, 'propertytypes', {});\r\n\r\n /**\r\n * The type of the layer, which should be `objectgroup`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#type\r\n * @type {string}\r\n * @since 3.0.0\r\n */\r\n this.type = GetFastValue(config, 'type', 'objectgroup');\r\n\r\n /**\r\n * Whether the layer is shown (`true`) or hidden (`false`).\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#visible\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.visible = GetFastValue(config, 'visible', true);\r\n\r\n /**\r\n * An array of all objects on this Object Layer.\r\n *\r\n * Each Tiled object corresponds to a JavaScript object in this array. It has an `id` (unique),\r\n * `name` (as assigned in Tiled), `type` (as assigned in Tiled), `rotation` (in clockwise degrees),\r\n * `properties` (if any), `visible` state (`true` if visible, `false` otherwise),\r\n * `x` and `y` coordinates (in pixels, relative to the tilemap), and a `width` and `height` (in pixels).\r\n *\r\n * An object tile has a `gid` property (GID of the represented tile), a `flippedHorizontal` property,\r\n * a `flippedVertical` property, and `flippedAntiDiagonal` property.\r\n * The {@link http://docs.mapeditor.org/en/latest/reference/tmx-map-format/|Tiled documentation} contains\r\n * information on flipping and rotation.\r\n *\r\n * Polylines have a `polyline` property, which is an array of objects corresponding to points,\r\n * where each point has an `x` property and a `y` property. Polygons have an identically structured\r\n * array in their `polygon` property. Text objects have a `text` property with the text's properties.\r\n *\r\n * Rectangles and ellipses have a `rectangle` or `ellipse` property set to `true`.\r\n *\r\n * @name Phaser.Tilemaps.ObjectLayer#objects\r\n * @type {Phaser.Types.Tilemaps.TiledObject[]}\r\n * @since 3.0.0\r\n */\r\n this.objects = GetFastValue(config, 'objects', []);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = ObjectLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js?")},"./node_modules/phaser/src/tilemaps/parsers/Parse.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js");\r\nvar ParseCSV = __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js");\r\nvar ParseJSONTiled = __webpack_require__(/*! ./tiled/ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js");\r\nvar ParseWeltmeister = __webpack_require__(/*! ./impact/ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js");\r\n\r\n/**\r\n * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format\r\n * is found, returns `null`. When loading from CSV or a 2D array, you should specify the tileWidth &\r\n * tileHeight. When parsing from a map from Tiled, the tileWidth & tileHeight will be pulled from\r\n * the map data.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer} mapFormat - See ../Formats.js.\r\n * @param {(integer[][]|string|object)} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {integer} tileHeight - The height of a tile in pixels. Required for 2D array and CSV, but\r\n * ignored for Tiled JSON.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The created `MapData` object.\r\n */\r\nvar Parse = function (name, mapFormat, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var newMap;\r\n\r\n switch (mapFormat)\r\n {\r\n case (Formats.ARRAY_2D):\r\n newMap = Parse2DArray(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.CSV):\r\n newMap = ParseCSV(name, data, tileWidth, tileHeight, insertNull);\r\n break;\r\n case (Formats.TILED_JSON):\r\n newMap = ParseJSONTiled(name, data, insertNull);\r\n break;\r\n case (Formats.WELTMEISTER):\r\n newMap = ParseWeltmeister(name, data, insertNull);\r\n break;\r\n default:\r\n console.warn(\'Unrecognized tilemap data format: \' + mapFormat);\r\n newMap = null;\r\n }\r\n\r\n return newMap;\r\n};\r\n\r\nmodule.exports = Parse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse.js?')},"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar LayerData = __webpack_require__(/*! ../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar MapData = __webpack_require__(/*! ../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar Tile = __webpack_require__(/*! ../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * Parses a 2D array of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Parse2DArray\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {integer[][]} data - 2D array, CSV string or Tiled JSON object.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} [description]\r\n */\r\nvar Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var layerData = new LayerData({\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight\r\n });\r\n\r\n var mapData = new MapData({\r\n name: name,\r\n tileWidth: tileWidth,\r\n tileHeight: tileHeight,\r\n format: Formats.ARRAY_2D,\r\n layers: [ layerData ]\r\n });\r\n\r\n var tiles = [];\r\n var height = data.length;\r\n var width = 0;\r\n\r\n for (var y = 0; y < data.length; y++)\r\n {\r\n tiles[y] = [];\r\n var row = data[y];\r\n\r\n for (var x = 0; x < row.length; x++)\r\n {\r\n var tileIndex = parseInt(row[x], 10);\r\n\r\n if (isNaN(tileIndex) || tileIndex === -1)\r\n {\r\n tiles[y][x] = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, tileWidth, tileHeight);\r\n }\r\n else\r\n {\r\n tiles[y][x] = new Tile(layerData, tileIndex, x, y, tileWidth, tileHeight);\r\n }\r\n }\r\n\r\n if (width === 0)\r\n {\r\n width = row.length;\r\n }\r\n }\r\n\r\n mapData.width = layerData.width = width;\r\n mapData.height = layerData.height = height;\r\n mapData.widthInPixels = layerData.widthInPixels = width * tileWidth;\r\n mapData.heightInPixels = layerData.heightInPixels = height * tileHeight;\r\n layerData.data = tiles;\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = Parse2DArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js?')},"./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../Formats */ \"./node_modules/phaser/src/tilemaps/Formats.js\");\r\nvar Parse2DArray = __webpack_require__(/*! ./Parse2DArray */ \"./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js\");\r\n\r\n/**\r\n * Parses a CSV string of tile indexes into a new MapData object with a single layer.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.ParseCSV\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {string} data - CSV string of tile indexes.\r\n * @param {integer} tileWidth - The width of a tile in pixels.\r\n * @param {integer} tileHeight - The height of a tile in pixels.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you've a large sparsely populated map and\r\n * the tile data doesn't need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {Phaser.Tilemaps.MapData} The resulting MapData object.\r\n */\r\nvar ParseCSV = function (name, data, tileWidth, tileHeight, insertNull)\r\n{\r\n var array2D = data\r\n .trim()\r\n .split('\\n')\r\n .map(function (row) { return row.split(','); });\r\n\r\n var map = Parse2DArray(name, array2D, tileWidth, tileHeight, insertNull);\r\n map.format = Formats.CSV;\r\n\r\n return map;\r\n};\r\n\r\nmodule.exports = ParseCSV;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ "./node_modules/phaser/src/tilemaps/mapdata/LayerData.js");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ "./node_modules/phaser/src/tilemaps/Tile.js");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n var layerData = new LayerData({\r\n name: layer.name,\r\n width: layer.width,\r\n height: layer.height,\r\n tileWidth: layer.tilesize,\r\n tileHeight: layer.tilesize,\r\n visible: layer.visible === 1\r\n });\r\n\r\n var row = [];\r\n var tileGrid = [];\r\n\r\n // Loop through the data field in the JSON. This is a 2D array containing the tile indexes,\r\n // one after the other. The indexes are relative to the tileset that contains the tile.\r\n for (var y = 0; y < layer.data.length; y++)\r\n {\r\n for (var x = 0; x < layer.data[y].length; x++)\r\n {\r\n // In Weltmeister, 0 = no tile, but the Tilemap API expects -1 = no tile.\r\n var index = layer.data[y][x] - 1;\r\n\r\n var tile;\r\n\r\n if (index > -1)\r\n {\r\n tile = new Tile(layerData, index, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n else\r\n {\r\n tile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, y, layer.tilesize, layer.tilesize);\r\n }\r\n\r\n row.push(tile);\r\n }\r\n\r\n tileGrid.push(row);\r\n row = [];\r\n }\r\n\r\n layerData.data = tileGrid;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ \"./node_modules/phaser/src/tilemaps/Tileset.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var tilesetsNames = [];\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n var layer = json.layer[i];\r\n\r\n // A relative filepath to the source image (within Weltmeister) is used for the name\r\n var tilesetName = layer.tilesetName;\r\n\r\n // Only add unique tilesets that have a valid name. Collision layers will have a blank name.\r\n if (tilesetName !== '' && tilesetsNames.indexOf(tilesetName) === -1)\r\n {\r\n tilesetsNames.push(tilesetName);\r\n\r\n // Tiles are stored with an ID relative to the tileset, rather than a globally unique ID\r\n // across all tilesets. Also, tilesets in Weltmeister have no margin or padding.\r\n tilesets.push(new Tileset(tilesetName, 0, layer.tilesize, layer.tilesize, 0, 0));\r\n }\r\n }\r\n\r\n return tilesets;\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js?")},"./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js");\r\n\r\n/**\r\n * Parses a Weltmeister JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Impact.ParseWeltmeister\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Weltmeister JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?object} [description]\r\n */\r\nvar ParseWeltmeister = function (name, json, insertNull)\r\n{\r\n if (json.layer.length === 0)\r\n {\r\n console.warn(\'No layers found in the Weltmeister map: \' + name);\r\n return null;\r\n }\r\n\r\n var width = 0;\r\n var height = 0;\r\n\r\n for (var i = 0; i < json.layer.length; i++)\r\n {\r\n if (json.layer[i].width > width) { width = json.layer[i].width; }\r\n if (json.layer[i].height > height) { height = json.layer[i].height; }\r\n }\r\n\r\n var mapData = new MapData({\r\n width: width,\r\n height: height,\r\n name: name,\r\n tileWidth: json.layer[0].tilesize,\r\n tileHeight: json.layer[0].tilesize,\r\n format: Formats.WELTMEISTER\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.tilesets = ParseTilesets(json);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseWeltmeister;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js?')},"./node_modules/phaser/src/tilemaps/parsers/impact/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Impact\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js"),\r\n ParseWeltmeister: __webpack_require__(/*! ./ParseWeltmeister */ "./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/impact/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Parse: __webpack_require__(/*! ./Parse */ "./node_modules/phaser/src/tilemaps/parsers/Parse.js"),\r\n Parse2DArray: __webpack_require__(/*! ./Parse2DArray */ "./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js"),\r\n ParseCSV: __webpack_require__(/*! ./ParseCSV */ "./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js"),\r\n\r\n Impact: __webpack_require__(/*! ./impact/ */ "./node_modules/phaser/src/tilemaps/parsers/impact/index.js"),\r\n Tiled: __webpack_require__(/*! ./tiled/ */ "./node_modules/phaser/src/tilemaps/parsers/tiled/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/index.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Extend = __webpack_require__(/*! ../../../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * Copy properties from tileset to tiles.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n */\r\nvar AssignTileProperties = function (mapData)\r\n{\r\n var layerData;\r\n var tile;\r\n var sid;\r\n var set;\r\n var row;\r\n\r\n // go through each of the map data layers\r\n for (var i = 0; i < mapData.layers.length; i++)\r\n {\r\n layerData = mapData.layers[i];\r\n\r\n set = null;\r\n\r\n // rows of tiles\r\n for (var j = 0; j < layerData.data.length; j++)\r\n {\r\n row = layerData.data[j];\r\n\r\n // individual tiles\r\n for (var k = 0; k < row.length; k++)\r\n {\r\n tile = row[k];\r\n\r\n if (tile === null || tile.index < 0)\r\n {\r\n continue;\r\n }\r\n\r\n // find the relevant tileset\r\n sid = mapData.tiles[tile.index][2];\r\n set = mapData.tilesets[sid];\r\n\r\n // Ensure that a tile\'s size matches its tileset\r\n tile.width = set.tileWidth;\r\n tile.height = set.tileHeight;\r\n\r\n // if that tile type has any properties, add them to the tile object\r\n if (set.tileProperties && set.tileProperties[tile.index - set.firstgid])\r\n {\r\n tile.properties = Extend(\r\n tile.properties, set.tileProperties[tile.index - set.firstgid]\r\n );\r\n }\r\n }\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = AssignTileProperties;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Decode base-64 encoded data, for example as exported by Tiled.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.Base64Decode\r\n * @since 3.0.0\r\n *\r\n * @param {object} data - Base-64 encoded data to decode.\r\n *\r\n * @return {array} Array containing the decoded bytes.\r\n */\r\nvar Base64Decode = function (data)\r\n{\r\n var binaryString = window.atob(data);\r\n var len = binaryString.length;\r\n var bytes = new Array(len / 4);\r\n\r\n // Interpret binaryString as an array of bytes representing little-endian encoded uint32 values.\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n bytes[i / 4] = (\r\n binaryString.charCodeAt(i) |\r\n binaryString.charCodeAt(i + 1) << 8 |\r\n binaryString.charCodeAt(i + 2) << 16 |\r\n binaryString.charCodeAt(i + 3) << 24\r\n ) >>> 0;\r\n }\r\n\r\n return bytes;\r\n};\r\n\r\nmodule.exports = Base64Decode;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Master list of tiles -> x, y, index in tileset.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tilemaps.MapData} mapData - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar BuildTilesetIndex = function (mapData)\r\n{\r\n var tiles = [];\r\n\r\n for (var i = 0; i < mapData.tilesets.length; i++)\r\n {\r\n var set = mapData.tilesets[i];\r\n\r\n var x = set.tileMargin;\r\n var y = set.tileMargin;\r\n\r\n var count = 0;\r\n var countX = 0;\r\n var countY = 0;\r\n\r\n for (var t = set.firstgid; t < set.firstgid + set.total; t++)\r\n {\r\n // Can add extra properties here as needed\r\n tiles[t] = [ x, y, i ];\r\n\r\n x += set.tileWidth + set.tileSpacing;\r\n\r\n count++;\r\n\r\n if (count === set.total)\r\n {\r\n break;\r\n }\r\n\r\n countX++;\r\n\r\n if (countX === set.columns)\r\n {\r\n x = set.tileMargin;\r\n y += set.tileHeight + set.tileSpacing;\r\n\r\n countX = 0;\r\n countY++;\r\n\r\n if (countY === set.rows)\r\n {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n return tiles;\r\n};\r\n\r\nmodule.exports = BuildTilesetIndex;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar FLIPPED_HORIZONTAL = 0x80000000;\r\nvar FLIPPED_VERTICAL = 0x40000000;\r\nvar FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left corners\r\n\r\n/**\r\n * See Tiled documentation on tile flipping:\r\n * http://docs.mapeditor.org/en/latest/reference/tmx-map-format/\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID\r\n * @since 3.0.0\r\n *\r\n * @param {number} gid - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseGID = function (gid)\r\n{\r\n var flippedHorizontal = Boolean(gid & FLIPPED_HORIZONTAL);\r\n var flippedVertical = Boolean(gid & FLIPPED_VERTICAL);\r\n var flippedAntiDiagonal = Boolean(gid & FLIPPED_ANTI_DIAGONAL);\r\n gid = gid & ~(FLIPPED_HORIZONTAL | FLIPPED_VERTICAL | FLIPPED_ANTI_DIAGONAL);\r\n\r\n // Parse the flip flags into something Phaser can use\r\n var rotation = 0;\r\n var flipped = false;\r\n\r\n if (flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = false;\r\n }\r\n else if (!flippedHorizontal && flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = Math.PI;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && flippedAntiDiagonal)\r\n {\r\n rotation = 3 * Math.PI / 2;\r\n flipped = true;\r\n }\r\n else if (!flippedHorizontal && !flippedVertical && !flippedAntiDiagonal)\r\n {\r\n rotation = 0;\r\n flipped = false;\r\n }\r\n\r\n return {\r\n gid: gid,\r\n flippedHorizontal: flippedHorizontal,\r\n flippedVertical: flippedVertical,\r\n flippedAntiDiagonal: flippedAntiDiagonal,\r\n rotation: rotation,\r\n flipped: flipped\r\n };\r\n};\r\n\r\nmodule.exports = ParseGID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseImageLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseImageLayers = function (json)\r\n{\r\n var images = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'imagelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curi = json.layers[i];\r\n\r\n images.push({\r\n name: curi.name,\r\n image: curi.image,\r\n x: GetFastValue(curi, 'offsetx', 0) + curi.x,\r\n y: GetFastValue(curi, 'offsety', 0) + curi.y,\r\n alpha: curi.opacity,\r\n visible: curi.visible,\r\n properties: GetFastValue(curi, 'properties', {})\r\n });\r\n }\r\n\r\n return images;\r\n};\r\n\r\nmodule.exports = ParseImageLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Formats = __webpack_require__(/*! ../../Formats */ "./node_modules/phaser/src/tilemaps/Formats.js");\r\nvar MapData = __webpack_require__(/*! ../../mapdata/MapData */ "./node_modules/phaser/src/tilemaps/mapdata/MapData.js");\r\nvar ParseTileLayers = __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js");\r\nvar ParseImageLayers = __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js");\r\nvar ParseTilesets = __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js");\r\nvar ParseObjectLayers = __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js");\r\nvar BuildTilesetIndex = __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js");\r\nvar AssignTileProperties = __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js");\r\n\r\n/**\r\n * Parses a Tiled JSON object into a new MapData object.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled\r\n * @since 3.0.0\r\n *\r\n * @param {string} name - The name of the tilemap, used to set the name on the MapData.\r\n * @param {object} json - The Tiled JSON object.\r\n * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map\r\n * data are handled. If `true`, empty locations will get a value of `null`. If `false`, empty\r\n * location will get a Tile object with an index of -1. If you\'ve a large sparsely populated map and\r\n * the tile data doesn\'t need to change then setting this value to `true` will help with memory\r\n * consumption. However if your map is small or you need to update the tiles dynamically, then leave\r\n * the default value set.\r\n *\r\n * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can\'t be parsed.\r\n */\r\nvar ParseJSONTiled = function (name, json, insertNull)\r\n{\r\n if (json.orientation !== \'orthogonal\')\r\n {\r\n console.warn(\'Only orthogonal map types are supported in this version of Phaser\');\r\n return null;\r\n }\r\n\r\n // Map data will consist of: layers, objects, images, tilesets, sizes\r\n var mapData = new MapData({\r\n width: json.width,\r\n height: json.height,\r\n name: name,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n orientation: json.orientation,\r\n format: Formats.TILED_JSON,\r\n version: json.version,\r\n properties: json.properties,\r\n renderOrder: json.renderorder,\r\n infinite: json.infinite\r\n });\r\n\r\n mapData.layers = ParseTileLayers(json, insertNull);\r\n mapData.images = ParseImageLayers(json);\r\n\r\n var sets = ParseTilesets(json);\r\n mapData.tilesets = sets.tilesets;\r\n mapData.imageCollections = sets.imageCollections;\r\n\r\n mapData.objects = ParseObjectLayers(json);\r\n\r\n mapData.tiles = BuildTilesetIndex(mapData);\r\n\r\n AssignTileProperties(mapData);\r\n\r\n return mapData;\r\n};\r\n\r\nmodule.exports = ParseJSONTiled;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pick = __webpack_require__(/*! ../../../utils/object/Pick */ \"./node_modules/phaser/src/utils/object/Pick.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\n\r\nvar copyPoints = function (p) { return { x: p.x, y: p.y }; };\r\n\r\nvar commonObjectProps = [ 'id', 'name', 'type', 'rotation', 'properties', 'visible', 'x', 'y', 'width', 'height' ];\r\n\r\n/**\r\n * Convert a Tiled object to an internal parsed object normalising and copying properties over, while applying optional x and y offsets. The parsed object will always have the properties `id`, `name`, `type`, `rotation`, `properties`, `visible`, `x`, `y`, `width` and `height`. Other properties will be added according to the object type (such as text, polyline, gid etc.)\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} tiledObject - Tiled object to convert to an internal parsed object normalising and copying properties over.\r\n * @param {number} [offsetX=0] - Optional additional offset to apply to the object's x property. Defaults to 0.\r\n * @param {number} [offsetY=0] - Optional additional offset to apply to the object's y property. Defaults to 0.\r\n *\r\n * @return {object} The parsed object containing properties read from the Tiled object according to it's type with x and y values updated according to the given offsets.\r\n */\r\nvar ParseObject = function (tiledObject, offsetX, offsetY)\r\n{\r\n if (offsetX === undefined) { offsetX = 0; }\r\n if (offsetY === undefined) { offsetY = 0; }\r\n\r\n var parsedObject = Pick(tiledObject, commonObjectProps);\r\n\r\n parsedObject.x += offsetX;\r\n parsedObject.y += offsetY;\r\n\r\n if (tiledObject.gid)\r\n {\r\n // Object tiles\r\n var gidInfo = ParseGID(tiledObject.gid);\r\n parsedObject.gid = gidInfo.gid;\r\n parsedObject.flippedHorizontal = gidInfo.flippedHorizontal;\r\n parsedObject.flippedVertical = gidInfo.flippedVertical;\r\n parsedObject.flippedAntiDiagonal = gidInfo.flippedAntiDiagonal;\r\n }\r\n else if (tiledObject.polyline)\r\n {\r\n parsedObject.polyline = tiledObject.polyline.map(copyPoints);\r\n }\r\n else if (tiledObject.polygon)\r\n {\r\n parsedObject.polygon = tiledObject.polygon.map(copyPoints);\r\n }\r\n else if (tiledObject.ellipse)\r\n {\r\n parsedObject.ellipse = tiledObject.ellipse;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n else if (tiledObject.text)\r\n {\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n parsedObject.text = tiledObject.text;\r\n }\r\n else\r\n {\r\n // Otherwise, assume it is a rectangle\r\n parsedObject.rectangle = true;\r\n parsedObject.width = tiledObject.width;\r\n parsedObject.height = tiledObject.height;\r\n }\r\n\r\n return parsedObject;\r\n};\r\n\r\nmodule.exports = ParseObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js\");\r\nvar ObjectLayer = __webpack_require__(/*! ../../mapdata/ObjectLayer */ \"./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js\");\r\n\r\n/**\r\n * Parses a Tiled JSON object into an array of ObjectLayer objects.\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseObjectLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - The Tiled JSON object.\r\n *\r\n * @return {array} An array of all object layers in the tilemap as `ObjectLayer`s.\r\n */\r\nvar ParseObjectLayers = function (json)\r\n{\r\n var objectLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'objectgroup')\r\n {\r\n continue;\r\n }\r\n\r\n var curo = json.layers[i];\r\n var offsetX = GetFastValue(curo, 'offsetx', 0);\r\n var offsetY = GetFastValue(curo, 'offsety', 0);\r\n var objects = [];\r\n\r\n for (var j = 0; j < curo.objects.length; j++)\r\n {\r\n var parsedObject = ParseObject(curo.objects[j], offsetX, offsetY);\r\n\r\n objects.push(parsedObject);\r\n }\r\n\r\n var objectLayer = new ObjectLayer(curo);\r\n objectLayer.objects = objects;\r\n\r\n objectLayers.push(objectLayer);\r\n }\r\n\r\n return objectLayers;\r\n};\r\n\r\nmodule.exports = ParseObjectLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Base64Decode = __webpack_require__(/*! ./Base64Decode */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../../../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\nvar LayerData = __webpack_require__(/*! ../../mapdata/LayerData */ \"./node_modules/phaser/src/tilemaps/mapdata/LayerData.js\");\r\nvar ParseGID = __webpack_require__(/*! ./ParseGID */ \"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js\");\r\nvar Tile = __webpack_require__(/*! ../../Tile */ \"./node_modules/phaser/src/tilemaps/Tile.js\");\r\n\r\n/**\r\n * [description]\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTileLayers\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n * @param {boolean} insertNull - [description]\r\n *\r\n * @return {array} [description]\r\n */\r\nvar ParseTileLayers = function (json, insertNull)\r\n{\r\n var infiniteMap = GetFastValue(json, 'infinite', false);\r\n var tileLayers = [];\r\n\r\n for (var i = 0; i < json.layers.length; i++)\r\n {\r\n if (json.layers[i].type !== 'tilelayer')\r\n {\r\n continue;\r\n }\r\n\r\n var curl = json.layers[i];\r\n\r\n // Base64 decode data if necessary. NOTE: uncompressed base64 only.\r\n if (curl.compression)\r\n {\r\n console.warn(\r\n 'TilemapParser.parseTiledJSON - Layer compression is unsupported, skipping layer \\''\r\n + curl.name + '\\''\r\n );\r\n continue;\r\n }\r\n else if (curl.encoding && curl.encoding === 'base64')\r\n {\r\n curl.data = Base64Decode(curl.data);\r\n delete curl.encoding; // Allow the same map to be parsed multiple times\r\n }\r\n\r\n // This is an array containing the tile indexes, one after the other. -1 = no tile,\r\n // everything else = the tile index (starting at 1 for Tiled, 0 for CSV) If the map\r\n // contains multiple tilesets then the indexes are relative to that which the set starts\r\n // from. Need to set which tileset in the cache = which tileset in the JSON, if you do this\r\n // manually it means you can use the same map data but a new tileset.\r\n\r\n var layerData;\r\n var gidInfo;\r\n var tile;\r\n var blankTile;\r\n\r\n var output = [];\r\n var x = 0;\r\n\r\n if (infiniteMap)\r\n {\r\n var layerOffsetX = GetFastValue(curl, 'startx', 0) + curl.x;\r\n var layerOffsetY = GetFastValue(curl, 'starty', 0) + curl.y;\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: layerOffsetX,\r\n y: layerOffsetY,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n for (var c = 0; c < curl.height; c++)\r\n {\r\n output.push([ null ]);\r\n\r\n for (var j = 0; j < curl.width; j++)\r\n {\r\n output[c][j] = null;\r\n }\r\n }\r\n\r\n for (c = 0, len = curl.chunks.length; c < len; c++)\r\n {\r\n var chunk = curl.chunks[c];\r\n\r\n var offsetX = (chunk.x - layerOffsetX);\r\n var offsetY = (chunk.y - layerOffsetY);\r\n\r\n var y = 0;\r\n\r\n for (var t = 0, len2 = chunk.data.length; t < len2; t++)\r\n {\r\n var newOffsetX = x + offsetX;\r\n var newOffsetY = y + offsetY;\r\n\r\n gidInfo = ParseGID(chunk.data[t]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, newOffsetX, newOffsetY, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n output[newOffsetY][newOffsetX] = tile;\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, newOffsetX, newOffsetY, json.tilewidth, json.tileheight);\r\n\r\n output[newOffsetY][newOffsetX] = blankTile;\r\n }\r\n\r\n x++;\r\n\r\n if (x === chunk.width)\r\n {\r\n y++;\r\n x = 0;\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n layerData = new LayerData({\r\n name: curl.name,\r\n x: GetFastValue(curl, 'offsetx', 0) + curl.x,\r\n y: GetFastValue(curl, 'offsety', 0) + curl.y,\r\n width: curl.width,\r\n height: curl.height,\r\n tileWidth: json.tilewidth,\r\n tileHeight: json.tileheight,\r\n alpha: curl.opacity,\r\n visible: curl.visible,\r\n properties: GetFastValue(curl, 'properties', {})\r\n });\r\n\r\n var row = [];\r\n\r\n // Loop through the data field in the JSON.\r\n for (var k = 0, len = curl.data.length; k < len; k++)\r\n {\r\n gidInfo = ParseGID(curl.data[k]);\r\n\r\n // index, x, y, width, height\r\n if (gidInfo.gid > 0)\r\n {\r\n tile = new Tile(layerData, gidInfo.gid, x, output.length, json.tilewidth,\r\n json.tileheight);\r\n\r\n // Turning Tiled's FlippedHorizontal, FlippedVertical and FlippedAntiDiagonal\r\n // propeties into flipX, flipY and rotation\r\n tile.rotation = gidInfo.rotation;\r\n tile.flipX = gidInfo.flipped;\r\n\r\n row.push(tile);\r\n }\r\n else\r\n {\r\n blankTile = insertNull\r\n ? null\r\n : new Tile(layerData, -1, x, output.length, json.tilewidth, json.tileheight);\r\n row.push(blankTile);\r\n }\r\n\r\n x++;\r\n\r\n if (x === curl.width)\r\n {\r\n output.push(row);\r\n x = 0;\r\n row = [];\r\n }\r\n }\r\n }\r\n\r\n layerData.data = output;\r\n\r\n tileLayers.push(layerData);\r\n }\r\n\r\n return tileLayers;\r\n};\r\n\r\nmodule.exports = ParseTileLayers;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js?")},"./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Tileset = __webpack_require__(/*! ../../Tileset */ "./node_modules/phaser/src/tilemaps/Tileset.js");\r\nvar ImageCollection = __webpack_require__(/*! ../../ImageCollection */ "./node_modules/phaser/src/tilemaps/ImageCollection.js");\r\nvar ParseObject = __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js");\r\n\r\n/**\r\n * Tilesets and Image Collections\r\n *\r\n * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets\r\n * @since 3.0.0\r\n *\r\n * @param {object} json - [description]\r\n *\r\n * @return {object} [description]\r\n */\r\nvar ParseTilesets = function (json)\r\n{\r\n var tilesets = [];\r\n var imageCollections = [];\r\n var lastSet = null;\r\n var stringID;\r\n\r\n for (var i = 0; i < json.tilesets.length; i++)\r\n {\r\n // name, firstgid, width, height, margin, spacing, properties\r\n var set = json.tilesets[i];\r\n\r\n if (set.source)\r\n {\r\n console.warn(\'Phaser can\\\'t load external tilesets. Use the Embed Tileset button and then export the map again.\');\r\n }\r\n else if (set.image)\r\n {\r\n var newSet = new Tileset(set.name, set.firstgid, set.tilewidth, set.tileheight, set.margin, set.spacing);\r\n\r\n if (json.version > 1)\r\n {\r\n // Tiled 1.2+\r\n\r\n if (Array.isArray(set.tiles))\r\n {\r\n var tiles = {};\r\n var props = {};\r\n\r\n for (var t = 0; t < set.tiles.length; t++)\r\n {\r\n var tile = set.tiles[t];\r\n\r\n // Convert tileproperties\r\n if (tile.properties)\r\n {\r\n var newPropData = {};\r\n\r\n tile.properties.forEach(function (propData)\r\n {\r\n newPropData[propData[\'name\']] = propData[\'value\'];\r\n });\r\n\r\n props[tile.id] = newPropData;\r\n }\r\n\r\n // Convert objectgroup\r\n if (tile.objectgroup)\r\n {\r\n tiles[tile.id] = { objectgroup: tile.objectgroup };\r\n\r\n if (tile.objectgroup.objects)\r\n {\r\n var parsedObjects2 = tile.objectgroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n\r\n tiles[tile.id].objectgroup.objects = parsedObjects2;\r\n }\r\n }\r\n\r\n // Copy animation data\r\n if (tile.animation)\r\n {\r\n if (tiles.hasOwnProperty(tile.id))\r\n {\r\n tiles[tile.id].animation = tile.animation;\r\n }\r\n else\r\n {\r\n tiles[tile.id] = { animation: tile.animation };\r\n }\r\n }\r\n }\r\n\r\n newSet.tileData = tiles;\r\n newSet.tileProperties = props;\r\n }\r\n }\r\n else\r\n {\r\n // Tiled 1\r\n\r\n // Properties stored per-tile in object with string indexes starting at "0"\r\n if (set.tileproperties)\r\n {\r\n newSet.tileProperties = set.tileproperties;\r\n }\r\n\r\n // Object & terrain shapes stored per-tile in object with string indexes starting at "0"\r\n if (set.tiles)\r\n {\r\n newSet.tileData = set.tiles;\r\n\r\n // Parse the objects into Phaser format to match handling of other Tiled objects\r\n for (stringID in newSet.tileData)\r\n {\r\n var objectGroup = newSet.tileData[stringID].objectgroup;\r\n if (objectGroup && objectGroup.objects)\r\n {\r\n var parsedObjects1 = objectGroup.objects.map(\r\n function (obj) { return ParseObject(obj); }\r\n );\r\n newSet.tileData[stringID].objectgroup.objects = parsedObjects1;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // For a normal sliced tileset the row/count/size information is computed when updated.\r\n // This is done (again) after the image is set.\r\n newSet.updateTileData(set.imagewidth, set.imageheight);\r\n\r\n tilesets.push(newSet);\r\n }\r\n else\r\n {\r\n var newCollection = new ImageCollection(set.name, set.firstgid, set.tilewidth,\r\n set.tileheight, set.margin, set.spacing, set.properties);\r\n\r\n for (stringID in set.tiles)\r\n {\r\n var image = set.tiles[stringID].image;\r\n var gid = set.firstgid + parseInt(stringID, 10);\r\n newCollection.addImage(gid, image);\r\n }\r\n\r\n imageCollections.push(newCollection);\r\n }\r\n\r\n // We\'ve got a new Tileset, so set the lastgid into the previous one\r\n if (lastSet)\r\n {\r\n lastSet.lastgid = set.firstgid - 1;\r\n }\r\n\r\n lastSet = set;\r\n }\r\n\r\n return { tilesets: tilesets, imageCollections: imageCollections };\r\n};\r\n\r\nmodule.exports = ParseTilesets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js?')},"./node_modules/phaser/src/tilemaps/parsers/tiled/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tilemaps.Parsers.Tiled\r\n */\r\n\r\nmodule.exports = {\r\n\r\n AssignTileProperties: __webpack_require__(/*! ./AssignTileProperties */ "./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js"),\r\n Base64Decode: __webpack_require__(/*! ./Base64Decode */ "./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js"),\r\n BuildTilesetIndex: __webpack_require__(/*! ./BuildTilesetIndex */ "./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js"),\r\n ParseGID: __webpack_require__(/*! ./ParseGID */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js"),\r\n ParseImageLayers: __webpack_require__(/*! ./ParseImageLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js"),\r\n ParseJSONTiled: __webpack_require__(/*! ./ParseJSONTiled */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js"),\r\n ParseObject: __webpack_require__(/*! ./ParseObject */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js"),\r\n ParseObjectLayers: __webpack_require__(/*! ./ParseObjectLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js"),\r\n ParseTileLayers: __webpack_require__(/*! ./ParseTileLayers */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js"),\r\n ParseTilesets: __webpack_require__(/*! ./ParseTilesets */ "./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/parsers/tiled/index.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar Components = __webpack_require__(/*! ../../gameobjects/components */ \"./node_modules/phaser/src/gameobjects/components/index.js\");\r\nvar GameEvents = __webpack_require__(/*! ../../core/events */ \"./node_modules/phaser/src/core/events/index.js\");\r\nvar GameObject = __webpack_require__(/*! ../../gameobjects/GameObject */ \"./node_modules/phaser/src/gameobjects/GameObject.js\");\r\nvar StaticTilemapLayerRender = __webpack_require__(/*! ./StaticTilemapLayerRender */ \"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js\");\r\nvar TilemapComponents = __webpack_require__(/*! ../components */ \"./node_modules/phaser/src/tilemaps/components/index.js\");\r\nvar TransformMatrix = __webpack_require__(/*! ../../gameobjects/components/TransformMatrix */ \"./node_modules/phaser/src/gameobjects/components/TransformMatrix.js\");\r\nvar Utils = __webpack_require__(/*! ../../renderer/webgl/Utils */ \"./node_modules/phaser/src/renderer/webgl/Utils.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Static Tilemap Layer is a Game Object that renders LayerData from a Tilemap when used in combination\r\n * with one, or more, Tilesets.\r\n *\r\n * A Static Tilemap Layer is optimized for rendering speed over flexibility. You cannot apply per-tile\r\n * effects like tint or alpha, or change the tiles or tilesets the layer uses.\r\n * \r\n * Use a Static Tilemap Layer instead of a Dynamic Tilemap Layer when you don't need tile manipulation features.\r\n *\r\n * @class StaticTilemapLayer\r\n * @extends Phaser.GameObjects.GameObject\r\n * @memberof Phaser.Tilemaps\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @extends Phaser.GameObjects.Components.Alpha\r\n * @extends Phaser.GameObjects.Components.BlendMode\r\n * @extends Phaser.GameObjects.Components.ComputedSize\r\n * @extends Phaser.GameObjects.Components.Depth\r\n * @extends Phaser.GameObjects.Components.Flip\r\n * @extends Phaser.GameObjects.Components.GetBounds\r\n * @extends Phaser.GameObjects.Components.Origin\r\n * @extends Phaser.GameObjects.Components.Pipeline\r\n * @extends Phaser.GameObjects.Components.Transform\r\n * @extends Phaser.GameObjects.Components.Visible\r\n * @extends Phaser.GameObjects.Components.ScrollFactor\r\n *\r\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs.\r\n * @param {Phaser.Tilemaps.Tilemap} tilemap - The Tilemap this layer is a part of.\r\n * @param {integer} layerIndex - The index of the LayerData associated with this layer.\r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n * @param {number} [x=0] - The world x position where the top left of this layer will be placed.\r\n * @param {number} [y=0] - The world y position where the top left of this layer will be placed.\r\n */\r\nvar StaticTilemapLayer = new Class({\r\n\r\n Extends: GameObject,\r\n\r\n Mixins: [\r\n Components.Alpha,\r\n Components.BlendMode,\r\n Components.ComputedSize,\r\n Components.Depth,\r\n Components.Flip,\r\n Components.GetBounds,\r\n Components.Origin,\r\n Components.Pipeline,\r\n Components.Transform,\r\n Components.Visible,\r\n Components.ScrollFactor,\r\n StaticTilemapLayerRender\r\n ],\r\n\r\n initialize:\r\n\r\n function StaticTilemapLayer (scene, tilemap, layerIndex, tileset, x, y)\r\n {\r\n GameObject.call(this, scene, 'StaticTilemapLayer');\r\n\r\n /**\r\n * Used internally by physics system to perform fast type checks.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#isTilemap\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.isTilemap = true;\r\n\r\n /**\r\n * The Tilemap that this layer is a part of.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilemap\r\n * @type {Phaser.Tilemaps.Tilemap}\r\n * @since 3.0.0\r\n */\r\n this.tilemap = tilemap;\r\n\r\n /**\r\n * The index of the LayerData associated with this layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layerIndex\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.layerIndex = layerIndex;\r\n\r\n /**\r\n * The LayerData associated with this layer. LayerData can only be associated with one\r\n * tilemap layer.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#layer\r\n * @type {Phaser.Tilemaps.LayerData}\r\n * @since 3.0.0\r\n */\r\n this.layer = tilemap.layers[layerIndex];\r\n\r\n // Link the LayerData with this static tilemap layer\r\n this.layer.tilemapLayer = this;\r\n\r\n /**\r\n * The Tileset/s associated with this layer.\r\n * \r\n * As of Phaser 3.14 this property is now an array of Tileset objects, previously it was a single reference.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tileset\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.0.0\r\n */\r\n this.tileset = [];\r\n\r\n /**\r\n * Used internally by the Canvas renderer.\r\n * This holds the tiles that are visible within the camera in the last frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#culledTiles\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.culledTiles = [];\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this, and toggling this flag allows\r\n * you to do so. Also see `setSkipCull` for a chainable method that does the same thing.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#skipCull\r\n * @type {boolean}\r\n * @since 3.12.0\r\n */\r\n this.skipCull = false;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles drawn by the renderer in the last frame.\r\n * \r\n * This only works when rending with Canvas.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesDrawn\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesDrawn = 0;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The total number of tiles in this layer. Updated every frame.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#tilesTotal\r\n * @type {integer}\r\n * @readonly\r\n * @since 3.12.0\r\n */\r\n this.tilesTotal = this.layer.width * this.layer.height;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its horizontal size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingX\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingX = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The amount of extra tiles to add into the cull rectangle when calculating its vertical size.\r\n *\r\n * See the method `setCullPadding` for more details.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullPaddingY\r\n * @type {integer}\r\n * @default 1\r\n * @since 3.12.0\r\n */\r\n this.cullPaddingY = 1;\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * The callback that is invoked when the tiles are culled.\r\n *\r\n * By default it will call `TilemapComponents.CullTiles` but you can override this to call any function you like.\r\n *\r\n * It will be sent 3 arguments:\r\n *\r\n * 1. The Phaser.Tilemaps.LayerData object for this Layer\r\n * 2. The Camera that is culling the layer. You can check its `dirty` property to see if it has changed since the last cull.\r\n * 3. A reference to the `culledTiles` array, which should be used to store the tiles you want rendered.\r\n *\r\n * See the `TilemapComponents.CullTiles` source code for details on implementing your own culling system.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#cullCallback\r\n * @type {function}\r\n * @since 3.12.0\r\n */\r\n this.cullCallback = TilemapComponents.CullTiles;\r\n\r\n /**\r\n * A reference to the renderer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#renderer\r\n * @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.renderer = scene.sys.game.renderer;\r\n\r\n /**\r\n * An array of vertex buffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexBuffer\r\n * @type {WebGLBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexBuffer = [];\r\n\r\n /**\r\n * An array of ArrayBuffer objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#bufferData\r\n * @type {ArrayBuffer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.bufferData = [];\r\n\r\n /**\r\n * An array of Float32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewF32\r\n * @type {Float32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewF32 = [];\r\n\r\n /**\r\n * An array of Uint32 Array objects, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single instance.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexViewU32\r\n * @type {Uint32Array[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexViewU32 = [];\r\n\r\n /**\r\n * An array of booleans, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single boolean.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#dirty\r\n * @type {boolean[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.dirty = [];\r\n\r\n /**\r\n * An array of integers, used by the WebGL renderer.\r\n * \r\n * As of Phaser 3.14 this property is now an array, where each element maps to a Tileset instance. Previously it was a single integer.\r\n * \r\n * @name Phaser.Tilemaps.StaticTilemapLayer#vertexCount\r\n * @type {integer[]}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this.vertexCount = [];\r\n\r\n /**\r\n * The rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 0 which is 'right-down', meaning it will draw the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * This can be changed via the `setRenderOrder` method.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_renderOrder\r\n * @type {integer}\r\n * @default 0\r\n * @private\r\n * @since 3.12.0\r\n */\r\n this._renderOrder = 0;\r\n\r\n /**\r\n * A temporary Transform Matrix, re-used internally during batching.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#_tempMatrix\r\n * @private\r\n * @type {Phaser.GameObjects.Components.TransformMatrix}\r\n * @since 3.14.0\r\n */\r\n this._tempMatrix = new TransformMatrix();\r\n\r\n /**\r\n * An array holding the mapping between the tile indexes and the tileset they belong to.\r\n *\r\n * @name Phaser.Tilemaps.StaticTilemapLayer#gidMap\r\n * @type {Phaser.Tilemaps.Tileset[]}\r\n * @since 3.14.0\r\n */\r\n this.gidMap = [];\r\n\r\n this.setTilesets(tileset);\r\n this.setAlpha(this.layer.alpha);\r\n this.setPosition(x, y);\r\n this.setOrigin();\r\n this.setSize(tilemap.tileWidth * this.layer.width, tilemap.tileHeight * this.layer.height);\r\n\r\n this.updateVBOData();\r\n\r\n this.initPipeline('TextureTintPipeline');\r\n\r\n scene.sys.game.events.on(GameEvents.CONTEXT_RESTORED, function ()\r\n {\r\n this.updateVBOData();\r\n }, this);\r\n },\r\n\r\n /**\r\n * Populates the internal `tileset` array with the Tileset references this Layer requires for rendering.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTilesets\r\n * @private\r\n * @since 3.14.0\r\n * \r\n * @param {(string|string[]|Phaser.Tilemaps.Tileset|Phaser.Tilemaps.Tileset[])} tileset - The tileset, or an array of tilesets, used to render this layer. Can be a string or a Tileset object.\r\n */\r\n setTilesets: function (tilesets)\r\n {\r\n var gidMap = [];\r\n var setList = [];\r\n var map = this.tilemap;\r\n\r\n if (!Array.isArray(tilesets))\r\n {\r\n tilesets = [ tilesets ];\r\n }\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n var tileset = tilesets[i];\r\n\r\n if (typeof tileset === 'string')\r\n {\r\n tileset = map.getTileset(tileset);\r\n }\r\n\r\n if (tileset)\r\n {\r\n setList.push(tileset);\r\n\r\n var s = tileset.firstgid;\r\n\r\n for (var t = 0; t < tileset.total; t++)\r\n {\r\n gidMap[s + t] = tileset;\r\n }\r\n }\r\n }\r\n\r\n this.gidMap = gidMap;\r\n this.tileset = setList;\r\n },\r\n\r\n /**\r\n * Prepares the VBO data arrays for population by the `upload` method.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#updateVBOData\r\n * @private\r\n * @since 3.14.0\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n updateVBOData: function ()\r\n {\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Upload the tile data to a VBO.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#upload\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to render to.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n upload: function (camera, tilesetIndex)\r\n {\r\n var renderer = this.renderer;\r\n var gl = renderer.gl;\r\n\r\n var pipeline = renderer.pipelines.TextureTintPipeline;\r\n\r\n if (this.dirty[tilesetIndex])\r\n {\r\n var tileset = this.tileset[tilesetIndex];\r\n var mapWidth = this.layer.width;\r\n var mapHeight = this.layer.height;\r\n var width = tileset.image.source[0].width;\r\n var height = tileset.image.source[0].height;\r\n var mapData = this.layer.data;\r\n var tile;\r\n var row;\r\n var col;\r\n var renderOrder = this._renderOrder;\r\n var minTileIndex = tileset.firstgid;\r\n var maxTileIndex = tileset.firstgid + tileset.total;\r\n \r\n var vertexBuffer = this.vertexBuffer[tilesetIndex];\r\n var bufferData = this.bufferData[tilesetIndex];\r\n var vOffset = -1;\r\n var bufferSize = (mapWidth * mapHeight) * pipeline.vertexSize * 6;\r\n\r\n this.vertexCount[tilesetIndex] = 0;\r\n \r\n if (bufferData === null)\r\n {\r\n bufferData = new ArrayBuffer(bufferSize);\r\n\r\n this.bufferData[tilesetIndex] = bufferData;\r\n\r\n this.vertexViewF32[tilesetIndex] = new Float32Array(bufferData);\r\n this.vertexViewU32[tilesetIndex] = new Uint32Array(bufferData);\r\n }\r\n \r\n if (renderOrder === 0)\r\n {\r\n // right-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 1)\r\n {\r\n // left-down\r\n \r\n for (row = 0; row < mapHeight; row++)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 2)\r\n {\r\n // right-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = 0; col < mapWidth; col++)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n else if (renderOrder === 3)\r\n {\r\n // left-up\r\n \r\n for (row = mapHeight - 1; row >= 0; row--)\r\n {\r\n for (col = mapWidth - 1; col >= 0; col--)\r\n {\r\n tile = mapData[row][col];\r\n \r\n if (!tile || tile.index < minTileIndex || tile.index > maxTileIndex || !tile.visible)\r\n {\r\n continue;\r\n }\r\n \r\n vOffset = this.batchTile(vOffset, tile, tileset, width, height, camera, tilesetIndex);\r\n }\r\n }\r\n }\r\n \r\n this.dirty[tilesetIndex] = false;\r\n \r\n if (vertexBuffer === null)\r\n {\r\n vertexBuffer = renderer.createVertexBuffer(bufferData, gl.STATIC_DRAW);\r\n \r\n this.vertexBuffer[tilesetIndex] = vertexBuffer;\r\n }\r\n else\r\n {\r\n renderer.setVertexBuffer(vertexBuffer);\r\n \r\n gl.bufferSubData(gl.ARRAY_BUFFER, 0, bufferData);\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Add a single tile into the batch.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#batchTile\r\n * @private\r\n * @since 3.12.0\r\n *\r\n * @param {integer} vOffset - The vertex offset.\r\n * @param {any} tile - The tile being rendered.\r\n * @param {any} tileset - The tileset being used for rendering.\r\n * @param {integer} width - The width of the tileset image in pixels.\r\n * @param {integer} height - The height of the tileset image in pixels.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera the layer is being rendered with.\r\n * @param {integer} tilesetIndex - The tileset index.\r\n *\r\n * @return {integer} The new vOffset value.\r\n */\r\n batchTile: function (vOffset, tile, tileset, width, height, camera, tilesetIndex)\r\n {\r\n var texCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (!texCoords)\r\n {\r\n return vOffset;\r\n }\r\n\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n\r\n var halfTileWidth = tileWidth / 2;\r\n var halfTileHeight = tileHeight / 2;\r\n\r\n var u0 = texCoords.x / width;\r\n var v0 = texCoords.y / height;\r\n var u1 = (texCoords.x + tileWidth) / width;\r\n var v1 = (texCoords.y + tileHeight) / height;\r\n\r\n var matrix = this._tempMatrix;\r\n\r\n var x = -halfTileWidth;\r\n var y = -halfTileHeight;\r\n\r\n if (tile.flipX)\r\n {\r\n tileWidth *= -1;\r\n x += tileset.tileWidth;\r\n }\r\n\r\n if (tile.flipY)\r\n {\r\n tileHeight *= -1;\r\n y += tileset.tileHeight;\r\n }\r\n\r\n var xw = x + tileWidth;\r\n var yh = y + tileHeight;\r\n\r\n matrix.applyITRS(halfTileWidth + tile.pixelX, halfTileHeight + tile.pixelY, tile.rotation, 1, 1);\r\n\r\n var tint = Utils.getTintAppendFloatAlpha(0xffffff, camera.alpha * this.alpha * tile.alpha);\r\n\r\n var tx0 = matrix.getX(x, y);\r\n var ty0 = matrix.getY(x, y);\r\n\r\n var tx1 = matrix.getX(x, yh);\r\n var ty1 = matrix.getY(x, yh);\r\n\r\n var tx2 = matrix.getX(xw, yh);\r\n var ty2 = matrix.getY(xw, yh);\r\n\r\n var tx3 = matrix.getX(xw, y);\r\n var ty3 = matrix.getY(xw, y);\r\n\r\n if (camera.roundPixels)\r\n {\r\n tx0 = Math.round(tx0);\r\n ty0 = Math.round(ty0);\r\n\r\n tx1 = Math.round(tx1);\r\n ty1 = Math.round(ty1);\r\n\r\n tx2 = Math.round(tx2);\r\n ty2 = Math.round(ty2);\r\n\r\n tx3 = Math.round(tx3);\r\n ty3 = Math.round(ty3);\r\n }\r\n\r\n var vertexViewF32 = this.vertexViewF32[tilesetIndex];\r\n var vertexViewU32 = this.vertexViewU32[tilesetIndex];\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx1;\r\n vertexViewF32[++vOffset] = ty1;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx0;\r\n vertexViewF32[++vOffset] = ty0;\r\n vertexViewF32[++vOffset] = u0;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx2;\r\n vertexViewF32[++vOffset] = ty2;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v1;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n vertexViewF32[++vOffset] = tx3;\r\n vertexViewF32[++vOffset] = ty3;\r\n vertexViewF32[++vOffset] = u1;\r\n vertexViewF32[++vOffset] = v0;\r\n vertexViewF32[++vOffset] = 0;\r\n vertexViewU32[++vOffset] = tint;\r\n\r\n this.vertexCount[tilesetIndex] += 6;\r\n\r\n return vOffset;\r\n },\r\n\r\n /**\r\n * Sets the rendering (draw) order of the tiles in this layer.\r\n * \r\n * The default is 'right-down', meaning it will order the tiles starting from the top-left,\r\n * drawing to the right and then moving down to the next row.\r\n * \r\n * The draw orders are:\r\n * \r\n * 0 = right-down\r\n * 1 = left-down\r\n * 2 = right-up\r\n * 3 = left-up\r\n * \r\n * Setting the render order does not change the tiles or how they are stored in the layer,\r\n * it purely impacts the order in which they are rendered.\r\n * \r\n * You can provide either an integer (0 to 3), or the string version of the order.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setRenderOrder\r\n * @since 3.12.0\r\n *\r\n * @param {(integer|string)} renderOrder - The render (draw) order value. Either an integer between 0 and 3, or a string: 'right-down', 'left-down', 'right-up' or 'left-up'.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setRenderOrder: function (renderOrder)\r\n {\r\n var orders = [ 'right-down', 'left-down', 'right-up', 'left-up' ];\r\n\r\n if (typeof renderOrder === 'string')\r\n {\r\n renderOrder = orders.indexOf(renderOrder);\r\n }\r\n\r\n if (renderOrder >= 0 && renderOrder < 4)\r\n {\r\n this._renderOrder = renderOrder;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting\r\n * faces are used internally for optimizing collisions against tiles. This method is mostly used\r\n * internally to optimize recalculating faces when only one tile has been changed.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The x coordinate.\r\n * @param {integer} tileY - The y coordinate.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesAt: function (tileX, tileY)\r\n {\r\n TilemapComponents.CalculateFacesAt(tileX, tileY, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Calculates interesting faces within the rectangular area specified (in tile coordinates) of the\r\n * layer. Interesting faces are used internally for optimizing collisions against tiles. This method\r\n * is mostly used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#calculateFacesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The top most tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n calculateFacesWithin: function (tileX, tileY, width, height)\r\n {\r\n TilemapComponents.CalculateFacesWithin(tileX, tileY, width, height, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Creates a Sprite for every object matching the given tile indexes in the layer. You can\r\n * optionally specify if each tile will be replaced with a new tile after the Sprite has been\r\n * created. This is useful if you want to lay down special tiles in a level that are converted to\r\n * Sprites, but want to replace the tile itself with a floor tile or similar once converted.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#createFromTiles\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - The tile index, or array of indexes, to create Sprites from.\r\n * @param {(integer|array)} replacements - The tile index, or array of indexes, to change a converted\r\n * tile to. Set to `null` to leave the tiles unchanged. If an array is given, it is assumed to be a\r\n * one-to-one mapping with the indexes array.\r\n * @param {Phaser.Types.GameObjects.Sprite.SpriteConfig} spriteConfig - The config object to pass into the Sprite creator (i.e.\r\n * scene.make.sprite).\r\n * @param {Phaser.Scene} [scene=scene the map is within] - The Scene to create the Sprites within.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when determining the world XY\r\n *\r\n * @return {Phaser.GameObjects.Sprite[]} An array of the Sprites that were created.\r\n */\r\n createFromTiles: function (indexes, replacements, spriteConfig, scene, camera)\r\n {\r\n return TilemapComponents.CreateFromTiles(indexes, replacements, spriteConfig, scene, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Returns the tiles in the given layer that are within the cameras viewport.\r\n * This is used internally.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#cull\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to run the cull check against.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n cull: function (camera)\r\n {\r\n return this.cullCallback(this.layer, camera, this.culledTiles);\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * You can control if the Cameras should cull tiles before rendering them or not.\r\n * By default the camera will try to cull the tiles in this layer, to avoid over-drawing to the renderer.\r\n *\r\n * However, there are some instances when you may wish to disable this.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setSkipCull\r\n * @since 3.12.0\r\n *\r\n * @param {boolean} [value=true] - Set to `true` to stop culling tiles. Set to `false` to enable culling again.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setSkipCull: function (value)\r\n {\r\n if (value === undefined) { value = true; }\r\n\r\n this.skipCull = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Canvas only.\r\n * \r\n * When a Camera culls the tiles in this layer it does so using its view into the world, building up a\r\n * rectangle inside which the tiles must exist or they will be culled. Sometimes you may need to expand the size\r\n * of this 'cull rectangle', especially if you plan on rotating the Camera viewing the layer. Do so\r\n * by providing the padding values. The values given are in tiles, not pixels. So if the tile width was 32px\r\n * and you set `paddingX` to be 4, it would add 32px x 4 to the cull rectangle (adjusted for scale)\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCullPadding\r\n * @since 3.12.0\r\n *\r\n * @param {integer} [paddingX=1] - The amount of extra horizontal tiles to add to the cull check padding.\r\n * @param {integer} [paddingY=1] - The amount of extra vertical tiles to add to the cull check padding.\r\n *\r\n * @return {this} This Tilemap Layer object.\r\n */\r\n setCullPadding: function (paddingX, paddingY)\r\n {\r\n if (paddingX === undefined) { paddingX = 1; }\r\n if (paddingY === undefined) { paddingY = 1; }\r\n\r\n this.cullPaddingX = paddingX;\r\n this.cullPaddingY = paddingY;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Searches the entire map layer for the first tile matching the given index, then returns that Tile\r\n * object. If no match is found, it returns null. The search starts from the top-left tile and\r\n * continues horizontally until it hits the end of the row, then it drops down to the next column.\r\n * If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to\r\n * the top-left.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findByIndex\r\n * @since 3.0.0\r\n *\r\n * @param {integer} index - The tile index value to search for.\r\n * @param {integer} [skip=0] - The number of times to skip a matching tile before returning.\r\n * @param {boolean} [reverse=false] - If true it will scan the layer in reverse, starting at the\r\n * bottom-right. Otherwise it scans from the top-left.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} A Tile object.\r\n */\r\n findByIndex: function (findIndex, skip, reverse)\r\n {\r\n return TilemapComponents.FindByIndex(findIndex, skip, reverse, this.layer);\r\n },\r\n\r\n /**\r\n * Find the first tile in the given rectangular area (in tile coordinates) of the layer that\r\n * satisfies the provided testing function. I.e. finds the first tile for which `callback` returns\r\n * true. Similar to Array.prototype.find in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#findTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The left most tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {?Phaser.Tilemaps.Tile}\r\n */\r\n findTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FindTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * filter callback function. Any tiles that pass the filter test (i.e. where the callback returns\r\n * true) will returned as a new array. Similar to Array.prototype.Filter in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#filterTiles\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter. The callback should return true for tiles that pass the\r\n * filter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n filterTiles: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.FilterTiles(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * For each tile in the given rectangular area (in tile coordinates) of the layer, run the given\r\n * callback. Similar to Array.prototype.forEach in vanilla JS.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#forEachTile\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The callback. Each tile in the given area will be passed to this\r\n * callback as the first and only parameter.\r\n * @param {object} [context] - The context under which the callback should be run.\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n forEachTile: function (callback, context, tileX, tileY, width, height, filteringOptions)\r\n {\r\n TilemapComponents.ForEachTile(callback, context, tileX, tileY, width, height, filteringOptions, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets a tile at the given tile coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from (given in tile units, not pixels).\r\n * @param {integer} tileY - Y position to get the tile from (given in tile units, not pixels).\r\n * @param {boolean} [nonNull=false] - If true getTile won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates were invalid.\r\n */\r\n getTileAt: function (tileX, tileY, nonNull)\r\n {\r\n return TilemapComponents.GetTileAt(tileX, tileY, nonNull, this.layer);\r\n },\r\n\r\n /**\r\n * Gets a tile at the given world coordinates from the given layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - X position to get the tile from (given in pixels)\r\n * @param {number} worldY - Y position to get the tile from (given in pixels)\r\n * @param {boolean} [nonNull=false] - If true, function won't return null for empty tiles, but a Tile\r\n * object with an index of -1.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile} The tile at the given coordinates or null if no tile was found or the coordinates\r\n * were invalid.\r\n */\r\n getTileAtWorldXY: function (worldX, worldY, nonNull, camera)\r\n {\r\n return TilemapComponents.GetTileAtWorldXY(worldX, worldY, nonNull, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in tile coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithin\r\n * @since 3.0.0\r\n *\r\n * @param {integer} [tileX=0] - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [tileY=0] - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} [width=max width based on tileX] - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} [height=max height based on tileY] - How many tiles tall from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithin: function (tileX, tileY, width, height, filteringOptions)\r\n {\r\n return TilemapComponents.GetTilesWithin(tileX, tileY, width, height, filteringOptions, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles in the given rectangular area (in world coordinates) of the layer.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The leftmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} worldY - The topmost tile index (in tile coordinates) to use as the origin of the area to filter.\r\n * @param {number} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {number} height - How many tiles high from the `tileY` index the area will be.\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when factoring in which tiles to return.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinWorldXY: function (worldX, worldY, width, height, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinWorldXY(worldX, worldY, width, height, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Gets the tiles that overlap with the given shape in the given layer. The shape must be a Circle,\r\n * Line, Rectangle or Triangle. The shape should be in world coordinates.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#getTilesWithinShape\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Geom.Circle|Phaser.Geom.Line|Phaser.Geom.Rectangle|Phaser.Geom.Triangle)} shape - A shape in world (pixel) coordinates\r\n * @param {Phaser.Types.Tilemaps.FilteringOptions} [filteringOptions] - Optional filters to apply when getting the tiles.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Tilemaps.Tile[]} An array of Tile objects.\r\n */\r\n getTilesWithinShape: function (shape, filteringOptions, camera)\r\n {\r\n return TilemapComponents.GetTilesWithinShape(shape, filteringOptions, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAt\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - X position to get the tile from in tile coordinates.\r\n * @param {integer} tileY - Y position to get the tile from in tile coordinates.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAt: function (tileX, tileY)\r\n {\r\n return TilemapComponents.HasTileAt(tileX, tileY, this.layer);\r\n },\r\n\r\n /**\r\n * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns\r\n * false if there is no tile or if the tile at that location has an index of -1.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#hasTileAtWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate of the world position.\r\n * @param {number} worldY - The Y coordinate of the world position.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {boolean}\r\n */\r\n hasTileAtWorldXY: function (worldX, worldY, camera)\r\n {\r\n return TilemapComponents.HasTileAtWorldXY(worldX, worldY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Draws a debug representation of the layer to the given Graphics. This is helpful when you want to\r\n * get a quick idea of which of your tiles are colliding and which have interesting faces. The tiles\r\n * are drawn starting at (0, 0) in the Graphics, allowing you to place the debug representation\r\n * wherever you want on the screen.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderDebug\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon.\r\n * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n renderDebug: function (graphics, styleConfig)\r\n {\r\n TilemapComponents.RenderDebug(graphics, styleConfig, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the given tile or tiles within a layer by index. You can pass in either a\r\n * single numeric index or an array of indexes: [2, 3, 15, 20]. The `collides` parameter controls if\r\n * collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollision\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollision: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollision(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on a range of tiles in a layer whose index is between the specified `start` and\r\n * `stop` (inclusive). Calling this with a start value of 10 and a stop value of 14 would set\r\n * collision for tiles 10, 11, 12, 13 and 14. The `collides` parameter controls if collision will be\r\n * enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionBetween\r\n * @since 3.0.0\r\n *\r\n * @param {integer} start - The first index of the tile to be set for collision.\r\n * @param {integer} stop - The last index of the tile to be set for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionBetween: function (start, stop, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionBetween(start, stop, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property\r\n * that matches the given properties object, its collision flag will be set. The `collides`\r\n * parameter controls if collision will be enabled (true) or disabled (false). Passing in\r\n * `{ collides: true }` would update the collision flag on any tiles with a \"collides\" property that\r\n * has a value of true. Any tile that doesn't have \"collides\" set to true will be ignored. You can\r\n * also use an array of values, e.g. `{ types: [\"stone\", \"lava\", \"sand\" ] }`. If a tile has a\r\n * \"types\" property that matches any of those values, its collision flag will be updated.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByProperty\r\n * @since 3.0.0\r\n *\r\n * @param {object} properties - An object with tile properties and corresponding values that should\r\n * be checked.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByProperty: function (properties, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByProperty(properties, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on all tiles in the given layer, except for tiles that have an index specified in\r\n * the given array. The `collides` parameter controls if collision will be enabled (true) or\r\n * disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionByExclusion\r\n * @since 3.0.0\r\n *\r\n * @param {integer[]} indexes - An array of the tile indexes to not be counted for collision.\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionByExclusion: function (indexes, collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionByExclusion(indexes, collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a global collision callback for the given tile index within the layer. This will affect all\r\n * tiles on this layer that have the same index. If a callback is already set for the tile index it\r\n * will be replaced. Set the callback to null to remove it. If you want to set a callback for a tile\r\n * at a specific location on the map then see setTileLocationCallback.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileIndexCallback\r\n * @since 3.0.0\r\n *\r\n * @param {(integer|array)} indexes - Either a single tile index, or an array of tile indexes to have a\r\n * collision callback set for.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} callbackContext - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileIndexCallback: function (indexes, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileIndexCallback(indexes, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets collision on the tiles within a layer by checking each tiles collision group data\r\n * (typically defined in Tiled within the tileset collision editor). If any objects are found within\r\n * a tiles collision group, the tile's colliding information will be set. The `collides` parameter\r\n * controls if collision will be enabled (true) or disabled (false).\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setCollisionFromCollisionGroup\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [collides=true] - If true it will enable collision. If false it will clear\r\n * collision.\r\n * @param {boolean} [recalculateFaces=true] - Whether or not to recalculate the tile faces after the\r\n * update.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setCollisionFromCollisionGroup: function (collides, recalculateFaces)\r\n {\r\n TilemapComponents.SetCollisionFromCollisionGroup(collides, recalculateFaces, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a collision callback for the given rectangular area (in tile coordinates) within the layer.\r\n * If a callback is already set for the tile index it will be replaced. Set the callback to null to\r\n * remove it.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#setTileLocationCallback\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The leftmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} tileY - The topmost tile index (in tile coordinates) to use as the origin of the area.\r\n * @param {integer} width - How many tiles wide from the `tileX` index the area will be.\r\n * @param {integer} height - How many tiles tall from the `tileY` index the area will be.\r\n * @param {function} callback - The callback that will be invoked when the tile is collided with.\r\n * @param {object} [callbackContext] - The context under which the callback is called.\r\n *\r\n * @return {Phaser.Tilemaps.StaticTilemapLayer} This Tilemap Layer object.\r\n */\r\n setTileLocationCallback: function (tileX, tileY, width, height, callback, callbackContext)\r\n {\r\n TilemapComponents.SetTileLocationCallback(tileX, tileY, width, height, callback, callbackContext, this.layer);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Converts from tile X coordinates (tile units) to world X coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldX\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldX: function (tileX, camera)\r\n {\r\n return TilemapComponents.TileToWorldX(tileX, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile Y coordinates (tile units) to world Y coordinates (pixels), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {number}\r\n */\r\n tileToWorldY: function (tileY, camera)\r\n {\r\n return TilemapComponents.TileToWorldY(tileY, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from tile XY coordinates (tile units) to world XY coordinates (pixels), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#tileToWorldXY\r\n * @since 3.0.0\r\n *\r\n * @param {integer} tileX - The X coordinate, in tile coordinates.\r\n * @param {integer} tileY - The Y coordinate, in tile coordinates.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the world values from the tile index.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n tileToWorldXY: function (tileX, tileY, point, camera)\r\n {\r\n return TilemapComponents.TileToWorldXY(tileX, tileY, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world X coordinates (pixels) to tile X coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileX\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.]\r\n *\r\n * @return {number}\r\n */\r\n worldToTileX: function (worldX, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileX(worldX, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world Y coordinates (pixels) to tile Y coordinates (tile units), factoring in the\r\n * layers position, scale and scroll.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {number}\r\n */\r\n worldToTileY: function (worldY, snapToFloor, camera)\r\n {\r\n return TilemapComponents.WorldToTileY(worldY, snapToFloor, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Converts from world XY coordinates (pixels) to tile XY coordinates (tile units), factoring in the\r\n * layers position, scale and scroll. This will return a new Vector2 object or update the given\r\n * `point` object.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#worldToTileXY\r\n * @since 3.0.0\r\n *\r\n * @param {number} worldX - The X coordinate, in world pixels.\r\n * @param {number} worldY - The Y coordinate, in world pixels.\r\n * @param {boolean} [snapToFloor=true] - Whether or not to round the tile coordinate down to the\r\n * nearest integer.\r\n * @param {Phaser.Math.Vector2} [point] - A Vector2 to store the coordinates in. If not given, a new Vector2 is created.\r\n * @param {Phaser.Cameras.Scene2D.Camera} [camera=main camera] - The Camera to use when calculating the tile index from the world values.\r\n *\r\n * @return {Phaser.Math.Vector2}\r\n */\r\n worldToTileXY: function (worldX, worldY, snapToFloor, point, camera)\r\n {\r\n return TilemapComponents.WorldToTileXY(worldX, worldY, snapToFloor, point, camera, this.layer);\r\n },\r\n\r\n /**\r\n * Destroys this StaticTilemapLayer and removes its link to the associated LayerData.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#destroy\r\n * @since 3.0.0\r\n * \r\n * @param {boolean} [removeFromTilemap=true] - Remove this layer from the parent Tilemap?\r\n */\r\n destroy: function (removeFromTilemap)\r\n {\r\n if (removeFromTilemap === undefined) { removeFromTilemap = true; }\r\n\r\n if (!this.tilemap)\r\n {\r\n // Abort, we've already been destroyed\r\n return;\r\n }\r\n\r\n // Uninstall this layer only if it is still installed on the LayerData object\r\n if (this.layer.tilemapLayer === this)\r\n {\r\n this.layer.tilemapLayer = undefined;\r\n }\r\n\r\n if (removeFromTilemap)\r\n {\r\n this.tilemap.removeLayer(this);\r\n }\r\n\r\n this.tilemap = undefined;\r\n this.layer = undefined;\r\n this.culledTiles.length = 0;\r\n this.cullCallback = null;\r\n\r\n for (var i = 0; i < this.tileset.length; i++)\r\n {\r\n this.dirty[i] = true;\r\n this.vertexCount[i] = 0;\r\n this.vertexBuffer[i] = null;\r\n this.bufferData[i] = null;\r\n this.vertexViewF32[i] = null;\r\n this.vertexViewU32[i] = null;\r\n }\r\n\r\n this.gidMap = [];\r\n this.tileset = [];\r\n\r\n GameObject.prototype.destroy.call(this);\r\n }\r\n\r\n});\r\n\r\nmodule.exports = StaticTilemapLayer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the Canvas Renderer to the given Camera.\r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderCanvas\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n * @param {Phaser.GameObjects.Components.TransformMatrix} parentMatrix - This transform matrix is defined if the game object is nested\r\n */\r\nvar StaticTilemapLayerCanvasRenderer = function (renderer, src, interpolationPercentage, camera, parentMatrix)\r\n{\r\n src.cull(camera);\r\n\r\n var renderTiles = src.culledTiles;\r\n var tileCount = renderTiles.length;\r\n\r\n if (tileCount === 0)\r\n {\r\n return;\r\n }\r\n\r\n var camMatrix = renderer._tempMatrix1;\r\n var layerMatrix = renderer._tempMatrix2;\r\n var calcMatrix = renderer._tempMatrix3;\r\n\r\n layerMatrix.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY);\r\n\r\n camMatrix.copyFrom(camera.matrix);\r\n\r\n var ctx = renderer.currentContext;\r\n var gidMap = src.gidMap;\r\n\r\n ctx.save();\r\n\r\n if (parentMatrix)\r\n {\r\n // Multiply the camera by the parent matrix\r\n camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY);\r\n\r\n // Undo the camera scroll\r\n layerMatrix.e = src.x;\r\n layerMatrix.f = src.y;\r\n\r\n camMatrix.multiply(layerMatrix, calcMatrix);\r\n\r\n calcMatrix.copyToContext(ctx);\r\n }\r\n else\r\n {\r\n // Undo the camera scroll\r\n layerMatrix.e -= camera.scrollX * src.scrollFactorX;\r\n layerMatrix.f -= camera.scrollY * src.scrollFactorY;\r\n\r\n layerMatrix.copyToContext(ctx);\r\n }\r\n\r\n var alpha = camera.alpha * src.alpha;\r\n\r\n ctx.globalAlpha = camera.alpha * src.alpha;\r\n\r\n for (var i = 0; i < tileCount; i++)\r\n {\r\n var tile = renderTiles[i];\r\n\r\n var tileset = gidMap[tile.index];\r\n\r\n if (!tileset)\r\n {\r\n continue;\r\n }\r\n\r\n var image = tileset.image.getSourceImage();\r\n var tileTexCoords = tileset.getTileTextureCoordinates(tile.index);\r\n\r\n if (tileTexCoords)\r\n {\r\n var tileWidth = tileset.tileWidth;\r\n var tileHeight = tileset.tileHeight;\r\n var halfWidth = tileWidth / 2;\r\n var halfHeight = tileHeight / 2;\r\n \r\n ctx.save();\r\n\r\n ctx.translate(tile.pixelX + halfWidth, tile.pixelY + halfHeight);\r\n\r\n if (tile.rotation !== 0)\r\n {\r\n ctx.rotate(tile.rotation);\r\n }\r\n \r\n if (tile.flipX || tile.flipY)\r\n {\r\n ctx.scale((tile.flipX) ? -1 : 1, (tile.flipY) ? -1 : 1);\r\n }\r\n\r\n ctx.globalAlpha = alpha * tile.alpha;\r\n \r\n ctx.drawImage(\r\n image,\r\n tileTexCoords.x, tileTexCoords.y,\r\n tileWidth, tileHeight,\r\n -halfWidth, -halfHeight,\r\n tileWidth, tileHeight\r\n );\r\n \r\n ctx.restore();\r\n }\r\n }\r\n\r\n ctx.restore();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerCanvasRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js?")},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar renderWebGL = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\nvar renderCanvas = __webpack_require__(/*! ../../utils/NOOP */ "./node_modules/phaser/src/utils/NOOP.js");\r\n\r\nif (typeof WEBGL_RENDERER)\r\n{\r\n renderWebGL = __webpack_require__(/*! ./StaticTilemapLayerWebGLRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js");\r\n}\r\n\r\nif (typeof CANVAS_RENDERER)\r\n{\r\n renderCanvas = __webpack_require__(/*! ./StaticTilemapLayerCanvasRenderer */ "./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js");\r\n}\r\n\r\nmodule.exports = {\r\n\r\n renderWebGL: renderWebGL,\r\n renderCanvas: renderCanvas\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js?')},"./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Renders this Game Object with the WebGL Renderer to the given Camera.\r\n * \r\n * The object will not render if any of its renderFlags are set or it is being actively filtered out by the Camera.\r\n * This method should not be called directly. It is a utility function of the Render module.\r\n * \r\n * A Static Tilemap Layer renders immediately and does not use any batching.\r\n *\r\n * @method Phaser.Tilemaps.StaticTilemapLayer#renderWebGL\r\n * @since 3.0.0\r\n * @private\r\n *\r\n * @param {Phaser.Renderer.WebGL.WebGLRenderer} renderer - A reference to the current active WebGL renderer.\r\n * @param {Phaser.Tilemaps.StaticTilemapLayer} src - The Game Object being rendered in this call.\r\n * @param {number} interpolationPercentage - Reserved for future use and custom pipelines.\r\n * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object.\r\n */\r\nvar StaticTilemapLayerWebGLRenderer = function (renderer, src, interpolationPercentage, camera)\r\n{\r\n var tilesets = src.tileset;\r\n\r\n var pipeline = src.pipeline;\r\n var pipelineVertexBuffer = pipeline.vertexBuffer;\r\n\r\n renderer.setPipeline(pipeline);\r\n\r\n pipeline.modelIdentity();\r\n pipeline.modelTranslate(src.x - (camera.scrollX * src.scrollFactorX), src.y - (camera.scrollY * src.scrollFactorY), 0);\r\n pipeline.modelScale(src.scaleX, src.scaleY, 1);\r\n pipeline.viewLoad2D(camera.matrix.matrix);\r\n\r\n for (var i = 0; i < tilesets.length; i++)\r\n {\r\n src.upload(camera, i);\r\n\r\n if (src.vertexCount[i] > 0)\r\n {\r\n if (renderer.currentPipeline && renderer.currentPipeline.vertexCount > 0)\r\n {\r\n renderer.flush();\r\n }\r\n \r\n pipeline.vertexBuffer = src.vertexBuffer[i];\r\n \r\n renderer.setPipeline(pipeline);\r\n \r\n renderer.setTexture2D(tilesets[i].glTexture, 0);\r\n \r\n renderer.gl.drawArrays(pipeline.topology, 0, src.vertexCount[i]);\r\n }\r\n }\r\n\r\n // Restore the pipeline\r\n pipeline.vertexBuffer = pipelineVertexBuffer;\r\n\r\n pipeline.viewIdentity();\r\n pipeline.modelIdentity();\r\n};\r\n\r\nmodule.exports = StaticTilemapLayerWebGLRenderer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js?")},"./node_modules/phaser/src/time/Clock.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar TimerEvent = __webpack_require__(/*! ./TimerEvent */ \"./node_modules/phaser/src/time/TimerEvent.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Clock is a Scene plugin which creates and updates Timer Events for its Scene.\r\n *\r\n * @class Clock\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Clock.\r\n */\r\nvar Clock = new Class({\r\n\r\n initialize:\r\n\r\n function Clock (scene)\r\n {\r\n /**\r\n * The Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Scene Systems object of the Scene which owns this Clock.\r\n *\r\n * @name Phaser.Time.Clock#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The current time of the Clock, in milliseconds.\r\n *\r\n * If accessed externally, this is equivalent to the `time` parameter normally passed to a Scene's `update` method.\r\n *\r\n * @name Phaser.Time.Clock#now\r\n * @type {number}\r\n * @since 3.0.0\r\n */\r\n this.now = 0;\r\n\r\n // Scale the delta time coming into the Clock by this factor\r\n // which then influences anything using this Clock for calculations, like TimerEvents\r\n\r\n /**\r\n * The scale of the Clock's time delta.\r\n * \r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Clock and anything which uses it, such as its Timer Events. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing the Clock.\r\n *\r\n * @name Phaser.Time.Clock#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Whether the Clock is paused (`true`) or active (`false`).\r\n *\r\n * When paused, the Clock will not update any of its Timer Events, thus freezing time.\r\n *\r\n * @name Phaser.Time.Clock#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * An array of all Timer Events whose delays haven't expired - these are actively updating Timer Events.\r\n *\r\n * @name Phaser.Time.Clock#_active\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be added to the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingInsertion\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingInsertion = [];\r\n\r\n /**\r\n * An array of all Timer Events which will be removed from the Clock at the start of the frame.\r\n *\r\n * @name Phaser.Time.Clock#_pendingRemoval\r\n * @type {Phaser.Time.TimerEvent[]}\r\n * @private\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this._pendingRemoval = [];\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n // Sync with the TimeStep\r\n this.now = this.systems.game.loop.time;\r\n \r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Time.Clock#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#addEvent\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n addEvent: function (config)\r\n {\r\n var event = new TimerEvent(config);\r\n\r\n this._pendingInsertion.push(event);\r\n\r\n return event;\r\n },\r\n\r\n /**\r\n * Creates a Timer Event and adds it to the Clock at the start of the frame.\r\n *\r\n * This is a shortcut for {@link #addEvent} which can be shorter and is compatible with the syntax of the GreenSock Animation Platform (GSAP).\r\n *\r\n * @method Phaser.Time.Clock#delayedCall\r\n * @since 3.0.0\r\n *\r\n * @param {number} delay - The delay of the function call, in milliseconds.\r\n * @param {function} callback - The function to call after the delay expires.\r\n * @param {Array.<*>} args - The arguments to call the function with.\r\n * @param {*} callbackScope - The scope (`this` object) to call the function with.\r\n *\r\n * @return {Phaser.Time.TimerEvent} The Timer Event which was created.\r\n */\r\n delayedCall: function (delay, callback, args, callbackScope)\r\n {\r\n return this.addEvent({ delay: delay, callback: callback, args: args, callbackScope: callbackScope });\r\n },\r\n\r\n /**\r\n * Clears and recreates the array of pending Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#clearPendingEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n clearPendingEvents: function ()\r\n {\r\n this._pendingInsertion = [];\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Schedules all active Timer Events for removal at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#removeAllEvents\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Time.Clock} This Clock object.\r\n */\r\n removeAllEvents: function ()\r\n {\r\n this._pendingRemoval = this._pendingRemoval.concat(this._active);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Updates the arrays of active and pending Timer Events. Called at the start of the frame.\r\n *\r\n * @method Phaser.Time.Clock#preUpdate\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n preUpdate: function ()\r\n {\r\n var toRemove = this._pendingRemoval.length;\r\n var toInsert = this._pendingInsertion.length;\r\n\r\n if (toRemove === 0 && toInsert === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var i;\r\n var event;\r\n\r\n // Delete old events\r\n for (i = 0; i < toRemove; i++)\r\n {\r\n event = this._pendingRemoval[i];\r\n\r\n var index = this._active.indexOf(event);\r\n\r\n if (index > -1)\r\n {\r\n this._active.splice(index, 1);\r\n }\r\n\r\n // Pool them?\r\n event.destroy();\r\n }\r\n\r\n for (i = 0; i < toInsert; i++)\r\n {\r\n event = this._pendingInsertion[i];\r\n\r\n this._active.push(event);\r\n }\r\n\r\n // Clear the lists\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n },\r\n\r\n /**\r\n * Updates the Clock's internal time and all of its Timer Events.\r\n *\r\n * @method Phaser.Time.Clock#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (time, delta)\r\n {\r\n this.now = time;\r\n\r\n if (this.paused)\r\n {\r\n return;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < this._active.length; i++)\r\n {\r\n var event = this._active[i];\r\n\r\n if (event.paused)\r\n {\r\n continue;\r\n }\r\n\r\n // Use delta time to increase elapsed.\r\n // Avoids needing to adjust for pause / resume.\r\n // Automatically smoothed by TimeStep class.\r\n // In testing accurate to +- 1ms!\r\n event.elapsed += delta * event.timeScale;\r\n\r\n if (event.elapsed >= event.delay)\r\n {\r\n var remainder = event.elapsed - event.delay;\r\n\r\n // Limit it, in case it's checked in the callback\r\n event.elapsed = event.delay;\r\n\r\n // Process the event\r\n if (!event.hasDispatched && event.callback)\r\n {\r\n event.hasDispatched = true;\r\n event.callback.apply(event.callbackScope, event.args);\r\n }\r\n\r\n if (event.repeatCount > 0)\r\n {\r\n event.repeatCount--;\r\n\r\n event.elapsed = remainder;\r\n event.hasDispatched = false;\r\n }\r\n else\r\n {\r\n this._pendingRemoval.push(event);\r\n }\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Time.Clock#shutdown\r\n * @private\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n var i;\r\n\r\n for (i = 0; i < this._pendingInsertion.length; i++)\r\n {\r\n this._pendingInsertion[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._active.length; i++)\r\n {\r\n this._active[i].destroy();\r\n }\r\n\r\n for (i = 0; i < this._pendingRemoval.length; i++)\r\n {\r\n this._pendingRemoval[i].destroy();\r\n }\r\n\r\n this._active.length = 0;\r\n this._pendingRemoval.length = 0;\r\n this._pendingInsertion.length = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Time.Clock#destroy\r\n * @private\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('Clock', Clock, 'time');\r\n\r\nmodule.exports = Clock;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/Clock.js?")},"./node_modules/phaser/src/time/TimerEvent.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar GetFastValue = __webpack_require__(/*! ../utils/object/GetFastValue */ \"./node_modules/phaser/src/utils/object/GetFastValue.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timer Event represents a delayed function call. It's managed by a Scene's {@link Clock} and will call its function after a set amount of time has passed. The Timer Event can optionally repeat - i.e. call its function multiple times before finishing, or loop indefinitely.\r\n *\r\n * Because it's managed by a Clock, a Timer Event is based on game time, will be affected by its Clock's time scale, and will pause if its Clock pauses.\r\n *\r\n * @class TimerEvent\r\n * @memberof Phaser.Time\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The configuration for the Timer Event, including its delay and callback.\r\n */\r\nvar TimerEvent = new Class({\r\n\r\n initialize:\r\n\r\n function TimerEvent (config)\r\n {\r\n /**\r\n * The delay in ms at which this TimerEvent fires.\r\n *\r\n * @name Phaser.Time.TimerEvent#delay\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.delay = 0;\r\n\r\n /**\r\n * The total number of times this TimerEvent will repeat before finishing.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeat\r\n * @type {number}\r\n * @default 0\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.repeat = 0;\r\n\r\n /**\r\n * If repeating this contains the current repeat count.\r\n *\r\n * @name Phaser.Time.TimerEvent#repeatCount\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.repeatCount = 0;\r\n\r\n /**\r\n * True if this TimerEvent loops, otherwise false.\r\n *\r\n * @name Phaser.Time.TimerEvent#loop\r\n * @type {boolean}\r\n * @default false\r\n * @readonly\r\n * @since 3.0.0\r\n */\r\n this.loop = false;\r\n\r\n /**\r\n * The callback that will be called when the TimerEvent occurs.\r\n *\r\n * @name Phaser.Time.TimerEvent#callback\r\n * @type {function}\r\n * @since 3.0.0\r\n */\r\n this.callback;\r\n\r\n /**\r\n * The scope in which the callback will be called.\r\n *\r\n * @name Phaser.Time.TimerEvent#callbackScope\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n\r\n /**\r\n * Additional arguments to be passed to the callback.\r\n *\r\n * @name Phaser.Time.TimerEvent#args\r\n * @type {array}\r\n * @since 3.0.0\r\n */\r\n this.args;\r\n\r\n /**\r\n * Scale the time causing this TimerEvent to update.\r\n *\r\n * @name Phaser.Time.TimerEvent#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Start this many MS into the elapsed (useful if you want a long duration with repeat, but for the first loop to fire quickly)\r\n *\r\n * @name Phaser.Time.TimerEvent#startAt\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.startAt = 0;\r\n\r\n /**\r\n * The time in milliseconds which has elapsed since the Timer Event's creation.\r\n *\r\n * This value is local for the Timer Event and is relative to its Clock. As such, it's influenced by the Clock's time scale and paused state, the Timer Event's initial {@link #startAt} property, and the Timer Event's {@link #timeScale} and {@link #paused} state.\r\n *\r\n * @name Phaser.Time.TimerEvent#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Whether or not this timer is paused.\r\n *\r\n * @name Phaser.Time.TimerEvent#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Whether the Timer Event's function has been called.\r\n *\r\n * When the Timer Event fires, this property will be set to `true` before the callback function is invoked and will be reset immediately afterward if the Timer Event should repeat. The value of this property does not directly influence whether the Timer Event will be removed from its Clock, but can prevent it from firing.\r\n *\r\n * @name Phaser.Time.TimerEvent#hasDispatched\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.hasDispatched = false;\r\n\r\n this.reset(config);\r\n },\r\n\r\n /**\r\n * Completely reinitializes the Timer Event, regardless of its current state, according to a configuration object.\r\n *\r\n * @method Phaser.Time.TimerEvent#reset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Time.TimerEventConfig} config - The new state for the Timer Event.\r\n *\r\n * @return {Phaser.Time.TimerEvent} This TimerEvent object.\r\n */\r\n reset: function (config)\r\n {\r\n this.delay = GetFastValue(config, 'delay', 0);\r\n\r\n // Can also be set to -1 for an infinite loop (same as setting loop: true)\r\n this.repeat = GetFastValue(config, 'repeat', 0);\r\n\r\n this.loop = GetFastValue(config, 'loop', false);\r\n\r\n this.callback = GetFastValue(config, 'callback', undefined);\r\n\r\n this.callbackScope = GetFastValue(config, 'callbackScope', this.callback);\r\n\r\n this.args = GetFastValue(config, 'args', []);\r\n\r\n this.timeScale = GetFastValue(config, 'timeScale', 1);\r\n\r\n this.startAt = GetFastValue(config, 'startAt', 0);\r\n\r\n this.paused = GetFastValue(config, 'paused', false);\r\n\r\n this.elapsed = this.startAt;\r\n this.hasDispatched = false;\r\n this.repeatCount = (this.repeat === -1 || this.loop) ? 999999999999 : this.repeat;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the progress of the current iteration, not factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} A number between 0 and 1 representing the current progress.\r\n */\r\n getProgress: function ()\r\n {\r\n return (this.elapsed / this.delay);\r\n },\r\n\r\n /**\r\n * Gets the progress of the timer overall, factoring in repeats.\r\n *\r\n * @method Phaser.Time.TimerEvent#getOverallProgress\r\n * @since 3.0.0\r\n *\r\n * @return {number} The overall progress of the Timer Event, between 0 and 1.\r\n */\r\n getOverallProgress: function ()\r\n {\r\n if (this.repeat > 0)\r\n {\r\n var totalDuration = this.delay + (this.delay * this.repeat);\r\n var totalElapsed = this.elapsed + (this.delay * (this.repeat - this.repeatCount));\r\n\r\n return (totalElapsed / totalDuration);\r\n }\r\n else\r\n {\r\n return this.getProgress();\r\n }\r\n },\r\n\r\n /**\r\n * Returns the number of times this Timer Event will repeat before finishing.\r\n *\r\n * This should not be confused with the number of times the Timer Event will fire before finishing. A return value of 0 doesn't indicate that the Timer Event has finished running - it indicates that it will not repeat after the next time it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#getRepeatCount\r\n * @since 3.0.0\r\n *\r\n * @return {number} How many times the Timer Event will repeat.\r\n */\r\n getRepeatCount: function ()\r\n {\r\n return this.repeatCount;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsed\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in milliseconds.\r\n */\r\n getElapsed: function ()\r\n {\r\n return this.elapsed;\r\n },\r\n\r\n /**\r\n * Returns the local elapsed time for the current iteration of the Timer Event in seconds.\r\n *\r\n * @method Phaser.Time.TimerEvent#getElapsedSeconds\r\n * @since 3.0.0\r\n *\r\n * @return {number} The local elapsed time in seconds.\r\n */\r\n getElapsedSeconds: function ()\r\n {\r\n return this.elapsed * 0.001;\r\n },\r\n\r\n /**\r\n * Forces the Timer Event to immediately expire, thus scheduling its removal in the next frame.\r\n *\r\n * @method Phaser.Time.TimerEvent#remove\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [dispatchCallback=false] - If `true`, the function of the Timer Event will be called before its removal.\r\n */\r\n remove: function (dispatchCallback)\r\n {\r\n if (dispatchCallback === undefined) { dispatchCallback = false; }\r\n\r\n this.elapsed = this.delay;\r\n\r\n this.hasDispatched = !dispatchCallback;\r\n\r\n this.repeatCount = 0;\r\n },\r\n\r\n /**\r\n * Destroys all object references in the Timer Event, i.e. its callback, scope, and arguments.\r\n *\r\n * Normally, this method is only called by the Clock when it shuts down. As such, it doesn't stop the Timer Event. If called manually, the Timer Event will still be updated by the Clock, but it won't do anything when it fires.\r\n *\r\n * @method Phaser.Time.TimerEvent#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.callback = undefined;\r\n this.callbackScope = undefined;\r\n this.args = [];\r\n }\r\n\r\n});\r\n\r\nmodule.exports = TimerEvent;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/TimerEvent.js?")},"./node_modules/phaser/src/time/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Time\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clock: __webpack_require__(/*! ./Clock */ "./node_modules/phaser/src/time/Clock.js"),\r\n TimerEvent: __webpack_require__(/*! ./TimerEvent */ "./node_modules/phaser/src/time/TimerEvent.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/time/index.js?')},"./node_modules/phaser/src/tweens/Timeline.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ./events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Timeline combines multiple Tweens into one. Its overall behavior is otherwise similar to a single Tween.\r\n *\r\n * The Timeline updates all of its Tweens simultaneously. Its methods allow you to easily build a sequence\r\n * of Tweens (each one starting after the previous one) or run multiple Tweens at once during given parts of the Timeline.\r\n *\r\n * @class Timeline\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager which owns this Timeline.\r\n */\r\nvar Timeline = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Timeline (manager)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * The Tween Manager which owns this Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#manager\r\n * @type {Phaser.Tweens.TweenManager}\r\n * @since 3.0.0\r\n */\r\n this.manager = manager;\r\n\r\n /**\r\n * A constant value which allows this Timeline to be easily identified as one.\r\n *\r\n * @name Phaser.Tweens.Timeline#isTimeline\r\n * @type {boolean}\r\n * @default true\r\n * @since 3.0.0\r\n */\r\n this.isTimeline = true;\r\n\r\n /**\r\n * An array of Tween objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Timeline#data\r\n * @type {array}\r\n * @default []\r\n * @since 3.0.0\r\n */\r\n this.data = [];\r\n\r\n /**\r\n * The cached size of the data array.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalData\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalData = 0;\r\n\r\n /**\r\n * If true then duration, delay, etc values are all frame totals, rather than ms.\r\n *\r\n * @name Phaser.Tweens.Timeline#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Timeline. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the Timeline, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Timeline#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this Timeline? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL Tweens again (use Tween.repeat to loop a single tween)\r\n *\r\n * @name Phaser.Tweens.Timeline#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before this Timeline loops.\r\n *\r\n * @name Phaser.Tweens.Timeline#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Timeline#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = true (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Timeline#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer value, as used by `loopDelay` and `completeDelay`.\r\n *\r\n * @name Phaser.Tweens.Timeline#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * The current state of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the Timeline when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Timeline#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * Does the Timeline start off paused? (if so it needs to be started with Timeline.play)\r\n *\r\n * @name Phaser.Tweens.Timeline#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through of the Timeline.\r\n *\r\n * @name Phaser.Tweens.Timeline#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Timeline to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Timeline#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount of progress through the Timeline, _excluding loops_.\r\n *\r\n * @name Phaser.Tweens.Timeline#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for all Tweens in this Timeline to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Timeline#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Timeline, including looping.\r\n *\r\n * @name Phaser.Tweens.Timeline#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onComplete` When the Timeline finishes playback fully or `Timeline.stop` is called. Never invoked if timeline is set to repeat infinitely.\r\n * `onLoop` When a Timeline loops.\r\n * `onStart` When the Timeline starts playing.\r\n * `onUpdate` When a Timeline updates a child Tween.\r\n * `onYoyo` When a Timeline starts a yoyo.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onComplete: null,\r\n onLoop: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Timeline#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Timeline based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Timeline#dispatchTimelineEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTimelineEvent: function (event, callback)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n },\r\n\r\n /**\r\n * Sets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n * \r\n * The value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @method Phaser.Tweens.Timeline#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The time scale value to set.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Gets the value of the time scale applied to this Timeline. A value of 1 runs in real-time.\r\n * A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Timeline#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the time scale applied to this Timeline.\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Check whether or not the Timeline is playing.\r\n *\r\n * @method Phaser.Tweens.Timeline#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if this Timeline is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Creates a new Tween, based on the given Tween Config, and adds it to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#add\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Types.Tweens.TweenBuilderConfig|object)} config - The configuration object for the Tween.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n add: function (config)\r\n {\r\n return this.queue(TweenBuilder(this, config));\r\n },\r\n\r\n /**\r\n * Adds an existing Tween to this Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#queue\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be added to this Timeline.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n queue: function (tween)\r\n {\r\n if (!this.isPlaying())\r\n {\r\n tween.parent = this;\r\n tween.parentIsTimeline = true;\r\n\r\n this.data.push(tween);\r\n\r\n this.totalData = this.data.length;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks whether a Tween has an offset value.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasOffset\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {boolean} `true` if the tween has a non-null offset.\r\n */\r\n hasOffset: function (tween)\r\n {\r\n return (tween.offset !== null);\r\n },\r\n\r\n /**\r\n * Checks whether the offset value is a number or a directive that is relative to previous tweens.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetAbsolute\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the result is a number, `false` if it is a directive like \" -= 1000\".\r\n */\r\n isOffsetAbsolute: function (value)\r\n {\r\n return (typeof(value) === 'number');\r\n },\r\n\r\n /**\r\n * Checks if the offset is a relative value rather than an absolute one.\r\n * If the value is just a number, this returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#isOffsetRelative\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The offset value to be evaluated.\r\n *\r\n * @return {boolean} `true` if the value is relative, i.e \" -= 1000\". If `false`, the offset is absolute.\r\n */\r\n isOffsetRelative: function (value)\r\n {\r\n var t = typeof(value);\r\n\r\n if (t === 'string')\r\n {\r\n var op = value[0];\r\n\r\n if (op === '-' || op === '+')\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Parses the relative offset value, returning a positive or negative number.\r\n *\r\n * @method Phaser.Tweens.Timeline#getRelativeOffset\r\n * @since 3.0.0\r\n *\r\n * @param {string} value - The relative offset, in the format of '-=500', for example. The first character determines whether it will be a positive or negative number. Spacing matters here.\r\n * @param {number} base - The value to use as the offset.\r\n *\r\n * @return {number} The parsed offset value.\r\n */\r\n getRelativeOffset: function (value, base)\r\n {\r\n var op = value[0];\r\n var num = parseFloat(value.substr(2));\r\n var result = base;\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n result += num;\r\n break;\r\n\r\n case '-':\r\n result -= num;\r\n break;\r\n }\r\n\r\n // Cannot ever be < 0\r\n return Math.max(0, result);\r\n },\r\n\r\n /**\r\n * Calculates the total duration of the timeline.\r\n * \r\n * Computes all tween durations and returns the full duration of the timeline.\r\n * \r\n * The resulting number is stored in the timeline, not as a return value.\r\n *\r\n * @method Phaser.Tweens.Timeline#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var prevEnd = 0;\r\n var totalDuration = 0;\r\n var offsetDuration = 0;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.init();\r\n\r\n if (this.hasOffset(tween))\r\n {\r\n if (this.isOffsetAbsolute(tween.offset))\r\n {\r\n // An actual number, so it defines the start point from the beginning of the timeline\r\n tween.calculatedOffset = tween.offset;\r\n\r\n if (tween.offset === 0)\r\n {\r\n offsetDuration = 0;\r\n }\r\n }\r\n else if (this.isOffsetRelative(tween.offset))\r\n {\r\n // A relative offset (i.e. '-=1000', so starts at 'offset' ms relative to the PREVIOUS Tweens ending time)\r\n tween.calculatedOffset = this.getRelativeOffset(tween.offset, prevEnd);\r\n }\r\n }\r\n else\r\n {\r\n // Sequential\r\n tween.calculatedOffset = offsetDuration;\r\n }\r\n\r\n prevEnd = tween.totalDuration + tween.calculatedOffset;\r\n\r\n totalDuration += tween.totalDuration;\r\n offsetDuration += tween.totalDuration;\r\n }\r\n\r\n // Excludes loop values\r\n this.duration = totalDuration;\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n },\r\n\r\n /**\r\n * Initializes the timeline, which means all Tweens get their init() called, and the total duration will be computed.\r\n * Returns a boolean indicating whether the timeline is auto-started or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Timeline is started. `false` if it is paused.\r\n */\r\n init: function ()\r\n {\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.paused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n },\r\n\r\n /**\r\n * Resets all of the timeline's tweens back to their initial states.\r\n * The boolean parameter indicates whether tweens that are looping should reset as well, or not.\r\n *\r\n * @method Phaser.Tweens.Timeline#resetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - If `true`, resets all looping tweens to their initial values.\r\n */\r\n resetTweens: function (resetFromLoop)\r\n {\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n tween.play(resetFromLoop);\r\n }\r\n },\r\n\r\n /**\r\n * Sets a callback for the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - The internal type of callback to set.\r\n * @param {function} callback - Timeline allows multiple tweens to be linked together to create a streaming sequence.\r\n * @param {array} [params] - The parameters to pass to the callback.\r\n * @param {object} [scope] - The context scope of the callback.\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n if (Timeline.TYPES.indexOf(type) !== -1)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passed a Tween to the Tween Manager and requests it be made active.\r\n *\r\n * @method Phaser.Tweens.Timeline#makeActive\r\n * @since 3.3.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The tween object to make active.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} The Timeline's Tween Manager reference.\r\n */\r\n makeActive: function (tween)\r\n {\r\n return this.manager.makeActive(tween);\r\n },\r\n\r\n /**\r\n * Starts playing the Timeline.\r\n *\r\n * @method Phaser.Tweens.Timeline#play\r\n * @fires Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n */\r\n play: function ()\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return;\r\n }\r\n\r\n if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.manager.makeActive(this);\r\n\r\n return;\r\n }\r\n else\r\n {\r\n this.resetTweens(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_START, this.callbacks.onStart);\r\n },\r\n\r\n /**\r\n * Updates the Timeline's `state` and fires callbacks and events.\r\n *\r\n * @method Phaser.Tweens.Timeline#nextState\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n *\r\n * @see Phaser.Tweens.Timeline#update\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n // Reset the elapsed time\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n\r\n this.loopCounter--;\r\n\r\n this.resetTweens(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Returns 'true' if this Timeline has finished and should be removed from the Tween Manager.\r\n * Otherwise, returns false.\r\n *\r\n * @method Phaser.Tweens.Timeline#update\r\n * @fires Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @fires Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Timeline has finished and should be removed from the Tween Manager.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.manager.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n var stillRunning = this.totalData;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tween = this.data[i];\r\n\r\n if (tween.update(timestamp, delta))\r\n {\r\n stillRunning--;\r\n }\r\n }\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_UPDATE, this.callbacks.onUpdate);\r\n\r\n // Anything still running? If not, we're done\r\n if (stillRunning === 0)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTimelineEvent(Events.TIMELINE_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Stops the Timeline immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#stop\r\n * @since 3.0.0\r\n */\r\n stop: function ()\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n },\r\n\r\n /**\r\n * Pauses the Timeline, retaining its internal state.\r\n * \r\n * Calling this on a Timeline that is already paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#pause\r\n * @fires Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n this.emit(Events.TIMELINE_PAUSE, this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes a paused Timeline from where it was when it was paused.\r\n * \r\n * Calling this on a Timeline that isn't paused has no effect and fires no event.\r\n *\r\n * @method Phaser.Tweens.Timeline#resume\r\n * @fires Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Timeline object.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n\r\n this.emit(Events.TIMELINE_RESUME, this);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if any of the Tweens in this Timeline as operating on the target object.\r\n * \r\n * Returns `false` if no Tweens operate on the target object.\r\n *\r\n * @method Phaser.Tweens.Timeline#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check all Tweens against.\r\n *\r\n * @return {boolean} `true` if there is at least a single Tween that operates on the target object, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n if (this.data[i].hasTarget(target))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all the Tweens in the Timeline immediately, whatever stage of progress they are at and flags\r\n * them for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Timeline#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n for (var i = 0; i < this.data.length; i++)\r\n {\r\n this.data[i].stop();\r\n }\r\n }\r\n\r\n});\r\n\r\nTimeline.TYPES = [ 'onStart', 'onUpdate', 'onLoop', 'onComplete', 'onYoyo' ];\r\n\r\nmodule.exports = Timeline;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/Timeline.js?")},"./node_modules/phaser/src/tweens/TweenManager.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar ArrayRemove = __webpack_require__(/*! ../utils/array/Remove */ \"./node_modules/phaser/src/utils/array/Remove.js\");\r\nvar Class = __webpack_require__(/*! ../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar NumberTweenBuilder = __webpack_require__(/*! ./builders/NumberTweenBuilder */ \"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js\");\r\nvar PluginCache = __webpack_require__(/*! ../plugins/PluginCache */ \"./node_modules/phaser/src/plugins/PluginCache.js\");\r\nvar SceneEvents = __webpack_require__(/*! ../scene/events */ \"./node_modules/phaser/src/scene/events/index.js\");\r\nvar StaggerBuilder = __webpack_require__(/*! ./builders/StaggerBuilder */ \"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js\");\r\nvar TimelineBuilder = __webpack_require__(/*! ./builders/TimelineBuilder */ \"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./tween/const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./builders/TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * @classdesc\r\n * The Tween Manager is a default Scene Plugin which controls and updates Tweens and Timelines.\r\n *\r\n * @class TweenManager\r\n * @memberof Phaser.Tweens\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Scene} scene - The Scene which owns this Tween Manager.\r\n */\r\nvar TweenManager = new Class({\r\n\r\n initialize:\r\n\r\n function TweenManager (scene)\r\n {\r\n /**\r\n * The Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#scene\r\n * @type {Phaser.Scene}\r\n * @since 3.0.0\r\n */\r\n this.scene = scene;\r\n\r\n /**\r\n * The Systems object of the Scene which owns this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#systems\r\n * @type {Phaser.Scenes.Systems}\r\n * @since 3.0.0\r\n */\r\n this.systems = scene.sys;\r\n\r\n /**\r\n * The time scale of the Tween Manager.\r\n *\r\n * This value scales the time delta between two frames, thus influencing the speed of time for all Tweens owned by this Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be added to the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_add\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._add = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines pending to be later added to the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_pending\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pending = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which are still incomplete and are actively processed by the Tween Manager.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_active\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._active = [];\r\n\r\n /**\r\n * An array of Tweens and Timelines which will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_destroy\r\n * @type {array}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._destroy = [];\r\n\r\n /**\r\n * The number of Tweens and Timelines which need to be processed by the Tween Manager at the start of the frame.\r\n *\r\n * @name Phaser.Tweens.TweenManager#_toProcess\r\n * @type {integer}\r\n * @private\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this._toProcess = 0;\r\n\r\n scene.sys.events.once(SceneEvents.BOOT, this.boot, this);\r\n scene.sys.events.on(SceneEvents.START, this.start, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically, only once, when the Scene is first created.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#boot\r\n * @private\r\n * @since 3.5.1\r\n */\r\n boot: function ()\r\n {\r\n this.systems.events.once(SceneEvents.DESTROY, this.destroy, this);\r\n },\r\n\r\n /**\r\n * This method is called automatically by the Scene when it is starting up.\r\n * It is responsible for creating local systems, properties and listening for Scene events.\r\n * Do not invoke it directly.\r\n *\r\n * @method Phaser.Tweens.TweenManager#start\r\n * @private\r\n * @since 3.5.0\r\n */\r\n start: function ()\r\n {\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.on(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.on(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n\r\n this.timeScale = 1;\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#createTimeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n createTimeline: function (config)\r\n {\r\n return TimelineBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween Timeline and add it to the active Tween list/\r\n *\r\n * @method Phaser.Tweens.TweenManager#timeline\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline and its Tweens.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline object.\r\n */\r\n timeline: function (config)\r\n {\r\n var timeline = TimelineBuilder(this, config);\r\n\r\n if (!timeline.paused)\r\n {\r\n this._add.push(timeline);\r\n\r\n this._toProcess++;\r\n }\r\n\r\n return timeline;\r\n },\r\n\r\n /**\r\n * Create a Tween and return it, but do NOT add it to the active or pending Tween lists.\r\n *\r\n * @method Phaser.Tweens.TweenManager#create\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween object.\r\n */\r\n create: function (config)\r\n {\r\n return TweenBuilder(this, config);\r\n },\r\n\r\n /**\r\n * Create a Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#add\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The configuration object for the Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Tween.\r\n */\r\n add: function (config)\r\n {\r\n var tween = TweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Add an existing tween into the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#existing\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to add.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n existing: function (tween)\r\n {\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Create a Number Tween and add it to the active Tween list.\r\n *\r\n * @method Phaser.Tweens.TweenManager#addCounter\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - The configuration object for the Number Tween.\r\n *\r\n * @return {Phaser.Tweens.Tween} The created Number Tween.\r\n */\r\n addCounter: function (config)\r\n {\r\n var tween = NumberTweenBuilder(this, config);\r\n\r\n this._add.push(tween);\r\n\r\n this._toProcess++;\r\n\r\n return tween;\r\n },\r\n\r\n /**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @method Phaser.Tweens.TweenManager#stagger\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.StaggerConfig} config - The configuration object for the Stagger function.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\n stagger: function (value, options)\r\n {\r\n return StaggerBuilder(value, options);\r\n },\r\n\r\n /**\r\n * Updates the Tween Manager's internal lists at the start of the frame.\r\n *\r\n * This method will return immediately if no changes have been indicated.\r\n *\r\n * @method Phaser.Tweens.TweenManager#preUpdate\r\n * @since 3.0.0\r\n */\r\n preUpdate: function ()\r\n {\r\n if (this._toProcess === 0)\r\n {\r\n // Quick bail\r\n return;\r\n }\r\n\r\n var list = this._destroy;\r\n var active = this._active;\r\n var pending = this._pending;\r\n var i;\r\n var tween;\r\n\r\n // Clear the 'destroy' list\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // Remove from the 'active' array\r\n var idx = active.indexOf(tween);\r\n\r\n if (idx === -1)\r\n {\r\n // Not in the active array, is it in pending instead?\r\n idx = pending.indexOf(tween);\r\n\r\n if (idx > -1)\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n pending.splice(idx, 1);\r\n }\r\n }\r\n else\r\n {\r\n tween.state = TWEEN_CONST.REMOVED;\r\n active.splice(idx, 1);\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n // Process the addition list\r\n // This stops callbacks and out of sync events from populating the active array mid-way during the update\r\n\r\n list = this._add;\r\n\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n // Return true if the Tween should be started right away, otherwise false\r\n if (tween.init())\r\n {\r\n tween.play();\r\n\r\n this._active.push(tween);\r\n }\r\n else\r\n {\r\n this._pending.push(tween);\r\n }\r\n }\r\n }\r\n\r\n list.length = 0;\r\n\r\n this._toProcess = 0;\r\n },\r\n\r\n /**\r\n * Updates all Tweens and Timelines of the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#update\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time in milliseconds.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n // Process active tweens\r\n var list = this._active;\r\n var tween;\r\n\r\n // Scale the delta\r\n delta *= this.timeScale;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n // If Tween.update returns 'true' then it means it has completed,\r\n // so move it to the destroy list\r\n if (tween.update(timestamp, delta))\r\n {\r\n this._destroy.push(tween);\r\n this._toProcess++;\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Removes the given tween from the Tween Manager, regardless of its state (pending or active).\r\n *\r\n * @method Phaser.Tweens.TweenManager#remove\r\n * @since 3.17.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to be removed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n remove: function (tween)\r\n {\r\n ArrayRemove(this._add, tween);\r\n ArrayRemove(this._pending, tween);\r\n ArrayRemove(this._active, tween);\r\n ArrayRemove(this._destroy, tween);\r\n\r\n tween.state = TWEEN_CONST.REMOVED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Checks if a Tween or Timeline is active and adds it to the Tween Manager at the start of the frame if it isn't.\r\n *\r\n * @method Phaser.Tweens.TweenManager#makeActive\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to check.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager object.\r\n */\r\n makeActive: function (tween)\r\n {\r\n if (this._add.indexOf(tween) !== -1 || this._active.indexOf(tween) !== -1)\r\n {\r\n return this;\r\n }\r\n\r\n var idx = this._pending.indexOf(tween);\r\n\r\n if (idx !== -1)\r\n {\r\n this._pending.splice(idx, 1);\r\n }\r\n\r\n this._add.push(tween);\r\n\r\n tween.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n this._toProcess++;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Passes all Tweens to the given callback.\r\n *\r\n * @method Phaser.Tweens.TweenManager#each\r\n * @since 3.0.0\r\n *\r\n * @param {function} callback - The function to call.\r\n * @param {object} [scope] - The scope (`this` object) to call the function with.\r\n * @param {...*} [args] - The arguments to pass into the function. Its first argument will always be the Tween currently being iterated.\r\n */\r\n each: function (callback, scope)\r\n {\r\n var args = [ null ];\r\n\r\n for (var i = 1; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (var texture in this.list)\r\n {\r\n args[0] = this.list[texture];\r\n\r\n callback.apply(scope, args);\r\n }\r\n },\r\n\r\n /**\r\n * Returns an array of all active Tweens and Timelines in the Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getAllTweens\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing references to all active Tweens and Timelines.\r\n */\r\n getAllTweens: function ()\r\n {\r\n var list = this._active;\r\n var output = [];\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n output.push(list[i]);\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time delta for all Tweens and Timelines owned by this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The scale of the time delta, usually 1.\r\n */\r\n getGlobalTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Returns an array of all Tweens or Timelines in the Tween Manager which affect the given target or array of targets.\r\n *\r\n * @method Phaser.Tweens.TweenManager#getTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} A new array containing all Tweens and Timelines which affect the given target(s).\r\n */\r\n getTweensOf: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n var output = [];\r\n var i;\r\n\r\n if (Array.isArray(target))\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n for (var t = 0; t < target.length; t++)\r\n {\r\n if (tween.hasTarget(target[t]))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target))\r\n {\r\n output.push(tween);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n },\r\n\r\n /**\r\n * Checks if the given object is being affected by a playing Tween.\r\n *\r\n * @method Phaser.Tweens.TweenManager#isTweening\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - target Phaser.Tweens.Tween object\r\n *\r\n * @return {boolean} returns if target tween object is active or not\r\n */\r\n isTweening: function (target)\r\n {\r\n var list = this._active;\r\n var tween;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n tween = list[i];\r\n\r\n if (tween.hasTarget(target) && tween.isPlaying())\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n },\r\n\r\n /**\r\n * Stops all Tweens in this Tween Manager. They will be removed at the start of the frame.\r\n *\r\n * @method Phaser.Tweens.TweenManager#killAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killAll: function ()\r\n {\r\n var tweens = this.getAllTweens();\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops all Tweens which affect the given target or array of targets. The Tweens will be removed from the Tween Manager at the start of the frame.\r\n *\r\n * @see {@link #getTweensOf}\r\n *\r\n * @method Phaser.Tweens.TweenManager#killTweensOf\r\n * @since 3.0.0\r\n *\r\n * @param {(object|array)} target - The target to look for. Provide an array to look for multiple targets.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n killTweensOf: function (target)\r\n {\r\n var tweens = this.getTweensOf(target);\r\n\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n tweens[i].stop();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Pauses all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#pauseAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n pauseAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].pause();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Resumes all Tweens in this Tween Manager.\r\n *\r\n * @method Phaser.Tweens.TweenManager#resumeAll\r\n * @since 3.0.0\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n resumeAll: function ()\r\n {\r\n var list = this._active;\r\n\r\n for (var i = 0; i < list.length; i++)\r\n {\r\n list[i].resume();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets a new scale of the time delta for this Tween Manager.\r\n *\r\n * The time delta is the time elapsed between two consecutive frames and influences the speed of time for this Tween Manager and all Tweens it owns. Values higher than 1 increase the speed of time, while values smaller than 1 decrease it. A value of 0 freezes time and is effectively equivalent to pausing all Tweens.\r\n *\r\n * @method Phaser.Tweens.TweenManager#setGlobalTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The new scale of the time delta, where 1 is the normal speed.\r\n *\r\n * @return {Phaser.Tweens.TweenManager} This Tween Manager.\r\n */\r\n setGlobalTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is shutting down.\r\n * We need to kill and reset all internal properties as well as stop listening to Scene events.\r\n *\r\n * @method Phaser.Tweens.TweenManager#shutdown\r\n * @since 3.0.0\r\n */\r\n shutdown: function ()\r\n {\r\n this.killAll();\r\n\r\n this._add = [];\r\n this._pending = [];\r\n this._active = [];\r\n this._destroy = [];\r\n\r\n this._toProcess = 0;\r\n\r\n var eventEmitter = this.systems.events;\r\n\r\n eventEmitter.off(SceneEvents.PRE_UPDATE, this.preUpdate, this);\r\n eventEmitter.off(SceneEvents.UPDATE, this.update, this);\r\n eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this);\r\n },\r\n\r\n /**\r\n * The Scene that owns this plugin is being destroyed.\r\n * We need to shutdown and then kill off all external references.\r\n *\r\n * @method Phaser.Tweens.TweenManager#destroy\r\n * @since 3.0.0\r\n */\r\n destroy: function ()\r\n {\r\n this.shutdown();\r\n\r\n this.scene.sys.events.off(SceneEvents.START, this.start, this);\r\n\r\n this.scene = null;\r\n this.systems = null;\r\n }\r\n\r\n});\r\n\r\nPluginCache.register('TweenManager', TweenManager, 'tweens');\r\n\r\nmodule.exports = TweenManager;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/TweenManager.js?")},"./node_modules/phaser/src/tweens/builders/GetBoolean.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Retrieves the value of the given key from an object.\r\n *\r\n * @function Phaser.Tweens.Builders.GetBoolean\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The key to look for in the `source` object.\r\n * @param {*} defaultValue - The default value to return if the `key` doesn't exist or if no `source` object is provided.\r\n *\r\n * @return {*} The retrieved value.\r\n */\r\nvar GetBoolean = function (source, key, defaultValue)\r\n{\r\n if (!source)\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetBoolean;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetBoolean.js?")},"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar EaseMap = __webpack_require__(/*! ../../math/easing/EaseMap */ \"./node_modules/phaser/src/math/easing/EaseMap.js\");\r\nvar UppercaseFirst = __webpack_require__(/*! ../../utils/string/UppercaseFirst */ \"./node_modules/phaser/src/utils/string/UppercaseFirst.js\");\r\n\r\n/**\r\n * This internal function is used to return the correct ease function for a Tween.\r\n * \r\n * It can take a variety of input, including an EaseMap based string, or a custom function.\r\n *\r\n * @function Phaser.Tweens.Builders.GetEaseFunction\r\n * @since 3.0.0\r\n *\r\n * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function.\r\n * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease.\r\n *\r\n * @return {function} The ease function.\r\n */\r\nvar GetEaseFunction = function (ease, easeParams)\r\n{\r\n // Default ease function\r\n var easeFunction = EaseMap.Power0;\r\n\r\n // Prepare ease function\r\n if (typeof ease === 'string')\r\n {\r\n // String based look-up\r\n\r\n // 1) They specified it correctly\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n else\r\n {\r\n // Do some string manipulation to try and find it\r\n var direction = '';\r\n\r\n if (ease.indexOf('.'))\r\n {\r\n // quad.in = Quad.easeIn\r\n // quad.out = Quad.easeOut\r\n // quad.inout =Quad.easeInOut\r\n\r\n direction = ease.substr(ease.indexOf('.') + 1);\r\n\r\n if (direction.toLowerCase() === 'in')\r\n {\r\n direction = 'easeIn';\r\n }\r\n else if (direction.toLowerCase() === 'out')\r\n {\r\n direction = 'easeOut';\r\n }\r\n else if (direction.toLowerCase() === 'inout')\r\n {\r\n direction = 'easeInOut';\r\n }\r\n }\r\n\r\n ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction);\r\n\r\n if (EaseMap.hasOwnProperty(ease))\r\n {\r\n easeFunction = EaseMap[ease];\r\n }\r\n }\r\n }\r\n else if (typeof ease === 'function')\r\n {\r\n // Custom function\r\n easeFunction = ease;\r\n }\r\n else if (Array.isArray(ease) && ease.length === 4)\r\n {\r\n // Bezier function (TODO)\r\n }\r\n\r\n // No custom ease parameters?\r\n if (!easeParams)\r\n {\r\n // Return ease function\r\n return easeFunction;\r\n }\r\n\r\n var cloneParams = easeParams.slice(0);\r\n\r\n cloneParams.unshift(0);\r\n\r\n // Return ease function with custom ease parameters\r\n return function (v)\r\n {\r\n cloneParams[0] = v;\r\n\r\n return easeFunction.apply(this, cloneParams);\r\n };\r\n};\r\n\r\nmodule.exports = GetEaseFunction;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetEaseFunction.js?")},"./node_modules/phaser/src/tweens/builders/GetNewValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Internal function used by the Tween Builder to create a function that will return\r\n * the given value from the source.\r\n *\r\n * @function Phaser.Tweens.Builders.GetNewValue\r\n * @since 3.0.0\r\n *\r\n * @param {any} source - The source object to get the value from.\r\n * @param {string} key - The property to get from the source.\r\n * @param {any} defaultValue - A default value to return should the source not have the property set.\r\n *\r\n * @return {function} A function which when called will return the property value from the source.\r\n */\r\nvar GetNewValue = function (source, key, defaultValue)\r\n{\r\n var valueCallback;\r\n\r\n if (source.hasOwnProperty(key))\r\n {\r\n var t = typeof(source[key]);\r\n\r\n if (t === 'function')\r\n {\r\n valueCallback = function (target, targetKey, value, targetIndex, totalTargets, tween)\r\n {\r\n return source[key](target, targetKey, value, targetIndex, totalTargets, tween);\r\n };\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return source[key];\r\n };\r\n }\r\n }\r\n else if (typeof defaultValue === 'function')\r\n {\r\n valueCallback = defaultValue;\r\n }\r\n else\r\n {\r\n valueCallback = function ()\r\n {\r\n return defaultValue;\r\n };\r\n }\r\n\r\n return valueCallback;\r\n};\r\n\r\nmodule.exports = GetNewValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetNewValue.js?")},"./node_modules/phaser/src/tweens/builders/GetProps.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RESERVED = __webpack_require__(/*! ../tween/ReservedProps */ \"./node_modules/phaser/src/tweens/tween/ReservedProps.js\");\r\n\r\n/**\r\n * Internal function used by the Tween Builder to return an array of properties\r\n * that the Tween will be operating on. It takes a tween configuration object\r\n * and then checks that none of the `props` entries start with an underscore, or that\r\n * none of the direct properties are on the Reserved list.\r\n *\r\n * @function Phaser.Tweens.Builders.GetProps\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig} config - The configuration object of the Tween to get the properties from.\r\n *\r\n * @return {string[]} An array of all the properties the tween will operate on.\r\n */\r\nvar GetProps = function (config)\r\n{\r\n var key;\r\n var keys = [];\r\n\r\n // First see if we have a props object\r\n\r\n if (config.hasOwnProperty('props'))\r\n {\r\n for (key in config.props)\r\n {\r\n // Skip any property that starts with an underscore\r\n if (key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config.props[key] });\r\n }\r\n }\r\n }\r\n else\r\n {\r\n for (key in config)\r\n {\r\n // Skip any property that is in the ReservedProps list or that starts with an underscore\r\n if (RESERVED.indexOf(key) === -1 && key.substr(0, 1) !== '_')\r\n {\r\n keys.push({ key: key, value: config[key] });\r\n }\r\n }\r\n }\r\n\r\n return keys;\r\n};\r\n\r\nmodule.exports = GetProps;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetProps.js?")},"./node_modules/phaser/src/tweens/builders/GetTargets.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Extracts an array of targets from a Tween configuration object.\r\n *\r\n * The targets will be looked for in a `targets` property. If it's a function, its return value will be used as the result.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTargets\r\n * @since 3.0.0\r\n *\r\n * @param {object} config - The configuration object to use.\r\n *\r\n * @return {array} An array of targets (may contain only one element), or `null` if no targets were specified.\r\n */\r\nvar GetTargets = function (config)\r\n{\r\n var targets = GetValue(config, 'targets', null);\r\n\r\n if (targets === null)\r\n {\r\n return targets;\r\n }\r\n\r\n if (typeof targets === 'function')\r\n {\r\n targets = targets.call();\r\n }\r\n\r\n if (!Array.isArray(targets))\r\n {\r\n targets = [ targets ];\r\n }\r\n\r\n return targets;\r\n};\r\n\r\nmodule.exports = GetTargets;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTargets.js?")},"./node_modules/phaser/src/tweens/builders/GetTweens.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Internal function used by the Timeline Builder.\r\n * \r\n * It returns an array of all tweens in the given timeline config.\r\n *\r\n * @function Phaser.Tweens.Builders.GetTweens\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Tween[]} An array of Tween instances that the Timeline will manage.\r\n */\r\nvar GetTweens = function (config)\r\n{\r\n var tweens = GetValue(config, 'tweens', null);\r\n\r\n if (tweens === null)\r\n {\r\n return [];\r\n }\r\n else if (typeof tweens === 'function')\r\n {\r\n tweens = tweens.call();\r\n }\r\n\r\n if (!Array.isArray(tweens))\r\n {\r\n tweens = [ tweens ];\r\n }\r\n\r\n return tweens;\r\n};\r\n\r\nmodule.exports = GetTweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetTweens.js?")},"./node_modules/phaser/src/tweens/builders/GetValueOp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetActive (def)\r\n{\r\n return (!!def.getActive && typeof def.getActive === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetStart (def)\r\n{\r\n return (!!def.getStart && typeof def.getStart === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetEnd (def)\r\n{\r\n return (!!def.getEnd && typeof def.getEnd === 'function');\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction hasGetters (def)\r\n{\r\n return hasGetStart(def) || hasGetEnd(def) || hasGetActive(def);\r\n}\r\n\r\n/**\r\n * Returns `getActive`, `getStart` and `getEnd` functions for a TweenData based on a target property and end value.\r\n * \r\n * `getActive` if not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * `getEnd` is invoked once any start delays have expired and returns what the value should tween to.\r\n * `getStart` is invoked when the tween reaches the end and needs to either repeat or yoyo, it returns the value to go back to.\r\n *\r\n * If the end value is a number, it will be treated as an absolute value and the property will be tweened to it.\r\n * A string can be provided to specify a relative end value which consists of an operation\r\n * (`+=` to add to the current value, `-=` to subtract from the current value, `*=` to multiply the current\r\n * value, or `/=` to divide the current value) followed by its operand.\r\n * \r\n * A function can be provided to allow greater control over the end value; it will receive the target\r\n * object being tweened, the name of the property being tweened, and the current value of the property\r\n * as its arguments.\r\n * \r\n * If both the starting and the ending values need to be controlled, an object with `getStart` and `getEnd`\r\n * callbacks, which will receive the same arguments, can be provided instead. If an object with a `value`\r\n * property is provided, the property will be used as the effective value under the same rules described here.\r\n *\r\n * @function Phaser.Tweens.Builders.GetValueOp\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The name of the property to modify.\r\n * @param {*} propertyValue - The ending value of the property, as described above.\r\n *\r\n * @return {function} An array of functions, `getActive`, `getStart` and `getEnd`, which return the starting and the ending value of the property based on the provided value.\r\n */\r\nvar GetValueOp = function (key, propertyValue)\r\n{\r\n var callbacks;\r\n\r\n // The returned value sets what the property will be at the END of the Tween (usually called at the start of the Tween)\r\n var getEnd = function (target, key, value) { return value; };\r\n\r\n // The returned value sets what the property will be at the START of the Tween (usually called at the end of the Tween)\r\n var getStart = function (target, key, value) { return value; };\r\n\r\n // What to set the property to the moment the TweenData is invoked\r\n var getActive = null;\r\n\r\n var t = typeof(propertyValue);\r\n\r\n if (t === 'number')\r\n {\r\n // props: {\r\n // x: 400,\r\n // y: 300\r\n // }\r\n\r\n getEnd = function ()\r\n {\r\n return propertyValue;\r\n };\r\n }\r\n else if (t === 'string')\r\n {\r\n // props: {\r\n // x: '+=400',\r\n // y: '-=300',\r\n // z: '*=2',\r\n // w: '/=2'\r\n // }\r\n\r\n var op = propertyValue[0];\r\n var num = parseFloat(propertyValue.substr(2));\r\n\r\n switch (op)\r\n {\r\n case '+':\r\n getEnd = function (target, key, value)\r\n {\r\n return value + num;\r\n };\r\n break;\r\n\r\n case '-':\r\n getEnd = function (target, key, value)\r\n {\r\n return value - num;\r\n };\r\n break;\r\n\r\n case '*':\r\n getEnd = function (target, key, value)\r\n {\r\n return value * num;\r\n };\r\n break;\r\n\r\n case '/':\r\n getEnd = function (target, key, value)\r\n {\r\n return value / num;\r\n };\r\n break;\r\n\r\n default:\r\n getEnd = function ()\r\n {\r\n return parseFloat(propertyValue);\r\n };\r\n }\r\n }\r\n else if (t === 'function')\r\n {\r\n // The same as setting just the getEnd function and no getStart\r\n\r\n // props: {\r\n // x: function (target, key, value, targetIndex, totalTargets, tween) { return value + 50); },\r\n // }\r\n\r\n getEnd = propertyValue;\r\n }\r\n else if (t === 'object')\r\n {\r\n if (hasGetters(propertyValue))\r\n {\r\n /*\r\n x: {\r\n // Called the moment Tween is active. The returned value sets the property on the target immediately.\r\n getActive: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the start of the Tween. The returned value sets what the property will be at the END of the Tween.\r\n getEnd: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n },\r\n\r\n // Called at the end of the Tween. The returned value sets what the property will be at the START of the Tween.\r\n getStart: function (target, key, value, targetIndex, totalTargets, tween)\r\n {\r\n return value;\r\n }\r\n }\r\n */\r\n\r\n if (hasGetActive(propertyValue))\r\n {\r\n getActive = propertyValue.getActive;\r\n }\r\n\r\n if (hasGetEnd(propertyValue))\r\n {\r\n getEnd = propertyValue.getEnd;\r\n }\r\n\r\n if (hasGetStart(propertyValue))\r\n {\r\n getStart = propertyValue.getStart;\r\n }\r\n }\r\n else if (propertyValue.hasOwnProperty('value'))\r\n {\r\n // 'value' may still be a string, function or a number\r\n // props: {\r\n // x: { value: 400, ... },\r\n // y: { value: 300, ... }\r\n // }\r\n\r\n callbacks = GetValueOp(key, propertyValue.value);\r\n }\r\n else\r\n {\r\n // 'from' and 'to' may still be a string, function or a number\r\n // props: {\r\n // x: { from: 400, to: 600 },\r\n // y: { from: 300, to: 500 }\r\n // }\r\n\r\n // Same as above, but the 'start' value is set immediately on the target\r\n // props: {\r\n // x: { start: 400, to: 600 },\r\n // y: { start: 300, to: 500 }\r\n // }\r\n\r\n // 'start' value is set immediately, then it goes 'from' to 'to' during the tween\r\n // props: {\r\n // x: { start: 200, from: 400, to: 600 },\r\n // y: { start: 300, from: 300, to: 500 }\r\n // }\r\n\r\n var hasTo = propertyValue.hasOwnProperty('to');\r\n var hasFrom = propertyValue.hasOwnProperty('from');\r\n var hasStart = propertyValue.hasOwnProperty('start');\r\n\r\n if (hasTo && (hasFrom || hasStart))\r\n {\r\n callbacks = GetValueOp(key, propertyValue.to);\r\n\r\n if (hasStart)\r\n {\r\n var startCallbacks = GetValueOp(key, propertyValue.start);\r\n \r\n callbacks.getActive = startCallbacks.getEnd;\r\n }\r\n \r\n if (hasFrom)\r\n {\r\n var fromCallbacks = GetValueOp(key, propertyValue.from);\r\n \r\n callbacks.getStart = fromCallbacks.getEnd;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // If callback not set by the else if block above then set it here and return it\r\n if (!callbacks)\r\n {\r\n callbacks = {\r\n getActive: getActive,\r\n getEnd: getEnd,\r\n getStart: getStart\r\n };\r\n }\r\n\r\n return callbacks;\r\n};\r\n\r\nmodule.exports = GetValueOp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/GetValueOp.js?")},"./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Number Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.NumberTweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.NumberTweenBuilderConfig} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar NumberTweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // var tween = this.tweens.addCounter({\r\n // from: 100,\r\n // to: 200,\r\n // ... (normal tween properties)\r\n // })\r\n //\r\n // Then use it in your game via:\r\n //\r\n // tween.getValue()\r\n\r\n var from = GetValue(config, 'from', 0);\r\n var to = GetValue(config, 'to', 1);\r\n\r\n var targets = [ { value: from } ];\r\n\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n\r\n var data = [];\r\n\r\n var ops = GetValueOp('value', to);\r\n\r\n var tweenData = TweenData(\r\n targets[0],\r\n 0,\r\n 'value',\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n ease,\r\n delay,\r\n duration,\r\n yoyo,\r\n hold,\r\n repeat,\r\n repeatDelay,\r\n false,\r\n false\r\n );\r\n\r\n tweenData.start = from;\r\n tweenData.current = from;\r\n tweenData.to = to;\r\n\r\n data.push(tweenData);\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = NumberTweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/StaggerBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Creates a Stagger function to be used by a Tween property.\r\n * \r\n * The stagger function will allow you to stagger changes to the value of the property across all targets of the tween.\r\n * \r\n * This is only worth using if the tween has multiple targets.\r\n * \r\n * The following will stagger the delay by 100ms across all targets of the tween, causing them to scale down to 0.2\r\n * over the duration specified:\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(100)\r\n * });\r\n * ```\r\n * \r\n * The following will stagger the delay by 500ms across all targets of the tween using a 10 x 6 grid, staggering\r\n * from the center out, using a cubic ease.\r\n * \r\n * ```javascript\r\n * this.tweens.add({\r\n * targets: [ ... ],\r\n * scale: 0.2,\r\n * ease: 'linear',\r\n * duration: 1000,\r\n * delay: this.tweens.stagger(500, { grid: [ 10, 6 ], from: 'center', ease: 'cubic.out' })\r\n * });\r\n * ```\r\n *\r\n * @function Phaser.Tweens.Builders.StaggerBuilder\r\n * @since 3.19.0\r\n *\r\n * @param {(number|number[])} value - The amount to stagger by, or an array containing two elements representing the min and max values to stagger between.\r\n * @param {Phaser.Types.Tweens.StaggerConfig} [config] - A Stagger Configuration object.\r\n *\r\n * @return {function} The stagger function.\r\n */\r\nvar StaggerBuilder = function (value, options)\r\n{\r\n if (options === undefined) { options = {}; }\r\n\r\n var result;\r\n\r\n var start = GetValue(options, 'start', 0);\r\n var ease = GetValue(options, 'ease', null);\r\n var grid = GetValue(options, 'grid', null);\r\n\r\n var from = GetValue(options, 'from', 0);\r\n\r\n var fromFirst = (from === 'first');\r\n var fromCenter = (from === 'center');\r\n var fromLast = (from === 'last');\r\n var fromValue = (typeof(from) === 'number');\r\n\r\n var isRange = (Array.isArray(value));\r\n var value1 = (isRange) ? parseFloat(value[0]) : parseFloat(value);\r\n var value2 = (isRange) ? parseFloat(value[1]) : 0;\r\n var maxValue = Math.max(value1, value2);\r\n\r\n if (isRange)\r\n {\r\n start += value1;\r\n }\r\n\r\n if (grid)\r\n {\r\n // Pre-calc the grid to save doing it for ever tweendata update\r\n var gridWidth = grid[0];\r\n var gridHeight = grid[1];\r\n\r\n var fromX = 0;\r\n var fromY = 0;\r\n\r\n var distanceX = 0;\r\n var distanceY = 0;\r\n\r\n var gridValues = [];\r\n\r\n if (fromLast)\r\n {\r\n fromX = gridWidth - 1;\r\n fromY = gridHeight - 1;\r\n }\r\n else if (fromValue)\r\n {\r\n fromX = from % gridWidth;\r\n fromY = Math.floor(from / gridWidth);\r\n }\r\n else if (fromCenter)\r\n {\r\n fromX = (gridWidth - 1) / 2;\r\n fromY = (gridHeight - 1) / 2;\r\n }\r\n\r\n var gridMax = Number.MIN_SAFE_INTEGER;\r\n\r\n for (var toY = 0; toY < gridHeight; toY++)\r\n {\r\n gridValues[toY] = [];\r\n\r\n for (var toX = 0; toX < gridWidth; toX++)\r\n {\r\n distanceX = fromX - toX;\r\n distanceY = fromY - toY;\r\n\r\n var dist = Math.sqrt(distanceX * distanceX + distanceY * distanceY);\r\n\r\n if (dist > gridMax)\r\n {\r\n gridMax = dist;\r\n }\r\n\r\n gridValues[toY][toX] = dist;\r\n }\r\n }\r\n }\r\n\r\n var easeFunction = (ease) ? GetEaseFunction(ease) : null;\r\n\r\n if (grid)\r\n {\r\n result = function (target, key, value, index)\r\n {\r\n var gridSpace = 0;\r\n var toX = index % gridWidth;\r\n var toY = Math.floor(index / gridWidth);\r\n \r\n if (toX >= 0 && toX < gridWidth && toY >= 0 && toY < gridHeight)\r\n {\r\n gridSpace = gridValues[toY][toX];\r\n }\r\n\r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var diff = (value2 - value1);\r\n \r\n if (easeFunction)\r\n {\r\n output = ((gridSpace / gridMax) * diff) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = (gridSpace / gridMax) * diff;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (gridSpace * value1) * easeFunction(gridSpace / gridMax);\r\n }\r\n else\r\n {\r\n output = gridSpace * value1;\r\n }\r\n\r\n return output + start;\r\n };\r\n }\r\n else\r\n {\r\n result = function (target, key, value, index, total)\r\n {\r\n // zero offset\r\n total--;\r\n \r\n var fromIndex;\r\n \r\n if (fromFirst)\r\n {\r\n fromIndex = index;\r\n }\r\n else if (fromCenter)\r\n {\r\n fromIndex = Math.abs((total / 2) - index);\r\n }\r\n else if (fromLast)\r\n {\r\n fromIndex = total - index;\r\n }\r\n else if (fromValue)\r\n {\r\n fromIndex = Math.abs(from - index);\r\n }\r\n \r\n var output;\r\n \r\n if (isRange)\r\n {\r\n var spacing;\r\n\r\n if (fromCenter)\r\n {\r\n spacing = ((value2 - value1) / total) * (fromIndex * 2);\r\n }\r\n else\r\n {\r\n spacing = ((value2 - value1) / total) * fromIndex;\r\n }\r\n \r\n if (easeFunction)\r\n {\r\n output = spacing * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = spacing;\r\n }\r\n }\r\n else if (easeFunction)\r\n {\r\n output = (total * maxValue) * easeFunction(fromIndex / total);\r\n }\r\n else\r\n {\r\n output = fromIndex * value1;\r\n }\r\n \r\n return output + start;\r\n };\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = StaggerBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/StaggerBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TimelineBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ../../utils/object/Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetTweens = __webpack_require__(/*! ./GetTweens */ \"./node_modules/phaser/src/tweens/builders/GetTweens.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Timeline = __webpack_require__(/*! ../Timeline */ \"./node_modules/phaser/src/tweens/Timeline.js\");\r\nvar TweenBuilder = __webpack_require__(/*! ./TweenBuilder */ \"./node_modules/phaser/src/tweens/builders/TweenBuilder.js\");\r\n\r\n/**\r\n * Builds a Timeline of Tweens based on a configuration object.\r\n *\r\n * @function Phaser.Tweens.Builders.TimelineBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.TweenManager} manager - The Tween Manager to which the Timeline will belong.\r\n * @param {Phaser.Types.Tweens.TimelineBuilderConfig} config - The configuration object for the Timeline.\r\n *\r\n * @return {Phaser.Tweens.Timeline} The created Timeline.\r\n */\r\nvar TimelineBuilder = function (manager, config)\r\n{\r\n var timeline = new Timeline(manager);\r\n\r\n var tweens = GetTweens(config);\r\n\r\n if (tweens.length === 0)\r\n {\r\n timeline.paused = true;\r\n\r\n return timeline;\r\n }\r\n\r\n var defaults = Clone(Defaults);\r\n\r\n defaults.targets = GetTargets(config);\r\n\r\n // totalDuration: If specified each tween in the Timeline is given an equal portion of the totalDuration\r\n\r\n var totalDuration = GetAdvancedValue(config, 'totalDuration', 0);\r\n\r\n if (totalDuration > 0)\r\n {\r\n defaults.duration = Math.floor(totalDuration / tweens.length);\r\n }\r\n else\r\n {\r\n defaults.duration = GetNewValue(config, 'duration', defaults.duration);\r\n }\r\n\r\n defaults.delay = GetNewValue(config, 'delay', defaults.delay);\r\n defaults.easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n defaults.ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), defaults.easeParams);\r\n defaults.hold = GetNewValue(config, 'hold', defaults.hold);\r\n defaults.repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n defaults.repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n defaults.yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n defaults.flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n defaults.flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n // Create the Tweens\r\n for (var i = 0; i < tweens.length; i++)\r\n {\r\n timeline.queue(TweenBuilder(timeline, tweens[i], defaults));\r\n }\r\n\r\n timeline.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n timeline.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n timeline.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n timeline.paused = GetBoolean(config, 'paused', false);\r\n timeline.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Callbacks\r\n\r\n var scope = GetValue(config, 'callbackScope', timeline);\r\n\r\n var timelineArray = [ timeline ];\r\n\r\n var onStart = GetValue(config, 'onStart', false);\r\n\r\n // The Start of the Timeline\r\n if (onStart)\r\n {\r\n var onStartScope = GetValue(config, 'onStartScope', scope);\r\n var onStartParams = GetValue(config, 'onStartParams', []);\r\n\r\n timeline.setCallback('onStart', onStart, timelineArray.concat(onStartParams), onStartScope);\r\n }\r\n\r\n var onUpdate = GetValue(config, 'onUpdate', false);\r\n\r\n // Every time the Timeline updates (regardless which Tweens are running)\r\n if (onUpdate)\r\n {\r\n var onUpdateScope = GetValue(config, 'onUpdateScope', scope);\r\n var onUpdateParams = GetValue(config, 'onUpdateParams', []);\r\n\r\n timeline.setCallback('onUpdate', onUpdate, timelineArray.concat(onUpdateParams), onUpdateScope);\r\n }\r\n\r\n var onLoop = GetValue(config, 'onLoop', false);\r\n\r\n // Called when the whole Timeline loops\r\n if (onLoop)\r\n {\r\n var onLoopScope = GetValue(config, 'onLoopScope', scope);\r\n var onLoopParams = GetValue(config, 'onLoopParams', []);\r\n\r\n timeline.setCallback('onLoop', onLoop, timelineArray.concat(onLoopParams), onLoopScope);\r\n }\r\n\r\n var onYoyo = GetValue(config, 'onYoyo', false);\r\n\r\n // Called when a Timeline yoyos\r\n if (onYoyo)\r\n {\r\n var onYoyoScope = GetValue(config, 'onYoyoScope', scope);\r\n var onYoyoParams = GetValue(config, 'onYoyoParams', []);\r\n\r\n timeline.setCallback('onYoyo', onYoyo, timelineArray.concat(null, onYoyoParams), onYoyoScope);\r\n }\r\n\r\n var onComplete = GetValue(config, 'onComplete', false);\r\n\r\n // Called when the Timeline completes, after the completeDelay, etc.\r\n if (onComplete)\r\n {\r\n var onCompleteScope = GetValue(config, 'onCompleteScope', scope);\r\n var onCompleteParams = GetValue(config, 'onCompleteParams', []);\r\n\r\n timeline.setCallback('onComplete', onComplete, timelineArray.concat(onCompleteParams), onCompleteScope);\r\n }\r\n\r\n return timeline;\r\n};\r\n\r\nmodule.exports = TimelineBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TimelineBuilder.js?")},"./node_modules/phaser/src/tweens/builders/TweenBuilder.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Defaults = __webpack_require__(/*! ../tween/Defaults */ \"./node_modules/phaser/src/tweens/tween/Defaults.js\");\r\nvar GetAdvancedValue = __webpack_require__(/*! ../../utils/object/GetAdvancedValue */ \"./node_modules/phaser/src/utils/object/GetAdvancedValue.js\");\r\nvar GetBoolean = __webpack_require__(/*! ./GetBoolean */ \"./node_modules/phaser/src/tweens/builders/GetBoolean.js\");\r\nvar GetEaseFunction = __webpack_require__(/*! ./GetEaseFunction */ \"./node_modules/phaser/src/tweens/builders/GetEaseFunction.js\");\r\nvar GetNewValue = __webpack_require__(/*! ./GetNewValue */ \"./node_modules/phaser/src/tweens/builders/GetNewValue.js\");\r\nvar GetProps = __webpack_require__(/*! ./GetProps */ \"./node_modules/phaser/src/tweens/builders/GetProps.js\");\r\nvar GetTargets = __webpack_require__(/*! ./GetTargets */ \"./node_modules/phaser/src/tweens/builders/GetTargets.js\");\r\nvar GetValue = __webpack_require__(/*! ../../utils/object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar GetValueOp = __webpack_require__(/*! ./GetValueOp */ \"./node_modules/phaser/src/tweens/builders/GetValueOp.js\");\r\nvar Tween = __webpack_require__(/*! ../tween/Tween */ \"./node_modules/phaser/src/tweens/tween/Tween.js\");\r\nvar TweenData = __webpack_require__(/*! ../tween/TweenData */ \"./node_modules/phaser/src/tweens/tween/TweenData.js\");\r\n\r\n/**\r\n * Creates a new Tween.\r\n *\r\n * @function Phaser.Tweens.Builders.TweenBuilder\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - The owner of the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - Configuration for the new Tween.\r\n * @param {Phaser.Types.Tweens.TweenConfigDefaults} defaults - Tween configuration defaults.\r\n *\r\n * @return {Phaser.Tweens.Tween} The new tween.\r\n */\r\nvar TweenBuilder = function (parent, config, defaults)\r\n{\r\n if (defaults === undefined)\r\n {\r\n defaults = Defaults;\r\n }\r\n\r\n // Create arrays of the Targets and the Properties\r\n var targets = (defaults.targets) ? defaults.targets : GetTargets(config);\r\n\r\n // var props = (defaults.props) ? defaults.props : GetProps(config);\r\n var props = GetProps(config);\r\n\r\n // Default Tween values\r\n var delay = GetNewValue(config, 'delay', defaults.delay);\r\n var duration = GetNewValue(config, 'duration', defaults.duration);\r\n var easeParams = GetValue(config, 'easeParams', defaults.easeParams);\r\n var ease = GetEaseFunction(GetValue(config, 'ease', defaults.ease), easeParams);\r\n var hold = GetNewValue(config, 'hold', defaults.hold);\r\n var repeat = GetNewValue(config, 'repeat', defaults.repeat);\r\n var repeatDelay = GetNewValue(config, 'repeatDelay', defaults.repeatDelay);\r\n var yoyo = GetBoolean(config, 'yoyo', defaults.yoyo);\r\n var flipX = GetBoolean(config, 'flipX', defaults.flipX);\r\n var flipY = GetBoolean(config, 'flipY', defaults.flipY);\r\n\r\n var data = [];\r\n\r\n // Loop through every property defined in the Tween, i.e.: props { x, y, alpha }\r\n for (var p = 0; p < props.length; p++)\r\n {\r\n var key = props[p].key;\r\n var value = props[p].value;\r\n\r\n // Create 1 TweenData per target, per property\r\n for (var t = 0; t < targets.length; t++)\r\n {\r\n var ops = GetValueOp(key, value);\r\n\r\n var tweenData = TweenData(\r\n targets[t],\r\n t,\r\n key,\r\n ops.getEnd,\r\n ops.getStart,\r\n ops.getActive,\r\n GetEaseFunction(GetValue(value, 'ease', ease), easeParams),\r\n GetNewValue(value, 'delay', delay),\r\n GetNewValue(value, 'duration', duration),\r\n GetBoolean(value, 'yoyo', yoyo),\r\n GetNewValue(value, 'hold', hold),\r\n GetNewValue(value, 'repeat', repeat),\r\n GetNewValue(value, 'repeatDelay', repeatDelay),\r\n GetBoolean(value, 'flipX', flipX),\r\n GetBoolean(value, 'flipY', flipY)\r\n );\r\n\r\n data.push(tweenData);\r\n }\r\n }\r\n\r\n var tween = new Tween(parent, data, targets);\r\n\r\n tween.offset = GetAdvancedValue(config, 'offset', null);\r\n tween.completeDelay = GetAdvancedValue(config, 'completeDelay', 0);\r\n tween.loop = Math.round(GetAdvancedValue(config, 'loop', 0));\r\n tween.loopDelay = Math.round(GetAdvancedValue(config, 'loopDelay', 0));\r\n tween.paused = GetBoolean(config, 'paused', false);\r\n tween.useFrames = GetBoolean(config, 'useFrames', false);\r\n\r\n // Set the Callbacks\r\n var scope = GetValue(config, 'callbackScope', tween);\r\n\r\n // Callback parameters: 0 = a reference to the Tween itself, 1 = the target/s of the Tween, ... your own params\r\n var tweenArray = [ tween, null ];\r\n\r\n var callbacks = Tween.TYPES;\r\n\r\n for (var i = 0; i < callbacks.length; i++)\r\n {\r\n var type = callbacks[i];\r\n\r\n var callback = GetValue(config, type, false);\r\n\r\n if (callback)\r\n {\r\n var callbackScope = GetValue(config, type + 'Scope', scope);\r\n var callbackParams = GetValue(config, type + 'Params', []);\r\n\r\n // The null is reset to be the Tween target\r\n tween.setCallback(type, callback, tweenArray.concat(callbackParams), callbackScope);\r\n }\r\n }\r\n\r\n return tween;\r\n};\r\n\r\nmodule.exports = TweenBuilder;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/TweenBuilder.js?")},"./node_modules/phaser/src/tweens/builders/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Builders\r\n */\r\n\r\nmodule.exports = {\r\n\r\n GetBoolean: __webpack_require__(/*! ./GetBoolean */ "./node_modules/phaser/src/tweens/builders/GetBoolean.js"),\r\n GetEaseFunction: __webpack_require__(/*! ./GetEaseFunction */ "./node_modules/phaser/src/tweens/builders/GetEaseFunction.js"),\r\n GetNewValue: __webpack_require__(/*! ./GetNewValue */ "./node_modules/phaser/src/tweens/builders/GetNewValue.js"),\r\n GetProps: __webpack_require__(/*! ./GetProps */ "./node_modules/phaser/src/tweens/builders/GetProps.js"),\r\n GetTargets: __webpack_require__(/*! ./GetTargets */ "./node_modules/phaser/src/tweens/builders/GetTargets.js"),\r\n GetTweens: __webpack_require__(/*! ./GetTweens */ "./node_modules/phaser/src/tweens/builders/GetTweens.js"),\r\n GetValueOp: __webpack_require__(/*! ./GetValueOp */ "./node_modules/phaser/src/tweens/builders/GetValueOp.js"),\r\n NumberTweenBuilder: __webpack_require__(/*! ./NumberTweenBuilder */ "./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js"),\r\n TimelineBuilder: __webpack_require__(/*! ./TimelineBuilder */ "./node_modules/phaser/src/tweens/builders/TimelineBuilder.js"),\r\n TweenBuilder: __webpack_require__(/*! ./TweenBuilder */ "./node_modules/phaser/src/tweens/builders/TweenBuilder.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/builders/index.js?')},"./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Complete Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it completes playback.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('complete', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_COMPLETE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Loop Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it loops.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 4,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('loop', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_LOOP\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Pause Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is paused.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('pause', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('pause', listener);\r\n * // At some point later ...\r\n * timeline.pause();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_PAUSE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'pause';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Resume Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it is resumed from a paused state.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('resume', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('resume', listener);\r\n * // At some point later ...\r\n * timeline.resume();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_RESUME\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'resume';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Start Event.\r\n * \r\n * This event is dispatched by a Tween Timeline when it starts.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('start', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_START\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Timeline Update Event.\r\n * \r\n * This event is dispatched by a Tween Timeline every time it updates, which can happen a lot of times per second,\r\n * so be careful about listening to this event unless you absolutely require it.\r\n * \r\n * Listen to it from a Timeline instance using `Timeline.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var timeline = this.tweens.timeline({\r\n * targets: image,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * tweens: [ { x: 600 }, { y: 500 }, { x: 100 }, { y: 100 } ]\r\n * });\r\n * timeline.on('update', listener);\r\n * timeline.play();\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TIMELINE_UPDATE\r\n * @since 3.0.0\r\n * \r\n * @param {Phaser.Tweens.Timeline} timeline - A reference to the Timeline instance that emitted the event.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Active Event.\r\n * \r\n * This event is dispatched by a Tween when it becomes active within the Tween Manager.\r\n * \r\n * An 'active' Tween is one that is now progressing, although it may not yet be updating\r\n * any target properties, due to settings such as `delay`. If you need an event for when\r\n * the Tween starts actually updating its first property, see `TWEEN_START`.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('active', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('active', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'active';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Complete Event.\r\n * \r\n * This event is dispatched by a Tween when it completes playback entirely, factoring in repeats and loops.\r\n * \r\n * If the Tween has been set to loop or repeat infinitely, this event will not be dispatched\r\n * unless the `Tween.stop` method is called.\r\n * \r\n * If a Tween has a `completeDelay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('complete', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('complete', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'complete';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Loop Event.\r\n * \r\n * This event is dispatched by a Tween when it loops.\r\n * \r\n * This event will only be dispatched if the Tween has a loop count set.\r\n * \r\n * If a Tween has a `loopDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('loop', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * loop: 6\r\n * });\r\n * tween.on('loop', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'loop';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Repeat Event.\r\n * \r\n * This event is dispatched by a Tween when one of the properties it is tweening repeats.\r\n * \r\n * This event will only be dispatched if the Tween has a property with a repeat count set.\r\n * \r\n * If a Tween has a `repeatDelay` set, this event will fire after that delay expires.\r\n * \r\n * The difference between `loop` and `repeat` is that `repeat` is a property setting,\r\n * where-as `loop` applies to the entire Tween.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('repeat', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * repeat: 4\r\n * });\r\n * tween.on('repeat', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The key of the property that just repeated.\r\n * @param {any} target - The target that the property just repated on.\r\n */\r\nmodule.exports = 'repeat';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Start Event.\r\n * \r\n * This event is dispatched by a Tween when it starts tweening its first property.\r\n * \r\n * A Tween will only emit this event once, as it can only start once.\r\n * \r\n * If a Tween has a `delay` set, this event will fire after that delay expires.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('start', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000\r\n * });\r\n * tween.on('start', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {any[]} targets - An array of references to the target/s the Tween is operating on.\r\n */\r\nmodule.exports = 'start';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Update Event.\r\n * \r\n * This event is dispatched by a Tween every time it updates _any_ of the properties it is tweening.\r\n * \r\n * A Tween that is changing 3 properties of a target will emit this event 3 times per change, once per property.\r\n * \r\n * **Note:** This is a very high frequency event and may be dispatched multiple times, every single frame.\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('update', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * });\r\n * tween.on('update', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that was updated, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was updated. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'update';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js?")},"./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * The Tween Yoyo Event.\r\n * \r\n * This event is dispatched by a Tween whenever a property it is tweening yoyos.\r\n * \r\n * This event will only be dispatched if the Tween has a property with `yoyo` set.\r\n * \r\n * If the Tween has a `hold` value, this event is dispatched when the hold expires.\r\n * \r\n * This event is dispatched for every property, and for every target, that yoyos.\r\n * For example, if a Tween was updating 2 properties and had 10 targets, this event\r\n * would be dispatched 20 times (twice per target). So be careful how you use it!\r\n * \r\n * Listen to it from a Tween instance using `Tween.on('yoyo', listener)`, i.e.:\r\n * \r\n * ```javascript\r\n * var tween = this.tweens.add({\r\n * targets: image,\r\n * x: 500,\r\n * ease: 'Power1',\r\n * duration: 3000,\r\n * yoyo: true\r\n * });\r\n * tween.on('yoyo', listener);\r\n * ```\r\n *\r\n * @event Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.19.0\r\n * \r\n * @param {Phaser.Tweens.Tween} tween - A reference to the Tween instance that emitted the event.\r\n * @param {string} key - The property that yoyo'd, i.e. `x` or `scale`.\r\n * @param {any} target - The target object that was yoyo'd. Usually a Game Object, but can be of any type.\r\n */\r\nmodule.exports = 'yoyo';\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js?")},"./node_modules/phaser/src/tweens/events/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Tweens.Events\r\n */\r\n\r\nmodule.exports = {\r\n\r\n TIMELINE_COMPLETE: __webpack_require__(/*! ./TIMELINE_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js"),\r\n TIMELINE_LOOP: __webpack_require__(/*! ./TIMELINE_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js"),\r\n TIMELINE_PAUSE: __webpack_require__(/*! ./TIMELINE_PAUSE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js"),\r\n TIMELINE_RESUME: __webpack_require__(/*! ./TIMELINE_RESUME_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js"),\r\n TIMELINE_START: __webpack_require__(/*! ./TIMELINE_START_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js"),\r\n TIMELINE_UPDATE: __webpack_require__(/*! ./TIMELINE_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js"),\r\n TWEEN_ACTIVE: __webpack_require__(/*! ./TWEEN_ACTIVE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js"),\r\n TWEEN_COMPLETE: __webpack_require__(/*! ./TWEEN_COMPLETE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js"),\r\n TWEEN_LOOP: __webpack_require__(/*! ./TWEEN_LOOP_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js"),\r\n TWEEN_REPEAT: __webpack_require__(/*! ./TWEEN_REPEAT_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js"),\r\n TWEEN_START: __webpack_require__(/*! ./TWEEN_START_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js"),\r\n TWEEN_UPDATE: __webpack_require__(/*! ./TWEEN_UPDATE_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js"),\r\n TWEEN_YOYO: __webpack_require__(/*! ./TWEEN_YOYO_EVENT */ "./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/events/index.js?')},"./node_modules/phaser/src/tweens/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CONST = __webpack_require__(/*! ./tween/const */ "./node_modules/phaser/src/tweens/tween/const.js");\r\nvar Extend = __webpack_require__(/*! ../utils/object/Extend */ "./node_modules/phaser/src/utils/object/Extend.js");\r\n\r\n/**\r\n * @namespace Phaser.Tweens\r\n */\r\n\r\nvar Tweens = {\r\n\r\n Builders: __webpack_require__(/*! ./builders */ "./node_modules/phaser/src/tweens/builders/index.js"),\r\n Events: __webpack_require__(/*! ./events */ "./node_modules/phaser/src/tweens/events/index.js"),\r\n\r\n TweenManager: __webpack_require__(/*! ./TweenManager */ "./node_modules/phaser/src/tweens/TweenManager.js"),\r\n Tween: __webpack_require__(/*! ./tween/Tween */ "./node_modules/phaser/src/tweens/tween/Tween.js"),\r\n TweenData: __webpack_require__(/*! ./tween/TweenData */ "./node_modules/phaser/src/tweens/tween/TweenData.js"),\r\n Timeline: __webpack_require__(/*! ./Timeline */ "./node_modules/phaser/src/tweens/Timeline.js")\r\n\r\n};\r\n\r\n// Merge in the consts\r\nTweens = Extend(false, Tweens, CONST);\r\n\r\nmodule.exports = Tweens;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/index.js?')},"./node_modules/phaser/src/tweens/tween/Defaults.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @typedef {object} Phaser.Types.Tweens.TweenConfigDefaults\r\n * @since 3.0.0\r\n * \r\n * @property {(object|object[])} targets - The object, or an array of objects, to run the tween on.\r\n * @property {number} [delay=0] - The number of milliseconds to delay before the tween will start.\r\n * @property {number} [duration=1000] - The duration of the tween in milliseconds.\r\n * @property {string} [ease='Power0'] - The easing equation to use for the tween.\r\n * @property {array} [easeParams] - Optional easing parameters.\r\n * @property {number} [hold=0] - The number of milliseconds to hold the tween for before yoyo'ing.\r\n * @property {number} [repeat=0] - The number of times to repeat the tween.\r\n * @property {number} [repeatDelay=0] - The number of milliseconds to pause before a tween will repeat.\r\n * @property {boolean} [yoyo=false] - Should the tween complete, then reverse the values incrementally to get back to the starting tween values? The reverse tweening will also take `duration` milliseconds to complete.\r\n * @property {boolean} [flipX=false] - Horizontally flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipX` property.\r\n * @property {boolean} [flipY=false] - Vertically flip the target of the Tween when it completes (before it yoyos, if set to do so). Only works for targets that support the `flipY` property.\r\n */\r\n\r\nvar TWEEN_DEFAULTS = {\r\n targets: null,\r\n delay: 0,\r\n duration: 1000,\r\n ease: 'Power0',\r\n easeParams: null,\r\n hold: 0,\r\n repeat: 0,\r\n repeatDelay: 0,\r\n yoyo: false,\r\n flipX: false,\r\n flipY: false\r\n};\r\n\r\nmodule.exports = TWEEN_DEFAULTS;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Defaults.js?")},"./node_modules/phaser/src/tweens/tween/ReservedProps.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// RESERVED properties that a Tween config object uses\r\n\r\n// completeDelay: The time the tween will wait before the onComplete event is dispatched once it has completed\r\n// delay: The time the tween will wait before it first starts\r\n// duration: The duration of the tween\r\n// ease: The ease function used by the tween\r\n// easeParams: The parameters to go with the ease function (if any)\r\n// flipX: flip X the GameObject on tween end\r\n// flipY: flip Y the GameObject on tween end// hold: The time the tween will pause before running a yoyo\r\n// hold: The time the tween will pause before running a yoyo\r\n// loop: The time the tween will pause before starting either a yoyo or returning to the start for a repeat\r\n// loopDelay: \r\n// offset: Used when the Tween is part of a Timeline\r\n// paused: Does the tween start in a paused state, or playing?\r\n// props: The properties being tweened by the tween\r\n// repeat: The number of times the tween will repeat itself (a value of 1 means the tween will play twice, as it repeated once)\r\n// repeatDelay: The time the tween will pause for before starting a repeat. The tween holds in the start state.\r\n// targets: The targets the tween is updating.\r\n// useFrames: Use frames or milliseconds?\r\n// yoyo: boolean - Does the tween reverse itself (yoyo) when it reaches the end?\r\n\r\nmodule.exports = [\r\n 'callbackScope',\r\n 'completeDelay',\r\n 'delay',\r\n 'duration',\r\n 'ease',\r\n 'easeParams',\r\n 'flipX',\r\n 'flipY',\r\n 'hold',\r\n 'loop',\r\n 'loopDelay',\r\n 'offset',\r\n 'onActive',\r\n 'onActiveParams',\r\n 'onActiveScope',\r\n 'onComplete',\r\n 'onCompleteParams',\r\n 'onCompleteScope',\r\n 'onLoop',\r\n 'onLoopParams',\r\n 'onLoopScope',\r\n 'onRepeat',\r\n 'onRepeatParams',\r\n 'onRepeatScope',\r\n 'onStart',\r\n 'onStartParams',\r\n 'onStartScope',\r\n 'onUpdate',\r\n 'onUpdateParams',\r\n 'onUpdateScope',\r\n 'onYoyo',\r\n 'onYoyoParams',\r\n 'onYoyoScope',\r\n 'paused',\r\n 'props',\r\n 'repeat',\r\n 'repeatDelay',\r\n 'targets',\r\n 'useFrames',\r\n 'yoyo'\r\n];\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/ReservedProps.js?")},"./node_modules/phaser/src/tweens/tween/Tween.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Class = __webpack_require__(/*! ../../utils/Class */ \"./node_modules/phaser/src/utils/Class.js\");\r\nvar EventEmitter = __webpack_require__(/*! eventemitter3 */ \"./node_modules/eventemitter3/index.js\");\r\nvar Events = __webpack_require__(/*! ../events */ \"./node_modules/phaser/src/tweens/events/index.js\");\r\nvar GameObjectCreator = __webpack_require__(/*! ../../gameobjects/GameObjectCreator */ \"./node_modules/phaser/src/gameobjects/GameObjectCreator.js\");\r\nvar GameObjectFactory = __webpack_require__(/*! ../../gameobjects/GameObjectFactory */ \"./node_modules/phaser/src/gameobjects/GameObjectFactory.js\");\r\nvar TWEEN_CONST = __webpack_require__(/*! ./const */ \"./node_modules/phaser/src/tweens/tween/const.js\");\r\n\r\n/**\r\n * @classdesc\r\n * A Tween is able to manipulate the properties of one or more objects to any given value, based\r\n * on a duration and type of ease. They are rarely instantiated directly and instead should be\r\n * created via the TweenManager.\r\n *\r\n * @class Tween\r\n * @memberof Phaser.Tweens\r\n * @extends Phaser.Events.EventEmitter\r\n * @constructor\r\n * @since 3.0.0\r\n *\r\n * @param {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)} parent - A reference to the parent of this Tween. Either the Tween Manager or a Tween Timeline instance.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig[]} data - An array of TweenData objects, each containing a unique property to be tweened.\r\n * @param {array} targets - An array of targets to be tweened.\r\n */\r\nvar Tween = new Class({\r\n\r\n Extends: EventEmitter,\r\n\r\n initialize:\r\n\r\n function Tween (parent, data, targets)\r\n {\r\n EventEmitter.call(this);\r\n\r\n /**\r\n * A reference to the parent of this Tween.\r\n * Either the Tween Manager or a Tween Timeline instance.\r\n *\r\n * @name Phaser.Tweens.Tween#parent\r\n * @type {(Phaser.Tweens.TweenManager|Phaser.Tweens.Timeline)}\r\n * @since 3.0.0\r\n */\r\n this.parent = parent;\r\n\r\n /**\r\n * Is the parent of this Tween a Timeline?\r\n *\r\n * @name Phaser.Tweens.Tween#parentIsTimeline\r\n * @type {boolean}\r\n * @since 3.0.0\r\n */\r\n this.parentIsTimeline = parent.hasOwnProperty('isTimeline');\r\n\r\n /**\r\n * An array of TweenData objects, each containing a unique property and target being tweened.\r\n *\r\n * @name Phaser.Tweens.Tween#data\r\n * @type {Phaser.Types.Tweens.TweenDataConfig[]}\r\n * @since 3.0.0\r\n */\r\n this.data = data;\r\n\r\n /**\r\n * The cached length of the data array.\r\n *\r\n * @name Phaser.Tweens.Tween#totalData\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalData = data.length;\r\n\r\n /**\r\n * An array of references to the target/s this Tween is operating on.\r\n *\r\n * @name Phaser.Tweens.Tween#targets\r\n * @type {object[]}\r\n * @since 3.0.0\r\n */\r\n this.targets = targets;\r\n\r\n /**\r\n * Cached target total (not necessarily the same as the data total)\r\n *\r\n * @name Phaser.Tweens.Tween#totalTargets\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.totalTargets = targets.length;\r\n\r\n /**\r\n * If `true` then duration, delay, etc values are all frame totals.\r\n *\r\n * @name Phaser.Tweens.Tween#useFrames\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.useFrames = false;\r\n\r\n /**\r\n * Scales the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n * Value isn't used when calculating total duration of the tween, it's a run-time delta adjustment only.\r\n *\r\n * @name Phaser.Tweens.Tween#timeScale\r\n * @type {number}\r\n * @default 1\r\n * @since 3.0.0\r\n */\r\n this.timeScale = 1;\r\n\r\n /**\r\n * Loop this tween? Can be -1 for an infinite loop, or an integer.\r\n * When enabled it will play through ALL TweenDatas again. Use TweenData.repeat to loop a single element.\r\n *\r\n * @name Phaser.Tweens.Tween#loop\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loop = 0;\r\n\r\n /**\r\n * Time in ms/frames before the tween loops.\r\n *\r\n * @name Phaser.Tweens.Tween#loopDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopDelay = 0;\r\n\r\n /**\r\n * How many loops are left to run?\r\n *\r\n * @name Phaser.Tweens.Tween#loopCounter\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.loopCounter = 0;\r\n\r\n /**\r\n * Time in ms/frames before the 'onStart' event fires.\r\n * This is the shortest `delay` value across all of the TweenDatas of this Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#startDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.19.0\r\n */\r\n this.startDelay = 0;\r\n\r\n /**\r\n * Has this Tween started playback yet?\r\n * This boolean is toggled when the Tween leaves the 'delayed' state and starts running.\r\n *\r\n * @name Phaser.Tweens.Tween#hasStarted\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.hasStarted = false;\r\n\r\n /**\r\n * Is this Tween currently seeking?\r\n * This boolean is toggled in the `Tween.seek` method.\r\n * When a tween is seeking it will not dispatch any events or callbacks.\r\n *\r\n * @name Phaser.Tweens.Tween#isSeeking\r\n * @type {boolean}\r\n * @readonly\r\n * @since 3.19.0\r\n */\r\n this.isSeeking = false;\r\n\r\n /**\r\n * Time in ms/frames before the 'onComplete' event fires. This never fires if loop = -1 (as it never completes)\r\n *\r\n * @name Phaser.Tweens.Tween#completeDelay\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.completeDelay = 0;\r\n\r\n /**\r\n * Countdown timer (used by timeline offset, loopDelay and completeDelay)\r\n *\r\n * @name Phaser.Tweens.Tween#countdown\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.countdown = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline.\r\n *\r\n * @name Phaser.Tweens.Tween#offset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.offset = 0;\r\n\r\n /**\r\n * Set only if this Tween is part of a Timeline. The calculated offset amount.\r\n *\r\n * @name Phaser.Tweens.Tween#calculatedOffset\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.calculatedOffset = 0;\r\n\r\n /**\r\n * The current state of the tween\r\n *\r\n * @name Phaser.Tweens.Tween#state\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n\r\n /**\r\n * The state of the tween when it was paused (used by Resume)\r\n *\r\n * @name Phaser.Tweens.Tween#_pausedState\r\n * @type {integer}\r\n * @private\r\n * @since 3.0.0\r\n */\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n /**\r\n * Does the Tween start off paused? (if so it needs to be started with Tween.play)\r\n *\r\n * @name Phaser.Tweens.Tween#paused\r\n * @type {boolean}\r\n * @default false\r\n * @since 3.0.0\r\n */\r\n this.paused = false;\r\n\r\n /**\r\n * Elapsed time in ms/frames of this run through the Tween.\r\n *\r\n * @name Phaser.Tweens.Tween#elapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.elapsed = 0;\r\n\r\n /**\r\n * Total elapsed time in ms/frames of the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalElapsed\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalElapsed = 0;\r\n\r\n /**\r\n * Time in ms/frames for the whole Tween to play through once, excluding loop amounts and loop delays.\r\n *\r\n * @name Phaser.Tweens.Tween#duration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.duration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the Tween, excluding loops.\r\n *\r\n * @name Phaser.Tweens.Tween#progress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.progress = 0;\r\n\r\n /**\r\n * Time in ms/frames for the Tween to complete (including looping)\r\n *\r\n * @name Phaser.Tweens.Tween#totalDuration\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalDuration = 0;\r\n\r\n /**\r\n * Value between 0 and 1. The amount through the entire Tween, including looping.\r\n *\r\n * @name Phaser.Tweens.Tween#totalProgress\r\n * @type {number}\r\n * @default 0\r\n * @since 3.0.0\r\n */\r\n this.totalProgress = 0;\r\n\r\n /**\r\n * An object containing the different Tween callback functions.\r\n * \r\n * You can either set these in the Tween config, or by calling the `Tween.setCallback` method.\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @name Phaser.Tweens.Tween#callbacks\r\n * @type {object}\r\n * @since 3.0.0\r\n */\r\n this.callbacks = {\r\n onActive: null,\r\n onComplete: null,\r\n onLoop: null,\r\n onRepeat: null,\r\n onStart: null,\r\n onUpdate: null,\r\n onYoyo: null\r\n };\r\n\r\n /**\r\n * The context in which all callbacks are invoked.\r\n *\r\n * @name Phaser.Tweens.Tween#callbackScope\r\n * @type {any}\r\n * @since 3.0.0\r\n */\r\n this.callbackScope;\r\n },\r\n\r\n /**\r\n * Returns the current value of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getValue\r\n * @since 3.0.0\r\n *\r\n * @return {number} The value of the Tween.\r\n */\r\n getValue: function ()\r\n {\r\n return this.data[0].current;\r\n },\r\n\r\n /**\r\n * Set the scale the time applied to this Tween. A value of 1 runs in real-time. A value of 0.5 runs 50% slower, and so on.\r\n *\r\n * @method Phaser.Tweens.Tween#setTimeScale\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The scale factor for timescale.\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n setTimeScale: function (value)\r\n {\r\n this.timeScale = value;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Returns the scale of the time applied to this Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#getTimeScale\r\n * @since 3.0.0\r\n *\r\n * @return {number} The timescale of this tween (between 0 and 1)\r\n */\r\n getTimeScale: function ()\r\n {\r\n return this.timeScale;\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently active.\r\n *\r\n * @method Phaser.Tweens.Tween#isPlaying\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is active, otherwise `false`.\r\n */\r\n isPlaying: function ()\r\n {\r\n return (this.state === TWEEN_CONST.ACTIVE);\r\n },\r\n\r\n /**\r\n * Checks if the Tween is currently paused.\r\n *\r\n * @method Phaser.Tweens.Tween#isPaused\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} `true` if the Tween is paused, otherwise `false`.\r\n */\r\n isPaused: function ()\r\n {\r\n return (this.state === TWEEN_CONST.PAUSED);\r\n },\r\n\r\n /**\r\n * See if this Tween is currently acting upon the given target.\r\n *\r\n * @method Phaser.Tweens.Tween#hasTarget\r\n * @since 3.0.0\r\n *\r\n * @param {object} target - The target to check against this Tween.\r\n *\r\n * @return {boolean} `true` if the given target is a target of this Tween, otherwise `false`.\r\n */\r\n hasTarget: function (target)\r\n {\r\n return (this.targets.indexOf(target) !== -1);\r\n },\r\n\r\n /**\r\n * Updates the value of a property of this Tween to a new value, without adjusting the\r\n * Tween duration or current progress.\r\n * \r\n * You can optionally tell it to set the 'start' value to be the current value (before the change).\r\n *\r\n * @method Phaser.Tweens.Tween#updateTo\r\n * @since 3.0.0\r\n *\r\n * @param {string} key - The property to set the new value for.\r\n * @param {*} value - The new value of the property.\r\n * @param {boolean} [startToCurrent=false] - Should this change set the start value to be the current value?\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n updateTo: function (key, value, startToCurrent)\r\n {\r\n if (startToCurrent === undefined) { startToCurrent = false; }\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (tweenData.key === key)\r\n {\r\n tweenData.end = value;\r\n\r\n if (startToCurrent)\r\n {\r\n tweenData.start = tweenData.current;\r\n }\r\n\r\n break;\r\n }\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Restarts the tween from the beginning.\r\n *\r\n * @method Phaser.Tweens.Tween#restart\r\n * @since 3.0.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n restart: function ()\r\n {\r\n // Reset these so they're ready for the next update\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n return this.seek(0);\r\n }\r\n else if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n else if (this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n return this;\r\n }\r\n else\r\n {\r\n return this.play();\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that calculates the overall duration of the Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#calcDuration\r\n * @since 3.0.0\r\n */\r\n calcDuration: function ()\r\n {\r\n var maxDuration = 0;\r\n var minDelay = Number.MAX_SAFE_INTEGER;\r\n\r\n var data = this.data;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n // Set t1 (duration + hold + yoyo)\r\n tweenData.t1 = tweenData.duration + tweenData.hold;\r\n\r\n if (tweenData.yoyo)\r\n {\r\n tweenData.t1 += tweenData.duration;\r\n }\r\n\r\n // Set t2 (repeatDelay + duration + hold + yoyo)\r\n tweenData.t2 = tweenData.t1 + tweenData.repeatDelay;\r\n\r\n // Total Duration\r\n tweenData.totalDuration = tweenData.delay + tweenData.t1;\r\n\r\n if (tweenData.repeat === -1)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * 999999999999);\r\n }\r\n else if (tweenData.repeat > 0)\r\n {\r\n tweenData.totalDuration += (tweenData.t2 * tweenData.repeat);\r\n }\r\n\r\n if (tweenData.totalDuration > maxDuration)\r\n {\r\n // Get the longest TweenData from the Tween, used to calculate the Tween TD\r\n maxDuration = tweenData.totalDuration;\r\n }\r\n\r\n if (tweenData.delay < minDelay)\r\n {\r\n minDelay = tweenData.delay;\r\n }\r\n }\r\n\r\n // Excludes loop values\r\n\r\n // If duration has been set to 0 then we give it a super-low value so that it always\r\n // renders at least 1 frame, but no more, without causing divided by zero errors elsewhere.\r\n this.duration = Math.max(maxDuration, 0.001);\r\n\r\n this.loopCounter = (this.loop === -1) ? 999999999999 : this.loop;\r\n\r\n if (this.loopCounter > 0)\r\n {\r\n this.totalDuration = this.duration + this.completeDelay + ((this.duration + this.loopDelay) * this.loopCounter);\r\n }\r\n else\r\n {\r\n this.totalDuration = this.duration + this.completeDelay;\r\n }\r\n\r\n // How long before this Tween starts playback?\r\n this.startDelay = minDelay;\r\n },\r\n\r\n /**\r\n * Called by TweenManager.preUpdate as part of its loop to check pending and active tweens.\r\n * Should not be called directly.\r\n *\r\n * @method Phaser.Tweens.Tween#init\r\n * @since 3.0.0\r\n *\r\n * @return {boolean} Returns `true` if this Tween should be moved from the pending list to the active list by the Tween Manager.\r\n */\r\n init: function ()\r\n {\r\n // You can't have a paused Tween if it's part of a Timeline\r\n if (this.paused && !this.parentIsTimeline)\r\n {\r\n this.state = TWEEN_CONST.PENDING_ADD;\r\n this._pausedState = TWEEN_CONST.INIT;\r\n\r\n return false;\r\n }\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n }\r\n\r\n this.calcDuration();\r\n\r\n this.progress = 0;\r\n this.totalProgress = 0;\r\n this.elapsed = 0;\r\n this.totalElapsed = 0;\r\n\r\n this.state = TWEEN_CONST.INIT;\r\n\r\n return true;\r\n },\r\n\r\n /**\r\n * Internal method that makes this Tween active within the TweenManager\r\n * and emits the onActive event and callback.\r\n *\r\n * @method Phaser.Tweens.Tween#makeActive\r\n * @fires Phaser.Tweens.Events#TWEEN_ACTIVE\r\n * @since 3.19.0\r\n */\r\n makeActive: function ()\r\n {\r\n this.parent.makeActive(this);\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_ACTIVE, this.callbacks.onActive);\r\n },\r\n\r\n /**\r\n * Internal method that advances to the next state of the Tween during playback.\r\n *\r\n * @method Phaser.Tweens.Tween#nextState\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @since 3.0.0\r\n */\r\n nextState: function ()\r\n {\r\n if (this.loopCounter > 0)\r\n {\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.loopCounter--;\r\n\r\n this.resetTweenData(true);\r\n\r\n if (this.loopDelay > 0)\r\n {\r\n this.countdown = this.loopDelay;\r\n this.state = TWEEN_CONST.LOOP_DELAY;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n }\r\n else if (this.completeDelay > 0)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = this.completeDelay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n },\r\n\r\n /**\r\n * Pauses the Tween immediately. Use `resume` to continue playback.\r\n *\r\n * @method Phaser.Tweens.Tween#pause\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n pause: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return this;\r\n }\r\n\r\n this.paused = true;\r\n\r\n this._pausedState = this.state;\r\n\r\n this.state = TWEEN_CONST.PAUSED;\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Starts a Tween playing.\r\n * \r\n * You only need to call this method if you have configured the tween to be paused on creation.\r\n * \r\n * If the Tween is already playing, calling this method again will have no effect. If you wish to\r\n * restart the Tween, use `Tween.restart` instead.\r\n * \r\n * Calling this method after the Tween has completed will start the Tween playing again from the start.\r\n * This is the same as calling `Tween.seek(0)` and then `Tween.play()`.\r\n *\r\n * @method Phaser.Tweens.Tween#play\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} [resetFromTimeline=false] - Is this Tween being played as part of a Timeline?\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n play: function (resetFromTimeline)\r\n {\r\n if (resetFromTimeline === undefined) { resetFromTimeline = false; }\r\n\r\n var state = this.state;\r\n\r\n if (state === TWEEN_CONST.INIT && !this.parentIsTimeline)\r\n {\r\n this.resetTweenData(false);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n return this;\r\n }\r\n else if (state === TWEEN_CONST.ACTIVE || (state === TWEEN_CONST.PENDING_ADD && this._pausedState === TWEEN_CONST.PENDING_ADD))\r\n {\r\n return this;\r\n }\r\n else if (!this.parentIsTimeline && (state === TWEEN_CONST.PENDING_REMOVE || state === TWEEN_CONST.REMOVED))\r\n {\r\n this.seek(0);\r\n this.parent.makeActive(this);\r\n\r\n return this;\r\n }\r\n\r\n if (this.parentIsTimeline)\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n if (this.calculatedOffset === 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n else\r\n {\r\n this.countdown = this.calculatedOffset;\r\n\r\n this.state = TWEEN_CONST.OFFSET_DELAY;\r\n }\r\n }\r\n else if (this.paused)\r\n {\r\n this.paused = false;\r\n\r\n this.makeActive();\r\n }\r\n else\r\n {\r\n this.resetTweenData(resetFromTimeline);\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.makeActive();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that resets all of the Tween Data, including the progress and elapsed values.\r\n *\r\n * @method Phaser.Tweens.Tween#resetTweenData\r\n * @since 3.0.0\r\n *\r\n * @param {boolean} resetFromLoop - Has this method been called as part of a loop?\r\n */\r\n resetTweenData: function (resetFromLoop)\r\n {\r\n var data = this.data;\r\n var total = this.totalData;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n var tweenData = data[i];\r\n\r\n var target = tweenData.target;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n if (resetFromLoop)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, key, tweenData.start, targetIndex, totalTargets, this);\r\n\r\n tweenData.end = tweenData.getEndValue(target, key, tweenData.end, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n\r\n if (tweenData.getActiveValue)\r\n {\r\n target[key] = tweenData.getActiveValue(tweenData.target, tweenData.key, tweenData.start);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Resumes the playback of a previously paused Tween.\r\n *\r\n * @method Phaser.Tweens.Tween#resume\r\n * @since 3.0.0\r\n *\r\n * @return {this} - This Tween instance.\r\n */\r\n resume: function ()\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n this.paused = false;\r\n\r\n this.state = this._pausedState;\r\n }\r\n else\r\n {\r\n this.play();\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Seeks to a specific point in the Tween.\r\n * \r\n * **Note:** You cannot seek a Tween that repeats or loops forever, or that has an unusually long total duration.\r\n * \r\n * The given position is a value between 0 and 1 which represents how far through the Tween to seek to.\r\n * A value of 0.5 would seek to half-way through the Tween, where-as a value of zero would seek to the start.\r\n * \r\n * Note that the seek takes the entire duration of the Tween into account, including delays, loops and repeats.\r\n * For example, a Tween that lasts for 2 seconds, but that loops 3 times, would have a total duration of 6 seconds,\r\n * so seeking to 0.5 would seek to 3 seconds into the Tween, as that's half-way through its _entire_ duration.\r\n * \r\n * Seeking works by resetting the Tween to its initial values and then iterating through the Tween at `delta`\r\n * jumps per step. The longer the Tween, the longer this can take.\r\n *\r\n * @method Phaser.Tweens.Tween#seek\r\n * @since 3.0.0\r\n *\r\n * @param {number} toPosition - A value between 0 and 1 which represents the progress point to seek to.\r\n * @param {number} [delta=16.6] - The size of each step when seeking through the Tween. A higher value completes faster but at a cost of less precision.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n seek: function (toPosition, delta)\r\n {\r\n if (delta === undefined) { delta = 16.6; }\r\n\r\n if (this.totalDuration >= 3600000)\r\n {\r\n console.warn('Tween.seek duration too long');\r\n\r\n return this;\r\n }\r\n\r\n if (this.state === TWEEN_CONST.REMOVED)\r\n {\r\n this.makeActive();\r\n }\r\n\r\n this.elapsed = 0;\r\n this.progress = 0;\r\n this.totalElapsed = 0;\r\n this.totalProgress = 0;\r\n\r\n var data = this.data;\r\n var totalTargets = this.totalTargets;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = data[i];\r\n var target = tweenData.target;\r\n var gen = tweenData.gen;\r\n var key = tweenData.key;\r\n var targetIndex = tweenData.index;\r\n\r\n tweenData.progress = 0;\r\n tweenData.elapsed = 0;\r\n\r\n tweenData.repeatCounter = (tweenData.repeat === -1) ? 999999999999 : tweenData.repeat;\r\n\r\n // Old function signature: i, totalTargets, target\r\n // New function signature: target, key, value, index, total, tween\r\n\r\n tweenData.delay = gen.delay(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.duration = Math.max(gen.duration(target, key, 0, targetIndex, totalTargets, this), 0.001);\r\n tweenData.hold = gen.hold(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeat = gen.repeat(target, key, 0, targetIndex, totalTargets, this);\r\n tweenData.repeatDelay = gen.repeatDelay(target, key, 0, targetIndex, totalTargets, this);\r\n\r\n tweenData.current = tweenData.start;\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.updateTweenData(this, tweenData, 0, targetIndex, totalTargets);\r\n\r\n if (tweenData.delay > 0)\r\n {\r\n tweenData.elapsed = tweenData.delay;\r\n tweenData.state = TWEEN_CONST.DELAY;\r\n }\r\n }\r\n\r\n this.calcDuration();\r\n\r\n var wasPaused = false;\r\n\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n wasPaused = true;\r\n\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n this.isSeeking = true;\r\n\r\n do\r\n {\r\n this.update(0, delta);\r\n\r\n } while (this.totalProgress < toPosition);\r\n\r\n this.isSeeking = false;\r\n\r\n if (wasPaused)\r\n {\r\n this.state = TWEEN_CONST.PAUSED;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Sets an event based callback to be invoked during playback.\r\n * \r\n * Calling this method will replace a previously set callback for the given type, if any exists.\r\n * \r\n * The types available are:\r\n * \r\n * `onActive` When the Tween is moved from the pending to the active list in the Tween Manager, even if playback paused.\r\n * `onStart` When the Tween starts playing after a delayed state. Will happen at the same time as `onActive` if it has no delay.\r\n * `onYoyo` When a TweenData starts a yoyo. This happens _after_ the `hold` delay expires, if set.\r\n * `onRepeat` When a TweenData repeats playback. This happens _after_ the `repeatDelay` expires, if set.\r\n * `onComplete` When the Tween finishes playback fully or `Tween.stop` is called. Never invoked if tween is set to repeat infinitely.\r\n * `onUpdate` When a TweenData updates a property on a source target during playback.\r\n * `onLoop` When a Tween loops. This happens _after_ the `loopDelay` expires, if set.\r\n *\r\n * @method Phaser.Tweens.Tween#setCallback\r\n * @since 3.0.0\r\n *\r\n * @param {string} type - Type of the callback to set.\r\n * @param {function} callback - The function to invoke when this callback happens.\r\n * @param {array} [params] - An array of parameters for specified callbacks types.\r\n * @param {any} [scope] - The context the callback will be invoked in.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n setCallback: function (type, callback, params, scope)\r\n {\r\n this.callbacks[type] = { func: callback, scope: scope, params: params };\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Flags the Tween as being complete, whatever stage of progress it is at.\r\n *\r\n * If an onComplete callback has been defined it will automatically invoke it, unless a `delay`\r\n * argument is provided, in which case the Tween will delay for that period of time before calling the callback.\r\n *\r\n * If you don't need a delay, or have an onComplete callback, then call `Tween.stop` instead.\r\n *\r\n * @method Phaser.Tweens.Tween#complete\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @since 3.2.0\r\n *\r\n * @param {number} [delay=0] - The time to wait before invoking the complete callback. If zero it will fire immediately.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n complete: function (delay)\r\n {\r\n if (delay === undefined) { delay = 0; }\r\n\r\n if (delay)\r\n {\r\n this.state = TWEEN_CONST.COMPLETE_DELAY;\r\n\r\n this.countdown = delay;\r\n }\r\n else\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Immediately removes this Tween from the TweenManager and all of its internal arrays,\r\n * no matter what stage it as it. Then sets the tween state to `REMOVED`.\r\n * \r\n * You should dispose of your reference to this tween after calling this method, to\r\n * free it from memory.\r\n *\r\n * @method Phaser.Tweens.Tween#remove\r\n * @since 3.17.0\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n remove: function ()\r\n {\r\n this.parent.remove(this);\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Stops the Tween immediately, whatever stage of progress it is at and flags it for removal by the TweenManager.\r\n *\r\n * @method Phaser.Tweens.Tween#stop\r\n * @since 3.0.0\r\n *\r\n * @param {number} [resetTo] - If you want to seek the tween, provide a value between 0 and 1.\r\n *\r\n * @return {this} This Tween instance.\r\n */\r\n stop: function (resetTo)\r\n {\r\n if (this.state === TWEEN_CONST.ACTIVE)\r\n {\r\n if (resetTo !== undefined)\r\n {\r\n this.seek(resetTo);\r\n }\r\n }\r\n\r\n if (this.state !== TWEEN_CONST.REMOVED)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED || this.state === TWEEN_CONST.PENDING_ADD)\r\n {\r\n if (this.parentIsTimeline)\r\n {\r\n this.parent.manager._destroy.push(this);\r\n this.parent.manager._toProcess++;\r\n }\r\n else\r\n {\r\n this.parent._destroy.push(this);\r\n this.parent._toProcess++;\r\n }\r\n }\r\n\r\n this.removeAllListeners();\r\n\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n }\r\n\r\n return this;\r\n },\r\n\r\n /**\r\n * Internal method that advances the Tween based on the time values.\r\n *\r\n * @method Phaser.Tweens.Tween#update\r\n * @fires Phaser.Tweens.Events#TWEEN_COMPLETE\r\n * @fires Phaser.Tweens.Events#TWEEN_LOOP\r\n * @fires Phaser.Tweens.Events#TWEEN_START\r\n * @since 3.0.0\r\n *\r\n * @param {number} timestamp - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout.\r\n * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate.\r\n *\r\n * @return {boolean} Returns `true` if this Tween has finished and should be removed from the Tween Manager, otherwise returns `false`.\r\n */\r\n update: function (timestamp, delta)\r\n {\r\n if (this.state === TWEEN_CONST.PAUSED)\r\n {\r\n return false;\r\n }\r\n\r\n if (this.useFrames)\r\n {\r\n delta = 1 * this.parent.timeScale;\r\n }\r\n\r\n delta *= this.timeScale;\r\n\r\n this.elapsed += delta;\r\n this.progress = Math.min(this.elapsed / this.duration, 1);\r\n\r\n this.totalElapsed += delta;\r\n this.totalProgress = Math.min(this.totalElapsed / this.totalDuration, 1);\r\n\r\n switch (this.state)\r\n {\r\n case TWEEN_CONST.ACTIVE:\r\n\r\n if (!this.hasStarted && !this.isSeeking)\r\n {\r\n this.startDelay -= delta;\r\n \r\n if (this.startDelay <= 0)\r\n {\r\n this.hasStarted = true;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_START, this.callbacks.onStart);\r\n }\r\n }\r\n\r\n var stillRunning = false;\r\n\r\n for (var i = 0; i < this.totalData; i++)\r\n {\r\n var tweenData = this.data[i];\r\n\r\n if (this.updateTweenData(this, tweenData, delta))\r\n {\r\n stillRunning = true;\r\n }\r\n }\r\n\r\n // Anything still running? If not, we're done\r\n if (!stillRunning)\r\n {\r\n this.nextState();\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.LOOP_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_LOOP, this.callbacks.onLoop);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.OFFSET_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.ACTIVE;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.COMPLETE_DELAY:\r\n\r\n this.countdown -= delta;\r\n\r\n if (this.countdown <= 0)\r\n {\r\n this.state = TWEEN_CONST.PENDING_REMOVE;\r\n\r\n this.dispatchTweenEvent(Events.TWEEN_COMPLETE, this.callbacks.onComplete);\r\n }\r\n\r\n break;\r\n }\r\n\r\n return (this.state === TWEEN_CONST.PENDING_REMOVE);\r\n },\r\n\r\n /**\r\n * Internal method that will emit a TweenData based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenDataEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData object that caused this event.\r\n */\r\n dispatchTweenDataEvent: function (event, callback, tweenData)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, tweenData.key, tweenData.target);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = tweenData.target;\r\n\r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method that will emit a Tween based Event and invoke the given callback.\r\n *\r\n * @method Phaser.Tweens.Tween#dispatchTweenEvent\r\n * @since 3.19.0\r\n *\r\n * @param {Phaser.Types.Tweens.Event} event - The Event to be dispatched.\r\n * @param {function} callback - The callback to be invoked. Can be `null` or `undefined` to skip invocation.\r\n */\r\n dispatchTweenEvent: function (event, callback)\r\n {\r\n if (!this.isSeeking)\r\n {\r\n this.emit(event, this, this.targets);\r\n\r\n if (callback)\r\n {\r\n callback.params[1] = this.targets;\r\n \r\n callback.func.apply(callback.scope, callback.params);\r\n }\r\n }\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play in reverse.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromEnd\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @fires Phaser.Tweens.Events#TWEEN_YOYO\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromEnd: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.yoyo)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a yoyo\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_YOYO, tween.callbacks.onYoyo, tweenData);\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n return TWEEN_CONST.PLAYING_BACKWARD;\r\n }\r\n else if (tweenData.repeatCounter > 0)\r\n {\r\n // We've hit the end of a Playing Forward TweenData and we have a Repeat.\r\n // So we're going to go right back to the start to repeat it again.\r\n\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.start = tweenData.getStartValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method used as part of the playback process that sets a tween to play from the start.\r\n *\r\n * @method Phaser.Tweens.Tween#setStateFromStart\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} diff - Any extra time that needs to be accounted for in the elapsed and progress values.\r\n *\r\n * @return {integer} The state of this Tween.\r\n */\r\n setStateFromStart: function (tween, tweenData, diff)\r\n {\r\n if (tweenData.repeatCounter > 0)\r\n {\r\n tweenData.repeatCounter--;\r\n\r\n // Account for any extra time we got from the previous frame\r\n tweenData.elapsed = diff;\r\n tweenData.progress = diff / tweenData.duration;\r\n\r\n if (tweenData.flipX)\r\n {\r\n tweenData.target.toggleFlipX();\r\n }\r\n\r\n if (tweenData.flipY)\r\n {\r\n tweenData.target.toggleFlipY();\r\n }\r\n\r\n tweenData.end = tweenData.getEndValue(tweenData.target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n // Delay?\r\n if (tweenData.repeatDelay > 0)\r\n {\r\n tweenData.elapsed = tweenData.repeatDelay - diff;\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n tweenData.target[tweenData.key] = tweenData.current;\r\n\r\n return TWEEN_CONST.REPEAT_DELAY;\r\n }\r\n else\r\n {\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n\r\n return TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n }\r\n\r\n return TWEEN_CONST.COMPLETE;\r\n },\r\n\r\n /**\r\n * Internal method that advances the TweenData based on the time value given.\r\n *\r\n * @method Phaser.Tweens.Tween#updateTweenData\r\n * @fires Phaser.Tweens.Events#TWEEN_UPDATE\r\n * @fires Phaser.Tweens.Events#TWEEN_REPEAT\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Tweens.Tween} tween - The Tween to update.\r\n * @param {Phaser.Types.Tweens.TweenDataConfig} tweenData - The TweenData property to update.\r\n * @param {number} delta - Either a value in ms, or 1 if Tween.useFrames is true.\r\n *\r\n * @return {boolean} True if the tween is not complete (e.g., playing), or false if the tween is complete.\r\n */\r\n updateTweenData: function (tween, tweenData, delta)\r\n {\r\n var target = tweenData.target;\r\n\r\n switch (tweenData.state)\r\n {\r\n case TWEEN_CONST.PLAYING_FORWARD:\r\n case TWEEN_CONST.PLAYING_BACKWARD:\r\n\r\n if (!target)\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n break;\r\n }\r\n\r\n var elapsed = tweenData.elapsed;\r\n var duration = tweenData.duration;\r\n var diff = 0;\r\n\r\n elapsed += delta;\r\n\r\n if (elapsed > duration)\r\n {\r\n diff = elapsed - duration;\r\n elapsed = duration;\r\n }\r\n\r\n var forward = (tweenData.state === TWEEN_CONST.PLAYING_FORWARD);\r\n var progress = elapsed / duration;\r\n\r\n tweenData.elapsed = elapsed;\r\n tweenData.progress = progress;\r\n\r\n if (progress === 1)\r\n {\r\n if (forward)\r\n {\r\n tweenData.current = tweenData.end;\r\n target[tweenData.key] = tweenData.end;\r\n\r\n if (tweenData.hold > 0)\r\n {\r\n tweenData.elapsed = tweenData.hold - diff;\r\n\r\n tweenData.state = TWEEN_CONST.HOLD_DELAY;\r\n }\r\n else\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n tweenData.current = tweenData.start;\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = this.setStateFromStart(tween, tweenData, diff);\r\n }\r\n }\r\n else\r\n {\r\n var v = (forward) ? tweenData.ease(progress) : tweenData.ease(1 - progress);\r\n\r\n tweenData.current = tweenData.start + ((tweenData.end - tweenData.start) * v);\r\n\r\n target[tweenData.key] = tweenData.current;\r\n }\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_UPDATE, tween.callbacks.onUpdate, tweenData);\r\n\r\n break;\r\n\r\n case TWEEN_CONST.DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PENDING_RENDER;\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.REPEAT_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.elapsed = Math.abs(tweenData.elapsed);\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n\r\n this.dispatchTweenDataEvent(Events.TWEEN_REPEAT, tween.callbacks.onRepeat, tweenData);\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.HOLD_DELAY:\r\n\r\n tweenData.elapsed -= delta;\r\n\r\n if (tweenData.elapsed <= 0)\r\n {\r\n tweenData.state = this.setStateFromEnd(tween, tweenData, Math.abs(tweenData.elapsed));\r\n }\r\n\r\n break;\r\n\r\n case TWEEN_CONST.PENDING_RENDER:\r\n\r\n if (target)\r\n {\r\n tweenData.start = tweenData.getStartValue(target, tweenData.key, target[tweenData.key], tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.end = tweenData.getEndValue(target, tweenData.key, tweenData.start, tweenData.index, tween.totalTargets, tween);\r\n\r\n tweenData.current = tweenData.start;\r\n\r\n target[tweenData.key] = tweenData.start;\r\n\r\n tweenData.state = TWEEN_CONST.PLAYING_FORWARD;\r\n }\r\n else\r\n {\r\n tweenData.state = TWEEN_CONST.COMPLETE;\r\n }\r\n\r\n break;\r\n }\r\n\r\n // Return TRUE if this TweenData still playing, otherwise return FALSE\r\n return (tweenData.state !== TWEEN_CONST.COMPLETE);\r\n }\r\n\r\n});\r\n\r\n// onActive = 'active' event = When the Tween is moved from the pending to the active list in the manager, even if playback delayed\r\n// onStart = 'start' event = When the Tween starts playing from a delayed state (will happen same time as onActive if no delay)\r\n// onYoyo = 'yoyo' event = When the Tween starts a yoyo\r\n// onRepeat = 'repeat' event = When a TweenData repeats playback (if any)\r\n// onComplete = 'complete' event = When the Tween finishes all playback (can sometimes never happen if repeat -1), also when 'stop' called\r\n// onUpdate = 'update' event = When the Tween updates a TweenData during playback (expensive!)\r\n// onLoop = 'loop' event = Used to loop ALL TweenDatas in a Tween\r\n\r\nTween.TYPES = [\r\n 'onActive',\r\n 'onComplete',\r\n 'onLoop',\r\n 'onRepeat',\r\n 'onStart',\r\n 'onUpdate',\r\n 'onYoyo'\r\n];\r\n\r\n/**\r\n * Creates a new Tween object.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectFactory#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectFactory.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.add(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectFactory context.\r\n//\r\n// There are several properties available to use:\r\n//\r\n// this.scene - a reference to the Scene that owns the GameObjectFactory\r\n// this.displayList - a reference to the Display List the Scene owns\r\n// this.updateList - a reference to the Update List the Scene owns\r\n\r\n/**\r\n * Creates a new Tween object and returns it.\r\n *\r\n * Note: This method will only be available if Tweens have been built into Phaser.\r\n *\r\n * @method Phaser.GameObjects.GameObjectCreator#tween\r\n * @since 3.0.0\r\n *\r\n * @param {Phaser.Types.Tweens.TweenBuilderConfig|object} config - The Tween configuration.\r\n *\r\n * @return {Phaser.Tweens.Tween} The Tween that was created.\r\n */\r\nGameObjectCreator.register('tween', function (config)\r\n{\r\n return this.scene.sys.tweens.create(config);\r\n});\r\n\r\n// When registering a factory function 'this' refers to the GameObjectCreator context.\r\n\r\nmodule.exports = Tween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/Tween.js?")},"./node_modules/phaser/src/tweens/tween/TweenData.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a TweenDataConfig object that describes the tween data for a unique property of a unique target.\r\n * A single Tween consists of multiple TweenDatas, depending on how many properties are being changed by the Tween.\r\n *\r\n * This is an internal function used by the TweenBuilder and should not be accessed directly, instead,\r\n * Tweens should be created using the GameObjectFactory or GameObjectCreator.\r\n *\r\n * @function Phaser.Tweens.TweenData\r\n * @since 3.0.0\r\n *\r\n * @param {any} target - The target to tween.\r\n * @param {integer} index - The target index within the Tween targets array.\r\n * @param {string} key - The property of the target to tween.\r\n * @param {function} getEnd - What the property will be at the END of the Tween.\r\n * @param {function} getStart - What the property will be at the START of the Tween.\r\n * @param {?function} getActive - If not null, is invoked _immediately_ as soon as the TweenData is running, and is set on the target property.\r\n * @param {function} ease - The ease function this tween uses.\r\n * @param {number} delay - Time in ms/frames before tween will start.\r\n * @param {number} duration - Duration of the tween in ms/frames.\r\n * @param {boolean} yoyo - Determines whether the tween should return back to its start value after hold has expired.\r\n * @param {number} hold - Time in ms/frames the tween will pause before repeating or returning to its starting value if yoyo is set to true.\r\n * @param {number} repeat - Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n * @param {number} repeatDelay - Time in ms/frames before the repeat will start.\r\n * @param {boolean} flipX - Should toggleFlipX be called when yoyo or repeat happens?\r\n * @param {boolean} flipY - Should toggleFlipY be called when yoyo or repeat happens?\r\n *\r\n * @return {Phaser.Types.Tweens.TweenDataConfig} The config object describing this TweenData.\r\n */\r\nvar TweenData = function (target, index, key, getEnd, getStart, getActive, ease, delay, duration, yoyo, hold, repeat, repeatDelay, flipX, flipY)\r\n{\r\n return {\r\n\r\n // The target to tween\r\n target: target,\r\n\r\n // The index of the target within the tween targets array\r\n index: index,\r\n\r\n // The property of the target to tween\r\n key: key,\r\n\r\n // What to set the property to the moment the TweenData is invoked.\r\n getActiveValue: getActive,\r\n\r\n // The returned value sets what the property will be at the END of the Tween.\r\n getEndValue: getEnd,\r\n\r\n // The returned value sets what the property will be at the START of the Tween.\r\n getStartValue: getStart,\r\n\r\n // The ease function this tween uses.\r\n ease: ease,\r\n\r\n // Duration of the tween in ms/frames, excludes time for yoyo or repeats.\r\n duration: 0,\r\n\r\n // The total calculated duration of this TweenData (based on duration, repeat, delay and yoyo)\r\n totalDuration: 0,\r\n\r\n // Time in ms/frames before tween will start.\r\n delay: 0,\r\n\r\n // Cause the tween to return back to its start value after hold has expired.\r\n yoyo: yoyo,\r\n\r\n // Time in ms/frames the tween will pause before running the yoyo or starting a repeat.\r\n hold: 0,\r\n\r\n // Number of times to repeat the tween. The tween will always run once regardless, so a repeat value of '1' will play the tween twice.\r\n repeat: 0,\r\n\r\n // Time in ms/frames before the repeat will start.\r\n repeatDelay: 0,\r\n\r\n // Automatically call toggleFlipX when the TweenData yoyos or repeats\r\n flipX: flipX,\r\n\r\n // Automatically call toggleFlipY when the TweenData yoyos or repeats\r\n flipY: flipY,\r\n\r\n // Between 0 and 1 showing completion of this TweenData.\r\n progress: 0,\r\n\r\n // Delta counter.\r\n elapsed: 0,\r\n\r\n // How many repeats are left to run?\r\n repeatCounter: 0,\r\n\r\n // Ease Value Data:\r\n\r\n start: 0,\r\n current: 0,\r\n end: 0,\r\n\r\n // Time Durations\r\n t1: 0,\r\n t2: 0,\r\n\r\n // LoadValue generation functions\r\n gen: {\r\n delay: delay,\r\n duration: duration,\r\n hold: hold,\r\n repeat: repeat,\r\n repeatDelay: repeatDelay\r\n },\r\n\r\n // TWEEN_CONST.CREATED\r\n state: 0\r\n };\r\n};\r\n\r\nmodule.exports = TweenData;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/TweenData.js?")},"./node_modules/phaser/src/tweens/tween/const.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar TWEEN_CONST = {\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.CREATED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n CREATED: 0,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.INIT\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n INIT: 1,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n DELAY: 2,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.OFFSET_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n OFFSET_DELAY: 3,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PENDING_RENDER\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_RENDER: 4,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_FORWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_FORWARD: 5,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.PLAYING_BACKWARD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PLAYING_BACKWARD: 6,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.HOLD_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n HOLD_DELAY: 7,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.REPEAT_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REPEAT_DELAY: 8,\r\n\r\n /**\r\n * TweenData state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE: 9,\r\n\r\n // Tween specific (starts from 20 to cleanly allow extra TweenData consts in the future)\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_ADD\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_ADD: 20,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PAUSED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PAUSED: 21,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.LOOP_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n LOOP_DELAY: 22,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.ACTIVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n ACTIVE: 23,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.COMPLETE_DELAY\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n COMPLETE_DELAY: 24,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.PENDING_REMOVE\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n PENDING_REMOVE: 25,\r\n\r\n /**\r\n * Tween state.\r\n * \r\n * @name Phaser.Tweens.REMOVED\r\n * @type {integer}\r\n * @since 3.0.0\r\n */\r\n REMOVED: 26\r\n\r\n};\r\n\r\nmodule.exports = TWEEN_CONST;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/tweens/tween/const.js?")},"./node_modules/phaser/src/utils/Class.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Taken from klasse by mattdesl https://github.com/mattdesl/klasse\r\n\r\nfunction hasGetterOrSetter (def)\r\n{\r\n return (!!def.get && typeof def.get === 'function') || (!!def.set && typeof def.set === 'function');\r\n}\r\n\r\nfunction getProperty (definition, k, isClassDescriptor)\r\n{\r\n // This may be a lightweight object, OR it might be a property that was defined previously.\r\n\r\n // For simple class descriptors we can just assume its NOT previously defined.\r\n var def = (isClassDescriptor) ? definition[k] : Object.getOwnPropertyDescriptor(definition, k);\r\n\r\n if (!isClassDescriptor && def.value && typeof def.value === 'object')\r\n {\r\n def = def.value;\r\n }\r\n\r\n // This might be a regular property, or it may be a getter/setter the user defined in a class.\r\n if (def && hasGetterOrSetter(def))\r\n {\r\n if (typeof def.enumerable === 'undefined')\r\n {\r\n def.enumerable = true;\r\n }\r\n\r\n if (typeof def.configurable === 'undefined')\r\n {\r\n def.configurable = true;\r\n }\r\n\r\n return def;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}\r\n\r\nfunction hasNonConfigurable (obj, k)\r\n{\r\n var prop = Object.getOwnPropertyDescriptor(obj, k);\r\n\r\n if (!prop)\r\n {\r\n return false;\r\n }\r\n\r\n if (prop.value && typeof prop.value === 'object')\r\n {\r\n prop = prop.value;\r\n }\r\n\r\n if (prop.configurable === false)\r\n {\r\n return true;\r\n }\r\n\r\n return false;\r\n}\r\n\r\n/**\r\n * Extends the given `myClass` object's prototype with the properties of `definition`.\r\n *\r\n * @function extend\r\n * @param {Object} ctor The constructor object to mix into.\r\n * @param {Object} definition A dictionary of functions for the class.\r\n * @param {boolean} isClassDescriptor Is the definition a class descriptor?\r\n * @param {Object} [extend] The parent constructor object.\r\n */\r\nfunction extend (ctor, definition, isClassDescriptor, extend)\r\n{\r\n for (var k in definition)\r\n {\r\n if (!definition.hasOwnProperty(k))\r\n {\r\n continue;\r\n }\r\n\r\n var def = getProperty(definition, k, isClassDescriptor);\r\n\r\n if (def !== false)\r\n {\r\n // If Extends is used, we will check its prototype to see if the final variable exists.\r\n\r\n var parent = extend || ctor;\r\n\r\n if (hasNonConfigurable(parent.prototype, k))\r\n {\r\n // Just skip the final property\r\n if (Class.ignoreFinals)\r\n {\r\n continue;\r\n }\r\n\r\n // We cannot re-define a property that is configurable=false.\r\n // So we will consider them final and throw an error. This is by\r\n // default so it is clear to the developer what is happening.\r\n // You can set ignoreFinals to true if you need to extend a class\r\n // which has configurable=false; it will simply not re-define final properties.\r\n throw new Error('cannot override final property \\'' + k + '\\', set Class.ignoreFinals = true to skip');\r\n }\r\n\r\n Object.defineProperty(ctor.prototype, k, def);\r\n }\r\n else\r\n {\r\n ctor.prototype[k] = definition[k];\r\n }\r\n }\r\n}\r\n\r\n/**\r\n * Applies the given `mixins` to the prototype of `myClass`.\r\n *\r\n * @function mixin\r\n * @param {Object} myClass The constructor object to mix into.\r\n * @param {Object|Array} mixins The mixins to apply to the constructor.\r\n */\r\nfunction mixin (myClass, mixins)\r\n{\r\n if (!mixins)\r\n {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(mixins))\r\n {\r\n mixins = [ mixins ];\r\n }\r\n\r\n for (var i = 0; i < mixins.length; i++)\r\n {\r\n extend(myClass, mixins[i].prototype || mixins[i]);\r\n }\r\n}\r\n\r\n/**\r\n * Creates a new class with the given descriptor.\r\n * The constructor, defined by the name `initialize`,\r\n * is an optional function. If unspecified, an anonymous\r\n * function will be used which calls the parent class (if\r\n * one exists).\r\n *\r\n * You can also use `Extends` and `Mixins` to provide subclassing\r\n * and inheritance.\r\n *\r\n * @class Phaser.Class\r\n * @constructor\r\n * @param {Object} definition a dictionary of functions for the class\r\n * @example\r\n *\r\n * var MyClass = new Phaser.Class({\r\n *\r\n * initialize: function() {\r\n * this.foo = 2.0;\r\n * },\r\n *\r\n * bar: function() {\r\n * return this.foo + 5;\r\n * }\r\n * });\r\n */\r\nfunction Class (definition)\r\n{\r\n if (!definition)\r\n {\r\n definition = {};\r\n }\r\n\r\n // The variable name here dictates what we see in Chrome debugger\r\n var initialize;\r\n var Extends;\r\n\r\n if (definition.initialize)\r\n {\r\n if (typeof definition.initialize !== 'function')\r\n {\r\n throw new Error('initialize must be a function');\r\n }\r\n\r\n initialize = definition.initialize;\r\n\r\n // Usually we should avoid 'delete' in V8 at all costs.\r\n // However, its unlikely to make any performance difference\r\n // here since we only call this on class creation (i.e. not object creation).\r\n delete definition.initialize;\r\n }\r\n else if (definition.Extends)\r\n {\r\n var base = definition.Extends;\r\n\r\n initialize = function ()\r\n {\r\n base.apply(this, arguments);\r\n };\r\n }\r\n else\r\n {\r\n initialize = function () {};\r\n }\r\n\r\n if (definition.Extends)\r\n {\r\n initialize.prototype = Object.create(definition.Extends.prototype);\r\n initialize.prototype.constructor = initialize;\r\n\r\n // For getOwnPropertyDescriptor to work, we need to act directly on the Extends (or Mixin)\r\n\r\n Extends = definition.Extends;\r\n\r\n delete definition.Extends;\r\n }\r\n else\r\n {\r\n initialize.prototype.constructor = initialize;\r\n }\r\n\r\n // Grab the mixins, if they are specified...\r\n var mixins = null;\r\n\r\n if (definition.Mixins)\r\n {\r\n mixins = definition.Mixins;\r\n delete definition.Mixins;\r\n }\r\n\r\n // First, mixin if we can.\r\n mixin(initialize, mixins);\r\n\r\n // Now we grab the actual definition which defines the overrides.\r\n extend(initialize, definition, true, Extends);\r\n\r\n return initialize;\r\n}\r\n\r\nClass.extend = extend;\r\nClass.mixin = mixin;\r\nClass.ignoreFinals = false;\r\n\r\nmodule.exports = Class;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/Class.js?")},"./node_modules/phaser/src/utils/NOOP.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * A NOOP (No Operation) callback function.\r\n *\r\n * Used internally by Phaser when it's more expensive to determine if a callback exists\r\n * than it is to just invoke an empty function.\r\n *\r\n * @function Phaser.Utils.NOOP\r\n * @since 3.0.0\r\n */\r\nvar NOOP = function ()\r\n{\r\n // NOOP\r\n};\r\n\r\nmodule.exports = NOOP;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/NOOP.js?")},"./node_modules/phaser/src/utils/array/Add.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array.\r\n *\r\n * Each item must be unique within the array.\r\n *\r\n * The array is modified in-place and returned.\r\n *\r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n *\r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.Add\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array. Each item must be unique within the array.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Add = function (array, item, limit, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.push(item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.splice(itemLength, 1);\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = 0; i < itemLength; i++)\r\n {\r\n var entry = item[i];\r\n\r\n array.push(entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Add;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Add.js?")},"./node_modules/phaser/src/utils/array/AddAt.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Adds the given item, or array of items, to the array starting at the index specified.\r\n * \r\n * Each item must be unique within the array.\r\n * \r\n * Existing elements in the array are shifted up.\r\n * \r\n * The array is modified in-place and returned.\r\n * \r\n * You can optionally specify a limit to the maximum size of the array. If the quantity of items being\r\n * added will take the array length over this limit, it will stop adding once the limit is reached.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully added to the array.\r\n *\r\n * @function Phaser.Utils.Array.AddAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be added to.\r\n * @param {any|any[]} item - The item, or array of items, to add to the array.\r\n * @param {integer} [index=0] - The index in the array where the item will be inserted.\r\n * @param {integer} [limit] - Optional limit which caps the size of the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully added to the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar AddAt = function (array, item, index, limit, callback, context)\r\n{\r\n if (index === undefined) { index = 0; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (limit > 0)\r\n {\r\n var remaining = limit - array.length;\r\n\r\n // There's nothing more we can do here, the array is full\r\n if (remaining <= 0)\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n if (array.indexOf(item) === -1)\r\n {\r\n array.splice(index, 0, item);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to insert\r\n\r\n // Ensure all the items are unique\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n if (array.indexOf(item[itemLength]) !== -1)\r\n {\r\n // Already exists in array, so remove it\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n // Anything left?\r\n itemLength = item.length;\r\n\r\n if (itemLength === 0)\r\n {\r\n return null;\r\n }\r\n\r\n // Truncate to the limit\r\n if (limit > 0 && itemLength > remaining)\r\n {\r\n item.splice(remaining);\r\n\r\n itemLength = remaining;\r\n }\r\n\r\n for (var i = itemLength - 1; i >= 0; i--)\r\n {\r\n var entry = item[i];\r\n\r\n array.splice(index, 0, entry);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = AddAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/AddAt.js?")},"./node_modules/phaser/src/utils/array/BringToTop.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the top of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.BringToTop\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar BringToTop = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.push(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = BringToTop;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/BringToTop.js?")},"./node_modules/phaser/src/utils/array/CountAllMatching.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Returns the total number of elements in the array which have a property matching the given value.\r\n *\r\n * @function Phaser.Utils.Array.CountAllMatching\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test on each array element.\r\n * @param {*} value - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {integer} The total number of elements with properties matching the given value.\r\n */\r\nvar CountAllMatching = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var total = 0;\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (child[property] === value)\r\n {\r\n total++;\r\n }\r\n }\r\n }\r\n\r\n return total;\r\n};\r\n\r\nmodule.exports = CountAllMatching;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/CountAllMatching.js?')},"./node_modules/phaser/src/utils/array/Each.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Passes each element in the array to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.Each\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the current array item.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Each = function (array, callback, context)\r\n{\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 3; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = 0; i < array.length; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Each;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Each.js?")},"./node_modules/phaser/src/utils/array/EachInRange.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Passes each element in the array, between the start and end indexes, to the given callback.\r\n *\r\n * @function Phaser.Utils.Array.EachInRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {function} callback - A callback to be invoked for each item in the array.\r\n * @param {object} context - The context in which the callback is invoked.\r\n * @param {integer} startIndex - The start index to search from.\r\n * @param {integer} endIndex - The end index to search to.\r\n * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar EachInRange = function (array, callback, context, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var i;\r\n var args = [ null ];\r\n\r\n for (i = 5; i < arguments.length; i++)\r\n {\r\n args.push(arguments[i]);\r\n }\r\n\r\n for (i = startIndex; i < endIndex; i++)\r\n {\r\n args[0] = array[i];\r\n\r\n callback.apply(context, args);\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = EachInRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/EachInRange.js?')},"./node_modules/phaser/src/utils/array/FindClosestInSorted.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Searches a pre-sorted array for the closet value to the given number.\r\n *\r\n * If the `key` argument is given it will assume the array contains objects that all have the required `key` property name,\r\n * and will check for the closest value of those to the given number.\r\n *\r\n * @function Phaser.Utils.Array.FindClosestInSorted\r\n * @since 3.0.0\r\n *\r\n * @param {number} value - The value to search for in the array.\r\n * @param {array} array - The array to search, which must be sorted.\r\n * @param {string} [key] - An optional property key. If specified the array elements property will be checked against value.\r\n *\r\n * @return {(number|any)} The nearest value found in the array, or if a `key` was given, the nearest object with the matching property value.\r\n */\r\nvar FindClosestInSorted = function (value, array, key)\r\n{\r\n if (!array.length)\r\n {\r\n return NaN;\r\n }\r\n else if (array.length === 1)\r\n {\r\n return array[0];\r\n }\r\n\r\n var i = 1;\r\n var low;\r\n var high;\r\n\r\n if (key)\r\n {\r\n if (value < array[0][key])\r\n {\r\n return array[0];\r\n }\r\n\r\n while (array[i][key] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n else\r\n {\r\n while (array[i] < value)\r\n {\r\n i++;\r\n }\r\n }\r\n\r\n if (i > array.length)\r\n {\r\n i = array.length;\r\n }\r\n\r\n if (key)\r\n {\r\n low = array[i - 1][key];\r\n high = array[i][key];\r\n\r\n return ((high - value) <= (value - low)) ? array[i] : array[i - 1];\r\n }\r\n else\r\n {\r\n low = array[i - 1];\r\n high = array[i];\r\n\r\n return ((high - value) <= (value - low)) ? high : low;\r\n }\r\n};\r\n\r\nmodule.exports = FindClosestInSorted;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/FindClosestInSorted.js?")},"./node_modules/phaser/src/utils/array/GetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns all elements in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return only elements that have their visible property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only\r\n * the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} All matching elements from the array.\r\n */\r\nvar GetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n var output = [];\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n output.push(child);\r\n }\r\n }\r\n }\r\n\r\n return output;\r\n};\r\n\r\nmodule.exports = GetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetAll.js?")},"./node_modules/phaser/src/utils/array/GetFirst.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Returns the first element in the array.\r\n *\r\n * You can optionally specify a matching criteria using the `property` and `value` arguments.\r\n *\r\n * For example: `getAll('visible', true)` would return the first element that had its `visible` property set.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.GetFirst\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} [property] - The property to test on each array element.\r\n * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check.\r\n * @param {integer} [startIndex=0] - An optional start index to search from.\r\n * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included)\r\n *\r\n * @return {object} The first matching element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetFirst = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var child = array[i];\r\n\r\n if (!property ||\r\n (property && value === undefined && child.hasOwnProperty(property)) ||\r\n (property && value !== undefined && child[property] === value))\r\n {\r\n return child;\r\n }\r\n }\r\n }\r\n\r\n return null;\r\n};\r\n\r\nmodule.exports = GetFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetFirst.js?")},"./node_modules/phaser/src/utils/array/GetRandom.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Returns a Random element from the array.\r\n *\r\n * @function Phaser.Utils.Array.GetRandom\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to select the random entry from.\r\n * @param {integer} [startIndex=0] - An optional start index.\r\n * @param {integer} [length=array.length] - An optional length, the total number of elements (from the startIndex) to choose from.\r\n *\r\n * @return {*} A random element from the array, or `null` if no element could be found in the range given.\r\n */\r\nvar GetRandom = function (array, startIndex, length)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = startIndex + Math.floor(Math.random() * length);\r\n\r\n return (array[randomIndex] === undefined) ? null : array[randomIndex];\r\n};\r\n\r\nmodule.exports = GetRandom;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/GetRandom.js?")},"./node_modules/phaser/src/utils/array/MoveDown.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element down one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveDown\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move down the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveDown = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex > 0)\r\n {\r\n var item2 = array[currentIndex - 1];\r\n\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveDown;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveDown.js?")},"./node_modules/phaser/src/utils/array/MoveTo.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves an element in an array to a new position within the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveTo\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n * @param {integer} index - The new index that the element will be moved to.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar MoveTo = function (array, item, index)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex === -1 || index < 0 || index >= array.length)\r\n {\r\n throw new Error('Supplied index out of bounds');\r\n }\r\n\r\n if (currentIndex !== index)\r\n {\r\n // Remove\r\n array.splice(currentIndex, 1);\r\n\r\n // Add in new location\r\n array.splice(index, 0, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = MoveTo;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveTo.js?")},"./node_modules/phaser/src/utils/array/MoveUp.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given array element up one place in the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.MoveUp\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item - The element to move up the array.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar MoveUp = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex < array.length - 1)\r\n {\r\n // The element one above `item` in the array\r\n var item2 = array[currentIndex + 1];\r\n var index2 = array.indexOf(item2);\r\n\r\n array[currentIndex] = item2;\r\n array[index2] = item;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = MoveUp;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/MoveUp.js?")},"./node_modules/phaser/src/utils/array/NumberArray.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Create an array representing the range of numbers (usually integers), between, and inclusive of,\r\n * the given `start` and `end` arguments. For example:\r\n *\r\n * `var array = numberArray(2, 4); // array = [2, 3, 4]`\r\n * `var array = numberArray(0, 9); // array = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]`\r\n *\r\n * This is equivalent to `numberArrayStep(start, end, 1)`.\r\n *\r\n * You can optionally provide a prefix and / or suffix string. If given the array will contain\r\n * strings, not integers. For example:\r\n *\r\n * `var array = numberArray(1, 4, \'Level \'); // array = ["Level 1", "Level 2", "Level 3", "Level 4"]`\r\n * `var array = numberArray(5, 7, \'HD-\', \'.png\'); // array = ["HD-5.png", "HD-6.png", "HD-7.png"]`\r\n *\r\n * @function Phaser.Utils.Array.NumberArray\r\n * @since 3.0.0\r\n *\r\n * @param {number} start - The minimum value the array starts with.\r\n * @param {number} end - The maximum value the array contains.\r\n * @param {string} [prefix] - Optional prefix to place before the number. If provided the array will contain strings, not integers.\r\n * @param {string} [suffix] - Optional suffix to place after the number. If provided the array will contain strings, not integers.\r\n *\r\n * @return {(number[]|string[])} The array of number values, or strings if a prefix or suffix was provided.\r\n */\r\nvar NumberArray = function (start, end, prefix, suffix)\r\n{\r\n var result = [];\r\n\r\n for (var i = start; i <= end; i++)\r\n {\r\n if (prefix || suffix)\r\n {\r\n var key = (prefix) ? prefix + i.toString() : i.toString();\r\n\r\n if (suffix)\r\n {\r\n key = key.concat(suffix);\r\n }\r\n\r\n result.push(key);\r\n }\r\n else\r\n {\r\n result.push(i);\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = NumberArray;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArray.js?')},"./node_modules/phaser/src/utils/array/NumberArrayStep.js":function(module,exports,__webpack_require__){eval('/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar RoundAwayFromZero = __webpack_require__(/*! ../../math/RoundAwayFromZero */ "./node_modules/phaser/src/math/RoundAwayFromZero.js");\n\n/**\n * Create an array of numbers (positive and/or negative) progressing from `start`\n * up to but not including `end` by advancing by `step`.\n *\n * If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.\n *\n * Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;\n * for forward compatibility make sure to pass in actual numbers.\n * \n * @example\n * NumberArrayStep(4);\n * // => [0, 1, 2, 3]\n *\n * NumberArrayStep(1, 5);\n * // => [1, 2, 3, 4]\n *\n * NumberArrayStep(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * NumberArrayStep(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * NumberArrayStep(1, 4, 0);\n * // => [1, 1, 1]\n *\n * NumberArrayStep(0);\n * // => []\n *\n * @function Phaser.Utils.Array.NumberArrayStep\n * @since 3.0.0\n *\n * @param {number} [start=0] - The start of the range.\n * @param {number} [end=null] - The end of the range.\n * @param {number} [step=1] - The value to increment or decrement by.\n *\n * @return {number[]} The array of number values.\n */\nvar NumberArrayStep = function (start, end, step)\n{\n if (start === undefined) { start = 0; }\n if (end === undefined) { end = null; }\n if (step === undefined) { step = 1; }\n\n if (end === null)\n {\n end = start;\n start = 0;\n }\n\n var result = [];\n\n var total = Math.max(RoundAwayFromZero((end - start) / (step || 1)), 0);\n\n for (var i = 0; i < total; i++)\n {\n result.push(start);\n start += step;\n }\n\n return result;\n};\n\nmodule.exports = NumberArrayStep;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/NumberArrayStep.js?')},"./node_modules/phaser/src/utils/array/QuickSelect.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction swap (arr, i, j)\r\n{\r\n var tmp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = tmp;\r\n}\r\n\r\n/**\r\n * @ignore\r\n */\r\nfunction defaultCompare (a, b)\r\n{\r\n return a < b ? -1 : a > b ? 1 : 0;\r\n}\r\n\r\n/**\r\n * A [Floyd-Rivest](https://en.wikipedia.org/wiki/Floyd%E2%80%93Rivest_algorithm) quick selection algorithm.\r\n *\r\n * Rearranges the array items so that all items in the [left, k] range are smaller than all items in [k, right];\r\n * The k-th element will have the (k - left + 1)th smallest value in [left, right].\r\n *\r\n * The array is modified in-place.\r\n *\r\n * Based on code by [Vladimir Agafonkin](https://www.npmjs.com/~mourner)\r\n *\r\n * @function Phaser.Utils.Array.QuickSelect\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The array to sort.\r\n * @param {integer} k - The k-th element index.\r\n * @param {integer} [left=0] - The index of the left part of the range.\r\n * @param {integer} [right] - The index of the right part of the range.\r\n * @param {function} [compare] - An optional comparison function. Is passed two elements and should return 0, 1 or -1.\r\n */\r\nvar QuickSelect = function (arr, k, left, right, compare)\r\n{\r\n if (left === undefined) { left = 0; }\r\n if (right === undefined) { right = arr.length - 1; }\r\n if (compare === undefined) { compare = defaultCompare; }\r\n\r\n while (right > left)\r\n {\r\n if (right - left > 600)\r\n {\r\n var n = right - left + 1;\r\n var m = k - left + 1;\r\n var z = Math.log(n);\r\n var s = 0.5 * Math.exp(2 * z / 3);\r\n var sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\r\n var newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\r\n var newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\r\n\r\n QuickSelect(arr, k, newLeft, newRight, compare);\r\n }\r\n\r\n var t = arr[k];\r\n var i = left;\r\n var j = right;\r\n\r\n swap(arr, left, k);\r\n\r\n if (compare(arr[right], t) > 0)\r\n {\r\n swap(arr, left, right);\r\n }\r\n\r\n while (i < j)\r\n {\r\n swap(arr, i, j);\r\n\r\n i++;\r\n j--;\r\n\r\n while (compare(arr[i], t) < 0)\r\n {\r\n i++;\r\n }\r\n\r\n while (compare(arr[j], t) > 0)\r\n {\r\n j--;\r\n }\r\n }\r\n\r\n if (compare(arr[left], t) === 0)\r\n {\r\n swap(arr, left, j);\r\n }\r\n else\r\n {\r\n j++;\r\n swap(arr, j, right);\r\n }\r\n\r\n if (j <= k)\r\n {\r\n left = j + 1;\r\n }\r\n\r\n if (k <= j)\r\n {\r\n right = j - 1;\r\n }\r\n }\r\n};\r\n\r\nmodule.exports = QuickSelect;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/QuickSelect.js?")},"./node_modules/phaser/src/utils/array/Range.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ../object/GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\nvar Shuffle = __webpack_require__(/*! ./Shuffle */ \"./node_modules/phaser/src/utils/array/Shuffle.js\");\r\n\r\nvar BuildChunk = function (a, b, qty)\r\n{\r\n var out = [];\r\n\r\n for (var aIndex = 0; aIndex < a.length; aIndex++)\r\n {\r\n for (var bIndex = 0; bIndex < b.length; bIndex++)\r\n {\r\n for (var i = 0; i < qty; i++)\r\n {\r\n out.push({ a: a[aIndex], b: b[bIndex] });\r\n }\r\n }\r\n }\r\n\r\n return out;\r\n};\r\n\r\n/**\r\n * Creates an array populated with a range of values, based on the given arguments and configuration object.\r\n *\r\n * Range ([a,b,c], [1,2,3]) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2,3], qty = 3) =\r\n * a1, a1, a1, a2, a2, a2, a3, a3, a3, b1, b1, b1, b2, b2, b2, b3, b3, b3\r\n * \r\n * Range ([a,b,c], [1,2,3], repeat x1) =\r\n * a1, a2, a3, b1, b2, b3, c1, c2, c3, a1, a2, a3, b1, b2, b3, c1, c2, c3\r\n * \r\n * Range ([a,b], [1,2], repeat -1 = endless, max = 14) =\r\n * Maybe if max is set then repeat goes to -1 automatically?\r\n * a1, a2, b1, b2, a1, a2, b1, b2, a1, a2, b1, b2, a1, a2 (capped at 14 elements)\r\n * \r\n * Range ([a], [1,2,3,4,5], random = true) =\r\n * a4, a1, a5, a2, a3\r\n * \r\n * Range ([a, b], [1,2,3], random = true) =\r\n * b3, a2, a1, b1, a3, b2\r\n * \r\n * Range ([a, b, c], [1,2,3], randomB = true) =\r\n * a3, a1, a2, b2, b3, b1, c1, c3, c2\r\n * \r\n * Range ([a], [1,2,3,4,5], yoyo = true) =\r\n * a1, a2, a3, a4, a5, a5, a4, a3, a2, a1\r\n * \r\n * Range ([a, b], [1,2,3], yoyo = true) =\r\n * a1, a2, a3, b1, b2, b3, b3, b2, b1, a3, a2, a1\r\n *\r\n * @function Phaser.Utils.Array.Range\r\n * @since 3.0.0\r\n *\r\n * @param {array} a - The first array of range elements.\r\n * @param {array} b - The second array of range elements.\r\n * @param {object} [options] - A range configuration object. Can contain: repeat, random, randomB, yoyo, max, qty.\r\n *\r\n * @return {array} An array of arranged elements.\r\n */\r\nvar Range = function (a, b, options)\r\n{\r\n var max = GetValue(options, 'max', 0);\r\n var qty = GetValue(options, 'qty', 1);\r\n var random = GetValue(options, 'random', false);\r\n var randomB = GetValue(options, 'randomB', false);\r\n var repeat = GetValue(options, 'repeat', 0);\r\n var yoyo = GetValue(options, 'yoyo', false);\r\n\r\n var out = [];\r\n\r\n if (randomB)\r\n {\r\n Shuffle(b);\r\n }\r\n\r\n // Endless repeat, so limit by max\r\n if (repeat === -1)\r\n {\r\n if (max === 0)\r\n {\r\n repeat = 0;\r\n }\r\n else\r\n {\r\n // Work out how many repeats we need\r\n var total = (a.length * b.length) * qty;\r\n\r\n if (yoyo)\r\n {\r\n total *= 2;\r\n }\r\n\r\n repeat = Math.ceil(max / total);\r\n }\r\n }\r\n\r\n for (var i = 0; i <= repeat; i++)\r\n {\r\n var chunk = BuildChunk(a, b, qty);\r\n\r\n if (random)\r\n {\r\n Shuffle(chunk);\r\n }\r\n\r\n out = out.concat(chunk);\r\n\r\n if (yoyo)\r\n {\r\n chunk.reverse();\r\n\r\n out = out.concat(chunk);\r\n }\r\n }\r\n\r\n if (max)\r\n {\r\n out.splice(max);\r\n }\r\n\r\n return out;\r\n};\r\n\r\nmodule.exports = Range;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Range.js?")},"./node_modules/phaser/src/utils/array/Remove.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes the given item, or array of items, from the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for each item successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.Remove\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {*|Array.<*>} item - The item, or array of items, to be removed from the array.\r\n * @param {function} [callback] - A callback to be invoked for each item successfully removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*|Array.<*>} The item, or array of items, that were successfully removed from the array.\r\n */\r\nvar Remove = function (array, item, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n var index;\r\n\r\n // Fast path to avoid array mutation and iteration\r\n if (!Array.isArray(item))\r\n {\r\n index = array.indexOf(item);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n // If we got this far, we have an array of items to remove\r\n\r\n var itemLength = item.length - 1;\r\n\r\n while (itemLength >= 0)\r\n {\r\n var entry = item[itemLength];\r\n\r\n index = array.indexOf(entry);\r\n\r\n if (index !== -1)\r\n {\r\n SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, entry);\r\n }\r\n }\r\n else\r\n {\r\n // Item wasn\'t found in the array, so remove it from our return results\r\n item.pop();\r\n }\r\n\r\n itemLength--;\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = Remove;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Remove.js?')},"./node_modules/phaser/src/utils/array/RemoveAt.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ \"./node_modules/phaser/src/utils/array/SpliceOne.js\");\r\n\r\n/**\r\n * Removes the item from the given position in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item if it is successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveAt\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} index - The array index to remove the item from. The index must be in bounds or it will throw an error.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {*} The item that was removed.\r\n */\r\nvar RemoveAt = function (array, index, callback, context)\r\n{\r\n if (context === undefined) { context = array; }\r\n\r\n if (index < 0 || index > array.length - 1)\r\n {\r\n throw new Error('Index out of bounds');\r\n }\r\n\r\n var item = SpliceOne(array, index);\r\n\r\n if (callback)\r\n {\r\n callback.call(context, item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = RemoveAt;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveAt.js?")},"./node_modules/phaser/src/utils/array/RemoveBetween.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js");\r\n\r\n/**\r\n * Removes the item within the given range in the array.\r\n * \r\n * The array is modified in-place.\r\n * \r\n * You can optionally specify a callback to be invoked for the item/s successfully removed from the array.\r\n *\r\n * @function Phaser.Utils.Array.RemoveBetween\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to be modified.\r\n * @param {integer} startIndex - The start index to remove from.\r\n * @param {integer} endIndex - The end index to remove to.\r\n * @param {function} [callback] - A callback to be invoked for the item removed from the array.\r\n * @param {object} [context] - The context in which the callback is invoked.\r\n *\r\n * @return {Array.<*>} An array of items that were removed.\r\n */\r\nvar RemoveBetween = function (array, startIndex, endIndex, callback, context)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n if (context === undefined) { context = array; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n var size = endIndex - startIndex;\r\n\r\n var removed = array.splice(startIndex, size);\r\n\r\n if (callback)\r\n {\r\n for (var i = 0; i < removed.length; i++)\r\n {\r\n var entry = removed[i];\r\n\r\n callback.call(context, entry);\r\n }\r\n }\r\n\r\n return removed;\r\n }\r\n else\r\n {\r\n return [];\r\n }\r\n};\r\n\r\nmodule.exports = RemoveBetween;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveBetween.js?')},"./node_modules/phaser/src/utils/array/RemoveRandomElement.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SpliceOne = __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js");\r\n\r\n/**\r\n * Removes a random object from the given array and returns it.\r\n * Will return null if there are no array items that fall within the specified range or if there is no item for the randomly chosen index.\r\n *\r\n * @function Phaser.Utils.Array.RemoveRandomElement\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to removed a random element from.\r\n * @param {integer} [start=0] - The array index to start the search from.\r\n * @param {integer} [length=array.length] - Optional restriction on the number of elements to randomly select from.\r\n *\r\n * @return {object} The random element that was removed, or `null` if there were no array elements that fell within the given range.\r\n */\r\nvar RemoveRandomElement = function (array, start, length)\r\n{\r\n if (start === undefined) { start = 0; }\r\n if (length === undefined) { length = array.length; }\r\n\r\n var randomIndex = start + Math.floor(Math.random() * length);\r\n\r\n return SpliceOne(array, randomIndex);\r\n};\r\n\r\nmodule.exports = RemoveRandomElement;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RemoveRandomElement.js?')},"./node_modules/phaser/src/utils/array/Replace.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Replaces an element of the array with the new element.\r\n * The new element cannot already be a member of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Replace\r\n * @since 3.4.0\r\n *\r\n * @param {*} oldChild - The element in the array that will be replaced.\r\n * @param {*} newChild - The element to be inserted into the array at the position of `oldChild`.\r\n *\r\n * @return {boolean} Returns true if the oldChild was successfully replaced, otherwise returns false.\r\n */\r\nvar Replace = function (array, oldChild, newChild)\r\n{\r\n var index1 = array.indexOf(oldChild);\r\n var index2 = array.indexOf(newChild);\r\n\r\n if (index1 !== -1 && index2 === -1)\r\n {\r\n array[index1] = newChild;\r\n\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n};\r\n\r\nmodule.exports = Replace;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Replace.js?")},"./node_modules/phaser/src/utils/array/RotateLeft.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the start of the array to the end, shifting all items in the process.\r\n * The "rotation" happens to the left.\r\n *\r\n * @function Phaser.Utils.Array.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the left. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateLeft = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.shift();\r\n array.push(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/RotateRight.js":function(module,exports){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the element at the end of the array to the start, shifting all items in the process.\r\n * The "rotation" happens to the right.\r\n *\r\n * @function Phaser.Utils.Array.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shift to the right. This array is modified in place.\r\n * @param {integer} [total=1] - The number of times to shift the array.\r\n *\r\n * @return {*} The most recently shifted element.\r\n */\r\nvar RotateRight = function (array, total)\r\n{\r\n if (total === undefined) { total = 1; }\r\n\r\n var element = null;\r\n\r\n for (var i = 0; i < total; i++)\r\n {\r\n element = array.pop();\r\n array.unshift(element);\r\n }\r\n\r\n return element;\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/RotateRight.js?')},"./node_modules/phaser/src/utils/array/SafeRange.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Tests if the start and end indexes are a safe range for the given array.\r\n * \r\n * @function Phaser.Utils.Array.SafeRange\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to check.\r\n * @param {integer} startIndex - The start index.\r\n * @param {integer} endIndex - The end index.\r\n * @param {boolean} [throwError=true] - Throw an error if the range is out of bounds.\r\n *\r\n * @return {boolean} True if the range is safe, otherwise false.\r\n */\r\nvar SafeRange = function (array, startIndex, endIndex, throwError)\r\n{\r\n var len = array.length;\r\n\r\n if (startIndex < 0 ||\r\n startIndex > len ||\r\n startIndex >= endIndex ||\r\n endIndex > len ||\r\n startIndex + endIndex > len)\r\n {\r\n if (throwError)\r\n {\r\n throw new Error('Range Error: Values outside acceptable range');\r\n }\r\n\r\n return false;\r\n }\r\n else\r\n {\r\n return true;\r\n }\r\n};\r\n\r\nmodule.exports = SafeRange;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SafeRange.js?")},"./node_modules/phaser/src/utils/array/SendToBack.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Moves the given element to the bottom of the array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.SendToBack\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array.\r\n * @param {*} item - The element to move.\r\n *\r\n * @return {*} The element that was moved.\r\n */\r\nvar SendToBack = function (array, item)\r\n{\r\n var currentIndex = array.indexOf(item);\r\n\r\n if (currentIndex !== -1 && currentIndex > 0)\r\n {\r\n array.splice(currentIndex, 1);\r\n array.unshift(item);\r\n }\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SendToBack;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SendToBack.js?")},"./node_modules/phaser/src/utils/array/SetAll.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar SafeRange = __webpack_require__(/*! ./SafeRange */ \"./node_modules/phaser/src/utils/array/SafeRange.js\");\r\n\r\n/**\r\n * Scans the array for elements with the given property. If found, the property is set to the `value`.\r\n *\r\n * For example: `SetAll('visible', true)` would set all elements that have a `visible` property to `false`.\r\n *\r\n * Optionally you can specify a start and end index. For example if the array had 100 elements,\r\n * and you set `startIndex` to 0 and `endIndex` to 50, it would update only the first 50 elements.\r\n *\r\n * @function Phaser.Utils.Array.SetAll\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The array to search.\r\n * @param {string} property - The property to test for on each array element.\r\n * @param {*} value - The value to set the property to.\r\n * @param {integer} [startIndex] - An optional start index to search from.\r\n * @param {integer} [endIndex] - An optional end index to search to.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar SetAll = function (array, property, value, startIndex, endIndex)\r\n{\r\n if (startIndex === undefined) { startIndex = 0; }\r\n if (endIndex === undefined) { endIndex = array.length; }\r\n\r\n if (SafeRange(array, startIndex, endIndex))\r\n {\r\n for (var i = startIndex; i < endIndex; i++)\r\n {\r\n var entry = array[i];\r\n\r\n if (entry.hasOwnProperty(property))\r\n {\r\n entry[property] = value;\r\n }\r\n }\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = SetAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SetAll.js?")},"./node_modules/phaser/src/utils/array/Shuffle.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shuffles the contents of the given array using the Fisher-Yates implementation.\r\n *\r\n * The original array is modified directly and returned.\r\n *\r\n * @function Phaser.Utils.Array.Shuffle\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to shuffle. This array is modified in place.\r\n *\r\n * @return {array} The shuffled array.\r\n */\r\nvar Shuffle = function (array)\r\n{\r\n for (var i = array.length - 1; i > 0; i--)\r\n {\r\n var j = Math.floor(Math.random() * (i + 1));\r\n var temp = array[i];\r\n array[i] = array[j];\r\n array[j] = temp;\r\n }\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Shuffle;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Shuffle.js?")},"./node_modules/phaser/src/utils/array/SpliceOne.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Removes a single item from an array and returns it without creating gc, like the native splice does.\r\n * Based on code by Mike Reinstein.\r\n *\r\n * @function Phaser.Utils.Array.SpliceOne\r\n * @since 3.0.0\r\n *\r\n * @param {array} array - The array to splice from.\r\n * @param {integer} index - The index of the item which should be spliced.\r\n *\r\n * @return {*} The item which was spliced (removed).\r\n */\r\nvar SpliceOne = function (array, index)\r\n{\r\n if (index >= array.length)\r\n {\r\n return;\r\n }\r\n\r\n var len = array.length - 1;\r\n\r\n var item = array[index];\r\n\r\n for (var i = index; i < len; i++)\r\n {\r\n array[i] = array[i + 1];\r\n }\r\n\r\n array.length = len;\r\n\r\n return item;\r\n};\r\n\r\nmodule.exports = SpliceOne;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/SpliceOne.js?")},"./node_modules/phaser/src/utils/array/StableSort.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n//! stable.js 0.1.6, https://github.com/Two-Screen/stable\r\n//! © 2017 Angry Bytes and contributors. MIT licensed.\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.StableSortFunctions\r\n */\r\n\r\n(function() {\r\n\r\n /**\r\n * A stable array sort, because `Array#sort()` is not guaranteed stable.\r\n * This is an implementation of merge sort, without recursion.\r\n *\r\n * @function Phaser.Utils.Array.StableSort\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array to be sorted.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted result.\r\n */\r\nvar stable = function(arr, comp) {\r\n return exec(arr.slice(), comp);\r\n};\r\n\r\n /**\r\n * Sort the input array and simply copy it back if the result isn't in the original array, which happens on an odd number of passes.\r\n *\r\n * @function Phaser.Utils.Array.StableSortFunctions.inplace\r\n * @memberof Phaser.Utils.Array.StableSortFunctions\r\n * @since 3.0.0\r\n *\r\n * @param {array} arr - The input array.\r\n * @param {function} comp - The comparison handler.\r\n *\r\n * @return {array} The sorted array.\r\n */\r\nstable.inplace = function(arr, comp) {\r\n var result = exec(arr, comp);\r\n\r\n // This simply copies back if the result isn't in the original array,\r\n // which happens on an odd number of passes.\r\n if (result !== arr) {\r\n pass(result, null, arr.length, arr);\r\n }\r\n\r\n return arr;\r\n};\r\n\r\n// Execute the sort using the input array and a second buffer as work space.\r\n// Returns one of those two, containing the final result.\r\nfunction exec(arr, comp) {\r\n if (typeof(comp) !== 'function') {\r\n comp = function(a, b) {\r\n return String(a).localeCompare(b);\r\n };\r\n }\r\n\r\n // Short-circuit when there's nothing to sort.\r\n var len = arr.length;\r\n if (len <= 1) {\r\n return arr;\r\n }\r\n\r\n // Rather than dividing input, simply iterate chunks of 1, 2, 4, 8, etc.\r\n // Chunks are the size of the left or right hand in merge sort.\r\n // Stop when the left-hand covers all of the array.\r\n var buffer = new Array(len);\r\n for (var chk = 1; chk < len; chk *= 2) {\r\n pass(arr, comp, chk, buffer);\r\n\r\n var tmp = arr;\r\n arr = buffer;\r\n buffer = tmp;\r\n }\r\n\r\n return arr;\r\n}\r\n\r\n// Run a single pass with the given chunk size.\r\nvar pass = function(arr, comp, chk, result) {\r\n var len = arr.length;\r\n var i = 0;\r\n // Step size / double chunk size.\r\n var dbl = chk * 2;\r\n // Bounds of the left and right chunks.\r\n var l, r, e;\r\n // Iterators over the left and right chunk.\r\n var li, ri;\r\n\r\n // Iterate over pairs of chunks.\r\n for (l = 0; l < len; l += dbl) {\r\n r = l + chk;\r\n e = r + chk;\r\n if (r > len) r = len;\r\n if (e > len) e = len;\r\n\r\n // Iterate both chunks in parallel.\r\n li = l;\r\n ri = r;\r\n while (true) {\r\n // Compare the chunks.\r\n if (li < r && ri < e) {\r\n // This works for a regular `sort()` compatible comparator,\r\n // but also for a simple comparator like: `a > b`\r\n if (comp(arr[li], arr[ri]) <= 0) {\r\n result[i++] = arr[li++];\r\n }\r\n else {\r\n result[i++] = arr[ri++];\r\n }\r\n }\r\n // Nothing to compare, just flush what's left.\r\n else if (li < r) {\r\n result[i++] = arr[li++];\r\n }\r\n else if (ri < e) {\r\n result[i++] = arr[ri++];\r\n }\r\n // Both iterators are at the chunk ends.\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n};\r\n\r\n// Export using CommonJS or to the window.\r\nif (true) {\r\n module.exports = stable;\r\n}\r\nelse {}\r\n\r\n})();\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/StableSort.js?")},"./node_modules/phaser/src/utils/array/Swap.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Swaps the position of two elements in the given array.\r\n * The elements must exist in the same array.\r\n * The array is modified in-place.\r\n *\r\n * @function Phaser.Utils.Array.Swap\r\n * @since 3.4.0\r\n *\r\n * @param {array} array - The input array.\r\n * @param {*} item1 - The first element to swap.\r\n * @param {*} item2 - The second element to swap.\r\n *\r\n * @return {array} The input array.\r\n */\r\nvar Swap = function (array, item1, item2)\r\n{\r\n if (item1 === item2)\r\n {\r\n return;\r\n }\r\n\r\n var index1 = array.indexOf(item1);\r\n var index2 = array.indexOf(item2);\r\n\r\n if (index1 < 0 || index2 < 0)\r\n {\r\n throw new Error('Supplied items must be elements of the same array');\r\n }\r\n\r\n array[index1] = item2;\r\n array[index2] = item1;\r\n\r\n return array;\r\n};\r\n\r\nmodule.exports = Swap;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/Swap.js?")},"./node_modules/phaser/src/utils/array/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Matrix: __webpack_require__(/*! ./matrix */ "./node_modules/phaser/src/utils/array/matrix/index.js"),\r\n\r\n Add: __webpack_require__(/*! ./Add */ "./node_modules/phaser/src/utils/array/Add.js"),\r\n AddAt: __webpack_require__(/*! ./AddAt */ "./node_modules/phaser/src/utils/array/AddAt.js"),\r\n BringToTop: __webpack_require__(/*! ./BringToTop */ "./node_modules/phaser/src/utils/array/BringToTop.js"),\r\n CountAllMatching: __webpack_require__(/*! ./CountAllMatching */ "./node_modules/phaser/src/utils/array/CountAllMatching.js"),\r\n Each: __webpack_require__(/*! ./Each */ "./node_modules/phaser/src/utils/array/Each.js"),\r\n EachInRange: __webpack_require__(/*! ./EachInRange */ "./node_modules/phaser/src/utils/array/EachInRange.js"),\r\n FindClosestInSorted: __webpack_require__(/*! ./FindClosestInSorted */ "./node_modules/phaser/src/utils/array/FindClosestInSorted.js"),\r\n GetAll: __webpack_require__(/*! ./GetAll */ "./node_modules/phaser/src/utils/array/GetAll.js"),\r\n GetFirst: __webpack_require__(/*! ./GetFirst */ "./node_modules/phaser/src/utils/array/GetFirst.js"),\r\n GetRandom: __webpack_require__(/*! ./GetRandom */ "./node_modules/phaser/src/utils/array/GetRandom.js"),\r\n MoveDown: __webpack_require__(/*! ./MoveDown */ "./node_modules/phaser/src/utils/array/MoveDown.js"),\r\n MoveTo: __webpack_require__(/*! ./MoveTo */ "./node_modules/phaser/src/utils/array/MoveTo.js"),\r\n MoveUp: __webpack_require__(/*! ./MoveUp */ "./node_modules/phaser/src/utils/array/MoveUp.js"),\r\n NumberArray: __webpack_require__(/*! ./NumberArray */ "./node_modules/phaser/src/utils/array/NumberArray.js"),\r\n NumberArrayStep: __webpack_require__(/*! ./NumberArrayStep */ "./node_modules/phaser/src/utils/array/NumberArrayStep.js"),\r\n QuickSelect: __webpack_require__(/*! ./QuickSelect */ "./node_modules/phaser/src/utils/array/QuickSelect.js"),\r\n Range: __webpack_require__(/*! ./Range */ "./node_modules/phaser/src/utils/array/Range.js"),\r\n Remove: __webpack_require__(/*! ./Remove */ "./node_modules/phaser/src/utils/array/Remove.js"),\r\n RemoveAt: __webpack_require__(/*! ./RemoveAt */ "./node_modules/phaser/src/utils/array/RemoveAt.js"),\r\n RemoveBetween: __webpack_require__(/*! ./RemoveBetween */ "./node_modules/phaser/src/utils/array/RemoveBetween.js"),\r\n RemoveRandomElement: __webpack_require__(/*! ./RemoveRandomElement */ "./node_modules/phaser/src/utils/array/RemoveRandomElement.js"),\r\n Replace: __webpack_require__(/*! ./Replace */ "./node_modules/phaser/src/utils/array/Replace.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/RotateLeft.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/RotateRight.js"),\r\n SafeRange: __webpack_require__(/*! ./SafeRange */ "./node_modules/phaser/src/utils/array/SafeRange.js"),\r\n SendToBack: __webpack_require__(/*! ./SendToBack */ "./node_modules/phaser/src/utils/array/SendToBack.js"),\r\n SetAll: __webpack_require__(/*! ./SetAll */ "./node_modules/phaser/src/utils/array/SetAll.js"),\r\n Shuffle: __webpack_require__(/*! ./Shuffle */ "./node_modules/phaser/src/utils/array/Shuffle.js"),\r\n SpliceOne: __webpack_require__(/*! ./SpliceOne */ "./node_modules/phaser/src/utils/array/SpliceOne.js"),\r\n StableSort: __webpack_require__(/*! ./StableSort */ "./node_modules/phaser/src/utils/array/StableSort.js"),\r\n Swap: __webpack_require__(/*! ./Swap */ "./node_modules/phaser/src/utils/array/Swap.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/index.js?')},"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Checks if an array can be used as a matrix.\r\n *\r\n * A matrix is a two-dimensional array (array of arrays), where all sub-arrays (rows) have the same length. There must be at least two rows:\r\n *\r\n * ```\r\n * [\r\n * [ 1, 1, 1, 1, 1, 1 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 2, 0, 1, 2, 0, 4 ],\r\n * [ 2, 0, 3, 4, 0, 4 ],\r\n * [ 2, 0, 0, 0, 0, 4 ],\r\n * [ 3, 3, 3, 3, 3, 3 ]\r\n * ]\r\n * ```\r\n *\r\n * @function Phaser.Utils.Array.Matrix.CheckMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - The array to check.\r\n *\r\n * @return {boolean} `true` if the given `matrix` array is a valid matrix.\r\n */\r\nvar CheckMatrix = function (matrix)\r\n{\r\n if (!Array.isArray(matrix) || matrix.length < 2 || !Array.isArray(matrix[0]))\r\n {\r\n return false;\r\n }\r\n\r\n // How long is the first row?\r\n var size = matrix[0].length;\r\n\r\n // Validate the rest of the rows are the same length\r\n for (var i = 1; i < matrix.length; i++)\r\n {\r\n if (matrix[i].length !== size)\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = CheckMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/MatrixToString.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Pad = __webpack_require__(/*! ../../string/Pad */ \"./node_modules/phaser/src/utils/string/Pad.js\");\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\n\r\n/**\r\n * Generates a string (which you can pass to console.log) from the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.MatrixToString\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix]\r\n *\r\n * @param {T[][]} [matrix] - A 2-dimensional array.\r\n *\r\n * @return {string} A string representing the matrix.\r\n */\r\nvar MatrixToString = function (matrix)\r\n{\r\n var str = '';\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return str;\r\n }\r\n\r\n for (var r = 0; r < matrix.length; r++)\r\n {\r\n for (var c = 0; c < matrix[r].length; c++)\r\n {\r\n var cell = matrix[r][c].toString();\r\n\r\n if (cell !== 'undefined')\r\n {\r\n str += Pad(cell, 2);\r\n }\r\n else\r\n {\r\n str += '?';\r\n }\r\n\r\n if (c < matrix[r].length - 1)\r\n {\r\n str += ' |';\r\n }\r\n }\r\n\r\n if (r < matrix.length - 1)\r\n {\r\n str += '\\n';\r\n\r\n for (var i = 0; i < matrix[r].length; i++)\r\n {\r\n str += '---';\r\n\r\n if (i < matrix[r].length - 1)\r\n {\r\n str += '+';\r\n }\r\n }\r\n\r\n str += '\\n';\r\n }\r\n\r\n }\r\n\r\n return str;\r\n};\r\n\r\nmodule.exports = MatrixToString;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/MatrixToString.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the columns in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseColumns\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the columns for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseColumns = function (matrix)\r\n{\r\n return matrix.reverse();\r\n};\r\n\r\nmodule.exports = ReverseColumns;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js?")},"./node_modules/phaser/src/utils/array/matrix/ReverseRows.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Reverses the rows in the given Array Matrix.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.ReverseRows\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array matrix to reverse the rows for.\r\n *\r\n * @return {T[][]} The column reversed matrix.\r\n */\r\nvar ReverseRows = function (matrix)\r\n{\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = ReverseRows;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/ReverseRows.js?")},"./node_modules/phaser/src/utils/array/matrix/Rotate180.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix 180 degrees.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.Rotate180\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar Rotate180 = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 180);\r\n};\r\n\r\nmodule.exports = Rotate180;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/Rotate180.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateLeft.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or 90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateLeft\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateLeft = function (matrix)\r\n{\r\n return RotateMatrix(matrix, 90);\r\n};\r\n\r\nmodule.exports = RotateLeft;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateLeft.js?')},"./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar CheckMatrix = __webpack_require__(/*! ./CheckMatrix */ \"./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js\");\r\nvar TransposeMatrix = __webpack_require__(/*! ./TransposeMatrix */ \"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js\");\r\n\r\n/**\r\n * Rotates the array matrix based on the given rotation value.\r\n *\r\n * The value can be given in degrees: 90, -90, 270, -270 or 180,\r\n * or a string command: `rotateLeft`, `rotateRight` or `rotate180`.\r\n *\r\n * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateMatrix\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n * @param {(number|string)} [direction=90] - The amount to rotate the matrix by.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateMatrix = function (matrix, direction)\r\n{\r\n if (direction === undefined) { direction = 90; }\r\n\r\n if (!CheckMatrix(matrix))\r\n {\r\n return null;\r\n }\r\n\r\n if (typeof direction !== 'string')\r\n {\r\n direction = ((direction % 360) + 360) % 360;\r\n }\r\n\r\n if (direction === 90 || direction === -270 || direction === 'rotateLeft')\r\n {\r\n matrix = TransposeMatrix(matrix);\r\n matrix.reverse();\r\n }\r\n else if (direction === -90 || direction === 270 || direction === 'rotateRight')\r\n {\r\n matrix.reverse();\r\n matrix = TransposeMatrix(matrix);\r\n }\r\n else if (Math.abs(direction) === 180 || direction === 'rotate180')\r\n {\r\n for (var i = 0; i < matrix.length; i++)\r\n {\r\n matrix[i].reverse();\r\n }\r\n\r\n matrix.reverse();\r\n }\r\n\r\n return matrix;\r\n};\r\n\r\nmodule.exports = RotateMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/RotateRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar RotateMatrix = __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js");\r\n\r\n/**\r\n * Rotates the array matrix to the left (or -90 degrees)\r\n *\r\n * @function Phaser.Utils.Array.Matrix.RotateRight\r\n * @since 3.0.0\r\n *\r\n * @generic T\r\n * @genericUse {T[][]} - [matrix,$return]\r\n *\r\n * @param {T[][]} [matrix] - The array to rotate.\r\n *\r\n * @return {T[][]} The rotated matrix array. The source matrix should be discard for the returned matrix.\r\n */\r\nvar RotateRight = function (matrix)\r\n{\r\n return RotateMatrix(matrix, -90);\r\n};\r\n\r\nmodule.exports = RotateRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/RotateRight.js?')},"./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Transposes the elements of the given matrix (array of arrays).\r\n *\r\n * The transpose of a matrix is a new matrix whose rows are the columns of the original.\r\n *\r\n * @function Phaser.Utils.Array.Matrix.TransposeMatrix\r\n * @since 3.0.0\r\n * \r\n * @generic T\r\n * @genericUse {T[][]} - [array,$return]\r\n * \r\n * @param {T[][]} [array] - The array matrix to transpose.\r\n *\r\n * @return {T[][]} A new array matrix which is a transposed version of the given array.\r\n */\r\nvar TransposeMatrix = function (array)\r\n{\r\n var sourceRowCount = array.length;\r\n var sourceColCount = array[0].length;\r\n\r\n var result = new Array(sourceColCount);\r\n\r\n for (var i = 0; i < sourceColCount; i++)\r\n {\r\n result[i] = new Array(sourceRowCount);\r\n\r\n for (var j = sourceRowCount - 1; j > -1; j--)\r\n {\r\n result[i][j] = array[j][i];\r\n }\r\n }\r\n\r\n return result;\r\n};\r\n\r\nmodule.exports = TransposeMatrix;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js?")},"./node_modules/phaser/src/utils/array/matrix/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Array.Matrix\r\n */\r\n\r\nmodule.exports = {\r\n\r\n CheckMatrix: __webpack_require__(/*! ./CheckMatrix */ "./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js"),\r\n MatrixToString: __webpack_require__(/*! ./MatrixToString */ "./node_modules/phaser/src/utils/array/matrix/MatrixToString.js"),\r\n ReverseColumns: __webpack_require__(/*! ./ReverseColumns */ "./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js"),\r\n ReverseRows: __webpack_require__(/*! ./ReverseRows */ "./node_modules/phaser/src/utils/array/matrix/ReverseRows.js"),\r\n Rotate180: __webpack_require__(/*! ./Rotate180 */ "./node_modules/phaser/src/utils/array/matrix/Rotate180.js"),\r\n RotateLeft: __webpack_require__(/*! ./RotateLeft */ "./node_modules/phaser/src/utils/array/matrix/RotateLeft.js"),\r\n RotateMatrix: __webpack_require__(/*! ./RotateMatrix */ "./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js"),\r\n RotateRight: __webpack_require__(/*! ./RotateRight */ "./node_modules/phaser/src/utils/array/matrix/RotateRight.js"),\r\n TransposeMatrix: __webpack_require__(/*! ./TransposeMatrix */ "./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/array/matrix/index.js?')},"./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n/**\r\n * Converts an ArrayBuffer into a base64 string.\r\n * \r\n * The resulting string can optionally be a data uri if the `mediaType` argument is provided.\r\n * \r\n * See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs for more details.\r\n *\r\n * @function Phaser.Utils.Base64.ArrayBufferToBase64\r\n * @since 3.18.0\r\n * \r\n * @param {ArrayBuffer} arrayBuffer - The Array Buffer to encode.\r\n * @param {string} [mediaType] - An optional media type, i.e. `audio/ogg` or `image/jpeg`. If included the resulting string will be a data URI.\r\n * \r\n * @return {string} The base64 encoded Array Buffer.\r\n */\r\nvar ArrayBufferToBase64 = function (arrayBuffer, mediaType)\r\n{\r\n var bytes = new Uint8Array(arrayBuffer);\r\n var len = bytes.length;\r\n\r\n var base64 = (mediaType) ? 'data:' + mediaType + ';base64,' : '';\r\n\r\n for (var i = 0; i < len; i += 3)\r\n {\r\n base64 += chars[bytes[i] >> 2];\r\n base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)];\r\n base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)];\r\n base64 += chars[bytes[i + 2] & 63];\r\n }\r\n\r\n if ((len % 3) === 2)\r\n {\r\n base64 = base64.substring(0, base64.length - 1) + '=';\r\n }\r\n else if (len % 3 === 1)\r\n {\r\n base64 = base64.substring(0, base64.length - 2) + '==';\r\n }\r\n \r\n return base64;\r\n};\r\n\r\nmodule.exports = ArrayBufferToBase64;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js?")},"./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js":function(module,exports){eval("/**\r\n * @author Niklas von Hertzen (https://github.com/niklasvh/base64-arraybuffer)\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n\r\n// Use a lookup table to find the index.\r\nvar lookup = new Uint8Array(256);\r\n\r\nfor (var i = 0; i < chars.length; i++)\r\n{\r\n lookup[chars.charCodeAt(i)] = i;\r\n}\r\n\r\n/**\r\n * Converts a base64 string, either with or without a data uri, into an Array Buffer.\r\n *\r\n * @function Phaser.Utils.Base64.Base64ToArrayBuffer\r\n * @since 3.18.0\r\n * \r\n * @param {string} base64 - The base64 string to be decoded. Can optionally contain a data URI header, which will be stripped out prior to decoding.\r\n * \r\n * @return {ArrayBuffer} An ArrayBuffer decoded from the base64 data.\r\n */\r\nvar Base64ToArrayBuffer = function (base64)\r\n{\r\n // Is it a data uri? if so, strip the header away\r\n base64 = base64.substr(base64.indexOf(',') + 1);\r\n\r\n var len = base64.length;\r\n var bufferLength = len * 0.75;\r\n var p = 0;\r\n var encoded1;\r\n var encoded2;\r\n var encoded3;\r\n var encoded4;\r\n\r\n if (base64[len - 1] === '=')\r\n {\r\n bufferLength--;\r\n\r\n if (base64[len - 2] === '=')\r\n {\r\n bufferLength--;\r\n }\r\n }\r\n\r\n var arrayBuffer = new ArrayBuffer(bufferLength);\r\n var bytes = new Uint8Array(arrayBuffer);\r\n\r\n for (var i = 0; i < len; i += 4)\r\n {\r\n encoded1 = lookup[base64.charCodeAt(i)];\r\n encoded2 = lookup[base64.charCodeAt(i + 1)];\r\n encoded3 = lookup[base64.charCodeAt(i + 2)];\r\n encoded4 = lookup[base64.charCodeAt(i + 3)];\r\n\r\n bytes[p++] = (encoded1 << 2) | (encoded2 >> 4);\r\n bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2);\r\n bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63);\r\n }\r\n\r\n return arrayBuffer;\r\n};\r\n\r\nmodule.exports = Base64ToArrayBuffer;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js?")},"./node_modules/phaser/src/utils/base64/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Base64\r\n */\r\n\r\nmodule.exports = {\r\n\r\n ArrayBufferToBase64: __webpack_require__(/*! ./ArrayBufferToBase64 */ "./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js"),\r\n Base64ToArrayBuffer: __webpack_require__(/*! ./Base64ToArrayBuffer */ "./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/base64/index.js?')},"./node_modules/phaser/src/utils/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Array: __webpack_require__(/*! ./array/ */ "./node_modules/phaser/src/utils/array/index.js"),\r\n Base64: __webpack_require__(/*! ./base64/ */ "./node_modules/phaser/src/utils/base64/index.js"),\r\n Objects: __webpack_require__(/*! ./object/ */ "./node_modules/phaser/src/utils/object/index.js"),\r\n String: __webpack_require__(/*! ./string/ */ "./node_modules/phaser/src/utils/string/index.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/index.js?')},"./node_modules/phaser/src/utils/object/Clone.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Shallow Object Clone. Will not clone nested objects.\r\n *\r\n * @function Phaser.Utils.Objects.Clone\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - the object from which to clone\r\n *\r\n * @return {object} a new object with the same properties as the input obj\r\n */\r\nvar Clone = function (obj)\r\n{\r\n var clone = {};\r\n\r\n for (var key in obj)\r\n {\r\n if (Array.isArray(obj[key]))\r\n {\r\n clone[key] = obj[key].slice(0);\r\n }\r\n else\r\n {\r\n clone[key] = obj[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Clone;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Clone.js?")},"./node_modules/phaser/src/utils/object/Extend.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar IsPlainObject = __webpack_require__(/*! ./IsPlainObject */ \"./node_modules/phaser/src/utils/object/IsPlainObject.js\");\r\n\r\n// @param {boolean} deep - Perform a deep copy?\r\n// @param {object} target - The target object to copy to.\r\n// @return {object} The extended object.\r\n\r\n/**\r\n * This is a slightly modified version of http://api.jquery.com/jQuery.extend/\r\n *\r\n * @function Phaser.Utils.Objects.Extend\r\n * @since 3.0.0\r\n *\r\n * @return {object} The extended object.\r\n */\r\nvar Extend = function ()\r\n{\r\n var options, name, src, copy, copyIsArray, clone,\r\n target = arguments[0] || {},\r\n i = 1,\r\n length = arguments.length,\r\n deep = false;\r\n\r\n // Handle a deep copy situation\r\n if (typeof target === 'boolean')\r\n {\r\n deep = target;\r\n target = arguments[1] || {};\r\n\r\n // skip the boolean and the target\r\n i = 2;\r\n }\r\n\r\n // extend Phaser if only one argument is passed\r\n if (length === i)\r\n {\r\n target = this;\r\n --i;\r\n }\r\n\r\n for (; i < length; i++)\r\n {\r\n // Only deal with non-null/undefined values\r\n if ((options = arguments[i]) != null)\r\n {\r\n // Extend the base object\r\n for (name in options)\r\n {\r\n src = target[name];\r\n copy = options[name];\r\n\r\n // Prevent never-ending loop\r\n if (target === copy)\r\n {\r\n continue;\r\n }\r\n\r\n // Recurse if we're merging plain objects or arrays\r\n if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy))))\r\n {\r\n if (copyIsArray)\r\n {\r\n copyIsArray = false;\r\n clone = src && Array.isArray(src) ? src : [];\r\n }\r\n else\r\n {\r\n clone = src && IsPlainObject(src) ? src : {};\r\n }\r\n\r\n // Never move original objects, clone them\r\n target[name] = Extend(deep, clone, copy);\r\n\r\n // Don't bring in undefined values\r\n }\r\n else if (copy !== undefined)\r\n {\r\n target[name] = copy;\r\n }\r\n }\r\n }\r\n }\r\n\r\n // Return the modified object\r\n return target;\r\n};\r\n\r\nmodule.exports = Extend;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Extend.js?")},"./node_modules/phaser/src/utils/object/GetAdvancedValue.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar MATH = __webpack_require__(/*! ../../math */ \"./node_modules/phaser/src/math/index.js\");\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ \"./node_modules/phaser/src/utils/object/GetValue.js\");\r\n\r\n/**\r\n * Retrieves a value from an object. Allows for more advanced selection options, including:\r\n *\r\n * Allowed types:\r\n * \r\n * Implicit\r\n * {\r\n * x: 4\r\n * }\r\n *\r\n * From function\r\n * {\r\n * x: function ()\r\n * }\r\n *\r\n * Randomly pick one element from the array\r\n * {\r\n * x: [a, b, c, d, e, f]\r\n * }\r\n *\r\n * Random integer between min and max:\r\n * {\r\n * x: { randInt: [min, max] }\r\n * }\r\n *\r\n * Random float between min and max:\r\n * {\r\n * x: { randFloat: [min, max] }\r\n * }\r\n * \r\n *\r\n * @function Phaser.Utils.Objects.GetAdvancedValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetAdvancedValue = function (source, key, defaultValue)\r\n{\r\n var value = GetValue(source, key, null);\r\n\r\n if (value === null)\r\n {\r\n return defaultValue;\r\n }\r\n else if (Array.isArray(value))\r\n {\r\n return MATH.RND.pick(value);\r\n }\r\n else if (typeof value === 'object')\r\n {\r\n if (value.hasOwnProperty('randInt'))\r\n {\r\n return MATH.RND.integerInRange(value.randInt[0], value.randInt[1]);\r\n }\r\n else if (value.hasOwnProperty('randFloat'))\r\n {\r\n return MATH.RND.realInRange(value.randFloat[0], value.randFloat[1]);\r\n }\r\n }\r\n else if (typeof value === 'function')\r\n {\r\n return value(key);\r\n }\r\n\r\n return value;\r\n};\r\n\r\nmodule.exports = GetAdvancedValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetAdvancedValue.js?")},"./node_modules/phaser/src/utils/object/GetFastValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Finds the key within the top level of the {@link source} object, or returns {@link defaultValue}\r\n *\r\n * @function Phaser.Utils.Objects.GetFastValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to search\r\n * @param {string} key - The key for the property on source. Must exist at the top level of the source object (no periods)\r\n * @param {*} [defaultValue] - The default value to use if the key does not exist.\r\n *\r\n * @return {*} The value if found; otherwise, defaultValue (null if none provided)\r\n */\r\nvar GetFastValue = function (source, key, defaultValue)\r\n{\r\n var t = typeof(source);\r\n\r\n if (!source || t === 'number' || t === 'string')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key) && source[key] !== undefined)\r\n {\r\n return source[key];\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetFastValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetFastValue.js?")},"./node_modules/phaser/src/utils/object/GetMinMaxValue.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar GetValue = __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js");\r\nvar Clamp = __webpack_require__(/*! ../../math/Clamp */ "./node_modules/phaser/src/math/Clamp.js");\r\n\r\n/**\r\n * Retrieves and clamps a numerical value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetMinMaxValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`).\r\n * @param {number} min - The minimum value which can be returned.\r\n * @param {number} max - The maximum value which can be returned.\r\n * @param {number} defaultValue - The value to return if the property doesn\'t exist. It\'s also constrained to the given bounds.\r\n *\r\n * @return {number} The clamped value from the `source` object.\r\n */\r\nvar GetMinMaxValue = function (source, key, min, max, defaultValue)\r\n{\r\n if (defaultValue === undefined) { defaultValue = min; }\r\n\r\n var value = GetValue(source, key, defaultValue);\r\n\r\n return Clamp(value, min, max);\r\n};\r\n\r\nmodule.exports = GetMinMaxValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetMinMaxValue.js?')},"./node_modules/phaser/src/utils/object/GetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n// Source object\r\n// The key as a string, or an array of keys, i.e. 'banner', or 'banner.hideBanner'\r\n// The default value to use if the key doesn't exist\r\n\r\n/**\r\n * Retrieves a value from an object.\r\n *\r\n * @function Phaser.Utils.Objects.GetValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The object to retrieve the value from.\r\n * @param {string} key - The name of the property to retrieve from the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`) - `banner.hideBanner` would return the value of the `hideBanner` property from the object stored in the `banner` property of the `source` object.\r\n * @param {*} defaultValue - The value to return if the `key` isn't found in the `source` object.\r\n *\r\n * @return {*} The value of the requested key.\r\n */\r\nvar GetValue = function (source, key, defaultValue)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return defaultValue;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n return source[key];\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var value = defaultValue;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n value = parent[keys[i]];\r\n\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n // Can't go any further, so reset to default\r\n value = defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n return value;\r\n }\r\n else\r\n {\r\n return defaultValue;\r\n }\r\n};\r\n\r\nmodule.exports = GetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/GetValue.js?")},"./node_modules/phaser/src/utils/object/HasAll.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains all requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAll\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to ensure the source object contains\r\n *\r\n * @return {boolean} true if the source object contains all keys, false otherwise.\r\n */\r\nvar HasAll = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (!source.hasOwnProperty(keys[i]))\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n return true;\r\n};\r\n\r\nmodule.exports = HasAll;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAll.js?")},"./node_modules/phaser/src/utils/object/HasAny.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Verifies that an object contains at least one of the requested keys\r\n *\r\n * @function Phaser.Utils.Objects.HasAny\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - an object on which to check for key existence\r\n * @param {string[]} keys - an array of keys to search the object for\r\n *\r\n * @return {boolean} true if the source object contains at least one of the keys, false otherwise\r\n */\r\nvar HasAny = function (source, keys)\r\n{\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (source.hasOwnProperty(keys[i]))\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n};\r\n\r\nmodule.exports = HasAny;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasAny.js?")},"./node_modules/phaser/src/utils/object/HasValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Determine whether the source object has a property with the specified key.\r\n *\r\n * @function Phaser.Utils.Objects.HasValue\r\n * @since 3.0.0\r\n *\r\n * @param {object} source - The source object to be checked.\r\n * @param {string} key - The property to check for within the object\r\n *\r\n * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`.\r\n */\r\nvar HasValue = function (source, key)\r\n{\r\n return (source.hasOwnProperty(key));\r\n};\r\n\r\nmodule.exports = HasValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/HasValue.js?")},"./node_modules/phaser/src/utils/object/IsPlainObject.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * This is a slightly modified version of jQuery.isPlainObject.\r\n * A plain object is an object whose internal class property is [object Object].\r\n *\r\n * @function Phaser.Utils.Objects.IsPlainObject\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj - The object to inspect.\r\n *\r\n * @return {boolean} `true` if the object is plain, otherwise `false`.\r\n */\r\nvar IsPlainObject = function (obj)\r\n{\r\n // Not plain objects:\r\n // - Any object or value whose internal [[Class]] property is not \"[object Object]\"\r\n // - DOM nodes\r\n // - window\r\n if (typeof(obj) !== 'object' || obj.nodeType || obj === obj.window)\r\n {\r\n return false;\r\n }\r\n\r\n // Support: Firefox <20\r\n // The try/catch suppresses exceptions thrown when attempting to access\r\n // the \"constructor\" property of certain host objects, ie. |window.location|\r\n // https://bugzilla.mozilla.org/show_bug.cgi?id=814622\r\n try\r\n {\r\n if (obj.constructor && !({}).hasOwnProperty.call(obj.constructor.prototype, 'isPrototypeOf'))\r\n {\r\n return false;\r\n }\r\n }\r\n catch (e)\r\n {\r\n return false;\r\n }\r\n\r\n // If the function hasn't returned already, we're confident that\r\n // |obj| is a plain object, created by {} or constructed with new Object\r\n return true;\r\n};\r\n\r\nmodule.exports = IsPlainObject;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/IsPlainObject.js?")},"./node_modules/phaser/src/utils/object/Merge.js":function(module,exports,__webpack_require__){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ \"./node_modules/phaser/src/utils/object/Clone.js\");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1 and obj2.\r\n * If a value exists in both obj1 and obj2, the value in obj1 is used.\r\n * \r\n * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this\r\n * function on shallow objects.\r\n *\r\n * @function Phaser.Utils.Objects.Merge\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object.\r\n * @param {object} obj2 - The second object.\r\n *\r\n * @return {object} A new object containing the union of obj1's and obj2's properties.\r\n */\r\nvar Merge = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (!clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = Merge;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Merge.js?")},"./node_modules/phaser/src/utils/object/MergeRight.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar Clone = __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js");\r\n\r\n/**\r\n * Creates a new Object using all values from obj1.\r\n * \r\n * Then scans obj2. If a property is found in obj2 that *also* exists in obj1, the value from obj2 is used, otherwise the property is skipped.\r\n *\r\n * @function Phaser.Utils.Objects.MergeRight\r\n * @since 3.0.0\r\n *\r\n * @param {object} obj1 - The first object to merge.\r\n * @param {object} obj2 - The second object to merge. Keys from this object which also exist in `obj1` will be copied to `obj1`.\r\n *\r\n * @return {object} The merged object. `obj1` and `obj2` are not modified.\r\n */\r\nvar MergeRight = function (obj1, obj2)\r\n{\r\n var clone = Clone(obj1);\r\n\r\n for (var key in obj2)\r\n {\r\n if (clone.hasOwnProperty(key))\r\n {\r\n clone[key] = obj2[key];\r\n }\r\n }\r\n\r\n return clone;\r\n};\r\n\r\nmodule.exports = MergeRight;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/MergeRight.js?')},"./node_modules/phaser/src/utils/object/Pick.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\nvar HasValue = __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js");\r\n\r\n/**\r\n * Returns a new object that only contains the `keys` that were found on the object provided.\r\n * If no `keys` are found, an empty object is returned.\r\n *\r\n * @function Phaser.Utils.Objects.Pick\r\n * @since 3.18.0\r\n *\r\n * @param {object} object - The object to pick the provided keys from.\r\n * @param {array} keys - An array of properties to retrieve from the provided object.\r\n *\r\n * @return {object} A new object that only contains the `keys` that were found on the provided object. If no `keys` were found, an empty object will be returned.\r\n */\r\nvar Pick = function (object, keys)\r\n{\r\n var obj = {};\r\n\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n var key = keys[i];\r\n\r\n if (HasValue(object, key))\r\n {\r\n obj[key] = object[key];\r\n }\r\n }\r\n\r\n return obj;\r\n};\r\n\r\nmodule.exports = Pick;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/Pick.js?')},"./node_modules/phaser/src/utils/object/SetValue.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Sets a value in an object, allowing for dot notation to control the depth of the property.\r\n * \r\n * For example:\r\n * \r\n * ```javascript\r\n * var data = {\r\n * world: {\r\n * position: {\r\n * x: 200,\r\n * y: 100\r\n * }\r\n * }\r\n * };\r\n * \r\n * SetValue(data, 'world.position.y', 300);\r\n * \r\n * console.log(data.world.position.y); // 300\r\n * ```\r\n *\r\n * @function Phaser.Utils.Objects.SetValue\r\n * @since 3.17.0\r\n *\r\n * @param {object} source - The object to set the value in.\r\n * @param {string} key - The name of the property in the object. If a property is nested, the names of its preceding properties should be separated by a dot (`.`)\r\n * @param {any} value - The value to set into the property, if found in the source object.\r\n *\r\n * @return {boolean} `true` if the property key was valid and the value was set, otherwise `false`.\r\n */\r\nvar SetValue = function (source, key, value)\r\n{\r\n if (!source || typeof source === 'number')\r\n {\r\n return false;\r\n }\r\n else if (source.hasOwnProperty(key))\r\n {\r\n source[key] = value;\r\n\r\n return true;\r\n }\r\n else if (key.indexOf('.') !== -1)\r\n {\r\n var keys = key.split('.');\r\n var parent = source;\r\n var prev = source;\r\n\r\n // Use for loop here so we can break early\r\n for (var i = 0; i < keys.length; i++)\r\n {\r\n if (parent.hasOwnProperty(keys[i]))\r\n {\r\n // Yes it has a key property, let's carry on down\r\n prev = parent;\r\n parent = parent[keys[i]];\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n\r\n prev[keys[keys.length - 1]] = value;\r\n\r\n return true;\r\n }\r\n \r\n return false;\r\n};\r\n\r\nmodule.exports = SetValue;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/SetValue.js?")},"./node_modules/phaser/src/utils/object/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.Objects\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Clone: __webpack_require__(/*! ./Clone */ "./node_modules/phaser/src/utils/object/Clone.js"),\r\n Extend: __webpack_require__(/*! ./Extend */ "./node_modules/phaser/src/utils/object/Extend.js"),\r\n GetAdvancedValue: __webpack_require__(/*! ./GetAdvancedValue */ "./node_modules/phaser/src/utils/object/GetAdvancedValue.js"),\r\n GetFastValue: __webpack_require__(/*! ./GetFastValue */ "./node_modules/phaser/src/utils/object/GetFastValue.js"),\r\n GetMinMaxValue: __webpack_require__(/*! ./GetMinMaxValue */ "./node_modules/phaser/src/utils/object/GetMinMaxValue.js"),\r\n GetValue: __webpack_require__(/*! ./GetValue */ "./node_modules/phaser/src/utils/object/GetValue.js"),\r\n HasAll: __webpack_require__(/*! ./HasAll */ "./node_modules/phaser/src/utils/object/HasAll.js"),\r\n HasAny: __webpack_require__(/*! ./HasAny */ "./node_modules/phaser/src/utils/object/HasAny.js"),\r\n HasValue: __webpack_require__(/*! ./HasValue */ "./node_modules/phaser/src/utils/object/HasValue.js"),\r\n IsPlainObject: __webpack_require__(/*! ./IsPlainObject */ "./node_modules/phaser/src/utils/object/IsPlainObject.js"),\r\n Merge: __webpack_require__(/*! ./Merge */ "./node_modules/phaser/src/utils/object/Merge.js"),\r\n MergeRight: __webpack_require__(/*! ./MergeRight */ "./node_modules/phaser/src/utils/object/MergeRight.js"),\r\n Pick: __webpack_require__(/*! ./Pick */ "./node_modules/phaser/src/utils/object/Pick.js"),\r\n SetValue: __webpack_require__(/*! ./SetValue */ "./node_modules/phaser/src/utils/object/SetValue.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/object/index.js?')},"./node_modules/phaser/src/utils/string/Format.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes a string and replaces instances of markers with values in the given array.\r\n * The markers take the form of `%1`, `%2`, etc. I.e.:\r\n *\r\n * `Format(\"The %1 is worth %2 gold\", [ 'Sword', 500 ])`\r\n *\r\n * @function Phaser.Utils.String.Format\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string containing the replacement markers.\r\n * @param {array} values - An array containing values that will replace the markers. If no value exists an empty string is inserted instead.\r\n *\r\n * @return {string} The string containing replaced values.\r\n */\r\nvar Format = function (string, values)\r\n{\r\n return string.replace(/%([0-9]+)/g, function (s, n)\r\n {\r\n return values[Number(n) - 1];\r\n });\r\n};\r\n\r\nmodule.exports = Format;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Format.js?")},"./node_modules/phaser/src/utils/string/Pad.js":function(module,exports){eval("/**\n * @author Richard Davey \n * @copyright 2019 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\n/**\n * Takes the given string and pads it out, to the length required, using the character\n * specified. For example if you need a string to be 6 characters long, you can call:\n *\n * `pad('bob', 6, '-', 2)`\n *\n * This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.\n *\n * You can also use it to pad numbers (they are always returned as strings):\n * \n * `pad(512, 6, '0', 1)`\n *\n * Would return: `000512` with the string padded to the left.\n *\n * If you don't specify a direction it'll pad to both sides:\n * \n * `pad('c64', 7, '*')`\n *\n * Would return: `**c64**`\n *\n * @function Phaser.Utils.String.Pad\n * @since 3.0.0\n *\n * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers.\n * @param {integer} [len=0] - The number of characters to be added.\n * @param {string} [pad=\" \"] - The string to pad it out with (defaults to a space).\n * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both).\n * \n * @return {string} The padded string.\n */\nvar Pad = function (str, len, pad, dir)\n{\n if (len === undefined) { len = 0; }\n if (pad === undefined) { pad = ' '; }\n if (dir === undefined) { dir = 3; }\n\n str = str.toString();\n\n var padlen = 0;\n\n if (len + 1 >= str.length)\n {\n switch (dir)\n {\n case 1:\n str = new Array(len + 1 - str.length).join(pad) + str;\n break;\n\n case 3:\n var right = Math.ceil((padlen = len - str.length) / 2);\n var left = padlen - right;\n str = new Array(left + 1).join(pad) + str + new Array(right + 1).join(pad);\n break;\n\n default:\n str = str + new Array(len + 1 - str.length).join(pad);\n break;\n }\n }\n\n return str;\n};\n\nmodule.exports = Pad;\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Pad.js?")},"./node_modules/phaser/src/utils/string/Reverse.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Takes the given string and reverses it, returning the reversed string.\r\n * For example if given the string `Atari 520ST` it would return `TS025 iratA`.\r\n *\r\n * @function Phaser.Utils.String.Reverse\r\n * @since 3.0.0\r\n *\r\n * @param {string} string - The string to be reversed.\r\n *\r\n * @return {string} The reversed string.\r\n */\r\nvar Reverse = function (string)\r\n{\r\n return string.split('').reverse().join('');\r\n};\r\n\r\nmodule.exports = Reverse;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/Reverse.js?")},"./node_modules/phaser/src/utils/string/UUID.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Creates and returns an RFC4122 version 4 compliant UUID.\r\n * \r\n * The string is in the form: `xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx` where each `x` is replaced with a random\r\n * hexadecimal digit from 0 to f, and `y` is replaced with a random hexadecimal digit from 8 to b.\r\n *\r\n * @function Phaser.Utils.String.UUID\r\n * @since 3.12.0\r\n *\r\n * @return {string} The UUID string.\r\n */\r\nvar UUID = function ()\r\n{\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c)\r\n {\r\n var r = Math.random() * 16 | 0;\r\n var v = (c === 'x') ? r : (r & 0x3 | 0x8);\r\n\r\n return v.toString(16);\r\n });\r\n};\r\n\r\nmodule.exports = UUID;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UUID.js?")},"./node_modules/phaser/src/utils/string/UppercaseFirst.js":function(module,exports){eval("/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * Capitalizes the first letter of a string if there is one.\r\n * @example\r\n * UppercaseFirst('abc');\r\n * // returns 'Abc'\r\n * @example\r\n * UppercaseFirst('the happy family');\r\n * // returns 'The happy family'\r\n * @example\r\n * UppercaseFirst('');\r\n * // returns ''\r\n *\r\n * @function Phaser.Utils.String.UppercaseFirst\r\n * @since 3.0.0\r\n *\r\n * @param {string} str - The string to capitalize.\r\n *\r\n * @return {string} A new string, same as the first, but with the first letter capitalized.\r\n */\r\nvar UppercaseFirst = function (str)\r\n{\r\n return str && str[0].toUpperCase() + str.slice(1);\r\n};\r\n\r\nmodule.exports = UppercaseFirst;\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/UppercaseFirst.js?")},"./node_modules/phaser/src/utils/string/index.js":function(module,exports,__webpack_require__){eval('/**\r\n * @author Richard Davey \r\n * @copyright 2019 Photon Storm Ltd.\r\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\r\n */\r\n\r\n/**\r\n * @namespace Phaser.Utils.String\r\n */\r\n\r\nmodule.exports = {\r\n\r\n Format: __webpack_require__(/*! ./Format */ "./node_modules/phaser/src/utils/string/Format.js"),\r\n Pad: __webpack_require__(/*! ./Pad */ "./node_modules/phaser/src/utils/string/Pad.js"),\r\n Reverse: __webpack_require__(/*! ./Reverse */ "./node_modules/phaser/src/utils/string/Reverse.js"),\r\n UppercaseFirst: __webpack_require__(/*! ./UppercaseFirst */ "./node_modules/phaser/src/utils/string/UppercaseFirst.js"),\r\n UUID: __webpack_require__(/*! ./UUID */ "./node_modules/phaser/src/utils/string/UUID.js")\r\n\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/phaser/src/utils/string/index.js?')},"./node_modules/process/browser.js":function(module,exports){eval("// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n\n\n//# sourceURL=webpack:///./node_modules/process/browser.js?")},"./node_modules/webpack/buildin/global.js":function(module,exports){eval('var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function("return this")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === "object") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it\'s\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n\n\n//# sourceURL=webpack:///(webpack)/buildin/global.js?')},1:function(module,exports,__webpack_require__){eval('module.exports = __webpack_require__(/*! /Users/danieldanielecki/Downloads/tappyplane/node_modules/phaser/src/phaser.js */"./node_modules/phaser/src/phaser.js");\n\n\n//# sourceURL=webpack:///multi_./node_modules/phaser/src/phaser.js?')}}); \ No newline at end of file diff --git a/cordova/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE b/cordova/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE deleted file mode 100644 index 525e331..0000000 --- a/cordova/www/vendor.0909a17fa1f4ba2383c9.js.LICENSE +++ /dev/null @@ -1,5717 +0,0 @@ -/*!*********************************************!*\ - !*** ./node_modules/eventemitter3/index.js ***! - \*********************************************/ - -/*! no static exports found */ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/Camera.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/CameraManager.js ***! - \*******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/OrthographicCamera.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/PerspectiveCamera.js ***! - \***********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/index.js ***! - \***********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3D.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DCreator.js ***! - \******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/plugins/camera3d/src/sprite3d/Sprite3DFactory.js ***! - \******************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/AdInstance.js ***! - \*****************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/FacebookInstantGamesPlugin.js ***! - \*********************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Leaderboard.js ***! - \******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/LeaderboardScore.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Product.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/plugins/fbinstant/src/Purchase.js ***! - \***************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/Angle.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/Call.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetFirst.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/GetLast.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/GridAlign.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncAlpha.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/IncY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnCircle.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnEllipse.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnLine.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnRectangle.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlaceOnTriangle.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/PlayAnimation.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueInc.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/actions/PropertyValueSet.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomCircle.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomEllipse.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomLine.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomRectangle.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RandomTriangle.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Rotate.js ***! - \***************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAround.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/actions/RotateAroundDistance.js ***! - \*****************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleX.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleXY.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/ScaleY.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetAlpha.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetBlendMode.js ***! - \*********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetDepth.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetHitArea.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetOrigin.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetRotation.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScale.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetScaleY.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetTint.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetVisible.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetX.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetXY.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/actions/SetY.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ShiftPosition.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/actions/Shuffle.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmoothStep.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/actions/SmootherStep.js ***! - \*********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/actions/Spread.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/actions/ToggleVisible.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/actions/WrapInRectangle.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/actions/index.js ***! - \**************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/animations/Animation.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationFrame.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/animations/AnimationManager.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ADD_ANIMATION_EVENT.js ***! - \**************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_COMPLETE_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_REPEAT_EVENT.js ***! - \*****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_RESTART_EVENT.js ***! - \******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/ANIMATION_START_EVENT.js ***! - \****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/PAUSE_ALL_EVENT.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/REMOVE_ANIMATION_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/RESUME_ALL_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_COMPLETE_EVENT.js ***! - \**************************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_COMPLETE_EVENT.js ***! - \******************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_REPEAT_EVENT.js ***! - \****************************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_RESTART_EVENT.js ***! - \*****************************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_START_EVENT.js ***! - \***************************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_KEY_UPDATE_EVENT.js ***! - \****************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_REPEAT_EVENT.js ***! - \************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_RESTART_EVENT.js ***! - \*************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/SPRITE_ANIMATION_UPDATE_EVENT.js ***! - \************************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/animations/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/animations/index.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/cache/BaseCache.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/CacheManager.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/ADD_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/REMOVE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/cache/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/cache/index.js ***! - \************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/BaseCamera.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/Camera.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/CameraManager.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Fade.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Flash.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Pan.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Shake.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/Zoom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/effects/index.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/DESTROY_EVENT.js ***! - \********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_COMPLETE_EVENT.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_IN_START_EVENT.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_COMPLETE_EVENT.js ***! - \******************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FADE_OUT_START_EVENT.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/FLASH_START_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_COMPLETE_EVENT.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PAN_START_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/POST_RENDER_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/PRE_RENDER_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/SHAKE_START_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/ZOOM_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/events/index.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/cameras/2d/index.js ***! - \*****************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/FixedKeyControl.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/SmoothedKeyControl.js ***! - \************************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/cameras/controls/index.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/cameras/index.js ***! - \**************************************************/ - -/*!******************************************!*\ - !*** ./node_modules/phaser/src/const.js ***! - \******************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/core/Config.js ***! - \************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/core/CreateRenderer.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/core/DebugHeader.js ***! - \*****************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/core/Game.js ***! - \**********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/core/TimeStep.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/VisibilityHandler.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BLUR_EVENT.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/BOOT_EVENT.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_LOST_EVENT.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/CONTEXT_RESTORED_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/DESTROY_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/FOCUS_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/HIDDEN_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PAUSE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_RENDER_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/POST_STEP_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_RENDER_EVENT.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/PRE_STEP_EVENT.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/READY_EVENT.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/RESUME_EVENT.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/core/events/STEP_EVENT.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/core/events/VISIBLE_EVENT.js ***! - \**************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/core/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/core/index.js ***! - \***********************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/GenerateTexture.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/create/index.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/Arne16.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/C64.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/CGA.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/JMP.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/MSX.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/create/palettes/index.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/curves/CubicBezierCurve.js ***! - \************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/Curve.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/curves/EllipseCurve.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/LineCurve.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/curves/QuadraticBezierCurve.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/SplineCurve.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/curves/index.js ***! - \*************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/MoveTo.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/curves/path/Path.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManager.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/data/DataManagerPlugin.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/CHANGE_DATA_KEY_EVENT.js ***! - \**********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/REMOVE_DATA_EVENT.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/data/events/SET_DATA_EVENT.js ***! - \***************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/data/events/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/data/index.js ***! - \***********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Audio.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/device/Browser.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/device/CanvasFeatures.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/device/Features.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/device/Fullscreen.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Input.js ***! - \*************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/device/OS.js ***! - \**********************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/Video.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/device/index.js ***! - \*************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/const.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/BottomRight.js ***! - \*****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/Center.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/LeftCenter.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/QuickSet.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/RightCenter.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/in/index.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomCenter.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomLeft.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/BottomRight.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftBottom.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftCenter.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/LeftTop.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightBottom.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightCenter.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/RightTop.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopCenter.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopLeft.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/TopRight.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/align/to/index.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/CenterOn.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetLeft.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetOffsetY.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/GetTop.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetBottom.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterX.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetCenterY.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/SetTop.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/bounds/index.js ***! - \*********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasInterpolation.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/CanvasPool.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/Smoothing.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/TouchAction.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/UserSelect.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/display/canvas/index.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Color.js ***! - \********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ColorToRGBA.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ComponentToHex.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/GetColor32.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSLToColor.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVColorWheel.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HSVToRGB.js ***! - \***********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HexStringToColor.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/HueToComponent.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToColor.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/IntegerToRGB.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/Interpolate.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ObjectToColor.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBStringToColor.js ***! - \*******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToHSV.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RGBToString.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/RandomRGB.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/display/color/ValueToColor.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/display/color/index.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/display/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/BitmapMask.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/GeometryMask.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/display/mask/index.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/display/shader/BaseShader.js ***! - \**************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/AddToDOM.js ***! - \*************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/dom/CreateDOMContainer.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/dom/DOMContentLoaded.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetInnerHeight.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetScreenOrientation.js ***! - \*************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/dom/GetTarget.js ***! - \**************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/dom/ParseXML.js ***! - \*************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/dom/RemoveFromDOM.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/dom/RequestAnimationFrame.js ***! - \**************************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/dom/index.js ***! - \**********************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/events/EventEmitter.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/events/index.js ***! - \*************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObject.js ***! - \****************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/BuildGameObjectAnimation.js ***! - \*************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/DisplayList.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObject.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectCreator.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/GameObjectFactory.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/UpdateList.js ***! - \***********************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/GetBitmapTextSize.js ***! - \*****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseFromAtlas.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseRetroFont.js ***! - \**************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/ParseXMLBitmapFont.js ***! - \******************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/RetroFont.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/const.js ***! - \*****************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapText.js ***! - \*************************************************************************************/ - -/*!***************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCanvasRenderer.js ***! - \***************************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextCreator.js ***! - \********************************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextFactory.js ***! - \********************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextRender.js ***! - \*******************************************************************************************/ - -/*!**************************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/dynamic/DynamicBitmapTextWebGLRenderer.js ***! - \**************************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapText.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js ***! - \*******************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextCreator.js ***! - \************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextFactory.js ***! - \************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextRender.js ***! - \***********************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js ***! - \******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Blitter.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterCreator.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/BlitterWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/blitter/Bob.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Alpha.js ***! - \*****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Animation.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/BlendMode.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ComputedSize.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Crop.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Depth.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Flip.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/GetBounds.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Mask.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Origin.js ***! - \******************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/PathFollower.js ***! - \************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Pipeline.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ScrollFactor.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Size.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Texture.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TextureCrop.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Tint.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/ToJSON.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Transform.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/TransformMatrix.js ***! - \***************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/Visible.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/components/index.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/Container.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerCreator.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/container/ContainerWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/CSSBlendModes.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElement.js ***! - \**********************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementCSSRenderer.js ***! - \*********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/domelement/DOMElementRender.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/DESTROY_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/events/index.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/Extern.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/extern/ExternWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Commands.js ***! - \******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/Graphics.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsCreator.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/graphics/GraphicsWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/Group.js ***! - \************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/group/GroupFactory.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/Image.js ***! - \************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCanvasRenderer.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageCreator.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageFactory.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageRender.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/image/ImageWebGLRenderer.js ***! - \*************************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/Light.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsManager.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/lights/LightsPlugin.js ***! - \********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/Mesh.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCanvasRenderer.js ***! - \************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshRender.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/mesh/MeshWebGLRenderer.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/EmitterOp.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/GravityWell.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/Particle.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitter.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleEmitterManager.js ***! - \*********************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerCreator.js ***! - \*********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/ParticleManagerWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/index.js ***! - \****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/DeathZone.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/EdgeZone.js ***! - \*************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/RandomZone.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/particles/zones/index.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollower.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/pathfollower/PathFollowerFactory.js ***! - \*********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/Quad.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/quad/QuadFactory.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTexture.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureCreator.js ***! - \***********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureFactory.js ***! - \***********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/rendertexture/RenderTextureWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/Shader.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shader/ShaderWebGLRenderer.js ***! - \***************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillPathWebGL.js ***! - \********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/FillStyleCanvas.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/LineStyleCanvas.js ***! - \**********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/Shape.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/StrokePathWebGL.js ***! - \**********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/Arc.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/arc/ArcWebGLRenderer.js ***! - \***************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/Curve.js ***! - \******************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveCanvasRenderer.js ***! - \********************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveFactory.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveRender.js ***! - \************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/curve/CurveWebGLRenderer.js ***! - \*******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/Ellipse.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/ellipse/EllipseWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/Grid.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/grid/GridWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBox.js ***! - \********************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxCanvasRenderer.js ***! - \**********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxFactory.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxRender.js ***! - \**************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isobox/IsoBoxWebGLRenderer.js ***! - \*********************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangle.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleFactory.js ***! - \*************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/isotriangle/IsoTriangleWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/Line.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/line/LineWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/Polygon.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/polygon/PolygonWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/Rectangle.js ***! - \**************************************************************************/ - -/*!****************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleCanvasRenderer.js ***! - \****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleFactory.js ***! - \*********************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleRender.js ***! - \********************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/rectangle/RectangleWebGLRenderer.js ***! - \***************************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/Star.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarCanvasRenderer.js ***! - \******************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarFactory.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarRender.js ***! - \**********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/star/StarWebGLRenderer.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/Triangle.js ***! - \************************************************************************/ - -/*!**************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleCanvasRenderer.js ***! - \**************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleFactory.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleRender.js ***! - \******************************************************************************/ - -/*!*************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/shape/triangle/TriangleWebGLRenderer.js ***! - \*************************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/Sprite.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCanvasRenderer.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteCreator.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteFactory.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteRender.js ***! - \********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/sprite/SpriteWebGLRenderer.js ***! - \***************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/GetTextSize.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/MeasureText.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/TextStyle.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/Text.js ***! - \*****************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCanvasRenderer.js ***! - \*******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextCreator.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextFactory.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextRender.js ***! - \***********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/text/static/TextWebGLRenderer.js ***! - \******************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSprite.js ***! - \**********************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCanvasRenderer.js ***! - \************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteCreator.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteFactory.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteRender.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/tilesprite/TileSpriteWebGLRenderer.js ***! - \***********************************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/Zone.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneCreator.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/gameobjects/zone/ZoneFactory.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Area.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circle.js ***! - \*******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Circumference.js ***! - \**************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CircumferencePoint.js ***! - \*******************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Clone.js ***! - \******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Contains.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsPoint.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/ContainsRect.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/CopyFrom.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Equals.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetBounds.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoint.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/GetPoints.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Offset.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/OffsetPoint.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/Random.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/circle/index.js ***! - \******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/const.js ***! - \***********************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Area.js ***! - \******************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Circumference.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CircumferencePoint.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsPoint.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/ContainsRect.js ***! - \**************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/CopyFrom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Ellipse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Equals.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetBounds.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoint.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/GetPoints.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Offset.js ***! - \********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/OffsetPoint.js ***! - \*************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/Random.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/ellipse/index.js ***! - \*******************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/geom/index.js ***! - \***********************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToCircle.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/CircleToRectangle.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToCircle.js ***! - \**********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetCircleToRectangle.js ***! - \*************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToCircle.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetLineToRectangle.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleIntersection.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToRectangle.js ***! - \****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetRectangleToTriangle.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToCircle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToLine.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/GetTriangleToTriangle.js ***! - \**************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToCircle.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToLine.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/LineToRectangle.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLine.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/PointToLineSegment.js ***! - \***********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToRectangle.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToTriangle.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/RectangleToValues.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToCircle.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToLine.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/TriangleToTriangle.js ***! - \***********************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/intersects/index.js ***! - \**********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Angle.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/BresenhamPoints.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CenterOn.js ***! - \*******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Clone.js ***! - \****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/CopyFrom.js ***! - \*******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Equals.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Extend.js ***! - \*****************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetMidPoint.js ***! - \**********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNearestPoint.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetNormal.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoint.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetPoints.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/GetShortestDistance.js ***! - \******************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Height.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Length.js ***! - \*****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Line.js ***! - \***************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalAngle.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalX.js ***! - \******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/NormalY.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Offset.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/PerpSlope.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Random.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/ReflectAngle.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Rotate.js ***! - \*****************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundPoint.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/RotateAroundXY.js ***! - \*************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/SetToAngle.js ***! - \*********************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Slope.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/Width.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/line/index.js ***! - \****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Clone.js ***! - \*****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/CopyFrom.js ***! - \********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Equals.js ***! - \******************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetCentroid.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitude.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetMagnitudeSq.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/GetRectangleFromPoints.js ***! - \**********************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Interpolate.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Invert.js ***! - \******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Negative.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Point.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/Project.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/ProjectUnit.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/SetMagnitude.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/geom/point/index.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Clone.js ***! - \*******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Contains.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/ContainsPoint.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Earcut.js ***! - \********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetAABB.js ***! - \*********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetNumberArray.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/GetPoints.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Perimeter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Polygon.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Reverse.js ***! - \*********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/Smooth.js ***! - \********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/polygon/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Area.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Ceil.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CeilAll.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CenterOn.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Clone.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Contains.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsPoint.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/ContainsRect.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/CopyFrom.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Decompose.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Equals.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitInside.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FitOutside.js ***! - \**************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Floor.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FloorAll.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/FromPoints.js ***! - \**************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetAspectRatio.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetCenter.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoint.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetPoints.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/GetSize.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Inflate.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Intersection.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MarchingAnts.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergePoints.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeRect.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/MergeXY.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Offset.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/OffsetPoint.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Overlaps.js ***! - \************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Perimeter.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/PerimeterPoint.js ***! - \******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Random.js ***! - \**********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/RandomOutside.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Rectangle.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/SameDimensions.js ***! - \******************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Scale.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/Union.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/rectangle/index.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Area.js ***! - \*******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildEquilateral.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildFromPolygon.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/BuildRight.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CenterOn.js ***! - \***********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Centroid.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCenter.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CircumCircle.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Clone.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Contains.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsArray.js ***! - \****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/ContainsPoint.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/CopyFrom.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Decompose.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Equals.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoint.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/GetPoints.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/InCenter.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Offset.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Perimeter.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Random.js ***! - \*********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Rotate.js ***! - \*********************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundPoint.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/RotateAroundXY.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/Triangle.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/geom/triangle/index.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreateInteractiveObject.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/CreatePixelPerfectHandler.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPlugin.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/input/InputPluginCache.js ***! - \***********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/input/Pointer.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_END_EVENT.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_ENTER_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_LEAVE_EVENT.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DRAG_START_EVENT.js ***! - \******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/DROP_EVENT.js ***! - \************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DOWN_EVENT.js ***! - \***********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_END_EVENT.js ***! - \***************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_ENTER_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_LEAVE_EVENT.js ***! - \*****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_OVER_EVENT.js ***! - \****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DRAG_START_EVENT.js ***! - \*****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_DROP_EVENT.js ***! - \***********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_MOVE_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_OVER_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_DOWN_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_MOVE_EVENT.js ***! - \*******************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OUT_EVENT.js ***! - \******************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_OVER_EVENT.js ***! - \*******************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_UP_EVENT.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_POINTER_WHEEL_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_UP_EVENT.js ***! - \*********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAMEOBJECT_WHEEL_EVENT.js ***! - \************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OUT_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/GAME_OVER_EVENT.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_BOOT_EVENT.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_PROCESS_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/MANAGER_UPDATE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTERLOCK_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_EVENT.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_DOWN_OUTSIDE_EVENT.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_MOVE_EVENT.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OUT_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_OVER_EVENT.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_UP_OUTSIDE_EVENT.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/POINTER_WHEEL_EVENT.js ***! - \*********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/START_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/input/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/events/index.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Axis.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Button.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/Gamepad.js ***! - \**********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/GamepadPlugin.js ***! - \****************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/SNES_USB_Controller.js ***! - \******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/Sony_PlayStation_DualShock_4.js ***! - \***************************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/XBox360_Controller.js ***! - \*****************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/configs/index.js ***! - \****************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_DOWN_EVENT.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/BUTTON_UP_EVENT.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/CONNECTED_EVENT.js ***! - \*************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/DISCONNECTED_EVENT.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_DOWN_EVENT.js ***! - \***********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/GAMEPAD_BUTTON_UP_EVENT.js ***! - \*********************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/events/index.js ***! - \***************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/input/gamepad/index.js ***! - \********************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/input/index.js ***! - \************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardManager.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/KeyboardPlugin.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/AdvanceKeyCombo.js ***! - \*************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/KeyCombo.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ProcessKeyCombo.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/combo/ResetKeyCombo.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_DOWN_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/ANY_KEY_UP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/COMBO_MATCH_EVENT.js ***! - \****************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/DOWN_EVENT.js ***! - \*********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_DOWN_EVENT.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/KEY_UP_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/UP_EVENT.js ***! - \*******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/index.js ***! - \*********************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/DownDuration.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustDown.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/JustUp.js ***! - \***************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/Key.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyCodes.js ***! - \*****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/KeyMap.js ***! - \***************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/input/keyboard/keys/UpDuration.js ***! - \*******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/MouseManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/mouse/index.js ***! - \******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/TouchManager.js ***! - \*************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/input/touch/index.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/loader/File.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/FileTypesManager.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/loader/GetURL.js ***! - \**************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/LoaderPlugin.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/MergeXHRSettings.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/MultiFile.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRLoader.js ***! - \*****************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/loader/XHRSettings.js ***! - \*******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/const.js ***! - \*************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/ADD_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/COMPLETE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_COMPLETE_EVENT.js ***! - \**********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_KEY_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_ERROR_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_LOAD_EVENT.js ***! - \******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/FILE_PROGRESS_EVENT.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/POST_PROCESS_EVENT.js ***! - \*********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/PROGRESS_EVENT.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/START_EVENT.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/loader/events/index.js ***! - \********************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AnimationJSONFile.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasJSONFile.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AtlasXMLFile.js ***! - \******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/AudioSpriteFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BinaryFile.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/BitmapFontFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/CSSFile.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/GLSLFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTML5AudioFile.js ***! - \********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLFile.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/HTMLTextureFile.js ***! - \*********************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ImageFile.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/JSONFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiAtlasFile.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/MultiScriptFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PackFile.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/PluginFile.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SVGFile.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SceneFile.js ***! - \***************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScenePluginFile.js ***! - \*********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/ScriptFile.js ***! - \****************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/SpriteSheetFile.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TextFile.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapCSVFile.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapImpactFile.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/TilemapJSONFile.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/UnityAtlasFile.js ***! - \********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/XMLFile.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/loader/filetypes/index.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/loader/index.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Average.js ***! - \*************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Bernstein.js ***! - \***************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Between.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/CatmullRom.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/CeilTo.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/Clamp.js ***! - \***********************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/DegToRad.js ***! - \**************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Difference.js ***! - \****************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/Factorial.js ***! - \***************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/FloatBetween.js ***! - \******************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/FloorTo.js ***! - \*************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/FromPercent.js ***! - \*****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/GetSpeed.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEven.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/IsEvenStrict.js ***! - \******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Linear.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Matrix4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MaxAdd.js ***! - \************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/MinSub.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Percent.js ***! - \*************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/Quaternion.js ***! - \****************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RadToDeg.js ***! - \**************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXY.js ***! - \**************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZ.js ***! - \***************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RandomXYZW.js ***! - \****************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Rotate.js ***! - \************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAround.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateAroundDistance.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/RotateVec3.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundAwayFromZero.js ***! - \***********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/RoundTo.js ***! - \*************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/SinCosTableGenerator.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/SmoothStep.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/SmootherStep.js ***! - \******************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/ToXY.js ***! - \**********************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/TransformXY.js ***! - \*****************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector2.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector3.js ***! - \*************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/math/Vector4.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/math/Within.js ***! - \************************************************/ - -/*!**********************************************!*\ - !*** ./node_modules/phaser/src/math/Wrap.js ***! - \**********************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Between.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPoints.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenPointsY.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/BetweenY.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/CounterClockwise.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Normalize.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Reverse.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/RotateTo.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/ShortestBetween.js ***! - \***************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/Wrap.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/WrapDegrees.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/angle/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/const.js ***! - \***********************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceBetween.js ***! - \******************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistancePower.js ***! - \****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/DistanceSquared.js ***! - \******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/distance/index.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/EaseMap.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/back/index.js ***! - \***********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/In.js ***! - \**********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/InOut.js ***! - \*************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/Out.js ***! - \***********************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/bounce/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/In.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/InOut.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/Out.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/circular/index.js ***! - \***************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/In.js ***! - \*********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/InOut.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/Out.js ***! - \**********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/cubic/index.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/elastic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/expo/index.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/index.js ***! - \******************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/Linear.js ***! - \**************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/linear/index.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/In.js ***! - \*************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/InOut.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/Out.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quadratic/index.js ***! - \****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quartic/index.js ***! - \**************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/In.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/InOut.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/Out.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/quintic/index.js ***! - \**************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/In.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/InOut.js ***! - \***********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/Out.js ***! - \*********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/sine/index.js ***! - \***********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/Stepped.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/math/easing/stepped/index.js ***! - \**************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Ceil.js ***! - \****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Equal.js ***! - \*****************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/Floor.js ***! - \*****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/GreaterThan.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/LessThan.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/fuzzy/index.js ***! - \*****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/math/index.js ***! - \***********************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/BezierInterpolation.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CatmullRomInterpolation.js ***! - \*******************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/CubicBezierInterpolation.js ***! - \********************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/LinearInterpolation.js ***! - \***************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/QuadraticBezierInterpolation.js ***! - \************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmoothStepInterpolation.js ***! - \*******************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/SmootherStepInterpolation.js ***! - \*********************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/math/interpolation/index.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/GetPowerOfTwo.js ***! - \************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsSizePowerOfTwo.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/IsValuePowerOfTwo.js ***! - \****************************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/pow2/index.js ***! - \****************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/math/random-data-generator/RandomDataGenerator.js ***! - \***********************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapCeil.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapFloor.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/SnapTo.js ***! - \*****************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/math/snap/index.js ***! - \****************************************************/ - -/*!*******************************************!*\ - !*** ./node_modules/phaser/src/phaser.js ***! - \*******************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadePhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/ArcadeSprite.js ***! - \****************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Collider.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapX.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/GetOverlapY.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/PhysicsGroup.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/SeparateY.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticBody.js ***! - \**************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/StaticPhysicsGroup.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Acceleration.js ***! - \***************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Angular.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Bounce.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Debug.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Drag.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Enable.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Gravity.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Immovable.js ***! - \************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Mass.js ***! - \*******************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/OverlapRect.js ***! - \**************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Size.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/components/index.js ***! - \********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/const.js ***! - \*********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/OVERLAP_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_COLLIDE_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/TILE_OVERLAP_EVENT.js ***! - \*****************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_BOUNDS_EVENT.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/WORLD_STEP_EVENT.js ***! - \***************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileCallbacks.js ***! - \********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationX.js ***! - \**********************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/ProcessTileSeparationY.js ***! - \**********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/SeparateTile.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckX.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileCheckY.js ***! - \**********************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/arcade/tilemap/TileIntersectsBody.js ***! - \******************************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Body.js ***! - \********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/COLLIDES.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/CollisionMap.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/DefaultDefs.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Factory.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/GetVelocity.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactBody.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactImage.js ***! - \***************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactPhysics.js ***! - \*****************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/ImpactSprite.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateX.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/SeparateY.js ***! - \*************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/Solver.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/TYPE.js ***! - \********************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/UpdateMotion.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/World.js ***! - \*********************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Acceleration.js ***! - \***************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyScale.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/BodyType.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Bounce.js ***! - \*********************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/CheckAgainst.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Collides.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Debug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Friction.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Gravity.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Offset.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/SetGameObject.js ***! - \****************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/Velocity.js ***! - \***********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/components/index.js ***! - \********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/COLLIDE_EVENT.js ***! - \************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/PAUSE_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/RESUME_EVENT.js ***! - \***********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/events/index.js ***! - \****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/physics/impact/index.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/physics/index.js ***! - \**************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/CustomMain.js ***! - \*****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/Factory.js ***! - \**************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterGameObject.js ***! - \***********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterImage.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterPhysics.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterSprite.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/MatterTileBody.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PhysicsEditorParser.js ***! - \**************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/PointerConstraint.js ***! - \************************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/World.js ***! - \************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Bounce.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Collision.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Force.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Friction.js ***! - \**************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Gravity.js ***! - \*************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Mass.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sensor.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/SetBody.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Sleep.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Static.js ***! - \************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Transform.js ***! - \***************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/Velocity.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/components/index.js ***! - \***********************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/AFTER_UPDATE_EVENT.js ***! - \********************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/BEFORE_UPDATE_EVENT.js ***! - \*********************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_ACTIVE_EVENT.js ***! - \************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_END_EVENT.js ***! - \*********************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/COLLISION_START_EVENT.js ***! - \***********************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_END_EVENT.js ***! - \****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_EVENT.js ***! - \************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/DRAG_START_EVENT.js ***! - \******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/PAUSE_EVENT.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/RESUME_EVENT.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_END_EVENT.js ***! - \*****************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/SLEEP_START_EVENT.js ***! - \*******************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/events/index.js ***! - \*******************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/index.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Body.js ***! - \********************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/Composite.js ***! - \*************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/body/World.js ***! - \*********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Detector.js ***! - \*****************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Grid.js ***! - \*************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pair.js ***! - \*************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Pairs.js ***! - \**************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Query.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/Resolver.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/collision/SAT.js ***! - \************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/constraint/Constraint.js ***! - \********************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Common.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Engine.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Events.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Matter.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Metrics.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Plugin.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/core/Sleeping.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Bodies.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/factory/Composites.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Axes.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Bounds.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Svg.js ***! - \***********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vector.js ***! - \**************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/geometry/Vertices.js ***! - \****************************************************************************/ - -/*!***********************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterAttractors.js ***! - \***********************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/lib/plugins/MatterWrap.js ***! - \*****************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/physics/matter-js/poly-decomp/index.js ***! - \************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/plugins/BasePlugin.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/DefaultPlugins.js ***! - \***********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginCache.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/PluginManager.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/plugins/ScenePlugin.js ***! - \********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/plugins/index.js ***! - \**************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.forEach.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Array.isArray.js ***! - \************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/AudioContextMonkeyPatch.js ***! - \**********************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Math.trunc.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/Uint32Array.js ***! - \**********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/console.js ***! - \******************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/index.js ***! - \****************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/performance.now.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/polyfills/requestAnimationFrame.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/BlendModes.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/ScaleModes.js ***! - \********************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/CanvasRenderer.js ***! - \*******************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/index.js ***! - \**********************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/GetBlendModes.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/canvas/utils/SetTransform.js ***! - \***********************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/renderer/index.js ***! - \***************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/CanvasSnapshot.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/WebGLSnapshot.js ***! - \********************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/snapshot/index.js ***! - \************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/Utils.js ***! - \*********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLPipeline.js ***! - \*****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/WebGLRenderer.js ***! - \*****************************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/index.js ***! - \*********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/BitmapMaskPipeline.js ***! - \********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/ForwardDiffuseLightPipeline.js ***! - \*****************************************************************************************/ - -/*!*********************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/TextureTintPipeline.js ***! - \*********************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/components/ModelViewProjection.js ***! - \********************************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/pipelines/index.js ***! - \*******************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-frag.js ***! - \***************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/BitmapMask-vert.js ***! - \***************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/ForwardDiffuse-frag.js ***! - \*******************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-frag.js ***! - \****************************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/renderer/webgl/shaders/TextureTint-vert.js ***! - \****************************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/ScaleManager.js ***! - \*******************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/CENTER_CONST.js ***! - \*************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ORIENTATION_CONST.js ***! - \******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/SCALE_MODE_CONST.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/ZOOM_CONST.js ***! - \***********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scale/const/index.js ***! - \******************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ENTER_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_FAILED_EVENT.js ***! - \*************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/FULLSCREEN_UNSUPPORTED_EVENT.js ***! - \******************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/LEAVE_FULLSCREEN_EVENT.js ***! - \************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/ORIENTATION_CHANGE_EVENT.js ***! - \**************************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/RESIZE_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scale/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scale/index.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetPhysicsPlugins.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/scene/GetScenePlugins.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/InjectionMap.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/Scene.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/SceneManager.js ***! - \*******************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/scene/ScenePlugin.js ***! - \******************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/scene/Settings.js ***! - \***************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/scene/Systems.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/const.js ***! - \************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/BOOT_EVENT.js ***! - \************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/CREATE_EVENT.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/POST_UPDATE_EVENT.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/PRE_UPDATE_EVENT.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/READY_EVENT.js ***! - \*************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RENDER_EVENT.js ***! - \**************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SHUTDOWN_EVENT.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/SLEEP_EVENT.js ***! - \*************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/START_EVENT.js ***! - \*************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_COMPLETE_EVENT.js ***! - \***************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_INIT_EVENT.js ***! - \***********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_OUT_EVENT.js ***! - \**********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_START_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/TRANSITION_WAKE_EVENT.js ***! - \***********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/UPDATE_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/WAKE_EVENT.js ***! - \************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/scene/events/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/scene/index.js ***! - \************************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSound.js ***! - \****************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/sound/BaseSoundManager.js ***! - \***********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/SoundManagerCreator.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/COMPLETE_EVENT.js ***! - \****************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_ALL_EVENT.js ***! - \*******************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DECODED_EVENT.js ***! - \***************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DESTROY_EVENT.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/DETUNE_EVENT.js ***! - \**************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_DETUNE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_MUTE_EVENT.js ***! - \*******************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_RATE_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/GLOBAL_VOLUME_EVENT.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOPED_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/LOOP_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/MUTE_EVENT.js ***! - \************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_ALL_EVENT.js ***! - \*****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PAUSE_EVENT.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/PLAY_EVENT.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RATE_EVENT.js ***! - \************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_ALL_EVENT.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/RESUME_EVENT.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/SEEK_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_ALL_EVENT.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/STOP_EVENT.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/UNLOCKED_EVENT.js ***! - \****************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/VOLUME_EVENT.js ***! - \**************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/sound/events/index.js ***! - \*******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSound.js ***! - \****************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/html5/HTML5AudioSoundManager.js ***! - \***********************************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/sound/index.js ***! - \************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSound.js ***! - \***************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/sound/noaudio/NoAudioSoundManager.js ***! - \**********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSound.js ***! - \*****************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/sound/webaudio/WebAudioSoundManager.js ***! - \************************************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/List.js ***! - \*************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Map.js ***! - \************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/structs/ProcessQueue.js ***! - \*********************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/RTree.js ***! - \**************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/structs/Set.js ***! - \************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/structs/Size.js ***! - \*************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/structs/index.js ***! - \**************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/CanvasTexture.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/Frame.js ***! - \***************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/textures/Texture.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureManager.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/TextureSource.js ***! - \***********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/const.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ADD_EVENT.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/ERROR_EVENT.js ***! - \****************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/LOAD_EVENT.js ***! - \***************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/READY_EVENT.js ***! - \****************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/REMOVE_EVENT.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/textures/events/index.js ***! - \**********************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/textures/index.js ***! - \***************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/AtlasXML.js ***! - \**************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Canvas.js ***! - \************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/Image.js ***! - \***********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONArray.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/JSONHash.js ***! - \**************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheet.js ***! - \*****************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/SpriteSheetFromAtlas.js ***! - \**************************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/UnityYAML.js ***! - \***************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/textures/parsers/index.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Formats.js ***! - \*****************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ImageCollection.js ***! - \*************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/ParseToTilemap.js ***! - \************************************************************/ - -/*!**************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tile.js ***! - \**************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tilemap.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapCreator.js ***! - \************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/TilemapFactory.js ***! - \************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/Tileset.js ***! - \*****************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesAt.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CalculateFacesWithin.js ***! - \*****************************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Copy.js ***! - \*************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CreateFromTiles.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/CullTiles.js ***! - \******************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Fill.js ***! - \*************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FilterTiles.js ***! - \********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindByIndex.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/FindTile.js ***! - \*****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ForEachTile.js ***! - \********************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithin.js ***! - \***********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinShape.js ***! - \****************************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/GetTilesWithinWorldXY.js ***! - \******************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/HasTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/IsInLayerBounds.js ***! - \************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAt.js ***! - \******************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTileAtWorldXY.js ***! - \*************************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/PutTilesAt.js ***! - \*******************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Randomize.js ***! - \******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAt.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RemoveTileAtWorldXY.js ***! - \****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/RenderDebug.js ***! - \********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/ReplaceByIndex.js ***! - \***********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollision.js ***! - \*********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionBetween.js ***! - \****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByExclusion.js ***! - \********************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionByProperty.js ***! - \*******************************************************************************/ - -/*!***************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetCollisionFromCollisionGroup.js ***! - \***************************************************************************************/ - -/*!*******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetLayerCollisionIndex.js ***! - \*******************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileCollision.js ***! - \*************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileIndexCallback.js ***! - \*****************************************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SetTileLocationCallback.js ***! - \********************************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/Shuffle.js ***! - \****************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/SwapByIndex.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/TileToWorldY.js ***! - \*********************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WeightedRandomize.js ***! - \**************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileX.js ***! - \*********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileXY.js ***! - \**********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/WorldToTileY.js ***! - \*********************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/components/index.js ***! - \**************************************************************/ - -/*!******************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayer.js ***! - \******************************************************************************/ - -/*!********************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerCanvasRenderer.js ***! - \********************************************************************************************/ - -/*!************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerRender.js ***! - \************************************************************************************/ - -/*!*******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/dynamiclayer/DynamicTilemapLayerWebGLRenderer.js ***! - \*******************************************************************************************/ - -/*!***************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/index.js ***! - \***************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/LayerData.js ***! - \***************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/MapData.js ***! - \*************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/mapdata/ObjectLayer.js ***! - \*****************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse.js ***! - \***********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/Parse2DArray.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/ParseCSV.js ***! - \**************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTileLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseTilesets.js ***! - \**************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/ParseWeltmeister.js ***! - \*****************************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/impact/index.js ***! - \******************************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/index.js ***! - \***********************************************************/ - -/*!********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/AssignTileProperties.js ***! - \********************************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/Base64Decode.js ***! - \************************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/BuildTilesetIndex.js ***! - \*****************************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseGID.js ***! - \********************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseImageLayers.js ***! - \****************************************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseJSONTiled.js ***! - \**************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObject.js ***! - \***********************************************************************/ - -/*!*****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseObjectLayers.js ***! - \*****************************************************************************/ - -/*!***************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTileLayers.js ***! - \***************************************************************************/ - -/*!*************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/ParseTilesets.js ***! - \*************************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/parsers/tiled/index.js ***! - \*****************************************************************/ - -/*!****************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayer.js ***! - \****************************************************************************/ - -/*!******************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerCanvasRenderer.js ***! - \******************************************************************************************/ - -/*!**********************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerRender.js ***! - \**********************************************************************************/ - -/*!*****************************************************************************************!*\ - !*** ./node_modules/phaser/src/tilemaps/staticlayer/StaticTilemapLayerWebGLRenderer.js ***! - \*****************************************************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/Clock.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/time/TimerEvent.js ***! - \****************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/time/index.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/tweens/Timeline.js ***! - \****************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/TweenManager.js ***! - \********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetBoolean.js ***! - \***************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetEaseFunction.js ***! - \********************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetNewValue.js ***! - \****************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetProps.js ***! - \*************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTargets.js ***! - \***************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetTweens.js ***! - \**************************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/GetValueOp.js ***! - \***************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/NumberTweenBuilder.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/StaggerBuilder.js ***! - \*******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TimelineBuilder.js ***! - \********************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/TweenBuilder.js ***! - \*****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/builders/index.js ***! - \**********************************************************/ - -/*!**************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_COMPLETE_EVENT.js ***! - \**************************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_LOOP_EVENT.js ***! - \**********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_PAUSE_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_RESUME_EVENT.js ***! - \************************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_START_EVENT.js ***! - \***********************************************************************/ - -/*!************************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TIMELINE_UPDATE_EVENT.js ***! - \************************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_ACTIVE_EVENT.js ***! - \*********************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_COMPLETE_EVENT.js ***! - \***********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_LOOP_EVENT.js ***! - \*******************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_REPEAT_EVENT.js ***! - \*********************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_START_EVENT.js ***! - \********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_UPDATE_EVENT.js ***! - \*********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/TWEEN_YOYO_EVENT.js ***! - \*******************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/events/index.js ***! - \********************************************************/ - -/*!*************************************************!*\ - !*** ./node_modules/phaser/src/tweens/index.js ***! - \*************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Defaults.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/ReservedProps.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/Tween.js ***! - \*******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/TweenData.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/tweens/tween/const.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/Class.js ***! - \************************************************/ - -/*!***********************************************!*\ - !*** ./node_modules/phaser/src/utils/NOOP.js ***! - \***********************************************/ - -/*!****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Add.js ***! - \****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/AddAt.js ***! - \******************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/BringToTop.js ***! - \***********************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/CountAllMatching.js ***! - \*****************************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Each.js ***! - \*****************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/EachInRange.js ***! - \************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/FindClosestInSorted.js ***! - \********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetAll.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetFirst.js ***! - \*********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/GetRandom.js ***! - \**********************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveDown.js ***! - \*********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveTo.js ***! - \*******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/MoveUp.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArray.js ***! - \************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/NumberArrayStep.js ***! - \****************************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/QuickSelect.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Range.js ***! - \******************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Remove.js ***! - \*******************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveAt.js ***! - \*********************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveBetween.js ***! - \**************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RemoveRandomElement.js ***! - \********************************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Replace.js ***! - \********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateLeft.js ***! - \***********************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/RotateRight.js ***! - \************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SafeRange.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SendToBack.js ***! - \***********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SetAll.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Shuffle.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/SpliceOne.js ***! - \**********************************************************/ - -/*!***********************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/StableSort.js ***! - \***********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/Swap.js ***! - \*****************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/index.js ***! - \******************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/CheckMatrix.js ***! - \*******************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/MatrixToString.js ***! - \**********************************************************************/ - -/*!**********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseColumns.js ***! - \**********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/ReverseRows.js ***! - \*******************************************************************/ - -/*!*****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/Rotate180.js ***! - \*****************************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateLeft.js ***! - \******************************************************************/ - -/*!********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateMatrix.js ***! - \********************************************************************/ - -/*!*******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/RotateRight.js ***! - \*******************************************************************/ - -/*!***********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/TransposeMatrix.js ***! - \***********************************************************************/ - -/*!*************************************************************!*\ - !*** ./node_modules/phaser/src/utils/array/matrix/index.js ***! - \*************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/ArrayBufferToBase64.js ***! - \*********************************************************************/ - -/*!*********************************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/Base64ToArrayBuffer.js ***! - \*********************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/base64/index.js ***! - \*******************************************************/ - -/*!************************************************!*\ - !*** ./node_modules/phaser/src/utils/index.js ***! - \************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Clone.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Extend.js ***! - \********************************************************/ - -/*!******************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetAdvancedValue.js ***! - \******************************************************************/ - -/*!**************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetFastValue.js ***! - \**************************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetMinMaxValue.js ***! - \****************************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/GetValue.js ***! - \**********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAll.js ***! - \********************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasAny.js ***! - \********************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/HasValue.js ***! - \**********************************************************/ - -/*!***************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/IsPlainObject.js ***! - \***************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Merge.js ***! - \*******************************************************/ - -/*!************************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/MergeRight.js ***! - \************************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/Pick.js ***! - \******************************************************/ - -/*!**********************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/SetValue.js ***! - \**********************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/object/index.js ***! - \*******************************************************/ - -/*!********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Format.js ***! - \********************************************************/ - -/*!*****************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Pad.js ***! - \*****************************************************/ - -/*!*********************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/Reverse.js ***! - \*********************************************************/ - -/*!******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UUID.js ***! - \******************************************************/ - -/*!****************************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/UppercaseFirst.js ***! - \****************************************************************/ - -/*!*******************************************************!*\ - !*** ./node_modules/phaser/src/utils/string/index.js ***! - \*******************************************************/ - -/*!*****************************************!*\ - !*** ./node_modules/process/browser.js ***! - \*****************************************/ - -/*!***********************************!*\ - !*** (webpack)/buildin/global.js ***! - \***********************************/ - -/*!*************************************************!*\ - !*** multi ./node_modules/phaser/src/phaser.js ***! - \*************************************************/ diff --git a/index.html b/index.html index 7ef4bfa..64f7d26 100755 --- a/index.html +++ b/index.html @@ -7,6 +7,9 @@ + + FlyingPlane diff --git a/package-lock.json b/package-lock.json index 41766cd..5988913 100755 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "flyingplane", - "version": "1.1.2", + "version": "1.2.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "flyingplane", - "version": "1.1.2", + "version": "1.2.2", "dependencies": { "firebase": "^10.1.0", "phaser": "^3.19.0" diff --git a/package.json b/package.json index a19ac73..0213264 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "com.doyban.flyingplane", "displayName": "FlyingPlane", - "version": "1.1.2", + "version": "1.2.2", "description": "Tap Plane Game", "main": "index.ts", "scripts": { diff --git a/src/assets/audio/click.mp3 b/src/assets/audio/click.mp3 new file mode 100644 index 0000000..89747ef Binary files /dev/null and b/src/assets/audio/click.mp3 differ diff --git a/src/assets/audio/click.ogg b/src/assets/audio/click.ogg new file mode 100644 index 0000000..4b46c84 Binary files /dev/null and b/src/assets/audio/click.ogg differ diff --git a/src/assets/audio/click.wav b/src/assets/audio/click.wav deleted file mode 100644 index a92759a..0000000 Binary files a/src/assets/audio/click.wav and /dev/null differ diff --git a/src/assets/audio/crash.mp3 b/src/assets/audio/crash.mp3 new file mode 100644 index 0000000..991dbfd Binary files /dev/null and b/src/assets/audio/crash.mp3 differ diff --git a/src/assets/audio/crash.ogg b/src/assets/audio/crash.ogg new file mode 100644 index 0000000..2e77af3 Binary files /dev/null and b/src/assets/audio/crash.ogg differ diff --git a/src/assets/audio/crash.wav b/src/assets/audio/crash.wav deleted file mode 100644 index c01a1d0..0000000 Binary files a/src/assets/audio/crash.wav and /dev/null differ diff --git a/src/assets/audio/explosion.mp3 b/src/assets/audio/explosion.mp3 new file mode 100644 index 0000000..fa9e911 Binary files /dev/null and b/src/assets/audio/explosion.mp3 differ diff --git a/src/assets/audio/explosion.ogg b/src/assets/audio/explosion.ogg new file mode 100644 index 0000000..b92d775 Binary files /dev/null and b/src/assets/audio/explosion.ogg differ diff --git a/src/assets/audio/explosion.wav b/src/assets/audio/explosion.wav deleted file mode 100644 index ae2ab34..0000000 Binary files a/src/assets/audio/explosion.wav and /dev/null differ diff --git a/src/assets/audio/gameover.mp3 b/src/assets/audio/gameover.mp3 new file mode 100644 index 0000000..65b6236 Binary files /dev/null and b/src/assets/audio/gameover.mp3 differ diff --git a/src/assets/audio/gameover.ogg b/src/assets/audio/gameover.ogg new file mode 100644 index 0000000..1218547 Binary files /dev/null and b/src/assets/audio/gameover.ogg differ diff --git a/src/assets/audio/gameover.wav b/src/assets/audio/gameover.wav deleted file mode 100644 index db3ed26..0000000 Binary files a/src/assets/audio/gameover.wav and /dev/null differ diff --git a/src/assets/audio/plane.mp3 b/src/assets/audio/plane.mp3 new file mode 100644 index 0000000..76645ca Binary files /dev/null and b/src/assets/audio/plane.mp3 differ diff --git a/src/assets/audio/plane.ogg b/src/assets/audio/plane.ogg new file mode 100644 index 0000000..ab2985b Binary files /dev/null and b/src/assets/audio/plane.ogg differ diff --git a/src/assets/audio/plane.wav b/src/assets/audio/plane.wav deleted file mode 100644 index aa7f26d..0000000 Binary files a/src/assets/audio/plane.wav and /dev/null differ diff --git a/src/assets/audio/wind.mp3 b/src/assets/audio/wind.mp3 new file mode 100644 index 0000000..9b8ab00 Binary files /dev/null and b/src/assets/audio/wind.mp3 differ diff --git a/src/assets/audio/wind.ogg b/src/assets/audio/wind.ogg new file mode 100644 index 0000000..e537c60 Binary files /dev/null and b/src/assets/audio/wind.ogg differ diff --git a/src/assets/audio/wind.wav b/src/assets/audio/wind.wav deleted file mode 100644 index 7bbb326..0000000 Binary files a/src/assets/audio/wind.wav and /dev/null differ diff --git a/src/scripts/scenes/GamePlay.ts b/src/scripts/scenes/GamePlay.ts index f2c6c15..fd56625 100755 --- a/src/scripts/scenes/GamePlay.ts +++ b/src/scripts/scenes/GamePlay.ts @@ -113,12 +113,12 @@ export class GamePlay extends Phaser.Scene { ); this.load.atlasXML("ui_buttons", "assets/images/yellowSheet.png", "assets/xml/yellowSheet.xml"); this.load.atlasXML("ui_icons", "assets/images/sheet_black1x.png", "assets/xml/sheet_black1x.xml"); - this.load.audio("crash", "assets/audio/crash.wav"); - this.load.audio("click", "assets/audio/click.wav"); - this.load.audio("explosion", "assets/audio/explosion.wav"); - this.load.audio("gameover", "assets/audio/gameover.wav"); - this.load.audio("plane", "assets/audio/plane.wav"); - this.load.audio("wind", "assets/audio/wind.wav"); + this.load.audio("crash", ["assets/audio/crash.mp3", "assets/audio/crash.ogg"]); + this.load.audio("click", ["assets/audio/click.mp3", "assets/audio/click.ogg"]); + this.load.audio("explosion", ["assets/audio/explosion.mp3", "assets/audio/explosion.ogg"]); + this.load.audio("gameover", ["assets/audio/gameover.mp3", "assets/audio/gameover.ogg"]); + this.load.audio("plane", ["assets/audio/plane.mp3", "assets/audio/plane.ogg"]); + this.load.audio("wind", ["assets/audio/wind.mp3", "assets/audio/wind.ogg"]); this.load.image("musicOff", "assets/images/musicOff.png"); this.load.image("musicOn", "assets/images/musicOn.png"); this.load.json("shapes", "assets/json/shapes.json"); diff --git a/src/scripts/scenes/gameplay/GameOver.ts b/src/scripts/scenes/gameplay/GameOver.ts index aebfca4..1fe2efd 100755 --- a/src/scripts/scenes/gameplay/GameOver.ts +++ b/src/scripts/scenes/gameplay/GameOver.ts @@ -418,7 +418,7 @@ export class GameOver extends Phaser.GameObjects.Container { document.addEventListener('deviceready', async () => { interstitial = new admob.InterstitialAd({ - adUnitId: 'ca-app-pub-4865595196880143/3742688595', + adUnitId: 'ca-app-pub-4865595196880143/1957466653', }) await interstitial.load() @@ -517,10 +517,10 @@ export class GameOver extends Phaser.GameObjects.Container { // Event handlers. const onSuccess: () => void = () => { - console.log("Sharing result successful."); + alert("Sharing result successful."); }; const onError: () => void = () => { - console.log("Sharing result unsuccessful."); + alert("Sharing result unsuccessful."); }; window.plugins.socialsharing.shareWithOptions(options, onSuccess, onError); // Cordova plugin execution. diff --git a/src/scripts/scenes/gameplay/Gui.ts b/src/scripts/scenes/gameplay/Gui.ts index d29d225..1018761 100755 --- a/src/scripts/scenes/gameplay/Gui.ts +++ b/src/scripts/scenes/gameplay/Gui.ts @@ -1,5 +1,5 @@ import { SCORE, UI_ICONS_SCALE_FACTOR } from "../../utils/GameConstants"; -import { getAuth, signInWithRedirect, getRedirectResult, GoogleAuthProvider } from "firebase/auth/cordova"; +import { getAuth, signInWithRedirect, getRedirectResult, OAuthProvider } from "firebase/auth/cordova"; /** * @class Gui @@ -336,10 +336,10 @@ export class Gui extends Phaser.GameObjects.Group { // Event handlers. const onSuccess: () => void = () => { - console.log("Inviting friends successful."); + alert("Inviting friends successful."); }; const onError: () => void = () => { - console.log("Inviting friends unsuccessful."); + alert("Inviting friends unsuccessful."); }; facebookConnectPlugin.showDialog(options, onSuccess, onError); // Cordova plugin execution. @@ -384,7 +384,7 @@ export class Gui extends Phaser.GameObjects.Group { /** * @access private - * @description Login the user using Firebase Google authentication. + * @description Login the user using Firebase Apple authentication. * @function loginUsingFirebase * @returns {void} */ @@ -392,14 +392,15 @@ export class Gui extends Phaser.GameObjects.Group { const auth = getAuth(); // Create an instance of the authentication object. // Sign in by redirecting to the sign-in page. - signInWithRedirect(auth, new GoogleAuthProvider()) + signInWithRedirect(auth, new OAuthProvider('apple.com')) .then(() => { return getRedirectResult(auth); }) .then(() => { - console.log('Authentication successful.') - }).catch(() => { - console.log('Authentication unsuccessful.') + alert('Authentication successful.') + }).catch((error) => { + console.log(error) + alert('Authentication unsuccessful.') }); } @@ -436,10 +437,10 @@ export class Gui extends Phaser.GameObjects.Group { // Event handlers. const onSuccess: () => void = () => { - console.log("Sharing successful."); + alert("Sharing successful."); }; const onError: () => void = () => { - console.log("Sharing unsuccessful."); + alert("Sharing unsuccessful."); }; window.plugins.socialsharing.shareWithOptions(options, onSuccess, onError); // Cordova plugin execution. diff --git a/src/scripts/scenes/shop/ShopItem.ts b/src/scripts/scenes/shop/ShopItem.ts index e85699e..630f934 100644 --- a/src/scripts/scenes/shop/ShopItem.ts +++ b/src/scripts/scenes/shop/ShopItem.ts @@ -137,16 +137,15 @@ export class ShopItem extends Phaser.GameObjects.Container { .approved((transaction: any) => { // Add extra score and begin the game. localStorage.scoreRate = this.multiplier; - this.scene.scene.start("Shop"); // Start Shop scene. transaction.finish(); // Consume the transaction, so user can order the same item again (https://github.com/j3k0/cordova-plugin-purchase/issues/1459). }); store.initialize([ - Platform.GOOGLE_PLAY, + Platform.APPLE_APPSTORE, ]); - const offer: any = store.get(`scorex${this.multiplier}`).getOffer(); + const offer: any = store.get(`com.doyban.flyingplane.scorex${this.multiplier}`).getOffer(); store.order(offer); // Sometimes it's crashing, on x2 and x6 purchase while (thankfully) still keeping the purchase in the localStorage. } } diff --git a/src/scripts/scenes/shop/ShopItemGroup.ts b/src/scripts/scenes/shop/ShopItemGroup.ts index 5564a50..3e79101 100644 --- a/src/scripts/scenes/shop/ShopItemGroup.ts +++ b/src/scripts/scenes/shop/ShopItemGroup.ts @@ -43,9 +43,9 @@ export class ShopItemGroup { for (const i in this.multiplierArray) { store.register({ - id: `scorex${this.multiplierArray[i]}`, // Android requires just ID, but iOS full .com.doyban.myApp.scorexA path. + id: `com.doyban.flyingplane.scorex${this.multiplierArray[i]}`, // Android requires just ID, but iOS full .com.doyban.myApp.scorexA path. type: ProductType.CONSUMABLE, - platform: Platform.GOOGLE_PLAY, + platform: Platform.APPLE_APPSTORE, }); }